zidane 5.2.1 → 5.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.
Files changed (67) hide show
  1. package/README.md +7 -5
  2. package/dist/{agent-CGQajqtC.d.ts → agent-bKs7MRT2.d.ts} +429 -4
  3. package/dist/agent-bKs7MRT2.d.ts.map +1 -0
  4. package/dist/chat.d.ts +212 -58
  5. package/dist/chat.d.ts.map +1 -1
  6. package/dist/chat.js +2 -2
  7. package/dist/{errors-COmsomd5.js → errors-Byb0F8B9.js} +44 -2
  8. package/dist/errors-Byb0F8B9.js.map +1 -0
  9. package/dist/{index-DwbcFBr_.d.ts → index-BlMvPh9X.d.ts} +29 -3
  10. package/dist/index-BlMvPh9X.d.ts.map +1 -0
  11. package/dist/{index-BDP6mA3Y.d.ts → index-CTmNaIDb.d.ts} +2 -2
  12. package/dist/{index-BDP6mA3Y.d.ts.map → index-CTmNaIDb.d.ts.map} +1 -1
  13. package/dist/index.d.ts +4 -4
  14. package/dist/index.js +10 -10
  15. package/dist/{interpolate-BhmHKD6x.js → interpolate-ERgZUxgg.js} +2 -2
  16. package/dist/{interpolate-BhmHKD6x.js.map → interpolate-ERgZUxgg.js.map} +1 -1
  17. package/dist/{login-D7Tp-K5f.js → login-CNS9_8Ue.js} +3 -3
  18. package/dist/{login-D7Tp-K5f.js.map → login-CNS9_8Ue.js.map} +1 -1
  19. package/dist/{mcp-B1psg7jf.js → mcp-ZsSFo4Dp.js} +2 -2
  20. package/dist/{mcp-B1psg7jf.js.map → mcp-ZsSFo4Dp.js.map} +1 -1
  21. package/dist/mcp.d.ts +1 -1
  22. package/dist/mcp.js +1 -1
  23. package/dist/{messages-DsbMYNmt.js → messages-D0xT979U.js} +631 -68
  24. package/dist/messages-D0xT979U.js.map +1 -0
  25. package/dist/{presets-AgF0RFx1.js → presets-h5i3kpOP.js} +2 -2
  26. package/dist/{presets-AgF0RFx1.js.map → presets-h5i3kpOP.js.map} +1 -1
  27. package/dist/presets.d.ts +2 -2
  28. package/dist/presets.js +1 -1
  29. package/dist/{providers-v1Rn2rqG.js → providers-x3LZByR5.js} +38 -6
  30. package/dist/providers-x3LZByR5.js.map +1 -0
  31. package/dist/providers.d.ts +2 -2
  32. package/dist/providers.js +3 -3
  33. package/dist/session/sqlite.d.ts +1 -1
  34. package/dist/session/sqlite.js +1 -1
  35. package/dist/{session-DOJgRXvF.js → session-BHZwxmfr.js} +2 -2
  36. package/dist/{session-DOJgRXvF.js.map → session-BHZwxmfr.js.map} +1 -1
  37. package/dist/session.d.ts +1 -1
  38. package/dist/session.js +2 -2
  39. package/dist/skills.d.ts +2 -2
  40. package/dist/skills.js +1 -1
  41. package/dist/{tools-BRbbfdJh.js → tools-CWEDS2ZT.js} +251 -47
  42. package/dist/tools-CWEDS2ZT.js.map +1 -0
  43. package/dist/tools.d.ts +2 -2
  44. package/dist/tools.js +1 -1
  45. package/dist/{transcript-anchors-BBuIoU0x.d.ts → transcript-anchors-DOUqyvXR.d.ts} +28 -4
  46. package/dist/transcript-anchors-DOUqyvXR.d.ts.map +1 -0
  47. package/dist/tui.d.ts +29 -3
  48. package/dist/tui.d.ts.map +1 -1
  49. package/dist/tui.js +363 -28
  50. package/dist/tui.js.map +1 -1
  51. package/dist/{turn-operations-gJ0qtLPv.js → turn-operations-D9HvatsR.js} +396 -89
  52. package/dist/turn-operations-D9HvatsR.js.map +1 -0
  53. package/dist/types-IcokUOyC.js.map +1 -1
  54. package/dist/types.d.ts +2 -2
  55. package/dist/types.js +1 -1
  56. package/docs/ARCHITECTURE.md +3 -2
  57. package/docs/CHAT.md +55 -16
  58. package/docs/TUI.md +22 -2
  59. package/package.json +1 -1
  60. package/dist/agent-CGQajqtC.d.ts.map +0 -1
  61. package/dist/errors-COmsomd5.js.map +0 -1
  62. package/dist/index-DwbcFBr_.d.ts.map +0 -1
  63. package/dist/messages-DsbMYNmt.js.map +0 -1
  64. package/dist/providers-v1Rn2rqG.js.map +0 -1
  65. package/dist/tools-BRbbfdJh.js.map +0 -1
  66. package/dist/transcript-anchors-BBuIoU0x.d.ts.map +0 -1
  67. package/dist/turn-operations-gJ0qtLPv.js.map +0 -1
package/README.md CHANGED
@@ -6,15 +6,17 @@ An agent that goes straight to the goal. Minimal TypeScript agent loop built wit
6
6
 
7
7
  ## Features
8
8
 
9
- Small, hookable core with sensible defaults. Three principles:
9
+ Small, hookable core with sensible defaults. Three principles guide the design:
10
10
 
