@zenera/cli 1.1.54 → 1.1.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/archive.js +3 -1
  2. package/dist/batch.d.ts +7 -7
  3. package/dist/batch.js +18 -27
  4. package/dist/commands/export.js +82 -62
  5. package/dist/commands/inspect.js +6 -6
  6. package/dist/commands/memory.js +80 -39
  7. package/dist/commands/sandbox.js +1 -17
  8. package/dist/meta/finetune/memories.d.ts +1 -1
  9. package/dist/meta/finetune/memories.js +25 -8
  10. package/dist/sandbox.js +1 -1
  11. package/dist/validate.js +6 -8
  12. package/package.json +4 -4
  13. package/templates/editor/.github/copilot-instructions.md +17 -30
  14. package/templates/editor/.github/skills/zen-analyze-run/SKILL.md +2 -1
  15. package/templates/editor/.github/skills/zen-cli/SKILL.md +1 -1
  16. package/templates/editor/.github/skills/zen-cli/references/export.md +7 -6
  17. package/templates/editor/.github/skills/zen-cli/references/memory.md +14 -13
  18. package/templates/editor/.github/skills/zen-cli/references/run.md +5 -5
  19. package/templates/editor/.github/skills/zen-finetune/SKILL.md +1 -1
  20. package/templates/editor/.github/skills/zen-finetune/scripts/memory.mjs +21 -7
  21. package/templates/editor/.github/skills/zen-finetune/scripts/report.mjs +2 -2
  22. package/templates/editor/.github/skills/zen-instructions/SKILL.md +3 -2
  23. package/templates/editor/.github/skills/zen-memory/SKILL.md +38 -38
  24. package/templates/editor/.github/skills/zen-memory-warmup/SKILL.md +2 -2
  25. package/templates/editor/.github/skills/zen-review/SKILL.md +3 -3
  26. package/templates/editor/.github/skills/zen-review/scripts/check-paths.sh +3 -3
  27. package/templates/editor/.github/skills/zen-sandbox/SKILL.md +5 -16
  28. package/templates/editor/.vscode/agents.schema.json +3 -2
  29. package/templates/project/agents/files-instructions.md +3 -2
  30. package/templates/project/agents/memory-instructions.md +8 -6
  31. package/templates/project/gitignore +6 -4
  32. package/templates/project/sandbox/Dockerfile.tmpl +28 -2
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: zen-memory
3
- description: Agent memory in Zenera projects - the `memory:` block and per-agent `access`/`sees`/`writes`/`autoRecall`, the five `memory_*` tools (when to use `memory_grep` instead of `memory_search`), kinds, relations and how recall ranks, inspecting a graph with `zen memory`, designing a memory strategy, `agents/memory-instructions.md` vs `agents/memory-policy-instructions.md`, remembering files under `/memory`, and putting memory in front of a `zen rag` index.
3
+ description: Agent memory in Zenera projects - the `memory:` block and per-agent `access`/`sees`/`writes`/`autoRecall`, the six `memory_*` tools (when to use `memory_grep` instead of `memory_search`), kinds, relations and how recall ranks, inspecting a graph with `zen memory`, designing a memory strategy, `agents/memory-instructions.md` vs `agents/memory-policy-instructions.md`, remembering files and copying them back with `memory_copy_file`, and putting memory in front of a `zen rag` index.
4
4
  user-invocable: false
5
5
  ---
6
6
 
@@ -120,8 +120,8 @@ are the same result - and the second is what you need when the question is
120
120
  whether a host, a flag or a command was already written down. Grep reads the
121
121
  text, the metadata and the bytes of remembered files, applies the mask, leaves
122
122
  out superseded nodes unless asked, and names any file it could not read. It is
123
- also what an agent is supposed to reach for instead of running a shell `grep`
124
- over `/memory`, which the house rules forbid.
123
+ also what an agent is supposed to reach for instead of looking for the files
124
+ some other way: they are never mounted, so the tools are the only way in.
125
125
 
126
126
  It is not a diagnostic instrument, though - it is ordinary retrieval, and an
