@linkshell/host 0.4.19 → 0.4.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/README.md +2 -2
  2. package/dist/host/src/acp-settings.d.ts +12 -0
  3. package/dist/host/src/acp-settings.js +41 -0
  4. package/dist/host/src/acp-settings.js.map +1 -0
  5. package/dist/host/src/carry.js +13 -2
  6. package/dist/host/src/carry.js.map +1 -1
  7. package/dist/host/src/drivers/acp/client-services.d.ts +29 -0
  8. package/dist/host/src/drivers/acp/client-services.js +192 -0
  9. package/dist/host/src/drivers/acp/client-services.js.map +1 -0
  10. package/dist/host/src/drivers/acp/connection.d.ts +37 -8
  11. package/dist/host/src/drivers/acp/connection.js +127 -110
  12. package/dist/host/src/drivers/acp/connection.js.map +1 -1
  13. package/dist/host/src/drivers/acp/driver.d.ts +92 -2
  14. package/dist/host/src/drivers/acp/driver.js +599 -52
  15. package/dist/host/src/drivers/acp/driver.js.map +1 -1
  16. package/dist/host/src/drivers/acp/editor.d.ts +31 -0
  17. package/dist/host/src/drivers/acp/editor.js +242 -0
  18. package/dist/host/src/drivers/acp/editor.js.map +1 -0
  19. package/dist/host/src/drivers/acp/mapper.d.ts +2 -1
  20. package/dist/host/src/drivers/acp/mapper.js +88 -35
  21. package/dist/host/src/drivers/acp/mapper.js.map +1 -1
  22. package/dist/host/src/drivers/acp/mcp.d.ts +20 -0
  23. package/dist/host/src/drivers/acp/mcp.js +139 -0
  24. package/dist/host/src/drivers/acp/mcp.js.map +1 -0
  25. package/dist/host/src/drivers/acp/questions.js +14 -0
  26. package/dist/host/src/drivers/acp/questions.js.map +1 -1
  27. package/dist/host/src/drivers/acp/updates.d.ts +10 -0
  28. package/dist/host/src/drivers/acp/updates.js +137 -0
  29. package/dist/host/src/drivers/acp/updates.js.map +1 -0
  30. package/dist/host/src/drivers/claude/activity.d.ts +1 -0
  31. package/dist/host/src/drivers/claude/activity.js +17 -3
  32. package/dist/host/src/drivers/claude/activity.js.map +1 -1
  33. package/dist/host/src/drivers/claude/children.d.ts +7 -0
  34. package/dist/host/src/drivers/claude/children.js +31 -2
  35. package/dist/host/src/drivers/claude/children.js.map +1 -1
  36. package/dist/host/src/drivers/claude/driver.js +1 -0
  37. package/dist/host/src/drivers/claude/driver.js.map +1 -1
  38. package/dist/host/src/drivers/claude/tasks.d.ts +3 -3
  39. package/dist/host/src/drivers/claude/transcript.d.ts +497 -38
  40. package/dist/host/src/drivers/codex/driver.d.ts +3 -0
  41. package/dist/host/src/drivers/codex/driver.js +36 -1
  42. package/dist/host/src/drivers/codex/driver.js.map +1 -1
  43. package/dist/host/src/drivers/registry.d.ts +6 -0
  44. package/dist/host/src/drivers/registry.js +8 -0
  45. package/dist/host/src/drivers/registry.js.map +1 -1
  46. package/dist/host/src/drivers/types.d.ts +34 -1
  47. package/dist/host/src/fs.d.ts +3 -3
  48. package/dist/host/src/host.js +21 -3
  49. package/dist/host/src/host.js.map +1 -1
  50. package/dist/host/src/hub.d.ts +249 -2
  51. package/dist/host/src/hub.js +150 -9
  52. package/dist/host/src/hub.js.map +1 -1
  53. package/dist/host/src/input.d.ts +5 -3
  54. package/dist/host/src/input.js +8 -6
  55. package/dist/host/src/input.js.map +1 -1
  56. package/dist/host/src/questions.d.ts +3 -1
  57. package/dist/host/src/questions.js +33 -7
  58. package/dist/host/src/questions.js.map +1 -1
  59. package/dist/host/src/rpc/server.js +14 -0
  60. package/dist/host/src/rpc/server.js.map +1 -1
  61. package/dist/host/src/screen.js +5 -5
  62. package/dist/host/src/screen.js.map +1 -1
  63. package/dist/host/src/slim.js +15 -4
  64. package/dist/host/src/slim.js.map +1 -1
  65. package/dist/host/src/store.js +7 -2
  66. package/dist/host/src/store.js.map +1 -1
  67. package/dist/host/src/terminals.d.ts +8 -3
  68. package/dist/host/src/terminals.js +3 -2
  69. package/dist/host/src/terminals.js.map +1 -1
  70. package/dist/host/tsconfig.tsbuildinfo +1 -1
  71. package/dist/wire/src/acp.d.ts +510 -0
  72. package/dist/wire/src/acp.js +39 -0
  73. package/dist/wire/src/acp.js.map +1 -0
  74. package/dist/wire/src/async-questions.d.ts +2 -2
  75. package/dist/wire/src/computer-preview.d.ts +2 -2
  76. package/dist/wire/src/content.d.ts +465 -0
  77. package/dist/wire/src/content.js +58 -0
  78. package/dist/wire/src/content.js.map +1 -0
  79. package/dist/wire/src/editor.d.ts +702 -0
  80. package/dist/wire/src/editor.js +23 -0
  81. package/dist/wire/src/editor.js.map +1 -0
  82. package/dist/wire/src/index.d.ts +3 -0
  83. package/dist/wire/src/index.js +3 -0
  84. package/dist/wire/src/index.js.map +1 -1
  85. package/dist/wire/src/model.d.ts +1383 -79
  86. package/dist/wire/src/model.js +20 -1
  87. package/dist/wire/src/model.js.map +1 -1
  88. package/dist/wire/src/peer.d.ts +1 -0
  89. package/dist/wire/src/peer.js +22 -6
  90. package/dist/wire/src/peer.js.map +1 -1
  91. package/dist/wire/src/questions.d.ts +3 -0
  92. package/dist/wire/src/questions.js +65 -0
  93. package/dist/wire/src/questions.js.map +1 -0
  94. package/dist/wire/src/relay.d.ts +4 -4
  95. package/dist/wire/src/rpc.d.ts +19023 -2518
  96. package/dist/wire/src/rpc.js +41 -3
  97. package/dist/wire/src/rpc.js.map +1 -1
  98. package/dist/wire/src/updates.d.ts +3848 -1114
  99. package/dist/wire/src/updates.js +42 -40
  100. package/dist/wire/src/updates.js.map +1 -1
  101. package/dist/wire/src/workflow.d.ts +22 -22
  102. package/package.json +4 -3
