@namzu/cli 26.3.0 → 28.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 +271 -0
- package/README.md +67 -46
- 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.d.ts +2 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +124 -14
- 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 +216 -136
- 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/{run-flags.d.ts → exec-flags.d.ts} +36 -28
- package/dist/commands/exec-flags.d.ts.map +1 -0
- package/dist/commands/{run-flags.js → exec-flags.js} +35 -27
- package/dist/commands/exec-flags.js.map +1 -0
- package/dist/commands/exec-json.d.ts +75 -0
- package/dist/commands/exec-json.d.ts.map +1 -0
- package/dist/commands/exec-json.js +473 -0
- package/dist/commands/exec-json.js.map +1 -0
- package/dist/commands/exec.d.ts +42 -0
- package/dist/commands/exec.d.ts.map +1 -0
- package/dist/commands/exec.js +683 -0
- package/dist/commands/exec.js.map +1 -0
- package/dist/commands/host-queries.d.ts +12 -0
- package/dist/commands/host-queries.d.ts.map +1 -0
- package/dist/commands/host-queries.js +149 -0
- package/dist/commands/host-queries.js.map +1 -0
- package/dist/commands/prior-messages.js +1 -1
- package/dist/commands/prior-messages.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/registry.d.ts.map +1 -1
- package/dist/commands/registry.js +2 -0
- package/dist/commands/registry.js.map +1 -1
- package/dist/commands/resident-flags.d.ts +2 -2
- package/dist/commands/resident-flags.d.ts.map +1 -1
- package/dist/commands/resident-flags.js +4 -2
- package/dist/commands/resident-flags.js.map +1 -1
- package/dist/commands/resident-learning.js +1 -1
- package/dist/commands/resident-learning.js.map +1 -1
- package/dist/commands/resident.d.ts.map +1 -1
- package/dist/commands/resident.js +3 -2
- package/dist/commands/resident.js.map +1 -1
- package/dist/commands/serve.js +2 -2
- package/dist/commands/serve.js.map +1 -1
- package/dist/commands/skills.js +1 -1
- package/dist/commands/skills.js.map +1 -1
- package/dist/commands/state.js +8 -8
- package/dist/commands/state.js.map +1 -1
- package/dist/commands/stdin.d.ts +5 -5
- package/dist/commands/stdin.js +5 -5
- package/dist/commands/types.d.ts +2 -0
- package/dist/commands/types.d.ts.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 +36 -5
- package/dist/config/load.js.map +1 -1
- package/dist/config/schema.d.ts +59 -20
- 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/config/turn-guards.d.ts +23 -0
- package/dist/config/turn-guards.d.ts.map +1 -0
- package/dist/config/turn-guards.js +46 -0
- package/dist/config/turn-guards.js.map +1 -0
- 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 +2 -2
- package/dist/context/project.js +2 -2
- 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 +7 -7
- 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/access.d.ts +4 -1
- package/dist/integrations/providers/access.d.ts.map +1 -1
- package/dist/integrations/providers/access.js +6 -3
- package/dist/integrations/providers/access.js.map +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/providers/zen-catalogue.d.ts +100 -0
- package/dist/integrations/providers/zen-catalogue.d.ts.map +1 -0
- package/dist/integrations/providers/zen-catalogue.js +196 -0
- package/dist/integrations/providers/zen-catalogue.js.map +1 -0
- 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-launch.d.ts +3 -3
- package/dist/integrations/resident/runner-launch.d.ts.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 +23 -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 +4 -2
- package/dist/integrations/resident/session-step.d.ts.map +1 -1
- package/dist/integrations/resident/session-step.js +16 -14
- 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/integrations/web/search.d.ts +1 -1
- package/dist/logging.d.ts +5 -5
- package/dist/logging.js +6 -6
- 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 +4 -4
- package/dist/permissions/headless-trust.d.ts.map +1 -1
- package/dist/permissions/headless-trust.js +6 -6
- 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 +456 -307
- 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 +211 -135
- package/dist/tui/agent.d.ts.map +1 -1
- package/dist/tui/agent.js +535 -316
- 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 +30 -41
- package/dist/tui/slashCommands.d.ts.map +1 -1
- package/dist/tui/slashCommands.js +75 -66
- package/dist/tui/slashCommands.js.map +1 -1
- package/dist/tui/status-panel-layout.js +1 -1
- package/dist/tui/status-panel-layout.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 +4 -4
- package/dist/user-commands/store.js +5 -5
- package/dist/user-commands/store.js.map +1 -1
- package/package.json +6 -6
- package/dist/commands/run-flags.d.ts.map +0 -1
- package/dist/commands/run-flags.js.map +0 -1
- package/dist/commands/run-stream.d.ts +0 -65
- package/dist/commands/run-stream.d.ts.map +0 -1
- package/dist/commands/run-stream.js +0 -603
- package/dist/commands/run-stream.js.map +0 -1
- package/dist/commands/run.d.ts +0 -39
- package/dist/commands/run.d.ts.map +0 -1
- package/dist/commands/run.js +0 -533
- package/dist/commands/run.js.map +0 -1
- package/dist/config/run-limits.d.ts +0 -11
- package/dist/config/run-limits.d.ts.map +0 -1
- package/dist/config/run-limits.js +0 -64
- package/dist/config/run-limits.js.map +0 -1
- 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,276 @@
|
|
|
1
1
|
# @namzu/cli
|
|
2
2
|
|
|
3
|
+
## 28.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- a75f5c2: **`namzu run` and `namzu run-stream` are removed. Use `namzu exec`.**
|
|
8
|
+
|
|
9
|
+
| Before | After |
|
|
10
|
+
| ----------------------------- | ------------------------------------------------- |
|
|
11
|
+
| `namzu run "<prompt>"` | `namzu exec "<prompt>"` (or `namzu e "<prompt>"`) |
|
|
12
|
+
| `namzu run-stream "<prompt>"` | `namzu exec --json "<prompt>"` |
|
|
13
|
+
|
|
14
|
+
`exec` takes every option the two old commands took, with the same meanings:
|
|
15
|
+
`--cwd`, `--provider`, `--model`, `--effort`, `--skills`, `--continue`/`-c`,
|
|
16
|
+
`--resume`, `--session`, `--gate`, `--gate-retries`, `--max-iterations`,
|
|
17
|
+
`--token-budget`, `--wait-for-provider`, `--permission-mode`, `--trust`,
|
|
18
|
+
`--yolo` and `--`. The default mode prints the reply exactly as `run` did and
|
|
19
|
+
keeps its exit codes (0, 1, 2, 64, 75, 77, and death by SIGTERM/SIGHUP/SIGINT).
|
|
20
|
+
`--json` writes the same NDJSON events, with the same kinds and fields, and
|
|
21
|
+
the same exit codes (0, 1, 75, 77) that `run-stream` did. Typing `run` or
|
|
22
|
+
`run-stream` now fails with commander's `unknown command` error, exit 64, and
|
|
23
|
+
a line naming the replacement. Update scripts, CI jobs and host UIs that spawn
|
|
24
|
+
either command.
|
|
25
|
+
|
|
26
|
+
**New: `--output-schema <file>` on `exec`.** It binds the final answer to a
|
|
27
|
+
JSON Schema through the provider's native structured output, in either mode.
|
|
28
|
+
Before, `--output-schema` was accepted only before the command, for the TUI,
|
|
29
|
+
and refused everywhere else; given before `exec` it is still refused, now with
|
|
30
|
+
a message that says to pass it after `exec`. A schema file that cannot be read
|
|
31
|
+
or represented exits 64 (in `--json` mode: an `error` event and exit 0).
|
|
32
|
+
|
|
33
|
+
**Also changed:**
|
|
34
|
+
|
|
35
|
+
- `namzu exec --session <id>` without `--json` is refused with exit 64. `run`
|
|
36
|
+
accepted `--session` and ignored it, answering against no history; the
|
|
37
|
+
default mode resumes with `--continue` or `--resume <id>`.
|
|
38
|
+
- `namzu resident` refuses `--json` and `--output-schema`, which it would
|
|
39
|
+
otherwise have accepted and ignored.
|
|
40
|
+
- The `--log-format` help and the TUI's `--output-schema` help name `exec`.
|
|
41
|
+
|
|
42
|
+
### Minor Changes
|
|
43
|
+
|
|
44
|
+
- ab9108b: Refresh the Zen and Zen Go model catalogue in the background on every launch. The interactive TUI, `resume`, `run`, `run-stream`, `acp`, `drain`, `resident run` and the background resident runner start one refresh that never delays startup, gives up after 30 seconds and is cancelled when the command ends. When it lands, the model picker and routing use it immediately, including for providers already built, and it is saved as a last-good copy at `cli/zen-catalogue.json` under `NAMZU_HOME`. When it fails, the session keeps the last-good copy, or otherwise the bundled catalogue, and logs one warning. A damaged copy on disk is ignored rather than read in part. A model the service serves with no known wire format is not offered in the picker, since the CLI has no setting that names a protocol for it.
|
|
45
|
+
|
|
46
|
+
This is on by default, and each of those launches now reads OpenCode's documentation pages, models.dev and the two Zen `/models` endpoints over the network. To keep the previous behaviour (bundled catalogue only, no network read), set `modelCatalogueRefresh: false` in `~/.namzu/config.yaml`, or `NAMZU_MODEL_CATALOGUE_REFRESH=0`.
|
|
47
|
+
|
|
48
|
+
### Patch Changes
|
|
49
|
+
|
|
50
|
+
- 128913f: The TUI says "turn" where it still said "run" for the unit of work that no
|
|
51
|
+
longer exists: `/cost`, `/status` and the status panel label spend as
|
|
52
|
+
"current or latest turn", a message held after a paused turn says so, the
|
|
53
|
+
`/config` notice names turn limits, and the headless trust refusal says a
|
|
54
|
+
headless turn approves tools without asking, and `namzu doctor`'s
|
|
55
|
+
remediation for an unusable fallback says turns will still start. Wording only; nothing a script
|
|
56
|
+
parses changed.
|
|
57
|
+
- Updated dependencies [ab9108b]
|
|
58
|
+
- @namzu/zen@2.5.0
|
|
59
|
+
|
|
60
|
+
## 27.0.0
|
|
61
|
+
|
|
62
|
+
### Major Changes
|
|
63
|
+
|
|
64
|
+
- 518b0d3: Every turn the CLI starts keeps its newest 10 checkpoints instead of all of
|
|
65
|
+
them. That covers interactive turns, `namzu run`, resumed and drained turns,
|
|
66
|
+
and delegated child sessions. A turn takes a checkpoint every iteration plus
|
|
67
|
+
one per tool review, and nothing set a limit, so a long session kept every
|
|
68
|
+
one. On one machine that came to 19,014 checkpoint files and 6.33 GB.
|
|
69
|
+
|
|
70
|
+
**What changes for you.** Only the newest 10 checkpoint documents of each turn
|
|
71
|
+
stay in `<session-id>/checkpoints/`, and `namzu drain` reports at most that
|
|
72
|
+
many per turn. A checkpoint whose decision is still outstanding is never
|
|
73
|
+
pruned. Resuming is unaffected, because every resume reads the checkpoint it
|
|
74
|
+
was handed or the newest one. If you inspect intermediate checkpoints by hand,
|
|
75
|
+
copy them out while the turn is still going.
|
|
76
|
+
|
|
77
|
+
- b064cea: **The OS sandbox is now off by default.** Shell commands and file tools run
|
|
78
|
+
on the host under the permission system, the way other coding agents run
|
|
79
|
+
them: each shell command goes through your permission rules and mode, and a
|
|
80
|
+
file tool's path outside the working directory and the added directories is
|
|
81
|
+
shown to you as an approval request (`Outside the working directory: <path>`)
|
|
82
|
+
instead of being refused. It is asked every time — `auto`, `--yolo`, `plan`
|
|
83
|
+
(for a read) and an earlier "allow all tools for this session" included —
|
|
84
|
+
while `strict` and a `deny` rule still refuse it. **A headless turn refuses it**: pass the
|
|
85
|
+
directory with `--add-dir` (or `additionalDirectories`) when an unattended run
|
|
86
|
+
needs it. Each answer is an audit record.
|
|
87
|
+
|
|
88
|
+
**To keep the previous behaviour** (every command confined), write
|
|
89
|
+
`sandbox.enabled: true` in `namzu.config.json` or `~/.namzu/config.yaml`. The
|
|
90
|
+
sandbox is also on, without that line, when `sandbox.requireIsolation` names a
|
|
91
|
+
control or `sandbox.workspace` is `ephemeral`. `sandbox.enabled: false` keeps
|
|
92
|
+
working as before.
|
|
93
|
+
|
|
94
|
+
With the sandbox on, a `bash` call may set `dangerously_disable_sandbox: true`
|
|
95
|
+
to run one command on the host. It is asked about every time, `auto` and
|
|
96
|
+
`--yolo` included (`plan` and `strict` refuse it); it is refused when nobody can
|
|
97
|
+
be asked, unless `sandbox.allowUnattendedEscape: true`; `sandbox.allowEscape:
|
|
98
|
+
false` refuses it always. Each approval or refusal is an audit record.
|
|
99
|
+
|
|
100
|
+
`/add-dir` of a directory outside the working directory now asks before adding
|
|
101
|
+
it, deciding after links are followed (a link inside that points outside is
|
|
102
|
+
asked about under the path it leads to, and that canonical path is what is
|
|
103
|
+
added). A directory inside the working directory is no longer added: the tools
|
|
104
|
+
already reach it. The system prompt states where tools run and how to reach past that, and
|
|
105
|
+
on WSL where the Windows drives are and how to start a Windows program.
|
|
106
|
+
|
|
107
|
+
- 7cac6dc: `#note` and `/memory add` now save a typed memory file instead of appending a bullet to `<project>/.namzu/MEMORY.md`.
|
|
108
|
+
|
|
109
|
+
What changes for you:
|
|
110
|
+
|
|
111
|
+
- **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.
|
|
112
|
+
- **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.
|
|
113
|
+
- **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.
|
|
114
|
+
- **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.
|
|
115
|
+
- **`/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.
|
|
116
|
+
- **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.
|
|
117
|
+
|
|
118
|
+
Nothing in the CLI's library exports changed.
|
|
119
|
+
|
|
120
|
+
- 3e7a97b: The CLI moves to the SDK's session → turn → message model and to one state
|
|
121
|
+
layout under `NAMZU_HOME` (default `~/.namzu`). Conversations, checkpoints,
|
|
122
|
+
memory and resident state written by 26.x are **not read** by this version.
|
|
123
|
+
|
|
124
|
+
**Before you upgrade.**
|
|
125
|
+
|
|
126
|
+
- **Run `namzu drain` on 26.x** until it reports nothing parked. A turn still
|
|
127
|
+
parked on a decision or a provider wait when you upgrade cannot be resumed.
|
|
128
|
+
- **Export any conversation you want to keep** with
|
|
129
|
+
`namzu history --session <id> > conversation.json` on 26.x (with no
|
|
130
|
+
`--session`, the latest one in the folder); it prints the messages as JSON.
|
|
131
|
+
There is no migration: nothing is imported, so nothing is lost silently or
|
|
132
|
+
brought back half-read.
|
|
133
|
+
|
|
134
|
+
## What changes for you
|
|
135
|
+
|
|
136
|
+
- **Where state lives.** Each working directory gets
|
|
137
|
+
`~/.namzu/projects/<slug>/`, where the slug is the directory's canonical
|
|
138
|
+
path with every character outside `[A-Za-z0-9]` replaced by `-`. A session is
|
|
139
|
+
`<session-id>.jsonl` there, with its child sessions, checkpoints, tasks,
|
|
140
|
+
feedback, goals, tool-result spills and file-history snapshots under
|
|
141
|
+
`<session-id>/`. Memory moves to `projects/<slug>/memory/`, resident state to
|
|
142
|
+
`projects/<slug>/residents/`, and git worktrees to
|
|
143
|
+
`projects/<slug>/worktrees/`. `~/.namzu/index.sqlite` is an index rebuilt
|
|
144
|
+
from the logs whenever it is missing or out of date; deleting it loses
|
|
145
|
+
nothing. The CLI still never writes into the working directory; `.namzu/`
|
|
146
|
+
there is read only, for the agents, skills, commands, plugins and
|
|
147
|
+
`MEMORY.md` you put in it.
|
|
148
|
+
- **Old state is left alone and reported.** `namzu state` now prints report
|
|
149
|
+
`version: 2` with a `legacy` category: the old top-level `state/`,
|
|
150
|
+
`sessions/`, `titles.json`, `desktop-sessions.json`, `delegation-history/`,
|
|
151
|
+
`checkpoints/`, `tenants/`, `goals/`, `feedback/`, `learning/`,
|
|
152
|
+
`residents/`, `worktrees/` and `memory/`, and every `projects/<uuid>/`
|
|
153
|
+
directory. It lists their paths and sizes and never opens, moves or deletes
|
|
154
|
+
them; remove them yourself once you have exported what you need. A new
|
|
155
|
+
`projects/<slug>/` is never reported as legacy.
|
|
156
|
+
- **One turn at a time per session.** A session has at most one active turn.
|
|
157
|
+
`namzu run` and `namzu run-stream` against a session whose turn is still
|
|
158
|
+
running, paused or interrupted now exit **75** (EX_TEMPFAIL) and name that
|
|
159
|
+
turn: on stderr for `run`, as an NDJSON
|
|
160
|
+
`{"kind":"error","code":"turn_in_progress",…}` event for `run-stream`. 75
|
|
161
|
+
keeps its existing meaning for a provider pause too; a wrapper that already
|
|
162
|
+
retries later on 75 needs no change. In the TUI the refusal offers
|
|
163
|
+
`/resume` or the new **`/abandon`**, which closes the paused turn so the next
|
|
164
|
+
prompt can start.
|
|
165
|
+
- **A rate limit on the first request pauses the turn.** A provider rate
|
|
166
|
+
limit or outage on a turn's first request used to fail it (`namzu run`
|
|
167
|
+
exit 1) with nothing to continue; it now pauses it at a checkpoint like the
|
|
168
|
+
same fault later in the turn: `namzu run` exits 75 naming the checkpoint,
|
|
169
|
+
`--wait-for-provider` waits and resumes it, and `/resume` or `namzu drain`
|
|
170
|
+
continues it.
|
|
171
|
+
- **`/agents runs` is now `/agents batches`**, with no alias. `/agents runs`
|
|
172
|
+
prints the unknown-subcommand usage.
|
|
173
|
+
- **NDJSON gains ids.** `run-stream`'s `done` and `usage` events carry
|
|
174
|
+
`sessionId` and `turnId`, and a `paused` event names its `turnId` instead
|
|
175
|
+
of a run id.
|
|
176
|
+
- **Hooks.** The events `run_start`, `run_end` and `run_interrupt` are
|
|
177
|
+
`turn_start`, `turn_end` and `turn_interrupt`; a config that names an old
|
|
178
|
+
event is refused at load with a message naming the new one. A hook's stdin
|
|
179
|
+
carries `turn_id` (not `run_id`) and, on `subagent_stop`,
|
|
180
|
+
`parent_session_id` and `parent_turn_id` (not `parent_run_id`); its
|
|
181
|
+
environment carries `NAMZU_TURN_ID` (not `NAMZU_RUN_ID`). `session_id` and
|
|
182
|
+
`NAMZU_SESSION_ID` are always set. `session_start` and `session_end` hooks
|
|
183
|
+
receive no turn id: the CLI no longer invents one for them.
|
|
184
|
+
- **`namzu drain`** keeps its flag names and exit codes (0, 1, 64, 77), but
|
|
185
|
+
`--store` means something else: it was the `runs/` directory a checkpoint
|
|
186
|
+
store wrote to, and it is now the namzu home (`NAMZU_HOME`, `~/.namzu` by
|
|
187
|
+
default) whose `projects/` hold the session logs. A `--store` without a
|
|
188
|
+
`projects/` directory is refused with 64, so a wrapper that still passes its
|
|
189
|
+
old `runs/` path must pass the home instead. A scope the store does not hold
|
|
190
|
+
(an unknown session, one under another project or tenant, a child session)
|
|
191
|
+
is also 64; state that cannot be read is 1. It finds parked turns through
|
|
192
|
+
the session index, takes each session's lease, and continues the same turn
|
|
193
|
+
from its checkpoint; a turn whose session lease another worker holds is
|
|
194
|
+
skipped and reported.
|
|
195
|
+
- **Delegation history is not carried over.** The history block and
|
|
196
|
+
`/agents` read finished child sessions from their logs; children recorded by
|
|
197
|
+
26.x do not appear.
|
|
198
|
+
- **Checkpoints.** A session keeps each turn's newest 10 checkpoints under
|
|
199
|
+
`<session-id>/checkpoints/`; one an open decision references is never
|
|
200
|
+
pruned. `/restore` snapshots are under `<session-id>/file-history/`.
|
|
201
|
+
- **Crash dumps are gone.** The session log and per-iteration checkpoints hold
|
|
202
|
+
everything an interrupted turn needs, so no `emergency/` dumps are written.
|
|
203
|
+
An interactive session that was interrupted closes that turn as interrupted
|
|
204
|
+
when you send the next prompt.
|
|
205
|
+
- **A stopped process gives its conversation back.** On SIGTERM, SIGHUP (a
|
|
206
|
+
closed terminal) or SIGINT, the TUI, `namzu run` and `namzu run-stream`
|
|
207
|
+
release the conversation's writer lease first, then stop the turn, close
|
|
208
|
+
the session (tool servers, background jobs, the `session_end` hook) and give
|
|
209
|
+
the terminal back, and then die of the signal they were sent: a wrapper
|
|
210
|
+
sees 143, 129 or 130 as before. The turn is left interrupted, so `/abandon`,
|
|
211
|
+
`/resume`, `namzu drain` or the TUI's next prompt take it at once; before,
|
|
212
|
+
they were refused as "leased by a live writer" for up to five minutes. A
|
|
213
|
+
second signal exits immediately. `run-stream` writes
|
|
214
|
+
`{"kind":"error","code":"terminated",…}` and a final `done` before it exits,
|
|
215
|
+
and `run` names the session on stderr. SIGKILL still leaves the lease to
|
|
216
|
+
expire. The message follows where the signal found the turn: a turn that
|
|
217
|
+
had already ended (the session still closing) is reported as recorded, not
|
|
218
|
+
interrupted, and `run-stream`'s one `done` is then the turn's own; a
|
|
219
|
+
`run --wait-for-provider` stopped during its wait says the turn is paused
|
|
220
|
+
at its checkpoint, and does not resume it.
|
|
221
|
+
|
|
222
|
+
### Patch Changes
|
|
223
|
+
|
|
224
|
+
- 96ac3ec: A session never writes generated state into its working directory, and a
|
|
225
|
+
session started in the home directory no longer reads the same memory file
|
|
226
|
+
twice.
|
|
227
|
+
|
|
228
|
+
Every entry point — `namzu`, `namzu run`, `namzu run-stream`, `namzu drain`
|
|
229
|
+
and resident runs — keeps its sessions, memory and task state under the
|
|
230
|
+
application home (`NAMZU_HOME`, else `~/.namzu`), in the working directory's
|
|
231
|
+
`projects/<slug>/`, and files them under that directory's one Project.
|
|
232
|
+
`<cwd>/.namzu` is only read, for the agents, skills, commands, plugins and
|
|
233
|
+
`MEMORY.md` you keep there.
|
|
234
|
+
|
|
235
|
+
Started in `$HOME` with no `NAMZU_HOME`, the project's `.namzu/MEMORY.md` and
|
|
236
|
+
the user's `~/.namzu/MEMORY.md` are one file. It was injected into every
|
|
237
|
+
prompt twice, under both headings. It is now read once, as the user memory.
|
|
238
|
+
|
|
239
|
+
- 3641102: The turn-start repository snapshot (`git status` and recent commits, sent on a
|
|
240
|
+
send's first request) now reaches the model as request-only context after the
|
|
241
|
+
conversation, not as a system message. On Anthropic, each new send used to
|
|
242
|
+
change the system prompt and re-read the whole conversation uncached. Now the
|
|
243
|
+
cached conversation is kept and only the snapshot's own tokens are new.
|
|
244
|
+
|
|
245
|
+
What the model reads changes in two ways: the snapshot arrives in a user-role
|
|
246
|
+
message rather than a system message, and it follows the line
|
|
247
|
+
`Current step context (runtime-generated; not a new user request):`, which
|
|
248
|
+
every request-only context message opens with. The snapshot text itself is
|
|
249
|
+
unchanged.
|
|
250
|
+
|
|
251
|
+
- Updated dependencies [8805360]
|
|
252
|
+
- Updated dependencies [a729b17]
|
|
253
|
+
- Updated dependencies [9355755]
|
|
254
|
+
- Updated dependencies [755a81a]
|
|
255
|
+
- Updated dependencies [cb1f00c]
|
|
256
|
+
- Updated dependencies [3641102]
|
|
257
|
+
- Updated dependencies [933ba6d]
|
|
258
|
+
- Updated dependencies [3e7a97b]
|
|
259
|
+
- Updated dependencies [a84dc1c]
|
|
260
|
+
- Updated dependencies [b064cea]
|
|
261
|
+
- Updated dependencies [9238347]
|
|
262
|
+
- Updated dependencies [a14b013]
|
|
263
|
+
- Updated dependencies [3641102]
|
|
264
|
+
- Updated dependencies [3641102]
|
|
265
|
+
- Updated dependencies [3e43fc2]
|
|
266
|
+
- @namzu/sdk@44.0.0
|
|
267
|
+
- @namzu/anthropic@6.0.1
|
|
268
|
+
- @namzu/openrouter@3.0.1
|
|
269
|
+
- @namzu/zen@2.4.0
|
|
270
|
+
- @namzu/computer-use@1.4.3
|
|
271
|
+
- @namzu/ollama@2.2.4
|
|
272
|
+
- @namzu/openai@4.0.0
|
|
273
|
+
|
|
3
274
|
## 26.3.0
|
|
4
275
|
|
|
5
276
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@ type: Reference
|
|
|
3
3
|
title: "@namzu/cli"
|
|
4
4
|
description: >-
|
|
5
5
|
A terminal coding agent with interactive sessions, parallel agents, saved
|
|
6
|
-
conversations, headless
|
|
6
|
+
conversations, headless one-shots that stream structured events,
|
|
7
7
|
and a doctor that reports what the host can actually do.
|
|
8
8
|
tags: [readme, package, cli, agent]
|
|
9
9
|
status: stable
|
|
@@ -20,7 +20,7 @@ generated: { by: human:bahadirarda, at: 2026-09-01T00:00:00Z }
|
|
|
20
20
|
[](https://github.com/cogitave/namzu/actions/workflows/ci.yml)
|
|
21
21
|
[](https://github.com/cogitave/namzu/blob/main/LICENSE.md)
|
|
22
22
|
|
|
23
|
-
[Install](#install) · [Usage](#usage) · [Headless](#headless-
|
|
23
|
+
[Install](#install) · [Usage](#usage) · [Headless](#headless-use-namzu-exec) · [Documentation](#documentation)
|
|
24
24
|
|
|
25
25
|
</div>
|
|
26
26
|
|
|
@@ -112,33 +112,36 @@ 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
|
|
139
142
|
model take a fresh screenshot and, after the normal permission decision, drive
|
|
140
143
|
pointer or keyboard input. Namzu mounts that tool only when the host adapter
|
|
141
|
-
initializes. Unattended `
|
|
144
|
+
initializes. Unattended `exec` (in either mode) and `drain` do not mount it because
|
|
142
145
|
they have no interactive permission owner. Inside WSL the TUI targets the
|
|
143
146
|
paired Windows desktop through `powershell.exe`, so WSLg display variables do
|
|
144
147
|
not incorrectly select a Linux compositor adapter.
|
|
@@ -191,18 +194,18 @@ Public Zen is listed after existing accounts and reachable local providers
|
|
|
191
194
|
and carries the label `free models · no API key`.
|
|
192
195
|
|
|
193
196
|
```bash
|
|
194
|
-
namzu
|
|
195
|
-
namzu
|
|
196
|
-
namzu
|
|
197
|
+
namzu exec --provider zen "Explain this project"
|
|
198
|
+
namzu exec --provider zen --model muse-spark-1.3-contributor-free "Explain this project"
|
|
199
|
+
namzu exec --provider zen-go --model glm-5.3-flash "Explain this project"
|
|
197
200
|
```
|
|
198
201
|
|
|
199
202
|
The Zen commands use public access when no key is available; Go requires its
|
|
200
203
|
own credential. All use the existing folder-trust rules. The same
|
|
201
|
-
provider/model flags work with `
|
|
204
|
+
provider/model flags work with `exec --json`.
|
|
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,25 +372,34 @@ 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
|
|
|
367
|
-
## Headless
|
|
379
|
+
## Headless use: `namzu exec`
|
|
368
380
|
|
|
369
381
|
```bash
|
|
370
|
-
namzu
|
|
371
|
-
namzu
|
|
382
|
+
namzu --format json exec "fix the failing test"
|
|
383
|
+
namzu exec --json "refactor the parser" | jq -c 'select(.kind == "tool-start")'
|
|
384
|
+
namzu exec --output-schema answer.schema.json "rate this diff from 1 to 5"
|
|
372
385
|
```
|
|
373
386
|
|
|
374
|
-
`
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
387
|
+
`namzu exec` (alias `namzu e`) prints a result; `namzu exec --json` emits one
|
|
388
|
+
structured event per line as the turn happens, so a script can act on a tool
|
|
389
|
+
call before the turn is over. `--output-schema <file>` binds the final answer
|
|
390
|
+
to a JSON Schema through the provider's native structured output. Both modes
|
|
391
|
+
take `--verbose`/`--quiet` (before `exec`), and both write logs to stderr so
|
|
392
|
+
stdout stays a clean protocol stream. A session has one active turn at a time:
|
|
393
|
+
either mode aimed at a session whose turn is still running or paused exits 75
|
|
394
|
+
and names that turn. See [Exit codes](../../docs/cli/exec-exit-codes.md) and
|
|
395
|
+
[`exec --json`](../../docs/cli/exec-json.md).
|
|
396
|
+
|
|
397
|
+
`namzu run` and `namzu run-stream` were removed: use `namzu exec` and
|
|
398
|
+
`namzu exec --json`, which take the same options.
|
|
378
399
|
|
|
379
400
|
Recoverable provider stops are explicit `paused` events carrying their
|
|
380
401
|
checkpoint and any structured retry guidance. The interactive transcript shows
|
|
381
|
-
the same remedy and holds dependent queued input; `
|
|
402
|
+
the same remedy and holds dependent queued input; `exec` exits non-zero rather
|
|
382
403
|
than treating a paused or failed partial answer as complete.
|
|
383
404
|
|
|
384
405
|
The interactive transcript also shows provider capability mismatches and
|
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,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;AAiBD,MAAM,WAAW,aAAa;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,oDAAoD;IACpD,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAA;IACpC,gEAAgE;IAChE,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;CACnC;AAED,0EAA0E;AAC1E,eAAO,MAAM,oBAAoB,QAAkB,CAAA;AAGnD,qBAAa,mBAAmB;IAS9B;;;;;OAKG;IACH,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,8CAA8C;IAC9C,OAAO,CAAC,QAAQ,CAAC,GAAG;IAhBrB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAa;IACnC,OAAO,CAAC,OAAO,CAAkB;IACjC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoB;IAE5C,iFAAiF;IACjF,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAoB;;IAGzC;;;;;OAKG;IACc,IAAI,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC;IAC9C,8CAA8C;IAC7B,GAAG,EAAE,MAAM;IAG7B,OAAO,CAAC,WAAW;IAInB,mEAAmE;IACnE,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAYhC,8DAA8D;IAC9D,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAKjC;;;;OAIG;IACG,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,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() {
|