@agen-ai/agent-protocol 0.3.1 → 0.4.1

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 (50) hide show
  1. package/README.md +114 -13
  2. package/dist/capabilities/types.d.ts +6 -1
  3. package/dist/events/types.d.ts +12 -4
  4. package/dist/events/types.js +1 -0
  5. package/dist/failures/index.d.ts +3 -0
  6. package/dist/failures/index.js +2 -0
  7. package/dist/failures/parsers.d.ts +5 -0
  8. package/dist/failures/parsers.js +12 -0
  9. package/dist/failures/types.d.ts +41 -0
  10. package/dist/failures/types.js +21 -0
  11. package/dist/foundation/parsers.d.ts +2 -3
  12. package/dist/foundation/parsers.js +1 -7
  13. package/dist/foundation/types.d.ts +2 -12
  14. package/dist/foundation/types.js +1 -1
  15. package/dist/jsonSchema/generated.d.ts +5519 -3498
  16. package/dist/jsonSchema/generated.js +4038 -2645
  17. package/dist/public/index.d.ts +2 -0
  18. package/dist/public/index.js +2 -0
  19. package/dist/public/sessionInteractions.d.ts +2 -0
  20. package/dist/public/sessionInteractions.js +1 -0
  21. package/dist/requests/types.d.ts +17 -4
  22. package/dist/sessionInteractions/index.d.ts +3 -0
  23. package/dist/sessionInteractions/index.js +2 -0
  24. package/dist/sessionInteractions/parsers.d.ts +10 -0
  25. package/dist/sessionInteractions/parsers.js +48 -0
  26. package/dist/sessionInteractions/types.d.ts +50 -0
  27. package/dist/sessionInteractions/types.js +18 -0
  28. package/dist/zod/accountQuota.d.ts +8 -0
  29. package/dist/zod/accountQuota.js +7 -5
  30. package/dist/zod/capabilities.d.ts +75 -9
  31. package/dist/zod/capabilities.js +32 -30
  32. package/dist/zod/collaboration.js +1 -1
  33. package/dist/zod/events.d.ts +68 -45
  34. package/dist/zod/events.js +17 -3
  35. package/dist/zod/failures.d.ts +23 -0
  36. package/dist/zod/failures.js +76 -0
  37. package/dist/zod/foundation.d.ts +2 -7
  38. package/dist/zod/foundation.js +15 -15
  39. package/dist/zod/index.d.ts +4 -2
  40. package/dist/zod/index.js +28 -2
  41. package/dist/zod/operations.d.ts +4 -4
  42. package/dist/zod/operations.js +1 -1
  43. package/dist/zod/requests.d.ts +79 -28
  44. package/dist/zod/requests.js +15 -2
  45. package/dist/zod/resources.js +1 -1
  46. package/dist/zod/sessionInteractions.d.ts +55 -0
  47. package/dist/zod/sessionInteractions.js +114 -0
  48. package/dist/zod/turns.js +1 -1
  49. package/dist/zod/typeEquality.generated.d.ts +36 -8
  50. package/package.json +6 -2
@@ -33,7 +33,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
33
33
  payload: z.ZodReadonly<z.ZodObject<{
34
34
  message: z.ZodOptional<z.ZodString>;
35
35
  }, z.core.$strict>>;
36
- protocolVersion: z.ZodLiteral<9>;
36
+ protocolVersion: z.ZodLiteral<11>;
37
37
  sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
38
38
  providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
39
39
  conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
@@ -54,7 +54,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
54
54
  requestId: z.ZodOptional<z.ZodType<import("../index.js").AgentRequestId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentRequestId, unknown>>>;
55
55
  message: z.ZodOptional<z.ZodString>;
56
56
  }, z.core.$strict>>;
57
- protocolVersion: z.ZodLiteral<9>;
57
+ protocolVersion: z.ZodLiteral<11>;
58
58
  sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
59
59
  providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
60
60
  conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
@@ -77,7 +77,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
77
77
  reason: z.ZodOptional<z.ZodString>;
78
78
  error: z.ZodOptional<z.ZodType<import("../index.js").AgentError, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentError, unknown>>>;
79
79
  }, z.core.$strict>>;
80
- protocolVersion: z.ZodLiteral<9>;
80
+ protocolVersion: z.ZodLiteral<11>;
81
81
  sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
82
82
  providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
83
83
  conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
@@ -91,7 +91,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
91
91
  type: z.ZodLiteral<"item.started">;
92
92
  turnId: z.ZodType<import("../index.js").AgentTurnId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentTurnId, unknown>>;
93
93
  payload: z.ZodType<import("../index.js").AgentItemSnapshot, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentItemSnapshot, unknown>>;
94
- protocolVersion: z.ZodLiteral<9>;
94
+ protocolVersion: z.ZodLiteral<11>;
95
95
  sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
96
96
  providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
97
97
  conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
@@ -105,7 +105,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
105
105
  type: z.ZodLiteral<"item.updated">;
106
106
  turnId: z.ZodType<import("../index.js").AgentTurnId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentTurnId, unknown>>;
107
107
  payload: z.ZodType<import("../index.js").AgentItemSnapshot, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentItemSnapshot, unknown>>;
108
- protocolVersion: z.ZodLiteral<9>;
108
+ protocolVersion: z.ZodLiteral<11>;
109
109
  sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
