@agen-ai/agent-protocol 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -8
- package/dist/capabilities/types.d.ts +1 -1
- package/dist/events/types.d.ts +12 -4
- package/dist/events/types.js +1 -0
- package/dist/failures/index.d.ts +3 -0
- package/dist/failures/index.js +2 -0
- package/dist/failures/parsers.d.ts +5 -0
- package/dist/failures/parsers.js +12 -0
- package/dist/failures/types.d.ts +41 -0
- package/dist/failures/types.js +21 -0
- package/dist/foundation/parsers.d.ts +2 -3
- package/dist/foundation/parsers.js +1 -7
- package/dist/foundation/types.d.ts +2 -12
- package/dist/foundation/types.js +1 -1
- package/dist/jsonSchema/generated.d.ts +3634 -2283
- package/dist/jsonSchema/generated.js +2206 -1246
- package/dist/public/index.d.ts +1 -0
- package/dist/public/index.js +1 -0
- package/dist/zod/accountQuota.d.ts +8 -0
- package/dist/zod/accountQuota.js +7 -5
- package/dist/zod/capabilities.d.ts +3 -3
- package/dist/zod/collaboration.js +1 -1
- package/dist/zod/events.d.ts +42 -31
- package/dist/zod/events.js +17 -3
- package/dist/zod/failures.d.ts +23 -0
- package/dist/zod/failures.js +76 -0
- package/dist/zod/foundation.d.ts +1 -7
- package/dist/zod/foundation.js +0 -13
- package/dist/zod/index.d.ts +2 -1
- package/dist/zod/index.js +10 -2
- package/dist/zod/operations.d.ts +4 -4
- package/dist/zod/operations.js +1 -1
- package/dist/zod/resources.js +1 -1
- package/dist/zod/turns.js +1 -1
- package/dist/zod/typeEquality.generated.d.ts +16 -4
- package/package.json +2 -2
package/dist/public/index.d.ts
CHANGED
package/dist/public/index.js
CHANGED
|
@@ -58,6 +58,14 @@ export declare const AgentAccountQuotaMeasurementSchema: z.ZodDiscriminatedUnion
|
|
|
58
58
|
remainingMinorUnits: z.ZodOptional<z.ZodNumber>;
|
|
59
59
|
usedPercent: z.ZodOptional<z.ZodNumber>;
|
|
60
60
|
}, z.core.$strict>>], "kind">;
|
|
61
|
+
export declare const AgentAccountQuotaResetSchema: z.ZodReadonly<z.ZodObject<{
|
|
62
|
+
at: z.ZodType<import("../index.js").AgentIsoDateTime, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentIsoDateTime, unknown>>;
|
|
63
|
+
precision: z.ZodEnum<{
|
|
64
|
+
reported: "reported";
|
|
65
|
+
estimated: "estimated";
|
|
66
|
+
}>;
|
|
67
|
+
observedAt: z.ZodType<import("../index.js").AgentIsoDateTime, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentIsoDateTime, unknown>>;
|
|
68
|
+
}, z.core.$strict>>;
|
|
61
69
|
export declare const AgentAccountQuotaWindowPortableSchema: z.ZodReadonly<z.ZodObject<{
|
|
62
70
|
poolId: z.ZodString;
|
|
63
71
|
windowId: z.ZodString;
|
package/dist/zod/accountQuota.js
CHANGED
|
@@ -61,6 +61,11 @@ const AgentAccountQuotaMeasurementSchema = z.discriminatedUnion("kind", [
|
|
|
61
61
|
usedPercent: NonnegativeQuantitySchema.optional()
|
|
62
62
|
}).strict().readonly()
|
|
63
63
|
]);
|
|
64
|
+
const AgentAccountQuotaResetSchema = z.object({
|
|
65
|
+
at: AgentIsoDateTimeSchema,
|
|
66
|
+
precision: z.enum(["reported", "estimated"]),
|
|
67
|
+
observedAt: AgentIsoDateTimeSchema
|
|
68
|
+
}).strict().readonly();
|
|
64
69
|
const AgentAccountQuotaWindowPortableSchema = z.object({
|
|
65
70
|
poolId: AgentCanonicalIdValueSchema,
|
|
66
71
|
windowId: AgentCanonicalIdValueSchema,
|
|
@@ -71,11 +76,7 @@ const AgentAccountQuotaWindowPortableSchema = z.object({
|
|
|
71
76
|
measurement: AgentAccountQuotaMeasurementSchema,
|
|
72
77
|
observedAt: AgentIsoDateTimeSchema,
|
|
73
78
|
startsAt: AgentIsoDateTimeSchema.optional(),
|
|
74
|
-
reset:
|
|
75
|
-
at: AgentIsoDateTimeSchema,
|
|
76
|
-
precision: z.enum(["reported", "estimated"]),
|
|
77
|
-
observedAt: AgentIsoDateTimeSchema
|
|
78
|
-
}).strict().readonly().optional()
|
|
79
|
+
reset: AgentAccountQuotaResetSchema.optional()
|
|
79
80
|
}).strict().readonly();
|
|
80
81
|
function validateWindow(window, context, prefix = []) {
|
|
81
82
|
if (window.applicability.kind === "models" && new Set(window.applicability.modelIds).size !== window.applicability.modelIds.length) {
|
|
@@ -148,6 +149,7 @@ export {
|
|
|
148
149
|
AgentAccountQuotaApplicabilitySchema,
|
|
149
150
|
AgentAccountQuotaMeasurementSchema,
|
|
150
151
|
AgentAccountQuotaPeriodSchema,
|
|
152
|
+
AgentAccountQuotaResetSchema,
|
|
151
153
|
AgentAccountQuotaSnapshotPortableSchema,
|
|
152
154
|
AgentAccountQuotaSnapshotSchema,
|
|
153
155
|
AgentAccountQuotaWindowPortableSchema,
|
|
@@ -106,7 +106,7 @@ export declare const AgentOperationInputCapabilitySchema: z.ZodReadonly<z.ZodObj
|
|
|
106
106
|
}, z.core.$strict>>], "kind">;
|
|
107
107
|
}, z.core.$strict>>;
|
|
108
108
|
export declare const AgentCapabilitiesPortableSchema: z.ZodReadonly<z.ZodObject<{
|
|
109
|
-
protocolVersion: z.ZodLiteral<
|
|
109
|
+
protocolVersion: z.ZodLiteral<10>;
|
|
110
110
|
providerKey: z.ZodType<import("../index.js").AgentProviderKey, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderKey, unknown>>;
|
|
111
111
|
sessions: z.ZodReadonly<z.ZodObject<{
|
|
112
112
|
create: z.ZodLiteral<true>;
|
|
@@ -234,10 +234,10 @@ export declare const AgentCapabilitiesPortableSchema: z.ZodReadonly<z.ZodObject<
|
|
|
234
234
|
kind: z.ZodLiteral<"supported">;
|
|
235
235
|
triggers: z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
236
236
|
unknown: "unknown";
|
|
237
|
-
automatic: "automatic";
|
|
238
|
-
manual: "manual";
|
|
239
237
|
context_limit: "context_limit";
|
|
240
238
|
recovery: "recovery";
|
|
239
|
+
automatic: "automatic";
|
|
240
|
+
manual: "manual";
|
|
241
241
|
}>>>;
|
|
242
242
|
sameSessionContinuation: z.ZodBoolean;
|
|
243
243
|
}, z.core.$strict>>], "kind">;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod/v4";
|
|
2
|
+
import { AgentErrorSchema } from "./failures.js";
|
|
2
3
|
import { compareStringsByUnicodeCodePoint } from "../foundation/ordering.js";
|
|
3
4
|
import {
|
|
4
5
|
AGENT_COLLABORATION_OBJECTIVE_MAX_LENGTH,
|
|
@@ -13,7 +14,6 @@ import {
|
|
|
13
14
|
import {
|
|
14
15
|
AgentArtifactIdSchema,
|
|
15
16
|
AgentCollaborationIdSchema,
|
|
16
|
-
AgentErrorSchema,
|
|
17
17
|
AgentGeneratedResourceIdSchema,
|
|
18
18
|
AgentIsoDateTimeSchema,
|
|
19
19
|
createAgentCanonicalNonBlankStringSchema
|
package/dist/zod/events.d.ts
CHANGED
|
@@ -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<
|
|
36
|
+
protocolVersion: z.ZodLiteral<10>;
|
|
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<
|
|
57
|
+
protocolVersion: z.ZodLiteral<10>;
|
|
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<
|
|
80
|
+
protocolVersion: z.ZodLiteral<10>;
|
|
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<
|
|
94
|
+
protocolVersion: z.ZodLiteral<10>;
|
|
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<
|
|
108
|
+
protocolVersion: z.ZodLiteral<10>;
|
|
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<
|
|
122
|
+
protocolVersion: z.ZodLiteral<10>;
|
|
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<
|
|
148
|
+
protocolVersion: z.ZodLiteral<10>;
|
|
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<
|
|
165
|
+
protocolVersion: z.ZodLiteral<10>;
|
|
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<
|
|
182
|
+
protocolVersion: z.ZodLiteral<10>;
|
|
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<
|
|
196
|
+
protocolVersion: z.ZodLiteral<10>;
|
|
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>>>;
|
|
@@ -326,7 +326,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
|
|
|
326
326
|
expiresAt: z.ZodOptional<z.ZodType<import("../index.js").AgentIsoDateTime, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentIsoDateTime, unknown>>>;
|
|
327
327
|
}, z.core.$strict>>], "requestKind">;
|
|
328
328
|
}, z.core.$strict>>;
|
|
329
|
-
protocolVersion: z.ZodLiteral<
|
|
329
|
+
protocolVersion: z.ZodLiteral<10>;
|
|
330
330
|
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
331
331
|
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
332
332
|
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
@@ -357,7 +357,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
|
|
|
357
357
|
current: z.ZodOptional<z.ZodNumber>;
|
|
358
358
|
total: z.ZodOptional<z.ZodNumber>;
|
|
359
359
|
}, z.core.$strict>>;
|
|
360
|
-
protocolVersion: z.ZodLiteral<
|
|
360
|
+
protocolVersion: z.ZodLiteral<10>;
|
|
361
361
|
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
362
362
|
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
363
363
|
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
@@ -395,7 +395,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
|
|
|
395
395
|
thresholdTokens: z.ZodOptional<z.ZodNumber>;
|
|
396
396
|
}, z.core.$strict>>>;
|
|
397
397
|
}, z.core.$strict>>;
|
|
398
|
-
protocolVersion: z.ZodLiteral<
|
|
398
|
+
protocolVersion: z.ZodLiteral<10>;
|
|
399
399
|
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
400
400
|
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
401
401
|
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
@@ -411,7 +411,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
|
|
|
411
411
|
payload: z.ZodReadonly<z.ZodObject<{
|
|
412
412
|
artifact: z.ZodType<import("../index.js").AgentArtifactDescriptor, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentArtifactDescriptor, unknown>>;
|
|
413
413
|
}, z.core.$strict>>;
|
|
414
|
-
protocolVersion: z.ZodLiteral<
|
|
414
|
+
protocolVersion: z.ZodLiteral<10>;
|
|
415
415
|
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
416
416
|
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
417
417
|
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
@@ -440,7 +440,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
|
|
|
440
440
|
error: z.ZodOptional<z.ZodType<import("../index.js").AgentError, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentError, unknown>>>;
|
|
441
441
|
}, z.core.$strict>>;
|
|
442
442
|
}, z.core.$strict>>;
|
|
443
|
-
protocolVersion: z.ZodLiteral<
|
|
443
|
+
protocolVersion: z.ZodLiteral<10>;
|
|
444
444
|
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
445
445
|
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
446
446
|
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
@@ -509,7 +509,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
|
|
|
509
509
|
resourceIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodType<import("../index.js").AgentGeneratedResourceId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentGeneratedResourceId, unknown>>>>>;
|
|
510
510
|
}, z.core.$strict>>;
|
|
511
511
|
}, z.core.$strict>>;
|
|
512
|
-
protocolVersion: z.ZodLiteral<
|
|
512
|
+
protocolVersion: z.ZodLiteral<10>;
|
|
513
513
|
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
514
514
|
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
515
515
|
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
@@ -563,7 +563,27 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
|
|
|
563
563
|
error: z.ZodOptional<z.ZodType<import("../index.js").AgentError, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentError, unknown>>>;
|
|
564
564
|
}, z.core.$strict>>;
|
|
565
565
|
}, z.core.$strict>>;
|
|
566
|
-
protocolVersion: z.ZodLiteral<
|
|
566
|
+
protocolVersion: z.ZodLiteral<10>;
|
|
567
|
+
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
568
|
+
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
569
|
+
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
570
|
+
historyAnchor: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderHistoryAnchor, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderHistoryAnchor, unknown>>>;
|
|
571
|
+
turnId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderTurnRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderTurnRef, unknown>>>;
|
|
572
|
+
itemId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderItemRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderItemRef, unknown>>>;
|
|
573
|
+
requestId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderRequestRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderRequestRef, unknown>>>;
|
|
574
|
+
}, z.core.$strict>>>;
|
|
575
|
+
occurredAt: z.ZodType<import("../index.js").AgentIsoDateTime, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentIsoDateTime, unknown>>;
|
|
576
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
577
|
+
type: z.ZodLiteral<"runtime.retrying">;
|
|
578
|
+
turnId: z.ZodType<import("../index.js").AgentTurnId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentTurnId, unknown>>;
|
|
579
|
+
payload: z.ZodReadonly<z.ZodObject<{
|
|
580
|
+
owner: z.ZodLiteral<"provider">;
|
|
581
|
+
error: z.ZodType<import("../index.js").AgentError, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentError, unknown>>;
|
|
582
|
+
attempt: z.ZodOptional<z.ZodNumber>;
|
|
583
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
584
|
+
delayMs: z.ZodOptional<z.ZodNumber>;
|
|
585
|
+
}, z.core.$strict>>;
|
|
586
|
+
protocolVersion: z.ZodLiteral<10>;
|
|
567
587
|
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
568
588
|
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
569
589
|
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
@@ -579,14 +599,9 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
|
|
|
579
599
|
payload: z.ZodReadonly<z.ZodObject<{
|
|
580
600
|
code: z.ZodString;
|
|
581
601
|
message: z.ZodString;
|
|
582
|
-
|
|
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>>>;
|
|
602
|
+
context: z.ZodOptional<z.ZodType<import("../index.js").AgentErrorContext, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentErrorContext, unknown>>>;
|
|
588
603
|
}, z.core.$strict>>;
|
|
589
|
-
protocolVersion: z.ZodLiteral<
|
|
604
|
+
protocolVersion: z.ZodLiteral<10>;
|
|
590
605
|
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
591
606
|
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
592
607
|
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
@@ -602,7 +617,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
|
|
|
602
617
|
payload: z.ZodReadonly<z.ZodObject<{
|
|
603
618
|
error: z.ZodType<import("../index.js").AgentError, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentError, unknown>>;
|
|
604
619
|
}, z.core.$strict>>;
|
|
605
|
-
protocolVersion: z.ZodLiteral<
|
|
620
|
+
protocolVersion: z.ZodLiteral<10>;
|
|
606
621
|
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
607
622
|
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
608
623
|
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
@@ -618,13 +633,9 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
|
|
|
618
633
|
payload: z.ZodReadonly<z.ZodObject<{
|
|
619
634
|
code: z.ZodString;
|
|
620
635
|
message: z.ZodString;
|
|
621
|
-
context: z.ZodOptional<z.
|
|
622
|
-
operation: z.ZodOptional<z.ZodString>;
|
|
623
|
-
component: z.ZodOptional<z.ZodString>;
|
|
624
|
-
status: z.ZodOptional<z.ZodString>;
|
|
625
|
-
}, z.core.$strict>>>;
|
|
636
|
+
context: z.ZodOptional<z.ZodType<import("../index.js").AgentErrorContext, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentErrorContext, unknown>>>;
|
|
626
637
|
}, z.core.$strict>>;
|
|
627
|
-
protocolVersion: z.ZodLiteral<
|
|
638
|
+
protocolVersion: z.ZodLiteral<10>;
|
|
628
639
|
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
629
640
|
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
630
641
|
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
package/dist/zod/events.js
CHANGED
|
@@ -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
|
+
};
|
package/dist/zod/foundation.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod/v4';
|
|
2
|
-
import { type AgentArtifactId, type AgentApprovalOptionId, type AgentCollaborationId, type AgentConfigurationRevisionId, type
|
|
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;
|
|
@@ -50,11 +50,5 @@ export declare const AgentProviderRefsPortableSchema: z.ZodReadonly<z.ZodObject<
|
|
|
50
50
|
requestId: z.ZodOptional<z.ZodType<AgentProviderRequestRef, unknown, z.core.$ZodTypeInternals<AgentProviderRequestRef, unknown>>>;
|
|
51
51
|
}, z.core.$strict>>;
|
|
52
52
|
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
53
|
export {};
|
|
60
54
|
//# sourceMappingURL=foundation.d.ts.map
|
package/dist/zod/foundation.js
CHANGED
|
@@ -177,17 +177,6 @@ const AgentProviderRefsSchema = AgentProviderRefsPortableSchema.refine(
|
|
|
177
177
|
(value) => Object.values(value).some((item) => item !== void 0),
|
|
178
178
|
{ message: "At least one provider reference is required." }
|
|
179
179
|
);
|
|
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
180
|
export {
|
|
192
181
|
AgentApprovalOptionIdSchema,
|
|
193
182
|
AgentArtifactIdSchema,
|
|
@@ -199,8 +188,6 @@ export {
|
|
|
199
188
|
AgentConfigurationRevisionIdSchema,
|
|
200
189
|
AgentEffectiveContentIdSchema,
|
|
201
190
|
AgentEnvironmentIdSchema,
|
|
202
|
-
AgentErrorContextSchema,
|
|
203
|
-
AgentErrorSchema,
|
|
204
191
|
AgentExtensionIdSchema,
|
|
205
192
|
AgentGeneratedResourceIdSchema,
|
|
206
193
|
AgentInstanceIdSchema,
|
package/dist/zod/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { AgentApprovalOptionIdSchema, AgentArtifactIdSchema, AgentCollaborationIdSchema, AgentConfigurationRevisionIdSchema,
|
|
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';
|
|
3
4
|
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
5
|
export { AgentApprovalRequestSchema, AgentApprovalResolutionSchema, AgentElicitationRequestSchema, AgentRequestResolutionSchema, AgentRequestSchema, } from './requests.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,
|
|
@@ -152,6 +157,8 @@ export {
|
|
|
152
157
|
AgentErrorSchema,
|
|
153
158
|
AgentEventSchema,
|
|
154
159
|
AgentExtensionIdSchema,
|
|
160
|
+
AgentFailureCategorySchema,
|
|
161
|
+
AgentFailureQuotaReferenceSchema,
|
|
155
162
|
AgentFileChangeDetailsSchema,
|
|
156
163
|
AgentFileChangeSchema,
|
|
157
164
|
AgentGeneratedResourceDescriptorSchema,
|
|
@@ -188,6 +195,7 @@ export {
|
|
|
188
195
|
AgentProviderRefsSchema,
|
|
189
196
|
AgentProviderRequestRefSchema,
|
|
190
197
|
AgentProviderTurnRefSchema,
|
|
198
|
+
AgentRecoveryHintSchema,
|
|
191
199
|
AgentRequestFieldIdSchema,
|
|
192
200
|
AgentRequestIdSchema,
|
|
193
201
|
AgentRequestResolutionSchema,
|
package/dist/zod/operations.d.ts
CHANGED
|
@@ -163,16 +163,16 @@ declare const AgentOperationDescriptorPortableSchema: z.ZodReadonly<z.ZodObject<
|
|
|
163
163
|
}>;
|
|
164
164
|
}, z.core.$strict>>], "fieldKind">>>;
|
|
165
165
|
confirmation: z.ZodEnum<{
|
|
166
|
-
required: "required";
|
|
167
166
|
none: "none";
|
|
167
|
+
required: "required";
|
|
168
168
|
}>;
|
|
169
169
|
idempotency: z.ZodEnum<{
|
|
170
170
|
required: "required";
|
|
171
171
|
not_required: "not_required";
|
|
172
172
|
}>;
|
|
173
173
|
resultKind: z.ZodEnum<{
|
|
174
|
-
resource: "resource";
|
|
175
174
|
none: "none";
|
|
175
|
+
resource: "resource";
|
|
176
176
|
canonical_output: "canonical_output";
|
|
177
177
|
artifact: "artifact";
|
|
178
178
|
}>;
|
|
@@ -277,16 +277,16 @@ export declare const AgentOperationCatalogPortableSchema: z.ZodReadonly<z.ZodObj
|
|
|
277
277
|
}>;
|
|
278
278
|
}, z.core.$strict>>], "fieldKind">>>;
|
|
279
279
|
confirmation: z.ZodEnum<{
|
|
280
|
-
required: "required";
|
|
281
280
|
none: "none";
|
|
281
|
+
required: "required";
|
|
282
282
|
}>;
|
|
283
283
|
idempotency: z.ZodEnum<{
|
|
284
284
|
required: "required";
|
|
285
285
|
not_required: "not_required";
|
|
286
286
|
}>;
|
|
287
287
|
resultKind: z.ZodEnum<{
|
|
288
|
-
resource: "resource";
|
|
289
288
|
none: "none";
|
|
289
|
+
resource: "resource";
|
|
290
290
|
canonical_output: "canonical_output";
|
|
291
291
|
artifact: "artifact";
|
|
292
292
|
}>;
|
package/dist/zod/operations.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod/v4";
|
|
2
|
+
import { AgentErrorSchema } from "./failures.js";
|
|
2
3
|
import { compareStringsByUnicodeCodePoint } from "../foundation/ordering.js";
|
|
3
4
|
import {
|
|
4
5
|
AGENT_OPERATION_CATALOG_MAX_LENGTH,
|
|
@@ -19,7 +20,6 @@ import {
|
|
|
19
20
|
import {
|
|
20
21
|
AgentArtifactIdSchema,
|
|
21
22
|
AgentCanonicalIdValueSchema,
|
|
22
|
-
AgentErrorSchema,
|
|
23
23
|
AgentGeneratedResourceIdSchema,
|
|
24
24
|
AgentOperationIdSchema,
|
|
25
25
|
AgentOperationInvocationIdSchema,
|
package/dist/zod/resources.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod/v4";
|
|
2
|
+
import { AgentErrorSchema } from "./failures.js";
|
|
2
3
|
import { AGENT_ARTIFACT_BYTE_SIZE_MAX } from "../artifacts/types.js";
|
|
3
4
|
import {
|
|
4
5
|
AGENT_GENERATED_RESOURCE_DISPLAY_NAME_MAX_LENGTH,
|
|
@@ -9,7 +10,6 @@ import {
|
|
|
9
10
|
import {
|
|
10
11
|
AgentArtifactIdSchema,
|
|
11
12
|
AgentCollaborationIdSchema,
|
|
12
|
-
AgentErrorSchema,
|
|
13
13
|
AgentGeneratedResourceIdSchema,
|
|
14
14
|
AgentIsoDateTimeSchema,
|
|
15
15
|
AgentOperationInvocationIdSchema,
|