@yefengr/pi-reach 0.0.0-stage → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +110 -2
  3. package/dist/actions/handlers.d.ts +143 -0
  4. package/dist/actions/handlers.js +200 -0
  5. package/dist/actions/handlers.js.map +1 -0
  6. package/dist/actions/registry.d.ts +39 -0
  7. package/dist/actions/registry.js +58 -0
  8. package/dist/actions/registry.js.map +1 -0
  9. package/dist/actions/session_new_bridge.d.ts +35 -0
  10. package/dist/actions/session_new_bridge.js +88 -0
  11. package/dist/actions/session_new_bridge.js.map +1 -0
  12. package/dist/commands.d.ts +29 -0
  13. package/dist/commands.js +169 -0
  14. package/dist/commands.js.map +1 -0
  15. package/dist/config.d.ts +61 -0
  16. package/dist/config.js +115 -0
  17. package/dist/config.js.map +1 -0
  18. package/dist/index.d.ts +27 -0
  19. package/dist/index.js +618 -0
  20. package/dist/index.js.map +1 -0
  21. package/dist/pairing/crypto.d.ts +15 -0
  22. package/dist/pairing/crypto.js +72 -0
  23. package/dist/pairing/crypto.js.map +1 -0
  24. package/dist/pairing/identity-keyring.d.ts +22 -0
  25. package/dist/pairing/identity-keyring.js +94 -0
  26. package/dist/pairing/identity-keyring.js.map +1 -0
  27. package/dist/pairing/identity-lock.d.ts +14 -0
  28. package/dist/pairing/identity-lock.js +116 -0
  29. package/dist/pairing/identity-lock.js.map +1 -0
  30. package/dist/pairing/owner_storage.d.ts +61 -0
  31. package/dist/pairing/owner_storage.js +263 -0
  32. package/dist/pairing/owner_storage.js.map +1 -0
  33. package/dist/pairing/qr.d.ts +39 -0
  34. package/dist/pairing/qr.js +113 -0
  35. package/dist/pairing/qr.js.map +1 -0
  36. package/dist/pairing/storage.d.ts +36 -0
  37. package/dist/pairing/storage.js +263 -0
  38. package/dist/pairing/storage.js.map +1 -0
  39. package/dist/protocol/types.d.ts +225 -0
  40. package/dist/protocol/types.js +2 -0
  41. package/dist/protocol/types.js.map +1 -0
  42. package/dist/protocol/v2/codec.d.ts +6 -0
  43. package/dist/protocol/v2/codec.js +4 -0
  44. package/dist/protocol/v2/codec.js.map +1 -0
  45. package/dist/protocol/v2/index.d.ts +4 -0
  46. package/dist/protocol/v2/index.js +5 -0
  47. package/dist/protocol/v2/index.js.map +1 -0
  48. package/dist/protocol/v2/marker.d.ts +45 -0
  49. package/dist/protocol/v2/marker.js +47 -0
  50. package/dist/protocol/v2/marker.js.map +1 -0
  51. package/dist/protocol/v2/schemas.d.ts +3 -0
  52. package/dist/protocol/v2/schemas.js +4 -0
  53. package/dist/protocol/v2/schemas.js.map +1 -0
  54. package/dist/protocol/v2/session_state.d.ts +79 -0
  55. package/dist/protocol/v2/session_state.js +166 -0
  56. package/dist/protocol/v2/session_state.js.map +1 -0
  57. package/dist/runtime/endpoint_metadata.d.ts +14 -0
  58. package/dist/runtime/endpoint_metadata.js +18 -0
  59. package/dist/runtime/endpoint_metadata.js.map +1 -0
  60. package/dist/runtime/extension_owner.d.ts +12 -0
  61. package/dist/runtime/extension_owner.js +80 -0
  62. package/dist/runtime/extension_owner.js.map +1 -0
  63. package/dist/runtime/footer.d.ts +6 -0
  64. package/dist/runtime/footer.js +21 -0
  65. package/dist/runtime/footer.js.map +1 -0
  66. package/dist/runtime/owner_router.d.ts +16 -0
  67. package/dist/runtime/owner_router.js +41 -0
  68. package/dist/runtime/owner_router.js.map +1 -0
  69. package/dist/runtime/pairing_coordinator.d.ts +42 -0
  70. package/dist/runtime/pairing_coordinator.js +136 -0
  71. package/dist/runtime/pairing_coordinator.js.map +1 -0
  72. package/dist/runtime/relay_lifecycle.d.ts +64 -0
  73. package/dist/runtime/relay_lifecycle.js +275 -0
  74. package/dist/runtime/relay_lifecycle.js.map +1 -0
  75. package/dist/session/local_config.d.ts +7 -0
  76. package/dist/session/local_config.js +52 -0
  77. package/dist/session/local_config.js.map +1 -0
  78. package/dist/timeline/history.d.ts +30 -0
  79. package/dist/timeline/history.js +170 -0
  80. package/dist/timeline/history.js.map +1 -0
  81. package/dist/timeline/partial_delta.d.ts +2 -0
  82. package/dist/timeline/partial_delta.js +16 -0
  83. package/dist/timeline/partial_delta.js.map +1 -0
  84. package/dist/timeline/run_end.d.ts +16 -0
  85. package/dist/timeline/run_end.js +23 -0
  86. package/dist/timeline/run_end.js.map +1 -0
  87. package/dist/timeline/runtime.d.ts +89 -0
  88. package/dist/timeline/runtime.js +546 -0
  89. package/dist/timeline/runtime.js.map +1 -0
  90. package/dist/timeline/sequence.d.ts +7 -0
  91. package/dist/timeline/sequence.js +16 -0
  92. package/dist/timeline/sequence.js.map +1 -0
  93. package/dist/timeline/tool_lifecycle.d.ts +36 -0
  94. package/dist/timeline/tool_lifecycle.js +171 -0
  95. package/dist/timeline/tool_lifecycle.js.map +1 -0
  96. package/dist/timeline/user_delivery.d.ts +96 -0
  97. package/dist/timeline/user_delivery.js +360 -0
  98. package/dist/timeline/user_delivery.js.map +1 -0
  99. package/dist/timeline/user_delivery_binding.d.ts +43 -0
  100. package/dist/timeline/user_delivery_binding.js +107 -0
  101. package/dist/timeline/user_delivery_binding.js.map +1 -0
  102. package/dist/timeline/v2_service.d.ts +82 -0
  103. package/dist/timeline/v2_service.js +512 -0
  104. package/dist/timeline/v2_service.js.map +1 -0
  105. package/dist/transport/peer_channel.d.ts +34 -0
  106. package/dist/transport/peer_channel.js +116 -0
  107. package/dist/transport/peer_channel.js.map +1 -0
  108. package/dist/transport/relay_client.d.ts +54 -0
  109. package/dist/transport/relay_client.js +270 -0
  110. package/dist/transport/relay_client.js.map +1 -0
  111. package/dist/vendor/protocol/constants.d.ts +4 -0
  112. package/dist/vendor/protocol/constants.js +4 -0
  113. package/dist/vendor/protocol/encoding.d.ts +9 -0
  114. package/dist/vendor/protocol/encoding.js +66 -0
  115. package/dist/vendor/protocol/outer/codec.d.ts +13 -0
  116. package/dist/vendor/protocol/outer/codec.js +105 -0
  117. package/dist/vendor/protocol/outer/index.d.ts +4 -0
  118. package/dist/vendor/protocol/outer/index.js +4 -0
  119. package/dist/vendor/protocol/outer/types.d.ts +120 -0
  120. package/dist/vendor/protocol/outer/types.js +1 -0
  121. package/dist/vendor/protocol/session/codec.d.ts +41 -0
  122. package/dist/vendor/protocol/session/codec.js +236 -0
  123. package/dist/vendor/protocol/session/frames.d.ts +5220 -0
  124. package/dist/vendor/protocol/session/frames.js +83 -0
  125. package/dist/vendor/protocol/session/index.d.ts +3 -0
  126. package/dist/vendor/protocol/session/index.js +3 -0
  127. package/dist/vendor/protocol/session/schema.d.ts +858 -0
  128. package/dist/vendor/protocol/session/schema.js +256 -0
  129. package/package.json +74 -3
