stitchkit 0.129.0 → 0.130.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 (163) hide show
  1. package/CHANGELOG.md +32 -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 +5 -2
  47. package/dist/agent-executor/codex/connect.d.ts.map +1 -1
  48. package/dist/agent-executor/codex/control-client.d.ts +206 -0
  49. package/dist/agent-executor/codex/control-client.d.ts.map +1 -0
  50. package/dist/agent-executor/codex/driver.d.ts +35 -5
  51. package/dist/agent-executor/codex/driver.d.ts.map +1 -1
  52. package/dist/agent-executor/codex/handlers.d.ts +52 -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 +128 -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 +124 -61
  60. package/dist/agent-executor/codex/session-controls.d.ts.map +1 -1
  61. package/dist/agent-executor/codex/session.d.ts +10 -36
  62. package/dist/agent-executor/codex/session.d.ts.map +1 -1
  63. package/dist/agent-executor/codex/shared-server.d.ts +31 -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 +144 -0
  68. package/dist/agent-executor/codex/thread-controls.d.ts.map +1 -0
  69. package/dist/agent-executor/codex/thread-open.d.ts +66 -0
  70. package/dist/agent-executor/codex/thread-open.d.ts.map +1 -0
  71. package/dist/agent-executor/codex/turn-input.d.ts +47 -0
  72. package/dist/agent-executor/codex/turn-input.d.ts.map +1 -0
  73. package/dist/agent-executor/contract.d.ts +77 -0
  74. package/dist/agent-executor/contract.d.ts.map +1 -1
  75. package/dist/agent-executor/engine.d.ts +6 -2
  76. package/dist/agent-executor/engine.d.ts.map +1 -1
  77. package/dist/agent-executor/executor-contract.d.ts +54 -0
  78. package/dist/agent-executor/executor-contract.d.ts.map +1 -1
  79. package/dist/agent-executor/handoff-schemas.d.ts +407 -0
  80. package/dist/agent-executor/handoff-schemas.d.ts.map +1 -0
  81. package/dist/agent-executor/handoff.d.ts +12 -0
  82. package/dist/agent-executor/handoff.d.ts.map +1 -0
  83. package/dist/agent-executor/hello.d.ts +72 -0
  84. package/dist/agent-executor/hello.d.ts.map +1 -1
  85. package/dist/agent-executor/image-input.d.ts +22 -0
  86. package/dist/agent-executor/image-input.d.ts.map +1 -1
  87. package/dist/agent-executor/projection.d.ts +2 -2
  88. package/dist/agent-executor/projection.d.ts.map +1 -1
  89. package/dist/agent-executor/session-primitives.d.ts +10 -1
  90. package/dist/agent-executor/session-primitives.d.ts.map +1 -1
  91. package/dist/agent-executor/testing/conformance.d.ts.map +1 -1
  92. package/dist/agent-executor/testing/replay-driver.d.ts +41 -0
  93. package/dist/agent-executor/testing/replay-driver.d.ts.map +1 -0
  94. package/dist/agent-executor/testing/replay-gate.d.ts +11 -0
  95. package/dist/agent-executor/testing/replay-gate.d.ts.map +1 -0
  96. package/dist/agent-executor/testing/replay-runner.d.ts +27 -0
  97. package/dist/agent-executor/testing/replay-runner.d.ts.map +1 -0
  98. package/dist/agent-executor/testing/replay-scenarios.d.ts +21 -0
  99. package/dist/agent-executor/testing/replay-scenarios.d.ts.map +1 -0
  100. package/dist/agent-executor/testing/replay-transcript.d.ts +296 -0
  101. package/dist/agent-executor/testing/replay-transcript.d.ts.map +1 -0
  102. package/dist/agent-executor/vocabulary.d.ts +135 -0
  103. package/dist/agent-executor/vocabulary.d.ts.map +1 -1
  104. package/dist/agent-runtime/branch-observations.d.ts +18 -18
  105. package/dist/agent-runtime/branch-provider.d.ts +2 -2
  106. package/dist/agent-runtime/deferred-tool-selection.d.ts.map +1 -1
  107. package/dist/agent-runtime/sql-rows.d.ts +10 -10
  108. package/dist/agent-runtime/store-conformance-lifecycle.d.ts +20 -20
  109. package/dist/agent-runtime/store-conformance-support.d.ts +10 -10
  110. package/dist/agent-runtime/terminal-commit.d.ts +10 -10
  111. package/dist/entrypoints/agent-executor/acp.d.ts +4 -1
  112. package/dist/entrypoints/agent-executor/acp.d.ts.map +1 -1
  113. package/dist/entrypoints/agent-executor/acp.js +847 -214
  114. package/dist/entrypoints/agent-executor/claude-sdk.d.ts +5 -1
  115. package/dist/entrypoints/agent-executor/claude-sdk.d.ts.map +1 -1
  116. package/dist/entrypoints/agent-executor/claude-sdk.js +713 -205
  117. package/dist/entrypoints/agent-executor/claude.js +44 -19
  118. package/dist/entrypoints/agent-executor/codex.d.ts +10 -2
  119. package/dist/entrypoints/agent-executor/codex.d.ts.map +1 -1
  120. package/dist/entrypoints/agent-executor/codex.js +2269 -600
  121. package/dist/entrypoints/agent-executor/testing.d.ts +4 -0
  122. package/dist/entrypoints/agent-executor/testing.d.ts.map +1 -1
  123. package/dist/entrypoints/agent-executor/testing.js +1002 -2
  124. package/dist/entrypoints/agent-executor.d.ts +4 -2
  125. package/dist/entrypoints/agent-executor.d.ts.map +1 -1
  126. package/dist/entrypoints/agent-executor.js +411 -23
  127. package/dist/entrypoints/agent-runtime.js +4 -23
  128. package/dist/entrypoints/tools/mcp.d.ts +1 -0
  129. package/dist/entrypoints/tools/mcp.d.ts.map +1 -1
  130. package/dist/entrypoints/tools/mcp.js +1 -1
  131. package/dist/entrypoints/tools/toolkit.js +1 -1
  132. package/dist/{index-wv2amqm4.js → index-2s8sy57y.js} +36 -103
  133. package/dist/{index-afb6z77w.js → index-dbp6xemn.js} +75 -7
  134. package/dist/{index-bjmj2q1z.js → index-jrn3prgm.js} +1 -1
  135. package/dist/index-kne9g2c5.js +30 -0
  136. package/dist/index-p1qmpq0p.js +1300 -0
  137. package/dist/{index-7jqn3b3g.js → index-v759mzed.js} +152 -2
  138. package/dist/{index-cbhxhma2.js → index-x5ayy5bn.js} +1 -0
  139. package/dist/index-y0a4gt1s.js +142 -0
  140. package/dist/tools/internal/rank-tools.d.ts +10 -0
  141. package/dist/tools/internal/rank-tools.d.ts.map +1 -0
  142. package/dist/tools/mcp/handler.d.ts +7 -3
  143. package/dist/tools/mcp/handler.d.ts.map +1 -1
  144. package/dist/tools/mcp/lazy-discovery.d.ts +47 -0
  145. package/dist/tools/mcp/lazy-discovery.d.ts.map +1 -0
  146. package/dist/tools/mcp/mount.d.ts +7 -0
  147. package/dist/tools/mcp/mount.d.ts.map +1 -1
  148. package/dist/tools/mcp/register.d.ts +2 -2
  149. package/dist/tools/mcp/register.d.ts.map +1 -1
  150. package/llms/agent-executor-acp.txt +7 -8
  151. package/llms/agent-executor-claude-sdk.txt +4 -2
  152. package/llms/agent-executor-codex.txt +8 -4
  153. package/llms/agent-executor-testing.txt +5 -1
  154. package/llms/agent-executor.txt +7 -6
  155. package/llms/stitchkit.txt +74 -74
  156. package/llms/tools-mcp.txt +3 -2
  157. package/llms/tools.txt +24 -0
  158. package/llms/{upgrading-0.128.0-0.129.0.txt → upgrading-0.128.0-0.130.0.txt} +30 -3
  159. package/llms/upgrading.txt +1 -1
  160. package/llms-full.txt +159 -97
  161. package/llms.txt +8 -8
  162. package/package.json +1 -1
  163. package/dist/index-y71zn1gw.js +0 -586