11
- - **Token discipline** — cache, dedup, compaction, byte-accounting.
12
- - **Self-healing fault paths** — auto-coerce args, hallucinated-tool fallback, error rewriting.
13
- - **Provider parity** — server-side features on Anthropic, client-side equivalents elsewhere.
11
+ - ⚖️ **Token discipline** — cache, dedup, compaction, byte-accounting.
12
+ - 🩹 **Self-healing fault paths** — auto-coerce args, hallucinated-tool fallback, error rewriting.
13
+ - 🔁 **Provider parity** — server-side features on Anthropic, client-side equivalents elsewhere.
14
+
15
+ Everything below is in service of those:
14
16
 
15
17
  - 🧠 **Providers** — Anthropic, OpenAI Codex, OpenRouter, Cerebras, plus `openaiCompat` (Baseten, Fireworks, Groq, local). OAuth + API key with auto-refresh.
16
18
  - 🪝 **Hookable turn loop** — every text/thinking delta, tool call, MCP, session, skill, spawn, OAuth, validation, and budget event is observable and (mostly) mutable.
17
- - 🛠️ **First-class tools** — `shell`, `read_file`, `write_file`, `edit`, `multi_edit`, `glob`, `grep`, `spawn`, human-in-the-loop, plus any [MCP](https://modelcontextprotocol.io) server. Per-call gates, arg auto-coerce, hallucinated-tool fallback, error rewriting. Lazy MCP disclosure via `tool_search`. Optional `todowrite` / `todoread` for run-scoped task checkpointing.
19
+ - 🛠️ **First-class tools** — `shell`, `read_file`, `write_file`, `edit`, `multi_edit`, `glob`, `grep`, `spawn`, human-in-the-loop, plus any [MCP](https://modelcontextprotocol.io) server. Per-call gates, arg auto-coerce, hallucinated-tool fallback, error rewriting. Lazy MCP disclosure via `tool_search`. Optional `todowrite` / `todoread` for persistent task checkpointing across prompts.
18
20
  - ✂️ **Token-aware** — paginated reads, tail-truncated `shell`, idempotent `write_file`; `outputBytes` everywhere. `toolOutputBudget`, `toolBudgets`, `thinkingDecay`.
19
21
  - 🗜️ **Context discipline** — `cache_control` breakpoints; server-side compaction on Anthropic, client-side `compactStrategy: 'tail'` elsewhere. Per-session read dedup + `requireReadBeforeEdit`; generalized `dedupTools`.
20
22
  - 🎯 **Reasoning + structured output** — thinking levels with optional exact budgets; force final response to a JSON Schema (Zod v4 interop).
@@ -14,7 +14,7 @@ import { Client } from "@modelcontextprotocol/sdk/client/index.js";
14
14
  * unclassified errors in `AgentProviderError` automatically.
15
15
  */
16
16
  /** Kind of classified provider error */
17
- type ClassifiedErrorKind = 'context_exceeded' | 'provider_error' | 'aborted';
17
+ type ClassifiedErrorKind = 'context_exceeded' | 'provider_error' | 'aborted' | 'tool_pairing_corruption';
18
18
  /** Structured classification returned by `Provider.classifyError` */
19
19
  interface ClassifiedError {
20
20
  kind: ClassifiedErrorKind;
@@ -75,6 +75,49 @@ declare class AgentAbortedError extends Error {
75
75
  cause?: unknown;
76
76
  });
77
77
  }
78
+ /**
79
+ * Thrown by the pre-send pairing repair when {@link AgentBehavior.strictToolPairing}
80
+ * is `true` and {@link ensureToolResultPairing} would otherwise patch over
81
+ * corruption. Strict mode opts into fail-fast for training-data collectors and
82
+ * any consumer that prefers to bail out rather than ship a transcript carrying
83
+ * a {@link SYNTHETIC_TOOL_RESULT_PLACEHOLDER}.
84
+ *
85
+ * The `repairs` field carries every repair the loop would have made — useful
86
+ * for postmortems and for surfacing exactly which transcripts were rejected.
87
+ *
88
+ * Note: callers consuming the chat layer (TUI/SDK presets) typically leave
89
+ * `strictToolPairing` off so user-facing sessions auto-heal instead of
90
+ * crashing.
91
+ */
92
+ declare class AgentToolPairingError extends Error {
93
+ readonly code: "tool_pairing_corruption";
94
+ /** Provider whose wire format the corruption would have hit. */
95
+ readonly provider?: string;
96
+ /** Upstream error code when the corruption was detected from a 400 response. */
97
+ readonly providerCode?: string;
98
+ /**
99
+ * Repairs the harness would have performed had strict mode been off.
100
+ * Preserves the full diagnostic so consumers can route to telemetry,
101
+ * `/rewind` flows, or training-data quarantine without re-walking the
102
+ * transcript.
103
+ */
104
+ readonly repairs: ReadonlyArray<{
105
+ mode: string;
106
+ callId?: string;
107
+ messageIndex: number;
108
+ }>;
109
+ constructor(options: {
110
+ message: string;
111
+ provider?: string;
112
+ providerCode?: string;
113
+ repairs: ReadonlyArray<{
114
+ mode: string;
115
+ callId?: string;
116
+ messageIndex: number;
117
+ }>;
118
+ cause?: unknown;
119
+ });
120
+ }
78
121
  /**
79
122
  * Thrown (well — constructed; attach via the `tool:gate` block signal) when the
80
123
  * union of `allowed-tools` across active skills does not permit a tool call.
@@ -123,7 +166,7 @@ declare function errorMessage(err: unknown): string;
123
166
  /**
124
167
  * Convert a `ClassifiedError` + underlying cause into the matching typed error instance.
125
168
  */
126
- declare function toTypedError(classification: ClassifiedError, provider: string, cause: unknown): AgentContextExceededError | AgentProviderError | AgentAbortedError;
169
+ declare function toTypedError(classification: ClassifiedError, provider: string, cause: unknown): AgentContextExceededError | AgentProviderError | AgentAbortedError | AgentToolPairingError;
127
170
  //#endregion
128
171
  //#region src/types.d.ts
129
172
  /**
@@ -655,6 +698,26 @@ interface AgentBehavior {
655
698
  * Default: `undefined`.
656
699
  */
657
700
  persistDir?: string;
701
+ /**
702
+ * Fail-fast instead of repair when the pre-send pairing pass detects
703
+ * corruption (orphan `tool_use` / `tool_result`, duplicate ids,
704
+ * compaction-stranded blocks). Throws {@link AgentToolPairingError} from
705
+ * the next `agent.run()` turn carrying the structured repair list the
706
+ * loop would have performed.
707
+ *
708
+ * Use case: training-data collectors that must reject any transcript
709
+ * containing the synthetic `SYNTHETIC_TOOL_RESULT_PLACEHOLDER` rather
710
+ * than ship poisoned data to the fine-tuning pipeline. User-facing chat
711
+ * sessions should leave this off (the repair-on-the-fly behavior is the
712
+ * point of the pass).
713
+ *
714
+ * Telemetry note: `pairing:repair` still fires for every repair before
715
+ * the throw, so observability handlers see exactly what would have
716
+ * happened.
717
+ *
718
+ * Default: `false`.
719
+ */
720
+ strictToolPairing?: boolean;
658
721
  }