110
110
  providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
111
111
  conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
@@ -119,7 +119,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
119
119
  type: z.ZodLiteral<"item.completed">;
120
120
  turnId: z.ZodType<import("../index.js").AgentTurnId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentTurnId, unknown>>;
121
121
  payload: z.ZodType<import("../index.js").AgentItemSnapshot, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentItemSnapshot, unknown>>;
122
- protocolVersion: z.ZodLiteral<9>;
122
+ protocolVersion: z.ZodLiteral<11>;
123
123
  sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
124
124
  providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
125
125
  conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
@@ -145,7 +145,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
145
145
  }>;
146
146
  delta: z.ZodString;
147
147
  }, z.core.$strict>>;
148
- protocolVersion: z.ZodLiteral<9>;
148
+ protocolVersion: z.ZodLiteral<11>;
149
149
  sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
150
150
  providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
151
151
  conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
@@ -162,7 +162,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
162
162
  explanation: z.ZodOptional<z.ZodString>;
163
163
  steps: z.ZodReadonly<z.ZodArray<z.ZodType<import("../index.js").AgentPlanStep, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentPlanStep, unknown>>>>;
164
164
  }, z.core.$strict>>;
165
- protocolVersion: z.ZodLiteral<9>;
165
+ protocolVersion: z.ZodLiteral<11>;
166
166
  sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
167
167
  providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
168
168
  conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
@@ -179,7 +179,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
179
179
  artifactId: z.ZodType<import("../index.js").AgentArtifactId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentArtifactId, unknown>>;
180
180
  requestId: z.ZodType<import("../index.js").AgentRequestId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentRequestId, unknown>>;
181
181
  }, z.core.$strict>>;
182
- protocolVersion: z.ZodLiteral<9>;
182
+ protocolVersion: z.ZodLiteral<11>;
183
183
  sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
184
184
  providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
185
185
  conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
@@ -193,7 +193,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
193
193
  type: z.ZodLiteral<"turn.diff.updated">;
194
194
  turnId: z.ZodType<import("../index.js").AgentTurnId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentTurnId, unknown>>;
195
195
  payload: z.ZodType<import("../index.js").AgentDiffSummary, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentDiffSummary, unknown>>;
196
- protocolVersion: z.ZodLiteral<9>;
196
+ protocolVersion: z.ZodLiteral<11>;
197
197
  sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
198
198
  providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
199
199
  conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
@@ -235,21 +235,33 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
235
235
  approved: "approved";
236
236
  denied: "denied";
237
237
  }>;
238
- persistence: z.ZodEnum<{
239
- session: "session";
240
- once: "once";
241
- workspace: "workspace";
242
- }>;
243
- scope: z.ZodReadonly<z.ZodObject<{
244
- kind: z.ZodEnum<{
245
- exact_action: "exact_action";
246
- command_pattern: "command_pattern";
247
- domain: "domain";
248
- tool: "tool";
249
- server: "server";
250
- all_edits: "all_edits";
238
+ consequence: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
239
+ kind: z.ZodLiteral<"scoped">;
240
+ persistence: z.ZodEnum<{
241
+ session: "session";
242
+ workspace: "workspace";
243
+ once: "once";
251
244
  }>;
252
- }, z.core.$strict>>;
245
+ scope: z.ZodReadonly<z.ZodObject<{
246
+ kind: z.ZodEnum<{
247
+ exact_action: "exact_action";
248
+ command_pattern: "command_pattern";
249
+ domain: "domain";
250
+ tool: "tool";
251
+ server: "server";
252
+ all_edits: "all_edits";
253
+ }>;
254
+ }, z.core.$strict>>;
255
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
256
+ kind: z.ZodLiteral<"provider_managed_remembrance">;
257
+ duration: z.ZodReadonly<z.ZodObject<{
258
+ kind: z.ZodLiteral<"unknown">;
259
+ }, z.core.$strict>>;
260
+ applicability: z.ZodReadonly<z.ZodObject<{
261
+ kind: z.ZodLiteral<"unknown">;
262
+ }, z.core.$strict>>;
263
+ explanation: z.ZodString;
264
+ }, z.core.$strict>>], "kind">;
253
265
  }, z.core.$strict>>>>;
254
266
  expiresAt: z.ZodOptional<z.ZodType<import("../index.js").AgentIsoDateTime, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentIsoDateTime, unknown>>>;
255
267
  }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
@@ -326,7 +338,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
326
338
  expiresAt: z.ZodOptional<z.ZodType<import("../index.js").AgentIsoDateTime, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentIsoDateTime, unknown>>>;
327
339
  }, z.core.$strict>>], "requestKind">;
328
340
  }, z.core.$strict>>;
329
- protocolVersion: z.ZodLiteral<9>;
341
+ protocolVersion: z.ZodLiteral<11>;
330
342
  sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
331
343
  providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
332
344
  conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
@@ -357,7 +369,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
357
369
  current: z.ZodOptional<z.ZodNumber>;
358
370
  total: z.ZodOptional<z.ZodNumber>;
359
371
  }, z.core.$strict>>;
360
- protocolVersion: z.ZodLiteral<9>;
372
+ protocolVersion: z.ZodLiteral<11>;
361
373
  sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
362
374
  providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
