stitchkit 0.129.0 → 0.130.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 (156) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/agent-executor/acp/v1-connect.d.ts +87 -19
  3. package/dist/agent-executor/acp/v1-connect.d.ts.map +1 -1
  4. package/dist/agent-executor/acp/v1-driver.d.ts +4 -2
  5. package/dist/agent-executor/acp/v1-driver.d.ts.map +1 -1
  6. package/dist/agent-executor/acp/v1-handlers.d.ts +56 -0
  7. package/dist/agent-executor/acp/v1-handlers.d.ts.map +1 -0
  8. package/dist/agent-executor/acp/v1-map.d.ts +13 -2
  9. package/dist/agent-executor/acp/v1-map.d.ts.map +1 -1
  10. package/dist/agent-executor/acp/v1-permission.d.ts +44 -0
  11. package/dist/agent-executor/acp/v1-permission.d.ts.map +1 -0
  12. package/dist/agent-executor/acp/v1-protocol.d.ts +63 -10
  13. package/dist/agent-executor/acp/v1-protocol.d.ts.map +1 -1
  14. package/dist/agent-executor/acp/v1-session.d.ts +34 -7
  15. package/dist/agent-executor/acp/v1-session.d.ts.map +1 -1
  16. package/dist/agent-executor/acp/v1-turn.d.ts +51 -13
  17. package/dist/agent-executor/acp/v1-turn.d.ts.map +1 -1
  18. package/dist/agent-executor/claude/classify.d.ts +10 -0
  19. package/dist/agent-executor/claude/classify.d.ts.map +1 -1
  20. package/dist/agent-executor/claude/cli-driver.d.ts +4 -1
  21. package/dist/agent-executor/claude/cli-driver.d.ts.map +1 -1
  22. package/dist/agent-executor/claude/events.d.ts +146 -0
  23. package/dist/agent-executor/claude/events.d.ts.map +1 -0
  24. package/dist/agent-executor/claude/limits.d.ts +7 -1
  25. package/dist/agent-executor/claude/limits.d.ts.map +1 -1
  26. package/dist/agent-executor/claude/protocol.d.ts +49 -9
  27. package/dist/agent-executor/claude/protocol.d.ts.map +1 -1
  28. package/dist/agent-executor/claude/session.d.ts +2 -0
  29. package/dist/agent-executor/claude/session.d.ts.map +1 -1
  30. package/dist/agent-executor/claude-sdk/controls.d.ts +10 -1
  31. package/dist/agent-executor/claude-sdk/controls.d.ts.map +1 -1
  32. package/dist/agent-executor/claude-sdk/driver.d.ts +97 -3
  33. package/dist/agent-executor/claude-sdk/driver.d.ts.map +1 -1
  34. package/dist/agent-executor/claude-sdk/probe.d.ts +29 -0
  35. package/dist/agent-executor/claude-sdk/probe.d.ts.map +1 -0
  36. package/dist/agent-executor/claude-sdk/query-loop.d.ts +53 -5
  37. package/dist/agent-executor/claude-sdk/query-loop.d.ts.map +1 -1
  38. package/dist/agent-executor/claude-sdk/query-options.d.ts +2 -0
  39. package/dist/agent-executor/claude-sdk/query-options.d.ts.map +1 -1
  40. package/dist/agent-executor/claude-sdk/session.d.ts +2 -3
  41. package/dist/agent-executor/claude-sdk/session.d.ts.map +1 -1
  42. package/dist/agent-executor/claude-sdk/turn-usage.d.ts +81 -0
  43. package/dist/agent-executor/claude-sdk/turn-usage.d.ts.map +1 -0
  44. package/dist/agent-executor/codex/classify.d.ts +4 -0
  45. package/dist/agent-executor/codex/classify.d.ts.map +1 -1
  46. package/dist/agent-executor/codex/connect.d.ts +2 -1
  47. package/dist/agent-executor/codex/connect.d.ts.map +1 -1
  48. package/dist/agent-executor/codex/control-client.d.ts +168 -0
  49. package/dist/agent-executor/codex/control-client.d.ts.map +1 -0
  50. package/dist/agent-executor/codex/driver.d.ts +22 -2
  51. package/dist/agent-executor/codex/driver.d.ts.map +1 -1
  52. package/dist/agent-executor/codex/handlers.d.ts +47 -0
  53. package/dist/agent-executor/codex/handlers.d.ts.map +1 -0
  54. package/dist/agent-executor/codex/limits.d.ts.map +1 -1
  55. package/dist/agent-executor/codex/protocol.d.ts +124 -0
  56. package/dist/agent-executor/codex/protocol.d.ts.map +1 -1
  57. package/dist/agent-executor/codex/request-answers.d.ts +101 -0
  58. package/dist/agent-executor/codex/request-answers.d.ts.map +1 -0
  59. package/dist/agent-executor/codex/session-controls.d.ts +91 -51
  60. package/dist/agent-executor/codex/session-controls.d.ts.map +1 -1
  61. package/dist/agent-executor/codex/session.d.ts +34 -12
  62. package/dist/agent-executor/codex/session.d.ts.map +1 -1
  63. package/dist/agent-executor/codex/shared-server.d.ts +29 -0
  64. package/dist/agent-executor/codex/shared-server.d.ts.map +1 -0
  65. package/dist/agent-executor/codex/shared-thread.d.ts +46 -0
  66. package/dist/agent-executor/codex/shared-thread.d.ts.map +1 -0
  67. package/dist/agent-executor/codex/thread-controls.d.ts +128 -0
  68. package/dist/agent-executor/codex/thread-controls.d.ts.map +1 -0
  69. package/dist/agent-executor/codex/turn-input.d.ts +30 -0
  70. package/dist/agent-executor/codex/turn-input.d.ts.map +1 -0
  71. package/dist/agent-executor/contract.d.ts +77 -0
  72. package/dist/agent-executor/contract.d.ts.map +1 -1
  73. package/dist/agent-executor/engine.d.ts +6 -2
  74. package/dist/agent-executor/engine.d.ts.map +1 -1
  75. package/dist/agent-executor/executor-contract.d.ts +54 -0
  76. package/dist/agent-executor/executor-contract.d.ts.map +1 -1
  77. package/dist/agent-executor/handoff-schemas.d.ts +407 -0
  78. package/dist/agent-executor/handoff-schemas.d.ts.map +1 -0
  79. package/dist/agent-executor/handoff.d.ts +12 -0
  80. package/dist/agent-executor/handoff.d.ts.map +1 -0
  81. package/dist/agent-executor/hello.d.ts +72 -0
  82. package/dist/agent-executor/hello.d.ts.map +1 -1
  83. package/dist/agent-executor/image-input.d.ts +22 -0
  84. package/dist/agent-executor/image-input.d.ts.map +1 -1
  85. package/dist/agent-executor/projection.d.ts +2 -2
  86. package/dist/agent-executor/projection.d.ts.map +1 -1
  87. package/dist/agent-executor/session-primitives.d.ts +10 -1
  88. package/dist/agent-executor/session-primitives.d.ts.map +1 -1
  89. package/dist/agent-executor/testing/conformance.d.ts.map +1 -1
  90. package/dist/agent-executor/testing/replay-driver.d.ts +41 -0
  91. package/dist/agent-executor/testing/replay-driver.d.ts.map +1 -0
  92. package/dist/agent-executor/testing/replay-gate.d.ts +11 -0
  93. package/dist/agent-executor/testing/replay-gate.d.ts.map +1 -0
  94. package/dist/agent-executor/testing/replay-runner.d.ts +27 -0
  95. package/dist/agent-executor/testing/replay-runner.d.ts.map +1 -0
  96. package/dist/agent-executor/testing/replay-scenarios.d.ts +21 -0
  97. package/dist/agent-executor/testing/replay-scenarios.d.ts.map +1 -0
  98. package/dist/agent-executor/testing/replay-transcript.d.ts +296 -0
  99. package/dist/agent-executor/testing/replay-transcript.d.ts.map +1 -0
  100. package/dist/agent-executor/vocabulary.d.ts +135 -0
  101. package/dist/agent-executor/vocabulary.d.ts.map +1 -1
  102. package/dist/agent-runtime/branch-provider.d.ts +2 -2
  103. package/dist/agent-runtime/deferred-tool-selection.d.ts.map +1 -1
  104. package/dist/entrypoints/agent-executor/acp.d.ts +4 -1
  105. package/dist/entrypoints/agent-executor/acp.d.ts.map +1 -1
  106. package/dist/entrypoints/agent-executor/acp.js +847 -214
  107. package/dist/entrypoints/agent-executor/claude-sdk.d.ts +5 -1
  108. package/dist/entrypoints/agent-executor/claude-sdk.d.ts.map +1 -1
  109. package/dist/entrypoints/agent-executor/claude-sdk.js +713 -205
  110. package/dist/entrypoints/agent-executor/claude.js +44 -19
  111. package/dist/entrypoints/agent-executor/codex.d.ts +9 -2
  112. package/dist/entrypoints/agent-executor/codex.d.ts.map +1 -1
  113. package/dist/entrypoints/agent-executor/codex.js +1775 -359
  114. package/dist/entrypoints/agent-executor/testing.d.ts +4 -0
  115. package/dist/entrypoints/agent-executor/testing.d.ts.map +1 -1
  116. package/dist/entrypoints/agent-executor/testing.js +1002 -2
  117. package/dist/entrypoints/agent-executor.d.ts +4 -2
  118. package/dist/entrypoints/agent-executor.d.ts.map +1 -1
  119. package/dist/entrypoints/agent-executor.js +411 -23
  120. package/dist/entrypoints/agent-runtime.js +4 -23
  121. package/dist/entrypoints/tools/mcp.d.ts +1 -0
  122. package/dist/entrypoints/tools/mcp.d.ts.map +1 -1
  123. package/dist/entrypoints/tools/mcp.js +1 -1
  124. package/dist/entrypoints/tools/toolkit.js +1 -1
  125. package/dist/{index-wv2amqm4.js → index-2s8sy57y.js} +36 -103
  126. package/dist/{index-afb6z77w.js → index-dbp6xemn.js} +75 -7
  127. package/dist/{index-bjmj2q1z.js → index-jrn3prgm.js} +1 -1
  128. package/dist/index-kne9g2c5.js +30 -0
  129. package/dist/index-p1qmpq0p.js +1300 -0
  130. package/dist/{index-7jqn3b3g.js → index-v759mzed.js} +152 -2
  131. package/dist/{index-cbhxhma2.js → index-x5ayy5bn.js} +1 -0
  132. package/dist/index-y0a4gt1s.js +142 -0
  133. package/dist/tools/internal/rank-tools.d.ts +10 -0
  134. package/dist/tools/internal/rank-tools.d.ts.map +1 -0
  135. package/dist/tools/mcp/handler.d.ts +7 -3
  136. package/dist/tools/mcp/handler.d.ts.map +1 -1
  137. package/dist/tools/mcp/lazy-discovery.d.ts +47 -0
  138. package/dist/tools/mcp/lazy-discovery.d.ts.map +1 -0
  139. package/dist/tools/mcp/mount.d.ts +7 -0
  140. package/dist/tools/mcp/mount.d.ts.map +1 -1
  141. package/dist/tools/mcp/register.d.ts +2 -2
  142. package/dist/tools/mcp/register.d.ts.map +1 -1
  143. package/llms/agent-executor-acp.txt +7 -8
  144. package/llms/agent-executor-claude-sdk.txt +4 -2
  145. package/llms/agent-executor-codex.txt +8 -4
  146. package/llms/agent-executor-testing.txt +5 -1
  147. package/llms/agent-executor.txt +7 -6
  148. package/llms/stitchkit.txt +74 -74
  149. package/llms/tools-mcp.txt +3 -2
  150. package/llms/tools.txt +24 -0
  151. package/llms/{upgrading-0.128.0-0.129.0.txt → upgrading-0.128.0-0.130.0.txt} +30 -3
  152. package/llms/upgrading.txt +1 -1
  153. package/llms-full.txt +159 -97
  154. package/llms.txt +8 -8
  155. package/package.json +1 -1
  156. package/dist/index-y71zn1gw.js +0 -586
