@yefengr/remote-pi 0.7.0

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