@namzu/cli 20.0.0 → 22.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.
Files changed (224) hide show
  1. package/CHANGELOG.md +371 -0
  2. package/README.md +71 -10
  3. package/dist/cli.d.ts.map +1 -1
  4. package/dist/cli.js +24 -2
  5. package/dist/cli.js.map +1 -1
  6. package/dist/commands/acp.d.ts.map +1 -1
  7. package/dist/commands/acp.js +6 -1
  8. package/dist/commands/acp.js.map +1 -1
  9. package/dist/commands/run-stream.d.ts.map +1 -1
  10. package/dist/commands/run-stream.js +9 -1
  11. package/dist/commands/run-stream.js.map +1 -1
  12. package/dist/commands/run.d.ts.map +1 -1
  13. package/dist/commands/run.js +15 -12
  14. package/dist/commands/run.js.map +1 -1
  15. package/dist/config/load.d.ts.map +1 -1
  16. package/dist/config/load.js +44 -2
  17. package/dist/config/load.js.map +1 -1
  18. package/dist/config/schema.d.ts +24 -13
  19. package/dist/config/schema.d.ts.map +1 -1
  20. package/dist/config/schema.js.map +1 -1
  21. package/dist/doctor/checks/chain.d.ts.map +1 -1
  22. package/dist/doctor/checks/chain.js +11 -5
  23. package/dist/doctor/checks/chain.js.map +1 -1
  24. package/dist/doctor/checks/credentials.d.ts.map +1 -1
  25. package/dist/doctor/checks/credentials.js +7 -1
  26. package/dist/doctor/checks/credentials.js.map +1 -1
  27. package/dist/index.d.ts +1 -1
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js.map +1 -1
  30. package/dist/installation.d.ts +5 -0
  31. package/dist/installation.d.ts.map +1 -0
  32. package/dist/installation.js +48 -0
  33. package/dist/installation.js.map +1 -0
  34. package/dist/integrations/providers/access.d.ts +7 -0
  35. package/dist/integrations/providers/access.d.ts.map +1 -0
  36. package/dist/integrations/providers/access.js +17 -0
  37. package/dist/integrations/providers/access.js.map +1 -0
  38. package/dist/integrations/providers/current-credential.d.ts +4 -0
  39. package/dist/integrations/providers/current-credential.d.ts.map +1 -0
  40. package/dist/integrations/providers/current-credential.js +45 -0
  41. package/dist/integrations/providers/current-credential.js.map +1 -0
  42. package/dist/integrations/providers/discover.d.ts +28 -54
  43. package/dist/integrations/providers/discover.d.ts.map +1 -1
  44. package/dist/integrations/providers/discover.js +62 -58
  45. package/dist/integrations/providers/discover.js.map +1 -1
  46. package/dist/integrations/providers/gemini-credentials.d.ts +13 -0
  47. package/dist/integrations/providers/gemini-credentials.d.ts.map +1 -0
  48. package/dist/integrations/providers/gemini-credentials.js +148 -0
  49. package/dist/integrations/providers/gemini-credentials.js.map +1 -0
  50. package/dist/integrations/providers/harness-credentials.d.ts +14 -0
  51. package/dist/integrations/providers/harness-credentials.d.ts.map +1 -1
  52. package/dist/integrations/providers/harness-credentials.js +46 -0
  53. package/dist/integrations/providers/harness-credentials.js.map +1 -1
  54. package/dist/integrations/providers/model-reasoning.d.ts +4 -0
  55. package/dist/integrations/providers/model-reasoning.d.ts.map +1 -0
  56. package/dist/integrations/providers/model-reasoning.js +46 -0
  57. package/dist/integrations/providers/model-reasoning.js.map +1 -0
  58. package/dist/integrations/providers/register.d.ts +1 -1
  59. package/dist/integrations/providers/register.d.ts.map +1 -1
  60. package/dist/integrations/providers/register.js +16 -1
  61. package/dist/integrations/providers/register.js.map +1 -1
  62. package/dist/integrations/providers/registry.d.ts +4 -4
  63. package/dist/integrations/providers/registry.d.ts.map +1 -1
  64. package/dist/integrations/providers/registry.js +33 -0
  65. package/dist/integrations/providers/registry.js.map +1 -1
  66. package/dist/integrations/providers/setup.d.ts +49 -0
  67. package/dist/integrations/providers/setup.d.ts.map +1 -0
  68. package/dist/integrations/providers/setup.js +105 -0
  69. package/dist/integrations/providers/setup.js.map +1 -0
  70. package/dist/integrations/sessions/context-inventory.d.ts +4 -0
  71. package/dist/integrations/sessions/context-inventory.d.ts.map +1 -0
  72. package/dist/integrations/sessions/context-inventory.js +44 -0
  73. package/dist/integrations/sessions/context-inventory.js.map +1 -0
  74. package/dist/integrations/sessions/conversation-search.d.ts +60 -0
  75. package/dist/integrations/sessions/conversation-search.d.ts.map +1 -0
  76. package/dist/integrations/sessions/conversation-search.js +461 -0
  77. package/dist/integrations/sessions/conversation-search.js.map +1 -0
  78. package/dist/integrations/sessions/store.d.ts +1 -0
  79. package/dist/integrations/sessions/store.d.ts.map +1 -1
  80. package/dist/integrations/sessions/store.js +17 -4
  81. package/dist/integrations/sessions/store.js.map +1 -1
  82. package/dist/integrations/sessions/task-context.d.ts +4 -0
  83. package/dist/integrations/sessions/task-context.d.ts.map +1 -0
  84. package/dist/integrations/sessions/task-context.js +73 -0
  85. package/dist/integrations/sessions/task-context.js.map +1 -0
  86. package/dist/integrations/subagents/activity.d.ts +3 -1
  87. package/dist/integrations/subagents/activity.d.ts.map +1 -1
  88. package/dist/integrations/subagents/activity.js +32 -5
  89. package/dist/integrations/subagents/activity.js.map +1 -1
  90. package/dist/integrations/subagents/history.d.ts +26 -0
  91. package/dist/integrations/subagents/history.d.ts.map +1 -0
  92. package/dist/integrations/subagents/history.js +76 -0
  93. package/dist/integrations/subagents/history.js.map +1 -0
  94. package/dist/integrations/subagents/model-effort.d.ts +4 -0
  95. package/dist/integrations/subagents/model-effort.d.ts.map +1 -0
  96. package/dist/integrations/subagents/model-effort.js +12 -0
  97. package/dist/integrations/subagents/model-effort.js.map +1 -0
  98. package/dist/integrations/subagents/runtime.d.ts +27 -7
  99. package/dist/integrations/subagents/runtime.d.ts.map +1 -1
  100. package/dist/integrations/subagents/runtime.js +305 -35
  101. package/dist/integrations/subagents/runtime.js.map +1 -1
  102. package/dist/integrations/web/search.d.ts +11 -0
  103. package/dist/integrations/web/search.d.ts.map +1 -0
  104. package/dist/integrations/web/search.js +73 -0
  105. package/dist/integrations/web/search.js.map +1 -0
  106. package/dist/memory/io.d.ts +12 -0
  107. package/dist/memory/io.d.ts.map +1 -0
  108. package/dist/memory/io.js +177 -0
  109. package/dist/memory/io.js.map +1 -0
  110. package/dist/memory/presentation.d.ts +4 -1
  111. package/dist/memory/presentation.d.ts.map +1 -1
  112. package/dist/memory/presentation.js +16 -2
  113. package/dist/memory/presentation.js.map +1 -1
  114. package/dist/memory/store.d.ts +17 -3
  115. package/dist/memory/store.d.ts.map +1 -1
  116. package/dist/memory/store.js +61 -35
  117. package/dist/memory/store.js.map +1 -1
  118. package/dist/output-schema.d.ts +4 -0
  119. package/dist/output-schema.d.ts.map +1 -0
  120. package/dist/output-schema.js +18 -0
  121. package/dist/output-schema.js.map +1 -0
  122. package/dist/tui/AgentExplorer.d.ts +13 -2
  123. package/dist/tui/AgentExplorer.d.ts.map +1 -1
  124. package/dist/tui/AgentExplorer.js +85 -23
  125. package/dist/tui/AgentExplorer.js.map +1 -1
  126. package/dist/tui/App.d.ts.map +1 -1
  127. package/dist/tui/App.js +694 -150
  128. package/dist/tui/App.js.map +1 -1
  129. package/dist/tui/BrandHeader.d.ts +1 -4
  130. package/dist/tui/BrandHeader.d.ts.map +1 -1
  131. package/dist/tui/BrandHeader.js +4 -8
  132. package/dist/tui/BrandHeader.js.map +1 -1
  133. package/dist/tui/Composer.d.ts +2 -1
  134. package/dist/tui/Composer.d.ts.map +1 -1
  135. package/dist/tui/Composer.js +26 -3
  136. package/dist/tui/Composer.js.map +1 -1
  137. package/dist/tui/PermissionOverlay.d.ts +5 -2
  138. package/dist/tui/PermissionOverlay.d.ts.map +1 -1
  139. package/dist/tui/PermissionOverlay.js +14 -6
  140. package/dist/tui/PermissionOverlay.js.map +1 -1
  141. package/dist/tui/Picker.d.ts +2 -1
  142. package/dist/tui/Picker.d.ts.map +1 -1
  143. package/dist/tui/Picker.js +104 -24
  144. package/dist/tui/Picker.js.map +1 -1
  145. package/dist/tui/ProviderSetup.d.ts +6 -0
  146. package/dist/tui/ProviderSetup.d.ts.map +1 -0
  147. package/dist/tui/ProviderSetup.js +125 -0
  148. package/dist/tui/ProviderSetup.js.map +1 -0
  149. package/dist/tui/ResumePicker.d.ts.map +1 -1
  150. package/dist/tui/ResumePicker.js +5 -3
  151. package/dist/tui/ResumePicker.js.map +1 -1
  152. package/dist/tui/StatusPanel.d.ts +5 -0
  153. package/dist/tui/StatusPanel.d.ts.map +1 -0
  154. package/dist/tui/StatusPanel.js +11 -0
  155. package/dist/tui/StatusPanel.js.map +1 -0
  156. package/dist/tui/TextPrompt.d.ts +3 -1
  157. package/dist/tui/TextPrompt.d.ts.map +1 -1
  158. package/dist/tui/TextPrompt.js +55 -9
  159. package/dist/tui/TextPrompt.js.map +1 -1
  160. package/dist/tui/ToolOutputViewer.d.ts +11 -0
  161. package/dist/tui/ToolOutputViewer.d.ts.map +1 -0
  162. package/dist/tui/ToolOutputViewer.js +39 -0
  163. package/dist/tui/ToolOutputViewer.js.map +1 -0
  164. package/dist/tui/Transcript.d.ts.map +1 -1
  165. package/dist/tui/Transcript.js +10 -4
  166. package/dist/tui/Transcript.js.map +1 -1
  167. package/dist/tui/agent.d.ts +24 -3
  168. package/dist/tui/agent.d.ts.map +1 -1
  169. package/dist/tui/agent.js +362 -97
  170. package/dist/tui/agent.js.map +1 -1
  171. package/dist/tui/live-window.d.ts.map +1 -1
  172. package/dist/tui/live-window.js +5 -1
  173. package/dist/tui/live-window.js.map +1 -1
  174. package/dist/tui/logo.d.ts +4 -4
  175. package/dist/tui/logo.d.ts.map +1 -1
  176. package/dist/tui/logo.js +4 -4
  177. package/dist/tui/logo.js.map +1 -1
  178. package/dist/tui/model-catalogue-view.d.ts +3 -0
  179. package/dist/tui/model-catalogue-view.d.ts.map +1 -0
  180. package/dist/tui/model-catalogue-view.js +50 -0
  181. package/dist/tui/model-catalogue-view.js.map +1 -0
  182. package/dist/tui/model-choices.d.ts +3 -1
  183. package/dist/tui/model-choices.d.ts.map +1 -1
  184. package/dist/tui/model-choices.js +12 -1
  185. package/dist/tui/model-choices.js.map +1 -1
  186. package/dist/tui/model-search.d.ts +4 -0
  187. package/dist/tui/model-search.d.ts.map +1 -0
  188. package/dist/tui/model-search.js +11 -0
  189. package/dist/tui/model-search.js.map +1 -0
  190. package/dist/tui/model-selection-intent.d.ts +8 -0
  191. package/dist/tui/model-selection-intent.d.ts.map +1 -0
  192. package/dist/tui/model-selection-intent.js +96 -0
  193. package/dist/tui/model-selection-intent.js.map +1 -0
  194. package/dist/tui/model-switch-tool.d.ts +7 -0
  195. package/dist/tui/model-switch-tool.d.ts.map +1 -0
  196. package/dist/tui/model-switch-tool.js +74 -0
  197. package/dist/tui/model-switch-tool.js.map +1 -0
  198. package/dist/tui/model-switch.d.ts +35 -0
  199. package/dist/tui/model-switch.d.ts.map +1 -0
  200. package/dist/tui/model-switch.js +106 -0
  201. package/dist/tui/model-switch.js.map +1 -0
  202. package/dist/tui/permission-review.d.ts +2 -0
  203. package/dist/tui/permission-review.d.ts.map +1 -1
  204. package/dist/tui/permission-review.js +82 -15
  205. package/dist/tui/permission-review.js.map +1 -1
  206. package/dist/tui/run-interruption.d.ts +7 -0
  207. package/dist/tui/run-interruption.d.ts.map +1 -1
  208. package/dist/tui/run-interruption.js +41 -0
  209. package/dist/tui/run-interruption.js.map +1 -1
  210. package/dist/tui/slashCommands.d.ts +7 -0
  211. package/dist/tui/slashCommands.d.ts.map +1 -1
  212. package/dist/tui/slashCommands.js +77 -2
  213. package/dist/tui/slashCommands.js.map +1 -1
  214. package/dist/tui/status-card.d.ts +3 -0
  215. package/dist/tui/status-card.d.ts.map +1 -0
  216. package/dist/tui/status-card.js +30 -0
  217. package/dist/tui/status-card.js.map +1 -0
  218. package/dist/tui/status-panel-layout.d.ts +11 -0
  219. package/dist/tui/status-panel-layout.d.ts.map +1 -0
  220. package/dist/tui/status-panel-layout.js +42 -0
  221. package/dist/tui/status-panel-layout.js.map +1 -0
  222. package/dist/tui/types.d.ts +7 -1
  223. package/dist/tui/types.d.ts.map +1 -1
  224. package/package.json +9 -7
