stitchkit 0.103.0 → 0.103.2

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 (87) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/agent-runtime/browser-control-contract.d.ts +1118 -0
  3. package/dist/agent-runtime/browser-control-contract.d.ts.map +1 -0
  4. package/dist/agent-runtime/browser-controller.d.ts +31 -0
  5. package/dist/agent-runtime/browser-controller.d.ts.map +1 -0
  6. package/dist/agent-runtime/harness-control.d.ts.map +1 -1
  7. package/dist/agent-runtime/harness-realtime.d.ts +25 -0
  8. package/dist/agent-runtime/harness-realtime.d.ts.map +1 -0
  9. package/dist/agent-runtime/harness-tools.d.ts +11 -0
  10. package/dist/agent-runtime/harness-tools.d.ts.map +1 -0
  11. package/dist/agent-runtime/react.d.ts +4 -0
  12. package/dist/agent-runtime/react.d.ts.map +1 -0
  13. package/dist/agent-runtime/run-assertions.d.ts +63 -0
  14. package/dist/agent-runtime/run-assertions.d.ts.map +1 -0
  15. package/dist/entrypoints/agent-runtime/browser.d.ts +2 -0
  16. package/dist/entrypoints/agent-runtime/browser.d.ts.map +1 -1
  17. package/dist/entrypoints/agent-runtime/browser.js +235 -0
  18. package/dist/entrypoints/agent-runtime/coding-tools.js +3 -3
  19. package/dist/entrypoints/agent-runtime/harness-tools.d.ts +2 -0
  20. package/dist/entrypoints/agent-runtime/harness-tools.d.ts.map +1 -0
  21. package/dist/entrypoints/agent-runtime/harness-tools.js +32 -0
  22. package/dist/entrypoints/agent-runtime/harness.js +13 -228
  23. package/dist/entrypoints/agent-runtime/react.d.ts +2 -0
  24. package/dist/entrypoints/agent-runtime/react.d.ts.map +1 -0
  25. package/dist/entrypoints/agent-runtime/react.js +8 -0
  26. package/dist/entrypoints/agent-runtime/realtime.d.ts +2 -0
  27. package/dist/entrypoints/agent-runtime/realtime.d.ts.map +1 -0
  28. package/dist/entrypoints/agent-runtime/realtime.js +159 -0
  29. package/dist/entrypoints/agent-runtime/sandbox.js +3 -3
  30. package/dist/entrypoints/agent-runtime/testing.d.ts +1 -0
  31. package/dist/entrypoints/agent-runtime/testing.d.ts.map +1 -1
  32. package/dist/entrypoints/agent-runtime/testing.js +67 -2
  33. package/dist/entrypoints/agent-runtime.js +25 -20
  34. package/dist/entrypoints/cli.js +8 -8
  35. package/dist/entrypoints/index.js +15 -226
  36. package/dist/entrypoints/node.js +7 -5
  37. package/dist/entrypoints/observability.js +2 -2
  38. package/dist/entrypoints/react.js +2 -2
  39. package/dist/entrypoints/remote.js +3 -3
  40. package/dist/entrypoints/server.js +10 -8
  41. package/dist/entrypoints/testing.js +4 -4
  42. package/dist/entrypoints/tools/connections.js +2 -2
  43. package/dist/entrypoints/tools/invoker.js +6 -6
  44. package/dist/entrypoints/tools.js +25 -36
  45. package/dist/entrypoints/tracking.js +2 -2
  46. package/dist/{index-d82d3xg4.js → index-0c419yx7.js} +1 -1
  47. package/dist/{index-c6aagrbd.js → index-1br6gwhf.js} +4 -4
  48. package/dist/{index-xkhk5d6g.js → index-1khy8y7n.js} +5 -48
  49. package/dist/index-20yvtn9a.js +38 -0
  50. package/dist/{index-a9pd417t.js → index-5vyd0fkb.js} +1 -34
  51. package/dist/{index-r1z0rd9c.js → index-7n68nmc6.js} +1 -1
  52. package/dist/{index-zs4ms3th.js → index-90ppdx3q.js} +7 -30
  53. package/dist/{index-djjhhgjk.js → index-a4ajxwmb.js} +1 -1
  54. package/dist/index-c9d05kvt.js +11 -0
  55. package/dist/{index-ewbaywk5.js → index-dnn9z96q.js} +3 -3
  56. package/dist/index-jn9g8xdt.js +246 -0
  57. package/dist/index-kmpzj1cq.js +48 -0
  58. package/dist/{index-dvwj1f43.js → index-m2xqkv55.js} +2 -2
  59. package/dist/{index-m9fndta6.js → index-n2gre124.js} +3 -3
  60. package/dist/index-nggfa2yn.js +34 -0
  61. package/dist/{index-m79yr938.js → index-pw99k9h5.js} +1 -10
  62. package/dist/index-qapzv4p5.js +54 -0
  63. package/dist/index-r34mvse1.js +225 -0
  64. package/dist/{index-n9tyz8z3.js → index-r956rndn.js} +2 -2
  65. package/dist/index-srs8hj9c.js +10 -0
  66. package/dist/{index-jzczzcsb.js → index-tgzhq07n.js} +1 -1
  67. package/dist/index-vgkbcnkc.js +29 -0
  68. package/dist/{index-7z9ym7t8.js → index-x87j7csh.js} +35 -14
  69. package/dist/{index-3ct7hhq6.js → index-xwq9j1sf.js} +6 -56
  70. package/dist/{index-hby4qhax.js → index-yex7eg1v.js} +4 -10
  71. package/dist/{index-1h6gtdrj.js → index-ygkka6zn.js} +1 -1
  72. package/dist/index-ze1eph1k.js +20 -0
  73. package/dist/tools/schema/flatten-join.d.ts +1 -1
  74. package/dist/tools/schema/flatten-join.d.ts.map +1 -1
  75. package/dist/tools/schema/flatten.d.ts.map +1 -1
  76. package/llms/agent-runtime-browser.txt +26 -0
  77. package/llms/agent-runtime-harness-tools.txt +25 -0
  78. package/llms/agent-runtime-harness.txt +140 -1
  79. package/llms/agent-runtime-react.txt +21 -0
  80. package/llms/agent-runtime-realtime.txt +30 -0
  81. package/llms/agent-runtime-testing.txt +6 -0
  82. package/llms/stitchkit.txt +5 -1
  83. package/llms/tools.3.txt +1 -1
  84. package/llms/tools.txt +19 -1
  85. package/llms-full.txt +229 -3
  86. package/llms.txt +9 -5
  87. package/package.json +13 -1
