zidane 7.0.31 → 7.1.1

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 (125) hide show
  1. package/README.md +21 -2
  2. package/dist/{acp-m3TLCY_C.js → acp-B5UfEhMd.js} +4 -4
  3. package/dist/{acp-m3TLCY_C.js.map → acp-B5UfEhMd.js.map} +1 -1
  4. package/dist/acp-cli.js +6 -6
  5. package/dist/acp.d.ts +2 -2
  6. package/dist/acp.js +1 -1
  7. package/dist/{agent-9gf8ZlBR.js → agent-_xxElOgH.js} +307 -33
  8. package/dist/agent-_xxElOgH.js.map +1 -0
  9. package/dist/agent.d.ts +1 -1
  10. package/dist/agent.js +1 -1
  11. package/dist/{anthropic-B4UmPm4H.js → anthropic-DPPs3wjJ.js} +111 -7
  12. package/dist/anthropic-DPPs3wjJ.js.map +1 -0
  13. package/dist/{approvals-DaCEPCTV.js → approvals-u2T19Dc-.js} +297 -95
  14. package/dist/approvals-u2T19Dc-.js.map +1 -0
  15. package/dist/{auth-CJogE9q7.js → auth-HRKkOErn.js} +3 -3
  16. package/dist/{auth-CJogE9q7.js.map → auth-HRKkOErn.js.map} +1 -1
  17. package/dist/chat/pure.d.ts +3 -3
  18. package/dist/chat/pure.js +1 -1
  19. package/dist/chat.d.ts +6 -6
  20. package/dist/chat.js +8 -8
  21. package/dist/contexts/daytona.d.ts +3 -3
  22. package/dist/contexts/docker.d.ts +1 -1
  23. package/dist/contexts/e2b.d.ts +2 -2
  24. package/dist/contexts/sandbox.d.ts +1 -1
  25. package/dist/{contexts-BSFQVclW.js → contexts-CRE9pw07.js} +544 -17
  26. package/dist/contexts-CRE9pw07.js.map +1 -0
  27. package/dist/contexts.d.ts +4 -4
  28. package/dist/contexts.js +2 -2
  29. package/dist/daemon-cli.js +1 -1
  30. package/dist/eval.d.ts +1 -1
  31. package/dist/eval.js +3 -3
  32. package/dist/extensions.d.ts +1 -1
  33. package/dist/extensions.js +1 -1
  34. package/dist/headless.d.ts +1 -1
  35. package/dist/headless.js +3 -3
  36. package/dist/{index-B6FkK6ZN.d.ts → index-C37_ppWv.d.ts} +2 -2
  37. package/dist/index-C37_ppWv.d.ts.map +1 -0
  38. package/dist/{index-JkEO3MBV.d.ts → index-D3TTaaQ5.d.ts} +39 -7
  39. package/dist/index-D3TTaaQ5.d.ts.map +1 -0
  40. package/dist/{index-hd4zLhp8.d.ts → index-DZhrTn-v.d.ts} +307 -16
  41. package/dist/index-DZhrTn-v.d.ts.map +1 -0
  42. package/dist/index.d.ts +5 -5
  43. package/dist/index.js +8 -8
  44. package/dist/{ipc-BtN5SIc0.js → ipc-DwauKEE-.js} +3 -3
  45. package/dist/{ipc-BtN5SIc0.js.map → ipc-DwauKEE-.js.map} +1 -1
  46. package/dist/ipc.d.ts +5 -5
  47. package/dist/ipc.js +3 -3
  48. package/dist/{types-U-rIVUDw.d.ts → isolation-Kfoof0MM.d.ts} +93 -2
  49. package/dist/isolation-Kfoof0MM.d.ts.map +1 -0
  50. package/dist/mcp.d.ts +1 -1
  51. package/dist/output/stream-json.d.ts +1 -1
  52. package/dist/output/terminal.d.ts +1 -1
  53. package/dist/{plugins-B531Tz5b.js → plugins-gbI7SBA6.js} +3 -3
  54. package/dist/{plugins-B531Tz5b.js.map → plugins-gbI7SBA6.js.map} +1 -1
  55. package/dist/plugins.d.ts +1 -1
  56. package/dist/plugins.js +1 -1
  57. package/dist/presets.d.ts +1 -1
  58. package/dist/presets.js +1 -1
  59. package/dist/providers/anthropic.d.ts +2 -2
  60. package/dist/providers/anthropic.js +2 -2
  61. package/dist/providers/arcee.d.ts +1 -1
  62. package/dist/providers/baseten.d.ts +1 -1
  63. package/dist/providers/cerebras.d.ts +1 -1
  64. package/dist/providers/local.d.ts +1 -1
  65. package/dist/providers/openai-compat.d.ts +1 -1
  66. package/dist/providers/openai.d.ts +1 -1
  67. package/dist/providers/openrouter.d.ts +1 -1
  68. package/dist/providers/xai.d.ts +1 -1
  69. package/dist/providers.d.ts +2 -2
  70. package/dist/providers.js +1 -1
  71. package/dist/restate.d.ts +2 -2
  72. package/dist/restate.js +1 -1
  73. package/dist/{sandbox-CDl9tfTo.d.ts → sandbox-BH0WQkXn.d.ts} +2 -2
  74. package/dist/{sandbox-CDl9tfTo.d.ts.map → sandbox-BH0WQkXn.d.ts.map} +1 -1
  75. package/dist/{server-ktOMu5gk.js → server-DvPnPSZb.js} +8 -8
  76. package/dist/{server-ktOMu5gk.js.map → server-DvPnPSZb.js.map} +1 -1
  77. package/dist/session/sqlite.d.ts +1 -1
  78. package/dist/session/sqlite.d.ts.map +1 -1
  79. package/dist/session/sqlite.js +7 -0
  80. package/dist/session/sqlite.js.map +1 -1
  81. package/dist/{session-CVy-2mAy.js → session-BqRP1hS7.js} +33 -3
  82. package/dist/session-BqRP1hS7.js.map +1 -0
  83. package/dist/session.d.ts +1 -1
  84. package/dist/session.js +1 -1
  85. package/dist/{skills-PJyiSRCp.js → skills-BC3dodWp.js} +2 -2
  86. package/dist/{skills-PJyiSRCp.js.map → skills-BC3dodWp.js.map} +1 -1
  87. package/dist/skills.d.ts +1 -1
  88. package/dist/skills.js +1 -1
  89. package/dist/{src-CjkY6fBj.js → src-CkNQKFKr.js} +3 -3
  90. package/dist/{src-CjkY6fBj.js.map → src-CkNQKFKr.js.map} +1 -1
  91. package/dist/{tool-formatters-C4QIFCNa.d.ts → tool-formatters-C5s88MUd.d.ts} +2 -2
  92. package/dist/{tool-formatters-C4QIFCNa.d.ts.map → tool-formatters-C5s88MUd.d.ts.map} +1 -1
  93. package/dist/tools/fetch-url.d.ts +1 -1
  94. package/dist/tools/web-search.d.ts +1 -1
  95. package/dist/tools.d.ts +1 -1
  96. package/dist/tools.js +1 -1
  97. package/dist/{transcript-anchors-Bbn1HX5D.d.ts → transcript-anchors-DxofXw_y.d.ts} +3 -3
  98. package/dist/transcript-anchors-DxofXw_y.d.ts.map +1 -0
  99. package/dist/tui.d.ts +21 -28
  100. package/dist/tui.d.ts.map +1 -1
  101. package/dist/tui.js +200 -74
  102. package/dist/tui.js.map +1 -1
  103. package/dist/{turn-operations-BgqpLlOG.js → turn-operations-6JDu2ewy.js} +24 -2
  104. package/dist/{turn-operations-BgqpLlOG.js.map → turn-operations-6JDu2ewy.js.map} +1 -1
  105. package/dist/{turn-operations-BhHCpCkP.d.ts → turn-operations-BaQnxzhr.d.ts} +14 -4
  106. package/dist/{turn-operations-BhHCpCkP.d.ts.map → turn-operations-BaQnxzhr.d.ts.map} +1 -1
  107. package/dist/types-CWgENVLY.js.map +1 -1
  108. package/dist/types.d.ts +3 -3
  109. package/docs/ARCHITECTURE.md +13 -3
  110. package/docs/CHAT.md +9 -0
  111. package/docs/EXECUTION_CONTEXT.md +64 -3
  112. package/docs/INTERACTIONS.md +14 -2
  113. package/docs/SKILL.md +31 -1
  114. package/docs/TUI.md +6 -5
  115. package/package.json +1 -1
  116. package/dist/agent-9gf8ZlBR.js.map +0 -1
  117. package/dist/anthropic-B4UmPm4H.js.map +0 -1
  118. package/dist/approvals-DaCEPCTV.js.map +0 -1
  119. package/dist/contexts-BSFQVclW.js.map +0 -1
  120. package/dist/index-B6FkK6ZN.d.ts.map +0 -1
  121. package/dist/index-JkEO3MBV.d.ts.map +0 -1
  122. package/dist/index-hd4zLhp8.d.ts.map +0 -1
  123. package/dist/session-CVy-2mAy.js.map +0 -1
  124. package/dist/transcript-anchors-Bbn1HX5D.d.ts.map +0 -1
  125. package/dist/types-U-rIVUDw.d.ts.map +0 -1