package/CHANGELOG.md CHANGED
@@ -1,5 +1,376 @@
1
1
  # @namzu/cli
2
2
 
3
+ ## 22.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 7785cb4: Web search now defaults to automatic search routing for conversation models, instead of being disabled. A supported native driver is preferred for a single-provider session; other routes use Exa under the normal network-tool permission policy. Neither Exa nor public Zen requires OpenCode installation. The public endpoint has free-tier limits. Set `web.search: off` to retain the old disabled behavior; set `web.backend: native` to use the existing provider-hosted search route instead.
8
+
9
+ Add `/config` as an entry to session settings and `/config sources` for configuration provenance. `/status` now presents a compact, wrapping session card including the search backend. `/setup` separates optional CLI installation from account access, offers confirmed npm installation with cancellation, and rechecks installation before connecting.
10
+
11
+ - 7785cb4: CLI runs and their children no longer default to finite cumulative token limits. Set limits.tokenBudget to 1000000 to retain the previous CLI tree limit. Iteration and cancellation limits remain active; token usage is still recorded.
12
+
13
+ Agent accepts model, provider and effort selections for a child without changing the parent conversation. Use agent_models to discover connected model IDs and published capabilities.
14
+
15
+ SDK AgentManager now honors explicit configOverrides.tokenBudget: 0 under an unlimited parent instead of substituting 200000. Specify 200000 to retain that previous behavior. TokenBudget.reserve(0) supports unlimited child accounts; finite ancestor budgets remain binding. Omitted SDK child budgets retain their existing fallback.
16
+
17
+ - 7785cb4: Enabled compaction now deduplicates long, identical read-only text observations
18
+ in model requests by default. The first full result remains; later identical
19
+ results reference it. This changes the content seen by providers and model-call
20
+ hooks, while leaving tool execution and canonical conversation history intact.
21
+
22
+ To keep the previous request representation, set `deduplicateObservations: false`
23
+ in SDK compaction configuration, or `compaction.deduplicateObservations: false`
24
+ in CLI configuration. SDK runs without compaction configuration or with the
25
+ `disabled` strategy remain unchanged. Distinct outputs, partial ranges, errors,
26
+ retained results and results of tools not explicitly read-only are not merged.
27
+
28
+ - 7785cb4: Edits now refuse a file whose captured content fingerprint differs from its
29
+ current contents, even if the requested anchor still matches. This applies to
30
+ local and sandbox edits. Read the changed file again before retrying; unrelated
31
+ external changes no longer silently pass edit admission.
32
+
33
+ The interactive CLI retains file observations across turns of a live agent
34
+ session. SDK hosts can share `createFileReadTracker()` through
35
+ `query({ fileReadTracker })` across their conversation's turns. Keep trackers
36
+ isolated by conversation and filesystem; an omitted tracker remains run-local.
37
+ Observations are in memory, not a durable resume record. No atomic exclusion
38
+ of external writers after admission is promised.
39
+
40
+ - 7785cb4: Stop bundling OAuth application credentials for borrowed Google sessions. Expired sessions now require renewal in their owning CLI, unless GOOGLE_OAUTH_CLIENT_ID and GOOGLE_OAUTH_CLIENT_SECRET are explicitly configured for the application that issued the refresh token. Fresh owner sessions and API-key access continue to work.
41
+
42
+ ### Minor Changes
43
+
44
+ - 7785cb4: CLI adds agent_task_list for the invoking run's delegated work, separate from planning tasks. Budget-stopped child results are reported as incomplete rather than successful completion; notifications explicitly distinguish lifecycle termination from task success. The agent browser uses the terminal height and preserves the main draft while its composer is hidden.
45
+ - 7785cb4: Add cancel_agent to request cancellation of one owned running or queued child without cancelling the parent or its other tasks. Finished tasks return their existing status. Confirm termination through agent_task_list or wait_for_task; acceptance alone is not completion. Unresolved provider usage still follows the shared token ledger's admission policy.
46
+
47
+ Load catalogue-backed reasoning profiles before validating or executing explicitly selected child effort, fixing rejected low-effort Codex delegations on fresh provider instances.
48
+
49
+ - 7785cb4: Add optional exploration presentation metadata to tool call views. The CLI groups consecutive successful file observations while preserving their complete retained output behind Ctrl+O. CLI tool-end events additionally expose retained `output` before preview formatting, so hosts can recover exact text. Background job calls now identify the operation and job. Failures remain visible outside compact groups.
50
+
51
+ Fix grep returning no matches when its path names a regular file. Local and guest traversal now search that file without enumerating its parent.
52
+
53
+ - 7785cb4: Retain session-scoped agent receipts across CLI restarts. Resumed conversations receive a bounded summary of earlier tasks; `agent_task_list` accepts `history: true` and an optional `task_id` to inspect saved outcomes and result previews without launching another agent. Tasks without a terminal receipt remain explicitly unresolved, not falsely running or completed. This does not automatically restart child processes.
54
+ - 7785cb4: Add Google model access with a native SDK provider and CLI model selection. Reuse an existing Gemini CLI Google sign-in from this device, including the paired Windows home under WSL, without requiring a new API key. Explicit Gemini or Google API keys remain an alternative and take precedence when configured. Borrowed sign-ins are refreshed in memory without rewriting their owner file; Google account access retains the Code Assist route rather than being sent to the API-key endpoint.
55
+ - 7785cb4: Enable provider-hosted web search with `web.search: live` or `cached` in CLI configuration, or `webSearch: { mode: 'live' | 'cached' }` in SDK run/completion parameters. Search remains off by default. Currently the Codex subscription driver supports it; unsupported provider routes refuse explicitly. Hosted searches display activity and retain source links and native replay evidence without executing local shell commands. Enabling this setting authorizes server-side searches without per-search local-tool approval. Model token usage remains accounted in the enclosing request; separate search fees are not measured by the token ledger.
56
+
57
+ SDK event consumers can handle the new `hosted_tool` event (`hosted.tool` on SSE). These observations never request local tool execution.
58
+
59
+ - 7785cb4: An unresolved provider receipt no longer blocks healthy sibling accounts whose shared ancestors are unlimited. Finite shared allowances remain blocked, as does the account owning the unresolved receipt. To retain tree-wide blocking on unknown spend, configure a finite root token budget. Invalid accounting and failed persistence still block the entire tree.
60
+
61
+ Snapshots retain uncertainty on individual request records via unresolved; only explicit final-receipt reconciliation clears it. Cold restore marks pending requests unresolved. TokenBudgetSummary adds unresolvedRequests; poisoned now reports whether the observed account is blocked. CLI usage identifies incomplete measured totals instead of implying that unknown usage was free.
62
+
63
+ ### Patch Changes
64
+
65
+ - 7785cb4: Prevent Ctrl+O from repeatedly appending full tool results and diffs to the
66
+ transcript. Older outputs and expansions that exceed the live viewport open in
67
+ a bounded, scrollable detail view. Use arrows and Page Up/Down to navigate,
68
+ left/right to switch outputs, and Escape or Ctrl+O to return. Small results
69
+ still expand in place. Viewing output does not alter conversation history.
70
+ - 7785cb4: Show the CLI version, absolute entrypoint and executable-file fingerprint in /status so stale installations can be distinguished from a newer local build with the same package version.
71
+ - 7785cb4: Show agent approvals as compact task rows grouped by workflow and phase labels. Full prompts remain accessible with `d`, and long batches retain pagination. Unknown input shapes still open as exact prepared input.
72
+ - 7785cb4: Show model discovery as a compact catalogue with provider, exact model ID, context size and effort options. Ctrl+O preserves access to the original JSON. Empty results and unavailable catalogues remain explicit, and malformed output falls back to the ordinary tool view.
73
+ - 7785cb4: Refresh Anthropic OAuth credentials before cross-provider agent launches and model discovery instead of reusing the startup token. Concurrent launches share serialized renewal and honor credentials removed or rotated by their owner.
74
+ - 7785cb4: Honor GEMINI_CLI_HOME when reusing Gemini CLI Google sign-ins. Read the selected home’s .gemini/oauth_creds.json and avoid falling back to another Linux or Windows account when that explicitly selected owner is signed out. Empty values preserve the normal lookup.
75
+ - 7785cb4: Add observed write receipts with operation, UTF-8 byte count, SHA-256 and changed-region preview. Diff presentation accepts an optional summary label. Completed tool events carry bounded diff presentation so hosts do not have to reconstruct it from text. Existing write input, character-size metadata and permission defaults remain unchanged.
76
+
77
+ CLI write approvals describe a possible full replacement instead of implying creation; completed writes display the observed operation and diff. Final newline terminators no longer add a phantom line, and real blank lines remain visible. Backends with unknown prior state report Wrote rather than Created.
78
+
79
+ - 7785cb4: Show one named status row for every observed agent completion, including tasks the model never explicitly waits on. Label active waits with the task name and avoid repeating successful wait protocol payloads in the main transcript. Agent reports remain available through Ctrl+T; unknown waits and tool errors stay visible.
80
+ - 7785cb4: Assemble bracketed terminal pastes before editing the composer, normalize Windows line endings and show character counts for collapsed text. Preserve separate assistant messages when a task completion follows an earlier status answer. Delegation receipts now name the running task, and parallel-launch guidance explains how to avoid serial waits.
81
+ - 7785cb4: Keep successful wait results visible when a scheduler supplies no assistant transcript for the agent inspector. This preserves the only available report while normal inspected agents retain compact completion rows. Generalize the startup session notice for additional model providers.
82
+ - 7785cb4: Queue concurrent terminal permission requests so one agent cannot overwrite another agent’s pending approval. Show the remaining queue count, reset the consent window for each review, and settle all pending reviews on cancellation or application exit. Explicit session-wide approval includes queued reviews.
83
+ - 7785cb4: Avoid repeating the project-instructions notice when switching models with the same loaded instruction files. Replacement sessions still load their instructions, and changed non-empty file lists are announced.
84
+ - 7785cb4: Fix derived resume titles being stuck at `Conversation` when project instructions were saved before the first user prompt. Preserve explicitly named conversations, add selected-conversation previews on taller terminals, and offer an explicit continuation choice for saved active or paused goals without automatically starting work on resume.
85
+
86
+ Use project-scoped session listing in the disk-backed resume picker instead of scanning every project in the application home.
87
+
88
+ - 7785cb4: Remove the coding doctrine's unconditional read-before-edit instruction. Agents can reuse content from successful prior reads or writes, while re-observing missing, stale or partial evidence and respecting project instructions and tool prerequisites. Clarify that tool intentions and failed calls do not establish completion. Runtime permissions and freshness checks are unchanged.
89
+
90
+ Clarify prior-turn action evidence and Namzu’s kernel/SDK identity in the CLI. Make verification proportional to the task and remove unconditional concurrency and child-context claims from shared guidance.
91
+
92
+ - 7785cb4: Tool review prompts now carry the originating run ID. The CLI uses this identity to show which agent requested an approval, retaining the attribution as concurrent requests advance through the queue. Unrecognized runs display their ID instead of an inferred agent name.
93
+ - 7785cb4: Render `/status` as a structured terminal card with aligned fields, wrapping paths and stacked narrow-screen layout. Keep the plain report available in raw mode and account for the card height in transcript scrolling.
94
+ - 7785cb4: Refresh the CLI README with compact terminal captures of editing, parallel work and resumed conversations.
95
+ - 7785cb4: Replace the bracketed opening banner with a two-row green terminal wordmark.
96
+ Narrow or short terminals use a compact text signature. Version attribution
97
+ remains beside the mark, and the opening header still prints only once.
98
+ - Updated dependencies [7785cb4]
99
+ - Updated dependencies [7785cb4]
100
+ - Updated dependencies [7785cb4]
101
+ - Updated dependencies [7785cb4]
102
+ - Updated dependencies [7785cb4]
103
+ - Updated dependencies [7785cb4]
104
+ - Updated dependencies [7785cb4]
105
+ - Updated dependencies [7785cb4]
106
+ - Updated dependencies [7785cb4]
107
+ - Updated dependencies [7785cb4]
108
+ - Updated dependencies [7785cb4]
109
+ - Updated dependencies [7785cb4]
110
+ - Updated dependencies [7785cb4]
111
+ - @namzu/sdk@38.0.0
112
+ - @namzu/google@0.2.0
113
+ - @namzu/openai@3.1.0
114
+ - @namzu/computer-use@1.4.2
115
+ - @namzu/anthropic@5.0.0
116
+ - @namzu/ollama@2.2.2
117
+ - @namzu/openrouter@2.4.0
118
+
119
+ ## 21.0.0
120
+
121
+ ### Major Changes
122
+
123
+ - 4d66337: Make project memory usable across runs, corrections and compaction, with bounded automatic recall in the CLI.
124
+
125
+ SDK memory search now matches ranked Unicode terms in titles, summaries and bodies instead of metadata substrings. `search_memory` defaults to active records and 10 results, with limits restricted to 1–50; pass `status: "archived"` to inspect archived records or use the store API for an unbounded listing. Hosts relying on the previous matching algorithm should supply a custom `MemoryIndex` with their intended semantics. `buildMemoryTools` adds `update_memory` and destructive `delete_memory`; hosts that allow only selected tools should filter the returned roster explicitly.
126
+
127
+ Disk memory operations now coordinate through a per-store lock and refresh the index for each operation. Read access requires permission to create the lock. Stop older writers before upgrading a shared store. A stale lock left by a crash is reported with its path and requires owner inspection after stopping cooperating processes; the store does not silently steal it or promise a crash-atomic multi-file transaction. `lockTimeoutMs` controls acquisition wait time.
128
+
129
+ SDK hosts can opt into `createMemoryRecallStep` through `prepareStep`. Preparation receives the current operator message independently of compacted history, estimated context headroom and cancellation. Checkpoints preserve that intent without duplicating attachment bytes. Both shipped stores provide optional `getRecord` snapshots; custom stores can implement it for consistent status/body reads. Promotion records actual claims and their source, skips exact prior claim sets on a best-effort basis, and leaves archived matches archived. Pin removal and extraction no longer retain a stale final pin or discard negative user requirements.
130
+
131
+ CLI automatic recall is now on: each main-session model step can receive up to three active project records, within 6,000 characters and available estimated context headroom, with a one-second deadline. Set `"memory": { "recall": false }` in CLI configuration to retain explicit tool-only retrieval. This setting does not disable memory writes. `compaction.consolidate: true` now chooses consolidation instead of also running the default promoter; omitted or false retains promotion.
132
+
133
+ Curated CLI memory files over 1 MiB, malformed text, non-regular files and links escaping their scope are skipped with diagnostics rather than read or overwritten. Split oversized files and keep them inside their intended scope. Notes saved beyond the prompt cap now say that they were saved but excluded from the model's context.
134
+
135
+ - 539d5bf: Interactive conversations now expose `read_conversation` to page exact retained
136
+ text using the `runId`, `seq`, and new `part` field from `search_conversation`.
137
+ Read and search cursors are distinct and expire; durable event addresses remain
138
+ usable after restarting without a cursor. Oversized records and bytes never
139
+ recorded remain unavailable.
140
+
141
+ The interactive prompt now includes a bounded context inventory when visible
142
+ tool output is large or context is under pressure. This changes default prompt
143
+ and tool-catalogue behavior. Embedders requiring the previous exact prompt and
144
+ catalogue must retain the previous CLI version or compose their host using SDK
145
+ hooks without the inventory/read tool. No SDK default changes.
146
+
147
+ - c056381: Interactive runs and checkpoint resumes now automatically include a bounded
148
+ snapshot of the current run's unfinished tasks in model requests. This changes
149
+ the default prompt even when automatic project-memory recall is disabled.
150
+ Tasks remain scoped to their run and tenant; new runs do not inherit old plans.
151
+
152
+ Consumers requiring the previous exact prompt must retain the previous CLI
153
+ version or compose an SDK host without this prepare step. SDK defaults and
154
+ TaskStore APIs are unchanged.
155
+
156
+ - 67d8438: CLI built-in `bash`, `write` and `edit` calls now act as execution barriers within
157
+ a model-generated batch. Earlier calls settle before them and later calls wait
158
+ for them, instead of concurrency-safe reads overlapping those mutations. SDK
159
+ embedders can retain the old scheduling by leaving `executionBarrier` unset;
160
+ the CLI deliberately uses ordered mutation boundaries. Background shell jobs
161
+ still release the boundary after launch, not after the job finishes.
162
+
163
+ Add opt-in `Agent.run_in_background` and `send_message` for queued corrections
164
+ to owned running children. Existing blocking delegation remains the default;
165
+ finished tasks are not restarted. Add direct, session-only host model selection
166
+ for standalone `/model ID` and recognized model-change requests, with model and
167
+ effort previews in the composer. Mixed work remains a model prompt.
168
+
169
+ - 8a7a4d5: SDK: add `compareHarnessTrials` and `reviewHarnessCandidate` for paired,
170
+ trace-attributed harness verification with fresh confirmation and explicit
171
+ regression/inconclusive decisions. These functions inspect recorded results;
172
+ they do not automatically execute or promote candidates.
173
+
174
+ CLI: `search_conversation` now scans large transcripts in bounded pages and
175
+ returns `nextCursor` for continuation. The former 2 MiB whole-file limit becomes
176
+ a 4 MiB per-record limit. Validation now covers the current page's prefix rather
177
+ than the entire run before any result is returned. Consumers relying on whole-run
178
+ validation must validate the full archive themselves. Follow `nextCursor` with
179
+ the same query, and restart searches after cursor expiry or file changes.
180
+
181
+ - ce514f9: `maxDelegationWidth` now limits pending/active direct child sessions instead of
182
+ all historical children. Completed and failed history remains readable without
183
+ using a live slot. Hosts requiring a lifetime child quota must enforce it
184
+ separately; `capacityBehavior: 'reject'` still fails immediately when live slots
185
+ are full, but does not restore the former lifetime interpretation.
186
+
187
+ The CLI now queues excess agent tasks instead of failing them on width. The
188
+ SDK exposes opt-in `AgentManager` queue admission and a bounded pending queue.
189
+ Queued work receives a task ID before execution, rechecks host authority before
190
+ starting, and keeps cancellation and budget ownership with the parent. Queue
191
+ mode allocates tokens across available slots plus a parent share; CLI child
192
+ grants therefore change from geometric halves to that distribution. Total
193
+ configured token limits are unchanged.
194
+
195
+ Independent agent workflows now have separate navigation; phases remain inside
196
+ their own workflow. Agent launch approvals show type and capabilities, and
197
+ resource/policy stops visibly explain why a turn ended. Completed delegation
198
+ outputs identify the task and status before the child result, keeping IDs inside
199
+ that result separate from scheduler handles.
200
+
201
+ ### Minor Changes
202
+
203
+ - 67d8438: Add `search_conversation` to recover exact identifiers and phrases from the current conversation's recorded assistant and tool output after compaction or restart. Searches remain within the host-selected tenant, project and session, return bounded excerpts with run/event references, and report incomplete or unavailable evidence without repeating external work.
204
+ - 400cf27: Let the main interactive agent change the current conversation's model
205
+ through `switch_model`, so a request such as “gpt-5.6-luna’ya geç” can use
206
+ the normal model-selection path. The tool accepts an exact model ID and
207
+ optional provider, prefers the current usable provider, and returns choices
208
+ when another provider must be selected explicitly.
209
+
210
+ An accepted request is queued until the active turn and its persistence
211
+ settle. Successful application preserves conversation identity and history
212
+ and resets reasoning effort to the new model's default. Cancellation,
213
+ conversation departure or replacement failure retains the current model;
214
+ active delegated agents or background jobs prevent the switch.
215
+ Conversational switches do not change saved defaults and are unavailable
216
+ to headless runs and subagents.
217
+
218
+ - 035dcbc: Add optional `ModelInfo.reasoningEffortLevels` and `reasoningEffortDefault`
219
+ metadata. The CLI discovers missing model menus through provider catalogues,
220
+ retains established model-specific driver capabilities without extra network
221
+ requests, and intersects usable fallback routes. Third-party drivers can publish effort capabilities without adding
222
+ provider or model cases to the CLI. Unknown menus remain unavailable; absent
223
+ defaults do not erase known choices.
224
+ - 035dcbc: After choosing a model in the interactive picker, choose from the new session's supported reasoning-effort levels. Esc keeps the successfully selected model at its default effort, and queued work waits for this step to close. Models without a known non-empty effort menu return directly to the composer; `/effort` remains available separately.
225
+ - c635b5a: Use `namzu --output-schema /absolute/path/schema.json` for native schema-constrained TUI answers. Unsupported or lossy schema conversion fails at launch; normal conversations remain unchanged. Supply the flag again on resume.
226
+
227
+ Enable native query admission for Codex, OpenRouter, DeepSeek, HTTP and Zen wire mappings. Codex forwards Responses text.format; HTTP maps schemas for both dialects. Zen messages requests use native format instead of hidden tool fallback, and Google requests preserve JSON Schema constraints. Endpoint/model support is still required and vendor errors remain errors.
228
+
229
+ Breaking for direct HTTP/Zen callers: an Anthropic-dialect response format can no longer be silently ignored or fall back to an output tool. Schema-free JSON and explicit strict:false are rejected. Use strict native JSON Schema on a capable model, or choose SDK structuredOutput.mode="tool" when native schema output is unavailable.
230
+
231
+ Anthropic transport retries now default to zero instead of the vendor SDK default of two. The host immediately receives classified HTTP 429 responses with Retry-After metadata instead of waiting invisibly inside the vendor client. Set AnthropicConfig.maxRetries to 2 to retain the former transport retry behavior.
232
+
233
+ Rate-limit guidance no longer claims automatic retries were exhausted when retry policy may have disabled them or refused the requested delay.
234
+
235
+ - 2b0d90d: Add optional exact-word constraints through `MemorySearchParams.requiredIdentifiers`
236
+ in the built-in memory stores, applied before ranking and limiting results.
237
+
238
+ SDK hosts can opt into `createMemoryRecallStep({ identifierGrounding: true })`;
239
+ CLI users can set `memory.identifierGrounding: true`. Queries containing mixed
240
+ letter/digit identifiers then require one of those identifiers in an automatically
241
+ recalled record. Explicit memory tools keep their broad search behavior.
242
+
243
+ The option defaults to false. The live comparison removed irrelevant automatic
244
+ recall but did not improve factual accuracy and used more tokens, so this is a
245
+ precision control for suitable workloads, not a promoted performance default.
246
+ Exact spelling can miss aliases or renamed identifiers.
247
+
248
+ - 67d8438: Search the model picker by model ID or display name, with bounded results and visible current/default markers on narrow terminals. Type to filter or press `/` first to search for names beginning with the existing `p` or numeric shortcuts. Backspace edits the query, Ctrl+U clears it, and Enter applies only a matching selection.
249
+ - 73de124: `run-stream` terminal `done` events now carry the kernel's settled result in
250
+ optional `text`, including an intentionally empty guarded result. Hosts should
251
+ use that field for the final answer; earlier deltas can include progress and
252
+ answers rejected by verification. Interrupted streams without a settled result
253
+ can omit it.
254
+
255
+ Buffered `namzu run` text and JSON output now use that same final result, fixing
256
+ concatenation of intermediate narration and rejected completion claims. Fallback
257
+ answer-only history persistence also uses the settled result. Partial output on
258
+ provider failure or pause remains available with the existing nonzero exit.
259
+
260
+ - 0795da3: Add optional Zen and Zen Go providers for OpenCode's services using Namzu's
261
+ existing model contract. Exact service/model catalogue entries select Chat Completions,
262
+ Responses, Anthropic Messages or Google streaming transport. Tool
263
+ continuations, native reasoning metadata, conversation attribution,
264
+ cancellation and classified provider errors remain part of the normal
265
+ Namzu kernel lifecycle.
266
+
267
+ The CLI exposes Zen (`zen`) and Zen Go (`zen-go`) in provider selection and
268
+ headless runs. Zen supports anonymous public models and optional credentials;
269
+ Go requires its own key. The actual Namzu
270
+ conversation is retained for service attribution across turns and resume.
271
+ The driver requires Node.js 20+ and a supported public model, or a real key
272
+ with a known model or explicit protocol. Bundled prices are estimates;
273
+ unsupported controls and content combinations are refused.
274
+
275
+ - 4cac9ca: Enable Zen's current public models without requiring an account key or an
276
+ OpenCode installation. Anonymous SDK calls and the CLI's Zen default use
277
+ `muse-spark-1.3-contributor-free`. Omitted, blank or `public` Zen keys select
278
+ anonymous access, restricted to six explicitly supported free model IDs;
279
+ paid or unknown models still require a real key. The SDK keeps
280
+ `glm-5.3-flash` as the default for credentialed Zen and Go calls, and Go
281
+ continues to require its own API key.
282
+
283
+ The CLI uses environment keys first, then reuses separate `opencode` and
284
+ `opencode-go` API-key entries from `OPENCODE_AUTH_CONTENT` or OpenCode's
285
+ data-directory `auth.json`, including the paired Windows home on WSL when
286
+ no absolute XDG override is supplied.
287
+ It leaves that file unchanged and does not reinterpret OAuth records as
288
+ API keys. Explicit `OPENCODE_API_KEY=public` selects anonymous access and
289
+ suppresses secondary Zen key aliases and stored account keys. With no
290
+ credential, Zen appears as public access without a login
291
+ or key prompt. Public model availability and service limits remain under
292
+ the upstream service's control.
293
+
294
+ Expose `@namzu/zen/models` for catalogue functions and model types without
295
+ loading the four native transport adapters during provider selection.
296
+
297
+ Send `strict: false` for all Responses function tools so optional parameters,
298
+ including nested read/edit fields, remain optional. This fixes HTTP 400
299
+ schema rejection when a backend defaults omitted strictness to true.
300
+ Responses also declines the capability-dependent `enforceToolInputSchema`
301
+ hint for these general schemas; Namzu continues to validate inputs before
302
+ tool execution. Other protocols retain their existing enforcement behavior.
303
+
304
+ ### Patch Changes
305
+
306
+ - 6973fa8: Stop repeating accepted conversational model switches. A successful solitary
307
+ `switch_model` call now ends the turn through the kernel's terminal-tool path,
308
+ without another inference to acknowledge it. Repeated requests for the same
309
+ accepted target reuse that reservation. Failed requests remain correctable;
310
+ mixed tool batches keep their existing result-relay behavior.
311
+
312
+ Show a compact target row and host-confirmed application instead of duplicating
313
+ the pending receipt. Rank missing-model suggestions before limiting them to
314
+ eight choices. Let the kernel mount `search_tools` only when deferred tools
315
+ exist, avoiding an empty discovery call in ordinary interactive sessions.
316
+
317
+ - 7587d43: Keep long conversation names and goal objectives editable in narrow terminals.
318
+ The text editor now scrolls with its cursor while keeping its title and action
319
+ keys visible, without shortening saved values or splitting Unicode characters.
320
+ - 1a7420d: Remove repeated startup identity from the interactive transcript. The opening
321
+ header shows Namzu and its version; current model, reasoning effort and working
322
+ directory stay in the footer. Normal startup no longer prints the same connection
323
+ again, and the composer supplies the typing hint. Explicit provider/model changes
324
+ still confirm their result, reasoning confirmations are shorter, and configuration
325
+ warnings, instruction-file disclosure and failures remain visible. Provider/tool
326
+ details remain available through `/status` and `/status tools`.
327
+
328
+ Fix repeated transcript rows after terminal contraction while preserving the
329
+ conversation, draft and selected agent. Subagent screens now page tabbed and
330
+ Unicode output within the frame; phase and agent panes have distinct boundaries,
331
+ and completed status is no longer repeated as activity text.
332
+
333
+ - 7587d43: Keep completed delegated results available to `wait_for_task` after the manager
334
+ evicts terminal task records. A parent can retrieve the full output retained in
335
+ its task ledger, including text omitted from completion notifications, without
336
+ launching another child. Results remain restricted to the parent that launched
337
+ the task.
338
+ - Updated dependencies [fdd76aa]
339
+ - Updated dependencies [67d8438]
340
+ - Updated dependencies [4d66337]
341
+ - Updated dependencies [c78fd3f]
342
+ - Updated dependencies [d045660]
343
+ - Updated dependencies [67d8438]
344
+ - Updated dependencies [c5cf4de]
345
+ - Updated dependencies [4a46cb2]
346
+ - Updated dependencies [c5cf4de]
347
+ - Updated dependencies [086ade9]
348
+ - Updated dependencies [035dcbc]
349
+ - Updated dependencies [c635b5a]
350
+ - Updated dependencies [e81a109]
351
+ - Updated dependencies [e81a109]
352
+ - Updated dependencies [2b0d90d]
353
+ - Updated dependencies [8a7a4d5]
354
+ - Updated dependencies [f370947]
355
+ - Updated dependencies [ce514f9]
356
+ - Updated dependencies [f370947]
357
+ - Updated dependencies [481b3d5]
358
+ - Updated dependencies [c78fd3f]
359
+ - Updated dependencies [d045660]
360
+ - Updated dependencies [b4408d6]
361
+ - Updated dependencies [b33dc98]
362
+ - Updated dependencies [b4408d6]
363
+ - Updated dependencies [0795da3]
364
+ - Updated dependencies [4cac9ca]
365
+ - @namzu/anthropic@5.0.0
366
+ - @namzu/openai@3.0.0
367
+ - @namzu/sdk@37.0.0
368
+ - @namzu/openrouter@2.4.0
369
+ - @namzu/deepseek@1.2.0
370
+ - @namzu/zen@1.0.0
371
+ - @namzu/computer-use@1.4.2
372
+ - @namzu/ollama@2.2.2
373
+
3
374
  ## 20.0.0