@@ -0,0 +1,1118 @@
1
+ import { z } from 'zod';
2
+ /** Untrusted user input cannot manufacture tool evidence or supply runtime identity. */
3
+ export declare const AgentBrowserRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
4
+ schemaVersion: z.ZodLiteral<1>;
5
+ requestId: z.ZodString;
6
+ operation: z.ZodLiteral<"attach">;
7
+ conversationId: z.ZodString;
8
+ access: z.ZodEnum<{
9
+ control: "control";
10
+ observe: "observe";
11
+ }>;
12
+ }, z.core.$strict>, z.ZodObject<{
13
+ schemaVersion: z.ZodLiteral<1>;
14
+ requestId: z.ZodString;
15
+ operation: z.ZodLiteral<"detach">;
16
+ conversationId: z.ZodString;
17
+ }, z.core.$strict>, z.ZodObject<{
18
+ schemaVersion: z.ZodLiteral<1>;
19
+ requestId: z.ZodString;
20
+ operation: z.ZodLiteral<"snapshot">;
21
+ conversationId: z.ZodString;
22
+ }, z.core.$strict>, z.ZodObject<{
23
+ schemaVersion: z.ZodLiteral<1>;
24
+ requestId: z.ZodString;
25
+ operation: z.ZodLiteral<"submit">;
26
+ conversationId: z.ZodString;
27
+ idempotencyKey: z.ZodString;
28
+ metadata: z.ZodOptional<z.ZodUnknown>;
29
+ parts: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
30
+ type: z.ZodLiteral<"text">;
31
+ text: z.ZodString;
32
+ }, z.core.$strict>, z.ZodObject<{
33
+ type: z.ZodLiteral<"file">;
34
+ mediaType: z.ZodString;
35
+ reference: z.ZodString;
36
+ filename: z.ZodOptional<z.ZodString>;
37
+ }, z.core.$strict>]>>;
38
+ }, z.core.$strict>, z.ZodObject<{
39
+ schemaVersion: z.ZodLiteral<1>;
40
+ requestId: z.ZodString;
41
+ operation: z.ZodLiteral<"interrupt">;
42
+ conversationId: z.ZodString;
43
+ runId: z.ZodString;
44
+ }, z.core.$strict>, z.ZodObject<{
45
+ schemaVersion: z.ZodLiteral<1>;
46
+ requestId: z.ZodString;
47
+ operation: z.ZodLiteral<"respond-approval">;
48
+ conversationId: z.ZodString;
49
+ approvalId: z.ZodString;
50
+ approved: z.ZodBoolean;
51
+ reason: z.ZodOptional<z.ZodString>;
52
+ metadata: z.ZodOptional<z.ZodUnknown>;
53
+ }, z.core.$strict>], "operation">;
54
+ export type AgentBrowserRequest = z.infer<typeof AgentBrowserRequestSchema>;
55
+ export declare const agentControlRealtimeContract: import("../realtime/index.js").RealtimeContract<{
56
+ readonly 'agent:delivery': {
57
+ args: z.ZodTuple<[z.ZodDiscriminatedUnion<[z.ZodObject<{
58
+ schemaVersion: z.ZodLiteral<1>;
59
+ type: z.ZodLiteral<"event">;
60
+ event: z.ZodDiscriminatedUnion<[z.ZodObject<{
61
+ type: z.ZodLiteral<"admission">;
62
+ eventId: z.ZodString;
63
+ conversationId: z.ZodString;
64
+ runId: z.ZodString;
65
+ snapshotVersion: z.ZodInt;
66
+ input: z.ZodObject<{
67
+ schemaVersion: z.ZodLiteral<1>;
68
+ id: z.ZodString;
69
+ conversationId: z.ZodString;
70
+ runId: z.ZodOptional<z.ZodString>;
71
+ role: z.ZodEnum<{
72
+ assistant: "assistant";
73
+ summary: "summary";
74
+ system: "system";
75
+ tool: "tool";
76
+ user: "user";
77
+ }>;
78
+ status: z.ZodEnum<{
79
+ committed: "committed";
80
+ completed: "completed";
81
+ failed: "failed";
82
+ interrupted: "interrupted";
83
+ streaming: "streaming";
84
+ superseded: "superseded";
85
+ }>;
86
+ parts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
87
+ type: z.ZodLiteral<"text">;
88
+ text: z.ZodString;
89
+ }, z.core.$strip>, z.ZodObject<{
90
+ type: z.ZodLiteral<"reasoning">;
91
+ text: z.ZodString;
92
+ provider: z.ZodOptional<z.ZodObject<{
93
+ schemaVersion: z.ZodInt;
94
+ provider: z.ZodString;
95
+ data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
96
+ }, z.core.$strip>>;
97
+ }, z.core.$strip>, z.ZodObject<{
98
+ type: z.ZodLiteral<"file">;
99
+ mediaType: z.ZodString;
100
+ reference: z.ZodString;
101
+ filename: z.ZodOptional<z.ZodString>;
102
+ }, z.core.$strip>, z.ZodObject<{
103
+ type: z.ZodLiteral<"source">;
104
+ sourceId: z.ZodString;
105
+ url: z.ZodOptional<z.ZodURL>;
106
+ title: z.ZodOptional<z.ZodString>;
107
+ }, z.core.$strip>, z.ZodObject<{
108
+ type: z.ZodLiteral<"tool-call">;
109
+ callId: z.ZodString;
110
+ toolName: z.ZodString;
111
+ input: z.ZodJSONSchema;
112
+ provider: z.ZodOptional<z.ZodObject<{
113
+ schemaVersion: z.ZodInt;
114
+ provider: z.ZodString;
115
+ data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
116
+ }, z.core.$strip>>;
117
+ }, z.core.$strip>, z.ZodObject<{
118
+ type: z.ZodLiteral<"tool-result">;
119
+ callId: z.ZodString;
120
+ toolName: z.ZodString;
121
+ outcome: z.ZodEnum<{
122
+ error: "error";
123
+ interrupted: "interrupted";
124
+ success: "success";
125
+ }>;
126
+ output: z.ZodOptional<z.ZodJSONSchema>;
127
+ }, z.core.$strip>, z.ZodObject<{
128
+ type: z.ZodLiteral<"tool-approval-request">;
129
+ approvalId: z.ZodString;
130
+ callId: z.ZodString;
131
+ isAutomatic: z.ZodOptional<z.ZodBoolean>;
132
+ signature: z.ZodOptional<z.ZodString>;
133
+ }, z.core.$strip>, z.ZodObject<{
134
+ type: z.ZodLiteral<"tool-approval-response">;
135
+ approvalId: z.ZodString;
136
+ approved: z.ZodBoolean;
137
+ reason: z.ZodOptional<z.ZodString>;
138
+ }, z.core.$strip>, z.ZodObject<{
139
+ type: z.ZodLiteral<"provider">;
140
+ envelope: z.ZodObject<{
141
+ schemaVersion: z.ZodInt;
142
+ provider: z.ZodString;
143
+ data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
144
+ }, z.core.$strip>;
145
+ }, z.core.$strip>, z.ZodObject<{
146
+ type: z.ZodLiteral<"control">;
147
+ reason: z.ZodEnum<{
148
+ "run-interrupted": "run-interrupted";
149
+ "stale-run": "stale-run";
150
+ }>;
151
+ }, z.core.$strip>], "type">>;
152
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
153
+ createdAt: z.ZodISODateTime;
154
+ updatedAt: z.ZodISODateTime;
155
+ }, z.core.$strip>;
156
+ run: z.ZodObject<{
157
+ schemaVersion: z.ZodLiteral<1>;
158
+ id: z.ZodString;
159
+ conversationId: z.ZodString;
160
+ inputMessageIds: z.ZodArray<z.ZodString>;
161
+ assistantMessageId: z.ZodString;
162
+ state: z.ZodEnum<{
163
+ abandoned: "abandoned";
164
+ cancelled: "cancelled";
165
+ completed: "completed";
166
+ failed: "failed";
167
+ interrupt_requested: "interrupt_requested";
168
+ interrupted: "interrupted";
169
+ queued: "queued";
170
+ running: "running";
171
+ superseded: "superseded";
172
+ }>;
173
+ revision: z.ZodInt;
174
+ queuePriority: z.ZodOptional<z.ZodEnum<{
175
+ "interrupt-next": "interrupt-next";
176
+ }>>;
177
+ executionSequence: z.ZodOptional<z.ZodInt>;
178
+ ownerId: z.ZodOptional<z.ZodString>;
179
+ fencingToken: z.ZodOptional<z.ZodInt>;
180
+ terminalReason: z.ZodOptional<z.ZodEnum<{
181
+ abandoned: "abandoned";
182
+ absorbed: "absorbed";
183
+ cancelled: "cancelled";
184
+ context_overflow: "context_overflow";
185
+ interrupted: "interrupted";
186
+ output_rejected: "output_rejected";
187
+ policy_stop: "policy_stop";
188
+ provider_failure: "provider_failure";
189
+ provider_stop: "provider_stop";
190
+ runtime_failure: "runtime_failure";
191
+ shutdown: "shutdown";
192
+ storage_conflict: "storage_conflict";
193
+ success: "success";
194
+ superseded: "superseded";
195
+ timeout: "timeout";
196
+ }>>;
197
+ terminalPolicyName: z.ZodOptional<z.ZodString>;
198
+ absorbedIntoRunId: z.ZodOptional<z.ZodString>;
199
+ usage: z.ZodOptional<z.ZodObject<{
200
+ inputTokens: z.ZodObject<{
201
+ value: z.ZodOptional<z.ZodInt>;
202
+ provenance: z.ZodEnum<{
203
+ computed: "computed";
204
+ estimated: "estimated";
205
+ "provider-reported": "provider-reported";
206
+ unavailable: "unavailable";
207
+ }>;
208
+ }, z.core.$strip>;
209
+ outputTokens: z.ZodObject<{
210
+ value: z.ZodOptional<z.ZodInt>;
211
+ provenance: z.ZodEnum<{
212
+ computed: "computed";
213
+ estimated: "estimated";
214
+ "provider-reported": "provider-reported";
215
+ unavailable: "unavailable";
216
+ }>;
217
+ }, z.core.$strip>;
218
+ reasoningTokens: z.ZodOptional<z.ZodObject<{
219
+ value: z.ZodOptional<z.ZodInt>;
220
+ provenance: z.ZodEnum<{
221
+ computed: "computed";
222
+ estimated: "estimated";
223
+ "provider-reported": "provider-reported";
224
+ unavailable: "unavailable";
225
+ }>;
226
+ }, z.core.$strip>>;
227
+ cacheReadTokens: z.ZodOptional<z.ZodObject<{
228
+ value: z.ZodOptional<z.ZodInt>;
229
+ provenance: z.ZodEnum<{
230
+ computed: "computed";
231
+ estimated: "estimated";
232
+ "provider-reported": "provider-reported";
233
+ unavailable: "unavailable";
234
+ }>;
235
+ }, z.core.$strip>>;
236
+ cacheWriteTokens: z.ZodOptional<z.ZodObject<{
237
+ value: z.ZodOptional<z.ZodInt>;
238
+ provenance: z.ZodEnum<{
239
+ computed: "computed";
240
+ estimated: "estimated";
241
+ "provider-reported": "provider-reported";
242
+ unavailable: "unavailable";
243
+ }>;
244
+ }, z.core.$strip>>;
245
+ cost: z.ZodOptional<z.ZodObject<{
246
+ value: z.ZodOptional<z.ZodNumber>;
247
+ currency: z.ZodOptional<z.ZodString>;
248
+ provenance: z.ZodEnum<{
249
+ computed: "computed";
250
+ estimated: "estimated";
251
+ "provider-reported": "provider-reported";
252
+ unavailable: "unavailable";
253
+ }>;
254
+ }, z.core.$strip>>;
255
+ }, z.core.$strip>>;
256
+ lastOperation: z.ZodOptional<z.ZodObject<{
257
+ operationId: z.ZodString;
258
+ kind: z.ZodEnum<{
259
+ compaction: "compaction";
260
+ "model-request": "model-request";
261
+ }>;
262
+ phase: z.ZodEnum<{
263
+ cancelled: "cancelled";
264
+ completed: "completed";
265
+ failed: "failed";
266
+ "first-output": "first-output";
267
+ started: "started";
268
+ }>;
269
+ step: z.ZodOptional<z.ZodInt>;
270
+ startedAt: z.ZodISODateTime;
271
+ firstOutputAt: z.ZodOptional<z.ZodISODateTime>;
272
+ finishedAt: z.ZodOptional<z.ZodISODateTime>;
273
+ }, z.core.$strip>>;
274
+ createdAt: z.ZodISODateTime;
275
+ updatedAt: z.ZodISODateTime;
276
+ }, z.core.$strip>;
277
+ assistant: z.ZodUnion<readonly [z.ZodObject<{
278
+ schemaVersion: z.ZodLiteral<1>;
279
+ id: z.ZodString;
280
+ conversationId: z.ZodString;
281
+ runId: z.ZodString;
282
+ status: z.ZodLiteral<"pending">;
283
+ createdAt: z.ZodISODateTime;
284
+ updatedAt: z.ZodISODateTime;
285
+ }, z.core.$strip>, z.ZodObject<{
286
+ schemaVersion: z.ZodLiteral<1>;
287
+ id: z.ZodString;
288
+ conversationId: z.ZodString;
289
+ runId: z.ZodOptional<z.ZodString>;
290
+ role: z.ZodEnum<{
291
+ assistant: "assistant";
292
+ summary: "summary";
293
+ system: "system";
294
+ tool: "tool";
295
+ user: "user";
296
+ }>;
297
+ status: z.ZodEnum<{
298
+ committed: "committed";
299
+ completed: "completed";
300
+ failed: "failed";
301
+ interrupted: "interrupted";
302
+ streaming: "streaming";
303
+ superseded: "superseded";
304
+ }>;
305
+ parts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
306
+ type: z.ZodLiteral<"text">;
307
+ text: z.ZodString;
308
+ }, z.core.$strip>, z.ZodObject<{
309
+ type: z.ZodLiteral<"reasoning">;
310
+ text: z.ZodString;
311
+ provider: z.ZodOptional<z.ZodObject<{
312
+ schemaVersion: z.ZodInt;
313
+ provider: z.ZodString;
314
+ data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
315
+ }, z.core.$strip>>;
316
+ }, z.core.$strip>, z.ZodObject<{
317
+ type: z.ZodLiteral<"file">;
318
+ mediaType: z.ZodString;
319
+ reference: z.ZodString;
320
+ filename: z.ZodOptional<z.ZodString>;
321
+ }, z.core.$strip>, z.ZodObject<{
322
+ type: z.ZodLiteral<"source">;
323
+ sourceId: z.ZodString;
324
+ url: z.ZodOptional<z.ZodURL>;
325
+ title: z.ZodOptional<z.ZodString>;
326
+ }, z.core.$strip>, z.ZodObject<{
327
+ type: z.ZodLiteral<"tool-call">;
328
+ callId: z.ZodString;
329
+ toolName: z.ZodString;
330
+ input: z.ZodJSONSchema;
331
+ provider: z.ZodOptional<z.ZodObject<{
332
+ schemaVersion: z.ZodInt;
333
+ provider: z.ZodString;
334
+ data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
335
+ }, z.core.$strip>>;
336
+ }, z.core.$strip>, z.ZodObject<{
337
+ type: z.ZodLiteral<"tool-result">;
338
+ callId: z.ZodString;
339
+ toolName: z.ZodString;
340
+ outcome: z.ZodEnum<{
341
+ error: "error";
342
+ interrupted: "interrupted";
343
+ success: "success";
344
+ }>;
345
+ output: z.ZodOptional<z.ZodJSONSchema>;
346
+ }, z.core.$strip>, z.ZodObject<{
347
+ type: z.ZodLiteral<"tool-approval-request">;
348
+ approvalId: z.ZodString;
349
+ callId: z.ZodString;
350
+ isAutomatic: z.ZodOptional<z.ZodBoolean>;
351
+ signature: z.ZodOptional<z.ZodString>;
352
+ }, z.core.$strip>, z.ZodObject<{
353
+ type: z.ZodLiteral<"tool-approval-response">;
354
+ approvalId: z.ZodString;
355
+ approved: z.ZodBoolean;
356
+ reason: z.ZodOptional<z.ZodString>;
357
+ }, z.core.$strip>, z.ZodObject<{
358
+ type: z.ZodLiteral<"provider">;
359
+ envelope: z.ZodObject<{
360
+ schemaVersion: z.ZodInt;
361
+ provider: z.ZodString;
362
+ data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
363
+ }, z.core.$strip>;
364
+ }, z.core.$strip>, z.ZodObject<{
365
+ type: z.ZodLiteral<"control">;
366
+ reason: z.ZodEnum<{
367
+ "run-interrupted": "run-interrupted";
368
+ "stale-run": "stale-run";
369
+ }>;
370
+ }, z.core.$strip>], "type">>;
371
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
372
+ createdAt: z.ZodISODateTime;
373
+ updatedAt: z.ZodISODateTime;
374
+ }, z.core.$strip>]>;
375
+ emittedAt: z.ZodISODateTime;
376
+ }, z.core.$strip>, z.ZodObject<{
377
+ conversationId: z.ZodString;
378
+ runId: z.ZodString;
379
+ emittedAt: z.ZodISODateTime;
380
+ type: z.ZodLiteral<"assistant-delta">;
381
+ runtimeEpoch: z.ZodString;
382
+ sequence: z.ZodInt;
383
+ textDelta: z.ZodString;
384
+ }, z.core.$strip>, z.ZodObject<{
385
+ conversationId: z.ZodString;
386
+ runId: z.ZodString;
387
+ emittedAt: z.ZodISODateTime;
388
+ runtimeEpoch: z.ZodString;
389
+ sequence: z.ZodInt;
390
+ provider: z.ZodOptional<z.ZodObject<{
391
+ schemaVersion: z.ZodInt;
392
+ provider: z.ZodString;
393
+ data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
394
+ }, z.core.$strip>>;
395
+ type: z.ZodLiteral<"reasoning-start">;
396
+ }, z.core.$strip>, z.ZodObject<{
397
+ conversationId: z.ZodString;
398
+ runId: z.ZodString;
399
+ emittedAt: z.ZodISODateTime;
400
+ runtimeEpoch: z.ZodString;
401
+ sequence: z.ZodInt;
402
+ provider: z.ZodOptional<z.ZodObject<{
403
+ schemaVersion: z.ZodInt;
404
+ provider: z.ZodString;
405
+ data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
406
+ }, z.core.$strip>>;
407
+ type: z.ZodLiteral<"reasoning-delta">;
408
+ textDelta: z.ZodString;
409
+ }, z.core.$strip>, z.ZodObject<{
410
+ conversationId: z.ZodString;
411
+ runId: z.ZodString;
412
+ emittedAt: z.ZodISODateTime;
413
+ runtimeEpoch: z.ZodString;
414
+ sequence: z.ZodInt;
415
+ provider: z.ZodOptional<z.ZodObject<{
416
+ schemaVersion: z.ZodInt;
417
+ provider: z.ZodString;
418
+ data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
419
+ }, z.core.$strip>>;
420
+ type: z.ZodLiteral<"reasoning-end">;
421
+ }, z.core.$strip>, z.ZodObject<{
422
+ conversationId: z.ZodString;
423
+ runId: z.ZodString;
424
+ emittedAt: z.ZodISODateTime;
425
+ type: z.ZodLiteral<"attempt-reset">;
426
+ runtimeEpoch: z.ZodString;
427
+ sequence: z.ZodInt;
428
+ attempt: z.ZodInt;
429
+ }, z.core.$strip>, z.ZodObject<{
430
+ conversationId: z.ZodString;
431
+ runId: z.ZodString;
432
+ emittedAt: z.ZodISODateTime;
433
+ type: z.ZodLiteral<"assistant-checkpoint">;
434
+ eventId: z.ZodString;
435
+ snapshotVersion: z.ZodInt;
436
+ message: z.ZodObject<{
437
+ schemaVersion: z.ZodLiteral<1>;
438
+ id: z.ZodString;
439
+ conversationId: z.ZodString;
440
+ runId: z.ZodOptional<z.ZodString>;
441
+ role: z.ZodEnum<{
442
+ assistant: "assistant";
443
+ summary: "summary";
444
+ system: "system";
445
+ tool: "tool";
446
+ user: "user";
447
+ }>;
448
+ status: z.ZodEnum<{
449
+ committed: "committed";
450
+ completed: "completed";
451
+ failed: "failed";
452
+ interrupted: "interrupted";
453
+ streaming: "streaming";
454
+ superseded: "superseded";
455
+ }>;
456
+ parts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
457
+ type: z.ZodLiteral<"text">;
458
+ text: z.ZodString;
459
+ }, z.core.$strip>, z.ZodObject<{
460
+ type: z.ZodLiteral<"reasoning">;
461
+ text: z.ZodString;
462
+ provider: z.ZodOptional<z.ZodObject<{
463
+ schemaVersion: z.ZodInt;
464
+ provider: z.ZodString;
465
+ data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
466
+ }, z.core.$strip>>;
467
+ }, z.core.$strip>, z.ZodObject<{
468
+ type: z.ZodLiteral<"file">;
469
+ mediaType: z.ZodString;
470
+ reference: z.ZodString;
471
+ filename: z.ZodOptional<z.ZodString>;
472
+ }, z.core.$strip>, z.ZodObject<{
473
+ type: z.ZodLiteral<"source">;
474
+ sourceId: z.ZodString;
475
+ url: z.ZodOptional<z.ZodURL>;
476
+ title: z.ZodOptional<z.ZodString>;
477
+ }, z.core.$strip>, z.ZodObject<{
478
+ type: z.ZodLiteral<"tool-call">;
479
+ callId: z.ZodString;
480
+ toolName: z.ZodString;
481
+ input: z.ZodJSONSchema;
482
+ provider: z.ZodOptional<z.ZodObject<{
483
+ schemaVersion: z.ZodInt;
484
+ provider: z.ZodString;
485
+ data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
486
+ }, z.core.$strip>>;
487
+ }, z.core.$strip>, z.ZodObject<{
488
+ type: z.ZodLiteral<"tool-result">;
489
+ callId: z.ZodString;
490
+ toolName: z.ZodString;
491
+ outcome: z.ZodEnum<{
492
+ error: "error";
493
+ interrupted: "interrupted";
494
+ success: "success";
495
+ }>;
496
+ output: z.ZodOptional<z.ZodJSONSchema>;
497
+ }, z.core.$strip>, z.ZodObject<{
498
+ type: z.ZodLiteral<"tool-approval-request">;
499
+ approvalId: z.ZodString;
500
+ callId: z.ZodString;
501
+ isAutomatic: z.ZodOptional<z.ZodBoolean>;
502
+ signature: z.ZodOptional<z.ZodString>;
503
+ }, z.core.$strip>, z.ZodObject<{
504
+ type: z.ZodLiteral<"tool-approval-response">;
505
+ approvalId: z.ZodString;
506
+ approved: z.ZodBoolean;
507
+ reason: z.ZodOptional<z.ZodString>;
508
+ }, z.core.$strip>, z.ZodObject<{
509
+ type: z.ZodLiteral<"provider">;
510
+ envelope: z.ZodObject<{
511
+ schemaVersion: z.ZodInt;
512
+ provider: z.ZodString;
513
+ data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
514
+ }, z.core.$strip>;
515
+ }, z.core.$strip>, z.ZodObject<{
516
+ type: z.ZodLiteral<"control">;
517
+ reason: z.ZodEnum<{
518
+ "run-interrupted": "run-interrupted";
519
+ "stale-run": "stale-run";
520
+ }>;
521
+ }, z.core.$strip>], "type">>;
522
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
523
+ createdAt: z.ZodISODateTime;
524
+ updatedAt: z.ZodISODateTime;
525
+ }, z.core.$strip>;
526
+ metrics: z.ZodOptional<z.ZodObject<{
527
+ partial: z.ZodBoolean;
528
+ usage: z.ZodObject<{
529
+ inputTokens: z.ZodObject<{
530
+ value: z.ZodOptional<z.ZodInt>;
531
+ provenance: z.ZodEnum<{
532
+ computed: "computed";
533
+ estimated: "estimated";
534
+ "provider-reported": "provider-reported";
535
+ unavailable: "unavailable";
536
+ }>;
537
+ }, z.core.$strip>;
538
+ outputTokens: z.ZodObject<{
539
+ value: z.ZodOptional<z.ZodInt>;
540
+ provenance: z.ZodEnum<{
541
+ computed: "computed";
542
+ estimated: "estimated";
543
+ "provider-reported": "provider-reported";
544
+ unavailable: "unavailable";
545
+ }>;
546
+ }, z.core.$strip>;
547
+ reasoningTokens: z.ZodOptional<z.ZodObject<{
548
+ value: z.ZodOptional<z.ZodInt>;
549
+ provenance: z.ZodEnum<{
550
+ computed: "computed";
551
+ estimated: "estimated";
552
+ "provider-reported": "provider-reported";
553
+ unavailable: "unavailable";
554
+ }>;
555
+ }, z.core.$strip>>;
556
+ cacheReadTokens: z.ZodOptional<z.ZodObject<{
557
+ value: z.ZodOptional<z.ZodInt>;
558
+ provenance: z.ZodEnum<{
559
+ computed: "computed";
560
+ estimated: "estimated";
561
+ "provider-reported": "provider-reported";
562
+ unavailable: "unavailable";
563
+ }>;
564
+ }, z.core.$strip>>;
565
+ cacheWriteTokens: z.ZodOptional<z.ZodObject<{
566
+ value: z.ZodOptional<z.ZodInt>;
567
+ provenance: z.ZodEnum<{
568
+ computed: "computed";
569
+ estimated: "estimated";
570
+ "provider-reported": "provider-reported";
571
+ unavailable: "unavailable";
572
+ }>;
573
+ }, z.core.$strip>>;
574
+ cost: z.ZodOptional<z.ZodObject<{
575
+ value: z.ZodOptional<z.ZodNumber>;
576
+ currency: z.ZodOptional<z.ZodString>;
577
+ provenance: z.ZodEnum<{
578
+ computed: "computed";
579
+ estimated: "estimated";
580
+ "provider-reported": "provider-reported";
581
+ unavailable: "unavailable";
582
+ }>;
583
+ }, z.core.$strip>>;
584
+ }, z.core.$strip>;
585
+ durationMs: z.ZodOptional<z.ZodNumber>;
586
+ ttftMs: z.ZodOptional<z.ZodNumber>;
587
+ }, z.core.$strip>>;
588
+ }, z.core.$strip>, z.ZodObject<{
589
+ conversationId: z.ZodString;
590
+ runId: z.ZodString;
591
+ emittedAt: z.ZodISODateTime;
592
+ type: z.ZodLiteral<"run-state">;
593
+ eventId: z.ZodString;
594
+ snapshotVersion: z.ZodInt;
595
+ state: z.ZodEnum<{
596
+ abandoned: "abandoned";
597
+ cancelled: "cancelled";
598
+ completed: "completed";
599
+ failed: "failed";
600
+ interrupt_requested: "interrupt_requested";
601
+ interrupted: "interrupted";
602
+ queued: "queued";
603
+ running: "running";
604
+ superseded: "superseded";
605
+ }>;
606
+ }, z.core.$strip>, z.ZodObject<{
607
+ conversationId: z.ZodString;
608
+ runId: z.ZodString;
609
+ emittedAt: z.ZodISODateTime;
610
+ type: z.ZodLiteral<"run-operation">;
611
+ eventId: z.ZodString;
612
+ snapshotVersion: z.ZodInt;
613
+ operation: z.ZodObject<{
614
+ operationId: z.ZodString;
615
+ kind: z.ZodEnum<{
616
+ compaction: "compaction";
617
+ "model-request": "model-request";
618
+ }>;
619
+ phase: z.ZodEnum<{
620
+ cancelled: "cancelled";
621
+ completed: "completed";
622
+ failed: "failed";
623
+ "first-output": "first-output";
624
+ started: "started";
625
+ }>;
626
+ step: z.ZodOptional<z.ZodInt>;
627
+ startedAt: z.ZodISODateTime;
628
+ firstOutputAt: z.ZodOptional<z.ZodISODateTime>;
629
+ finishedAt: z.ZodOptional<z.ZodISODateTime>;
630
+ }, z.core.$strip>;
631
+ }, z.core.$strip>, z.ZodObject<{
632
+ conversationId: z.ZodString;
633
+ runId: z.ZodString;
634
+ emittedAt: z.ZodISODateTime;
635
+ type: z.ZodLiteral<"tool-status">;
636
+ runtimeEpoch: z.ZodString;
637
+ sequence: z.ZodInt;
638
+ callId: z.ZodString;
639
+ toolName: z.ZodString;
640
+ status: z.ZodEnum<{
641
+ completed: "completed";
642
+ failed: "failed";
643
+ interrupted: "interrupted";
644
+ started: "started";
645
+ }>;
646
+ input: z.ZodOptional<z.ZodJSONSchema>;
647
+ output: z.ZodOptional<z.ZodJSONSchema>;
648
+ }, z.core.$strip>, z.ZodObject<{
649
+ conversationId: z.ZodString;
650
+ runId: z.ZodString;
651
+ emittedAt: z.ZodISODateTime;
652
+ type: z.ZodLiteral<"terminal">;
653
+ eventId: z.ZodString;
654
+ snapshotVersion: z.ZodInt;
655
+ reason: z.ZodEnum<{
656
+ abandoned: "abandoned";
657
+ absorbed: "absorbed";
658
+ cancelled: "cancelled";
659
+ context_overflow: "context_overflow";
660
+ interrupted: "interrupted";
661
+ output_rejected: "output_rejected";
662
+ policy_stop: "policy_stop";
663
+ provider_failure: "provider_failure";
664
+ provider_stop: "provider_stop";
665
+ runtime_failure: "runtime_failure";
666
+ shutdown: "shutdown";
667
+ storage_conflict: "storage_conflict";
668
+ success: "success";
669
+ superseded: "superseded";
670
+ timeout: "timeout";
671
+ }>;
672
+ policyName: z.ZodOptional<z.ZodString>;
673
+ message: z.ZodObject<{
674
+ schemaVersion: z.ZodLiteral<1>;
675
+ id: z.ZodString;
676
+ conversationId: z.ZodString;
677
+ runId: z.ZodOptional<z.ZodString>;
678
+ role: z.ZodEnum<{
679
+ assistant: "assistant";
680
+ summary: "summary";
681
+ system: "system";
682
+ tool: "tool";
683
+ user: "user";
684
+ }>;
685
+ status: z.ZodEnum<{
686
+ committed: "committed";
687
+ completed: "completed";
688
+ failed: "failed";
689
+ interrupted: "interrupted";
690
+ streaming: "streaming";
691
+ superseded: "superseded";
692
+ }>;
693
+ parts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
694
+ type: z.ZodLiteral<"text">;
695
+ text: z.ZodString;
696
+ }, z.core.$strip>, z.ZodObject<{
697
+ type: z.ZodLiteral<"reasoning">;
698
+ text: z.ZodString;
699
+ provider: z.ZodOptional<z.ZodObject<{
700
+ schemaVersion: z.ZodInt;
701
+ provider: z.ZodString;
702
+ data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
703
+ }, z.core.$strip>>;
704
+ }, z.core.$strip>, z.ZodObject<{
705
+ type: z.ZodLiteral<"file">;
706
+ mediaType: z.ZodString;
707
+ reference: z.ZodString;
708
+ filename: z.ZodOptional<z.ZodString>;
709
+ }, z.core.$strip>, z.ZodObject<{
710
+ type: z.ZodLiteral<"source">;
711
+ sourceId: z.ZodString;
712
+ url: z.ZodOptional<z.ZodURL>;
713
+ title: z.ZodOptional<z.ZodString>;
714
+ }, z.core.$strip>, z.ZodObject<{
715
+ type: z.ZodLiteral<"tool-call">;
716
+ callId: z.ZodString;
717
+ toolName: z.ZodString;
718
+ input: z.ZodJSONSchema;
719
+ provider: z.ZodOptional<z.ZodObject<{
720
+ schemaVersion: z.ZodInt;
721
+ provider: z.ZodString;
722
+ data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
723
+ }, z.core.$strip>>;
724
+ }, z.core.$strip>, z.ZodObject<{
725
+ type: z.ZodLiteral<"tool-result">;
726
+ callId: z.ZodString;
727
+ toolName: z.ZodString;
728
+ outcome: z.ZodEnum<{
729
+ error: "error";
730
+ interrupted: "interrupted";
731
+ success: "success";
732
+ }>;
733
+ output: z.ZodOptional<z.ZodJSONSchema>;
734
+ }, z.core.$strip>, z.ZodObject<{
735
+ type: z.ZodLiteral<"tool-approval-request">;
736
+ approvalId: z.ZodString;
737
+ callId: z.ZodString;
738
+ isAutomatic: z.ZodOptional<z.ZodBoolean>;
739
+ signature: z.ZodOptional<z.ZodString>;
740
+ }, z.core.$strip>, z.ZodObject<{
741
+ type: z.ZodLiteral<"tool-approval-response">;
742
+ approvalId: z.ZodString;
743
+ approved: z.ZodBoolean;
744
+ reason: z.ZodOptional<z.ZodString>;
745
+ }, z.core.$strip>, z.ZodObject<{
746
+ type: z.ZodLiteral<"provider">;
747
+ envelope: z.ZodObject<{
748
+ schemaVersion: z.ZodInt;
749
+ provider: z.ZodString;
750
+ data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
751
+ }, z.core.$strip>;
752
+ }, z.core.$strip>, z.ZodObject<{
753
+ type: z.ZodLiteral<"control">;
754
+ reason: z.ZodEnum<{
755
+ "run-interrupted": "run-interrupted";
756
+ "stale-run": "stale-run";
757
+ }>;
758
+ }, z.core.$strip>], "type">>;
759
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
760
+ createdAt: z.ZodISODateTime;
761
+ updatedAt: z.ZodISODateTime;
762
+ }, z.core.$strip>;
763
+ metrics: z.ZodOptional<z.ZodObject<{
764
+ partial: z.ZodBoolean;
765
+ usage: z.ZodObject<{
766
+ inputTokens: z.ZodObject<{
767
+ value: z.ZodOptional<z.ZodInt>;
768
+ provenance: z.ZodEnum<{
769
+ computed: "computed";
770
+ estimated: "estimated";
771
+ "provider-reported": "provider-reported";
772
+ unavailable: "unavailable";
773
+ }>;
774
+ }, z.core.$strip>;
775
+ outputTokens: z.ZodObject<{
776
+ value: z.ZodOptional<z.ZodInt>;
777
+ provenance: z.ZodEnum<{
778
+ computed: "computed";
779
+ estimated: "estimated";
780
+ "provider-reported": "provider-reported";
781
+ unavailable: "unavailable";
782
+ }>;
783
+ }, z.core.$strip>;
784
+ reasoningTokens: z.ZodOptional<z.ZodObject<{
785
+ value: z.ZodOptional<z.ZodInt>;
786
+ provenance: z.ZodEnum<{
787
+ computed: "computed";
788
+ estimated: "estimated";
789
+ "provider-reported": "provider-reported";
790
+ unavailable: "unavailable";
791
+ }>;
792
+ }, z.core.$strip>>;
793
+ cacheReadTokens: z.ZodOptional<z.ZodObject<{
794
+ value: z.ZodOptional<z.ZodInt>;
795
+ provenance: z.ZodEnum<{
796
+ computed: "computed";
797
+ estimated: "estimated";
798
+ "provider-reported": "provider-reported";
799
+ unavailable: "unavailable";
800
+ }>;
801
+ }, z.core.$strip>>;
802
+ cacheWriteTokens: z.ZodOptional<z.ZodObject<{
803
+ value: z.ZodOptional<z.ZodInt>;
804
+ provenance: z.ZodEnum<{
805
+ computed: "computed";
806
+ estimated: "estimated";
807
+ "provider-reported": "provider-reported";
808
+ unavailable: "unavailable";
809
+ }>;
810
+ }, z.core.$strip>>;
811
+ cost: z.ZodOptional<z.ZodObject<{
812
+ value: z.ZodOptional<z.ZodNumber>;
813
+ currency: z.ZodOptional<z.ZodString>;
814
+ provenance: z.ZodEnum<{
815
+ computed: "computed";
816
+ estimated: "estimated";
817
+ "provider-reported": "provider-reported";
818
+ unavailable: "unavailable";
819
+ }>;
820
+ }, z.core.$strip>>;
821
+ }, z.core.$strip>;
822
+ durationMs: z.ZodOptional<z.ZodNumber>;
823
+ ttftMs: z.ZodOptional<z.ZodNumber>;
824
+ }, z.core.$strip>>;
825
+ }, z.core.$strip>], "type">;
826
+ }, z.core.$strict>, z.ZodObject<{
827
+ schemaVersion: z.ZodLiteral<1>;
828
+ type: z.ZodLiteral<"resync-required">;
829
+ conversationId: z.ZodString;
830
+ reason: z.ZodLiteral<"overflow">;
831
+ }, z.core.$strict>], "type">], null>;
832
+ };
833
+ }, {
834
+ readonly 'agent:control': {
835
+ args: z.ZodTuple<[z.ZodDiscriminatedUnion<[z.ZodObject<{
836
+ schemaVersion: z.ZodLiteral<1>;
837
+ requestId: z.ZodString;
838
+ operation: z.ZodLiteral<"attach">;
839
+ conversationId: z.ZodString;
840
+ access: z.ZodEnum<{
841
+ control: "control";
842
+ observe: "observe";
843
+ }>;
844
+ }, z.core.$strict>, z.ZodObject<{
845
+ schemaVersion: z.ZodLiteral<1>;
846
+ requestId: z.ZodString;
847
+ operation: z.ZodLiteral<"detach">;
848
+ conversationId: z.ZodString;
849
+ }, z.core.$strict>, z.ZodObject<{
850
+ schemaVersion: z.ZodLiteral<1>;
851
+ requestId: z.ZodString;
852
+ operation: z.ZodLiteral<"snapshot">;
853
+ conversationId: z.ZodString;
854
+ }, z.core.$strict>, z.ZodObject<{
855
+ schemaVersion: z.ZodLiteral<1>;
856
+ requestId: z.ZodString;
857
+ operation: z.ZodLiteral<"submit">;
858
+ conversationId: z.ZodString;
859
+ idempotencyKey: z.ZodString;
860
+ metadata: z.ZodOptional<z.ZodUnknown>;
861
+ parts: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
862
+ type: z.ZodLiteral<"text">;
863
+ text: z.ZodString;
864
+ }, z.core.$strict>, z.ZodObject<{
865
+ type: z.ZodLiteral<"file">;
866
+ mediaType: z.ZodString;
867
+ reference: z.ZodString;
868
+ filename: z.ZodOptional<z.ZodString>;
869
+ }, z.core.$strict>]>>;
870
+ }, z.core.$strict>, z.ZodObject<{
871
+ schemaVersion: z.ZodLiteral<1>;
872
+ requestId: z.ZodString;
873
+ operation: z.ZodLiteral<"interrupt">;
874
+ conversationId: z.ZodString;
875
+ runId: z.ZodString;
876
+ }, z.core.$strict>, z.ZodObject<{
877
+ schemaVersion: z.ZodLiteral<1>;
878
+ requestId: z.ZodString;
879
+ operation: z.ZodLiteral<"respond-approval">;
880
+ conversationId: z.ZodString;
881
+ approvalId: z.ZodString;
882
+ approved: z.ZodBoolean;
883
+ reason: z.ZodOptional<z.ZodString>;
884
+ metadata: z.ZodOptional<z.ZodUnknown>;
885
+ }, z.core.$strict>], "operation">], null>;
886
+ ack: z.ZodDiscriminatedUnion<[z.ZodObject<{
887
+ schemaVersion: z.ZodLiteral<1>;
888
+ requestId: z.ZodString;
889
+ outcome: z.ZodLiteral<"ok">;
890
+ snapshot: z.ZodOptional<z.ZodObject<{
891
+ schemaVersion: z.ZodLiteral<1>;
892
+ conversationId: z.ZodString;
893
+ version: z.ZodInt;
894
+ messages: z.ZodArray<z.ZodObject<{
895
+ schemaVersion: z.ZodLiteral<1>;
896
+ id: z.ZodString;
897
+ conversationId: z.ZodString;
898
+ runId: z.ZodOptional<z.ZodString>;
899
+ role: z.ZodEnum<{
900
+ assistant: "assistant";
901
+ summary: "summary";
902
+ system: "system";
903
+ tool: "tool";
904
+ user: "user";
905
+ }>;
906
+ status: z.ZodEnum<{
907
+ committed: "committed";
908
+ completed: "completed";
909
+ failed: "failed";
910
+ interrupted: "interrupted";
911
+ streaming: "streaming";
912
+ superseded: "superseded";
913
+ }>;
914
+ parts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
915
+ type: z.ZodLiteral<"text">;
916
+ text: z.ZodString;
917
+ }, z.core.$strip>, z.ZodObject<{
918
+ type: z.ZodLiteral<"reasoning">;
919
+ text: z.ZodString;
920
+ provider: z.ZodOptional<z.ZodObject<{
921
+ schemaVersion: z.ZodInt;
922
+ provider: z.ZodString;
923
+ data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
924
+ }, z.core.$strip>>;
925
+ }, z.core.$strip>, z.ZodObject<{
926
+ type: z.ZodLiteral<"file">;
927
+ mediaType: z.ZodString;
928
+ reference: z.ZodString;
929
+ filename: z.ZodOptional<z.ZodString>;
930
+ }, z.core.$strip>, z.ZodObject<{
931
+ type: z.ZodLiteral<"source">;
932
+ sourceId: z.ZodString;
933
+ url: z.ZodOptional<z.ZodURL>;
934
+ title: z.ZodOptional<z.ZodString>;
935
+ }, z.core.$strip>, z.ZodObject<{
936
+ type: z.ZodLiteral<"tool-call">;
937
+ callId: z.ZodString;
938
+ toolName: z.ZodString;
939
+ input: z.ZodJSONSchema;
940
+ provider: z.ZodOptional<z.ZodObject<{
941
+ schemaVersion: z.ZodInt;
942
+ provider: z.ZodString;
943
+ data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
944
+ }, z.core.$strip>>;
945
+ }, z.core.$strip>, z.ZodObject<{
946
+ type: z.ZodLiteral<"tool-result">;
947
+ callId: z.ZodString;
948
+ toolName: z.ZodString;
949
+ outcome: z.ZodEnum<{
950
+ error: "error";
951
+ interrupted: "interrupted";
952
+ success: "success";
953
+ }>;
954
+ output: z.ZodOptional<z.ZodJSONSchema>;
955
+ }, z.core.$strip>, z.ZodObject<{
956
+ type: z.ZodLiteral<"tool-approval-request">;
957
+ approvalId: z.ZodString;
958
+ callId: z.ZodString;
959
+ isAutomatic: z.ZodOptional<z.ZodBoolean>;
960
+ signature: z.ZodOptional<z.ZodString>;
961
+ }, z.core.$strip>, z.ZodObject<{
962
+ type: z.ZodLiteral<"tool-approval-response">;
963
+ approvalId: z.ZodString;
964
+ approved: z.ZodBoolean;
965
+ reason: z.ZodOptional<z.ZodString>;
966
+ }, z.core.$strip>, z.ZodObject<{
967
+ type: z.ZodLiteral<"provider">;
968
+ envelope: z.ZodObject<{
969
+ schemaVersion: z.ZodInt;
970
+ provider: z.ZodString;
971
+ data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
972
+ }, z.core.$strip>;
973
+ }, z.core.$strip>, z.ZodObject<{
974
+ type: z.ZodLiteral<"control">;
975
+ reason: z.ZodEnum<{
976
+ "run-interrupted": "run-interrupted";
977
+ "stale-run": "stale-run";
978
+ }>;
979
+ }, z.core.$strip>], "type">>;
980
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
981
+ createdAt: z.ZodISODateTime;
982
+ updatedAt: z.ZodISODateTime;
983
+ }, z.core.$strip>>;
984
+ runs: z.ZodArray<z.ZodObject<{
985
+ schemaVersion: z.ZodLiteral<1>;
986
+ id: z.ZodString;
987
+ conversationId: z.ZodString;
988
+ inputMessageIds: z.ZodArray<z.ZodString>;
989
+ assistantMessageId: z.ZodString;
990
+ state: z.ZodEnum<{
991
+ abandoned: "abandoned";
992
+ cancelled: "cancelled";
993
+ completed: "completed";
994
+ failed: "failed";
995
+ interrupt_requested: "interrupt_requested";
996
+ interrupted: "interrupted";
997
+ queued: "queued";
998
+ running: "running";
999
+ superseded: "superseded";
1000
+ }>;
1001
+ revision: z.ZodInt;
1002
+ queuePriority: z.ZodOptional<z.ZodEnum<{
1003
+ "interrupt-next": "interrupt-next";
1004
+ }>>;
1005
+ executionSequence: z.ZodOptional<z.ZodInt>;
1006
+ ownerId: z.ZodOptional<z.ZodString>;
1007
+ fencingToken: z.ZodOptional<z.ZodInt>;
1008
+ terminalReason: z.ZodOptional<z.ZodEnum<{
1009
+ abandoned: "abandoned";
1010
+ absorbed: "absorbed";
1011
+ cancelled: "cancelled";
1012
+ context_overflow: "context_overflow";
1013
+ interrupted: "interrupted";
1014
+ output_rejected: "output_rejected";
1015
+ policy_stop: "policy_stop";
1016
+ provider_failure: "provider_failure";
1017
+ provider_stop: "provider_stop";
1018
+ runtime_failure: "runtime_failure";
1019
+ shutdown: "shutdown";
1020
+ storage_conflict: "storage_conflict";
1021
+ success: "success";
1022
+ superseded: "superseded";
1023
+ timeout: "timeout";
1024
+ }>>;
1025
+ terminalPolicyName: z.ZodOptional<z.ZodString>;
1026
+ absorbedIntoRunId: z.ZodOptional<z.ZodString>;
1027
+ usage: z.ZodOptional<z.ZodObject<{
1028
+ inputTokens: z.ZodObject<{
1029
+ value: z.ZodOptional<z.ZodInt>;
1030
+ provenance: z.ZodEnum<{
1031
+ computed: "computed";
1032
+ estimated: "estimated";
1033
+ "provider-reported": "provider-reported";
1034
+ unavailable: "unavailable";
1035
+ }>;
1036
+ }, z.core.$strip>;
1037
+ outputTokens: z.ZodObject<{
1038
+ value: z.ZodOptional<z.ZodInt>;
1039
+ provenance: z.ZodEnum<{
1040
+ computed: "computed";
1041
+ estimated: "estimated";
1042
+ "provider-reported": "provider-reported";
1043
+ unavailable: "unavailable";
1044
+ }>;
1045
+ }, z.core.$strip>;
1046
+ reasoningTokens: z.ZodOptional<z.ZodObject<{
1047
+ value: z.ZodOptional<z.ZodInt>;
1048
+ provenance: z.ZodEnum<{
1049
+ computed: "computed";
1050
+ estimated: "estimated";
1051
+ "provider-reported": "provider-reported";
1052
+ unavailable: "unavailable";
1053
+ }>;
1054
+ }, z.core.$strip>>;
1055
+ cacheReadTokens: z.ZodOptional<z.ZodObject<{
1056
+ value: z.ZodOptional<z.ZodInt>;
1057
+ provenance: z.ZodEnum<{
1058
+ computed: "computed";
1059
+ estimated: "estimated";
1060
+ "provider-reported": "provider-reported";
1061
+ unavailable: "unavailable";
1062
+ }>;
1063
+ }, z.core.$strip>>;
1064
+ cacheWriteTokens: z.ZodOptional<z.ZodObject<{
1065
+ value: z.ZodOptional<z.ZodInt>;
1066
+ provenance: z.ZodEnum<{
1067
+ computed: "computed";
1068
+ estimated: "estimated";
1069
+ "provider-reported": "provider-reported";
1070
+ unavailable: "unavailable";
1071
+ }>;
1072
+ }, z.core.$strip>>;
1073
+ cost: z.ZodOptional<z.ZodObject<{
1074
+ value: z.ZodOptional<z.ZodNumber>;
1075
+ currency: z.ZodOptional<z.ZodString>;
1076
+ provenance: z.ZodEnum<{
1077
+ computed: "computed";
1078
+ estimated: "estimated";
1079
+ "provider-reported": "provider-reported";
1080
+ unavailable: "unavailable";
1081
+ }>;
1082
+ }, z.core.$strip>>;
1083
+ }, z.core.$strip>>;
1084
+ lastOperation: z.ZodOptional<z.ZodObject<{
1085
+ operationId: z.ZodString;
1086
+ kind: z.ZodEnum<{
1087
+ compaction: "compaction";
1088
+ "model-request": "model-request";
1089
+ }>;
1090
+ phase: z.ZodEnum<{
1091
+ cancelled: "cancelled";
1092
+ completed: "completed";
1093
+ failed: "failed";
1094
+ "first-output": "first-output";
1095
+ started: "started";
1096
+ }>;
1097
+ step: z.ZodOptional<z.ZodInt>;
1098
+ startedAt: z.ZodISODateTime;
1099
+ firstOutputAt: z.ZodOptional<z.ZodISODateTime>;
1100
+ finishedAt: z.ZodOptional<z.ZodISODateTime>;
1101
+ }, z.core.$strip>>;
1102
+ createdAt: z.ZodISODateTime;
1103
+ updatedAt: z.ZodISODateTime;
1104
+ }, z.core.$strip>>;
1105
+ }, z.core.$strip>>;
1106
+ runId: z.ZodOptional<z.ZodString>;
1107
+ }, z.core.$strict>, z.ZodObject<{
1108
+ schemaVersion: z.ZodLiteral<1>;
1109
+ requestId: z.ZodString;
1110
+ outcome: z.ZodLiteral<"error">;
1111
+ error: z.ZodObject<{
1112
+ code: z.ZodString;
1113
+ message: z.ZodString;
1114
+ }, z.core.$strict>;
1115
+ }, z.core.$strict>], "outcome">;
1116
+ };
1117
+ }>;
1118
+ //# sourceMappingURL=browser-control-contract.d.ts.map