@yefengr/remote-pi 0.9.7 → 0.9.9

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 (53) hide show
  1. package/README.md +12 -2
  2. package/dist/pairing/identity-keyring.d.ts +22 -0
  3. package/dist/pairing/identity-keyring.js +94 -0
  4. package/dist/pairing/identity-keyring.js.map +1 -0
  5. package/dist/pairing/identity-lock.d.ts +14 -0
  6. package/dist/pairing/identity-lock.js +116 -0
  7. package/dist/pairing/identity-lock.js.map +1 -0
  8. package/dist/pairing/qr.d.ts +2 -3
  9. package/dist/pairing/qr.js +2 -3
  10. package/dist/pairing/qr.js.map +1 -1
  11. package/dist/pairing/storage.d.ts +19 -61
  12. package/dist/pairing/storage.js +196 -314
  13. package/dist/pairing/storage.js.map +1 -1
  14. package/dist/protocol/types.d.ts +2 -52
  15. package/dist/protocol/v2/codec.d.ts +5 -25
  16. package/dist/protocol/v2/codec.js +3 -206
  17. package/dist/protocol/v2/codec.js.map +1 -1
  18. package/dist/protocol/v2/index.d.ts +1 -0
  19. package/dist/protocol/v2/index.js +1 -0
  20. package/dist/protocol/v2/index.js.map +1 -1
  21. package/dist/protocol/v2/marker.d.ts +40 -0
  22. package/dist/protocol/v2/marker.js +47 -0
  23. package/dist/protocol/v2/marker.js.map +1 -0
  24. package/dist/protocol/v2/schemas.d.ts +3 -2024
  25. package/dist/protocol/v2/schemas.js +3 -433
  26. package/dist/protocol/v2/schemas.js.map +1 -1
  27. package/dist/runtime/owner_router.js +5 -1
  28. package/dist/runtime/owner_router.js.map +1 -1
  29. package/dist/transport/peer_channel.d.ts +2 -11
  30. package/dist/transport/peer_channel.js +7 -11
  31. package/dist/transport/peer_channel.js.map +1 -1
  32. package/dist/transport/relay_client.d.ts +2 -8
  33. package/dist/transport/relay_client.js +3 -2
  34. package/dist/transport/relay_client.js.map +1 -1
  35. package/dist/vendor/protocol/constants.d.ts +4 -0
  36. package/dist/vendor/protocol/constants.js +4 -0
  37. package/dist/vendor/protocol/encoding.d.ts +9 -0
  38. package/dist/vendor/protocol/encoding.js +66 -0
  39. package/dist/vendor/protocol/outer/codec.d.ts +13 -0
  40. package/dist/vendor/protocol/outer/codec.js +105 -0
  41. package/dist/vendor/protocol/outer/index.d.ts +4 -0
  42. package/dist/vendor/protocol/outer/index.js +4 -0
  43. package/dist/vendor/protocol/outer/types.d.ts +120 -0
  44. package/dist/vendor/protocol/outer/types.js +1 -0
  45. package/dist/vendor/protocol/session/codec.d.ts +41 -0
  46. package/dist/vendor/protocol/session/codec.js +236 -0
  47. package/dist/vendor/protocol/session/frames.d.ts +5750 -0
  48. package/dist/vendor/protocol/session/frames.js +406 -0
  49. package/dist/vendor/protocol/session/index.d.ts +3 -0
  50. package/dist/vendor/protocol/session/index.js +3 -0
  51. package/dist/vendor/protocol/session/schema.d.ts +1060 -0
  52. package/dist/vendor/protocol/session/schema.js +302 -0
  53. package/package.json +17 -25