363
375
  conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
@@ -395,7 +407,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
395
407
  thresholdTokens: z.ZodOptional<z.ZodNumber>;
396
408
  }, z.core.$strict>>>;
397
409
  }, z.core.$strict>>;
398
- protocolVersion: z.ZodLiteral<9>;
410
+ protocolVersion: z.ZodLiteral<11>;
399
411
  sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
400
412
  providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
401
413
  conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
@@ -411,7 +423,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
411
423
  payload: z.ZodReadonly<z.ZodObject<{
412
424
  artifact: z.ZodType<import("../index.js").AgentArtifactDescriptor, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentArtifactDescriptor, unknown>>;
413
425
  }, z.core.$strict>>;
414
- protocolVersion: z.ZodLiteral<9>;
426
+ protocolVersion: z.ZodLiteral<11>;
415
427
  sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
416
428
  providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
417
429
  conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
@@ -440,7 +452,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
440
452
  error: z.ZodOptional<z.ZodType<import("../index.js").AgentError, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentError, unknown>>>;
441
453
  }, z.core.$strict>>;
442
454
  }, z.core.$strict>>;
443
- protocolVersion: z.ZodLiteral<9>;
455
+ protocolVersion: z.ZodLiteral<11>;
444
456
  sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
445
457
  providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
446
458
  conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
@@ -509,7 +521,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
509
521
  resourceIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodType<import("../index.js").AgentGeneratedResourceId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentGeneratedResourceId, unknown>>>>>;
510
522
  }, z.core.$strict>>;
511
523
  }, z.core.$strict>>;
512
- protocolVersion: z.ZodLiteral<9>;
524
+ protocolVersion: z.ZodLiteral<11>;
513
525
  sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
514
526
  providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
515
527
  conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
@@ -563,7 +575,27 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
563
575
  error: z.ZodOptional<z.ZodType<import("../index.js").AgentError, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentError, unknown>>>;
564
576
  }, z.core.$strict>>;
565
577
  }, z.core.$strict>>;
566
- protocolVersion: z.ZodLiteral<9>;
578
+ protocolVersion: z.ZodLiteral<11>;
579
+ sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
580
+ providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
581
+ conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
582
+ historyAnchor: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderHistoryAnchor, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderHistoryAnchor, unknown>>>;
583
+ turnId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderTurnRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderTurnRef, unknown>>>;
584
+ itemId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderItemRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderItemRef, unknown>>>;
585
+ requestId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderRequestRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderRequestRef, unknown>>>;
586
+ }, z.core.$strict>>>;
587
+ occurredAt: z.ZodType<import("../index.js").AgentIsoDateTime, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentIsoDateTime, unknown>>;
588
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
589
+ type: z.ZodLiteral<"runtime.retrying">;
590
+ turnId: z.ZodType<import("../index.js").AgentTurnId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentTurnId, unknown>>;
591
+ payload: z.ZodReadonly<z.ZodObject<{
592
+ owner: z.ZodLiteral<"provider">;
593
+ error: z.ZodType<import("../index.js").AgentError, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentError, unknown>>;
594
+ attempt: z.ZodOptional<z.ZodNumber>;
595
+ maxAttempts: z.ZodOptional<z.ZodNumber>;
596
+ delayMs: z.ZodOptional<z.ZodNumber>;
597
+ }, z.core.$strict>>;
598
+ protocolVersion: z.ZodLiteral<11>;
567
599
  sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
568
600
  providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
569
601
  conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
@@ -579,14 +611,9 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
579
611
  payload: z.ZodReadonly<z.ZodObject<{
580
612
  code: z.ZodString;
581
613
  message: z.ZodString;
582
- retryable: z.ZodOptional<z.ZodBoolean>;
583
- context: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
584
- operation: z.ZodOptional<z.ZodString>;
585
- component: z.ZodOptional<z.ZodString>;
586
- status: z.ZodOptional<z.ZodString>;
587
- }, z.core.$strict>>>;
614
+ context: z.ZodOptional<z.ZodType<import("../index.js").AgentErrorContext, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentErrorContext, unknown>>>;
588
615
  }, z.core.$strict>>;
589
- protocolVersion: z.ZodLiteral<9>;
616
+ protocolVersion: z.ZodLiteral<11>;
590
617
  sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
591
618
  providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
592
619
  conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
@@ -602,7 +629,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
602
629
  payload: z.ZodReadonly<z.ZodObject<{
603
630
  error: z.ZodType<import("../index.js").AgentError, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentError, unknown>>;
604
631
  }, z.core.$strict>>;
605
- protocolVersion: z.ZodLiteral<9>;
632
+ protocolVersion: z.ZodLiteral<11>;
606
633
  sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
607
634
  providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
608
635
  conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
@@ -618,13 +645,9 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
618
645
  payload: z.ZodReadonly<z.ZodObject<{
619
646
  code: z.ZodString;
620
647
  message: z.ZodString;
621
- context: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
622
- operation: z.ZodOptional<z.ZodString>;
623
- component: z.ZodOptional<z.ZodString>;
624
- status: z.ZodOptional<z.ZodString>;
625
- }, z.core.$strict>>>;
648
+ context: z.ZodOptional<z.ZodType<import("../index.js").AgentErrorContext, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentErrorContext, unknown>>>;
626
649
  }, z.core.$strict>>;
