@brainpilot/protocol 0.1.3-beta.0 → 0.2.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.
- package/dist/domain.d.ts +5518 -176
- package/dist/domain.d.ts.map +1 -1
- package/dist/domain.js +357 -9
- package/dist/domain.js.map +1 -1
- package/dist/events.d.ts +799 -7
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +48 -1
- package/dist/events.js.map +1 -1
- package/dist/http.d.ts +481 -4
- package/dist/http.d.ts.map +1 -1
- package/dist/http.js +35 -1
- package/dist/http.js.map +1 -1
- package/package.json +1 -1
package/dist/events.d.ts
CHANGED
|
@@ -111,6 +111,8 @@ export declare const TextMessageStartEventSchema: z.ZodObject<{
|
|
|
111
111
|
run_id: z.ZodOptional<z.ZodString>;
|
|
112
112
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
113
113
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
114
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
115
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
114
116
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
115
117
|
_ts: z.ZodOptional<z.ZodString>;
|
|
116
118
|
type: z.ZodLiteral<"TEXT_MESSAGE_START">;
|
|
@@ -121,6 +123,8 @@ export declare const TextMessageStartEventSchema: z.ZodObject<{
|
|
|
121
123
|
run_id: z.ZodOptional<z.ZodString>;
|
|
122
124
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
123
125
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
126
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
127
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
124
128
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
125
129
|
_ts: z.ZodOptional<z.ZodString>;
|
|
126
130
|
type: z.ZodLiteral<"TEXT_MESSAGE_START">;
|
|
@@ -131,6 +135,8 @@ export declare const TextMessageStartEventSchema: z.ZodObject<{
|
|
|
131
135
|
run_id: z.ZodOptional<z.ZodString>;
|
|
132
136
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
133
137
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
138
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
139
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
134
140
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
135
141
|
_ts: z.ZodOptional<z.ZodString>;
|
|
136
142
|
type: z.ZodLiteral<"TEXT_MESSAGE_START">;
|
|
@@ -143,6 +149,8 @@ export declare const TextMessageContentEventSchema: z.ZodObject<{
|
|
|
143
149
|
run_id: z.ZodOptional<z.ZodString>;
|
|
144
150
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
145
151
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
152
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
153
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
146
154
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
147
155
|
_ts: z.ZodOptional<z.ZodString>;
|
|
148
156
|
type: z.ZodLiteral<"TEXT_MESSAGE_CONTENT">;
|
|
@@ -153,6 +161,8 @@ export declare const TextMessageContentEventSchema: z.ZodObject<{
|
|
|
153
161
|
run_id: z.ZodOptional<z.ZodString>;
|
|
154
162
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
155
163
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
164
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
165
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
156
166
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
157
167
|
_ts: z.ZodOptional<z.ZodString>;
|
|
158
168
|
type: z.ZodLiteral<"TEXT_MESSAGE_CONTENT">;
|
|
@@ -163,6 +173,8 @@ export declare const TextMessageContentEventSchema: z.ZodObject<{
|
|
|
163
173
|
run_id: z.ZodOptional<z.ZodString>;
|
|
164
174
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
165
175
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
176
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
177
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
166
178
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
167
179
|
_ts: z.ZodOptional<z.ZodString>;
|
|
168
180
|
type: z.ZodLiteral<"TEXT_MESSAGE_CONTENT">;
|
|
@@ -175,6 +187,8 @@ export declare const TextMessageEndEventSchema: z.ZodObject<{
|
|
|
175
187
|
run_id: z.ZodOptional<z.ZodString>;
|
|
176
188
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
177
189
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
190
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
191
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
178
192
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
179
193
|
_ts: z.ZodOptional<z.ZodString>;
|
|
180
194
|
type: z.ZodLiteral<"TEXT_MESSAGE_END">;
|
|
@@ -184,6 +198,8 @@ export declare const TextMessageEndEventSchema: z.ZodObject<{
|
|
|
184
198
|
run_id: z.ZodOptional<z.ZodString>;
|
|
185
199
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
186
200
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
201
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
202
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
187
203
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
188
204
|
_ts: z.ZodOptional<z.ZodString>;
|
|
189
205
|
type: z.ZodLiteral<"TEXT_MESSAGE_END">;
|
|
@@ -193,6 +209,8 @@ export declare const TextMessageEndEventSchema: z.ZodObject<{
|
|
|
193
209
|
run_id: z.ZodOptional<z.ZodString>;
|
|
194
210
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
195
211
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
212
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
213
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
196
214
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
197
215
|
_ts: z.ZodOptional<z.ZodString>;
|
|
198
216
|
type: z.ZodLiteral<"TEXT_MESSAGE_END">;
|
|
@@ -204,6 +222,8 @@ export declare const TextMessageChunkEventSchema: z.ZodObject<{
|
|
|
204
222
|
run_id: z.ZodOptional<z.ZodString>;
|
|
205
223
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
206
224
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
225
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
226
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
207
227
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
208
228
|
_ts: z.ZodOptional<z.ZodString>;
|
|
209
229
|
type: z.ZodLiteral<"TEXT_MESSAGE_CHUNK">;
|
|
@@ -215,6 +235,8 @@ export declare const TextMessageChunkEventSchema: z.ZodObject<{
|
|
|
215
235
|
run_id: z.ZodOptional<z.ZodString>;
|
|
216
236
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
217
237
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
238
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
239
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
218
240
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
219
241
|
_ts: z.ZodOptional<z.ZodString>;
|
|
220
242
|
type: z.ZodLiteral<"TEXT_MESSAGE_CHUNK">;
|
|
@@ -226,6 +248,8 @@ export declare const TextMessageChunkEventSchema: z.ZodObject<{
|
|
|
226
248
|
run_id: z.ZodOptional<z.ZodString>;
|
|
227
249
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
228
250
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
251
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
252
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
229
253
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
230
254
|
_ts: z.ZodOptional<z.ZodString>;
|
|
231
255
|
type: z.ZodLiteral<"TEXT_MESSAGE_CHUNK">;
|
|
@@ -239,6 +263,8 @@ export declare const ToolCallStartEventSchema: z.ZodObject<{
|
|
|
239
263
|
run_id: z.ZodOptional<z.ZodString>;
|
|
240
264
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
241
265
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
266
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
267
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
242
268
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
243
269
|
_ts: z.ZodOptional<z.ZodString>;
|
|
244
270
|
type: z.ZodLiteral<"TOOL_CALL_START">;
|
|
@@ -250,6 +276,8 @@ export declare const ToolCallStartEventSchema: z.ZodObject<{
|
|
|
250
276
|
run_id: z.ZodOptional<z.ZodString>;
|
|
251
277
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
252
278
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
279
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
280
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
253
281
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
254
282
|
_ts: z.ZodOptional<z.ZodString>;
|
|
255
283
|
type: z.ZodLiteral<"TOOL_CALL_START">;
|
|
@@ -261,6 +289,8 @@ export declare const ToolCallStartEventSchema: z.ZodObject<{
|
|
|
261
289
|
run_id: z.ZodOptional<z.ZodString>;
|
|
262
290
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
263
291
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
292
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
293
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
264
294
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
265
295
|
_ts: z.ZodOptional<z.ZodString>;
|
|
266
296
|
type: z.ZodLiteral<"TOOL_CALL_START">;
|
|
@@ -274,6 +304,8 @@ export declare const ToolCallArgsEventSchema: z.ZodObject<{
|
|
|
274
304
|
run_id: z.ZodOptional<z.ZodString>;
|
|
275
305
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
276
306
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
307
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
308
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
277
309
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
278
310
|
_ts: z.ZodOptional<z.ZodString>;
|
|
279
311
|
type: z.ZodLiteral<"TOOL_CALL_ARGS">;
|
|
@@ -284,6 +316,8 @@ export declare const ToolCallArgsEventSchema: z.ZodObject<{
|
|
|
284
316
|
run_id: z.ZodOptional<z.ZodString>;
|
|
285
317
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
286
318
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
319
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
320
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
287
321
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
288
322
|
_ts: z.ZodOptional<z.ZodString>;
|
|
289
323
|
type: z.ZodLiteral<"TOOL_CALL_ARGS">;
|
|
@@ -294,6 +328,8 @@ export declare const ToolCallArgsEventSchema: z.ZodObject<{
|
|
|
294
328
|
run_id: z.ZodOptional<z.ZodString>;
|
|
295
329
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
296
330
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
331
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
332
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
297
333
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
298
334
|
_ts: z.ZodOptional<z.ZodString>;
|
|
299
335
|
type: z.ZodLiteral<"TOOL_CALL_ARGS">;
|
|
@@ -306,6 +342,8 @@ export declare const ToolCallEndEventSchema: z.ZodObject<{
|
|
|
306
342
|
run_id: z.ZodOptional<z.ZodString>;
|
|
307
343
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
308
344
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
345
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
346
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
309
347
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
310
348
|
_ts: z.ZodOptional<z.ZodString>;
|
|
311
349
|
type: z.ZodLiteral<"TOOL_CALL_END">;
|
|
@@ -318,6 +356,8 @@ export declare const ToolCallEndEventSchema: z.ZodObject<{
|
|
|
318
356
|
run_id: z.ZodOptional<z.ZodString>;
|
|
319
357
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
320
358
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
359
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
360
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
321
361
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
322
362
|
_ts: z.ZodOptional<z.ZodString>;
|
|
323
363
|
type: z.ZodLiteral<"TOOL_CALL_END">;
|
|
@@ -330,6 +370,8 @@ export declare const ToolCallEndEventSchema: z.ZodObject<{
|
|
|
330
370
|
run_id: z.ZodOptional<z.ZodString>;
|
|
331
371
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
332
372
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
373
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
374
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
333
375
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
334
376
|
_ts: z.ZodOptional<z.ZodString>;
|
|
335
377
|
type: z.ZodLiteral<"TOOL_CALL_END">;
|
|
@@ -344,6 +386,8 @@ export declare const ToolCallResultEventSchema: z.ZodObject<{
|
|
|
344
386
|
run_id: z.ZodOptional<z.ZodString>;
|
|
345
387
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
346
388
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
389
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
390
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
347
391
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
348
392
|
_ts: z.ZodOptional<z.ZodString>;
|
|
349
393
|
type: z.ZodLiteral<"TOOL_CALL_RESULT">;
|
|
@@ -356,6 +400,8 @@ export declare const ToolCallResultEventSchema: z.ZodObject<{
|
|
|
356
400
|
run_id: z.ZodOptional<z.ZodString>;
|
|
357
401
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
358
402
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
403
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
404
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
359
405
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
360
406
|
_ts: z.ZodOptional<z.ZodString>;
|
|
361
407
|
type: z.ZodLiteral<"TOOL_CALL_RESULT">;
|
|
@@ -368,6 +414,8 @@ export declare const ToolCallResultEventSchema: z.ZodObject<{
|
|
|
368
414
|
run_id: z.ZodOptional<z.ZodString>;
|
|
369
415
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
370
416
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
417
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
418
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
371
419
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
372
420
|
_ts: z.ZodOptional<z.ZodString>;
|
|
373
421
|
type: z.ZodLiteral<"TOOL_CALL_RESULT">;
|
|
@@ -382,6 +430,8 @@ export declare const ReasoningStartEventSchema: z.ZodObject<{
|
|
|
382
430
|
run_id: z.ZodOptional<z.ZodString>;
|
|
383
431
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
384
432
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
433
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
434
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
385
435
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
386
436
|
_ts: z.ZodOptional<z.ZodString>;
|
|
387
437
|
type: z.ZodLiteral<"REASONING_START">;
|
|
@@ -390,6 +440,8 @@ export declare const ReasoningStartEventSchema: z.ZodObject<{
|
|
|
390
440
|
run_id: z.ZodOptional<z.ZodString>;
|
|
391
441
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
392
442
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
443
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
444
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
393
445
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
394
446
|
_ts: z.ZodOptional<z.ZodString>;
|
|
395
447
|
type: z.ZodLiteral<"REASONING_START">;
|
|
@@ -398,6 +450,8 @@ export declare const ReasoningStartEventSchema: z.ZodObject<{
|
|
|
398
450
|
run_id: z.ZodOptional<z.ZodString>;
|
|
399
451
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
400
452
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
453
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
454
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
401
455
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
402
456
|
_ts: z.ZodOptional<z.ZodString>;
|
|
403
457
|
type: z.ZodLiteral<"REASONING_START">;
|
|
@@ -408,6 +462,8 @@ export declare const ReasoningEndEventSchema: z.ZodObject<{
|
|
|
408
462
|
run_id: z.ZodOptional<z.ZodString>;
|
|
409
463
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
410
464
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
465
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
466
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
411
467
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
412
468
|
_ts: z.ZodOptional<z.ZodString>;
|
|
413
469
|
type: z.ZodLiteral<"REASONING_END">;
|
|
@@ -416,6 +472,8 @@ export declare const ReasoningEndEventSchema: z.ZodObject<{
|
|
|
416
472
|
run_id: z.ZodOptional<z.ZodString>;
|
|
417
473
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
418
474
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
475
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
476
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
419
477
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
420
478
|
_ts: z.ZodOptional<z.ZodString>;
|
|
421
479
|
type: z.ZodLiteral<"REASONING_END">;
|
|
@@ -424,6 +482,8 @@ export declare const ReasoningEndEventSchema: z.ZodObject<{
|
|
|
424
482
|
run_id: z.ZodOptional<z.ZodString>;
|
|
425
483
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
426
484
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
485
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
486
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
427
487
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
428
488
|
_ts: z.ZodOptional<z.ZodString>;
|
|
429
489
|
type: z.ZodLiteral<"REASONING_END">;
|
|
@@ -434,6 +494,8 @@ export declare const ReasoningMessageStartEventSchema: z.ZodObject<{
|
|
|
434
494
|
run_id: z.ZodOptional<z.ZodString>;
|
|
435
495
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
436
496
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
497
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
498
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
437
499
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
438
500
|
_ts: z.ZodOptional<z.ZodString>;
|
|
439
501
|
type: z.ZodLiteral<"REASONING_MESSAGE_START">;
|
|
@@ -443,6 +505,8 @@ export declare const ReasoningMessageStartEventSchema: z.ZodObject<{
|
|
|
443
505
|
run_id: z.ZodOptional<z.ZodString>;
|
|
444
506
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
445
507
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
508
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
509
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
446
510
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
447
511
|
_ts: z.ZodOptional<z.ZodString>;
|
|
448
512
|
type: z.ZodLiteral<"REASONING_MESSAGE_START">;
|
|
@@ -452,6 +516,8 @@ export declare const ReasoningMessageStartEventSchema: z.ZodObject<{
|
|
|
452
516
|
run_id: z.ZodOptional<z.ZodString>;
|
|
453
517
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
454
518
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
519
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
520
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
455
521
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
456
522
|
_ts: z.ZodOptional<z.ZodString>;
|
|
457
523
|
type: z.ZodLiteral<"REASONING_MESSAGE_START">;
|
|
@@ -463,6 +529,8 @@ export declare const ReasoningMessageContentEventSchema: z.ZodObject<{
|
|
|
463
529
|
run_id: z.ZodOptional<z.ZodString>;
|
|
464
530
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
465
531
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
532
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
533
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
466
534
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
467
535
|
_ts: z.ZodOptional<z.ZodString>;
|
|
468
536
|
type: z.ZodLiteral<"REASONING_MESSAGE_CONTENT">;
|
|
@@ -473,6 +541,8 @@ export declare const ReasoningMessageContentEventSchema: z.ZodObject<{
|
|
|
473
541
|
run_id: z.ZodOptional<z.ZodString>;
|
|
474
542
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
475
543
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
544
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
545
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
476
546
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
477
547
|
_ts: z.ZodOptional<z.ZodString>;
|
|
478
548
|
type: z.ZodLiteral<"REASONING_MESSAGE_CONTENT">;
|
|
@@ -483,6 +553,8 @@ export declare const ReasoningMessageContentEventSchema: z.ZodObject<{
|
|
|
483
553
|
run_id: z.ZodOptional<z.ZodString>;
|
|
484
554
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
485
555
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
556
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
557
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
486
558
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
487
559
|
_ts: z.ZodOptional<z.ZodString>;
|
|
488
560
|
type: z.ZodLiteral<"REASONING_MESSAGE_CONTENT">;
|
|
@@ -495,6 +567,8 @@ export declare const ReasoningMessageEndEventSchema: z.ZodObject<{
|
|
|
495
567
|
run_id: z.ZodOptional<z.ZodString>;
|
|
496
568
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
497
569
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
570
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
571
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
498
572
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
499
573
|
_ts: z.ZodOptional<z.ZodString>;
|
|
500
574
|
type: z.ZodLiteral<"REASONING_MESSAGE_END">;
|
|
@@ -504,6 +578,8 @@ export declare const ReasoningMessageEndEventSchema: z.ZodObject<{
|
|
|
504
578
|
run_id: z.ZodOptional<z.ZodString>;
|
|
505
579
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
506
580
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
581
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
582
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
507
583
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
508
584
|
_ts: z.ZodOptional<z.ZodString>;
|
|
509
585
|
type: z.ZodLiteral<"REASONING_MESSAGE_END">;
|
|
@@ -513,6 +589,8 @@ export declare const ReasoningMessageEndEventSchema: z.ZodObject<{
|
|
|
513
589
|
run_id: z.ZodOptional<z.ZodString>;
|
|
514
590
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
515
591
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
592
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
593
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
516
594
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
517
595
|
_ts: z.ZodOptional<z.ZodString>;
|
|
518
596
|
type: z.ZodLiteral<"REASONING_MESSAGE_END">;
|
|
@@ -526,6 +604,8 @@ export declare const RunStartedEventSchema: z.ZodObject<{
|
|
|
526
604
|
session_id: z.ZodOptional<z.ZodString>;
|
|
527
605
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
528
606
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
607
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
608
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
529
609
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
530
610
|
_ts: z.ZodOptional<z.ZodString>;
|
|
531
611
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
@@ -535,6 +615,8 @@ export declare const RunStartedEventSchema: z.ZodObject<{
|
|
|
535
615
|
session_id: z.ZodOptional<z.ZodString>;
|
|
536
616
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
537
617
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
618
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
619
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
538
620
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
539
621
|
_ts: z.ZodOptional<z.ZodString>;
|
|
540
622
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
@@ -544,6 +626,8 @@ export declare const RunStartedEventSchema: z.ZodObject<{
|
|
|
544
626
|
session_id: z.ZodOptional<z.ZodString>;
|
|
545
627
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
546
628
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
629
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
630
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
547
631
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
548
632
|
_ts: z.ZodOptional<z.ZodString>;
|
|
549
633
|
}, z.ZodTypeAny, "passthrough">>;
|
|
@@ -555,6 +639,8 @@ export declare const RunFinishedEventSchema: z.ZodObject<{
|
|
|
555
639
|
session_id: z.ZodOptional<z.ZodString>;
|
|
556
640
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
557
641
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
642
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
643
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
558
644
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
559
645
|
_ts: z.ZodOptional<z.ZodString>;
|
|
560
646
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
@@ -564,6 +650,8 @@ export declare const RunFinishedEventSchema: z.ZodObject<{
|
|
|
564
650
|
session_id: z.ZodOptional<z.ZodString>;
|
|
565
651
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
566
652
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
653
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
654
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
567
655
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
568
656
|
_ts: z.ZodOptional<z.ZodString>;
|
|
569
657
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
@@ -573,6 +661,8 @@ export declare const RunFinishedEventSchema: z.ZodObject<{
|
|
|
573
661
|
session_id: z.ZodOptional<z.ZodString>;
|
|
574
662
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
575
663
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
664
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
665
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
576
666
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
577
667
|
_ts: z.ZodOptional<z.ZodString>;
|
|
578
668
|
}, z.ZodTypeAny, "passthrough">>;
|
|
@@ -581,30 +671,42 @@ export declare const RunErrorEventSchema: z.ZodObject<{
|
|
|
581
671
|
type: z.ZodLiteral<"RUN_ERROR">;
|
|
582
672
|
message: z.ZodString;
|
|
583
673
|
code: z.ZodDefault<z.ZodString>;
|
|
674
|
+
/** False when an outer delivery loop still owns retry/escalation. */
|
|
675
|
+
terminal: z.ZodOptional<z.ZodBoolean>;
|
|
584
676
|
run_id: z.ZodOptional<z.ZodString>;
|
|
585
677
|
session_id: z.ZodOptional<z.ZodString>;
|
|
586
678
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
587
679
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
680
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
681
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
588
682
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
589
683
|
_ts: z.ZodOptional<z.ZodString>;
|
|
590
684
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
591
685
|
type: z.ZodLiteral<"RUN_ERROR">;
|
|
592
686
|
message: z.ZodString;
|
|
593
687
|
code: z.ZodDefault<z.ZodString>;
|
|
688
|
+
/** False when an outer delivery loop still owns retry/escalation. */
|
|
689
|
+
terminal: z.ZodOptional<z.ZodBoolean>;
|
|
594
690
|
run_id: z.ZodOptional<z.ZodString>;
|
|
595
691
|
session_id: z.ZodOptional<z.ZodString>;
|
|
596
692
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
597
693
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
694
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
695
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
598
696
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
599
697
|
_ts: z.ZodOptional<z.ZodString>;
|
|
600
698
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
601
699
|
type: z.ZodLiteral<"RUN_ERROR">;
|
|
602
700
|
message: z.ZodString;
|
|
603
701
|
code: z.ZodDefault<z.ZodString>;
|
|
702
|
+
/** False when an outer delivery loop still owns retry/escalation. */
|
|
703
|
+
terminal: z.ZodOptional<z.ZodBoolean>;
|
|
604
704
|
run_id: z.ZodOptional<z.ZodString>;
|
|
605
705
|
session_id: z.ZodOptional<z.ZodString>;
|
|
606
706
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
607
707
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
708
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
709
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
608
710
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
609
711
|
_ts: z.ZodOptional<z.ZodString>;
|
|
610
712
|
}, z.ZodTypeAny, "passthrough">>;
|
|
@@ -614,6 +716,8 @@ export declare const MessagesSnapshotEventSchema: z.ZodObject<{
|
|
|
614
716
|
run_id: z.ZodOptional<z.ZodString>;
|
|
615
717
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
616
718
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
719
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
720
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
617
721
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
618
722
|
_ts: z.ZodOptional<z.ZodString>;
|
|
619
723
|
type: z.ZodLiteral<"MESSAGES_SNAPSHOT">;
|
|
@@ -701,6 +805,8 @@ export declare const MessagesSnapshotEventSchema: z.ZodObject<{
|
|
|
701
805
|
run_id: z.ZodOptional<z.ZodString>;
|
|
702
806
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
703
807
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
808
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
809
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
704
810
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
705
811
|
_ts: z.ZodOptional<z.ZodString>;
|
|
706
812
|
type: z.ZodLiteral<"MESSAGES_SNAPSHOT">;
|
|
@@ -788,6 +894,8 @@ export declare const MessagesSnapshotEventSchema: z.ZodObject<{
|
|
|
788
894
|
run_id: z.ZodOptional<z.ZodString>;
|
|
789
895
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
790
896
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
897
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
898
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
791
899
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
792
900
|
_ts: z.ZodOptional<z.ZodString>;
|
|
793
901
|
type: z.ZodLiteral<"MESSAGES_SNAPSHOT">;
|
|
@@ -887,6 +995,8 @@ export declare const CustomEventSchema: z.ZodObject<{
|
|
|
887
995
|
run_id: z.ZodOptional<z.ZodString>;
|
|
888
996
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
889
997
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
998
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
999
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
890
1000
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
891
1001
|
_ts: z.ZodOptional<z.ZodString>;
|
|
892
1002
|
type: z.ZodLiteral<"CUSTOM">;
|
|
@@ -897,6 +1007,8 @@ export declare const CustomEventSchema: z.ZodObject<{
|
|
|
897
1007
|
run_id: z.ZodOptional<z.ZodString>;
|
|
898
1008
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
899
1009
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
1010
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
1011
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
900
1012
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
901
1013
|
_ts: z.ZodOptional<z.ZodString>;
|
|
902
1014
|
type: z.ZodLiteral<"CUSTOM">;
|
|
@@ -907,6 +1019,8 @@ export declare const CustomEventSchema: z.ZodObject<{
|
|
|
907
1019
|
run_id: z.ZodOptional<z.ZodString>;
|
|
908
1020
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
909
1021
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
1022
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
1023
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
910
1024
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
911
1025
|
_ts: z.ZodOptional<z.ZodString>;
|
|
912
1026
|
type: z.ZodLiteral<"CUSTOM">;
|
|
@@ -920,8 +1034,10 @@ export type CustomEvent = z.infer<typeof CustomEventSchema>;
|
|
|
920
1034
|
* - `session_state` — authoritative live agent/run snapshot (#70).
|
|
921
1035
|
* - `session_title` — title update.
|
|
922
1036
|
* - `session_heartbeat` — liveness timestamp.
|
|
923
|
-
* - `trace_node` —
|
|
1037
|
+
* - `trace_node` — transitional V1 Graph-of-Trace node projection; `value` is
|
|
924
1038
|
* `{ op: "created" | "updated", node: TraceNode }`.
|
|
1039
|
+
* - `trace_delta` — derived TraceGraphV2 API-view revision update.
|
|
1040
|
+
* - `task_state` — flat task-ledger snapshot or one created/replied/cancelled edge.
|
|
925
1041
|
* - `compaction` — Pi SDK auto/manual context compaction lifecycle. `value` is
|
|
926
1042
|
* `CompactionStartValue | CompactionEndValue`. Emitted verbatim from the
|
|
927
1043
|
* Pi `compaction_start` / `compaction_end` events (mas-agent.ts) so clients
|
|
@@ -933,10 +1049,170 @@ export declare const CUSTOM_EVENT: {
|
|
|
933
1049
|
readonly SESSION_TITLE: "session_title";
|
|
934
1050
|
readonly SESSION_HEARTBEAT: "session_heartbeat";
|
|
935
1051
|
readonly TRACE_NODE: "trace_node";
|
|
1052
|
+
readonly TRACE_DELTA: "trace_delta";
|
|
1053
|
+
readonly TASK_STATE: "task_state";
|
|
936
1054
|
readonly COMPACTION: "compaction";
|
|
937
1055
|
/** Auditable, content-free domain tool / skill usage edge. */
|
|
938
1056
|
readonly DOMAIN_RESOURCE_USAGE: "domain_resource_usage";
|
|
1057
|
+
/** Lifecycle snapshot for one context-isolated child session. */
|
|
1058
|
+
readonly SUBAGENT_STATE: "subagent_state";
|
|
1059
|
+
/** Lifecycle update for one session-scoped background monitor. */
|
|
1060
|
+
readonly MONITOR_STATE: "monitor_state";
|
|
939
1061
|
};
|
|
1062
|
+
export declare const TaskStatusSchema: z.ZodEnum<["pending", "replied", "cancelled"]>;
|
|
1063
|
+
export type TaskStatus = z.infer<typeof TaskStatusSchema>;
|
|
1064
|
+
export declare const TaskRecordSchema: z.ZodObject<{
|
|
1065
|
+
id: z.ZodString;
|
|
1066
|
+
seq: z.ZodNumber;
|
|
1067
|
+
created_by: z.ZodString;
|
|
1068
|
+
assigned_to: z.ZodString;
|
|
1069
|
+
content: z.ZodString;
|
|
1070
|
+
status: z.ZodEnum<["pending", "replied", "cancelled"]>;
|
|
1071
|
+
reply: z.ZodOptional<z.ZodString>;
|
|
1072
|
+
created_at: z.ZodNumber;
|
|
1073
|
+
completed_at: z.ZodOptional<z.ZodNumber>;
|
|
1074
|
+
}, "strict", z.ZodTypeAny, {
|
|
1075
|
+
status: "cancelled" | "pending" | "replied";
|
|
1076
|
+
id: string;
|
|
1077
|
+
content: string;
|
|
1078
|
+
seq: number;
|
|
1079
|
+
created_by: string;
|
|
1080
|
+
assigned_to: string;
|
|
1081
|
+
created_at: number;
|
|
1082
|
+
reply?: string | undefined;
|
|
1083
|
+
completed_at?: number | undefined;
|
|
1084
|
+
}, {
|
|
1085
|
+
status: "cancelled" | "pending" | "replied";
|
|
1086
|
+
id: string;
|
|
1087
|
+
content: string;
|
|
1088
|
+
seq: number;
|
|
1089
|
+
created_by: string;
|
|
1090
|
+
assigned_to: string;
|
|
1091
|
+
created_at: number;
|
|
1092
|
+
reply?: string | undefined;
|
|
1093
|
+
completed_at?: number | undefined;
|
|
1094
|
+
}>;
|
|
1095
|
+
export type TaskRecord = z.infer<typeof TaskRecordSchema>;
|
|
1096
|
+
export declare const TaskStateValueSchema: z.ZodDiscriminatedUnion<"op", [z.ZodObject<{
|
|
1097
|
+
op: z.ZodLiteral<"snapshot">;
|
|
1098
|
+
tasks: z.ZodArray<z.ZodObject<{
|
|
1099
|
+
id: z.ZodString;
|
|
1100
|
+
seq: z.ZodNumber;
|
|
1101
|
+
created_by: z.ZodString;
|
|
1102
|
+
assigned_to: z.ZodString;
|
|
1103
|
+
content: z.ZodString;
|
|
1104
|
+
status: z.ZodEnum<["pending", "replied", "cancelled"]>;
|
|
1105
|
+
reply: z.ZodOptional<z.ZodString>;
|
|
1106
|
+
created_at: z.ZodNumber;
|
|
1107
|
+
completed_at: z.ZodOptional<z.ZodNumber>;
|
|
1108
|
+
}, "strict", z.ZodTypeAny, {
|
|
1109
|
+
status: "cancelled" | "pending" | "replied";
|
|
1110
|
+
id: string;
|
|
1111
|
+
content: string;
|
|
1112
|
+
seq: number;
|
|
1113
|
+
created_by: string;
|
|
1114
|
+
assigned_to: string;
|
|
1115
|
+
created_at: number;
|
|
1116
|
+
reply?: string | undefined;
|
|
1117
|
+
completed_at?: number | undefined;
|
|
1118
|
+
}, {
|
|
1119
|
+
status: "cancelled" | "pending" | "replied";
|
|
1120
|
+
id: string;
|
|
1121
|
+
content: string;
|
|
1122
|
+
seq: number;
|
|
1123
|
+
created_by: string;
|
|
1124
|
+
assigned_to: string;
|
|
1125
|
+
created_at: number;
|
|
1126
|
+
reply?: string | undefined;
|
|
1127
|
+
completed_at?: number | undefined;
|
|
1128
|
+
}>, "many">;
|
|
1129
|
+
}, "strict", z.ZodTypeAny, {
|
|
1130
|
+
op: "snapshot";
|
|
1131
|
+
tasks: {
|
|
1132
|
+
status: "cancelled" | "pending" | "replied";
|
|
1133
|
+
id: string;
|
|
1134
|
+
content: string;
|
|
1135
|
+
seq: number;
|
|
1136
|
+
created_by: string;
|
|
1137
|
+
assigned_to: string;
|
|
1138
|
+
created_at: number;
|
|
1139
|
+
reply?: string | undefined;
|
|
1140
|
+
completed_at?: number | undefined;
|
|
1141
|
+
}[];
|
|
1142
|
+
}, {
|
|
1143
|
+
op: "snapshot";
|
|
1144
|
+
tasks: {
|
|
1145
|
+
status: "cancelled" | "pending" | "replied";
|
|
1146
|
+
id: string;
|
|
1147
|
+
content: string;
|
|
1148
|
+
seq: number;
|
|
1149
|
+
created_by: string;
|
|
1150
|
+
assigned_to: string;
|
|
1151
|
+
created_at: number;
|
|
1152
|
+
reply?: string | undefined;
|
|
1153
|
+
completed_at?: number | undefined;
|
|
1154
|
+
}[];
|
|
1155
|
+
}>, z.ZodObject<{
|
|
1156
|
+
op: z.ZodEnum<["created", "replied", "cancelled"]>;
|
|
1157
|
+
task: z.ZodObject<{
|
|
1158
|
+
id: z.ZodString;
|
|
1159
|
+
seq: z.ZodNumber;
|
|
1160
|
+
created_by: z.ZodString;
|
|
1161
|
+
assigned_to: z.ZodString;
|
|
1162
|
+
content: z.ZodString;
|
|
1163
|
+
status: z.ZodEnum<["pending", "replied", "cancelled"]>;
|
|
1164
|
+
reply: z.ZodOptional<z.ZodString>;
|
|
1165
|
+
created_at: z.ZodNumber;
|
|
1166
|
+
completed_at: z.ZodOptional<z.ZodNumber>;
|
|
1167
|
+
}, "strict", z.ZodTypeAny, {
|
|
1168
|
+
status: "cancelled" | "pending" | "replied";
|
|
1169
|
+
id: string;
|
|
1170
|
+
content: string;
|
|
1171
|
+
seq: number;
|
|
1172
|
+
created_by: string;
|
|
1173
|
+
assigned_to: string;
|
|
1174
|
+
created_at: number;
|
|
1175
|
+
reply?: string | undefined;
|
|
1176
|
+
completed_at?: number | undefined;
|
|
1177
|
+
}, {
|
|
1178
|
+
status: "cancelled" | "pending" | "replied";
|
|
1179
|
+
id: string;
|
|
1180
|
+
content: string;
|
|
1181
|
+
seq: number;
|
|
1182
|
+
created_by: string;
|
|
1183
|
+
assigned_to: string;
|
|
1184
|
+
created_at: number;
|
|
1185
|
+
reply?: string | undefined;
|
|
1186
|
+
completed_at?: number | undefined;
|
|
1187
|
+
}>;
|
|
1188
|
+
}, "strict", z.ZodTypeAny, {
|
|
1189
|
+
task: {
|
|
1190
|
+
status: "cancelled" | "pending" | "replied";
|
|
1191
|
+
id: string;
|
|
1192
|
+
content: string;
|
|
1193
|
+
seq: number;
|
|
1194
|
+
created_by: string;
|
|
1195
|
+
assigned_to: string;
|
|
1196
|
+
created_at: number;
|
|
1197
|
+
reply?: string | undefined;
|
|
1198
|
+
completed_at?: number | undefined;
|
|
1199
|
+
};
|
|
1200
|
+
op: "cancelled" | "replied" | "created";
|
|
1201
|
+
}, {
|
|
1202
|
+
task: {
|
|
1203
|
+
status: "cancelled" | "pending" | "replied";
|
|
1204
|
+
id: string;
|
|
1205
|
+
content: string;
|
|
1206
|
+
seq: number;
|
|
1207
|
+
created_by: string;
|
|
1208
|
+
assigned_to: string;
|
|
1209
|
+
created_at: number;
|
|
1210
|
+
reply?: string | undefined;
|
|
1211
|
+
completed_at?: number | undefined;
|
|
1212
|
+
};
|
|
1213
|
+
op: "cancelled" | "replied" | "created";
|
|
1214
|
+
}>]>;
|
|
1215
|
+
export type TaskStateValue = z.infer<typeof TaskStateValueSchema>;
|
|
940
1216
|
/**
|
|
941
1217
|
* Normalized resource-use event. Queries, skill bodies, tool results, and
|
|
942
1218
|
* credentials are deliberately absent; the AG-UI envelope carries session,
|
|
@@ -950,13 +1226,13 @@ export declare const DomainResourceUsageValueSchema: z.ZodDiscriminatedUnion<"ki
|
|
|
950
1226
|
}, "strict", z.ZodTypeAny, {
|
|
951
1227
|
toolName: "get_domain_knowledge_local" | "search_papers_local";
|
|
952
1228
|
kind: "domain_tool_call";
|
|
953
|
-
schemaVersion: "1.0";
|
|
954
1229
|
source: "system_tool";
|
|
1230
|
+
schemaVersion: "1.0";
|
|
955
1231
|
}, {
|
|
956
1232
|
toolName: "get_domain_knowledge_local" | "search_papers_local";
|
|
957
1233
|
kind: "domain_tool_call";
|
|
958
|
-
schemaVersion: "1.0";
|
|
959
1234
|
source: "system_tool";
|
|
1235
|
+
schemaVersion: "1.0";
|
|
960
1236
|
}>, z.ZodObject<{
|
|
961
1237
|
schemaVersion: z.ZodLiteral<"1.0">;
|
|
962
1238
|
kind: z.ZodLiteral<"skill_search">;
|
|
@@ -965,13 +1241,13 @@ export declare const DomainResourceUsageValueSchema: z.ZodDiscriminatedUnion<"ki
|
|
|
965
1241
|
}, "strict", z.ZodTypeAny, {
|
|
966
1242
|
toolName: "skill_search";
|
|
967
1243
|
kind: "skill_search";
|
|
968
|
-
schemaVersion: "1.0";
|
|
969
1244
|
source: "router";
|
|
1245
|
+
schemaVersion: "1.0";
|
|
970
1246
|
}, {
|
|
971
1247
|
toolName: "skill_search";
|
|
972
1248
|
kind: "skill_search";
|
|
973
|
-
schemaVersion: "1.0";
|
|
974
1249
|
source: "router";
|
|
1250
|
+
schemaVersion: "1.0";
|
|
975
1251
|
}>, z.ZodObject<{
|
|
976
1252
|
schemaVersion: z.ZodLiteral<"1.0">;
|
|
977
1253
|
kind: z.ZodLiteral<"skill_load">;
|
|
@@ -979,13 +1255,13 @@ export declare const DomainResourceUsageValueSchema: z.ZodDiscriminatedUnion<"ki
|
|
|
979
1255
|
source: z.ZodEnum<["router", "builtin_read"]>;
|
|
980
1256
|
}, "strict", z.ZodTypeAny, {
|
|
981
1257
|
kind: "skill_load";
|
|
982
|
-
schemaVersion: "1.0";
|
|
983
1258
|
source: "router" | "builtin_read";
|
|
1259
|
+
schemaVersion: "1.0";
|
|
984
1260
|
skillName: string;
|
|
985
1261
|
}, {
|
|
986
1262
|
kind: "skill_load";
|
|
987
|
-
schemaVersion: "1.0";
|
|
988
1263
|
source: "router" | "builtin_read";
|
|
1264
|
+
schemaVersion: "1.0";
|
|
989
1265
|
skillName: string;
|
|
990
1266
|
}>]>;
|
|
991
1267
|
export type DomainResourceUsageValue = z.infer<typeof DomainResourceUsageValueSchema>;
|
|
@@ -1104,6 +1380,8 @@ export declare const AgentStatusUpdateEventSchema: z.ZodObject<{
|
|
|
1104
1380
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1105
1381
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1106
1382
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
1383
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
1384
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1107
1385
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1108
1386
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1109
1387
|
type: z.ZodLiteral<"agent_status_update">;
|
|
@@ -1142,6 +1420,8 @@ export declare const AgentStatusUpdateEventSchema: z.ZodObject<{
|
|
|
1142
1420
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1143
1421
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1144
1422
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
1423
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
1424
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1145
1425
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1146
1426
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1147
1427
|
type: z.ZodLiteral<"agent_status_update">;
|
|
@@ -1180,6 +1460,8 @@ export declare const AgentStatusUpdateEventSchema: z.ZodObject<{
|
|
|
1180
1460
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1181
1461
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1182
1462
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
1463
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
1464
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1183
1465
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1184
1466
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1185
1467
|
type: z.ZodLiteral<"agent_status_update">;
|
|
@@ -1217,6 +1499,36 @@ export declare const AgentStatusUpdateEventSchema: z.ZodObject<{
|
|
|
1217
1499
|
export type AgentStatusUpdateEvent = z.infer<typeof AgentStatusUpdateEventSchema>;
|
|
1218
1500
|
export declare const SystemMessageLevelSchema: z.ZodEnum<["info", "warning", "error", "fatal"]>;
|
|
1219
1501
|
export type SystemMessageLevel = z.infer<typeof SystemMessageLevelSchema>;
|
|
1502
|
+
/** Typed payload for a durable workspace restore history event (#492). */
|
|
1503
|
+
export declare const WorkspaceRestoreEventMetadataSchema: z.ZodObject<{
|
|
1504
|
+
mode: z.ZodEnum<["checkpoint", "causal"]>;
|
|
1505
|
+
checkpointId: z.ZodOptional<z.ZodString>;
|
|
1506
|
+
nodeId: z.ZodOptional<z.ZodString>;
|
|
1507
|
+
changeId: z.ZodOptional<z.ZodString>;
|
|
1508
|
+
restoredAt: z.ZodOptional<z.ZodString>;
|
|
1509
|
+
files: z.ZodArray<z.ZodString, "many">;
|
|
1510
|
+
fileCount: z.ZodNumber;
|
|
1511
|
+
affectedNodeCount: z.ZodOptional<z.ZodNumber>;
|
|
1512
|
+
}, "strip", z.ZodTypeAny, {
|
|
1513
|
+
files: string[];
|
|
1514
|
+
mode: "checkpoint" | "causal";
|
|
1515
|
+
fileCount: number;
|
|
1516
|
+
checkpointId?: string | undefined;
|
|
1517
|
+
changeId?: string | undefined;
|
|
1518
|
+
nodeId?: string | undefined;
|
|
1519
|
+
restoredAt?: string | undefined;
|
|
1520
|
+
affectedNodeCount?: number | undefined;
|
|
1521
|
+
}, {
|
|
1522
|
+
files: string[];
|
|
1523
|
+
mode: "checkpoint" | "causal";
|
|
1524
|
+
fileCount: number;
|
|
1525
|
+
checkpointId?: string | undefined;
|
|
1526
|
+
changeId?: string | undefined;
|
|
1527
|
+
nodeId?: string | undefined;
|
|
1528
|
+
restoredAt?: string | undefined;
|
|
1529
|
+
affectedNodeCount?: number | undefined;
|
|
1530
|
+
}>;
|
|
1531
|
+
export type WorkspaceRestoreEventMetadata = z.infer<typeof WorkspaceRestoreEventMetadataSchema>;
|
|
1220
1532
|
export declare const SystemMessageEventSchema: z.ZodObject<{
|
|
1221
1533
|
type: z.ZodLiteral<"system_message">;
|
|
1222
1534
|
session_id: z.ZodString;
|
|
@@ -1231,6 +1543,41 @@ export declare const SystemMessageEventSchema: z.ZodObject<{
|
|
|
1231
1543
|
timestamp: z.ZodString;
|
|
1232
1544
|
/** fatal = red flashing background; affects frontend styling. */
|
|
1233
1545
|
recoverable: z.ZodBoolean;
|
|
1546
|
+
/** Terminal run failure; the frontend must keep this recovery card visible. */
|
|
1547
|
+
terminal: z.ZodOptional<z.ZodBoolean>;
|
|
1548
|
+
/** Durable user-turn identity for lifecycle acknowledgements such as Stop. */
|
|
1549
|
+
run_id: z.ZodOptional<z.ZodString>;
|
|
1550
|
+
/** Stable product-level message code. */
|
|
1551
|
+
code: z.ZodOptional<z.ZodString>;
|
|
1552
|
+
/** Structured workspace-restore metadata. */
|
|
1553
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
1554
|
+
mode: z.ZodEnum<["checkpoint", "causal"]>;
|
|
1555
|
+
checkpointId: z.ZodOptional<z.ZodString>;
|
|
1556
|
+
nodeId: z.ZodOptional<z.ZodString>;
|
|
1557
|
+
changeId: z.ZodOptional<z.ZodString>;
|
|
1558
|
+
restoredAt: z.ZodOptional<z.ZodString>;
|
|
1559
|
+
files: z.ZodArray<z.ZodString, "many">;
|
|
1560
|
+
fileCount: z.ZodNumber;
|
|
1561
|
+
affectedNodeCount: z.ZodOptional<z.ZodNumber>;
|
|
1562
|
+
}, "strip", z.ZodTypeAny, {
|
|
1563
|
+
files: string[];
|
|
1564
|
+
mode: "checkpoint" | "causal";
|
|
1565
|
+
fileCount: number;
|
|
1566
|
+
checkpointId?: string | undefined;
|
|
1567
|
+
changeId?: string | undefined;
|
|
1568
|
+
nodeId?: string | undefined;
|
|
1569
|
+
restoredAt?: string | undefined;
|
|
1570
|
+
affectedNodeCount?: number | undefined;
|
|
1571
|
+
}, {
|
|
1572
|
+
files: string[];
|
|
1573
|
+
mode: "checkpoint" | "causal";
|
|
1574
|
+
fileCount: number;
|
|
1575
|
+
checkpointId?: string | undefined;
|
|
1576
|
+
changeId?: string | undefined;
|
|
1577
|
+
nodeId?: string | undefined;
|
|
1578
|
+
restoredAt?: string | undefined;
|
|
1579
|
+
affectedNodeCount?: number | undefined;
|
|
1580
|
+
}>>;
|
|
1234
1581
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1235
1582
|
type: z.ZodLiteral<"system_message">;
|
|
1236
1583
|
session_id: z.ZodString;
|
|
@@ -1245,6 +1592,41 @@ export declare const SystemMessageEventSchema: z.ZodObject<{
|
|
|
1245
1592
|
timestamp: z.ZodString;
|
|
1246
1593
|
/** fatal = red flashing background; affects frontend styling. */
|
|
1247
1594
|
recoverable: z.ZodBoolean;
|
|
1595
|
+
/** Terminal run failure; the frontend must keep this recovery card visible. */
|
|
1596
|
+
terminal: z.ZodOptional<z.ZodBoolean>;
|
|
1597
|
+
/** Durable user-turn identity for lifecycle acknowledgements such as Stop. */
|
|
1598
|
+
run_id: z.ZodOptional<z.ZodString>;
|
|
1599
|
+
/** Stable product-level message code. */
|
|
1600
|
+
code: z.ZodOptional<z.ZodString>;
|
|
1601
|
+
/** Structured workspace-restore metadata. */
|
|
1602
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
1603
|
+
mode: z.ZodEnum<["checkpoint", "causal"]>;
|
|
1604
|
+
checkpointId: z.ZodOptional<z.ZodString>;
|
|
1605
|
+
nodeId: z.ZodOptional<z.ZodString>;
|
|
1606
|
+
changeId: z.ZodOptional<z.ZodString>;
|
|
1607
|
+
restoredAt: z.ZodOptional<z.ZodString>;
|
|
1608
|
+
files: z.ZodArray<z.ZodString, "many">;
|
|
1609
|
+
fileCount: z.ZodNumber;
|
|
1610
|
+
affectedNodeCount: z.ZodOptional<z.ZodNumber>;
|
|
1611
|
+
}, "strip", z.ZodTypeAny, {
|
|
1612
|
+
files: string[];
|
|
1613
|
+
mode: "checkpoint" | "causal";
|
|
1614
|
+
fileCount: number;
|
|
1615
|
+
checkpointId?: string | undefined;
|
|
1616
|
+
changeId?: string | undefined;
|
|
1617
|
+
nodeId?: string | undefined;
|
|
1618
|
+
restoredAt?: string | undefined;
|
|
1619
|
+
affectedNodeCount?: number | undefined;
|
|
1620
|
+
}, {
|
|
1621
|
+
files: string[];
|
|
1622
|
+
mode: "checkpoint" | "causal";
|
|
1623
|
+
fileCount: number;
|
|
1624
|
+
checkpointId?: string | undefined;
|
|
1625
|
+
changeId?: string | undefined;
|
|
1626
|
+
nodeId?: string | undefined;
|
|
1627
|
+
restoredAt?: string | undefined;
|
|
1628
|
+
affectedNodeCount?: number | undefined;
|
|
1629
|
+
}>>;
|
|
1248
1630
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1249
1631
|
type: z.ZodLiteral<"system_message">;
|
|
1250
1632
|
session_id: z.ZodString;
|
|
@@ -1259,6 +1641,41 @@ export declare const SystemMessageEventSchema: z.ZodObject<{
|
|
|
1259
1641
|
timestamp: z.ZodString;
|
|
1260
1642
|
/** fatal = red flashing background; affects frontend styling. */
|
|
1261
1643
|
recoverable: z.ZodBoolean;
|
|
1644
|
+
/** Terminal run failure; the frontend must keep this recovery card visible. */
|
|
1645
|
+
terminal: z.ZodOptional<z.ZodBoolean>;
|
|
1646
|
+
/** Durable user-turn identity for lifecycle acknowledgements such as Stop. */
|
|
1647
|
+
run_id: z.ZodOptional<z.ZodString>;
|
|
1648
|
+
/** Stable product-level message code. */
|
|
1649
|
+
code: z.ZodOptional<z.ZodString>;
|
|
1650
|
+
/** Structured workspace-restore metadata. */
|
|
1651
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
1652
|
+
mode: z.ZodEnum<["checkpoint", "causal"]>;
|
|
1653
|
+
checkpointId: z.ZodOptional<z.ZodString>;
|
|
1654
|
+
nodeId: z.ZodOptional<z.ZodString>;
|
|
1655
|
+
changeId: z.ZodOptional<z.ZodString>;
|
|
1656
|
+
restoredAt: z.ZodOptional<z.ZodString>;
|
|
1657
|
+
files: z.ZodArray<z.ZodString, "many">;
|
|
1658
|
+
fileCount: z.ZodNumber;
|
|
1659
|
+
affectedNodeCount: z.ZodOptional<z.ZodNumber>;
|
|
1660
|
+
}, "strip", z.ZodTypeAny, {
|
|
1661
|
+
files: string[];
|
|
1662
|
+
mode: "checkpoint" | "causal";
|
|
1663
|
+
fileCount: number;
|
|
1664
|
+
checkpointId?: string | undefined;
|
|
1665
|
+
changeId?: string | undefined;
|
|
1666
|
+
nodeId?: string | undefined;
|
|
1667
|
+
restoredAt?: string | undefined;
|
|
1668
|
+
affectedNodeCount?: number | undefined;
|
|
1669
|
+
}, {
|
|
1670
|
+
files: string[];
|
|
1671
|
+
mode: "checkpoint" | "causal";
|
|
1672
|
+
fileCount: number;
|
|
1673
|
+
checkpointId?: string | undefined;
|
|
1674
|
+
changeId?: string | undefined;
|
|
1675
|
+
nodeId?: string | undefined;
|
|
1676
|
+
restoredAt?: string | undefined;
|
|
1677
|
+
affectedNodeCount?: number | undefined;
|
|
1678
|
+
}>>;
|
|
1262
1679
|
}, z.ZodTypeAny, "passthrough">>;
|
|
1263
1680
|
export type SystemMessageEvent = z.infer<typeof SystemMessageEventSchema>;
|
|
1264
1681
|
export declare const UserInputRequestEventSchema: z.ZodObject<{
|
|
@@ -1341,6 +1758,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1341
1758
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1342
1759
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1343
1760
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
1761
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
1762
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1344
1763
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1345
1764
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1346
1765
|
type: z.ZodLiteral<"TEXT_MESSAGE_START">;
|
|
@@ -1351,6 +1770,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1351
1770
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1352
1771
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1353
1772
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
1773
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
1774
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1354
1775
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1355
1776
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1356
1777
|
type: z.ZodLiteral<"TEXT_MESSAGE_START">;
|
|
@@ -1361,6 +1782,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1361
1782
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1362
1783
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1363
1784
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
1785
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
1786
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1364
1787
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1365
1788
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1366
1789
|
type: z.ZodLiteral<"TEXT_MESSAGE_START">;
|
|
@@ -1371,6 +1794,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1371
1794
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1372
1795
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1373
1796
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
1797
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
1798
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1374
1799
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1375
1800
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1376
1801
|
type: z.ZodLiteral<"TEXT_MESSAGE_CONTENT">;
|
|
@@ -1381,6 +1806,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1381
1806
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1382
1807
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1383
1808
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
1809
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
1810
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1384
1811
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1385
1812
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1386
1813
|
type: z.ZodLiteral<"TEXT_MESSAGE_CONTENT">;
|
|
@@ -1391,6 +1818,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1391
1818
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1392
1819
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1393
1820
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
1821
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
1822
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1394
1823
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1395
1824
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1396
1825
|
type: z.ZodLiteral<"TEXT_MESSAGE_CONTENT">;
|
|
@@ -1401,6 +1830,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1401
1830
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1402
1831
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1403
1832
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
1833
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
1834
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1404
1835
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1405
1836
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1406
1837
|
type: z.ZodLiteral<"TEXT_MESSAGE_END">;
|
|
@@ -1410,6 +1841,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1410
1841
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1411
1842
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1412
1843
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
1844
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
1845
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1413
1846
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1414
1847
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1415
1848
|
type: z.ZodLiteral<"TEXT_MESSAGE_END">;
|
|
@@ -1419,6 +1852,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1419
1852
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1420
1853
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1421
1854
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
1855
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
1856
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1422
1857
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1423
1858
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1424
1859
|
type: z.ZodLiteral<"TEXT_MESSAGE_END">;
|
|
@@ -1428,6 +1863,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1428
1863
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1429
1864
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1430
1865
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
1866
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
1867
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1431
1868
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1432
1869
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1433
1870
|
type: z.ZodLiteral<"TEXT_MESSAGE_CHUNK">;
|
|
@@ -1439,6 +1876,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1439
1876
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1440
1877
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1441
1878
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
1879
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
1880
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1442
1881
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1443
1882
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1444
1883
|
type: z.ZodLiteral<"TEXT_MESSAGE_CHUNK">;
|
|
@@ -1450,6 +1889,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1450
1889
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1451
1890
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1452
1891
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
1892
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
1893
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1453
1894
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1454
1895
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1455
1896
|
type: z.ZodLiteral<"TEXT_MESSAGE_CHUNK">;
|
|
@@ -1461,6 +1902,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1461
1902
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1462
1903
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1463
1904
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
1905
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
1906
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1464
1907
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1465
1908
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1466
1909
|
type: z.ZodLiteral<"TOOL_CALL_START">;
|
|
@@ -1472,6 +1915,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1472
1915
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1473
1916
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1474
1917
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
1918
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
1919
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1475
1920
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1476
1921
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1477
1922
|
type: z.ZodLiteral<"TOOL_CALL_START">;
|
|
@@ -1483,6 +1928,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1483
1928
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1484
1929
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1485
1930
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
1931
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
1932
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1486
1933
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1487
1934
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1488
1935
|
type: z.ZodLiteral<"TOOL_CALL_START">;
|
|
@@ -1494,6 +1941,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1494
1941
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1495
1942
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1496
1943
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
1944
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
1945
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1497
1946
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1498
1947
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1499
1948
|
type: z.ZodLiteral<"TOOL_CALL_ARGS">;
|
|
@@ -1504,6 +1953,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1504
1953
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1505
1954
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1506
1955
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
1956
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
1957
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1507
1958
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1508
1959
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1509
1960
|
type: z.ZodLiteral<"TOOL_CALL_ARGS">;
|
|
@@ -1514,6 +1965,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1514
1965
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1515
1966
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1516
1967
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
1968
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
1969
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1517
1970
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1518
1971
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1519
1972
|
type: z.ZodLiteral<"TOOL_CALL_ARGS">;
|
|
@@ -1524,6 +1977,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1524
1977
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1525
1978
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1526
1979
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
1980
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
1981
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1527
1982
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1528
1983
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1529
1984
|
type: z.ZodLiteral<"TOOL_CALL_END">;
|
|
@@ -1536,6 +1991,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1536
1991
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1537
1992
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1538
1993
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
1994
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
1995
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1539
1996
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1540
1997
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1541
1998
|
type: z.ZodLiteral<"TOOL_CALL_END">;
|
|
@@ -1548,6 +2005,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1548
2005
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1549
2006
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1550
2007
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2008
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2009
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1551
2010
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1552
2011
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1553
2012
|
type: z.ZodLiteral<"TOOL_CALL_END">;
|
|
@@ -1560,6 +2019,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1560
2019
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1561
2020
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1562
2021
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2022
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2023
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1563
2024
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1564
2025
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1565
2026
|
type: z.ZodLiteral<"TOOL_CALL_RESULT">;
|
|
@@ -1572,6 +2033,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1572
2033
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1573
2034
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1574
2035
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2036
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2037
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1575
2038
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1576
2039
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1577
2040
|
type: z.ZodLiteral<"TOOL_CALL_RESULT">;
|
|
@@ -1584,6 +2047,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1584
2047
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1585
2048
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1586
2049
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2050
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2051
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1587
2052
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1588
2053
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1589
2054
|
type: z.ZodLiteral<"TOOL_CALL_RESULT">;
|
|
@@ -1596,6 +2061,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1596
2061
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1597
2062
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1598
2063
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2064
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2065
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1599
2066
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1600
2067
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1601
2068
|
type: z.ZodLiteral<"REASONING_START">;
|
|
@@ -1604,6 +2071,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1604
2071
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1605
2072
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1606
2073
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2074
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2075
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1607
2076
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1608
2077
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1609
2078
|
type: z.ZodLiteral<"REASONING_START">;
|
|
@@ -1612,6 +2081,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1612
2081
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1613
2082
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1614
2083
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2084
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2085
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1615
2086
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1616
2087
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1617
2088
|
type: z.ZodLiteral<"REASONING_START">;
|
|
@@ -1620,6 +2091,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1620
2091
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1621
2092
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1622
2093
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2094
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2095
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1623
2096
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1624
2097
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1625
2098
|
type: z.ZodLiteral<"REASONING_END">;
|
|
@@ -1628,6 +2101,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1628
2101
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1629
2102
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1630
2103
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2104
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2105
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1631
2106
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1632
2107
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1633
2108
|
type: z.ZodLiteral<"REASONING_END">;
|
|
@@ -1636,6 +2111,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1636
2111
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1637
2112
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1638
2113
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2114
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2115
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1639
2116
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1640
2117
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1641
2118
|
type: z.ZodLiteral<"REASONING_END">;
|
|
@@ -1644,6 +2121,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1644
2121
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1645
2122
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1646
2123
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2124
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2125
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1647
2126
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1648
2127
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1649
2128
|
type: z.ZodLiteral<"REASONING_MESSAGE_START">;
|
|
@@ -1653,6 +2132,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1653
2132
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1654
2133
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1655
2134
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2135
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2136
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1656
2137
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1657
2138
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1658
2139
|
type: z.ZodLiteral<"REASONING_MESSAGE_START">;
|
|
@@ -1662,6 +2143,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1662
2143
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1663
2144
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1664
2145
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2146
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2147
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1665
2148
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1666
2149
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1667
2150
|
type: z.ZodLiteral<"REASONING_MESSAGE_START">;
|
|
@@ -1671,6 +2154,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1671
2154
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1672
2155
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1673
2156
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2157
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2158
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1674
2159
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1675
2160
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1676
2161
|
type: z.ZodLiteral<"REASONING_MESSAGE_CONTENT">;
|
|
@@ -1681,6 +2166,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1681
2166
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1682
2167
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1683
2168
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2169
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2170
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1684
2171
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1685
2172
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1686
2173
|
type: z.ZodLiteral<"REASONING_MESSAGE_CONTENT">;
|
|
@@ -1691,6 +2178,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1691
2178
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1692
2179
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1693
2180
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2181
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2182
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1694
2183
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1695
2184
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1696
2185
|
type: z.ZodLiteral<"REASONING_MESSAGE_CONTENT">;
|
|
@@ -1701,6 +2190,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1701
2190
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1702
2191
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1703
2192
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2193
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2194
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1704
2195
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1705
2196
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1706
2197
|
type: z.ZodLiteral<"REASONING_MESSAGE_END">;
|
|
@@ -1710,6 +2201,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1710
2201
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1711
2202
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1712
2203
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2204
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2205
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1713
2206
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1714
2207
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1715
2208
|
type: z.ZodLiteral<"REASONING_MESSAGE_END">;
|
|
@@ -1719,6 +2212,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1719
2212
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1720
2213
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1721
2214
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2215
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2216
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1722
2217
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1723
2218
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1724
2219
|
type: z.ZodLiteral<"REASONING_MESSAGE_END">;
|
|
@@ -1730,6 +2225,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1730
2225
|
session_id: z.ZodOptional<z.ZodString>;
|
|
1731
2226
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1732
2227
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2228
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2229
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1733
2230
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1734
2231
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1735
2232
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
@@ -1739,6 +2236,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1739
2236
|
session_id: z.ZodOptional<z.ZodString>;
|
|
1740
2237
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1741
2238
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2239
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2240
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1742
2241
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1743
2242
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1744
2243
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
@@ -1748,6 +2247,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1748
2247
|
session_id: z.ZodOptional<z.ZodString>;
|
|
1749
2248
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1750
2249
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2250
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2251
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1751
2252
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1752
2253
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1753
2254
|
}, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
|
|
@@ -1757,6 +2258,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1757
2258
|
session_id: z.ZodOptional<z.ZodString>;
|
|
1758
2259
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1759
2260
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2261
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2262
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1760
2263
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1761
2264
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1762
2265
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
@@ -1766,6 +2269,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1766
2269
|
session_id: z.ZodOptional<z.ZodString>;
|
|
1767
2270
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1768
2271
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2272
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2273
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1769
2274
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1770
2275
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1771
2276
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
@@ -1775,36 +2280,50 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1775
2280
|
session_id: z.ZodOptional<z.ZodString>;
|
|
1776
2281
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1777
2282
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2283
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2284
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1778
2285
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1779
2286
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1780
2287
|
}, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
|
|
1781
2288
|
type: z.ZodLiteral<"RUN_ERROR">;
|
|
1782
2289
|
message: z.ZodString;
|
|
1783
2290
|
code: z.ZodDefault<z.ZodString>;
|
|
2291
|
+
/** False when an outer delivery loop still owns retry/escalation. */
|
|
2292
|
+
terminal: z.ZodOptional<z.ZodBoolean>;
|
|
1784
2293
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1785
2294
|
session_id: z.ZodOptional<z.ZodString>;
|
|
1786
2295
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1787
2296
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2297
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2298
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1788
2299
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1789
2300
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1790
2301
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1791
2302
|
type: z.ZodLiteral<"RUN_ERROR">;
|
|
1792
2303
|
message: z.ZodString;
|
|
1793
2304
|
code: z.ZodDefault<z.ZodString>;
|
|
2305
|
+
/** False when an outer delivery loop still owns retry/escalation. */
|
|
2306
|
+
terminal: z.ZodOptional<z.ZodBoolean>;
|
|
1794
2307
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1795
2308
|
session_id: z.ZodOptional<z.ZodString>;
|
|
1796
2309
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1797
2310
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2311
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2312
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1798
2313
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1799
2314
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1800
2315
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1801
2316
|
type: z.ZodLiteral<"RUN_ERROR">;
|
|
1802
2317
|
message: z.ZodString;
|
|
1803
2318
|
code: z.ZodDefault<z.ZodString>;
|
|
2319
|
+
/** False when an outer delivery loop still owns retry/escalation. */
|
|
2320
|
+
terminal: z.ZodOptional<z.ZodBoolean>;
|
|
1804
2321
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1805
2322
|
session_id: z.ZodOptional<z.ZodString>;
|
|
1806
2323
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1807
2324
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2325
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2326
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1808
2327
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1809
2328
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1810
2329
|
}, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
|
|
@@ -1812,6 +2331,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1812
2331
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1813
2332
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1814
2333
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2334
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2335
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1815
2336
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1816
2337
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1817
2338
|
type: z.ZodLiteral<"MESSAGES_SNAPSHOT">;
|
|
@@ -1899,6 +2420,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1899
2420
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1900
2421
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1901
2422
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2423
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2424
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1902
2425
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1903
2426
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1904
2427
|
type: z.ZodLiteral<"MESSAGES_SNAPSHOT">;
|
|
@@ -1986,6 +2509,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
1986
2509
|
run_id: z.ZodOptional<z.ZodString>;
|
|
1987
2510
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
1988
2511
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2512
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2513
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
1989
2514
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
1990
2515
|
_ts: z.ZodOptional<z.ZodString>;
|
|
1991
2516
|
type: z.ZodLiteral<"MESSAGES_SNAPSHOT">;
|
|
@@ -2073,6 +2598,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
2073
2598
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2074
2599
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2075
2600
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2601
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2602
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2076
2603
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2077
2604
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2078
2605
|
type: z.ZodLiteral<"CUSTOM">;
|
|
@@ -2083,6 +2610,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
2083
2610
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2084
2611
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2085
2612
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2613
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2614
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2086
2615
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2087
2616
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2088
2617
|
type: z.ZodLiteral<"CUSTOM">;
|
|
@@ -2093,6 +2622,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
2093
2622
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2094
2623
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2095
2624
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2625
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2626
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2096
2627
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2097
2628
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2098
2629
|
type: z.ZodLiteral<"CUSTOM">;
|
|
@@ -2103,6 +2634,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
2103
2634
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2104
2635
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2105
2636
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2637
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2638
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2106
2639
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2107
2640
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2108
2641
|
type: z.ZodLiteral<"agent_status_update">;
|
|
@@ -2141,6 +2674,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
2141
2674
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2142
2675
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2143
2676
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2677
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2678
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2144
2679
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2145
2680
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2146
2681
|
type: z.ZodLiteral<"agent_status_update">;
|
|
@@ -2179,6 +2714,8 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
2179
2714
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2180
2715
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2181
2716
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2717
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2718
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2182
2719
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2183
2720
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2184
2721
|
type: z.ZodLiteral<"agent_status_update">;
|
|
@@ -2226,6 +2763,41 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
2226
2763
|
timestamp: z.ZodString;
|
|
2227
2764
|
/** fatal = red flashing background; affects frontend styling. */
|
|
2228
2765
|
recoverable: z.ZodBoolean;
|
|
2766
|
+
/** Terminal run failure; the frontend must keep this recovery card visible. */
|
|
2767
|
+
terminal: z.ZodOptional<z.ZodBoolean>;
|
|
2768
|
+
/** Durable user-turn identity for lifecycle acknowledgements such as Stop. */
|
|
2769
|
+
run_id: z.ZodOptional<z.ZodString>;
|
|
2770
|
+
/** Stable product-level message code. */
|
|
2771
|
+
code: z.ZodOptional<z.ZodString>;
|
|
2772
|
+
/** Structured workspace-restore metadata. */
|
|
2773
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
2774
|
+
mode: z.ZodEnum<["checkpoint", "causal"]>;
|
|
2775
|
+
checkpointId: z.ZodOptional<z.ZodString>;
|
|
2776
|
+
nodeId: z.ZodOptional<z.ZodString>;
|
|
2777
|
+
changeId: z.ZodOptional<z.ZodString>;
|
|
2778
|
+
restoredAt: z.ZodOptional<z.ZodString>;
|
|
2779
|
+
files: z.ZodArray<z.ZodString, "many">;
|
|
2780
|
+
fileCount: z.ZodNumber;
|
|
2781
|
+
affectedNodeCount: z.ZodOptional<z.ZodNumber>;
|
|
2782
|
+
}, "strip", z.ZodTypeAny, {
|
|
2783
|
+
files: string[];
|
|
2784
|
+
mode: "checkpoint" | "causal";
|
|
2785
|
+
fileCount: number;
|
|
2786
|
+
checkpointId?: string | undefined;
|
|
2787
|
+
changeId?: string | undefined;
|
|
2788
|
+
nodeId?: string | undefined;
|
|
2789
|
+
restoredAt?: string | undefined;
|
|
2790
|
+
affectedNodeCount?: number | undefined;
|
|
2791
|
+
}, {
|
|
2792
|
+
files: string[];
|
|
2793
|
+
mode: "checkpoint" | "causal";
|
|
2794
|
+
fileCount: number;
|
|
2795
|
+
checkpointId?: string | undefined;
|
|
2796
|
+
changeId?: string | undefined;
|
|
2797
|
+
nodeId?: string | undefined;
|
|
2798
|
+
restoredAt?: string | undefined;
|
|
2799
|
+
affectedNodeCount?: number | undefined;
|
|
2800
|
+
}>>;
|
|
2229
2801
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2230
2802
|
type: z.ZodLiteral<"system_message">;
|
|
2231
2803
|
session_id: z.ZodString;
|
|
@@ -2240,6 +2812,41 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
2240
2812
|
timestamp: z.ZodString;
|
|
2241
2813
|
/** fatal = red flashing background; affects frontend styling. */
|
|
2242
2814
|
recoverable: z.ZodBoolean;
|
|
2815
|
+
/** Terminal run failure; the frontend must keep this recovery card visible. */
|
|
2816
|
+
terminal: z.ZodOptional<z.ZodBoolean>;
|
|
2817
|
+
/** Durable user-turn identity for lifecycle acknowledgements such as Stop. */
|
|
2818
|
+
run_id: z.ZodOptional<z.ZodString>;
|
|
2819
|
+
/** Stable product-level message code. */
|
|
2820
|
+
code: z.ZodOptional<z.ZodString>;
|
|
2821
|
+
/** Structured workspace-restore metadata. */
|
|
2822
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
2823
|
+
mode: z.ZodEnum<["checkpoint", "causal"]>;
|
|
2824
|
+
checkpointId: z.ZodOptional<z.ZodString>;
|
|
2825
|
+
nodeId: z.ZodOptional<z.ZodString>;
|
|
2826
|
+
changeId: z.ZodOptional<z.ZodString>;
|
|
2827
|
+
restoredAt: z.ZodOptional<z.ZodString>;
|
|
2828
|
+
files: z.ZodArray<z.ZodString, "many">;
|
|
2829
|
+
fileCount: z.ZodNumber;
|
|
2830
|
+
affectedNodeCount: z.ZodOptional<z.ZodNumber>;
|
|
2831
|
+
}, "strip", z.ZodTypeAny, {
|
|
2832
|
+
files: string[];
|
|
2833
|
+
mode: "checkpoint" | "causal";
|
|
2834
|
+
fileCount: number;
|
|
2835
|
+
checkpointId?: string | undefined;
|
|
2836
|
+
changeId?: string | undefined;
|
|
2837
|
+
nodeId?: string | undefined;
|
|
2838
|
+
restoredAt?: string | undefined;
|
|
2839
|
+
affectedNodeCount?: number | undefined;
|
|
2840
|
+
}, {
|
|
2841
|
+
files: string[];
|
|
2842
|
+
mode: "checkpoint" | "causal";
|
|
2843
|
+
fileCount: number;
|
|
2844
|
+
checkpointId?: string | undefined;
|
|
2845
|
+
changeId?: string | undefined;
|
|
2846
|
+
nodeId?: string | undefined;
|
|
2847
|
+
restoredAt?: string | undefined;
|
|
2848
|
+
affectedNodeCount?: number | undefined;
|
|
2849
|
+
}>>;
|
|
2243
2850
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2244
2851
|
type: z.ZodLiteral<"system_message">;
|
|
2245
2852
|
session_id: z.ZodString;
|
|
@@ -2254,6 +2861,41 @@ export declare const AgUiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
2254
2861
|
timestamp: z.ZodString;
|
|
2255
2862
|
/** fatal = red flashing background; affects frontend styling. */
|
|
2256
2863
|
recoverable: z.ZodBoolean;
|
|
2864
|
+
/** Terminal run failure; the frontend must keep this recovery card visible. */
|
|
2865
|
+
terminal: z.ZodOptional<z.ZodBoolean>;
|
|
2866
|
+
/** Durable user-turn identity for lifecycle acknowledgements such as Stop. */
|
|
2867
|
+
run_id: z.ZodOptional<z.ZodString>;
|
|
2868
|
+
/** Stable product-level message code. */
|
|
2869
|
+
code: z.ZodOptional<z.ZodString>;
|
|
2870
|
+
/** Structured workspace-restore metadata. */
|
|
2871
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
2872
|
+
mode: z.ZodEnum<["checkpoint", "causal"]>;
|
|
2873
|
+
checkpointId: z.ZodOptional<z.ZodString>;
|
|
2874
|
+
nodeId: z.ZodOptional<z.ZodString>;
|
|
2875
|
+
changeId: z.ZodOptional<z.ZodString>;
|
|
2876
|
+
restoredAt: z.ZodOptional<z.ZodString>;
|
|
2877
|
+
files: z.ZodArray<z.ZodString, "many">;
|
|
2878
|
+
fileCount: z.ZodNumber;
|
|
2879
|
+
affectedNodeCount: z.ZodOptional<z.ZodNumber>;
|
|
2880
|
+
}, "strip", z.ZodTypeAny, {
|
|
2881
|
+
files: string[];
|
|
2882
|
+
mode: "checkpoint" | "causal";
|
|
2883
|
+
fileCount: number;
|
|
2884
|
+
checkpointId?: string | undefined;
|
|
2885
|
+
changeId?: string | undefined;
|
|
2886
|
+
nodeId?: string | undefined;
|
|
2887
|
+
restoredAt?: string | undefined;
|
|
2888
|
+
affectedNodeCount?: number | undefined;
|
|
2889
|
+
}, {
|
|
2890
|
+
files: string[];
|
|
2891
|
+
mode: "checkpoint" | "causal";
|
|
2892
|
+
fileCount: number;
|
|
2893
|
+
checkpointId?: string | undefined;
|
|
2894
|
+
changeId?: string | undefined;
|
|
2895
|
+
nodeId?: string | undefined;
|
|
2896
|
+
restoredAt?: string | undefined;
|
|
2897
|
+
affectedNodeCount?: number | undefined;
|
|
2898
|
+
}>>;
|
|
2257
2899
|
}, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
|
|
2258
2900
|
type: z.ZodLiteral<"user_input_request">;
|
|
2259
2901
|
session_id: z.ZodString;
|
|
@@ -2324,6 +2966,8 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2324
2966
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2325
2967
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2326
2968
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2969
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2970
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2327
2971
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2328
2972
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2329
2973
|
type: z.ZodLiteral<"TEXT_MESSAGE_START">;
|
|
@@ -2334,6 +2978,8 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2334
2978
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2335
2979
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2336
2980
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2981
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2982
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2337
2983
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2338
2984
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2339
2985
|
type: z.ZodLiteral<"TEXT_MESSAGE_CONTENT">;
|
|
@@ -2344,6 +2990,8 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2344
2990
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2345
2991
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2346
2992
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
2993
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
2994
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2347
2995
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2348
2996
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2349
2997
|
type: z.ZodLiteral<"TEXT_MESSAGE_END">;
|
|
@@ -2353,6 +3001,8 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2353
3001
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2354
3002
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2355
3003
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3004
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3005
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2356
3006
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2357
3007
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2358
3008
|
type: z.ZodLiteral<"TEXT_MESSAGE_CHUNK">;
|
|
@@ -2364,6 +3014,8 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2364
3014
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2365
3015
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2366
3016
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3017
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3018
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2367
3019
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2368
3020
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2369
3021
|
type: z.ZodLiteral<"TOOL_CALL_START">;
|
|
@@ -2375,6 +3027,8 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2375
3027
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2376
3028
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2377
3029
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3030
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3031
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2378
3032
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2379
3033
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2380
3034
|
type: z.ZodLiteral<"TOOL_CALL_ARGS">;
|
|
@@ -2385,6 +3039,8 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2385
3039
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2386
3040
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2387
3041
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3042
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3043
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2388
3044
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2389
3045
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2390
3046
|
type: z.ZodLiteral<"TOOL_CALL_END">;
|
|
@@ -2397,6 +3053,8 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2397
3053
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2398
3054
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2399
3055
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3056
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3057
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2400
3058
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2401
3059
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2402
3060
|
type: z.ZodLiteral<"TOOL_CALL_RESULT">;
|
|
@@ -2409,6 +3067,8 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2409
3067
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2410
3068
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2411
3069
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3070
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3071
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2412
3072
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2413
3073
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2414
3074
|
type: z.ZodLiteral<"REASONING_START">;
|
|
@@ -2417,6 +3077,8 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2417
3077
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2418
3078
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2419
3079
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3080
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3081
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2420
3082
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2421
3083
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2422
3084
|
type: z.ZodLiteral<"REASONING_END">;
|
|
@@ -2425,6 +3087,8 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2425
3087
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2426
3088
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2427
3089
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3090
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3091
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2428
3092
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2429
3093
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2430
3094
|
type: z.ZodLiteral<"REASONING_MESSAGE_START">;
|
|
@@ -2434,6 +3098,8 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2434
3098
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2435
3099
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2436
3100
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3101
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3102
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2437
3103
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2438
3104
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2439
3105
|
type: z.ZodLiteral<"REASONING_MESSAGE_CONTENT">;
|
|
@@ -2444,6 +3110,8 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2444
3110
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2445
3111
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2446
3112
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3113
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3114
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2447
3115
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2448
3116
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2449
3117
|
type: z.ZodLiteral<"REASONING_MESSAGE_END">;
|
|
@@ -2455,6 +3123,8 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2455
3123
|
session_id: z.ZodOptional<z.ZodString>;
|
|
2456
3124
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2457
3125
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3126
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3127
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2458
3128
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2459
3129
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2460
3130
|
}, z.ZodTypeAny, "passthrough"> | z.objectInputType<{
|
|
@@ -2464,16 +3134,22 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2464
3134
|
session_id: z.ZodOptional<z.ZodString>;
|
|
2465
3135
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2466
3136
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3137
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3138
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2467
3139
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2468
3140
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2469
3141
|
}, z.ZodTypeAny, "passthrough"> | z.objectInputType<{
|
|
2470
3142
|
type: z.ZodLiteral<"RUN_ERROR">;
|
|
2471
3143
|
message: z.ZodString;
|
|
2472
3144
|
code: z.ZodDefault<z.ZodString>;
|
|
3145
|
+
/** False when an outer delivery loop still owns retry/escalation. */
|
|
3146
|
+
terminal: z.ZodOptional<z.ZodBoolean>;
|
|
2473
3147
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2474
3148
|
session_id: z.ZodOptional<z.ZodString>;
|
|
2475
3149
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2476
3150
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3151
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3152
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2477
3153
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2478
3154
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2479
3155
|
}, z.ZodTypeAny, "passthrough"> | z.objectInputType<{
|
|
@@ -2481,6 +3157,8 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2481
3157
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2482
3158
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2483
3159
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3160
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3161
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2484
3162
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2485
3163
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2486
3164
|
type: z.ZodLiteral<"MESSAGES_SNAPSHOT">;
|
|
@@ -2568,6 +3246,8 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2568
3246
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2569
3247
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2570
3248
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3249
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3250
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2571
3251
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2572
3252
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2573
3253
|
type: z.ZodLiteral<"CUSTOM">;
|
|
@@ -2578,6 +3258,8 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2578
3258
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2579
3259
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2580
3260
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3261
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3262
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2581
3263
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2582
3264
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2583
3265
|
type: z.ZodLiteral<"agent_status_update">;
|
|
@@ -2625,6 +3307,41 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2625
3307
|
timestamp: z.ZodString;
|
|
2626
3308
|
/** fatal = red flashing background; affects frontend styling. */
|
|
2627
3309
|
recoverable: z.ZodBoolean;
|
|
3310
|
+
/** Terminal run failure; the frontend must keep this recovery card visible. */
|
|
3311
|
+
terminal: z.ZodOptional<z.ZodBoolean>;
|
|
3312
|
+
/** Durable user-turn identity for lifecycle acknowledgements such as Stop. */
|
|
3313
|
+
run_id: z.ZodOptional<z.ZodString>;
|
|
3314
|
+
/** Stable product-level message code. */
|
|
3315
|
+
code: z.ZodOptional<z.ZodString>;
|
|
3316
|
+
/** Structured workspace-restore metadata. */
|
|
3317
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
3318
|
+
mode: z.ZodEnum<["checkpoint", "causal"]>;
|
|
3319
|
+
checkpointId: z.ZodOptional<z.ZodString>;
|
|
3320
|
+
nodeId: z.ZodOptional<z.ZodString>;
|
|
3321
|
+
changeId: z.ZodOptional<z.ZodString>;
|
|
3322
|
+
restoredAt: z.ZodOptional<z.ZodString>;
|
|
3323
|
+
files: z.ZodArray<z.ZodString, "many">;
|
|
3324
|
+
fileCount: z.ZodNumber;
|
|
3325
|
+
affectedNodeCount: z.ZodOptional<z.ZodNumber>;
|
|
3326
|
+
}, "strip", z.ZodTypeAny, {
|
|
3327
|
+
files: string[];
|
|
3328
|
+
mode: "checkpoint" | "causal";
|
|
3329
|
+
fileCount: number;
|
|
3330
|
+
checkpointId?: string | undefined;
|
|
3331
|
+
changeId?: string | undefined;
|
|
3332
|
+
nodeId?: string | undefined;
|
|
3333
|
+
restoredAt?: string | undefined;
|
|
3334
|
+
affectedNodeCount?: number | undefined;
|
|
3335
|
+
}, {
|
|
3336
|
+
files: string[];
|
|
3337
|
+
mode: "checkpoint" | "causal";
|
|
3338
|
+
fileCount: number;
|
|
3339
|
+
checkpointId?: string | undefined;
|
|
3340
|
+
changeId?: string | undefined;
|
|
3341
|
+
nodeId?: string | undefined;
|
|
3342
|
+
restoredAt?: string | undefined;
|
|
3343
|
+
affectedNodeCount?: number | undefined;
|
|
3344
|
+
}>>;
|
|
2628
3345
|
}, z.ZodTypeAny, "passthrough"> | z.objectInputType<{
|
|
2629
3346
|
type: z.ZodLiteral<"user_input_request">;
|
|
2630
3347
|
session_id: z.ZodString;
|
|
@@ -2649,6 +3366,8 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2649
3366
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2650
3367
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2651
3368
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3369
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3370
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2652
3371
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2653
3372
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2654
3373
|
type: z.ZodLiteral<"TEXT_MESSAGE_START">;
|
|
@@ -2659,6 +3378,8 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2659
3378
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2660
3379
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2661
3380
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3381
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3382
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2662
3383
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2663
3384
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2664
3385
|
type: z.ZodLiteral<"TEXT_MESSAGE_CONTENT">;
|
|
@@ -2669,6 +3390,8 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2669
3390
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2670
3391
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2671
3392
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3393
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3394
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2672
3395
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2673
3396
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2674
3397
|
type: z.ZodLiteral<"TEXT_MESSAGE_END">;
|
|
@@ -2678,6 +3401,8 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2678
3401
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2679
3402
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2680
3403
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3404
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3405
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2681
3406
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2682
3407
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2683
3408
|
type: z.ZodLiteral<"TEXT_MESSAGE_CHUNK">;
|
|
@@ -2689,6 +3414,8 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2689
3414
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2690
3415
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2691
3416
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3417
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3418
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2692
3419
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2693
3420
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2694
3421
|
type: z.ZodLiteral<"TOOL_CALL_START">;
|
|
@@ -2700,6 +3427,8 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2700
3427
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2701
3428
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2702
3429
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3430
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3431
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2703
3432
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2704
3433
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2705
3434
|
type: z.ZodLiteral<"TOOL_CALL_ARGS">;
|
|
@@ -2710,6 +3439,8 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2710
3439
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2711
3440
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2712
3441
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3442
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3443
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2713
3444
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2714
3445
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2715
3446
|
type: z.ZodLiteral<"TOOL_CALL_END">;
|
|
@@ -2722,6 +3453,8 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2722
3453
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2723
3454
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2724
3455
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3456
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3457
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2725
3458
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2726
3459
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2727
3460
|
type: z.ZodLiteral<"TOOL_CALL_RESULT">;
|
|
@@ -2734,6 +3467,8 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2734
3467
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2735
3468
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2736
3469
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3470
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3471
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2737
3472
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2738
3473
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2739
3474
|
type: z.ZodLiteral<"REASONING_START">;
|
|
@@ -2742,6 +3477,8 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2742
3477
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2743
3478
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2744
3479
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3480
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3481
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2745
3482
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2746
3483
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2747
3484
|
type: z.ZodLiteral<"REASONING_END">;
|
|
@@ -2750,6 +3487,8 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2750
3487
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2751
3488
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2752
3489
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3490
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3491
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2753
3492
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2754
3493
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2755
3494
|
type: z.ZodLiteral<"REASONING_MESSAGE_START">;
|
|
@@ -2759,6 +3498,8 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2759
3498
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2760
3499
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2761
3500
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3501
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3502
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2762
3503
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2763
3504
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2764
3505
|
type: z.ZodLiteral<"REASONING_MESSAGE_CONTENT">;
|
|
@@ -2769,6 +3510,8 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2769
3510
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2770
3511
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2771
3512
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3513
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3514
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2772
3515
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2773
3516
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2774
3517
|
type: z.ZodLiteral<"REASONING_MESSAGE_END">;
|
|
@@ -2780,6 +3523,8 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2780
3523
|
session_id: z.ZodOptional<z.ZodString>;
|
|
2781
3524
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2782
3525
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3526
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3527
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2783
3528
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2784
3529
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2785
3530
|
}, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{
|
|
@@ -2789,16 +3534,22 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2789
3534
|
session_id: z.ZodOptional<z.ZodString>;
|
|
2790
3535
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2791
3536
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3537
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3538
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2792
3539
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2793
3540
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2794
3541
|
}, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{
|
|
2795
3542
|
type: z.ZodLiteral<"RUN_ERROR">;
|
|
2796
3543
|
message: z.ZodString;
|
|
2797
3544
|
code: z.ZodDefault<z.ZodString>;
|
|
3545
|
+
/** False when an outer delivery loop still owns retry/escalation. */
|
|
3546
|
+
terminal: z.ZodOptional<z.ZodBoolean>;
|
|
2798
3547
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2799
3548
|
session_id: z.ZodOptional<z.ZodString>;
|
|
2800
3549
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2801
3550
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3551
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3552
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2802
3553
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2803
3554
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2804
3555
|
}, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{
|
|
@@ -2806,6 +3557,8 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2806
3557
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2807
3558
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2808
3559
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3560
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3561
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2809
3562
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2810
3563
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2811
3564
|
type: z.ZodLiteral<"MESSAGES_SNAPSHOT">;
|
|
@@ -2893,6 +3646,8 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2893
3646
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2894
3647
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2895
3648
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3649
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3650
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2896
3651
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2897
3652
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2898
3653
|
type: z.ZodLiteral<"CUSTOM">;
|
|
@@ -2903,6 +3658,8 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2903
3658
|
run_id: z.ZodOptional<z.ZodString>;
|
|
2904
3659
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
2905
3660
|
agent_name: z.ZodOptional<z.ZodString>;
|
|
3661
|
+
/** Stable identity for persistence + SSE replay deduplication. */
|
|
3662
|
+
_event_id: z.ZodOptional<z.ZodString>;
|
|
2906
3663
|
/** ISO8601 emit timestamp (legacy `_ts`). */
|
|
2907
3664
|
_ts: z.ZodOptional<z.ZodString>;
|
|
2908
3665
|
type: z.ZodLiteral<"agent_status_update">;
|
|
@@ -2950,6 +3707,41 @@ export declare function safeParseEvent(raw: unknown): z.SafeParseReturnType<z.ob
|
|
|
2950
3707
|
timestamp: z.ZodString;
|
|
2951
3708
|
/** fatal = red flashing background; affects frontend styling. */
|
|
2952
3709
|
recoverable: z.ZodBoolean;
|
|
3710
|
+
/** Terminal run failure; the frontend must keep this recovery card visible. */
|
|
3711
|
+
terminal: z.ZodOptional<z.ZodBoolean>;
|
|
3712
|
+
/** Durable user-turn identity for lifecycle acknowledgements such as Stop. */
|
|
3713
|
+
run_id: z.ZodOptional<z.ZodString>;
|
|
3714
|
+
/** Stable product-level message code. */
|
|
3715
|
+
code: z.ZodOptional<z.ZodString>;
|
|
3716
|
+
/** Structured workspace-restore metadata. */
|
|
3717
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
3718
|
+
mode: z.ZodEnum<["checkpoint", "causal"]>;
|
|
3719
|
+
checkpointId: z.ZodOptional<z.ZodString>;
|
|
3720
|
+
nodeId: z.ZodOptional<z.ZodString>;
|
|
3721
|
+
changeId: z.ZodOptional<z.ZodString>;
|
|
3722
|
+
restoredAt: z.ZodOptional<z.ZodString>;
|
|
3723
|
+
files: z.ZodArray<z.ZodString, "many">;
|
|
3724
|
+
fileCount: z.ZodNumber;
|
|
3725
|
+
affectedNodeCount: z.ZodOptional<z.ZodNumber>;
|
|
3726
|
+
}, "strip", z.ZodTypeAny, {
|
|
3727
|
+
files: string[];
|
|
3728
|
+
mode: "checkpoint" | "causal";
|
|
3729
|
+
fileCount: number;
|
|
3730
|
+
checkpointId?: string | undefined;
|
|
3731
|
+
changeId?: string | undefined;
|
|
3732
|
+
nodeId?: string | undefined;
|
|
3733
|
+
restoredAt?: string | undefined;
|
|
3734
|
+
affectedNodeCount?: number | undefined;
|
|
3735
|
+
}, {
|
|
3736
|
+
files: string[];
|
|
3737
|
+
mode: "checkpoint" | "causal";
|
|
3738
|
+
fileCount: number;
|
|
3739
|
+
checkpointId?: string | undefined;
|
|
3740
|
+
changeId?: string | undefined;
|
|
3741
|
+
nodeId?: string | undefined;
|
|
3742
|
+
restoredAt?: string | undefined;
|
|
3743
|
+
affectedNodeCount?: number | undefined;
|
|
3744
|
+
}>>;
|
|
2953
3745
|
}, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{
|
|
2954
3746
|
type: z.ZodLiteral<"user_input_request">;
|
|
2955
3747
|
session_id: z.ZodString;
|