@@ -0,0 +1,41 @@
1
+ import type { AgentEngineDriver } from '../engine.js';
2
+ import { type ExecutorDriverCapabilities, type ExecutorEngine } from '../hello.js';
3
+ import type { ReplayGate } from './replay-gate.js';
4
+ import { type ExecutorReplayTranscript } from './replay-transcript.js';
5
+ /** Configuration for {@link createReplayExecutorDriver}. */
6
+ export interface ReplayExecutorDriverConfig {
7
+ /** Which wire engine identity to emulate (any existing {@link ExecutorEngine}; default `'acp'`). */
8
+ readonly engine?: ExecutorEngine;
9
+ /** Reconcile strategy emulated by this driver (`'none'` default, or `'client-id'` with `findInput`). */
10
+ readonly reconcile?: 'client-id' | 'none';
11
+ /** One transcript per turn (NDJSON string or validated {@link ExecutorReplayTranscript}). */
12
+ readonly turns: readonly (string | ExecutorReplayTranscript)[];
13
+ /** Optional label gate pausing execution on `{ kind: 'gate', label }` steps. */
14
+ readonly gate?: ReplayGate;
15
+ /** Workspace path substituted for `<workspace>` placeholders in NDJSON transcripts. */
16
+ readonly workspace?: string;
17
+ /** Optional capability overrides merged onto engine defaults and validated strictly. */
18
+ readonly capabilities?: Partial<ExecutorDriverCapabilities>;
19
+ /** Engine version string reported in `info()`. Default `'replay-1.0.0'`. */
20
+ readonly version?: string;
21
+ /** Optional model ids advertised by `info()`. When omitted, `info().models` is `'not-asked'`. */
22
+ readonly models?: readonly string[];
23
+ /** When `true`, `session.close()` fails if any configured turns or required steps were not consumed. */
24
+ readonly assertCompleteOnClose?: boolean;
25
+ }
26
+ /** In-process deterministic replay driver adding inspection and completeness assertions. */
27
+ export interface ReplayExecutorDriver extends AgentEngineDriver {
28
+ readonly capabilities: ExecutorDriverCapabilities;
29
+ /** Count of user inputs recorded for `nativeThreadId`. */
30
+ inputsFor(nativeThreadId: string): number;
31
+ /** Whether the engine received an answer (from host or auto-drain) for `interactionId`. */
32
+ wasAnswered(interactionId: string): boolean;
33
+ /** Throw if any scripted turn did not complete or any required `expectReply` step lacked a host reply. */
34
+ assertComplete(): void;
35
+ }
36
+ /**
37
+ * Create an in-process, zero-subprocess, deterministic replay {@link AgentEngineDriver}
38
+ * over NDJSON transcripts for local development and e2e tests.
39
+ */
40
+ export declare function createReplayExecutorDriver(config: ReplayExecutorDriverConfig): ReplayExecutorDriver;
41
+ //# sourceMappingURL=replay-driver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replay-driver.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/testing/replay-driver.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAuC,MAAM,WAAW,CAAC;AAGxF,OAAO,EACL,KAAK,0BAA0B,EAE/B,KAAK,cAAc,EAGpB,MAAM,UAAU,CAAC;AAGlB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,EACL,KAAK,wBAAwB,EAG9B,MAAM,qBAAqB,CAAC;AAW7B,4DAA4D;AAC5D,MAAM,WAAW,0BAA0B;IACzC,oGAAoG;IACpG,QAAQ,CAAC,MAAM,CAAC,EAAE,cAAc,CAAC;IACjC,wGAAwG;IACxG,QAAQ,CAAC,SAAS,CAAC,EAAE,WAAW,GAAG,MAAM,CAAC;IAC1C,6FAA6F;IAC7F,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC,MAAM,GAAG,wBAAwB,CAAC,EAAE,CAAC;IAC/D,gFAAgF;IAChF,QAAQ,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC;IAC3B,uFAAuF;IACvF,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,wFAAwF;IACxF,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC,0BAA0B,CAAC,CAAC;IAC5D,4EAA4E;IAC5E,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,iGAAiG;IACjG,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,wGAAwG;IACxG,QAAQ,CAAC,qBAAqB,CAAC,EAAE,OAAO,CAAC;CAC1C;AAED,4FAA4F;AAC5F,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB;IAC7D,QAAQ,CAAC,YAAY,EAAE,0BAA0B,CAAC;IAClD,0DAA0D;IAC1D,SAAS,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1C,2FAA2F;IAC3F,WAAW,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5C,0GAA0G;IAC1G,cAAc,IAAI,IAAI,CAAC;CACxB;AAoCD;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,0BAA0B,GACjC,oBAAoB,CAwKtB"}
@@ -0,0 +1,11 @@
1
+ /** Deterministic synchronization gate pausing replay execution at named labels without timers. */
2
+ export interface ReplayGate {
3
+ beforeEmit(label: string, signal?: AbortSignal): Promise<void>;
4
+ waitForReached(label: string): Promise<boolean>;
5
+ hasReached(label: string): boolean;
6
+ release(label: string): boolean;
7
+ releaseAll(): void;
8
+ }
9
+ /** Create a deterministic label gate for replay drivers; rejects empty or duplicate labels. */
10
+ export declare function createReplayGate(labels: readonly string[]): ReplayGate;
11
+ //# sourceMappingURL=replay-gate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replay-gate.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/testing/replay-gate.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,MAAM,WAAW,UAAU;IACzB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/D,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAChD,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;IACnC,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC,UAAU,IAAI,IAAI,CAAC;CACpB;AAWD,+FAA+F;AAC/F,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,UAAU,CAmEtE"}
@@ -0,0 +1,27 @@
1
+ import { type EngineRequestTurn } from '../engine-requests.js';
2
+ import type { InteractionReply } from '../executor-contract.js';
3
+ import type { ExecutorEngine, PlanLimits } from '../hello.js';
4
+ import type { ReplayGate } from './replay-gate.js';
5
+ import type { ExecutorReplayTranscript } from './replay-transcript.js';
6
+ export interface ReplayTurnSlot extends EngineRequestTurn<InteractionReply['reply'], {
7
+ readonly interactionId: string;
8
+ }> {
9
+ readonly turnId: string;
10
+ readonly interruptWaiters: Array<() => void>;
11
+ readonly replyPromises: Map<string, Promise<InteractionReply['reply']>>;
12
+ }
13
+ export interface ReplayTurnRunnerContext {
14
+ readonly script: ExecutorReplayTranscript;
15
+ readonly turn: ReplayTurnSlot;
16
+ readonly engine: ExecutorEngine;
17
+ readonly profileId: string;
18
+ readonly limits: Map<string, PlanLimits>;
19
+ readonly answeredIds: Set<string>;
20
+ readonly hostAnsweredIds: Set<string>;
21
+ readonly gate?: ReplayGate;
22
+ readonly signal: AbortSignal;
23
+ readonly onTurnCompleted: () => void;
24
+ readonly clearActiveTurn: () => void;
25
+ }
26
+ export declare function runReplayTurnScript(context: ReplayTurnRunnerContext): Promise<void>;
27
+ //# sourceMappingURL=replay-runner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replay-runner.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/testing/replay-runner.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,iBAAiB,EAIvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAG3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAsB,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAQxF,MAAM,WAAW,cACf,SAAQ,iBAAiB,CAAC,gBAAgB,CAAC,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC;IACxF,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,gBAAgB,EAAE,KAAK,CAAC,MAAM,IAAI,CAAC,CAAC;IAC7C,QAAQ,CAAC,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;CACzE;AA8GD,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAC;IAC1C,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACzC,QAAQ,CAAC,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAClC,QAAQ,CAAC,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACtC,QAAQ,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,eAAe,EAAE,MAAM,IAAI,CAAC;IACrC,QAAQ,CAAC,eAAe,EAAE,MAAM,IAAI,CAAC;CACtC;AAED,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAkKzF"}
@@ -0,0 +1,21 @@
1
+ import type { AgentEngineDialectScenarios } from './conformance.js';
2
+ import type { FakeEngineScenario } from './fake-engine.js';
3
+ import { type ExecutorReplayTranscript } from './replay-transcript.js';
4
+ /** Built-in deterministic replay scenarios for local UI development and e2e tests. */
5
+ export declare const REPLAY_SCENARIOS: {
6
+ readonly 'text-stream': string;
7
+ readonly approval: string;
8
+ readonly 'user-input': string;
9
+ readonly 'tool-calls': string;
10
+ readonly 'rate-limit': string;
11
+ readonly 'multi-turn': readonly string[];
12
+ readonly 'crash-mid-turn': string;
13
+ };
14
+ /** Extract an {@link ExecutorReplayTranscript} packed by {@link replayDialectScenarios}. */
15
+ export declare function unpackReplayScenario(scenario: FakeEngineScenario): ExecutorReplayTranscript;
16
+ /**
17
+ * Conformance dialect scenarios for {@link createReplayExecutorDriver}, allowing full
18
+ * execution of {@link runAgentEngineConformance} completely in-process with zero child processes.
19
+ */
20
+ export declare function replayDialectScenarios(): AgentEngineDialectScenarios;
21
+ //# sourceMappingURL=replay-scenarios.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replay-scenarios.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/testing/replay-scenarios.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAEL,KAAK,wBAAwB,EAG9B,MAAM,qBAAqB,CAAC;AAE7B,sFAAsF;AACtF,eAAO,MAAM,gBAAgB;aAC3B,aAAa;aAOb,QAAQ;aA8BR,YAAY;aAYZ,YAAY;aAuBZ,YAAY;aAaZ,YAAY,EASP,SAAS,MAAM,EAAE;aACtB,gBAAgB;CAIR,CAAC;AASX,4FAA4F;AAC5F,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,kBAAkB,GAAG,wBAAwB,CAQ3F;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,2BAA2B,CA6GpE"}
@@ -0,0 +1,296 @@
1
+ import { z } from 'zod';
2
+ export declare const DEFAULT_REPLAY_MAX_BYTES: number;
3
+ export declare const DEFAULT_REPLAY_MAX_STEPS = 4096;
4
+ /** Single scripted step inside an in-process executor replay transcript. */
5
+ export declare const ExecutorReplayStepSchema: z.ZodUnion<readonly [z.ZodObject<{
6
+ kind: z.ZodLiteral<"emit">;
7
+ block: z.ZodEnum<{
8
+ reasoning: "reasoning";
9
+ text: "text";
10
+ }>;
11
+ text: z.ZodString;
12
+ itemId: z.ZodOptional<z.ZodString>;
13
+ }, z.core.$strict>, z.ZodObject<{
14
+ kind: z.ZodLiteral<"emit">;
15
+ block: z.ZodLiteral<"tool-call">;
16
+ callId: z.ZodString;
17
+ toolName: z.ZodString;
18
+ input: z.ZodJSONSchema;
19
+ itemId: z.ZodOptional<z.ZodString>;
20
+ }, z.core.$strict>, z.ZodObject<{
21
+ kind: z.ZodLiteral<"emit">;
22
+ block: z.ZodLiteral<"tool-result">;
23
+ callId: z.ZodString;
24
+ toolName: z.ZodString;
25
+ outcome: z.ZodEnum<{
26
+ error: "error";
27
+ interrupted: "interrupted";
28
+ success: "success";
29
+ }>;
30
+ output: z.ZodOptional<z.ZodJSONSchema>;
31
+ itemId: z.ZodOptional<z.ZodString>;
32
+ }, z.core.$strict>, z.ZodObject<{
33
+ kind: z.ZodLiteral<"emit">;
34
+ block: z.ZodLiteral<"status">;
35
+ phase: z.ZodString;
36
+ itemId: z.ZodOptional<z.ZodString>;
37
+ }, z.core.$strict>, z.ZodObject<{
38
+ kind: z.ZodLiteral<"emit">;
39
+ block: z.ZodLiteral<"window">;
40
+ reset: z.ZodEnum<{
41
+ context: "context";
42
+ gap: "gap";
43
+ generation: "generation";
44
+ initial: "initial";
45
+ }>;
46
+ itemId: z.ZodOptional<z.ZodString>;
47
+ }, z.core.$strict>, z.ZodObject<{
48
+ kind: z.ZodLiteral<"emit">;
49
+ block: z.ZodLiteral<"error">;
50
+ errorKind: z.ZodEnum<{
51
+ authRequired: "authRequired";
52
+ rateLimited: "rateLimited";
53
+ restartRecommended: "restartRecommended";
54
+ staleTurn: "staleTurn";
55
+ unhandled: "unhandled";
56
+ }>;
57
+ message: z.ZodString;
58
+ itemId: z.ZodOptional<z.ZodString>;
59
+ }, z.core.$strict>, z.ZodObject<{
60
+ kind: z.ZodLiteral<"emit">;
61
+ block: z.ZodLiteral<"turn-end">;
62
+ outcome: z.ZodEnum<{
63
+ completed: "completed";
64
+ failed: "failed";
65
+ interrupted: "interrupted";
66
+ }>;
67
+ threadDisposition: z.ZodOptional<z.ZodEnum<{
68
+ broken: "broken";
69
+ reusable: "reusable";
70
+ }>>;
71
+ itemId: z.ZodOptional<z.ZodString>;
72
+ }, z.core.$strict>, z.ZodObject<{
73
+ kind: z.ZodLiteral<"request">;
74
+ interactionId: z.ZodString;
75
+ requestKind: z.ZodEnum<{
76
+ approval: "approval";
77
+ input: "input";
78
+ }>;
79
+ callId: z.ZodOptional<z.ZodString>;
80
+ toolName: z.ZodOptional<z.ZodString>;
81
+ input: z.ZodOptional<z.ZodJSONSchema>;
82
+ prompt: z.ZodOptional<z.ZodString>;
83
+ itemId: z.ZodOptional<z.ZodString>;
84
+ }, z.core.$strict>, z.ZodObject<{
85
+ kind: z.ZodLiteral<"expectReply">;
86
+ interactionId: z.ZodString;
87
+ replyKind: z.ZodOptional<z.ZodEnum<{
88
+ approve: "approve";
89
+ deny: "deny";
90
+ input: "input";
91
+ }>>;
92
+ scope: z.ZodOptional<z.ZodEnum<{
93
+ once: "once";
94
+ session: "session";
95
+ }>>;
96
+ required: z.ZodOptional<z.ZodBoolean>;
97
+ }, z.core.$strict>, z.ZodObject<{
98
+ kind: z.ZodLiteral<"gate">;
99
+ label: z.ZodString;
100
+ }, z.core.$strict>, z.ZodObject<{
101
+ kind: z.ZodLiteral<"waitInterrupt">;
102
+ }, z.core.$strict>, z.ZodObject<{
103
+ kind: z.ZodLiteral<"usage">;
104
+ inputTokens: z.ZodOptional<z.ZodInt>;
105
+ outputTokens: z.ZodOptional<z.ZodInt>;
106
+ cachedInputTokens: z.ZodOptional<z.ZodInt>;
107
+ cacheCreationInputTokens: z.ZodOptional<z.ZodInt>;
108
+ thinkingTokens: z.ZodOptional<z.ZodInt>;
109
+ totalTokens: z.ZodOptional<z.ZodInt>;
110
+ costUsd: z.ZodOptional<z.ZodNumber>;
111
+ itemId: z.ZodOptional<z.ZodString>;
112
+ }, z.core.$strict>, z.ZodObject<{
113
+ kind: z.ZodLiteral<"contextUsage">;
114
+ usedTokens: z.ZodInt;
115
+ windowTokens: z.ZodInt;
116
+ itemId: z.ZodOptional<z.ZodString>;
117
+ }, z.core.$strict>, z.ZodObject<{
118
+ kind: z.ZodLiteral<"rateLimit">;
119
+ windows: z.ZodArray<z.ZodObject<{
120
+ name: z.ZodString;
121
+ usedPercent: z.ZodNumber;
122
+ resetsAt: z.ZodOptional<z.ZodISODateTime>;
123
+ windowDurationMins: z.ZodOptional<z.ZodInt>;
124
+ label: z.ZodOptional<z.ZodString>;
125
+ }, z.core.$strict>>;
126
+ }, z.core.$strict>, z.ZodObject<{
127
+ kind: z.ZodLiteral<"unknownRecord">;
128
+ recordType: z.ZodOptional<z.ZodString>;
129
+ message: z.ZodOptional<z.ZodString>;
130
+ }, z.core.$strict>, z.ZodObject<{
131
+ kind: z.ZodLiteral<"invalidLine">;
132
+ rawLine: z.ZodOptional<z.ZodString>;
133
+ }, z.core.$strict>, z.ZodObject<{
134
+ kind: z.ZodLiteral<"eofWithoutResult">;
135
+ }, z.core.$strict>, z.ZodObject<{
136
+ kind: z.ZodLiteral<"crash">;
137
+ message: z.ZodOptional<z.ZodString>;
138
+ }, z.core.$strict>]>;
139
+ /** Validated sequence of deterministic replay steps for a single turn. */
140
+ export declare const ExecutorReplayTranscriptSchema: z.ZodObject<{
141
+ steps: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
142
+ kind: z.ZodLiteral<"emit">;
143
+ block: z.ZodEnum<{
144
+ reasoning: "reasoning";
145
+ text: "text";
146
+ }>;
147
+ text: z.ZodString;
148
+ itemId: z.ZodOptional<z.ZodString>;
149
+ }, z.core.$strict>, z.ZodObject<{
150
+ kind: z.ZodLiteral<"emit">;
151
+ block: z.ZodLiteral<"tool-call">;
152
+ callId: z.ZodString;
153
+ toolName: z.ZodString;
154
+ input: z.ZodJSONSchema;
155
+ itemId: z.ZodOptional<z.ZodString>;
156
+ }, z.core.$strict>, z.ZodObject<{
157
+ kind: z.ZodLiteral<"emit">;
158
+ block: z.ZodLiteral<"tool-result">;
159
+ callId: z.ZodString;
160
+ toolName: z.ZodString;
161
+ outcome: z.ZodEnum<{
162
+ error: "error";
163
+ interrupted: "interrupted";
164
+ success: "success";
165
+ }>;
166
+ output: z.ZodOptional<z.ZodJSONSchema>;
167
+ itemId: z.ZodOptional<z.ZodString>;
168
+ }, z.core.$strict>, z.ZodObject<{
169
+ kind: z.ZodLiteral<"emit">;
170
+ block: z.ZodLiteral<"status">;
171
+ phase: z.ZodString;
172
+ itemId: z.ZodOptional<z.ZodString>;
173
+ }, z.core.$strict>, z.ZodObject<{
174
+ kind: z.ZodLiteral<"emit">;
175
+ block: z.ZodLiteral<"window">;
176
+ reset: z.ZodEnum<{
177
+ context: "context";
178
+ gap: "gap";
179
+ generation: "generation";
180
+ initial: "initial";
181
+ }>;
182
+ itemId: z.ZodOptional<z.ZodString>;
183
+ }, z.core.$strict>, z.ZodObject<{
184
+ kind: z.ZodLiteral<"emit">;
185
+ block: z.ZodLiteral<"error">;
186
+ errorKind: z.ZodEnum<{
187
+ authRequired: "authRequired";
188
+ rateLimited: "rateLimited";
189
+ restartRecommended: "restartRecommended";
190
+ staleTurn: "staleTurn";
191
+ unhandled: "unhandled";
192
+ }>;
193
+ message: z.ZodString;
194
+ itemId: z.ZodOptional<z.ZodString>;
195
+ }, z.core.$strict>, z.ZodObject<{
196
+ kind: z.ZodLiteral<"emit">;
197
+ block: z.ZodLiteral<"turn-end">;
198
+ outcome: z.ZodEnum<{
199
+ completed: "completed";
200
+ failed: "failed";
201
+ interrupted: "interrupted";
202
+ }>;
203
+ threadDisposition: z.ZodOptional<z.ZodEnum<{
204
+ broken: "broken";
205
+ reusable: "reusable";
206
+ }>>;
207
+ itemId: z.ZodOptional<z.ZodString>;
208
+ }, z.core.$strict>, z.ZodObject<{
209
+ kind: z.ZodLiteral<"request">;
210
+ interactionId: z.ZodString;
211
+ requestKind: z.ZodEnum<{
212
+ approval: "approval";
213
+ input: "input";
214
+ }>;
215
+ callId: z.ZodOptional<z.ZodString>;
216
+ toolName: z.ZodOptional<z.ZodString>;
217
+ input: z.ZodOptional<z.ZodJSONSchema>;
218
+ prompt: z.ZodOptional<z.ZodString>;
219
+ itemId: z.ZodOptional<z.ZodString>;
220
+ }, z.core.$strict>, z.ZodObject<{
221
+ kind: z.ZodLiteral<"expectReply">;
222
+ interactionId: z.ZodString;
223
+ replyKind: z.ZodOptional<z.ZodEnum<{
224
+ approve: "approve";
225
+ deny: "deny";
226
+ input: "input";
227
+ }>>;
228
+ scope: z.ZodOptional<z.ZodEnum<{
229
+ once: "once";
230
+ session: "session";
231
+ }>>;
232
+ required: z.ZodOptional<z.ZodBoolean>;
233
+ }, z.core.$strict>, z.ZodObject<{
234
+ kind: z.ZodLiteral<"gate">;
235
+ label: z.ZodString;
236
+ }, z.core.$strict>, z.ZodObject<{
237
+ kind: z.ZodLiteral<"waitInterrupt">;
238
+ }, z.core.$strict>, z.ZodObject<{
239
+ kind: z.ZodLiteral<"usage">;
240
+ inputTokens: z.ZodOptional<z.ZodInt>;
241
+ outputTokens: z.ZodOptional<z.ZodInt>;
242
+ cachedInputTokens: z.ZodOptional<z.ZodInt>;
243
+ cacheCreationInputTokens: z.ZodOptional<z.ZodInt>;
244
+ thinkingTokens: z.ZodOptional<z.ZodInt>;
245
+ totalTokens: z.ZodOptional<z.ZodInt>;
246
+ costUsd: z.ZodOptional<z.ZodNumber>;
247
+ itemId: z.ZodOptional<z.ZodString>;
248
+ }, z.core.$strict>, z.ZodObject<{
249
+ kind: z.ZodLiteral<"contextUsage">;
250
+ usedTokens: z.ZodInt;
251
+ windowTokens: z.ZodInt;
252
+ itemId: z.ZodOptional<z.ZodString>;
253
+ }, z.core.$strict>, z.ZodObject<{
254
+ kind: z.ZodLiteral<"rateLimit">;
255
+ windows: z.ZodArray<z.ZodObject<{
256
+ name: z.ZodString;
257
+ usedPercent: z.ZodNumber;
258
+ resetsAt: z.ZodOptional<z.ZodISODateTime>;
259
+ windowDurationMins: z.ZodOptional<z.ZodInt>;
260
+ label: z.ZodOptional<z.ZodString>;
261
+ }, z.core.$strict>>;
262
+ }, z.core.$strict>, z.ZodObject<{
263
+ kind: z.ZodLiteral<"unknownRecord">;
264
+ recordType: z.ZodOptional<z.ZodString>;
265
+ message: z.ZodOptional<z.ZodString>;
266
+ }, z.core.$strict>, z.ZodObject<{
267
+ kind: z.ZodLiteral<"invalidLine">;
268
+ rawLine: z.ZodOptional<z.ZodString>;
269
+ }, z.core.$strict>, z.ZodObject<{
270
+ kind: z.ZodLiteral<"eofWithoutResult">;
271
+ }, z.core.$strict>, z.ZodObject<{
272
+ kind: z.ZodLiteral<"crash">;
273
+ message: z.ZodOptional<z.ZodString>;
274
+ }, z.core.$strict>]>>;
275
+ }, z.core.$strict>;
276
+ /** Single scripted replay step inferred from {@link ExecutorReplayStepSchema}. */
277
+ export type ExecutorReplayStep = z.infer<typeof ExecutorReplayStepSchema>;
278
+ /** Validated single-turn replay transcript inferred from {@link ExecutorReplayTranscriptSchema}. */
279
+ export type ExecutorReplayTranscript = z.infer<typeof ExecutorReplayTranscriptSchema>;
280
+ /** Options for {@link parseReplayTranscript}. */
281
+ export interface ParseReplayTranscriptOptions {
282
+ /** Substitute literal `<workspace>` tokens inside parsed string values with this path. */
283
+ readonly workspace?: string;
284
+ /** Maximum UTF-8 byte length accepted for the NDJSON source. Default 4 MiB. */
285
+ readonly maxBytes?: number;
286
+ /** Maximum number of replay steps accepted. Default 4096. */
287
+ readonly maxSteps?: number;
288
+ }
289
+ /**
290
+ * Parse and strictly validate an NDJSON replay transcript within finite byte and step limits.
291
+ * Blank lines are skipped; `<workspace>` placeholders are substituted inside JSON string values.
292
+ */
293
+ export declare function parseReplayTranscript(ndjson: string, options?: ParseReplayTranscriptOptions): ExecutorReplayTranscript;
294
+ /** Serialize an array of replay steps into canonical NDJSON text. */
295
+ export declare function formatReplayTranscript(steps: readonly ExecutorReplayStep[]): string;
296
+ //# sourceMappingURL=replay-transcript.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replay-transcript.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/testing/replay-transcript.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,wBAAwB,QAAkB,CAAC;AACxD,eAAO,MAAM,wBAAwB,OAAQ,CAAC;AAsI9C,4EAA4E;AAC5E,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAmBnC,CAAC;AAEH,0EAA0E;AAC1E,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAEzC,CAAC;AAEH,kFAAkF;AAClF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,oGAAoG;AACpG,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEtF,iDAAiD;AACjD,MAAM,WAAW,4BAA4B;IAC3C,0FAA0F;IAC1F,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,+EAA+E;IAC/E,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,6DAA6D;IAC7D,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B;AAqBD;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,4BAAiC,GACzC,wBAAwB,CA6C1B;AAED,qEAAqE;AACrE,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,SAAS,kBAAkB,EAAE,GAAG,MAAM,CAEnF"}
@@ -104,6 +104,36 @@ export declare const ExecutorRequestResolvedDeltaSchema: z.ZodObject<{
104
104
  type: z.ZodLiteral<"request-resolved">;
105
105
  interactionId: z.ZodString;
106
106
  }, z.core.$strict>;
