@agen-ai/agent-protocol 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +68 -11
- package/dist/capabilities/types.d.ts +6 -1
- package/dist/events/types.d.ts +1 -1
- package/dist/foundation/types.d.ts +1 -1
- package/dist/foundation/types.js +1 -1
- package/dist/jsonSchema/generated.d.ts +1058 -388
- package/dist/jsonSchema/generated.js +660 -227
- package/dist/public/index.d.ts +1 -0
- package/dist/public/index.js +1 -0
- package/dist/public/sessionInteractions.d.ts +2 -0
- package/dist/public/sessionInteractions.js +1 -0
- package/dist/requests/types.d.ts +17 -4
- package/dist/sessionInteractions/index.d.ts +3 -0
- package/dist/sessionInteractions/index.js +2 -0
- package/dist/sessionInteractions/parsers.d.ts +10 -0
- package/dist/sessionInteractions/parsers.js +48 -0
- package/dist/sessionInteractions/types.d.ts +50 -0
- package/dist/sessionInteractions/types.js +18 -0
- package/dist/zod/capabilities.d.ts +73 -7
- package/dist/zod/capabilities.js +32 -30
- package/dist/zod/events.d.ts +47 -35
- package/dist/zod/foundation.d.ts +1 -0
- package/dist/zod/foundation.js +15 -2
- package/dist/zod/index.d.ts +2 -1
- package/dist/zod/index.js +18 -0
- package/dist/zod/requests.d.ts +79 -28
- package/dist/zod/requests.js +15 -2
- package/dist/zod/sessionInteractions.d.ts +55 -0
- package/dist/zod/sessionInteractions.js +114 -0
- package/dist/zod/typeEquality.generated.d.ts +20 -4
- package/package.json +6 -2
package/dist/public/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from '../foundation/index.js';
|
|
|
2
2
|
export * from '../failures/index.js';
|
|
3
3
|
export * from '../accountQuota/index.js';
|
|
4
4
|
export * from '../sessions/index.js';
|
|
5
|
+
export * from '../sessionInteractions/index.js';
|
|
5
6
|
export * from '../turns/index.js';
|
|
6
7
|
export * from '../requests/index.js';
|
|
7
8
|
export * from '../operations/index.js';
|
package/dist/public/index.js
CHANGED
|
@@ -2,6 +2,7 @@ export * from "../foundation/index.js";
|
|
|
2
2
|
export * from "../failures/index.js";
|
|
3
3
|
export * from "../accountQuota/index.js";
|
|
4
4
|
export * from "../sessions/index.js";
|
|
5
|
+
export * from "../sessionInteractions/index.js";
|
|
5
6
|
export * from "../turns/index.js";
|
|
6
7
|
export * from "../requests/index.js";
|
|
7
8
|
export * from "../operations/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../sessionInteractions/index.js";
|
package/dist/requests/types.d.ts
CHANGED
|
@@ -22,15 +22,28 @@ export type AgentApprovalSubject = (AgentApprovalSubjectBase & Readonly<{
|
|
|
22
22
|
kind: 'command' | 'file_change' | 'tool' | 'other';
|
|
23
23
|
itemId: AgentItemId;
|
|
24
24
|
}>);
|
|
25
|
+
export type AgentApprovalConsequence = Readonly<{
|
|
26
|
+
kind: 'scoped';
|
|
27
|
+
persistence: AgentApprovalPersistence;
|
|
28
|
+
scope: Readonly<{
|
|
29
|
+
kind: AgentApprovalScopeKind;
|
|
30
|
+
}>;
|
|
31
|
+
}> | Readonly<{
|
|
32
|
+
kind: 'provider_managed_remembrance';
|
|
33
|
+
duration: Readonly<{
|
|
34
|
+
kind: 'unknown';
|
|
35
|
+
}>;
|
|
36
|
+
applicability: Readonly<{
|
|
37
|
+
kind: 'unknown';
|
|
38
|
+
}>;
|
|
39
|
+
explanation: string;
|
|
40
|
+
}>;
|
|
25
41
|
export interface AgentApprovalOption {
|
|
26
42
|
readonly optionId: AgentApprovalOptionId;
|
|
27
43
|
readonly label: string;
|
|
28
44
|
readonly description?: string;
|
|
29
45
|
readonly decision: 'approved' | 'denied';
|
|
30
|
-
readonly
|
|
31
|
-
readonly scope: Readonly<{
|
|
32
|
-
kind: AgentApprovalScopeKind;
|
|
33
|
-
}>;
|
|
46
|
+
readonly consequence: AgentApprovalConsequence;
|
|
34
47
|
}
|
|
35
48
|
export interface AgentApprovalRequest {
|
|
36
49
|
readonly requestKind: 'approval';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type AgentProtocolParseResult } from '../foundation/index.js';
|
|
2
|
+
import type { AgentSessionDecisionChoiceId, AgentSessionDecisionRequest, AgentSessionDecisionResponse } from './types.js';
|
|
3
|
+
export declare function parseAgentSessionDecisionChoiceId(input: unknown): AgentSessionDecisionChoiceId;
|
|
4
|
+
export declare function safeParseAgentSessionDecisionChoiceId(input: unknown): AgentProtocolParseResult<AgentSessionDecisionChoiceId>;
|
|
5
|
+
export declare function parseAgentSessionDecisionRequest(input: unknown): AgentSessionDecisionRequest;
|
|
6
|
+
export declare function safeParseAgentSessionDecisionRequest(input: unknown): AgentProtocolParseResult<AgentSessionDecisionRequest>;
|
|
7
|
+
export declare function parseAgentSessionDecisionResponse(input: unknown): AgentSessionDecisionResponse;
|
|
8
|
+
export declare function safeParseAgentSessionDecisionResponse(input: unknown): AgentProtocolParseResult<AgentSessionDecisionResponse>;
|
|
9
|
+
export declare function parseAgentSessionDecisionResponseFor(request: AgentSessionDecisionRequest, input: unknown): AgentSessionDecisionResponse;
|
|
10
|
+
//# sourceMappingURL=parsers.d.ts.map
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AgentProtocolValidationError
|
|
3
|
+
} from "../foundation/index.js";
|
|
4
|
+
import { parseWithSchema, safeParseWithSchema } from "../internal/parsers.js";
|
|
5
|
+
import {
|
|
6
|
+
AgentSessionDecisionChoiceIdSchema,
|
|
7
|
+
AgentSessionDecisionRequestSchema,
|
|
8
|
+
AgentSessionDecisionResponseSchema
|
|
9
|
+
} from "../zod/sessionInteractions.js";
|
|
10
|
+
function parseAgentSessionDecisionChoiceId(input) {
|
|
11
|
+
return parseWithSchema(AgentSessionDecisionChoiceIdSchema, input);
|
|
12
|
+
}
|
|
13
|
+
function safeParseAgentSessionDecisionChoiceId(input) {
|
|
14
|
+
return safeParseWithSchema(AgentSessionDecisionChoiceIdSchema, input);
|
|
15
|
+
}
|
|
16
|
+
function parseAgentSessionDecisionRequest(input) {
|
|
17
|
+
return parseWithSchema(AgentSessionDecisionRequestSchema, input);
|
|
18
|
+
}
|
|
19
|
+
function safeParseAgentSessionDecisionRequest(input) {
|
|
20
|
+
return safeParseWithSchema(AgentSessionDecisionRequestSchema, input);
|
|
21
|
+
}
|
|
22
|
+
function parseAgentSessionDecisionResponse(input) {
|
|
23
|
+
return parseWithSchema(AgentSessionDecisionResponseSchema, input);
|
|
24
|
+
}
|
|
25
|
+
function safeParseAgentSessionDecisionResponse(input) {
|
|
26
|
+
return safeParseWithSchema(AgentSessionDecisionResponseSchema, input);
|
|
27
|
+
}
|
|
28
|
+
function parseAgentSessionDecisionResponseFor(request, input) {
|
|
29
|
+
const parsedRequest = parseAgentSessionDecisionRequest(request);
|
|
30
|
+
const response = parseAgentSessionDecisionResponse(input);
|
|
31
|
+
if (!parsedRequest.choices.some((choice) => choice.choiceId === response.choiceId)) {
|
|
32
|
+
throw new AgentProtocolValidationError([{
|
|
33
|
+
code: "custom",
|
|
34
|
+
path: ["choiceId"],
|
|
35
|
+
message: "The response must select a choice offered by this session decision."
|
|
36
|
+
}]);
|
|
37
|
+
}
|
|
38
|
+
return response;
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
parseAgentSessionDecisionChoiceId,
|
|
42
|
+
parseAgentSessionDecisionRequest,
|
|
43
|
+
parseAgentSessionDecisionResponse,
|
|
44
|
+
parseAgentSessionDecisionResponseFor,
|
|
45
|
+
safeParseAgentSessionDecisionChoiceId,
|
|
46
|
+
safeParseAgentSessionDecisionRequest,
|
|
47
|
+
safeParseAgentSessionDecisionResponse
|
|
48
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { AgentIsoDateTime, AgentRequestId, AgentSessionId } from '../foundation/index.js';
|
|
2
|
+
declare const agentSessionDecisionChoiceIdBrand: unique symbol;
|
|
3
|
+
export type AgentSessionDecisionChoiceId = string & {
|
|
4
|
+
readonly [agentSessionDecisionChoiceIdBrand]: 'AgentSessionDecisionChoiceId';
|
|
5
|
+
};
|
|
6
|
+
export interface AgentSessionWorkspaceTarget {
|
|
7
|
+
readonly kind: 'workspace';
|
|
8
|
+
readonly path: string;
|
|
9
|
+
}
|
|
10
|
+
export type AgentSessionDecisionConsequence = Readonly<{
|
|
11
|
+
kind: 'grant';
|
|
12
|
+
scope: 'workspace';
|
|
13
|
+
persistence: Readonly<{
|
|
14
|
+
kind: 'provider_managed';
|
|
15
|
+
duration: 'persistent';
|
|
16
|
+
mayAffectOtherSessions: true;
|
|
17
|
+
}>;
|
|
18
|
+
}> | Readonly<{
|
|
19
|
+
kind: 'decline';
|
|
20
|
+
configuration: 'remains_gated';
|
|
21
|
+
}>;
|
|
22
|
+
export interface AgentSessionDecisionChoice {
|
|
23
|
+
readonly choiceId: AgentSessionDecisionChoiceId;
|
|
24
|
+
readonly label: string;
|
|
25
|
+
readonly description: string;
|
|
26
|
+
readonly consequence: AgentSessionDecisionConsequence;
|
|
27
|
+
}
|
|
28
|
+
export interface AgentSessionDecisionRequest {
|
|
29
|
+
readonly kind: 'decision';
|
|
30
|
+
readonly requestId: AgentRequestId;
|
|
31
|
+
readonly sessionId: AgentSessionId;
|
|
32
|
+
readonly title: string;
|
|
33
|
+
readonly description?: string;
|
|
34
|
+
readonly target: AgentSessionWorkspaceTarget;
|
|
35
|
+
readonly expiresAt: AgentIsoDateTime;
|
|
36
|
+
readonly choices: readonly [AgentSessionDecisionChoice, ...AgentSessionDecisionChoice[]];
|
|
37
|
+
}
|
|
38
|
+
export interface AgentSessionDecisionResponse {
|
|
39
|
+
readonly choiceId: AgentSessionDecisionChoiceId;
|
|
40
|
+
}
|
|
41
|
+
export declare const AGENT_SESSION_DECISION_REQUEST_BYTES_LIMIT = 65536;
|
|
42
|
+
export declare const AGENT_SESSION_DECISION_RESPONSE_BYTES_LIMIT = 1024;
|
|
43
|
+
export declare const AGENT_SESSION_DECISION_CHOICES_MAX_LENGTH = 16;
|
|
44
|
+
export declare const AGENT_SESSION_DECISION_CHOICE_ID_BYTES_LIMIT = 128;
|
|
45
|
+
export declare const AGENT_SESSION_DECISION_TITLE_MAX_LENGTH = 120;
|
|
46
|
+
export declare const AGENT_SESSION_DECISION_DESCRIPTION_MAX_LENGTH = 4000;
|
|
47
|
+
export declare const AGENT_SESSION_DECISION_CHOICE_DESCRIPTION_MAX_LENGTH = 1000;
|
|
48
|
+
export declare const AGENT_SESSION_DECISION_WORKSPACE_PATH_BYTES_LIMIT = 4096;
|
|
49
|
+
export {};
|
|
50
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const AGENT_SESSION_DECISION_REQUEST_BYTES_LIMIT = 65536;
|
|
2
|
+
const AGENT_SESSION_DECISION_RESPONSE_BYTES_LIMIT = 1024;
|
|
3
|
+
const AGENT_SESSION_DECISION_CHOICES_MAX_LENGTH = 16;
|
|
4
|
+
const AGENT_SESSION_DECISION_CHOICE_ID_BYTES_LIMIT = 128;
|
|
5
|
+
const AGENT_SESSION_DECISION_TITLE_MAX_LENGTH = 120;
|
|
6
|
+
const AGENT_SESSION_DECISION_DESCRIPTION_MAX_LENGTH = 4e3;
|
|
7
|
+
const AGENT_SESSION_DECISION_CHOICE_DESCRIPTION_MAX_LENGTH = 1e3;
|
|
8
|
+
const AGENT_SESSION_DECISION_WORKSPACE_PATH_BYTES_LIMIT = 4096;
|
|
9
|
+
export {
|
|
10
|
+
AGENT_SESSION_DECISION_CHOICES_MAX_LENGTH,
|
|
11
|
+
AGENT_SESSION_DECISION_CHOICE_DESCRIPTION_MAX_LENGTH,
|
|
12
|
+
AGENT_SESSION_DECISION_CHOICE_ID_BYTES_LIMIT,
|
|
13
|
+
AGENT_SESSION_DECISION_DESCRIPTION_MAX_LENGTH,
|
|
14
|
+
AGENT_SESSION_DECISION_REQUEST_BYTES_LIMIT,
|
|
15
|
+
AGENT_SESSION_DECISION_RESPONSE_BYTES_LIMIT,
|
|
16
|
+
AGENT_SESSION_DECISION_TITLE_MAX_LENGTH,
|
|
17
|
+
AGENT_SESSION_DECISION_WORKSPACE_PATH_BYTES_LIMIT
|
|
18
|
+
};
|
|
@@ -1,14 +1,28 @@
|
|
|
1
1
|
import { z } from 'zod/v4';
|
|
2
2
|
import { type AgentCapabilities } from '../capabilities/types.js';
|
|
3
|
-
export declare const AgentApprovalCapabilitySchema: z.
|
|
3
|
+
export declare const AgentApprovalCapabilitySchema: z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
4
4
|
kind: z.ZodLiteral<"unsupported">;
|
|
5
5
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
6
6
|
kind: z.ZodLiteral<"supported">;
|
|
7
|
-
modes: z.ZodReadonly<z.
|
|
7
|
+
modes: z.ZodReadonly<z.ZodTuple<[z.ZodReadonly<z.ZodObject<{
|
|
8
8
|
persistence: z.ZodEnum<{
|
|
9
9
|
session: "session";
|
|
10
|
+
workspace: "workspace";
|
|
10
11
|
once: "once";
|
|
12
|
+
}>;
|
|
13
|
+
scopeKinds: z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
14
|
+
exact_action: "exact_action";
|
|
15
|
+
command_pattern: "command_pattern";
|
|
16
|
+
domain: "domain";
|
|
17
|
+
tool: "tool";
|
|
18
|
+
server: "server";
|
|
19
|
+
all_edits: "all_edits";
|
|
20
|
+
}>>>;
|
|
21
|
+
}, z.core.$strict>>], z.ZodReadonly<z.ZodObject<{
|
|
22
|
+
persistence: z.ZodEnum<{
|
|
23
|
+
session: "session";
|
|
11
24
|
workspace: "workspace";
|
|
25
|
+
once: "once";
|
|
12
26
|
}>;
|
|
13
27
|
scopeKinds: z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
14
28
|
exact_action: "exact_action";
|
|
@@ -19,7 +33,26 @@ export declare const AgentApprovalCapabilitySchema: z.ZodDiscriminatedUnion<[z.Z
|
|
|
19
33
|
all_edits: "all_edits";
|
|
20
34
|
}>>>;
|
|
21
35
|
}, z.core.$strict>>>>;
|
|
22
|
-
|
|
36
|
+
providerManagedRemembrance: z.ZodLiteral<false>;
|
|
37
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
38
|
+
kind: z.ZodLiteral<"supported">;
|
|
39
|
+
modes: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
40
|
+
persistence: z.ZodEnum<{
|
|
41
|
+
session: "session";
|
|
42
|
+
workspace: "workspace";
|
|
43
|
+
once: "once";
|
|
44
|
+
}>;
|
|
45
|
+
scopeKinds: z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
46
|
+
exact_action: "exact_action";
|
|
47
|
+
command_pattern: "command_pattern";
|
|
48
|
+
domain: "domain";
|
|
49
|
+
tool: "tool";
|
|
50
|
+
server: "server";
|
|
51
|
+
all_edits: "all_edits";
|
|
52
|
+
}>>>;
|
|
53
|
+
}, z.core.$strict>>>>;
|
|
54
|
+
providerManagedRemembrance: z.ZodLiteral<true>;
|
|
55
|
+
}, z.core.$strict>>]>;
|
|
23
56
|
export declare const AgentImageInputCapabilitySchema: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
|
|
24
57
|
kind: z.ZodLiteral<"unsupported">;
|
|
25
58
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
@@ -106,7 +139,7 @@ export declare const AgentOperationInputCapabilitySchema: z.ZodReadonly<z.ZodObj
|
|
|
106
139
|
}, z.core.$strict>>], "kind">;
|
|
107
140
|
}, z.core.$strict>>;
|
|
108
141
|
export declare const AgentCapabilitiesPortableSchema: z.ZodReadonly<z.ZodObject<{
|
|
109
|
-
protocolVersion: z.ZodLiteral<
|
|
142
|
+
protocolVersion: z.ZodLiteral<11>;
|
|
110
143
|
providerKey: z.ZodType<import("../index.js").AgentProviderKey, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderKey, unknown>>;
|
|
111
144
|
sessions: z.ZodReadonly<z.ZodObject<{
|
|
112
145
|
create: z.ZodLiteral<true>;
|
|
@@ -174,15 +207,29 @@ export declare const AgentCapabilitiesPortableSchema: z.ZodReadonly<z.ZodObject<
|
|
|
174
207
|
}, z.core.$strict>>], "kind">;
|
|
175
208
|
}, z.core.$strict>>;
|
|
176
209
|
requests: z.ZodReadonly<z.ZodObject<{
|
|
177
|
-
approval: z.
|
|
210
|
+
approval: z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
178
211
|
kind: z.ZodLiteral<"unsupported">;
|
|
179
212
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
180
213
|
kind: z.ZodLiteral<"supported">;
|
|
181
|
-
modes: z.ZodReadonly<z.
|
|
214
|
+
modes: z.ZodReadonly<z.ZodTuple<[z.ZodReadonly<z.ZodObject<{
|
|
182
215
|
persistence: z.ZodEnum<{
|
|
183
216
|
session: "session";
|
|
217
|
+
workspace: "workspace";
|
|
184
218
|
once: "once";
|
|
219
|
+
}>;
|
|
220
|
+
scopeKinds: z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
221
|
+
exact_action: "exact_action";
|
|
222
|
+
command_pattern: "command_pattern";
|
|
223
|
+
domain: "domain";
|
|
224
|
+
tool: "tool";
|
|
225
|
+
server: "server";
|
|
226
|
+
all_edits: "all_edits";
|
|
227
|
+
}>>>;
|
|
228
|
+
}, z.core.$strict>>], z.ZodReadonly<z.ZodObject<{
|
|
229
|
+
persistence: z.ZodEnum<{
|
|
230
|
+
session: "session";
|
|
185
231
|
workspace: "workspace";
|
|
232
|
+
once: "once";
|
|
186
233
|
}>;
|
|
187
234
|
scopeKinds: z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
188
235
|
exact_action: "exact_action";
|
|
@@ -193,7 +240,26 @@ export declare const AgentCapabilitiesPortableSchema: z.ZodReadonly<z.ZodObject<
|
|
|
193
240
|
all_edits: "all_edits";
|
|
194
241
|
}>>>;
|
|
195
242
|
}, z.core.$strict>>>>;
|
|
196
|
-
|
|
243
|
+
providerManagedRemembrance: z.ZodLiteral<false>;
|
|
244
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
245
|
+
kind: z.ZodLiteral<"supported">;
|
|
246
|
+
modes: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
247
|
+
persistence: z.ZodEnum<{
|
|
248
|
+
session: "session";
|
|
249
|
+
workspace: "workspace";
|
|
250
|
+
once: "once";
|
|
251
|
+
}>;
|
|
252
|
+
scopeKinds: z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
253
|
+
exact_action: "exact_action";
|
|
254
|
+
command_pattern: "command_pattern";
|
|
255
|
+
domain: "domain";
|
|
256
|
+
tool: "tool";
|
|
257
|
+
server: "server";
|
|
258
|
+
all_edits: "all_edits";
|
|
259
|
+
}>>>;
|
|
260
|
+
}, z.core.$strict>>>>;
|
|
261
|
+
providerManagedRemembrance: z.ZodLiteral<true>;
|
|
262
|
+
}, z.core.$strict>>]>;
|
|
197
263
|
elicitation: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
|
|
198
264
|
kind: z.ZodLiteral<"unsupported">;
|
|
199
265
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
package/dist/zod/capabilities.js
CHANGED
|
@@ -80,39 +80,41 @@ const PositiveSafeIntegerSchema = z.number().int().positive().max(Number.MAX_SAF
|
|
|
80
80
|
function boundedPositiveSafeInteger(maximum) {
|
|
81
81
|
return z.number().int().positive().max(maximum);
|
|
82
82
|
}
|
|
83
|
-
const
|
|
83
|
+
const AgentApprovalCapabilityModeSchema = z.object({
|
|
84
|
+
persistence: z.enum(AGENT_APPROVAL_PERSISTENCES),
|
|
85
|
+
scopeKinds: z.array(z.enum(AGENT_APPROVAL_SCOPE_KINDS)).min(1).max(AGENT_APPROVAL_SCOPE_KINDS.length).meta({ uniqueItems: true }).readonly()
|
|
86
|
+
}).strict().readonly();
|
|
87
|
+
const AgentApprovalCapabilitySchema = z.union([
|
|
84
88
|
z.object({ kind: z.literal("unsupported") }).strict().readonly(),
|
|
85
89
|
z.object({
|
|
86
90
|
kind: z.literal("supported"),
|
|
87
|
-
modes: z.
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}).readonly()
|
|
115
|
-
]);
|
|
91
|
+
modes: z.tuple([AgentApprovalCapabilityModeSchema]).rest(AgentApprovalCapabilityModeSchema).refine((modes) => modes.length <= AGENT_APPROVAL_PERSISTENCES.length, {
|
|
92
|
+
message: "Approval modes must contain at most three precise persistences."
|
|
93
|
+
}).meta({ minItems: 1, maxItems: AGENT_APPROVAL_PERSISTENCES.length }).readonly(),
|
|
94
|
+
providerManagedRemembrance: z.literal(false)
|
|
95
|
+
}).strict().readonly(),
|
|
96
|
+
z.object({
|
|
97
|
+
kind: z.literal("supported"),
|
|
98
|
+
modes: z.array(AgentApprovalCapabilityModeSchema).max(AGENT_APPROVAL_PERSISTENCES.length).readonly(),
|
|
99
|
+
providerManagedRemembrance: z.literal(true)
|
|
100
|
+
}).strict().readonly()
|
|
101
|
+
]).superRefine((capability, context) => {
|
|
102
|
+
if (capability.kind === "unsupported") return;
|
|
103
|
+
addCanonicalListIssues({
|
|
104
|
+
values: capability.modes.map((mode) => mode.persistence),
|
|
105
|
+
canonicalOrder: AGENT_APPROVAL_PERSISTENCES,
|
|
106
|
+
path: ["modes"],
|
|
107
|
+
label: "Approval persistence modes"
|
|
108
|
+
}, context);
|
|
109
|
+
capability.modes.forEach((mode, index) => {
|
|
110
|
+
addCanonicalListIssues({
|
|
111
|
+
values: mode.scopeKinds,
|
|
112
|
+
canonicalOrder: AGENT_APPROVAL_SCOPE_KINDS,
|
|
113
|
+
path: ["modes", index, "scopeKinds"],
|
|
114
|
+
label: "Approval scope kinds"
|
|
115
|
+
}, context);
|
|
116
|
+
});
|
|
117
|
+
});
|
|
116
118
|
const AgentContextUsageCapabilitySchema = z.discriminatedUnion("kind", [
|
|
117
119
|
z.object({ kind: z.literal("unsupported") }).strict().readonly(),
|
|
118
120
|
z.object({
|
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<11>;
|
|
37
37
|
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
38
38
|
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
39
39
|
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
@@ -54,7 +54,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
|
|
|
54
54
|
requestId: z.ZodOptional<z.ZodType<import("../index.js").AgentRequestId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentRequestId, unknown>>>;
|
|
55
55
|
message: z.ZodOptional<z.ZodString>;
|
|
56
56
|
}, z.core.$strict>>;
|
|
57
|
-
protocolVersion: z.ZodLiteral<
|
|
57
|
+
protocolVersion: z.ZodLiteral<11>;
|
|
58
58
|
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
59
59
|
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
60
60
|
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
@@ -77,7 +77,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
|
|
|
77
77
|
reason: z.ZodOptional<z.ZodString>;
|
|
78
78
|
error: z.ZodOptional<z.ZodType<import("../index.js").AgentError, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentError, unknown>>>;
|
|
79
79
|
}, z.core.$strict>>;
|
|
80
|
-
protocolVersion: z.ZodLiteral<
|
|
80
|
+
protocolVersion: z.ZodLiteral<11>;
|
|
81
81
|
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
82
82
|
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
83
83
|
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
@@ -91,7 +91,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
|
|
|
91
91
|
type: z.ZodLiteral<"item.started">;
|
|
92
92
|
turnId: z.ZodType<import("../index.js").AgentTurnId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentTurnId, unknown>>;
|
|
93
93
|
payload: z.ZodType<import("../index.js").AgentItemSnapshot, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentItemSnapshot, unknown>>;
|
|
94
|
-
protocolVersion: z.ZodLiteral<
|
|
94
|
+
protocolVersion: z.ZodLiteral<11>;
|
|
95
95
|
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
96
96
|
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
97
97
|
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
@@ -105,7 +105,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
|
|
|
105
105
|
type: z.ZodLiteral<"item.updated">;
|
|
106
106
|
turnId: z.ZodType<import("../index.js").AgentTurnId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentTurnId, unknown>>;
|
|
107
107
|
payload: z.ZodType<import("../index.js").AgentItemSnapshot, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentItemSnapshot, unknown>>;
|
|
108
|
-
protocolVersion: z.ZodLiteral<
|
|
108
|
+
protocolVersion: z.ZodLiteral<11>;
|
|
109
109
|
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
110
110
|
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
111
111
|
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
@@ -119,7 +119,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
|
|
|
119
119
|
type: z.ZodLiteral<"item.completed">;
|
|
120
120
|
turnId: z.ZodType<import("../index.js").AgentTurnId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentTurnId, unknown>>;
|
|
121
121
|
payload: z.ZodType<import("../index.js").AgentItemSnapshot, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentItemSnapshot, unknown>>;
|
|
122
|
-
protocolVersion: z.ZodLiteral<
|
|
122
|
+
protocolVersion: z.ZodLiteral<11>;
|
|
123
123
|
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
124
124
|
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
125
125
|
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
@@ -145,7 +145,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
|
|
|
145
145
|
}>;
|
|
146
146
|
delta: z.ZodString;
|
|
147
147
|
}, z.core.$strict>>;
|
|
148
|
-
protocolVersion: z.ZodLiteral<
|
|
148
|
+
protocolVersion: z.ZodLiteral<11>;
|
|
149
149
|
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
150
150
|
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
151
151
|
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
@@ -162,7 +162,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
|
|
|
162
162
|
explanation: z.ZodOptional<z.ZodString>;
|
|
163
163
|
steps: z.ZodReadonly<z.ZodArray<z.ZodType<import("../index.js").AgentPlanStep, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentPlanStep, unknown>>>>;
|
|
164
164
|
}, z.core.$strict>>;
|
|
165
|
-
protocolVersion: z.ZodLiteral<
|
|
165
|
+
protocolVersion: z.ZodLiteral<11>;
|
|
166
166
|
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
167
167
|
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
168
168
|
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
@@ -179,7 +179,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
|
|
|
179
179
|
artifactId: z.ZodType<import("../index.js").AgentArtifactId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentArtifactId, unknown>>;
|
|
180
180
|
requestId: z.ZodType<import("../index.js").AgentRequestId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentRequestId, unknown>>;
|
|
181
181
|
}, z.core.$strict>>;
|
|
182
|
-
protocolVersion: z.ZodLiteral<
|
|
182
|
+
protocolVersion: z.ZodLiteral<11>;
|
|
183
183
|
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
184
184
|
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
185
185
|
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
@@ -193,7 +193,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
|
|
|
193
193
|
type: z.ZodLiteral<"turn.diff.updated">;
|
|
194
194
|
turnId: z.ZodType<import("../index.js").AgentTurnId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentTurnId, unknown>>;
|
|
195
195
|
payload: z.ZodType<import("../index.js").AgentDiffSummary, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentDiffSummary, unknown>>;
|
|
196
|
-
protocolVersion: z.ZodLiteral<
|
|
196
|
+
protocolVersion: z.ZodLiteral<11>;
|
|
197
197
|
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
198
198
|
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
199
199
|
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
@@ -235,21 +235,33 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
|
|
|
235
235
|
approved: "approved";
|
|
236
236
|
denied: "denied";
|
|
237
237
|
}>;
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
kind: z.ZodEnum<{
|
|
245
|
-
exact_action: "exact_action";
|
|
246
|
-
command_pattern: "command_pattern";
|
|
247
|
-
domain: "domain";
|
|
248
|
-
tool: "tool";
|
|
249
|
-
server: "server";
|
|
250
|
-
all_edits: "all_edits";
|
|
238
|
+
consequence: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
|
|
239
|
+
kind: z.ZodLiteral<"scoped">;
|
|
240
|
+
persistence: z.ZodEnum<{
|
|
241
|
+
session: "session";
|
|
242
|
+
workspace: "workspace";
|
|
243
|
+
once: "once";
|
|
251
244
|
}>;
|
|
252
|
-
|
|
245
|
+
scope: z.ZodReadonly<z.ZodObject<{
|
|
246
|
+
kind: z.ZodEnum<{
|
|
247
|
+
exact_action: "exact_action";
|
|
248
|
+
command_pattern: "command_pattern";
|
|
249
|
+
domain: "domain";
|
|
250
|
+
tool: "tool";
|
|
251
|
+
server: "server";
|
|
252
|
+
all_edits: "all_edits";
|
|
253
|
+
}>;
|
|
254
|
+
}, z.core.$strict>>;
|
|
255
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
256
|
+
kind: z.ZodLiteral<"provider_managed_remembrance">;
|
|
257
|
+
duration: z.ZodReadonly<z.ZodObject<{
|
|
258
|
+
kind: z.ZodLiteral<"unknown">;
|
|
259
|
+
}, z.core.$strict>>;
|
|
260
|
+
applicability: z.ZodReadonly<z.ZodObject<{
|
|
261
|
+
kind: z.ZodLiteral<"unknown">;
|
|
262
|
+
}, z.core.$strict>>;
|
|
263
|
+
explanation: z.ZodString;
|
|
264
|
+
}, z.core.$strict>>], "kind">;
|
|
253
265
|
}, z.core.$strict>>>>;
|
|
254
266
|
expiresAt: z.ZodOptional<z.ZodType<import("../index.js").AgentIsoDateTime, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentIsoDateTime, unknown>>>;
|
|
255
267
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
@@ -326,7 +338,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
|
|
|
326
338
|
expiresAt: z.ZodOptional<z.ZodType<import("../index.js").AgentIsoDateTime, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentIsoDateTime, unknown>>>;
|
|
327
339
|
}, z.core.$strict>>], "requestKind">;
|
|
328
340
|
}, z.core.$strict>>;
|
|
329
|
-
protocolVersion: z.ZodLiteral<
|
|
341
|
+
protocolVersion: z.ZodLiteral<11>;
|
|
330
342
|
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
331
343
|
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
332
344
|
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
@@ -357,7 +369,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
|
|
|
357
369
|
current: z.ZodOptional<z.ZodNumber>;
|
|
358
370
|
total: z.ZodOptional<z.ZodNumber>;
|
|
359
371
|
}, z.core.$strict>>;
|
|
360
|
-
protocolVersion: z.ZodLiteral<
|
|
372
|
+
protocolVersion: z.ZodLiteral<11>;
|
|
361
373
|
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
362
374
|
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
363
375
|
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
@@ -395,7 +407,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
|
|
|
395
407
|
thresholdTokens: z.ZodOptional<z.ZodNumber>;
|
|
396
408
|
}, z.core.$strict>>>;
|
|
397
409
|
}, z.core.$strict>>;
|
|
398
|
-
protocolVersion: z.ZodLiteral<
|
|
410
|
+
protocolVersion: z.ZodLiteral<11>;
|
|
399
411
|
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
400
412
|
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
401
413
|
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
@@ -411,7 +423,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
|
|
|
411
423
|
payload: z.ZodReadonly<z.ZodObject<{
|
|
412
424
|
artifact: z.ZodType<import("../index.js").AgentArtifactDescriptor, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentArtifactDescriptor, unknown>>;
|
|
413
425
|
}, z.core.$strict>>;
|
|
414
|
-
protocolVersion: z.ZodLiteral<
|
|
426
|
+
protocolVersion: z.ZodLiteral<11>;
|
|
415
427
|
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
416
428
|
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
417
429
|
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
@@ -440,7 +452,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
|
|
|
440
452
|
error: z.ZodOptional<z.ZodType<import("../index.js").AgentError, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentError, unknown>>>;
|
|
441
453
|
}, z.core.$strict>>;
|
|
442
454
|
}, z.core.$strict>>;
|
|
443
|
-
protocolVersion: z.ZodLiteral<
|
|
455
|
+
protocolVersion: z.ZodLiteral<11>;
|
|
444
456
|
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
445
457
|
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
446
458
|
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
@@ -509,7 +521,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
|
|
|
509
521
|
resourceIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodType<import("../index.js").AgentGeneratedResourceId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentGeneratedResourceId, unknown>>>>>;
|
|
510
522
|
}, z.core.$strict>>;
|
|
511
523
|
}, z.core.$strict>>;
|
|
512
|
-
protocolVersion: z.ZodLiteral<
|
|
524
|
+
protocolVersion: z.ZodLiteral<11>;
|
|
513
525
|
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
514
526
|
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
515
527
|
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
@@ -563,7 +575,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
|
|
|
563
575
|
error: z.ZodOptional<z.ZodType<import("../index.js").AgentError, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentError, unknown>>>;
|
|
564
576
|
}, z.core.$strict>>;
|
|
565
577
|
}, z.core.$strict>>;
|
|
566
|
-
protocolVersion: z.ZodLiteral<
|
|
578
|
+
protocolVersion: z.ZodLiteral<11>;
|
|
567
579
|
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
568
580
|
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
569
581
|
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
@@ -583,7 +595,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
|
|
|
583
595
|
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
584
596
|
delayMs: z.ZodOptional<z.ZodNumber>;
|
|
585
597
|
}, z.core.$strict>>;
|
|
586
|
-
protocolVersion: z.ZodLiteral<
|
|
598
|
+
protocolVersion: z.ZodLiteral<11>;
|
|
587
599
|
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
588
600
|
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
589
601
|
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
@@ -601,7 +613,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
|
|
|
601
613
|
message: z.ZodString;
|
|
602
614
|
context: z.ZodOptional<z.ZodType<import("../index.js").AgentErrorContext, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentErrorContext, unknown>>>;
|
|
603
615
|
}, z.core.$strict>>;
|
|
604
|
-
protocolVersion: z.ZodLiteral<
|
|
616
|
+
protocolVersion: z.ZodLiteral<11>;
|
|
605
617
|
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
606
618
|
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
607
619
|
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
@@ -617,7 +629,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
|
|
|
617
629
|
payload: z.ZodReadonly<z.ZodObject<{
|
|
618
630
|
error: z.ZodType<import("../index.js").AgentError, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentError, unknown>>;
|
|
619
631
|
}, z.core.$strict>>;
|
|
620
|
-
protocolVersion: z.ZodLiteral<
|
|
632
|
+
protocolVersion: z.ZodLiteral<11>;
|
|
621
633
|
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
622
634
|
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
623
635
|
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|
|
@@ -635,7 +647,7 @@ export declare const AgentEventPortableSchema: z.ZodDiscriminatedUnion<[z.ZodRea
|
|
|
635
647
|
message: z.ZodString;
|
|
636
648
|
context: z.ZodOptional<z.ZodType<import("../index.js").AgentErrorContext, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentErrorContext, unknown>>>;
|
|
637
649
|
}, z.core.$strict>>;
|
|
638
|
-
protocolVersion: z.ZodLiteral<
|
|
650
|
+
protocolVersion: z.ZodLiteral<11>;
|
|
639
651
|
sessionId: z.ZodType<import("../index.js").AgentSessionId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentSessionId, unknown>>;
|
|
640
652
|
providerRefs: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
641
653
|
conversationId: z.ZodOptional<z.ZodType<import("../index.js").AgentProviderConversationId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentProviderConversationId, unknown>>>;
|