@yefengr/remote-pi 0.9.7 → 0.9.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/README.md +11 -2
  2. package/dist/protocol/types.d.ts +2 -52
  3. package/dist/protocol/v2/codec.d.ts +5 -25
  4. package/dist/protocol/v2/codec.js +3 -206
  5. package/dist/protocol/v2/codec.js.map +1 -1
  6. package/dist/protocol/v2/index.d.ts +1 -0
  7. package/dist/protocol/v2/index.js +1 -0
  8. package/dist/protocol/v2/index.js.map +1 -1
  9. package/dist/protocol/v2/marker.d.ts +40 -0
  10. package/dist/protocol/v2/marker.js +47 -0
  11. package/dist/protocol/v2/marker.js.map +1 -0
  12. package/dist/protocol/v2/schemas.d.ts +3 -2024
  13. package/dist/protocol/v2/schemas.js +3 -433
  14. package/dist/protocol/v2/schemas.js.map +1 -1
  15. package/dist/runtime/owner_router.js +5 -1
  16. package/dist/runtime/owner_router.js.map +1 -1
  17. package/dist/transport/peer_channel.d.ts +2 -11
  18. package/dist/transport/peer_channel.js +7 -11
  19. package/dist/transport/peer_channel.js.map +1 -1
  20. package/dist/transport/relay_client.d.ts +2 -8
  21. package/dist/transport/relay_client.js +3 -2
  22. package/dist/transport/relay_client.js.map +1 -1
  23. package/dist/vendor/protocol/constants.d.ts +1 -0
  24. package/dist/vendor/protocol/constants.js +1 -0
  25. package/dist/vendor/protocol/encoding.d.ts +9 -0
  26. package/dist/vendor/protocol/encoding.js +66 -0
  27. package/dist/vendor/protocol/outer/codec.d.ts +13 -0
  28. package/dist/vendor/protocol/outer/codec.js +105 -0
  29. package/dist/vendor/protocol/outer/index.d.ts +4 -0
  30. package/dist/vendor/protocol/outer/index.js +4 -0
  31. package/dist/vendor/protocol/outer/types.d.ts +120 -0
  32. package/dist/vendor/protocol/outer/types.js +1 -0
  33. package/dist/vendor/protocol/session/codec.d.ts +41 -0
  34. package/dist/vendor/protocol/session/codec.js +236 -0
  35. package/dist/vendor/protocol/session/frames.d.ts +5750 -0
  36. package/dist/vendor/protocol/session/frames.js +406 -0
  37. package/dist/vendor/protocol/session/index.d.ts +3 -0
  38. package/dist/vendor/protocol/session/index.js +3 -0
  39. package/dist/vendor/protocol/session/schema.d.ts +1060 -0
  40. package/dist/vendor/protocol/session/schema.js +302 -0
  41. package/package.json +17 -25