107
+ /** Token counters for a turn step or cumulative thread total; an unreported figure is absent, not zero. */
108
+ export declare const ExecutorTokenUsageSchema: z.ZodObject<{
109
+ inputTokens: z.ZodOptional<z.ZodInt>;
110
+ outputTokens: z.ZodOptional<z.ZodInt>;
111
+ cachedInputTokens: z.ZodOptional<z.ZodInt>;
112
+ cacheCreationInputTokens: z.ZodOptional<z.ZodInt>;
113
+ thinkingTokens: z.ZodOptional<z.ZodInt>;
114
+ totalTokens: z.ZodOptional<z.ZodInt>;
115
+ }, z.core.$strict>;
116
+ /** Per-model cumulative token and cost breakdown reported on an engine turn result. */
117
+ export declare const ExecutorModelUsageSchema: z.ZodObject<{
118
+ inputTokens: z.ZodInt;
119
+ outputTokens: z.ZodInt;
120
+ cacheReadInputTokens: z.ZodOptional<z.ZodInt>;
121
+ cacheCreationInputTokens: z.ZodOptional<z.ZodInt>;
122
+ thinkingTokens: z.ZodOptional<z.ZodInt>;
123
+ cacheCreationEphemeral5mInputTokens: z.ZodOptional<z.ZodInt>;
124
+ cacheCreationEphemeral1hInputTokens: z.ZodOptional<z.ZodInt>;
125
+ webSearchRequests: z.ZodOptional<z.ZodInt>;
126
+ costUsd: z.ZodOptional<z.ZodNumber>;
127
+ contextWindow: z.ZodOptional<z.ZodInt>;
128
+ maxOutputTokens: z.ZodOptional<z.ZodInt>;
129
+ canonicalModel: z.ZodOptional<z.ZodString>;
130
+ provider: z.ZodOptional<z.ZodString>;
131
+ costBasis: z.ZodOptional<z.ZodEnum<{
132
+ list: "list";
133
+ managed: "managed";
134
+ unknown: "unknown";
135
+ }>>;
136
+ }, z.core.$strict>;
107
137
  /** What the turn cost so far, as the engine reported it; a figure it did not report is absent, not zero. */
