@agentknight/sdk 0.9.35

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.
@@ -0,0 +1,1962 @@
1
+ import { Logger } from 'pino';
2
+ import { z } from 'zod';
3
+ import { ManagerOptions, SocketOptions } from 'socket.io-client';
4
+
5
+ declare const OperationAckSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
6
+ ok: z.ZodLiteral<true>;
7
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
8
+ }, z.core.$strip>, z.ZodObject<{
9
+ ok: z.ZodLiteral<false>;
10
+ code: z.ZodString;
11
+ message: z.ZodString;
12
+ }, z.core.$strip>], "ok">;
13
+ type OperationAck = z.infer<typeof OperationAckSchema>;
14
+ declare const ProtocolErrorSchema: z.ZodObject<{
15
+ event: z.ZodString;
16
+ code: z.ZodString;
17
+ message: z.ZodString;
18
+ }, z.core.$strip>;
19
+ type ProtocolError = z.infer<typeof ProtocolErrorSchema>;
20
+
21
+ declare const SecureEventNameSchema: z.ZodEnum<{
22
+ "session.communication": "session.communication";
23
+ "session.list.result": "session.list.result";
24
+ "session.options.result": "session.options.result";
25
+ "session.create.result": "session.create.result";
26
+ "session.delete.result": "session.delete.result";
27
+ "session.configure.result": "session.configure.result";
28
+ "session.remote.result": "session.remote.result";
29
+ "session.timeline.page.result": "session.timeline.page.result";
30
+ "session.watch.result": "session.watch.result";
31
+ "session.prompt.result": "session.prompt.result";
32
+ "session.activity": "session.activity";
33
+ "session.abort.result": "session.abort.result";
34
+ "conversation.item.upsert": "conversation.item.upsert";
35
+ "conversation.activity.step.upsert": "conversation.activity.step.upsert";
36
+ "session.timeline.invalidated": "session.timeline.invalidated";
37
+ "interaction.request": "interaction.request";
38
+ "interaction.respond.result": "interaction.respond.result";
39
+ "permission.request": "permission.request";
40
+ "permission.respond.result": "permission.respond.result";
41
+ "sessions.snapshot": "sessions.snapshot";
42
+ "session.list": "session.list";
43
+ "session.options": "session.options";
44
+ "session.create": "session.create";
45
+ "session.delete": "session.delete";
46
+ "session.configure": "session.configure";
47
+ "session.remote": "session.remote";
48
+ "session.timeline.page": "session.timeline.page";
49
+ "session.watch": "session.watch";
50
+ "session.prompt": "session.prompt";
51
+ "session.abort": "session.abort";
52
+ "interaction.respond": "interaction.respond";
53
+ "permission.respond": "permission.respond";
54
+ }>;
55
+ type SecureEventName = z.infer<typeof SecureEventNameSchema>;
56
+
57
+ declare const SecureMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
58
+ sender: z.ZodLiteral<"pc">;
59
+ event: z.ZodEnum<{
60
+ "session.communication": "session.communication";
61
+ "session.list.result": "session.list.result";
62
+ "session.options.result": "session.options.result";
63
+ "session.create.result": "session.create.result";
64
+ "session.delete.result": "session.delete.result";
65
+ "session.configure.result": "session.configure.result";
66
+ "session.remote.result": "session.remote.result";
67
+ "session.timeline.page.result": "session.timeline.page.result";
68
+ "session.watch.result": "session.watch.result";
69
+ "session.prompt.result": "session.prompt.result";
70
+ "session.activity": "session.activity";
71
+ "session.abort.result": "session.abort.result";
72
+ "conversation.item.upsert": "conversation.item.upsert";
73
+ "conversation.activity.step.upsert": "conversation.activity.step.upsert";
74
+ "session.timeline.invalidated": "session.timeline.invalidated";
75
+ "interaction.request": "interaction.request";
76
+ "interaction.respond.result": "interaction.respond.result";
77
+ "permission.request": "permission.request";
78
+ "permission.respond.result": "permission.respond.result";
79
+ "sessions.snapshot": "sessions.snapshot";
80
+ }>;
81
+ version: z.ZodLiteral<1>;
82
+ algorithm: z.ZodLiteral<"A256GCM">;
83
+ messageId: z.ZodString;
84
+ machineId: z.ZodString;
85
+ clientId: z.ZodString;
86
+ recipientClientId: z.ZodOptional<z.ZodString>;
87
+ keyId: z.ZodString;
88
+ sentAt: z.ZodNumber;
89
+ nonce: z.ZodString;
90
+ ciphertext: z.ZodString;
91
+ }, z.core.$strict>, z.ZodObject<{
92
+ sender: z.ZodLiteral<"mobile">;
93
+ event: z.ZodEnum<{
94
+ "session.communication": "session.communication";
95
+ "session.list": "session.list";
96
+ "session.options": "session.options";
97
+ "session.create": "session.create";
98
+ "session.delete": "session.delete";
99
+ "session.configure": "session.configure";
100
+ "session.remote": "session.remote";
101
+ "session.timeline.page": "session.timeline.page";
102
+ "session.watch": "session.watch";
103
+ "session.prompt": "session.prompt";
104
+ "session.abort": "session.abort";
105
+ "interaction.respond": "interaction.respond";
106
+ "permission.respond": "permission.respond";
107
+ }>;
108
+ version: z.ZodLiteral<1>;
109
+ algorithm: z.ZodLiteral<"A256GCM">;
110
+ messageId: z.ZodString;
111
+ machineId: z.ZodString;
112
+ clientId: z.ZodString;
113
+ recipientClientId: z.ZodOptional<z.ZodString>;
114
+ keyId: z.ZodString;
115
+ sentAt: z.ZodNumber;
116
+ nonce: z.ZodString;
117
+ ciphertext: z.ZodString;
118
+ }, z.core.$strict>], "sender">;
119
+ type SecureMessage = z.infer<typeof SecureMessageSchema>;
120
+ declare const SecureDeliveryErrorSchema: z.ZodObject<{
121
+ messageId: z.ZodString;
122
+ event: z.ZodEnum<{
123
+ "session.communication": "session.communication";
124
+ "session.list.result": "session.list.result";
125
+ "session.options.result": "session.options.result";
126
+ "session.create.result": "session.create.result";
127
+ "session.delete.result": "session.delete.result";
128
+ "session.configure.result": "session.configure.result";
129
+ "session.remote.result": "session.remote.result";
130
+ "session.timeline.page.result": "session.timeline.page.result";
131
+ "session.watch.result": "session.watch.result";
132
+ "session.prompt.result": "session.prompt.result";
133
+ "session.activity": "session.activity";
134
+ "session.abort.result": "session.abort.result";
135
+ "conversation.item.upsert": "conversation.item.upsert";
136
+ "conversation.activity.step.upsert": "conversation.activity.step.upsert";
137
+ "session.timeline.invalidated": "session.timeline.invalidated";
138
+ "interaction.request": "interaction.request";
139
+ "interaction.respond.result": "interaction.respond.result";
140
+ "permission.request": "permission.request";
141
+ "permission.respond.result": "permission.respond.result";
142
+ "sessions.snapshot": "sessions.snapshot";
143
+ "session.list": "session.list";
144
+ "session.options": "session.options";
145
+ "session.create": "session.create";
146
+ "session.delete": "session.delete";
147
+ "session.configure": "session.configure";
148
+ "session.remote": "session.remote";
149
+ "session.timeline.page": "session.timeline.page";
150
+ "session.watch": "session.watch";
151
+ "session.prompt": "session.prompt";
152
+ "session.abort": "session.abort";
153
+ "interaction.respond": "interaction.respond";
154
+ "permission.respond": "permission.respond";
155
+ }>;
156
+ machineId: z.ZodString;
157
+ code: z.ZodEnum<{
158
+ MACHINE_OFFLINE: "MACHINE_OFFLINE";
159
+ IDENTITY_MISMATCH: "IDENTITY_MISMATCH";
160
+ KEY_ID_MISMATCH: "KEY_ID_MISMATCH";
161
+ INVALID_PAYLOAD: "INVALID_PAYLOAD";
162
+ SESSION_DELETE_UNSUPPORTED: "SESSION_DELETE_UNSUPPORTED";
163
+ SESSION_COMMUNICATION_UNSUPPORTED: "SESSION_COMMUNICATION_UNSUPPORTED";
164
+ }>;
165
+ message: z.ZodString;
166
+ }, z.core.$strict>;
167
+ type SecureDeliveryError = z.infer<typeof SecureDeliveryErrorSchema>;
168
+
169
+ declare const V2MachineHelloSchema: z.ZodUnion<readonly [z.ZodObject<{
170
+ protocolVersion: z.ZodLiteral<9>;
171
+ userId: z.ZodString;
172
+ machineId: z.ZodString;
173
+ machineName: z.ZodString;
174
+ platform: z.ZodString;
175
+ agentRunId: z.ZodString;
176
+ sdkVersion: z.ZodLiteral<"1.0.9">;
177
+ clientVersion: z.ZodOptional<z.ZodString>;
178
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
179
+ }, z.core.$strict>, z.ZodObject<{
180
+ protocolVersion: z.ZodLiteral<10>;
181
+ userId: z.ZodString;
182
+ machineId: z.ZodString;
183
+ machineName: z.ZodString;
184
+ platform: z.ZodString;
185
+ agentRunId: z.ZodString;
186
+ sdkVersion: z.ZodLiteral<"1.0.9">;
187
+ clientVersion: z.ZodOptional<z.ZodString>;
188
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
189
+ }, z.core.$strict>, z.ZodObject<{
190
+ protocolVersion: z.ZodLiteral<11>;
191
+ userId: z.ZodString;
192
+ machineId: z.ZodString;
193
+ machineName: z.ZodString;
194
+ platform: z.ZodString;
195
+ agentRunId: z.ZodString;
196
+ sdkVersion: z.ZodLiteral<"1.0.9">;
197
+ clientVersion: z.ZodOptional<z.ZodString>;
198
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
199
+ }, z.core.$strict>]>;
200
+ type V2MachineHello = z.infer<typeof V2MachineHelloSchema>;
201
+ declare const MachineHeartbeatSchema: z.ZodObject<{
202
+ userId: z.ZodString;
203
+ machineId: z.ZodString;
204
+ agentRunId: z.ZodString;
205
+ sentAt: z.ZodNumber;
206
+ }, z.core.$strip>;
207
+ type MachineHeartbeat = z.infer<typeof MachineHeartbeatSchema>;
208
+ declare const MachinePresenceSchema: z.ZodUnion<readonly [z.ZodObject<{
209
+ protocolVersion: z.ZodLiteral<9>;
210
+ userId: z.ZodString;
211
+ machineId: z.ZodString;
212
+ machineName: z.ZodString;
213
+ platform: z.ZodString;
214
+ agentRunId: z.ZodString;
215
+ sdkVersion: z.ZodLiteral<"1.0.9">;
216
+ clientVersion: z.ZodOptional<z.ZodString>;
217
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
218
+ online: z.ZodLiteral<true>;
219
+ connectedAt: z.ZodNumber;
220
+ lastSeen: z.ZodNumber;
221
+ }, z.core.$strip>, z.ZodObject<{
222
+ protocolVersion: z.ZodLiteral<10>;
223
+ userId: z.ZodString;
224
+ machineId: z.ZodString;
225
+ machineName: z.ZodString;
226
+ platform: z.ZodString;
227
+ agentRunId: z.ZodString;
228
+ sdkVersion: z.ZodLiteral<"1.0.9">;
229
+ clientVersion: z.ZodOptional<z.ZodString>;
230
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
231
+ online: z.ZodLiteral<true>;
232
+ connectedAt: z.ZodNumber;
233
+ lastSeen: z.ZodNumber;
234
+ }, z.core.$strip>, z.ZodObject<{
235
+ protocolVersion: z.ZodLiteral<11>;
236
+ userId: z.ZodString;
237
+ machineId: z.ZodString;
238
+ machineName: z.ZodString;
239
+ platform: z.ZodString;
240
+ agentRunId: z.ZodString;
241
+ sdkVersion: z.ZodLiteral<"1.0.9">;
242
+ clientVersion: z.ZodOptional<z.ZodString>;
243
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
244
+ online: z.ZodLiteral<true>;
245
+ connectedAt: z.ZodNumber;
246
+ lastSeen: z.ZodNumber;
247
+ }, z.core.$strip>]>;
248
+ type MachinePresence = z.infer<typeof MachinePresenceSchema>;
249
+ declare const MachineOfflineSchema: z.ZodObject<{
250
+ userId: z.ZodString;
251
+ machineId: z.ZodString;
252
+ agentRunId: z.ZodString;
253
+ disconnectedAt: z.ZodNumber;
254
+ }, z.core.$strip>;
255
+ type MachineOffline = z.infer<typeof MachineOfflineSchema>;
256
+ declare const MobileDisconnectedSchema: z.ZodObject<{
257
+ clientId: z.ZodString;
258
+ machineId: z.ZodString;
259
+ disconnectedAt: z.ZodNumber;
260
+ }, z.core.$strip>;
261
+ type MobileDisconnected = z.infer<typeof MobileDisconnectedSchema>;
262
+ declare const MobileConnectedSchema: z.ZodObject<{
263
+ clientId: z.ZodString;
264
+ machineId: z.ZodString;
265
+ connectedAt: z.ZodNumber;
266
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
267
+ }, z.core.$strip>;
268
+ type MobileConnected = z.infer<typeof MobileConnectedSchema>;
269
+ declare const MachineListRequestSchema: z.ZodObject<{
270
+ requestId: z.ZodString;
271
+ }, z.core.$strip>;
272
+ type MachineListRequest = z.infer<typeof MachineListRequestSchema>;
273
+ declare const MachineListResultSchema: z.ZodObject<{
274
+ requestId: z.ZodString;
275
+ machines: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
276
+ protocolVersion: z.ZodLiteral<9>;
277
+ userId: z.ZodString;
278
+ machineId: z.ZodString;
279
+ machineName: z.ZodString;
280
+ platform: z.ZodString;
281
+ agentRunId: z.ZodString;
282
+ sdkVersion: z.ZodLiteral<"1.0.9">;
283
+ clientVersion: z.ZodOptional<z.ZodString>;
284
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
285
+ online: z.ZodLiteral<true>;
286
+ connectedAt: z.ZodNumber;
287
+ lastSeen: z.ZodNumber;
288
+ }, z.core.$strip>, z.ZodObject<{
289
+ protocolVersion: z.ZodLiteral<10>;
290
+ userId: z.ZodString;
291
+ machineId: z.ZodString;
292
+ machineName: z.ZodString;
293
+ platform: z.ZodString;
294
+ agentRunId: z.ZodString;
295
+ sdkVersion: z.ZodLiteral<"1.0.9">;
296
+ clientVersion: z.ZodOptional<z.ZodString>;
297
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
298
+ online: z.ZodLiteral<true>;
299
+ connectedAt: z.ZodNumber;
300
+ lastSeen: z.ZodNumber;
301
+ }, z.core.$strip>, z.ZodObject<{
302
+ protocolVersion: z.ZodLiteral<11>;
303
+ userId: z.ZodString;
304
+ machineId: z.ZodString;
305
+ machineName: z.ZodString;
306
+ platform: z.ZodString;
307
+ agentRunId: z.ZodString;
308
+ sdkVersion: z.ZodLiteral<"1.0.9">;
309
+ clientVersion: z.ZodOptional<z.ZodString>;
310
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
311
+ online: z.ZodLiteral<true>;
312
+ connectedAt: z.ZodNumber;
313
+ lastSeen: z.ZodNumber;
314
+ }, z.core.$strip>]>>;
315
+ relayCapabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
316
+ }, z.core.$strip>;
317
+ type MachineListResult = z.infer<typeof MachineListResultSchema>;
318
+
319
+ declare const PeerMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
320
+ kind: z.ZodLiteral<"request">;
321
+ content: z.ZodString;
322
+ timeoutMs: z.ZodNumber;
323
+ version: z.ZodLiteral<1>;
324
+ messageId: z.ZodString;
325
+ sourceSessionId: z.ZodString;
326
+ targetMachineId: z.ZodString;
327
+ targetSessionId: z.ZodString;
328
+ }, z.core.$strict>, z.ZodObject<{
329
+ kind: z.ZodLiteral<"response">;
330
+ requestId: z.ZodString;
331
+ content: z.ZodString;
332
+ version: z.ZodLiteral<1>;
333
+ messageId: z.ZodString;
334
+ sourceSessionId: z.ZodString;
335
+ targetMachineId: z.ZodString;
336
+ targetSessionId: z.ZodString;
337
+ }, z.core.$strict>, z.ZodObject<{
338
+ kind: z.ZodLiteral<"error">;
339
+ requestId: z.ZodString;
340
+ code: z.ZodString;
341
+ message: z.ZodString;
342
+ version: z.ZodLiteral<1>;
343
+ messageId: z.ZodString;
344
+ sourceSessionId: z.ZodString;
345
+ targetMachineId: z.ZodString;
346
+ targetSessionId: z.ZodString;
347
+ }, z.core.$strict>, z.ZodObject<{
348
+ kind: z.ZodLiteral<"cancel">;
349
+ requestId: z.ZodString;
350
+ version: z.ZodLiteral<1>;
351
+ messageId: z.ZodString;
352
+ sourceSessionId: z.ZodString;
353
+ targetMachineId: z.ZodString;
354
+ targetSessionId: z.ZodString;
355
+ }, z.core.$strict>], "kind">;
356
+ type PeerMessage = z.infer<typeof PeerMessageSchema>;
357
+ declare const PeerDeliverySchema: z.ZodObject<{
358
+ sourceMachineId: z.ZodString;
359
+ message: z.ZodDiscriminatedUnion<[z.ZodObject<{
360
+ kind: z.ZodLiteral<"request">;
361
+ content: z.ZodString;
362
+ timeoutMs: z.ZodNumber;
363
+ version: z.ZodLiteral<1>;
364
+ messageId: z.ZodString;
365
+ sourceSessionId: z.ZodString;
366
+ targetMachineId: z.ZodString;
367
+ targetSessionId: z.ZodString;
368
+ }, z.core.$strict>, z.ZodObject<{
369
+ kind: z.ZodLiteral<"response">;
370
+ requestId: z.ZodString;
371
+ content: z.ZodString;
372
+ version: z.ZodLiteral<1>;
373
+ messageId: z.ZodString;
374
+ sourceSessionId: z.ZodString;
375
+ targetMachineId: z.ZodString;
376
+ targetSessionId: z.ZodString;
377
+ }, z.core.$strict>, z.ZodObject<{
378
+ kind: z.ZodLiteral<"error">;
379
+ requestId: z.ZodString;
380
+ code: z.ZodString;
381
+ message: z.ZodString;
382
+ version: z.ZodLiteral<1>;
383
+ messageId: z.ZodString;
384
+ sourceSessionId: z.ZodString;
385
+ targetMachineId: z.ZodString;
386
+ targetSessionId: z.ZodString;
387
+ }, z.core.$strict>, z.ZodObject<{
388
+ kind: z.ZodLiteral<"cancel">;
389
+ requestId: z.ZodString;
390
+ version: z.ZodLiteral<1>;
391
+ messageId: z.ZodString;
392
+ sourceSessionId: z.ZodString;
393
+ targetMachineId: z.ZodString;
394
+ targetSessionId: z.ZodString;
395
+ }, z.core.$strict>], "kind">;
396
+ }, z.core.$strict>;
397
+ type PeerDelivery = z.infer<typeof PeerDeliverySchema>;
398
+
399
+ declare const A2aRelayRequestSchema: z.ZodObject<{
400
+ userId: z.ZodString;
401
+ sourceMachineId: z.ZodString;
402
+ targetSessionId: z.ZodString;
403
+ endpointUrl: z.ZodURL;
404
+ kind: z.ZodEnum<{
405
+ card: "card";
406
+ rpc: "rpc";
407
+ }>;
408
+ body: z.ZodString;
409
+ protocolVersion: z.ZodOptional<z.ZodString>;
410
+ }, z.core.$strict>;
411
+ type A2aRelayRequest = z.infer<typeof A2aRelayRequestSchema>;
412
+ declare const A2aRelayResponseSchema: z.ZodObject<{
413
+ status: z.ZodNumber;
414
+ body: z.ZodString;
415
+ }, z.core.$strict>;
416
+ type A2aRelayResponse = z.infer<typeof A2aRelayResponseSchema>;
417
+
418
+ type Ack = (ack: OperationAck) => void;
419
+ interface V2ClientToServerEvents {
420
+ "machine.hello": (payload: V2MachineHello, ack: Ack) => void;
421
+ "machine.heartbeat": (payload: MachineHeartbeat) => void;
422
+ "machine.list": (payload: MachineListRequest) => void;
423
+ "secure.message": (payload: SecureMessage, ack?: Ack) => void;
424
+ "peer.message": (payload: PeerMessage, ack?: Ack) => void;
425
+ }
426
+ interface V2ServerToClientEvents {
427
+ "a2a.request": (payload: A2aRelayRequest, ack: (response: A2aRelayResponse) => void) => void;
428
+ "machine.list.result": (payload: MachineListResult) => void;
429
+ "machine.online": (payload: MachinePresence) => void;
430
+ "machine.offline": (payload: MachineOffline) => void;
431
+ "mobile.connected": (payload: MobileConnected) => void;
432
+ "mobile.disconnected": (payload: MobileDisconnected) => void;
433
+ "secure.message": (payload: SecureMessage) => void;
434
+ "peer.message": (payload: PeerDelivery) => void;
435
+ "secure.delivery.error": (payload: SecureDeliveryError) => void;
436
+ "protocol.error": (payload: ProtocolError) => void;
437
+ }
438
+
439
+ declare const SessionGitProjectSchema: z.ZodObject<{
440
+ localRepositoryKey: z.ZodString;
441
+ worktreeRoot: z.ZodString;
442
+ mainWorktreeRoot: z.ZodOptional<z.ZodString>;
443
+ gitRemoteUrl: z.ZodOptional<z.ZodString>;
444
+ }, z.core.$strict>;
445
+ type SessionGitProject = z.infer<typeof SessionGitProjectSchema>;
446
+
447
+ declare const SessionSummarySchema: z.ZodObject<{
448
+ userId: z.ZodString;
449
+ sessionId: z.ZodString;
450
+ machineId: z.ZodString;
451
+ summary: z.ZodOptional<z.ZodString>;
452
+ renameSupported: z.ZodOptional<z.ZodBoolean>;
453
+ workingDirectory: z.ZodOptional<z.ZodString>;
454
+ gitRoot: z.ZodOptional<z.ZodString>;
455
+ repository: z.ZodOptional<z.ZodString>;
456
+ gitRemoteUrl: z.ZodOptional<z.ZodString>;
457
+ branch: z.ZodOptional<z.ZodString>;
458
+ isRemote: z.ZodBoolean;
459
+ createdAt: z.ZodISODateTime;
460
+ modifiedAt: z.ZodISODateTime;
461
+ groupChat: z.ZodOptional<z.ZodObject<{
462
+ participants: z.ZodArray<z.ZodObject<{
463
+ sessionId: z.ZodString;
464
+ title: z.ZodString;
465
+ }, z.core.$strict>>;
466
+ state: z.ZodEnum<{
467
+ blocked: "blocked";
468
+ ready: "ready";
469
+ running: "running";
470
+ paused: "paused";
471
+ }>;
472
+ }, z.core.$strict>>;
473
+ }, z.core.$strip>;
474
+ type SessionSummary = z.infer<typeof SessionSummarySchema>;
475
+ declare const SessionAgentModeSchema: z.ZodEnum<{
476
+ interactive: "interactive";
477
+ plan: "plan";
478
+ autopilot: "autopilot";
479
+ }>;
480
+ type SessionAgentMode = z.infer<typeof SessionAgentModeSchema>;
481
+ declare const AgentConfigurationOptionSchema: z.ZodObject<{
482
+ id: z.ZodString;
483
+ name: z.ZodString;
484
+ value: z.ZodString;
485
+ options: z.ZodArray<z.ZodObject<{
486
+ value: z.ZodString;
487
+ name: z.ZodString;
488
+ }, z.core.$strict>>;
489
+ }, z.core.$strict>;
490
+ type AgentConfigurationOption = z.infer<typeof AgentConfigurationOptionSchema>;
491
+ declare const AgentConfigurationChangeSchema: z.ZodObject<{
492
+ id: z.ZodString;
493
+ value: z.ZodString;
494
+ }, z.core.$strict>;
495
+ type AgentConfigurationChange = z.infer<typeof AgentConfigurationChangeSchema>;
496
+ declare const CopilotModelOptionSchema: z.ZodObject<{
497
+ id: z.ZodString;
498
+ name: z.ZodString;
499
+ isDefault: z.ZodBoolean;
500
+ supportedReasoningEfforts: z.ZodOptional<z.ZodArray<z.ZodEnum<{
501
+ low: "low";
502
+ medium: "medium";
503
+ high: "high";
504
+ xhigh: "xhigh";
505
+ max: "max";
506
+ }>>>;
507
+ defaultReasoningEffort: z.ZodOptional<z.ZodEnum<{
508
+ low: "low";
509
+ medium: "medium";
510
+ high: "high";
511
+ xhigh: "xhigh";
512
+ max: "max";
513
+ }>>;
514
+ creation: z.ZodOptional<z.ZodObject<{
515
+ agentId: z.ZodString;
516
+ agentName: z.ZodString;
517
+ modelName: z.ZodString;
518
+ agentModes: z.ZodArray<z.ZodEnum<{
519
+ interactive: "interactive";
520
+ plan: "plan";
521
+ autopilot: "autopilot";
522
+ }>>;
523
+ reasoningEffortConfigurationSupported: z.ZodBoolean;
524
+ isDefault: z.ZodBoolean;
525
+ }, z.core.$strict>>;
526
+ }, z.core.$strip>;
527
+ type CopilotModelOption = z.infer<typeof CopilotModelOptionSchema>;
528
+ declare const SessionReasoningEffortSchema: z.ZodEnum<{
529
+ default: "default";
530
+ low: "low";
531
+ medium: "medium";
532
+ high: "high";
533
+ xhigh: "xhigh";
534
+ max: "max";
535
+ }>;
536
+ type SessionReasoningEffort = z.infer<typeof SessionReasoningEffortSchema>;
537
+ declare const CurrentReasoningEffortSchema: z.ZodString;
538
+ type CurrentReasoningEffort = z.infer<typeof CurrentReasoningEffortSchema>;
539
+ declare const SessionEnvironmentInfoSchema: z.ZodObject<{
540
+ tools: z.ZodArray<z.ZodObject<{
541
+ name: z.ZodString;
542
+ description: z.ZodOptional<z.ZodString>;
543
+ deferred: z.ZodOptional<z.ZodBoolean>;
544
+ }, z.core.$strip>>;
545
+ slashCommands: z.ZodArray<z.ZodObject<{
546
+ name: z.ZodString;
547
+ description: z.ZodOptional<z.ZodString>;
548
+ kind: z.ZodEnum<{
549
+ builtin: "builtin";
550
+ skill: "skill";
551
+ client: "client";
552
+ }>;
553
+ }, z.core.$strip>>;
554
+ skills: z.ZodArray<z.ZodObject<{
555
+ name: z.ZodString;
556
+ description: z.ZodOptional<z.ZodString>;
557
+ source: z.ZodString;
558
+ enabled: z.ZodBoolean;
559
+ userInvocable: z.ZodBoolean;
560
+ commandName: z.ZodOptional<z.ZodString>;
561
+ }, z.core.$strip>>;
562
+ }, z.core.$strip>;
563
+ type SessionEnvironmentInfo = z.infer<typeof SessionEnvironmentInfoSchema>;
564
+ declare const SessionRemoteStatusSchema: z.ZodObject<{
565
+ state: z.ZodEnum<{
566
+ error: "error";
567
+ off: "off";
568
+ connecting: "connecting";
569
+ active: "active";
570
+ }>;
571
+ attachedSessionId: z.ZodOptional<z.ZodString>;
572
+ url: z.ZodOptional<z.ZodURL>;
573
+ steerable: z.ZodBoolean;
574
+ error: z.ZodOptional<z.ZodObject<{
575
+ code: z.ZodString;
576
+ message: z.ZodString;
577
+ }, z.core.$strip>>;
578
+ }, z.core.$strip>;
579
+ type SessionRemoteStatus = z.infer<typeof SessionRemoteStatusSchema>;
580
+
581
+ declare const InteractionRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
582
+ kind: z.ZodLiteral<"permission">;
583
+ permissionKind: z.ZodString;
584
+ title: z.ZodString;
585
+ description: z.ZodString;
586
+ canApproveSession: z.ZodBoolean;
587
+ canApproveAlways: z.ZodOptional<z.ZodBoolean>;
588
+ approvalScope: z.ZodOptional<z.ZodString>;
589
+ }, z.core.$strict>, z.ZodObject<{
590
+ kind: z.ZodLiteral<"user_input">;
591
+ question: z.ZodString;
592
+ choices: z.ZodArray<z.ZodString>;
593
+ allowFreeform: z.ZodBoolean;
594
+ }, z.core.$strict>, z.ZodObject<{
595
+ kind: z.ZodLiteral<"elicitation">;
596
+ message: z.ZodString;
597
+ mode: z.ZodEnum<{
598
+ url: "url";
599
+ form: "form";
600
+ }>;
601
+ source: z.ZodOptional<z.ZodString>;
602
+ url: z.ZodOptional<z.ZodURL>;
603
+ fields: z.ZodArray<z.ZodObject<{
604
+ id: z.ZodString;
605
+ label: z.ZodString;
606
+ description: z.ZodOptional<z.ZodString>;
607
+ inputType: z.ZodEnum<{
608
+ number: "number";
609
+ boolean: "boolean";
610
+ text: "text";
611
+ integer: "integer";
612
+ select: "select";
613
+ "multi-select": "multi-select";
614
+ }>;
615
+ required: z.ZodBoolean;
616
+ options: z.ZodArray<z.ZodString>;
617
+ defaultValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>]>>;
618
+ minimum: z.ZodOptional<z.ZodNumber>;
619
+ maximum: z.ZodOptional<z.ZodNumber>;
620
+ minLength: z.ZodOptional<z.ZodNumber>;
621
+ maxLength: z.ZodOptional<z.ZodNumber>;
622
+ minItems: z.ZodOptional<z.ZodNumber>;
623
+ maxItems: z.ZodOptional<z.ZodNumber>;
624
+ format: z.ZodOptional<z.ZodEnum<{
625
+ date: "date";
626
+ email: "email";
627
+ uri: "uri";
628
+ "date-time": "date-time";
629
+ }>>;
630
+ }, z.core.$strict>>;
631
+ }, z.core.$strict>, z.ZodObject<{
632
+ kind: z.ZodLiteral<"mcp_oauth">;
633
+ serverName: z.ZodString;
634
+ serverUrl: z.ZodURL;
635
+ reason: z.ZodEnum<{
636
+ initial: "initial";
637
+ refresh: "refresh";
638
+ reauth: "reauth";
639
+ upscope: "upscope";
640
+ }>;
641
+ responseMode: z.ZodLiteral<"cancel-only">;
642
+ }, z.core.$strict>, z.ZodObject<{
643
+ kind: z.ZodLiteral<"mcp_headers">;
644
+ serverName: z.ZodString;
645
+ serverUrl: z.ZodURL;
646
+ reason: z.ZodString;
647
+ responseMode: z.ZodLiteral<"none-only">;
648
+ }, z.core.$strict>, z.ZodObject<{
649
+ kind: z.ZodLiteral<"auto_mode_switch">;
650
+ errorCode: z.ZodOptional<z.ZodString>;
651
+ retryAfterSeconds: z.ZodOptional<z.ZodNumber>;
652
+ }, z.core.$strict>, z.ZodObject<{
653
+ kind: z.ZodLiteral<"session_limits">;
654
+ maxAiCredits: z.ZodNumber;
655
+ usedAiCredits: z.ZodNumber;
656
+ }, z.core.$strict>, z.ZodObject<{
657
+ kind: z.ZodLiteral<"exit_plan">;
658
+ summary: z.ZodString;
659
+ planContent: z.ZodOptional<z.ZodString>;
660
+ actions: z.ZodArray<z.ZodString>;
661
+ recommendedAction: z.ZodString;
662
+ }, z.core.$strict>], "kind">;
663
+ type InteractionRequest = z.infer<typeof InteractionRequestSchema>;
664
+ declare const InteractionResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
665
+ kind: z.ZodLiteral<"permission">;
666
+ decision: z.ZodEnum<{
667
+ "approve-once": "approve-once";
668
+ "approve-for-session": "approve-for-session";
669
+ "approve-always": "approve-always";
670
+ reject: "reject";
671
+ }>;
672
+ feedback: z.ZodOptional<z.ZodString>;
673
+ }, z.core.$strict>, z.ZodObject<{
674
+ kind: z.ZodLiteral<"user_input">;
675
+ answer: z.ZodString;
676
+ wasFreeform: z.ZodBoolean;
677
+ }, z.core.$strict>, z.ZodObject<{
678
+ kind: z.ZodLiteral<"elicitation">;
679
+ action: z.ZodEnum<{
680
+ cancel: "cancel";
681
+ accept: "accept";
682
+ decline: "decline";
683
+ }>;
684
+ values: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>]>>;
685
+ }, z.core.$strict>, z.ZodObject<{
686
+ kind: z.ZodLiteral<"mcp_oauth">;
687
+ action: z.ZodLiteral<"cancel">;
688
+ }, z.core.$strict>, z.ZodObject<{
689
+ kind: z.ZodLiteral<"mcp_headers">;
690
+ action: z.ZodLiteral<"none">;
691
+ }, z.core.$strict>, z.ZodObject<{
692
+ kind: z.ZodLiteral<"auto_mode_switch">;
693
+ action: z.ZodEnum<{
694
+ yes: "yes";
695
+ yes_always: "yes_always";
696
+ no: "no";
697
+ }>;
698
+ }, z.core.$strict>, z.ZodObject<{
699
+ kind: z.ZodLiteral<"session_limits">;
700
+ action: z.ZodEnum<{
701
+ set: "set";
702
+ cancel: "cancel";
703
+ add: "add";
704
+ unset: "unset";
705
+ }>;
706
+ additionalAiCredits: z.ZodOptional<z.ZodNumber>;
707
+ maxAiCredits: z.ZodOptional<z.ZodNumber>;
708
+ }, z.core.$strict>, z.ZodObject<{
709
+ kind: z.ZodLiteral<"exit_plan">;
710
+ approved: z.ZodBoolean;
711
+ selectedAction: z.ZodOptional<z.ZodString>;
712
+ feedback: z.ZodOptional<z.ZodString>;
713
+ }, z.core.$strict>], "kind">;
714
+ type InteractionResponse = z.infer<typeof InteractionResponseSchema>;
715
+
716
+ declare const PromptImageAttachmentSchema: z.ZodObject<{
717
+ name: z.ZodString;
718
+ mimeType: z.ZodEnum<{
719
+ "image/webp": "image/webp";
720
+ "image/jpeg": "image/jpeg";
721
+ "image/png": "image/png";
722
+ }>;
723
+ data: z.ZodString;
724
+ byteLength: z.ZodNumber;
725
+ sha256: z.ZodString;
726
+ }, z.core.$strict>;
727
+ type PromptImageAttachment = z.infer<typeof PromptImageAttachmentSchema>;
728
+ declare const PromptFileAttachmentSchema: z.ZodObject<{
729
+ name: z.ZodString;
730
+ mimeType: z.ZodString;
731
+ data: z.ZodString;
732
+ byteLength: z.ZodNumber;
733
+ sha256: z.ZodString;
734
+ }, z.core.$strict>;
735
+ type PromptFileAttachment = z.infer<typeof PromptFileAttachmentSchema>;
736
+
737
+ declare const ConversationItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
738
+ kind: z.ZodLiteral<"human-message">;
739
+ actor: z.ZodLiteral<"human">;
740
+ content: z.ZodString;
741
+ attachments: z.ZodArray<z.ZodObject<{
742
+ kind: z.ZodEnum<{
743
+ unknown: "unknown";
744
+ file: "file";
745
+ image: "image";
746
+ html: "html";
747
+ selection: "selection";
748
+ "github-reference": "github-reference";
749
+ }>;
750
+ name: z.ZodString;
751
+ mimeType: z.ZodOptional<z.ZodString>;
752
+ uri: z.ZodOptional<z.ZodString>;
753
+ data: z.ZodOptional<z.ZodString>;
754
+ byteLength: z.ZodOptional<z.ZodNumber>;
755
+ sha256: z.ZodOptional<z.ZodString>;
756
+ imageRef: z.ZodOptional<z.ZodLiteral<"sha256">>;
757
+ }, z.core.$strict>>;
758
+ operationId: z.ZodOptional<z.ZodString>;
759
+ id: z.ZodString;
760
+ revision: z.ZodNumber;
761
+ turnId: z.ZodString;
762
+ timestamp: z.ZodISODateTime;
763
+ sourceEventIds: z.ZodArray<z.ZodString>;
764
+ sourceMessageIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
765
+ sourceInteractionIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
766
+ }, z.core.$strict>, z.ZodObject<{
767
+ kind: z.ZodLiteral<"assistant-message">;
768
+ actor: z.ZodEnum<{
769
+ subagent: "subagent";
770
+ assistant: "assistant";
771
+ }>;
772
+ content: z.ZodString;
773
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
774
+ kind: z.ZodEnum<{
775
+ unknown: "unknown";
776
+ file: "file";
777
+ image: "image";
778
+ html: "html";
779
+ selection: "selection";
780
+ "github-reference": "github-reference";
781
+ }>;
782
+ name: z.ZodString;
783
+ mimeType: z.ZodOptional<z.ZodString>;
784
+ uri: z.ZodOptional<z.ZodString>;
785
+ data: z.ZodOptional<z.ZodString>;
786
+ byteLength: z.ZodOptional<z.ZodNumber>;
787
+ sha256: z.ZodOptional<z.ZodString>;
788
+ imageRef: z.ZodOptional<z.ZodLiteral<"sha256">>;
789
+ }, z.core.$strict>>>;
790
+ model: z.ZodOptional<z.ZodString>;
791
+ agentId: z.ZodOptional<z.ZodString>;
792
+ final: z.ZodBoolean;
793
+ id: z.ZodString;
794
+ revision: z.ZodNumber;
795
+ turnId: z.ZodString;
796
+ timestamp: z.ZodISODateTime;
797
+ sourceEventIds: z.ZodArray<z.ZodString>;
798
+ sourceMessageIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
799
+ sourceInteractionIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
800
+ }, z.core.$strict>, z.ZodObject<{
801
+ kind: z.ZodLiteral<"activity-group">;
802
+ actor: z.ZodEnum<{
803
+ subagent: "subagent";
804
+ assistant: "assistant";
805
+ }>;
806
+ status: z.ZodEnum<{
807
+ running: "running";
808
+ completed: "completed";
809
+ failed: "failed";
810
+ }>;
811
+ steps: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
812
+ timestamp: z.ZodOptional<z.ZodISODateTime>;
813
+ id: z.ZodString;
814
+ kind: z.ZodLiteral<"tool">;
815
+ name: z.ZodString;
816
+ status: z.ZodEnum<{
817
+ running: "running";
818
+ completed: "completed";
819
+ failed: "failed";
820
+ }>;
821
+ }, z.core.$strict>, z.ZodObject<{
822
+ timestamp: z.ZodOptional<z.ZodISODateTime>;
823
+ id: z.ZodString;
824
+ kind: z.ZodLiteral<"skill">;
825
+ name: z.ZodString;
826
+ status: z.ZodLiteral<"completed">;
827
+ description: z.ZodOptional<z.ZodString>;
828
+ source: z.ZodOptional<z.ZodString>;
829
+ }, z.core.$strict>, z.ZodObject<{
830
+ timestamp: z.ZodOptional<z.ZodISODateTime>;
831
+ id: z.ZodString;
832
+ kind: z.ZodLiteral<"subagent">;
833
+ name: z.ZodString;
834
+ status: z.ZodEnum<{
835
+ running: "running";
836
+ completed: "completed";
837
+ failed: "failed";
838
+ }>;
839
+ description: z.ZodOptional<z.ZodString>;
840
+ model: z.ZodOptional<z.ZodString>;
841
+ durationMs: z.ZodOptional<z.ZodNumber>;
842
+ resultSummary: z.ZodOptional<z.ZodString>;
843
+ error: z.ZodOptional<z.ZodString>;
844
+ }, z.core.$strict>, z.ZodObject<{
845
+ timestamp: z.ZodOptional<z.ZodISODateTime>;
846
+ id: z.ZodString;
847
+ kind: z.ZodLiteral<"permission">;
848
+ name: z.ZodString;
849
+ status: z.ZodEnum<{
850
+ running: "running";
851
+ completed: "completed";
852
+ failed: "failed";
853
+ }>;
854
+ description: z.ZodOptional<z.ZodString>;
855
+ resultSummary: z.ZodOptional<z.ZodString>;
856
+ error: z.ZodOptional<z.ZodString>;
857
+ }, z.core.$strict>], "kind">>;
858
+ id: z.ZodString;
859
+ revision: z.ZodNumber;
860
+ turnId: z.ZodString;
861
+ timestamp: z.ZodISODateTime;
862
+ sourceEventIds: z.ZodArray<z.ZodString>;
863
+ sourceMessageIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
864
+ sourceInteractionIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
865
+ }, z.core.$strict>, z.ZodObject<{
866
+ kind: z.ZodLiteral<"notice">;
867
+ actor: z.ZodEnum<{
868
+ subagent: "subagent";
869
+ assistant: "assistant";
870
+ system: "system";
871
+ }>;
872
+ severity: z.ZodEnum<{
873
+ success: "success";
874
+ error: "error";
875
+ info: "info";
876
+ warning: "warning";
877
+ }>;
878
+ title: z.ZodString;
879
+ content: z.ZodString;
880
+ presentation: z.ZodOptional<z.ZodLiteral<"compact">>;
881
+ id: z.ZodString;
882
+ revision: z.ZodNumber;
883
+ turnId: z.ZodString;
884
+ timestamp: z.ZodISODateTime;
885
+ sourceEventIds: z.ZodArray<z.ZodString>;
886
+ sourceMessageIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
887
+ sourceInteractionIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
888
+ }, z.core.$strict>, z.ZodObject<{
889
+ kind: z.ZodLiteral<"plan-update">;
890
+ actor: z.ZodEnum<{
891
+ subagent: "subagent";
892
+ assistant: "assistant";
893
+ }>;
894
+ operation: z.ZodEnum<{
895
+ created: "created";
896
+ updated: "updated";
897
+ deleted: "deleted";
898
+ }>;
899
+ content: z.ZodString;
900
+ todos: z.ZodArray<z.ZodObject<{
901
+ id: z.ZodString;
902
+ title: z.ZodString;
903
+ description: z.ZodOptional<z.ZodString>;
904
+ status: z.ZodString;
905
+ dependsOn: z.ZodArray<z.ZodString>;
906
+ }, z.core.$strict>>;
907
+ id: z.ZodString;
908
+ revision: z.ZodNumber;
909
+ turnId: z.ZodString;
910
+ timestamp: z.ZodISODateTime;
911
+ sourceEventIds: z.ZodArray<z.ZodString>;
912
+ sourceMessageIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
913
+ sourceInteractionIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
914
+ }, z.core.$strict>], "kind">;
915
+ type ConversationItem = z.infer<typeof ConversationItemSchema>;
916
+ declare const ConversationActivityStepUpsertSchema: z.ZodObject<{
917
+ userId: z.ZodString;
918
+ machineId: z.ZodString;
919
+ sessionId: z.ZodString;
920
+ activityId: z.ZodString;
921
+ revision: z.ZodNumber;
922
+ turnId: z.ZodString;
923
+ timestamp: z.ZodISODateTime;
924
+ actor: z.ZodEnum<{
925
+ subagent: "subagent";
926
+ assistant: "assistant";
927
+ }>;
928
+ status: z.ZodEnum<{
929
+ running: "running";
930
+ completed: "completed";
931
+ failed: "failed";
932
+ }>;
933
+ sourceEventId: z.ZodString;
934
+ step: z.ZodDiscriminatedUnion<[z.ZodObject<{
935
+ timestamp: z.ZodOptional<z.ZodISODateTime>;
936
+ id: z.ZodString;
937
+ kind: z.ZodLiteral<"tool">;
938
+ name: z.ZodString;
939
+ status: z.ZodEnum<{
940
+ running: "running";
941
+ completed: "completed";
942
+ failed: "failed";
943
+ }>;
944
+ }, z.core.$strict>, z.ZodObject<{
945
+ timestamp: z.ZodOptional<z.ZodISODateTime>;
946
+ id: z.ZodString;
947
+ kind: z.ZodLiteral<"skill">;
948
+ name: z.ZodString;
949
+ status: z.ZodLiteral<"completed">;
950
+ description: z.ZodOptional<z.ZodString>;
951
+ source: z.ZodOptional<z.ZodString>;
952
+ }, z.core.$strict>, z.ZodObject<{
953
+ timestamp: z.ZodOptional<z.ZodISODateTime>;
954
+ id: z.ZodString;
955
+ kind: z.ZodLiteral<"subagent">;
956
+ name: z.ZodString;
957
+ status: z.ZodEnum<{
958
+ running: "running";
959
+ completed: "completed";
960
+ failed: "failed";
961
+ }>;
962
+ description: z.ZodOptional<z.ZodString>;
963
+ model: z.ZodOptional<z.ZodString>;
964
+ durationMs: z.ZodOptional<z.ZodNumber>;
965
+ resultSummary: z.ZodOptional<z.ZodString>;
966
+ error: z.ZodOptional<z.ZodString>;
967
+ }, z.core.$strict>, z.ZodObject<{
968
+ timestamp: z.ZodOptional<z.ZodISODateTime>;
969
+ id: z.ZodString;
970
+ kind: z.ZodLiteral<"permission">;
971
+ name: z.ZodString;
972
+ status: z.ZodEnum<{
973
+ running: "running";
974
+ completed: "completed";
975
+ failed: "failed";
976
+ }>;
977
+ description: z.ZodOptional<z.ZodString>;
978
+ resultSummary: z.ZodOptional<z.ZodString>;
979
+ error: z.ZodOptional<z.ZodString>;
980
+ }, z.core.$strict>], "kind">;
981
+ }, z.core.$strict>;
982
+ type ConversationActivityStepUpsert = z.infer<typeof ConversationActivityStepUpsertSchema>;
983
+
984
+ declare const SessionTimelinePageSchema: z.ZodObject<{
985
+ items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
986
+ kind: z.ZodLiteral<"human-message">;
987
+ actor: z.ZodLiteral<"human">;
988
+ content: z.ZodString;
989
+ attachments: z.ZodArray<z.ZodObject<{
990
+ kind: z.ZodEnum<{
991
+ unknown: "unknown";
992
+ file: "file";
993
+ image: "image";
994
+ html: "html";
995
+ selection: "selection";
996
+ "github-reference": "github-reference";
997
+ }>;
998
+ name: z.ZodString;
999
+ mimeType: z.ZodOptional<z.ZodString>;
1000
+ uri: z.ZodOptional<z.ZodString>;
1001
+ data: z.ZodOptional<z.ZodString>;
1002
+ byteLength: z.ZodOptional<z.ZodNumber>;
1003
+ sha256: z.ZodOptional<z.ZodString>;
1004
+ imageRef: z.ZodOptional<z.ZodLiteral<"sha256">>;
1005
+ }, z.core.$strict>>;
1006
+ operationId: z.ZodOptional<z.ZodString>;
1007
+ id: z.ZodString;
1008
+ revision: z.ZodNumber;
1009
+ turnId: z.ZodString;
1010
+ timestamp: z.ZodISODateTime;
1011
+ sourceEventIds: z.ZodArray<z.ZodString>;
1012
+ sourceMessageIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1013
+ sourceInteractionIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1014
+ }, z.core.$strict>, z.ZodObject<{
1015
+ kind: z.ZodLiteral<"assistant-message">;
1016
+ actor: z.ZodEnum<{
1017
+ subagent: "subagent";
1018
+ assistant: "assistant";
1019
+ }>;
1020
+ content: z.ZodString;
1021
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
1022
+ kind: z.ZodEnum<{
1023
+ unknown: "unknown";
1024
+ file: "file";
1025
+ image: "image";
1026
+ html: "html";
1027
+ selection: "selection";
1028
+ "github-reference": "github-reference";
1029
+ }>;
1030
+ name: z.ZodString;
1031
+ mimeType: z.ZodOptional<z.ZodString>;
1032
+ uri: z.ZodOptional<z.ZodString>;
1033
+ data: z.ZodOptional<z.ZodString>;
1034
+ byteLength: z.ZodOptional<z.ZodNumber>;
1035
+ sha256: z.ZodOptional<z.ZodString>;
1036
+ imageRef: z.ZodOptional<z.ZodLiteral<"sha256">>;
1037
+ }, z.core.$strict>>>;
1038
+ model: z.ZodOptional<z.ZodString>;
1039
+ agentId: z.ZodOptional<z.ZodString>;
1040
+ final: z.ZodBoolean;
1041
+ id: z.ZodString;
1042
+ revision: z.ZodNumber;
1043
+ turnId: z.ZodString;
1044
+ timestamp: z.ZodISODateTime;
1045
+ sourceEventIds: z.ZodArray<z.ZodString>;
1046
+ sourceMessageIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1047
+ sourceInteractionIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1048
+ }, z.core.$strict>, z.ZodObject<{
1049
+ kind: z.ZodLiteral<"activity-group">;
1050
+ actor: z.ZodEnum<{
1051
+ subagent: "subagent";
1052
+ assistant: "assistant";
1053
+ }>;
1054
+ status: z.ZodEnum<{
1055
+ running: "running";
1056
+ completed: "completed";
1057
+ failed: "failed";
1058
+ }>;
1059
+ steps: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1060
+ timestamp: z.ZodOptional<z.ZodISODateTime>;
1061
+ id: z.ZodString;
1062
+ kind: z.ZodLiteral<"tool">;
1063
+ name: z.ZodString;
1064
+ status: z.ZodEnum<{
1065
+ running: "running";
1066
+ completed: "completed";
1067
+ failed: "failed";
1068
+ }>;
1069
+ }, z.core.$strict>, z.ZodObject<{
1070
+ timestamp: z.ZodOptional<z.ZodISODateTime>;
1071
+ id: z.ZodString;
1072
+ kind: z.ZodLiteral<"skill">;
1073
+ name: z.ZodString;
1074
+ status: z.ZodLiteral<"completed">;
1075
+ description: z.ZodOptional<z.ZodString>;
1076
+ source: z.ZodOptional<z.ZodString>;
1077
+ }, z.core.$strict>, z.ZodObject<{
1078
+ timestamp: z.ZodOptional<z.ZodISODateTime>;
1079
+ id: z.ZodString;
1080
+ kind: z.ZodLiteral<"subagent">;
1081
+ name: z.ZodString;
1082
+ status: z.ZodEnum<{
1083
+ running: "running";
1084
+ completed: "completed";
1085
+ failed: "failed";
1086
+ }>;
1087
+ description: z.ZodOptional<z.ZodString>;
1088
+ model: z.ZodOptional<z.ZodString>;
1089
+ durationMs: z.ZodOptional<z.ZodNumber>;
1090
+ resultSummary: z.ZodOptional<z.ZodString>;
1091
+ error: z.ZodOptional<z.ZodString>;
1092
+ }, z.core.$strict>, z.ZodObject<{
1093
+ timestamp: z.ZodOptional<z.ZodISODateTime>;
1094
+ id: z.ZodString;
1095
+ kind: z.ZodLiteral<"permission">;
1096
+ name: z.ZodString;
1097
+ status: z.ZodEnum<{
1098
+ running: "running";
1099
+ completed: "completed";
1100
+ failed: "failed";
1101
+ }>;
1102
+ description: z.ZodOptional<z.ZodString>;
1103
+ resultSummary: z.ZodOptional<z.ZodString>;
1104
+ error: z.ZodOptional<z.ZodString>;
1105
+ }, z.core.$strict>], "kind">>;
1106
+ id: z.ZodString;
1107
+ revision: z.ZodNumber;
1108
+ turnId: z.ZodString;
1109
+ timestamp: z.ZodISODateTime;
1110
+ sourceEventIds: z.ZodArray<z.ZodString>;
1111
+ sourceMessageIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1112
+ sourceInteractionIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1113
+ }, z.core.$strict>, z.ZodObject<{
1114
+ kind: z.ZodLiteral<"notice">;
1115
+ actor: z.ZodEnum<{
1116
+ subagent: "subagent";
1117
+ assistant: "assistant";
1118
+ system: "system";
1119
+ }>;
1120
+ severity: z.ZodEnum<{
1121
+ success: "success";
1122
+ error: "error";
1123
+ info: "info";
1124
+ warning: "warning";
1125
+ }>;
1126
+ title: z.ZodString;
1127
+ content: z.ZodString;
1128
+ presentation: z.ZodOptional<z.ZodLiteral<"compact">>;
1129
+ id: z.ZodString;
1130
+ revision: z.ZodNumber;
1131
+ turnId: z.ZodString;
1132
+ timestamp: z.ZodISODateTime;
1133
+ sourceEventIds: z.ZodArray<z.ZodString>;
1134
+ sourceMessageIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1135
+ sourceInteractionIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1136
+ }, z.core.$strict>, z.ZodObject<{
1137
+ kind: z.ZodLiteral<"plan-update">;
1138
+ actor: z.ZodEnum<{
1139
+ subagent: "subagent";
1140
+ assistant: "assistant";
1141
+ }>;
1142
+ operation: z.ZodEnum<{
1143
+ created: "created";
1144
+ updated: "updated";
1145
+ deleted: "deleted";
1146
+ }>;
1147
+ content: z.ZodString;
1148
+ todos: z.ZodArray<z.ZodObject<{
1149
+ id: z.ZodString;
1150
+ title: z.ZodString;
1151
+ description: z.ZodOptional<z.ZodString>;
1152
+ status: z.ZodString;
1153
+ dependsOn: z.ZodArray<z.ZodString>;
1154
+ }, z.core.$strict>>;
1155
+ id: z.ZodString;
1156
+ revision: z.ZodNumber;
1157
+ turnId: z.ZodString;
1158
+ timestamp: z.ZodISODateTime;
1159
+ sourceEventIds: z.ZodArray<z.ZodString>;
1160
+ sourceMessageIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1161
+ sourceInteractionIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1162
+ }, z.core.$strict>], "kind">>;
1163
+ cursor: z.ZodString;
1164
+ hasMore: z.ZodBoolean;
1165
+ cursorStatus: z.ZodEnum<{
1166
+ ok: "ok";
1167
+ expired: "expired";
1168
+ }>;
1169
+ assistantPreview: z.ZodOptional<z.ZodObject<{
1170
+ id: z.ZodString;
1171
+ revision: z.ZodNumber;
1172
+ timestamp: z.ZodISODateTime;
1173
+ sourceEventIds: z.ZodArray<z.ZodString>;
1174
+ text: z.ZodString;
1175
+ final: z.ZodBoolean;
1176
+ attachments: z.ZodArray<z.ZodObject<{
1177
+ kind: z.ZodEnum<{
1178
+ unknown: "unknown";
1179
+ file: "file";
1180
+ image: "image";
1181
+ html: "html";
1182
+ selection: "selection";
1183
+ "github-reference": "github-reference";
1184
+ }>;
1185
+ name: z.ZodString;
1186
+ mimeType: z.ZodOptional<z.ZodString>;
1187
+ uri: z.ZodOptional<z.ZodString>;
1188
+ data: z.ZodOptional<z.ZodString>;
1189
+ byteLength: z.ZodOptional<z.ZodNumber>;
1190
+ sha256: z.ZodOptional<z.ZodString>;
1191
+ imageRef: z.ZodOptional<z.ZodLiteral<"sha256">>;
1192
+ }, z.core.$strict>>;
1193
+ }, z.core.$strip>>;
1194
+ userPreview: z.ZodOptional<z.ZodObject<{
1195
+ id: z.ZodString;
1196
+ revision: z.ZodNumber;
1197
+ timestamp: z.ZodISODateTime;
1198
+ text: z.ZodString;
1199
+ }, z.core.$strip>>;
1200
+ previewsComplete: z.ZodOptional<z.ZodBoolean>;
1201
+ }, z.core.$strip>;
1202
+ type SessionTimelinePage = z.infer<typeof SessionTimelinePageSchema>;
1203
+ declare const SessionTimelineInvalidatedSchema: z.ZodObject<{
1204
+ userId: z.ZodString;
1205
+ machineId: z.ZodString;
1206
+ sessionId: z.ZodString;
1207
+ reason: z.ZodEnum<{
1208
+ clear: "clear";
1209
+ rewind: "rewind";
1210
+ }>;
1211
+ sourceEventId: z.ZodString;
1212
+ timestamp: z.ZodISODateTime;
1213
+ }, z.core.$strict>;
1214
+ type SessionTimelineInvalidated = z.infer<typeof SessionTimelineInvalidatedSchema>;
1215
+
1216
+ declare const WorkbenchAskResultSchema: z.ZodObject<{
1217
+ answer: z.ZodString;
1218
+ }, z.core.$strict>;
1219
+ type WorkbenchAskResult = z.infer<typeof WorkbenchAskResultSchema>;
1220
+ declare const WorkbenchCommandSchema: z.ZodObject<{
1221
+ name: z.ZodString;
1222
+ description: z.ZodString;
1223
+ argumentHint: z.ZodOptional<z.ZodString>;
1224
+ kind: z.ZodEnum<{
1225
+ builtin: "builtin";
1226
+ skill: "skill";
1227
+ client: "client";
1228
+ }>;
1229
+ allowDuringExecution: z.ZodBoolean;
1230
+ supported: z.ZodBoolean;
1231
+ reason: z.ZodOptional<z.ZodString>;
1232
+ }, z.core.$strict>;
1233
+ type WorkbenchCommand = z.infer<typeof WorkbenchCommandSchema>;
1234
+ declare const WorkbenchCommandResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1235
+ kind: z.ZodLiteral<"text">;
1236
+ text: z.ZodString;
1237
+ }, z.core.$strict>, z.ZodObject<{
1238
+ kind: z.ZodLiteral<"completed">;
1239
+ }, z.core.$strict>, z.ZodObject<{
1240
+ kind: z.ZodLiteral<"sent">;
1241
+ messageId: z.ZodString;
1242
+ }, z.core.$strict>, z.ZodObject<{
1243
+ kind: z.ZodLiteral<"select-subcommand">;
1244
+ choices: z.ZodArray<z.ZodObject<{
1245
+ name: z.ZodString;
1246
+ label: z.ZodString;
1247
+ input: z.ZodString;
1248
+ }, z.core.$strict>>;
1249
+ }, z.core.$strict>], "kind">;
1250
+ type WorkbenchCommandResult = z.infer<typeof WorkbenchCommandResultSchema>;
1251
+ declare const WorkbenchQueueSnapshotSchema: z.ZodObject<{
1252
+ generation: z.ZodString;
1253
+ revision: z.ZodString;
1254
+ items: z.ZodArray<z.ZodObject<{
1255
+ id: z.ZodString;
1256
+ kind: z.ZodString;
1257
+ texts: z.ZodArray<z.ZodString>;
1258
+ actions: z.ZodArray<z.ZodEnum<{
1259
+ edit: "edit";
1260
+ remove: "remove";
1261
+ move: "move";
1262
+ "send-now": "send-now";
1263
+ }>>;
1264
+ }, z.core.$strict>>;
1265
+ steeringMessages: z.ZodArray<z.ZodString>;
1266
+ }, z.core.$strict>;
1267
+ type WorkbenchQueueSnapshot = z.infer<typeof WorkbenchQueueSnapshotSchema>;
1268
+ declare const WorkbenchQueueMutationRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1269
+ action: z.ZodLiteral<"edit">;
1270
+ prompt: z.ZodString;
1271
+ generation: z.ZodString;
1272
+ revision: z.ZodString;
1273
+ id: z.ZodString;
1274
+ operationId: z.ZodUUID;
1275
+ operationCreatedAt: z.ZodISODateTime;
1276
+ expectedAgentRunId: z.ZodString;
1277
+ }, z.core.$strict>, z.ZodObject<{
1278
+ action: z.ZodLiteral<"remove">;
1279
+ generation: z.ZodString;
1280
+ revision: z.ZodString;
1281
+ id: z.ZodString;
1282
+ operationId: z.ZodUUID;
1283
+ operationCreatedAt: z.ZodISODateTime;
1284
+ expectedAgentRunId: z.ZodString;
1285
+ }, z.core.$strict>, z.ZodObject<{
1286
+ action: z.ZodLiteral<"move">;
1287
+ toPosition: z.ZodNumber;
1288
+ generation: z.ZodString;
1289
+ revision: z.ZodString;
1290
+ id: z.ZodString;
1291
+ operationId: z.ZodUUID;
1292
+ operationCreatedAt: z.ZodISODateTime;
1293
+ expectedAgentRunId: z.ZodString;
1294
+ }, z.core.$strict>, z.ZodObject<{
1295
+ action: z.ZodLiteral<"send-now">;
1296
+ generation: z.ZodString;
1297
+ revision: z.ZodString;
1298
+ id: z.ZodString;
1299
+ operationId: z.ZodUUID;
1300
+ operationCreatedAt: z.ZodISODateTime;
1301
+ expectedAgentRunId: z.ZodString;
1302
+ }, z.core.$strict>], "action">;
1303
+ type WorkbenchQueueMutationRequest = z.infer<typeof WorkbenchQueueMutationRequestSchema>;
1304
+ declare const WorkbenchQueueMutationResultSchema: z.ZodObject<{
1305
+ changed: z.ZodBoolean;
1306
+ snapshot: z.ZodObject<{
1307
+ generation: z.ZodString;
1308
+ revision: z.ZodString;
1309
+ items: z.ZodArray<z.ZodObject<{
1310
+ id: z.ZodString;
1311
+ kind: z.ZodString;
1312
+ texts: z.ZodArray<z.ZodString>;
1313
+ actions: z.ZodArray<z.ZodEnum<{
1314
+ edit: "edit";
1315
+ remove: "remove";
1316
+ move: "move";
1317
+ "send-now": "send-now";
1318
+ }>>;
1319
+ }, z.core.$strict>>;
1320
+ steeringMessages: z.ZodArray<z.ZodString>;
1321
+ }, z.core.$strict>;
1322
+ }, z.core.$strict>;
1323
+ type WorkbenchQueueMutationResult = z.infer<typeof WorkbenchQueueMutationResultSchema>;
1324
+ declare const WorkbenchInsightsSchema: z.ZodObject<{
1325
+ sampledAt: z.ZodISODateTime;
1326
+ generation: z.ZodString;
1327
+ model: z.ZodOptional<z.ZodString>;
1328
+ totalUserRequests: z.ZodNumber;
1329
+ premiumRequestCost: z.ZodNumber;
1330
+ nanoAiu: z.ZodOptional<z.ZodString>;
1331
+ tokens: z.ZodArray<z.ZodObject<{
1332
+ kind: z.ZodString;
1333
+ count: z.ZodNumber;
1334
+ }, z.core.$strict>>;
1335
+ models: z.ZodArray<z.ZodObject<{
1336
+ model: z.ZodString;
1337
+ requests: z.ZodNumber;
1338
+ premiumRequestCost: z.ZodNumber;
1339
+ tokens: z.ZodArray<z.ZodObject<{
1340
+ kind: z.ZodString;
1341
+ count: z.ZodNumber;
1342
+ }, z.core.$strict>>;
1343
+ }, z.core.$strict>>;
1344
+ context: z.ZodOptional<z.ZodObject<{
1345
+ currentTokens: z.ZodNumber;
1346
+ tokenLimit: z.ZodNumber;
1347
+ systemTokens: z.ZodOptional<z.ZodNumber>;
1348
+ conversationTokens: z.ZodOptional<z.ZodNumber>;
1349
+ toolTokens: z.ZodOptional<z.ZodNumber>;
1350
+ }, z.core.$strict>>;
1351
+ canCompact: z.ZodBoolean;
1352
+ compactUnavailableReason: z.ZodOptional<z.ZodString>;
1353
+ }, z.core.$strict>;
1354
+ type WorkbenchInsights = z.infer<typeof WorkbenchInsightsSchema>;
1355
+ declare const WorkbenchCompactResultSchema: z.ZodObject<{
1356
+ success: z.ZodBoolean;
1357
+ tokensRemoved: z.ZodNumber;
1358
+ messagesRemoved: z.ZodNumber;
1359
+ }, z.core.$strict>;
1360
+ type WorkbenchCompactResult = z.infer<typeof WorkbenchCompactResultSchema>;
1361
+
1362
+ declare const WorkbenchScheduleSnapshotSchema: z.ZodObject<{
1363
+ state: z.ZodEnum<{
1364
+ active: "active";
1365
+ "needs-resume": "needs-resume";
1366
+ }>;
1367
+ workingDirectory: z.ZodOptional<z.ZodString>;
1368
+ timezone: z.ZodOptional<z.ZodString>;
1369
+ entries: z.ZodArray<z.ZodObject<{
1370
+ id: z.ZodNumber;
1371
+ prompt: z.ZodString;
1372
+ displayPrompt: z.ZodOptional<z.ZodString>;
1373
+ recurring: z.ZodBoolean;
1374
+ nextRunAt: z.ZodISODateTime;
1375
+ intervalMs: z.ZodOptional<z.ZodNumber>;
1376
+ cron: z.ZodOptional<z.ZodString>;
1377
+ timezone: z.ZodOptional<z.ZodString>;
1378
+ at: z.ZodOptional<z.ZodISODateTime>;
1379
+ }, z.core.$strict>>;
1380
+ drafts: z.ZodArray<z.ZodObject<{
1381
+ rule: z.ZodDiscriminatedUnion<[z.ZodObject<{
1382
+ kind: z.ZodLiteral<"once">;
1383
+ at: z.ZodISODateTime;
1384
+ }, z.core.$strict>, z.ZodObject<{
1385
+ kind: z.ZodLiteral<"interval">;
1386
+ seconds: z.ZodNumber;
1387
+ recurring: z.ZodOptional<z.ZodBoolean>;
1388
+ }, z.core.$strict>, z.ZodObject<{
1389
+ kind: z.ZodLiteral<"cron">;
1390
+ expression: z.ZodString;
1391
+ timezone: z.ZodString;
1392
+ }, z.core.$strict>], "kind">;
1393
+ prompt: z.ZodString;
1394
+ skill: z.ZodOptional<z.ZodString>;
1395
+ id: z.ZodUUID;
1396
+ createdAt: z.ZodISODateTime;
1397
+ }, z.core.$strict>>;
1398
+ results: z.ZodArray<z.ZodObject<{
1399
+ id: z.ZodString;
1400
+ scheduleId: z.ZodNumber;
1401
+ triggerEventId: z.ZodString;
1402
+ time: z.ZodISODateTime;
1403
+ prompt: z.ZodString;
1404
+ status: z.ZodEnum<{
1405
+ unknown: "unknown";
1406
+ error: "error";
1407
+ pending: "pending";
1408
+ reply: "reply";
1409
+ merged: "merged";
1410
+ }>;
1411
+ reply: z.ZodOptional<z.ZodString>;
1412
+ replyEventId: z.ZodOptional<z.ZodString>;
1413
+ error: z.ZodOptional<z.ZodString>;
1414
+ }, z.core.$strict>>;
1415
+ historyTruncated: z.ZodBoolean;
1416
+ sampledAt: z.ZodISODateTime;
1417
+ }, z.core.$strict>;
1418
+ declare const WorkbenchScheduleCreateRequestSchema: z.ZodObject<{
1419
+ draftId: z.ZodOptional<z.ZodUUID>;
1420
+ rule: z.ZodDiscriminatedUnion<[z.ZodObject<{
1421
+ kind: z.ZodLiteral<"once">;
1422
+ at: z.ZodISODateTime;
1423
+ }, z.core.$strict>, z.ZodObject<{
1424
+ kind: z.ZodLiteral<"interval">;
1425
+ seconds: z.ZodNumber;
1426
+ recurring: z.ZodOptional<z.ZodBoolean>;
1427
+ }, z.core.$strict>, z.ZodObject<{
1428
+ kind: z.ZodLiteral<"cron">;
1429
+ expression: z.ZodString;
1430
+ timezone: z.ZodString;
1431
+ }, z.core.$strict>], "kind">;
1432
+ prompt: z.ZodString;
1433
+ skill: z.ZodOptional<z.ZodString>;
1434
+ operationId: z.ZodUUID;
1435
+ operationCreatedAt: z.ZodISODateTime;
1436
+ expectedAgentRunId: z.ZodString;
1437
+ }, z.core.$strict>;
1438
+ declare const WorkbenchScheduleCreateResultSchema: z.ZodObject<{
1439
+ snapshot: z.ZodObject<{
1440
+ state: z.ZodEnum<{
1441
+ active: "active";
1442
+ "needs-resume": "needs-resume";
1443
+ }>;
1444
+ workingDirectory: z.ZodOptional<z.ZodString>;
1445
+ timezone: z.ZodOptional<z.ZodString>;
1446
+ entries: z.ZodArray<z.ZodObject<{
1447
+ id: z.ZodNumber;
1448
+ prompt: z.ZodString;
1449
+ displayPrompt: z.ZodOptional<z.ZodString>;
1450
+ recurring: z.ZodBoolean;
1451
+ nextRunAt: z.ZodISODateTime;
1452
+ intervalMs: z.ZodOptional<z.ZodNumber>;
1453
+ cron: z.ZodOptional<z.ZodString>;
1454
+ timezone: z.ZodOptional<z.ZodString>;
1455
+ at: z.ZodOptional<z.ZodISODateTime>;
1456
+ }, z.core.$strict>>;
1457
+ drafts: z.ZodArray<z.ZodObject<{
1458
+ rule: z.ZodDiscriminatedUnion<[z.ZodObject<{
1459
+ kind: z.ZodLiteral<"once">;
1460
+ at: z.ZodISODateTime;
1461
+ }, z.core.$strict>, z.ZodObject<{
1462
+ kind: z.ZodLiteral<"interval">;
1463
+ seconds: z.ZodNumber;
1464
+ recurring: z.ZodOptional<z.ZodBoolean>;
1465
+ }, z.core.$strict>, z.ZodObject<{
1466
+ kind: z.ZodLiteral<"cron">;
1467
+ expression: z.ZodString;
1468
+ timezone: z.ZodString;
1469
+ }, z.core.$strict>], "kind">;
1470
+ prompt: z.ZodString;
1471
+ skill: z.ZodOptional<z.ZodString>;
1472
+ id: z.ZodUUID;
1473
+ createdAt: z.ZodISODateTime;
1474
+ }, z.core.$strict>>;
1475
+ results: z.ZodArray<z.ZodObject<{
1476
+ id: z.ZodString;
1477
+ scheduleId: z.ZodNumber;
1478
+ triggerEventId: z.ZodString;
1479
+ time: z.ZodISODateTime;
1480
+ prompt: z.ZodString;
1481
+ status: z.ZodEnum<{
1482
+ unknown: "unknown";
1483
+ error: "error";
1484
+ pending: "pending";
1485
+ reply: "reply";
1486
+ merged: "merged";
1487
+ }>;
1488
+ reply: z.ZodOptional<z.ZodString>;
1489
+ replyEventId: z.ZodOptional<z.ZodString>;
1490
+ error: z.ZodOptional<z.ZodString>;
1491
+ }, z.core.$strict>>;
1492
+ historyTruncated: z.ZodBoolean;
1493
+ sampledAt: z.ZodISODateTime;
1494
+ }, z.core.$strict>;
1495
+ verified: z.ZodBoolean;
1496
+ }, z.core.$strict>;
1497
+ declare const WorkbenchScheduleDeleteResultSchema: z.ZodObject<{
1498
+ snapshot: z.ZodObject<{
1499
+ state: z.ZodEnum<{
1500
+ active: "active";
1501
+ "needs-resume": "needs-resume";
1502
+ }>;
1503
+ workingDirectory: z.ZodOptional<z.ZodString>;
1504
+ timezone: z.ZodOptional<z.ZodString>;
1505
+ entries: z.ZodArray<z.ZodObject<{
1506
+ id: z.ZodNumber;
1507
+ prompt: z.ZodString;
1508
+ displayPrompt: z.ZodOptional<z.ZodString>;
1509
+ recurring: z.ZodBoolean;
1510
+ nextRunAt: z.ZodISODateTime;
1511
+ intervalMs: z.ZodOptional<z.ZodNumber>;
1512
+ cron: z.ZodOptional<z.ZodString>;
1513
+ timezone: z.ZodOptional<z.ZodString>;
1514
+ at: z.ZodOptional<z.ZodISODateTime>;
1515
+ }, z.core.$strict>>;
1516
+ drafts: z.ZodArray<z.ZodObject<{
1517
+ rule: z.ZodDiscriminatedUnion<[z.ZodObject<{
1518
+ kind: z.ZodLiteral<"once">;
1519
+ at: z.ZodISODateTime;
1520
+ }, z.core.$strict>, z.ZodObject<{
1521
+ kind: z.ZodLiteral<"interval">;
1522
+ seconds: z.ZodNumber;
1523
+ recurring: z.ZodOptional<z.ZodBoolean>;
1524
+ }, z.core.$strict>, z.ZodObject<{
1525
+ kind: z.ZodLiteral<"cron">;
1526
+ expression: z.ZodString;
1527
+ timezone: z.ZodString;
1528
+ }, z.core.$strict>], "kind">;
1529
+ prompt: z.ZodString;
1530
+ skill: z.ZodOptional<z.ZodString>;
1531
+ id: z.ZodUUID;
1532
+ createdAt: z.ZodISODateTime;
1533
+ }, z.core.$strict>>;
1534
+ results: z.ZodArray<z.ZodObject<{
1535
+ id: z.ZodString;
1536
+ scheduleId: z.ZodNumber;
1537
+ triggerEventId: z.ZodString;
1538
+ time: z.ZodISODateTime;
1539
+ prompt: z.ZodString;
1540
+ status: z.ZodEnum<{
1541
+ unknown: "unknown";
1542
+ error: "error";
1543
+ pending: "pending";
1544
+ reply: "reply";
1545
+ merged: "merged";
1546
+ }>;
1547
+ reply: z.ZodOptional<z.ZodString>;
1548
+ replyEventId: z.ZodOptional<z.ZodString>;
1549
+ error: z.ZodOptional<z.ZodString>;
1550
+ }, z.core.$strict>>;
1551
+ historyTruncated: z.ZodBoolean;
1552
+ sampledAt: z.ZodISODateTime;
1553
+ }, z.core.$strict>;
1554
+ removed: z.ZodBoolean;
1555
+ }, z.core.$strict>;
1556
+ type WorkbenchScheduleSnapshot = z.infer<typeof WorkbenchScheduleSnapshotSchema>;
1557
+ type WorkbenchScheduleCreateRequest = z.infer<typeof WorkbenchScheduleCreateRequestSchema>;
1558
+ type WorkbenchScheduleCreateResult = z.infer<typeof WorkbenchScheduleCreateResultSchema>;
1559
+ type WorkbenchScheduleDeleteResult = z.infer<typeof WorkbenchScheduleDeleteResultSchema>;
1560
+
1561
+ interface TimelineReadDiagnostic {
1562
+ readRef: string;
1563
+ readStarts: number;
1564
+ readJoins: number;
1565
+ untrackedReads: number;
1566
+ inFlightReads: number;
1567
+ }
1568
+
1569
+ interface WorkbenchSchedules {
1570
+ isAvailable?(): boolean;
1571
+ snapshot(sessionId: string): Promise<WorkbenchScheduleSnapshot>;
1572
+ resume(sessionId: string, assertAccess?: () => void): Promise<WorkbenchScheduleSnapshot>;
1573
+ create(sessionId: string, request: WorkbenchScheduleCreateRequest, assertAccess?: () => void): Promise<WorkbenchScheduleCreateResult>;
1574
+ delete(sessionId: string, id: number, assertAccess?: () => void): Promise<WorkbenchScheduleDeleteResult>;
1575
+ dismissDraft(sessionId: string, draftId: string, assertAccess?: () => void): Promise<void>;
1576
+ }
1577
+
1578
+ interface WorkbenchRuntime {
1579
+ readonly schedules?: WorkbenchSchedules;
1580
+ ask(sessionId: string, question: string): Promise<WorkbenchAskResult>;
1581
+ commands(sessionId: string): Promise<WorkbenchCommand[]>;
1582
+ invokeCommand(sessionId: string, name: string, input: string, operationId: string): Promise<WorkbenchCommandResult>;
1583
+ queue(sessionId: string): Promise<WorkbenchQueueSnapshot>;
1584
+ mutateQueue(sessionId: string, request: WorkbenchQueueMutationRequest): Promise<WorkbenchQueueMutationResult>;
1585
+ insights(sessionId: string): Promise<WorkbenchInsights>;
1586
+ compact(sessionId: string): Promise<WorkbenchCompactResult>;
1587
+ }
1588
+
1589
+ type CodingAgentId = "copilot" | "pi" | "acp";
1590
+ type AgentModelOption = CopilotModelOption;
1591
+ type AgentPermissionRequest = Readonly<{
1592
+ kind: string;
1593
+ }>;
1594
+ interface AgentSessionConfiguration {
1595
+ modelId?: string;
1596
+ agentMode: SessionAgentMode;
1597
+ reasoningEffort: CurrentReasoningEffort;
1598
+ configOptions?: AgentConfigurationOption[];
1599
+ }
1600
+ interface AgentSessionCreateOptions {
1601
+ userId: string;
1602
+ machineId: string;
1603
+ workingDirectory: string;
1604
+ modelId: string;
1605
+ agentMode: SessionAgentMode;
1606
+ reasoningEffort?: SessionReasoningEffort;
1607
+ }
1608
+ interface AgentSessionConfigureOptions {
1609
+ modelId?: string;
1610
+ agentMode?: SessionAgentMode;
1611
+ reasoningEffort?: SessionReasoningEffort;
1612
+ configOption?: AgentConfigurationChange;
1613
+ }
1614
+ interface PeerTurnOptions {
1615
+ signal: AbortSignal;
1616
+ requestPeer?: (content: string) => Promise<string>;
1617
+ awaitNativeSettlement?: true;
1618
+ }
1619
+ interface AgentImageProjectionFailure {
1620
+ readonly source: "binary-result" | "binary-asset" | "content";
1621
+ readonly reason: "asset-missing" | "asset-hash-mismatch" | "data-invalid" | "data-empty" | "data-too-large" | "length-mismatch" | "mime-unsupported" | "signature-mismatch";
1622
+ readonly mimeType: string;
1623
+ readonly expectedByteLength?: number;
1624
+ readonly actualByteLength?: number;
1625
+ }
1626
+ interface CodingAgentSessionCallbacks {
1627
+ onTimelineReadDiagnostic?(diagnostic: TimelineReadDiagnostic): void;
1628
+ onConversationItem(sessionId: string, item: ConversationItem): void;
1629
+ onTransientConversationItem?(sessionId: string, item: ConversationItem): void;
1630
+ onAssistantPreview?(sessionId: string, item: ConversationItem): void;
1631
+ onConversationActivityStep?(sessionId: string, delta: Omit<ConversationActivityStepUpsert, "userId" | "machineId" | "sessionId">): void;
1632
+ onTimelineInvalidated?(sessionId: string, invalidation: Omit<SessionTimelineInvalidated, "userId" | "machineId" | "sessionId">): void;
1633
+ onInteractionRequest?(sessionId: string, interactionRequestId: string, request: InteractionRequest): void;
1634
+ onInteractionDismissed?(sessionId: string, interactionRequestId: string): void;
1635
+ onPermissionRequest(sessionId: string, permissionRequestId: string, request: AgentPermissionRequest): void;
1636
+ onSessionInventoryChanged(sessionId: string): void;
1637
+ onSessionActivity?(sessionId: string, state: "working" | "idle", occurredAt: string): void;
1638
+ onSyncError(sessionId: string, error: unknown): void;
1639
+ onSyncRecovered?(sessionId: string): void;
1640
+ onProjectMetadataError?(sessionId: string, error: unknown): void;
1641
+ onProjectMetadataRecovered?(sessionId: string): void;
1642
+ onImageProjectionFailure?(sessionId: string, failure: AgentImageProjectionFailure & {
1643
+ readonly toolCallId: string;
1644
+ readonly toolName: string;
1645
+ }): void;
1646
+ }
1647
+ interface CodingAgentAdapter {
1648
+ readonly workbench?: WorkbenchRuntime;
1649
+ sessionPublicationSource?(sessionId: string): string;
1650
+ captureWorkbenchAccess?(sessionId: string): () => void;
1651
+ captureResearchAccess?(sessionId: string): ResearchSourceAccess;
1652
+ readonly agentId: CodingAgentId | "managed";
1653
+ readonly sdkVersion: string;
1654
+ readonly agentModes: readonly SessionAgentMode[];
1655
+ readonly supportsReasoningEffort: boolean;
1656
+ readonly supportsSessionListUpdates?: boolean;
1657
+ readonly supportsAssistantPreview?: boolean;
1658
+ readonly supportsSessionDelete?: boolean;
1659
+ readonly supportsFileAttachments?: boolean;
1660
+ readonly groupChatEnabled?: boolean;
1661
+ setGroupChatEnabled?(enabled: boolean): Promise<void>;
1662
+ setPeerChatEnabled?(enabled: boolean): Promise<void>;
1663
+ start(): Promise<void>;
1664
+ stop(): Promise<void>;
1665
+ canUpgrade?(): Promise<boolean>;
1666
+ listSessions(userId: string, machineId: string): Promise<SessionSummary[]>;
1667
+ getSessionDirectoryMetadata?(sessionId: string): Promise<{
1668
+ workingDirectory?: string;
1669
+ } | undefined>;
1670
+ getSessionProjectIdentity?(sessionId: string): Promise<SessionGitProject | undefined>;
1671
+ listModels(sessionId?: string): Promise<AgentModelOption[]>;
1672
+ getSessionCapabilities?(sessionId?: string): {
1673
+ readonly agentModes: readonly SessionAgentMode[];
1674
+ readonly supportsReasoningEffort: boolean;
1675
+ readonly supportsFileAttachments?: boolean;
1676
+ readonly agentName?: string;
1677
+ readonly supportsPlanRead?: boolean;
1678
+ };
1679
+ isSessionVisible?(sessionId: string): boolean;
1680
+ getSessionConfiguration(sessionId: string): Promise<AgentSessionConfiguration>;
1681
+ getSessionEnvironment(sessionId: string): Promise<SessionEnvironmentInfo>;
1682
+ createSession(options: AgentSessionCreateOptions): Promise<SessionSummary>;
1683
+ createGroupChat?(sourceSessionId: string, peerSessionId: string, requestId: string, assertAccess?: () => void): Promise<SessionSummary>;
1684
+ runPeerTurn?(sessionId: string, prompt: string, options: PeerTurnOptions): Promise<string>;
1685
+ deleteSession?(sessionId: string): Promise<void>;
1686
+ renameSession?(sessionId: string, name: string, assertAccess?: () => void): Promise<string>;
1687
+ configureSession(sessionId: string, options: AgentSessionConfigureOptions): Promise<AgentSessionConfiguration>;
1688
+ getSessionRemoteStatus(sessionId: string): Promise<SessionRemoteStatus>;
1689
+ setSessionRemote(sessionId: string, enabled: boolean): Promise<SessionRemoteStatus>;
1690
+ readSessionTimelinePage(sessionId: string, options?: {
1691
+ cursor?: string;
1692
+ pageSize?: number;
1693
+ metadataOnly?: boolean;
1694
+ assistantPreview?: boolean;
1695
+ }): Promise<SessionTimelinePage>;
1696
+ readSessionPlan?(sessionId: string): Promise<ConversationItem>;
1697
+ watchSession(sessionId: string, watched: boolean): Promise<void>;
1698
+ setSessionCallbacks(callbacks: CodingAgentSessionCallbacks): void;
1699
+ sendPrompt(sessionId: string, prompt: string, mode: "enqueue" | "immediate", attachments?: readonly PromptImageAttachment[], persistInteractions?: boolean, fileAttachments?: readonly PromptFileAttachment[], operationId?: string): Promise<{
1700
+ messageId: string;
1701
+ deliveryState: "queued" | "processing";
1702
+ submittedAt?: string;
1703
+ }>;
1704
+ abortSession(sessionId: string): Promise<void>;
1705
+ respondPermission(permissionRequestId: string, decision: "approve-once" | "reject", feedback?: string): boolean;
1706
+ respondInteraction(interactionRequestId: string, response: InteractionResponse): Promise<boolean>;
1707
+ replayPendingInteractions(): void;
1708
+ }
1709
+ interface ResearchSourceAccess {
1710
+ readonly detached: boolean;
1711
+ readonly assertCurrent: () => void;
1712
+ }
1713
+
1714
+ declare const AgentSelectionSchema: z.ZodObject<{
1715
+ agents: z.ZodArray<z.ZodEnum<{
1716
+ copilot: "copilot";
1717
+ pi: "pi";
1718
+ acp: "acp";
1719
+ }>>;
1720
+ }, z.core.$strict>;
1721
+ type AgentSelection = z.infer<typeof AgentSelectionSchema>;
1722
+ interface SelectableAgent {
1723
+ id: CodingAgentId;
1724
+ name: string;
1725
+ available: boolean;
1726
+ selected: boolean;
1727
+ error?: string;
1728
+ sessions: {
1729
+ id: string;
1730
+ name: string;
1731
+ workingDirectory?: string;
1732
+ }[];
1733
+ }
1734
+ interface AgentSelectionProvider {
1735
+ listAgents(): Promise<SelectableAgent[]>;
1736
+ saveSelection(selection: AgentSelection): Promise<void>;
1737
+ }
1738
+ declare function supportsAgentSelection(adapter: CodingAgentAdapter): adapter is CodingAgentAdapter & AgentSelectionProvider;
1739
+
1740
+ type CodingAgentConfig = {
1741
+ kind: "managed";
1742
+ initialSelection?: AgentSelection;
1743
+ piDirectory?: string;
1744
+ acp?: {
1745
+ command: string;
1746
+ args: string[];
1747
+ };
1748
+ } | {
1749
+ kind: "copilot";
1750
+ } | {
1751
+ kind: "pi";
1752
+ agentDirectory?: string;
1753
+ } | {
1754
+ kind: "acp";
1755
+ command: string;
1756
+ args: string[];
1757
+ };
1758
+ interface PcAgentConfig {
1759
+ relayUrl: string;
1760
+ relayToken: string;
1761
+ userId: string;
1762
+ workspaceRoot?: string;
1763
+ dataDirectory: string;
1764
+ refreshIntervalMs: number;
1765
+ heartbeatIntervalMs: number;
1766
+ exitAfterSnapshot: boolean;
1767
+ codingAgent?: CodingAgentConfig;
1768
+ groupChatEnabled?: boolean;
1769
+ peerChatEnabled?: boolean;
1770
+ snapshotSuppressionEnabled?: boolean;
1771
+ timelineCompressionEnabled?: boolean;
1772
+ timelineIncrementalEnabled?: boolean;
1773
+ secureMessagePacketBudget?: number;
1774
+ }
1775
+
1776
+ /** Owns a data directory without opening an IPC or HTTP listener. */
1777
+ declare class DataDirectoryLease {
1778
+ #private;
1779
+ readonly directory: string;
1780
+ readonly instanceId: string;
1781
+ private readonly lockPath;
1782
+ private constructor();
1783
+ static acquire(dataDirectory: string): Promise<DataDirectoryLease>;
1784
+ attach(dataDirectory: string): Promise<() => void>;
1785
+ release(): Promise<void>;
1786
+ }
1787
+
1788
+ declare const DeviceIdentitySchema: z.ZodObject<{
1789
+ schemaVersion: z.ZodLiteral<2>;
1790
+ machineId: z.ZodUUID;
1791
+ stableDeviceId: z.ZodUUID;
1792
+ machineName: z.ZodString;
1793
+ createdAt: z.ZodISODateTime;
1794
+ }, z.core.$strip>;
1795
+ type DeviceIdentity = z.infer<typeof DeviceIdentitySchema>;
1796
+
1797
+ interface ContentKeyMaterial {
1798
+ readonly encoded: string;
1799
+ readonly keyId: string;
1800
+ readonly bytes: Buffer;
1801
+ }
1802
+ interface ContentCipherOptions {
1803
+ readonly now?: () => number;
1804
+ readonly randomBytes?: (size: number) => Buffer;
1805
+ readonly createMessageId?: () => string;
1806
+ readonly replayWindowMs?: number;
1807
+ readonly processedMessages?: ReadonlyMap<string, number>;
1808
+ readonly persistProcessedMessages?: (processedMessages: ReadonlyMap<string, number>) => void;
1809
+ }
1810
+ declare function parseContentKey(encoded: string): ContentKeyMaterial;
1811
+ declare function generateContentKey(): ContentKeyMaterial;
1812
+ declare function loadOrCreateContentKey(dataDirectory: string): Promise<ContentKeyMaterial>;
1813
+ declare function createPersistentContentCipher(dataDirectory: string, key: ContentKeyMaterial): Promise<ContentCipher>;
1814
+ declare class ContentCipher {
1815
+ #private;
1816
+ constructor(key: ContentKeyMaterial, options?: ContentCipherOptions);
1817
+ get keyId(): string;
1818
+ seal(event: SecureEventName, sender: SecureMessage["sender"], machineId: string, clientId: string, recipientClientId: string | undefined, payload: unknown): SecureMessage;
1819
+ sealWithSize(event: SecureEventName, sender: SecureMessage["sender"], machineId: string, clientId: string, recipientClientId: string | undefined, payload: unknown): {
1820
+ message: SecureMessage;
1821
+ plaintextBytes: number;
1822
+ };
1823
+ sealBytes(event: SecureEventName, sender: SecureMessage["sender"], machineId: string, clientId: string, recipientClientId: string | undefined, plaintext: Buffer): SecureMessage;
1824
+ open(input: unknown): unknown;
1825
+ openBytes(input: unknown): Buffer;
1826
+ }
1827
+
1828
+ interface PairingTicket {
1829
+ readonly uri: string;
1830
+ readonly expiresAt: number;
1831
+ }
1832
+ interface PairingProvider {
1833
+ getPairing(options?: {
1834
+ readonly force?: boolean;
1835
+ }): Promise<PairingTicket>;
1836
+ }
1837
+ declare class CachedPairingProvider implements PairingProvider {
1838
+ #private;
1839
+ constructor(requestPairing: () => Promise<PairingTicket>, minimumValidityMs?: number);
1840
+ getPairing(options?: {
1841
+ readonly force?: boolean;
1842
+ }): Promise<PairingTicket>;
1843
+ }
1844
+ declare function buildPairingUri(relayUrl: string, code: string, machineId: string, contentKey: string): string;
1845
+ declare function requestPairingUri(config: Pick<PcAgentConfig, "relayUrl" | "relayToken" | "userId">, identity: DeviceIdentity, contentKey: ContentKeyMaterial): Promise<{
1846
+ uri: string;
1847
+ expiresAt: number;
1848
+ }>;
1849
+
1850
+ declare const PEER_CHAT_TIMEOUT_MS = 120000;
1851
+ declare const PeerChatRequestSchema: z.ZodObject<{
1852
+ sessionId: z.ZodString;
1853
+ targetMachineId: z.ZodString;
1854
+ targetSessionId: z.ZodString;
1855
+ prompt: z.ZodString;
1856
+ }, z.core.$strip>;
1857
+ type PeerChatRequest = z.infer<typeof PeerChatRequestSchema>;
1858
+ declare const PeerChatResultSchema: z.ZodObject<{
1859
+ reply: z.ZodString;
1860
+ peerReplies: z.ZodArray<z.ZodString>;
1861
+ conversation: z.ZodOptional<z.ZodObject<{
1862
+ contextId: z.ZodString;
1863
+ exchanges: z.ZodArray<z.ZodObject<{
1864
+ taskId: z.ZodString;
1865
+ requestMessageId: z.ZodString;
1866
+ responseMessageId: z.ZodString;
1867
+ request: z.ZodString;
1868
+ response: z.ZodString;
1869
+ }, z.core.$strip>>;
1870
+ }, z.core.$strip>>;
1871
+ }, z.core.$strip>;
1872
+ type PeerChatResult = z.infer<typeof PeerChatResultSchema>;
1873
+
1874
+ type RelayRegistrationStatus = {
1875
+ readonly state: "connecting" | "error";
1876
+ readonly message: string;
1877
+ } | {
1878
+ readonly state: "registered";
1879
+ };
1880
+
1881
+ type OutboundArguments = {
1882
+ [Event in keyof V2ClientToServerEvents]: [event: Event, ...args: Parameters<V2ClientToServerEvents[Event]>];
1883
+ }[keyof V2ClientToServerEvents];
1884
+ interface RelaySocket {
1885
+ readonly connected: boolean;
1886
+ readonly active: boolean;
1887
+ readonly io: {
1888
+ readonly engine?: {
1889
+ readonly transport?: {
1890
+ readonly name: string;
1891
+ };
1892
+ };
1893
+ };
1894
+ on(event: "connect", listener: () => void): void;
1895
+ on(event: "connect_error", listener: (error: Error) => void): void;
1896
+ on(event: "disconnect", listener: (reason: string, details?: unknown) => void): void;
1897
+ on(event: "protocol.error", listener: V2ServerToClientEvents["protocol.error"]): void;
1898
+ on(event: "secure.delivery.error", listener: V2ServerToClientEvents["secure.delivery.error"]): void;
1899
+ on(event: "mobile.connected", listener: V2ServerToClientEvents["mobile.connected"]): void;
1900
+ on(event: "mobile.disconnected", listener: V2ServerToClientEvents["mobile.disconnected"]): void;
1901
+ on(event: "secure.message", listener: V2ServerToClientEvents["secure.message"]): void;
1902
+ on(event: "peer.message", listener: V2ServerToClientEvents["peer.message"]): void;
1903
+ on(event: "a2a.request", listener: V2ServerToClientEvents["a2a.request"]): void;
1904
+ emit(...args: OutboundArguments): void;
1905
+ connect(): void;
1906
+ disconnect(): void;
1907
+ }
1908
+ type RelaySocketFactory = (uri: string, options: Partial<ManagerOptions & SocketOptions>) => RelaySocket;
1909
+
1910
+ interface InitializeOptions extends Omit<PcAgentConfig, "refreshIntervalMs" | "heartbeatIntervalMs" | "exitAfterSnapshot"> {
1911
+ refreshIntervalMs?: number;
1912
+ heartbeatIntervalMs?: number;
1913
+ exitAfterSnapshot?: boolean;
1914
+ identity: DeviceIdentity;
1915
+ logger: Logger;
1916
+ adapter?: CodingAgentAdapter;
1917
+ appVersion?: string;
1918
+ directoryLease?: DataDirectoryLease;
1919
+ onPairing?: (ticket: PairingTicket) => void;
1920
+ createSocket?: RelaySocketFactory;
1921
+ }
1922
+ interface Agent {
1923
+ readonly config: PcAgentConfig;
1924
+ readonly identity: DeviceIdentity;
1925
+ readonly adapter: CodingAgentAdapter;
1926
+ readonly pairingProvider: PairingProvider;
1927
+ readonly relayRegistrationStatus: RelayRegistrationStatus;
1928
+ readonly isStopping: boolean;
1929
+ readonly identityHash: string;
1930
+ start(): Promise<void>;
1931
+ stop(): Promise<void>;
1932
+ waitUntilStopped(): Promise<void>;
1933
+ getUpgradeStatus(): Promise<{
1934
+ ready: boolean;
1935
+ busy: boolean;
1936
+ }>;
1937
+ prepareForUpgrade(): Promise<void>;
1938
+ cancelUpgrade(): void;
1939
+ stopForUpgrade(): Promise<void>;
1940
+ holdUpgradeStartup(): void;
1941
+ runLocalMutation<T>(operation: () => Promise<T>): Promise<T>;
1942
+ runPeerChat(request: PeerChatRequest, signal: AbortSignal): Promise<PeerChatResult>;
1943
+ setPeerChatEnabled(enabled: boolean): Promise<void>;
1944
+ getStatus(): Promise<{
1945
+ state: "initialized" | "connecting" | "ready" | "error" | "stopped";
1946
+ busy: boolean;
1947
+ }>;
1948
+ }
1949
+ /** Initializes owned state only. The caller explicitly starts and stops the runtime. */
1950
+ declare function initialize(options: InitializeOptions): Promise<Agent>;
1951
+
1952
+ declare function assertPiRuntimeSupported(nodeVersion?: string): void;
1953
+ declare function createCodingAgentAdapter(config: Pick<PcAgentConfig, "codingAgent" | "dataDirectory" | "groupChatEnabled" | "peerChatEnabled">, onDiagnostic?: (message: string) => void, owner?: Pick<AgentSessionCreateOptions, "userId" | "machineId">): Promise<CodingAgentAdapter>;
1954
+
1955
+ interface CodingAgentPresentation {
1956
+ readonly name: string;
1957
+ readonly icon: string;
1958
+ }
1959
+ declare function codingAgentPresentation(agentId: string): CodingAgentPresentation;
1960
+
1961
+ export { AgentSelectionSchema, CachedPairingProvider, ContentCipher, DataDirectoryLease, DeviceIdentitySchema, PEER_CHAT_TIMEOUT_MS, PeerChatRequestSchema, PeerChatResultSchema, assertPiRuntimeSupported, buildPairingUri, codingAgentPresentation, createCodingAgentAdapter, createPersistentContentCipher, generateContentKey, initialize, loadOrCreateContentKey, parseContentKey, requestPairingUri, supportsAgentSelection };
1962
+ export type { Agent, AgentSelection, AgentSelectionProvider, AgentSessionConfiguration, AgentSessionConfigureOptions, AgentSessionCreateOptions, CodingAgentAdapter, CodingAgentConfig, CodingAgentId, CodingAgentSessionCallbacks, ContentKeyMaterial, DeviceIdentity, InitializeOptions, PairingProvider, PairingTicket, PcAgentConfig, PeerChatRequest, PeerChatResult, RelayRegistrationStatus, RelaySocket, RelaySocketFactory, SelectableAgent };