127
127
  agent is expected to reach for it mid-run as readily as for search. The line
@@ -160,7 +160,7 @@ later.
160
160
  | `plan` | an approach that worked, worth reusing on a similar request |
161
161
  | `fact` | a durable truth about the environment or the domain |
162
162
  | `snippet` | a short piece of code or configuration, too small to be a file |
163
- | `file` | an artifact kept whole under `/memory` and re-runnable |
163
+ | `file` | an artifact kept whole, to copy back and run again |
164
164
  | `operation` | an external call that was made - an endpoint, command or query |
165
165
  | `preference` | a standing instruction from the user that applies to every run |
166
166
 
@@ -218,17 +218,18 @@ below.
218
218
 
219
219
  ```
220
220
  <project>/memory/
221
- ├── manifest.json written LAST - a half-written memory reads as empty
222
- ├── graph.json nodes and edges, parsed whole on open
223
- ├── vectors.f32 raw little-endian float32, a quarter the size of JSON
224
- ├── vectors.json the ids those vectors belong to
225
- ├── files/ remembered bytes, one per node that has any
226
- └── .lock held while a run is writing; a dead pid's lock is stale
221
+ ├── memory.db SQLite: nodes, edges and vectors; every write one transaction
222
+ ├── memory.db-wal the write-ahead log while runs have it open; folded in on close
223
+ └── files/ remembered bytes, one per node that has any
227
224
  ```
228
225
 
229
- It is committed with the project - everything but `.lock`, which is runtime
230
- state. The directory is mounted **read-only** at `/memory` in the agent's
231
- namespace.
226
+ Several runs may read and write one memory at once, and a run killed mid-write
227
+ leaves the last commit intact. It is committed with the project - everything
228
+ but `memory.db-wal`/`memory.db-shm`, which are runtime state. Nothing here is
229
+ mounted into the sandbox: a remembered file reaches the workspace only as a copy
230
+ made by `memory_copy_file`. A memory from an
231
+ older `zen` (`graph.json`, `vectors.f32`) is refused until converted once with
232
+ `zen memory migrate`.
232
233
 
233
234
  ## Designing a memory strategy
234
235
 
@@ -386,18 +387,16 @@ a `file` argument on a node instead, and copies the **bytes** out:
386
387
  ```
387
388
 
388
389
  The path is the one the **file tools** use, resolved the same way. The copy
389
- lands at `<project>/memory/files/<id>.<ext>` and appears to the agent as:
390
-
391
- ```
392
- /memory/01JD9Q7X8N2K4M6P8R0T2V4W6Y.py
393
- ```
390
+ lands at `<project>/memory/files/<id>.<ext>`, and the agent knows it by that
391
+ name - `01JD9Q7X8N2K4M6P8R0T2V4W6Y.py` - and by its node id. It is not on any
392
+ path the agent can open.
394
393
 
395
394
  | Rule | Value |
396
395
  | --------- | ---------------------------------------------------------------- |
397
396
  | Size cap | 2 MiB. Over it, keep the artifact and commit a `snippet` instead |
398
397
  | Inlined | under 32 KiB - `memory_load` returns the contents |
399
- | Larger | `memory_load` returns the path; open or run it |
400
- | Mount | `/memory`, **read-only** |
398
+ | Larger | `memory_load` returns the name; `memory_copy_file` to open it |
399
+ | Mount | none - `memory_copy_file` copies into `/workspace` |
401
400
  | Extension | preserved, because it decides how the file runs and renders |
402
401
 
403
402
  ### The agent has to be able to write the file first
@@ -415,7 +414,7 @@ text no matter how much the memory design leans on `file` nodes.
415
414
  | Neither | No. Everything worth keeping has to fit on one line of `text` |
416
415
 
417
416
  The workspace is the only tree that round-trips, because it is the only
418
- writable one. `/assets`, `/skills` and `/memory` resolve as well - they are
417
+ writable one. `/assets` and `/skills` resolve as well - they are
419
418
  mounts the file tools know by name - but they are **read-only**, so nothing can
420
419
  be put there to be remembered. Every other absolute path is real to
421
420
  `run_command` and outside the workspace root, so a file written to `/tmp` comes
@@ -434,10 +433,13 @@ context ever uses workspace vocabulary and the model has no reason to prefer
434
433
  `/workspace` over `/tmp`. Either give it the file tools, or say in its prompt
435
434
  that work it means to keep goes in `/workspace`.
436
435
 
437
- Reusing one is the point of keeping it:
436
+ Reusing one is the point of keeping it. `memory_copy_file` needs only `read`
437
+ access, puts the file at `/workspace/<id>.<ext>` unless given a `to`, and will
438
+ not replace an existing file without `overwrite`:
438
439
 
439
440
  ```