108
138
  export declare const ExecutorUsageDeltaSchema: z.ZodObject<{
109
139
  turnId: z.ZodString;
@@ -116,7 +146,38 @@ export declare const ExecutorUsageDeltaSchema: z.ZodObject<{
116
146
  inputTokens: z.ZodOptional<z.ZodInt>;
117
147
  outputTokens: z.ZodOptional<z.ZodInt>;
118
148
  cachedInputTokens: z.ZodOptional<z.ZodInt>;
149
+ cacheCreationInputTokens: z.ZodOptional<z.ZodInt>;
150
+ thinkingTokens: z.ZodOptional<z.ZodInt>;
151
+ totalTokens: z.ZodOptional<z.ZodInt>;
119
152
  costUsd: z.ZodOptional<z.ZodNumber>;
153
+ total: z.ZodOptional<z.ZodObject<{
154
+ inputTokens: z.ZodOptional<z.ZodInt>;
155
+ outputTokens: z.ZodOptional<z.ZodInt>;
156
+ cachedInputTokens: z.ZodOptional<z.ZodInt>;
157
+ cacheCreationInputTokens: z.ZodOptional<z.ZodInt>;
158
+ thinkingTokens: z.ZodOptional<z.ZodInt>;
159
+ totalTokens: z.ZodOptional<z.ZodInt>;
160
+ }, z.core.$strict>>;
161
+ modelUsage: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
162
+ inputTokens: z.ZodInt;
163
+ outputTokens: z.ZodInt;
164
+ cacheReadInputTokens: z.ZodOptional<z.ZodInt>;
165
+ cacheCreationInputTokens: z.ZodOptional<z.ZodInt>;
166
+ thinkingTokens: z.ZodOptional<z.ZodInt>;
167
+ cacheCreationEphemeral5mInputTokens: z.ZodOptional<z.ZodInt>;
168
+ cacheCreationEphemeral1hInputTokens: z.ZodOptional<z.ZodInt>;
169
+ webSearchRequests: z.ZodOptional<z.ZodInt>;
170
+ costUsd: z.ZodOptional<z.ZodNumber>;
171
+ contextWindow: z.ZodOptional<z.ZodInt>;
172
+ maxOutputTokens: z.ZodOptional<z.ZodInt>;
173
+ canonicalModel: z.ZodOptional<z.ZodString>;
174
+ provider: z.ZodOptional<z.ZodString>;
175
+ costBasis: z.ZodOptional<z.ZodEnum<{
176
+ list: "list";
177
+ managed: "managed";
178
+ unknown: "unknown";
179
+ }>>;
180
+ }, z.core.$strict>>>;
120
181
  }, z.core.$strict>;