659
722
  /**
660
723
  * One block of a multimodal user prompt.
@@ -1357,6 +1420,100 @@ interface OpenRouterParams {
1357
1420
  */
1358
1421
  declare function openrouter(params?: OpenRouterParams): Provider;
1359
1422
  //#endregion
1423
+ //#region src/providers/schema-sanitize.d.ts
1424
+ /**
1425
+ * JSON Schema sanitizer for tool `inputSchema` forwarded to LLM providers.
1426
+ *
1427
+ * Why this exists: MCP servers ship arbitrary JSON Schema in `tools/list`.
1428
+ * Anthropic and (to a lesser extent) OpenAI reject specific keyword
1429
+ * combinations with a 400 on `messages.create`, and the error message
1430
+ * lands deep inside an SDK exception that consumers blame on their own
1431
+ * code. The most common failure modes in the wild:
1432
+ *
1433
+ * - Root `$ref` (server-published schema lives under `#/$defs/X`).
1434
+ * - Root `oneOf` / `anyOf` / `allOf` (Anthropic allows neither at the
1435
+ * top level; expects `type: 'object'`).
1436
+ * - `type: ['object', 'null']` at the root (nullable variants of an
1437
+ * otherwise valid object schema).
1438
+ * - Missing `properties` on an object root.
1439
+ * - `nullable: true` (Swagger / OpenAPI 3.0 idiom — not standard JSON
1440
+ * Schema, ignored by every modern provider but Anthropic warns).
1441
+ * - Nested `$ref` pointing at `#/definitions/X` without the schema
1442
+ * actually inlining the referenced definition.
1443
+ *
1444
+ * Pure rewrite. Returns a new schema (or the same reference when nothing
1445
+ * needed to change — the hot path on stable tool registries) and a list
1446
+ * of `warnings` describing each rewrite. Providers call
1447
+ * `sanitizeToolSpecs` from `formatTools` so every tool — eager MCP, lazy
1448
+ * MCP, native, skill — gets the same treatment, and warnings surface
1449
+ * through `console.warn` once per batch (the seen-set in
1450
+ * `sanitizeToolSpecs` is local to one call, so a stable bad schema logs
1451
+ * once per request rather than every turn).
1452
+ *
1453
+ * Scope:
1454
+ * - Pure function. No I/O, no globals.
1455
+ * - Bounded recursion (`MAX_DEPTH = 32`) so a malicious server can't
1456
+ * wedge the agent with a deeply self-referential schema.
1457
+ * - Bounded `$ref` resolution (`MAX_REF_HOPS = 16`) for the same
1458
+ * reason. Cycles fall back to `{}` (permissive) rather than
1459
+ * throwing — the request still succeeds, the schema is just looser.
1460
+ *
1461
+ * Non-goals:
1462
+ * - Validating that the schema is internally consistent.
1463
+ * - Cleaning up tool *descriptions* (handled elsewhere).
1464
+ * - Provider-side feature detection (handled by the provider's own
1465
+ * `formatTools`; this module is a syntactic guard, not a semantic one).
1466
+ */
1467
+ /** Strictness profile — picks which transformations to apply. */
1468
+ type SchemaSanitizeProfile = 'anthropic' | 'openai' | 'permissive';
1469
+ interface SchemaSanitizeOptions {
1470
+ /** Strictness profile. Defaults to `'permissive'`. */
1471
+ profile?: SchemaSanitizeProfile;
1472
+ /**
1473
+ * Tool name for context in warnings. Optional — when set, every warning
1474
+ * is prefixed with `[tool:<name>] ` so log lines correlate to the tool.
1475
+ */
1476
+ toolName?: string;
1477
+ }
1478
+ interface SchemaSanitizeResult {
1479
+ /** Sanitized schema, safe to forward to the provider. */
1480
+ schema: Record<string, unknown>;
1481
+ /**
1482
+ * Human-readable strings describing each rewrite the sanitizer performed.
1483
+ * Empty on a clean schema. Consumers may log these (recommended) or
1484
+ * thread them through a hook for observability.
1485
+ */
1486
+ warnings: string[];
1487
+ }
1488
+ /**
1489
+ * Sanitize a single tool's `inputSchema` for safe forwarding to the
1490
+ * provider. Returns the rewritten schema + a list of warnings describing
1491
+ * everything that changed.
1492
+ *
1493
+ * Never mutates the input. Returns the **same reference** when no rewrite
1494
+ * was needed (clean-schema fast path) — `sanitizeToolSpecs` relies on
1495
+ * this to keep the formatTools hot loop allocation-free across turns
1496
+ * when the registered tool set is already wire-valid.
1497
+ */
1498
+ declare function sanitizeToolSchema(input: unknown, options?: SchemaSanitizeOptions): SchemaSanitizeResult;
1499
+ /**
1500
+ * Convenience: sanitize a batch of tools and emit a single de-duped
1501
+ * `console.warn` per unique warning line. Returns the rewritten tools
1502
+ * preserving original ordering and reference identity for clean schemas
1503
+ * (no reallocation when nothing needed to change).
1504
+ *
1505
+ * The sanitiser runs every request, so log noise from a stable bad
1506
+ * schema would multiply across turns; the de-dupe keeps the signal
1507
+ * useful in production logs without dropping the first occurrence.
1508
+ */
1509
+ declare function sanitizeToolSpecs<T extends {
1510
+ name: string;
1511
+ inputSchema?: unknown;
1512
+ }>(tools: readonly T[], options?: {
1513
+ profile?: SchemaSanitizeProfile;
1514
+ onWarning?: (line: string) => void;
1515
+ }): T[];
1516
+ //#endregion
1360
1517
  //#region src/providers/index.d.ts