4
375
 
5
376
  ### Major Changes
package/README.md CHANGED
@@ -2,8 +2,8 @@
2
2
  type: Reference
3
3
  title: "@namzu/cli"
4
4
  description: >-
5
- A terminal coding agent built on the Namzu kernel, from the same public API
6
- you get. Interactive sessions, headless runs that stream structured events,
5
+ A terminal coding agent with interactive sessions, parallel agents, saved
6
+ conversations, headless runs 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
@@ -12,9 +12,9 @@ generated: { by: human:bahadirarda, at: 2026-09-01T00:00:00Z }
12
12
 
13
13
  <div align="center">
14
14
 
15
- <h1>@namzu/cli</h1>
15
+ <img src="https://raw.githubusercontent.com/cogitave/namzu/main/packages/cli/assets/namzu-terminal.svg" alt="Namzu CLI" width="1148" />
16
16
 
17
- **A terminal coding agent, built on [`@namzu/sdk`](https://www.npmjs.com/package/@namzu/sdk).**
17
+ **Your work, your agents, your terminal.**
18
18
 
19
19
  [![npm](https://img.shields.io/npm/v/@namzu/cli.svg)](https://www.npmjs.com/package/@namzu/cli)
20
20
  [![build](https://github.com/cogitave/namzu/actions/workflows/ci.yml/badge.svg)](https://github.com/cogitave/namzu/actions/workflows/ci.yml)
@@ -26,10 +26,32 @@ generated: { by: human:bahadirarda, at: 2026-09-01T00:00:00Z }
26
26
 
27
27
  ---
28
28
 
29
- A terminal coding agent built entirely on the Namzu kernel, in the same
30
- repository, from the same public API you get. It exists as much to prove the
31
- kernel as to be used: every gap in the SDK showed up first as something the CLI
32
- had to work around.
29
+ ## From a request to a visible result
30
+
31
+ Read and edit files, delegate independent tasks and continue saved conversations.
32
+ The terminal keeps tool results, approvals and progress alongside your messages.
33
+
34
+ ![Namzu creates a TypeScript function and shows the added lines](https://raw.githubusercontent.com/cogitave/namzu/main/packages/cli/assets/cli-editing.png)
35
+
36
+ ## Independent tasks, shared visibility
37
+
38
+ Start agents with scoped tool access. Review the plan, watch their progress,
39
+ and open an agent's transcript with `Ctrl+T` while the main composer remains
40
+ available.
41
+
42
+ ![Two read-only agents working in parallel](https://raw.githubusercontent.com/cogitave/namzu/main/packages/cli/assets/cli-agents.png)
43
+
44
+ ## Pick up the conversation
45
+
46
+ Use `/resume` to choose a saved conversation or `namzu resume <id>` to reopen
47
+ one directly. Resume retains conversation history; file tools check the current
48
+ workspace before applying edits based on stale observations.
49
+
50
+ ![A resumed conversation reads an updated file before editing](https://raw.githubusercontent.com/cogitave/namzu/main/packages/cli/assets/cli-resume.png)
51
+
52
+ Real terminal captures from isolated example projects. The
53
+ [release validation notes](https://github.com/cogitave/namzu/blob/main/docs/cli/release-validation.md)
54
+ describe the checks and their limits.
33
55
 
34
56
  ## Install
35
57
 
@@ -51,8 +73,7 @@ curl -fsSL https://raw.githubusercontent.com/cogitave/namzu/main/install.sh | sh
51
73
  irm https://raw.githubusercontent.com/cogitave/namzu/main/install.ps1 | iex
52
74
  ```
53
75
 
54
- Installing brings the kernel and five model drivers — Anthropic, OpenAI,
55
- DeepSeek, OpenRouter and Ollama — plus `@namzu/files` and
76
+ The CLI bundles provider drivers, plus `@namzu/files` and
56
77
  `@namzu/computer-use`, as ordinary dependencies rather than peers. So a fresh
57
78
  install can already reach those services and expose desktop control when the
58
79
  device has a supported adapter. `@namzu/telemetry` and `@namzu/sandbox` remain
@@ -128,6 +149,46 @@ API keys remain optional alternatives through environment variables or the
128
149
  session-only credential picker, and detecting one does not hide the subscription
129
150
  sign-in action.
130
151
 
152
+ Zen and Zen Go appear as separate providers in `/model` (press
153
+ `p` to change providers). Zen works without an account key or an OpenCode
154
+ installation: its default is Muse Spark 1.3 Contributor Free
155
+ (`muse-spark-1.3-contributor-free`), and public discovery lists only the
156
+ explicitly supported free models. Public Zen is not a signed-in subscription
157
+ and selecting it does not open a login or key prompt. Availability and
158
+ service limits remain controlled by OpenCode.
159
+
160
+ For paid Zen models, set `OPENCODE_API_KEY` or `OPENCODE_ZEN_API_KEY`; Go
161
+ requires `OPENCODE_GO_API_KEY` or its own installed API credential. When both
162
+ Zen variables are present, `OPENCODE_API_KEY` wins. Environment keys take
163
+ precedence over OpenCode's API-key entries in
164
+ `OPENCODE_AUTH_CONTENT` when set, otherwise
165
+ `$XDG_DATA_HOME/opencode/auth.json` for an absolute XDG path or
166
+ `~/.local/share/opencode/auth.json`. `OPENCODE_AUTH_CONTENT` replaces the
167
+ whole credential store; invalid JSON does not fall back to a disk account.
168
+ Without an absolute XDG override, WSL also checks the paired Windows home's
169
+ file when available.
170
+ Namzu reads the `opencode` entry for Zen and `opencode-go` for Go, accepts
171
+ only API-key entries, and leaves the file unchanged. OAuth entries are not
172
+ converted into API keys, and a Zen key is never reused for Go. Keys entered
173
+ in the picker remain temporary.
174
+ Public Zen is listed after existing accounts and reachable local providers
175
+ and carries the label `free models · no API key`.
176
+
177
+ ```bash
178
+ namzu run --provider zen "Explain this project"
179
+ namzu run --provider zen --model muse-spark-1.3-contributor-free "Explain this project"
180
+ namzu run --provider zen-go --model glm-5.3-flash "Explain this project"
181
+ ```
182
+
183
+ The Zen commands use public access when no key is available; Go requires its
184
+ own credential. All use the existing folder-trust rules. The same
185
+ provider/model flags work with `run-stream`.
186
+ The picker lists each service's supported models from the provider catalogue;
187
+ an explicit model selection is saved using the existing preferences flow.
188
+ Go requests carry the actual Namzu conversation ID in `x-opencode-session`,
189
+ stable across turns and resumed runs. Delegated work shares its invoking
190
+ conversation's upstream session; switching conversations changes that ID.
191
+
131
192
  Bare `/help` opens the session's complete command vocabulary as a keyboard
132
193
  palette; selecting a row runs that command through the same dispatcher as a
133
194
  typed slash command. Refused project command files remain visible with their
package/dist/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA+BH,OAAO,EAEN,KAAK,gBAAgB,EAKrB,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAqBxD,MAAM,WAAW,aAAa;IAC7B,iFAAiF;IACjF,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;IAChC;;;;OAIG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAAA;CACvD;AAQD,wBAAsB,MAAM,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CA2TjE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,gBAAgB,EAAE,MAAM,EAAE,cAAc,GAAG,IAAI,CA4E5F"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAgCH,OAAO,EAEN,KAAK,gBAAgB,EAKrB,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAqBxD,MAAM,WAAW,aAAa;IAC7B,iFAAiF;IACjF,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;IAChC;;;;OAIG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAAA;CACvD;AAQD,wBAAsB,MAAM,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAoVjE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,gBAAgB,EAAE,MAAM,EAAE,cAAc,GAAG,IAAI,CA4E5F"}
package/dist/cli.js CHANGED
@@ -7,6 +7,7 @@
7
7
  * this and exits with the returned code.
8
8
  */
9
9
  import { resolve } from 'node:path';
10
+ import { loadOutputSchema } from './output-schema.js';
10
11
  import { Command, CommanderError, Option } from 'commander';
11
12
  import { BOOT_EVENT_NAMES, EVENT_NAME_ATTRIBUTE, VERSION as SDK_VERSION } from '@namzu/sdk';
12
13
  import { acpCommand } from './commands/acp.js';
@@ -45,6 +46,7 @@ export async function runCli(opts) {
45
46
  'json',
46
47
  'yaml',
47
48
  ]))
49
+ .option('--output-schema <path>', 'Constrain TUI answers to a JSON Schema file using native structured output')
48
50
  .option('-q, --quiet', 'Suppress non-essential output; also raises the log floor to warn')
49
51
  .addOption(new Option('-v, --verbose', 'Emit debug-level log records to stderr').conflicts('quiet'))
50
52
  .addOption(new Option('--log-format <format>', 'Log record format for run/drain/TUI-flush output: pretty (default) or json. namzu run-stream always writes json, regardless of this flag.').choices(['pretty', 'json']))
@@ -54,6 +56,14 @@ export async function runCli(opts) {
54
56
  .option('--profile <name>', 'Apply a named profile from the config files. A name no file declares is refused, not ignored.')
55
57
  // Required by Commander 14 so subcommands (doctor) can opt into
56
58
  // passThroughOptions for unparsed argument forwarding.
59
+ .hook('preAction', (command, action) => {
60
+ if (command.opts().outputSchema && !['namzu', 'resume'].includes(action.name())) {
61
+ command.error('--output-schema applies to the interactive TUI, not this subcommand.', {
62
+ exitCode: EX_USAGE,
63
+ code: 'commander.invalidArgument',
64
+ });
65
+ }
66
+ })
57
67
  .enablePositionalOptions(true)
58
68
  .exitOverride()
59
69
  .showHelpAfterError(false);
@@ -205,6 +215,9 @@ export async function runCli(opts) {
205
215
  const launchInteractiveTui = async (initialConversationId) => {
206
216
  if (process.stdout.isTTY) {
207
217
  const launchOpts = program.opts();
218
+ const structuredOutput = launchOpts.outputSchema
219
+ ? loadOutputSchema(resolve(process.cwd(), launchOpts.outputSchema))
220
+ : undefined;
208
221
  const skipPermissions = Boolean(launchOpts.dangerouslySkipPermissions || launchOpts.yolo);
209
222
  // The same three lines `run` and `run-stream` use. The TUI compiled
210
223
  // nothing at all, so a `permissions` table in a config file did nothing
@@ -222,6 +235,7 @@ export async function runCli(opts) {
222
235
  ].map((dir) => resolve(cwd, dir));
223
236
  return {
224
237
  cwd,
238
+ ...(structuredOutput ? { structuredOutput } : {}),
225
239
  version: CLI_VERSION,
226
240
  configDebug: resolvedCtx.configDebug,
227
241
  skipPermissions,
@@ -234,6 +248,7 @@ export async function runCli(opts) {
234
248
  ...(resolvedCtx.config.web ? { web: resolvedCtx.config.web } : {}),
235
249
  ...(resolvedCtx.config.hooks ? { hooks: resolvedCtx.config.hooks } : {}),
236
250
  ...(resolvedCtx.config.compaction ? { compaction: resolvedCtx.config.compaction } : {}),
251
+ ...(resolvedCtx.config.memory ? { memory: resolvedCtx.config.memory } : {}),
237
252
  ...(resolvedCtx.config.sandbox ? { sandbox: resolvedCtx.config.sandbox } : {}),
238
253
  ...(resolvedCtx.config.tui ? { tui: resolvedCtx.config.tui } : {}),
239
254
  };
@@ -241,8 +256,15 @@ export async function runCli(opts) {
241
256
  const tuiCtx = buildTuiContext(commandCtx, process.cwd());
242
257
  bindTrustedProjectContext(tuiCtx, (cwd) => buildTuiContext(resolveTrustedProjectContext(commandCtx, cwd), cwd));
243
258
  const { launchTui } = await import('./tui/index.js');
244
- if (opts.resumeCommand)
245
- await launchTui(tuiCtx, { resumeCommand: opts.resumeCommand });
259
+ const resumeCommand = launchOpts.outputSchema
260
+ ? [
261
+ ...(opts.resumeCommand ?? ['namzu']),
262
+ '--output-schema',
263
+ resolve(process.cwd(), launchOpts.outputSchema),
264
+ ]
265
+ : opts.resumeCommand;
266
+ if (resumeCommand)
267
+ await launchTui(tuiCtx, { resumeCommand });
246
268
  else
247
269
  await launchTui(tuiCtx);
248
270
  const code = await Promise.resolve(0);