@linkshell/wire 0.2.7 → 0.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/model.d.ts CHANGED
@@ -17,6 +17,10 @@ export declare const agentCapabilitiesSchema: z.ZodObject<{
17
17
  steer: z.ZodBoolean;
18
18
  permissions: z.ZodBoolean;
19
19
  images: z.ZodBoolean;
20
+ audio: z.ZodOptional<z.ZodBoolean>;
21
+ embeddedContext: z.ZodOptional<z.ZodBoolean>;
22
+ /** Host-managed ACP settings and optional protocol features. */
23
+ acp: z.ZodOptional<z.ZodBoolean>;
20
24
  /**
21
25
  * The agent forks sessions itself, keeping everything it knew. Every agent's
22
26
  * sessions can be forked: without this (or from a single reply, where the
@@ -34,6 +38,9 @@ export declare const agentCapabilitiesSchema: z.ZodObject<{
34
38
  fork: boolean;
35
39
  models: boolean;
36
40
  modes: boolean;
41
+ acp?: boolean | undefined;
42
+ audio?: boolean | undefined;
43
+ embeddedContext?: boolean | undefined;
37
44
  }, {
38
45
  interrupt: boolean;
39
46
  steer: boolean;
@@ -42,6 +49,9 @@ export declare const agentCapabilitiesSchema: z.ZodObject<{
42
49
  fork: boolean;
43
50
  models: boolean;
44
51
  modes: boolean;
52
+ acp?: boolean | undefined;
53
+ audio?: boolean | undefined;
54
+ embeddedContext?: boolean | undefined;
45
55
  }>;
46
56
  export type AgentCapabilities = z.infer<typeof agentCapabilitiesSchema>;
47
57
  /**
@@ -94,6 +104,10 @@ export declare const agentInfoSchema: z.ZodObject<{
94
104
  steer: z.ZodBoolean;
95
105
  permissions: z.ZodBoolean;
96
106
  images: z.ZodBoolean;
107
+ audio: z.ZodOptional<z.ZodBoolean>;
108
+ embeddedContext: z.ZodOptional<z.ZodBoolean>;
109
+ /** Host-managed ACP settings and optional protocol features. */
110
+ acp: z.ZodOptional<z.ZodBoolean>;
97
111
  /**
98
112
  * The agent forks sessions itself, keeping everything it knew. Every agent's
99
113
  * sessions can be forked: without this (or from a single reply, where the
@@ -111,6 +125,9 @@ export declare const agentInfoSchema: z.ZodObject<{
111
125
  fork: boolean;
112
126
  models: boolean;
113
127
  modes: boolean;
128
+ acp?: boolean | undefined;
129
+ audio?: boolean | undefined;
130
+ embeddedContext?: boolean | undefined;
114
131
  }, {
115
132
  interrupt: boolean;
116
133
  steer: boolean;
@@ -119,11 +136,14 @@ export declare const agentInfoSchema: z.ZodObject<{
119
136
  fork: boolean;
120
137
  models: boolean;
121
138
  modes: boolean;
139
+ acp?: boolean | undefined;
140
+ audio?: boolean | undefined;
141
+ embeddedContext?: boolean | undefined;
122
142
  }>;
123
143
  }, "strip", z.ZodTypeAny, {
124
144
  id: string;
125
145
  label: string;
126
- tier: "multi_client" | "handoff" | "remote" | "terminal";
146
+ tier: "terminal" | "multi_client" | "handoff" | "remote";
127
147
  installed: boolean;
128
148
  capabilities: {
129
149
  interrupt: boolean;
@@ -133,6 +153,9 @@ export declare const agentInfoSchema: z.ZodObject<{
133
153
  fork: boolean;
134
154
  models: boolean;
135
155
  modes: boolean;
156
+ acp?: boolean | undefined;
157
+ audio?: boolean | undefined;
158
+ embeddedContext?: boolean | undefined;
136
159
  };
137
160
  version?: string | undefined;
138
161
  problem?: string | undefined;
@@ -144,7 +167,7 @@ export declare const agentInfoSchema: z.ZodObject<{
144
167
  }, {
145
168
  id: string;
146
169
  label: string;
147
- tier: "multi_client" | "handoff" | "remote" | "terminal";
170
+ tier: "terminal" | "multi_client" | "handoff" | "remote";
148
171
  installed: boolean;
149
172
  capabilities: {
150
173
  interrupt: boolean;
@@ -154,6 +177,9 @@ export declare const agentInfoSchema: z.ZodObject<{
154
177
  fork: boolean;
155
178
  models: boolean;
156
179
  modes: boolean;
180
+ acp?: boolean | undefined;
181
+ audio?: boolean | undefined;
182
+ embeddedContext?: boolean | undefined;
157
183
  };
158
184
  version?: string | undefined;
159
185
  problem?: string | undefined;
@@ -170,9 +196,9 @@ export type AgentInfo = z.infer<typeof agentInfoSchema>;
170
196
  */
171
197
  export declare const sessionDriverSchema: z.ZodEnum<["desktop", "remote", "none"]>;
172
198
  export type SessionDriver = z.infer<typeof sessionDriverSchema>;
173
- export declare const sessionStateSchema: z.ZodEnum<["idle", "running", "waiting", "error", "offline"]>;
199
+ export declare const sessionStateSchema: z.ZodEnum<["idle", "running", "waiting", "error", "offline", "unknown"]>;
174
200
  export type SessionState = z.infer<typeof sessionStateSchema>;
175
- export declare const toolKindSchema: z.ZodEnum<["read", "edit", "delete", "move", "search", "execute", "think", "fetch", "other"]>;
201
+ export declare const toolKindSchema: z.ZodEnum<["read", "edit", "delete", "move", "search", "execute", "think", "fetch", "switch_mode", "other"]>;
176
202
  export type ToolKind = z.infer<typeof toolKindSchema>;
177
203
  export declare const permissionOptionSchema: z.ZodObject<{
178
204
  optionId: z.ZodString;
@@ -180,27 +206,27 @@ export declare const permissionOptionSchema: z.ZodObject<{
180
206
  kind: z.ZodEnum<["allow_once", "allow_always", "reject_once", "reject_always"]>;
181
207
  }, "strip", z.ZodTypeAny, {
182
208
  name: string;
183
- optionId: string;
184
209
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
210
+ optionId: string;
185
211
  }, {
186
212
  name: string;
187
- optionId: string;
188
213
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
214
+ optionId: string;
189
215
  }>;
190
216
  export type PermissionOption = z.infer<typeof permissionOptionSchema>;
191
217
  /** What a running session is doing right now, for list rows. Live only. */
192
218
  export declare const sessionActivitySchema: z.ZodObject<{
193
219
  kind: z.ZodEnum<["thinking", "responding", "tool"]>;
194
220
  title: z.ZodOptional<z.ZodString>;
195
- toolKind: z.ZodOptional<z.ZodEnum<["read", "edit", "delete", "move", "search", "execute", "think", "fetch", "other"]>>;
221
+ toolKind: z.ZodOptional<z.ZodEnum<["read", "edit", "delete", "move", "search", "execute", "think", "fetch", "switch_mode", "other"]>>;
196
222
  }, "strip", z.ZodTypeAny, {
197
223
  kind: "thinking" | "responding" | "tool";
198
224
  title?: string | undefined;
199
- toolKind?: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other" | undefined;
225
+ toolKind?: "delete" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "other" | undefined;
200
226
  }, {
201
227
  kind: "thinking" | "responding" | "tool";
202
228
  title?: string | undefined;
203
- toolKind?: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other" | undefined;
229
+ toolKind?: "delete" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "other" | undefined;
204
230
  }>;
205
231
  export type SessionActivity = z.infer<typeof sessionActivitySchema>;
206
232
  /** The oldest unanswered permission request, so lists can offer approval inline. Live only. */
@@ -211,6 +237,38 @@ export type SessionActivity = z.infer<typeof sessionActivitySchema>;
211
237
  */
212
238
  export declare const questionSchema: z.ZodObject<{
213
239
  id: z.ZodString;
240
+ constraints: z.ZodOptional<z.ZodObject<{
241
+ type: z.ZodEnum<["string", "number", "integer", "boolean", "array"]>;
242
+ minimum: z.ZodOptional<z.ZodNumber>;
243
+ maximum: z.ZodOptional<z.ZodNumber>;
244
+ minLength: z.ZodOptional<z.ZodNumber>;
245
+ maxLength: z.ZodOptional<z.ZodNumber>;
246
+ minItems: z.ZodOptional<z.ZodNumber>;
247
+ maxItems: z.ZodOptional<z.ZodNumber>;
248
+ pattern: z.ZodOptional<z.ZodString>;
249
+ format: z.ZodOptional<z.ZodString>;
250
+ }, "strip", z.ZodTypeAny, {
251
+ type: "string" | "number" | "boolean" | "integer" | "array";
252
+ minimum?: number | undefined;
253
+ maximum?: number | undefined;
254
+ minLength?: number | undefined;
255
+ maxLength?: number | undefined;
256
+ minItems?: number | undefined;
257
+ maxItems?: number | undefined;
258
+ pattern?: string | undefined;
259
+ format?: string | undefined;
260
+ }, {
261
+ type: "string" | "number" | "boolean" | "integer" | "array";
262
+ minimum?: number | undefined;
263
+ maximum?: number | undefined;
264
+ minLength?: number | undefined;
265
+ maxLength?: number | undefined;
266
+ minItems?: number | undefined;
267
+ maxItems?: number | undefined;
268
+ pattern?: string | undefined;
269
+ format?: string | undefined;
270
+ }>>;
271
+ defaults: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
214
272
  /** A short label for the question ("Auth method"). */
215
273
  header: z.ZodOptional<z.ZodString>;
216
274
  text: z.ZodString;
@@ -236,30 +294,54 @@ export declare const questionSchema: z.ZodObject<{
236
294
  required: z.ZodOptional<z.ZodBoolean>;
237
295
  }, "strip", z.ZodTypeAny, {
238
296
  id: string;
239
- kind: "text" | "choice" | "choices";
240
297
  text: string;
298
+ kind: "text" | "choice" | "choices";
241
299
  options?: {
242
300
  value: string;
243
301
  label: string;
244
302
  description?: string | undefined;
245
303
  }[] | undefined;
304
+ required?: boolean | undefined;
246
305
  other?: boolean | undefined;
306
+ constraints?: {
307
+ type: "string" | "number" | "boolean" | "integer" | "array";
308
+ minimum?: number | undefined;
309
+ maximum?: number | undefined;
310
+ minLength?: number | undefined;
311
+ maxLength?: number | undefined;
312
+ minItems?: number | undefined;
313
+ maxItems?: number | undefined;
314
+ pattern?: string | undefined;
315
+ format?: string | undefined;
316
+ } | undefined;
317
+ defaults?: string[] | undefined;
247
318
  header?: string | undefined;
248
319
  secret?: boolean | undefined;
249
- required?: boolean | undefined;
250
320
  }, {
251
321
  id: string;
252
- kind: "text" | "choice" | "choices";
253
322
  text: string;
323
+ kind: "text" | "choice" | "choices";
254
324
  options?: {
255
325
  value: string;
256
326
  label: string;
257
327
  description?: string | undefined;
258
328
  }[] | undefined;
329
+ required?: boolean | undefined;
259
330
  other?: boolean | undefined;
331
+ constraints?: {
332
+ type: "string" | "number" | "boolean" | "integer" | "array";
333
+ minimum?: number | undefined;
334
+ maximum?: number | undefined;
335
+ minLength?: number | undefined;
336
+ maxLength?: number | undefined;
337
+ minItems?: number | undefined;
338
+ maxItems?: number | undefined;
339
+ pattern?: string | undefined;
340
+ format?: string | undefined;
341
+ } | undefined;
342
+ defaults?: string[] | undefined;
260
343
  header?: string | undefined;
261
344
  secret?: boolean | undefined;
262
- required?: boolean | undefined;
263
345
  }>;
264
346
  export type Question = z.infer<typeof questionSchema>;
265
347
  export declare const questionAnswerSchema: z.ZodObject<{
@@ -269,36 +351,384 @@ export declare const questionAnswerSchema: z.ZodObject<{
269
351
  /** The user's own answer beside the options. */
270
352
  other: z.ZodOptional<z.ZodString>;
271
353
  }, "strip", z.ZodTypeAny, {
272
- id: string;
273
354
  values: string[];
355
+ id: string;
274
356
  other?: string | undefined;
275
357
  }, {
276
- id: string;
277
358
  values: string[];
359
+ id: string;
278
360
  other?: string | undefined;
279
361
  }>;
280
362
  export type QuestionAnswer = z.infer<typeof questionAnswerSchema>;
281
363
  export declare const pendingPermissionSchema: z.ZodObject<{
282
364
  requestId: z.ZodString;
365
+ childSessionId: z.ZodOptional<z.ZodString>;
283
366
  toolCallId: z.ZodOptional<z.ZodString>;
284
367
  title: z.ZodString;
285
368
  detail: z.ZodOptional<z.ZodString>;
369
+ tool: z.ZodOptional<z.ZodObject<{
370
+ title: z.ZodOptional<z.ZodString>;
371
+ kind: z.ZodOptional<z.ZodEnum<["read", "edit", "delete", "move", "search", "execute", "think", "fetch", "switch_mode", "other"]>>;
372
+ rawInput: z.ZodOptional<z.ZodUnknown>;
373
+ content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
374
+ type: z.ZodLiteral<"content">;
375
+ content: z.ZodType<{
376
+ type: "text";
377
+ text: string;
378
+ annotations?: z.objectOutputType<{
379
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
380
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
381
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
382
+ }, z.ZodTypeAny, "passthrough"> | undefined;
383
+ _meta?: Record<string, unknown> | undefined;
384
+ } | {
385
+ type: "image";
386
+ mimeType: string;
387
+ annotations?: z.objectOutputType<{
388
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
389
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
390
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
391
+ }, z.ZodTypeAny, "passthrough"> | undefined;
392
+ _meta?: Record<string, unknown> | undefined;
393
+ data?: string | undefined;
394
+ uri?: string | undefined;
395
+ } | {
396
+ type: "audio";
397
+ mimeType: string;
398
+ annotations?: z.objectOutputType<{
399
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
400
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
401
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
402
+ }, z.ZodTypeAny, "passthrough"> | undefined;
403
+ _meta?: Record<string, unknown> | undefined;
404
+ data?: string | undefined;
405
+ uri?: string | undefined;
406
+ } | {
407
+ type: "resource";
408
+ resource: {
409
+ uri: string;
410
+ text?: string | undefined;
411
+ _meta?: Record<string, unknown> | undefined;
412
+ mimeType?: string | undefined;
413
+ blob?: string | undefined;
414
+ assetUri?: string | undefined;
415
+ };
416
+ annotations?: z.objectOutputType<{
417
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
418
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
419
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
420
+ }, z.ZodTypeAny, "passthrough"> | undefined;
421
+ _meta?: Record<string, unknown> | undefined;
422
+ } | {
423
+ type: "resource_link";
424
+ name: string;
425
+ uri: string;
426
+ description?: string | undefined;
427
+ title?: string | undefined;
428
+ annotations?: z.objectOutputType<{
429
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
430
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
431
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
432
+ }, z.ZodTypeAny, "passthrough"> | undefined;
433
+ _meta?: Record<string, unknown> | undefined;
434
+ mimeType?: string | undefined;
435
+ size?: number | undefined;
436
+ kind?: "agent" | "file" | "skill" | undefined;
437
+ }, z.ZodTypeDef, unknown>;
438
+ }, "strip", z.ZodTypeAny, {
439
+ type: "content";
440
+ content: {
441
+ type: "text";
442
+ text: string;
443
+ annotations?: z.objectOutputType<{
444
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
445
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
446
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
447
+ }, z.ZodTypeAny, "passthrough"> | undefined;
448
+ _meta?: Record<string, unknown> | undefined;
449
+ } | {
450
+ type: "image";
451
+ mimeType: string;
452
+ annotations?: z.objectOutputType<{
453
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
454
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
455
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
456
+ }, z.ZodTypeAny, "passthrough"> | undefined;
457
+ _meta?: Record<string, unknown> | undefined;
458
+ data?: string | undefined;
459
+ uri?: string | undefined;
460
+ } | {
461
+ type: "audio";
462
+ mimeType: string;
463
+ annotations?: z.objectOutputType<{
464
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
465
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
466
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
467
+ }, z.ZodTypeAny, "passthrough"> | undefined;
468
+ _meta?: Record<string, unknown> | undefined;
469
+ data?: string | undefined;
470
+ uri?: string | undefined;
471
+ } | {
472
+ type: "resource";
473
+ resource: {
474
+ uri: string;
475
+ text?: string | undefined;
476
+ _meta?: Record<string, unknown> | undefined;
477
+ mimeType?: string | undefined;
478
+ blob?: string | undefined;
479
+ assetUri?: string | undefined;
480
+ };
481
+ annotations?: z.objectOutputType<{
482
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
483
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
484
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
485
+ }, z.ZodTypeAny, "passthrough"> | undefined;
486
+ _meta?: Record<string, unknown> | undefined;
487
+ } | {
488
+ type: "resource_link";
489
+ name: string;
490
+ uri: string;
491
+ description?: string | undefined;
492
+ title?: string | undefined;
493
+ annotations?: z.objectOutputType<{
494
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
495
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
496
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
497
+ }, z.ZodTypeAny, "passthrough"> | undefined;
498
+ _meta?: Record<string, unknown> | undefined;
499
+ mimeType?: string | undefined;
500
+ size?: number | undefined;
501
+ kind?: "agent" | "file" | "skill" | undefined;
502
+ };
503
+ }, {
504
+ type: "content";
505
+ content?: unknown;
506
+ }>, z.ZodObject<{
507
+ type: z.ZodLiteral<"diff">;
508
+ path: z.ZodString;
509
+ oldText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
510
+ newText: z.ZodString;
511
+ }, "strip", z.ZodTypeAny, {
512
+ path: string;
513
+ type: "diff";
514
+ newText: string;
515
+ oldText?: string | null | undefined;
516
+ }, {
517
+ path: string;
518
+ type: "diff";
519
+ newText: string;
520
+ oldText?: string | null | undefined;
521
+ }>, z.ZodObject<{
522
+ type: z.ZodLiteral<"patch">;
523
+ path: z.ZodString;
524
+ change: z.ZodEnum<["add", "delete", "update"]>;
525
+ movePath: z.ZodOptional<z.ZodString>;
526
+ diff: z.ZodString;
527
+ }, "strip", z.ZodTypeAny, {
528
+ path: string;
529
+ type: "patch";
530
+ diff: string;
531
+ change: "add" | "delete" | "update";
532
+ movePath?: string | undefined;
533
+ }, {
534
+ path: string;
535
+ type: "patch";
536
+ diff: string;
537
+ change: "add" | "delete" | "update";
538
+ movePath?: string | undefined;
539
+ }>, z.ZodObject<{
540
+ type: z.ZodLiteral<"terminal">;
541
+ terminalId: z.ZodString;
542
+ }, "strip", z.ZodTypeAny, {
543
+ type: "terminal";
544
+ terminalId: string;
545
+ }, {
546
+ type: "terminal";
547
+ terminalId: string;
548
+ }>]>, "many">>;
549
+ locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
550
+ path: z.ZodString;
551
+ line: z.ZodOptional<z.ZodNumber>;
552
+ }, "strip", z.ZodTypeAny, {
553
+ path: string;
554
+ line?: number | undefined;
555
+ }, {
556
+ path: string;
557
+ line?: number | undefined;
558
+ }>, "many">>;
559
+ }, "strip", z.ZodTypeAny, {
560
+ title?: string | undefined;
561
+ kind?: "delete" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "other" | undefined;
562
+ content?: ({
563
+ type: "content";
564
+ content: {
565
+ type: "text";
566
+ text: string;
567
+ annotations?: z.objectOutputType<{
568
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
569
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
570
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
571
+ }, z.ZodTypeAny, "passthrough"> | undefined;
572
+ _meta?: Record<string, unknown> | undefined;
573
+ } | {
574
+ type: "image";
575
+ mimeType: string;
576
+ annotations?: z.objectOutputType<{
577
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
578
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
579
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
580
+ }, z.ZodTypeAny, "passthrough"> | undefined;
581
+ _meta?: Record<string, unknown> | undefined;
582
+ data?: string | undefined;
583
+ uri?: string | undefined;
584
+ } | {
585
+ type: "audio";
586
+ mimeType: string;
587
+ annotations?: z.objectOutputType<{
588
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
589
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
590
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
591
+ }, z.ZodTypeAny, "passthrough"> | undefined;
592
+ _meta?: Record<string, unknown> | undefined;
593
+ data?: string | undefined;
594
+ uri?: string | undefined;
595
+ } | {
596
+ type: "resource";
597
+ resource: {
598
+ uri: string;
599
+ text?: string | undefined;
600
+ _meta?: Record<string, unknown> | undefined;
601
+ mimeType?: string | undefined;
602
+ blob?: string | undefined;
603
+ assetUri?: string | undefined;
604
+ };
605
+ annotations?: z.objectOutputType<{
606
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
607
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
608
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
609
+ }, z.ZodTypeAny, "passthrough"> | undefined;
610
+ _meta?: Record<string, unknown> | undefined;
611
+ } | {
612
+ type: "resource_link";
613
+ name: string;
614
+ uri: string;
615
+ description?: string | undefined;
616
+ title?: string | undefined;
617
+ annotations?: z.objectOutputType<{
618
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
619
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
620
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
621
+ }, z.ZodTypeAny, "passthrough"> | undefined;
622
+ _meta?: Record<string, unknown> | undefined;
623
+ mimeType?: string | undefined;
624
+ size?: number | undefined;
625
+ kind?: "agent" | "file" | "skill" | undefined;
626
+ };
627
+ } | {
628
+ path: string;
629
+ type: "diff";
630
+ newText: string;
631
+ oldText?: string | null | undefined;
632
+ } | {
633
+ path: string;
634
+ type: "patch";
635
+ diff: string;
636
+ change: "add" | "delete" | "update";
637
+ movePath?: string | undefined;
638
+ } | {
639
+ type: "terminal";
640
+ terminalId: string;
641
+ })[] | undefined;
642
+ rawInput?: unknown;
643
+ locations?: {
644
+ path: string;
645
+ line?: number | undefined;
646
+ }[] | undefined;
647
+ }, {
648
+ title?: string | undefined;
649
+ kind?: "delete" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "other" | undefined;
650
+ content?: ({
651
+ type: "content";
652
+ content?: unknown;
653
+ } | {
654
+ path: string;
655
+ type: "diff";
656
+ newText: string;
657
+ oldText?: string | null | undefined;
658
+ } | {
659
+ path: string;
660
+ type: "patch";
661
+ diff: string;
662
+ change: "add" | "delete" | "update";
663
+ movePath?: string | undefined;
664
+ } | {
665
+ type: "terminal";
666
+ terminalId: string;
667
+ })[] | undefined;
668
+ rawInput?: unknown;
669
+ locations?: {
670
+ path: string;
671
+ line?: number | undefined;
672
+ }[] | undefined;
673
+ }>>;
674
+ url: z.ZodOptional<z.ZodObject<{
675
+ url: z.ZodString;
676
+ elicitationId: z.ZodString;
677
+ }, "strip", z.ZodTypeAny, {
678
+ url: string;
679
+ elicitationId: string;
680
+ }, {
681
+ url: string;
682
+ elicitationId: string;
683
+ }>>;
286
684
  options: z.ZodArray<z.ZodObject<{
287
685
  optionId: z.ZodString;
288
686
  name: z.ZodString;
289
687
  kind: z.ZodEnum<["allow_once", "allow_always", "reject_once", "reject_always"]>;
290
688
  }, "strip", z.ZodTypeAny, {
291
689
  name: string;
292
- optionId: string;
293
690
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
691
+ optionId: string;
294
692
  }, {
295
693
  name: string;
296
- optionId: string;
297
694
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
695
+ optionId: string;
298
696
  }>, "many">;
299
697
  /** Set when this is a question to answer (`sessions.answer`) rather than a permission to give. */
300
698
  questions: z.ZodOptional<z.ZodArray<z.ZodObject<{
301
699
  id: z.ZodString;
700
+ constraints: z.ZodOptional<z.ZodObject<{
701
+ type: z.ZodEnum<["string", "number", "integer", "boolean", "array"]>;
702
+ minimum: z.ZodOptional<z.ZodNumber>;
703
+ maximum: z.ZodOptional<z.ZodNumber>;
704
+ minLength: z.ZodOptional<z.ZodNumber>;
705
+ maxLength: z.ZodOptional<z.ZodNumber>;
706
+ minItems: z.ZodOptional<z.ZodNumber>;
707
+ maxItems: z.ZodOptional<z.ZodNumber>;
708
+ pattern: z.ZodOptional<z.ZodString>;
709
+ format: z.ZodOptional<z.ZodString>;
710
+ }, "strip", z.ZodTypeAny, {
711
+ type: "string" | "number" | "boolean" | "integer" | "array";
712
+ minimum?: number | undefined;
713
+ maximum?: number | undefined;
714
+ minLength?: number | undefined;
715
+ maxLength?: number | undefined;
716
+ minItems?: number | undefined;
717
+ maxItems?: number | undefined;
718
+ pattern?: string | undefined;
719
+ format?: string | undefined;
720
+ }, {
721
+ type: "string" | "number" | "boolean" | "integer" | "array";
722
+ minimum?: number | undefined;
723
+ maximum?: number | undefined;
724
+ minLength?: number | undefined;
725
+ maxLength?: number | undefined;
726
+ minItems?: number | undefined;
727
+ maxItems?: number | undefined;
728
+ pattern?: string | undefined;
729
+ format?: string | undefined;
730
+ }>>;
731
+ defaults: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
302
732
  /** A short label for the question ("Auth method"). */
303
733
  header: z.ZodOptional<z.ZodString>;
304
734
  text: z.ZodString;
@@ -324,78 +754,252 @@ export declare const pendingPermissionSchema: z.ZodObject<{
324
754
  required: z.ZodOptional<z.ZodBoolean>;
325
755
  }, "strip", z.ZodTypeAny, {
326
756
  id: string;
327
- kind: "text" | "choice" | "choices";
328
757
  text: string;
758
+ kind: "text" | "choice" | "choices";
329
759
  options?: {
330
760
  value: string;
331
761
  label: string;
332
762
  description?: string | undefined;
333
763
  }[] | undefined;
764
+ required?: boolean | undefined;
334
765
  other?: boolean | undefined;
766
+ constraints?: {
767
+ type: "string" | "number" | "boolean" | "integer" | "array";
768
+ minimum?: number | undefined;
769
+ maximum?: number | undefined;
770
+ minLength?: number | undefined;
771
+ maxLength?: number | undefined;
772
+ minItems?: number | undefined;
773
+ maxItems?: number | undefined;
774
+ pattern?: string | undefined;
775
+ format?: string | undefined;
776
+ } | undefined;
777
+ defaults?: string[] | undefined;
335
778
  header?: string | undefined;
336
779
  secret?: boolean | undefined;
337
- required?: boolean | undefined;
338
780
  }, {
339
781
  id: string;
340
- kind: "text" | "choice" | "choices";
341
782
  text: string;
783
+ kind: "text" | "choice" | "choices";
342
784
  options?: {
343
785
  value: string;
344
786
  label: string;
345
787
  description?: string | undefined;
346
788
  }[] | undefined;
789
+ required?: boolean | undefined;
347
790
  other?: boolean | undefined;
791
+ constraints?: {
792
+ type: "string" | "number" | "boolean" | "integer" | "array";
793
+ minimum?: number | undefined;
794
+ maximum?: number | undefined;
795
+ minLength?: number | undefined;
796
+ maxLength?: number | undefined;
797
+ minItems?: number | undefined;
798
+ maxItems?: number | undefined;
799
+ pattern?: string | undefined;
800
+ format?: string | undefined;
801
+ } | undefined;
802
+ defaults?: string[] | undefined;
348
803
  header?: string | undefined;
349
804
  secret?: boolean | undefined;
350
- required?: boolean | undefined;
351
805
  }>, "many">>;
352
806
  }, "strip", z.ZodTypeAny, {
353
807
  options: {
354
808
  name: string;
355
- optionId: string;
356
809
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
810
+ optionId: string;
357
811
  }[];
358
812
  title: string;
359
813
  requestId: string;
814
+ url?: {
815
+ url: string;
816
+ elicitationId: string;
817
+ } | undefined;
360
818
  toolCallId?: string | undefined;
819
+ tool?: {
820
+ title?: string | undefined;
821
+ kind?: "delete" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "other" | undefined;
822
+ content?: ({
823
+ type: "content";
824
+ content: {
825
+ type: "text";
826
+ text: string;
827
+ annotations?: z.objectOutputType<{
828
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
829
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
830
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
831
+ }, z.ZodTypeAny, "passthrough"> | undefined;
832
+ _meta?: Record<string, unknown> | undefined;
833
+ } | {
834
+ type: "image";
835
+ mimeType: string;
836
+ annotations?: z.objectOutputType<{
837
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
838
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
839
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
840
+ }, z.ZodTypeAny, "passthrough"> | undefined;
841
+ _meta?: Record<string, unknown> | undefined;
842
+ data?: string | undefined;
843
+ uri?: string | undefined;
844
+ } | {
845
+ type: "audio";
846
+ mimeType: string;
847
+ annotations?: z.objectOutputType<{
848
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
849
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
850
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
851
+ }, z.ZodTypeAny, "passthrough"> | undefined;
852
+ _meta?: Record<string, unknown> | undefined;
853
+ data?: string | undefined;
854
+ uri?: string | undefined;
855
+ } | {
856
+ type: "resource";
857
+ resource: {
858
+ uri: string;
859
+ text?: string | undefined;
860
+ _meta?: Record<string, unknown> | undefined;
861
+ mimeType?: string | undefined;
862
+ blob?: string | undefined;
863
+ assetUri?: string | undefined;
864
+ };
865
+ annotations?: z.objectOutputType<{
866
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
867
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
868
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
869
+ }, z.ZodTypeAny, "passthrough"> | undefined;
870
+ _meta?: Record<string, unknown> | undefined;
871
+ } | {
872
+ type: "resource_link";
873
+ name: string;
874
+ uri: string;
875
+ description?: string | undefined;
876
+ title?: string | undefined;
877
+ annotations?: z.objectOutputType<{
878
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
879
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
880
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
881
+ }, z.ZodTypeAny, "passthrough"> | undefined;
882
+ _meta?: Record<string, unknown> | undefined;
883
+ mimeType?: string | undefined;
884
+ size?: number | undefined;
885
+ kind?: "agent" | "file" | "skill" | undefined;
886
+ };
887
+ } | {
888
+ path: string;
889
+ type: "diff";
890
+ newText: string;
891
+ oldText?: string | null | undefined;
892
+ } | {
893
+ path: string;
894
+ type: "patch";
895
+ diff: string;
896
+ change: "add" | "delete" | "update";
897
+ movePath?: string | undefined;
898
+ } | {
899
+ type: "terminal";
900
+ terminalId: string;
901
+ })[] | undefined;
902
+ rawInput?: unknown;
903
+ locations?: {
904
+ path: string;
905
+ line?: number | undefined;
906
+ }[] | undefined;
907
+ } | undefined;
908
+ childSessionId?: string | undefined;
361
909
  detail?: string | undefined;
362
910
  questions?: {
363
911
  id: string;
364
- kind: "text" | "choice" | "choices";
365
912
  text: string;
913
+ kind: "text" | "choice" | "choices";
366
914
  options?: {
367
915
  value: string;
368
916
  label: string;
369
917
  description?: string | undefined;
370
918
  }[] | undefined;
919
+ required?: boolean | undefined;
371
920
  other?: boolean | undefined;
921
+ constraints?: {
922
+ type: "string" | "number" | "boolean" | "integer" | "array";
923
+ minimum?: number | undefined;
924
+ maximum?: number | undefined;
925
+ minLength?: number | undefined;
926
+ maxLength?: number | undefined;
927
+ minItems?: number | undefined;
928
+ maxItems?: number | undefined;
929
+ pattern?: string | undefined;
930
+ format?: string | undefined;
931
+ } | undefined;
932
+ defaults?: string[] | undefined;
372
933
  header?: string | undefined;
373
934
  secret?: boolean | undefined;
374
- required?: boolean | undefined;
375
935
  }[] | undefined;
376
936
  }, {
377
937
  options: {
378
938
  name: string;
379
- optionId: string;
380
939
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
940
+ optionId: string;
381
941
  }[];
382
942
  title: string;
383
943
  requestId: string;
944
+ url?: {
945
+ url: string;
946
+ elicitationId: string;
947
+ } | undefined;
384
948
  toolCallId?: string | undefined;
949
+ tool?: {
950
+ title?: string | undefined;
951
+ kind?: "delete" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "other" | undefined;
952
+ content?: ({
953
+ type: "content";
954
+ content?: unknown;
955
+ } | {
956
+ path: string;
957
+ type: "diff";
958
+ newText: string;
959
+ oldText?: string | null | undefined;
960
+ } | {
961
+ path: string;
962
+ type: "patch";
963
+ diff: string;
964
+ change: "add" | "delete" | "update";
965
+ movePath?: string | undefined;
966
+ } | {
967
+ type: "terminal";
968
+ terminalId: string;
969
+ })[] | undefined;
970
+ rawInput?: unknown;
971
+ locations?: {
972
+ path: string;
973
+ line?: number | undefined;
974
+ }[] | undefined;
975
+ } | undefined;
976
+ childSessionId?: string | undefined;
385
977
  detail?: string | undefined;
386
978
  questions?: {
387
979
  id: string;
388
- kind: "text" | "choice" | "choices";
389
980
  text: string;
981
+ kind: "text" | "choice" | "choices";
390
982
  options?: {
391
983
  value: string;
392
984
  label: string;
393
985
  description?: string | undefined;
394
986
  }[] | undefined;
987
+ required?: boolean | undefined;
395
988
  other?: boolean | undefined;
989
+ constraints?: {
990
+ type: "string" | "number" | "boolean" | "integer" | "array";
991
+ minimum?: number | undefined;
992
+ maximum?: number | undefined;
993
+ minLength?: number | undefined;
994
+ maxLength?: number | undefined;
995
+ minItems?: number | undefined;
996
+ maxItems?: number | undefined;
997
+ pattern?: string | undefined;
998
+ format?: string | undefined;
999
+ } | undefined;
1000
+ defaults?: string[] | undefined;
396
1001
  header?: string | undefined;
397
1002
  secret?: boolean | undefined;
398
- required?: boolean | undefined;
399
1003
  }[] | undefined;
400
1004
  }>;
401
1005
  export type PendingPermissionSummary = z.infer<typeof pendingPermissionSchema>;
@@ -405,17 +1009,19 @@ export declare const queuedMessageSchema: z.ZodObject<{
405
1009
  text: z.ZodString;
406
1010
  images: z.ZodNumber;
407
1011
  }, "strip", z.ZodTypeAny, {
408
- images: number;
409
1012
  text: string;
1013
+ images: number;
410
1014
  clientMessageId: string;
411
1015
  }, {
412
- images: number;
413
1016
  text: string;
1017
+ images: number;
414
1018
  clientMessageId: string;
415
1019
  }>;
416
1020
  export type QueuedMessage = z.infer<typeof queuedMessageSchema>;
417
1021
  /** A sub-agent a session started: the tool call it runs under, and how it is doing. */
418
1022
  export declare const subagentInfoSchema: z.ZodObject<{
1023
+ nativeSessionId: z.ZodOptional<z.ZodString>;
1024
+ canCancel: z.ZodOptional<z.ZodBoolean>;
419
1025
  toolCallId: z.ZodString;
420
1026
  parentToolCallId: z.ZodOptional<z.ZodString>;
421
1027
  /** What it was asked to do. */
@@ -492,6 +1098,7 @@ export declare const subagentInfoSchema: z.ZodObject<{
492
1098
  result?: string | undefined;
493
1099
  }>, "many">>;
494
1100
  }, "strip", z.ZodTypeAny, {
1101
+ name?: string | undefined;
495
1102
  completed?: number | undefined;
496
1103
  state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
497
1104
  tokens?: number | undefined;
@@ -499,7 +1106,6 @@ export declare const subagentInfoSchema: z.ZodObject<{
499
1106
  startedAt?: number | undefined;
500
1107
  endedAt?: number | undefined;
501
1108
  runId?: string | undefined;
502
- name?: string | undefined;
503
1109
  started?: number | undefined;
504
1110
  phases?: {
505
1111
  id: string;
@@ -521,6 +1127,7 @@ export declare const subagentInfoSchema: z.ZodObject<{
521
1127
  result?: string | undefined;
522
1128
  }[] | undefined;
523
1129
  }, {
1130
+ name?: string | undefined;
524
1131
  completed?: number | undefined;
525
1132
  state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
526
1133
  tokens?: number | undefined;
@@ -528,7 +1135,6 @@ export declare const subagentInfoSchema: z.ZodObject<{
528
1135
  startedAt?: number | undefined;
529
1136
  endedAt?: number | undefined;
530
1137
  runId?: string | undefined;
531
- name?: string | undefined;
532
1138
  started?: number | undefined;
533
1139
  phases?: {
534
1140
  id: string;
@@ -557,13 +1163,16 @@ export declare const subagentInfoSchema: z.ZodObject<{
557
1163
  toolCallId: string;
558
1164
  startedAt: number;
559
1165
  task: string;
1166
+ name?: string | undefined;
560
1167
  failed?: boolean | undefined;
561
1168
  state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
562
1169
  endedAt?: number | undefined;
563
- name?: string | undefined;
1170
+ nativeSessionId?: string | undefined;
1171
+ canCancel?: boolean | undefined;
564
1172
  parentToolCallId?: string | undefined;
565
1173
  agentType?: string | undefined;
566
1174
  workflow?: {
1175
+ name?: string | undefined;
567
1176
  completed?: number | undefined;
568
1177
  state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
569
1178
  tokens?: number | undefined;
@@ -571,7 +1180,6 @@ export declare const subagentInfoSchema: z.ZodObject<{
571
1180
  startedAt?: number | undefined;
572
1181
  endedAt?: number | undefined;
573
1182
  runId?: string | undefined;
574
- name?: string | undefined;
575
1183
  started?: number | undefined;
576
1184
  phases?: {
577
1185
  id: string;
@@ -599,13 +1207,16 @@ export declare const subagentInfoSchema: z.ZodObject<{
599
1207
  toolCallId: string;
600
1208
  startedAt: number;
601
1209
  task: string;
1210
+ name?: string | undefined;
602
1211
  failed?: boolean | undefined;
603
1212
  state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
604
1213
  endedAt?: number | undefined;
605
- name?: string | undefined;
1214
+ nativeSessionId?: string | undefined;
1215
+ canCancel?: boolean | undefined;
606
1216
  parentToolCallId?: string | undefined;
607
1217
  agentType?: string | undefined;
608
1218
  workflow?: {
1219
+ name?: string | undefined;
609
1220
  completed?: number | undefined;
610
1221
  state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
611
1222
  tokens?: number | undefined;
@@ -613,7 +1224,6 @@ export declare const subagentInfoSchema: z.ZodObject<{
613
1224
  startedAt?: number | undefined;
614
1225
  endedAt?: number | undefined;
615
1226
  runId?: string | undefined;
616
- name?: string | undefined;
617
1227
  started?: number | undefined;
618
1228
  phases?: {
619
1229
  id: string;
@@ -673,10 +1283,10 @@ export declare const backgroundTaskSchema: z.ZodObject<{
673
1283
  state: "unknown" | "running" | "completed" | "failed" | "stopped";
674
1284
  startedAt: number;
675
1285
  kind: "shell" | "monitor";
1286
+ command?: string | undefined;
676
1287
  toolCallId?: string | undefined;
677
1288
  endedAt?: number | undefined;
678
1289
  lastSeq?: number | undefined;
679
- command?: string | undefined;
680
1290
  summary?: string | undefined;
681
1291
  exitCode?: number | undefined;
682
1292
  output?: boolean | undefined;
@@ -687,10 +1297,10 @@ export declare const backgroundTaskSchema: z.ZodObject<{
687
1297
  state: "unknown" | "running" | "completed" | "failed" | "stopped";
688
1298
  startedAt: number;
689
1299
  kind: "shell" | "monitor";
1300
+ command?: string | undefined;
690
1301
  toolCallId?: string | undefined;
691
1302
  endedAt?: number | undefined;
692
1303
  lastSeq?: number | undefined;
693
- command?: string | undefined;
694
1304
  summary?: string | undefined;
695
1305
  exitCode?: number | undefined;
696
1306
  output?: boolean | undefined;
@@ -705,7 +1315,7 @@ export declare const sessionSummarySchema: z.ZodObject<{
705
1315
  title: z.ZodOptional<z.ZodString>;
706
1316
  preview: z.ZodOptional<z.ZodString>;
707
1317
  cwd: z.ZodString;
708
- state: z.ZodEnum<["idle", "running", "waiting", "error", "offline"]>;
1318
+ state: z.ZodEnum<["idle", "running", "waiting", "error", "offline", "unknown"]>;
709
1319
  driver: z.ZodOptional<z.ZodEnum<["desktop", "remote", "none"]>>;
710
1320
  pendingPermissions: z.ZodNumber;
711
1321
  model: z.ZodOptional<z.ZodString>;
@@ -716,37 +1326,385 @@ export declare const sessionSummarySchema: z.ZodObject<{
716
1326
  activity: z.ZodOptional<z.ZodObject<{
717
1327
  kind: z.ZodEnum<["thinking", "responding", "tool"]>;
718
1328
  title: z.ZodOptional<z.ZodString>;
719
- toolKind: z.ZodOptional<z.ZodEnum<["read", "edit", "delete", "move", "search", "execute", "think", "fetch", "other"]>>;
1329
+ toolKind: z.ZodOptional<z.ZodEnum<["read", "edit", "delete", "move", "search", "execute", "think", "fetch", "switch_mode", "other"]>>;
720
1330
  }, "strip", z.ZodTypeAny, {
721
1331
  kind: "thinking" | "responding" | "tool";
722
1332
  title?: string | undefined;
723
- toolKind?: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other" | undefined;
1333
+ toolKind?: "delete" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "other" | undefined;
724
1334
  }, {
725
1335
  kind: "thinking" | "responding" | "tool";
726
1336
  title?: string | undefined;
727
- toolKind?: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other" | undefined;
1337
+ toolKind?: "delete" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "other" | undefined;
728
1338
  }>>;
729
1339
  permission: z.ZodOptional<z.ZodObject<{
730
1340
  requestId: z.ZodString;
1341
+ childSessionId: z.ZodOptional<z.ZodString>;
731
1342
  toolCallId: z.ZodOptional<z.ZodString>;
732
1343
  title: z.ZodString;
733
1344
  detail: z.ZodOptional<z.ZodString>;
1345
+ tool: z.ZodOptional<z.ZodObject<{
1346
+ title: z.ZodOptional<z.ZodString>;
1347
+ kind: z.ZodOptional<z.ZodEnum<["read", "edit", "delete", "move", "search", "execute", "think", "fetch", "switch_mode", "other"]>>;
1348
+ rawInput: z.ZodOptional<z.ZodUnknown>;
1349
+ content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1350
+ type: z.ZodLiteral<"content">;
1351
+ content: z.ZodType<{
1352
+ type: "text";
1353
+ text: string;
1354
+ annotations?: z.objectOutputType<{
1355
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1356
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1357
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1358
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1359
+ _meta?: Record<string, unknown> | undefined;
1360
+ } | {
1361
+ type: "image";
1362
+ mimeType: string;
1363
+ annotations?: z.objectOutputType<{
1364
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1365
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1366
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1367
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1368
+ _meta?: Record<string, unknown> | undefined;
1369
+ data?: string | undefined;
1370
+ uri?: string | undefined;
1371
+ } | {
1372
+ type: "audio";
1373
+ mimeType: string;
1374
+ annotations?: z.objectOutputType<{
1375
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1376
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1377
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1378
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1379
+ _meta?: Record<string, unknown> | undefined;
1380
+ data?: string | undefined;
1381
+ uri?: string | undefined;
1382
+ } | {
1383
+ type: "resource";
1384
+ resource: {
1385
+ uri: string;
1386
+ text?: string | undefined;
1387
+ _meta?: Record<string, unknown> | undefined;
1388
+ mimeType?: string | undefined;
1389
+ blob?: string | undefined;
1390
+ assetUri?: string | undefined;
1391
+ };
1392
+ annotations?: z.objectOutputType<{
1393
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1394
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1395
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1396
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1397
+ _meta?: Record<string, unknown> | undefined;
1398
+ } | {
1399
+ type: "resource_link";
1400
+ name: string;
1401
+ uri: string;
1402
+ description?: string | undefined;
1403
+ title?: string | undefined;
1404
+ annotations?: z.objectOutputType<{
1405
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1406
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1407
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1408
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1409
+ _meta?: Record<string, unknown> | undefined;
1410
+ mimeType?: string | undefined;
1411
+ size?: number | undefined;
1412
+ kind?: "agent" | "file" | "skill" | undefined;
1413
+ }, z.ZodTypeDef, unknown>;
1414
+ }, "strip", z.ZodTypeAny, {
1415
+ type: "content";
1416
+ content: {
1417
+ type: "text";
1418
+ text: string;
1419
+ annotations?: z.objectOutputType<{
1420
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1421
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1422
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1423
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1424
+ _meta?: Record<string, unknown> | undefined;
1425
+ } | {
1426
+ type: "image";
1427
+ mimeType: string;
1428
+ annotations?: z.objectOutputType<{
1429
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1430
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1431
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1432
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1433
+ _meta?: Record<string, unknown> | undefined;
1434
+ data?: string | undefined;
1435
+ uri?: string | undefined;
1436
+ } | {
1437
+ type: "audio";
1438
+ mimeType: string;
1439
+ annotations?: z.objectOutputType<{
1440
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1441
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1442
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1443
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1444
+ _meta?: Record<string, unknown> | undefined;
1445
+ data?: string | undefined;
1446
+ uri?: string | undefined;
1447
+ } | {
1448
+ type: "resource";
1449
+ resource: {
1450
+ uri: string;
1451
+ text?: string | undefined;
1452
+ _meta?: Record<string, unknown> | undefined;
1453
+ mimeType?: string | undefined;
1454
+ blob?: string | undefined;
1455
+ assetUri?: string | undefined;
1456
+ };
1457
+ annotations?: z.objectOutputType<{
1458
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1459
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1460
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1461
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1462
+ _meta?: Record<string, unknown> | undefined;
1463
+ } | {
1464
+ type: "resource_link";
1465
+ name: string;
1466
+ uri: string;
1467
+ description?: string | undefined;
1468
+ title?: string | undefined;
1469
+ annotations?: z.objectOutputType<{
1470
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1471
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1472
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1473
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1474
+ _meta?: Record<string, unknown> | undefined;
1475
+ mimeType?: string | undefined;
1476
+ size?: number | undefined;
1477
+ kind?: "agent" | "file" | "skill" | undefined;
1478
+ };
1479
+ }, {
1480
+ type: "content";
1481
+ content?: unknown;
1482
+ }>, z.ZodObject<{
1483
+ type: z.ZodLiteral<"diff">;
1484
+ path: z.ZodString;
1485
+ oldText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1486
+ newText: z.ZodString;
1487
+ }, "strip", z.ZodTypeAny, {
1488
+ path: string;
1489
+ type: "diff";
1490
+ newText: string;
1491
+ oldText?: string | null | undefined;
1492
+ }, {
1493
+ path: string;
1494
+ type: "diff";
1495
+ newText: string;
1496
+ oldText?: string | null | undefined;
1497
+ }>, z.ZodObject<{
1498
+ type: z.ZodLiteral<"patch">;
1499
+ path: z.ZodString;
1500
+ change: z.ZodEnum<["add", "delete", "update"]>;
1501
+ movePath: z.ZodOptional<z.ZodString>;
1502
+ diff: z.ZodString;
1503
+ }, "strip", z.ZodTypeAny, {
1504
+ path: string;
1505
+ type: "patch";
1506
+ diff: string;
1507
+ change: "add" | "delete" | "update";
1508
+ movePath?: string | undefined;
1509
+ }, {
1510
+ path: string;
1511
+ type: "patch";
1512
+ diff: string;
1513
+ change: "add" | "delete" | "update";
1514
+ movePath?: string | undefined;
1515
+ }>, z.ZodObject<{
1516
+ type: z.ZodLiteral<"terminal">;
1517
+ terminalId: z.ZodString;
1518
+ }, "strip", z.ZodTypeAny, {
1519
+ type: "terminal";
1520
+ terminalId: string;
1521
+ }, {
1522
+ type: "terminal";
1523
+ terminalId: string;
1524
+ }>]>, "many">>;
1525
+ locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
1526
+ path: z.ZodString;
1527
+ line: z.ZodOptional<z.ZodNumber>;
1528
+ }, "strip", z.ZodTypeAny, {
1529
+ path: string;
1530
+ line?: number | undefined;
1531
+ }, {
1532
+ path: string;
1533
+ line?: number | undefined;
1534
+ }>, "many">>;
1535
+ }, "strip", z.ZodTypeAny, {
1536
+ title?: string | undefined;
1537
+ kind?: "delete" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "other" | undefined;
1538
+ content?: ({
1539
+ type: "content";
1540
+ content: {
1541
+ type: "text";
1542
+ text: string;
1543
+ annotations?: z.objectOutputType<{
1544
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1545
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1546
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1547
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1548
+ _meta?: Record<string, unknown> | undefined;
1549
+ } | {
1550
+ type: "image";
1551
+ mimeType: string;
1552
+ annotations?: z.objectOutputType<{
1553
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1554
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1555
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1556
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1557
+ _meta?: Record<string, unknown> | undefined;
1558
+ data?: string | undefined;
1559
+ uri?: string | undefined;
1560
+ } | {
1561
+ type: "audio";
1562
+ mimeType: string;
1563
+ annotations?: z.objectOutputType<{
1564
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1565
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1566
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1567
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1568
+ _meta?: Record<string, unknown> | undefined;
1569
+ data?: string | undefined;
1570
+ uri?: string | undefined;
1571
+ } | {
1572
+ type: "resource";
1573
+ resource: {
1574
+ uri: string;
1575
+ text?: string | undefined;
1576
+ _meta?: Record<string, unknown> | undefined;
1577
+ mimeType?: string | undefined;
1578
+ blob?: string | undefined;
1579
+ assetUri?: string | undefined;
1580
+ };
1581
+ annotations?: z.objectOutputType<{
1582
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1583
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1584
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1585
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1586
+ _meta?: Record<string, unknown> | undefined;
1587
+ } | {
1588
+ type: "resource_link";
1589
+ name: string;
1590
+ uri: string;
1591
+ description?: string | undefined;
1592
+ title?: string | undefined;
1593
+ annotations?: z.objectOutputType<{
1594
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1595
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1596
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1597
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1598
+ _meta?: Record<string, unknown> | undefined;
1599
+ mimeType?: string | undefined;
1600
+ size?: number | undefined;
1601
+ kind?: "agent" | "file" | "skill" | undefined;
1602
+ };
1603
+ } | {
1604
+ path: string;
1605
+ type: "diff";
1606
+ newText: string;
1607
+ oldText?: string | null | undefined;
1608
+ } | {
1609
+ path: string;
1610
+ type: "patch";
1611
+ diff: string;
1612
+ change: "add" | "delete" | "update";
1613
+ movePath?: string | undefined;
1614
+ } | {
1615
+ type: "terminal";
1616
+ terminalId: string;
1617
+ })[] | undefined;
1618
+ rawInput?: unknown;
1619
+ locations?: {
1620
+ path: string;
1621
+ line?: number | undefined;
1622
+ }[] | undefined;
1623
+ }, {
1624
+ title?: string | undefined;
1625
+ kind?: "delete" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "other" | undefined;
1626
+ content?: ({
1627
+ type: "content";
1628
+ content?: unknown;
1629
+ } | {
1630
+ path: string;
1631
+ type: "diff";
1632
+ newText: string;
1633
+ oldText?: string | null | undefined;
1634
+ } | {
1635
+ path: string;
1636
+ type: "patch";
1637
+ diff: string;
1638
+ change: "add" | "delete" | "update";
1639
+ movePath?: string | undefined;
1640
+ } | {
1641
+ type: "terminal";
1642
+ terminalId: string;
1643
+ })[] | undefined;
1644
+ rawInput?: unknown;
1645
+ locations?: {
1646
+ path: string;
1647
+ line?: number | undefined;
1648
+ }[] | undefined;
1649
+ }>>;
1650
+ url: z.ZodOptional<z.ZodObject<{
1651
+ url: z.ZodString;
1652
+ elicitationId: z.ZodString;
1653
+ }, "strip", z.ZodTypeAny, {
1654
+ url: string;
1655
+ elicitationId: string;
1656
+ }, {
1657
+ url: string;
1658
+ elicitationId: string;
1659
+ }>>;
734
1660
  options: z.ZodArray<z.ZodObject<{
735
1661
  optionId: z.ZodString;
736
1662
  name: z.ZodString;
737
1663
  kind: z.ZodEnum<["allow_once", "allow_always", "reject_once", "reject_always"]>;
738
1664
  }, "strip", z.ZodTypeAny, {
739
1665
  name: string;
740
- optionId: string;
741
1666
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
1667
+ optionId: string;
742
1668
  }, {
743
1669
  name: string;
744
- optionId: string;
745
1670
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
1671
+ optionId: string;
746
1672
  }>, "many">;
747
1673
  /** Set when this is a question to answer (`sessions.answer`) rather than a permission to give. */
748
1674
  questions: z.ZodOptional<z.ZodArray<z.ZodObject<{
749
1675
  id: z.ZodString;
1676
+ constraints: z.ZodOptional<z.ZodObject<{
1677
+ type: z.ZodEnum<["string", "number", "integer", "boolean", "array"]>;
1678
+ minimum: z.ZodOptional<z.ZodNumber>;
1679
+ maximum: z.ZodOptional<z.ZodNumber>;
1680
+ minLength: z.ZodOptional<z.ZodNumber>;
1681
+ maxLength: z.ZodOptional<z.ZodNumber>;
1682
+ minItems: z.ZodOptional<z.ZodNumber>;
1683
+ maxItems: z.ZodOptional<z.ZodNumber>;
1684
+ pattern: z.ZodOptional<z.ZodString>;
1685
+ format: z.ZodOptional<z.ZodString>;
1686
+ }, "strip", z.ZodTypeAny, {
1687
+ type: "string" | "number" | "boolean" | "integer" | "array";
1688
+ minimum?: number | undefined;
1689
+ maximum?: number | undefined;
1690
+ minLength?: number | undefined;
1691
+ maxLength?: number | undefined;
1692
+ minItems?: number | undefined;
1693
+ maxItems?: number | undefined;
1694
+ pattern?: string | undefined;
1695
+ format?: string | undefined;
1696
+ }, {
1697
+ type: "string" | "number" | "boolean" | "integer" | "array";
1698
+ minimum?: number | undefined;
1699
+ maximum?: number | undefined;
1700
+ minLength?: number | undefined;
1701
+ maxLength?: number | undefined;
1702
+ minItems?: number | undefined;
1703
+ maxItems?: number | undefined;
1704
+ pattern?: string | undefined;
1705
+ format?: string | undefined;
1706
+ }>>;
1707
+ defaults: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
750
1708
  /** A short label for the question ("Auth method"). */
751
1709
  header: z.ZodOptional<z.ZodString>;
752
1710
  text: z.ZodString;
@@ -772,80 +1730,268 @@ export declare const sessionSummarySchema: z.ZodObject<{
772
1730
  required: z.ZodOptional<z.ZodBoolean>;
773
1731
  }, "strip", z.ZodTypeAny, {
774
1732
  id: string;
775
- kind: "text" | "choice" | "choices";
776
1733
  text: string;
1734
+ kind: "text" | "choice" | "choices";
777
1735
  options?: {
778
1736
  value: string;
779
1737
  label: string;
780
1738
  description?: string | undefined;
781
1739
  }[] | undefined;
1740
+ required?: boolean | undefined;
782
1741
  other?: boolean | undefined;
1742
+ constraints?: {
1743
+ type: "string" | "number" | "boolean" | "integer" | "array";
1744
+ minimum?: number | undefined;
1745
+ maximum?: number | undefined;
1746
+ minLength?: number | undefined;
1747
+ maxLength?: number | undefined;
1748
+ minItems?: number | undefined;
1749
+ maxItems?: number | undefined;
1750
+ pattern?: string | undefined;
1751
+ format?: string | undefined;
1752
+ } | undefined;
1753
+ defaults?: string[] | undefined;
783
1754
  header?: string | undefined;
784
1755
  secret?: boolean | undefined;
785
- required?: boolean | undefined;
786
1756
  }, {
787
1757
  id: string;
788
- kind: "text" | "choice" | "choices";
789
1758
  text: string;
1759
+ kind: "text" | "choice" | "choices";
790
1760
  options?: {
791
1761
  value: string;
792
1762
  label: string;
793
1763
  description?: string | undefined;
794
1764
  }[] | undefined;
1765
+ required?: boolean | undefined;
795
1766
  other?: boolean | undefined;
1767
+ constraints?: {
1768
+ type: "string" | "number" | "boolean" | "integer" | "array";
1769
+ minimum?: number | undefined;
1770
+ maximum?: number | undefined;
1771
+ minLength?: number | undefined;
1772
+ maxLength?: number | undefined;
1773
+ minItems?: number | undefined;
1774
+ maxItems?: number | undefined;
1775
+ pattern?: string | undefined;
1776
+ format?: string | undefined;
1777
+ } | undefined;
1778
+ defaults?: string[] | undefined;
796
1779
  header?: string | undefined;
797
1780
  secret?: boolean | undefined;
798
- required?: boolean | undefined;
799
1781
  }>, "many">>;
800
1782
  }, "strip", z.ZodTypeAny, {
801
1783
  options: {
802
1784
  name: string;
803
- optionId: string;
804
1785
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
1786
+ optionId: string;
805
1787
  }[];
806
1788
  title: string;
807
1789
  requestId: string;
1790
+ url?: {
1791
+ url: string;
1792
+ elicitationId: string;
1793
+ } | undefined;
808
1794
  toolCallId?: string | undefined;
1795
+ tool?: {
1796
+ title?: string | undefined;
1797
+ kind?: "delete" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "other" | undefined;
1798
+ content?: ({
1799
+ type: "content";
1800
+ content: {
1801
+ type: "text";
1802
+ text: string;
1803
+ annotations?: z.objectOutputType<{
1804
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1805
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1806
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1807
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1808
+ _meta?: Record<string, unknown> | undefined;
1809
+ } | {
1810
+ type: "image";
1811
+ mimeType: string;
1812
+ annotations?: z.objectOutputType<{
1813
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1814
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1815
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1816
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1817
+ _meta?: Record<string, unknown> | undefined;
1818
+ data?: string | undefined;
1819
+ uri?: string | undefined;
1820
+ } | {
1821
+ type: "audio";
1822
+ mimeType: string;
1823
+ annotations?: z.objectOutputType<{
1824
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1825
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1826
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1827
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1828
+ _meta?: Record<string, unknown> | undefined;
1829
+ data?: string | undefined;
1830
+ uri?: string | undefined;
1831
+ } | {
1832
+ type: "resource";
1833
+ resource: {
1834
+ uri: string;
1835
+ text?: string | undefined;
1836
+ _meta?: Record<string, unknown> | undefined;
1837
+ mimeType?: string | undefined;
1838
+ blob?: string | undefined;
1839
+ assetUri?: string | undefined;
1840
+ };
1841
+ annotations?: z.objectOutputType<{
1842
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1843
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1844
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1845
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1846
+ _meta?: Record<string, unknown> | undefined;
1847
+ } | {
1848
+ type: "resource_link";
1849
+ name: string;
1850
+ uri: string;
1851
+ description?: string | undefined;
1852
+ title?: string | undefined;
1853
+ annotations?: z.objectOutputType<{
1854
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1855
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1856
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1857
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1858
+ _meta?: Record<string, unknown> | undefined;
1859
+ mimeType?: string | undefined;
1860
+ size?: number | undefined;
1861
+ kind?: "agent" | "file" | "skill" | undefined;
1862
+ };
1863
+ } | {
1864
+ path: string;
1865
+ type: "diff";
1866
+ newText: string;
1867
+ oldText?: string | null | undefined;
1868
+ } | {
1869
+ path: string;
1870
+ type: "patch";
1871
+ diff: string;
1872
+ change: "add" | "delete" | "update";
1873
+ movePath?: string | undefined;
1874
+ } | {
1875
+ type: "terminal";
1876
+ terminalId: string;
1877
+ })[] | undefined;
1878
+ rawInput?: unknown;
1879
+ locations?: {
1880
+ path: string;
1881
+ line?: number | undefined;
1882
+ }[] | undefined;
1883
+ } | undefined;
1884
+ childSessionId?: string | undefined;
809
1885
  detail?: string | undefined;
810
1886
  questions?: {
811
1887
  id: string;
812
- kind: "text" | "choice" | "choices";
813
1888
  text: string;
1889
+ kind: "text" | "choice" | "choices";
814
1890
  options?: {
815
1891
  value: string;
816
1892
  label: string;
817
1893
  description?: string | undefined;
818
1894
  }[] | undefined;
1895
+ required?: boolean | undefined;
819
1896
  other?: boolean | undefined;
1897
+ constraints?: {
1898
+ type: "string" | "number" | "boolean" | "integer" | "array";
1899
+ minimum?: number | undefined;
1900
+ maximum?: number | undefined;
1901
+ minLength?: number | undefined;
1902
+ maxLength?: number | undefined;
1903
+ minItems?: number | undefined;
1904
+ maxItems?: number | undefined;
1905
+ pattern?: string | undefined;
1906
+ format?: string | undefined;
1907
+ } | undefined;
1908
+ defaults?: string[] | undefined;
820
1909
  header?: string | undefined;
821
1910
  secret?: boolean | undefined;
822
- required?: boolean | undefined;
823
1911
  }[] | undefined;
824
1912
  }, {
825
1913
  options: {
826
1914
  name: string;
827
- optionId: string;
828
1915
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
1916
+ optionId: string;
829
1917
  }[];
830
1918
  title: string;
831
1919
  requestId: string;
1920
+ url?: {
1921
+ url: string;
1922
+ elicitationId: string;
1923
+ } | undefined;
832
1924
  toolCallId?: string | undefined;
1925
+ tool?: {
1926
+ title?: string | undefined;
1927
+ kind?: "delete" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "other" | undefined;
1928
+ content?: ({
1929
+ type: "content";
1930
+ content?: unknown;
1931
+ } | {
1932
+ path: string;
1933
+ type: "diff";
1934
+ newText: string;
1935
+ oldText?: string | null | undefined;
1936
+ } | {
1937
+ path: string;
1938
+ type: "patch";
1939
+ diff: string;
1940
+ change: "add" | "delete" | "update";
1941
+ movePath?: string | undefined;
1942
+ } | {
1943
+ type: "terminal";
1944
+ terminalId: string;
1945
+ })[] | undefined;
1946
+ rawInput?: unknown;
1947
+ locations?: {
1948
+ path: string;
1949
+ line?: number | undefined;
1950
+ }[] | undefined;
1951
+ } | undefined;
1952
+ childSessionId?: string | undefined;
833
1953
  detail?: string | undefined;
834
1954
  questions?: {
835
1955
  id: string;
836
- kind: "text" | "choice" | "choices";
837
1956
  text: string;
1957
+ kind: "text" | "choice" | "choices";
838
1958
  options?: {
839
1959
  value: string;
840
1960
  label: string;
841
1961
  description?: string | undefined;
842
1962
  }[] | undefined;
1963
+ required?: boolean | undefined;
843
1964
  other?: boolean | undefined;
1965
+ constraints?: {
1966
+ type: "string" | "number" | "boolean" | "integer" | "array";
1967
+ minimum?: number | undefined;
1968
+ maximum?: number | undefined;
1969
+ minLength?: number | undefined;
1970
+ maxLength?: number | undefined;
1971
+ minItems?: number | undefined;
1972
+ maxItems?: number | undefined;
1973
+ pattern?: string | undefined;
1974
+ format?: string | undefined;
1975
+ } | undefined;
1976
+ defaults?: string[] | undefined;
844
1977
  header?: string | undefined;
845
1978
  secret?: boolean | undefined;
846
- required?: boolean | undefined;
847
1979
  }[] | undefined;
848
1980
  }>>;
1981
+ /** Unanswered questions in the current turn, even while the agent continues working. */
1982
+ asyncQuestions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1983
+ id: z.ZodString;
1984
+ title: z.ZodString;
1985
+ options: z.ZodArray<z.ZodString, "many">;
1986
+ }, "strip", z.ZodTypeAny, {
1987
+ options: string[];
1988
+ id: string;
1989
+ title: string;
1990
+ }, {
1991
+ options: string[];
1992
+ id: string;
1993
+ title: string;
1994
+ }>, "many">>;
849
1995
  /**
850
1996
  * Live only: messages waiting for the current turn to end, when the host
851
1997
  * holds them (agents that can't take input mid-turn). Oldest first.
@@ -856,12 +2002,12 @@ export declare const sessionSummarySchema: z.ZodObject<{
856
2002
  text: z.ZodString;
857
2003
  images: z.ZodNumber;
858
2004
  }, "strip", z.ZodTypeAny, {
859
- images: number;
860
2005
  text: string;
2006
+ images: number;
861
2007
  clientMessageId: string;
862
2008
  }, {
863
- images: number;
864
2009
  text: string;
2010
+ images: number;
865
2011
  clientMessageId: string;
866
2012
  }>, "many">>;
867
2013
  /**
@@ -904,9 +2050,9 @@ export declare const sessionSummarySchema: z.ZodObject<{
904
2050
  }>>;
905
2051
  }, "strip", z.ZodTypeAny, {
906
2052
  id: string;
907
- state: "error" | "running" | "idle" | "waiting" | "offline";
908
- lastSeq: number;
909
2053
  agent: string;
2054
+ state: "unknown" | "running" | "idle" | "waiting" | "error" | "offline";
2055
+ lastSeq: number;
910
2056
  nativeId: string;
911
2057
  cwd: string;
912
2058
  pendingPermissions: number;
@@ -920,36 +2066,147 @@ export declare const sessionSummarySchema: z.ZodObject<{
920
2066
  activity?: {
921
2067
  kind: "thinking" | "responding" | "tool";
922
2068
  title?: string | undefined;
923
- toolKind?: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other" | undefined;
2069
+ toolKind?: "delete" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "other" | undefined;
924
2070
  } | undefined;
925
2071
  permission?: {
926
2072
  options: {
927
2073
  name: string;
928
- optionId: string;
929
2074
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2075
+ optionId: string;
930
2076
  }[];
931
2077
  title: string;
932
2078
  requestId: string;
2079
+ url?: {
2080
+ url: string;
2081
+ elicitationId: string;
2082
+ } | undefined;
933
2083
  toolCallId?: string | undefined;
2084
+ tool?: {
2085
+ title?: string | undefined;
2086
+ kind?: "delete" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "other" | undefined;
2087
+ content?: ({
2088
+ type: "content";
2089
+ content: {
2090
+ type: "text";
2091
+ text: string;
2092
+ annotations?: z.objectOutputType<{
2093
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
2094
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
2095
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
2096
+ }, z.ZodTypeAny, "passthrough"> | undefined;
2097
+ _meta?: Record<string, unknown> | undefined;
2098
+ } | {
2099
+ type: "image";
2100
+ mimeType: string;
2101
+ annotations?: z.objectOutputType<{
2102
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
2103
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
2104
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
2105
+ }, z.ZodTypeAny, "passthrough"> | undefined;
2106
+ _meta?: Record<string, unknown> | undefined;
2107
+ data?: string | undefined;
2108
+ uri?: string | undefined;
2109
+ } | {
2110
+ type: "audio";
2111
+ mimeType: string;
2112
+ annotations?: z.objectOutputType<{
2113
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
2114
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
2115
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
2116
+ }, z.ZodTypeAny, "passthrough"> | undefined;
2117
+ _meta?: Record<string, unknown> | undefined;
2118
+ data?: string | undefined;
2119
+ uri?: string | undefined;
2120
+ } | {
2121
+ type: "resource";
2122
+ resource: {
2123
+ uri: string;
2124
+ text?: string | undefined;
2125
+ _meta?: Record<string, unknown> | undefined;
2126
+ mimeType?: string | undefined;
2127
+ blob?: string | undefined;
2128
+ assetUri?: string | undefined;
2129
+ };
2130
+ annotations?: z.objectOutputType<{
2131
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
2132
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
2133
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
2134
+ }, z.ZodTypeAny, "passthrough"> | undefined;
2135
+ _meta?: Record<string, unknown> | undefined;
2136
+ } | {
2137
+ type: "resource_link";
2138
+ name: string;
2139
+ uri: string;
2140
+ description?: string | undefined;
2141
+ title?: string | undefined;
2142
+ annotations?: z.objectOutputType<{
2143
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
2144
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
2145
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
2146
+ }, z.ZodTypeAny, "passthrough"> | undefined;
2147
+ _meta?: Record<string, unknown> | undefined;
2148
+ mimeType?: string | undefined;
2149
+ size?: number | undefined;
2150
+ kind?: "agent" | "file" | "skill" | undefined;
2151
+ };
2152
+ } | {
2153
+ path: string;
2154
+ type: "diff";
2155
+ newText: string;
2156
+ oldText?: string | null | undefined;
2157
+ } | {
2158
+ path: string;
2159
+ type: "patch";
2160
+ diff: string;
2161
+ change: "add" | "delete" | "update";
2162
+ movePath?: string | undefined;
2163
+ } | {
2164
+ type: "terminal";
2165
+ terminalId: string;
2166
+ })[] | undefined;
2167
+ rawInput?: unknown;
2168
+ locations?: {
2169
+ path: string;
2170
+ line?: number | undefined;
2171
+ }[] | undefined;
2172
+ } | undefined;
2173
+ childSessionId?: string | undefined;
934
2174
  detail?: string | undefined;
935
2175
  questions?: {
936
2176
  id: string;
937
- kind: "text" | "choice" | "choices";
938
2177
  text: string;
2178
+ kind: "text" | "choice" | "choices";
939
2179
  options?: {
940
2180
  value: string;
941
2181
  label: string;
942
2182
  description?: string | undefined;
943
2183
  }[] | undefined;
2184
+ required?: boolean | undefined;
944
2185
  other?: boolean | undefined;
2186
+ constraints?: {
2187
+ type: "string" | "number" | "boolean" | "integer" | "array";
2188
+ minimum?: number | undefined;
2189
+ maximum?: number | undefined;
2190
+ minLength?: number | undefined;
2191
+ maxLength?: number | undefined;
2192
+ minItems?: number | undefined;
2193
+ maxItems?: number | undefined;
2194
+ pattern?: string | undefined;
2195
+ format?: string | undefined;
2196
+ } | undefined;
2197
+ defaults?: string[] | undefined;
945
2198
  header?: string | undefined;
946
2199
  secret?: boolean | undefined;
947
- required?: boolean | undefined;
948
2200
  }[] | undefined;
949
2201
  } | undefined;
2202
+ asyncQuestions?: {
2203
+ options: string[];
2204
+ id: string;
2205
+ title: string;
2206
+ }[] | undefined;
950
2207
  queue?: {
951
- images: number;
952
2208
  text: string;
2209
+ images: number;
953
2210
  clientMessageId: string;
954
2211
  }[] | undefined;
955
2212
  worktree?: {
@@ -966,9 +2223,9 @@ export declare const sessionSummarySchema: z.ZodObject<{
966
2223
  } | undefined;
967
2224
  }, {
968
2225
  id: string;
969
- state: "error" | "running" | "idle" | "waiting" | "offline";
970
- lastSeq: number;
971
2226
  agent: string;
2227
+ state: "unknown" | "running" | "idle" | "waiting" | "error" | "offline";
2228
+ lastSeq: number;
972
2229
  nativeId: string;
973
2230
  cwd: string;
974
2231
  pendingPermissions: number;
@@ -982,36 +2239,85 @@ export declare const sessionSummarySchema: z.ZodObject<{
982
2239
  activity?: {
983
2240
  kind: "thinking" | "responding" | "tool";
984
2241
  title?: string | undefined;
985
- toolKind?: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other" | undefined;
2242
+ toolKind?: "delete" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "other" | undefined;
986
2243
  } | undefined;
987
2244
  permission?: {
988
2245
  options: {
989
2246
  name: string;
990
- optionId: string;
991
2247
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2248
+ optionId: string;
992
2249
  }[];
993
2250
  title: string;
994
2251
  requestId: string;
2252
+ url?: {
2253
+ url: string;
2254
+ elicitationId: string;
2255
+ } | undefined;
995
2256
  toolCallId?: string | undefined;
2257
+ tool?: {
2258
+ title?: string | undefined;
2259
+ kind?: "delete" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "other" | undefined;
2260
+ content?: ({
2261
+ type: "content";
2262
+ content?: unknown;
2263
+ } | {
2264
+ path: string;
2265
+ type: "diff";
2266
+ newText: string;
2267
+ oldText?: string | null | undefined;
2268
+ } | {
2269
+ path: string;
2270
+ type: "patch";
2271
+ diff: string;
2272
+ change: "add" | "delete" | "update";
2273
+ movePath?: string | undefined;
2274
+ } | {
2275
+ type: "terminal";
2276
+ terminalId: string;
2277
+ })[] | undefined;
2278
+ rawInput?: unknown;
2279
+ locations?: {
2280
+ path: string;
2281
+ line?: number | undefined;
2282
+ }[] | undefined;
2283
+ } | undefined;
2284
+ childSessionId?: string | undefined;
996
2285
  detail?: string | undefined;
997
2286
  questions?: {
998
2287
  id: string;
999
- kind: "text" | "choice" | "choices";
1000
2288
  text: string;
2289
+ kind: "text" | "choice" | "choices";
1001
2290
  options?: {
1002
2291
  value: string;
1003
2292
  label: string;
1004
2293
  description?: string | undefined;
1005
2294
  }[] | undefined;
2295
+ required?: boolean | undefined;
1006
2296
  other?: boolean | undefined;
2297
+ constraints?: {
2298
+ type: "string" | "number" | "boolean" | "integer" | "array";
2299
+ minimum?: number | undefined;
2300
+ maximum?: number | undefined;
2301
+ minLength?: number | undefined;
2302
+ maxLength?: number | undefined;
2303
+ minItems?: number | undefined;
2304
+ maxItems?: number | undefined;
2305
+ pattern?: string | undefined;
2306
+ format?: string | undefined;
2307
+ } | undefined;
2308
+ defaults?: string[] | undefined;
1007
2309
  header?: string | undefined;
1008
2310
  secret?: boolean | undefined;
1009
- required?: boolean | undefined;
1010
2311
  }[] | undefined;
1011
2312
  } | undefined;
2313
+ asyncQuestions?: {
2314
+ options: string[];
2315
+ id: string;
2316
+ title: string;
2317
+ }[] | undefined;
1012
2318
  queue?: {
1013
- images: number;
1014
2319
  text: string;
2320
+ images: number;
1015
2321
  clientMessageId: string;
1016
2322
  }[] | undefined;
1017
2323
  worktree?: {
@@ -1144,6 +2450,10 @@ export declare const machineInfoSchema: z.ZodObject<{
1144
2450
  steer: z.ZodBoolean;
1145
2451
  permissions: z.ZodBoolean;
1146
2452
  images: z.ZodBoolean;
2453
+ audio: z.ZodOptional<z.ZodBoolean>;
2454
+ embeddedContext: z.ZodOptional<z.ZodBoolean>;
2455
+ /** Host-managed ACP settings and optional protocol features. */
2456
+ acp: z.ZodOptional<z.ZodBoolean>;
1147
2457
  /**
1148
2458
  * The agent forks sessions itself, keeping everything it knew. Every agent's
1149
2459
  * sessions can be forked: without this (or from a single reply, where the
@@ -1161,6 +2471,9 @@ export declare const machineInfoSchema: z.ZodObject<{
1161
2471
  fork: boolean;
1162
2472
  models: boolean;
1163
2473
  modes: boolean;
2474
+ acp?: boolean | undefined;
2475
+ audio?: boolean | undefined;
2476
+ embeddedContext?: boolean | undefined;
1164
2477
  }, {
1165
2478
  interrupt: boolean;
1166
2479
  steer: boolean;
@@ -1169,11 +2482,14 @@ export declare const machineInfoSchema: z.ZodObject<{
1169
2482
  fork: boolean;
1170
2483
  models: boolean;
1171
2484
  modes: boolean;
2485
+ acp?: boolean | undefined;
2486
+ audio?: boolean | undefined;
2487
+ embeddedContext?: boolean | undefined;
1172
2488
  }>;
1173
2489
  }, "strip", z.ZodTypeAny, {
1174
2490
  id: string;
1175
2491
  label: string;
1176
- tier: "multi_client" | "handoff" | "remote" | "terminal";
2492
+ tier: "terminal" | "multi_client" | "handoff" | "remote";
1177
2493
  installed: boolean;
1178
2494
  capabilities: {
1179
2495
  interrupt: boolean;
@@ -1183,6 +2499,9 @@ export declare const machineInfoSchema: z.ZodObject<{
1183
2499
  fork: boolean;
1184
2500
  models: boolean;
1185
2501
  modes: boolean;
2502
+ acp?: boolean | undefined;
2503
+ audio?: boolean | undefined;
2504
+ embeddedContext?: boolean | undefined;
1186
2505
  };
1187
2506
  version?: string | undefined;
1188
2507
  problem?: string | undefined;
@@ -1194,7 +2513,7 @@ export declare const machineInfoSchema: z.ZodObject<{
1194
2513
  }, {
1195
2514
  id: string;
1196
2515
  label: string;
1197
- tier: "multi_client" | "handoff" | "remote" | "terminal";
2516
+ tier: "terminal" | "multi_client" | "handoff" | "remote";
1198
2517
  installed: boolean;
1199
2518
  capabilities: {
1200
2519
  interrupt: boolean;
@@ -1204,6 +2523,9 @@ export declare const machineInfoSchema: z.ZodObject<{
1204
2523
  fork: boolean;
1205
2524
  models: boolean;
1206
2525
  modes: boolean;
2526
+ acp?: boolean | undefined;
2527
+ audio?: boolean | undefined;
2528
+ embeddedContext?: boolean | undefined;
1207
2529
  };
1208
2530
  version?: string | undefined;
1209
2531
  problem?: string | undefined;
@@ -1228,7 +2550,7 @@ export declare const machineInfoSchema: z.ZodObject<{
1228
2550
  agents: {
1229
2551
  id: string;
1230
2552
  label: string;
1231
- tier: "multi_client" | "handoff" | "remote" | "terminal";
2553
+ tier: "terminal" | "multi_client" | "handoff" | "remote";
1232
2554
  installed: boolean;
1233
2555
  capabilities: {
1234
2556
  interrupt: boolean;
@@ -1238,6 +2560,9 @@ export declare const machineInfoSchema: z.ZodObject<{
1238
2560
  fork: boolean;
1239
2561
  models: boolean;
1240
2562
  modes: boolean;
2563
+ acp?: boolean | undefined;
2564
+ audio?: boolean | undefined;
2565
+ embeddedContext?: boolean | undefined;
1241
2566
  };
1242
2567
  version?: string | undefined;
1243
2568
  problem?: string | undefined;
@@ -1259,7 +2584,7 @@ export declare const machineInfoSchema: z.ZodObject<{
1259
2584
  agents: {
1260
2585
  id: string;
1261
2586
  label: string;
1262
- tier: "multi_client" | "handoff" | "remote" | "terminal";
2587
+ tier: "terminal" | "multi_client" | "handoff" | "remote";
1263
2588
  installed: boolean;
1264
2589
  capabilities: {
1265
2590
  interrupt: boolean;
@@ -1269,6 +2594,9 @@ export declare const machineInfoSchema: z.ZodObject<{
1269
2594
  fork: boolean;
1270
2595
  models: boolean;
1271
2596
  modes: boolean;
2597
+ acp?: boolean | undefined;
2598
+ audio?: boolean | undefined;
2599
+ embeddedContext?: boolean | undefined;
1272
2600
  };
1273
2601
  version?: string | undefined;
1274
2602
  problem?: string | undefined;
@@ -1301,16 +2629,16 @@ export declare const portInfoSchema: z.ZodObject<{
1301
2629
  /** Answers HTTP at all (a dev server, not a database). */
1302
2630
  http: z.ZodBoolean;
1303
2631
  }, "strip", z.ZodTypeAny, {
2632
+ http: boolean;
1304
2633
  port: number;
1305
2634
  process: string;
1306
- http: boolean;
1307
2635
  title?: string | undefined;
1308
2636
  cwd?: string | undefined;
1309
2637
  pid?: number | undefined;
1310
2638
  }, {
2639
+ http: boolean;
1311
2640
  port: number;
1312
2641
  process: string;
1313
- http: boolean;
1314
2642
  title?: string | undefined;
1315
2643
  cwd?: string | undefined;
1316
2644
  pid?: number | undefined;
@@ -1375,11 +2703,11 @@ export declare const gatewayStatusSchema: z.ZodObject<{
1375
2703
  id: z.ZodString;
1376
2704
  name: z.ZodString;
1377
2705
  }, "strip", z.ZodTypeAny, {
1378
- id: string;
1379
2706
  name: string;
1380
- }, {
1381
2707
  id: string;
2708
+ }, {
1382
2709
  name: string;
2710
+ id: string;
1383
2711
  }>>;
1384
2712
  account: z.ZodOptional<z.ZodObject<{
1385
2713
  userId: z.ZodString;
@@ -1397,32 +2725,32 @@ export declare const gatewayStatusSchema: z.ZodObject<{
1397
2725
  pairedAt: z.ZodNumber;
1398
2726
  online: z.ZodBoolean;
1399
2727
  }, "strip", z.ZodTypeAny, {
1400
- id: string;
1401
2728
  name: string;
2729
+ id: string;
1402
2730
  online: boolean;
1403
2731
  pairedAt: number;
1404
2732
  }, {
1405
- id: string;
1406
2733
  name: string;
2734
+ id: string;
1407
2735
  online: boolean;
1408
2736
  pairedAt: number;
1409
2737
  }>, "many">;
1410
2738
  }, "strip", z.ZodTypeAny, {
1411
2739
  status: "offline" | "off" | "connecting" | "online";
1412
2740
  devices: {
1413
- id: string;
1414
2741
  name: string;
2742
+ id: string;
1415
2743
  online: boolean;
1416
2744
  pairedAt: number;
1417
2745
  }[];
2746
+ url?: string | undefined;
1418
2747
  error?: {
1419
2748
  code: string;
1420
2749
  message: string;
1421
2750
  } | undefined;
1422
- url?: string | undefined;
1423
2751
  machine?: {
1424
- id: string;
1425
2752
  name: string;
2753
+ id: string;
1426
2754
  } | undefined;
1427
2755
  account?: {
1428
2756
  userId: string;
@@ -1431,19 +2759,19 @@ export declare const gatewayStatusSchema: z.ZodObject<{
1431
2759
  }, {
1432
2760
  status: "offline" | "off" | "connecting" | "online";
1433
2761
  devices: {
1434
- id: string;
1435
2762
  name: string;
2763
+ id: string;
1436
2764
  online: boolean;
1437
2765
  pairedAt: number;
1438
2766
  }[];
2767
+ url?: string | undefined;
1439
2768
  error?: {
1440
2769
  code: string;
1441
2770
  message: string;
1442
2771
  } | undefined;
1443
- url?: string | undefined;
1444
2772
  machine?: {
1445
- id: string;
1446
2773
  name: string;
2774
+ id: string;
1447
2775
  } | undefined;
1448
2776
  account?: {
1449
2777
  userId: string;