121
182
  /**
122
183
  * How full the engine's context window is, as it reported: a gauge read
@@ -133,6 +194,24 @@ export declare const ExecutorContextUsageDeltaSchema: z.ZodObject<{
133
194
  usedTokens: z.ZodInt;
134
195
  windowTokens: z.ZodInt;
135
196
  }, z.core.$strict>;
197
+ /** Whether a thread's native history remains reusable after a turn finishes, or is broken. */
198
+ export declare const ExecutorThreadDispositionSchema: z.ZodEnum<{
199
+ broken: "broken";
200
+ reusable: "reusable";
201
+ }>;
202
+ /** Open bounded startup or lifecycle phase label (`1..64` trimmed characters). */
203
+ export declare const ExecutorStartupPhaseSchema: z.ZodString;
204
+ /** Non-content status update reporting a startup or preparation phase during a turn. */
205
+ export declare const ExecutorStatusDeltaSchema: z.ZodObject<{
206
+ turnId: z.ZodString;
207
+ itemId: z.ZodString;
208
+ raw: z.ZodObject<{
209
+ source: z.ZodString;
210
+ type: z.ZodString;
211
+ }, z.core.$strict>;
212
+ type: z.ZodLiteral<"status">;
213
+ phase: z.ZodString;
214
+ }, z.core.$strict>;
136
215
  export declare const ExecutorTurnEndDeltaSchema: z.ZodObject<{
137
216
  turnId: z.ZodString;
138
217
  itemId: z.ZodString;
@@ -146,6 +225,10 @@ export declare const ExecutorTurnEndDeltaSchema: z.ZodObject<{
146
225
  failed: "failed";
147
226
  interrupted: "interrupted";
148
227
  }>;
228
+ threadDisposition: z.ZodOptional<z.ZodEnum<{
229
+ broken: "broken";
230
+ reusable: "reusable";
231
+ }>>;
149
232
  }, z.core.$strict>;