627
- protocolVersion: z.ZodLiteral<9>;
650
+ protocolVersion: z.ZodLiteral<11>;
628
651
  sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
629
652
  providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
630
653
  conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
@@ -1,4 +1,5 @@
1
1
  import { z } from "zod/v4";
2
+ import { AgentErrorContextSchema, AgentErrorSchema } from "./failures.js";
2
3
  import { AgentArtifactDescriptorSchema } from "./artifacts.js";
3
4
  import { AgentCollaborationNodePortableSchema } from "./collaboration.js";
4
5
  import {
@@ -29,8 +30,6 @@ import {
29
30
  AgentCanonicalCodeSchema,
30
31
  AgentCanonicalIdValueSchema,
31
32
  AgentCanonicalNonBlankTextSchema,
32
- AgentErrorContextSchema,
33
- AgentErrorSchema,
34
33
  AgentIsoDateTimeSchema,
35
34
  AgentItemIdSchema,
36
35
  AgentProviderRefsPortableSchema,
@@ -77,6 +76,21 @@ const ProgressUpdatedPayloadSchema = z.object({
77
76
  }).strict().readonly();
78
77
  const NonNegativeSafeIntegerSchema = z.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER);
79
78
  const PositiveSafeIntegerSchema = z.number().int().positive().max(Number.MAX_SAFE_INTEGER);
79
+ const RuntimeRetryingPayloadSchema = z.object({
80
+ owner: z.literal("provider"),
81
+ error: AgentErrorSchema,
82
+ attempt: PositiveSafeIntegerSchema.optional(),
83
+ maxAttempts: PositiveSafeIntegerSchema.optional(),
84
+ delayMs: NonNegativeSafeIntegerSchema.optional()
85
+ }).strict().readonly().superRefine((retry, context) => {
86
+ if (retry.attempt !== void 0 && retry.maxAttempts !== void 0 && retry.attempt > retry.maxAttempts) {
87
+ context.addIssue({
88
+ code: "custom",
89
+ path: ["attempt"],
90
+ message: "Retry ordinal cannot exceed the maximum number of retries."
91
+ });
92
+ }
93
+ });
80
94
  const AgentContextCumulativeUsageSchema = z.object({
81
95
  inputTokens: NonNegativeSafeIntegerSchema.optional(),
82
96
  outputTokens: NonNegativeSafeIntegerSchema.optional(),
@@ -169,12 +183,12 @@ const AgentEventPortableSchema = z.discriminatedUnion("type", [
169
183
  "resource.updated",
170
184
  z.object({ resource: AgentGeneratedResourceDescriptorPortableSchema }).strict().readonly()
171
185
  ),
186
+ turnEvent("runtime.retrying", RuntimeRetryingPayloadSchema),
172
187
  optionallyTurnScopedEvent(
173
188
  "runtime.warning",
174
189
  z.object({
175
190
  code: AgentCanonicalCodeSchema,
176
191
  message: AgentCanonicalNonBlankTextSchema,
177
- retryable: z.boolean().optional(),
178
192
  context: AgentErrorContextSchema.optional()
179
193
  }).strict().readonly()
180
194
  ),
@@ -0,0 +1,23 @@
1
+ import { z } from 'zod/v4';
2
+ import { type AgentError, type AgentErrorContext, type AgentFailureQuotaReference, type AgentRecoveryHint } from '../failures/types.js';
3
+ export declare const AgentFailureCategorySchema: z.ZodEnum<{
4
+ unknown: "unknown";
5
+ rate_limited: "rate_limited";
6
+ quota_exhausted: "quota_exhausted";
7
+ budget_exhausted: "budget_exhausted";
8
+ execution_limit: "execution_limit";
9
+ context_limit: "context_limit";
10
+ authentication: "authentication";
11
+ permission: "permission";
12
+ invalid_request: "invalid_request";
13
+ overloaded: "overloaded";
14
+ transport: "transport";
15
+ provider: "provider";
16
+ protocol: "protocol";
17
+ internal: "internal";
18
+ }>;
19
+ export declare const AgentErrorContextSchema: z.ZodType<AgentErrorContext>;
20
+ export declare const AgentFailureQuotaReferenceSchema: z.ZodType<AgentFailureQuotaReference>;
21
+ export declare const AgentRecoveryHintSchema: z.ZodType<AgentRecoveryHint>;
22
+ export declare const AgentErrorSchema: z.ZodType<AgentError>;
23
+ //# sourceMappingURL=failures.d.ts.map
@@ -0,0 +1,76 @@
1
+ import { z } from "zod/v4";
2
+ import {
3
+ AGENT_ERROR_CONTEXT_MAX_LENGTH,
4
+ AGENT_FAILURE_CATEGORIES
5
+ } from "../failures/types.js";
6
+ import {
7
+ AGENT_PROTOCOL_JSON_BYTES_LIMIT,
8
+ agentProtocolSerializedJsonBytes
9
+ } from "../foundation/types.js";
10
+ import { AgentAccountQuotaResetSchema } from "./accountQuota.js";
11
+ import {
12
+ AgentCanonicalCodeSchema,
13
+ AgentCanonicalIdValueSchema,
14
+ AgentCanonicalNonBlankTextSchema,
15
+ AgentIsoDateTimeSchema,
16
+ createAgentCanonicalNonBlankStringSchema
17
+ } from "./foundation.js";
18
+ const AgentFailureCategorySchema = z.enum(AGENT_FAILURE_CATEGORIES);
19
+ const AgentErrorContextSchema = z.object({
20
+ operation: createAgentCanonicalNonBlankStringSchema(AGENT_ERROR_CONTEXT_MAX_LENGTH).optional(),
21
+ component: createAgentCanonicalNonBlankStringSchema(AGENT_ERROR_CONTEXT_MAX_LENGTH).optional(),
22
+ status: createAgentCanonicalNonBlankStringSchema(AGENT_ERROR_CONTEXT_MAX_LENGTH).optional()
23
+ }).strict().readonly();
24
+ const AgentFailureQuotaReferenceSchema = z.object({
25
+ sourceId: AgentCanonicalIdValueSchema,
26
+ poolId: AgentCanonicalIdValueSchema,
27
+ windowId: AgentCanonicalIdValueSchema,
28
+ observedAt: AgentIsoDateTimeSchema,
29
+ reset: AgentAccountQuotaResetSchema.optional()
30
+ }).strict().readonly().superRefine((reference, context) => {
31
+ if (reference.reset && Date.parse(reference.reset.observedAt) > Date.parse(reference.observedAt)) {
32
+ context.addIssue({
33
+ code: "custom",
34
+ path: ["reset", "observedAt"],
35
+ message: "Reset evidence cannot be newer than the quota observation."
36
+ });
37
+ }
38
+ });
39
+ const AgentRecoveryHintSchema = z.discriminatedUnion("kind", [
40
+ z.object({ kind: z.literal("unknown") }).strict().readonly(),
41
+ z.object({ kind: z.literal("none") }).strict().readonly(),
42
+ z.object({ kind: z.literal("retry"), notBefore: AgentIsoDateTimeSchema.optional() }).strict().readonly(),
43
+ z.object({ kind: z.literal("wait_for_quota"), quota: AgentFailureQuotaReferenceSchema.optional() }).strict().readonly(),
44
+ z.object({
45
+ kind: z.literal("user_action"),
46
+ action: z.enum(["authenticate", "review_access", "change_configuration", "review_allowance"])
47
+ }).strict().readonly()
48
+ ]);
49
+ const AgentErrorSchema = z.object({
50
+ category: AgentFailureCategorySchema,
51
+ code: AgentCanonicalCodeSchema,
52
+ message: AgentCanonicalNonBlankTextSchema,
53
+ recovery: AgentRecoveryHintSchema,
54
+ context: AgentErrorContextSchema.optional()
55
+ }).strict().readonly().superRefine((error, context) => {
56
+ if (error.recovery.kind === "wait_for_quota" && error.recovery.quota !== void 0 && error.category !== "rate_limited" && error.category !== "quota_exhausted") {
57
+ context.addIssue({
58
+ code: "custom",
59
+ path: ["recovery", "quota"],
60
+ message: "Quota references apply only to rate-limited or quota-exhausted failures."
61
+ });
62
+ }
63
+ if (agentProtocolSerializedJsonBytes(error) > AGENT_PROTOCOL_JSON_BYTES_LIMIT) {
64
+ context.addIssue({
65
+ code: "custom",
66
+ message: `Agent failures cannot exceed ${AGENT_PROTOCOL_JSON_BYTES_LIMIT} serialized bytes.`
67
+ });
68
+ }
69
+ });
70
+ export {
71
+ AgentErrorContextSchema,
72
+ AgentErrorSchema,
73
+ AgentFailureCategorySchema,
74
+ AgentFailureQuotaReferenceSchema,
75
+ AgentRecoveryHintSchema
76
+ };
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod/v4';
2
- import { type AgentArtifactId, type AgentApprovalOptionId, type AgentCollaborationId, type AgentConfigurationRevisionId, type AgentError, type AgentInstanceId, type AgentIntegrationId, type AgentIntegrationResourceId, type AgentIntegrationServerId, type AgentIntegrationToolId, type AgentIsoDateTime, type AgentItemId, type AgentJsonValue, type AgentManagedContentId, type AgentEnvironmentId, type AgentEffectiveContentId, type AgentCommandId, type AgentExtensionId, type AgentOperationId, type AgentOperationInvocationId, type AgentProviderConversationId, type AgentProviderHistoryAnchor, type AgentProviderItemRef, type AgentProviderKey, type AgentProviderRefs, type AgentProviderRequestRef, type AgentProviderTurnRef, type AgentRequestFieldId, type AgentRequestId, type AgentSessionId, type AgentGeneratedResourceId, type AgentTurnId } from '../foundation/types.js';
2
+ import { type AgentArtifactId, type AgentApprovalOptionId, type AgentCollaborationId, type AgentConfigurationRevisionId, type AgentInstanceId, type AgentIntegrationId, type AgentIntegrationResourceId, type AgentIntegrationServerId, type AgentIntegrationToolId, type AgentIsoDateTime, type AgentItemId, type AgentJsonValue, type AgentManagedContentId, type AgentEnvironmentId, type AgentEffectiveContentId, type AgentCommandId, type AgentExtensionId, type AgentOperationId, type AgentOperationInvocationId, type AgentProviderConversationId, type AgentProviderHistoryAnchor, type AgentProviderItemRef, type AgentProviderKey, type AgentProviderRefs, type AgentProviderRequestRef, type AgentProviderTurnRef, type AgentRequestFieldId, type AgentRequestId, type AgentSessionId, type AgentGeneratedResourceId, type AgentTurnId } from '../foundation/types.js';
3
3
  export declare function createAgentCanonicalOpaqueStringSchema(maxLength: number, message: string): z.ZodString;
4
4
  export declare const AgentCanonicalIdValueSchema: z.ZodString;
5
5
  export declare function createAgentCanonicalNonBlankStringSchema(maxLength: number): z.ZodString;
@@ -38,6 +38,7 @@ export declare const AgentJsonObjectKeySchema: z.ZodString;
38
38
  interface ProtocolInputPreflightOptions {
39
39
  readonly maxDepth?: number;
40
40
  readonly maxCollectionLength?: number;
41
+ readonly requireJsonData?: boolean;
41
42
  }
42
43
  export declare function withAcyclicProtocolInput<Output>(schema: z.ZodType<Output>, options?: ProtocolInputPreflightOptions): z.ZodType<Output>;
43
44
  export declare const AgentJsonValuePortableSchema: z.ZodType<AgentJsonValue>;
@@ -50,11 +51,5 @@ export declare const AgentProviderRefsPortableSchema: z.ZodReadonly<z.ZodObject<
50
51
  requestId: z.ZodOptional<z.ZodType<AgentProviderRequestRef, unknown, z.core.$ZodTypeInternals<AgentProviderRequestRef, unknown>>>;
51
52
  }, z.core.$strict>>;
52
53
  export declare const AgentProviderRefsSchema: z.ZodType<AgentProviderRefs>;
53
- export declare const AgentErrorContextSchema: z.ZodReadonly<z.ZodObject<{
54
- operation: z.ZodOptional<z.ZodString>;
55
- component: z.ZodOptional<z.ZodString>;
56
- status: z.ZodOptional<z.ZodString>;
57
- }, z.core.$strict>>;
58
- export declare const AgentErrorSchema: z.ZodType<AgentError>;
59
54
  export {};
60
55
  //# sourceMappingURL=foundation.d.ts.map
@@ -86,7 +86,10 @@ function passesProtocolInputPreflight(input, options) {
86
86
  if (options.maxDepth !== void 0 && current.depth > options.maxDepth) {
87
87
  return false;
88
88
  }
89
- if (current.value === null || typeof current.value !== "object") continue;
89
+ if (current.value === null || typeof current.value !== "object") {
90
+ if (options.requireJsonData && current.value !== null && typeof current.value !== "string" && typeof current.value !== "boolean" && !(typeof current.value === "number" && Number.isFinite(current.value))) return false;
91
+ continue;
92
+ }
90
93
  if (activeObjects.has(current.value)) return false;
91
94
  activeObjects.add(current.value);
92
95
  pending.push({ operation: "leave", value: current.value });
@@ -103,12 +106,17 @@ function passesProtocolInputPreflight(input, options) {
103
106
  }
104
107
  let propertyKeys;
105
108
  try {
109
+ if (options.requireJsonData) {
110
+ const prototype = Object.getPrototypeOf(current.value);
111
+ if (prototype !== (Array.isArray(current.value) ? Array.prototype : Object.prototype) && prototype !== null) return false;
112
+ }
106
113
  propertyKeys = Reflect.ownKeys(current.value);
107
114
  } catch {
108
115
  return false;
109
116
  }
110
117
  let collectionLength = 0;
111
118
  for (const propertyKey of propertyKeys) {
119
+ if (options.requireJsonData && typeof propertyKey !== "string") return false;
112
120
  if (typeof propertyKey === "string" && !AGENT_JSON_OBJECT_KEY_PATTERN.test(propertyKey)) {
113
121
  return false;
114
122
  }
@@ -118,7 +126,12 @@ function passesProtocolInputPreflight(input, options) {
118
126
  } catch {
119
127
  return false;
120
128
  }
121
- if (!descriptor?.enumerable) continue;
129
+ if (options.requireJsonData && (!descriptor || !("value" in descriptor))) return false;
130
+ if (!descriptor?.enumerable) {
131
+ if (options.requireJsonData && !(Array.isArray(current.value) && propertyKey === "length")) return false;
132
+ continue;
133
+ }
134
+ if (options.requireJsonData && Array.isArray(current.value) && (typeof propertyKey !== "string" || !/^(?:0|[1-9][0-9]*)$/u.test(propertyKey))) return false;
122
135
  if (!("value" in descriptor)) return false;
123
136
  collectionLength += 1;
124
137
  if (options.maxCollectionLength !== void 0 && collectionLength > options.maxCollectionLength) {
@@ -177,17 +190,6 @@ const AgentProviderRefsSchema = AgentProviderRefsPortableSchema.refine(
177
190
  (value) => Object.values(value).some((item) => item !== void 0),
178
191
  { message: "At least one provider reference is required." }
179
192
  );
180
- const AgentErrorContextSchema = z.object({
181
- operation: createAgentCanonicalNonBlankStringSchema(160).optional(),
182
- component: createAgentCanonicalNonBlankStringSchema(160).optional(),
183
- status: createAgentCanonicalNonBlankStringSchema(160).optional()
184
- }).strict().readonly();
185
- const AgentErrorSchema = z.object({
186
- code: AgentCanonicalCodeSchema,
187
- message: AgentCanonicalNonBlankTextSchema,
188
- retryable: z.boolean(),
189
- context: AgentErrorContextSchema.optional()
190
- }).strict().readonly();
191
193
  export {
192
194
  AgentApprovalOptionIdSchema,
193
195
  AgentArtifactIdSchema,
@@ -199,8 +201,6 @@ export {
199
201
  AgentConfigurationRevisionIdSchema,
200
202
  AgentEffectiveContentIdSchema,
201
203
  AgentEnvironmentIdSchema,
202
- AgentErrorContextSchema,
203
- AgentErrorSchema,
204
204
  AgentExtensionIdSchema,
205
205
  AgentGeneratedResourceIdSchema,
206
206
  AgentInstanceIdSchema,
@@ -1,7 +1,9 @@
1
- export { AgentApprovalOptionIdSchema, AgentArtifactIdSchema, AgentCollaborationIdSchema, AgentConfigurationRevisionIdSchema, AgentErrorContextSchema, AgentErrorSchema, AgentInstanceIdSchema, AgentIntegrationIdSchema, AgentIntegrationResourceIdSchema, AgentIntegrationServerIdSchema, AgentIntegrationToolIdSchema, AgentIsoDateTimeSchema, AgentItemIdSchema, AgentJsonValueSchema, AgentManagedContentIdSchema, AgentEnvironmentIdSchema, AgentEffectiveContentIdSchema, AgentCommandIdSchema, AgentExtensionIdSchema, AgentOperationIdSchema, AgentOperationInvocationIdSchema, AgentProviderConversationIdSchema, AgentProviderHistoryAnchorSchema, AgentProviderItemRefSchema, AgentProviderKeySchema, AgentProviderRefsSchema, AgentProviderRequestRefSchema, AgentProviderTurnRefSchema, AgentRequestFieldIdSchema, AgentRequestIdSchema, AgentSessionIdSchema, AgentGeneratedResourceIdSchema, AgentTurnIdSchema, } from './foundation.js';
1
+ export { AgentApprovalOptionIdSchema, AgentArtifactIdSchema, AgentCollaborationIdSchema, AgentConfigurationRevisionIdSchema, AgentInstanceIdSchema, AgentIntegrationIdSchema, AgentIntegrationResourceIdSchema, AgentIntegrationServerIdSchema, AgentIntegrationToolIdSchema, AgentIsoDateTimeSchema, AgentItemIdSchema, AgentJsonValueSchema, AgentManagedContentIdSchema, AgentEnvironmentIdSchema, AgentEffectiveContentIdSchema, AgentCommandIdSchema, AgentExtensionIdSchema, AgentOperationIdSchema, AgentOperationInvocationIdSchema, AgentProviderConversationIdSchema, AgentProviderHistoryAnchorSchema, AgentProviderItemRefSchema, AgentProviderKeySchema, AgentProviderRefsSchema, AgentProviderRequestRefSchema, AgentProviderTurnRefSchema, AgentRequestFieldIdSchema, AgentRequestIdSchema, AgentSessionIdSchema, AgentGeneratedResourceIdSchema, AgentTurnIdSchema, } from './foundation.js';
2
+ export { AgentErrorContextSchema, AgentErrorSchema, AgentFailureCategorySchema, AgentFailureQuotaReferenceSchema, AgentRecoveryHintSchema, } from './failures.js';
2
3
  export { AgentSessionBindingSchema, AgentSessionBranchSourceSchema, AgentSessionBranchInputSchema, AgentSessionConfigurationSchema, AgentSessionCreateInputSchema, AgentSessionOpenInputSchema, AgentSessionResumeInputSchema, } from './sessions.js';
4
+ export { AgentSessionDecisionChoiceIdSchema, AgentSessionWorkspaceTargetSchema, AgentSessionDecisionConsequenceSchema, AgentSessionDecisionChoiceSchema, AgentSessionDecisionRequestPortableSchema, AgentSessionDecisionRequestSchema, AgentSessionDecisionResponseSchema, } from './sessionInteractions.js';
3
5
  export { AgentBrowserActionDetailsSchema, AgentCollaborationToolCallDetailsSchema, AgentCommandExecutionDetailsSchema, AgentComputerActionDetailsSchema, AgentContentStreamKindSchema, AgentContextCompactionDetailsSchema, AgentDiffSummarySchema, AgentDynamicToolCallDetailsSchema, AgentFileChangeDetailsSchema, AgentFileChangeSchema, AgentImageViewDetailsSchema, AgentItemSnapshotSchema, AgentMcpToolCallDetailsSchema, AgentPlanStepSchema, AgentReviewDetailsSchema, AgentTurnCompletedPayloadSchema, AgentTurnInputContentCompositionSchema, AgentTurnInputContentSchema, AgentTurnInteractionModeSchema, AgentTurnInputPartSchema, AgentContentReferenceInputPartSchema, AgentTurnInterruptionInputSchema, AgentTurnRunInputSchema, AgentWebSearchDetailsSchema, } from './turns.js';
4
- export { AgentApprovalRequestSchema, AgentApprovalResolutionSchema, AgentElicitationRequestSchema, AgentRequestResolutionSchema, AgentRequestSchema, } from './requests.js';
6
+ export { AgentApprovalConsequenceSchema, AgentApprovalRequestSchema, AgentApprovalResolutionSchema, AgentElicitationRequestSchema, AgentRequestResolutionSchema, AgentRequestSchema, } from './requests.js';
5
7
  export { AgentOperationCatalogSchema, AgentOperationDescriptorSchema, AgentOperationFieldSchema, AgentOperationInvocationSchema, AgentOperationResultSchema, } from './operations.js';
6
8
  export { AgentManagedContentCatalogSchema, AgentManagedContentDescriptorSchema, } from './managedContent.js';
7
9
  export { AgentConfigurationCatalogSchema, AgentConfigurationFieldPortableSchema, AgentConfigurationSelectionInputSchema, AgentConfigurationValueSchema, } from './configuration.js';
package/dist/zod/index.js CHANGED
@@ -3,8 +3,6 @@ import {
3
3
  AgentArtifactIdSchema,
4
4
  AgentCollaborationIdSchema,
5
5
  AgentConfigurationRevisionIdSchema,
6
- AgentErrorContextSchema,
7
- AgentErrorSchema,
8
6
  AgentInstanceIdSchema,
9
7
  AgentIntegrationIdSchema,
10
8
  AgentIntegrationResourceIdSchema,
@@ -33,6 +31,13 @@ import {
33
31
  AgentGeneratedResourceIdSchema,
34
32
  AgentTurnIdSchema
35
33
  } from "./foundation.js";
34
+ import {
35
+ AgentErrorContextSchema,
36
+ AgentErrorSchema,
37
+ AgentFailureCategorySchema,
38
+ AgentFailureQuotaReferenceSchema,
39
+ AgentRecoveryHintSchema
40
+ } from "./failures.js";
36
41
  import {
37
42
  AgentSessionBindingSchema,
38
43
  AgentSessionBranchSourceSchema,
@@ -42,6 +47,15 @@ import {
42
47
  AgentSessionOpenInputSchema,
43
48
  AgentSessionResumeInputSchema
44
49
  } from "./sessions.js";
50
+ import {
51
+ AgentSessionDecisionChoiceIdSchema,
52
+ AgentSessionWorkspaceTargetSchema,
53
+ AgentSessionDecisionConsequenceSchema,
54
+ AgentSessionDecisionChoiceSchema,
55
+ AgentSessionDecisionRequestPortableSchema,
56
+ AgentSessionDecisionRequestSchema,
57
+ AgentSessionDecisionResponseSchema
58
+ } from "./sessionInteractions.js";
45
59
  import {
46
60
  AgentBrowserActionDetailsSchema,
47
61
  AgentCollaborationToolCallDetailsSchema,
@@ -69,6 +83,7 @@ import {
69
83
  AgentWebSearchDetailsSchema
70
84
  } from "./turns.js";
71
85
  import {
86
+ AgentApprovalConsequenceSchema,
72
87
  AgentApprovalRequestSchema,
73
88
  AgentApprovalResolutionSchema,
74
89
  AgentElicitationRequestSchema,
@@ -118,6 +133,7 @@ export * from "./extensions.js";
118
133
  export * from "./environment.js";
119
134
  export {
120
135
  AgentApprovalCapabilitySchema,
136
+ AgentApprovalConsequenceSchema,
121
137
  AgentApprovalOptionIdSchema,
122
138
  AgentApprovalRequestSchema,
123
139
  AgentApprovalResolutionSchema,
@@ -152,6 +168,8 @@ export {
152
168
  AgentErrorSchema,
153
169
  AgentEventSchema,
154
170
  AgentExtensionIdSchema,
171
+ AgentFailureCategorySchema,
172
+ AgentFailureQuotaReferenceSchema,
155
173
  AgentFileChangeDetailsSchema,
156
174
  AgentFileChangeSchema,
157
175
  AgentGeneratedResourceDescriptorSchema,
@@ -188,6 +206,7 @@ export {
188
206
  AgentProviderRefsSchema,
189
207
  AgentProviderRequestRefSchema,
190
208
  AgentProviderTurnRefSchema,
209
+ AgentRecoveryHintSchema,
191
210
  AgentRequestFieldIdSchema,
192
211
  AgentRequestIdSchema,
193
212
  AgentRequestResolutionSchema,
@@ -198,9 +217,16 @@ export {
198
217
  AgentSessionBranchSourceSchema,
199
218
  AgentSessionConfigurationSchema,
200
219
  AgentSessionCreateInputSchema,
220
+ AgentSessionDecisionChoiceIdSchema,
221
+ AgentSessionDecisionChoiceSchema,
222
+ AgentSessionDecisionConsequenceSchema,
223
+ AgentSessionDecisionRequestPortableSchema,
224
+ AgentSessionDecisionRequestSchema,
225
+ AgentSessionDecisionResponseSchema,
201
226
  AgentSessionIdSchema,
202
227
  AgentSessionOpenInputSchema,
203
228
  AgentSessionResumeInputSchema,
229
+ AgentSessionWorkspaceTargetSchema,
204
230
  AgentTurnCompletedPayloadSchema,
205
231
  AgentTurnIdSchema,
206
232
  AgentTurnInputContentCompositionSchema,