@@ -0,0 +1,1060 @@
1
+ import { z } from "zod";
2
+ export { PROTOCOL_VERSION } from "../constants.js";
3
+ export declare const PROTOCOL_VERSION_V2: 2;
4
+ export declare const MAX_FRAME_BYTES: number;
5
+ export declare const MAX_HISTORY_CHUNK_BYTES: number;
6
+ export declare const MAX_SESSION_HISTORY_CHUNK_BYTES: number;
7
+ export declare const MAX_WINDOW_BYTES: number;
8
+ export declare const MAX_WINDOW_DECODE_BYTES: number;
9
+ export declare const MAX_FRAGMENT_BYTES: number;
10
+ export declare const MAX_FRAGMENT_DECODE_BYTES: number;
11
+ export declare const MAX_ID_CHARS = 256;
12
+ export declare const MAX_STRING_CHARS: number;
13
+ export declare const MAX_TEXT_CHARS: number;
14
+ export declare const MAX_ARRAY_ITEMS = 4096;
15
+ export type JsonValue = null | boolean | number | string | JsonValue[] | {
16
+ [key: string]: JsonValue;
17
+ };
18
+ export declare const strictObject: <T extends z.ZodRawShape>(shape: T) => z.ZodObject<{ -readonly [P in keyof T]: T[P]; }, z.core.$strict>;
19
+ export declare const idSchema: z.ZodString;
20
+ export declare const pairingCodeSchema: z.ZodString;
21
+ export declare const textSchema: z.ZodString;
22
+ export declare const nonEmptyTextSchema: z.ZodString;
23
+ export declare const timestampSchema: z.ZodNumber;
24
+ export declare const positiveIntSchema: z.ZodNumber;
25
+ /** Dense history ordinals are positive and exactly representable in JavaScript. */
26
+ export declare const eventSequenceSchema: z.ZodNumber;
27
+ export declare const headSequenceSchema: z.ZodNumber;
28
+ export declare const protocolVersionSchema: z.ZodLiteral<2>;
29
+ export declare const channelIdSchema: z.ZodString;
30
+ export declare const historyGenerationSchema: z.ZodString;
31
+ export declare const jsonValueSchema: z.ZodType<JsonValue>;
32
+ export declare const JsonValueSchema: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
33
+ export declare const textBlockSchema: z.ZodObject<{
34
+ type: z.ZodLiteral<"text">;
35
+ text: z.ZodString;
36
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
37
+ }, z.core.$strict>;
38
+ export declare const thinkingBlockSchema: z.ZodObject<{
39
+ type: z.ZodLiteral<"thinking">;
40
+ text: z.ZodString;
41
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
42
+ }, z.core.$strict>;
43
+ export declare const imageMimeSchema: z.ZodString;
44
+ export declare const imageBlockSchema: z.ZodUnion<readonly [z.ZodObject<{
45
+ type: z.ZodLiteral<"image">;
46
+ mime_type: z.ZodString;
47
+ data: z.ZodString;
48
+ byte_length: z.ZodNumber;
49
+ }, z.core.$strict>, z.ZodObject<{
50
+ type: z.ZodLiteral<"image">;
51
+ mime_type: z.ZodString;
52
+ byte_length: z.ZodNumber;
53
+ omitted: z.ZodLiteral<true>;
54
+ }, z.core.$strict>]>;
55
+ export declare const userBlockSchema: z.ZodUnion<readonly [z.ZodObject<{
56
+ type: z.ZodLiteral<"text">;
57
+ text: z.ZodString;
58
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
59
+ }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
60
+ type: z.ZodLiteral<"image">;
61
+ mime_type: z.ZodString;
62
+ data: z.ZodString;
63
+ byte_length: z.ZodNumber;
64
+ }, z.core.$strict>, z.ZodObject<{
65
+ type: z.ZodLiteral<"image">;
66
+ mime_type: z.ZodString;
67
+ byte_length: z.ZodNumber;
68
+ omitted: z.ZodLiteral<true>;
69
+ }, z.core.$strict>]>]>;
70
+ export declare const assistantBlockSchema: z.ZodUnion<readonly [z.ZodObject<{
71
+ type: z.ZodLiteral<"text">;
72
+ text: z.ZodString;
73
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
74
+ }, z.core.$strict>, z.ZodObject<{
75
+ type: z.ZodLiteral<"thinking">;
76
+ text: z.ZodString;
77
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
78
+ }, z.core.$strict>]>;
79
+ export declare const timelineUserEventSchema: z.ZodObject<{
80
+ kind: z.ZodLiteral<"user">;
81
+ message_id: z.ZodString;
82
+ blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
83
+ type: z.ZodLiteral<"text">;
84
+ text: z.ZodString;
85
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
86
+ }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
87
+ type: z.ZodLiteral<"image">;
88
+ mime_type: z.ZodString;
89
+ data: z.ZodString;
90
+ byte_length: z.ZodNumber;
91
+ }, z.core.$strict>, z.ZodObject<{
92
+ type: z.ZodLiteral<"image">;
93
+ mime_type: z.ZodString;
94
+ byte_length: z.ZodNumber;
95
+ omitted: z.ZodLiteral<true>;
96
+ }, z.core.$strict>]>]>>;
97
+ origin: z.ZodEnum<{
98
+ unknown: "unknown";
99
+ pwa: "pwa";
100
+ extension: "extension";
101
+ }>;
102
+ sender_ref: z.ZodOptional<z.ZodString>;
103
+ delivery: z.ZodEnum<{
104
+ unknown: "unknown";
105
+ normal: "normal";
106
+ queued: "queued";
107
+ }>;
108
+ status: z.ZodLiteral<"committed">;
109
+ group_id: z.ZodString;
110
+ event_id: z.ZodString;
111
+ event_seq: z.ZodOptional<z.ZodNumber>;
112
+ session_id: z.ZodString;
113
+ history_generation: z.ZodString;
114
+ timestamp: z.ZodNumber;
115
+ }, z.core.$strict>;
116
+ export declare const timelineAssistantEventSchema: z.ZodObject<{
117
+ kind: z.ZodLiteral<"assistant">;
118
+ blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
119
+ type: z.ZodLiteral<"text">;
120
+ text: z.ZodString;
121
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
122
+ }, z.core.$strict>, z.ZodObject<{
123
+ type: z.ZodLiteral<"thinking">;
124
+ text: z.ZodString;
125
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
126
+ }, z.core.$strict>]>>;
127
+ status: z.ZodEnum<{
128
+ complete: "complete";
129
+ interrupted: "interrupted";
130
+ }>;
131
+ group_id: z.ZodString;
132
+ event_id: z.ZodString;
133
+ event_seq: z.ZodOptional<z.ZodNumber>;
134
+ session_id: z.ZodString;
135
+ history_generation: z.ZodString;
136
+ timestamp: z.ZodNumber;
137
+ }, z.core.$strict>;
138
+ export declare const timelineToolEventSchema: z.ZodUnion<readonly [z.ZodObject<{
139
+ kind: z.ZodLiteral<"tool">;
140
+ tool_call_id: z.ZodString;
141
+ tool: z.ZodString;
142
+ args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
143
+ truncated: z.ZodBoolean;
144
+ status: z.ZodLiteral<"complete">;
145
+ result: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
146
+ error: z.ZodOptional<z.ZodNever>;
147
+ group_id: z.ZodString;
148
+ event_id: z.ZodString;
149
+ event_seq: z.ZodOptional<z.ZodNumber>;
150
+ session_id: z.ZodString;
151
+ history_generation: z.ZodString;
152
+ timestamp: z.ZodNumber;
153
+ }, z.core.$strict>, z.ZodObject<{
154
+ kind: z.ZodLiteral<"tool">;
155
+ tool_call_id: z.ZodString;
156
+ tool: z.ZodString;
157
+ args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
158
+ truncated: z.ZodBoolean;
159
+ status: z.ZodLiteral<"error">;
160
+ result: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
161
+ error: z.ZodString;
162
+ group_id: z.ZodString;
163
+ event_id: z.ZodString;
164
+ event_seq: z.ZodOptional<z.ZodNumber>;
165
+ session_id: z.ZodString;
166
+ history_generation: z.ZodString;
167
+ timestamp: z.ZodNumber;
168
+ }, z.core.$strict>, z.ZodObject<{
169
+ kind: z.ZodLiteral<"tool">;
170
+ tool_call_id: z.ZodString;
171
+ tool: z.ZodString;
172
+ args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
173
+ truncated: z.ZodBoolean;
174
+ status: z.ZodLiteral<"interrupted">;
175
+ result: z.ZodOptional<z.ZodNever>;
176
+ error: z.ZodOptional<z.ZodNever>;
177
+ group_id: z.ZodString;
178
+ event_id: z.ZodString;
179
+ event_seq: z.ZodOptional<z.ZodNumber>;
180
+ session_id: z.ZodString;
181
+ history_generation: z.ZodString;
182
+ timestamp: z.ZodNumber;
183
+ }, z.core.$strict>]>;
184
+ export declare const timelineSystemEventSchema: z.ZodObject<{
185
+ kind: z.ZodEnum<{
186
+ custom: "custom";
187
+ compaction: "compaction";
188
+ branch_summary: "branch_summary";
189
+ }>;
190
+ group_id: z.ZodOptional<z.ZodString>;
191
+ payload: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
192
+ truncated: z.ZodBoolean;
193
+ event_id: z.ZodString;
194
+ event_seq: z.ZodOptional<z.ZodNumber>;
195
+ session_id: z.ZodString;
196
+ history_generation: z.ZodString;
197
+ timestamp: z.ZodNumber;
198
+ }, z.core.$strict>;
199
+ export declare const timelineProviderErrorEventSchema: z.ZodObject<{
200
+ kind: z.ZodLiteral<"provider_error">;
201
+ message: z.ZodString;
202
+ group_id: z.ZodString;
203
+ event_id: z.ZodString;
204
+ event_seq: z.ZodOptional<z.ZodNumber>;
205
+ session_id: z.ZodString;
206
+ history_generation: z.ZodString;
207
+ timestamp: z.ZodNumber;
208
+ }, z.core.$strict>;
209
+ export declare const timelineEventSchema: z.ZodUnion<readonly [z.ZodObject<{
210
+ kind: z.ZodLiteral<"user">;
211
+ message_id: z.ZodString;
212
+ blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
213
+ type: z.ZodLiteral<"text">;
214
+ text: z.ZodString;
215
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
216
+ }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
217
+ type: z.ZodLiteral<"image">;
218
+ mime_type: z.ZodString;
219
+ data: z.ZodString;
220
+ byte_length: z.ZodNumber;
221
+ }, z.core.$strict>, z.ZodObject<{
222
+ type: z.ZodLiteral<"image">;
223
+ mime_type: z.ZodString;
224
+ byte_length: z.ZodNumber;
225
+ omitted: z.ZodLiteral<true>;
226
+ }, z.core.$strict>]>]>>;
227
+ origin: z.ZodEnum<{
228
+ unknown: "unknown";
229
+ pwa: "pwa";
230
+ extension: "extension";
231
+ }>;
232
+ sender_ref: z.ZodOptional<z.ZodString>;
233
+ delivery: z.ZodEnum<{
234
+ unknown: "unknown";
235
+ normal: "normal";
236
+ queued: "queued";
237
+ }>;
238
+ status: z.ZodLiteral<"committed">;
239
+ group_id: z.ZodString;
240
+ event_id: z.ZodString;
241
+ event_seq: z.ZodOptional<z.ZodNumber>;
242
+ session_id: z.ZodString;
243
+ history_generation: z.ZodString;
244
+ timestamp: z.ZodNumber;
245
+ }, z.core.$strict>, z.ZodObject<{
246
+ kind: z.ZodLiteral<"assistant">;
247
+ blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
248
+ type: z.ZodLiteral<"text">;
249
+ text: z.ZodString;
250
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
251
+ }, z.core.$strict>, z.ZodObject<{
252
+ type: z.ZodLiteral<"thinking">;
253
+ text: z.ZodString;
254
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
255
+ }, z.core.$strict>]>>;
256
+ status: z.ZodEnum<{
257
+ complete: "complete";
258
+ interrupted: "interrupted";
259
+ }>;
260
+ group_id: z.ZodString;
261
+ event_id: z.ZodString;
262
+ event_seq: z.ZodOptional<z.ZodNumber>;
263
+ session_id: z.ZodString;
264
+ history_generation: z.ZodString;
265
+ timestamp: z.ZodNumber;
266
+ }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
267
+ kind: z.ZodLiteral<"tool">;
268
+ tool_call_id: z.ZodString;
269
+ tool: z.ZodString;
270
+ args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
271
+ truncated: z.ZodBoolean;
272
+ status: z.ZodLiteral<"complete">;
273
+ result: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
274
+ error: z.ZodOptional<z.ZodNever>;
275
+ group_id: z.ZodString;
276
+ event_id: z.ZodString;
277
+ event_seq: z.ZodOptional<z.ZodNumber>;
278
+ session_id: z.ZodString;
279
+ history_generation: z.ZodString;
280
+ timestamp: z.ZodNumber;
281
+ }, z.core.$strict>, z.ZodObject<{
282
+ kind: z.ZodLiteral<"tool">;
283
+ tool_call_id: z.ZodString;
284
+ tool: z.ZodString;
285
+ args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
286
+ truncated: z.ZodBoolean;
287
+ status: z.ZodLiteral<"error">;
288
+ result: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
289
+ error: z.ZodString;
290
+ group_id: z.ZodString;
291
+ event_id: z.ZodString;
292
+ event_seq: z.ZodOptional<z.ZodNumber>;
293
+ session_id: z.ZodString;
294
+ history_generation: z.ZodString;
295
+ timestamp: z.ZodNumber;
296
+ }, z.core.$strict>, z.ZodObject<{
297
+ kind: z.ZodLiteral<"tool">;
298
+ tool_call_id: z.ZodString;
299
+ tool: z.ZodString;
300
+ args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
301
+ truncated: z.ZodBoolean;
302
+ status: z.ZodLiteral<"interrupted">;
303
+ result: z.ZodOptional<z.ZodNever>;
304
+ error: z.ZodOptional<z.ZodNever>;
305
+ group_id: z.ZodString;
306
+ event_id: z.ZodString;
307
+ event_seq: z.ZodOptional<z.ZodNumber>;
308
+ session_id: z.ZodString;
309
+ history_generation: z.ZodString;
310
+ timestamp: z.ZodNumber;
311
+ }, z.core.$strict>]>, z.ZodObject<{
312
+ kind: z.ZodEnum<{
313
+ custom: "custom";
314
+ compaction: "compaction";
315
+ branch_summary: "branch_summary";
316
+ }>;
317
+ group_id: z.ZodOptional<z.ZodString>;
318
+ payload: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
319
+ truncated: z.ZodBoolean;
320
+ event_id: z.ZodString;
321
+ event_seq: z.ZodOptional<z.ZodNumber>;
322
+ session_id: z.ZodString;
323
+ history_generation: z.ZodString;
324
+ timestamp: z.ZodNumber;
325
+ }, z.core.$strict>, z.ZodObject<{
326
+ kind: z.ZodLiteral<"provider_error">;
327
+ message: z.ZodString;
328
+ group_id: z.ZodString;
329
+ event_id: z.ZodString;
330
+ event_seq: z.ZodOptional<z.ZodNumber>;
331
+ session_id: z.ZodString;
332
+ history_generation: z.ZodString;
333
+ timestamp: z.ZodNumber;
334
+ }, z.core.$strict>]>;
335
+ export declare const TimelineEventSchema: z.ZodUnion<readonly [z.ZodObject<{
336
+ kind: z.ZodLiteral<"user">;
337
+ message_id: z.ZodString;
338
+ blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
339
+ type: z.ZodLiteral<"text">;
340
+ text: z.ZodString;
341
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
342
+ }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
343
+ type: z.ZodLiteral<"image">;
344
+ mime_type: z.ZodString;
345
+ data: z.ZodString;
346
+ byte_length: z.ZodNumber;
347
+ }, z.core.$strict>, z.ZodObject<{
348
+ type: z.ZodLiteral<"image">;
349
+ mime_type: z.ZodString;
350
+ byte_length: z.ZodNumber;
351
+ omitted: z.ZodLiteral<true>;
352
+ }, z.core.$strict>]>]>>;
353
+ origin: z.ZodEnum<{
354
+ unknown: "unknown";
355
+ pwa: "pwa";
356
+ extension: "extension";
357
+ }>;
358
+ sender_ref: z.ZodOptional<z.ZodString>;
359
+ delivery: z.ZodEnum<{
360
+ unknown: "unknown";
361
+ normal: "normal";
362
+ queued: "queued";
363
+ }>;
364
+ status: z.ZodLiteral<"committed">;
365
+ group_id: z.ZodString;
366
+ event_id: z.ZodString;
367
+ event_seq: z.ZodOptional<z.ZodNumber>;
368
+ session_id: z.ZodString;
369
+ history_generation: z.ZodString;
370
+ timestamp: z.ZodNumber;
371
+ }, z.core.$strict>, z.ZodObject<{
372
+ kind: z.ZodLiteral<"assistant">;
373
+ blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
374
+ type: z.ZodLiteral<"text">;
375
+ text: z.ZodString;
376
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
377
+ }, z.core.$strict>, z.ZodObject<{
378
+ type: z.ZodLiteral<"thinking">;
379
+ text: z.ZodString;
380
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
381
+ }, z.core.$strict>]>>;
382
+ status: z.ZodEnum<{
383
+ complete: "complete";
384
+ interrupted: "interrupted";
385
+ }>;
386
+ group_id: z.ZodString;
387
+ event_id: z.ZodString;
388
+ event_seq: z.ZodOptional<z.ZodNumber>;
389
+ session_id: z.ZodString;
390
+ history_generation: z.ZodString;
391
+ timestamp: z.ZodNumber;
392
+ }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
393
+ kind: z.ZodLiteral<"tool">;
394
+ tool_call_id: z.ZodString;
395
+ tool: z.ZodString;
396
+ args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
397
+ truncated: z.ZodBoolean;
398
+ status: z.ZodLiteral<"complete">;
399
+ result: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
400
+ error: z.ZodOptional<z.ZodNever>;
401
+ group_id: z.ZodString;
402
+ event_id: z.ZodString;
403
+ event_seq: z.ZodOptional<z.ZodNumber>;
404
+ session_id: z.ZodString;
405
+ history_generation: z.ZodString;
406
+ timestamp: z.ZodNumber;
407
+ }, z.core.$strict>, z.ZodObject<{
408
+ kind: z.ZodLiteral<"tool">;
409
+ tool_call_id: z.ZodString;
410
+ tool: z.ZodString;
411
+ args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
412
+ truncated: z.ZodBoolean;
413
+ status: z.ZodLiteral<"error">;
414
+ result: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
415
+ error: z.ZodString;
416
+ group_id: z.ZodString;
417
+ event_id: z.ZodString;
418
+ event_seq: z.ZodOptional<z.ZodNumber>;
419
+ session_id: z.ZodString;
420
+ history_generation: z.ZodString;
421
+ timestamp: z.ZodNumber;
422
+ }, z.core.$strict>, z.ZodObject<{
423
+ kind: z.ZodLiteral<"tool">;
424
+ tool_call_id: z.ZodString;
425
+ tool: z.ZodString;
426
+ args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
427
+ truncated: z.ZodBoolean;
428
+ status: z.ZodLiteral<"interrupted">;
429
+ result: z.ZodOptional<z.ZodNever>;
430
+ error: z.ZodOptional<z.ZodNever>;
431
+ group_id: z.ZodString;
432
+ event_id: z.ZodString;
433
+ event_seq: z.ZodOptional<z.ZodNumber>;
434
+ session_id: z.ZodString;
435
+ history_generation: z.ZodString;
436
+ timestamp: z.ZodNumber;
437
+ }, z.core.$strict>]>, z.ZodObject<{
438
+ kind: z.ZodEnum<{
439
+ custom: "custom";
440
+ compaction: "compaction";
441
+ branch_summary: "branch_summary";
442
+ }>;
443
+ group_id: z.ZodOptional<z.ZodString>;
444
+ payload: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
445
+ truncated: z.ZodBoolean;
446
+ event_id: z.ZodString;
447
+ event_seq: z.ZodOptional<z.ZodNumber>;
448
+ session_id: z.ZodString;
449
+ history_generation: z.ZodString;
450
+ timestamp: z.ZodNumber;
451
+ }, z.core.$strict>, z.ZodObject<{
452
+ kind: z.ZodLiteral<"provider_error">;
453
+ message: z.ZodString;
454
+ group_id: z.ZodString;
455
+ event_id: z.ZodString;
456
+ event_seq: z.ZodOptional<z.ZodNumber>;
457
+ session_id: z.ZodString;
458
+ history_generation: z.ZodString;
459
+ timestamp: z.ZodNumber;
460
+ }, z.core.$strict>]>;
461
+ export declare const sequencedTimelineEventSchema: z.ZodIntersection<z.ZodUnion<readonly [z.ZodObject<{
462
+ kind: z.ZodLiteral<"user">;
463
+ message_id: z.ZodString;
464
+ blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
465
+ type: z.ZodLiteral<"text">;
466
+ text: z.ZodString;
467
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
468
+ }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
469
+ type: z.ZodLiteral<"image">;
470
+ mime_type: z.ZodString;
471
+ data: z.ZodString;
472
+ byte_length: z.ZodNumber;
473
+ }, z.core.$strict>, z.ZodObject<{
474
+ type: z.ZodLiteral<"image">;
475
+ mime_type: z.ZodString;
476
+ byte_length: z.ZodNumber;
477
+ omitted: z.ZodLiteral<true>;
478
+ }, z.core.$strict>]>]>>;
479
+ origin: z.ZodEnum<{
480
+ unknown: "unknown";
481
+ pwa: "pwa";
482
+ extension: "extension";
483
+ }>;
484
+ sender_ref: z.ZodOptional<z.ZodString>;
485
+ delivery: z.ZodEnum<{
486
+ unknown: "unknown";
487
+ normal: "normal";
488
+ queued: "queued";
489
+ }>;
490
+ status: z.ZodLiteral<"committed">;
491
+ group_id: z.ZodString;
492
+ event_id: z.ZodString;
493
+ event_seq: z.ZodOptional<z.ZodNumber>;
494
+ session_id: z.ZodString;
495
+ history_generation: z.ZodString;
496
+ timestamp: z.ZodNumber;
497
+ }, z.core.$strict>, z.ZodObject<{
498
+ kind: z.ZodLiteral<"assistant">;
499
+ blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
500
+ type: z.ZodLiteral<"text">;
501
+ text: z.ZodString;
502
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
503
+ }, z.core.$strict>, z.ZodObject<{
504
+ type: z.ZodLiteral<"thinking">;
505
+ text: z.ZodString;
506
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
507
+ }, z.core.$strict>]>>;
508
+ status: z.ZodEnum<{
509
+ complete: "complete";
510
+ interrupted: "interrupted";
511
+ }>;
512
+ group_id: z.ZodString;
513
+ event_id: z.ZodString;
514
+ event_seq: z.ZodOptional<z.ZodNumber>;
515
+ session_id: z.ZodString;
516
+ history_generation: z.ZodString;
517
+ timestamp: z.ZodNumber;
518
+ }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
519
+ kind: z.ZodLiteral<"tool">;
520
+ tool_call_id: z.ZodString;
521
+ tool: z.ZodString;
522
+ args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
523
+ truncated: z.ZodBoolean;
524
+ status: z.ZodLiteral<"complete">;
525
+ result: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
526
+ error: z.ZodOptional<z.ZodNever>;
527
+ group_id: z.ZodString;
528
+ event_id: z.ZodString;
529
+ event_seq: z.ZodOptional<z.ZodNumber>;
530
+ session_id: z.ZodString;
531
+ history_generation: z.ZodString;
532
+ timestamp: z.ZodNumber;
533
+ }, z.core.$strict>, z.ZodObject<{
534
+ kind: z.ZodLiteral<"tool">;
535
+ tool_call_id: z.ZodString;
536
+ tool: z.ZodString;
537
+ args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
538
+ truncated: z.ZodBoolean;
539
+ status: z.ZodLiteral<"error">;
540
+ result: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
541
+ error: z.ZodString;
542
+ group_id: z.ZodString;
543
+ event_id: z.ZodString;
544
+ event_seq: z.ZodOptional<z.ZodNumber>;
545
+ session_id: z.ZodString;
546
+ history_generation: z.ZodString;
547
+ timestamp: z.ZodNumber;
548
+ }, z.core.$strict>, z.ZodObject<{
549
+ kind: z.ZodLiteral<"tool">;
550
+ tool_call_id: z.ZodString;
551
+ tool: z.ZodString;
552
+ args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
553
+ truncated: z.ZodBoolean;
554
+ status: z.ZodLiteral<"interrupted">;
555
+ result: z.ZodOptional<z.ZodNever>;
556
+ error: z.ZodOptional<z.ZodNever>;
557
+ group_id: z.ZodString;
558
+ event_id: z.ZodString;
559
+ event_seq: z.ZodOptional<z.ZodNumber>;
560
+ session_id: z.ZodString;
561
+ history_generation: z.ZodString;
562
+ timestamp: z.ZodNumber;
563
+ }, z.core.$strict>]>, z.ZodObject<{
564
+ kind: z.ZodEnum<{
565
+ custom: "custom";
566
+ compaction: "compaction";
567
+ branch_summary: "branch_summary";
568
+ }>;
569
+ group_id: z.ZodOptional<z.ZodString>;
570
+ payload: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
571
+ truncated: z.ZodBoolean;
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<"provider_error">;
579
+ message: z.ZodString;
580
+ group_id: z.ZodString;
581
+ event_id: z.ZodString;
582
+ event_seq: z.ZodOptional<z.ZodNumber>;
583
+ session_id: z.ZodString;
584
+ history_generation: z.ZodString;
585
+ timestamp: z.ZodNumber;
586
+ }, z.core.$strict>]>, z.ZodObject<{
587
+ event_seq: z.ZodNumber;
588
+ }, z.core.$strip>>;
589
+ export type TimelineEvent = z.infer<typeof timelineEventSchema>;
590
+ export type SequencedTimelineEvent = z.infer<typeof sequencedTimelineEventSchema>;
591
+ export type TimelineUserEvent = z.infer<typeof timelineUserEventSchema>;
592
+ export declare const timelinePartialSchema: z.ZodUnion<readonly [z.ZodObject<{
593
+ delta: z.ZodOptional<z.ZodString>;
594
+ kind: z.ZodLiteral<"assistant">;
595
+ blocks: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
596
+ type: z.ZodLiteral<"text">;
597
+ text: z.ZodString;
598
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
599
+ }, z.core.$strict>, z.ZodObject<{
600
+ type: z.ZodLiteral<"thinking">;
601
+ text: z.ZodString;
602
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
603
+ }, z.core.$strict>]>>>;
604
+ protocol_version: z.ZodLiteral<2>;
605
+ type: z.ZodLiteral<"timeline_partial">;
606
+ session_id: z.ZodString;
607
+ history_generation: z.ZodString;
608
+ group_id: z.ZodString;
609
+ partial_id: z.ZodString;
610
+ status: z.ZodEnum<{
611
+ running: "running";
612
+ delta: "delta";
613
+ }>;
614
+ }, z.core.$strict>, z.ZodObject<{
615
+ delta: z.ZodOptional<z.ZodString>;
616
+ kind: z.ZodLiteral<"thinking">;
617
+ blocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
618
+ type: z.ZodLiteral<"thinking">;
619
+ text: z.ZodString;
620
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
621
+ }, z.core.$strict>>>;
622
+ protocol_version: z.ZodLiteral<2>;
623
+ type: z.ZodLiteral<"timeline_partial">;
624
+ session_id: z.ZodString;
625
+ history_generation: z.ZodString;
626
+ group_id: z.ZodString;
627
+ partial_id: z.ZodString;
628
+ status: z.ZodEnum<{
629
+ running: "running";
630
+ delta: "delta";
631
+ }>;
632
+ }, z.core.$strict>, z.ZodObject<{
633
+ delta: z.ZodOptional<z.ZodString>;
634
+ kind: z.ZodLiteral<"tool">;
635
+ tool_call_id: z.ZodString;
636
+ tool: z.ZodString;
637
+ args: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
638
+ blocks: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
639
+ type: z.ZodLiteral<"text">;
640
+ text: z.ZodString;
641
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
642
+ }, z.core.$strict>, z.ZodObject<{
643
+ type: z.ZodLiteral<"thinking">;
644
+ text: z.ZodString;
645
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
646
+ }, z.core.$strict>]>>>;
647
+ protocol_version: z.ZodLiteral<2>;
648
+ type: z.ZodLiteral<"timeline_partial">;
649
+ session_id: z.ZodString;
650
+ history_generation: z.ZodString;
651
+ group_id: z.ZodString;
652
+ partial_id: z.ZodString;
653
+ status: z.ZodEnum<{
654
+ running: "running";
655
+ delta: "delta";
656
+ }>;
657
+ }, z.core.$strict>]>;
658
+ export declare const TimelinePartialSchema: z.ZodUnion<readonly [z.ZodObject<{
659
+ delta: z.ZodOptional<z.ZodString>;
660
+ kind: z.ZodLiteral<"assistant">;
661
+ blocks: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
662
+ type: z.ZodLiteral<"text">;
663
+ text: z.ZodString;
664
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
665
+ }, z.core.$strict>, z.ZodObject<{
666
+ type: z.ZodLiteral<"thinking">;
667
+ text: z.ZodString;
668
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
669
+ }, z.core.$strict>]>>>;
670
+ protocol_version: z.ZodLiteral<2>;
671
+ type: z.ZodLiteral<"timeline_partial">;
672
+ session_id: z.ZodString;
673
+ history_generation: z.ZodString;
674
+ group_id: z.ZodString;
675
+ partial_id: z.ZodString;
676
+ status: z.ZodEnum<{
677
+ running: "running";
678
+ delta: "delta";
679
+ }>;
680
+ }, z.core.$strict>, z.ZodObject<{
681
+ delta: z.ZodOptional<z.ZodString>;
682
+ kind: z.ZodLiteral<"thinking">;
683
+ blocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
684
+ type: z.ZodLiteral<"thinking">;
685
+ text: z.ZodString;
686
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
687
+ }, z.core.$strict>>>;
688
+ protocol_version: z.ZodLiteral<2>;
689
+ type: z.ZodLiteral<"timeline_partial">;
690
+ session_id: z.ZodString;
691
+ history_generation: z.ZodString;
692
+ group_id: z.ZodString;
693
+ partial_id: z.ZodString;
694
+ status: z.ZodEnum<{
695
+ running: "running";
696
+ delta: "delta";
697
+ }>;
698
+ }, z.core.$strict>, z.ZodObject<{
699
+ delta: z.ZodOptional<z.ZodString>;
700
+ kind: z.ZodLiteral<"tool">;
701
+ tool_call_id: z.ZodString;
702
+ tool: z.ZodString;
703
+ args: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
704
+ blocks: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
705
+ type: z.ZodLiteral<"text">;
706
+ text: z.ZodString;
707
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
708
+ }, z.core.$strict>, z.ZodObject<{
709
+ type: z.ZodLiteral<"thinking">;
710
+ text: z.ZodString;
711
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
712
+ }, z.core.$strict>]>>>;
713
+ protocol_version: z.ZodLiteral<2>;
714
+ type: z.ZodLiteral<"timeline_partial">;
715
+ session_id: z.ZodString;
716
+ history_generation: z.ZodString;
717
+ group_id: z.ZodString;
718
+ partial_id: z.ZodString;
719
+ status: z.ZodEnum<{
720
+ running: "running";
721
+ delta: "delta";
722
+ }>;
723
+ }, z.core.$strict>]>;
724
+ export type TimelinePartial = z.infer<typeof timelinePartialSchema>;
725
+ export declare const base64Schema: z.ZodString;
726
+ export declare const timelineEventFragmentSchema: z.ZodObject<{
727
+ event_id: z.ZodString;
728
+ index: z.ZodNumber;
729
+ data_base64: z.ZodString;
730
+ final: z.ZodBoolean;
731
+ }, z.core.$strict>;
732
+ export type TimelineEventFragment = z.infer<typeof timelineEventFragmentSchema>;
733
+ export declare const historyFragmentSchema: z.ZodObject<{
734
+ event_id: z.ZodString;
735
+ index: z.ZodNumber;
736
+ data_base64: z.ZodString;
737
+ final: z.ZodBoolean;
738
+ }, z.core.$strict>;
739
+ export declare const TimelineEventFragmentSchema: z.ZodObject<{
740
+ event_id: z.ZodString;
741
+ index: z.ZodNumber;
742
+ data_base64: z.ZodString;
743
+ final: z.ZodBoolean;
744
+ }, z.core.$strict>;
745
+ export declare const HistoryFragmentSchema: z.ZodObject<{
746
+ event_id: z.ZodString;
747
+ index: z.ZodNumber;
748
+ data_base64: z.ZodString;
749
+ final: z.ZodBoolean;
750
+ }, z.core.$strict>;
751
+ export declare const extensionUiRequestPayloadSchema: z.ZodUnion<readonly [z.ZodObject<{
752
+ type: z.ZodLiteral<"extension_ui_request">;
753
+ id: z.ZodString;
754
+ method: z.ZodLiteral<"select">;
755
+ title: z.ZodString;
756
+ options: z.ZodArray<z.ZodString>;
757
+ ask: z.ZodOptional<z.ZodObject<{
758
+ flow_id: z.ZodString;
759
+ tool_call_id: z.ZodNullable<z.ZodString>;
760
+ source: z.ZodString;
761
+ title: z.ZodNullable<z.ZodString>;
762
+ questions: z.ZodArray<z.ZodObject<{
763
+ id: z.ZodString;
764
+ label: z.ZodString;
765
+ prompt: z.ZodString;
766
+ type: z.ZodEnum<{
767
+ single: "single";
768
+ multi: "multi";
769
+ preview: "preview";
770
+ }>;
771
+ required: z.ZodBoolean;
772
+ presentedType: z.ZodOptional<z.ZodEnum<{
773
+ single: "single";
774
+ multi: "multi";
775
+ preview: "preview";
776
+ }>>;
777
+ requestedType: z.ZodOptional<z.ZodEnum<{
778
+ single: "single";
779
+ multi: "multi";
780
+ preview: "preview";
781
+ }>>;
782
+ options: z.ZodArray<z.ZodObject<{
783
+ value: z.ZodString;
784
+ label: z.ZodString;
785
+ description: z.ZodOptional<z.ZodString>;
786
+ preview: z.ZodOptional<z.ZodString>;
787
+ freeform: z.ZodOptional<z.ZodBoolean>;
788
+ }, z.core.$strict>>;
789
+ }, z.core.$strict>>;
790
+ }, z.core.$strict>>;
791
+ }, z.core.$strict>, z.ZodObject<{
792
+ type: z.ZodLiteral<"extension_ui_request">;
793
+ id: z.ZodString;
794
+ method: z.ZodLiteral<"confirm">;
795
+ title: z.ZodString;
796
+ message: z.ZodString;
797
+ ask: z.ZodOptional<z.ZodObject<{
798
+ flow_id: z.ZodString;
799
+ tool_call_id: z.ZodNullable<z.ZodString>;
800
+ source: z.ZodString;
801
+ title: z.ZodNullable<z.ZodString>;
802
+ questions: z.ZodArray<z.ZodObject<{
803
+ id: z.ZodString;
804
+ label: z.ZodString;
805
+ prompt: z.ZodString;
806
+ type: z.ZodEnum<{
807
+ single: "single";
808
+ multi: "multi";
809
+ preview: "preview";
810
+ }>;
811
+ required: z.ZodBoolean;
812
+ presentedType: z.ZodOptional<z.ZodEnum<{
813
+ single: "single";
814
+ multi: "multi";
815
+ preview: "preview";
816
+ }>>;
817
+ requestedType: z.ZodOptional<z.ZodEnum<{
818
+ single: "single";
819
+ multi: "multi";
820
+ preview: "preview";
821
+ }>>;
822
+ options: z.ZodArray<z.ZodObject<{
823
+ value: z.ZodString;
824
+ label: z.ZodString;
825
+ description: z.ZodOptional<z.ZodString>;
826
+ preview: z.ZodOptional<z.ZodString>;
827
+ freeform: z.ZodOptional<z.ZodBoolean>;
828
+ }, z.core.$strict>>;
829
+ }, z.core.$strict>>;
830
+ }, z.core.$strict>>;
831
+ }, z.core.$strict>, z.ZodObject<{
832
+ type: z.ZodLiteral<"extension_ui_request">;
833
+ id: z.ZodString;
834
+ method: z.ZodLiteral<"input">;
835
+ title: z.ZodString;
836
+ placeholder: z.ZodOptional<z.ZodString>;
837
+ ask: z.ZodOptional<z.ZodObject<{
838
+ flow_id: z.ZodString;
839
+ tool_call_id: z.ZodNullable<z.ZodString>;
840
+ source: z.ZodString;
841
+ title: z.ZodNullable<z.ZodString>;
842
+ questions: z.ZodArray<z.ZodObject<{
843
+ id: z.ZodString;
844
+ label: z.ZodString;
845
+ prompt: z.ZodString;
846
+ type: z.ZodEnum<{
847
+ single: "single";
848
+ multi: "multi";
849
+ preview: "preview";
850
+ }>;
851
+ required: z.ZodBoolean;
852
+ presentedType: z.ZodOptional<z.ZodEnum<{
853
+ single: "single";
854
+ multi: "multi";
855
+ preview: "preview";
856
+ }>>;
857
+ requestedType: z.ZodOptional<z.ZodEnum<{
858
+ single: "single";
859
+ multi: "multi";
860
+ preview: "preview";
861
+ }>>;
862
+ options: z.ZodArray<z.ZodObject<{
863
+ value: z.ZodString;
864
+ label: z.ZodString;
865
+ description: z.ZodOptional<z.ZodString>;
866
+ preview: z.ZodOptional<z.ZodString>;
867
+ freeform: z.ZodOptional<z.ZodBoolean>;
868
+ }, z.core.$strict>>;
869
+ }, z.core.$strict>>;
870
+ }, z.core.$strict>>;
871
+ }, z.core.$strict>, z.ZodObject<{
872
+ type: z.ZodLiteral<"extension_ui_request">;
873
+ id: z.ZodString;
874
+ method: z.ZodLiteral<"editor">;
875
+ title: z.ZodString;
876
+ prefill: z.ZodOptional<z.ZodString>;
877
+ ask: z.ZodOptional<z.ZodObject<{
878
+ flow_id: z.ZodString;
879
+ tool_call_id: z.ZodNullable<z.ZodString>;
880
+ source: z.ZodString;
881
+ title: z.ZodNullable<z.ZodString>;
882
+ questions: z.ZodArray<z.ZodObject<{
883
+ id: z.ZodString;
884
+ label: z.ZodString;
885
+ prompt: z.ZodString;
886
+ type: z.ZodEnum<{
887
+ single: "single";
888
+ multi: "multi";
889
+ preview: "preview";
890
+ }>;
891
+ required: z.ZodBoolean;
892
+ presentedType: z.ZodOptional<z.ZodEnum<{
893
+ single: "single";
894
+ multi: "multi";
895
+ preview: "preview";
896
+ }>>;
897
+ requestedType: z.ZodOptional<z.ZodEnum<{
898
+ single: "single";
899
+ multi: "multi";
900
+ preview: "preview";
901
+ }>>;
902
+ options: z.ZodArray<z.ZodObject<{
903
+ value: z.ZodString;
904
+ label: z.ZodString;
905
+ description: z.ZodOptional<z.ZodString>;
906
+ preview: z.ZodOptional<z.ZodString>;
907
+ freeform: z.ZodOptional<z.ZodBoolean>;
908
+ }, z.core.$strict>>;
909
+ }, z.core.$strict>>;
910
+ }, z.core.$strict>>;
911
+ }, z.core.$strict>, z.ZodObject<{
912
+ type: z.ZodLiteral<"extension_ui_request">;
913
+ id: z.ZodString;
914
+ method: z.ZodLiteral<"notify">;
915
+ message: z.ZodString;
916
+ notify_type: z.ZodOptional<z.ZodEnum<{
917
+ error: "error";
918
+ info: "info";
919
+ warning: "warning";
920
+ }>>;
921
+ }, z.core.$strict>]>;
922
+ export type ExtensionUiRequestPayload = z.infer<typeof extensionUiRequestPayloadSchema>;
923
+ export declare const extensionUiResponsePayloadSchema: z.ZodUnion<readonly [z.ZodObject<{
924
+ type: z.ZodLiteral<"extension_ui_response">;
925
+ id: z.ZodString;
926
+ value: z.ZodString;
927
+ ask: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
928
+ flow_id: z.ZodString;
929
+ kind: z.ZodLiteral<"answer">;
930
+ mode: z.ZodOptional<z.ZodEnum<{
931
+ submit: "submit";
932
+ elaborate: "elaborate";
933
+ }>>;
934
+ answers: z.ZodRecord<z.ZodString, z.ZodObject<{
935
+ values: z.ZodOptional<z.ZodArray<z.ZodString>>;
936
+ customText: z.ZodOptional<z.ZodString>;
937
+ note: z.ZodOptional<z.ZodString>;
938
+ optionNotes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
939
+ }, z.core.$strict>>;
940
+ }, z.core.$strict>, z.ZodObject<{
941
+ flow_id: z.ZodString;
942
+ kind: z.ZodLiteral<"cancel">;
943
+ }, z.core.$strict>]>>;
944
+ }, z.core.$strict>, z.ZodObject<{
945
+ type: z.ZodLiteral<"extension_ui_response">;
946
+ id: z.ZodString;
947
+ confirmed: z.ZodBoolean;
948
+ ask: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
949
+ flow_id: z.ZodString;
950
+ kind: z.ZodLiteral<"answer">;
951
+ mode: z.ZodOptional<z.ZodEnum<{
952
+ submit: "submit";
953
+ elaborate: "elaborate";
954
+ }>>;
955
+ answers: z.ZodRecord<z.ZodString, z.ZodObject<{
956
+ values: z.ZodOptional<z.ZodArray<z.ZodString>>;
957
+ customText: z.ZodOptional<z.ZodString>;
958
+ note: z.ZodOptional<z.ZodString>;
959
+ optionNotes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
960
+ }, z.core.$strict>>;
961
+ }, z.core.$strict>, z.ZodObject<{
962
+ flow_id: z.ZodString;
963
+ kind: z.ZodLiteral<"cancel">;
964
+ }, z.core.$strict>]>>;
965
+ }, z.core.$strict>, z.ZodObject<{
966
+ type: z.ZodLiteral<"extension_ui_response">;
967
+ id: z.ZodString;
968
+ cancelled: z.ZodLiteral<true>;
969
+ ask: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
970
+ flow_id: z.ZodString;
971
+ kind: z.ZodLiteral<"answer">;
972
+ mode: z.ZodOptional<z.ZodEnum<{
973
+ submit: "submit";
974
+ elaborate: "elaborate";
975
+ }>>;
976
+ answers: z.ZodRecord<z.ZodString, z.ZodObject<{
977
+ values: z.ZodOptional<z.ZodArray<z.ZodString>>;
978
+ customText: z.ZodOptional<z.ZodString>;
979
+ note: z.ZodOptional<z.ZodString>;
980
+ optionNotes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
981
+ }, z.core.$strict>>;
982
+ }, z.core.$strict>, z.ZodObject<{
983
+ flow_id: z.ZodString;
984
+ kind: z.ZodLiteral<"cancel">;
985
+ }, z.core.$strict>]>>;
986
+ }, z.core.$strict>, z.ZodObject<{
987
+ type: z.ZodLiteral<"extension_ui_response">;
988
+ id: z.ZodString;
989
+ ask: z.ZodUnion<readonly [z.ZodObject<{
990
+ flow_id: z.ZodString;
991
+ kind: z.ZodLiteral<"answer">;
992
+ mode: z.ZodOptional<z.ZodEnum<{
993
+ submit: "submit";
994
+ elaborate: "elaborate";
995
+ }>>;
996
+ answers: z.ZodRecord<z.ZodString, z.ZodObject<{
997
+ values: z.ZodOptional<z.ZodArray<z.ZodString>>;
998
+ customText: z.ZodOptional<z.ZodString>;
999
+ note: z.ZodOptional<z.ZodString>;
1000
+ optionNotes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1001
+ }, z.core.$strict>>;
1002
+ }, z.core.$strict>, z.ZodObject<{
1003
+ flow_id: z.ZodString;
1004
+ kind: z.ZodLiteral<"cancel">;
1005
+ }, z.core.$strict>]>;
1006
+ }, z.core.$strict>]>;
1007
+ export type ExtensionUiResponsePayload = z.infer<typeof extensionUiResponsePayloadSchema>;
1008
+ export declare const thinkingLevelSchema: z.ZodEnum<{
1009
+ off: "off";
1010
+ minimal: "minimal";
1011
+ low: "low";
1012
+ medium: "medium";
1013
+ high: "high";
1014
+ xhigh: "xhigh";
1015
+ }>;
1016
+ export type ThinkingLevel = z.infer<typeof thinkingLevelSchema>;
1017
+ export declare const actionNameSchema: z.ZodEnum<{
1018
+ session_new: "session_new";
1019
+ session_compact: "session_compact";
1020
+ model_set: "model_set";
1021
+ thinking_set: "thinking_set";
1022
+ }>;
1023
+ export declare const byeReasonSchema: z.ZodEnum<{
1024
+ peer_stop: "peer_stop";
1025
+ session_replaced: "session_replaced";
1026
+ shutdown: "shutdown";
1027
+ }>;
1028
+ export declare const wireImageSchema: z.ZodObject<{
1029
+ data: z.ZodString;
1030
+ mime: z.ZodString;
1031
+ }, z.core.$strict>;
1032
+ export type WireImage = z.infer<typeof wireImageSchema>;
1033
+ export declare const queuedMessageItemSchema: z.ZodObject<{
1034
+ id: z.ZodString;
1035
+ text: z.ZodString;
1036
+ images: z.ZodOptional<z.ZodArray<z.ZodObject<{
1037
+ data: z.ZodString;
1038
+ mime: z.ZodString;
1039
+ }, z.core.$strict>>>;
1040
+ sender_ref: z.ZodOptional<z.ZodString>;
1041
+ editable: z.ZodBoolean;
1042
+ created_at: z.ZodNumber;
1043
+ }, z.core.$strict>;
1044
+ export declare const wireModelSchema: z.ZodObject<{
1045
+ id: z.ZodString;
1046
+ name: z.ZodString;
1047
+ provider: z.ZodString;
1048
+ reasoning: z.ZodBoolean;
1049
+ context_window: z.ZodNumber;
1050
+ vision: z.ZodBoolean;
1051
+ }, z.core.$strict>;
1052
+ export type WireModel = z.infer<typeof wireModelSchema>;
1053
+ export declare const harnessSchema: z.ZodObject<{
1054
+ name: z.ZodString;
1055
+ version: z.ZodString;
1056
+ }, z.core.$strict>;
1057
+ export declare const CLIENT_FRAME_TYPES: readonly ["pair_request", "session_hello", "user_message", "user_message_observed", "session_sync", "ping", "cancel", "session_new", "session_compact", "model_set", "thinking_set", "list_models", "queued_message_set", "queued_message_clear", "queued_message_steer", "approve_tool", "extension_ui_response"];
1058
+ export declare const SERVER_FRAME_TYPES: readonly ["pair_ok", "pair_error", "session_ready", "user_message_started", "user_message_status", "timeline_event", "timeline_partial", "timeline_event_fragment", "session_history_chunk", "protocol_error", "reset", "pong", "cancelled", "action_ok", "action_error", "models_list", "queued_message_state", "extension_ui_request", "bye"];
1059
+ export type ClientFrameType = (typeof CLIENT_FRAME_TYPES)[number];
1060
+ export type ServerFrameType = (typeof SERVER_FRAME_TYPES)[number];