zidane 6.0.1 → 6.1.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/README.md +27 -0
- package/dist/{acp-Irby04Us.js → acp-cfR8T19u.js} +8 -8
- package/dist/{acp-Irby04Us.js.map → acp-cfR8T19u.js.map} +1 -1
- package/dist/acp-cli.js +7 -7
- package/dist/acp-cli.js.map +1 -1
- package/dist/acp.d.ts +1 -1
- package/dist/acp.js +1 -1
- package/dist/{agent-DkSmGkDM.js → agent-DZRA7wip.js} +377 -61
- package/dist/agent-DZRA7wip.js.map +1 -0
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +1 -1
- package/dist/{anthropic-CTHsdFG9.js → anthropic-DNJbRMUK.js} +7 -7
- package/dist/anthropic-DNJbRMUK.js.map +1 -0
- package/dist/atomic-write-B7zr1ddF.js.map +1 -1
- package/dist/{auth-BDSu_0t3.js → auth-B3cB5K6d.js} +7 -7
- package/dist/auth-B3cB5K6d.js.map +1 -0
- package/dist/cache-telemetry-BKAwsNxm.js.map +1 -1
- package/dist/chat/pure.d.ts +4 -4
- package/dist/chat/pure.js +3 -3
- package/dist/chat.d.ts +44 -21
- package/dist/chat.d.ts.map +1 -1
- package/dist/chat.js +7 -7
- package/dist/chat.js.map +1 -1
- package/dist/completion-core-CXYSVhZo.js.map +1 -1
- package/dist/context-breakdown-Dzo25N45.js.map +1 -1
- package/dist/contexts/daytona.d.ts +3 -1
- package/dist/contexts/daytona.d.ts.map +1 -1
- package/dist/contexts/daytona.js +2 -2
- package/dist/contexts/daytona.js.map +1 -1
- package/dist/contexts/docker.d.ts.map +1 -1
- package/dist/contexts/docker.js +2 -2
- package/dist/contexts/docker.js.map +1 -1
- package/dist/contexts/e2b.d.ts +3 -1
- package/dist/contexts/e2b.d.ts.map +1 -1
- package/dist/contexts/e2b.js +1 -1
- package/dist/contexts/e2b.js.map +1 -1
- package/dist/{contexts-Vone3qQQ.js → contexts-BIbcfBFH.js} +2 -2
- package/dist/contexts-BIbcfBFH.js.map +1 -0
- package/dist/contexts.js +1 -1
- package/dist/edit-utils-EGosADZq.js.map +1 -1
- package/dist/eval.d.ts +1 -1
- package/dist/eval.js +4 -3
- package/dist/eval.js.map +1 -1
- package/dist/exec-file-size-PXkr-MGA.js.map +1 -1
- package/dist/extensions.d.ts +1 -1
- package/dist/extensions.js +1 -1
- package/dist/{fetch-url-CWE8X5OD.js → fetch-url-_5WKWpbQ.js} +2 -2
- package/dist/{fetch-url-CWE8X5OD.js.map → fetch-url-_5WKWpbQ.js.map} +1 -1
- package/dist/{format-BNOXpl-1.js → format-BF745pLL.js} +9 -2
- package/dist/format-BF745pLL.js.map +1 -0
- package/dist/generate-data-WL_yGVL6.js.map +1 -1
- package/dist/hash-DJRzmcPI.js.map +1 -1
- package/dist/headless.d.ts +1 -1
- package/dist/headless.js +4 -4
- package/dist/headless.js.map +1 -1
- package/dist/{index-B8UtiZy7.d.ts → index-BGpM2YaU.d.ts} +378 -5
- package/dist/index-BGpM2YaU.d.ts.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +11 -11
- package/dist/index.js.map +1 -1
- package/dist/logger-DBX9uYOw.js.map +1 -1
- package/dist/{login-DOF8pMVM.js → login-DZLG__2f.js} +4 -3
- package/dist/{login-DOF8pMVM.js.map → login-DZLG__2f.js.map} +1 -1
- package/dist/mcp-CcvuVXB9.js.map +1 -1
- package/dist/mcp.d.ts +1 -1
- package/dist/media-sniff-Bn76JxAu.js.map +1 -1
- package/dist/{messages-CwujiS74.js → messages-C5BDOjUG.js} +2 -2
- package/dist/{messages-CwujiS74.js.map → messages-C5BDOjUG.js.map} +1 -1
- package/dist/oauth-8LqbeI_Q.js.map +1 -1
- package/dist/{openai-compat-BvgYGSR1.js → openai-compat-B0kqvZqN.js} +2 -2
- package/dist/openai-compat-B0kqvZqN.js.map +1 -0
- package/dist/output/stream-json.d.ts +1 -1
- package/dist/output/terminal.d.ts +1 -1
- package/dist/output/terminal.js +1 -1
- package/dist/output/terminal.js.map +1 -1
- package/dist/output-cap-kBUHBlnq.js.map +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/anthropic.js +1 -1
- package/dist/providers/arcee.d.ts +1 -1
- package/dist/providers/arcee.js +1 -1
- package/dist/providers/baseten.d.ts +1 -1
- package/dist/providers/baseten.js +2 -2
- package/dist/providers/baseten.js.map +1 -1
- package/dist/providers/cerebras.d.ts +1 -1
- package/dist/providers/cerebras.js +1 -1
- package/dist/providers/local.d.ts +1 -1
- package/dist/providers/local.js +1 -1
- package/dist/providers/openai-compat.d.ts +1 -1
- package/dist/providers/openai-compat.js +1 -1
- package/dist/providers/openai.d.ts +1 -1
- package/dist/providers/openai.js +8 -8
- package/dist/providers/openai.js.map +1 -1
- package/dist/providers/openrouter.d.ts +1 -1
- package/dist/providers/openrouter.js +1 -1
- package/dist/providers/xai.d.ts +1 -1
- package/dist/providers/xai.js +1 -1
- package/dist/{providers-z6LDMAr3.js → providers-BMlrTr6a.js} +3 -3
- package/dist/{providers-z6LDMAr3.js.map → providers-BMlrTr6a.js.map} +1 -1
- package/dist/providers.d.ts +1 -1
- package/dist/providers.js +4 -4
- package/dist/read-state-Dq_TXUX1.js.map +1 -1
- package/dist/{resolve-Cr8JSL_O.js → resolve-CC8Lmwcj.js} +3 -3
- package/dist/{resolve-Cr8JSL_O.js.map → resolve-CC8Lmwcj.js.map} +1 -1
- package/dist/restate.d.ts +1 -1
- package/dist/restate.d.ts.map +1 -1
- package/dist/restate.js.map +1 -1
- package/dist/session/sqlite.d.ts +1 -1
- package/dist/session/sqlite.d.ts.map +1 -1
- package/dist/session/sqlite.js +75 -20
- package/dist/session/sqlite.js.map +1 -1
- package/dist/{session-CsdDIPY8.js → session-CsKzK8-P.js} +3 -3
- package/dist/session-CsKzK8-P.js.map +1 -0
- package/dist/session.d.ts +2 -2
- package/dist/session.js +2 -2
- package/dist/{skills-Bsb0rvWI.js → skills-BjeXSRlQ.js} +2 -2
- package/dist/{skills-Bsb0rvWI.js.map → skills-BjeXSRlQ.js.map} +1 -1
- package/dist/skills.d.ts +1 -1
- package/dist/skills.js +2 -2
- package/dist/stdio-loader-Ce68wUmM.js.map +1 -1
- package/dist/{tool-formatters-DY0TDb1r.d.ts → tool-formatters-CMwjDvkp.d.ts} +2 -2
- package/dist/tool-formatters-CMwjDvkp.d.ts.map +1 -0
- package/dist/tools/fetch-url.d.ts +1 -1
- package/dist/tools/fetch-url.d.ts.map +1 -1
- package/dist/tools/fetch-url.js +1 -1
- package/dist/tools/web-search.d.ts +1 -1
- package/dist/tools/web-search.js +1 -1
- package/dist/tools/web-search.js.map +1 -1
- package/dist/tools.d.ts +2 -2
- package/dist/tools.js +2 -2
- package/dist/{transcript-anchors-DSRPWjiH.js → transcript-anchors-BTNe1OJi.js} +346 -89
- package/dist/transcript-anchors-BTNe1OJi.js.map +1 -0
- package/dist/{transcript-anchors-Cb-bDbNH.d.ts → transcript-anchors-D5wvdKQQ.d.ts} +37 -3
- package/dist/transcript-anchors-D5wvdKQQ.d.ts.map +1 -0
- package/dist/tui.d.ts +21 -6
- package/dist/tui.d.ts.map +1 -1
- package/dist/tui.js +497 -83
- package/dist/tui.js.map +1 -1
- package/dist/{turn-operations-Dq9Kx7m2.js → turn-operations-CEt_l3fy.js} +23 -8
- package/dist/turn-operations-CEt_l3fy.js.map +1 -0
- package/dist/{turn-operations-CgMROLsr.d.ts → turn-operations-JO5MYM9_.d.ts} +27 -9
- package/dist/turn-operations-JO5MYM9_.d.ts.map +1 -0
- package/dist/types-BIarq1qE.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/{xai-B_e6TOA8.js → xai-C_aq671K.js} +3 -3
- package/dist/{xai-B_e6TOA8.js.map → xai-C_aq671K.js.map} +1 -1
- package/docs/ARCHITECTURE.md +4 -0
- package/docs/CHAT.md +12 -10
- package/docs/SKILL.md +1 -1
- package/docs/TUI.md +3 -3
- package/package.json +2 -2
- package/dist/agent-DkSmGkDM.js.map +0 -1
- package/dist/anthropic-CTHsdFG9.js.map +0 -1
- package/dist/auth-BDSu_0t3.js.map +0 -1
- package/dist/contexts-Vone3qQQ.js.map +0 -1
- package/dist/format-BNOXpl-1.js.map +0 -1
- package/dist/index-B8UtiZy7.d.ts.map +0 -1
- package/dist/openai-compat-BvgYGSR1.js.map +0 -1
- package/dist/session-CsdDIPY8.js.map +0 -1
- package/dist/tool-formatters-DY0TDb1r.d.ts.map +0 -1
- package/dist/transcript-anchors-Cb-bDbNH.d.ts.map +0 -1
- package/dist/transcript-anchors-DSRPWjiH.js.map +0 -1
- package/dist/turn-operations-CgMROLsr.d.ts.map +0 -1
- package/dist/turn-operations-Dq9Kx7m2.js.map +0 -1
package/README.md
CHANGED
|
@@ -118,6 +118,31 @@ await agent.run({
|
|
|
118
118
|
|
|
119
119
|
Precedence: `run.behavior` > `agent.behavior` > defaults.
|
|
120
120
|
|
|
121
|
+
### Provider/model fallback
|
|
122
|
+
|
|
123
|
+
`provider` also accepts an array, and `model` an ordered fallback list:
|
|
124
|
+
|
|
125
|
+
```ts
|
|
126
|
+
const agent = createAgent({
|
|
127
|
+
provider: [anthropic({ ... }), openrouter({ ... })], // names must be unique
|
|
128
|
+
})
|
|
129
|
+
|
|
130
|
+
await agent.run({
|
|
131
|
+
prompt: '…',
|
|
132
|
+
model: [
|
|
133
|
+
{ provider: 'anthropic', model: 'claude-sonnet-4-5' }, // primary
|
|
134
|
+
{ provider: 'openrouter', model: 'anthropic/claude-sonnet-4-5' },
|
|
135
|
+
'claude-haiku-4-5', // bare string fans out across ALL providers, in order
|
|
136
|
+
],
|
|
137
|
+
})
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
The run resolves this into an ordered target list (`resolveModelTargets`). When a stream fails terminally on the active target — retry budget exhausted, or a non-retryable provider error like auth/billing — with nothing streamed yet, the loop advances to the next target and re-issues (tools are reformatted for the new provider's wire shape; messages are canonical, so no translation is needed). `context_exceeded` never falls back — it keeps its own overflow-recovery path.
|
|
141
|
+
|
|
142
|
+
Fallback is **run-sticky**: once a run advances, it stays on that target; the next `run()` starts from the primary again. Each advancement fires the `model:fallback` hook (`from`, `to`, `targetIndex`, `err`); only the LAST target's terminal failure reaches `stream:error`. A plain `model: 'id'` with multiple providers means "try this model on every provider"; omitting `model` falls back across each provider's `meta.defaultModel`. Per-turn attribution is preserved via `TurnUsage.modelId` (the session run record's `providerName` keeps the primary's name).
|
|
143
|
+
|
|
144
|
+
Two sizing notes: `maxTokens` and the thinking budget are NOT re-derived on fallback — they carry over from the primary, so size them for the smallest model in the chain (a target that rejects the carried budget just burns one advancement). In multi-provider setups every provider needs a non-empty, unique `name`. The auto-compact window DOES re-derive on fallback: object entries may carry a `contextWindow` (your catalog's value for that model), which re-bases even an explicit `autoCompact.contextWindow`; without it, meta-sourced windows re-resolve from the new provider's `meta.contextWindow` and explicit windows stay as set.
|
|
145
|
+
|
|
121
146
|
## CLI
|
|
122
147
|
|
|
123
148
|
```bash
|
|
@@ -508,6 +533,8 @@ definePreset({
|
|
|
508
533
|
})
|
|
509
534
|
```
|
|
510
535
|
|
|
536
|
+
Pass `models` (or `spawnTool.withModels(catalog)` at agent-build time) to let the model pick a per-spawn model: the schema gains a `model` field, entries are routed to the provider that serves them, and large catalogs defer to `createModelSearchTool(catalog)` instead of bloating the schema. Per-call `input.model` > subagent-type `model` > `createSpawnTool({ model })` > inherit the parent's. See [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) for details.
|
|
537
|
+
|
|
511
538
|
## Interaction Tool
|
|
512
539
|
|
|
513
540
|
Pause the agent and request structured input. Not in any preset by default. `onRequest` may be async — the agent waits. Return a string or object.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { c as resolveReadStateMap, r as hashContent, s as readStateKey } from "./read-state-Dq_TXUX1.js";
|
|
2
2
|
import { l as toolResultToText } from "./types-BIarq1qE.js";
|
|
3
|
-
import {
|
|
4
|
-
import { n as createProcessContext } from "./contexts-
|
|
3
|
+
import { lt as basic_default, t as createAgent } from "./agent-DZRA7wip.js";
|
|
4
|
+
import { n as createProcessContext } from "./contexts-BIbcfBFH.js";
|
|
5
5
|
import { l as errorMessage } from "./errors-DJUxZg9b.js";
|
|
6
6
|
import { t as effectiveInputFromTurn } from "./stats-DAKBEKjc.js";
|
|
7
|
-
import { C as defaultPromptMessage } from "./openai-compat-
|
|
8
|
-
import { o as loadSession, t as createSession } from "./session-
|
|
9
|
-
import { r as fetchUrl } from "./fetch-url-
|
|
7
|
+
import { C as defaultPromptMessage } from "./openai-compat-B0kqvZqN.js";
|
|
8
|
+
import { o as loadSession, t as createSession } from "./session-CsKzK8-P.js";
|
|
9
|
+
import { r as fetchUrl } from "./fetch-url-_5WKWpbQ.js";
|
|
10
10
|
import { webSearch } from "./tools/web-search.js";
|
|
11
11
|
import { basename, resolve } from "node:path";
|
|
12
12
|
import { Buffer } from "node:buffer";
|
|
@@ -978,7 +978,7 @@ const MODE_CONFIG_ID = "mode";
|
|
|
978
978
|
const THINKING_CONFIG_ID = "thinking";
|
|
979
979
|
const MODEL_OPTION_CONFIG_PREFIX = "model_option:";
|
|
980
980
|
const PLAN_MODE_ID = "plan";
|
|
981
|
-
const PLAN_READ_ONLY_TOOLS = new Set([
|
|
981
|
+
const PLAN_READ_ONLY_TOOLS = /* @__PURE__ */ new Set([
|
|
982
982
|
"read_file",
|
|
983
983
|
"list_files",
|
|
984
984
|
"grep",
|
|
@@ -1068,7 +1068,7 @@ var AcpServerImpl = class {
|
|
|
1068
1068
|
return ((this.options.model ? this.modelChoices.find((choice) => choice.id === this.options.model || choice.model === this.options.model) : void 0) ?? this.modelChoices[0]).id;
|
|
1069
1069
|
}
|
|
1070
1070
|
buildDefaultConfigOptions(userConfig) {
|
|
1071
|
-
const reserved = new Set([MODE_CONFIG_ID]);
|
|
1071
|
+
const reserved = /* @__PURE__ */ new Set([MODE_CONFIG_ID]);
|
|
1072
1072
|
const options = [{
|
|
1073
1073
|
id: MODE_CONFIG_ID,
|
|
1074
1074
|
name: "Mode",
|
|
@@ -1920,4 +1920,4 @@ function runAcpStdioServer(options) {
|
|
|
1920
1920
|
//#endregion
|
|
1921
1921
|
export { createJsonRpcConnection as _, wrapToolsForAcpClient as a, sessionBlocksToAcp as c, StartUsageError as d, buildStartLocalOptions as f, JsonRpcRemoteError as g, 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 };
|
|
1922
1922
|
|
|
1923
|
-
//# sourceMappingURL=acp-
|
|
1923
|
+
//# sourceMappingURL=acp-cfR8T19u.js.map
|