zidane 5.12.9 → 5.13.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.
Files changed (103) hide show
  1. package/README.md +6 -0
  2. package/dist/{agent-DFxjgQx5.d.ts → agent-Db4ojCSV.d.ts} +358 -49
  3. package/dist/agent-Db4ojCSV.d.ts.map +1 -0
  4. package/dist/atomic-write-Bgtr5JPu.js +100 -0
  5. package/dist/atomic-write-Bgtr5JPu.js.map +1 -0
  6. package/dist/chat/pure.d.ts +3 -3
  7. package/dist/chat.d.ts +17 -117
  8. package/dist/chat.d.ts.map +1 -1
  9. package/dist/chat.js +3 -3
  10. package/dist/contexts/daytona.d.ts +123 -0
  11. package/dist/contexts/daytona.d.ts.map +1 -0
  12. package/dist/contexts/daytona.js +282 -0
  13. package/dist/contexts/daytona.js.map +1 -0
  14. package/dist/contexts/e2b.d.ts +1 -1
  15. package/dist/{contexts-DglWSzmR.js → contexts-VhV4Af8x.js} +32 -6
  16. package/dist/contexts-VhV4Af8x.js.map +1 -0
  17. package/dist/contexts.js +1 -1
  18. package/dist/eval.d.ts +1 -1
  19. package/dist/eval.js +4 -4
  20. package/dist/{headless-Cbknpgjo.js → headless-tVN-g6IR.js} +7 -7
  21. package/dist/headless-tVN-g6IR.js.map +1 -0
  22. package/dist/headless.d.ts +1 -1
  23. package/dist/headless.js +1 -1
  24. package/dist/{index-C3wPsOFw.d.ts → index-BEblm0Hu.d.ts} +2 -2
  25. package/dist/{index-C3wPsOFw.d.ts.map → index-BEblm0Hu.d.ts.map} +1 -1
  26. package/dist/{index-DoQ0MHlp.d.ts → index-CJ-2g7bY.d.ts} +86 -18
  27. package/dist/index-CJ-2g7bY.d.ts.map +1 -0
  28. package/dist/index-CrMb8jCE.d.ts.map +1 -1
  29. package/dist/index.d.ts +6 -5
  30. package/dist/index.js +12 -12
  31. package/dist/{interpolate-Da6kPCXn.js → interpolate-ConAiXGy.js} +2 -2
  32. package/dist/{interpolate-Da6kPCXn.js.map → interpolate-ConAiXGy.js.map} +1 -1
  33. package/dist/{logger-DZcTJ3YX.d.ts → logger-Dcrj48qY.d.ts} +2 -2
  34. package/dist/{logger-DZcTJ3YX.d.ts.map → logger-Dcrj48qY.d.ts.map} +1 -1
  35. package/dist/login-D5rb4IG8.js +267 -0
  36. package/dist/login-D5rb4IG8.js.map +1 -0
  37. package/dist/{mcp-Bl0n3bNL.js → mcp-C_TIj91j.js} +2 -2
  38. package/dist/{mcp-Bl0n3bNL.js.map → mcp-C_TIj91j.js.map} +1 -1
  39. package/dist/mcp.d.ts +1 -1
  40. package/dist/mcp.js +1 -1
  41. package/dist/{messages-CV_K9I6j.js → messages-CGazSyTL.js} +16 -13
  42. package/dist/messages-CGazSyTL.js.map +1 -0
  43. package/dist/output/stream-json.d.ts +2 -2
  44. package/dist/output/stream-json.js +1 -1
  45. package/dist/output/terminal.d.ts +2 -2
  46. package/dist/policy-DcGlpaNs.d.ts +129 -0
  47. package/dist/policy-DcGlpaNs.d.ts.map +1 -0
  48. package/dist/{presets-BsMR5nn6.js → presets-kPEMOCmE.js} +2 -2
  49. package/dist/{presets-BsMR5nn6.js.map → presets-kPEMOCmE.js.map} +1 -1
  50. package/dist/presets.d.ts +2 -2
  51. package/dist/presets.js +1 -1
  52. package/dist/{providers-C6rpOk0l.js → providers-Bo2biCyT.js} +47 -116
  53. package/dist/providers-Bo2biCyT.js.map +1 -0
  54. package/dist/providers.d.ts +1 -1
  55. package/dist/providers.js +2 -2
  56. package/dist/restate.d.ts +1 -1
  57. package/dist/restate.js +2 -1
  58. package/dist/restate.js.map +1 -1
  59. package/dist/session/sqlite.d.ts +1 -1
  60. package/dist/{session-nRmW_P8d.js → session-B69BQSn1.js} +2 -2
  61. package/dist/{session-nRmW_P8d.js.map → session-B69BQSn1.js.map} +1 -1
  62. package/dist/session.d.ts +1 -1
  63. package/dist/session.js +2 -2
  64. package/dist/skills.d.ts +2 -2
  65. package/dist/skills.js +1 -1
  66. package/dist/{tool-formatters-CCTIq3A-.d.ts → tool-formatters-CkqBgPH4.d.ts} +9 -31
  67. package/dist/tool-formatters-CkqBgPH4.d.ts.map +1 -0
  68. package/dist/tools/fetch-url.d.ts +1 -1
  69. package/dist/tools/web-search.d.ts +1 -1
  70. package/dist/{tools-fqToqHik.js → tools-5Bnlq68O.js} +2105 -1320
  71. package/dist/tools-5Bnlq68O.js.map +1 -0
  72. package/dist/tools.d.ts +2 -2
  73. package/dist/tools.js +1 -1
  74. package/dist/{transcript-anchors-DxAfqo4i.d.ts → transcript-anchors-BnLZmASt.d.ts} +17 -5
  75. package/dist/transcript-anchors-BnLZmASt.d.ts.map +1 -0
  76. package/dist/{transcript-anchors-Br_NijUC.js → transcript-anchors-D4PwUMyO.js} +1202 -103
  77. package/dist/transcript-anchors-D4PwUMyO.js.map +1 -0
  78. package/dist/tui.d.ts +3 -3
  79. package/dist/tui.d.ts.map +1 -1
  80. package/dist/tui.js +102 -148
  81. package/dist/tui.js.map +1 -1
  82. package/dist/{turn-operations-BTxf15kt.d.ts → turn-operations-B6FaQAZN.d.ts} +3 -3
  83. package/dist/{turn-operations-BTxf15kt.d.ts.map → turn-operations-B6FaQAZN.d.ts.map} +1 -1
  84. package/dist/types-DxHDaqN7.js.map +1 -1
  85. package/dist/types.d.ts +2 -2
  86. package/dist/types.js +1 -1
  87. package/docs/ARCHITECTURE.md +6 -2
  88. package/docs/CHAT.md +29 -28
  89. package/docs/SKILL.md +1 -1
  90. package/docs/TUI.md +8 -8
  91. package/package.json +15 -5
  92. package/dist/agent-DFxjgQx5.d.ts.map +0 -1
  93. package/dist/contexts-DglWSzmR.js.map +0 -1
  94. package/dist/headless-Cbknpgjo.js.map +0 -1
  95. package/dist/index-DoQ0MHlp.d.ts.map +0 -1
  96. package/dist/login-uf01y_Yj.js +0 -1272
  97. package/dist/login-uf01y_Yj.js.map +0 -1
  98. package/dist/messages-CV_K9I6j.js.map +0 -1
  99. package/dist/providers-C6rpOk0l.js.map +0 -1
  100. package/dist/tool-formatters-CCTIq3A-.d.ts.map +0 -1
  101. package/dist/tools-fqToqHik.js.map +0 -1
  102. package/dist/transcript-anchors-Br_NijUC.js.map +0 -1
  103. package/dist/transcript-anchors-DxAfqo4i.d.ts.map +0 -1
