Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ LLM hub for this system repo. Prefer in-repo skills and docs over ad-hoc inventi

## Mission

**MemNet** (Net of Memory) is **mission working memory** — a session graph (GQL **node**/vertex, **edge**/relationship, **property**) **between** LLM call pipelines and data search, not the corpus and not GraphRAG. Agents read a bounded **live pin map** each turn and write in the same **GQL (openCypher-shaped)** family — redefined **Write = display** via shaped subgraph emit ([`docs/grammar/gql-wire-profile.md`](docs/grammar/gql-wire-profile.md)). In-session recall is **serial**: kind/keyword cue, then `pin_map` neighbourhood. Primary read: MCP `pin_map` / CLI `query pin-map`; leftover `query_warm` / `query warm` are leftover aliases. Aims (MN-REQ-00): save wall-clock time and tokens while keeping factual accuracy. Aids **system**, **programme**, **software**, **firmware**, **hardware**, and **documentation**. Transport: **in-process first** (single-agent; TCP fallback). **Multitask** requires TCP serve or streamable-http MCP — see Multitask policy below. This repo is **engine + generic memnet-mcp** only — novel-writer dropped. Repo product **0.19.23** (Hatch SSOT; last published PyPI **`memnet-llm==0.19.22`** until this cut is uploaded; 0.19.23 honesty `c`: admin checkpoint of every loaded session without drain plus `checkpoint-verify` (#211, MN-REQ-06.15). Earlier `c` cuts include 0.19.22 safe serve upgrade — admin `upgrade-prepare` drain, lossless snapshot with manifest, startup restore under the same ids, automatic retire (#208 trimmed by #210, MN-REQ-06.14), 0.19.21 serve per-request output isolation, LF-only statement split, undeclared-property snapshot save, label case-fold, and housekeep GQL endpoint orphans with `prune_referenced` refusal (#206), 0.19.20 memnet-mcp product gateway `--transport gateway` (#203, MN-REQ-06.12), 0.19.19 doc-gate readiness (#201) and snapshot / value cap / WHERE / ACL who / expire-save fixes (#202), 0.19.18 snap_model bounded session grain (#199), 0.19.17 product-gate cap contract (#196) and admin-only serve usage report (#197), 0.19.16 shared Path-B ingest defaults 2000 nodes / 2000 edges, 0.19.15 storage role labels (#186), Path-B SysML ingest kinds (#188), Neo4j retired (#189), 0.19.14 TTL expire restore by known sid, and 0.19.11 catalog cross-session satisfy locators + CousinSysMLEdge mustNotInventUploadBind). **1.0** = 0.5–0.8 claimed (unclaimed). See `README.md`, [`docs/SHAPE.md`](docs/SHAPE.md), and `docs/grammar/`.
**MemNet** (Net of Memory) is **mission working memory** — a session graph (GQL **node**/vertex, **edge**/relationship, **property**) **between** LLM call pipelines and data search, not the corpus and not GraphRAG. Agents read a bounded **live pin map** each turn and write in the same **GQL (openCypher-shaped)** family — redefined **Write = display** via shaped subgraph emit ([`docs/grammar/gql-wire-profile.md`](docs/grammar/gql-wire-profile.md)). In-session recall is **serial**: kind/keyword cue, then `pin_map` neighbourhood. Primary read: MCP `pin_map` / CLI `query pin-map`; leftover `query_warm` / `query warm` are leftover aliases. Aims (MN-REQ-00): save wall-clock time and tokens while keeping factual accuracy. Aids **system**, **programme**, **software**, **firmware**, **hardware**, and **documentation**. Transport: **in-process first** (single-agent; TCP fallback). **Multitask** requires TCP serve or streamable-http MCP — see Multitask policy below. This repo is **engine + generic memnet-mcp** only — novel-writer dropped. Repo product **0.19.24** (Hatch SSOT; last published PyPI **`memnet-llm==0.19.23`** until this cut is uploaded; 0.19.24 honesty `c`: session ACL persisted in snapshots, `@SNAP` format 2, 0600 atomic writes, lease digest, one-time v1 backup (#215, MN-REQ-06.16). Earlier `c` cuts include 0.19.23 admin checkpoint of every loaded session without drain plus `checkpoint-verify` (#211, MN-REQ-06.15). Earlier `c` cuts include 0.19.22 safe serve upgrade — admin `upgrade-prepare` drain, lossless snapshot with manifest, startup restore under the same ids, automatic retire (#208 trimmed by #210, MN-REQ-06.14), 0.19.21 serve per-request output isolation, LF-only statement split, undeclared-property snapshot save, label case-fold, and housekeep GQL endpoint orphans with `prune_referenced` refusal (#206), 0.19.20 memnet-mcp product gateway `--transport gateway` (#203, MN-REQ-06.12), 0.19.19 doc-gate readiness (#201) and snapshot / value cap / WHERE / ACL who / expire-save fixes (#202), 0.19.18 snap_model bounded session grain (#199), 0.19.17 product-gate cap contract (#196) and admin-only serve usage report (#197), 0.19.16 shared Path-B ingest defaults 2000 nodes / 2000 edges, 0.19.15 storage role labels (#186), Path-B SysML ingest kinds (#188), Neo4j retired (#189), 0.19.14 TTL expire restore by known sid, and 0.19.11 catalog cross-session satisfy locators + CousinSysMLEdge mustNotInventUploadBind). **1.0** = 0.5–0.8 claimed (unclaimed). See `README.md`, [`docs/SHAPE.md`](docs/SHAPE.md), and `docs/grammar/`.

## Where to look

Expand Down
11 changes: 8 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,21 @@ This project uses Semantic Versioning as **interpreted for MemNet**: package `a.

## [Unreleased]

### Changed
- **Invent only — ClusterRoute vs SliceHandCarry (#191 / #47 cousin)** — `MemNetTwoMoves` outside `MemNetSystem` (`MN-REQ-06.9` + `MN-REQ-06.10` / `MN-VER-06-S08`). ClusterRoute = where the session lives (`MemNetLanMcpFront`; one owner; `pin_map` / `find` SHALL NOT span backends). SliceHandCarry = explicit copy into another session (`export_pin_map` or `session_save` → LAN file copy → dest import/`session_load`; `import_slice` same-serve only). Not a live hop. `import_slice(from_url)` not shipped. tip≠face. `inventOnly=true`; `implemented=false`; no engine code; no SemVer bump. Wire: [`docs/operations/cluster-route-vs-slice-hand-carry.md`](docs/operations/cluster-route-vs-slice-hand-carry.md).
- **Invent only — LAN MCP front over several serves (#191)** — `MemNetLanMcpFront` outside `MemNetSystem` (`MN-REQ-06.9` / `MN-VER-06-S07`). One MCP catalogue, N LAN `memnet serve` backends; `SessionOwnerRegistry` is owner (explicit pin allowed; silent hash is not sole routing). One owner per session; `pin_map` / `find` SHALL NOT span backends. Cousin of #47 (peer sid handoff), not the same invent. tip≠face. `inventOnly=true`; `implemented=false`; no engine code; no SemVer bump. Wire: [`docs/operations/memnet-lan-mcp-front.md`](docs/operations/memnet-lan-mcp-front.md).

## [0.19.24] - 2026-10-14

### Added
- **Session ACL in snapshots (MN-REQ-06.16)** — session save, expire save, checkpoint, and safe-upgrade snapshots carry the CapsPolicy ACL: enabled flag, per-caller grants (pin_map, mutate, WorkerWriteScope), and optional bind. The ACL is one `#@ACL:` comment line after `@SNAP`. `session load` restores it, both from `--file` and on the `--keep-id` reload path. `@SNAP` is now **version 2**, and version 2 **requires** the `#@ACL:` line: a version 2 snapshot without it fails `bad_snapshot`. Version 1 (written before the ACL was persisted) still loads, with ACL off, and prints `@ACL: absent|off`. A loaded ACL prints `@ACL: loaded|enabled=<0|1>|callers=<n>|bind=<0|1>`. A malformed ACL line fails the load instead of silently turning ACL off. The snapshot and the upgrade passport share one serialiser (`memnet.acl.acl_to_dict` / `acl_from_dict`). Readers built before this change reject `@SNAP` version 2 with `bad_snapshot` (unsupported snapshot version 2) rather than skipping the ACL line, and an upgrade manifest with `snapshot_format` 2 is refused by an older serve (`upgrade_snapshot_format`, exit 3). Verify: MN-VER-06-S14 (`tests/test_acl_snapshot.py`).

- **One-time v1 backup before the first v2 write (MN-REQ-06.16)** — the first snapshot write over a format 1 file (session save, expire save, checkpoint, safe-upgrade) copies the v1 bytes to `<file>.v1.bak` in the same directory, at mode `0600`, through `memnet/atomic_file.py`. An existing backup is never overwritten, and v2-over-v2 writes make no backup. There is no dual write: the snapshot itself is always v2. **Rollback to 0.19.23** means renaming the `.v1.bak` files over their snapshots (see [`docs/operations/safe-upgrade.md`](docs/operations/safe-upgrade.md)). That loses writes made after the upgrade. Old builds refuse v2 loudly (`bad_snapshot`, `upgrade_snapshot_format`) by design.

### Changed
- **Snapshot and manifest files are private and atomic (MN-REQ-06.16)** — every snapshot (session save, expire save, checkpoint, safe-upgrade), `upgrade-manifest.json`, `upgrade-blocked.json`, `upgrade-restore.json`, and `checkpoint-manifest.json` is written through one helper (`memnet/atomic_file.py`): a temp file created `0600` (`O_EXCL`), fsynced, then renamed. Files are `0600` even when they replace an older file with a looser mode. The upgrade passport is written in the same snapshot write, not appended afterwards.
- **Bind stores a lease digest, not the lease (MN-REQ-06.16)** — `session acl-bind` keeps the SHA-256 of the lease (`memnet.acl.lease_digest`). `check_bind` hashes the presented `--lease` (or `MEMNET_LEASE`) and compares digests in constant time. The snapshot, the passport, and the in-memory session never hold the raw lease. Consequence: a lost lease cannot be read back from a snapshot; re-run `session acl-bind` with the lease. The lease must be a high-entropy secret (SHA-256 is not a password KDF). A pre-digest snapshot with a raw `lease` loads and is hashed on load.
- **Upgrade restore keeps the ACL enabled flag as written** — a passport ACL with `enabled: false` but grants no longer comes back enabled.
- **Invent only — ClusterRoute vs SliceHandCarry (#191 / #47 cousin)** — `MemNetTwoMoves` outside `MemNetSystem` (`MN-REQ-06.9` + `MN-REQ-06.10` / `MN-VER-06-S08`). ClusterRoute = where the session lives (`MemNetLanMcpFront`; one owner; `pin_map` / `find` SHALL NOT span backends). SliceHandCarry = explicit copy into another session (`export_pin_map` or `session_save` → LAN file copy → dest import/`session_load`; `import_slice` same-serve only). Not a live hop. `import_slice(from_url)` not shipped. tip≠face. `inventOnly=true`; `implemented=false`; no engine code; no SemVer bump. Wire: [`docs/operations/cluster-route-vs-slice-hand-carry.md`](docs/operations/cluster-route-vs-slice-hand-carry.md).
- **Invent only — LAN MCP front over several serves (#191)** — `MemNetLanMcpFront` outside `MemNetSystem` (`MN-REQ-06.9` / `MN-VER-06-S07`). One MCP catalogue, N LAN `memnet serve` backends; `SessionOwnerRegistry` is owner (explicit pin allowed; silent hash is not sole routing). One owner per session; `pin_map` / `find` SHALL NOT span backends. Cousin of #47 (peer sid handoff), not the same invent. tip≠face. `inventOnly=true`; `implemented=false`; no engine code; no SemVer bump. Wire: [`docs/operations/memnet-lan-mcp-front.md`](docs/operations/memnet-lan-mcp-front.md).
- **Package identity 0.19.24** — Hatch / `project.toml` / `memnet.__version__` honesty cut on **0.19**. Agent loop (`cue → pin_map → mutate`) unchanged.

## [0.19.23] - 2026-10-11

Expand Down
Loading
Loading