@agen-ai/agent-protocol 0.4.1 → 0.4.2

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.
@@ -3,15 +3,26 @@ import {
3
3
  AGENT_PROTOCOL_JSON_DEPTH_LIMIT,
4
4
  agentProtocolSerializedJsonBytes
5
5
  } from "../foundation/types.js";
6
+ import {
7
+ AGENT_ELICITATION_FIELDS_MAX_LENGTH,
8
+ AGENT_ELICITATION_OPTIONS_MAX_LENGTH
9
+ } from "../requests/types.js";
6
10
  import {
7
11
  AGENT_SESSION_DECISION_CHOICE_DESCRIPTION_MAX_LENGTH,
8
12
  AGENT_SESSION_DECISION_CHOICE_ID_BYTES_LIMIT,
9
13
  AGENT_SESSION_DECISION_CHOICES_MAX_LENGTH,
10
14
  AGENT_SESSION_DECISION_DESCRIPTION_MAX_LENGTH,
11
- AGENT_SESSION_DECISION_REQUEST_BYTES_LIMIT,
12
15
  AGENT_SESSION_DECISION_RESPONSE_BYTES_LIMIT,
13
16
  AGENT_SESSION_DECISION_TITLE_MAX_LENGTH,
14
- AGENT_SESSION_DECISION_WORKSPACE_PATH_BYTES_LIMIT
17
+ AGENT_SESSION_DECISION_WORKSPACE_PATH_BYTES_LIMIT,
18
+ AGENT_SESSION_FORM_RESPONSE_BYTES_LIMIT,
19
+ AGENT_SESSION_PLAN_ID_BYTES_LIMIT,
20
+ AGENT_SESSION_PLAN_REVISION_BYTES_LIMIT,
21
+ AGENT_SESSION_PLAN_REVIEW_FEEDBACK_BYTES_LIMIT,
22
+ AGENT_SESSION_PLAN_REVIEW_FEEDBACK_MAX_LENGTH,
23
+ AGENT_SESSION_PLAN_REVIEW_RESPONSE_BYTES_LIMIT,
24
+ AGENT_SESSION_PLAN_TEXT_BYTES_LIMIT,
25
+ AGENT_SESSION_REQUEST_BYTES_LIMIT
15
26
  } from "../sessionInteractions/types.js";