package/README.md CHANGED
@@ -82,7 +82,7 @@ createAgent({
82
82
  mediaKeepTurns: undefined, // age old image/document base64 off the wire; chat profiles use 8
83
83
  autoCompact: false, // loop-native LLM summary at N% of the window; chat profiles enable it
84
84
  toolDisclosure: 'eager', // 'eager' | 'lazy' (hide MCP schemas behind tool_search)
85
- toolSearch: { tool: true, limit: 20 },
85
+ toolSearch: { tool: true, limit: 20, mode: 'unlock' }, // 'dispatch' = stable tool list via call_tool
86
86
  },
87
87
  execution: createProcessContext(),
88
88
  mcpServers: [],
@@ -669,7 +669,7 @@ const agent = createAgent({
669
669
 
670
670
  System prompt gains `<searchable_tools>` with `name + description` per lazy tool. `tool_search` accepts `query` (substring), `names`, `server`, `limit` — matches unlock for the rest of the run. A `tool:gate` middleware refuses dispatch on un-surfaced lazy tools (covers custom/mock providers; production providers also refuse server-side). Catalog + search results show the **wire** name; the unlock set keys on canonical so dispatch and `session.turns` stay alias-stable.
671
671
 
672
- Cost: one cache miss per discovery wave (the tool list grows); subsequent turns hit cache. Opt out via `behavior.toolSearch.tool: false` (catalog still emits, call-to-action drops). A pre-existing host tool named `tool_search` shadows the auto-injection.
672
+ Cost in the default `toolSearch.mode: 'unlock'`: one **full** prompt-cache rewrite per discovery wave. Providers hash `tools → system → messages`, so growing the tool list (even at the tail) re-bills the system prompt and every message. `toolSearch.mode: 'dispatch'` removes that: surfaced tools are never added to the tool list. A fixed native `call_tool { name, arguments }` is added to the eager set instead, `tool_search` still returns the schema into the transcript, and the loop unwraps the envelope before dispatch, so gating, argument validation against the inner tool's schema, hooks, telemetry and transcript events all see the inner tool exactly as a direct call (the persisted assistant turn keeps the wire-valid envelope). Only lazy catalog tools ride the envelope; eager tools are always called directly. In the chat hosts this is `Settings.stableToolList`. Opt out of discovery via `behavior.toolSearch.tool: false` (catalog still emits, call-to-action drops). A pre-existing host tool named `tool_search` shadows the auto-injection; a pre-existing `call_tool` disables dispatch mode.
673
673
 
674
674
  ## Skills
675
675
 
@@ -739,6 +739,25 @@ createDockerContext({ image: 'node:22', cwd: '/workspace', limits: { memory: 512
739
739
  createSandboxContext(myProvider) // implement SandboxProvider
740
740
  ```
741
741
 
742
+ ### OS sandbox for the process context
743
+
744
+ The in-process context can wrap the model's shell commands in the OS sandbox
745
+ (macOS Seatbelt via `sandbox-exec`, Linux bubblewrap) — the same boundary
746
+ Claude Code and Codex use. Writes are confined to `cwd`, temp dirs, a
747
+ worktree's git dir and any extra roots; `~/.ssh`, `~/.aws`, credential files
748
+ are unreadable; network is allow-all or deny-all. `write_file` / `edit` honor
749
+ the same roots in-process. Fails closed when the backend is missing.
750
+
751
+ ```ts
752
+ import { createProcessContext, resolveWritableRoots } from 'zidane'
753
+
754
+ createProcessContext({ cwd, isolation: { writableRoots: resolveWritableRoots(cwd), network: 'allow' } })
755
+ ```
756
+
757
+ In the TUI / GUI: Settings → Agent → **Sandbox shell commands** (+ **Sandbox
758
+ network**, **Sandbox writable paths**). See `docs/EXECUTION_CONTEXT.md` for
759
+ scope and limits.
760
+
742
761
  ### E2B
743
762
 
744
763
  A ready-made `SandboxProvider` backed by [E2B](https://e2b.dev) ships behind its
@@ -1,9 +1,9 @@
1
1
  import { P as defaultPromptMessage } from "./openai-compat-Dy56weK8.js";
2
2
  import { u as toolResultToText } from "./types-CWgENVLY.js";
3
- import { cr as resolveReadStateMap, ir as hashContent, sr as readStateKey, t as createAgent, xt as basic_default } from "./agent-9gf8ZlBR.js";
4
- import { r as createProcessContext } from "./contexts-BSFQVclW.js";
3
+ import { Ct as basic_default, lr as readStateKey, or as hashContent, t as createAgent, ur as resolveReadStateMap } from "./agent-_xxElOgH.js";
4
+ import { r as createProcessContext } from "./contexts-CRE9pw07.js";
5
5
  import { u as errorMessage } from "./errors-DKiMrOKq.js";
6
- import { o as loadSession, t as createSession } from "./session-CVy-2mAy.js";
6
+ import { o as loadSession, t as createSession } from "./session-BqRP1hS7.js";
7
7
  import { t as effectiveInputFromTurn } from "./stats-DAKBEKjc.js";
8
8
  import { a as successResponse, i as errorResponse, r as createJsonRpcConnection } from "./json-rpc-rSWMUh9b.js";
9
9
  import { r as fetchUrl } from "./fetch-url-ma-5_p0p.js";
@@ -1764,4 +1764,4 @@ function runAcpStdioServer(options) {
1764
1764
  //#endregion
1765
1765
  export { wrapToolsForAcpClient as a, sessionBlocksToAcp as c, StartUsageError as d, buildStartLocalOptions as f, startProviderNames as h, withAcpDefaultTools as i, stopReasonFromRun as l, startLocalArgOptions as m, AcpProtocolError as n, acpMcpServersToZidane as o, parseStartArgValues as p, createAcpServer as r, acpPromptToPromptParts as s, runAcpStdioServer as t, toolResultToAcpContent as u };
1766
1766
 
1767
- //# sourceMappingURL=acp-m3TLCY_C.js.map
1767
+ //# sourceMappingURL=acp-B5UfEhMd.js.map