@@ -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
+ audio?: boolean | undefined;
42
+ embeddedContext?: boolean | undefined;
43
+ acp?: 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
+ audio?: boolean | undefined;
53
+ embeddedContext?: boolean | undefined;
54
+ acp?: 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
+ audio?: boolean | undefined;
129
+ embeddedContext?: boolean | undefined;
130
+ acp?: boolean | undefined;
114
131
  }, {
115
132
  interrupt: boolean;
116
133
  steer: boolean;
@@ -119,6 +136,9 @@ export declare const agentInfoSchema: z.ZodObject<{
119
136
  fork: boolean;
120
137
  models: boolean;
121
138
  modes: boolean;
139
+ audio?: boolean | undefined;
140
+ embeddedContext?: boolean | undefined;
141
+ acp?: boolean | undefined;
122
142
  }>;
123
143
  }, "strip", z.ZodTypeAny, {
124
144
  id: string;
@@ -133,6 +153,9 @@ export declare const agentInfoSchema: z.ZodObject<{
133
153
  fork: boolean;
134
154
  models: boolean;
135
155
  modes: boolean;
156
+ audio?: boolean | undefined;
157
+ embeddedContext?: boolean | undefined;
158
+ acp?: boolean | undefined;
136
159
  };
137
160
  version?: string | undefined;
138
161
  problem?: string | undefined;
@@ -154,6 +177,9 @@ export declare const agentInfoSchema: z.ZodObject<{
154
177
  fork: boolean;
155
178
  models: boolean;
156
179
  modes: boolean;
180
+ audio?: boolean | undefined;
181
+ embeddedContext?: boolean | undefined;
182
+ acp?: 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;
@@ -192,15 +218,15 @@ export type PermissionOption = z.infer<typeof permissionOptionSchema>;
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: "tool" | "thinking" | "responding";
198
224
  title?: string | undefined;
199
- toolKind?: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | undefined;
225
+ toolKind?: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | undefined;
200
226
  }, {
201
227
  kind: "tool" | "thinking" | "responding";
202
228
  title?: string | undefined;
203
- toolKind?: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | undefined;
229
+ toolKind?: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | 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;
@@ -235,28 +293,52 @@ export declare const questionSchema: z.ZodObject<{
235
293
  secret: z.ZodOptional<z.ZodBoolean>;
236
294
  required: z.ZodOptional<z.ZodBoolean>;
237
295
  }, "strip", z.ZodTypeAny, {
238
- id: string;
239
296
  text: string;
240
297
  kind: "text" | "choice" | "choices";
298
+ id: string;
241
299
  options?: {
242
300
  value: string;
243
301
  label: string;
244
302
  description?: string | undefined;
245
303
  }[] | undefined;
246
304
  other?: boolean | undefined;
305
+ constraints?: {
306
+ type: "string" | "number" | "boolean" | "integer" | "array";
307
+ minimum?: number | undefined;
308
+ maximum?: number | undefined;
309
+ minLength?: number | undefined;
310
+ maxLength?: number | undefined;
311
+ minItems?: number | undefined;
312
+ maxItems?: number | undefined;
313
+ pattern?: string | undefined;
314
+ format?: string | undefined;
315
+ } | undefined;
316
+ defaults?: string[] | undefined;
247
317
  header?: string | undefined;
248
318
  secret?: boolean | undefined;
249
319
  required?: boolean | undefined;
250
320
  }, {
251
- id: string;
252
321
  text: string;
253
322
  kind: "text" | "choice" | "choices";
323
+ id: string;
254
324
  options?: {
255
325
  value: string;
256
326
  label: string;
257
327
  description?: string | undefined;
258
328
  }[] | undefined;
259
329
  other?: boolean | undefined;
330
+ constraints?: {
331
+ type: "string" | "number" | "boolean" | "integer" | "array";
332
+ minimum?: number | undefined;
333
+ maximum?: number | undefined;
334
+ minLength?: number | undefined;
335
+ maxLength?: number | undefined;
336
+ minItems?: number | undefined;
337
+ maxItems?: number | undefined;
338
+ pattern?: string | undefined;
339
+ format?: string | undefined;
340
+ } | undefined;
341
+ defaults?: string[] | undefined;
260
342
  header?: string | undefined;
261
343
  secret?: boolean | undefined;
262
344
  required?: boolean | undefined;
@@ -280,9 +362,325 @@ export declare const questionAnswerSchema: z.ZodObject<{
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
+ uri: string;
425
+ name: string;
426
+ annotations?: z.objectOutputType<{
427
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
428
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
429
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
430
+ }, z.ZodTypeAny, "passthrough"> | undefined;
431
+ _meta?: Record<string, unknown> | undefined;
432
+ mimeType?: string | undefined;
433
+ title?: string | undefined;
434
+ description?: string | undefined;
435
+ size?: number | undefined;
436
+ kind?: "file" | "skill" | "agent" | 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
+ uri: string;
490
+ name: string;
491
+ annotations?: z.objectOutputType<{
492
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
493
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
494
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
495
+ }, z.ZodTypeAny, "passthrough"> | undefined;
496
+ _meta?: Record<string, unknown> | undefined;
497
+ mimeType?: string | undefined;
498
+ title?: string | undefined;
499
+ description?: string | undefined;
500
+ size?: number | undefined;
501
+ kind?: "file" | "skill" | "agent" | 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" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | 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
+ uri: string;
614
+ name: string;
615
+ annotations?: z.objectOutputType<{
616
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
617
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
618
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
619
+ }, z.ZodTypeAny, "passthrough"> | undefined;
620
+ _meta?: Record<string, unknown> | undefined;
621
+ mimeType?: string | undefined;
622
+ title?: string | undefined;
623
+ description?: string | undefined;
624
+ size?: number | undefined;
625
+ kind?: "file" | "skill" | "agent" | 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" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | 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;
@@ -299,6 +697,38 @@ export declare const pendingPermissionSchema: z.ZodObject<{
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;
@@ -323,28 +753,52 @@ export declare const pendingPermissionSchema: z.ZodObject<{
323
753
  secret: z.ZodOptional<z.ZodBoolean>;
324
754
  required: z.ZodOptional<z.ZodBoolean>;
325
755
  }, "strip", z.ZodTypeAny, {
326
- id: string;
327
756
  text: string;
328
757
  kind: "text" | "choice" | "choices";
758
+ id: string;
329
759
  options?: {
330
760
  value: string;
331
761
  label: string;
332
762
  description?: string | undefined;
333
763
  }[] | undefined;
334
764
  other?: boolean | undefined;
765
+ constraints?: {
766
+ type: "string" | "number" | "boolean" | "integer" | "array";
767
+ minimum?: number | undefined;
768
+ maximum?: number | undefined;
769
+ minLength?: number | undefined;
770
+ maxLength?: number | undefined;
771
+ minItems?: number | undefined;
772
+ maxItems?: number | undefined;
773
+ pattern?: string | undefined;
774
+ format?: string | undefined;
775
+ } | undefined;
776
+ defaults?: string[] | undefined;
335
777
  header?: string | undefined;
336
778
  secret?: boolean | undefined;
337
779
  required?: boolean | undefined;
338
780
  }, {
339
- id: string;
340
781
  text: string;
341
782
  kind: "text" | "choice" | "choices";
783
+ id: string;
342
784
  options?: {
343
785
  value: string;
344
786
  label: string;
345
787
  description?: string | undefined;
346
788
  }[] | undefined;
347
789
  other?: boolean | undefined;
790
+ constraints?: {
791
+ type: "string" | "number" | "boolean" | "integer" | "array";
792
+ minimum?: number | undefined;
793
+ maximum?: number | undefined;
794
+ minLength?: number | undefined;
795
+ maxLength?: number | undefined;
796
+ minItems?: number | undefined;
797
+ maxItems?: number | undefined;
798
+ pattern?: string | undefined;
799
+ format?: string | undefined;
800
+ } | undefined;
801
+ defaults?: string[] | undefined;
348
802
  header?: string | undefined;
349
803
  secret?: boolean | undefined;
350
804
  required?: boolean | undefined;
@@ -358,21 +812,127 @@ export declare const pendingPermissionSchema: z.ZodObject<{
358
812
  title: string;
359
813
  requestId: string;
360
814
  toolCallId?: string | undefined;
815
+ tool?: {
816
+ title?: string | undefined;
817
+ kind?: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | undefined;
818
+ content?: ({
819
+ type: "content";
820
+ content: {
821
+ type: "text";
822
+ text: string;
823
+ annotations?: z.objectOutputType<{
824
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
825
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
826
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
827
+ }, z.ZodTypeAny, "passthrough"> | undefined;
828
+ _meta?: Record<string, unknown> | undefined;
829
+ } | {
830
+ type: "image";
831
+ mimeType: string;
832
+ annotations?: z.objectOutputType<{
833
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
834
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
835
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
836
+ }, z.ZodTypeAny, "passthrough"> | undefined;
837
+ _meta?: Record<string, unknown> | undefined;
838
+ data?: string | undefined;
839
+ uri?: string | undefined;
840
+ } | {
841
+ type: "audio";
842
+ mimeType: string;
843
+ annotations?: z.objectOutputType<{
844
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
845
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
846
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
847
+ }, z.ZodTypeAny, "passthrough"> | undefined;
848
+ _meta?: Record<string, unknown> | undefined;
849
+ data?: string | undefined;
850
+ uri?: string | undefined;
851
+ } | {
852
+ type: "resource";
853
+ resource: {
854
+ uri: string;
855
+ text?: string | undefined;
856
+ _meta?: Record<string, unknown> | undefined;
857
+ mimeType?: string | undefined;
858
+ blob?: string | undefined;
859
+ assetUri?: string | undefined;
860
+ };
861
+ annotations?: z.objectOutputType<{
862
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
863
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
864
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
865
+ }, z.ZodTypeAny, "passthrough"> | undefined;
866
+ _meta?: Record<string, unknown> | undefined;
867
+ } | {
868
+ type: "resource_link";
869
+ uri: string;
870
+ name: string;
871
+ annotations?: z.objectOutputType<{
872
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
873
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
874
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
875
+ }, z.ZodTypeAny, "passthrough"> | undefined;
876
+ _meta?: Record<string, unknown> | undefined;
877
+ mimeType?: string | undefined;
878
+ title?: string | undefined;
879
+ description?: string | undefined;
880
+ size?: number | undefined;
881
+ kind?: "file" | "skill" | "agent" | undefined;
882
+ };
883
+ } | {
884
+ path: string;
885
+ type: "diff";
886
+ newText: string;
887
+ oldText?: string | null | undefined;
888
+ } | {
889
+ path: string;
890
+ type: "patch";
891
+ diff: string;
892
+ change: "add" | "delete" | "update";
893
+ movePath?: string | undefined;
894
+ } | {
895
+ type: "terminal";
896
+ terminalId: string;
897
+ })[] | undefined;
898
+ rawInput?: unknown;
899
+ locations?: {
900
+ path: string;
901
+ line?: number | undefined;
902
+ }[] | undefined;
903
+ } | undefined;
361
904
  detail?: string | undefined;
362
905
  questions?: {
363
- id: string;
364
906
  text: string;
365
907
  kind: "text" | "choice" | "choices";
908
+ id: string;
366
909
  options?: {
367
910
  value: string;
368
911
  label: string;
369
912
  description?: string | undefined;
370
913
  }[] | undefined;
371
914
  other?: boolean | undefined;
915
+ constraints?: {
916
+ type: "string" | "number" | "boolean" | "integer" | "array";
917
+ minimum?: number | undefined;
918
+ maximum?: number | undefined;
919
+ minLength?: number | undefined;
920
+ maxLength?: number | undefined;
921
+ minItems?: number | undefined;
922
+ maxItems?: number | undefined;
923
+ pattern?: string | undefined;
924
+ format?: string | undefined;
925
+ } | undefined;
926
+ defaults?: string[] | undefined;
372
927
  header?: string | undefined;
373
928
  secret?: boolean | undefined;
374
929
  required?: boolean | undefined;
375
930
  }[] | undefined;
931
+ childSessionId?: string | undefined;
932
+ url?: {
933
+ url: string;
934
+ elicitationId: string;
935
+ } | undefined;
376
936
  }, {
377
937
  options: {
378
938
  name: string;
@@ -382,21 +942,65 @@ export declare const pendingPermissionSchema: z.ZodObject<{
382
942
  title: string;
383
943
  requestId: string;
384
944
  toolCallId?: string | undefined;
945
+ tool?: {
946
+ title?: string | undefined;
947
+ kind?: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | undefined;
948
+ content?: ({
949
+ type: "content";
950
+ content?: unknown;
951
+ } | {
952
+ path: string;
953
+ type: "diff";
954
+ newText: string;
955
+ oldText?: string | null | undefined;
956
+ } | {
957
+ path: string;
958
+ type: "patch";
959
+ diff: string;
960
+ change: "add" | "delete" | "update";
961
+ movePath?: string | undefined;
962
+ } | {
963
+ type: "terminal";
964
+ terminalId: string;
965
+ })[] | undefined;
966
+ rawInput?: unknown;
967
+ locations?: {
968
+ path: string;
969
+ line?: number | undefined;
970
+ }[] | undefined;
971
+ } | undefined;
385
972
  detail?: string | undefined;
386
973
  questions?: {
387
- id: string;
388
974
  text: string;
389
975
  kind: "text" | "choice" | "choices";
976
+ id: string;
390
977
  options?: {
391
978
  value: string;
392
979
  label: string;
393
980
  description?: string | undefined;
394
981
  }[] | undefined;
395
982
  other?: boolean | undefined;
983
+ constraints?: {
984
+ type: "string" | "number" | "boolean" | "integer" | "array";
985
+ minimum?: number | undefined;
986
+ maximum?: number | undefined;
987
+ minLength?: number | undefined;
988
+ maxLength?: number | undefined;
989
+ minItems?: number | undefined;
990
+ maxItems?: number | undefined;
991
+ pattern?: string | undefined;
992
+ format?: string | undefined;
993
+ } | undefined;
994
+ defaults?: string[] | undefined;
396
995
  header?: string | undefined;
397
996
  secret?: boolean | undefined;
398
997
  required?: boolean | undefined;
399
998
  }[] | undefined;
999
+ childSessionId?: string | undefined;
1000
+ url?: {
1001
+ url: string;
1002
+ elicitationId: string;
1003
+ } | undefined;
400
1004
  }>;
401
1005
  export type PendingPermissionSummary = z.infer<typeof pendingPermissionSchema>;
402
1006
  export declare const queuedMessageSchema: z.ZodObject<{
@@ -416,6 +1020,8 @@ export declare const queuedMessageSchema: z.ZodObject<{
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. */
@@ -443,12 +1049,12 @@ export declare const subagentInfoSchema: z.ZodObject<{
443
1049
  title: z.ZodString;
444
1050
  order: z.ZodNumber;
445
1051
  }, "strip", z.ZodTypeAny, {
446
- id: string;
447
1052
  title: string;
1053
+ id: string;
448
1054
  order: number;
449
1055
  }, {
450
- id: string;
451
1056
  title: string;
1057
+ id: string;
452
1058
  order: number;
453
1059
  }>, "many">>;
454
1060
  agents: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -465,9 +1071,9 @@ export declare const subagentInfoSchema: z.ZodObject<{
465
1071
  endedAt: z.ZodOptional<z.ZodNumber>;
466
1072
  result: z.ZodOptional<z.ZodString>;
467
1073
  }, "strip", z.ZodTypeAny, {
468
- id: string;
469
1074
  title: string;
470
- state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
1075
+ id: string;
1076
+ state: "unknown" | "paused" | "pending" | "completed" | "failed" | "running" | "stopped";
471
1077
  toolCallId?: string | undefined;
472
1078
  phaseId?: string | undefined;
473
1079
  model?: string | undefined;
@@ -478,9 +1084,9 @@ export declare const subagentInfoSchema: z.ZodObject<{
478
1084
  endedAt?: number | undefined;
479
1085
  result?: string | undefined;
480
1086
  }, {
481
- id: string;
482
1087
  title: string;
483
- state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
1088
+ id: string;
1089
+ state: "unknown" | "paused" | "pending" | "completed" | "failed" | "running" | "stopped";
484
1090
  toolCallId?: string | undefined;
485
1091
  phaseId?: string | undefined;
486
1092
  model?: string | undefined;
@@ -492,24 +1098,24 @@ 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
- state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
1103
+ state?: "paused" | "completed" | "failed" | "running" | "stopped" | undefined;
497
1104
  tokens?: number | undefined;
498
1105
  durationMs?: number | undefined;
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
- id: string;
506
1111
  title: string;
1112
+ id: string;
507
1113
  order: number;
508
1114
  }[] | undefined;
509
1115
  agents?: {
510
- id: string;
511
1116
  title: string;
512
- state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
1117
+ id: string;
1118
+ state: "unknown" | "paused" | "pending" | "completed" | "failed" | "running" | "stopped";
513
1119
  toolCallId?: string | undefined;
514
1120
  phaseId?: string | undefined;
515
1121
  model?: string | undefined;
@@ -521,24 +1127,24 @@ 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
- state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
1132
+ state?: "paused" | "completed" | "failed" | "running" | "stopped" | undefined;
526
1133
  tokens?: number | undefined;
527
1134
  durationMs?: number | undefined;
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
- id: string;
535
1140
  title: string;
1141
+ id: string;
536
1142
  order: number;
537
1143
  }[] | undefined;
538
1144
  agents?: {
539
- id: string;
540
1145
  title: string;
541
- state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
1146
+ id: string;
1147
+ state: "unknown" | "paused" | "pending" | "completed" | "failed" | "running" | "stopped";
542
1148
  toolCallId?: string | undefined;
543
1149
  phaseId?: string | undefined;
544
1150
  model?: string | undefined;
@@ -557,30 +1163,32 @@ 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
- state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
1168
+ state?: "unknown" | "paused" | "pending" | "completed" | "failed" | "running" | "stopped" | undefined;
562
1169
  endedAt?: number | undefined;
563
- name?: string | undefined;
564
1170
  agentType?: string | undefined;
1171
+ nativeSessionId?: string | undefined;
1172
+ canCancel?: boolean | undefined;
565
1173
  workflow?: {
1174
+ name?: string | undefined;
566
1175
  completed?: number | undefined;
567
- state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
1176
+ state?: "paused" | "completed" | "failed" | "running" | "stopped" | undefined;
568
1177
  tokens?: number | undefined;
569
1178
  durationMs?: number | undefined;
570
1179
  startedAt?: number | undefined;
571
1180
  endedAt?: number | undefined;
572
1181
  runId?: string | undefined;
573
- name?: string | undefined;
574
1182
  started?: number | undefined;
575
1183
  phases?: {
576
- id: string;
577
1184
  title: string;
1185
+ id: string;
578
1186
  order: number;
579
1187
  }[] | undefined;
580
1188
  agents?: {
581
- id: string;
582
1189
  title: string;
583
- state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
1190
+ id: string;
1191
+ state: "unknown" | "paused" | "pending" | "completed" | "failed" | "running" | "stopped";
584
1192
  toolCallId?: string | undefined;
585
1193
  phaseId?: string | undefined;
586
1194
  model?: string | undefined;
@@ -599,30 +1207,32 @@ 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
- state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
1212
+ state?: "unknown" | "paused" | "pending" | "completed" | "failed" | "running" | "stopped" | undefined;
604
1213
  endedAt?: number | undefined;
605
- name?: string | undefined;
606
1214
  agentType?: string | undefined;
1215
+ nativeSessionId?: string | undefined;
1216
+ canCancel?: boolean | undefined;
607
1217
  workflow?: {
1218
+ name?: string | undefined;
608
1219
  completed?: number | undefined;
609
- state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
1220
+ state?: "paused" | "completed" | "failed" | "running" | "stopped" | undefined;
610
1221
  tokens?: number | undefined;
611
1222
  durationMs?: number | undefined;
612
1223
  startedAt?: number | undefined;
613
1224
  endedAt?: number | undefined;
614
1225
  runId?: string | undefined;
615
- name?: string | undefined;
616
1226
  started?: number | undefined;
617
1227
  phases?: {
618
- id: string;
619
1228
  title: string;
1229
+ id: string;
620
1230
  order: number;
621
1231
  }[] | undefined;
622
1232
  agents?: {
623
- id: string;
624
1233
  title: string;
625
- state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
1234
+ id: string;
1235
+ state: "unknown" | "paused" | "pending" | "completed" | "failed" | "running" | "stopped";
626
1236
  toolCallId?: string | undefined;
627
1237
  phaseId?: string | undefined;
628
1238
  model?: string | undefined;
@@ -668,11 +1278,11 @@ export declare const backgroundTaskSchema: z.ZodObject<{
668
1278
  /** Orders list snapshots against events arriving while the request is in flight. */
669
1279
  lastSeq: z.ZodOptional<z.ZodNumber>;
670
1280
  }, "strip", z.ZodTypeAny, {
671
- id: string;
672
1281
  title: string;
673
- state: "unknown" | "running" | "completed" | "failed" | "stopped";
674
- startedAt: number;
675
1282
  kind: "shell" | "monitor";
1283
+ id: string;
1284
+ state: "unknown" | "completed" | "failed" | "running" | "stopped";
1285
+ startedAt: number;
676
1286
  toolCallId?: string | undefined;
677
1287
  endedAt?: number | undefined;
678
1288
  command?: string | undefined;
@@ -682,11 +1292,11 @@ export declare const backgroundTaskSchema: z.ZodObject<{
682
1292
  canStop?: boolean | undefined;
683
1293
  lastSeq?: number | undefined;
684
1294
  }, {
685
- id: string;
686
1295
  title: string;
687
- state: "unknown" | "running" | "completed" | "failed" | "stopped";
688
- startedAt: number;
689
1296
  kind: "shell" | "monitor";
1297
+ id: string;
1298
+ state: "unknown" | "completed" | "failed" | "running" | "stopped";
1299
+ startedAt: number;
690
1300
  toolCallId?: string | undefined;
691
1301
  endedAt?: number | undefined;
692
1302
  command?: string | 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,21 +1326,337 @@ 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: "tool" | "thinking" | "responding";
722
1332
  title?: string | undefined;
723
- toolKind?: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | undefined;
1333
+ toolKind?: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | undefined;
724
1334
  }, {
725
1335
  kind: "tool" | "thinking" | "responding";
726
1336
  title?: string | undefined;
727
- toolKind?: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | undefined;
1337
+ toolKind?: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | 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
+ uri: string;
1401
+ name: string;
1402
+ annotations?: z.objectOutputType<{
1403
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1404
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1405
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1406
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1407
+ _meta?: Record<string, unknown> | undefined;
1408
+ mimeType?: string | undefined;
1409
+ title?: string | undefined;
1410
+ description?: string | undefined;
1411
+ size?: number | undefined;
1412
+ kind?: "file" | "skill" | "agent" | 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
+ uri: string;
1466
+ name: string;
1467
+ annotations?: z.objectOutputType<{
1468
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1469
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1470
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1471
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1472
+ _meta?: Record<string, unknown> | undefined;
1473
+ mimeType?: string | undefined;
1474
+ title?: string | undefined;
1475
+ description?: string | undefined;
1476
+ size?: number | undefined;
1477
+ kind?: "file" | "skill" | "agent" | 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" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | 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
+ uri: string;
1590
+ name: string;
1591
+ annotations?: z.objectOutputType<{
1592
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1593
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1594
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1595
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1596
+ _meta?: Record<string, unknown> | undefined;
1597
+ mimeType?: string | undefined;
1598
+ title?: string | undefined;
1599
+ description?: string | undefined;
1600
+ size?: number | undefined;
1601
+ kind?: "file" | "skill" | "agent" | 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" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | 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;
@@ -747,6 +1673,38 @@ export declare const sessionSummarySchema: z.ZodObject<{
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;
@@ -771,28 +1729,52 @@ export declare const sessionSummarySchema: z.ZodObject<{
771
1729
  secret: z.ZodOptional<z.ZodBoolean>;
772
1730
  required: z.ZodOptional<z.ZodBoolean>;
773
1731
  }, "strip", z.ZodTypeAny, {
774
- id: string;
775
1732
  text: string;
776
1733
  kind: "text" | "choice" | "choices";
1734
+ id: string;
777
1735
  options?: {
778
1736
  value: string;
779
1737
  label: string;
780
1738
  description?: string | undefined;
781
1739
  }[] | undefined;
782
1740
  other?: boolean | undefined;
1741
+ constraints?: {
1742
+ type: "string" | "number" | "boolean" | "integer" | "array";
1743
+ minimum?: number | undefined;
1744
+ maximum?: number | undefined;
1745
+ minLength?: number | undefined;
1746
+ maxLength?: number | undefined;
1747
+ minItems?: number | undefined;
1748
+ maxItems?: number | undefined;
1749
+ pattern?: string | undefined;
1750
+ format?: string | undefined;
1751
+ } | undefined;
1752
+ defaults?: string[] | undefined;
783
1753
  header?: string | undefined;
784
1754
  secret?: boolean | undefined;
785
1755
  required?: boolean | undefined;
786
1756
  }, {
787
- id: string;
788
1757
  text: string;
789
1758
  kind: "text" | "choice" | "choices";
1759
+ id: string;
790
1760
  options?: {
791
1761
  value: string;
792
1762
  label: string;
793
1763
  description?: string | undefined;
794
1764
  }[] | undefined;
795
1765
  other?: boolean | undefined;
1766
+ constraints?: {
1767
+ type: "string" | "number" | "boolean" | "integer" | "array";
1768
+ minimum?: number | undefined;
1769
+ maximum?: number | undefined;
1770
+ minLength?: number | undefined;
1771
+ maxLength?: number | undefined;
1772
+ minItems?: number | undefined;
1773
+ maxItems?: number | undefined;
1774
+ pattern?: string | undefined;
1775
+ format?: string | undefined;
1776
+ } | undefined;
1777
+ defaults?: string[] | undefined;
796
1778
  header?: string | undefined;
797
1779
  secret?: boolean | undefined;
798
1780
  required?: boolean | undefined;
@@ -806,21 +1788,127 @@ export declare const sessionSummarySchema: z.ZodObject<{
806
1788
  title: string;
807
1789
  requestId: string;
808
1790
  toolCallId?: string | undefined;
1791
+ tool?: {
1792
+ title?: string | undefined;
1793
+ kind?: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | undefined;
1794
+ content?: ({
1795
+ type: "content";
1796
+ content: {
1797
+ type: "text";
1798
+ text: string;
1799
+ annotations?: z.objectOutputType<{
1800
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1801
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1802
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1803
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1804
+ _meta?: Record<string, unknown> | undefined;
1805
+ } | {
1806
+ type: "image";
1807
+ mimeType: string;
1808
+ annotations?: z.objectOutputType<{
1809
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1810
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1811
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1812
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1813
+ _meta?: Record<string, unknown> | undefined;
1814
+ data?: string | undefined;
1815
+ uri?: string | undefined;
1816
+ } | {
1817
+ type: "audio";
1818
+ mimeType: string;
1819
+ annotations?: z.objectOutputType<{
1820
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1821
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1822
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1823
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1824
+ _meta?: Record<string, unknown> | undefined;
1825
+ data?: string | undefined;
1826
+ uri?: string | undefined;
1827
+ } | {
1828
+ type: "resource";
1829
+ resource: {
1830
+ uri: string;
1831
+ text?: string | undefined;
1832
+ _meta?: Record<string, unknown> | undefined;
1833
+ mimeType?: string | undefined;
1834
+ blob?: string | undefined;
1835
+ assetUri?: string | undefined;
1836
+ };
1837
+ annotations?: z.objectOutputType<{
1838
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1839
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1840
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1841
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1842
+ _meta?: Record<string, unknown> | undefined;
1843
+ } | {
1844
+ type: "resource_link";
1845
+ uri: string;
1846
+ name: string;
1847
+ annotations?: z.objectOutputType<{
1848
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
1849
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
1850
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
1851
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1852
+ _meta?: Record<string, unknown> | undefined;
1853
+ mimeType?: string | undefined;
1854
+ title?: string | undefined;
1855
+ description?: string | undefined;
1856
+ size?: number | undefined;
1857
+ kind?: "file" | "skill" | "agent" | undefined;
1858
+ };
1859
+ } | {
1860
+ path: string;
1861
+ type: "diff";
1862
+ newText: string;
1863
+ oldText?: string | null | undefined;
1864
+ } | {
1865
+ path: string;
1866
+ type: "patch";
1867
+ diff: string;
1868
+ change: "add" | "delete" | "update";
1869
+ movePath?: string | undefined;
1870
+ } | {
1871
+ type: "terminal";
1872
+ terminalId: string;
1873
+ })[] | undefined;
1874
+ rawInput?: unknown;
1875
+ locations?: {
1876
+ path: string;
1877
+ line?: number | undefined;
1878
+ }[] | undefined;
1879
+ } | undefined;
809
1880
  detail?: string | undefined;
810
1881
  questions?: {
811
- id: string;
812
1882
  text: string;
813
1883
  kind: "text" | "choice" | "choices";
1884
+ id: string;
814
1885
  options?: {
815
1886
  value: string;
816
1887
  label: string;
817
1888
  description?: string | undefined;
818
1889
  }[] | undefined;
819
1890
  other?: boolean | undefined;
1891
+ constraints?: {
1892
+ type: "string" | "number" | "boolean" | "integer" | "array";
1893
+ minimum?: number | undefined;
1894
+ maximum?: number | undefined;
1895
+ minLength?: number | undefined;
1896
+ maxLength?: number | undefined;
1897
+ minItems?: number | undefined;
1898
+ maxItems?: number | undefined;
1899
+ pattern?: string | undefined;
1900
+ format?: string | undefined;
1901
+ } | undefined;
1902
+ defaults?: string[] | undefined;
820
1903
  header?: string | undefined;
821
1904
  secret?: boolean | undefined;
822
1905
  required?: boolean | undefined;
823
1906
  }[] | undefined;
1907
+ childSessionId?: string | undefined;
1908
+ url?: {
1909
+ url: string;
1910
+ elicitationId: string;
1911
+ } | undefined;
824
1912
  }, {
825
1913
  options: {
826
1914
  name: string;
@@ -830,21 +1918,65 @@ export declare const sessionSummarySchema: z.ZodObject<{
830
1918
  title: string;
831
1919
  requestId: string;
832
1920
  toolCallId?: string | undefined;
1921
+ tool?: {
1922
+ title?: string | undefined;
1923
+ kind?: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | undefined;
1924
+ content?: ({
1925
+ type: "content";
1926
+ content?: unknown;
1927
+ } | {
1928
+ path: string;
1929
+ type: "diff";
1930
+ newText: string;
1931
+ oldText?: string | null | undefined;
1932
+ } | {
1933
+ path: string;
1934
+ type: "patch";
1935
+ diff: string;
1936
+ change: "add" | "delete" | "update";
1937
+ movePath?: string | undefined;
1938
+ } | {
1939
+ type: "terminal";
1940
+ terminalId: string;
1941
+ })[] | undefined;
1942
+ rawInput?: unknown;
1943
+ locations?: {
1944
+ path: string;
1945
+ line?: number | undefined;
1946
+ }[] | undefined;
1947
+ } | undefined;
833
1948
  detail?: string | undefined;
834
1949
  questions?: {
835
- id: string;
836
1950
  text: string;
837
1951
  kind: "text" | "choice" | "choices";
1952
+ id: string;
838
1953
  options?: {
839
1954
  value: string;
840
1955
  label: string;
841
1956
  description?: string | undefined;
842
1957
  }[] | undefined;
843
1958
  other?: boolean | undefined;
1959
+ constraints?: {
1960
+ type: "string" | "number" | "boolean" | "integer" | "array";
1961
+ minimum?: number | undefined;
1962
+ maximum?: number | undefined;
1963
+ minLength?: number | undefined;
1964
+ maxLength?: number | undefined;
1965
+ minItems?: number | undefined;
1966
+ maxItems?: number | undefined;
1967
+ pattern?: string | undefined;
1968
+ format?: string | undefined;
1969
+ } | undefined;
1970
+ defaults?: string[] | undefined;
844
1971
  header?: string | undefined;
845
1972
  secret?: boolean | undefined;
846
1973
  required?: boolean | undefined;
847
1974
  }[] | undefined;
1975
+ childSessionId?: string | undefined;
1976
+ url?: {
1977
+ url: string;
1978
+ elicitationId: string;
1979
+ } | undefined;
848
1980
  }>>;
849
1981
  /** Unanswered questions in the current turn, even while the agent continues working. */
850
1982
  asyncQuestions: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -853,12 +1985,12 @@ export declare const sessionSummarySchema: z.ZodObject<{
853
1985
  options: z.ZodArray<z.ZodString, "many">;
854
1986
  }, "strip", z.ZodTypeAny, {
855
1987
  options: string[];
856
- id: string;
857
1988
  title: string;
1989
+ id: string;
858
1990
  }, {
859
1991
  options: string[];
860
- id: string;
861
1992
  title: string;
1993
+ id: string;
862
1994
  }>, "many">>;
863
1995
  /**
864
1996
  * Live only: messages waiting for the current turn to end, when the host
@@ -917,15 +2049,15 @@ export declare const sessionSummarySchema: z.ZodObject<{
917
2049
  total: number;
918
2050
  }>>;
919
2051
  }, "strip", z.ZodTypeAny, {
920
- id: string;
921
- state: "running" | "error" | "idle" | "waiting" | "offline";
922
2052
  agent: string;
2053
+ id: string;
2054
+ state: "unknown" | "running" | "error" | "idle" | "waiting" | "offline";
2055
+ updatedAt: number;
923
2056
  lastSeq: number;
924
2057
  nativeId: string;
925
2058
  cwd: string;
926
2059
  pendingPermissions: number;
927
2060
  createdAt: number;
928
- updatedAt: number;
929
2061
  archived: boolean;
930
2062
  title?: string | undefined;
931
2063
  model?: string | undefined;
@@ -934,7 +2066,7 @@ export declare const sessionSummarySchema: z.ZodObject<{
934
2066
  activity?: {
935
2067
  kind: "tool" | "thinking" | "responding";
936
2068
  title?: string | undefined;
937
- toolKind?: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | undefined;
2069
+ toolKind?: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | undefined;
938
2070
  } | undefined;
939
2071
  permission?: {
940
2072
  options: {
@@ -945,26 +2077,132 @@ export declare const sessionSummarySchema: z.ZodObject<{
945
2077
  title: string;
946
2078
  requestId: string;
947
2079
  toolCallId?: string | undefined;
2080
+ tool?: {
2081
+ title?: string | undefined;
2082
+ kind?: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | undefined;
2083
+ content?: ({
2084
+ type: "content";
2085
+ content: {
2086
+ type: "text";
2087
+ text: string;
2088
+ annotations?: z.objectOutputType<{
2089
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
2090
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
2091
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
2092
+ }, z.ZodTypeAny, "passthrough"> | undefined;
2093
+ _meta?: Record<string, unknown> | undefined;
2094
+ } | {
2095
+ type: "image";
2096
+ mimeType: string;
2097
+ annotations?: z.objectOutputType<{
2098
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
2099
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
2100
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
2101
+ }, z.ZodTypeAny, "passthrough"> | undefined;
2102
+ _meta?: Record<string, unknown> | undefined;
2103
+ data?: string | undefined;
2104
+ uri?: string | undefined;
2105
+ } | {
2106
+ type: "audio";
2107
+ mimeType: string;
2108
+ annotations?: z.objectOutputType<{
2109
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
2110
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
2111
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
2112
+ }, z.ZodTypeAny, "passthrough"> | undefined;
2113
+ _meta?: Record<string, unknown> | undefined;
2114
+ data?: string | undefined;
2115
+ uri?: string | undefined;
2116
+ } | {
2117
+ type: "resource";
2118
+ resource: {
2119
+ uri: string;
2120
+ text?: string | undefined;
2121
+ _meta?: Record<string, unknown> | undefined;
2122
+ mimeType?: string | undefined;
2123
+ blob?: string | undefined;
2124
+ assetUri?: string | undefined;
2125
+ };
2126
+ annotations?: z.objectOutputType<{
2127
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
2128
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
2129
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
2130
+ }, z.ZodTypeAny, "passthrough"> | undefined;
2131
+ _meta?: Record<string, unknown> | undefined;
2132
+ } | {
2133
+ type: "resource_link";
2134
+ uri: string;
2135
+ name: string;
2136
+ annotations?: z.objectOutputType<{
2137
+ audience: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["user", "assistant"]>, "many">>>, ("user" | "assistant")[] | undefined, ("user" | "assistant")[] | null | undefined>;
2138
+ priority: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
2139
+ lastModified: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
2140
+ }, z.ZodTypeAny, "passthrough"> | undefined;
2141
+ _meta?: Record<string, unknown> | undefined;
2142
+ mimeType?: string | undefined;
2143
+ title?: string | undefined;
2144
+ description?: string | undefined;
2145
+ size?: number | undefined;
2146
+ kind?: "file" | "skill" | "agent" | undefined;
2147
+ };
2148
+ } | {
2149
+ path: string;
2150
+ type: "diff";
2151
+ newText: string;
2152
+ oldText?: string | null | undefined;
2153
+ } | {
2154
+ path: string;
2155
+ type: "patch";
2156
+ diff: string;
2157
+ change: "add" | "delete" | "update";
2158
+ movePath?: string | undefined;
2159
+ } | {
2160
+ type: "terminal";
2161
+ terminalId: string;
2162
+ })[] | undefined;
2163
+ rawInput?: unknown;
2164
+ locations?: {
2165
+ path: string;
2166
+ line?: number | undefined;
2167
+ }[] | undefined;
2168
+ } | undefined;
948
2169
  detail?: string | undefined;
949
2170
  questions?: {
950
- id: string;
951
2171
  text: string;
952
2172
  kind: "text" | "choice" | "choices";
2173
+ id: string;
953
2174
  options?: {
954
2175
  value: string;
955
2176
  label: string;
956
2177
  description?: string | undefined;
957
2178
  }[] | undefined;
958
2179
  other?: boolean | undefined;
2180
+ constraints?: {
2181
+ type: "string" | "number" | "boolean" | "integer" | "array";
2182
+ minimum?: number | undefined;
2183
+ maximum?: number | undefined;
2184
+ minLength?: number | undefined;
2185
+ maxLength?: number | undefined;
2186
+ minItems?: number | undefined;
2187
+ maxItems?: number | undefined;
2188
+ pattern?: string | undefined;
2189
+ format?: string | undefined;
2190
+ } | undefined;
2191
+ defaults?: string[] | undefined;
959
2192
  header?: string | undefined;
960
2193
  secret?: boolean | undefined;
961
2194
  required?: boolean | undefined;
962
2195
  }[] | undefined;
2196
+ childSessionId?: string | undefined;
2197
+ url?: {
2198
+ url: string;
2199
+ elicitationId: string;
2200
+ } | undefined;
963
2201
  } | undefined;
964
2202
  asyncQuestions?: {
965
2203
  options: string[];
966
- id: string;
967
2204
  title: string;
2205
+ id: string;
968
2206
  }[] | undefined;
969
2207
  queue?: {
970
2208
  text: string;
@@ -984,15 +2222,15 @@ export declare const sessionSummarySchema: z.ZodObject<{
984
2222
  total: number;
985
2223
  } | undefined;
986
2224
  }, {
987
- id: string;
988
- state: "running" | "error" | "idle" | "waiting" | "offline";
989
2225
  agent: string;
2226
+ id: string;
2227
+ state: "unknown" | "running" | "error" | "idle" | "waiting" | "offline";
2228
+ updatedAt: number;
990
2229
  lastSeq: number;
991
2230
  nativeId: string;
992
2231
  cwd: string;
993
2232
  pendingPermissions: number;
994
2233
  createdAt: number;
995
- updatedAt: number;
996
2234
  archived: boolean;
997
2235
  title?: string | undefined;
998
2236
  model?: string | undefined;
@@ -1001,7 +2239,7 @@ export declare const sessionSummarySchema: z.ZodObject<{
1001
2239
  activity?: {
1002
2240
  kind: "tool" | "thinking" | "responding";
1003
2241
  title?: string | undefined;
1004
- toolKind?: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | undefined;
2242
+ toolKind?: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | undefined;
1005
2243
  } | undefined;
1006
2244
  permission?: {
1007
2245
  options: {
@@ -1012,26 +2250,70 @@ export declare const sessionSummarySchema: z.ZodObject<{
1012
2250
  title: string;
1013
2251
  requestId: string;
1014
2252
  toolCallId?: string | undefined;
2253
+ tool?: {
2254
+ title?: string | undefined;
2255
+ kind?: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | undefined;
2256
+ content?: ({
2257
+ type: "content";
2258
+ content?: unknown;
2259
+ } | {
2260
+ path: string;
2261
+ type: "diff";
2262
+ newText: string;
2263
+ oldText?: string | null | undefined;
2264
+ } | {
2265
+ path: string;
2266
+ type: "patch";
2267
+ diff: string;
2268
+ change: "add" | "delete" | "update";
2269
+ movePath?: string | undefined;
2270
+ } | {
2271
+ type: "terminal";
2272
+ terminalId: string;
2273
+ })[] | undefined;
2274
+ rawInput?: unknown;
2275
+ locations?: {
2276
+ path: string;
2277
+ line?: number | undefined;
2278
+ }[] | undefined;
2279
+ } | undefined;
1015
2280
  detail?: string | undefined;
1016
2281
  questions?: {
1017
- id: string;
1018
2282
  text: string;
1019
2283
  kind: "text" | "choice" | "choices";
2284
+ id: string;
1020
2285
  options?: {
1021
2286
  value: string;
1022
2287
  label: string;
1023
2288
  description?: string | undefined;
1024
2289
  }[] | undefined;
1025
2290
  other?: boolean | undefined;
2291
+ constraints?: {
2292
+ type: "string" | "number" | "boolean" | "integer" | "array";
2293
+ minimum?: number | undefined;
2294
+ maximum?: number | undefined;
2295
+ minLength?: number | undefined;
2296
+ maxLength?: number | undefined;
2297
+ minItems?: number | undefined;
2298
+ maxItems?: number | undefined;
2299
+ pattern?: string | undefined;
2300
+ format?: string | undefined;
2301
+ } | undefined;
2302
+ defaults?: string[] | undefined;
1026
2303
  header?: string | undefined;
1027
2304
  secret?: boolean | undefined;
1028
2305
  required?: boolean | undefined;
1029
2306
  }[] | undefined;
2307
+ childSessionId?: string | undefined;
2308
+ url?: {
2309
+ url: string;
2310
+ elicitationId: string;
2311
+ } | undefined;
1030
2312
  } | undefined;
1031
2313
  asyncQuestions?: {
1032
2314
  options: string[];
1033
- id: string;
1034
2315
  title: string;
2316
+ id: string;
1035
2317
  }[] | undefined;
1036
2318
  queue?: {
1037
2319
  text: string;
@@ -1168,6 +2450,10 @@ export declare const machineInfoSchema: z.ZodObject<{
1168
2450
  steer: z.ZodBoolean;
1169
2451
  permissions: z.ZodBoolean;
1170
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>;
1171
2457
  /**
1172
2458
  * The agent forks sessions itself, keeping everything it knew. Every agent's
1173
2459
  * sessions can be forked: without this (or from a single reply, where the
@@ -1185,6 +2471,9 @@ export declare const machineInfoSchema: z.ZodObject<{
1185
2471
  fork: boolean;
1186
2472
  models: boolean;
1187
2473
  modes: boolean;
2474
+ audio?: boolean | undefined;
2475
+ embeddedContext?: boolean | undefined;
2476
+ acp?: boolean | undefined;
1188
2477
  }, {
1189
2478
  interrupt: boolean;
1190
2479
  steer: boolean;
@@ -1193,6 +2482,9 @@ export declare const machineInfoSchema: z.ZodObject<{
1193
2482
  fork: boolean;
1194
2483
  models: boolean;
1195
2484
  modes: boolean;
2485
+ audio?: boolean | undefined;
2486
+ embeddedContext?: boolean | undefined;
2487
+ acp?: boolean | undefined;
1196
2488
  }>;
1197
2489
  }, "strip", z.ZodTypeAny, {
1198
2490
  id: string;
@@ -1207,6 +2499,9 @@ export declare const machineInfoSchema: z.ZodObject<{
1207
2499
  fork: boolean;
1208
2500
  models: boolean;
1209
2501
  modes: boolean;
2502
+ audio?: boolean | undefined;
2503
+ embeddedContext?: boolean | undefined;
2504
+ acp?: boolean | undefined;
1210
2505
  };
1211
2506
  version?: string | undefined;
1212
2507
  problem?: string | undefined;
@@ -1228,6 +2523,9 @@ export declare const machineInfoSchema: z.ZodObject<{
1228
2523
  fork: boolean;
1229
2524
  models: boolean;
1230
2525
  modes: boolean;
2526
+ audio?: boolean | undefined;
2527
+ embeddedContext?: boolean | undefined;
2528
+ acp?: boolean | undefined;
1231
2529
  };
1232
2530
  version?: string | undefined;
1233
2531
  problem?: string | undefined;
@@ -1262,6 +2560,9 @@ export declare const machineInfoSchema: z.ZodObject<{
1262
2560
  fork: boolean;
1263
2561
  models: boolean;
1264
2562
  modes: boolean;
2563
+ audio?: boolean | undefined;
2564
+ embeddedContext?: boolean | undefined;
2565
+ acp?: boolean | undefined;
1265
2566
  };
1266
2567
  version?: string | undefined;
1267
2568
  problem?: string | undefined;
@@ -1293,6 +2594,9 @@ export declare const machineInfoSchema: z.ZodObject<{
1293
2594
  fork: boolean;
1294
2595
  models: boolean;
1295
2596
  modes: boolean;
2597
+ audio?: boolean | undefined;
2598
+ embeddedContext?: boolean | undefined;
2599
+ acp?: boolean | undefined;
1296
2600
  };
1297
2601
  version?: string | undefined;
1298
2602
  problem?: string | undefined;
@@ -1358,8 +2662,8 @@ export declare const terminalInfoSchema: z.ZodObject<{
1358
2662
  /** Ended without an exit code: the host stopped while it ran. */
1359
2663
  interrupted: z.ZodOptional<z.ZodBoolean>;
1360
2664
  }, "strip", z.ZodTypeAny, {
1361
- id: string;
1362
2665
  title: string;
2666
+ id: string;
1363
2667
  cwd: string;
1364
2668
  createdAt: number;
1365
2669
  cols: number;
@@ -1369,8 +2673,8 @@ export declare const terminalInfoSchema: z.ZodObject<{
1369
2673
  exitCode?: number | null | undefined;
1370
2674
  interrupted?: boolean | undefined;
1371
2675
  }, {
1372
- id: string;
1373
2676
  title: string;
2677
+ id: string;
1374
2678
  cwd: string;
1375
2679
  createdAt: number;
1376
2680
  cols: number;
@@ -1399,11 +2703,11 @@ export declare const gatewayStatusSchema: z.ZodObject<{
1399
2703
  id: z.ZodString;
1400
2704
  name: z.ZodString;
1401
2705
  }, "strip", z.ZodTypeAny, {
1402
- id: string;
1403
2706
  name: string;
1404
- }, {
1405
2707
  id: string;
2708
+ }, {
1406
2709
  name: string;
2710
+ id: string;
1407
2711
  }>>;
1408
2712
  account: z.ZodOptional<z.ZodObject<{
1409
2713
  userId: z.ZodString;
@@ -1421,21 +2725,21 @@ export declare const gatewayStatusSchema: z.ZodObject<{
1421
2725
  pairedAt: z.ZodNumber;
1422
2726
  online: z.ZodBoolean;
1423
2727
  }, "strip", z.ZodTypeAny, {
1424
- id: string;
1425
2728
  name: string;
2729
+ id: string;
1426
2730
  online: boolean;
1427
2731
  pairedAt: number;
1428
2732
  }, {
1429
- id: string;
1430
2733
  name: string;
2734
+ id: string;
1431
2735
  online: boolean;
1432
2736
  pairedAt: number;
1433
2737
  }>, "many">;
1434
2738
  }, "strip", z.ZodTypeAny, {
1435
2739
  status: "offline" | "off" | "connecting" | "online";
1436
2740
  devices: {
1437
- id: string;
1438
2741
  name: string;
2742
+ id: string;
1439
2743
  online: boolean;
1440
2744
  pairedAt: number;
1441
2745
  }[];
@@ -1445,8 +2749,8 @@ export declare const gatewayStatusSchema: z.ZodObject<{
1445
2749
  } | undefined;
1446
2750
  url?: string | undefined;
1447
2751
  machine?: {
1448
- id: string;
1449
2752
  name: string;
2753
+ id: string;
1450
2754
  } | undefined;
1451
2755
  account?: {
1452
2756
  userId: string;
@@ -1455,8 +2759,8 @@ export declare const gatewayStatusSchema: z.ZodObject<{
1455
2759
  }, {
1456
2760
  status: "offline" | "off" | "connecting" | "online";
1457
2761
  devices: {
1458
- id: string;
1459
2762
  name: string;
2763
+ id: string;
1460
2764
  online: boolean;
1461
2765
  pairedAt: number;
1462
2766
  }[];
@@ -1466,8 +2770,8 @@ export declare const gatewayStatusSchema: z.ZodObject<{
1466
2770
  } | undefined;
1467
2771
  url?: string | undefined;
1468
2772
  machine?: {
1469
- id: string;
1470
2773
  name: string;
2774
+ id: string;
1471
2775
  } | undefined;
1472
2776
  account?: {
1473
2777
  userId: string;