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