150
233
  /**
151
234
  * A failure the reader acts on by its kind, never by its text: `authRequired`
@@ -291,7 +374,38 @@ export declare const ExecutorDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
291
374
  inputTokens: z.ZodOptional<z.ZodInt>;
292
375
  outputTokens: z.ZodOptional<z.ZodInt>;
293
376
  cachedInputTokens: z.ZodOptional<z.ZodInt>;
377
+ cacheCreationInputTokens: z.ZodOptional<z.ZodInt>;
378
+ thinkingTokens: z.ZodOptional<z.ZodInt>;
379
+ totalTokens: z.ZodOptional<z.ZodInt>;
294
380
  costUsd: z.ZodOptional<z.ZodNumber>;
381
+ total: z.ZodOptional<z.ZodObject<{
382
+ inputTokens: z.ZodOptional<z.ZodInt>;
383
+ outputTokens: z.ZodOptional<z.ZodInt>;
384
+ cachedInputTokens: z.ZodOptional<z.ZodInt>;
385
+ cacheCreationInputTokens: z.ZodOptional<z.ZodInt>;
386
+ thinkingTokens: z.ZodOptional<z.ZodInt>;
387
+ totalTokens: z.ZodOptional<z.ZodInt>;
388
+ }, z.core.$strict>>;
389
+ modelUsage: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
390
+ inputTokens: z.ZodInt;
391
+ outputTokens: z.ZodInt;
392
+ cacheReadInputTokens: z.ZodOptional<z.ZodInt>;
393
+ cacheCreationInputTokens: z.ZodOptional<z.ZodInt>;
394
+ thinkingTokens: z.ZodOptional<z.ZodInt>;
395
+ cacheCreationEphemeral5mInputTokens: z.ZodOptional<z.ZodInt>;
396
+ cacheCreationEphemeral1hInputTokens: z.ZodOptional<z.ZodInt>;
397
+ webSearchRequests: z.ZodOptional<z.ZodInt>;
398
+ costUsd: z.ZodOptional<z.ZodNumber>;
399
+ contextWindow: z.ZodOptional<z.ZodInt>;
400
+ maxOutputTokens: z.ZodOptional<z.ZodInt>;
401
+ canonicalModel: z.ZodOptional<z.ZodString>;
402
+ provider: z.ZodOptional<z.ZodString>;
403
+ costBasis: z.ZodOptional<z.ZodEnum<{
404
+ list: "list";
405
+ managed: "managed";
406
+ unknown: "unknown";
407
+ }>>;
408
+ }, z.core.$strict>>>;
295
409
  }, z.core.$strict>, z.ZodObject<{
296
410
  turnId: z.ZodString;
297
411
  itemId: z.ZodString;
@@ -302,6 +416,15 @@ export declare const ExecutorDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
302
416
  type: z.ZodLiteral<"context-usage">;
303
417
  usedTokens: z.ZodInt;
304
418
  windowTokens: z.ZodInt;
419
+ }, z.core.$strict>, z.ZodObject<{
420
+ turnId: z.ZodString;
421
+ itemId: z.ZodString;
422
+ raw: z.ZodObject<{
423
+ source: z.ZodString;
424
+ type: z.ZodString;
425
+ }, z.core.$strict>;
426
+ type: z.ZodLiteral<"status">;
427
+ phase: z.ZodString;
305
428
  }, z.core.$strict>, z.ZodObject<{
306
429
  turnId: z.ZodString;
307
430
  itemId: z.ZodString;
@@ -315,6 +438,10 @@ export declare const ExecutorDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
315
438
  failed: "failed";
316
439
  interrupted: "interrupted";
317
440
  }>;
441
+ threadDisposition: z.ZodOptional<z.ZodEnum<{
442
+ broken: "broken";
443
+ reusable: "reusable";
444
+ }>>;
318
445
  }, z.core.$strict>, z.ZodObject<{
319
446
  turnId: z.ZodString;
320
447
  itemId: z.ZodString;
@@ -350,4 +477,12 @@ export declare const ExecutorDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
350
477
  export type ExecutorDelta = z.infer<typeof ExecutorDeltaSchema>;
351
478
  /** Executor delta error category inferred from `ExecutorErrorKindSchema`. */