440
- run_command python3 /memory/01JD9Q7X8N2K4M6P8R0T2V4W6Y.py
441
+ memory_copy_file { "id": "01JD9Q7X8N2K4M6P8R0T2V4W6Y" } → /workspace/01JD9Q7X8N2K4M6P8R0T2V4W6Y.py
442
+ run_command python3 01JD9Q7X8N2K4M6P8R0T2V4W6Y.py
441
443
  ```
442
444
 
443
445
  Which means the file has to be **self-contained**. A script that reads
@@ -445,10 +447,10 @@ Which means the file has to be **self-contained**. A script that reads
445
447
  that takes its inputs as arguments will. If it needs a credential, it should
446
448
  read it from the environment and say so in the node text.
447
449
 
448
- Nothing writes to `/memory` through the file tools, so every file under it has a
449
- node explaining what it is and the graph cannot acquire orphans. To change a
450
- remembered file: copy it into the workspace, edit it there, commit the new one
451
- and link it with `SUPERSEDES` to the old.
450
+ Only a commit puts a file in the store, so every file there has a node
451
+ explaining what it is and the graph cannot acquire orphans. The copy in the
452
+ workspace is the agent's to edit. To change a remembered file: copy it, edit the
453
+ copy, commit the new one and link it with `SUPERSEDES` to the old.
452
454
 
453
455
  The node text describes and locates; the file carries the content. Reach for a
454
456
  node with no file only when the whole of what you know fits on one line.
@@ -559,7 +561,8 @@ gets whether it loads the skill or not.
559
561
 
560
562
  **Every project that enables memory carries `agents/memory-instructions.md`**,
561
563
  as shipped by `zen`. That file is how the agent is told to use the store: read
562
- and search it only through the tools, never through `/memory` itself, and what a
564
+ and search it only through the tools, copy a file out with `memory_copy_file`
565
+ before running it, and what a
563
566
  node must carry to still be worth having.
564
567
 
565
568
  `zen init` writes it, because the projects it scaffolds have memory on from the
@@ -653,7 +656,7 @@ can act on.
653
656
  ## Inspecting and repairing it
654
657
 
655
658
  ```
