zidane 7.0.31 → 7.0.32
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/README.md +2 -2
- package/dist/{acp-m3TLCY_C.js → acp-bBDF-dhy.js} +2 -2
- package/dist/{acp-m3TLCY_C.js.map → acp-bBDF-dhy.js.map} +1 -1
- package/dist/acp-cli.js +3 -3
- package/dist/acp.d.ts +1 -1
- package/dist/acp.js +1 -1
- package/dist/{agent-9gf8ZlBR.js → agent-BCG9JcZl.js} +147 -17
- package/dist/agent-BCG9JcZl.js.map +1 -0
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +1 -1
- package/dist/{approvals-DaCEPCTV.js → approvals-DkwGBMZ9.js} +27 -12
- package/dist/approvals-DkwGBMZ9.js.map +1 -0
- package/dist/{auth-CJogE9q7.js → auth-D0BHBb02.js} +2 -2
- package/dist/{auth-CJogE9q7.js.map → auth-D0BHBb02.js.map} +1 -1
- package/dist/chat/pure.d.ts +3 -3
- package/dist/chat/pure.js +1 -1
- package/dist/chat.d.ts +6 -6
- package/dist/chat.js +5 -5
- package/dist/contexts/daytona.d.ts +1 -1
- package/dist/contexts/e2b.d.ts +1 -1
- package/dist/daemon-cli.js +1 -1
- package/dist/eval.d.ts +1 -1
- package/dist/extensions.d.ts +1 -1
- package/dist/extensions.js +1 -1
- package/dist/headless.d.ts +1 -1
- package/dist/headless.js +1 -1
- package/dist/{index-hd4zLhp8.d.ts → index-CCB05-JZ.d.ts} +53 -9
- package/dist/index-CCB05-JZ.d.ts.map +1 -0
- package/dist/{index-JkEO3MBV.d.ts → index-Ogi2CeHf.d.ts} +25 -6
- package/dist/index-Ogi2CeHf.d.ts.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{ipc-BtN5SIc0.js → ipc-C10lnS-a.js} +2 -2
- package/dist/{ipc-BtN5SIc0.js.map → ipc-C10lnS-a.js.map} +1 -1
- package/dist/ipc.d.ts +5 -5
- package/dist/ipc.js +3 -3
- package/dist/mcp.d.ts +1 -1
- package/dist/output/stream-json.d.ts +1 -1
- package/dist/output/terminal.d.ts +1 -1
- package/dist/plugins.d.ts +1 -1
- package/dist/presets.d.ts +1 -1
- package/dist/presets.js +1 -1
- package/dist/providers/anthropic.d.ts +1 -1
- package/dist/providers/arcee.d.ts +1 -1
- package/dist/providers/baseten.d.ts +1 -1
- package/dist/providers/cerebras.d.ts +1 -1
- package/dist/providers/local.d.ts +1 -1
- package/dist/providers/openai-compat.d.ts +1 -1
- package/dist/providers/openai.d.ts +1 -1
- package/dist/providers/openrouter.d.ts +1 -1
- package/dist/providers/xai.d.ts +1 -1
- package/dist/providers.d.ts +1 -1
- package/dist/restate.d.ts +1 -1
- package/dist/restate.js +1 -1
- package/dist/{server-ktOMu5gk.js → server--mwNA7oC.js} +6 -6
- package/dist/{server-ktOMu5gk.js.map → server--mwNA7oC.js.map} +1 -1
- package/dist/session/sqlite.d.ts +1 -1
- package/dist/session.d.ts +1 -1
- package/dist/skills.d.ts +1 -1
- package/dist/{tool-formatters-C4QIFCNa.d.ts → tool-formatters-Bu4repDJ.d.ts} +2 -2
- package/dist/{tool-formatters-C4QIFCNa.d.ts.map → tool-formatters-Bu4repDJ.d.ts.map} +1 -1
- package/dist/tools/fetch-url.d.ts +1 -1
- package/dist/tools/web-search.d.ts +1 -1
- package/dist/tools.d.ts +1 -1
- package/dist/tools.js +1 -1
- package/dist/{transcript-anchors-Bbn1HX5D.d.ts → transcript-anchors-CJCxyVE-.d.ts} +2 -2
- package/dist/{transcript-anchors-Bbn1HX5D.d.ts.map → transcript-anchors-CJCxyVE-.d.ts.map} +1 -1
- package/dist/tui.d.ts +3 -3
- package/dist/tui.js +43 -11
- package/dist/tui.js.map +1 -1
- package/dist/{turn-operations-BgqpLlOG.js → turn-operations-HX3g3XIc.js} +11 -1
- package/dist/{turn-operations-BgqpLlOG.js.map → turn-operations-HX3g3XIc.js.map} +1 -1
- package/dist/{turn-operations-BhHCpCkP.d.ts → turn-operations-qcv9UFcL.d.ts} +3 -3
- package/dist/{turn-operations-BhHCpCkP.d.ts.map → turn-operations-qcv9UFcL.d.ts.map} +1 -1
- package/dist/types-CWgENVLY.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/docs/ARCHITECTURE.md +11 -2
- package/docs/CHAT.md +1 -0
- package/docs/INTERACTIONS.md +14 -2
- package/docs/SKILL.md +3 -1
- package/package.json +1 -1
- package/dist/agent-9gf8ZlBR.js.map +0 -1
- package/dist/approvals-DaCEPCTV.js.map +0 -1
- package/dist/index-JkEO3MBV.d.ts.map +0 -1
- package/dist/index-hd4zLhp8.d.ts.map +0 -1
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $_ as SessionData, B_ as ToolStateView, Bg as PromptVideoPart, Br as InteractionToolOptions, C as SuccessfulMutationOutcome, C_ as ToolContext, D_ as ReadStateEntry, Dg as McpServerConfig, Dm as TurnResult, Em as ToolSpec, Fg as PromptAudioPart, G_ as SkillConfig, Gg as RetryConfig, Hg as RepeatGuardToolMatcher, I_ as StagedToolState, Ig as PromptDocumentPart, Jg as SessionEndStatus, Ji as AgentHookMap, Kg as RunHookMap, L_ as ToolStateController, Lg as PromptImagePart, Mg as OAuthRefreshHookContext, Ng as ProgressNudgeKind, O_ as ReadStateMap, Og as McpToolHookContext, Pg as ProgressNudgeMessage, Q_ as Session, Qg as SpawnHookContext, R_ as ToolStateOp, Rg as PromptPart, Rm as OpenRouterParams, S as MutationValidationResult, S_ as toolResultToText, Sg as DEFAULT_AGENT_CLOCK, Sm as StreamOptions, T_ as ToolMap, Tm as ToolResult, Ug as ResolveContentRef, Vg as RepeatGuardConfig, Wg as ResolveContentRefBlock, X_ as CreateSessionOptions, Xg as SessionMessage, Xi as AgentOptions, Y_ as SkillsConfig, Yg as SessionHookContext, Yi as AgentHooks, Zg as SessionTurn, Zi as AgentToolState, _ as statsByModel, __ as ToolResultVideoContent, _g as ChildRunStats, a_ as ThinkingLevel, b as MutationValidationHooksOptions, b_ as toolOutputBudgetByteLength, bh as CerebrasParams, c_ as ToolOutcome, ch as OpenAIParams, d_ as ToolResultDocumentContent, dg as AgentClock, f_ as ToolResultDocumentRefContent, fg as AgentRunOptions, fv as RemoteStoreOptions, g_ as ToolResultTextContent, gc as SpawnToolState, h as flattenTurns, h_ as ToolResultMetadata, hc as SpawnToolOptions, kh as AnthropicParams, l_ as ToolResultAudioContent, m_ as ToolResultImageRefContent, nv as SessionStore, p as ModelUsage, p_ as ToolResultImageContent, pg as AgentStats, q_ as SkillResource, qg as SessionContentBlock, qi as Agent, ry as McpConnection, s_ as ToolHookContext, t as Preset, t_ as StreamHookContext, tv as SessionRun, u_ as ToolResultContent, uc as ChildAgent, ug as AgentBehavior, v as MutationValidationBatch, v_ as TurnFinishReason, vm as Provider, vr as ValidationResult, w_ as ToolDef, wm as ToolCall, x as MutationValidationMutation, x_ as toolOutputByteLength, xm as StreamCallbacks, y as MutationValidationFailure, y_ as TurnUsage, ym as ProviderCapabilities, z_ as ToolStateStore, zg as PromptTextPart } from "./index-
|
|
1
|
+
import { $_ as SessionData, B_ as ToolStateView, Bg as PromptVideoPart, Br as InteractionToolOptions, C as SuccessfulMutationOutcome, C_ as ToolContext, D_ as ReadStateEntry, Dg as McpServerConfig, Dm as TurnResult, Em as ToolSpec, Fg as PromptAudioPart, G_ as SkillConfig, Gg as RetryConfig, Hg as RepeatGuardToolMatcher, I_ as StagedToolState, Ig as PromptDocumentPart, Jg as SessionEndStatus, Ji as AgentHookMap, Kg as RunHookMap, L_ as ToolStateController, Lg as PromptImagePart, Mg as OAuthRefreshHookContext, Ng as ProgressNudgeKind, O_ as ReadStateMap, Og as McpToolHookContext, Pg as ProgressNudgeMessage, Q_ as Session, Qg as SpawnHookContext, R_ as ToolStateOp, Rg as PromptPart, Rm as OpenRouterParams, S as MutationValidationResult, S_ as toolResultToText, Sg as DEFAULT_AGENT_CLOCK, Sm as StreamOptions, T_ as ToolMap, Tm as ToolResult, Ug as ResolveContentRef, Vg as RepeatGuardConfig, Wg as ResolveContentRefBlock, X_ as CreateSessionOptions, Xg as SessionMessage, Xi as AgentOptions, Y_ as SkillsConfig, Yg as SessionHookContext, Yi as AgentHooks, Zg as SessionTurn, Zi as AgentToolState, _ as statsByModel, __ as ToolResultVideoContent, _g as ChildRunStats, a_ as ThinkingLevel, b as MutationValidationHooksOptions, b_ as toolOutputBudgetByteLength, bh as CerebrasParams, c_ as ToolOutcome, ch as OpenAIParams, d_ as ToolResultDocumentContent, dg as AgentClock, f_ as ToolResultDocumentRefContent, fg as AgentRunOptions, fv as RemoteStoreOptions, g_ as ToolResultTextContent, gc as SpawnToolState, h as flattenTurns, h_ as ToolResultMetadata, hc as SpawnToolOptions, kh as AnthropicParams, l_ as ToolResultAudioContent, m_ as ToolResultImageRefContent, nv as SessionStore, p as ModelUsage, p_ as ToolResultImageContent, pg as AgentStats, q_ as SkillResource, qg as SessionContentBlock, qi as Agent, ry as McpConnection, s_ as ToolHookContext, t as Preset, t_ as StreamHookContext, tv as SessionRun, u_ as ToolResultContent, uc as ChildAgent, ug as AgentBehavior, v as MutationValidationBatch, v_ as TurnFinishReason, vm as Provider, vr as ValidationResult, w_ as ToolDef, wm as ToolCall, x as MutationValidationMutation, x_ as toolOutputByteLength, xm as StreamCallbacks, y as MutationValidationFailure, y_ as TurnUsage, ym as ProviderCapabilities, z_ as ToolStateStore, zg as PromptTextPart } from "./index-CCB05-JZ.js";
|
|
2
2
|
import { d as ClassifiedErrorKind, i as AgentContextExceededError, l as CONTEXT_EXCEEDED_MESSAGE_PATTERNS, n as AgentAbortedError, o as AgentProviderError, p as matchesContextExceeded, r as AgentBudgetExceededError, s as AgentToolNotAllowedError, u as ClassifiedError } from "./timeout-DEaqslLO.js";
|
|
3
3
|
import { _ as TaskHandle, a as ContextType, c as ExecutionContext, g as TaskExitInfo, h as TaskEntry, l as ExecutionHandle, n as ContextCapabilities, o as DetachedTasksCapability, p as SpawnConfig, r as ContextHardening, s as ExecResult, t as BackgroundTaskStatus, v as TaskStallInfo } from "./types-U-rIVUDw.js";
|
|
4
4
|
import { t as SandboxProvider } from "./sandbox-CDl9tfTo.js";
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -439,16 +439,25 @@ installLazyDisclosureGate // tool:gate refuses lazy ∉ u
|
|
|
439
439
|
|
|
440
440
|
per turn — buildFormattedTools() emits in two phases:
|
|
441
441
|
1. registry-order walk filtered by initialUnlocked ← byte-stable cached prefix
|
|
442
|
-
2. dynamicUnlockOrder, in unlock order ← append-only tail
|
|
442
|
+
2. dynamicUnlockOrder, in unlock order ← append-only tail (omitted in dispatch mode)
|
|
443
443
|
|
|
444
444
|
tool_search({ names | query | server, limit? }): unlocks matches, returns inlined input_schema JSON
|
|
445
445
|
|
|
446
|
+
dispatch mode (toolSearch.mode: 'dispatch'):
|
|
447
|
+
tools.call_tool = createCallToolTool() ← eager, fixed { name, arguments } envelope
|
|
448
|
+
model: call_tool({ name: 'mcp_srv_a', arguments })
|
|
449
|
+
loop (after wire→canonical rewrite): unwrapDispatchCalls()
|
|
450
|
+
→ ToolCall { id, name: 'mcp_srv_a', input: arguments } for gate / validation / hooks / events
|
|
451
|
+
persisted assistant turn keeps the call_tool block ← wire-valid history
|
|
452
|
+
store.eventsFromTurns: unwrapCallTool() on replay ← reload matches the live transcript
|
|
453
|
+
|
|
446
454
|
run end: uninstallLazyDisclosureGate; per-run state GC-eligible on next run()
|
|
447
455
|
```
|
|
448
456
|
|
|
449
457
|
- **Aliasing.** `LazyToolEntry.name` is the wire name; `.canonicalName` keys `unlocked` and dispatches `ctx.tools[name]`. `session.turns` / `ToolHookContext.name` stay canonical throughout.
|
|
450
458
|
- **Hard gate vs. provider validation.** Anthropic/OpenAI already refuse `tool_use` blocks for tools absent from the request; the gate exists for lenient/custom/mock providers and makes the lazy boundary observable via `tool:gate`.
|
|
451
|
-
- **Cache
|
|
459
|
+
- **Cache cost of unlock mode.** The eager + `tool_search` prefix of the wire array never moves, but providers hash the request as `tools → system → messages`: a grown tail still re-bills the system prompt and every message on that turn. That is one full prompt-cache rewrite per discovery wave.
|
|
460
|
+
- **Dispatch mode.** `toolSearch.mode: 'dispatch'` keeps the tools array byte-stable: surfaced tools are invoked through `call_tool` (`src/tools/call-tool.ts`). The unwrap happens once, in `runTurn` right after the alias rewrite, so the whole downstream pipeline (lazy gate, MCP gates, `validateToolArgs` against the INNER schema, `tool:before/after`, tracing, run counts, both dispatch paths) is unchanged and sees the inner tool. Only lazy catalog tools are unwrapped: an envelope around an eager tool stays a `call_tool` call and its `execute` says to call the tool directly (history scanners keyed on `block.name`, read-state seeding, task tracking, keep seeing eager tools under their own names). A malformed envelope is left as `call_tool` so its own schema validation reports the shape error. A host-defined `call_tool` disables dispatch mode (the run falls back to unlock). The chat hosts expose this as `Settings.stableToolList`.
|
|
452
461
|
- **Host-defined `tool_search`.** A host tool named `tool_search` shadows auto-injection; it must call `createToolSearchTool({ catalog, unlocked, addUnlock? })` to drive unlocks, or use `toolSearch.tool: false` for a fully custom flow.
|
|
453
462
|
|
|
454
463
|
## Hook Firing Order
|
package/docs/CHAT.md
CHANGED
|
@@ -247,6 +247,7 @@ Both join `[...doctrine, userInstructions]` as the **static** half and `[envSect
|
|
|
247
247
|
| `showAllProjects` | `boolean` | `false` | Sessions list scope. |
|
|
248
248
|
| `resumeLastSession` | `boolean` | `true` | |
|
|
249
249
|
| `persistToolResults` | `boolean` | `true` | See **Tool-result persistence**. |
|
|
250
|
+
| `stableToolList` | `boolean` | `false` | Lazy MCP tools surfaced by `tool_search` are invoked through `call_tool` instead of growing the model's tool list (`behavior.toolSearch.mode: 'dispatch'`), so discovery never rewrites the prompt cache. Transcript shows the inner tool as with a direct call. |
|
|
250
251
|
| `autoCompact` | `boolean` | `true` | See **Auto-compaction**. |
|
|
251
252
|
| `autoCompactThreshold` | `number` | `0.8` | Cycles 0.6/0.7/0.8/0.9 in the settings modal. |
|
|
252
253
|
| `resumeOnMaxTokens`, `maxOutputTokens`, `maxTurns`, `retryMaxAttempts`, `maxCostUsd`, `maxTotalTokens`, `maxWallMinutes` | mixed | off/`0` | Runaway ceilings; all off by default (model-driven, uncapped). |
|
package/docs/INTERACTIONS.md
CHANGED
|
@@ -87,7 +87,10 @@ user's own selection rather than resetting it.
|
|
|
87
87
|
Response shape:
|
|
88
88
|
|
|
89
89
|
```json
|
|
90
|
-
{
|
|
90
|
+
{
|
|
91
|
+
"answers": { "name": "Jane", "notes": "...", "fw": "react", "go": true },
|
|
92
|
+
"instructions": "Also keep the old endpoint alive until the migration lands."
|
|
93
|
+
}
|
|
91
94
|
```
|
|
92
95
|
|
|
93
96
|
Missing keys = question was skipped (only possible when `required:
|
|
@@ -95,12 +98,21 @@ false`). Empty-string answers and empty multi-select picks are dropped
|
|
|
95
98
|
at serialization; a multi-select (`type: 'select'`, `multi: true`)
|
|
96
99
|
answers as an array of choice ids.
|
|
97
100
|
|
|
101
|
+
`instructions` is free text the user attached to the whole form. Every
|
|
102
|
+
surface offers it unconditionally (the TUI wizard ends on an "additional
|
|
103
|
+
instructions" step, the GUI modal has a permanent textarea under the
|
|
104
|
+
questions), so the user can always refine or override the questions
|
|
105
|
+
instead of being boxed into the model's choices. Omitted when left empty.
|
|
106
|
+
The tool description tells the model it is authoritative.
|
|
107
|
+
|
|
98
108
|
## Keyboard
|
|
99
109
|
|
|
100
110
|
In the question wizard (multi-question batches):
|
|
101
111
|
|
|
102
112
|
- `↑/↓` (or `j/k`) — navigate options
|
|
103
|
-
- `↵` — submit the active question / pick the focused option
|
|
113
|
+
- `↵` — submit the active question / pick the focused option. The last
|
|
114
|
+
step is always "additional instructions" (optional textarea): `↵` on an
|
|
115
|
+
empty box sends the answers as they are.
|
|
104
116
|
- `space` — toggle the focused option (multi-selects only; `↵` submits
|
|
105
117
|
the whole selection, at least one pick required unless `required: false`)
|
|
106
118
|
- `shift+↹` — back one question (preserves your answers, pre-fills the
|
package/docs/SKILL.md
CHANGED
|
@@ -688,7 +688,9 @@ createAgent({
|
|
|
688
688
|
|
|
689
689
|
The system prompt gains a `<searchable_tools>` block. `tool_search({ query, names, server, limit })` returns matching schemas and unlocks them for the rest of the run. A `tool:gate` middleware refuses un-surfaced lazy tools. Catalog + search results show the **wire** name; the unlock set keys on canonical so dispatch / `session.turns` stay alias-stable.
|
|
690
690
|
|
|
691
|
-
`behavior.toolSearch` knobs (no-op in eager mode): `tool: false` opts out of auto-injection; `limit: 20` caps default results. Per-server `disclosure: 'eager' | 'lazy'` overrides the agent default; run-level overrides agent-level.
|
|
691
|
+
`behavior.toolSearch` knobs (no-op in eager mode): `tool: false` opts out of auto-injection; `limit: 20` caps default results; `mode: 'unlock' | 'dispatch'` picks how a surfaced tool becomes callable. Per-server `disclosure: 'eager' | 'lazy'` overrides the agent default; run-level overrides agent-level.
|
|
692
|
+
|
|
693
|
+
Cost: in `'unlock'` mode (default) every discovery wave grows the tools array, and since providers hash `tools → system → messages` that is a **full** prompt-cache rewrite each time. `'dispatch'` mode keeps the tools array byte-stable: a fixed `call_tool { name, arguments }` native tool is added, surfaced tools are invoked through it, and the loop unwraps the envelope before dispatch so gating, schema validation (against the inner tool), hooks and transcript events see the inner tool exactly as a direct call. Chat hosts expose it as `Settings.stableToolList`.
|
|
692
694
|
|
|
693
695
|
## Skills
|
|
694
696
|
|