1361
1518
  interface ToolSpec {
1362
1519
  name: string;
@@ -1378,6 +1535,25 @@ interface ToolResult {
1378
1535
  * Use `toolResultToText(content)` when a downstream consumer only handles strings.
1379
1536
  */
1380
1537
  content: string | ToolResultContent[];
1538
+ /**
1539
+ * Marks this result as an error. Propagates to `tool_result.is_error: true`
1540
+ * on the Anthropic wire (and to the equivalent on every other provider that
1541
+ * exposes the field). Models treat error-flagged results as "the tool tried
1542
+ * but failed" — distinct from "the tool returned this string" — so they can
1543
+ * decide whether to retry, fall back, or surface the error to the user.
1544
+ *
1545
+ * Set by the loop on:
1546
+ * - Tool body throws (`tool:error` path).
1547
+ * - Gate refusal (`Blocked: <reason>`).
1548
+ * - Validation rejection (`Validation error: …`).
1549
+ * - Mid-tool abort (`INTERRUPT_MESSAGE_FOR_TOOL_USE`).
1550
+ * - Sequential-batch skips when a sibling threw / a steering message
1551
+ * arrived.
1552
+ *
1553
+ * Custom tools may set it via the `tool:error` hook's `ctx.result`
1554
+ * substitute when they want the framework to flag a structured error.
1555
+ */
1556
+ isError?: boolean;
1381
1557
  }
1382
1558
  /**
1383
1559
  * Provider-level capability flags used by the agent loop to route tool results
@@ -1539,6 +1715,151 @@ declare function toOpenAI(msg: SessionMessage): {
1539
1715
  role: string;
1540
1716
  content: unknown;
1541
1717
  };
1718
+ /**
1719
+ * Placeholder content inserted into a synthetic `tool_result` when the harness
1720
+ * has to repair an orphan `tool_use`. Exported so downstream consumers
1721
+ * (training-data collectors, HFI submission) can reject any payload containing
1722
+ * it — the marker satisfies the wire-level pairing contract structurally but
1723
+ * the content itself is fake and would poison fine-tuning data.
1724
+ */
1725
+ declare const SYNTHETIC_TOOL_RESULT_PLACEHOLDER = "[Tool result missing due to internal error]";
1726
+ /**
1727
+ * Replacement text for an assistant message whose every content block was
1728
+ * stripped during pairing repair (e.g. the only blocks were orphan
1729
+ * `tool_call`s). Providers reject empty `content` arrays — the marker keeps
1730
+ * the turn shape valid while signaling "this assistant turn lost its
1731
+ * outputs" to the model so it can recover.
1732
+ */
1733
+ declare const TOOL_USE_INTERRUPTED_MARKER = "[Tool use interrupted]";
1734
+ /**
1735
+ * Replacement text for a user message whose every content block was a
1736
+ * `tool_result` with no matching upstream `tool_call` (e.g. the assistant
1737
+ * pair was stripped by an earlier compaction). Same role as
1738
+ * {@link TOOL_USE_INTERRUPTED_MARKER} on the user side.
1739
+ */
1740
+ declare const ORPHANED_TOOL_RESULT_MARKER = "[Orphaned tool result removed due to conversation resume]";
1741
+ /**
1742
+ * Classification of a single repair the pairing pass performed. Surfaced via
1743
+ * {@link EnsureToolResultPairingOptions.onRepair} so consumers can wire
1744
+ * telemetry, debug logs, or strict-mode rejection without re-implementing the
1745
+ * walk.
1746
+ *
1747
+ * Each entry corresponds to one of the corruption modes documented on
1748
+ * {@link ensureToolResultPairing}.
1749
+ */
1750
+ type PairingRepairMode = 'orphan-tool-use-prepend' | 'orphan-tool-use-append' | 'orphan-tool-result-strip' | 'duplicate-tool-use-strip' | 'duplicate-tool-result-strip' | 'empty-assistant-marker';
1751
+ interface PairingRepair {
1752
+ mode: PairingRepairMode;
1753
+ /** Tool-use / tool-result id this repair concerns. Absent for empty-marker repairs. */
1754
+ callId?: string;
1755
+ /** Zero-based index into the INPUT `messages` array where the corruption was found. */
1756
+ messageIndex: number;
1757
+ }
1758
+ interface EnsureToolResultPairingOptions {
1759
+ /**
1760
+ * Fired once per repair the pass performed. Synchronous so the loop can
1761
+ * stay on its hot path. Throwing from the callback aborts the pass —
1762
+ * consumers wanting fail-fast (strict mode) can re-throw with their own
1763
+ * typed error.
1764
+ */
1765
+ onRepair?: (repair: PairingRepair) => void;
1766
+ }
1767
+ /**
1768
+ * Defensive repair pass that rewrites a message list so it satisfies the
1769
+ * wire-level `tool_use` ↔ `tool_result` adjacency contract every modern
1770
+ * provider enforces.
1771
+ *
1772
+ * Anthropic 400s on orphans with `'tool_use' ids were found without
1773
+ * 'tool_result' blocks immediately after` (and its inverse, `tool_result
1774
+ * must be preceded by a tool_call with the same toolCallId`). OpenAI's
1775
+ * Chat Completions API rejects most mismatches with a 400 too.
1776
+ *
1777
+ * Six repair modes — modeled after Anthropic's Claude Code defenses:
1778
+ *
1779
+ * | # | Corruption | Repair |
1780
+ * |---|------------|--------|
1781
+ * | 1 | assistant `tool_use` whose next user msg lacks a matching `tool_result` | **Prepend** a synthetic `tool_result` block carrying {@link SYNTHETIC_TOOL_RESULT_PLACEHOLDER} with `isError: true` |
1782
+ * | 2 | assistant `tool_use` followed by nothing (or by a non-user msg) | **Insert** a new synthetic user message with the same placeholder |
1783
+ * | 3 | user `tool_result` with no preceding assistant `tool_call` | **Strip** the orphan block; if it empties the msg, replace with {@link ORPHANED_TOOL_RESULT_MARKER} text block |
1784
+ * | 4 | duplicate `tool_call.id` across assistant messages (CC-1212) | **Strip** later instances + their matching tool_results |
1785
+ * | 5 | duplicate `tool_result.callId` within a single user message | **Dedupe** by `callId`, keep first |
1786
+ * | 6 | assistant message emptied by mode-4 stripping | **Replace** content with {@link TOOL_USE_INTERRUPTED_MARKER} text block |
1787
+ *
1788
+ * **Repair, not drop.** Earlier versions of this pass simply dropped orphan
1789
+ * blocks, which (a) silently rewrote history the model had reasoned over and
1790
+ * (b) cascaded — dropping an assistant tool_call would orphan its
1791
+ * tool_result, which would then get dropped too, removing any trace of
1792
+ * "what the model tried to do" from the transcript. The repair-based pass
1793
+ * preserves the model's tool_use shape and patches the dangling result with
1794
+ * an `is_error` placeholder so the model sees "I tried X, the result was
1795
+ * lost" and can retry intelligently.
1796
+ *
1797
+ * Adjacency contract: `tool_result` blocks must live in the user message
1798
+ * IMMEDIATELY following the assistant message that emitted the matching
1799
+ * `tool_use`. The pass enforces strict adjacency — a tool_result two
1800
+ * messages downstream of its tool_call is still an orphan.
1801
+ *
1802
+ * Idempotent: returns the input reference unchanged when no repairs were
1803
+ * necessary. Re-running on already-repaired output is a no-op.
1804
+ *
1805
+ * Pure: does not mutate input messages or their content arrays — every
1806
+ * repair allocates a fresh array / object.
1807
+ */
1808
+ declare function ensureToolResultPairing(messages: SessionMessage[], options?: EnsureToolResultPairingOptions): SessionMessage[];
1809
+ /**
1810
+ * Drop ASSISTANT turns whose every `tool_call` block is unresolved
1811
+ * (no matching `tool_result` block anywhere later in the transcript).
1812
+ * Tool_call blocks with at least one matching tool_result are kept — modes
1813
+ * 1/3 of {@link ensureToolResultPairing} handle the partial-pair case at
1814
+ * wire-send time.
1815
+ *
1816
+ * Use case: session resume. A turn that emitted three `tool_use` blocks but
1817
+ * never persisted the matching `tool_result` turn (process death, crash,
1818
+ * `kill -9`) leaves the transcript with an orphan that Anthropic rejects on
1819
+ * the FIRST API call after reload. Dropping the whole assistant turn — not
1820
+ * just the orphan blocks — preserves text-only turns that legitimately
1821
+ * carry reasoning the model wants to see again.
1822
+ *
1823
+ * Does NOT mint fresh ids: re-id'ing on every resume would cause
1824
+ * exponential transcript growth across repeated resumes of an interrupted
1825
+ * session.
1826
+ *
1827
+ * Pure: returns the input reference unchanged when no turn was dropped.
1828
+ */
1829
+ declare function filterUnresolvedToolUses<T extends {
1830
+ role: string;
1831
+ content: SessionContentBlock[];
1832
+ }>(turns: T[]): T[];
1833
+ /**
1834
+ * Classification of a session's tail state for resume purposes.
1835
+ *
1836
+ * - `'clean'` — the trailing turn is a user message (the model would respond
1837
+ * next), or the transcript is empty. Safe to resume by appending a fresh
1838
+ * user prompt.
1839
+ * - `'interrupted'` — the trailing turn is an assistant message that has at
1840
+ * least one `tool_call` block with no matching `tool_result` anywhere
1841
+ * later. The run was almost certainly killed between persisting the
1842
+ * assistant turn and persisting its tool-results turn. Hosts that want
1843
+ * Claude-Code-style auto-resume can detect this and inject a
1844
+ * `"Continue from where you left off."` user message before the next run.
1845
+ * - `'completed'` — the trailing turn is an assistant message with no
1846
+ * orphan tool_calls. The model considers itself done. Hosts that want to
1847
+ * resume must supply a new prompt; auto-continuation here would be a
1848
+ * non-sequitur.
1849
+ */
1850
+ type TurnInterruptionState = 'clean' | 'interrupted' | 'completed';
1851
+ /**
1852
+ * Inspect a session's trailing turn to classify whether the run was
1853
+ * interrupted mid-tool-call. Pure / synchronous — does not modify the input.
1854
+ *
1855
+ * Pair with {@link filterUnresolvedToolUses} on the resume path: filter
1856
+ * first so the result reflects the post-cleanup state (a turn whose orphans
1857
+ * were stripped reads as 'completed', not 'interrupted').
1858
+ */
1859
+ declare function detectTurnInterruption<T extends {
1860
+ role: string;
1861
+ content: SessionContentBlock[];
1862
+ }>(turns: T[]): TurnInterruptionState;
1542
1863
  declare function autoDetectAndConvert(msg: {
1543
1864
  role: string;
1544
1865
  content: unknown;
@@ -2139,6 +2460,23 @@ interface AgentHooks {
2139
2460
  delta: string;
2140
2461
  thinking: string;
2141
2462
  }) => void;
2463
+ /**
2464
+ * Fires when the provider's stream rejects BEFORE `stream:end` — provider
2465
+ * errors, network blips, malformed `tools` payloads (400 invalid_request_error).
2466
+ *
2467
+ * `err` is the original thrown value, not the typed `AgentProviderError`
2468
+ * the loop subsequently constructs; subscribe here to capture the native
2469
+ * SDK exception (status codes, request ids) for telemetry without having
2470
+ * to walk `cause` chains. Observational — the loop still wraps + throws
2471
+ * after this hook resolves, so handlers cannot suppress the failure.
2472
+ *
2473
+ * Does NOT fire on user-initiated aborts; those land on `agent:abort`
2474
+ * instead. Use `err instanceof Error && err.name === 'AbortError'` to
2475
+ * distinguish if you also subscribe here for raw error logging.
2476
+ */
2477
+ 'stream:error': (ctx: StreamHookContext & {
2478
+ err: unknown;
2479
+ }) => void;
2142
2480
  'oauth:refresh': (ctx: OAuthRefreshHookContext) => void;
2143
2481
  /**
2144
2482
  * Fires before validation, `tool:before`, and `execute`. Two ways to
@@ -2190,6 +2528,54 @@ interface AgentHooks {
2190
2528
  */
2191
2529
  priorContent?: string;
2192
2530
  }) => void;