656
- zen memory [stats|ls|search|grep|show|export|merge|forget] [args] [options]
659
+ zen memory [stats|ls|search|grep|show|export|merge|forget|migrate] [args] [options]
657
660
  ```
658
661
 
659
662
  `zen memory export --open` is the one to reach for: one self-contained HTML
@@ -683,22 +686,19 @@ memory that is missing from a memory that is merely ranked sixth.
683
686
  | Fold parallel warmup graphs into one | `zen memory merge <dir...>` |
684
687
  | That should never have been written down | `zen memory forget <id>` |
685
688
 
686
- Never read a memory's `graph.json` or `manifest.json` with code: every question
689
+ Never query a memory's `memory.db` with code: every question
687
690
  above has a command, and `--json` on any of them is the stable shape.
688
691
 
689
692
  The directory is not fixed. `zen run --memory <dir>` sends one run's memory
690
693
  somewhere else - a scratch graph for a trial, one per branch, or a shared one
691
694
  outside the repository - and `zen memory --dir <dir>` reads any such directory
692
- with no project around it. Together they are also how you read a graph while a
693
- run holds its `.lock`: copy the directory, delete the copy's `.lock`, and point
694
- `--dir` at the copy. `grep` needs none of that - it declines the lock, so it
695
- reads a memory a run is writing, and the read-only `/memory` mount as well.
695
+ with no project around it, including one a run is writing to right now.
696
696
 
697
697
  `zen run batch` is where parallel graphs usually come from now. Each item gets
698
698
  its own copy to write into and the summary prints the `merge` line; a batch
699
699
  that is only asking says `--memory-read-only` instead, and then every item
700
- recalls from the one graph, because nothing writes and so nothing needs the
701
- lock.
700
+ recalls from the one graph, because nothing writes and so nothing changes under
701
+ anyone.
702
702
 
703
703
  `zen inspect` answers the other half: a run report shows the recollection block
704
704
  exactly as the model received it, which is how you tell "memory had nothing"
@@ -777,11 +777,11 @@ agents:
777
777
  | Recall finds a memory only when reworded | No embedder. `zen memory stats` says `embedding none` |
778
778
  | A memory is in the graph but never comes back | Ask `zen memory search` for it: a score under `0.15` is dropped as noise, and `--audience <label>` shows whether a mask hid it |
779
779
  | `zen memory search` says `ranked by term overlap` | It could not build the project's embedder - no credential, or the graph holds no vectors. That order is not the one a run gets |
780
- | Recall finds nothing after changing the embedder | Refused rather than mixed - a manifest records the model. Change it back, or start a new memory |
780
+ | Recall finds nothing after changing the embedder | Refused rather than mixed - the memory records the model. Change it back, or start a new memory |
781
781
  | Vectors fewer than nodes | Some nodes were committed with no embedder; they are only reachable by term overlap |
782
782
  | The graph fills with restated requests | The commit rule is not in a prompt or skill. State the "would a later run redo this" test |
783
783
  | Runs do real work and the graph stays empty | The agent is bound `read`, or nothing names the moments: empty recall then work, before an answer, a handoff or a fork's return |
784
- | An agent greps `/memory` or reads `graph.json` | The house-rules block is missing from `agents/memory-instructions.md` - the system prompt never forbids it |
784
+ | An agent guesses a path for a remembered file | The house-rules block is missing from `agents/memory-instructions.md` - nothing tells it to use `memory_copy_file` |
785
785
  | A recalled fact cannot be checked or continued | Nodes were committed with no provenance. The block's "say where it came from" rule is what prevents it |
786
786
  | Recall returns pointers and the run re-reads it all | Content was committed as `text` alone. A node's text describes and locates; the content belongs in a file |
787
787
  | A wrong memory keeps coming back | It was edited instead of superseded, or superseded in the wrong direction - the **new** node is the source |
@@ -37,8 +37,8 @@ directory of memories comes out, and `zen memory merge` folds them into one.
37
37
 
38
38
  ## What the Command Already Does
39
39
 
40
- Warmup used to be a script's problem: a memory per run because the lock is per
41
- directory, a fresh workspace per run, a bounded number of background jobs, and
40
+ Warmup used to be a script's problem: a memory per run so that no run learns
41
+ from another mid-round, a fresh workspace per run, a bounded number of background jobs, and
42
42
  a merge at the end. `zen run batch` is that fan-out made into a command, so
43
43
  none of it is the script's problem any more.
44
44
 
@@ -78,10 +78,10 @@ the sandbox pin. Finish setup and all edits before saving the final receipt.
78
78
 
79
79
  ### `check-paths.sh` - the §2.5 sweep
80
80
 
81
- A running agent's whole world is four paths: `/workspace`, `/assets`, `/skills`
82
- and `/memory`. Every path-shaped token in `agents/*instructions.md`,
81
+ A running agent's whole world is three paths: `/workspace`, `/assets` and
82
+ `/skills`. Every path-shaped token in `agents/*instructions.md`,
83
83
  `agents/prompts/*.md` and a skill's markdown is read by a model as an
84
- instruction to open something, so anything outside those four is an instruction
84
+ instruction to open something, so anything outside those three is an instruction
85
85
  to open a file that is not there.
86
86
 
87
87
  ```sh
@@ -6,7 +6,7 @@
6
6
  # check-paths.sh each candidate, with the file and line it is on
7
7
  # check-paths.sh raw the tokens alone, unfiltered — the sweep itself
8
8
  #
9
- # A running agent sees four paths: /workspace, /assets, /skills and /memory.
9
+ # A running agent sees three paths: /workspace, /assets and /skills.
10
10
  # Everything else printed here is either noise this script has not learned yet
11
11
  # or an instruction to open a file that is not there. There is no third case,
12
12
  # which is why this exits non-zero whenever it prints one: the list is meant to
@@ -24,9 +24,9 @@ cd "$(dirname "$0")/../../../.."
24
24
  # stray `/examples.md`, and that fragment is noise on every run of every project.
25
25
  TOKEN='[~.]?/?[A-Za-z0-9_.-]*(/[A-Za-z0-9_.*-]+)+'
26
26
 
27
- # The four mounts, and only those: a token under one of them is a path that
27
+ # The three mounts, and only those: a token under one of them is a path that
28
28
  # resolves.
29
- MOUNTS='^/(workspace|assets|skills|memory)(/|$)'
29
+ MOUNTS='^/(workspace|assets|skills)(/|$)'
30
30
 
31
31
  # English that happens to contain a slash, and the placeholder paths of a
32
32
  # worked example. Add to this rather than teaching a reviewer to skip the same
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: zen-sandbox
3
- description: 'How the container sandbox works, when and how to configure it in `agents.yaml` (`sandbox:` and `agents[].sandbox`), the four `sandbox:*` tools, mount layout (/workspace, $HOME, /tmp, /run/zenera/keys), lifecycle and persistence (`persist: true`), credential forwarding by name, resource ceilings (cpus, memory, pids), standard vs strict hardening profiles, path rules, and debugging container issues with `zen sandbox`. Refers to `zen-cli` (`.github/skills/zen-cli/references/sandbox.md`).'
3
+ description: 'How the container sandbox works, when and how to configure it in `agents.yaml` (the project's `sandbox:` block, one container per session), the four `sandbox:*` tools, mount layout (/workspace, $HOME, /tmp, /run/zenera/keys), lifecycle and persistence (`persist: true`), credential forwarding by name, resource ceilings (cpus, memory, pids), standard vs strict hardening profiles, path rules, and debugging container issues with `zen sandbox`. Refers to `zen-cli` (`.github/skills/zen-cli/references/sandbox.md`).'
4
4
  user-invocable: false
5
5
  ---
6
6
 
@@ -95,7 +95,6 @@ Inside the container, paths are isolated to designated mount points:
95
95
  | `/workspace` | Session workspace | read-write* | The work itself. Changes survive session completion. |
96
96
  | `/home/agent` | `.data/sandbox/home` | read-write | User home (`$HOME`). Persists across sessions. |
97
97
  | `/tmp` | In-memory / host tmpfs | read-write | Ephemeral scratch; holds `/tmp/zenera-jobs`. |
98
- | `/memory` | Session memory directory | read-only | Generated memory files (when `memory:` is enabled). |
99
98
  | `/assets` | Project assets directory | read-only | Reference assets declared in `SPECIFICATION.md`. |
100
99
  | `/skills` | Project skills directory | read-only | Custom skill files available to agents. |
101
100
  | `/run/zenera/keys` | Keychain / temp directory | read-only | Forwarded file credentials (e.g. Vertex service keys). |
@@ -138,7 +137,7 @@ zn-<key>-<digest>
138
137
 
139
138
  ## 5. Configuring `sandbox:` in `agents.yaml`
140
139
 
141
- Configured at the top level and optionally overridden per agent under `agents[].sandbox`:
140
+ Configured once, at the top level. Every agent in a session shares the one container; `agents[].sandbox` was removed and fails to load:
142
141
 
143
142
  ```yaml
144
143
  sandbox:
@@ -151,15 +150,6 @@ sandbox:
151
150
  hardening: standard
152
151
  env: [HTTPS_PROXY, NO_PROXY]
153
152
  keys: true
154
-
155
- agents:
156
- - name: builder
157
- # Inherits base sandbox configuration
158
-
159
- - name: isolated-runner
160
- sandbox:
161
- hardening: strict
162
- network: none
163
153
  ```
164
154
 
165
155
  ### Configuration Fields
@@ -247,11 +237,10 @@ Every container runs with baseline safety controls:
247
237
 
248
238
  ---
249
239
 
250
- ## 8. Multi-Agent Sandboxes (`SandboxPool`)
240
+ ## 8. One Sandbox per Session
251
241
 
252
- - Two agents with identical sandbox configurations share the **same container**.
253
- - Two agents with different images or configurations receive separate containers.
254
- - The `sandbox:*` tool definitions remain uniform across the session; when an agent calls a tool, the pool routes the call to that specific agent's container at invocation time.
242
+ - Every agent in a session runs in the **same container** and sees the same `/workspace`.
243
+ - A tool only one agent needs still goes in the project's image; there is no per-agent sandbox.
255
244
 
256
245
  ---
257
246
 
@@ -603,8 +603,9 @@
603
603
  "oneOf": [{ "type": "boolean" }, { "$ref": "#/$defs/memoryBinding" }]
604
604
  },
605
605
  "sandbox": {
606
- "description": "Overrides on the project's sandbox. An agent that overrides nothing shares the container with everyone else; one that names its own image gets its own.",
607
- "$ref": "#/$defs/sandbox"
606
+ "description": "Removed: a session has one sandbox, the project's, shared by every agent.",
607
+ "deprecationMessage": "Per-agent sandboxes were removed — move these settings to the project's top-level `sandbox:`.",
608
+ "not": {}
608
609
  },
609
610
  "default": {
610
611
  "description": "The entry point, when no top-level `default:` names one.",
@@ -87,7 +87,8 @@ Use `copy_file` to duplicate a file, never `read_file` + `write_file`. The bytes
87
87
  conversation, so there is no size cap and binaries arrive intact.
88
88
 
89
89
  - The source may be in a read-only mount; only the destination must be writable.
90
- This is how something under `/assets`, `/skills` or `/memory` reaches `/workspace`.
90
+ This is how something under `/assets` or `/skills` reaches `/workspace`. Remembered
91
+ files are not mounted; `memory_copy_file` brings one into the workspace.
91
92
  - Set `overwrite: true` only when intentionally replacing an existing destination.
92
93
  - Copying a directory and its contents requires `recursive: true`.
93
94
 
@@ -103,6 +104,6 @@ All file operations are confined to mounted trees:
103
104
 
104
105
  - `/workspace`: The primary writable directory for the project. Paths inside the workspace
105
106
  (such as `/workspace/src/main.ts`) are where project files reside.
106
- - `/assets`, `/skills`, `/memory`: Read-only mounts. You may read, list, and search them,
107
+ - `/assets`, `/skills`: Read-only mounts. You may read, list, and search them,
107
108
  but you cannot write, move, or delete files inside them.
108
109
  - Any attempt to reach outside these mounts fails with a containment error.
@@ -71,9 +71,10 @@ above produced it, `←informed` means it informed the line above.
71
71
  background. A `+` reference points to an id already shown above.
72
72
 
73
73
  Node text is clipped to 160 characters. A file node adds one line with its
74
- `/memory/<id>.<ext>` path, size, and use count. Use `memory_load` to obtain the
75
- complete node and its usable path. Touch only paths returned by a `memory_*`
76
- tool.
74
+ `<id>.<ext>` name, size, and use count. Use `memory_load` to obtain the
75
+ complete node; a small file comes back inline. To open or run a remembered
76
+ file, copy it into the workspace with `memory_copy_file`, then use the path it
77
+ returns. Remembered files are not on any mounted path.
77
78
 
78
79
  Direct store access is prohibited because it bypasses audience controls, may
79
80
  serve superseded nodes, does not record use, and can race with another writer.
@@ -93,7 +94,7 @@ inputs, outputs, and credentials handling.
93
94
  ### Keep memory out of ordinary answers
94
95
 
95
96
  Report findings and checkable sources, not the mechanism that found them. Do
96
- not expose `/memory` paths, node ids, or say that something was recalled or
97
+ not expose remembered file names, node ids, or say that something was recalled or
97
98
  remembered. The exception is a request about the store itself, where ids and
98
99
  memory state are the subject.
99
100
 
@@ -208,8 +209,9 @@ of living project files.
208
209
 
209
210
  Put provenance in the file itself as a short header. Make executable artifacts
210
211
  self-contained, take request-specific values as arguments, read credentials
211
- from the environment, and accept an output path under `/workspace`. The
212
- `/memory` mount is read-only.
212
+ from the environment, and accept an output path under `/workspace`. A later run
213
+ reaches the script only through `memory_copy_file`, so it must not depend on
214
+ where it was stored.
213
215
 
214
216
  Commit a script only after it ran successfully against the intended environment
215
217
  and produced verified output. Commit its invocation and operations, not its
@@ -5,10 +5,12 @@ sessions/
5
5
  # The same, one level up: a batch's workspaces, memory copies and answers.
6
6
  batches/
7
7
 
8
- # Memory is worth keeping: `graph.json`, `files/` and the vectors are what the
9
- # agents learned. The vectors are binary, but nothing rebuilds them from the
10
- # graph, so a clone without them recalls by term overlap until every node is
11
- # written again. Only the lock is runtime state.
8
+ # Memory is worth keeping: `memory.db` and `files/` are what the agents
9
+ # learned, vectors included, and nothing rebuilds them. The database is folded
10
+ # into that one file whenever the last run using it closes; the write-ahead
11
+ # log beside it is runtime state, as is a version 1 memory's lock.
12
+ memory/memory.db-wal
13
+ memory/memory.db-shm
12
14
  memory/.lock
13
15
 
14
16
  # Scratch, inside the workspace so the sandbox can reach it.
@@ -18,8 +18,34 @@ COPY --from=node /usr/local/lib/node_modules /usr/local/lib/node_modules
18
18
  RUN ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm \
19
19
  && ln -s /usr/local/lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx
20
20
 
21
- # Keep the heavyweight provider SDKs cached when the pinned CLI release changes.
22
- RUN npm install -g @anthropic-ai/sdk @google/genai @openrouter/sdk openai
21
+ # Keep the third-party dependencies of @zenera/{cli,engine,neo,rag,view} cached
22
+ # when the pinned CLI release changes. Keep in sync with their package.json files.
23
+ RUN npm install -g \
24
+ "@anthropic-ai/sdk@^0.120.0" \
25
+ "@apidevtools/swagger-parser@^12.0.0" \
26
+ "@google/genai@^2.30.0" \
27
+ "@inkjs/ui@^2.0.0" \
28
+ "@lancedb/lancedb@^0.38.0" \
29
+ "@openrouter/sdk@^1.4.25" \
30
+ "@types/hast@^3.0.5" \
31
+ "google-auth-library@^10.0.0" \
32
+ "graphology@^0.26.0" \
33
+ "ink@^7.1.1" \
34
+ "lowlight@^3.3.0" \
35
+ "mermaid@^12.2.0" \
36
+ "openai@^6.0.0" \
37
+ "react@^19.2.8" \
38
+ "rehype-sanitize@^6.0.0" \
39
+ "rehype-slug@^6.0.0" \
40
+ "remark-frontmatter@^5.0.0" \
41
+ "remark-gfm@^4.0.1" \
42
+ "remark-parse@^11.0.0" \
43
+ "remark-rehype@^11.1.2" \
44
+ "unified@^11.0.5" \
45
+ "yaml@^2.9.1" \
46
+ "yauzl@^3.4.0" \
47
+ "yazl@^3.3.1" \
48
+ "zod@^4.6.7"
23
49
 
24
50
  # Pinned to the `zen` that wrote this file, so the tools in the container are
25
51
  # the ones the session outside it was built by. Bump both together.