@@ -0,0 +1,858 @@
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 leafIdSchema: z.ZodNullable<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
+ leaf_id: z.ZodNullable<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
+ leaf_id: z.ZodNullable<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
+ leaf_id: z.ZodNullable<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
+ leaf_id: z.ZodNullable<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
+ leaf_id: z.ZodNullable<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
+ leaf_id: z.ZodNullable<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
+ leaf_id: z.ZodNullable<z.ZodString>;
207
+ timestamp: z.ZodNumber;
208
+ }, z.core.$strict>;
209
+ /** One Pi run (agent_start → agent_end) has finished; the group it closes is `group_id`. */
210
+ export declare const timelineRunEndEventSchema: z.ZodObject<{
211
+ kind: z.ZodLiteral<"run_end">;
212
+ status: z.ZodEnum<{
213
+ error: "error";
214
+ complete: "complete";
215
+ interrupted: "interrupted";
216
+ }>;
217
+ group_id: z.ZodString;
218
+ event_id: z.ZodString;
219
+ event_seq: z.ZodOptional<z.ZodNumber>;
220
+ session_id: z.ZodString;
221
+ leaf_id: z.ZodNullable<z.ZodString>;
222
+ timestamp: z.ZodNumber;
223
+ }, z.core.$strict>;
224
+ export declare const timelineEventSchema: z.ZodUnion<readonly [z.ZodObject<{
225
+ kind: z.ZodLiteral<"user">;
226
+ message_id: z.ZodString;
227
+ blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
228
+ type: z.ZodLiteral<"text">;
229
+ text: z.ZodString;
230
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
231
+ }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
232
+ type: z.ZodLiteral<"image">;
233
+ mime_type: z.ZodString;
234
+ data: z.ZodString;
235
+ byte_length: z.ZodNumber;
236
+ }, z.core.$strict>, z.ZodObject<{
237
+ type: z.ZodLiteral<"image">;
238
+ mime_type: z.ZodString;
239
+ byte_length: z.ZodNumber;
240
+ omitted: z.ZodLiteral<true>;
241
+ }, z.core.$strict>]>]>>;
242
+ origin: z.ZodEnum<{
243
+ unknown: "unknown";
244
+ pwa: "pwa";
245
+ extension: "extension";
246
+ }>;
247
+ sender_ref: z.ZodOptional<z.ZodString>;
248
+ delivery: z.ZodEnum<{
249
+ unknown: "unknown";
250
+ normal: "normal";
251
+ queued: "queued";
252
+ }>;
253
+ status: z.ZodLiteral<"committed">;
254
+ group_id: z.ZodString;
255
+ event_id: z.ZodString;
256
+ event_seq: z.ZodOptional<z.ZodNumber>;
257
+ session_id: z.ZodString;
258
+ leaf_id: z.ZodNullable<z.ZodString>;
259
+ timestamp: z.ZodNumber;
260
+ }, z.core.$strict>, z.ZodObject<{
261
+ kind: z.ZodLiteral<"assistant">;
262
+ blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
263
+ type: z.ZodLiteral<"text">;
264
+ text: z.ZodString;
265
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
266
+ }, z.core.$strict>, z.ZodObject<{
267
+ type: z.ZodLiteral<"thinking">;
268
+ text: z.ZodString;
269
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
270
+ }, z.core.$strict>]>>;
271
+ status: z.ZodEnum<{
272
+ complete: "complete";
273
+ interrupted: "interrupted";
274
+ }>;
275
+ group_id: z.ZodString;
276
+ event_id: z.ZodString;
277
+ event_seq: z.ZodOptional<z.ZodNumber>;
278
+ session_id: z.ZodString;
279
+ leaf_id: z.ZodNullable<z.ZodString>;
280
+ timestamp: z.ZodNumber;
281
+ }, z.core.$strict>, z.ZodUnion<readonly [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<"complete">;
288
+ result: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
289
+ error: z.ZodOptional<z.ZodNever>;
290
+ group_id: z.ZodString;
291
+ event_id: z.ZodString;
292
+ event_seq: z.ZodOptional<z.ZodNumber>;
293
+ session_id: z.ZodString;
294
+ leaf_id: z.ZodNullable<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<"error">;
303
+ result: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
304
+ error: z.ZodString;
305
+ group_id: z.ZodString;
306
+ event_id: z.ZodString;
307
+ event_seq: z.ZodOptional<z.ZodNumber>;
308
+ session_id: z.ZodString;
309
+ leaf_id: z.ZodNullable<z.ZodString>;
310
+ timestamp: z.ZodNumber;
311
+ }, z.core.$strict>, z.ZodObject<{
312
+ kind: z.ZodLiteral<"tool">;
313
+ tool_call_id: z.ZodString;
314
+ tool: z.ZodString;
315
+ args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
316
+ truncated: z.ZodBoolean;
317
+ status: z.ZodLiteral<"interrupted">;
318
+ result: z.ZodOptional<z.ZodNever>;
319
+ error: z.ZodOptional<z.ZodNever>;
320
+ group_id: z.ZodString;
321
+ event_id: z.ZodString;
322
+ event_seq: z.ZodOptional<z.ZodNumber>;
323
+ session_id: z.ZodString;
324
+ leaf_id: z.ZodNullable<z.ZodString>;
325
+ timestamp: z.ZodNumber;
326
+ }, z.core.$strict>]>, z.ZodObject<{
327
+ kind: z.ZodEnum<{
328
+ custom: "custom";
329
+ compaction: "compaction";
330
+ branch_summary: "branch_summary";
331
+ }>;
332
+ group_id: z.ZodOptional<z.ZodString>;
333
+ payload: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
334
+ truncated: z.ZodBoolean;
335
+ event_id: z.ZodString;
336
+ event_seq: z.ZodOptional<z.ZodNumber>;
337
+ session_id: z.ZodString;
338
+ leaf_id: z.ZodNullable<z.ZodString>;
339
+ timestamp: z.ZodNumber;
340
+ }, z.core.$strict>, z.ZodObject<{
341
+ kind: z.ZodLiteral<"provider_error">;
342
+ message: z.ZodString;
343
+ group_id: z.ZodString;
344
+ event_id: z.ZodString;
345
+ event_seq: z.ZodOptional<z.ZodNumber>;
346
+ session_id: z.ZodString;
347
+ leaf_id: z.ZodNullable<z.ZodString>;
348
+ timestamp: z.ZodNumber;
349
+ }, z.core.$strict>, z.ZodObject<{
350
+ kind: z.ZodLiteral<"run_end">;
351
+ status: z.ZodEnum<{
352
+ error: "error";
353
+ complete: "complete";
354
+ interrupted: "interrupted";
355
+ }>;
356
+ group_id: z.ZodString;
357
+ event_id: z.ZodString;
358
+ event_seq: z.ZodOptional<z.ZodNumber>;
359
+ session_id: z.ZodString;
360
+ leaf_id: z.ZodNullable<z.ZodString>;
361
+ timestamp: z.ZodNumber;
362
+ }, z.core.$strict>]>;
363
+ export declare const TimelineEventSchema: z.ZodUnion<readonly [z.ZodObject<{
364
+ kind: z.ZodLiteral<"user">;
365
+ message_id: z.ZodString;
366
+ blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
367
+ type: z.ZodLiteral<"text">;
368
+ text: z.ZodString;
369
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
370
+ }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
371
+ type: z.ZodLiteral<"image">;
372
+ mime_type: z.ZodString;
373
+ data: z.ZodString;
374
+ byte_length: z.ZodNumber;
375
+ }, z.core.$strict>, z.ZodObject<{
376
+ type: z.ZodLiteral<"image">;
377
+ mime_type: z.ZodString;
378
+ byte_length: z.ZodNumber;
379
+ omitted: z.ZodLiteral<true>;
380
+ }, z.core.$strict>]>]>>;
381
+ origin: z.ZodEnum<{
382
+ unknown: "unknown";
383
+ pwa: "pwa";
384
+ extension: "extension";
385
+ }>;
386
+ sender_ref: z.ZodOptional<z.ZodString>;
387
+ delivery: z.ZodEnum<{
388
+ unknown: "unknown";
389
+ normal: "normal";
390
+ queued: "queued";
391
+ }>;
392
+ status: z.ZodLiteral<"committed">;
393
+ group_id: z.ZodString;
394
+ event_id: z.ZodString;
395
+ event_seq: z.ZodOptional<z.ZodNumber>;
396
+ session_id: z.ZodString;
397
+ leaf_id: z.ZodNullable<z.ZodString>;
398
+ timestamp: z.ZodNumber;
399
+ }, z.core.$strict>, z.ZodObject<{
400
+ kind: z.ZodLiteral<"assistant">;
401
+ blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
402
+ type: z.ZodLiteral<"text">;
403
+ text: z.ZodString;
404
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
405
+ }, z.core.$strict>, z.ZodObject<{
406
+ type: z.ZodLiteral<"thinking">;
407
+ text: z.ZodString;
408
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
409
+ }, z.core.$strict>]>>;
410
+ status: z.ZodEnum<{
411
+ complete: "complete";
412
+ interrupted: "interrupted";
413
+ }>;
414
+ group_id: z.ZodString;
415
+ event_id: z.ZodString;
416
+ event_seq: z.ZodOptional<z.ZodNumber>;
417
+ session_id: z.ZodString;
418
+ leaf_id: z.ZodNullable<z.ZodString>;
419
+ timestamp: z.ZodNumber;
420
+ }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
421
+ kind: z.ZodLiteral<"tool">;
422
+ tool_call_id: z.ZodString;
423
+ tool: z.ZodString;
424
+ args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
425
+ truncated: z.ZodBoolean;
426
+ status: z.ZodLiteral<"complete">;
427
+ result: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
428
+ error: z.ZodOptional<z.ZodNever>;
429
+ group_id: z.ZodString;
430
+ event_id: z.ZodString;
431
+ event_seq: z.ZodOptional<z.ZodNumber>;
432
+ session_id: z.ZodString;
433
+ leaf_id: z.ZodNullable<z.ZodString>;
434
+ timestamp: z.ZodNumber;
435
+ }, z.core.$strict>, z.ZodObject<{
436
+ kind: z.ZodLiteral<"tool">;
437
+ tool_call_id: z.ZodString;
438
+ tool: z.ZodString;
439
+ args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
440
+ truncated: z.ZodBoolean;
441
+ status: z.ZodLiteral<"error">;
442
+ result: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
443
+ error: z.ZodString;
444
+ group_id: z.ZodString;
445
+ event_id: z.ZodString;
446
+ event_seq: z.ZodOptional<z.ZodNumber>;
447
+ session_id: z.ZodString;
448
+ leaf_id: z.ZodNullable<z.ZodString>;
449
+ timestamp: z.ZodNumber;
450
+ }, z.core.$strict>, z.ZodObject<{
451
+ kind: z.ZodLiteral<"tool">;
452
+ tool_call_id: z.ZodString;
453
+ tool: z.ZodString;
454
+ args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
455
+ truncated: z.ZodBoolean;
456
+ status: z.ZodLiteral<"interrupted">;
457
+ result: z.ZodOptional<z.ZodNever>;
458
+ error: z.ZodOptional<z.ZodNever>;
459
+ group_id: z.ZodString;
460
+ event_id: z.ZodString;
461
+ event_seq: z.ZodOptional<z.ZodNumber>;
462
+ session_id: z.ZodString;
463
+ leaf_id: z.ZodNullable<z.ZodString>;
464
+ timestamp: z.ZodNumber;
465
+ }, z.core.$strict>]>, z.ZodObject<{
466
+ kind: z.ZodEnum<{
467
+ custom: "custom";
468
+ compaction: "compaction";
469
+ branch_summary: "branch_summary";
470
+ }>;
471
+ group_id: z.ZodOptional<z.ZodString>;
472
+ payload: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
473
+ truncated: z.ZodBoolean;
474
+ event_id: z.ZodString;
475
+ event_seq: z.ZodOptional<z.ZodNumber>;
476
+ session_id: z.ZodString;
477
+ leaf_id: z.ZodNullable<z.ZodString>;
478
+ timestamp: z.ZodNumber;
479
+ }, z.core.$strict>, z.ZodObject<{
480
+ kind: z.ZodLiteral<"provider_error">;
481
+ message: z.ZodString;
482
+ group_id: z.ZodString;
483
+ event_id: z.ZodString;
484
+ event_seq: z.ZodOptional<z.ZodNumber>;
485
+ session_id: z.ZodString;
486
+ leaf_id: z.ZodNullable<z.ZodString>;
487
+ timestamp: z.ZodNumber;
488
+ }, z.core.$strict>, z.ZodObject<{
489
+ kind: z.ZodLiteral<"run_end">;
490
+ status: z.ZodEnum<{
491
+ error: "error";
492
+ complete: "complete";
493
+ interrupted: "interrupted";
494
+ }>;
495
+ group_id: z.ZodString;
496
+ event_id: z.ZodString;
497
+ event_seq: z.ZodOptional<z.ZodNumber>;
498
+ session_id: z.ZodString;
499
+ leaf_id: z.ZodNullable<z.ZodString>;
500
+ timestamp: z.ZodNumber;
501
+ }, z.core.$strict>]>;
502
+ export declare const sequencedTimelineEventSchema: z.ZodIntersection<z.ZodUnion<readonly [z.ZodObject<{
503
+ kind: z.ZodLiteral<"user">;
504
+ message_id: z.ZodString;
505
+ blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
506
+ type: z.ZodLiteral<"text">;
507
+ text: z.ZodString;
508
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
509
+ }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
510
+ type: z.ZodLiteral<"image">;
511
+ mime_type: z.ZodString;
512
+ data: z.ZodString;
513
+ byte_length: z.ZodNumber;
514
+ }, z.core.$strict>, z.ZodObject<{
515
+ type: z.ZodLiteral<"image">;
516
+ mime_type: z.ZodString;
517
+ byte_length: z.ZodNumber;
518
+ omitted: z.ZodLiteral<true>;
519
+ }, z.core.$strict>]>]>>;
520
+ origin: z.ZodEnum<{
521
+ unknown: "unknown";
522
+ pwa: "pwa";
523
+ extension: "extension";
524
+ }>;
525
+ sender_ref: z.ZodOptional<z.ZodString>;
526
+ delivery: z.ZodEnum<{
527
+ unknown: "unknown";
528
+ normal: "normal";
529
+ queued: "queued";
530
+ }>;
531
+ status: z.ZodLiteral<"committed">;
532
+ group_id: z.ZodString;
533
+ event_id: z.ZodString;
534
+ event_seq: z.ZodOptional<z.ZodNumber>;
535
+ session_id: z.ZodString;
536
+ leaf_id: z.ZodNullable<z.ZodString>;
537
+ timestamp: z.ZodNumber;
538
+ }, z.core.$strict>, z.ZodObject<{
539
+ kind: z.ZodLiteral<"assistant">;
540
+ blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
541
+ type: z.ZodLiteral<"text">;
542
+ text: z.ZodString;
543
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
544
+ }, z.core.$strict>, z.ZodObject<{
545
+ type: z.ZodLiteral<"thinking">;
546
+ text: z.ZodString;
547
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
548
+ }, z.core.$strict>]>>;
549
+ status: z.ZodEnum<{
550
+ complete: "complete";
551
+ interrupted: "interrupted";
552
+ }>;
553
+ group_id: z.ZodString;
554
+ event_id: z.ZodString;
555
+ event_seq: z.ZodOptional<z.ZodNumber>;
556
+ session_id: z.ZodString;
557
+ leaf_id: z.ZodNullable<z.ZodString>;
558
+ timestamp: z.ZodNumber;
559
+ }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
560
+ kind: z.ZodLiteral<"tool">;
561
+ tool_call_id: z.ZodString;
562
+ tool: z.ZodString;
563
+ args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
564
+ truncated: z.ZodBoolean;
565
+ status: z.ZodLiteral<"complete">;
566
+ result: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
567
+ error: z.ZodOptional<z.ZodNever>;
568
+ group_id: z.ZodString;
569
+ event_id: z.ZodString;
570
+ event_seq: z.ZodOptional<z.ZodNumber>;
571
+ session_id: z.ZodString;
572
+ leaf_id: z.ZodNullable<z.ZodString>;
573
+ timestamp: z.ZodNumber;
574
+ }, z.core.$strict>, z.ZodObject<{
575
+ kind: z.ZodLiteral<"tool">;
576
+ tool_call_id: z.ZodString;
577
+ tool: z.ZodString;
578
+ args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
579
+ truncated: z.ZodBoolean;
580
+ status: z.ZodLiteral<"error">;
581
+ result: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
582
+ error: z.ZodString;
583
+ group_id: z.ZodString;
584
+ event_id: z.ZodString;
585
+ event_seq: z.ZodOptional<z.ZodNumber>;
586
+ session_id: z.ZodString;
587
+ leaf_id: z.ZodNullable<z.ZodString>;
588
+ timestamp: z.ZodNumber;
589
+ }, z.core.$strict>, z.ZodObject<{
590
+ kind: z.ZodLiteral<"tool">;
591
+ tool_call_id: z.ZodString;
592
+ tool: z.ZodString;
593
+ args: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
594
+ truncated: z.ZodBoolean;
595
+ status: z.ZodLiteral<"interrupted">;
596
+ result: z.ZodOptional<z.ZodNever>;
597
+ error: z.ZodOptional<z.ZodNever>;
598
+ group_id: z.ZodString;
599
+ event_id: z.ZodString;
600
+ event_seq: z.ZodOptional<z.ZodNumber>;
601
+ session_id: z.ZodString;
602
+ leaf_id: z.ZodNullable<z.ZodString>;
603
+ timestamp: z.ZodNumber;
604
+ }, z.core.$strict>]>, z.ZodObject<{
605
+ kind: z.ZodEnum<{
606
+ custom: "custom";
607
+ compaction: "compaction";
608
+ branch_summary: "branch_summary";
609
+ }>;
610
+ group_id: z.ZodOptional<z.ZodString>;
611
+ payload: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
612
+ truncated: z.ZodBoolean;
613
+ event_id: z.ZodString;
614
+ event_seq: z.ZodOptional<z.ZodNumber>;
615
+ session_id: z.ZodString;
616
+ leaf_id: z.ZodNullable<z.ZodString>;
617
+ timestamp: z.ZodNumber;
618
+ }, z.core.$strict>, z.ZodObject<{
619
+ kind: z.ZodLiteral<"provider_error">;
620
+ message: z.ZodString;
621
+ group_id: z.ZodString;
622
+ event_id: z.ZodString;
623
+ event_seq: z.ZodOptional<z.ZodNumber>;
624
+ session_id: z.ZodString;
625
+ leaf_id: z.ZodNullable<z.ZodString>;
626
+ timestamp: z.ZodNumber;
627
+ }, z.core.$strict>, z.ZodObject<{
628
+ kind: z.ZodLiteral<"run_end">;
629
+ status: z.ZodEnum<{
630
+ error: "error";
631
+ complete: "complete";
632
+ interrupted: "interrupted";
633
+ }>;
634
+ group_id: z.ZodString;
635
+ event_id: z.ZodString;
636
+ event_seq: z.ZodOptional<z.ZodNumber>;
637
+ session_id: z.ZodString;
638
+ leaf_id: z.ZodNullable<z.ZodString>;
639
+ timestamp: z.ZodNumber;
640
+ }, z.core.$strict>]>, z.ZodObject<{
641
+ event_seq: z.ZodNumber;
642
+ }, z.core.$strip>>;
643
+ export type TimelineEvent = z.infer<typeof timelineEventSchema>;
644
+ export type SequencedTimelineEvent = z.infer<typeof sequencedTimelineEventSchema>;
645
+ export type TimelineUserEvent = z.infer<typeof timelineUserEventSchema>;
646
+ export type TimelineRunEndEvent = z.infer<typeof timelineRunEndEventSchema>;
647
+ export declare const timelinePartialSchema: z.ZodUnion<readonly [z.ZodObject<{
648
+ delta: z.ZodOptional<z.ZodString>;
649
+ kind: z.ZodLiteral<"assistant">;
650
+ blocks: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
651
+ type: z.ZodLiteral<"text">;
652
+ text: z.ZodString;
653
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
654
+ }, z.core.$strict>, z.ZodObject<{
655
+ type: z.ZodLiteral<"thinking">;
656
+ text: z.ZodString;
657
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
658
+ }, z.core.$strict>]>>>;
659
+ protocol_version: z.ZodLiteral<2>;
660
+ type: z.ZodLiteral<"timeline_partial">;
661
+ session_id: z.ZodString;
662
+ leaf_id: z.ZodNullable<z.ZodString>;
663
+ group_id: z.ZodString;
664
+ partial_id: z.ZodString;
665
+ status: z.ZodEnum<{
666
+ running: "running";
667
+ delta: "delta";
668
+ }>;
669
+ }, z.core.$strict>, z.ZodObject<{
670
+ delta: z.ZodOptional<z.ZodString>;
671
+ kind: z.ZodLiteral<"thinking">;
672
+ blocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
673
+ type: z.ZodLiteral<"thinking">;
674
+ text: z.ZodString;
675
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
676
+ }, z.core.$strict>>>;
677
+ protocol_version: z.ZodLiteral<2>;
678
+ type: z.ZodLiteral<"timeline_partial">;
679
+ session_id: z.ZodString;
680
+ leaf_id: z.ZodNullable<z.ZodString>;
681
+ group_id: z.ZodString;
682
+ partial_id: z.ZodString;
683
+ status: z.ZodEnum<{
684
+ running: "running";
685
+ delta: "delta";
686
+ }>;
687
+ }, z.core.$strict>, z.ZodObject<{
688
+ delta: z.ZodOptional<z.ZodString>;
689
+ kind: z.ZodLiteral<"tool">;
690
+ tool_call_id: z.ZodString;
691
+ tool: z.ZodString;
692
+ args: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
693
+ blocks: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
694
+ type: z.ZodLiteral<"text">;
695
+ text: z.ZodString;
696
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
697
+ }, z.core.$strict>, z.ZodObject<{
698
+ type: z.ZodLiteral<"thinking">;
699
+ text: z.ZodString;
700
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
701
+ }, z.core.$strict>]>>>;
702
+ protocol_version: z.ZodLiteral<2>;
703
+ type: z.ZodLiteral<"timeline_partial">;
704
+ session_id: z.ZodString;
705
+ leaf_id: z.ZodNullable<z.ZodString>;
706
+ group_id: z.ZodString;
707
+ partial_id: z.ZodString;
708
+ status: z.ZodEnum<{
709
+ running: "running";
710
+ delta: "delta";
711
+ }>;
712
+ }, z.core.$strict>]>;
713
+ export declare const TimelinePartialSchema: z.ZodUnion<readonly [z.ZodObject<{
714
+ delta: z.ZodOptional<z.ZodString>;
715
+ kind: z.ZodLiteral<"assistant">;
716
+ blocks: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
717
+ type: z.ZodLiteral<"text">;
718
+ text: z.ZodString;
719
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
720
+ }, z.core.$strict>, z.ZodObject<{
721
+ type: z.ZodLiteral<"thinking">;
722
+ text: z.ZodString;
723
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
724
+ }, z.core.$strict>]>>>;
725
+ protocol_version: z.ZodLiteral<2>;
726
+ type: z.ZodLiteral<"timeline_partial">;
727
+ session_id: z.ZodString;
728
+ leaf_id: z.ZodNullable<z.ZodString>;
729
+ group_id: z.ZodString;
730
+ partial_id: z.ZodString;
731
+ status: z.ZodEnum<{
732
+ running: "running";
733
+ delta: "delta";
734
+ }>;
735
+ }, z.core.$strict>, z.ZodObject<{
736
+ delta: z.ZodOptional<z.ZodString>;
737
+ kind: z.ZodLiteral<"thinking">;
738
+ blocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
739
+ type: z.ZodLiteral<"thinking">;
740
+ text: z.ZodString;
741
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
742
+ }, z.core.$strict>>>;
743
+ protocol_version: z.ZodLiteral<2>;
744
+ type: z.ZodLiteral<"timeline_partial">;
745
+ session_id: z.ZodString;
746
+ leaf_id: z.ZodNullable<z.ZodString>;
747
+ group_id: z.ZodString;
748
+ partial_id: z.ZodString;
749
+ status: z.ZodEnum<{
750
+ running: "running";
751
+ delta: "delta";
752
+ }>;
753
+ }, z.core.$strict>, z.ZodObject<{
754
+ delta: z.ZodOptional<z.ZodString>;
755
+ kind: z.ZodLiteral<"tool">;
756
+ tool_call_id: z.ZodString;
757
+ tool: z.ZodString;
758
+ args: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
759
+ blocks: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
760
+ type: z.ZodLiteral<"text">;
761
+ text: z.ZodString;
762
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
763
+ }, z.core.$strict>, z.ZodObject<{
764
+ type: z.ZodLiteral<"thinking">;
765
+ text: z.ZodString;
766
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
767
+ }, z.core.$strict>]>>>;
768
+ protocol_version: z.ZodLiteral<2>;
769
+ type: z.ZodLiteral<"timeline_partial">;
770
+ session_id: z.ZodString;
771
+ leaf_id: z.ZodNullable<z.ZodString>;
772
+ group_id: z.ZodString;
773
+ partial_id: z.ZodString;
774
+ status: z.ZodEnum<{
775
+ running: "running";
776
+ delta: "delta";
777
+ }>;
778
+ }, z.core.$strict>]>;
779
+ export type TimelinePartial = z.infer<typeof timelinePartialSchema>;
780
+ export declare const base64Schema: z.ZodString;
781
+ export declare const timelineEventFragmentSchema: z.ZodObject<{
782
+ event_id: z.ZodString;
783
+ index: z.ZodNumber;
784
+ data_base64: z.ZodString;
785
+ final: z.ZodBoolean;
786
+ }, z.core.$strict>;
787
+ export type TimelineEventFragment = z.infer<typeof timelineEventFragmentSchema>;
788
+ export declare const historyFragmentSchema: z.ZodObject<{
789
+ event_id: z.ZodString;
790
+ index: z.ZodNumber;
791
+ data_base64: z.ZodString;
792
+ final: z.ZodBoolean;
793
+ }, z.core.$strict>;
794
+ export declare const TimelineEventFragmentSchema: z.ZodObject<{
795
+ event_id: z.ZodString;
796
+ index: z.ZodNumber;
797
+ data_base64: z.ZodString;
798
+ final: z.ZodBoolean;
799
+ }, z.core.$strict>;
800
+ export declare const HistoryFragmentSchema: z.ZodObject<{
801
+ event_id: z.ZodString;
802
+ index: z.ZodNumber;
803
+ data_base64: z.ZodString;
804
+ final: z.ZodBoolean;
805
+ }, z.core.$strict>;
806
+ export declare const thinkingLevelSchema: z.ZodEnum<{
807
+ off: "off";
808
+ minimal: "minimal";
809
+ low: "low";
810
+ medium: "medium";
811
+ high: "high";
812
+ xhigh: "xhigh";
813
+ }>;
814
+ export type ThinkingLevel = z.infer<typeof thinkingLevelSchema>;
815
+ export declare const actionNameSchema: z.ZodEnum<{
816
+ session_new: "session_new";
817
+ session_compact: "session_compact";
818
+ model_set: "model_set";
819
+ thinking_set: "thinking_set";
820
+ }>;
821
+ export declare const byeReasonSchema: z.ZodEnum<{
822
+ peer_stop: "peer_stop";
823
+ session_replaced: "session_replaced";
824
+ shutdown: "shutdown";
825
+ }>;
826
+ export declare const wireImageSchema: z.ZodObject<{
827
+ data: z.ZodString;
828
+ mime: z.ZodString;
829
+ }, z.core.$strict>;
830
+ export type WireImage = z.infer<typeof wireImageSchema>;
831
+ export declare const queuedMessageItemSchema: z.ZodObject<{
832
+ id: z.ZodString;
833
+ text: z.ZodString;
834
+ images: z.ZodOptional<z.ZodArray<z.ZodObject<{
835
+ data: z.ZodString;
836
+ mime: z.ZodString;
837
+ }, z.core.$strict>>>;
838
+ sender_ref: z.ZodOptional<z.ZodString>;
839
+ editable: z.ZodBoolean;
840
+ created_at: z.ZodNumber;
841
+ }, z.core.$strict>;
842
+ export declare const wireModelSchema: z.ZodObject<{
843
+ id: z.ZodString;
844
+ name: z.ZodString;
845
+ provider: z.ZodString;
846
+ reasoning: z.ZodBoolean;
847
+ context_window: z.ZodNumber;
848
+ vision: z.ZodBoolean;
849
+ }, z.core.$strict>;
850
+ export type WireModel = z.infer<typeof wireModelSchema>;
851
+ export declare const harnessSchema: z.ZodObject<{
852
+ name: z.ZodString;
853
+ version: z.ZodString;
854
+ }, z.core.$strict>;
855
+ 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"];
856
+ 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", "bye"];
857
+ export type ClientFrameType = (typeof CLIENT_FRAME_TYPES)[number];
858
+ export type ServerFrameType = (typeof SERVER_FRAME_TYPES)[number];