@@ -0,0 +1,144 @@
1
+ import type { JsonRpcValue } from '../json-rpc-peer.js';
2
+ /** Thread identifier target shared by single-thread Codex RPCs (`thread/unsubscribe`, `thread/archive`, `thread/unarchive`, `thread/compact/start`). */
3
+ export interface CodexThreadIdParams {
4
+ /** Thread identifier to target. */
5
+ readonly threadId: string;
6
+ }
7
+ /** Parameters for Codex `turn/interrupt`. */
8
+ export interface CodexInterruptTurnParams {
9
+ /** Thread identifier whose active turn will be interrupted. */
10
+ readonly threadId: string;
11
+ /** Turn identifier to interrupt (including external/TUI or reconnected turns). */
12
+ readonly turnId: string;
13
+ }
14
+ /** Parameters for Codex `thread/revert`. */
15
+ export interface CodexRevertThreadParams {
16
+ /** Thread identifier whose durable history will be reverted. */
17
+ readonly threadId: string;
18
+ /** Turn excluded from the replacement history, together with every later turn. */
19
+ readonly beforeTurnId: string;
20
+ }
21
+ /** Result returned by Codex `thread/revert`. */
22
+ export interface CodexRevertThreadResult {
23
+ /** Updated loaded thread metadata (`turns` is empty; hydrate via `thread/turns/list`). */
24
+ readonly thread: JsonRpcValue;
25
+ /** Opaque cursor for hydrating retained turns backwards, or `null` when absent. */
26
+ readonly turnsBackwardsCursor: string | null;
27
+ /** Opaque cursor for hydrating retained items backwards, or `null` when absent. */
28
+ readonly itemsBackwardsCursor: string | null;
29
+ }
30
+ /** Parameters for Codex `thread/inject_items`. */
31
+ export interface CodexInjectItemsParams {
32
+ /** Thread identifier to append Responses API items into. */
33
+ readonly threadId: string;
34
+ /** Raw Responses API items to append to the thread's model-visible history. */
35
+ readonly items: readonly JsonRpcValue[];
36
+ }
37
+ /** Sort key accepted by Codex `thread/list`. */
38
+ export type CodexThreadSortKey = 'created_at' | 'updated_at' | 'recency_at' | 'section_position';
39
+ /** Thread source kind filter accepted by Codex `thread/list`. */
40
+ export type CodexThreadSourceKind = 'cli' | 'vscode' | 'exec' | 'appServer' | 'subAgent' | 'subAgentReview' | 'subAgentCompact' | 'subAgentThreadSpawn' | 'subAgentOther' | 'unknown';
41
+ /** Parameters for Codex `thread/list`. */
42
+ export interface CodexListThreadsParams {
43
+ /** Opaque pagination cursor returned by a previous call. */
44
+ readonly cursor?: string | null;
45
+ /** Optional page size (`uint32`). */
46
+ readonly limit?: number | null;
47
+ /** Optional sort key (`created_at`, `updated_at`, `recency_at`, or `section_position`). */
48
+ readonly sortKey?: CodexThreadSortKey | null;
49
+ /** Optional sort direction (`asc` or `desc`). */
50
+ readonly sortDirection?: 'asc' | 'desc' | null;
51
+ /** Optional provider allowlist filter. */
52
+ readonly modelProviders?: readonly string[] | null;
53
+ /** Optional source kind filter. */
54
+ readonly sourceKinds?: readonly CodexThreadSourceKind[] | null;
55
+ /** Optional archived filter (`true` for archived only; `false`/`null` for non-archived). */
56
+ readonly archived?: boolean | null;
57
+ /** Optional exact working directory filter (one path or list of paths). */
58
+ readonly cwd?: string | readonly string[] | null;
59
+ /** Optional substring filter for the extracted thread title. */
60
+ readonly searchTerm?: string | null;
61
+ /** Section filter: omit for all sections, `null` for unsectioned, or a section id string. */
62
+ readonly sectionId?: string | null;
63
+ /** Restrict results to up to 100 thread IDs before pagination. */
64
+ readonly includedThreadIds?: readonly string[] | null;
65
+ /** Exclude up to 100 thread IDs before applying the page limit. */
66
+ readonly excludedThreadIds?: readonly string[] | null;
67
+ /** Optional originator allowlist (hosted backends only). */
68
+ readonly originators?: readonly string[] | null;
69
+ /** Show local history visible to the current ChatGPT account. */
70
+ readonly currentAccountOnly?: boolean;
71
+ /** Return indexed local state-DB metadata without scanning JSONL rollouts. */
72
+ readonly useStateDbOnly?: boolean;
73
+ }
74
+ /** Parameters for Codex `thread/loaded/list`. */
75
+ export interface CodexListLoadedThreadsParams {
76
+ /** Opaque pagination cursor returned by a previous call. */
77
+ readonly cursor?: string | null;
78
+ /** Optional page size (`uint32`). */
79
+ readonly limit?: number | null;
80
+ }
81
+ /** Git metadata patch accepted by Codex `thread/metadata/update`. */
82
+ export interface CodexThreadGitInfoUpdate {
83
+ /** Omit to leave unchanged, `null` to clear, or a non-empty string to replace. */
84
+ readonly branch?: string | null;
85
+ /** Omit to leave unchanged, `null` to clear, or a non-empty string to replace. */
86
+ readonly originUrl?: string | null;
87
+ /** Omit to leave unchanged, `null` to clear, or a non-empty string to replace. */
88
+ readonly sha?: string | null;
89
+ }
90
+ /** Parameters for Codex `thread/metadata/update`. */
91
+ export interface CodexUpdateThreadMetadataParams {
92
+ /** Thread identifier whose stored metadata will be patched. */
93
+ readonly threadId: string;
94
+ /** Patch stored Git metadata for the thread. */
95
+ readonly gitInfo?: CodexThreadGitInfoUpdate | null;
96
+ }
97
+ /** Parameters for Codex `thread/name/set`. */
98
+ export interface CodexSetThreadNameParams {
99
+ /** Thread identifier to rename. */
100
+ readonly threadId: string;
101
+ /** Non-empty display name to assign to the thread. */
102
+ readonly name: string;
103
+ }
104
+ /** Thread lifecycle, history, and catalog RPCs verified in `codex-cli 0.171.0`. */
105
+ export interface CodexThreadControlMethods {
106
+ /** Revert a thread's durable history to before `beforeTurnId` (`thread/revert`). */
107
+ revertThread(params: CodexRevertThreadParams): Promise<CodexRevertThreadResult>;
108
+ /** Append raw Responses API items to a thread's model-visible history (`thread/inject_items`). */
109
+ injectItems(params: CodexInjectItemsParams): Promise<JsonRpcValue>;
110
+ /** Unsubscribe this connection from a thread (`thread/unsubscribe`). */
111
+ unsubscribeThread(params: CodexThreadIdParams): Promise<JsonRpcValue>;
112
+ /** List threads with pagination and bounded filters (`thread/list`). */
113
+ listThreads(params?: CodexListThreadsParams): Promise<JsonRpcValue>;
114
+ /** List thread identifiers currently loaded in memory (`thread/loaded/list`). */
115
+ listLoadedThreads(params?: CodexListLoadedThreadsParams): Promise<JsonRpcValue>;
116
+ /** Archive a thread (`thread/archive`). */
117
+ archiveThread(params: CodexThreadIdParams): Promise<JsonRpcValue>;
118
+ /** Unarchive a thread (`thread/unarchive`). */
119
+ unarchiveThread(params: CodexThreadIdParams): Promise<JsonRpcValue>;
120
+ /** Patch stored metadata (such as Git info) for a thread (`thread/metadata/update`). */
121
+ updateThreadMetadata(params: CodexUpdateThreadMetadataParams): Promise<JsonRpcValue>;
122
+ /** Set a thread's display name (`thread/name/set`). */
123
+ setThreadName(params: CodexSetThreadNameParams): Promise<JsonRpcValue>;
124
+ /** Interrupt a running turn on a thread (`turn/interrupt`), including external/TUI or reconnected turns. */
125
+ interruptTurn(params: CodexInterruptTurnParams): Promise<void>;
126
+ /** Request context compaction for a thread (`thread/compact/start`). */
127
+ compactThread(params: CodexThreadIdParams): Promise<void>;
128
+ }
129
+ /** Validate a required non-empty thread identifier. */
130
+ export declare function assertNonEmptyThreadId(threadId: unknown, caller: string): string;
131
+ /** Validate a required non-empty string parameter. */
132
+ export declare function assertRequiredNonEmptyString(value: unknown, field: string, caller: string): string;
133
+ /** Validate an optional non-empty string parameter. */
134
+ export declare function assertOptionalNonEmptyString(value: string | undefined, field: string, caller: string): void;
135
+ /** Validate an optional non-empty string parameter without NUL bytes. */
136
+ export declare function assertOptionalNonEmptyNoNulString(value: string | undefined, field: string, caller: string): void;
137
+ /** Validate an optional or nullable `uint32` page limit. */
138
+ export declare function assertOptionalLimit(limit: number | null | undefined, caller: string): void;
139
+ /** Build the verified `0.171.0` thread lifecycle, revert, injection, interrupt, compaction, and catalog RPC methods. */
140
+ export declare function createCodexThreadControlMethods(call: (method: string, params?: Record<string, JsonRpcValue>) => Promise<JsonRpcValue>, options?: {
141
+ readonly ensureAlive?: () => void;
142
+ readonly onBeforeInterruptTurn?: (threadId: string, turnId: string) => void;
143
+ }): CodexThreadControlMethods;
144
+ //# sourceMappingURL=thread-controls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"thread-controls.d.ts","sourceRoot":"","sources":["../../../src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mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAM1F;AA2GD,wHAAwH;AACxH,wBAAgB,+BAA+B,CAC7C,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,KAAK,OAAO,CAAC,YAAY,CAAC,EACtF,OAAO,GAAE;IACP,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IAClC,QAAQ,CAAC,qBAAqB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACxE,GACL,yBAAyB,CA+F3B"}
@@ -0,0 +1,66 @@
1
+ import type { PlanLimits } from '../hello.js';
2
+ import { type DriverImageOptions } from '../image-input.js';
3
+ import type { JsonRpcPeer, JsonRpcValue } from '../json-rpc-peer.js';
4
+ import type { CodexConnectConfig } from './connect.js';
5
+ import type { CodexControlClient } from './control-client.js';
6
+ import type { CodexNotificationEvent, CodexServerRequestEvent } from './handlers.js';
7
+ import { type CodexThreadContext } from './protocol.js';
8
+ import { type CodexTurnSlot } from './request-answers.js';
9
+ import { type CodexOpenForkOptions, type CodexOpenInput, type CodexThreadPolicyOverrides, type CodexTurn, type CodexTurnInput } from './session-controls.js';
10
+ /** Parameters for Codex `thread/resume`. */
11
+ export interface CodexResumeThreadParams extends CodexThreadPolicyOverrides {
12
+ /** Thread identifier to resume. */
13
+ readonly threadId: string;
14
+ /** Optional working directory override forwarded on `thread/resume`. */
15
+ readonly cwd?: string;
16
+ /** Defaults to `true` when omitted so large threads do not inline full history into the resume reply. */
17
+ readonly excludeTurns?: boolean;
18
+ }
19
+ export interface CodexSessionConfig extends DriverImageOptions, CodexConnectConfig {
20
+ readonly model?: string;
21
+ readonly modelProvider?: string;
22
+ readonly approvalPolicy: CodexThreadPolicyOverrides['approvalPolicy'];
23
+ readonly sandbox: CodexThreadPolicyOverrides['sandbox'];
24
+ readonly developerInstructions?: string;
25
+ readonly runtimeWorkspaceRoots?: readonly string[];
26
+ readonly config?: Readonly<Record<string, JsonRpcValue>>;
27
+ readonly prepareThread?: (context: {
28
+ readonly controls: CodexControlClient;
29
+ readonly cwd: string;
30
+ readonly nativeThreadId?: string;
31
+ readonly forkFrom?: CodexOpenForkOptions;
32
+ }) => Promise<CodexThreadPolicyOverrides | undefined> | CodexThreadPolicyOverrides | undefined;
33
+ readonly verifyThread?: (context: {
34
+ readonly nativeThreadId: string;
35
+ readonly threadContext: CodexThreadContext;
36
+ readonly controls: CodexControlClient;
37
+ }) => Promise<void> | void;
38
+ readonly onNotification?: (event: CodexNotificationEvent) => void;
39
+ readonly onServerRequest?: (event: CodexServerRequestEvent) => void;
40
+ readonly serverRequestDelivery?: 'external-only' | 'all';
41
+ readonly onDisconnect?: (error: Error) => void;
42
+ readonly limits: Map<string, PlanLimits>;
43
+ }
44
+ /** Mark and drain a local driver-started turn when `turn/interrupt` targets its exact `codexTurnId`. */
45
+ export declare function interruptLocalCodexTurn(turn: CodexTurnSlot | undefined, turnId: string): void;
46
+ /** Validate and normalize JSON-RPC params for `thread/resume` (defaults `excludeTurns` to `true`). */
47
+ export declare function buildCodexResumeThreadParams(params: CodexResumeThreadParams): Record<string, JsonRpcValue>;
48
+ export declare function createCodexStartTurn(input: {
49
+ config: CodexSessionConfig;
50
+ peer: JsonRpcPeer;
51
+ threadId: string;
52
+ activeModelProvider: string | undefined;
53
+ signal: AbortSignal;
54
+ ensureAlive(): void;
55
+ getTurn(): CodexTurnSlot | undefined;
56
+ setTurn(turn: CodexTurnSlot | undefined): void;
57
+ }): (turnInput: CodexTurnInput) => Promise<CodexTurn>;
58
+ export declare function validateCodexOpenInput(input: CodexOpenInput): void;
59
+ export declare function mergeOpenThreadPolicy(config: CodexSessionConfig, forkFrom: CodexOpenForkOptions | undefined, dynamicOverrides: CodexThreadPolicyOverrides | undefined): Record<string, JsonRpcValue>;
60
+ /** Dispatch `thread/fork`, `thread/resume`, or `thread/start` with merged policy overrides. */
61
+ export declare function openCodexThreadRpc(peer: JsonRpcPeer, config: CodexSessionConfig, input: {
62
+ readonly cwd: string;
63
+ readonly nativeThreadId?: string;
64
+ readonly forkFrom?: CodexOpenForkOptions;
65
+ }, dynamicOverrides: CodexThreadPolicyOverrides | undefined): Promise<JsonRpcValue>;
66
+ //# sourceMappingURL=thread-open.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"thread-open.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/codex/thread-open.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,KAAK,kBAAkB,EAAsB,MAAM,gBAAgB,CAAC;AAC7E,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAElE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,KAAK,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAClF,OAAO,EAA0B,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAC7E,OAAO,EAEL,KAAK,aAAa,EAEnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAGL,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,0BAA0B,EAC/B,KAAK,SAAS,EACd,KAAK,cAAc,EAIpB,MAAM,oBAAoB,CAAC;AAI5B,4CAA4C;AAC5C,MAAM,WAAW,uBAAwB,SAAQ,0BAA0B;IACzE,mCAAmC;IACnC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,wEAAwE;IACxE,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,yGAAyG;IACzG,QAAQ,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WAAW,EACjB,MAAM,EAAE,kBAAkB,EAC1B,KAAK,EAAE;IACL,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,QAAQ,CAAC,EAAE,oBAAoB,CAAC;CAC1C,EACD,gBAAgB,EAAE,0BAA0B,GAAG,SAAS,GACvD,OAAO,CAAC,YAAY,CAAC,CA0BvB"}
@@ -0,0 +1,47 @@
1
+ import { z } from 'zod';
2
+ import type { AgentMessagePart } from '../../agent-parts/parts.js';
3
+ import { type DriverImageOptions, type InlinedPart } from '../image-input.js';
4
+ import type { JsonRpcPeer, JsonRpcValue } from '../json-rpc-peer.js';
5
+ /** Codex-native `skill` user input item forwarded verbatim in `turn/start` and `turn/steer`. */
6
+ export declare const CodexSkillInputSchema: z.ZodObject<{
7
+ type: z.ZodLiteral<"skill">;
8
+ name: z.ZodString;
9
+ path: z.ZodString;
10
+ }, z.core.$strict>;
11
+ /** Codex-native `skill` input item inferred from {@link CodexSkillInputSchema}. */
12
+ export type CodexSkillInput = z.infer<typeof CodexSkillInputSchema>;
13
+ /** Codex-native `localImage` user input item referencing a host-authorized local image path. */
14
+ export declare const CodexLocalImageInputSchema: z.ZodObject<{
15
+ type: z.ZodLiteral<"localImage">;
16
+ path: z.ZodString;
17
+ }, z.core.$strict>;
18
+ /** Codex-native `localImage` input item inferred from {@link CodexLocalImageInputSchema}. */
19
+ export type CodexLocalImageInput = z.infer<typeof CodexLocalImageInputSchema>;
20
+ /** Ordered input element accepted by {@link CodexSession.startTurn}, {@link CodexSession.steerTurn}, and {@link CodexControlClient.steerTurn}. */
21
+ export type CodexTurnInputPart = AgentMessagePart | CodexSkillInput | CodexLocalImageInput;
22
+ /** Validated, host-resolved Codex turn part ready for wire serialization. */
23
+ export type InlinedCodexPart = InlinedPart | CodexSkillInput | CodexLocalImageInput;
24
+ /**
25
+ * Validate every Codex turn part synchronously before the first `resolveFile` call, then resolve
26
+ * image attachments in original order alongside text, `localImage`, and `skill` items.
27
+ */
28
+ export declare function inlineCodexParts(parts: readonly CodexTurnInputPart[], options: DriverImageOptions & {
29
+ readonly driverLabel: string;
30
+ readonly signal?: AbortSignal;
31
+ }): Promise<InlinedCodexPart[]>;
32
+ /**
33
+ * Encode validated Codex turn parts into app-server `UserInput[]` items: plain text joins into
34
+ * one text item (preserving wire compatibility), while inputs with images, `localImage`, or skills
35
+ * keep exact order.
36
+ */
37
+ export declare function codexTurnInput(parts: readonly InlinedCodexPart[]): JsonRpcValue[];
38
+ /** Send one validated `turn/steer` JSON-RPC request and parse its acknowledged `turnId`. */
39
+ export declare function sendCodexTurnSteer(peer: JsonRpcPeer, params: {
40
+ readonly threadId: string;
41
+ readonly expectedTurnId: string;
42
+ readonly parts: readonly InlinedCodexPart[];
43
+ readonly clientId?: string;
44
+ }): Promise<{
45
+ readonly turnId: string;
46
+ }>;
47
+ //# sourceMappingURL=turn-input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"turn-input.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/codex/turn-input.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,WAAW,EAAsB,MAAM,gBAAgB,CAAC;AAC/F,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAiBlE,gGAAgG;AAChG,eAAO,MAAM,qBAAqB;;;;kBAIhC,CAAC;AAEH,mFAAmF;AACnF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,gGAAgG;AAChG,eAAO,MAAM,0BAA0B;;;kBAGrC,CAAC;AAEH,6FAA6F;AAC7F,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,kJAAkJ;AAClJ,MAAM,MAAM,kBAAkB,GAAG,gBAAgB,GAAG,eAAe,GAAG,oBAAoB,CAAC;AAE3F,6EAA6E;AAC7E,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,eAAe,GAAG,oBAAoB,CAAC;AA0BpF;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,SAAS,kBAAkB,EAAE,EACpC,OAAO,EAAE,kBAAkB,GAAG;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CAC/B,GACA,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAM7B;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,gBAAgB,EAAE,GAAG,YAAY,EAAE,CAmBjF;AAED,4FAA4F;AAC5F,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,WAAW,EACjB,MAAM,EAAE;IACN,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,KAAK,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAC5C,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B,GACA,OAAO,CAAC;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAUtC"}
@@ -34,6 +34,29 @@ declare const agentExecutorEndpoints: {
34
34
  answer: z.ZodLiteral<"failed">;
35
35
  error: z.ZodString;
36
36
  }, z.core.$strict>], "answer">;