2531
+ /**
2532
+ * Symmetric notification fired ONCE per call the model dispatched,
2533
+ * regardless of the path the call ultimately took through the loop.
2534
+ * Pair with `tool:after` (which also fires uniformly across paths) to
2535
+ * get a guaranteed `tool` ↔ `tool-result` event pairing for downstream
2536
+ * consumers reconstructing message history from live events.
2537
+ *
2538
+ * Distinct from `tool:before`: `tool:before` only fires when the tool
2539
+ * body is about to execute (the legacy "I'm running this tool" notification),
2540
+ * skipping gate-block / gate-substitute / unknown-tool / validation-reject
2541
+ * paths. `tool:dispatched` fires on all five paths with an `outcome`
2542
+ * discriminator so live consumers never see a `tool:after` whose
2543
+ * matching dispatch event was suppressed.
2544
+ *
2545
+ * Strict ordering: `tool:dispatched` fires AFTER `tool:gate` /
2546
+ * `validation:reject` / `tool:unknown` so the resolved `outcome` is
2547
+ * always accurate. Fires BEFORE `tool:before` on the execute path so
2548
+ * consumers binding both events see dispatched-then-before.
2549
+ *
2550
+ * `reason` is set only when `outcome === 'gate-block'` and carries the
2551
+ * gate's refusal text (so consumers can render denied-diff badges, etc.
2552
+ * without a side channel).
2553
+ */
2554
+ 'tool:dispatched': (ctx: ToolHookContext & {
2555
+ outcome: 'execute' | 'gate-substitute' | 'gate-block' | 'unknown' | 'invalid-input';
2556
+ reason?: string;
2557
+ runToolCounts: Readonly<Record<string, number>>;
2558
+ }) => void;
2559
+ /**
2560
+ * Fires after a tool body produced a result (the execute path) or a
2561
+ * `tool:gate` listener substituted one via `ctx.result` (the Z20
2562
+ * cache-substitute path). Carries the post-`tool:transform` payload —
2563
+ * what the model actually sees on the wire.
2564
+ *
2565
+ * Does NOT fire on gate-block / unknown-tool / validation-reject
2566
+ * paths: the loop synthesizes their `tool_result` text inline and
2567
+ * sends it back to the model, but no tool body produced output and
2568
+ * no `tool:transform` ran. Consumers wanting symmetric per-call
2569
+ * notification across every dispatch path should listen to
2570
+ * `tool:dispatched` instead (which fires once per call regardless of
2571
+ * path, with an `outcome` discriminator).
2572
+ *
2573
+ * This narrow contract is deliberate: tracing spans opened in
2574
+ * `tool:before` only get closed where they were opened, byte budgets
2575
+ * only count real tool output, and chat-layer transcript renderers
2576
+ * keep their `tool` ↔ `tool-result` pairing without special-casing
2577
+ * the synthesized paths.
2578
+ */
2193
2579
  'tool:after': (ctx: ToolHookContext & {
2194
2580
  result: string | ToolResultContent[];
2195
2581
  outputBytes: number;
@@ -2301,6 +2687,12 @@ interface AgentHooks {
2301
2687
  childId: string;
2302
2688
  depth: number;
2303
2689
  }) => void;
2690
+ /** Bubbled `stream:error` from a subagent's turn. See {@link AgentHooks['stream:error']}. */
2691
+ 'child:stream:error': (ctx: StreamHookContext & {
2692
+ err: unknown;
2693
+ childId: string;
2694
+ depth: number;
2695
+ }) => void;
2304
2696
  /**
2305
2697
  * Gate-style child events. Unlike the other `child:*` events, the bubble
2306
2698
  * passes the **same `ctx` reference** the subagent's loop is awaiting on:
@@ -2342,6 +2734,19 @@ interface AgentHooks {
2342
2734
  */
2343
2735
  priorContent?: string;
2344
2736
  }) => void;
