@agen-ai/agent-protocol 0.1.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/LICENSE +21 -0
- package/README.md +101 -0
- package/dist/artifacts/index.d.ts +3 -0
- package/dist/artifacts/index.js +2 -0
- package/dist/artifacts/parsers.d.ts +5 -0
- package/dist/artifacts/parsers.js +12 -0
- package/dist/artifacts/types.d.ts +19 -0
- package/dist/artifacts/types.js +16 -0
- package/dist/capabilities/index.d.ts +3 -0
- package/dist/capabilities/index.js +2 -0
- package/dist/capabilities/parsers.d.ts +6 -0
- package/dist/capabilities/parsers.js +18 -0
- package/dist/capabilities/types.d.ts +96 -0
- package/dist/capabilities/types.js +20 -0
- package/dist/events/index.d.ts +3 -0
- package/dist/events/index.js +2 -0
- package/dist/events/parsers.d.ts +6 -0
- package/dist/events/parsers.js +16 -0
- package/dist/events/types.d.ts +78 -0
- package/dist/events/types.js +21 -0
- package/dist/foundation/index.d.ts +4 -0
- package/dist/foundation/index.js +3 -0
- package/dist/foundation/ordering.d.ts +2 -0
- package/dist/foundation/ordering.js +15 -0
- package/dist/foundation/parsers.d.ts +39 -0
- package/dist/foundation/parsers.js +148 -0
- package/dist/foundation/types.d.ts +62 -0
- package/dist/foundation/types.js +39 -0
- package/dist/foundation/validation.d.ts +16 -0
- package/dist/foundation/validation.js +11 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/internal/parsers.d.ts +5 -0
- package/dist/internal/parsers.js +21 -0
- package/dist/jsonSchema/generated.d.ts +6667 -0
- package/dist/jsonSchema/generated.js +4150 -0
- package/dist/jsonSchema/index.d.ts +2 -0
- package/dist/jsonSchema/index.js +1 -0
- package/dist/public/artifacts.d.ts +2 -0
- package/dist/public/artifacts.js +1 -0
- package/dist/public/capabilities.d.ts +2 -0
- package/dist/public/capabilities.js +1 -0
- package/dist/public/events.d.ts +2 -0
- package/dist/public/events.js +1 -0
- package/dist/public/index.d.ts +8 -0
- package/dist/public/index.js +7 -0
- package/dist/public/requests.d.ts +2 -0
- package/dist/public/requests.js +1 -0
- package/dist/public/sessions.d.ts +2 -0
- package/dist/public/sessions.js +1 -0
- package/dist/public/turns.d.ts +2 -0
- package/dist/public/turns.js +1 -0
- package/dist/requests/index.d.ts +3 -0
- package/dist/requests/index.js +2 -0
- package/dist/requests/parsers.d.ts +9 -0
- package/dist/requests/parsers.js +134 -0
- package/dist/requests/types.d.ts +89 -0
- package/dist/requests/types.js +0 -0
- package/dist/sessions/index.d.ts +3 -0
- package/dist/sessions/index.js +2 -0
- package/dist/sessions/parsers.d.ts +10 -0
- package/dist/sessions/parsers.js +38 -0
- package/dist/sessions/types.d.ts +37 -0
- package/dist/sessions/types.js +0 -0
- package/dist/turns/index.d.ts +3 -0
- package/dist/turns/index.js +2 -0
- package/dist/turns/parsers.d.ts +11 -0
- package/dist/turns/parsers.js +41 -0
- package/dist/turns/types.d.ts +207 -0
- package/dist/turns/types.js +62 -0
- package/dist/zod/artifacts.d.ts +4 -0
- package/dist/zod/artifacts.js +28 -0
- package/dist/zod/capabilities.d.ts +180 -0
- package/dist/zod/capabilities.js +222 -0
- package/dist/zod/events.d.ts +357 -0
- package/dist/zod/events.js +190 -0
- package/dist/zod/foundation.d.ts +45 -0
- package/dist/zod/foundation.js +205 -0
- package/dist/zod/index.d.ts +9 -0
- package/dist/zod/index.js +118 -0
- package/dist/zod/requests.d.ts +123 -0
- package/dist/zod/requests.js +174 -0
- package/dist/zod/sessions.d.ts +65 -0
- package/dist/zod/sessions.js +124 -0
- package/dist/zod/turns.d.ts +219 -0
- package/dist/zod/turns.js +400 -0
- package/dist/zod/typeEquality.generated.d.ts +51 -0
- package/dist/zod/typeEquality.generated.js +0 -0
- package/package.json +95 -0
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { z } from "zod/v4";
|
|
2
|
+
import {
|
|
3
|
+
AGENT_PROTOCOL_COLLECTION_MAX_LENGTH,
|
|
4
|
+
AGENT_PROTOCOL_VERSION
|
|
5
|
+
} from "../foundation/types.js";
|
|
6
|
+
import { AGENT_ARTIFACT_KINDS } from "../artifacts/types.js";
|
|
7
|
+
import {
|
|
8
|
+
AGENT_AUTHENTICATION_FLOWS,
|
|
9
|
+
AGENT_FILE_CHANGE_MODES
|
|
10
|
+
} from "../capabilities/types.js";
|
|
11
|
+
import {
|
|
12
|
+
AGENT_IMAGE_INPUT_MEDIA_TYPES,
|
|
13
|
+
AGENT_IMAGE_INPUT_SOURCE_KINDS,
|
|
14
|
+
AGENT_TURN_INTERACTION_MODES
|
|
15
|
+
} from "../turns/types.js";
|
|
16
|
+
import { AgentProviderKeySchema } from "./foundation.js";
|
|
17
|
+
const AgentCapabilityIdentifierSchema = z.string().min(1).max(100).regex(/^[a-z][a-z0-9._:-]*$/u);
|
|
18
|
+
function addCanonicalListIssues(input, context) {
|
|
19
|
+
const seen = /* @__PURE__ */ new Set();
|
|
20
|
+
let previousOrder = -1;
|
|
21
|
+
input.values.forEach((value, index) => {
|
|
22
|
+
if (seen.has(value)) {
|
|
23
|
+
context.addIssue({
|
|
24
|
+
code: "custom",
|
|
25
|
+
path: [...input.path, index],
|
|
26
|
+
message: `${input.label} must be unique.`
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
seen.add(value);
|
|
30
|
+
const order = input.canonicalOrder ? input.canonicalOrder.indexOf(value) : index === 0 || input.values[index - 1] < value ? index : previousOrder;
|
|
31
|
+
if (index > 0 && order <= previousOrder) {
|
|
32
|
+
context.addIssue({
|
|
33
|
+
code: "custom",
|
|
34
|
+
path: [...input.path, index],
|
|
35
|
+
message: `${input.label} must use canonical order.`
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
previousOrder = order;
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
const PositiveSafeIntegerSchema = z.number().int().positive().max(Number.MAX_SAFE_INTEGER);
|
|
42
|
+
const AgentImageInputCapabilitySchema = z.discriminatedUnion("kind", [
|
|
43
|
+
z.object({ kind: z.literal("unsupported") }).strict().readonly(),
|
|
44
|
+
z.object({
|
|
45
|
+
kind: z.literal("supported"),
|
|
46
|
+
sourceKinds: z.array(z.enum(AGENT_IMAGE_INPUT_SOURCE_KINDS)).min(1).max(AGENT_IMAGE_INPUT_SOURCE_KINDS.length).meta({ uniqueItems: true }).readonly(),
|
|
47
|
+
mediaTypes: z.array(z.enum(AGENT_IMAGE_INPUT_MEDIA_TYPES)).min(1).max(AGENT_IMAGE_INPUT_MEDIA_TYPES.length).meta({ uniqueItems: true }).readonly(),
|
|
48
|
+
maxImages: PositiveSafeIntegerSchema,
|
|
49
|
+
maxBytesPerImage: PositiveSafeIntegerSchema,
|
|
50
|
+
maxTotalBytes: PositiveSafeIntegerSchema,
|
|
51
|
+
maxWidthPixels: PositiveSafeIntegerSchema,
|
|
52
|
+
maxHeightPixels: PositiveSafeIntegerSchema,
|
|
53
|
+
maxPixelsPerImage: PositiveSafeIntegerSchema,
|
|
54
|
+
supportsImageOnly: z.boolean()
|
|
55
|
+
}).strict().superRefine((capability, context) => {
|
|
56
|
+
addCanonicalListIssues(
|
|
57
|
+
{
|
|
58
|
+
values: capability.sourceKinds,
|
|
59
|
+
canonicalOrder: AGENT_IMAGE_INPUT_SOURCE_KINDS,
|
|
60
|
+
path: ["sourceKinds"],
|
|
61
|
+
label: "Image input source kinds"
|
|
62
|
+
},
|
|
63
|
+
context
|
|
64
|
+
);
|
|
65
|
+
addCanonicalListIssues(
|
|
66
|
+
{
|
|
67
|
+
values: capability.mediaTypes,
|
|
68
|
+
canonicalOrder: AGENT_IMAGE_INPUT_MEDIA_TYPES,
|
|
69
|
+
path: ["mediaTypes"],
|
|
70
|
+
label: "Image input media types"
|
|
71
|
+
},
|
|
72
|
+
context
|
|
73
|
+
);
|
|
74
|
+
if (capability.maxTotalBytes < capability.maxBytesPerImage) {
|
|
75
|
+
context.addIssue({
|
|
76
|
+
code: "custom",
|
|
77
|
+
path: ["maxTotalBytes"],
|
|
78
|
+
message: "Image input aggregate bytes must admit one maximum-size image."
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
if (capability.maxTotalBytes > capability.maxBytesPerImage * capability.maxImages) {
|
|
82
|
+
context.addIssue({
|
|
83
|
+
code: "custom",
|
|
84
|
+
path: ["maxTotalBytes"],
|
|
85
|
+
message: "Image input aggregate bytes cannot exceed the count and per-image maximum."
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
if (capability.maxPixelsPerImage > capability.maxWidthPixels * capability.maxHeightPixels) {
|
|
89
|
+
context.addIssue({
|
|
90
|
+
code: "custom",
|
|
91
|
+
path: ["maxPixelsPerImage"],
|
|
92
|
+
message: "Image input pixel maximum cannot exceed the dimension maximums."
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}).readonly()
|
|
96
|
+
]);
|
|
97
|
+
const AgentOperationInputCapabilitySchema = z.object({
|
|
98
|
+
text: z.literal(true),
|
|
99
|
+
images: AgentImageInputCapabilitySchema
|
|
100
|
+
}).strict().readonly();
|
|
101
|
+
const AgentCapabilitiesPortableSchema = z.object({
|
|
102
|
+
protocolVersion: z.literal(AGENT_PROTOCOL_VERSION),
|
|
103
|
+
providerKey: AgentProviderKeySchema,
|
|
104
|
+
sessions: z.object({
|
|
105
|
+
create: z.literal(true),
|
|
106
|
+
resume: z.boolean(),
|
|
107
|
+
branch: z.discriminatedUnion("kind", [
|
|
108
|
+
z.object({ kind: z.literal("unsupported") }).strict().readonly(),
|
|
109
|
+
z.object({ kind: z.literal("through_turn") }).strict().readonly()
|
|
110
|
+
])
|
|
111
|
+
}).strict().readonly(),
|
|
112
|
+
turns: z.object({
|
|
113
|
+
interactionModes: z.array(z.enum(AGENT_TURN_INTERACTION_MODES)).min(1).max(AGENT_TURN_INTERACTION_MODES.length).meta({ uniqueItems: true }).readonly(),
|
|
114
|
+
interrupt: z.boolean(),
|
|
115
|
+
steer: z.discriminatedUnion("kind", [
|
|
116
|
+
z.object({ kind: z.literal("unsupported") }).strict().readonly(),
|
|
117
|
+
z.object({
|
|
118
|
+
kind: z.literal("supported"),
|
|
119
|
+
input: AgentOperationInputCapabilitySchema
|
|
120
|
+
}).strict().readonly()
|
|
121
|
+
])
|
|
122
|
+
}).strict().readonly(),
|
|
123
|
+
requests: z.object({
|
|
124
|
+
approval: z.boolean(),
|
|
125
|
+
elicitation: z.discriminatedUnion("kind", [
|
|
126
|
+
z.object({ kind: z.literal("unsupported") }).strict().readonly(),
|
|
127
|
+
z.object({ kind: z.literal("text") }).strict().readonly(),
|
|
128
|
+
z.object({ kind: z.literal("structured") }).strict().readonly()
|
|
129
|
+
])
|
|
130
|
+
}).strict().readonly(),
|
|
131
|
+
input: AgentOperationInputCapabilitySchema,
|
|
132
|
+
output: z.object({
|
|
133
|
+
streaming: z.boolean(),
|
|
134
|
+
plans: z.boolean(),
|
|
135
|
+
fileChanges: z.enum(AGENT_FILE_CHANGE_MODES),
|
|
136
|
+
artifactKinds: z.array(z.enum(AGENT_ARTIFACT_KINDS)).max(AGENT_ARTIFACT_KINDS.length).meta({ uniqueItems: true }).readonly()
|
|
137
|
+
}).strict().readonly(),
|
|
138
|
+
configuration: z.discriminatedUnion("kind", [
|
|
139
|
+
z.object({ kind: z.literal("managed") }).strict().readonly(),
|
|
140
|
+
z.object({
|
|
141
|
+
kind: z.literal("selectable"),
|
|
142
|
+
fields: z.array(
|
|
143
|
+
z.object({
|
|
144
|
+
key: AgentCapabilityIdentifierSchema,
|
|
145
|
+
optionIds: z.array(AgentCapabilityIdentifierSchema).min(1).max(AGENT_PROTOCOL_COLLECTION_MAX_LENGTH).meta({ uniqueItems: true }).readonly()
|
|
146
|
+
}).strict().readonly()
|
|
147
|
+
).min(1).max(AGENT_PROTOCOL_COLLECTION_MAX_LENGTH).readonly()
|
|
148
|
+
}).strict().readonly()
|
|
149
|
+
]),
|
|
150
|
+
interactionExtensions: z.object({
|
|
151
|
+
slashCommands: z.boolean(),
|
|
152
|
+
mcp: z.boolean(),
|
|
153
|
+
subagents: z.boolean(),
|
|
154
|
+
imageGeneration: z.boolean()
|
|
155
|
+
}).strict().readonly(),
|
|
156
|
+
authentication: z.discriminatedUnion("kind", [
|
|
157
|
+
z.object({ kind: z.literal("unsupported") }).strict().readonly(),
|
|
158
|
+
z.object({
|
|
159
|
+
kind: z.literal("supported"),
|
|
160
|
+
flows: z.array(z.enum(AGENT_AUTHENTICATION_FLOWS)).min(1).max(AGENT_AUTHENTICATION_FLOWS.length).meta({ uniqueItems: true }).readonly()
|
|
161
|
+
}).strict().readonly()
|
|
162
|
+
]),
|
|
163
|
+
versionReporting: z.boolean()
|
|
164
|
+
}).strict().readonly();
|
|
165
|
+
const AgentCapabilitiesSchema = AgentCapabilitiesPortableSchema.superRefine((capabilities, context) => {
|
|
166
|
+
addCanonicalListIssues(
|
|
167
|
+
{
|
|
168
|
+
values: capabilities.turns.interactionModes,
|
|
169
|
+
canonicalOrder: AGENT_TURN_INTERACTION_MODES,
|
|
170
|
+
path: ["turns", "interactionModes"],
|
|
171
|
+
label: "Turn interaction modes"
|
|
172
|
+
},
|
|
173
|
+
context
|
|
174
|
+
);
|
|
175
|
+
addCanonicalListIssues(
|
|
176
|
+
{
|
|
177
|
+
values: capabilities.output.artifactKinds,
|
|
178
|
+
canonicalOrder: AGENT_ARTIFACT_KINDS,
|
|
179
|
+
path: ["output", "artifactKinds"],
|
|
180
|
+
label: "Artifact kinds"
|
|
181
|
+
},
|
|
182
|
+
context
|
|
183
|
+
);
|
|
184
|
+
if (capabilities.configuration.kind === "selectable") {
|
|
185
|
+
const keys = capabilities.configuration.fields.map((field) => field.key);
|
|
186
|
+
addCanonicalListIssues(
|
|
187
|
+
{
|
|
188
|
+
values: keys,
|
|
189
|
+
path: ["configuration", "fields"],
|
|
190
|
+
label: "Selectable configuration fields"
|
|
191
|
+
},
|
|
192
|
+
context
|
|
193
|
+
);
|
|
194
|
+
capabilities.configuration.fields.forEach((field, index) => {
|
|
195
|
+
addCanonicalListIssues(
|
|
196
|
+
{
|
|
197
|
+
values: field.optionIds,
|
|
198
|
+
path: ["configuration", "fields", index, "optionIds"],
|
|
199
|
+
label: "Selectable configuration option IDs"
|
|
200
|
+
},
|
|
201
|
+
context
|
|
202
|
+
);
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
if (capabilities.authentication.kind === "supported") {
|
|
206
|
+
addCanonicalListIssues(
|
|
207
|
+
{
|
|
208
|
+
values: capabilities.authentication.flows,
|
|
209
|
+
canonicalOrder: AGENT_AUTHENTICATION_FLOWS,
|
|
210
|
+
path: ["authentication", "flows"],
|
|
211
|
+
label: "Authentication flows"
|
|
212
|
+
},
|
|
213
|
+
context
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
export {
|
|
218
|
+
AgentCapabilitiesPortableSchema,
|
|
219
|
+
AgentCapabilitiesSchema,
|
|
220
|
+
AgentImageInputCapabilitySchema,
|
|
221
|
+
AgentOperationInputCapabilitySchema
|
|
222
|
+
};
|
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
import type { AgentEvent } from '../events/types.js';
|
|
3
|
+
export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
|
|
4
|
+
type: z.ZodLiteral<"turn.started">;
|
|
5
|
+
turnId: z.ZodType<import("../index.js").AgentTurnId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentTurnId, unknown>>;
|
|
6
|
+
payload: z.ZodReadonly<z.ZodObject<{
|
|
7
|
+
message: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, z.core.$strict>>;
|
|
9
|
+
protocolVersion: z.ZodLiteral<6>;
|
|
10
|
+
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
11
|
+
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
12
|
+
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
13
|
+
historyAnchor: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderHistoryAnchor, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderHistoryAnchor, unknown>>>;
|
|
14
|
+
turnId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderTurnRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderTurnRef, unknown>>>;
|
|
15
|
+
itemId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderItemRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderItemRef, unknown>>>;
|
|
16
|
+
requestId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderRequestRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderRequestRef, unknown>>>;
|
|
17
|
+
}, z.core.$strict>>>;
|
|
18
|
+
occurredAt: z.ZodType<import("../index.js").AgentIsoDateTime, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentIsoDateTime, unknown>>;
|
|
19
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
20
|
+
type: z.ZodLiteral<"turn.state_changed">;
|
|
21
|
+
turnId: z.ZodType<import("../index.js").AgentTurnId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentTurnId, unknown>>;
|
|
22
|
+
payload: z.ZodReadonly<z.ZodObject<{
|
|
23
|
+
state: z.ZodEnum<{
|
|
24
|
+
running: "running";
|
|
25
|
+
waiting_for_request: "waiting_for_request";
|
|
26
|
+
}>;
|
|
27
|
+
requestId: z.ZodOptional<z.ZodType<import("../index.js").AgentRequestId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentRequestId, unknown>>>;
|
|
28
|
+
message: z.ZodOptional<z.ZodString>;
|
|
29
|
+
}, z.core.$strict>>;
|
|
30
|
+
protocolVersion: z.ZodLiteral<6>;
|
|
31
|
+
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
32
|
+
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
33
|
+
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
34
|
+
historyAnchor: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderHistoryAnchor, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderHistoryAnchor, unknown>>>;
|
|
35
|
+
turnId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderTurnRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderTurnRef, unknown>>>;
|
|
36
|
+
itemId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderItemRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderItemRef, unknown>>>;
|
|
37
|
+
requestId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderRequestRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderRequestRef, unknown>>>;
|
|
38
|
+
}, z.core.$strict>>>;
|
|
39
|
+
occurredAt: z.ZodType<import("../index.js").AgentIsoDateTime, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentIsoDateTime, unknown>>;
|
|
40
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
41
|
+
type: z.ZodLiteral<"turn.completed">;
|
|
42
|
+
turnId: z.ZodType<import("../index.js").AgentTurnId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentTurnId, unknown>>;
|
|
43
|
+
payload: z.ZodReadonly<z.ZodObject<{
|
|
44
|
+
outcome: z.ZodEnum<{
|
|
45
|
+
completed: "completed";
|
|
46
|
+
failed: "failed";
|
|
47
|
+
canceled: "canceled";
|
|
48
|
+
expired: "expired";
|
|
49
|
+
}>;
|
|
50
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
51
|
+
error: z.ZodOptional<z.ZodType<import("../index.js").AgentError, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentError, unknown>>>;
|
|
52
|
+
}, z.core.$strict>>;
|
|
53
|
+
protocolVersion: z.ZodLiteral<6>;
|
|
54
|
+
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
55
|
+
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
56
|
+
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
57
|
+
historyAnchor: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderHistoryAnchor, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderHistoryAnchor, unknown>>>;
|
|
58
|
+
turnId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderTurnRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderTurnRef, unknown>>>;
|
|
59
|
+
itemId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderItemRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderItemRef, unknown>>>;
|
|
60
|
+
requestId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderRequestRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderRequestRef, unknown>>>;
|
|
61
|
+
}, z.core.$strict>>>;
|
|
62
|
+
occurredAt: z.ZodType<import("../index.js").AgentIsoDateTime, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentIsoDateTime, unknown>>;
|
|
63
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
64
|
+
type: z.ZodLiteral<"item.started">;
|
|
65
|
+
turnId: z.ZodType<import("../index.js").AgentTurnId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentTurnId, unknown>>;
|
|
66
|
+
payload: z.ZodType<import("../index.js").AgentItemSnapshot, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentItemSnapshot, unknown>>;
|
|
67
|
+
protocolVersion: z.ZodLiteral<6>;
|
|
68
|
+
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
69
|
+
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
70
|
+
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
71
|
+
historyAnchor: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderHistoryAnchor, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderHistoryAnchor, unknown>>>;
|
|
72
|
+
turnId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderTurnRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderTurnRef, unknown>>>;
|
|
73
|
+
itemId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderItemRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderItemRef, unknown>>>;
|
|
74
|
+
requestId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderRequestRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderRequestRef, unknown>>>;
|
|
75
|
+
}, z.core.$strict>>>;
|
|
76
|
+
occurredAt: z.ZodType<import("../index.js").AgentIsoDateTime, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentIsoDateTime, unknown>>;
|
|
77
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
78
|
+
type: z.ZodLiteral<"item.updated">;
|
|
79
|
+
turnId: z.ZodType<import("../index.js").AgentTurnId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentTurnId, unknown>>;
|
|
80
|
+
payload: z.ZodType<import("../index.js").AgentItemSnapshot, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentItemSnapshot, unknown>>;
|
|
81
|
+
protocolVersion: z.ZodLiteral<6>;
|
|
82
|
+
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
83
|
+
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
84
|
+
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
85
|
+
historyAnchor: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderHistoryAnchor, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderHistoryAnchor, unknown>>>;
|
|
86
|
+
turnId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderTurnRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderTurnRef, unknown>>>;
|
|
87
|
+
itemId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderItemRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderItemRef, unknown>>>;
|
|
88
|
+
requestId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderRequestRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderRequestRef, unknown>>>;
|
|
89
|
+
}, z.core.$strict>>>;
|
|
90
|
+
occurredAt: z.ZodType<import("../index.js").AgentIsoDateTime, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentIsoDateTime, unknown>>;
|
|
91
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
92
|
+
type: z.ZodLiteral<"item.completed">;
|
|
93
|
+
turnId: z.ZodType<import("../index.js").AgentTurnId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentTurnId, unknown>>;
|
|
94
|
+
payload: z.ZodType<import("../index.js").AgentItemSnapshot, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentItemSnapshot, unknown>>;
|
|
95
|
+
protocolVersion: z.ZodLiteral<6>;
|
|
96
|
+
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
97
|
+
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
98
|
+
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
99
|
+
historyAnchor: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderHistoryAnchor, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderHistoryAnchor, unknown>>>;
|
|
100
|
+
turnId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderTurnRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderTurnRef, unknown>>>;
|
|
101
|
+
itemId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderItemRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderItemRef, unknown>>>;
|
|
102
|
+
requestId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderRequestRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderRequestRef, unknown>>>;
|
|
103
|
+
}, z.core.$strict>>>;
|
|
104
|
+
occurredAt: z.ZodType<import("../index.js").AgentIsoDateTime, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentIsoDateTime, unknown>>;
|
|
105
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
106
|
+
type: z.ZodLiteral<"content.delta">;
|
|
107
|
+
turnId: z.ZodType<import("../index.js").AgentTurnId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentTurnId, unknown>>;
|
|
108
|
+
payload: z.ZodReadonly<z.ZodObject<{
|
|
109
|
+
itemId: z.ZodType<import("../index.js").AgentItemId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentItemId, unknown>>;
|
|
110
|
+
streamKind: z.ZodEnum<{
|
|
111
|
+
unknown: "unknown";
|
|
112
|
+
assistant_text: "assistant_text";
|
|
113
|
+
reasoning_text: "reasoning_text";
|
|
114
|
+
reasoning_summary: "reasoning_summary";
|
|
115
|
+
plan_text: "plan_text";
|
|
116
|
+
command_output: "command_output";
|
|
117
|
+
file_change_output: "file_change_output";
|
|
118
|
+
}>;
|
|
119
|
+
delta: z.ZodString;
|
|
120
|
+
}, z.core.$strict>>;
|
|
121
|
+
protocolVersion: z.ZodLiteral<6>;
|
|
122
|
+
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
123
|
+
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
124
|
+
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
125
|
+
historyAnchor: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderHistoryAnchor, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderHistoryAnchor, unknown>>>;
|
|
126
|
+
turnId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderTurnRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderTurnRef, unknown>>>;
|
|
127
|
+
itemId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderItemRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderItemRef, unknown>>>;
|
|
128
|
+
requestId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderRequestRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderRequestRef, unknown>>>;
|
|
129
|
+
}, z.core.$strict>>>;
|
|
130
|
+
occurredAt: z.ZodType<import("../index.js").AgentIsoDateTime, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentIsoDateTime, unknown>>;
|
|
131
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
132
|
+
type: z.ZodLiteral<"turn.plan.updated">;
|
|
133
|
+
turnId: z.ZodType<import("../index.js").AgentTurnId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentTurnId, unknown>>;
|
|
134
|
+
payload: z.ZodReadonly<z.ZodObject<{
|
|
135
|
+
explanation: z.ZodOptional<z.ZodString>;
|
|
136
|
+
steps: z.ZodReadonly<z.ZodArray<z.ZodType<import("../index.js").AgentPlanStep, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentPlanStep, unknown>>>>;
|
|
137
|
+
}, z.core.$strict>>;
|
|
138
|
+
protocolVersion: z.ZodLiteral<6>;
|
|
139
|
+
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
140
|
+
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
141
|
+
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
142
|
+
historyAnchor: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderHistoryAnchor, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderHistoryAnchor, unknown>>>;
|
|
143
|
+
turnId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderTurnRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderTurnRef, unknown>>>;
|
|
144
|
+
itemId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderItemRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderItemRef, unknown>>>;
|
|
145
|
+
requestId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderRequestRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderRequestRef, unknown>>>;
|
|
146
|
+
}, z.core.$strict>>>;
|
|
147
|
+
occurredAt: z.ZodType<import("../index.js").AgentIsoDateTime, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentIsoDateTime, unknown>>;
|
|
148
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
149
|
+
type: z.ZodLiteral<"turn.plan.proposed">;
|
|
150
|
+
turnId: z.ZodType<import("../index.js").AgentTurnId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentTurnId, unknown>>;
|
|
151
|
+
payload: z.ZodReadonly<z.ZodObject<{
|
|
152
|
+
artifactId: z.ZodType<import("../index.js").AgentArtifactId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentArtifactId, unknown>>;
|
|
153
|
+
requestId: z.ZodType<import("../index.js").AgentRequestId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentRequestId, unknown>>;
|
|
154
|
+
}, z.core.$strict>>;
|
|
155
|
+
protocolVersion: z.ZodLiteral<6>;
|
|
156
|
+
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
157
|
+
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
158
|
+
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
159
|
+
historyAnchor: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderHistoryAnchor, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderHistoryAnchor, unknown>>>;
|
|
160
|
+
turnId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderTurnRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderTurnRef, unknown>>>;
|
|
161
|
+
itemId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderItemRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderItemRef, unknown>>>;
|
|
162
|
+
requestId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderRequestRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderRequestRef, unknown>>>;
|
|
163
|
+
}, z.core.$strict>>>;
|
|
164
|
+
occurredAt: z.ZodType<import("../index.js").AgentIsoDateTime, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentIsoDateTime, unknown>>;
|
|
165
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
166
|
+
type: z.ZodLiteral<"turn.diff.updated">;
|
|
167
|
+
turnId: z.ZodType<import("../index.js").AgentTurnId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentTurnId, unknown>>;
|
|
168
|
+
payload: z.ZodType<import("../index.js").AgentDiffSummary, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentDiffSummary, unknown>>;
|
|
169
|
+
protocolVersion: z.ZodLiteral<6>;
|
|
170
|
+
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
171
|
+
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
172
|
+
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
173
|
+
historyAnchor: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderHistoryAnchor, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderHistoryAnchor, unknown>>>;
|
|
174
|
+
turnId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderTurnRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderTurnRef, unknown>>>;
|
|
175
|
+
itemId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderItemRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderItemRef, unknown>>>;
|
|
176
|
+
requestId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderRequestRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderRequestRef, unknown>>>;
|
|
177
|
+
}, z.core.$strict>>>;
|
|
178
|
+
occurredAt: z.ZodType<import("../index.js").AgentIsoDateTime, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentIsoDateTime, unknown>>;
|
|
179
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
180
|
+
type: z.ZodLiteral<"request.opened">;
|
|
181
|
+
turnId: z.ZodType<import("../index.js").AgentTurnId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentTurnId, unknown>>;
|
|
182
|
+
payload: z.ZodReadonly<z.ZodObject<{
|
|
183
|
+
request: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
|
|
184
|
+
requestKind: z.ZodLiteral<"approval">;
|
|
185
|
+
requestId: z.ZodType<import("../index.js").AgentRequestId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentRequestId, unknown>>;
|
|
186
|
+
prompt: z.ZodString;
|
|
187
|
+
subject: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
|
|
188
|
+
kind: z.ZodLiteral<"plan">;
|
|
189
|
+
title: z.ZodString;
|
|
190
|
+
description: z.ZodOptional<z.ZodString>;
|
|
191
|
+
artifactId: z.ZodType<import("../index.js").AgentArtifactId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentArtifactId, unknown>>;
|
|
192
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
193
|
+
kind: z.ZodEnum<{
|
|
194
|
+
other: "other";
|
|
195
|
+
file_change: "file_change";
|
|
196
|
+
command: "command";
|
|
197
|
+
tool: "tool";
|
|
198
|
+
}>;
|
|
199
|
+
title: z.ZodString;
|
|
200
|
+
description: z.ZodOptional<z.ZodString>;
|
|
201
|
+
}, z.core.$strict>>], "kind">;
|
|
202
|
+
expiresAt: z.ZodOptional<z.ZodType<import("../index.js").AgentIsoDateTime, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentIsoDateTime, unknown>>>;
|
|
203
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
204
|
+
requestKind: z.ZodLiteral<"elicitation">;
|
|
205
|
+
requestId: z.ZodType<import("../index.js").AgentRequestId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentRequestId, unknown>>;
|
|
206
|
+
prompt: z.ZodString;
|
|
207
|
+
fields: z.ZodReadonly<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
|
|
208
|
+
fieldId: z.ZodType<import("../index.js").AgentRequestFieldId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentRequestFieldId, unknown>>;
|
|
209
|
+
label: z.ZodString;
|
|
210
|
+
description: z.ZodOptional<z.ZodString>;
|
|
211
|
+
required: z.ZodBoolean;
|
|
212
|
+
kind: z.ZodLiteral<"text">;
|
|
213
|
+
multiline: z.ZodOptional<z.ZodBoolean>;
|
|
214
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
215
|
+
fieldId: z.ZodType<import("../index.js").AgentRequestFieldId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentRequestFieldId, unknown>>;
|
|
216
|
+
label: z.ZodString;
|
|
217
|
+
description: z.ZodOptional<z.ZodString>;
|
|
218
|
+
required: z.ZodBoolean;
|
|
219
|
+
kind: z.ZodLiteral<"choice">;
|
|
220
|
+
options: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
221
|
+
value: z.ZodIntersection<z.ZodString, z.ZodString>;
|
|
222
|
+
label: z.ZodString;
|
|
223
|
+
description: z.ZodOptional<z.ZodString>;
|
|
224
|
+
}, z.core.$strict>>>>;
|
|
225
|
+
multiple: z.ZodBoolean;
|
|
226
|
+
allowOther: z.ZodBoolean;
|
|
227
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
228
|
+
fieldId: z.ZodType<import("../index.js").AgentRequestFieldId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentRequestFieldId, unknown>>;
|
|
229
|
+
label: z.ZodString;
|
|
230
|
+
description: z.ZodOptional<z.ZodString>;
|
|
231
|
+
required: z.ZodBoolean;
|
|
232
|
+
kind: z.ZodLiteral<"boolean">;
|
|
233
|
+
}, z.core.$strict>>], "kind">>>;
|
|
234
|
+
expiresAt: z.ZodOptional<z.ZodType<import("../index.js").AgentIsoDateTime, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentIsoDateTime, unknown>>>;
|
|
235
|
+
}, z.core.$strict>>], "requestKind">;
|
|
236
|
+
}, z.core.$strict>>;
|
|
237
|
+
protocolVersion: z.ZodLiteral<6>;
|
|
238
|
+
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
239
|
+
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
240
|
+
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
241
|
+
historyAnchor: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderHistoryAnchor, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderHistoryAnchor, unknown>>>;
|
|
242
|
+
turnId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderTurnRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderTurnRef, unknown>>>;
|
|
243
|
+
itemId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderItemRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderItemRef, unknown>>>;
|
|
244
|
+
requestId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderRequestRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderRequestRef, unknown>>>;
|
|
245
|
+
}, z.core.$strict>>>;
|
|
246
|
+
occurredAt: z.ZodType<import("../index.js").AgentIsoDateTime, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentIsoDateTime, unknown>>;
|
|
247
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
248
|
+
type: z.ZodLiteral<"progress.updated">;
|
|
249
|
+
turnId: z.ZodType<import("../index.js").AgentTurnId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentTurnId, unknown>>;
|
|
250
|
+
payload: z.ZodReadonly<z.ZodObject<{
|
|
251
|
+
progressId: z.ZodString;
|
|
252
|
+
kind: z.ZodEnum<{
|
|
253
|
+
unknown: "unknown";
|
|
254
|
+
tool: "tool";
|
|
255
|
+
task: "task";
|
|
256
|
+
hook: "hook";
|
|
257
|
+
}>;
|
|
258
|
+
phase: z.ZodEnum<{
|
|
259
|
+
completed: "completed";
|
|
260
|
+
started: "started";
|
|
261
|
+
updated: "updated";
|
|
262
|
+
}>;
|
|
263
|
+
title: z.ZodOptional<z.ZodString>;
|
|
264
|
+
message: z.ZodOptional<z.ZodString>;
|
|
265
|
+
current: z.ZodOptional<z.ZodNumber>;
|
|
266
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
267
|
+
}, z.core.$strict>>;
|
|
268
|
+
protocolVersion: z.ZodLiteral<6>;
|
|
269
|
+
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
270
|
+
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
271
|
+
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
272
|
+
historyAnchor: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderHistoryAnchor, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderHistoryAnchor, unknown>>>;
|
|
273
|
+
turnId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderTurnRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderTurnRef, unknown>>>;
|
|
274
|
+
itemId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderItemRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderItemRef, unknown>>>;
|
|
275
|
+
requestId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderRequestRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderRequestRef, unknown>>>;
|
|
276
|
+
}, z.core.$strict>>>;
|
|
277
|
+
occurredAt: z.ZodType<import("../index.js").AgentIsoDateTime, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentIsoDateTime, unknown>>;
|
|
278
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
279
|
+
type: z.ZodLiteral<"artifact.referenced">;
|
|
280
|
+
turnId: z.ZodOptional<z.ZodType<import("../index.js").AgentTurnId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentTurnId, unknown>>>;
|
|
281
|
+
payload: z.ZodReadonly<z.ZodObject<{
|
|
282
|
+
artifact: z.ZodType<import("../index.js").AgentArtifactDescriptor, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentArtifactDescriptor, unknown>>;
|
|
283
|
+
}, z.core.$strict>>;
|
|
284
|
+
protocolVersion: z.ZodLiteral<6>;
|
|
285
|
+
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
286
|
+
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
287
|
+
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
288
|
+
historyAnchor: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderHistoryAnchor, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderHistoryAnchor, unknown>>>;
|
|
289
|
+
turnId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderTurnRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderTurnRef, unknown>>>;
|
|
290
|
+
itemId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderItemRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderItemRef, unknown>>>;
|
|
291
|
+
requestId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderRequestRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderRequestRef, unknown>>>;
|
|
292
|
+
}, z.core.$strict>>>;
|
|
293
|
+
occurredAt: z.ZodType<import("../index.js").AgentIsoDateTime, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentIsoDateTime, unknown>>;
|
|
294
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
295
|
+
type: z.ZodLiteral<"runtime.warning">;
|
|
296
|
+
turnId: z.ZodOptional<z.ZodType<import("../index.js").AgentTurnId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentTurnId, unknown>>>;
|
|
297
|
+
payload: z.ZodReadonly<z.ZodObject<{
|
|
298
|
+
code: z.ZodString;
|
|
299
|
+
message: z.ZodString;
|
|
300
|
+
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
301
|
+
context: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
302
|
+
operation: z.ZodOptional<z.ZodString>;
|
|
303
|
+
component: z.ZodOptional<z.ZodString>;
|
|
304
|
+
status: z.ZodOptional<z.ZodString>;
|
|
305
|
+
}, z.core.$strict>>>;
|
|
306
|
+
}, z.core.$strict>>;
|
|
307
|
+
protocolVersion: z.ZodLiteral<6>;
|
|
308
|
+
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
309
|
+
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
310
|
+
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
311
|
+
historyAnchor: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderHistoryAnchor, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderHistoryAnchor, unknown>>>;
|
|
312
|
+
turnId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderTurnRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderTurnRef, unknown>>>;
|
|
313
|
+
itemId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderItemRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderItemRef, unknown>>>;
|
|
314
|
+
requestId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderRequestRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderRequestRef, unknown>>>;
|
|
315
|
+
}, z.core.$strict>>>;
|
|
316
|
+
occurredAt: z.ZodType<import("../index.js").AgentIsoDateTime, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentIsoDateTime, unknown>>;
|
|
317
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
318
|
+
type: z.ZodLiteral<"runtime.error">;
|
|
319
|
+
turnId: z.ZodOptional<z.ZodType<import("../index.js").AgentTurnId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentTurnId, unknown>>>;
|
|
320
|
+
payload: z.ZodReadonly<z.ZodObject<{
|
|
321
|
+
error: z.ZodType<import("../index.js").AgentError, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentError, unknown>>;
|
|
322
|
+
}, z.core.$strict>>;
|
|
323
|
+
protocolVersion: z.ZodLiteral<6>;
|
|
324
|
+
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
325
|
+
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
326
|
+
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
327
|
+
historyAnchor: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderHistoryAnchor, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderHistoryAnchor, unknown>>>;
|
|
328
|
+
turnId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderTurnRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderTurnRef, unknown>>>;
|
|
329
|
+
itemId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderItemRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderItemRef, unknown>>>;
|
|
330
|
+
requestId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderRequestRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderRequestRef, unknown>>>;
|
|
331
|
+
}, z.core.$strict>>>;
|
|
332
|
+
occurredAt: z.ZodType<import("../index.js").AgentIsoDateTime, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentIsoDateTime, unknown>>;
|
|
333
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
334
|
+
type: z.ZodLiteral<"provider.diagnostic">;
|
|
335
|
+
turnId: z.ZodOptional<z.ZodType<import("../index.js").AgentTurnId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentTurnId, unknown>>>;
|
|
336
|
+
payload: z.ZodReadonly<z.ZodObject<{
|
|
337
|
+
code: z.ZodString;
|
|
338
|
+
message: z.ZodString;
|
|
339
|
+
context: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
340
|
+
operation: z.ZodOptional<z.ZodString>;
|
|
341
|
+
component: z.ZodOptional<z.ZodString>;
|
|
342
|
+
status: z.ZodOptional<z.ZodString>;
|
|
343
|
+
}, z.core.$strict>>>;
|
|
344
|
+
}, z.core.$strict>>;
|
|
345
|
+
protocolVersion: z.ZodLiteral<6>;
|
|
346
|
+
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
347
|
+
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
348
|
+
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
349
|
+
historyAnchor: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderHistoryAnchor, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderHistoryAnchor, unknown>>>;
|
|
350
|
+
turnId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderTurnRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderTurnRef, unknown>>>;
|
|
351
|
+
itemId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderItemRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderItemRef, unknown>>>;
|
|
352
|
+
requestId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderRequestRef, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderRequestRef, unknown>>>;
|
|
353
|
+
}, z.core.$strict>>>;
|
|
354
|
+
occurredAt: z.ZodType<import("../index.js").AgentIsoDateTime, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentIsoDateTime, unknown>>;
|
|
355
|
+
}, z.core.$strict>>], "type">;
|
|
356
|
+
export declare const AgentEventSchema: z.ZodType<AgentEvent>;
|
|
357
|
+
//# sourceMappingURL=events.d.ts.map
|