352
479
  export type ExecutorErrorKind = z.infer<typeof ExecutorErrorKindSchema>;
480
+ /** Thread reusability disposition inferred from `ExecutorThreadDispositionSchema`. */
481
+ export type ExecutorThreadDisposition = z.infer<typeof ExecutorThreadDispositionSchema>;
482
+ /** Bounded startup or preparation phase label inferred from `ExecutorStartupPhaseSchema`. */
483
+ export type ExecutorStartupPhase = z.infer<typeof ExecutorStartupPhaseSchema>;
484
+ /** Token usage counters inferred from `ExecutorTokenUsageSchema`. */
485
+ export type ExecutorTokenUsage = z.infer<typeof ExecutorTokenUsageSchema>;
486
+ /** Per-model cumulative usage breakdown inferred from `ExecutorModelUsageSchema`. */
487
+ export type ExecutorModelUsage = z.infer<typeof ExecutorModelUsageSchema>;
353
488
  //# sourceMappingURL=vocabulary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vocabulary.d.ts","sourceRoot":"","sources":["../../src/agent-executor/vocabulary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB;;;kBAG5B,CAAC;AAQH,4EAA4E;AAC5E,eAAO,MAAM,uBAAuB;;;;;;;;;kBAA4C,CAAC;AACjF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;kBAAiD,CAAC;AAC3F,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;kBAAgD,CAAC;AACzF,uHAAuH;AACvH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;kBAAkD,CAAC;AAE7F,yFAAyF;AACzF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;kBASrC,CAAC;AAEH,kGAAkG;AAClG,eAAO,MAAM,kCAAkC;;;;;;;;;kBAI7C,CAAC;AAIH,4GAA4G;AAC5G,eAAO,MAAM,wBAAwB;;;;;;;;;;;;kBAOnC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;kBAK1C,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;kBAIrC,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB;;;;;;EAMlC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;kBAKnC,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;kBAIpC,CAAC;AAEH,oEAAoE;AACpE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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178,17 +178,16 @@ export declare class BranchProvider {