@@ -1,2024 +1,3 @@
1
- import { z } from "zod";
2
- export declare const PROTOCOL_VERSION_V2: 2;
3
- export declare const TIMELINE_MARKER_NAME: "remote-pi:timeline-v2";
4
- export declare const MAX_FRAME_BYTES: number;
5
- export declare const MAX_HISTORY_CHUNK_BYTES: number;
6
- export declare const MAX_WINDOW_DECODE_BYTES: number;
7
- export declare const MAX_FRAGMENT_DECODE_BYTES: number;
8
- export declare const MAX_ID_CHARS = 256;
9
- export declare const MAX_TEXT_CHARS: number;
10
- export declare const MAX_ARRAY_ITEMS = 4096;
11
- export type JsonValue = null | boolean | number | string | JsonValue[] | {
12
- [key: string]: JsonValue;
13
- };
14
- export declare const JsonValueSchema: z.ZodType<JsonValue>;
15
- export declare const TimelineUserBlockSchema: z.ZodUnion<readonly [z.ZodObject<{
16
- type: z.ZodLiteral<"text">;
17
- text: z.ZodString;
18
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
19
- }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
20
- type: z.ZodLiteral<"image">;
21
- mime_type: z.ZodString;
22
- data: z.ZodString;
23
- byte_length: z.ZodNumber;
24
- }, z.core.$strict>, z.ZodObject<{
25
- type: z.ZodLiteral<"image">;
26
- mime_type: z.ZodString;
27
- byte_length: z.ZodNumber;
28
- omitted: z.ZodLiteral<true>;
29
- }, z.core.$strict>]>]>;
30
- export declare const TimelineAssistantBlockSchema: z.ZodUnion<readonly [z.ZodObject<{
31
- type: z.ZodLiteral<"text">;
32
- text: z.ZodString;
33
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
34
- }, z.core.$strict>, z.ZodObject<{
35
- type: z.ZodLiteral<"thinking">;
36
- text: z.ZodString;
37
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
38
- }, z.core.$strict>]>;
39
- export declare const TimelineTextBlockSchema: z.ZodObject<{
40
- type: z.ZodLiteral<"text">;
41
- text: z.ZodString;
42
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
43
- }, z.core.$strict>;
44
- export declare const TimelineThinkingBlockSchema: z.ZodObject<{
45
- type: z.ZodLiteral<"thinking">;
46
- text: z.ZodString;
47
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
48
- }, z.core.$strict>;
49
- export declare const TimelineImageBlockSchema: z.ZodUnion<readonly [z.ZodObject<{
50
- type: z.ZodLiteral<"image">;
51
- mime_type: z.ZodString;
52
- data: z.ZodString;
53
- byte_length: z.ZodNumber;
54
- }, z.core.$strict>, z.ZodObject<{
55
- type: z.ZodLiteral<"image">;
56
- mime_type: z.ZodString;
57
- byte_length: z.ZodNumber;
58
- omitted: z.ZodLiteral<true>;
59
- }, z.core.$strict>]>;
60
- export declare const TimelineEventSchema: z.ZodUnion<readonly [z.ZodObject<{
61
- kind: z.ZodLiteral<"user">;
62
- message_id: z.ZodString;
63
- blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
64
- type: z.ZodLiteral<"text">;
65
- text: z.ZodString;
66
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
67
- }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
68
- type: z.ZodLiteral<"image">;
69
- mime_type: z.ZodString;
70
- data: z.ZodString;
71
- byte_length: z.ZodNumber;
72
- }, z.core.$strict>, z.ZodObject<{
73
- type: z.ZodLiteral<"image">;
74
- mime_type: z.ZodString;
75
- byte_length: z.ZodNumber;
76
- omitted: z.ZodLiteral<true>;
77
- }, z.core.$strict>]>]>>;
78
- origin: z.ZodEnum<{
79
- unknown: "unknown";
80
- pwa: "pwa";
81
- extension: "extension";
82
- }>;
83
- sender_ref: z.ZodOptional<z.ZodString>;
84
- delivery: z.ZodEnum<{
85
- unknown: "unknown";
86
- normal: "normal";
87
- queued: "queued";
88
- }>;
89
- status: z.ZodLiteral<"committed">;
90
- group_id: z.ZodString;
91
- event_id: z.ZodString;
92
- event_seq: z.ZodOptional<z.ZodNumber>;
93
- session_id: z.ZodString;
94
- history_generation: z.ZodString;
95
- timestamp: z.ZodNumber;
96
- }, z.core.$strict>, z.ZodObject<{
97
- kind: z.ZodLiteral<"assistant">;
98
- blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
99
- type: z.ZodLiteral<"text">;
100
- text: z.ZodString;
101
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
102
- }, z.core.$strict>, z.ZodObject<{
103
- type: z.ZodLiteral<"thinking">;
104
- text: z.ZodString;
105
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
106
- }, z.core.$strict>]>>;
107
- status: z.ZodEnum<{
108
- complete: "complete";
109
- interrupted: "interrupted";
110
- }>;
111
- group_id: z.ZodString;
112
- event_id: z.ZodString;
113
- event_seq: z.ZodOptional<z.ZodNumber>;
114
- session_id: z.ZodString;
115
- history_generation: z.ZodString;
116
- timestamp: z.ZodNumber;
117
- }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
118
- kind: z.ZodLiteral<"tool">;
119
- tool_call_id: z.ZodString;
120
- tool: z.ZodString;
121
- args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
122
- truncated: z.ZodBoolean;
123
- status: z.ZodLiteral<"complete">;
124
- result: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
125
- error: z.ZodOptional<z.ZodNever>;
126
- group_id: z.ZodString;
127
- event_id: z.ZodString;
128
- event_seq: z.ZodOptional<z.ZodNumber>;
129
- session_id: z.ZodString;
130
- history_generation: z.ZodString;
131
- timestamp: z.ZodNumber;
132
- }, z.core.$strict>, z.ZodObject<{
133
- kind: z.ZodLiteral<"tool">;
134
- tool_call_id: z.ZodString;
135
- tool: z.ZodString;
136
- args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
137
- truncated: z.ZodBoolean;
138
- status: z.ZodLiteral<"error">;
139
- result: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
140
- error: z.ZodString;
141
- group_id: z.ZodString;
142
- event_id: z.ZodString;
143
- event_seq: z.ZodOptional<z.ZodNumber>;
144
- session_id: z.ZodString;
145
- history_generation: z.ZodString;
146
- timestamp: z.ZodNumber;
147
- }, z.core.$strict>, z.ZodObject<{
148
- kind: z.ZodLiteral<"tool">;
149
- tool_call_id: z.ZodString;
150
- tool: z.ZodString;
151
- args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
152
- truncated: z.ZodBoolean;
153
- status: z.ZodLiteral<"interrupted">;
154
- result: z.ZodOptional<z.ZodNever>;
155
- error: z.ZodOptional<z.ZodNever>;
156
- group_id: z.ZodString;
157
- event_id: z.ZodString;
158
- event_seq: z.ZodOptional<z.ZodNumber>;
159
- session_id: z.ZodString;
160
- history_generation: z.ZodString;
161
- timestamp: z.ZodNumber;
162
- }, z.core.$strict>]>, z.ZodObject<{
163
- kind: z.ZodEnum<{
164
- compaction: "compaction";
165
- custom: "custom";
166
- branch_summary: "branch_summary";
167
- }>;
168
- group_id: z.ZodOptional<z.ZodString>;
169
- payload: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
170
- truncated: z.ZodBoolean;
171
- event_id: z.ZodString;
172
- event_seq: z.ZodOptional<z.ZodNumber>;
173
- session_id: z.ZodString;
174
- history_generation: z.ZodString;
175
- timestamp: z.ZodNumber;
176
- }, z.core.$strict>, z.ZodObject<{
177
- kind: z.ZodLiteral<"provider_error">;
178
- message: z.ZodString;
179
- group_id: z.ZodString;
180
- event_id: z.ZodString;
181
- event_seq: z.ZodOptional<z.ZodNumber>;
182
- session_id: z.ZodString;
183
- history_generation: z.ZodString;
184
- timestamp: z.ZodNumber;
185
- }, z.core.$strict>]>;
186
- export type TimelineEvent = z.infer<typeof TimelineEventSchema>;
187
- export declare const TimelinePartialSchema: z.ZodUnion<readonly [z.ZodObject<{
188
- delta: z.ZodOptional<z.ZodString>;
189
- kind: z.ZodLiteral<"assistant">;
190
- blocks: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
191
- type: z.ZodLiteral<"text">;
192
- text: z.ZodString;
193
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
194
- }, z.core.$strict>, z.ZodObject<{
195
- type: z.ZodLiteral<"thinking">;
196
- text: z.ZodString;
197
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
198
- }, z.core.$strict>]>>>;
199
- protocol_version: z.ZodLiteral<2>;
200
- session_id: z.ZodString;
201
- history_generation: z.ZodString;
202
- group_id: z.ZodString;
203
- partial_id: z.ZodString;
204
- status: z.ZodEnum<{
205
- running: "running";
206
- delta: "delta";
207
- }>;
208
- type: z.ZodLiteral<"timeline_partial">;
209
- }, z.core.$strict>, z.ZodObject<{
210
- delta: z.ZodOptional<z.ZodString>;
211
- kind: z.ZodLiteral<"thinking">;
212
- blocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
213
- type: z.ZodLiteral<"thinking">;
214
- text: z.ZodString;
215
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
216
- }, z.core.$strict>>>;
217
- protocol_version: z.ZodLiteral<2>;
218
- session_id: z.ZodString;
219
- history_generation: z.ZodString;
220
- group_id: z.ZodString;
221
- partial_id: z.ZodString;
222
- status: z.ZodEnum<{
223
- running: "running";
224
- delta: "delta";
225
- }>;
226
- type: z.ZodLiteral<"timeline_partial">;
227
- }, z.core.$strict>, z.ZodObject<{
228
- delta: z.ZodOptional<z.ZodString>;
229
- kind: z.ZodLiteral<"tool">;
230
- tool_call_id: z.ZodString;
231
- tool: z.ZodString;
232
- args: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
233
- blocks: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
234
- type: z.ZodLiteral<"text">;
235
- text: z.ZodString;
236
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
237
- }, z.core.$strict>, z.ZodObject<{
238
- type: z.ZodLiteral<"thinking">;
239
- text: z.ZodString;
240
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
241
- }, z.core.$strict>]>>>;
242
- protocol_version: z.ZodLiteral<2>;
243
- session_id: z.ZodString;
244
- history_generation: z.ZodString;
245
- group_id: z.ZodString;
246
- partial_id: z.ZodString;
247
- status: z.ZodEnum<{
248
- running: "running";
249
- delta: "delta";
250
- }>;
251
- type: z.ZodLiteral<"timeline_partial">;
252
- }, z.core.$strict>]>;
253
- export type TimelinePartial = z.infer<typeof TimelinePartialSchema>;
254
- export declare const ClientFrameSchema: z.ZodUnion<readonly [z.ZodObject<{
255
- type: z.ZodLiteral<"pair_request">;
256
- id: z.ZodString;
257
- code: z.ZodString;
258
- device_name: z.ZodString;
259
- protocol_version: z.ZodLiteral<2>;
260
- }, z.core.$strict>, z.ZodObject<{
261
- type: z.ZodLiteral<"session_hello">;
262
- id: z.ZodString;
263
- channel_id: z.ZodString;
264
- protocol_version: z.ZodLiteral<2>;
265
- }, z.core.$strict>, z.ZodObject<{
266
- client_request_id: z.ZodString;
267
- text: z.ZodString;
268
- images: z.ZodOptional<z.ZodArray<z.ZodObject<{
269
- data: z.ZodString;
270
- mime: z.ZodString;
271
- }, z.core.$strict>>>;
272
- streaming_behavior: z.ZodOptional<z.ZodLiteral<"steer">>;
273
- channel_id: z.ZodString;
274
- history_generation: z.ZodString;
275
- type: z.ZodLiteral<"user_message">;
276
- id: z.ZodString;
277
- protocol_version: z.ZodLiteral<2>;
278
- }, z.core.$strict>, z.ZodObject<{
279
- client_request_id: z.ZodString;
280
- message_id: z.ZodString;
281
- status: z.ZodLiteral<"committed">;
282
- channel_id: z.ZodString;
283
- history_generation: z.ZodString;
284
- type: z.ZodLiteral<"user_message_observed">;
285
- id: z.ZodString;
286
- protocol_version: z.ZodLiteral<2>;
287
- }, z.core.$strict>, z.ZodObject<{
288
- before: z.ZodNullable<z.ZodNumber>;
289
- limit: z.ZodOptional<z.ZodNumber>;
290
- channel_id: z.ZodString;
291
- history_generation: z.ZodString;
292
- type: z.ZodLiteral<"session_sync">;
293
- id: z.ZodString;
294
- protocol_version: z.ZodLiteral<2>;
295
- }, z.core.$strict>, z.ZodObject<{
296
- channel_id: z.ZodString;
297
- history_generation: z.ZodString;
298
- type: z.ZodLiteral<"ping">;
299
- id: z.ZodString;
300
- protocol_version: z.ZodLiteral<2>;
301
- }, z.core.$strict>, z.ZodObject<{
302
- channel_id: z.ZodString;
303
- history_generation: z.ZodString;
304
- type: z.ZodLiteral<"cancel">;
305
- id: z.ZodString;
306
- protocol_version: z.ZodLiteral<2>;
307
- }, z.core.$strict>, z.ZodObject<{
308
- type: z.ZodLiteral<"session_new">;
309
- channel_id: z.ZodString;
310
- history_generation: z.ZodString;
311
- id: z.ZodString;
312
- protocol_version: z.ZodLiteral<2>;
313
- }, z.core.$strict>, z.ZodObject<{
314
- type: z.ZodLiteral<"session_compact">;
315
- channel_id: z.ZodString;
316
- history_generation: z.ZodString;
317
- id: z.ZodString;
318
- protocol_version: z.ZodLiteral<2>;
319
- }, z.core.$strict>, z.ZodObject<{
320
- type: z.ZodLiteral<"model_set">;
321
- provider: z.ZodString;
322
- model_id: z.ZodString;
323
- channel_id: z.ZodString;
324
- history_generation: z.ZodString;
325
- id: z.ZodString;
326
- protocol_version: z.ZodLiteral<2>;
327
- }, z.core.$strict>, z.ZodObject<{
328
- type: z.ZodLiteral<"thinking_set">;
329
- level: z.ZodEnum<{
330
- off: "off";
331
- minimal: "minimal";
332
- low: "low";
333
- medium: "medium";
334
- high: "high";
335
- xhigh: "xhigh";
336
- }>;
337
- channel_id: z.ZodString;
338
- history_generation: z.ZodString;
339
- id: z.ZodString;
340
- protocol_version: z.ZodLiteral<2>;
341
- }, z.core.$strict>, z.ZodObject<{
342
- type: z.ZodLiteral<"list_models">;
343
- channel_id: z.ZodString;
344
- history_generation: z.ZodString;
345
- id: z.ZodString;
346
- protocol_version: z.ZodLiteral<2>;
347
- }, z.core.$strict>, z.ZodObject<{
348
- text: z.ZodString;
349
- images: z.ZodOptional<z.ZodArray<z.ZodObject<{
350
- data: z.ZodString;
351
- mime: z.ZodString;
352
- }, z.core.$strict>>>;
353
- channel_id: z.ZodString;
354
- history_generation: z.ZodString;
355
- type: z.ZodLiteral<"queued_message_set">;
356
- id: z.ZodString;
357
- protocol_version: z.ZodLiteral<2>;
358
- }, z.core.$strict>, z.ZodObject<{
359
- target_id: z.ZodOptional<z.ZodString>;
360
- channel_id: z.ZodString;
361
- history_generation: z.ZodString;
362
- type: z.ZodLiteral<"queued_message_clear">;
363
- id: z.ZodString;
364
- protocol_version: z.ZodLiteral<2>;
365
- }, z.core.$strict>, z.ZodObject<{
366
- target_id: z.ZodString;
367
- channel_id: z.ZodString;
368
- history_generation: z.ZodString;
369
- type: z.ZodLiteral<"queued_message_steer">;
370
- id: z.ZodString;
371
- protocol_version: z.ZodLiteral<2>;
372
- }, z.core.$strict>, z.ZodObject<{
373
- tool_call_id: z.ZodString;
374
- decision: z.ZodEnum<{
375
- allow: "allow";
376
- deny: "deny";
377
- }>;
378
- channel_id: z.ZodString;
379
- history_generation: z.ZodString;
380
- type: z.ZodLiteral<"approve_tool">;
381
- id: z.ZodString;
382
- protocol_version: z.ZodLiteral<2>;
383
- }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
384
- value: z.ZodString;
385
- ask: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
386
- flow_id: z.ZodString;
387
- kind: z.ZodLiteral<"answer">;
388
- mode: z.ZodOptional<z.ZodEnum<{
389
- submit: "submit";
390
- elaborate: "elaborate";
391
- }>>;
392
- answers: z.ZodRecord<z.ZodString, z.ZodObject<{
393
- values: z.ZodOptional<z.ZodArray<z.ZodString>>;
394
- customText: z.ZodOptional<z.ZodString>;
395
- note: z.ZodOptional<z.ZodString>;
396
- optionNotes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
397
- }, z.core.$strict>>;
398
- }, z.core.$strict>, z.ZodObject<{
399
- flow_id: z.ZodString;
400
- kind: z.ZodLiteral<"cancel">;
401
- }, z.core.$strict>]>>;
402
- channel_id: z.ZodString;
403
- history_generation: z.ZodString;
404
- type: z.ZodLiteral<"extension_ui_response">;
405
- id: z.ZodString;
406
- protocol_version: z.ZodLiteral<2>;
407
- }, z.core.$strict>, z.ZodObject<{
408
- confirmed: z.ZodBoolean;
409
- ask: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
410
- flow_id: z.ZodString;
411
- kind: z.ZodLiteral<"answer">;
412
- mode: z.ZodOptional<z.ZodEnum<{
413
- submit: "submit";
414
- elaborate: "elaborate";
415
- }>>;
416
- answers: z.ZodRecord<z.ZodString, z.ZodObject<{
417
- values: z.ZodOptional<z.ZodArray<z.ZodString>>;
418
- customText: z.ZodOptional<z.ZodString>;
419
- note: z.ZodOptional<z.ZodString>;
420
- optionNotes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
421
- }, z.core.$strict>>;
422
- }, z.core.$strict>, z.ZodObject<{
423
- flow_id: z.ZodString;
424
- kind: z.ZodLiteral<"cancel">;
425
- }, z.core.$strict>]>>;
426
- channel_id: z.ZodString;
427
- history_generation: z.ZodString;
428
- type: z.ZodLiteral<"extension_ui_response">;
429
- id: z.ZodString;
430
- protocol_version: z.ZodLiteral<2>;
431
- }, z.core.$strict>, z.ZodObject<{
432
- cancelled: z.ZodLiteral<true>;
433
- ask: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
434
- flow_id: z.ZodString;
435
- kind: z.ZodLiteral<"answer">;
436
- mode: z.ZodOptional<z.ZodEnum<{
437
- submit: "submit";
438
- elaborate: "elaborate";
439
- }>>;
440
- answers: z.ZodRecord<z.ZodString, z.ZodObject<{
441
- values: z.ZodOptional<z.ZodArray<z.ZodString>>;
442
- customText: z.ZodOptional<z.ZodString>;
443
- note: z.ZodOptional<z.ZodString>;
444
- optionNotes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
445
- }, z.core.$strict>>;
446
- }, z.core.$strict>, z.ZodObject<{
447
- flow_id: z.ZodString;
448
- kind: z.ZodLiteral<"cancel">;
449
- }, z.core.$strict>]>>;
450
- channel_id: z.ZodString;
451
- history_generation: z.ZodString;
452
- type: z.ZodLiteral<"extension_ui_response">;
453
- id: z.ZodString;
454
- protocol_version: z.ZodLiteral<2>;
455
- }, z.core.$strict>, z.ZodObject<{
456
- ask: z.ZodUnion<readonly [z.ZodObject<{
457
- flow_id: z.ZodString;
458
- kind: z.ZodLiteral<"answer">;
459
- mode: z.ZodOptional<z.ZodEnum<{
460
- submit: "submit";
461
- elaborate: "elaborate";
462
- }>>;
463
- answers: z.ZodRecord<z.ZodString, z.ZodObject<{
464
- values: z.ZodOptional<z.ZodArray<z.ZodString>>;
465
- customText: z.ZodOptional<z.ZodString>;
466
- note: z.ZodOptional<z.ZodString>;
467
- optionNotes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
468
- }, z.core.$strict>>;
469
- }, z.core.$strict>, z.ZodObject<{
470
- flow_id: z.ZodString;
471
- kind: z.ZodLiteral<"cancel">;
472
- }, z.core.$strict>]>;
473
- channel_id: z.ZodString;
474
- history_generation: z.ZodString;
475
- type: z.ZodLiteral<"extension_ui_response">;
476
- id: z.ZodString;
477
- protocol_version: z.ZodLiteral<2>;
478
- }, z.core.$strict>]>]>;
479
- export type ClientFrame = z.infer<typeof ClientFrameSchema>;
480
- export declare const TimelineEventFragmentSchema: z.ZodObject<{
481
- event_id: z.ZodString;
482
- index: z.ZodNumber;
483
- data_base64: z.ZodString;
484
- final: z.ZodBoolean;
485
- session_id: z.ZodString;
486
- history_generation: z.ZodString;
487
- type: z.ZodLiteral<"timeline_event_fragment">;
488
- protocol_version: z.ZodLiteral<2>;
489
- }, z.core.$strict>;
490
- export declare const HistoryFragmentSchema: z.ZodObject<{
491
- event_id: z.ZodString;
492
- index: z.ZodNumber;
493
- data_base64: z.ZodString;
494
- final: z.ZodBoolean;
495
- }, z.core.$strict>;
496
- export declare const SessionHistoryChunkSchema: z.ZodUnion<readonly [z.ZodObject<{
497
- final_chunk: z.ZodLiteral<false>;
498
- next_before: z.ZodOptional<z.ZodNever>;
499
- eos: z.ZodOptional<z.ZodNever>;
500
- in_reply_to: z.ZodString;
501
- session_id: z.ZodString;
502
- history_generation: z.ZodString;
503
- snapshot_head: z.ZodString;
504
- chunk_index: z.ZodNumber;
505
- events: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
506
- kind: z.ZodLiteral<"user">;
507
- message_id: z.ZodString;
508
- blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
509
- type: z.ZodLiteral<"text">;
510
- text: z.ZodString;
511
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
512
- }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
513
- type: z.ZodLiteral<"image">;
514
- mime_type: z.ZodString;
515
- data: z.ZodString;
516
- byte_length: z.ZodNumber;
517
- }, z.core.$strict>, z.ZodObject<{
518
- type: z.ZodLiteral<"image">;
519
- mime_type: z.ZodString;
520
- byte_length: z.ZodNumber;
521
- omitted: z.ZodLiteral<true>;
522
- }, z.core.$strict>]>]>>;
523
- origin: z.ZodEnum<{
524
- unknown: "unknown";
525
- pwa: "pwa";
526
- extension: "extension";
527
- }>;
528
- sender_ref: z.ZodOptional<z.ZodString>;
529
- delivery: z.ZodEnum<{
530
- unknown: "unknown";
531
- normal: "normal";
532
- queued: "queued";
533
- }>;
534
- status: z.ZodLiteral<"committed">;
535
- group_id: z.ZodString;
536
- event_id: z.ZodString;
537
- event_seq: z.ZodOptional<z.ZodNumber>;
538
- session_id: z.ZodString;
539
- history_generation: z.ZodString;
540
- timestamp: z.ZodNumber;
541
- }, z.core.$strict>, z.ZodObject<{
542
- kind: z.ZodLiteral<"assistant">;
543
- blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
544
- type: z.ZodLiteral<"text">;
545
- text: z.ZodString;
546
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
547
- }, z.core.$strict>, z.ZodObject<{
548
- type: z.ZodLiteral<"thinking">;
549
- text: z.ZodString;
550
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
551
- }, z.core.$strict>]>>;
552
- status: z.ZodEnum<{
553
- complete: "complete";
554
- interrupted: "interrupted";
555
- }>;
556
- group_id: z.ZodString;
557
- event_id: z.ZodString;
558
- event_seq: z.ZodOptional<z.ZodNumber>;
559
- session_id: z.ZodString;
560
- history_generation: z.ZodString;
561
- timestamp: z.ZodNumber;
562
- }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
563
- kind: z.ZodLiteral<"tool">;
564
- tool_call_id: z.ZodString;
565
- tool: z.ZodString;
566
- args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
567
- truncated: z.ZodBoolean;
568
- status: z.ZodLiteral<"complete">;
569
- result: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
570
- error: z.ZodOptional<z.ZodNever>;
571
- group_id: z.ZodString;
572
- event_id: z.ZodString;
573
- event_seq: z.ZodOptional<z.ZodNumber>;
574
- session_id: z.ZodString;
575
- history_generation: z.ZodString;
576
- timestamp: z.ZodNumber;
577
- }, z.core.$strict>, z.ZodObject<{
578
- kind: z.ZodLiteral<"tool">;
579
- tool_call_id: z.ZodString;
580
- tool: z.ZodString;
581
- args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
582
- truncated: z.ZodBoolean;
583
- status: z.ZodLiteral<"error">;
584
- result: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
585
- error: z.ZodString;
586
- group_id: z.ZodString;
587
- event_id: z.ZodString;
588
- event_seq: z.ZodOptional<z.ZodNumber>;
589
- session_id: z.ZodString;
590
- history_generation: z.ZodString;
591
- timestamp: z.ZodNumber;
592
- }, z.core.$strict>, z.ZodObject<{
593
- kind: z.ZodLiteral<"tool">;
594
- tool_call_id: z.ZodString;
595
- tool: z.ZodString;
596
- args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
597
- truncated: z.ZodBoolean;
598
- status: z.ZodLiteral<"interrupted">;
599
- result: z.ZodOptional<z.ZodNever>;
600
- error: z.ZodOptional<z.ZodNever>;
601
- group_id: z.ZodString;
602
- event_id: z.ZodString;
603
- event_seq: z.ZodOptional<z.ZodNumber>;
604
- session_id: z.ZodString;
605
- history_generation: z.ZodString;
606
- timestamp: z.ZodNumber;
607
- }, z.core.$strict>]>, z.ZodObject<{
608
- kind: z.ZodEnum<{
609
- compaction: "compaction";
610
- custom: "custom";
611
- branch_summary: "branch_summary";
612
- }>;
613
- group_id: z.ZodOptional<z.ZodString>;
614
- payload: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
615
- truncated: z.ZodBoolean;
616
- event_id: z.ZodString;
617
- event_seq: z.ZodOptional<z.ZodNumber>;
618
- session_id: z.ZodString;
619
- history_generation: z.ZodString;
620
- timestamp: z.ZodNumber;
621
- }, z.core.$strict>, z.ZodObject<{
622
- kind: z.ZodLiteral<"provider_error">;
623
- message: z.ZodString;
624
- group_id: z.ZodString;
625
- event_id: z.ZodString;
626
- event_seq: z.ZodOptional<z.ZodNumber>;
627
- session_id: z.ZodString;
628
- history_generation: z.ZodString;
629
- timestamp: z.ZodNumber;
630
- }, z.core.$strict>]>>;
631
- fragments: z.ZodArray<z.ZodObject<{
632
- event_id: z.ZodString;
633
- index: z.ZodNumber;
634
- data_base64: z.ZodString;
635
- final: z.ZodBoolean;
636
- }, z.core.$strict>>;
637
- target_channel_id: z.ZodString;
638
- type: z.ZodLiteral<"session_history_chunk">;
639
- protocol_version: z.ZodLiteral<2>;
640
- }, z.core.$strict>, z.ZodObject<{
641
- final_chunk: z.ZodLiteral<true>;
642
- eos: z.ZodLiteral<true>;
643
- next_before: z.ZodOptional<z.ZodNever>;
644
- in_reply_to: z.ZodString;
645
- session_id: z.ZodString;
646
- history_generation: z.ZodString;
647
- snapshot_head: z.ZodString;
648
- chunk_index: z.ZodNumber;
649
- events: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
650
- kind: z.ZodLiteral<"user">;
651
- message_id: z.ZodString;
652
- blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
653
- type: z.ZodLiteral<"text">;
654
- text: z.ZodString;
655
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
656
- }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
657
- type: z.ZodLiteral<"image">;
658
- mime_type: z.ZodString;
659
- data: z.ZodString;
660
- byte_length: z.ZodNumber;
661
- }, z.core.$strict>, z.ZodObject<{
662
- type: z.ZodLiteral<"image">;
663
- mime_type: z.ZodString;
664
- byte_length: z.ZodNumber;
665
- omitted: z.ZodLiteral<true>;
666
- }, z.core.$strict>]>]>>;
667
- origin: z.ZodEnum<{
668
- unknown: "unknown";
669
- pwa: "pwa";
670
- extension: "extension";
671
- }>;
672
- sender_ref: z.ZodOptional<z.ZodString>;
673
- delivery: z.ZodEnum<{
674
- unknown: "unknown";
675
- normal: "normal";
676
- queued: "queued";
677
- }>;
678
- status: z.ZodLiteral<"committed">;
679
- group_id: z.ZodString;
680
- event_id: z.ZodString;
681
- event_seq: z.ZodOptional<z.ZodNumber>;
682
- session_id: z.ZodString;
683
- history_generation: z.ZodString;
684
- timestamp: z.ZodNumber;
685
- }, z.core.$strict>, z.ZodObject<{
686
- kind: z.ZodLiteral<"assistant">;
687
- blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
688
- type: z.ZodLiteral<"text">;
689
- text: z.ZodString;
690
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
691
- }, z.core.$strict>, z.ZodObject<{
692
- type: z.ZodLiteral<"thinking">;
693
- text: z.ZodString;
694
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
695
- }, z.core.$strict>]>>;
696
- status: z.ZodEnum<{
697
- complete: "complete";
698
- interrupted: "interrupted";
699
- }>;
700
- group_id: z.ZodString;
701
- event_id: z.ZodString;
702
- event_seq: z.ZodOptional<z.ZodNumber>;
703
- session_id: z.ZodString;
704
- history_generation: z.ZodString;
705
- timestamp: z.ZodNumber;
706
- }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
707
- kind: z.ZodLiteral<"tool">;
708
- tool_call_id: z.ZodString;
709
- tool: z.ZodString;
710
- args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
711
- truncated: z.ZodBoolean;
712
- status: z.ZodLiteral<"complete">;
713
- result: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
714
- error: z.ZodOptional<z.ZodNever>;
715
- group_id: z.ZodString;
716
- event_id: z.ZodString;
717
- event_seq: z.ZodOptional<z.ZodNumber>;
718
- session_id: z.ZodString;
719
- history_generation: z.ZodString;
720
- timestamp: z.ZodNumber;
721
- }, z.core.$strict>, z.ZodObject<{
722
- kind: z.ZodLiteral<"tool">;
723
- tool_call_id: z.ZodString;
724
- tool: z.ZodString;
725
- args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
726
- truncated: z.ZodBoolean;
727
- status: z.ZodLiteral<"error">;
728
- result: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
729
- error: z.ZodString;
730
- group_id: z.ZodString;
731
- event_id: z.ZodString;
732
- event_seq: z.ZodOptional<z.ZodNumber>;
733
- session_id: z.ZodString;
734
- history_generation: z.ZodString;
735
- timestamp: z.ZodNumber;
736
- }, z.core.$strict>, z.ZodObject<{
737
- kind: z.ZodLiteral<"tool">;
738
- tool_call_id: z.ZodString;
739
- tool: z.ZodString;
740
- args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
741
- truncated: z.ZodBoolean;
742
- status: z.ZodLiteral<"interrupted">;
743
- result: z.ZodOptional<z.ZodNever>;
744
- error: z.ZodOptional<z.ZodNever>;
745
- group_id: z.ZodString;
746
- event_id: z.ZodString;
747
- event_seq: z.ZodOptional<z.ZodNumber>;
748
- session_id: z.ZodString;
749
- history_generation: z.ZodString;
750
- timestamp: z.ZodNumber;
751
- }, z.core.$strict>]>, z.ZodObject<{
752
- kind: z.ZodEnum<{
753
- compaction: "compaction";
754
- custom: "custom";
755
- branch_summary: "branch_summary";
756
- }>;
757
- group_id: z.ZodOptional<z.ZodString>;
758
- payload: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
759
- truncated: z.ZodBoolean;
760
- event_id: z.ZodString;
761
- event_seq: z.ZodOptional<z.ZodNumber>;
762
- session_id: z.ZodString;
763
- history_generation: z.ZodString;
764
- timestamp: z.ZodNumber;
765
- }, z.core.$strict>, z.ZodObject<{
766
- kind: z.ZodLiteral<"provider_error">;
767
- message: z.ZodString;
768
- group_id: z.ZodString;
769
- event_id: z.ZodString;
770
- event_seq: z.ZodOptional<z.ZodNumber>;
771
- session_id: z.ZodString;
772
- history_generation: z.ZodString;
773
- timestamp: z.ZodNumber;
774
- }, z.core.$strict>]>>;
775
- fragments: z.ZodArray<z.ZodObject<{
776
- event_id: z.ZodString;
777
- index: z.ZodNumber;
778
- data_base64: z.ZodString;
779
- final: z.ZodBoolean;
780
- }, z.core.$strict>>;
781
- target_channel_id: z.ZodString;
782
- type: z.ZodLiteral<"session_history_chunk">;
783
- protocol_version: z.ZodLiteral<2>;
784
- }, z.core.$strict>, z.ZodObject<{
785
- final_chunk: z.ZodLiteral<true>;
786
- eos: z.ZodLiteral<false>;
787
- next_before: z.ZodNumber;
788
- in_reply_to: z.ZodString;
789
- session_id: z.ZodString;
790
- history_generation: z.ZodString;
791
- snapshot_head: z.ZodString;
792
- chunk_index: z.ZodNumber;
793
- events: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
794
- kind: z.ZodLiteral<"user">;
795
- message_id: z.ZodString;
796
- blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
797
- type: z.ZodLiteral<"text">;
798
- text: z.ZodString;
799
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
800
- }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
801
- type: z.ZodLiteral<"image">;
802
- mime_type: z.ZodString;
803
- data: z.ZodString;
804
- byte_length: z.ZodNumber;
805
- }, z.core.$strict>, z.ZodObject<{
806
- type: z.ZodLiteral<"image">;
807
- mime_type: z.ZodString;
808
- byte_length: z.ZodNumber;
809
- omitted: z.ZodLiteral<true>;
810
- }, z.core.$strict>]>]>>;
811
- origin: z.ZodEnum<{
812
- unknown: "unknown";
813
- pwa: "pwa";
814
- extension: "extension";
815
- }>;
816
- sender_ref: z.ZodOptional<z.ZodString>;
817
- delivery: z.ZodEnum<{
818
- unknown: "unknown";
819
- normal: "normal";
820
- queued: "queued";
821
- }>;
822
- status: z.ZodLiteral<"committed">;
823
- group_id: z.ZodString;
824
- event_id: z.ZodString;
825
- event_seq: z.ZodOptional<z.ZodNumber>;
826
- session_id: z.ZodString;
827
- history_generation: z.ZodString;
828
- timestamp: z.ZodNumber;
829
- }, z.core.$strict>, z.ZodObject<{
830
- kind: z.ZodLiteral<"assistant">;
831
- blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
832
- type: z.ZodLiteral<"text">;
833
- text: z.ZodString;
834
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
835
- }, z.core.$strict>, z.ZodObject<{
836
- type: z.ZodLiteral<"thinking">;
837
- text: z.ZodString;
838
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
839
- }, z.core.$strict>]>>;
840
- status: z.ZodEnum<{
841
- complete: "complete";
842
- interrupted: "interrupted";
843
- }>;
844
- group_id: z.ZodString;
845
- event_id: z.ZodString;
846
- event_seq: z.ZodOptional<z.ZodNumber>;
847
- session_id: z.ZodString;
848
- history_generation: z.ZodString;
849
- timestamp: z.ZodNumber;
850
- }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
851
- kind: z.ZodLiteral<"tool">;
852
- tool_call_id: z.ZodString;
853
- tool: z.ZodString;
854
- args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
855
- truncated: z.ZodBoolean;
856
- status: z.ZodLiteral<"complete">;
857
- result: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
858
- error: z.ZodOptional<z.ZodNever>;
859
- group_id: z.ZodString;
860
- event_id: z.ZodString;
861
- event_seq: z.ZodOptional<z.ZodNumber>;
862
- session_id: z.ZodString;
863
- history_generation: z.ZodString;
864
- timestamp: z.ZodNumber;
865
- }, z.core.$strict>, z.ZodObject<{
866
- kind: z.ZodLiteral<"tool">;
867
- tool_call_id: z.ZodString;
868
- tool: z.ZodString;
869
- args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
870
- truncated: z.ZodBoolean;
871
- status: z.ZodLiteral<"error">;
872
- result: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
873
- error: z.ZodString;
874
- group_id: z.ZodString;
875
- event_id: z.ZodString;
876
- event_seq: z.ZodOptional<z.ZodNumber>;
877
- session_id: z.ZodString;
878
- history_generation: z.ZodString;
879
- timestamp: z.ZodNumber;
880
- }, z.core.$strict>, z.ZodObject<{
881
- kind: z.ZodLiteral<"tool">;
882
- tool_call_id: z.ZodString;
883
- tool: z.ZodString;
884
- args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
885
- truncated: z.ZodBoolean;
886
- status: z.ZodLiteral<"interrupted">;
887
- result: z.ZodOptional<z.ZodNever>;
888
- error: z.ZodOptional<z.ZodNever>;
889
- group_id: z.ZodString;
890
- event_id: z.ZodString;
891
- event_seq: z.ZodOptional<z.ZodNumber>;
892
- session_id: z.ZodString;
893
- history_generation: z.ZodString;
894
- timestamp: z.ZodNumber;
895
- }, z.core.$strict>]>, z.ZodObject<{
896
- kind: z.ZodEnum<{
897
- compaction: "compaction";
898
- custom: "custom";
899
- branch_summary: "branch_summary";
900
- }>;
901
- group_id: z.ZodOptional<z.ZodString>;
902
- payload: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
903
- truncated: z.ZodBoolean;
904
- event_id: z.ZodString;
905
- event_seq: z.ZodOptional<z.ZodNumber>;
906
- session_id: z.ZodString;
907
- history_generation: z.ZodString;
908
- timestamp: z.ZodNumber;
909
- }, z.core.$strict>, z.ZodObject<{
910
- kind: z.ZodLiteral<"provider_error">;
911
- message: z.ZodString;
912
- group_id: z.ZodString;
913
- event_id: z.ZodString;
914
- event_seq: z.ZodOptional<z.ZodNumber>;
915
- session_id: z.ZodString;
916
- history_generation: z.ZodString;
917
- timestamp: z.ZodNumber;
918
- }, z.core.$strict>]>>;
919
- fragments: z.ZodArray<z.ZodObject<{
920
- event_id: z.ZodString;
921
- index: z.ZodNumber;
922
- data_base64: z.ZodString;
923
- final: z.ZodBoolean;
924
- }, z.core.$strict>>;
925
- target_channel_id: z.ZodString;
926
- type: z.ZodLiteral<"session_history_chunk">;
927
- protocol_version: z.ZodLiteral<2>;
928
- }, z.core.$strict>]>;
929
- export declare const ServerFrameSchema: z.ZodUnion<readonly [z.ZodObject<{
930
- type: z.ZodLiteral<"pair_ok">;
931
- in_reply_to: z.ZodString;
932
- session_name: z.ZodString;
933
- session_started_at: z.ZodNumber;
934
- endpoint_id: z.ZodString;
935
- harness: z.ZodOptional<z.ZodObject<{
936
- name: z.ZodString;
937
- version: z.ZodString;
938
- }, z.core.$strict>>;
939
- hostname: z.ZodOptional<z.ZodString>;
940
- protocol_version: z.ZodLiteral<2>;
941
- }, z.core.$strict>, z.ZodObject<{
942
- type: z.ZodLiteral<"pair_error">;
943
- in_reply_to: z.ZodString;
944
- code: z.ZodEnum<{
945
- token_expired: "token_expired";
946
- token_consumed: "token_consumed";
947
- token_unknown: "token_unknown";
948
- internal_error: "internal_error";
949
- }>;
950
- message: z.ZodString;
951
- protocol_version: z.ZodLiteral<2>;
952
- }, z.core.$strict>, z.ZodObject<{
953
- session_id: z.ZodString;
954
- history_generation: z.ZodString;
955
- self_sender_ref: z.ZodString;
956
- head_seq: z.ZodNumber;
957
- target_channel_id: z.ZodString;
958
- type: z.ZodLiteral<"session_ready">;
959
- in_reply_to: z.ZodString;
960
- protocol_version: z.ZodLiteral<2>;
961
- }, z.core.$strict>, z.ZodObject<{
962
- in_reply_to: z.ZodString;
963
- session_id: z.ZodString;
964
- history_generation: z.ZodString;
965
- message: z.ZodObject<{
966
- id: z.ZodString;
967
- group_id: z.ZodString;
968
- blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
969
- type: z.ZodLiteral<"text">;
970
- text: z.ZodString;
971
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
972
- }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
973
- type: z.ZodLiteral<"image">;
974
- mime_type: z.ZodString;
975
- data: z.ZodString;
976
- byte_length: z.ZodNumber;
977
- }, z.core.$strict>, z.ZodObject<{
978
- type: z.ZodLiteral<"image">;
979
- mime_type: z.ZodString;
980
- byte_length: z.ZodNumber;
981
- omitted: z.ZodLiteral<true>;
982
- }, z.core.$strict>]>]>>;
983
- origin: z.ZodEnum<{
984
- unknown: "unknown";
985
- pwa: "pwa";
986
- extension: "extension";
987
- }>;
988
- sender_ref: z.ZodOptional<z.ZodString>;
989
- delivery: z.ZodEnum<{
990
- unknown: "unknown";
991
- normal: "normal";
992
- queued: "queued";
993
- }>;
994
- }, z.core.$strict>;
995
- target_channel_id: z.ZodString;
996
- type: z.ZodLiteral<"user_message_started">;
997
- protocol_version: z.ZodLiteral<2>;
998
- }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
999
- in_reply_to: z.ZodString;
1000
- session_id: z.ZodString;
1001
- history_generation: z.ZodString;
1002
- client_request_id: z.ZodString;
1003
- status: z.ZodLiteral<"received">;
1004
- target_channel_id: z.ZodString;
1005
- type: z.ZodLiteral<"user_message_status">;
1006
- protocol_version: z.ZodLiteral<2>;
1007
- }, z.core.$strict>, z.ZodObject<{
1008
- in_reply_to: z.ZodString;
1009
- session_id: z.ZodString;
1010
- history_generation: z.ZodString;
1011
- client_request_id: z.ZodString;
1012
- status: z.ZodLiteral<"accepted">;
1013
- message_id: z.ZodOptional<z.ZodString>;
1014
- group_id: z.ZodOptional<z.ZodString>;
1015
- target_channel_id: z.ZodString;
1016
- type: z.ZodLiteral<"user_message_status">;
1017
- protocol_version: z.ZodLiteral<2>;
1018
- }, z.core.$strict>, z.ZodObject<{
1019
- in_reply_to: z.ZodString;
1020
- session_id: z.ZodString;
1021
- history_generation: z.ZodString;
1022
- client_request_id: z.ZodString;
1023
- status: z.ZodLiteral<"committed">;
1024
- message_id: z.ZodString;
1025
- group_id: z.ZodOptional<z.ZodString>;
1026
- target_channel_id: z.ZodString;
1027
- type: z.ZodLiteral<"user_message_status">;
1028
- protocol_version: z.ZodLiteral<2>;
1029
- }, z.core.$strict>, z.ZodObject<{
1030
- in_reply_to: z.ZodString;
1031
- session_id: z.ZodString;
1032
- history_generation: z.ZodString;
1033
- client_request_id: z.ZodString;
1034
- status: z.ZodLiteral<"unknown_delivery">;
1035
- target_channel_id: z.ZodString;
1036
- type: z.ZodLiteral<"user_message_status">;
1037
- protocol_version: z.ZodLiteral<2>;
1038
- }, z.core.$strict>]>, z.ZodObject<{
1039
- event: z.ZodUnion<readonly [z.ZodObject<{
1040
- kind: z.ZodLiteral<"user">;
1041
- message_id: z.ZodString;
1042
- blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1043
- type: z.ZodLiteral<"text">;
1044
- text: z.ZodString;
1045
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
1046
- }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
1047
- type: z.ZodLiteral<"image">;
1048
- mime_type: z.ZodString;
1049
- data: z.ZodString;
1050
- byte_length: z.ZodNumber;
1051
- }, z.core.$strict>, z.ZodObject<{
1052
- type: z.ZodLiteral<"image">;
1053
- mime_type: z.ZodString;
1054
- byte_length: z.ZodNumber;
1055
- omitted: z.ZodLiteral<true>;
1056
- }, z.core.$strict>]>]>>;
1057
- origin: z.ZodEnum<{
1058
- unknown: "unknown";
1059
- pwa: "pwa";
1060
- extension: "extension";
1061
- }>;
1062
- sender_ref: z.ZodOptional<z.ZodString>;
1063
- delivery: z.ZodEnum<{
1064
- unknown: "unknown";
1065
- normal: "normal";
1066
- queued: "queued";
1067
- }>;
1068
- status: z.ZodLiteral<"committed">;
1069
- group_id: z.ZodString;
1070
- event_id: z.ZodString;
1071
- event_seq: z.ZodOptional<z.ZodNumber>;
1072
- session_id: z.ZodString;
1073
- history_generation: z.ZodString;
1074
- timestamp: z.ZodNumber;
1075
- }, z.core.$strict>, z.ZodObject<{
1076
- kind: z.ZodLiteral<"assistant">;
1077
- blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1078
- type: z.ZodLiteral<"text">;
1079
- text: z.ZodString;
1080
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
1081
- }, z.core.$strict>, z.ZodObject<{
1082
- type: z.ZodLiteral<"thinking">;
1083
- text: z.ZodString;
1084
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
1085
- }, z.core.$strict>]>>;
1086
- status: z.ZodEnum<{
1087
- complete: "complete";
1088
- interrupted: "interrupted";
1089
- }>;
1090
- group_id: z.ZodString;
1091
- event_id: z.ZodString;
1092
- event_seq: z.ZodOptional<z.ZodNumber>;
1093
- session_id: z.ZodString;
1094
- history_generation: z.ZodString;
1095
- timestamp: z.ZodNumber;
1096
- }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
1097
- kind: z.ZodLiteral<"tool">;
1098
- tool_call_id: z.ZodString;
1099
- tool: z.ZodString;
1100
- args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
1101
- truncated: z.ZodBoolean;
1102
- status: z.ZodLiteral<"complete">;
1103
- result: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
1104
- error: z.ZodOptional<z.ZodNever>;
1105
- group_id: z.ZodString;
1106
- event_id: z.ZodString;
1107
- event_seq: z.ZodOptional<z.ZodNumber>;
1108
- session_id: z.ZodString;
1109
- history_generation: z.ZodString;
1110
- timestamp: z.ZodNumber;
1111
- }, z.core.$strict>, z.ZodObject<{
1112
- kind: z.ZodLiteral<"tool">;
1113
- tool_call_id: z.ZodString;
1114
- tool: z.ZodString;
1115
- args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
1116
- truncated: z.ZodBoolean;
1117
- status: z.ZodLiteral<"error">;
1118
- result: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
1119
- error: z.ZodString;
1120
- group_id: z.ZodString;
1121
- event_id: z.ZodString;
1122
- event_seq: z.ZodOptional<z.ZodNumber>;
1123
- session_id: z.ZodString;
1124
- history_generation: z.ZodString;
1125
- timestamp: z.ZodNumber;
1126
- }, z.core.$strict>, z.ZodObject<{
1127
- kind: z.ZodLiteral<"tool">;
1128
- tool_call_id: z.ZodString;
1129
- tool: z.ZodString;
1130
- args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
1131
- truncated: z.ZodBoolean;
1132
- status: z.ZodLiteral<"interrupted">;
1133
- result: z.ZodOptional<z.ZodNever>;
1134
- error: z.ZodOptional<z.ZodNever>;
1135
- group_id: z.ZodString;
1136
- event_id: z.ZodString;
1137
- event_seq: z.ZodOptional<z.ZodNumber>;
1138
- session_id: z.ZodString;
1139
- history_generation: z.ZodString;
1140
- timestamp: z.ZodNumber;
1141
- }, z.core.$strict>]>, z.ZodObject<{
1142
- kind: z.ZodEnum<{
1143
- compaction: "compaction";
1144
- custom: "custom";
1145
- branch_summary: "branch_summary";
1146
- }>;
1147
- group_id: z.ZodOptional<z.ZodString>;
1148
- payload: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
1149
- truncated: z.ZodBoolean;
1150
- event_id: z.ZodString;
1151
- event_seq: z.ZodOptional<z.ZodNumber>;
1152
- session_id: z.ZodString;
1153
- history_generation: z.ZodString;
1154
- timestamp: z.ZodNumber;
1155
- }, z.core.$strict>, z.ZodObject<{
1156
- kind: z.ZodLiteral<"provider_error">;
1157
- message: z.ZodString;
1158
- group_id: z.ZodString;
1159
- event_id: z.ZodString;
1160
- event_seq: z.ZodOptional<z.ZodNumber>;
1161
- session_id: z.ZodString;
1162
- history_generation: z.ZodString;
1163
- timestamp: z.ZodNumber;
1164
- }, z.core.$strict>]>;
1165
- session_id: z.ZodString;
1166
- history_generation: z.ZodString;
1167
- type: z.ZodLiteral<"timeline_event">;
1168
- protocol_version: z.ZodLiteral<2>;
1169
- }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
1170
- delta: z.ZodOptional<z.ZodString>;
1171
- kind: z.ZodLiteral<"assistant">;
1172
- blocks: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1173
- type: z.ZodLiteral<"text">;
1174
- text: z.ZodString;
1175
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
1176
- }, z.core.$strict>, z.ZodObject<{
1177
- type: z.ZodLiteral<"thinking">;
1178
- text: z.ZodString;
1179
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
1180
- }, z.core.$strict>]>>>;
1181
- protocol_version: z.ZodLiteral<2>;
1182
- session_id: z.ZodString;
1183
- history_generation: z.ZodString;
1184
- group_id: z.ZodString;
1185
- partial_id: z.ZodString;
1186
- status: z.ZodEnum<{
1187
- running: "running";
1188
- delta: "delta";
1189
- }>;
1190
- type: z.ZodLiteral<"timeline_partial">;
1191
- }, z.core.$strict>, z.ZodObject<{
1192
- delta: z.ZodOptional<z.ZodString>;
1193
- kind: z.ZodLiteral<"thinking">;
1194
- blocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
1195
- type: z.ZodLiteral<"thinking">;
1196
- text: z.ZodString;
1197
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
1198
- }, z.core.$strict>>>;
1199
- protocol_version: z.ZodLiteral<2>;
1200
- session_id: z.ZodString;
1201
- history_generation: z.ZodString;
1202
- group_id: z.ZodString;
1203
- partial_id: z.ZodString;
1204
- status: z.ZodEnum<{
1205
- running: "running";
1206
- delta: "delta";
1207
- }>;
1208
- type: z.ZodLiteral<"timeline_partial">;
1209
- }, z.core.$strict>, z.ZodObject<{
1210
- delta: z.ZodOptional<z.ZodString>;
1211
- kind: z.ZodLiteral<"tool">;
1212
- tool_call_id: z.ZodString;
1213
- tool: z.ZodString;
1214
- args: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
1215
- blocks: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1216
- type: z.ZodLiteral<"text">;
1217
- text: z.ZodString;
1218
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
1219
- }, z.core.$strict>, z.ZodObject<{
1220
- type: z.ZodLiteral<"thinking">;
1221
- text: z.ZodString;
1222
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
1223
- }, z.core.$strict>]>>>;
1224
- protocol_version: z.ZodLiteral<2>;
1225
- session_id: z.ZodString;
1226
- history_generation: z.ZodString;
1227
- group_id: z.ZodString;
1228
- partial_id: z.ZodString;
1229
- status: z.ZodEnum<{
1230
- running: "running";
1231
- delta: "delta";
1232
- }>;
1233
- type: z.ZodLiteral<"timeline_partial">;
1234
- }, z.core.$strict>]>, z.ZodObject<{
1235
- event_id: z.ZodString;
1236
- index: z.ZodNumber;
1237
- data_base64: z.ZodString;
1238
- final: z.ZodBoolean;
1239
- session_id: z.ZodString;
1240
- history_generation: z.ZodString;
1241
- type: z.ZodLiteral<"timeline_event_fragment">;
1242
- protocol_version: z.ZodLiteral<2>;
1243
- }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
1244
- final_chunk: z.ZodLiteral<false>;
1245
- next_before: z.ZodOptional<z.ZodNever>;
1246
- eos: z.ZodOptional<z.ZodNever>;
1247
- in_reply_to: z.ZodString;
1248
- session_id: z.ZodString;
1249
- history_generation: z.ZodString;
1250
- snapshot_head: z.ZodString;
1251
- chunk_index: z.ZodNumber;
1252
- events: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1253
- kind: z.ZodLiteral<"user">;
1254
- message_id: z.ZodString;
1255
- blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1256
- type: z.ZodLiteral<"text">;
1257
- text: z.ZodString;
1258
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
1259
- }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
1260
- type: z.ZodLiteral<"image">;
1261
- mime_type: z.ZodString;
1262
- data: z.ZodString;
1263
- byte_length: z.ZodNumber;
1264
- }, z.core.$strict>, z.ZodObject<{
1265
- type: z.ZodLiteral<"image">;
1266
- mime_type: z.ZodString;
1267
- byte_length: z.ZodNumber;
1268
- omitted: z.ZodLiteral<true>;
1269
- }, z.core.$strict>]>]>>;
1270
- origin: z.ZodEnum<{
1271
- unknown: "unknown";
1272
- pwa: "pwa";
1273
- extension: "extension";
1274
- }>;
1275
- sender_ref: z.ZodOptional<z.ZodString>;
1276
- delivery: z.ZodEnum<{
1277
- unknown: "unknown";
1278
- normal: "normal";
1279
- queued: "queued";
1280
- }>;
1281
- status: z.ZodLiteral<"committed">;
1282
- group_id: z.ZodString;
1283
- event_id: z.ZodString;
1284
- event_seq: z.ZodOptional<z.ZodNumber>;
1285
- session_id: z.ZodString;
1286
- history_generation: z.ZodString;
1287
- timestamp: z.ZodNumber;
1288
- }, z.core.$strict>, z.ZodObject<{
1289
- kind: z.ZodLiteral<"assistant">;
1290
- blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1291
- type: z.ZodLiteral<"text">;
1292
- text: z.ZodString;
1293
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
1294
- }, z.core.$strict>, z.ZodObject<{
1295
- type: z.ZodLiteral<"thinking">;
1296
- text: z.ZodString;
1297
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
1298
- }, z.core.$strict>]>>;
1299
- status: z.ZodEnum<{
1300
- complete: "complete";
1301
- interrupted: "interrupted";
1302
- }>;
1303
- group_id: z.ZodString;
1304
- event_id: z.ZodString;
1305
- event_seq: z.ZodOptional<z.ZodNumber>;
1306
- session_id: z.ZodString;
1307
- history_generation: z.ZodString;
1308
- timestamp: z.ZodNumber;
1309
- }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
1310
- kind: z.ZodLiteral<"tool">;
1311
- tool_call_id: z.ZodString;
1312
- tool: z.ZodString;
1313
- args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
1314
- truncated: z.ZodBoolean;
1315
- status: z.ZodLiteral<"complete">;
1316
- result: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
1317
- error: z.ZodOptional<z.ZodNever>;
1318
- group_id: z.ZodString;
1319
- event_id: z.ZodString;
1320
- event_seq: z.ZodOptional<z.ZodNumber>;
1321
- session_id: z.ZodString;
1322
- history_generation: z.ZodString;
1323
- timestamp: z.ZodNumber;
1324
- }, z.core.$strict>, z.ZodObject<{
1325
- kind: z.ZodLiteral<"tool">;
1326
- tool_call_id: z.ZodString;
1327
- tool: z.ZodString;
1328
- args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
1329
- truncated: z.ZodBoolean;
1330
- status: z.ZodLiteral<"error">;
1331
- result: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
1332
- error: z.ZodString;
1333
- group_id: z.ZodString;
1334
- event_id: z.ZodString;
1335
- event_seq: z.ZodOptional<z.ZodNumber>;
1336
- session_id: z.ZodString;
1337
- history_generation: z.ZodString;
1338
- timestamp: z.ZodNumber;
1339
- }, z.core.$strict>, z.ZodObject<{
1340
- kind: z.ZodLiteral<"tool">;
1341
- tool_call_id: z.ZodString;
1342
- tool: z.ZodString;
1343
- args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
1344
- truncated: z.ZodBoolean;
1345
- status: z.ZodLiteral<"interrupted">;
1346
- result: z.ZodOptional<z.ZodNever>;
1347
- error: z.ZodOptional<z.ZodNever>;
1348
- group_id: z.ZodString;
1349
- event_id: z.ZodString;
1350
- event_seq: z.ZodOptional<z.ZodNumber>;
1351
- session_id: z.ZodString;
1352
- history_generation: z.ZodString;
1353
- timestamp: z.ZodNumber;
1354
- }, z.core.$strict>]>, z.ZodObject<{
1355
- kind: z.ZodEnum<{
1356
- compaction: "compaction";
1357
- custom: "custom";
1358
- branch_summary: "branch_summary";
1359
- }>;
1360
- group_id: z.ZodOptional<z.ZodString>;
1361
- payload: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
1362
- truncated: z.ZodBoolean;
1363
- event_id: z.ZodString;
1364
- event_seq: z.ZodOptional<z.ZodNumber>;
1365
- session_id: z.ZodString;
1366
- history_generation: z.ZodString;
1367
- timestamp: z.ZodNumber;
1368
- }, z.core.$strict>, z.ZodObject<{
1369
- kind: z.ZodLiteral<"provider_error">;
1370
- message: z.ZodString;
1371
- group_id: z.ZodString;
1372
- event_id: z.ZodString;
1373
- event_seq: z.ZodOptional<z.ZodNumber>;
1374
- session_id: z.ZodString;
1375
- history_generation: z.ZodString;
1376
- timestamp: z.ZodNumber;
1377
- }, z.core.$strict>]>>;
1378
- fragments: z.ZodArray<z.ZodObject<{
1379
- event_id: z.ZodString;
1380
- index: z.ZodNumber;
1381
- data_base64: z.ZodString;
1382
- final: z.ZodBoolean;
1383
- }, z.core.$strict>>;
1384
- target_channel_id: z.ZodString;
1385
- type: z.ZodLiteral<"session_history_chunk">;
1386
- protocol_version: z.ZodLiteral<2>;
1387
- }, z.core.$strict>, z.ZodObject<{
1388
- final_chunk: z.ZodLiteral<true>;
1389
- eos: z.ZodLiteral<true>;
1390
- next_before: z.ZodOptional<z.ZodNever>;
1391
- in_reply_to: z.ZodString;
1392
- session_id: z.ZodString;
1393
- history_generation: z.ZodString;
1394
- snapshot_head: z.ZodString;
1395
- chunk_index: z.ZodNumber;
1396
- events: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1397
- kind: z.ZodLiteral<"user">;
1398
- message_id: z.ZodString;
1399
- blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1400
- type: z.ZodLiteral<"text">;
1401
- text: z.ZodString;
1402
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
1403
- }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
1404
- type: z.ZodLiteral<"image">;
1405
- mime_type: z.ZodString;
1406
- data: z.ZodString;
1407
- byte_length: z.ZodNumber;
1408
- }, z.core.$strict>, z.ZodObject<{
1409
- type: z.ZodLiteral<"image">;
1410
- mime_type: z.ZodString;
1411
- byte_length: z.ZodNumber;
1412
- omitted: z.ZodLiteral<true>;
1413
- }, z.core.$strict>]>]>>;
1414
- origin: z.ZodEnum<{
1415
- unknown: "unknown";
1416
- pwa: "pwa";
1417
- extension: "extension";
1418
- }>;
1419
- sender_ref: z.ZodOptional<z.ZodString>;
1420
- delivery: z.ZodEnum<{
1421
- unknown: "unknown";
1422
- normal: "normal";
1423
- queued: "queued";
1424
- }>;
1425
- status: z.ZodLiteral<"committed">;
1426
- group_id: z.ZodString;
1427
- event_id: z.ZodString;
1428
- event_seq: z.ZodOptional<z.ZodNumber>;
1429
- session_id: z.ZodString;
1430
- history_generation: z.ZodString;
1431
- timestamp: z.ZodNumber;
1432
- }, z.core.$strict>, z.ZodObject<{
1433
- kind: z.ZodLiteral<"assistant">;
1434
- blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1435
- type: z.ZodLiteral<"text">;
1436
- text: z.ZodString;
1437
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
1438
- }, z.core.$strict>, z.ZodObject<{
1439
- type: z.ZodLiteral<"thinking">;
1440
- text: z.ZodString;
1441
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
1442
- }, z.core.$strict>]>>;
1443
- status: z.ZodEnum<{
1444
- complete: "complete";
1445
- interrupted: "interrupted";
1446
- }>;
1447
- group_id: z.ZodString;
1448
- event_id: z.ZodString;
1449
- event_seq: z.ZodOptional<z.ZodNumber>;
1450
- session_id: z.ZodString;
1451
- history_generation: z.ZodString;
1452
- timestamp: z.ZodNumber;
1453
- }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
1454
- kind: z.ZodLiteral<"tool">;
1455
- tool_call_id: z.ZodString;
1456
- tool: z.ZodString;
1457
- args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
1458
- truncated: z.ZodBoolean;
1459
- status: z.ZodLiteral<"complete">;
1460
- result: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
1461
- error: z.ZodOptional<z.ZodNever>;
1462
- group_id: z.ZodString;
1463
- event_id: z.ZodString;
1464
- event_seq: z.ZodOptional<z.ZodNumber>;
1465
- session_id: z.ZodString;
1466
- history_generation: z.ZodString;
1467
- timestamp: z.ZodNumber;
1468
- }, z.core.$strict>, z.ZodObject<{
1469
- kind: z.ZodLiteral<"tool">;
1470
- tool_call_id: z.ZodString;
1471
- tool: z.ZodString;
1472
- args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
1473
- truncated: z.ZodBoolean;
1474
- status: z.ZodLiteral<"error">;
1475
- result: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
1476
- error: z.ZodString;
1477
- group_id: z.ZodString;
1478
- event_id: z.ZodString;
1479
- event_seq: z.ZodOptional<z.ZodNumber>;
1480
- session_id: z.ZodString;
1481
- history_generation: z.ZodString;
1482
- timestamp: z.ZodNumber;
1483
- }, z.core.$strict>, z.ZodObject<{
1484
- kind: z.ZodLiteral<"tool">;
1485
- tool_call_id: z.ZodString;
1486
- tool: z.ZodString;
1487
- args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
1488
- truncated: z.ZodBoolean;
1489
- status: z.ZodLiteral<"interrupted">;
1490
- result: z.ZodOptional<z.ZodNever>;
1491
- error: z.ZodOptional<z.ZodNever>;
1492
- group_id: z.ZodString;
1493
- event_id: z.ZodString;
1494
- event_seq: z.ZodOptional<z.ZodNumber>;
1495
- session_id: z.ZodString;
1496
- history_generation: z.ZodString;
1497
- timestamp: z.ZodNumber;
1498
- }, z.core.$strict>]>, z.ZodObject<{
1499
- kind: z.ZodEnum<{
1500
- compaction: "compaction";
1501
- custom: "custom";
1502
- branch_summary: "branch_summary";
1503
- }>;
1504
- group_id: z.ZodOptional<z.ZodString>;
1505
- payload: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
1506
- truncated: z.ZodBoolean;
1507
- event_id: z.ZodString;
1508
- event_seq: z.ZodOptional<z.ZodNumber>;
1509
- session_id: z.ZodString;
1510
- history_generation: z.ZodString;
1511
- timestamp: z.ZodNumber;
1512
- }, z.core.$strict>, z.ZodObject<{
1513
- kind: z.ZodLiteral<"provider_error">;
1514
- message: z.ZodString;
1515
- group_id: z.ZodString;
1516
- event_id: z.ZodString;
1517
- event_seq: z.ZodOptional<z.ZodNumber>;
1518
- session_id: z.ZodString;
1519
- history_generation: z.ZodString;
1520
- timestamp: z.ZodNumber;
1521
- }, z.core.$strict>]>>;
1522
- fragments: z.ZodArray<z.ZodObject<{
1523
- event_id: z.ZodString;
1524
- index: z.ZodNumber;
1525
- data_base64: z.ZodString;
1526
- final: z.ZodBoolean;
1527
- }, z.core.$strict>>;
1528
- target_channel_id: z.ZodString;
1529
- type: z.ZodLiteral<"session_history_chunk">;
1530
- protocol_version: z.ZodLiteral<2>;
1531
- }, z.core.$strict>, z.ZodObject<{
1532
- final_chunk: z.ZodLiteral<true>;
1533
- eos: z.ZodLiteral<false>;
1534
- next_before: z.ZodNumber;
1535
- in_reply_to: z.ZodString;
1536
- session_id: z.ZodString;
1537
- history_generation: z.ZodString;
1538
- snapshot_head: z.ZodString;
1539
- chunk_index: z.ZodNumber;
1540
- events: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1541
- kind: z.ZodLiteral<"user">;
1542
- message_id: z.ZodString;
1543
- blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1544
- type: z.ZodLiteral<"text">;
1545
- text: z.ZodString;
1546
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
1547
- }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
1548
- type: z.ZodLiteral<"image">;
1549
- mime_type: z.ZodString;
1550
- data: z.ZodString;
1551
- byte_length: z.ZodNumber;
1552
- }, z.core.$strict>, z.ZodObject<{
1553
- type: z.ZodLiteral<"image">;
1554
- mime_type: z.ZodString;
1555
- byte_length: z.ZodNumber;
1556
- omitted: z.ZodLiteral<true>;
1557
- }, z.core.$strict>]>]>>;
1558
- origin: z.ZodEnum<{
1559
- unknown: "unknown";
1560
- pwa: "pwa";
1561
- extension: "extension";
1562
- }>;
1563
- sender_ref: z.ZodOptional<z.ZodString>;
1564
- delivery: z.ZodEnum<{
1565
- unknown: "unknown";
1566
- normal: "normal";
1567
- queued: "queued";
1568
- }>;
1569
- status: z.ZodLiteral<"committed">;
1570
- group_id: z.ZodString;
1571
- event_id: z.ZodString;
1572
- event_seq: z.ZodOptional<z.ZodNumber>;
1573
- session_id: z.ZodString;
1574
- history_generation: z.ZodString;
1575
- timestamp: z.ZodNumber;
1576
- }, z.core.$strict>, z.ZodObject<{
1577
- kind: z.ZodLiteral<"assistant">;
1578
- blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1579
- type: z.ZodLiteral<"text">;
1580
- text: z.ZodString;
1581
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
1582
- }, z.core.$strict>, z.ZodObject<{
1583
- type: z.ZodLiteral<"thinking">;
1584
- text: z.ZodString;
1585
- truncated: z.ZodOptional<z.ZodLiteral<true>>;
1586
- }, z.core.$strict>]>>;
1587
- status: z.ZodEnum<{
1588
- complete: "complete";
1589
- interrupted: "interrupted";
1590
- }>;
1591
- group_id: z.ZodString;
1592
- event_id: z.ZodString;
1593
- event_seq: z.ZodOptional<z.ZodNumber>;
1594
- session_id: z.ZodString;
1595
- history_generation: z.ZodString;
1596
- timestamp: z.ZodNumber;
1597
- }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
1598
- kind: z.ZodLiteral<"tool">;
1599
- tool_call_id: z.ZodString;
1600
- tool: z.ZodString;
1601
- args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
1602
- truncated: z.ZodBoolean;
1603
- status: z.ZodLiteral<"complete">;
1604
- result: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
1605
- error: z.ZodOptional<z.ZodNever>;
1606
- group_id: z.ZodString;
1607
- event_id: z.ZodString;
1608
- event_seq: z.ZodOptional<z.ZodNumber>;
1609
- session_id: z.ZodString;
1610
- history_generation: z.ZodString;
1611
- timestamp: z.ZodNumber;
1612
- }, z.core.$strict>, z.ZodObject<{
1613
- kind: z.ZodLiteral<"tool">;
1614
- tool_call_id: z.ZodString;
1615
- tool: z.ZodString;
1616
- args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
1617
- truncated: z.ZodBoolean;
1618
- status: z.ZodLiteral<"error">;
1619
- result: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
1620
- error: z.ZodString;
1621
- group_id: z.ZodString;
1622
- event_id: z.ZodString;
1623
- event_seq: z.ZodOptional<z.ZodNumber>;
1624
- session_id: z.ZodString;
1625
- history_generation: z.ZodString;
1626
- timestamp: z.ZodNumber;
1627
- }, z.core.$strict>, z.ZodObject<{
1628
- kind: z.ZodLiteral<"tool">;
1629
- tool_call_id: z.ZodString;
1630
- tool: z.ZodString;
1631
- args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
1632
- truncated: z.ZodBoolean;
1633
- status: z.ZodLiteral<"interrupted">;
1634
- result: z.ZodOptional<z.ZodNever>;
1635
- error: z.ZodOptional<z.ZodNever>;
1636
- group_id: z.ZodString;
1637
- event_id: z.ZodString;
1638
- event_seq: z.ZodOptional<z.ZodNumber>;
1639
- session_id: z.ZodString;
1640
- history_generation: z.ZodString;
1641
- timestamp: z.ZodNumber;
1642
- }, z.core.$strict>]>, z.ZodObject<{
1643
- kind: z.ZodEnum<{
1644
- compaction: "compaction";
1645
- custom: "custom";
1646
- branch_summary: "branch_summary";
1647
- }>;
1648
- group_id: z.ZodOptional<z.ZodString>;
1649
- payload: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
1650
- truncated: z.ZodBoolean;
1651
- event_id: z.ZodString;
1652
- event_seq: z.ZodOptional<z.ZodNumber>;
1653
- session_id: z.ZodString;
1654
- history_generation: z.ZodString;
1655
- timestamp: z.ZodNumber;
1656
- }, z.core.$strict>, z.ZodObject<{
1657
- kind: z.ZodLiteral<"provider_error">;
1658
- message: z.ZodString;
1659
- group_id: z.ZodString;
1660
- event_id: z.ZodString;
1661
- event_seq: z.ZodOptional<z.ZodNumber>;
1662
- session_id: z.ZodString;
1663
- history_generation: z.ZodString;
1664
- timestamp: z.ZodNumber;
1665
- }, z.core.$strict>]>>;
1666
- fragments: z.ZodArray<z.ZodObject<{
1667
- event_id: z.ZodString;
1668
- index: z.ZodNumber;
1669
- data_base64: z.ZodString;
1670
- final: z.ZodBoolean;
1671
- }, z.core.$strict>>;
1672
- target_channel_id: z.ZodString;
1673
- type: z.ZodLiteral<"session_history_chunk">;
1674
- protocol_version: z.ZodLiteral<2>;
1675
- }, z.core.$strict>]>, z.ZodUnion<readonly [z.ZodObject<{
1676
- target_channel_id: z.ZodString;
1677
- type: z.ZodLiteral<"protocol_error">;
1678
- in_reply_to: z.ZodOptional<z.ZodString>;
1679
- code: z.ZodEnum<{
1680
- internal_error: "internal_error";
1681
- invalid_message: "invalid_message";
1682
- unsupported_type: "unsupported_type";
1683
- too_large: "too_large";
1684
- protocol_upgrade_required: "protocol_upgrade_required";
1685
- invalid_channel: "invalid_channel";
1686
- invalid_generation: "invalid_generation";
1687
- invalid_cursor: "invalid_cursor";
1688
- reset_required: "reset_required";
1689
- }>;
1690
- message: z.ZodString;
1691
- protocol_version: z.ZodLiteral<2>;
1692
- }, z.core.$strict>, z.ZodObject<{
1693
- type: z.ZodLiteral<"protocol_error">;
1694
- in_reply_to: z.ZodOptional<z.ZodString>;
1695
- code: z.ZodEnum<{
1696
- internal_error: "internal_error";
1697
- invalid_message: "invalid_message";
1698
- unsupported_type: "unsupported_type";
1699
- too_large: "too_large";
1700
- protocol_upgrade_required: "protocol_upgrade_required";
1701
- invalid_channel: "invalid_channel";
1702
- invalid_generation: "invalid_generation";
1703
- invalid_cursor: "invalid_cursor";
1704
- reset_required: "reset_required";
1705
- }>;
1706
- message: z.ZodString;
1707
- protocol_version: z.ZodLiteral<2>;
1708
- }, z.core.$strict>]>, z.ZodObject<{
1709
- session_id: z.ZodString;
1710
- history_generation: z.ZodString;
1711
- reason: z.ZodEnum<{
1712
- session_replaced: "session_replaced";
1713
- invalid_cursor: "invalid_cursor";
1714
- generation_changed: "generation_changed";
1715
- branch_changed: "branch_changed";
1716
- conflict: "conflict";
1717
- }>;
1718
- target_channel_id: z.ZodString;
1719
- type: z.ZodLiteral<"reset">;
1720
- protocol_version: z.ZodLiteral<2>;
1721
- }, z.core.$strict>, z.ZodObject<{
1722
- in_reply_to: z.ZodString;
1723
- target_channel_id: z.ZodString;
1724
- type: z.ZodLiteral<"pong">;
1725
- protocol_version: z.ZodLiteral<2>;
1726
- }, z.core.$strict>, z.ZodObject<{
1727
- in_reply_to: z.ZodString;
1728
- target_channel_id: z.ZodString;
1729
- type: z.ZodLiteral<"cancelled">;
1730
- protocol_version: z.ZodLiteral<2>;
1731
- }, z.core.$strict>, z.ZodObject<{
1732
- in_reply_to: z.ZodString;
1733
- action: z.ZodEnum<{
1734
- session_new: "session_new";
1735
- session_compact: "session_compact";
1736
- model_set: "model_set";
1737
- thinking_set: "thinking_set";
1738
- }>;
1739
- target_channel_id: z.ZodString;
1740
- type: z.ZodLiteral<"action_ok">;
1741
- protocol_version: z.ZodLiteral<2>;
1742
- }, z.core.$strict>, z.ZodObject<{
1743
- in_reply_to: z.ZodString;
1744
- action: z.ZodEnum<{
1745
- session_new: "session_new";
1746
- session_compact: "session_compact";
1747
- model_set: "model_set";
1748
- thinking_set: "thinking_set";
1749
- }>;
1750
- error: z.ZodString;
1751
- target_channel_id: z.ZodString;
1752
- type: z.ZodLiteral<"action_error">;
1753
- protocol_version: z.ZodLiteral<2>;
1754
- }, z.core.$strict>, z.ZodObject<{
1755
- in_reply_to: z.ZodString;
1756
- models: z.ZodArray<z.ZodObject<{
1757
- id: z.ZodString;
1758
- name: z.ZodString;
1759
- provider: z.ZodString;
1760
- reasoning: z.ZodBoolean;
1761
- context_window: z.ZodNumber;
1762
- vision: z.ZodBoolean;
1763
- }, z.core.$strict>>;
1764
- current: z.ZodOptional<z.ZodObject<{
1765
- id: z.ZodString;
1766
- name: z.ZodString;
1767
- provider: z.ZodString;
1768
- reasoning: z.ZodBoolean;
1769
- context_window: z.ZodNumber;
1770
- vision: z.ZodBoolean;
1771
- }, z.core.$strict>>;
1772
- target_channel_id: z.ZodString;
1773
- type: z.ZodLiteral<"models_list">;
1774
- protocol_version: z.ZodLiteral<2>;
1775
- }, z.core.$strict>, z.ZodObject<{
1776
- snapshot_id: z.ZodString;
1777
- chunk_index: z.ZodNumber;
1778
- final: z.ZodBoolean;
1779
- items: z.ZodArray<z.ZodObject<{
1780
- id: z.ZodString;
1781
- text: z.ZodString;
1782
- images: z.ZodOptional<z.ZodArray<z.ZodObject<{
1783
- data: z.ZodString;
1784
- mime: z.ZodString;
1785
- }, z.core.$strict>>>;
1786
- sender_ref: z.ZodOptional<z.ZodString>;
1787
- editable: z.ZodBoolean;
1788
- created_at: z.ZodNumber;
1789
- }, z.core.$strict>>;
1790
- session_id: z.ZodString;
1791
- history_generation: z.ZodString;
1792
- type: z.ZodLiteral<"queued_message_state">;
1793
- protocol_version: z.ZodLiteral<2>;
1794
- }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
1795
- id: z.ZodString;
1796
- method: z.ZodLiteral<"select">;
1797
- title: z.ZodString;
1798
- options: z.ZodArray<z.ZodString>;
1799
- ask: z.ZodOptional<z.ZodObject<{
1800
- flow_id: z.ZodString;
1801
- tool_call_id: z.ZodNullable<z.ZodString>;
1802
- source: z.ZodString;
1803
- title: z.ZodNullable<z.ZodString>;
1804
- questions: z.ZodArray<z.ZodObject<{
1805
- id: z.ZodString;
1806
- label: z.ZodString;
1807
- prompt: z.ZodString;
1808
- type: z.ZodEnum<{
1809
- single: "single";
1810
- multi: "multi";
1811
- preview: "preview";
1812
- }>;
1813
- required: z.ZodBoolean;
1814
- presentedType: z.ZodOptional<z.ZodEnum<{
1815
- single: "single";
1816
- multi: "multi";
1817
- preview: "preview";
1818
- }>>;
1819
- requestedType: z.ZodOptional<z.ZodEnum<{
1820
- single: "single";
1821
- multi: "multi";
1822
- preview: "preview";
1823
- }>>;
1824
- options: z.ZodArray<z.ZodObject<{
1825
- value: z.ZodString;
1826
- label: z.ZodString;
1827
- description: z.ZodOptional<z.ZodString>;
1828
- preview: z.ZodOptional<z.ZodString>;
1829
- freeform: z.ZodOptional<z.ZodBoolean>;
1830
- }, z.core.$strict>>;
1831
- }, z.core.$strict>>;
1832
- }, z.core.$strict>>;
1833
- target_channel_id: z.ZodString;
1834
- type: z.ZodLiteral<"extension_ui_request">;
1835
- protocol_version: z.ZodLiteral<2>;
1836
- }, z.core.$strict>, z.ZodObject<{
1837
- id: z.ZodString;
1838
- method: z.ZodLiteral<"confirm">;
1839
- title: z.ZodString;
1840
- message: z.ZodString;
1841
- ask: z.ZodOptional<z.ZodObject<{
1842
- flow_id: z.ZodString;
1843
- tool_call_id: z.ZodNullable<z.ZodString>;
1844
- source: z.ZodString;
1845
- title: z.ZodNullable<z.ZodString>;
1846
- questions: z.ZodArray<z.ZodObject<{
1847
- id: z.ZodString;
1848
- label: z.ZodString;
1849
- prompt: z.ZodString;
1850
- type: z.ZodEnum<{
1851
- single: "single";
1852
- multi: "multi";
1853
- preview: "preview";
1854
- }>;
1855
- required: z.ZodBoolean;
1856
- presentedType: z.ZodOptional<z.ZodEnum<{
1857
- single: "single";
1858
- multi: "multi";
1859
- preview: "preview";
1860
- }>>;
1861
- requestedType: z.ZodOptional<z.ZodEnum<{
1862
- single: "single";
1863
- multi: "multi";
1864
- preview: "preview";
1865
- }>>;
1866
- options: z.ZodArray<z.ZodObject<{
1867
- value: z.ZodString;
1868
- label: z.ZodString;
1869
- description: z.ZodOptional<z.ZodString>;
1870
- preview: z.ZodOptional<z.ZodString>;
1871
- freeform: z.ZodOptional<z.ZodBoolean>;
1872
- }, z.core.$strict>>;
1873
- }, z.core.$strict>>;
1874
- }, z.core.$strict>>;
1875
- target_channel_id: z.ZodString;
1876
- type: z.ZodLiteral<"extension_ui_request">;
1877
- protocol_version: z.ZodLiteral<2>;
1878
- }, z.core.$strict>, z.ZodObject<{
1879
- id: z.ZodString;
1880
- method: z.ZodLiteral<"input">;
1881
- title: z.ZodString;
1882
- placeholder: z.ZodOptional<z.ZodString>;
1883
- ask: z.ZodOptional<z.ZodObject<{
1884
- flow_id: z.ZodString;
1885
- tool_call_id: z.ZodNullable<z.ZodString>;
1886
- source: z.ZodString;
1887
- title: z.ZodNullable<z.ZodString>;
1888
- questions: z.ZodArray<z.ZodObject<{
1889
- id: z.ZodString;
1890
- label: z.ZodString;
1891
- prompt: z.ZodString;
1892
- type: z.ZodEnum<{
1893
- single: "single";
1894
- multi: "multi";
1895
- preview: "preview";
1896
- }>;
1897
- required: z.ZodBoolean;
1898
- presentedType: z.ZodOptional<z.ZodEnum<{
1899
- single: "single";
1900
- multi: "multi";
1901
- preview: "preview";
1902
- }>>;
1903
- requestedType: z.ZodOptional<z.ZodEnum<{
1904
- single: "single";
1905
- multi: "multi";
1906
- preview: "preview";
1907
- }>>;
1908
- options: z.ZodArray<z.ZodObject<{
1909
- value: z.ZodString;
1910
- label: z.ZodString;
1911
- description: z.ZodOptional<z.ZodString>;
1912
- preview: z.ZodOptional<z.ZodString>;
1913
- freeform: z.ZodOptional<z.ZodBoolean>;
1914
- }, z.core.$strict>>;
1915
- }, z.core.$strict>>;
1916
- }, z.core.$strict>>;
1917
- target_channel_id: z.ZodString;
1918
- type: z.ZodLiteral<"extension_ui_request">;
1919
- protocol_version: z.ZodLiteral<2>;
1920
- }, z.core.$strict>, z.ZodObject<{
1921
- id: z.ZodString;
1922
- method: z.ZodLiteral<"editor">;
1923
- title: z.ZodString;
1924
- prefill: z.ZodOptional<z.ZodString>;
1925
- ask: z.ZodOptional<z.ZodObject<{
1926
- flow_id: z.ZodString;
1927
- tool_call_id: z.ZodNullable<z.ZodString>;
1928
- source: z.ZodString;
1929
- title: z.ZodNullable<z.ZodString>;
1930
- questions: z.ZodArray<z.ZodObject<{
1931
- id: z.ZodString;
1932
- label: z.ZodString;
1933
- prompt: z.ZodString;
1934
- type: z.ZodEnum<{
1935
- single: "single";
1936
- multi: "multi";
1937
- preview: "preview";
1938
- }>;
1939
- required: z.ZodBoolean;
1940
- presentedType: z.ZodOptional<z.ZodEnum<{
1941
- single: "single";
1942
- multi: "multi";
1943
- preview: "preview";
1944
- }>>;
1945
- requestedType: z.ZodOptional<z.ZodEnum<{
1946
- single: "single";
1947
- multi: "multi";
1948
- preview: "preview";
1949
- }>>;
1950
- options: z.ZodArray<z.ZodObject<{
1951
- value: z.ZodString;
1952
- label: z.ZodString;
1953
- description: z.ZodOptional<z.ZodString>;
1954
- preview: z.ZodOptional<z.ZodString>;
1955
- freeform: z.ZodOptional<z.ZodBoolean>;
1956
- }, z.core.$strict>>;
1957
- }, z.core.$strict>>;
1958
- }, z.core.$strict>>;
1959
- target_channel_id: z.ZodString;
1960
- type: z.ZodLiteral<"extension_ui_request">;
1961
- protocol_version: z.ZodLiteral<2>;
1962
- }, z.core.$strict>, z.ZodObject<{
1963
- id: z.ZodString;
1964
- method: z.ZodLiteral<"notify">;
1965
- message: z.ZodString;
1966
- notify_type: z.ZodOptional<z.ZodEnum<{
1967
- error: "error";
1968
- info: "info";
1969
- warning: "warning";
1970
- }>>;
1971
- target_channel_id: z.ZodString;
1972
- type: z.ZodLiteral<"extension_ui_request">;
1973
- protocol_version: z.ZodLiteral<2>;
1974
- }, z.core.$strict>]>, z.ZodObject<{
1975
- reason: z.ZodEnum<{
1976
- shutdown: "shutdown";
1977
- peer_stop: "peer_stop";
1978
- session_replaced: "session_replaced";
1979
- }>;
1980
- session_id: z.ZodString;
1981
- history_generation: z.ZodString;
1982
- type: z.ZodLiteral<"bye">;
1983
- protocol_version: z.ZodLiteral<2>;
1984
- }, z.core.$strict>]>;
1985
- export type ServerFrame = z.infer<typeof ServerFrameSchema>;
1986
- export declare const ClientFrameTypes: Set<"ping" | "cancel" | "extension_ui_response" | "pair_request" | "user_message" | "queued_message_set" | "queued_message_clear" | "approve_tool" | "session_sync" | "session_new" | "session_compact" | "model_set" | "thinking_set" | "list_models" | "session_hello" | "user_message_observed" | "queued_message_steer">;
1987
- export declare const ServerFrameTypes: Set<"pong" | "cancelled" | "extension_ui_request" | "pair_ok" | "pair_error" | "queued_message_state" | "bye" | "action_ok" | "action_error" | "models_list" | "timeline_partial" | "session_ready" | "user_message_started" | "user_message_status" | "timeline_event" | "timeline_event_fragment" | "session_history_chunk" | "protocol_error" | "reset">;
1988
- export declare const MarkerSchemaV2: z.ZodUnion<readonly [z.ZodObject<{
1989
- kind: z.ZodLiteral<"user">;
1990
- message_id: z.ZodOptional<z.ZodString>;
1991
- origin: z.ZodEnum<{
1992
- unknown: "unknown";
1993
- pwa: "pwa";
1994
- extension: "extension";
1995
- }>;
1996
- delivery: z.ZodEnum<{
1997
- unknown: "unknown";
1998
- normal: "normal";
1999
- queued: "queued";
2000
- }>;
2001
- sender_ref: z.ZodOptional<z.ZodString>;
2002
- version: z.ZodLiteral<2>;
2003
- event_id: z.ZodString;
2004
- group_id: z.ZodString;
2005
- }, z.core.$strict>, z.ZodObject<{
2006
- kind: z.ZodEnum<{
2007
- assistant: "assistant";
2008
- tool: "tool";
2009
- provider_error: "provider_error";
2010
- }>;
2011
- version: z.ZodLiteral<2>;
2012
- event_id: z.ZodString;
2013
- group_id: z.ZodString;
2014
- }, z.core.$strict>, z.ZodObject<{
2015
- version: z.ZodLiteral<2>;
2016
- event_id: z.ZodString;
2017
- kind: z.ZodEnum<{
2018
- compaction: "compaction";
2019
- custom: "custom";
2020
- branch_summary: "branch_summary";
2021
- }>;
2022
- group_id: z.ZodOptional<z.ZodString>;
2023
- }, z.core.$strict>]>;
2024
- export type MarkerV2 = z.infer<typeof MarkerSchemaV2>;
1
+ export * from "../../vendor/protocol/session/index.js";
2
+ export { assistantBlockSchema as TimelineAssistantBlockSchema, historyFragmentSchema as HistoryFragmentSchema, imageBlockSchema as TimelineImageBlockSchema, sessionHistoryChunkFrameSchema as SessionHistoryChunkSchema, textBlockSchema as TimelineTextBlockSchema, thinkingBlockSchema as TimelineThinkingBlockSchema, timelineEventFragmentFrameSchema as TimelineEventFragmentSchema, userBlockSchema as TimelineUserBlockSchema, } from "../../vendor/protocol/session/index.js";
3
+ export * from "./marker.js";