zidane 6.2.36 → 6.3.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.
- package/README.md +16 -5
- package/dist/{acp-DZNCQaTQ.js → acp-Cs86McDR.js} +6 -6
- package/dist/{acp-DZNCQaTQ.js.map → acp-Cs86McDR.js.map} +1 -1
- package/dist/acp-cli.js +7 -7
- package/dist/acp.d.ts +2 -2
- package/dist/acp.js +1 -1
- package/dist/{agent-CrPwqpLI.js → agent-AZ_crMfB.js} +168 -23
- package/dist/agent-AZ_crMfB.js.map +1 -0
- package/dist/agent.d.ts +2 -2
- package/dist/agent.js +4 -4
- package/dist/{anthropic-asnZVFS_.js → anthropic-CWwySM3p.js} +59 -24
- package/dist/anthropic-CWwySM3p.js.map +1 -0
- package/dist/{auth-C5YTniaq.js → auth-BPSnotuN.js} +5 -5
- package/dist/auth-BPSnotuN.js.map +1 -0
- package/dist/{cache-telemetry-BhTryxFT.js → cache-telemetry-DzyfqSds.js} +87 -5
- package/dist/cache-telemetry-DzyfqSds.js.map +1 -0
- package/dist/chat/pure.d.ts +3 -3
- package/dist/chat.d.ts +43 -5
- package/dist/chat.d.ts.map +1 -1
- package/dist/chat.js +31 -3
- package/dist/chat.js.map +1 -1
- package/dist/context-transport-64EeXTAQ.js +84 -0
- package/dist/context-transport-64EeXTAQ.js.map +1 -0
- package/dist/contexts/daytona.d.ts +33 -4
- package/dist/contexts/daytona.d.ts.map +1 -1
- package/dist/contexts/daytona.js +136 -0
- package/dist/contexts/daytona.js.map +1 -1
- package/dist/contexts/docker.d.ts +1 -1
- package/dist/contexts/docker.d.ts.map +1 -1
- package/dist/contexts/docker.js +85 -2
- package/dist/contexts/docker.js.map +1 -1
- package/dist/contexts/e2b.d.ts +34 -4
- package/dist/contexts/e2b.d.ts.map +1 -1
- package/dist/contexts/e2b.js +92 -0
- package/dist/contexts/e2b.js.map +1 -1
- package/dist/contexts/sandbox.d.ts +1 -1
- package/dist/contexts/sandbox.js +4 -2
- package/dist/contexts/sandbox.js.map +1 -1
- package/dist/{contexts-o8y5B3Tm.js → contexts-DbMuUPjS.js} +92 -5
- package/dist/contexts-DbMuUPjS.js.map +1 -0
- package/dist/contexts.d.ts +4 -4
- package/dist/contexts.js +1 -1
- package/dist/eval.d.ts +1 -1
- package/dist/eval.js +3 -3
- package/dist/{exec-file-size-PXkr-MGA.js → exec-file-size-BRpoB6Io.js} +3 -32
- package/dist/exec-file-size-BRpoB6Io.js.map +1 -0
- package/dist/extensions.d.ts +1 -1
- package/dist/extensions.js +1 -1
- package/dist/headless.d.ts +1 -1
- package/dist/headless.js +4 -4
- package/dist/{index-DsPQbyUn.d.ts → index-B9jSo84a.d.ts} +2 -2
- package/dist/index-B9jSo84a.d.ts.map +1 -0
- package/dist/{index-CohO0oaX.d.ts → index-D-PvuMCb.d.ts} +5607 -5188
- package/dist/index-D-PvuMCb.d.ts.map +1 -0
- package/dist/index.d.ts +6 -6
- package/dist/index.js +13 -13
- package/dist/{login-CWwu9Sex.js → login-fgr9zD6z.js} +2 -2
- package/dist/{login-CWwu9Sex.js.map → login-fgr9zD6z.js.map} +1 -1
- package/dist/{mcp-Ct5tF4oj.js → mcp-DolMi7WV.js} +77 -34
- package/dist/mcp-DolMi7WV.js.map +1 -0
- package/dist/mcp.d.ts +2 -2
- package/dist/mcp.js +2 -2
- package/dist/{messages-Cpb4g_KV.js → messages-CLkUdPeG.js} +2 -2
- package/dist/{messages-Cpb4g_KV.js.map → messages-CLkUdPeG.js.map} +1 -1
- package/dist/{oauth-CBi9eymX.js → oauth-CuFPhsHY.js} +117 -11
- package/dist/oauth-CuFPhsHY.js.map +1 -0
- package/dist/{openai-compat-C77gOaHh.js → openai-compat-DHlBIjj9.js} +186 -42
- package/dist/openai-compat-DHlBIjj9.js.map +1 -0
- package/dist/output/stream-json.d.ts +1 -1
- package/dist/output/terminal.d.ts +1 -1
- package/dist/presets.d.ts +1 -1
- package/dist/presets.js +1 -1
- package/dist/prompt.d.ts +1 -1
- package/dist/prompt.js +14 -0
- package/dist/prompt.js.map +1 -1
- package/dist/providers/anthropic.d.ts +2 -2
- package/dist/providers/anthropic.js +2 -2
- 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 +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 +5 -5
- 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-DnHPW-dL.js → providers-Nu5ysnXN.js} +4 -4
- package/dist/providers-Nu5ysnXN.js.map +1 -0
- package/dist/providers.d.ts +2 -2
- package/dist/providers.js +5 -5
- package/dist/{read-state-rDmfeLmz.js → read-state-CNyeMG7W.js} +7 -4
- package/dist/read-state-CNyeMG7W.js.map +1 -0
- package/dist/restate.d.ts +2 -2
- package/dist/restate.js +2 -2
- package/dist/restate.js.map +1 -1
- package/dist/{sandbox-CgjG2VvQ.d.ts → sandbox-DqwpKX18.d.ts} +14 -2
- package/dist/{sandbox-CgjG2VvQ.d.ts.map → sandbox-DqwpKX18.d.ts.map} +1 -1
- package/dist/session/sqlite.d.ts +1 -1
- package/dist/{session-DpDBnktP.js → session-vmy9jTVM.js} +2 -2
- package/dist/{session-DpDBnktP.js.map → session-vmy9jTVM.js.map} +1 -1
- package/dist/session.d.ts +1 -1
- package/dist/session.js +2 -2
- package/dist/shell-quote-BmnhZmdM.js +33 -0
- package/dist/shell-quote-BmnhZmdM.js.map +1 -0
- package/dist/skills.d.ts +1 -1
- package/dist/{stdio-loader-Ce68wUmM.js → stdio-D0v-W5w7.js} +8 -215
- package/dist/stdio-D0v-W5w7.js.map +1 -0
- package/dist/stdio-loader-BPUedHxT.js +217 -0
- package/dist/stdio-loader-BPUedHxT.js.map +1 -0
- package/dist/stream-queue-Cd9OJxl7.js +71 -0
- package/dist/stream-queue-Cd9OJxl7.js.map +1 -0
- package/dist/{system-prompt-BlsdjcUi.d.ts → system-prompt-MNVHatSD.d.ts} +15 -1
- package/dist/system-prompt-MNVHatSD.d.ts.map +1 -0
- package/dist/{tool-formatters-bZYz74qU.d.ts → tool-formatters-BPKA2if5.d.ts} +2 -2
- package/dist/{tool-formatters-bZYz74qU.d.ts.map → tool-formatters-BPKA2if5.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 +2 -2
- package/dist/{transcript-anchors-ZZYwCTjo.js → transcript-anchors-6-uB2Xvl.js} +19 -8
- package/dist/transcript-anchors-6-uB2Xvl.js.map +1 -0
- package/dist/{transcript-anchors-EBchHUMo.d.ts → transcript-anchors-DzuIcJpm.d.ts} +2 -2
- package/dist/{transcript-anchors-EBchHUMo.d.ts.map → transcript-anchors-DzuIcJpm.d.ts.map} +1 -1
- package/dist/tui.d.ts +3 -3
- package/dist/tui.d.ts.map +1 -1
- package/dist/tui.js +124 -45
- package/dist/tui.js.map +1 -1
- package/dist/{turn-operations-DygcPreU.d.ts → turn-operations-Dzr3QhDD.d.ts} +3 -3
- package/dist/{turn-operations-DygcPreU.d.ts.map → turn-operations-Dzr3QhDD.d.ts.map} +1 -1
- package/dist/types-BIarq1qE.js.map +1 -1
- package/dist/{types-BDccavwj.d.ts → types-DdZMQxfT.d.ts} +117 -2
- package/dist/types-DdZMQxfT.d.ts.map +1 -0
- package/dist/types.d.ts +3 -3
- package/dist/{xai-B2hIs5We.js → xai-Cn0LsHRt.js} +3 -3
- package/dist/xai-Cn0LsHRt.js.map +1 -0
- package/docs/ARCHITECTURE.md +62 -4
- package/docs/CHAT.md +12 -5
- package/docs/EXTENSIONS.md +1 -1
- package/docs/RESTATE.md +1 -1
- package/docs/SKILL.md +21 -1
- package/docs/TUI.md +2 -0
- package/package.json +2 -2
- package/dist/agent-CrPwqpLI.js.map +0 -1
- package/dist/anthropic-asnZVFS_.js.map +0 -1
- package/dist/auth-C5YTniaq.js.map +0 -1
- package/dist/cache-telemetry-BhTryxFT.js.map +0 -1
- package/dist/contexts-o8y5B3Tm.js.map +0 -1
- package/dist/exec-file-size-PXkr-MGA.js.map +0 -1
- package/dist/index-CohO0oaX.d.ts.map +0 -1
- package/dist/index-DsPQbyUn.d.ts.map +0 -1
- package/dist/mcp-Ct5tF4oj.js.map +0 -1
- package/dist/oauth-CBi9eymX.js.map +0 -1
- package/dist/openai-compat-C77gOaHh.js.map +0 -1
- package/dist/providers-DnHPW-dL.js.map +0 -1
- package/dist/read-state-rDmfeLmz.js.map +0 -1
- package/dist/stdio-loader-Ce68wUmM.js.map +0 -1
- package/dist/system-prompt-BlsdjcUi.d.ts.map +0 -1
- package/dist/transcript-anchors-ZZYwCTjo.js.map +0 -1
- package/dist/types-BDccavwj.d.ts.map +0 -1
- package/dist/xai-B2hIs5We.js.map +0 -1
package/README.md
CHANGED
|
@@ -70,7 +70,7 @@ createAgent({
|
|
|
70
70
|
maxTurns: 50,
|
|
71
71
|
maxTokens: 16384,
|
|
72
72
|
thinkingBudget: 10240,
|
|
73
|
-
thinkingDecay: { afterTurn: 5,
|
|
73
|
+
thinkingDecay: { afterTurn: 5, floor: 1024 },
|
|
74
74
|
cache: true, // prompt-cache breakpoints
|
|
75
75
|
toolOutputBudget: 32768, // soft per-turn byte cap (off by default)
|
|
76
76
|
dedupReads: true, // dedup re-reads in `read_file`
|
|
@@ -254,6 +254,8 @@ openaiCompat({
|
|
|
254
254
|
|
|
255
255
|
`behavior.cache` (default on). `cache_control: { type: 'ephemeral' }` is inserted on three stable prefixes (system, last tool, last message's final block). Hits + writes surface on `TurnUsage.cacheRead` / `cacheCreation` via the `usage` hook.
|
|
256
256
|
|
|
257
|
+
`behavior.cacheTtl: '1h'` opts into Anthropic's extended cache (`cache_control.ttl` + the `extended-cache-ttl-2025-04-11` beta header). Writes cost 2× instead of 1.25×; reads stay ~0.1×. Worth it for interactive sessions, where a single >5-minute pause otherwise forfeits the entire cached prefix; headless back-to-back runs should keep the default `'5m'`. Caveat: the wire shape is verified, but measure actual retention on your account before counting the savings — our 2026-07 measurement saw a 1h entry evicted within 6 minutes (gated test: `INFERENCE_SLOW=1`). See `docs/ARCHITECTURE.md` § *Cache-stable configuration* for the full cache-aware settings table.
|
|
258
|
+
|
|
257
259
|
| Provider | Behavior |
|
|
258
260
|
|---|---|
|
|
259
261
|
| `anthropic` | Honored natively. |
|
|
@@ -403,9 +405,19 @@ agent.hooks.hook('context:transform', (ctx) => {
|
|
|
403
405
|
|
|
404
406
|
`behavior.autoCompact` is the heavy lever: loop-native auto-compaction. Once a turn's effective input crosses `threshold` (default `0.85`) of the context window, the loop runs a real LLM summary over the older turns, appends a `compact-summary` marker + file/skill restoration to the session, and continues — mid-run and at end-of-run. Window source is `autoCompact.contextWindow` → `provider.meta.contextWindow` (inert without one). Observe via the `compact:start` / `compact:end` hooks. SDK default off; chat profiles enable it. Distinct from `compactStrategy` (per-turn wire-only `tool_result` trim) and the always-on reactive `context_exceeded` recovery.
|
|
405
407
|
|
|
408
|
+
### Stale-read policy
|
|
409
|
+
|
|
410
|
+
`behavior.elideStaleReads` decides what happens when an `edit` / `multi_edit` / `write_file` succeeds on a file the model read earlier in the run:
|
|
411
|
+
|
|
412
|
+
- `'notice'` — append-only: a persisted `<system-reminder>` naming the stale path rides the mutating tool's own result. Never rewrites cached prefix bytes, so the prompt cache is untouched. The built-in chat profiles ship this.
|
|
413
|
+
- `'stub'` (or legacy `true`) — replace the stale read's output on the wire with a short stub. Reclaims the stale bytes from context, but each newly-stale read re-bills the conversation at the cache-write rate — only worth it under real context-window pressure.
|
|
414
|
+
- `false` (default) — off. Detection is identical in both modes (success markers only; failed edits and no-op writes stale nothing), and dedup honesty around mutations holds in **every** mode — see below.
|
|
415
|
+
|
|
416
|
+
See `docs/ARCHITECTURE.md` § *Cache-stable configuration* for the measured economics.
|
|
417
|
+
|
|
406
418
|
### Read dedup + read-before-edit guard
|
|
407
419
|
|
|
408
|
-
- `behavior.dedupReads` (default **on**) — `read_file` returns `"unchanged since the previous read"` on identical re-reads. Per-session content-hash.
|
|
420
|
+
- `behavior.dedupReads` (default **on**) — `read_file` returns `"unchanged since the previous read"` on identical re-reads. Per-session content-hash. Mutations are honest by construction: after an `edit`/`multi_edit`/`write_file` touches a file, the next re-read serves the full fresh body instead of the stub, then dedup resumes.
|
|
409
421
|
- `behavior.requireReadBeforeEdit` (default **off** in the SDK core; **on** in the built-in `BUILD_AGENT` / `PLAN_AGENT` chat profiles) — `edit` / `multi_edit` reject when the file hasn't been read this session or has drifted. The refusal is a recoverable `tool_result` (tells the model to `read_file` first), and `write_file` seeds read-state so the write→edit flow needs no extra read.
|
|
410
422
|
- `behavior.repeatGuard` (default **off** in the SDK core; **on** in the chat profiles) — breaks consecutive-identical tool streaks: blocks the Nth back-to-back identical call (default 4) with a pivot suggestion, aborts the run at the Mth (default 8) via the agent's `AbortController`. Defaults track the built-in `shell` + `read_file` tools; configurable via `RepeatGuardConfig`.
|
|
411
423
|
|
|
@@ -472,12 +484,11 @@ Pass a function for custom messages: `onExceed: ctx => ({ mode: 'steer', message
|
|
|
472
484
|
```ts
|
|
473
485
|
behavior: {
|
|
474
486
|
thinkingBudget: 8192,
|
|
475
|
-
thinkingDecay: { afterTurn: 5,
|
|
476
|
-
// turn 1-5 → 8192, turn 6 → 4096, turn 7 → 2048, turn 8+ → 1024
|
|
487
|
+
thinkingDecay: { afterTurn: 5, floor: 1024 }, // step: turns 1-5 → 8192, 6+ → 1024
|
|
477
488
|
}
|
|
478
489
|
```
|
|
479
490
|
|
|
480
|
-
|
|
491
|
+
**Prefer the step form (no `factor`) when prompt caching is on.** `thinking.budget_tokens` is part of Anthropic's cache key — a request with a different budget reads *nothing* back and re-bills the entire prefix (measured; pinned in the live suite). Each distinct value a schedule emits is one full re-bill: the step form costs exactly one per run, the geometric form `{ afterTurn: 5, factor: 0.5, floor: 1024 }` costs one per halving (8192 → 4096 → 2048 → 1024 = three), and a per-turn function like `(turn, base) => base / Math.sqrt(turn)` silently disables caching for the whole run. No-op when `thinkingBudget` is unset.
|
|
481
492
|
|
|
482
493
|
## Steering and Follow-up
|
|
483
494
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { l as toolResultToText } from "./types-BIarq1qE.js";
|
|
2
|
-
import { c as resolveReadStateMap, r as hashContent, s as readStateKey } from "./read-state-
|
|
3
|
-
import {
|
|
4
|
-
import { r as createProcessContext } from "./contexts-
|
|
2
|
+
import { c as resolveReadStateMap, r as hashContent, s as readStateKey } from "./read-state-CNyeMG7W.js";
|
|
3
|
+
import { dt as basic_default, t as createAgent } from "./agent-AZ_crMfB.js";
|
|
4
|
+
import { r as createProcessContext } from "./contexts-DbMuUPjS.js";
|
|
5
5
|
import { l as errorMessage } from "./errors-DJUxZg9b.js";
|
|
6
|
-
import {
|
|
7
|
-
import { o as loadSession, t as createSession } from "./session-
|
|
6
|
+
import { T as defaultPromptMessage } from "./openai-compat-DHlBIjj9.js";
|
|
7
|
+
import { o as loadSession, t as createSession } from "./session-vmy9jTVM.js";
|
|
8
8
|
import { t as effectiveInputFromTurn } from "./stats-DAKBEKjc.js";
|
|
9
9
|
import { r as fetchUrl } from "./fetch-url-_5WKWpbQ.js";
|
|
10
10
|
import { webSearch } from "./tools/web-search.js";
|
|
@@ -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-Cs86McDR.js.map
|