2737
+ /**
2738
+ * Bubbled sibling of {@link AgentHooks['tool:dispatched']} — fires when a
2739
+ * subagent dispatches a call. Symmetric with `child:tool:after` so live
2740
+ * UI rendering of subagent transcripts stays paired across all five
2741
+ * dispatch paths (gate-block/gate-substitute/unknown/invalid-input/execute).
2742
+ */
2743
+ 'child:tool:dispatched': (ctx: ToolHookContext & {
2744
+ outcome: 'execute' | 'gate-substitute' | 'gate-block' | 'unknown' | 'invalid-input';
2745
+ reason?: string;
2746
+ runToolCounts: Readonly<Record<string, number>>;
2747
+ childId: string;
2748
+ depth: number;
2749
+ }) => void;
2345
2750
  'child:tool:after': (ctx: ToolHookContext & {
2346
2751
  result: string | ToolResultContent[];
2347
2752
  outputBytes: number;
@@ -2539,6 +2944,26 @@ interface AgentHooks {
2539
2944
  skill: SkillConfig;
2540
2945
  reason: DeactivationReason;
2541
2946
  }) => void;
2947
+ /**
2948
+ * Fires once per repair performed by the pre-send pairing pass
2949
+ * ({@link ensureToolResultPairing}). The pass runs immediately before every
2950
+ * provider call and patches over the wire-level corruption modes that
2951
+ * Anthropic / OpenAI 400 on (orphan `tool_use` / `tool_result`, duplicate
2952
+ * ids, compaction-stranded blocks).
2953
+ *
2954
+ * Observational — handlers can mirror to Sentry/PostHog/etc. for
2955
+ * postmortems on new corruption sources but cannot suppress the repair.
2956
+ * The companion `behavior.strictToolPairing` flag is the consumer escape
2957
+ * hatch for "throw instead of repair" (training-data collectors).
2958
+ *
2959
+ * `turnId` lets handlers correlate a repair burst with the run-loop turn
2960
+ * that observed it. Absent on repairs detected from the synthetic
2961
+ * fallback path in `agent.run()`'s error catch (the orphan-tool_use
2962
+ * fallback for crash recovery), where no turn is in flight.
2963
+ */
2964
+ 'pairing:repair': (ctx: PairingRepair & {
2965
+ turnId?: string;
2966
+ }) => void;
2542
2967
  'usage': (ctx: {
2543
2968
  turn: number;
2544
2969
  turnId: string;
@@ -2757,5 +3182,5 @@ declare function createAgent({
2757
3182
  hooks: initialHooks
2758
3183
  }: AgentOptions): Agent;
2759
3184
  //#endregion
2760
- export { openrouter as $, SessionStore as A, SpawnHookContext as At, createMemoryStore as B, toolOutputByteLength as Bt, SkillResource as C, PromptTextPart as Ct, Session as D, SessionHookContext as Dt, CreateSessionOptions as E, SessionEndStatus as Et, autoDetectAndConvert as F, ToolResultContent as Ft, ProviderCapabilities as G, AgentToolNotAllowedError as Gt, FileMapStoreOptions as H, AgentAbortedError as Ht, fromAnthropic as I, ToolResultImageContent as It, ToolCall as J, ClassifiedErrorKind as Jt, StreamCallbacks as K, CONTEXT_EXCEEDED_MESSAGE_PATTERNS as Kt, fromOpenAI as L, ToolResultTextContent as Lt, loadSession as M, ThinkingLevel as Mt, RemoteStoreOptions as N, ToolExecutionMode as Nt, SessionData as O, SessionMessage as Ot, createRemoteStore as P, ToolHookContext as Pt, OpenRouterParams as Q, toAnthropic as R, TurnFinishReason as Rt, SkillDiagnostic as S, PromptPart as St, SkillsConfig as T, SessionContentBlock as Tt, createFileMapStore as U, AgentContextExceededError as Ut, FileMapAdapter as V, toolResultToText as Vt, Provider as W, AgentProviderError as Wt, ToolSpec as X, matchesContextExceeded as Xt, ToolResult as Y, errorMessage as Yt, TurnResult as Z, toTypedError as Zt, resultToString as _, McpToolHookContext as _t, createAgent as a, openaiCompat as at, ToolMap as b, PromptDocumentPart as bt, DeactivationReason as c, CerebrasParams as ct, createSkillActivationState as d, anthropic as dt, OpenAICompatAuthHeader as et, ConnectMcpServersOptions as f, AgentBehavior as ft, normalizeMcpServers as g, McpServerConfig as gt, normalizeMcpBlocks as h, ChildRunStats as ht, AgentOptions as i, mapOAIFinishReason as it, createSession as j, StreamHookContext as jt, SessionRun as k, SessionTurn as kt, SkillActivationState as l, cerebras as lt, connectMcpServers as m, AgentStats as mt, AgentHookMap as n, OpenAICompatParams as nt, ActivationVia as o, OpenAIParams as ot, McpConnection as p, AgentRunOptions as pt, StreamOptions as q, ClassifiedError as qt, AgentHooks as r, classifyOpenAICompatError as rt, ActiveSkill as s, openai as st, Agent as t, OpenAICompatHttpError as tt, SkillActivationStateOptions as u, AnthropicParams as ut, ToolContext as v, McpToolSchema as vt, SkillSource as w, RunHookMap as wt, SkillConfig as x, PromptImagePart as xt, ToolDef as y, OAuthRefreshHookContext as yt, toOpenAI as z, TurnUsage as zt };
2761
- //# sourceMappingURL=agent-CGQajqtC.d.ts.map
3185
+ export { createFileMapStore as $, TurnFinishReason as $t, SessionStore as A, ChildRunStats as At, TOOL_USE_INTERRUPTED_MARKER as B, SessionContentBlock as Bt, SkillResource as C, CerebrasParams as Ct, Session as D, AgentBehavior as Dt, CreateSessionOptions as E, anthropic as Et, EnsureToolResultPairingOptions as F, PromptDocumentPart as Ft, filterUnresolvedToolUses as G, SpawnHookContext as Gt, autoDetectAndConvert as H, SessionHookContext as Ht, ORPHANED_TOOL_RESULT_MARKER as I, PromptImagePart as It, toAnthropic as J, ToolExecutionMode as Jt, fromAnthropic as K, StreamHookContext as Kt, PairingRepair as L, PromptPart as Lt, loadSession as M, McpToolHookContext as Mt, RemoteStoreOptions as N, McpToolSchema as Nt, SessionData as O, AgentRunOptions as Ot, createRemoteStore as P, OAuthRefreshHookContext as Pt, FileMapStoreOptions as Q, ToolResultTextContent as Qt, PairingRepairMode as R, PromptTextPart as Rt, SkillDiagnostic as S, openai as St, SkillsConfig as T, AnthropicParams as Tt, detectTurnInterruption as U, SessionMessage as Ut, TurnInterruptionState as V, SessionEndStatus as Vt, ensureToolResultPairing as W, SessionTurn as Wt, createMemoryStore as X, ToolResultContent as Xt, toOpenAI as Y, ToolHookContext as Yt, FileMapAdapter as Z, ToolResultImageContent as Zt, resultToString as _, OpenAICompatParams as _t, createAgent as a, AgentProviderError as an, ToolResult as at, ToolMap as b, openaiCompat as bt, DeactivationReason as c, CONTEXT_EXCEEDED_MESSAGE_PATTERNS as cn, SchemaSanitizeOptions as ct, createSkillActivationState as d, errorMessage as dn, sanitizeToolSchema as dt, TurnUsage as en, Provider as et, ConnectMcpServersOptions as f, matchesContextExceeded as fn, sanitizeToolSpecs as ft, normalizeMcpServers as g, OpenAICompatHttpError as gt, normalizeMcpBlocks as h, OpenAICompatAuthHeader as ht, AgentOptions as i, AgentContextExceededError as in, ToolCall as it, createSession as j, McpServerConfig as jt, SessionRun as k, AgentStats as kt, SkillActivationState as l, ClassifiedError as ln, SchemaSanitizeProfile as lt, connectMcpServers as m, openrouter as mt, AgentHookMap as n, toolResultToText as nn, StreamCallbacks as nt, ActivationVia as o, AgentToolNotAllowedError as on, ToolSpec as ot, McpConnection as p, toTypedError as pn, OpenRouterParams as pt, fromOpenAI as q, ThinkingLevel as qt, AgentHooks as r, AgentAbortedError as rn, StreamOptions as rt, ActiveSkill as s, AgentToolPairingError as sn, TurnResult as st, Agent as t, toolOutputByteLength as tn, ProviderCapabilities as tt, SkillActivationStateOptions as u, ClassifiedErrorKind as un, SchemaSanitizeResult as ut, ToolContext as v, classifyOpenAICompatError as vt, SkillSource as w, cerebras as wt, SkillConfig as x, OpenAIParams as xt, ToolDef as y, mapOAIFinishReason as yt, SYNTHETIC_TOOL_RESULT_PLACEHOLDER as z, RunHookMap as zt };
3186
+ //# sourceMappingURL=agent-bKs7MRT2.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-bKs7MRT2.d.ts","names":[],"sources":["../src/errors.ts","../src/types.ts","../src/providers/anthropic.ts","../src/providers/cerebras.ts","../src/providers/openai.ts","../src/providers/openai-compat.ts","../src/providers/openrouter.ts","../src/providers/schema-sanitize.ts","../src/providers/index.ts","../src/session/file-map.ts","../src/session/memory.ts","../src/session/messages.ts","../src/session/remote.ts","../src/session/index.ts","../src/skills/types.ts","../src/tools/types.ts","../src/mcp/index.ts","../src/skills/activation.ts","../src/agent.ts"],"mappings":";;;;;;;;;;;;AAYA;;;;KAAY,mBAAA;AAGZ;AAAA,UAAiB,eAAA;EACf,IAAA,EAAM,mBAAA;EAAmB;EAEzB,YAAA;EAFM;EAIN,OAAA;EAAA;;;;AAQD;;EADC,SAAA;AAAA;AAAA,UAGQ,iBAAA;EAIR;EAFA,QAAA;EAMA;EAJA,YAAA;EAIS;EAFT,KAAA;EASqC;EAPrC,SAAA;AAAA;;;;;cAOW,yBAAA,SAAkC,KAAA;EAAA,SACpC,IAAA;EAAA,SACA,QAAA;EAAA,SACA,YAAA;cAEG,OAAA,UAAiB,OAAA,EAAS,iBAAA;AAAA;AAYxC;;;;AAAA,cAAa,kBAAA,SAA2B,KAAA;EAAA,SAC7B,IAAA;EAAA,SACA,QAAA;EAAA,SACA,YAAA;EAMA;;;;;EAAA,SAAA,SAAA;cAEG,OAAA,UAAiB,OAAA,E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