16
27
  import {
17
28
  AgentIsoDateTimeSchema,
@@ -21,19 +32,48 @@ import {
21
32
  createAgentCanonicalOpaqueStringSchema,
22
33
  withAcyclicProtocolInput
23
34
  } from "./foundation.js";
35
+ import {
36
+ AgentElicitationAnswerSchema,
37
+ AgentElicitationFieldSchema,
38
+ refineAgentElicitationAnswers,
39
+ refineAgentElicitationFields
40
+ } from "./requests.js";
24
41
  const encoder = new TextEncoder();
42
+ const inputBounds = {
43
+ maxDepth: AGENT_PROTOCOL_JSON_DEPTH_LIMIT,
44
+ maxCollectionLength: AGENT_ELICITATION_OPTIONS_MAX_LENGTH,
45
+ requireJsonData: true
46
+ };
25
47
  const SingleLineTextSchema = createAgentCanonicalNonBlankStringSchema(
26
48
  AGENT_SESSION_DECISION_TITLE_MAX_LENGTH
27
49
  ).regex(/^[^\u0000-\u001F\u007F-\u009F]*$/u);
28
50
  function descriptionSchema(maxLength) {
29
51
  return createAgentCanonicalNonBlankStringSchema(maxLength).regex(/^[^\u0000-\u0009\u000B-\u001F\u007F-\u009F]*$/u);
30
52
  }
31
- const AgentSessionDecisionChoiceIdSchema = createAgentCanonicalOpaqueStringSchema(
32
- AGENT_SESSION_DECISION_CHOICE_ID_BYTES_LIMIT,
33
- "Session decision choice IDs must be canonical and contain no control characters."
34
- ).refine(
35
- (value) => encoder.encode(value).byteLength <= AGENT_SESSION_DECISION_CHOICE_ID_BYTES_LIMIT,
36
- "Session decision choice ID exceeds its UTF-8 byte limit."
53
+ function nominalIdSchema(byteLimit) {
54
+ return createAgentCanonicalOpaqueStringSchema(
55
+ byteLimit,
56
+ "Session identities must be canonical and contain no control characters."
57
+ ).refine(
58
+ (value) => encoder.encode(value).byteLength <= byteLimit,
59
+ "Session identity exceeds its UTF-8 byte limit."
60
+ );
61
+ }
62
+ function nonemptyArraySchema(schema, maxLength) {
63
+ return z.array(schema).min(1).max(maxLength).readonly();
64
+ }
65
+ const AgentSessionDecisionChoiceIdSchema = nominalIdSchema(
66
+ AGENT_SESSION_DECISION_CHOICE_ID_BYTES_LIMIT
67
+ );
68
+ const AgentSessionFormChoiceIdSchema = nominalIdSchema(
69
+ AGENT_SESSION_DECISION_CHOICE_ID_BYTES_LIMIT
70
+ );
71
+ const AgentSessionPlanReviewChoiceIdSchema = nominalIdSchema(
72
+ AGENT_SESSION_DECISION_CHOICE_ID_BYTES_LIMIT
73
+ );
74
+ const AgentSessionPlanIdSchema = nominalIdSchema(AGENT_SESSION_PLAN_ID_BYTES_LIMIT);
75
+ const AgentSessionPlanRevisionSchema = nominalIdSchema(
76
+ AGENT_SESSION_PLAN_REVISION_BYTES_LIMIT
37
77
  );
38
78
  const AgentSessionWorkspaceTargetSchema = z.object({
39
79
  kind: z.literal("workspace"),
@@ -63,45 +103,155 @@ const AgentSessionDecisionChoiceSchema = z.object({
63
103
  description: descriptionSchema(AGENT_SESSION_DECISION_CHOICE_DESCRIPTION_MAX_LENGTH),
64
104
  consequence: AgentSessionDecisionConsequenceSchema
65
105
  }).strict().readonly();
66
- const ChoicesSchema = z.array(AgentSessionDecisionChoiceSchema).min(1).max(AGENT_SESSION_DECISION_CHOICES_MAX_LENGTH).readonly();
67
- const AgentSessionDecisionRequestPortableSchema = z.object({
68
- kind: z.literal("decision"),
106
+ const requestFields = {
69
107
  requestId: AgentRequestIdSchema,
70
108
  sessionId: AgentSessionIdSchema,
71
109
  title: SingleLineTextSchema,
72
110
  description: descriptionSchema(AGENT_SESSION_DECISION_DESCRIPTION_MAX_LENGTH).optional(),
111
+ expiresAt: AgentIsoDateTimeSchema.optional()
112
+ };
113
+ const AgentSessionDecisionRequestPortableSchema = z.object({
114
+ ...requestFields,
115
+ kind: z.literal("decision"),
73
116
  target: AgentSessionWorkspaceTargetSchema,
74
- expiresAt: AgentIsoDateTimeSchema,
75
- choices: ChoicesSchema
117
+ choices: nonemptyArraySchema(AgentSessionDecisionChoiceSchema, AGENT_SESSION_DECISION_CHOICES_MAX_LENGTH)
76
118
  }).strict().readonly();
77
- const inputBounds = {
78
- maxDepth: AGENT_PROTOCOL_JSON_DEPTH_LIMIT,
79
- maxCollectionLength: AGENT_SESSION_DECISION_CHOICES_MAX_LENGTH,
80
- requireJsonData: true
119
+ const offeredChoiceFields = {
120
+ label: SingleLineTextSchema,
121
+ description: descriptionSchema(AGENT_SESSION_DECISION_CHOICE_DESCRIPTION_MAX_LENGTH).optional()
81
122
  };
82
- const AgentSessionDecisionRequestSchema = withAcyclicProtocolInput(AgentSessionDecisionRequestPortableSchema, inputBounds).superRefine((request, context) => {
83
- if (agentProtocolSerializedJsonBytes(request) > AGENT_SESSION_DECISION_REQUEST_BYTES_LIMIT) {
84
- context.addIssue({ code: "custom", message: "Session decision exceeds its serialized UTF-8 byte limit." });
123
+ const AgentSessionFormChoicePortableSchema = z.discriminatedUnion("action", [
124
+ z.object({ ...offeredChoiceFields, choiceId: AgentSessionFormChoiceIdSchema, action: z.literal("submit") }).strict().readonly(),
125
+ z.object({ ...offeredChoiceFields, choiceId: AgentSessionFormChoiceIdSchema, action: z.literal("cancel") }).strict().readonly()
126
+ ]);
127
+ const AgentSessionFormChoiceSchema = withAcyclicProtocolInput(AgentSessionFormChoicePortableSchema, inputBounds);
128
+ const AgentSessionFormRequestPortableSchema = z.object({
129
+ ...requestFields,
130
+ kind: z.literal("form"),
131
+ fields: nonemptyArraySchema(AgentElicitationFieldSchema, AGENT_ELICITATION_FIELDS_MAX_LENGTH),
132
+ choices: nonemptyArraySchema(AgentSessionFormChoicePortableSchema, AGENT_SESSION_DECISION_CHOICES_MAX_LENGTH)
133
+ }).strict().readonly();
134
+ const AgentSessionPlanSnapshotPortableSchema = z.object({
135
+ planId: AgentSessionPlanIdSchema,
136
+ revision: AgentSessionPlanRevisionSchema,
137
+ title: SingleLineTextSchema,
138
+ content: z.object({
139
+ kind: z.literal("text"),
140
+ format: z.enum(["plain_text", "markdown"]),
141
+ text: z.string().min(1).max(AGENT_SESSION_PLAN_TEXT_BYTES_LIMIT)
142
+ }).strict().readonly()
143
+ }).strict().readonly();
144
+ const AgentSessionPlanSnapshotSchema = AgentSessionPlanSnapshotPortableSchema.superRefine((plan, context) => {
145
+ if (encoder.encode(plan.content.text).byteLength > AGENT_SESSION_PLAN_TEXT_BYTES_LIMIT) {
146
+ context.addIssue({ code: "custom", path: ["content", "text"], message: "Plan text exceeds its UTF-8 byte limit." });
147
+ }
148
+ });
149
+ const AgentSessionPlanReviewChoicePortableSchema = z.object({
150
+ ...offeredChoiceFields,
151
+ choiceId: AgentSessionPlanReviewChoiceIdSchema,
152
+ action: z.enum(["approve", "revise", "abandon"])
153
+ }).strict().readonly();
154
+ const AgentSessionPlanReviewChoiceSchema = withAcyclicProtocolInput(AgentSessionPlanReviewChoicePortableSchema, inputBounds);
155
+ const AgentSessionPlanReviewRequestPortableSchema = z.object({
156
+ ...requestFields,
157
+ kind: z.literal("plan_review"),
158
+ plan: AgentSessionPlanSnapshotPortableSchema,
159
+ choices: nonemptyArraySchema(AgentSessionPlanReviewChoicePortableSchema, AGENT_SESSION_DECISION_CHOICES_MAX_LENGTH)
160
+ }).strict().readonly();
161
+ const AgentSessionRequestPortableSchema = z.discriminatedUnion("kind", [
162
+ AgentSessionDecisionRequestPortableSchema,
163
+ AgentSessionFormRequestPortableSchema,
164
+ AgentSessionPlanReviewRequestPortableSchema
165
+ ]);
166
+ function refineSessionRequest(request, context) {
167
+ if (agentProtocolSerializedJsonBytes(request) > AGENT_SESSION_REQUEST_BYTES_LIMIT) {
168
+ context.addIssue({ code: "custom", message: "Session request exceeds its serialized UTF-8 byte limit." });
85
169
  }
86
- const seen = /* @__PURE__ */ new Set();
170
+ const seenIds = /* @__PURE__ */ new Set();
171
+ const seenActions = /* @__PURE__ */ new Set();
87
172
  request.choices.forEach((choice, index) => {
88
- if (seen.has(choice.choiceId)) {
89
- context.addIssue({
90
- code: "custom",
91
- path: ["choices", index, "choiceId"],
92
- message: "Session decision choices must have unique IDs."
93
- });
173
+ if (seenIds.has(choice.choiceId)) {
174
+ context.addIssue({ code: "custom", path: ["choices", index, "choiceId"], message: "Session choices must have unique IDs." });
175
+ }
176
+ seenIds.add(choice.choiceId);
177
+ if ("action" in choice) {
178
+ if (seenActions.has(choice.action)) {
179
+ context.addIssue({ code: "custom", path: ["choices", index, "action"], message: "Session choices must have distinct actions." });
180
+ }
181
+ seenActions.add(choice.action);
94
182
  }
95
- seen.add(choice.choiceId);
96
183
  });
97
- });
184
+ if (request.kind === "form") {
185
+ refineAgentElicitationFields(request.fields, context);
186
+ if (!seenActions.has("submit")) {
187
+ context.addIssue({ code: "custom", path: ["choices"], message: "Session forms must offer exactly one submit choice." });
188
+ }
189
+ }
190
+ if (request.kind === "plan_review") {
191
+ const plan = AgentSessionPlanSnapshotSchema.safeParse(request.plan);
192
+ if (!plan.success) {
193
+ for (const issue of plan.error.issues) {
194
+ context.addIssue({ code: "custom", path: ["plan", ...issue.path], message: issue.message });
195
+ }
196
+ }
197
+ }
198
+ }
199
+ const AgentSessionDecisionRequestSchema = withAcyclicProtocolInput(AgentSessionDecisionRequestPortableSchema, inputBounds).superRefine(refineSessionRequest);
200
+ const AgentSessionFormRequestSchema = withAcyclicProtocolInput(AgentSessionFormRequestPortableSchema, inputBounds).superRefine(refineSessionRequest);
201
+ const AgentSessionPlanReviewRequestSchema = withAcyclicProtocolInput(AgentSessionPlanReviewRequestPortableSchema, inputBounds).superRefine(refineSessionRequest);
202
+ const AgentSessionRequestSchema = withAcyclicProtocolInput(AgentSessionRequestPortableSchema, inputBounds).superRefine(refineSessionRequest);
98
203
  const AgentSessionDecisionResponsePortableSchema = z.object({
204
+ kind: z.literal("decision"),
99
205
  choiceId: AgentSessionDecisionChoiceIdSchema
100
206
  }).strict().readonly();
101
- const AgentSessionDecisionResponseSchema = withAcyclicProtocolInput(AgentSessionDecisionResponsePortableSchema, inputBounds).refine(
102
- (response) => agentProtocolSerializedJsonBytes(response) <= AGENT_SESSION_DECISION_RESPONSE_BYTES_LIMIT,
103
- "Session decision response exceeds its serialized UTF-8 byte limit."
104
- );
207
+ const AgentSessionFormResponsePortableSchema = z.discriminatedUnion("action", [
208
+ z.object({
209
+ kind: z.literal("form"),
210
+ action: z.literal("submit"),
211
+ choiceId: AgentSessionFormChoiceIdSchema,
212
+ answers: z.array(AgentElicitationAnswerSchema).max(AGENT_ELICITATION_FIELDS_MAX_LENGTH).readonly()
213
+ }).strict().readonly(),
214
+ z.object({
215
+ kind: z.literal("form"),
216
+ action: z.literal("cancel"),
217
+ choiceId: AgentSessionFormChoiceIdSchema
218
+ }).strict().readonly()
219
+ ]);
220
+ const planResponseFields = {
221
+ kind: z.literal("plan_review"),
222
+ choiceId: AgentSessionPlanReviewChoiceIdSchema,
223
+ planId: AgentSessionPlanIdSchema,
224
+ revision: AgentSessionPlanRevisionSchema
225
+ };
226
+ const AgentSessionPlanReviewResponsePortableSchema = z.discriminatedUnion("action", [
227
+ z.object({ ...planResponseFields, action: z.enum(["approve", "abandon"]) }).strict().readonly(),
228
+ z.object({
229
+ ...planResponseFields,
230
+ action: z.literal("revise"),
231
+ feedback: z.string().min(1).max(AGENT_SESSION_PLAN_REVIEW_FEEDBACK_MAX_LENGTH).regex(/\S/u, "Revision feedback must contain non-whitespace content.")
232
+ }).strict().readonly()
233
+ ]);
234
+ const AgentSessionResponsePortableSchema = z.union([
235
+ AgentSessionDecisionResponsePortableSchema,
236
+ AgentSessionFormResponsePortableSchema,
237
+ AgentSessionPlanReviewResponsePortableSchema
238
+ ]);
239
+ function refineSessionResponse(response, context) {
240
+ const byteLimit = response.kind === "decision" ? AGENT_SESSION_DECISION_RESPONSE_BYTES_LIMIT : response.kind === "form" ? AGENT_SESSION_FORM_RESPONSE_BYTES_LIMIT : AGENT_SESSION_PLAN_REVIEW_RESPONSE_BYTES_LIMIT;
241
+ if (agentProtocolSerializedJsonBytes(response) > byteLimit) {
242
+ context.addIssue({ code: "custom", message: "Session response exceeds its serialized UTF-8 byte limit." });
243
+ }
244
+ if (response.kind === "form" && response.action === "submit") {
245
+ refineAgentElicitationAnswers(response.answers, context);
246
+ }
247
+ if (response.kind === "plan_review" && response.action === "revise" && encoder.encode(response.feedback).byteLength > AGENT_SESSION_PLAN_REVIEW_FEEDBACK_BYTES_LIMIT) {
248
+ context.addIssue({ code: "custom", path: ["feedback"], message: "Revision feedback exceeds its UTF-8 byte limit." });
249
+ }
250
+ }
251
+ const AgentSessionDecisionResponseSchema = withAcyclicProtocolInput(AgentSessionDecisionResponsePortableSchema, inputBounds).superRefine(refineSessionResponse);
252
+ const AgentSessionFormResponseSchema = withAcyclicProtocolInput(AgentSessionFormResponsePortableSchema, inputBounds).superRefine(refineSessionResponse);
253
+ const AgentSessionPlanReviewResponseSchema = withAcyclicProtocolInput(AgentSessionPlanReviewResponsePortableSchema, inputBounds).superRefine(refineSessionResponse);
254
+ const AgentSessionResponseSchema = withAcyclicProtocolInput(AgentSessionResponsePortableSchema, inputBounds).superRefine(refineSessionResponse);
105
255
  export {
106
256
  AgentSessionDecisionChoiceIdSchema,
107
257
  AgentSessionDecisionChoiceSchema,
@@ -110,5 +260,25 @@ export {
110
260
  AgentSessionDecisionRequestSchema,
111
261
  AgentSessionDecisionResponsePortableSchema,
112
262
  AgentSessionDecisionResponseSchema,
263
+ AgentSessionFormChoiceIdSchema,
264
+ AgentSessionFormChoiceSchema,
265
+ AgentSessionFormRequestPortableSchema,
266
+ AgentSessionFormRequestSchema,
267
+ AgentSessionFormResponsePortableSchema,
268
+ AgentSessionFormResponseSchema,
269
+ AgentSessionPlanIdSchema,
270
+ AgentSessionPlanReviewChoiceIdSchema,
271
+ AgentSessionPlanReviewChoiceSchema,
272
+ AgentSessionPlanReviewRequestPortableSchema,
273
+ AgentSessionPlanReviewRequestSchema,
274
+ AgentSessionPlanReviewResponsePortableSchema,
275
+ AgentSessionPlanReviewResponseSchema,
276
+ AgentSessionPlanRevisionSchema,
277
+ AgentSessionPlanSnapshotPortableSchema,
278
+ AgentSessionPlanSnapshotSchema,
279
+ AgentSessionRequestPortableSchema,
280
+ AgentSessionRequestSchema,
281
+ AgentSessionResponsePortableSchema,
282
+ AgentSessionResponseSchema,
113
283
  AgentSessionWorkspaceTargetSchema
114
284
  };
@@ -241,9 +241,9 @@ export declare const AgentPlanStepSchema: z.ZodType<AgentPlanStep>;
241
241
  export declare const AgentDiffSummarySchema: z.ZodType<AgentDiffSummary>;
242
242
  export declare const AgentTurnCompletedPayloadPortableSchema: z.ZodReadonly<z.ZodObject<{
243
243
  outcome: z.ZodEnum<{
244
+ canceled: "canceled";
244
245
  completed: "completed";
245
246
  failed: "failed";
246
- canceled: "canceled";
247
247
  expired: "expired";
248
248
  }>;
249
249
  reason: z.ZodOptional<z.ZodString>;
@@ -16,7 +16,7 @@ import type { AgentManagedContentCatalog, AgentManagedContentDescriptor } from '
16
16
  import type { AgentOperationCatalog, AgentOperationDescriptor, AgentOperationInvocation, AgentOperationResult } from '../operations/types.js';
17
17
  import type { AgentApprovalConsequence, AgentRequest, AgentRequestResolution } from '../requests/types.js';
18
18
  import type { AgentGeneratedResourceDescriptor } from '../resources/types.js';
19
- import type { AgentSessionDecisionChoice, AgentSessionDecisionConsequence, AgentSessionDecisionRequest, AgentSessionDecisionResponse, AgentSessionWorkspaceTarget } from '../sessionInteractions/types.js';
19
+ import type { AgentSessionDecisionChoice, AgentSessionDecisionConsequence, AgentSessionDecisionRequest, AgentSessionDecisionResponse, AgentSessionFormChoice, AgentSessionFormRequest, AgentSessionFormResponse, AgentSessionPlanReviewChoice, AgentSessionPlanReviewRequest, AgentSessionPlanReviewResponse, AgentSessionPlanSnapshot, AgentSessionRequest, AgentSessionResponse, AgentSessionWorkspaceTarget } from '../sessionInteractions/types.js';
20
20
  import type { AgentSessionBinding, AgentSessionConfiguration, AgentSessionOpenInput } from '../sessions/types.js';
21
21
  import type { AgentContentReferenceInputPart, AgentItemSnapshot, AgentTurnInputContent, AgentTurnInterruptionInput, AgentTurnRunInput } from '../turns/types.js';
22
22
  import { AgentAccountQuotaResetSchema, AgentAccountQuotaSnapshotSchema, AgentAccountQuotaWindowSchema } from './accountQuota.js';
@@ -36,7 +36,7 @@ import { AgentManagedContentCatalogSchema, AgentManagedContentDescriptorSchema }
36
36
  import { AgentOperationCatalogSchema, AgentOperationDescriptorSchema, AgentOperationInvocationSchema, AgentOperationResultSchema } from './operations.js';
37
37
  import { AgentApprovalConsequenceSchema, AgentRequestResolutionSchema, AgentRequestSchema } from './requests.js';
38
38
  import { AgentGeneratedResourceDescriptorSchema } from './resources.js';
39
- import { AgentSessionDecisionChoiceSchema, AgentSessionDecisionConsequenceSchema, AgentSessionDecisionRequestSchema, AgentSessionDecisionResponseSchema, AgentSessionWorkspaceTargetSchema } from './sessionInteractions.js';
39
+ import { AgentSessionDecisionChoiceSchema, AgentSessionDecisionConsequenceSchema, AgentSessionDecisionRequestSchema, AgentSessionDecisionResponseSchema, AgentSessionFormChoiceSchema, AgentSessionFormRequestSchema, AgentSessionFormResponseSchema, AgentSessionPlanReviewChoiceSchema, AgentSessionPlanReviewRequestSchema, AgentSessionPlanReviewResponseSchema, AgentSessionPlanSnapshotSchema, AgentSessionRequestSchema, AgentSessionResponseSchema, AgentSessionWorkspaceTargetSchema } from './sessionInteractions.js';
40
40
  import { AgentSessionBindingSchema, AgentSessionConfigurationSchema, AgentSessionOpenInputSchema } from './sessions.js';
41
41
  import { AgentContentReferenceInputPartSchema, AgentItemSnapshotSchema, AgentTurnInputContentSchema, AgentTurnInterruptionInputSchema, AgentTurnRunInputSchema } from './turns.js';
42
42
  type Extends<Left, Right> = [Left] extends [Right] ? true : false;
@@ -52,6 +52,24 @@ export type AgentProtocolSchemaTypeAssertions = readonly [
52
52
  Assert<Extends<AgentSessionDecisionRequest, z.output<typeof AgentSessionDecisionRequestSchema>>>,
53
53
  Assert<Extends<z.output<typeof AgentSessionDecisionResponseSchema>, AgentSessionDecisionResponse>>,
54
54
  Assert<Extends<AgentSessionDecisionResponse, z.output<typeof AgentSessionDecisionResponseSchema>>>,
55
+ Assert<Extends<z.output<typeof AgentSessionFormChoiceSchema>, AgentSessionFormChoice>>,
56
+ Assert<Extends<AgentSessionFormChoice, z.output<typeof AgentSessionFormChoiceSchema>>>,
57
+ Assert<Extends<z.output<typeof AgentSessionFormRequestSchema>, AgentSessionFormRequest>>,
58
+ Assert<Extends<AgentSessionFormRequest, z.output<typeof AgentSessionFormRequestSchema>>>,
59
+ Assert<Extends<z.output<typeof AgentSessionFormResponseSchema>, AgentSessionFormResponse>>,
60
+ Assert<Extends<AgentSessionFormResponse, z.output<typeof AgentSessionFormResponseSchema>>>,
61
+ Assert<Extends<z.output<typeof AgentSessionPlanSnapshotSchema>, AgentSessionPlanSnapshot>>,
62
+ Assert<Extends<AgentSessionPlanSnapshot, z.output<typeof AgentSessionPlanSnapshotSchema>>>,
63
+ Assert<Extends<z.output<typeof AgentSessionPlanReviewChoiceSchema>, AgentSessionPlanReviewChoice>>,
64
+ Assert<Extends<AgentSessionPlanReviewChoice, z.output<typeof AgentSessionPlanReviewChoiceSchema>>>,
65
+ Assert<Extends<z.output<typeof AgentSessionPlanReviewRequestSchema>, AgentSessionPlanReviewRequest>>,
66
+ Assert<Extends<AgentSessionPlanReviewRequest, z.output<typeof AgentSessionPlanReviewRequestSchema>>>,
67
+ Assert<Extends<z.output<typeof AgentSessionPlanReviewResponseSchema>, AgentSessionPlanReviewResponse>>,
68
+ Assert<Extends<AgentSessionPlanReviewResponse, z.output<typeof AgentSessionPlanReviewResponseSchema>>>,
69
+ Assert<Extends<z.output<typeof AgentSessionRequestSchema>, AgentSessionRequest>>,
70
+ Assert<Extends<AgentSessionRequest, z.output<typeof AgentSessionRequestSchema>>>,
71
+ Assert<Extends<z.output<typeof AgentSessionResponseSchema>, AgentSessionResponse>>,
72
+ Assert<Extends<AgentSessionResponse, z.output<typeof AgentSessionResponseSchema>>>,
55
73
  Assert<Extends<z.output<typeof AgentEffectiveContentCatalogSchema>, AgentEffectiveContentCatalog>>,
56
74
  Assert<Extends<AgentEffectiveContentCatalog, z.output<typeof AgentEffectiveContentCatalogSchema>>>,
57
75
  Assert<Extends<z.output<typeof AgentEffectiveContentDescriptorSchema>, AgentEffectiveContentDescriptor>>,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agen-ai/agent-protocol",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "private": false,
5
5
  "description": "Provider-neutral sessions, turns, requests, capabilities, artifacts, and events for coding-agent runtimes.",
6
6
  "type": "module",
@@ -104,7 +104,7 @@
104
104
  },
105
105
  "dependencies": {
106
106
  "zod": "4.4.3",
107
- "@agen-ai/validation": "^0.4.1"
107
+ "@agen-ai/validation": "^0.4.2"
108
108
  },
109
109
  "devDependencies": {
110
110
  "ajv": "8.17.1",