178
178
  })[];
179
179
  };
180
180
  } | {
181
- message?: undefined;
182
181
  attempt: number;
183
182
  stepNumber: number;
184
183
  modelId: string;
185
184
  instructionsSha256: string;
186
185
  sha256?: undefined;
186
+ message?: undefined;
187
187
  runId: string;
188
188
  messageShas: string[];
189
189
  bodySha256: string;
190
190
  } | {
191
- message?: undefined;
192
191
  attempt: number;
193
192
  stepNumber: number;
194
193
  response: {
@@ -223,6 +222,7 @@ export declare class BranchProvider {
223
222
  } | undefined;
224
223
  } | undefined;
225
224
  sha256?: undefined;
225
+ message?: undefined;
226
226
  runId: string;
227
227
  };
228
228
  private rekeyPart;
@@ -1 +1 @@
1
- {"version":3,"file":"deferred-tool-selection.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/deferred-tool-selection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AACvC,OAAO,EACL,KAAK,8BAA8B,EAEnC,KAAK,uBAAuB,EAC7B,MAAM,uBAAuB,CAAC;AAG/B,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEhD;AACD,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAG1D;AACD,wBAAgB,WAAW,CACzB,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,OAAO,EAAE,uBAAuB,GAC/B;IAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAWvC;AACD,wBAAgB,WAAW,CACzB,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,OAAO,EAAE,uBAAuB,GAC/B,MAAM,CAQR;AACD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,MAAM,CACpB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,SAAS,8BAA8B,EAAE,GAClD,MAAM,EAAE,CAGV;AAyDD,wBAAgB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