package/README.md CHANGED
@@ -80,6 +80,8 @@ createAgent({
80
80
  compactStrategy: 'off', // 'off' | 'tail' (non-Anthropic compaction)
81
81
  compactThreshold: 131_072, // 128 KiB
82
82
  compactKeepTurns: 4,
83
+ mediaKeepTurns: undefined, // age old image/document base64 off the wire; chat profiles use 8
84
+ autoCompact: false, // loop-native LLM summary at N% of the window; chat profiles enable it
83
85
  toolDisclosure: 'eager', // 'eager' | 'lazy' (hide MCP schemas behind tool_search)
84
86
  toolSearch: { tool: true, limit: 20 },
85
87
  },
@@ -355,6 +357,10 @@ agent.hooks.hook('context:transform', (ctx) => {
355
357
 
356
358
  `behavior.compactStrategy: 'tail'` elides older `tool_result` blocks once their combined size exceeds `compactThreshold` (default 128 KiB); the newest `compactKeepTurns` (default 4) stay intact. Anthropic users should prefer the server-side `context-management-2025-06-27` beta via `anthropic({ extraBetas, contextManagement })` — token-accurate.
357
359
 
360
+ `behavior.mediaKeepTurns` is separate: it ages old inline image/document base64 off the provider wire while keeping bytes in `session.turns`. Aged media becomes an `attachment://<hash>` marker that `read_file path="attachment://..."` can re-inline. SDK default is off; built-in chat profiles set it to `8`. Proactive age-out only runs when `read_file` is registered.
361
+
362
+ `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.
363
+
358
364
  ### Read dedup + read-before-edit guard
359
365
 
360
366
  - `behavior.dedupReads` (default **on**) — `read_file` returns `"unchanged since the previous read"` on identical re-reads. Per-session content-hash.
@@ -1,6 +1,6 @@
1
1
  import { c as ExecutionContext, f as TaskExitInfo, l as ExecutionHandle } from "./types-B39tBba1.js";
2
2
  import { Hookable } from "hookable";
3
- import { OAuthCredentials, getOAuthApiKey } from "@earendil-works/pi-ai/oauth";
3
+ import { OAuthCredentials } from "@earendil-works/pi-ai/oauth";
4
4
  import { OAuthClientProvider } from "@modelcontextprotocol/sdk/client/auth.js";
5
5
  import { Client } from "@modelcontextprotocol/sdk/client/index.js";
6
6
  import Anthropic from "@anthropic-ai/sdk";
@@ -766,6 +766,68 @@ type CompactFunction = (messages: SessionMessage[], ctx: {
766
766
  */
767
767
  totalBytes: number;
768
768
  }) => SessionMessage[] | Promise<SessionMessage[]>;
769
+ /**
770
+ * Loop-native auto-compaction config (`AgentBehavior.autoCompact`).
771
+ *
772
+ * Distinct from `compactStrategy` (wire-only tail elision of `tool_result`
773
+ * text). Auto-compaction is the heavy lever: when the last turn's input
774
+ * usage crosses {@link AutoCompactConfig.threshold} of the effective context
775
+ * window, the loop runs a real LLM summary (`compactConversation`) over the
776
+ * older turns, appends a `compact-summary` marker + restoration turns to the
777
+ * session mid-run, and the next turn's wire view is the summary plus the
778
+ * preserved tail. It mutates the session (durable summary turn), whereas
779
+ * `compactStrategy` never touches `session.turns`.
780
+ *
781
+ * The two compose: `compactStrategy: 'tail'` trims tool-output bytes every
782
+ * turn; `autoCompact` summarizes the narrative when the window fills.
783
+ */
784
+ interface AutoCompactConfig {
785
+ /**
786
+ * Fraction of the EFFECTIVE context window (raw window minus the output
787
+ * reserve) the last turn's input usage must reach to fire. Must be in the
788
+ * open interval `(0, 1)`; out-of-range disables the trigger. Default: `0.85`.
789
+ */
790
+ threshold?: number;
791
+ /**
792
+ * Raw model context window in tokens. The SDK core has no model catalog,
793
+ * so when omitted it falls back to `provider.meta.contextWindow` (a
794
+ * number, if the provider advertises one). When neither resolves, the
795
+ * trigger is inert — it can't compute a usage ratio. Chat hosts inject
796
+ * the picked model's window here from their catalog.
797
+ */
798
+ contextWindow?: number;
799
+ /**
800
+ * Trailing turns kept verbatim (passed to `compactConversation` as
801
+ * `scope: 'tail'` `keepTurns`). Defaults to `compactKeepTurns` when set,
802
+ * else `4`.
803
+ */
804
+ keepTurns?: number;
805
+ /**
806
+ * Hysteresis floor — minimum fraction of the window that must be consumed
807
+ * by NEW content after a compaction before another can fire, so the
808
+ * post-compact bounce doesn't immediately re-trigger. Default: `0.1`.
809
+ */
810
+ minGrowthFraction?: number;
811
+ /**
812
+ * Re-inject recently-read files + active skills as synthetic tool-call
813
+ * pairs after the summary marker (via `buildPostCompactAttachments`) so
814
+ * the model keeps its working set. Default: `true`.
815
+ */
816
+ restore?: boolean;
817
+ /**
818
+ * Consecutive-failure circuit breaker. After this many failed compaction
819
+ * attempts in a single run, the loop stops trying for the rest of the run
820
+ * (the reactive `context_exceeded` net still protects overflow). A
821
+ * successful compaction resets the counter. Default: `2`.
822
+ */
823
+ maxFailures?: number;
824
+ }
825
+ /**
826
+ * `AgentBehavior.autoCompact` value: `true` enables loop-native
827
+ * auto-compaction with defaults, `false` / omitted disables it, and an
828
+ * {@link AutoCompactConfig} enables it with overrides.
829
+ */
830
+ type AutoCompact = boolean | AutoCompactConfig;
769
831
  type DedupToolConfig = DedupHasher | {
770
832
  hasher: DedupHasher;
771
833
  mode?: 'replay' | 'block-after';
@@ -823,7 +885,8 @@ type RepeatGuardToolMatcher = string | ((name: string) => boolean);
823
885
  interface RepeatGuardConfig {
824
886
  /**
825
887
  * Consecutive identical calls at which the guard refuses the call via
826
- * `tool:gate` `block`. Clamped to `>= 2`. Default: `4`.
888
+ * `tool:gate` `block`. Clamped to `>= 2`. Default: `4` (`read_file` uses
889
+ * `6` unless this is explicitly configured).
827
890
  */
828
891
  blockThreshold?: number;
829
892
  /**
@@ -831,7 +894,8 @@ interface RepeatGuardConfig {
831
894
  * the agent's `AbortController` (the loop then fires `agent:abort`). Must
832
895
  * be `>` the block threshold to be reachable; clamped up if not. Set to a
833
896
  * non-positive value or `Infinity` to disable the abort escalation
834
- * (block-only). Default: `8`.
897
+ * (block-only). Default: `8` (`read_file` uses `12` unless this is
898
+ * explicitly configured).
835
899
  */
836
900
  abortThreshold?: number;
837
901
  /**
@@ -849,27 +913,54 @@ interface RepeatGuardConfig {
849
913
  */
850
914
  normalize?: (name: string, input: Record<string, unknown>) => string | undefined;
851
915
  /**
852
- * Model-visible refusal text at the block threshold, rendered as
853
- * `Blocked: <reason>`. String used verbatim; callback receives the tool
854
- * name and consecutive count. Default: a generic pivot suggestion.
916
+ * Model-visible steering text at the block threshold. Used as the
917
+ * `Blocked: <message>` reason for `thresholdAction: 'block'`, or appended
918
+ * to the successful tool result for `thresholdAction: 'steer'`. String used
919
+ * verbatim; callback receives the tool name and observed repeat count.
920
+ * Default: a generic pivot suggestion.
921
+ */
922
+ steeringMessage?: string | ((name: string, count: number) => string);
923
+ /**
924
+ * Legacy alias for {@link steeringMessage}. Preserved for callers already
925
+ * customizing the old block-only message.
855
926
  */
856
927
  blockReason?: string | ((name: string, count: number) => string);
857
928
  /**
858
- * Sliding-window counting instead of strictly-consecutive streaks.
929
+ * What to do at `blockThreshold`.
930
+ *
931
+ * - `'block'` (default) refuses the call via `tool:gate`, returning
932
+ * `Blocked: <steering message>`.
933
+ * - `'steer'` lets the tool execute, then appends the steering message to
934
+ * the tool result. `abortThreshold` still blocks and aborts the run.
935
+ */
936
+ thresholdAction?: 'block' | 'steer';
937
+ /**
938
+ * Repeat detector strategy.
939
+ *
940
+ * - `'chain'` — strict back-to-back chain counting. Any intervening tool
941
+ * call breaks the chain.
942
+ * - `'window'` — sliding-window counting. Interleaved calls can accumulate.
943
+ * - `'both'` — run both counters and trip when either reaches the threshold.
944
+ *
945
+ * Default: `'chain'`. For compatibility, setting {@link windowSize} without
946
+ * `mode` keeps the old `'window'` behavior.
947
+ */
948
+ mode?: 'chain' | 'window' | 'both';
949
+ /**
950
+ * Sliding-window size for `mode: 'window'` / `mode: 'both'`.
859
951
  *
860
952
  * When set (`>= 2`), a call's count is the number of occurrences of its
861
953
  * normalized key among that tool's last `windowSize` tracked calls
862
954
  * (including this one). A *different* payload of the same tool no longer
863
- * resets the count which is exactly how production loops evade the
864
- * consecutive streak: `read_file A / read_file B / read_file A / …` or a
865
- * read→edit→read ping-pong re-reads the same file every other call and
866
- * never accumulates a streak, burning turns until the cap.
955
+ * resets the count. This is opt-in non-chain behavior for consumers that
956
+ * explicitly want to catch interleaved repeats.
867
957
  *
868
958
  * The effective window is clamped up to the abort threshold (or the
869
959
  * block threshold when abort is disabled) so the thresholds stay
870
960
  * reachable.
871
961
  *
872
- * Default: `undefined` (consecutive streaks historic behavior).
962
+ * Default: `undefined` for `mode: 'chain'`; a conservative built-in default
963
+ * is used when `mode` requests window counting without an explicit size.
873
964
  */
874
965
  windowSize?: number;
875
966
  /**
@@ -891,13 +982,12 @@ interface RepeatGuardConfig {
891
982
  */
892
983
  countBlockedCalls?: boolean;
893
984
  /**
894
- * Universal repeat ceiling — the last-resort loop breaker. Independent of
895
- * {@link tools}, it counts exact `(tool, args)` repeats across EVERY tool
896
- * and aborts the run when one recurs this many times within
897
- * {@link globalCeilingWindow} calls of that tool. Catches loops the
898
- * per-tool streak/window misses: a `grep`/`glob`/`edit` cycle, or a model
899
- * hammering a tool stuck behind a sticky block (it counts blocked attempts,
900
- * unlike {@link countBlockedCalls}; never a `result` substitute).
985
+ * Universal repeat ceiling — the last-resort chain breaker. Independent of
986
+ * {@link tools}, it counts exact back-to-back `(tool, args)` repeats across
987
+ * EVERY tool and aborts the run when one recurs this many times in a row.
988
+ * Catches untracked tool chains and tools stuck behind a sticky block (it
989
+ * counts blocked attempts, unlike {@link countBlockedCalls}; never a
990
+ * `result` substitute).
901
991
  *
902
992
  * Set high enough that honest retries don't trip it. The main false-positive
903
993
  * risk is a tool that's legitimately polled with identical args many times
@@ -907,8 +997,8 @@ interface RepeatGuardConfig {
907
997
  */
908
998
  globalCeiling?: number;
909
999
  /**
910
- * Sliding window (per run + tool) the {@link globalCeiling} counts repeats
911
- * within. Clamped up to the ceiling so it stays reachable. Default: `40`.
1000
+ * Deprecated no-op kept for config compatibility. The {@link globalCeiling}
1001
+ * now uses strict chain counting, not a sliding window.
912
1002
  */
913
1003
  globalCeilingWindow?: number;
914
1004
  /**
@@ -1024,6 +1114,86 @@ interface AgentBehavior {
1024
1114
  * are ignored).
1025
1115
  */
1026
1116
  maxWallMs?: number;
1117
+ /**
1118
+ * Provider first-response watchdog in milliseconds.
1119
+ *
1120
+ * Starts at `stream:start` and is cleared by the first text/thinking/server
1121
+ * tool callback or by the provider returning a tool-only/final result. If it
1122
+ * expires, the loop aborts the provider request signal and surfaces a typed
1123
+ * provider error instead of leaving `agent.run()` pending forever.
1124
+ *
1125
+ * `maxWallMs`, when lower, bounds this value too. Set `0` to disable.
1126
+ * Default: 300000 (5 minutes).
1127
+ */
1128
+ providerStreamStartTimeoutMs?: number;
1129
+ /**
1130
+ * Provider total stream watchdog in milliseconds.
1131
+ *
1132
+ * Bounds the whole `provider.stream()` call, including streams that already
1133
+ * produced partial output but never settle. If it expires, the loop aborts
1134
+ * the provider request signal and surfaces the timeout as a provider error.
1135
+ *
1136
+ * `maxWallMs`, when lower, bounds this value too. Set `0` to disable.
1137
+ * Default: 1800000 (30 minutes).
1138
+ */
1139
+ providerStreamTimeoutMs?: number;
1140
+ /**
1141
+ * Custom MCP connector watchdog in milliseconds.
1142
+ *
1143
+ * The built-in `connectMcpServers()` has per-server bootstrap timeouts. This
1144
+ * extra guard protects embedders that provide `mcpConnector` and accidentally
1145
+ * return a promise that never settles before the first model call.
1146
+ *
1147
+ * `maxWallMs`, when lower, bounds this value during `run()`. Set `0` to
1148
+ * disable. Default: 120000 (2 minutes).
1149
+ */
1150
+ mcpConnectTimeoutMs?: number;
1151
+ /**
1152
+ * Watchdog for awaited hook dispatch (in milliseconds).
1153
+ *
1154
+ * Bounds every awaited `hooks.callHook(...)` the agent loop and run
1155
+ * lifecycle await — `context:transform` / `system:transform` /
1156
+ * `turn:before` / `stream:start` / `turn:after` / `stream:end` /
1157
+ * `tool-results:after`, plus the run-setup (`session:start`,
1158
+ * `agent:start`) and run-teardown (`agent:done`, `session:end`,
1159
+ * `session:turns`, `skills:deactivate`) hooks. A host handler that never
1160
+ * resolves would otherwise hang the first turn (before the provider
1161
+ * watchdog can run) or strand the `running` gate during cleanup.
1162
+ *
1163
+ * State-mutating pre-stream hooks surface a timeout as a typed
1164
+ * `OperationTimeoutError` (fail-closed — a half-applied transform must
1165
+ * not reach the wire); observability/lifecycle hooks log under
1166
+ * `ZIDANE_DEBUG` and continue. Generous by design — the goal is catching
1167
+ * infinite hangs, not policing slow handlers.
1168
+ *
1169
+ * Set `0` to disable. Default: 300000 (5 minutes).
1170
+ */
1171
+ hookTimeoutMs?: number;
1172
+ /**
1173
+ * Watchdog for the first `executionContext.spawn()` (in milliseconds).
1174
+ *
1175
+ * The process context spawns synchronously, but docker / sandbox / e2b /
1176
+ * daytona contexts do daemon + network round-trips (image pull, container
1177
+ * create/start) with no inherent timeout. This bounds that first spawn so
1178
+ * a hung daemon surfaces a typed `OperationTimeoutError` instead of a run
1179
+ * that never starts responding.
1180
+ *
1181
+ * `maxWallMs`, when lower, bounds this value too. Set `0` to disable.
1182
+ * Default: 300000 (5 minutes). Raise for hosts doing large first-time
1183
+ * image pulls on slow links.
1184
+ */
1185
+ spawnTimeoutMs?: number;
1186
+ /**
1187
+ * Watchdog for `agent.destroy()` teardown awaits (in milliseconds).
1188
+ *
1189
+ * Bounds each awaited teardown step (pending MCP warmup, MCP connection
1190
+ * `close()`, execution-context `destroy()`) so a custom connector / sandbox
1191
+ * whose `close()` never settles can't strand `destroy()` — which hosts
1192
+ * await before releasing their own run gate (TUI session switch). Steps
1193
+ * that time out are abandoned and teardown continues. Set `0` to disable.
1194
+ * Default: 30000 (30 seconds).
1195
+ */
1196
+ destroyTimeoutMs?: number;
1027
1197
  /**
1028
1198
  * Bounded retry-with-backoff policy applied around `provider.stream()`.
1029
1199
  *
@@ -1046,6 +1216,17 @@ interface AgentBehavior {
1046
1216
  * headers honored when present. Set `maxAttempts: 1` to disable.
1047
1217
  */
1048
1218
  retry?: RetryConfig;
1219
+ /**
1220
+ * Custom `toolBatchExecutor` watchdog in milliseconds.
1221
+ *
1222
+ * Native tool execution keeps its existing per-tool/cancellation semantics.
1223
+ * This only bounds a host-provided batch executor; on timeout the executor's
1224
+ * signal is aborted and the pending tool calls receive error tool results so
1225
+ * a tool-only assistant turn cannot hang the run forever.
1226
+ *
1227
+ * Set `0` / `undefined` to disable. Default: disabled.
1228
+ */
1229
+ toolBatchTimeoutMs?: number;
1049
1230
  /** Max tokens per LLM response (default: 16384) */
1050
1231
  maxTokens?: number;
1051
1232
  /** Thinking token budget — overrides the level-based default when set */
@@ -1214,25 +1395,29 @@ interface AgentBehavior {
1214
1395
  * Consecutive-identical-call repeat guard. Unlike {@link dedupTools} (keyed
1215
1396
  * on argument hash, replays/blocks per the consumer's hasher) and
1216
1397
  * {@link toolBudgets} (run-cumulative count regardless of payload), the
1217
- * repeat guard watches a **per-tool streak of back-to-back identical
1218
- * payloads** and escalates:
1219
- *
1220
- * - At `blockThreshold` (default 4) consecutive identical calls: refuse the
1221
- * call via `tool:gate` `block` with a pivot suggestion. Fires
1222
- * `repeat-guard:exceeded` with `action: 'block'`.
1223
- * - At `abortThreshold` (default 8) consecutive identical calls: abort the
1224
- * whole run via the agent's `AbortController` (the loop then fires
1225
- * `agent:abort`, the same path a user cancel takes). A
1226
- * `repeat-guard:exceeded` event with `action: 'abort'` fires first so
1227
- * consumers can distinguish a guard abort from a user cancel. This is the
1228
- * only layer that stops a model which ignores the `Blocked:` reason and
1229
- * keeps retrying.
1230
- *
1231
- * "Consecutive" is **per tracked tool**: a call to a *different* tracked
1232
- * tool, or the *same* tool with a different normalized payload, resets that
1233
- * tool's streak. Calls to *untracked* tools never reset any streak, so
1234
- * `shell X / read_file Y / shell X` still counts as two consecutive
1235
- * `shell X`.
1398
+ * repeat guard watches a **run-local chain of back-to-back identical
1399
+ * tool payloads** and escalates:
1400
+ *
1401
+ * - At `blockThreshold` (default 4; `read_file` default 6)
1402
+ * consecutive identical calls: either refuse the call via `tool:gate`
1403
+ * `block` or let it execute and append a steering message, depending on
1404
+ * {@link RepeatGuardConfig.thresholdAction}. Fires
1405
+ * `repeat-guard:exceeded` with `action: 'block' | 'steer'`.
1406
+ * - At `abortThreshold` (default 8; `read_file` default 12)
1407
+ * consecutive identical calls: abort the whole run via the agent's
1408
+ * `AbortController` (the loop then fires `agent:abort`, the same path a
1409
+ * user cancel takes). A `repeat-guard:exceeded` event with
1410
+ * `action: 'abort'` fires first so consumers can distinguish a guard abort
1411
+ * from a user cancel. This is the only layer that stops a model which
1412
+ * ignores the `Blocked:` reason and keeps retrying.
1413
+ *
1414
+ * "Consecutive" means the next tool call in the run is the same tracked
1415
+ * tool with the same normalized payload. Any intervening tool call, tracked
1416
+ * or not, breaks the chain.
1417
+ *
1418
+ * `mode: 'window'` intentionally relaxes that definition. `mode: 'both'`
1419
+ * keeps the chain guard while also catching interleaved repeats inside
1420
+ * {@link windowSize}.
1236
1421
  *
1237
1422
  * `track` selects which tools the guard watches. Each entry is a predicate
1238
1423
  * over the canonical tool name; a string entry matches that exact name. The
@@ -1361,6 +1546,27 @@ interface AgentBehavior {
1361
1546
  * for elision so the model keeps the freshest tool context. Default: `4`.
1362
1547
  */
1363
1548
  compactKeepTurns?: number;
1549
+ /**
1550
+ * Loop-native auto-compaction. When enabled, the agent loop watches each
1551
+ * turn's input usage and — once it crosses the configured fraction of the
1552
+ * effective context window — runs a real LLM summary over the older turns
1553
+ * mid-run, appends a `compact-summary` marker (+ optional file/skill
1554
+ * restoration) to the session, and continues. The next turn's wire view
1555
+ * is the summary plus the preserved tail.
1556
+ *
1557
+ * `true` enables with defaults (`threshold: 0.85`, restore on); an
1558
+ * {@link AutoCompactConfig} overrides individual knobs. Requires a window
1559
+ * source — `autoCompact.contextWindow` or `provider.meta.contextWindow` —
1560
+ * or the trigger stays inert. Reuses the same `shouldAutoCompact` policy
1561
+ * the chat hosts use.
1562
+ *
1563
+ * Distinct from `compactStrategy` (per-turn wire-only tool-output trim)
1564
+ * and from the always-on reactive `context_exceeded` recovery. Observe
1565
+ * via the `compact:start` / `compact:end` hooks.
1566
+ *
1567
+ * Default: `undefined` (off). The built-in chat profiles enable it.
1568
+ */
1569
+ autoCompact?: AutoCompact;
1364
1570
  /**
1365
1571
  * Prefix every line of `read_file` output with its 1-indexed line number
1366
1572
  * followed by a tab (`<N>\t<content>`) — the compact `cat -n`-style
@@ -1395,6 +1601,28 @@ interface AgentBehavior {
1395
1601
  * Default: `false`.
1396
1602
  */
1397
1603
  elideStaleReads?: boolean;
1604
+ /**
1605
+ * Age base64 media (top-level `image` / `document` blocks AND image /
1606
+ * document parts nested in `tool_result` outputs) off the **wire** once it
1607
+ * is older than the last `mediaKeepTurns` messages. The aged-out block is
1608
+ * replaced with a short text marker carrying a re-resolve handle
1609
+ * (`attachment://<hash>`); the persisted session keeps the original bytes
1610
+ * untouched, so the model can pull any image back on demand with
1611
+ * `read_file path="attachment://<hash>"`.
1612
+ *
1613
+ * This is the long-run de-bloat lever: a screenshot or pasted image is only
1614
+ * carried as base64 for a few recent turns instead of riding the prompt
1615
+ * forever. Distinct from `compactStrategy: 'tail'`, which only stubs
1616
+ * `tool_result` *text* and never counts (or trims) media bytes.
1617
+ *
1618
+ * The frontier is chunk-snapped for prompt-cache stability — media drops
1619
+ * out in discrete jumps, not one block per turn. `0` ages out ALL media;
1620
+ * `undefined` (default) disables the pass entirely (current behavior — media
1621
+ * rides every turn). The built-in chat profiles enable it.
1622
+ *
1623
+ * Default: `undefined` (off).
1624
+ */
1625
+ mediaKeepTurns?: number;
1398
1626
  /**
1399
1627
  * Separator used for provider-facing MCP tool names.
1400
1628
  *
@@ -2503,6 +2731,54 @@ interface SpawnHookContext {
2503
2731
  interface StreamHookContext {
2504
2732
  turnId: string;
2505
2733
  }
2734
+ /**
2735
+ * Base context for the loop-native auto-compaction hooks
2736
+ * (`compact:start` / `compact:end`). Fired at a turn boundary by the agent
2737
+ * loop when `behavior.autoCompact` is enabled and the threshold trips — not
2738
+ * during a provider stream, so it carries the run/turn coordinates rather
2739
+ * than extending {@link StreamHookContext}.
2740
+ */
2741
+ interface CompactHookContext {
2742
+ /** Run that triggered the compaction. */
2743
+ runId: string;
2744
+ /** Bound session id, when the run has a session. */
2745
+ sessionId?: string;
2746
+ /** 0-based index of the turn after which compaction fired. */
2747
+ turn: number;
2748
+ /** Why compaction ran. Currently only the proactive threshold trigger. */
2749
+ reason: 'auto';
2750
+ }
2751
+ /** Fired right before the summary call starts. See `compact:start`. */
2752
+ interface CompactStartHookContext extends CompactHookContext {
2753
+ /** Fraction of the effective window the last turn's input reached. */
2754
+ usedFraction: number;
2755
+ /** Effective window (raw minus output reserve) used for the ratio. */
2756
+ effectiveWindow: number;
2757
+ }
2758
+ /**
2759
+ * Fired exactly once after a `compact:start`, on every outcome. `status`
2760
+ * discriminates success (carries the result counts + post-compact size
2761
+ * estimate hosts use to refresh their context indicator) from failure.
2762
+ */
2763
+ type CompactEndHookContext = CompactHookContext & ({
2764
+ status: 'success'; /** Number of turn ids the summary replaced on the wire. */
2765
+ replacedCount: number; /** Turns dropped by `prompt_too_long` head-truncation (not summarized). */
2766
+ droppedCount: number; /** Files re-injected by post-compact restoration. */
2767
+ restoredFiles: number; /** Skills re-injected by post-compact restoration. */
2768
+ restoredSkills: number; /** Model that produced the summary. */
2769
+ summaryModel: string;
2770
+ /**
2771
+ * Estimated post-compact effective token size (summary output +
2772
+ * restored attachments). Hosts latch this into their context indicator
2773
+ * so it drops immediately instead of waiting for the next real turn.
2774
+ */
2775
+ effectiveTokens: number;
2776
+ durationMs: number;
2777
+ } | {
2778
+ status: 'error'; /** The thrown value from `compactConversation` / restoration. */
2779
+ error: unknown;
2780
+ durationMs: number;
2781
+ });
2506
2782
  /** Context for OAuth refresh hooks */
2507
2783
  interface OAuthRefreshHookContext {
2508
2784
  provider: string;
@@ -3366,6 +3642,16 @@ interface StreamCallbacks {
3366
3642
  toolName: string;
3367
3643
  content: unknown;
3368
3644
  }) => void;
3645
+ /**
3646
+ * Fires when the provider observes incremental tool-call activity — a
3647
+ * tool-use content block opening or its input-JSON streaming. Carries no
3648
+ * payload: it exists purely as a liveness signal so the loop's
3649
+ * first-response watchdog doesn't abort a turn that streams ONLY tool
3650
+ * calls (no text / thinking deltas). Optional — providers that can't
3651
+ * surface tool-call deltas simply don't call it (the watchdog then falls
3652
+ * back to the total-stream timeout for such turns).
3653
+ */
3654
+ onToolCallDelta?: () => void;
3369
3655
  }
3370
3656
  interface TurnResult {
3371
3657
  /** Full assistant turn as a SessionMessage */
@@ -4986,6 +5272,27 @@ interface AgentHooks {
4986
5272
  attempt: number;
4987
5273
  err: unknown;
4988
5274
  }) => void;
5275
+ /**
5276
+ * Fires when loop-native auto-compaction (`behavior.autoCompact`) crosses
5277
+ * its threshold and is about to run the summary call, BEFORE the provider
5278
+ * round-trip. Distinct from `context:overflow` (the reactive, wire-only
5279
+ * `context_exceeded` net) — this is the proactive heavy compaction that
5280
+ * summarizes older turns and mutates the session.
5281
+ *
5282
+ * Use it to surface a "Compacting…" banner / footer state. Observational
5283
+ * — handlers cannot cancel the compaction. Always paired with exactly one
5284
+ * `compact:end`.
5285
+ */
5286
+ 'compact:start': (ctx: CompactStartHookContext) => void;
5287
+ /**
5288
+ * Fires exactly once after every `compact:start`, on success and failure
5289
+ * (`ctx.status`). On success it carries the replaced/dropped/restored
5290
+ * counts and the post-compact `effectiveTokens` estimate so hosts can drop
5291
+ * their context indicator immediately. On failure it carries `error`; the
5292
+ * loop continues with the un-compacted history (the reactive overflow net
5293
+ * still applies) and the circuit breaker counts the failure.
5294
+ */
5295
+ 'compact:end': (ctx: CompactEndHookContext) => void;
4989
5296
  'oauth:refresh': (ctx: OAuthRefreshHookContext) => void;
4990
5297
  /**
4991
5298
  * Resolves persisted content refs into provider-bound payload bytes.
@@ -5892,19 +6199,21 @@ interface AgentHooks {
5892
6199
  }) => void;
5893
6200
  /**
5894
6201
  * Fires when the consecutive-identical {@link AgentBehavior.repeatGuard}
5895
- * escalates on a tracked tool. `count` is the number of back-to-back
5896
- * identical calls including the offending one. `action` reflects the
5897
- * escalation: `'block'` refused this call via `tool:gate`; `'abort'`
5898
- * additionally aborts the run via the agent's `AbortController` (the loop
5899
- * then fires `agent:abort`). The `'abort'` event fires BEFORE the abort so
5900
- * consumers can distinguish a guard abort from a user-driven cancel.
6202
+ * escalates on a tracked tool. In chain mode, `count` is the number of
6203
+ * back-to-back identical calls including the offending one; in window mode it
6204
+ * is the number of occurrences inside the configured window. `action`
6205
+ * reflects the escalation: `'block'` refused this call via `tool:gate`;
6206
+ * `'steer'` let it execute and appended a steering message to the result;
6207
+ * `'abort'` additionally aborts the run via the agent's `AbortController`
6208
+ * (the loop then fires `agent:abort`). The `'abort'` event fires BEFORE the
6209
+ * abort so consumers can distinguish a guard abort from a user-driven cancel.
5901
6210
  */
5902
6211
  'repeat-guard:exceeded': (ctx: {
5903
6212
  tool: string;
5904
6213
  count: number;
5905
6214
  threshold: number;
5906
6215
  turnId: string;
5907
- action: 'block' | 'abort';
6216
+ action: 'block' | 'steer' | 'abort';
5908
6217
  }) => void;
5909
6218
  /**
5910
6219
  * The run was aborted — fires exactly once per aborted run, on every abort
@@ -6303,5 +6612,5 @@ declare function createAgent({
6303
6612
  clock: agentClock
6304
6613
  }: AgentOptions): Agent;
6305
6614
  //#endregion
6306
- export { EnsureToolResultPairingOptions as $, toolResultToText as $n, planBasetenReasoning as $t, hashContent as A, SessionContentBlock as An, SchemaSanitizeOptions as At, Session as B, ToolOutcome as Bn, classifyOpenAICompatError as Bt, wrapDiscoveredMcpTools as C, PromptVideoPart as Cn, TokenCountPayload as Ct, ReadStateEntry as D, ResolveContentRefBlock as Dn, TurnResult as Dt, ToolMap as E, ResolveContentRef as En, ToolSpec as Et, SkillDiagnostic as F, SpawnHookContext as Fn, OpenRouterParams as Ft, demoteStaleRunningStatus as G, ToolResultImageContent as Gn, LocalParams as Gt, SessionRun as H, ToolResultContent as Hn, openaiCompat as Ht, SkillResource as I, StreamHookContext as In, openrouter as It, createRemoteStore as J, ToolResultVideoContent as Jn, cursor as Jt, loadSession as K, ToolResultImageRefContent as Kn, local as Kt, SkillSource as L, ThinkingLevel as Ln, OpenAICompatAuthHeader as Lt, resolveReadStateMap as M, SessionHookContext as Mn, SchemaSanitizeResult as Mt, ShellInterpolationApproval as N, SessionMessage as Nn, sanitizeToolSchema as Nt, ReadStateMap as O, RetryConfig as On, XaiParams as Ot, SkillConfig as P, SessionTurn as Pn, sanitizeToolSpecs as Pt, createFileMapStore as Q, toolOutputByteLength as Qn, baseten as Qt, SkillsConfig as R, ToolBatchExecutor as Rn, OpenAICompatHttpError as Rt, resultToString as S, PromptTextPart as Sn, StreamOptions as St, ToolDef as T, RepeatGuardToolMatcher as Tn, ToolResult as Tt, SessionStore as U, ToolResultDocumentContent as Un, OpenAIParams as Ut, SessionData as V, ToolResultAudioContent as Vn, mapOAIFinishReason as Vt, createSession as W, ToolResultDocumentRefContent as Wn, openai as Wt, FileMapAdapter as X, TurnUsage as Xn, cerebras as Xt, createMemoryStore as Y, TurnFinishReason as Yn, CerebrasParams as Yt, FileMapStoreOptions as Z, toolOutputBudgetByteLength as Zn, BasetenParams as Zt, attachStderrWarnPump as _, OAuthRefreshHookContext as _n, ContextItem as _r, toOpenAI as _t, McpConnector as a, AgentBehavior as an, AgentToolPairingError as ar, TOOL_USE_INTERRUPTED_MARKER as at, normalizeMcpBlocks as b, PromptImagePart as bn, ContextUsageSplit as br, ProviderCapabilities as bt, createAgent as c, AgentStats as cn, ClassifiedErrorKind as cr, autoDetectAndConvert as ct, DeactivationReason as d, DEFAULT_AGENT_CLOCK as dn, toTypedError as dr, ensureToolResultPairing as dt, ArceeParams as en, AgentAbortedError as er, ORPHANED_TOOL_RESULT_MARKER as et, SkillActivationState as f, DedupHasher as fn, ContextBreakdown as fr, filterUnresolvedToolUses as ft, McpConnection as g, McpToolSchema as gn, ContextExactCounts as gr, toAnthropic as gt, ConnectMcpServersOptions as h, McpToolHookContext as hn, ContextCategoryId as hr, remintDuplicateToolCallIds as ht, AgentOptions as i, applyAnthropicCacheBreakpoints as in, AgentToolNotAllowedError as ir, SYNTHETIC_TOOL_RESULT_PLACEHOLDER as it, readStateKey as j, SessionEndStatus as jn, SchemaSanitizeProfile as jt, getReadState as k, RunHookMap as kn, xai as kt, ActivationVia as l, ChildRunStats as ln, errorMessage as lr, detectTurnInterruption as lt, createSkillActivationState as m, McpServerConfig as mn, ContextCategory as mr, fromOpenAI as mt, AgentHookMap as n, AnthropicParams as nn, AgentContextExceededError as nr, PairingRepairMode as nt, McpToolMeta as o, AgentClock as on, CONTEXT_EXCEEDED_MESSAGE_PATTERNS as or, ToWireMessagesOptions as ot, SkillActivationStateOptions as p, DedupToolConfig as pn, ContextBreakdownOptions as pr, fromAnthropic as pt, RemoteStoreOptions as q, ToolResultTextContent as qn, CursorParams as qt, AgentHooks as r, anthropic as rn, AgentProviderError as rr, RemintResult as rt, McpToolWrap as s, AgentRunOptions as sn, ClassifiedError as sr, TurnInterruptionState as st, Agent as t, arcee as tn, AgentBudgetExceededError as tr, PairingRepair as tt, ActiveSkill as u, CompactFunction as un, matchesContextExceeded as ur, ensureEndsWithUserMessage as ut, connectMcpServers as v, PromptAudioPart as vn, ContextMcpGroup as vr, toWireMessages as vt, ToolContext as w, RepeatGuardConfig as wn, ToolCall as wt, normalizeMcpServers as x, PromptPart as xn, buildContextBreakdown as xr, StreamCallbacks as xt, deriveMcpToolMeta as y, PromptDocumentPart as yn, ContextSnapshot as yr, Provider as yt, CreateSessionOptions as z, ToolHookContext as zn, OpenAICompatParams as zt };
6307
- //# sourceMappingURL=agent-DFxjgQx5.d.ts.map
6615
+ export { EnsureToolResultPairingOptions as $, ToolResultVideoContent as $n, planBasetenReasoning as $t, hashContent as A, RepeatGuardToolMatcher as An, SchemaSanitizeOptions as At, Session as B, SpawnHookContext as Bn, classifyOpenAICompatError as Bt, wrapDiscoveredMcpTools as C, PromptAudioPart as Cn, ContextMcpGroup as Cr, TokenCountPayload as Ct, ReadStateEntry as D, PromptTextPart as Dn, TurnResult as Dt, ToolMap as E, PromptPart as En, buildContextBreakdown as Er, ToolSpec as Et, SkillDiagnostic as F, SessionContentBlock as Fn, OpenRouterParams as Ft, demoteStaleRunningStatus as G, ToolOutcome as Gn, LocalParams as Gt, SessionRun as H, ThinkingLevel as Hn, openaiCompat as Ht, SkillResource as I, SessionEndStatus as In, openrouter as It, createRemoteStore as J, ToolResultDocumentContent as Jn, cursor as Jt, loadSession as K, ToolResultAudioContent as Kn, local as Kt, SkillSource as L, SessionHookContext as Ln, OpenAICompatAuthHeader as Lt, resolveReadStateMap as M, ResolveContentRefBlock as Mn, SchemaSanitizeResult as Mt, ShellInterpolationApproval as N, RetryConfig as Nn, sanitizeToolSchema as Nt, ReadStateMap as O, PromptVideoPart as On, XaiParams as Ot, SkillConfig as P, RunHookMap as Pn, sanitizeToolSpecs as Pt, createFileMapStore as Q, ToolResultTextContent as Qn, baseten as Qt, SkillsConfig as R, SessionMessage as Rn, OpenAICompatHttpError as Rt, resultToString as S, OAuthRefreshHookContext as Sn, ContextItem as Sr, StreamOptions as St, ToolDef as T, PromptImagePart as Tn, ContextUsageSplit as Tr, ToolResult as Tt, SessionStore as U, ToolBatchExecutor as Un, OpenAIParams as Ut, SessionData as V, StreamHookContext as Vn, mapOAIFinishReason as Vt, createSession as W, ToolHookContext as Wn, openai as Wt, FileMapAdapter as X, ToolResultImageContent as Xn, cerebras as Xt, createMemoryStore as Y, ToolResultDocumentRefContent as Yn, CerebrasParams as Yt, FileMapStoreOptions as Z, ToolResultImageRefContent as Zn, BasetenParams as Zt, attachStderrWarnPump as _, DedupHasher as _n, ContextBreakdown as _r, toOpenAI as _t, McpConnector as a, AgentBehavior as an, AgentAbortedError as ar, TOOL_USE_INTERRUPTED_MARKER as at, normalizeMcpBlocks as b, McpToolHookContext as bn, ContextCategoryId as br, ProviderCapabilities as bt, createAgent as c, AgentStats as cn, AgentProviderError as cr, autoDetectAndConvert as ct, DeactivationReason as d, ChildRunStats as dn, CONTEXT_EXCEEDED_MESSAGE_PATTERNS as dr, ensureToolResultPairing as dt, ArceeParams as en, TurnFinishReason as er, ORPHANED_TOOL_RESULT_MARKER as et, SkillActivationState as f, CompactEndHookContext as fn, ClassifiedError as fr, filterUnresolvedToolUses as ft, McpConnection as g, DEFAULT_AGENT_CLOCK as gn, toTypedError as gr, toAnthropic as gt, ConnectMcpServersOptions as h, CompactStartHookContext as hn, matchesContextExceeded as hr, remintDuplicateToolCallIds as ht, AgentOptions as i, applyAnthropicCacheBreakpoints as in, toolResultToText as ir, SYNTHETIC_TOOL_RESULT_PLACEHOLDER as it, readStateKey as j, ResolveContentRef as jn, SchemaSanitizeProfile as jt, getReadState as k, RepeatGuardConfig as kn, xai as kt, ActivationVia as l, AutoCompact as ln, AgentToolNotAllowedError as lr, detectTurnInterruption as lt, createSkillActivationState as m, CompactHookContext as mn, errorMessage as mr, fromOpenAI as mt, AgentHookMap as n, AnthropicParams as nn, toolOutputBudgetByteLength as nr, PairingRepairMode as nt, McpToolMeta as o, AgentClock as on, AgentBudgetExceededError as or, ToWireMessagesOptions as ot, SkillActivationStateOptions as p, CompactFunction as pn, ClassifiedErrorKind as pr, fromAnthropic as pt, RemoteStoreOptions as q, ToolResultContent as qn, CursorParams as qt, AgentHooks as r, anthropic as rn, toolOutputByteLength as rr, RemintResult as rt, McpToolWrap as s, AgentRunOptions as sn, AgentContextExceededError as sr, TurnInterruptionState as st, Agent as t, arcee as tn, TurnUsage as tr, PairingRepair as tt, ActiveSkill as u, AutoCompactConfig as un, AgentToolPairingError as ur, ensureEndsWithUserMessage as ut, connectMcpServers as v, DedupToolConfig as vn, ContextBreakdownOptions as vr, toWireMessages as vt, ToolContext as w, PromptDocumentPart as wn, ContextSnapshot as wr, ToolCall as wt, normalizeMcpServers as x, McpToolSchema as xn, ContextExactCounts as xr, StreamCallbacks as xt, deriveMcpToolMeta as y, McpServerConfig as yn, ContextCategory as yr, Provider as yt, CreateSessionOptions as z, SessionTurn as zn, OpenAICompatParams as zt };
6616
+ //# sourceMappingURL=agent-Db4ojCSV.d.ts.map