37
+ capabilities: z.ZodOptional<z.ZodObject<{
38
+ runtimePolicyEnforcement: z.ZodEnum<{
39
+ "client-boundary": "client-boundary";
40
+ native: "native";
41
+ }>;
42
+ sessionApproval: z.ZodBoolean;
43
+ interruptOnDeny: z.ZodBoolean;
44
+ updatedToolInput: z.ZodBoolean;
45
+ structuredInput: z.ZodBoolean;
46
+ steer: z.ZodBoolean;
47
+ fork: z.ZodBoolean;
48
+ revert: z.ZodBoolean;
49
+ compact: z.ZodBoolean;
50
+ injectItems: z.ZodBoolean;
51
+ backgroundWorkOutlivesTurn: z.ZodBoolean;
52
+ multiThreadPerProcess: z.ZodBoolean;
53
+ images: z.ZodBoolean;
54
+ planLimits: z.ZodEnum<{
55
+ none: "none";
56
+ passive: "passive";
57
+ pull: "pull";
58
+ }>;
59
+ }, z.core.$strict>>;
37
60
  }, z.core.$strict>>;
38
61
  profiles: z.ZodArray<z.ZodObject<{
39
62
  profileId: z.ZodString;
@@ -261,7 +284,38 @@ declare const agentExecutorEndpoints: {
261
284
  inputTokens: z.ZodOptional<z.ZodInt>;
262
285
  outputTokens: z.ZodOptional<z.ZodInt>;
263
286
  cachedInputTokens: z.ZodOptional<z.ZodInt>;
287
+ cacheCreationInputTokens: z.ZodOptional<z.ZodInt>;
288
+ thinkingTokens: z.ZodOptional<z.ZodInt>;
289
+ totalTokens: z.ZodOptional<z.ZodInt>;
264
290
  costUsd: z.ZodOptional<z.ZodNumber>;
291
+ total: z.ZodOptional<z.ZodObject<{
292
+ inputTokens: z.ZodOptional<z.ZodInt>;
293
+ outputTokens: z.ZodOptional<z.ZodInt>;
294
+ cachedInputTokens: z.ZodOptional<z.ZodInt>;
295
+ cacheCreationInputTokens: z.ZodOptional<z.ZodInt>;
296
+ thinkingTokens: z.ZodOptional<z.ZodInt>;
297
+ totalTokens: z.ZodOptional<z.ZodInt>;
298
+ }, z.core.$strict>>;
299
+ modelUsage: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
300
+ inputTokens: z.ZodInt;
301
+ outputTokens: z.ZodInt;
302
+ cacheReadInputTokens: z.ZodOptional<z.ZodInt>;
303
+ cacheCreationInputTokens: z.ZodOptional<z.ZodInt>;
304
+ thinkingTokens: z.ZodOptional<z.ZodInt>;
305
+ cacheCreationEphemeral5mInputTokens: z.ZodOptional<z.ZodInt>;
306
+ cacheCreationEphemeral1hInputTokens: z.ZodOptional<z.ZodInt>;
307
+ webSearchRequests: z.ZodOptional<z.ZodInt>;
308
+ costUsd: z.ZodOptional<z.ZodNumber>;
309
+ contextWindow: z.ZodOptional<z.ZodInt>;
310
+ maxOutputTokens: z.ZodOptional<z.ZodInt>;
311
+ canonicalModel: z.ZodOptional<z.ZodString>;
312
+ provider: z.ZodOptional<z.ZodString>;
313
+ costBasis: z.ZodOptional<z.ZodEnum<{
314
+ list: "list";
315
+ managed: "managed";
316
+ unknown: "unknown";
317
+ }>>;
318
+ }, z.core.$strict>>>;
265
319
  }, z.core.$strict>, z.ZodObject<{
266
320
  turnId: z.ZodString;
267
321
  itemId: z.ZodString;
@@ -272,6 +326,15 @@ declare const agentExecutorEndpoints: {
272
326
  type: z.ZodLiteral<"context-usage">;
273
327
  usedTokens: z.ZodInt;
274
328
  windowTokens: z.ZodInt;
329
+ }, z.core.$strict>, z.ZodObject<{
330
+ turnId: z.ZodString;
331
+ itemId: z.ZodString;
332
+ raw: z.ZodObject<{
333
+ source: z.ZodString;
334
+ type: z.ZodString;
335
+ }, z.core.$strict>;
336
+ type: z.ZodLiteral<"status">;
337
+ phase: z.ZodString;
275
338
  }, z.core.$strict>, z.ZodObject<{
276
339
  turnId: z.ZodString;
277
340
  itemId: z.ZodString;
@@ -285,6 +348,10 @@ declare const agentExecutorEndpoints: {
285
348
  failed: "failed";
286
349
  interrupted: "interrupted";
287
350
  }>;
351
+ threadDisposition: z.ZodOptional<z.ZodEnum<{
352
+ broken: "broken";
353
+ reusable: "reusable";
354
+ }>>;
288
355
  }, z.core.$strict>, z.ZodObject<{
289
356
  turnId: z.ZodString;
290
357
  itemId: z.ZodString;
@@ -326,6 +393,10 @@ declare const agentExecutorEndpoints: {
326
393
  timeout: "timeout";
327
394
  }>;
328
395
  message: z.ZodString;
396
+ threadDisposition: z.ZodOptional<z.ZodEnum<{
397
+ broken: "broken";
398
+ reusable: "reusable";
399
+ }>>;
329
400
  }, z.core.$strict>>;
330
401
  }, z.core.$strict>;
