@namzu/cli 26.3.0 → 27.0.0
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.
- package/CHANGELOG.md +214 -0
- package/README.md +49 -34
- package/dist/bin.js +7 -0
- package/dist/bin.js.map +1 -1
- package/dist/checkpoints/store.d.ts +17 -4
- package/dist/checkpoints/store.d.ts.map +1 -1
- package/dist/checkpoints/store.js +20 -5
- package/dist/checkpoints/store.js.map +1 -1
- package/dist/cli.js +2 -2
- package/dist/cli.js.map +1 -1
- package/dist/commands/acp.d.ts +23 -1
- package/dist/commands/acp.d.ts.map +1 -1
- package/dist/commands/acp.js +41 -2
- package/dist/commands/acp.js.map +1 -1
- package/dist/commands/drain.d.ts +69 -2
- package/dist/commands/drain.d.ts.map +1 -1
- package/dist/commands/drain.js +214 -134
- package/dist/commands/drain.js.map +1 -1
- package/dist/commands/eval.js +1 -1
- package/dist/commands/eval.js.map +1 -1
- package/dist/commands/provider-wait.d.ts +5 -5
- package/dist/commands/provider-wait.d.ts.map +1 -1
- package/dist/commands/provider-wait.js +2 -2
- package/dist/commands/resident.d.ts.map +1 -1
- package/dist/commands/resident.js +2 -1
- package/dist/commands/resident.js.map +1 -1
- package/dist/commands/run-flags.d.ts +7 -7
- package/dist/commands/run-flags.js +4 -4
- package/dist/commands/run-stream.d.ts +16 -12
- package/dist/commands/run-stream.d.ts.map +1 -1
- package/dist/commands/run-stream.js +142 -98
- package/dist/commands/run-stream.js.map +1 -1
- package/dist/commands/run.d.ts +6 -4
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +129 -45
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/serve.js +2 -2
- package/dist/commands/serve.js.map +1 -1
- package/dist/commands/state.js +8 -8
- package/dist/commands/state.js.map +1 -1
- package/dist/config/load.d.ts +1 -1
- package/dist/config/load.d.ts.map +1 -1
- package/dist/config/load.js +17 -5
- package/dist/config/load.js.map +1 -1
- package/dist/config/run-limits.d.ts +20 -8
- package/dist/config/run-limits.d.ts.map +1 -1
- package/dist/config/run-limits.js +28 -46
- package/dist/config/run-limits.js.map +1 -1
- package/dist/config/schema.d.ts +44 -19
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js.map +1 -1
- package/dist/config/tool-result-screens.js +1 -1
- package/dist/context/directories.d.ts +37 -0
- package/dist/context/directories.d.ts.map +1 -0
- package/dist/context/directories.js +69 -0
- package/dist/context/directories.js.map +1 -0
- package/dist/context/environment.d.ts +55 -0
- package/dist/context/environment.d.ts.map +1 -1
- package/dist/context/environment.js +96 -0
- package/dist/context/environment.js.map +1 -1
- package/dist/context/project-tracker.d.ts +3 -3
- package/dist/context/project-tracker.d.ts.map +1 -1
- package/dist/context/project-tracker.js +3 -3
- package/dist/context/project-tracker.js.map +1 -1
- package/dist/context/project.d.ts +1 -1
- package/dist/context/project.js +1 -1
- package/dist/context/sandbox.d.ts +22 -3
- package/dist/context/sandbox.d.ts.map +1 -1
- package/dist/context/sandbox.js +42 -4
- package/dist/context/sandbox.js.map +1 -1
- package/dist/doctor/checks/chain.d.ts +1 -1
- package/dist/doctor/checks/chain.js +5 -5
- package/dist/doctor/checks/chain.js.map +1 -1
- package/dist/doctor/checks/invariants.d.ts +2 -2
- package/dist/doctor/checks/invariants.js +5 -5
- package/dist/doctor/checks/invariants.js.map +1 -1
- package/dist/doctor/checks/logging.js +1 -1
- package/dist/doctor/checks/logging.js.map +1 -1
- package/dist/doctor/checks/sandbox.js +1 -1
- package/dist/doctor/checks/sandbox.js.map +1 -1
- package/dist/doctor/checks/session-export.d.ts +1 -1
- package/dist/doctor/checks/session-export.js +2 -2
- package/dist/doctor/checks/session-export.js.map +1 -1
- package/dist/doctor/checks/telemetry.d.ts +1 -1
- package/dist/doctor/checks/telemetry.js +1 -1
- package/dist/doctor/registry.js +2 -2
- package/dist/doctor/registry.js.map +1 -1
- package/dist/exit-codes.d.ts +2 -2
- package/dist/exit-codes.js +2 -2
- package/dist/integrations/mcp/servers.d.ts +1 -1
- package/dist/integrations/providers/chain-capabilities.d.ts +6 -6
- package/dist/integrations/providers/chain-capabilities.js +8 -8
- package/dist/integrations/providers/chain-capabilities.js.map +1 -1
- package/dist/integrations/providers/register.d.ts +1 -1
- package/dist/integrations/providers/register.js +1 -1
- package/dist/integrations/providers/registry.d.ts +1 -1
- package/dist/integrations/resident/inspection.d.ts +4 -1
- package/dist/integrations/resident/inspection.d.ts.map +1 -1
- package/dist/integrations/resident/inspection.js +53 -34
- package/dist/integrations/resident/inspection.js.map +1 -1
- package/dist/integrations/resident/learning-storage.d.ts +7 -2
- package/dist/integrations/resident/learning-storage.d.ts.map +1 -1
- package/dist/integrations/resident/learning-storage.js +12 -8
- package/dist/integrations/resident/learning-storage.js.map +1 -1
- package/dist/integrations/resident/runner-store.d.ts +1 -1
- package/dist/integrations/resident/runner-store.d.ts.map +1 -1
- package/dist/integrations/resident/runner-store.js +5 -2
- package/dist/integrations/resident/runner-store.js.map +1 -1
- package/dist/integrations/resident/runner-worker.js +1 -0
- package/dist/integrations/resident/runner-worker.js.map +1 -1
- package/dist/integrations/resident/session-log-reads.d.ts +37 -0
- package/dist/integrations/resident/session-log-reads.d.ts.map +1 -0
- package/dist/integrations/resident/session-log-reads.js +125 -0
- package/dist/integrations/resident/session-log-reads.js.map +1 -0
- package/dist/integrations/resident/session-step.d.ts +2 -0
- package/dist/integrations/resident/session-step.d.ts.map +1 -1
- package/dist/integrations/resident/session-step.js +15 -13
- package/dist/integrations/resident/session-step.js.map +1 -1
- package/dist/integrations/resident/storage.d.ts +23 -1
- package/dist/integrations/resident/storage.d.ts.map +1 -1
- package/dist/integrations/resident/storage.js +60 -17
- package/dist/integrations/resident/storage.js.map +1 -1
- package/dist/integrations/resident/tool-evidence.d.ts +4 -2
- package/dist/integrations/resident/tool-evidence.d.ts.map +1 -1
- package/dist/integrations/resident/tool-evidence.js +36 -30
- package/dist/integrations/resident/tool-evidence.js.map +1 -1
- package/dist/integrations/resident/verification.d.ts +2 -2
- package/dist/integrations/resident/verification.d.ts.map +1 -1
- package/dist/integrations/resident/verification.js +4 -4
- package/dist/integrations/resident/verification.js.map +1 -1
- package/dist/integrations/sessions/checkpoint-view.d.ts +13 -0
- package/dist/integrations/sessions/checkpoint-view.d.ts.map +1 -0
- package/dist/integrations/sessions/checkpoint-view.js +48 -0
- package/dist/integrations/sessions/checkpoint-view.js.map +1 -0
- package/dist/integrations/sessions/context-inventory.js +1 -1
- package/dist/integrations/sessions/context-inventory.js.map +1 -1
- package/dist/integrations/sessions/conversation-search.d.ts +16 -20
- package/dist/integrations/sessions/conversation-search.d.ts.map +1 -1
- package/dist/integrations/sessions/conversation-search.js +305 -731
- package/dist/integrations/sessions/conversation-search.js.map +1 -1
- package/dist/integrations/sessions/evidence-page-validation.d.ts +4 -4
- package/dist/integrations/sessions/evidence-page-validation.d.ts.map +1 -1
- package/dist/integrations/sessions/evidence-page-validation.js +1 -1
- package/dist/integrations/sessions/evidence-page-validation.js.map +1 -1
- package/dist/integrations/sessions/evidence-recall.d.ts +40 -2
- package/dist/integrations/sessions/evidence-recall.d.ts.map +1 -1
- package/dist/integrations/sessions/evidence-recall.js +41 -97
- package/dist/integrations/sessions/evidence-recall.js.map +1 -1
- package/dist/integrations/sessions/store.d.ts +153 -85
- package/dist/integrations/sessions/store.d.ts.map +1 -1
- package/dist/integrations/sessions/store.js +414 -484
- package/dist/integrations/sessions/store.js.map +1 -1
- package/dist/integrations/sessions/task-context.d.ts +15 -2
- package/dist/integrations/sessions/task-context.d.ts.map +1 -1
- package/dist/integrations/sessions/task-context.js +34 -11
- package/dist/integrations/sessions/task-context.js.map +1 -1
- package/dist/integrations/sessions/transcript-export.d.ts +13 -6
- package/dist/integrations/sessions/transcript-export.d.ts.map +1 -1
- package/dist/integrations/sessions/transcript-export.js +148 -263
- package/dist/integrations/sessions/transcript-export.js.map +1 -1
- package/dist/integrations/state/home.d.ts +4 -16
- package/dist/integrations/state/home.d.ts.map +1 -1
- package/dist/integrations/state/home.js +6 -42
- package/dist/integrations/state/home.js.map +1 -1
- package/dist/integrations/state/project.d.ts +6 -7
- package/dist/integrations/state/project.d.ts.map +1 -1
- package/dist/integrations/state/project.js +7 -9
- package/dist/integrations/state/project.js.map +1 -1
- package/dist/integrations/state/report.d.ts +27 -41
- package/dist/integrations/state/report.d.ts.map +1 -1
- package/dist/integrations/state/report.js +172 -464
- package/dist/integrations/state/report.js.map +1 -1
- package/dist/integrations/state/retention.d.ts +18 -0
- package/dist/integrations/state/retention.d.ts.map +1 -0
- package/dist/integrations/state/retention.js +18 -0
- package/dist/integrations/state/retention.js.map +1 -0
- package/dist/integrations/subagents/activity.d.ts +36 -31
- package/dist/integrations/subagents/activity.d.ts.map +1 -1
- package/dist/integrations/subagents/activity.js +27 -23
- package/dist/integrations/subagents/activity.js.map +1 -1
- package/dist/integrations/subagents/batches.d.ts +91 -0
- package/dist/integrations/subagents/batches.d.ts.map +1 -0
- package/dist/integrations/subagents/batches.js +172 -0
- package/dist/integrations/subagents/batches.js.map +1 -0
- package/dist/integrations/subagents/parent.d.ts +26 -11
- package/dist/integrations/subagents/parent.d.ts.map +1 -1
- package/dist/integrations/subagents/parent.js +13 -28
- package/dist/integrations/subagents/parent.js.map +1 -1
- package/dist/integrations/subagents/policy.d.ts +2 -2
- package/dist/integrations/subagents/policy.d.ts.map +1 -1
- package/dist/integrations/subagents/policy.js +2 -2
- package/dist/integrations/subagents/policy.js.map +1 -1
- package/dist/integrations/subagents/replay.d.ts +91 -26
- package/dist/integrations/subagents/replay.d.ts.map +1 -1
- package/dist/integrations/subagents/replay.js +216 -114
- package/dist/integrations/subagents/replay.js.map +1 -1
- package/dist/integrations/subagents/runtime.d.ts +50 -26
- package/dist/integrations/subagents/runtime.d.ts.map +1 -1
- package/dist/integrations/subagents/runtime.js +132 -126
- package/dist/integrations/subagents/runtime.js.map +1 -1
- package/dist/integrations/subagents/saved-agents.d.ts +57 -0
- package/dist/integrations/subagents/saved-agents.d.ts.map +1 -0
- package/dist/integrations/subagents/saved-agents.js +102 -0
- package/dist/integrations/subagents/saved-agents.js.map +1 -0
- package/dist/integrations/subagents/slash.d.ts +55 -0
- package/dist/integrations/subagents/slash.d.ts.map +1 -0
- package/dist/integrations/subagents/slash.js +45 -0
- package/dist/integrations/subagents/slash.js.map +1 -0
- package/dist/integrations/telemetry/session-export.d.ts +6 -6
- package/dist/integrations/telemetry/session-export.d.ts.map +1 -1
- package/dist/integrations/telemetry/session-export.js +2 -2
- package/dist/memory/presentation.d.ts +11 -0
- package/dist/memory/presentation.d.ts.map +1 -1
- package/dist/memory/presentation.js +25 -0
- package/dist/memory/presentation.js.map +1 -1
- package/dist/memory/store.d.ts +13 -7
- package/dist/memory/store.d.ts.map +1 -1
- package/dist/memory/store.js +37 -11
- package/dist/memory/store.js.map +1 -1
- package/dist/memory/typed.d.ts +116 -0
- package/dist/memory/typed.d.ts.map +1 -0
- package/dist/memory/typed.js +336 -0
- package/dist/memory/typed.js.map +1 -0
- package/dist/permissions/checks.d.ts +1 -1
- package/dist/permissions/checks.js +1 -1
- package/dist/permissions/headless-trust.d.ts +2 -2
- package/dist/permissions/headless-trust.d.ts.map +1 -1
- package/dist/permissions/headless-trust.js +3 -3
- package/dist/permissions/headless-trust.js.map +1 -1
- package/dist/permissions/mode.d.ts +4 -4
- package/dist/permissions/mode.js +1 -1
- package/dist/permissions/rules.d.ts +1 -1
- package/dist/permissions/rules.js +1 -1
- package/dist/termination.d.ts +75 -0
- package/dist/termination.d.ts.map +1 -0
- package/dist/termination.js +143 -0
- package/dist/termination.js.map +1 -0
- package/dist/tui/AgentExplorer.d.ts +2 -2
- package/dist/tui/AgentExplorer.js +4 -4
- package/dist/tui/AgentExplorer.js.map +1 -1
- package/dist/tui/App.d.ts +9 -1
- package/dist/tui/App.d.ts.map +1 -1
- package/dist/tui/App.js +452 -303
- package/dist/tui/App.js.map +1 -1
- package/dist/tui/LiveActivity.d.ts +1 -1
- package/dist/tui/LiveActivity.d.ts.map +1 -1
- package/dist/tui/PermissionOverlay.d.ts +8 -0
- package/dist/tui/PermissionOverlay.d.ts.map +1 -1
- package/dist/tui/PermissionOverlay.js +25 -2
- package/dist/tui/PermissionOverlay.js.map +1 -1
- package/dist/tui/Picker.js +1 -1
- package/dist/tui/agent.d.ts +208 -132
- package/dist/tui/agent.d.ts.map +1 -1
- package/dist/tui/agent.js +523 -313
- package/dist/tui/agent.js.map +1 -1
- package/dist/tui/conversation-evidence-view.js +3 -3
- package/dist/tui/conversation-evidence-view.js.map +1 -1
- package/dist/tui/conversation-history.d.ts +4 -21
- package/dist/tui/conversation-history.d.ts.map +1 -1
- package/dist/tui/conversation-history.js +4 -28
- package/dist/tui/conversation-history.js.map +1 -1
- package/dist/tui/index.d.ts.map +1 -1
- package/dist/tui/index.js +27 -1
- package/dist/tui/index.js.map +1 -1
- package/dist/tui/log-pane.js +1 -1
- package/dist/tui/markdownParser.d.ts +1 -1
- package/dist/tui/markdownParser.js +1 -1
- package/dist/tui/permission-review.d.ts +16 -0
- package/dist/tui/permission-review.d.ts.map +1 -1
- package/dist/tui/permission-review.js +25 -2
- package/dist/tui/permission-review.js.map +1 -1
- package/dist/tui/slashCommands.d.ts +29 -40
- package/dist/tui/slashCommands.d.ts.map +1 -1
- package/dist/tui/slashCommands.js +70 -61
- package/dist/tui/slashCommands.js.map +1 -1
- package/dist/tui/{run-interruption.d.ts → turn-interruption.d.ts} +4 -4
- package/dist/tui/turn-interruption.d.ts.map +1 -0
- package/dist/tui/{run-interruption.js → turn-interruption.js} +20 -20
- package/dist/tui/turn-interruption.js.map +1 -0
- package/dist/tui/turn-limits-settings.d.ts +39 -0
- package/dist/tui/turn-limits-settings.d.ts.map +1 -0
- package/dist/tui/{run-limits-settings.js → turn-limits-settings.js} +18 -18
- package/dist/tui/turn-limits-settings.js.map +1 -0
- package/dist/tui/types.d.ts +3 -3
- package/dist/tui/types.d.ts.map +1 -1
- package/dist/user-commands/store.d.ts +1 -1
- package/dist/user-commands/store.js +1 -1
- package/package.json +7 -7
- package/dist/integrations/sessions/compaction-evidence.d.ts +0 -5
- package/dist/integrations/sessions/compaction-evidence.d.ts.map +0 -1
- package/dist/integrations/sessions/compaction-evidence.js +0 -59
- package/dist/integrations/sessions/compaction-evidence.js.map +0 -1
- package/dist/integrations/sessions/database.d.ts +0 -5
- package/dist/integrations/sessions/database.d.ts.map +0 -1
- package/dist/integrations/sessions/database.js +0 -34
- package/dist/integrations/sessions/database.js.map +0 -1
- package/dist/integrations/sessions/paths.d.ts +0 -7
- package/dist/integrations/sessions/paths.d.ts.map +0 -1
- package/dist/integrations/sessions/paths.js +0 -14
- package/dist/integrations/sessions/paths.js.map +0 -1
- package/dist/integrations/sessions/run-discovery.d.ts +0 -24
- package/dist/integrations/sessions/run-discovery.d.ts.map +0 -1
- package/dist/integrations/sessions/run-discovery.js +0 -142
- package/dist/integrations/sessions/run-discovery.js.map +0 -1
- package/dist/integrations/sessions/turn-evidence.d.ts +0 -129
- package/dist/integrations/sessions/turn-evidence.d.ts.map +0 -1
- package/dist/integrations/sessions/turn-evidence.js +0 -517
- package/dist/integrations/sessions/turn-evidence.js.map +0 -1
- package/dist/integrations/subagents/history.d.ts +0 -26
- package/dist/integrations/subagents/history.d.ts.map +0 -1
- package/dist/integrations/subagents/history.js +0 -76
- package/dist/integrations/subagents/history.js.map +0 -1
- package/dist/integrations/subagents/runs.d.ts +0 -72
- package/dist/integrations/subagents/runs.d.ts.map +0 -1
- package/dist/integrations/subagents/runs.js +0 -155
- package/dist/integrations/subagents/runs.js.map +0 -1
- package/dist/tui/run-interruption.d.ts.map +0 -1
- package/dist/tui/run-interruption.js.map +0 -1
- package/dist/tui/run-limits-settings.d.ts +0 -39
- package/dist/tui/run-limits-settings.d.ts.map +0 -1
- package/dist/tui/run-limits-settings.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,219 @@
|
|
|
1
1
|
# @namzu/cli
|
|
2
2
|
|
|
3
|
+
## 27.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 518b0d3: Every turn the CLI starts keeps its newest 10 checkpoints instead of all of
|
|
8
|
+
them. That covers interactive turns, `namzu run`, resumed and drained turns,
|
|
9
|
+
and delegated child sessions. A turn takes a checkpoint every iteration plus
|
|
10
|
+
one per tool review, and nothing set a limit, so a long session kept every
|
|
11
|
+
one. On one machine that came to 19,014 checkpoint files and 6.33 GB.
|
|
12
|
+
|
|
13
|
+
**What changes for you.** Only the newest 10 checkpoint documents of each turn
|
|
14
|
+
stay in `<session-id>/checkpoints/`, and `namzu drain` reports at most that
|
|
15
|
+
many per turn. A checkpoint whose decision is still outstanding is never
|
|
16
|
+
pruned. Resuming is unaffected, because every resume reads the checkpoint it
|
|
17
|
+
was handed or the newest one. If you inspect intermediate checkpoints by hand,
|
|
18
|
+
copy them out while the turn is still going.
|
|
19
|
+
|
|
20
|
+
- b064cea: **The OS sandbox is now off by default.** Shell commands and file tools run
|
|
21
|
+
on the host under the permission system, the way other coding agents run
|
|
22
|
+
them: each shell command goes through your permission rules and mode, and a
|
|
23
|
+
file tool's path outside the working directory and the added directories is
|
|
24
|
+
shown to you as an approval request (`Outside the working directory: <path>`)
|
|
25
|
+
instead of being refused. It is asked every time — `auto`, `--yolo`, `plan`
|
|
26
|
+
(for a read) and an earlier "allow all tools for this session" included —
|
|
27
|
+
while `strict` and a `deny` rule still refuse it. **A headless turn refuses it**: pass the
|
|
28
|
+
directory with `--add-dir` (or `additionalDirectories`) when an unattended run
|
|
29
|
+
needs it. Each answer is an audit record.
|
|
30
|
+
|
|
31
|
+
**To keep the previous behaviour** (every command confined), write
|
|
32
|
+
`sandbox.enabled: true` in `namzu.config.json` or `~/.namzu/config.yaml`. The
|
|
33
|
+
sandbox is also on, without that line, when `sandbox.requireIsolation` names a
|
|
34
|
+
control or `sandbox.workspace` is `ephemeral`. `sandbox.enabled: false` keeps
|
|
35
|
+
working as before.
|
|
36
|
+
|
|
37
|
+
With the sandbox on, a `bash` call may set `dangerously_disable_sandbox: true`
|
|
38
|
+
to run one command on the host. It is asked about every time, `auto` and
|
|
39
|
+
`--yolo` included (`plan` and `strict` refuse it); it is refused when nobody can
|
|
40
|
+
be asked, unless `sandbox.allowUnattendedEscape: true`; `sandbox.allowEscape:
|
|
41
|
+
false` refuses it always. Each approval or refusal is an audit record.
|
|
42
|
+
|
|
43
|
+
`/add-dir` of a directory outside the working directory now asks before adding
|
|
44
|
+
it, deciding after links are followed (a link inside that points outside is
|
|
45
|
+
asked about under the path it leads to, and that canonical path is what is
|
|
46
|
+
added). A directory inside the working directory is no longer added: the tools
|
|
47
|
+
already reach it. The system prompt states where tools run and how to reach past that, and
|
|
48
|
+
on WSL where the Windows drives are and how to start a Windows program.
|
|
49
|
+
|
|
50
|
+
- 7cac6dc: `#note` and `/memory add` now save a typed memory file instead of appending a bullet to `<project>/.namzu/MEMORY.md`.
|
|
51
|
+
|
|
52
|
+
What changes for you:
|
|
53
|
+
|
|
54
|
+
- **Where a note goes.** `#note <text>` and `/memory add <text>` write `<name>.md` (type `project`; `/memory add --type user|feedback|project|reference <text>` picks another) into the project's stored memory — `<NAMZU_HOME>/projects/<slug>/memory/` by default — the same files the model's `save_memory`, `search_memory` and `read_memory` use. The terminal names the file. `/memory --user add <text>` is unchanged and still appends to `~/.namzu/MEMORY.md`. To keep writing a note into the curated project file, edit `<project>/.namzu/MEMORY.md` directly; it is still read into every turn.
|
|
55
|
+
- **Old notes are copied only when you ask, and your file is never changed.** The project's curated `MEMORY.md` is not rewritten, at launch or ever: nothing can tell a bullet `#note` appended from one you wrote. When it holds top-level bullets, the launch says how many, once per curated file, and `/memory import-notes` copies every top-level bullet (its first line) into a typed `project` memory, skipping any already stored — by an earlier import, a `#note` with the same text, or a copy you archived — so running it twice creates no duplicates. The bullets stay curated text in every turn until you delete them from the file yourself.
|
|
56
|
+
- **A one-time move of the JSON store on first launch.** An earlier JSON memory store (`index.json` + `content/`) in the same directory is imported with its ids and renamed `*.migrated`; the launch says so. A record too large for a memory file (over 256 KiB) is not imported and is named, with the retired file that still holds it.
|
|
57
|
+
- **The prompt.** Every turn carries a `## Stored memories (index)` section — one line per memory you or the model saved, at most 200, your `feedback` and `user` memories first. What the session memory promoter (or `compaction.consolidate`) writes after a turn is searchable but not listed, so a turn's record does not change the next turn's system prompt — and the curated sections are renamed `## Curated memory (all projects)` and `## Curated memory (this project)` (they were `## Durable memory` and `## Project memory`). Anything that matched those headings in a captured prompt must match the new ones.
|
|
58
|
+
- **`/memory show`** lists stored memories' index lines before the curated files, and what turns recorded on their own in a separate `Recorded by turns (N)` section, so those records are visible even though the prompt's index leaves them out.
|
|
59
|
+
- **Note names are short.** A note's file is named after its first words, at most 32 characters, so its index line keeps room for the note itself.
|
|
60
|
+
|
|
61
|
+
Nothing in the CLI's library exports changed.
|
|
62
|
+
|
|
63
|
+
- 3e7a97b: The CLI moves to the SDK's session → turn → message model and to one state
|
|
64
|
+
layout under `NAMZU_HOME` (default `~/.namzu`). Conversations, checkpoints,
|
|
65
|
+
memory and resident state written by 26.x are **not read** by this version.
|
|
66
|
+
|
|
67
|
+
**Before you upgrade.**
|
|
68
|
+
|
|
69
|
+
- **Run `namzu drain` on 26.x** until it reports nothing parked. A turn still
|
|
70
|
+
parked on a decision or a provider wait when you upgrade cannot be resumed.
|
|
71
|
+
- **Export any conversation you want to keep** with
|
|
72
|
+
`namzu history --session <id> > conversation.json` on 26.x (with no
|
|
73
|
+
`--session`, the latest one in the folder); it prints the messages as JSON.
|
|
74
|
+
There is no migration: nothing is imported, so nothing is lost silently or
|
|
75
|
+
brought back half-read.
|
|
76
|
+
|
|
77
|
+
## What changes for you
|
|
78
|
+
|
|
79
|
+
- **Where state lives.** Each working directory gets
|
|
80
|
+
`~/.namzu/projects/<slug>/`, where the slug is the directory's canonical
|
|
81
|
+
path with every character outside `[A-Za-z0-9]` replaced by `-`. A session is
|
|
82
|
+
`<session-id>.jsonl` there, with its child sessions, checkpoints, tasks,
|
|
83
|
+
feedback, goals, tool-result spills and file-history snapshots under
|
|
84
|
+
`<session-id>/`. Memory moves to `projects/<slug>/memory/`, resident state to
|
|
85
|
+
`projects/<slug>/residents/`, and git worktrees to
|
|
86
|
+
`projects/<slug>/worktrees/`. `~/.namzu/index.sqlite` is an index rebuilt
|
|
87
|
+
from the logs whenever it is missing or out of date; deleting it loses
|
|
88
|
+
nothing. The CLI still never writes into the working directory; `.namzu/`
|
|
89
|
+
there is read only, for the agents, skills, commands, plugins and
|
|
90
|
+
`MEMORY.md` you put in it.
|
|
91
|
+
- **Old state is left alone and reported.** `namzu state` now prints report
|
|
92
|
+
`version: 2` with a `legacy` category: the old top-level `state/`,
|
|
93
|
+
`sessions/`, `titles.json`, `desktop-sessions.json`, `delegation-history/`,
|
|
94
|
+
`checkpoints/`, `tenants/`, `goals/`, `feedback/`, `learning/`,
|
|
95
|
+
`residents/`, `worktrees/` and `memory/`, and every `projects/<uuid>/`
|
|
96
|
+
directory. It lists their paths and sizes and never opens, moves or deletes
|
|
97
|
+
them; remove them yourself once you have exported what you need. A new
|
|
98
|
+
`projects/<slug>/` is never reported as legacy.
|
|
99
|
+
- **One turn at a time per session.** A session has at most one active turn.
|
|
100
|
+
`namzu run` and `namzu run-stream` against a session whose turn is still
|
|
101
|
+
running, paused or interrupted now exit **75** (EX_TEMPFAIL) and name that
|
|
102
|
+
turn: on stderr for `run`, as an NDJSON
|
|
103
|
+
`{"kind":"error","code":"turn_in_progress",…}` event for `run-stream`. 75
|
|
104
|
+
keeps its existing meaning for a provider pause too; a wrapper that already
|
|
105
|
+
retries later on 75 needs no change. In the TUI the refusal offers
|
|
106
|
+
`/resume` or the new **`/abandon`**, which closes the paused turn so the next
|
|
107
|
+
prompt can start.
|
|
108
|
+
- **A rate limit on the first request pauses the turn.** A provider rate
|
|
109
|
+
limit or outage on a turn's first request used to fail it (`namzu run`
|
|
110
|
+
exit 1) with nothing to continue; it now pauses it at a checkpoint like the
|
|
111
|
+
same fault later in the turn: `namzu run` exits 75 naming the checkpoint,
|
|
112
|
+
`--wait-for-provider` waits and resumes it, and `/resume` or `namzu drain`
|
|
113
|
+
continues it.
|
|
114
|
+
- **`/agents runs` is now `/agents batches`**, with no alias. `/agents runs`
|
|
115
|
+
prints the unknown-subcommand usage.
|
|
116
|
+
- **NDJSON gains ids.** `run-stream`'s `done` and `usage` events carry
|
|
117
|
+
`sessionId` and `turnId`, and a `paused` event names its `turnId` instead
|
|
118
|
+
of a run id.
|
|
119
|
+
- **Hooks.** The events `run_start`, `run_end` and `run_interrupt` are
|
|
120
|
+
`turn_start`, `turn_end` and `turn_interrupt`; a config that names an old
|
|
121
|
+
event is refused at load with a message naming the new one. A hook's stdin
|
|
122
|
+
carries `turn_id` (not `run_id`) and, on `subagent_stop`,
|
|
123
|
+
`parent_session_id` and `parent_turn_id` (not `parent_run_id`); its
|
|
124
|
+
environment carries `NAMZU_TURN_ID` (not `NAMZU_RUN_ID`). `session_id` and
|
|
125
|
+
`NAMZU_SESSION_ID` are always set. `session_start` and `session_end` hooks
|
|
126
|
+
receive no turn id: the CLI no longer invents one for them.
|
|
127
|
+
- **`namzu drain`** keeps its flag names and exit codes (0, 1, 64, 77), but
|
|
128
|
+
`--store` means something else: it was the `runs/` directory a checkpoint
|
|
129
|
+
store wrote to, and it is now the namzu home (`NAMZU_HOME`, `~/.namzu` by
|
|
130
|
+
default) whose `projects/` hold the session logs. A `--store` without a
|
|
131
|
+
`projects/` directory is refused with 64, so a wrapper that still passes its
|
|
132
|
+
old `runs/` path must pass the home instead. A scope the store does not hold
|
|
133
|
+
(an unknown session, one under another project or tenant, a child session)
|
|
134
|
+
is also 64; state that cannot be read is 1. It finds parked turns through
|
|
135
|
+
the session index, takes each session's lease, and continues the same turn
|
|
136
|
+
from its checkpoint; a turn whose session lease another worker holds is
|
|
137
|
+
skipped and reported.
|
|
138
|
+
- **Delegation history is not carried over.** The history block and
|
|
139
|
+
`/agents` read finished child sessions from their logs; children recorded by
|
|
140
|
+
26.x do not appear.
|
|
141
|
+
- **Checkpoints.** A session keeps each turn's newest 10 checkpoints under
|
|
142
|
+
`<session-id>/checkpoints/`; one an open decision references is never
|
|
143
|
+
pruned. `/restore` snapshots are under `<session-id>/file-history/`.
|
|
144
|
+
- **Crash dumps are gone.** The session log and per-iteration checkpoints hold
|
|
145
|
+
everything an interrupted turn needs, so no `emergency/` dumps are written.
|
|
146
|
+
An interactive session that was interrupted closes that turn as interrupted
|
|
147
|
+
when you send the next prompt.
|
|
148
|
+
- **A stopped process gives its conversation back.** On SIGTERM, SIGHUP (a
|
|
149
|
+
closed terminal) or SIGINT, the TUI, `namzu run` and `namzu run-stream`
|
|
150
|
+
release the conversation's writer lease first, then stop the turn, close
|
|
151
|
+
the session (tool servers, background jobs, the `session_end` hook) and give
|
|
152
|
+
the terminal back, and then die of the signal they were sent: a wrapper
|
|
153
|
+
sees 143, 129 or 130 as before. The turn is left interrupted, so `/abandon`,
|
|
154
|
+
`/resume`, `namzu drain` or the TUI's next prompt take it at once; before,
|
|
155
|
+
they were refused as "leased by a live writer" for up to five minutes. A
|
|
156
|
+
second signal exits immediately. `run-stream` writes
|
|
157
|
+
`{"kind":"error","code":"terminated",…}` and a final `done` before it exits,
|
|
158
|
+
and `run` names the session on stderr. SIGKILL still leaves the lease to
|
|
159
|
+
expire. The message follows where the signal found the turn: a turn that
|
|
160
|
+
had already ended (the session still closing) is reported as recorded, not
|
|
161
|
+
interrupted, and `run-stream`'s one `done` is then the turn's own; a
|
|
162
|
+
`run --wait-for-provider` stopped during its wait says the turn is paused
|
|
163
|
+
at its checkpoint, and does not resume it.
|
|
164
|
+
|
|
165
|
+
### Patch Changes
|
|
166
|
+
|
|
167
|
+
- 96ac3ec: A session never writes generated state into its working directory, and a
|
|
168
|
+
session started in the home directory no longer reads the same memory file
|
|
169
|
+
twice.
|
|
170
|
+
|
|
171
|
+
Every entry point — `namzu`, `namzu run`, `namzu run-stream`, `namzu drain`
|
|
172
|
+
and resident runs — keeps its sessions, memory and task state under the
|
|
173
|
+
application home (`NAMZU_HOME`, else `~/.namzu`), in the working directory's
|
|
174
|
+
`projects/<slug>/`, and files them under that directory's one Project.
|
|
175
|
+
`<cwd>/.namzu` is only read, for the agents, skills, commands, plugins and
|
|
176
|
+
`MEMORY.md` you keep there.
|
|
177
|
+
|
|
178
|
+
Started in `$HOME` with no `NAMZU_HOME`, the project's `.namzu/MEMORY.md` and
|
|
179
|
+
the user's `~/.namzu/MEMORY.md` are one file. It was injected into every
|
|
180
|
+
prompt twice, under both headings. It is now read once, as the user memory.
|
|
181
|
+
|
|
182
|
+
- 3641102: The turn-start repository snapshot (`git status` and recent commits, sent on a
|
|
183
|
+
send's first request) now reaches the model as request-only context after the
|
|
184
|
+
conversation, not as a system message. On Anthropic, each new send used to
|
|
185
|
+
change the system prompt and re-read the whole conversation uncached. Now the
|
|
186
|
+
cached conversation is kept and only the snapshot's own tokens are new.
|
|
187
|
+
|
|
188
|
+
What the model reads changes in two ways: the snapshot arrives in a user-role
|
|
189
|
+
message rather than a system message, and it follows the line
|
|
190
|
+
`Current step context (runtime-generated; not a new user request):`, which
|
|
191
|
+
every request-only context message opens with. The snapshot text itself is
|
|
192
|
+
unchanged.
|
|
193
|
+
|
|
194
|
+
- Updated dependencies [8805360]
|
|
195
|
+
- Updated dependencies [a729b17]
|
|
196
|
+
- Updated dependencies [9355755]
|
|
197
|
+
- Updated dependencies [755a81a]
|
|
198
|
+
- Updated dependencies [cb1f00c]
|
|
199
|
+
- Updated dependencies [3641102]
|
|
200
|
+
- Updated dependencies [933ba6d]
|
|
201
|
+
- Updated dependencies [3e7a97b]
|
|
202
|
+
- Updated dependencies [a84dc1c]
|
|
203
|
+
- Updated dependencies [b064cea]
|
|
204
|
+
- Updated dependencies [9238347]
|
|
205
|
+
- Updated dependencies [a14b013]
|
|
206
|
+
- Updated dependencies [3641102]
|
|
207
|
+
- Updated dependencies [3641102]
|
|
208
|
+
- Updated dependencies [3e43fc2]
|
|
209
|
+
- @namzu/sdk@44.0.0
|
|
210
|
+
- @namzu/anthropic@6.0.1
|
|
211
|
+
- @namzu/openrouter@3.0.1
|
|
212
|
+
- @namzu/zen@2.4.0
|
|
213
|
+
- @namzu/computer-use@1.4.3
|
|
214
|
+
- @namzu/ollama@2.2.4
|
|
215
|
+
- @namzu/openai@4.0.0
|
|
216
|
+
|
|
3
217
|
## 26.3.0
|
|
4
218
|
|
|
5
219
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -112,27 +112,30 @@ once in PowerShell or Git Bash using the Node installation that owns Namzu.
|
|
|
112
112
|
For a custom global prefix, include `--prefix "<existing-prefix>"`. Restart
|
|
113
113
|
Namzu afterward; the updated CLI includes the corrected npm launcher.
|
|
114
114
|
|
|
115
|
-
Generated CLI state
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
115
|
+
Generated CLI state lives below the application home: `~/.namzu` by default,
|
|
116
|
+
or the existing real directory named by `NAMZU_HOME`. Each working directory
|
|
117
|
+
gets `projects/<slug>/`, where the slug is its canonical path with every
|
|
118
|
+
character outside `[A-Za-z0-9]` replaced by `-`; a project id is minted once
|
|
119
|
+
into `projects/<slug>/project.json`. A session is one append-only log,
|
|
120
|
+
`projects/<slug>/<session-id>.jsonl`, with its child sessions, checkpoints,
|
|
121
|
+
tasks and file-history snapshots under `<session-id>/`; memory, resident state
|
|
122
|
+
and worktrees are under `projects/<slug>/` too. `~/.namzu/index.sqlite` is an
|
|
123
|
+
index rebuilt from the logs, so deleting it loses nothing. Bash, Write and
|
|
124
|
+
Edit still use the selected working directory, and nothing generated is
|
|
125
|
+
written there: a local `.namzu` holds only the `agents`, `commands`,
|
|
126
|
+
`plugins`, `skills` and `MEMORY.md` you author. See
|
|
127
|
+
[Session storage](../../docs/cli/session-storage.md) for the layout and
|
|
128
|
+
[Project and session state](../../docs/cli/project-state.md) for identity.
|
|
129
|
+
|
|
130
|
+
`namzu state` inventories the application-home tree without loading a config
|
|
131
|
+
cascade or changing anything. It reports authored/configuration/runtime/control
|
|
132
|
+
bytes, sessions and turns, checkpoint files, attachment pairs, privacy
|
|
133
|
+
boundaries and project health, and a `legacy` category (report `version: 2`)
|
|
134
|
+
listing state an earlier CLI wrote — the old top-level `sessions/`, `state/`,
|
|
135
|
+
`checkpoints/` and similar directories, and every `projects/<uuid>/` — which
|
|
136
|
+
this version never reads. JSON and YAML use the global `--format` flag. The
|
|
137
|
+
snapshot is best-effort and unlocked, and the command does not repair, move,
|
|
138
|
+
chmod, or delete anything.
|
|
136
139
|
|
|
137
140
|
Desktop control is separate from attaching a clipboard image. Ctrl+V/Alt+V
|
|
138
141
|
adds an image to the current prompt; the TUI's `computer_use` tool lets the
|
|
@@ -202,7 +205,7 @@ provider/model flags work with `run-stream`.
|
|
|
202
205
|
The picker lists each service's supported models from the provider catalogue;
|
|
203
206
|
an explicit model selection is saved using the existing preferences flow.
|
|
204
207
|
Go requests carry the actual Namzu conversation ID in `x-opencode-session`,
|
|
205
|
-
stable across turns and resumed
|
|
208
|
+
stable across turns and resumed turns. Delegated work shares its invoking
|
|
206
209
|
conversation's upstream session; switching conversations changes that ID.
|
|
207
210
|
|
|
208
211
|
Bare `/help` opens the session's complete command vocabulary as a keyboard
|
|
@@ -324,16 +327,25 @@ session. In particular, `sandbox yes` describes the local runtime provider that
|
|
|
324
327
|
will execute tools; it is independent of the optional-package installation row
|
|
325
328
|
reported by `namzu doctor`.
|
|
326
329
|
|
|
327
|
-
|
|
330
|
+
Tools run on the host under the permission system by default: each shell
|
|
331
|
+
command goes through the permission rules and mode, and a file tool's path
|
|
332
|
+
outside the working directory is an approval request rather than a refusal —
|
|
333
|
+
asked every time (`strict` refuses it, `plan` asks only for a read), and
|
|
334
|
+
refused when nobody can be asked (add the directory with `--add-dir` instead). The OS sandbox is opt-in with `sandbox.enabled: true`; a sandboxed `bash` call
|
|
335
|
+
may ask to run one command outside it, and that request is put to you every
|
|
336
|
+
time (`plan` and `strict` refuse it), and refused when nobody can be asked. See
|
|
337
|
+
`docs/cli/tool-boundary.md`.
|
|
338
|
+
|
|
339
|
+
With the sandbox on, the provider defaults to the canonical working directory.
|
|
328
340
|
Each turn owns and tears down a fresh sandbox handle, while the caller-owned
|
|
329
341
|
project files survive and remain visible to later turns and delegated agents.
|
|
330
|
-
Set `sandbox.workspace` to `ephemeral` only when a disposable per-
|
|
342
|
+
Set `sandbox.workspace` to `ephemeral` only when a disposable per-turn tree is
|
|
331
343
|
the intended behavior; `/status` reports which mode is active.
|
|
332
344
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
345
|
+
A sandbox that cannot start a detached process exposes Bash as a foreground,
|
|
346
|
+
serialized operation and refuses `run_in_background`. Use delegated agents for
|
|
347
|
+
independent concurrent work; host execution keeps the background-job
|
|
348
|
+
capability.
|
|
337
349
|
|
|
338
350
|
Ctrl+L clears only the rendered terminal transcript while idle. It preserves
|
|
339
351
|
model context, durable conversation history and copy/export targets; an active
|
|
@@ -344,8 +356,8 @@ Bare `/export` opens a destination chooser for the complete verified Markdown
|
|
|
344
356
|
conversation. Copy to clipboard sends one bounded terminal request and reports
|
|
345
357
|
that the request may be ignored by terminal policy; Save to file opens a
|
|
346
358
|
prefilled filename editor and never overwrites an existing file. `/export <path>`
|
|
347
|
-
remains the direct file shortcut. Both routes read the
|
|
348
|
-
|
|
359
|
+
remains the direct file shortcut. Both routes read the session log rather than
|
|
360
|
+
reconstructing source from the painted transcript.
|
|
349
361
|
|
|
350
362
|
Repository policy stays live for the whole session. The CLI starts with the
|
|
351
363
|
applicable `AGENTS.md` chain, discovers nested instruction files after
|
|
@@ -360,7 +372,7 @@ both scopes. Project plugins are not read before the project trust gate, and
|
|
|
360
372
|
plugin paths are canonicalized against the trusted project or user-home root;
|
|
361
373
|
links that leave that scope and symlinked manifests are refused. Plugin
|
|
362
374
|
settings cannot be activated by an environment-selected profile. The
|
|
363
|
-
same plugin hooks and skills reach interactive turns, headless
|
|
375
|
+
same plugin hooks and skills reach interactive turns, headless turns, durable
|
|
364
376
|
resumes, and ACP sessions; session shutdown settles live work before unloading
|
|
365
377
|
them.
|
|
366
378
|
|
|
@@ -368,13 +380,16 @@ them.
|
|
|
368
380
|
|
|
369
381
|
```bash
|
|
370
382
|
namzu run "fix the failing test" --format json
|
|
371
|
-
namzu run-stream "refactor the parser" | jq -c 'select(.
|
|
383
|
+
namzu run-stream "refactor the parser" | jq -c 'select(.kind == "tool-start")'
|
|
372
384
|
```
|
|
373
385
|
|
|
374
386
|
`run` prints a result; `run-stream` emits one structured event per line as the
|
|
375
|
-
|
|
387
|
+
turn happens, so a script can act on a tool call before the turn is over. Both
|
|
376
388
|
take `--verbose`/`--quiet`, and both write logs to stderr so stdout stays a
|
|
377
|
-
clean protocol stream.
|
|
389
|
+
clean protocol stream. A session has one active turn at a time: either command
|
|
390
|
+
aimed at a session whose turn is still running or paused exits 75 and names
|
|
391
|
+
that turn. See [Exit codes](../../docs/cli/run-exit-codes.md) and
|
|
392
|
+
[`run-stream`](../../docs/cli/run-stream.md).
|
|
378
393
|
|
|
379
394
|
Recoverable provider stops are explicit `paused` events carrying their
|
|
380
395
|
checkpoint and any structured retry guidance. The interactive transcript shows
|
package/dist/bin.js
CHANGED
|
@@ -3,14 +3,21 @@ import { fileURLToPath } from 'node:url';
|
|
|
3
3
|
import { runCli } from './cli.js';
|
|
4
4
|
import { EXIT_INTERNAL_ERROR } from './exit-codes.js';
|
|
5
5
|
import { resumeInvocation } from './resume-invocation.js';
|
|
6
|
+
import { terminationInProgress } from './termination.js';
|
|
6
7
|
// Preserve source loaders and alternate installations when the public command differs.
|
|
7
8
|
const entrypoint = fileURLToPath(import.meta.url);
|
|
8
9
|
runCli({
|
|
9
10
|
argv: process.argv,
|
|
10
11
|
resumeCommand: resumeInvocation(entrypoint),
|
|
11
12
|
}).then((code) => {
|
|
13
|
+
// A command stopped by a signal can return while its handler is still
|
|
14
|
+
// giving the conversation back; the handler ends the process.
|
|
15
|
+
if (terminationInProgress() !== null)
|
|
16
|
+
return;
|
|
12
17
|
process.exit(code);
|
|
13
18
|
}, (err) => {
|
|
19
|
+
if (terminationInProgress() !== null)
|
|
20
|
+
return;
|
|
14
21
|
process.stderr.write(`Fatal: ${err instanceof Error ? (err.stack ?? err.message) : String(err)}\n`);
|
|
15
22
|
process.exit(EXIT_INTERNAL_ERROR);
|
|
16
23
|
});
|
package/dist/bin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAA;AAExD,uFAAuF;AACvF,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AACjD,MAAM,CAAC;IACN,IAAI,EAAE,OAAO,CAAC,IAAI;IAClB,aAAa,EAAE,gBAAgB,CAAC,UAAU,CAAC;CAC3C,CAAC,CAAC,IAAI,CACN,CAAC,IAAI,EAAE,EAAE;IACR,sEAAsE;IACtE,8DAA8D;IAC9D,IAAI,qBAAqB,EAAE,KAAK,IAAI;QAAE,OAAM;IAC5C,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACnB,CAAC,EACD,CAAC,GAAG,EAAE,EAAE;IACP,IAAI,qBAAqB,EAAE,KAAK,IAAI;QAAE,OAAM;IAC5C,OAAO,CAAC,MAAM,CAAC,KAAK,CACnB,UAAU,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAC7E,CAAA;IACD,OAAO,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAA;AAClC,CAAC,CACD,CAAA"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Not git. A checkpoint is taken by the tool wrapper immediately before an
|
|
7
7
|
* `edit` or `write` runs, whatever the repository's state, and it records
|
|
8
8
|
* absence too, so a file the model created is removed on restore. Kept per
|
|
9
|
-
* session
|
|
9
|
+
* session in its `<session-id>/file-history/` directory and dropped when the session
|
|
10
10
|
* closes: a checkpoint outlives a turn, not a session — the conversation
|
|
11
11
|
* can be forked and resumed, and its files are the working tree's.
|
|
12
12
|
*/
|
|
@@ -30,18 +30,31 @@ export interface RestoreReport {
|
|
|
30
30
|
/** Files larger than this are not snapshotted; the transcript says so. */
|
|
31
31
|
export declare const CHECKPOINT_MAX_BYTES: number;
|
|
32
32
|
export declare class FileCheckpointStore {
|
|
33
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Where blobs go: the session's `file-history/` (`SessionPaths.fileHistory`).
|
|
35
|
+
* A function is read at each turn's first snapshot, so a store that
|
|
36
|
+
* outlives a conversation switch (`/resume`, `/new`) writes into the
|
|
37
|
+
* conversation the turn belongs to, not the one the process started in.
|
|
38
|
+
*/
|
|
34
39
|
private readonly root;
|
|
35
40
|
/** Only files under here are checkpointed. */
|
|
36
41
|
private readonly cwd;
|
|
37
42
|
private readonly turns;
|
|
38
43
|
private current;
|
|
39
44
|
private readonly skipped;
|
|
45
|
+
/** Every `file-history/` a blob was written under, so closing drops them all. */
|
|
46
|
+
private readonly roots;
|
|
40
47
|
constructor(
|
|
41
|
-
/**
|
|
42
|
-
|
|
48
|
+
/**
|
|
49
|
+
* Where blobs go: the session's `file-history/` (`SessionPaths.fileHistory`).
|
|
50
|
+
* A function is read at each turn's first snapshot, so a store that
|
|
51
|
+
* outlives a conversation switch (`/resume`, `/new`) writes into the
|
|
52
|
+
* conversation the turn belongs to, not the one the process started in.
|
|
53
|
+
*/
|
|
54
|
+
root: string | (() => string),
|
|
43
55
|
/** Only files under here are checkpointed. */
|
|
44
56
|
cwd: string);
|
|
57
|
+
private currentRoot;
|
|
45
58
|
/** The next tool write belongs to this turn. Returns its index. */
|
|
46
59
|
beginTurn(label: string): number;
|
|
47
60
|
/** Whether a host path is one this store would checkpoint. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/checkpoints/store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAgD,GAAG,EAAE,MAAM,WAAW,CAAA;AAE7E,MAAM,WAAW,cAAc;IAC9B,yCAAyC;IACzC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,uDAAuD;IACvD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,+DAA+D;IAC/D,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;CACjC;
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/checkpoints/store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAgD,GAAG,EAAE,MAAM,WA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AAW,CAAC;IA6B3F,4CAA4C;IAC5C,IAAI,IAAI,SAAS,cAAc,EAAE;IAWjC,oFAAoF;IACpF,YAAY,IAAI,SAAS,MAAM,EAAE;IAIjC;;;;OAIG;IACG,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAiCpD,4CAA4C;IACtC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAM5B,+EAA+E;IAC/E,OAAO,CAAC,iBAAiB;CAIzB;AAOD,+CAA+C;AAC/C,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,SAAS,cAAc,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAYvF;AAED,gCAAgC;AAChC,wBAAgB,aAAa,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAMxE;AAED,OAAO,EAAE,GAAG,IAAI,cAAc,EAAE,CAAA"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Not git. A checkpoint is taken by the tool wrapper immediately before an
|
|
7
7
|
* `edit` or `write` runs, whatever the repository's state, and it records
|
|
8
8
|
* absence too, so a file the model created is removed on restore. Kept per
|
|
9
|
-
* session
|
|
9
|
+
* session in its `<session-id>/file-history/` directory and dropped when the session
|
|
10
10
|
* closes: a checkpoint outlives a turn, not a session — the conversation
|
|
11
11
|
* can be forked and resumed, and its files are the working tree's.
|
|
12
12
|
*/
|
|
@@ -21,14 +21,24 @@ export class FileCheckpointStore {
|
|
|
21
21
|
turns = [];
|
|
22
22
|
current;
|
|
23
23
|
skipped = new Set();
|
|
24
|
+
/** Every `file-history/` a blob was written under, so closing drops them all. */
|
|
25
|
+
roots = new Set();
|
|
24
26
|
constructor(
|
|
25
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Where blobs go: the session's `file-history/` (`SessionPaths.fileHistory`).
|
|
29
|
+
* A function is read at each turn's first snapshot, so a store that
|
|
30
|
+
* outlives a conversation switch (`/resume`, `/new`) writes into the
|
|
31
|
+
* conversation the turn belongs to, not the one the process started in.
|
|
32
|
+
*/
|
|
26
33
|
root,
|
|
27
34
|
/** Only files under here are checkpointed. */
|
|
28
35
|
cwd) {
|
|
29
36
|
this.root = root;
|
|
30
37
|
this.cwd = cwd;
|
|
31
38
|
}
|
|
39
|
+
currentRoot() {
|
|
40
|
+
return typeof this.root === 'function' ? this.root() : this.root;
|
|
41
|
+
}
|
|
32
42
|
/** The next tool write belongs to this turn. Returns its index. */
|
|
33
43
|
beginTurn(label) {
|
|
34
44
|
const index = this.turns.length + 1;
|
|
@@ -74,7 +84,9 @@ export class FileCheckpointStore {
|
|
|
74
84
|
}
|
|
75
85
|
let blob = null;
|
|
76
86
|
if (content !== null) {
|
|
77
|
-
const dir = join(this.
|
|
87
|
+
const dir = turn.dir ?? join(this.currentRoot(), String(turn.index));
|
|
88
|
+
turn.dir = dir;
|
|
89
|
+
this.roots.add(dirname(dir));
|
|
78
90
|
await mkdir(dir, { recursive: true });
|
|
79
91
|
blob = join(dir, `${turn.entries.length}.blob`);
|
|
80
92
|
await writeFile(blob, content);
|
|
@@ -131,14 +143,17 @@ export class FileCheckpointStore {
|
|
|
131
143
|
// tree no longer builds on.
|
|
132
144
|
const dropped = this.turns.splice(this.turns.findIndex((t) => t.index === index));
|
|
133
145
|
for (const turn of dropped) {
|
|
134
|
-
|
|
146
|
+
if (turn.dir)
|
|
147
|
+
await rm(turn.dir, { recursive: true, force: true });
|
|
135
148
|
}
|
|
136
149
|
this.current = undefined;
|
|
137
150
|
return { turn: index, restored: [...restored], removed: [...removed] };
|
|
138
151
|
}
|
|
139
152
|
/** Drop every blob. The session is over. */
|
|
140
153
|
async close() {
|
|
141
|
-
|
|
154
|
+
for (const root of new Set([...this.roots, this.currentRoot()])) {
|
|
155
|
+
await rm(root, { recursive: true, force: true });
|
|
156
|
+
}
|
|
142
157
|
}
|
|
143
158
|
/** A write outside any turn — a host command, say — gets a turn of its own. */
|
|
144
159
|
turnForStrayWrite() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/checkpoints/store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACzE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/checkpoints/store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACzE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAA;AAmC7E,0EAA0E;AAC1E,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAA;AACnD,MAAM,WAAW,GAAG,EAAE,CAAA;AAEtB,MAAM,OAAO,mBAAmB;IAeb;IAEA;IAhBD,KAAK,GAAW,EAAE,CAAA;IAC3B,OAAO,CAAkB;IAChB,OAAO,GAAG,IAAI,GAAG,EAAU,CAAA;IAE5C,iFAAiF;IAChE,KAAK,GAAG,IAAI,GAAG,EAAU,CAAA;IAE1C;IACC;;;;;OAKG;IACc,IAA6B;IAC9C,8CAA8C;IAC7B,GAAW;QAFX,SAAI,GAAJ,IAAI,CAAyB;QAE7B,QAAG,GAAH,GAAG,CAAQ;IAC1B,CAAC;IAEI,WAAW;QAClB,OAAO,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,C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G,EAAE,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC,CAAA;IACnF,CAAC;IACD,KAAK,CAAC,IAAI,CACT,EAAE,EACF,mFAAmF,CACnF,CAAA;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACxB,CAAC;AAED,gCAAgC;AAChC,MAAM,UAAU,aAAa,CAAC,MAAqB,EAAE,GAAW;IAC/D,MAAM,GAAG,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,CAAA;IAChD,MAAM,KAAK,GAAG,CAAC,oCAAoC,MAAM,CAAC,IAAI,GAAG,CAAC,CAAA;IAClE,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,QAAQ;QAAE,KAAK,CAAC,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;IACnE,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO;QAAE,KAAK,CAAC,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;IAClE,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACxB,CAAC;AAED,OAAO,EAAE,GAAG,IAAI,cAAc,EAAE,CAAA"}
|
package/dist/cli.js
CHANGED
|
@@ -183,7 +183,7 @@ export async function runCli(opts) {
|
|
|
183
183
|
return recoveryCtx;
|
|
184
184
|
};
|
|
185
185
|
// Stopping or inspecting a resident must remain possible with broken config.
|
|
186
|
-
// Its
|
|
186
|
+
// Its turn action resolves this bridge only after trusting the bound cwd.
|
|
187
187
|
const getResidentContext = () => bindTrustedProjectContext(getRecoveryContext(), getTrustedContext);
|
|
188
188
|
for (const def of [
|
|
189
189
|
acpCommand,
|
|
@@ -260,7 +260,7 @@ export async function runCli(opts) {
|
|
|
260
260
|
...(resolvedCtx.config.sandbox ? { sandbox: resolvedCtx.config.sandbox } : {}),
|
|
261
261
|
// `!== undefined`, never `??`: an empty list is the operator
|
|
262
262
|
// switching the screens off, and it is the answer this key
|
|
263
|
-
// exists for. A truthiness test would drop it and the
|
|
263
|
+
// exists for. A truthiness test would drop it and the turn
|
|
264
264
|
// would install the kernel default instead — the opposite
|
|
265
265
|
// of what was asked for, in the one case the operator was
|
|
266
266
|
// explicit about.
|