331
402
  readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -440,9 +511,15 @@ declare const agentExecutorServerEvents: {
440
511
  interactionId: z.ZodString;
441
512
  reply: z.ZodDiscriminatedUnion<[z.ZodObject<{
442
513
  kind: z.ZodLiteral<"approve">;
514
+ scope: z.ZodOptional<z.ZodEnum<{
515
+ once: "once";
516
+ session: "session";
517
+ }>>;
518
+ updatedInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
443
519
  }, z.core.$strict>, z.ZodObject<{
444
520
  kind: z.ZodLiteral<"deny">;
445
521
  message: z.ZodString;
522
+ interrupt: z.ZodOptional<z.ZodBoolean>;
446
523
  }, z.core.$strict>, z.ZodObject<{
447
524
  kind: z.ZodLiteral<"input">;
448
525
  value: z.ZodJSONSchema;
@@ -1 +1 @@
1
- {"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../src/agent-executor/contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,WAAW,EAAoC,MAAM,oBAAoB,CAAC;AACxF,OAAO,EAEL,KAAK,gBAAgB,EAEtB,MAAM,sBAAsB,CAAC;AAc9B,yFAAyF;AACzF,QAAA,MAAM,sBAAsB;;iBAExB,MAAM,EAAE,MAAM;iBACd,IAAI,EAAE,QAAQ;iBACd,MAAM;iBACN,MAAM,EAAE,OAAO;iBACf,IAAI,EAAE,mGAAmG;iBACzG,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBACL,MAAM;;;;;;;;;;;;;iBAGN,MAAM,EAAE,MAAM;iBACd,IAAI,EAAE,gBAAgB;iBACtB,MAAM;iBACN,MAAM,EAAE,OAAO;iBACf,IAAI,EAAE,gEAAgE;iBACtE,KAAK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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBACL,MAAM;;;;;;;;;;CAEsC,CAAC;AAEjD;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,SAAS,MAAM,EAAE,MAAM,EAAE;IACzE,KAAK,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,WAAW,CAAC,OAAO,sBAAsB,EAAE,MAAM,CAAC,CAKrD;AAED,4DAA4D;AAC5D,QAAA,MAAM,yBAAyB;;QACb,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QACA,IAAI;;;;;;QACR,IAAI;;;;;;;;;;;;;;;;;;;;CACW,CAAC;AAElC,wFAAwF;AACxF,eAAO,MAAM,6BAA6B,EAAE,gBAAgB,CAC1D,OAAO,yBAAyB,EAChC,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CACuE,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import type { AgentMessagePart } from '../agent-parts/parts.js';
2
2
  import type { InteractionReply } from './executor-contract.js';
3
- import type { ExecutorEngine, ExecutorEngineInfo, ExecutorProfile, PlanLimits } from './hello.js';
3
+ import type { ExecutorDriverCapabilities, ExecutorEngine, ExecutorEngineInfo, ExecutorProfile, PlanLimits } from './hello.js';
4
4
  import type { ExecutorProfileConfig } from './profile.js';
5
- import type { ExecutorDelta } from './vocabulary.js';
5
+ import type { ExecutorDelta, ExecutorStartupPhase } from './vocabulary.js';
6
6
  /** One turn running in an engine: its deltas, and the two ways to steer it. */
7
7
  export interface AgentEngineTurn {
8
8
  /** Ends after the `turn-end` delta, or with an error when the engine died. */
@@ -40,6 +40,8 @@ export interface AgentEngineDriver {
40
40
  readonly engine: ExecutorEngine;
41
41
  /** `client-id`: `findInput` can answer; `none`: an unknown send stays unknown. */
42
42
  readonly reconcile: 'client-id' | 'none';
43
+ /** Declarative driver capabilities advertised for this driver and configuration. */
44
+ readonly capabilities?: ExecutorDriverCapabilities;
43
45
  info(): Promise<ExecutorEngineInfo>;
44
46
  status(profile: ExecutorProfileConfig): Promise<{
45
47
  login: ExecutorProfile['login'];
@@ -51,6 +53,8 @@ export interface AgentEngineDriver {
51
53
  cwd: string;
52
54
  /** Resume this native session; a fresh one is started without it. */
53
55
  nativeThreadId?: string;
56
+ /** Optional observer invoked with startup phases (`spawning`, `initializing`, `verifying`) during open. */
57
+ onStartupPhase?: (phase: ExecutorStartupPhase) => void;
54
58
  signal?: AbortSignal;
55
59
  }): Promise<AgentEngineSession>;
56
60
  /** Whether the engine holds the input sent under `clientId`; only for `reconcile: 'client-id'`. */
@@ -1 +1 @@
1
- {"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../src/agent-executor/engine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC/F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,+EAA+E;AAC/E,MAAM,WAAW,eAAe;IAC9B,8EAA8E;IAC9E,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;IAC9C,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B,yEAAyE;IACzE,OAAO,CAAC,aAAa,EAA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,MAAM,EAAE,cAAc,CAAC;IAChC,kFAAkF;IAClF,QAAQ,CAAC,SAAS,EAAE,WAAW,GAAG,MAAM,CAAC;IACzC,oFAAoF;IACpF,QAAQ,CAAC,YAAY,CAAC,EAAE,0BAA0B,CAAC;IACnD,IAAI,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACpC,MAAM,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC;QAC9C,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;QAChC,mBAAmB,EAAE,eAAe,CAAC,qBAAqB,CAAC,CAAC;QAC5D,UAAU,CAAC,EAAE,UAAU,CAAC;KACzB,CAAC,CAAC;IACH,IAAI,CAAC,KAAK,EAAE;QACV,OAAO,EAAE,qBAAqB,CAAC;QAC/B,GAAG,EAAE,MAAM,CAAC;QACZ,qEAAqE;QACrE,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,2GAA2G;QAC3G,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAC;QACvD,MAAM,CAAC,EAAE,WAAW,CAAC;KACtB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAChC,mGAAmG;IACnG,SAAS,CAAC,CAAC,KAAK,EAAE;QAChB,OAAO,EAAE,qBAAqB,CAAC;QAC/B,GAAG,EAAE,MAAM,CAAC;QACZ,cAAc,EAAE,MAAM,CAAC;QACvB,QAAQ,EAAE,MAAM,CAAC;KAClB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACtB"}
@@ -261,7 +261,38 @@ export declare const TurnReportSchema: z.ZodObject<{
261
261
  inputTokens: z.ZodOptional<z.ZodInt>;
262
262
  outputTokens: z.ZodOptional<z.ZodInt>;
263
263
  cachedInputTokens: z.ZodOptional<z.ZodInt>;
264
+ cacheCreationInputTokens: z.ZodOptional<z.ZodInt>;
265
+ thinkingTokens: z.ZodOptional<z.ZodInt>;
266
+ totalTokens: z.ZodOptional<z.ZodInt>;
264
267
  costUsd: z.ZodOptional<z.ZodNumber>;
268
+ total: z.ZodOptional<z.ZodObject<{
269
+ inputTokens: z.ZodOptional<z.ZodInt>;
270
+ outputTokens: z.ZodOptional<z.ZodInt>;
271
+ cachedInputTokens: z.ZodOptional<z.ZodInt>;
272
+ cacheCreationInputTokens: z.ZodOptional<z.ZodInt>;
273
+ thinkingTokens: z.ZodOptional<z.ZodInt>;
274
+ totalTokens: z.ZodOptional<z.ZodInt>;
275
+ }, z.core.$strict>>;
276
+ modelUsage: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
277
+ inputTokens: z.ZodInt;
278
+ outputTokens: z.ZodInt;
279
+ cacheReadInputTokens: z.ZodOptional<z.ZodInt>;
280
+ cacheCreationInputTokens: z.ZodOptional<z.ZodInt>;
281
+ thinkingTokens: z.ZodOptional<z.ZodInt>;
282
+ cacheCreationEphemeral5mInputTokens: z.ZodOptional<z.ZodInt>;
283
+ cacheCreationEphemeral1hInputTokens: z.ZodOptional<z.ZodInt>;
284
+ webSearchRequests: z.ZodOptional<z.ZodInt>;
285
+ costUsd: z.ZodOptional<z.ZodNumber>;
286
+ contextWindow: z.ZodOptional<z.ZodInt>;
287
+ maxOutputTokens: z.ZodOptional<z.ZodInt>;
288
+ canonicalModel: z.ZodOptional<z.ZodString>;
289
+ provider: z.ZodOptional<z.ZodString>;
290
+ costBasis: z.ZodOptional<z.ZodEnum<{
291
+ list: "list";
292
+ managed: "managed";
293
+ unknown: "unknown";
294
+ }>>;
295
+ }, z.core.$strict>>>;
265
296
  }, z.core.$strict>, z.ZodObject<{
266
297
  turnId: z.ZodString;
267
298
  itemId: z.ZodString;
@@ -272,6 +303,15 @@ export declare const TurnReportSchema: z.ZodObject<{
272
303
  type: z.ZodLiteral<"context-usage">;
273
304
  usedTokens: z.ZodInt;
274
305
  windowTokens: z.ZodInt;
306
+ }, z.core.$strict>, z.ZodObject<{
307
+ turnId: z.ZodString;
308
+ itemId: z.ZodString;
309
+ raw: z.ZodObject<{
310
+ source: z.ZodString;
311
+ type: z.ZodString;
312
+ }, z.core.$strict>;
313
+ type: z.ZodLiteral<"status">;
314
+ phase: z.ZodString;
275
315
  }, z.core.$strict>, z.ZodObject<{
276
316
  turnId: z.ZodString;
277
317
  itemId: z.ZodString;
@@ -285,6 +325,10 @@ export declare const TurnReportSchema: z.ZodObject<{
285
325
  failed: "failed";
286
326
  interrupted: "interrupted";
287
327
  }>;
328
+ threadDisposition: z.ZodOptional<z.ZodEnum<{
329
+ broken: "broken";
330
+ reusable: "reusable";
331
+ }>>;
288
332
  }, z.core.$strict>, z.ZodObject<{
289
333
  turnId: z.ZodString;
290
334
  itemId: z.ZodString;
@@ -326,6 +370,10 @@ export declare const TurnReportSchema: z.ZodObject<{
326
370
  timeout: "timeout";
327
371
  }>;
328
372
  message: z.ZodString;
373
+ threadDisposition: z.ZodOptional<z.ZodEnum<{
374
+ broken: "broken";
375
+ reusable: "reusable";
376
+ }>>;
329
377
  }, z.core.$strict>>;
330
378
  }, z.core.$strict>;
331
379
  /**
@@ -355,9 +403,15 @@ export declare const InteractionReplySchema: z.ZodObject<{
355
403
  interactionId: z.ZodString;
356
404
  reply: z.ZodDiscriminatedUnion<[z.ZodObject<{
357
405
  kind: z.ZodLiteral<"approve">;
406
+ scope: z.ZodOptional<z.ZodEnum<{
407
+ once: "once";
408
+ session: "session";
409
+ }>>;
410
+ updatedInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
358
411
  }, z.core.$strict>, z.ZodObject<{
359
412
  kind: z.ZodLiteral<"deny">;
360
413
  message: z.ZodString;
414
+ interrupt: z.ZodOptional<z.ZodBoolean>;
361
415
  }, z.core.$strict>, z.ZodObject<{
362
416
  kind: z.ZodLiteral<"input">;
363
417
  value: z.ZodJSONSchema;
@@ -1 +1 @@
1
- {"version":3,"file":"executor-contract.d.ts","sourceRoot":"","sources":["../../src/agent-executor/executor-contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,E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