@agen-ai/agent-protocol 0.2.5 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -13
- package/dist/capabilities/contentReferenceText.d.ts +13 -0
- package/dist/capabilities/contentReferenceText.js +25 -0
- package/dist/capabilities/index.d.ts +1 -0
- package/dist/capabilities/index.js +1 -0
- package/dist/capabilities/types.d.ts +19 -1
- package/dist/capabilities/types.js +6 -0
- package/dist/commands/index.d.ts +3 -0
- package/dist/commands/index.js +2 -0
- package/dist/commands/parsers.d.ts +7 -0
- package/dist/commands/parsers.js +23 -0
- package/dist/commands/types.d.ts +26 -0
- package/dist/commands/types.js +10 -0
- package/dist/effectiveContent/index.d.ts +3 -0
- package/dist/effectiveContent/index.js +2 -0
- package/dist/effectiveContent/parsers.d.ts +7 -0
- package/dist/effectiveContent/parsers.js +23 -0
- package/dist/effectiveContent/types.d.ts +35 -0
- package/dist/effectiveContent/types.js +19 -0
- package/dist/environment/facts.d.ts +28 -0
- package/dist/environment/facts.js +39 -0
- package/dist/environment/index.d.ts +4 -0
- package/dist/environment/index.js +3 -0
- package/dist/environment/parsers.d.ts +17 -0
- package/dist/environment/parsers.js +68 -0
- package/dist/environment/types.d.ts +61 -0
- package/dist/environment/types.js +26 -0
- package/dist/events/types.d.ts +1 -1
- package/dist/extensions/index.d.ts +3 -0
- package/dist/extensions/index.js +2 -0
- package/dist/extensions/parsers.d.ts +7 -0
- package/dist/extensions/parsers.js +23 -0
- package/dist/extensions/types.d.ts +73 -0
- package/dist/extensions/types.js +30 -0
- package/dist/foundation/parsers.d.ts +9 -1
- package/dist/foundation/parsers.js +24 -0
- package/dist/foundation/types.d.ts +5 -1
- package/dist/foundation/types.js +1 -1
- package/dist/integrations/types.d.ts +22 -4
- package/dist/integrations/types.js +6 -2
- package/dist/jsonSchema/generated.d.ts +9390 -5844
- package/dist/jsonSchema/generated.js +2526 -157
- package/dist/public/commands.d.ts +2 -0
- package/dist/public/commands.js +1 -0
- package/dist/public/effectiveContent.d.ts +2 -0
- package/dist/public/effectiveContent.js +1 -0
- package/dist/public/environment.d.ts +2 -0
- package/dist/public/environment.js +1 -0
- package/dist/public/extensions.d.ts +2 -0
- package/dist/public/extensions.js +1 -0
- package/dist/public/index.d.ts +4 -0
- package/dist/public/index.js +4 -0
- package/dist/turns/parsers.d.ts +3 -1
- package/dist/turns/parsers.js +9 -0
- package/dist/turns/types.d.ts +13 -2
- package/dist/turns/types.js +4 -0
- package/dist/zod/capabilities.d.ts +79 -1
- package/dist/zod/capabilities.js +21 -5
- package/dist/zod/commands.d.ts +35 -0
- package/dist/zod/commands.js +114 -0
- package/dist/zod/effectiveContent.d.ts +72 -0
- package/dist/zod/effectiveContent.js +157 -0
- package/dist/zod/environment.d.ts +531 -0
- package/dist/zod/environment.js +336 -0
- package/dist/zod/environmentFacts.d.ts +10 -0
- package/dist/zod/environmentFacts.js +40 -0
- package/dist/zod/events.d.ts +21 -21
- package/dist/zod/extensions.d.ts +161 -0
- package/dist/zod/extensions.js +194 -0
- package/dist/zod/foundation.d.ts +5 -1
- package/dist/zod/foundation.js +8 -0
- package/dist/zod/index.d.ts +9 -4
- package/dist/zod/index.js +21 -2
- package/dist/zod/integrations.d.ts +50 -5
- package/dist/zod/integrations.js +49 -6
- package/dist/zod/turns.d.ts +33 -0
- package/dist/zod/turns.js +34 -1
- package/dist/zod/typeEquality.generated.d.ts +34 -4
- package/package.json +18 -2
package/dist/zod/integrations.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { z } from "zod/v4";
|
|
2
|
+
import { AgentAvailabilityFactSchema, AgentEnvironmentSourceSchema } from "./environmentFacts.js";
|
|
3
|
+
import { agentProtocolSerializedJsonBytes } from "../foundation/types.js";
|
|
2
4
|
import { compareStringsByUnicodeCodePoint } from "../foundation/ordering.js";
|
|
3
5
|
import {
|
|
4
6
|
AGENT_INTEGRATION_DESCRIPTION_MAX_LENGTH,
|
|
7
|
+
AGENT_INTEGRATION_CONTRIBUTIONS_MAX_LENGTH,
|
|
8
|
+
AGENT_INTEGRATION_CATALOG_BYTES_LIMIT,
|
|
5
9
|
AGENT_INTEGRATION_CATALOG_MAX_LENGTH,
|
|
6
10
|
AGENT_INTEGRATION_NAME_MAX_LENGTH,
|
|
7
11
|
AGENT_INTEGRATION_RESOURCES_MAX_LENGTH,
|
|
@@ -15,7 +19,8 @@ import {
|
|
|
15
19
|
AgentIntegrationServerIdSchema,
|
|
16
20
|
AgentIntegrationToolIdSchema,
|
|
17
21
|
AgentIsoDateTimeSchema,
|
|
18
|
-
createAgentCanonicalNonBlankStringSchema
|
|
22
|
+
createAgentCanonicalNonBlankStringSchema,
|
|
23
|
+
withAcyclicProtocolInput
|
|
19
24
|
} from "./foundation.js";
|
|
20
25
|
const PositiveSafeIntegerSchema = z.number().int().positive().max(Number.MAX_SAFE_INTEGER);
|
|
21
26
|
const NameSchema = createAgentCanonicalNonBlankStringSchema(AGENT_INTEGRATION_NAME_MAX_LENGTH);
|
|
@@ -53,7 +58,7 @@ function addOrderedUniqueIssues(values, path, label, context) {
|
|
|
53
58
|
seen.add(value);
|
|
54
59
|
});
|
|
55
60
|
}
|
|
56
|
-
const
|
|
61
|
+
const McpIntegrationSchema = z.object({
|
|
57
62
|
integrationId: AgentIntegrationIdSchema,
|
|
58
63
|
revision: PositiveSafeIntegerSchema,
|
|
59
64
|
kind: z.literal("mcp"),
|
|
@@ -61,19 +66,56 @@ const AgentIntegrationDescriptorPortableSchema = z.object({
|
|
|
61
66
|
status: z.enum(AGENT_INTEGRATION_STATUSES),
|
|
62
67
|
servers: z.array(ServerSchema).max(AGENT_INTEGRATION_SERVERS_MAX_LENGTH).readonly()
|
|
63
68
|
}).strict().readonly();
|
|
64
|
-
const
|
|
69
|
+
const ConnectorIntegrationSchema = z.object({
|
|
70
|
+
integrationId: AgentIntegrationIdSchema,
|
|
71
|
+
revision: PositiveSafeIntegerSchema,
|
|
72
|
+
kind: z.literal("connector"),
|
|
73
|
+
name: NameSchema,
|
|
74
|
+
description: DescriptionSchema.optional(),
|
|
75
|
+
source: AgentEnvironmentSourceSchema,
|
|
76
|
+
installation: AgentAvailabilityFactSchema,
|
|
77
|
+
enablement: AgentAvailabilityFactSchema,
|
|
78
|
+
authentication: AgentAvailabilityFactSchema,
|
|
79
|
+
health: z.enum(AGENT_INTEGRATION_STATUSES),
|
|
80
|
+
callability: AgentAvailabilityFactSchema,
|
|
81
|
+
tools: z.array(ToolSchema).max(AGENT_INTEGRATION_TOOLS_MAX_LENGTH).readonly().optional()
|
|
82
|
+
}).strict().readonly();
|
|
83
|
+
const AgentIntegrationDescriptorPortableSchema = z.discriminatedUnion("kind", [
|
|
84
|
+
McpIntegrationSchema,
|
|
85
|
+
ConnectorIntegrationSchema
|
|
86
|
+
]);
|
|
87
|
+
function validateIntegrationDescriptor(integration, context) {
|
|
88
|
+
if (integration.kind === "connector") {
|
|
89
|
+
addOrderedUniqueIssues((integration.tools ?? []).map((tool) => tool.toolId), ["tools"], "Connector tool IDs", context);
|
|
90
|
+
if (integration.callability.kind === "known" && integration.callability.value && [integration.installation, integration.enablement, integration.authentication].some((fact) => fact.kind === "known" && !fact.value)) {
|
|
91
|
+
context.addIssue({ code: "custom", path: ["callability"], message: "A connector cannot be callable when installation, enablement or authentication is denied." });
|
|
92
|
+
}
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
65
95
|
addOrderedUniqueIssues(integration.servers.map((server) => server.serverId), ["servers"], "Integration server IDs", context);
|
|
66
96
|
integration.servers.forEach((server, serverIndex) => {
|
|
67
97
|
addOrderedUniqueIssues(server.tools.map((tool) => tool.toolId), ["servers", serverIndex, "tools"], "Integration tool IDs", context);
|
|
68
98
|
addOrderedUniqueIssues(server.resources.map((resource) => resource.resourceId), ["servers", serverIndex, "resources"], "Integration resource IDs", context);
|
|
69
99
|
});
|
|
70
|
-
}
|
|
100
|
+
}
|
|
101
|
+
const AgentIntegrationDescriptorSchema = AgentIntegrationDescriptorPortableSchema.superRefine(validateIntegrationDescriptor);
|
|
102
|
+
const AgentMcpIntegrationDescriptorSchema = McpIntegrationSchema.superRefine(validateIntegrationDescriptor);
|
|
71
103
|
const AgentIntegrationCatalogPortableSchema = z.object({
|
|
72
104
|
revision: PositiveSafeIntegerSchema,
|
|
73
105
|
observedAt: AgentIsoDateTimeSchema,
|
|
74
106
|
integrations: z.array(AgentIntegrationDescriptorPortableSchema).max(AGENT_INTEGRATION_CATALOG_MAX_LENGTH).readonly()
|
|
75
107
|
}).strict().readonly();
|
|
76
|
-
const AgentIntegrationCatalogSchema = AgentIntegrationCatalogPortableSchema
|
|
108
|
+
const AgentIntegrationCatalogSchema = withAcyclicProtocolInput(AgentIntegrationCatalogPortableSchema, {
|
|
109
|
+
maxDepth: 16,
|
|
110
|
+
maxCollectionLength: AGENT_INTEGRATION_CONTRIBUTIONS_MAX_LENGTH
|
|
111
|
+
}).superRefine((catalog, context) => {
|
|
112
|
+
const contributions = catalog.integrations.reduce((count, integration) => count + (integration.kind === "mcp" ? integration.servers.reduce((total, server) => total + server.tools.length + server.resources.length, 0) : integration.tools?.length ?? 0), 0);
|
|
113
|
+
if (contributions > AGENT_INTEGRATION_CONTRIBUTIONS_MAX_LENGTH) {
|
|
114
|
+
context.addIssue({ code: "custom", path: ["integrations"], message: "Integration contributions exceed the aggregate limit." });
|
|
115
|
+
}
|
|
116
|
+
if (agentProtocolSerializedJsonBytes(catalog) > AGENT_INTEGRATION_CATALOG_BYTES_LIMIT) {
|
|
117
|
+
context.addIssue({ code: "custom", message: "Integration catalog exceeds its serialized UTF-8 byte limit." });
|
|
118
|
+
}
|
|
77
119
|
addOrderedUniqueIssues(catalog.integrations.map((integration) => integration.integrationId), ["integrations"], "Integration IDs", context);
|
|
78
120
|
catalog.integrations.forEach((integration, integrationIndex) => {
|
|
79
121
|
const parsed = AgentIntegrationDescriptorSchema.safeParse(integration);
|
|
@@ -88,5 +130,6 @@ export {
|
|
|
88
130
|
AgentIntegrationCatalogPortableSchema,
|
|
89
131
|
AgentIntegrationCatalogSchema,
|
|
90
132
|
AgentIntegrationDescriptorPortableSchema,
|
|
91
|
-
AgentIntegrationDescriptorSchema
|
|
133
|
+
AgentIntegrationDescriptorSchema,
|
|
134
|
+
AgentMcpIntegrationDescriptorSchema
|
|
92
135
|
};
|
package/dist/zod/turns.d.ts
CHANGED
|
@@ -36,6 +36,15 @@ export declare const AgentImageInputSourceSchema: z.ZodDiscriminatedUnion<[z.Zod
|
|
|
36
36
|
path: z.ZodString;
|
|
37
37
|
sha256: z.ZodString;
|
|
38
38
|
}, z.core.$strict>>], "type">;
|
|
39
|
+
export declare const AgentContentReferenceInputPartSchema: z.ZodReadonly<z.ZodObject<{
|
|
40
|
+
type: z.ZodLiteral<"content_reference">;
|
|
41
|
+
environmentId: z.ZodType<import("../index.js").AgentEnvironmentId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentEnvironmentId, unknown>>;
|
|
42
|
+
environmentRevision: z.ZodNumber;
|
|
43
|
+
contentCatalogRevision: z.ZodNumber;
|
|
44
|
+
contentId: z.ZodType<import("../index.js").AgentEffectiveContentId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentEffectiveContentId, unknown>>;
|
|
45
|
+
contentRevision: z.ZodNumber;
|
|
46
|
+
arguments: z.ZodOptional<z.ZodString>;
|
|
47
|
+
}, z.core.$strict>>;
|
|
39
48
|
export declare const AgentTurnInputPartSchema: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
|
|
40
49
|
type: z.ZodLiteral<"text">;
|
|
41
50
|
text: z.ZodString;
|
|
@@ -76,6 +85,14 @@ export declare const AgentTurnInputPartSchema: z.ZodDiscriminatedUnion<[z.ZodRea
|
|
|
76
85
|
path: z.ZodString;
|
|
77
86
|
sha256: z.ZodString;
|
|
78
87
|
}, z.core.$strict>>], "type">;
|
|
88
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
89
|
+
type: z.ZodLiteral<"content_reference">;
|
|
90
|
+
environmentId: z.ZodType<import("../index.js").AgentEnvironmentId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentEnvironmentId, unknown>>;
|
|
91
|
+
environmentRevision: z.ZodNumber;
|
|
92
|
+
contentCatalogRevision: z.ZodNumber;
|
|
93
|
+
contentId: z.ZodType<import("../index.js").AgentEffectiveContentId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentEffectiveContentId, unknown>>;
|
|
94
|
+
contentRevision: z.ZodNumber;
|
|
95
|
+
arguments: z.ZodOptional<z.ZodString>;
|
|
79
96
|
}, z.core.$strict>>], "type">;
|
|
80
97
|
export declare const AgentTurnInteractionModeSchema: z.ZodEnum<{
|
|
81
98
|
default: "default";
|
|
@@ -126,6 +143,14 @@ export declare const AgentTurnInputContentCompositionSchema: z.ZodObject<{
|
|
|
126
143
|
path: z.ZodString;
|
|
127
144
|
sha256: z.ZodString;
|
|
128
145
|
}, z.core.$strict>>], "type">;
|
|
146
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
147
|
+
type: z.ZodLiteral<"content_reference">;
|
|
148
|
+
environmentId: z.ZodType<import("../index.js").AgentEnvironmentId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentEnvironmentId, unknown>>;
|
|
149
|
+
environmentRevision: z.ZodNumber;
|
|
150
|
+
contentCatalogRevision: z.ZodNumber;
|
|
151
|
+
contentId: z.ZodType<import("../index.js").AgentEffectiveContentId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentEffectiveContentId, unknown>>;
|
|
152
|
+
contentRevision: z.ZodNumber;
|
|
153
|
+
arguments: z.ZodOptional<z.ZodString>;
|
|
129
154
|
}, z.core.$strict>>], "type">>>;
|
|
130
155
|
summary: z.ZodOptional<z.ZodString>;
|
|
131
156
|
}, z.core.$strict>;
|
|
@@ -172,6 +197,14 @@ export declare const AgentTurnRunInputPortableSchema: z.ZodReadonly<z.ZodObject<
|
|
|
172
197
|
path: z.ZodString;
|
|
173
198
|
sha256: z.ZodString;
|
|
174
199
|
}, z.core.$strict>>], "type">;
|
|
200
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
201
|
+
type: z.ZodLiteral<"content_reference">;
|
|
202
|
+
environmentId: z.ZodType<import("../index.js").AgentEnvironmentId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentEnvironmentId, unknown>>;
|
|
203
|
+
environmentRevision: z.ZodNumber;
|
|
204
|
+
contentCatalogRevision: z.ZodNumber;
|
|
205
|
+
contentId: z.ZodType<import("../index.js").AgentEffectiveContentId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentEffectiveContentId, unknown>>;
|
|
206
|
+
contentRevision: z.ZodNumber;
|
|
207
|
+
arguments: z.ZodOptional<z.ZodString>;
|
|
175
208
|
}, z.core.$strict>>], "type">>>;
|
|
176
209
|
summary: z.ZodOptional<z.ZodString>;
|
|
177
210
|
turnId: z.ZodType<import("../index.js").AgentTurnId, unknown, z.core.$ZodTypeInternals<import("../index.js").AgentTurnId, unknown>>;
|
package/dist/zod/turns.js
CHANGED
|
@@ -9,6 +9,8 @@ import {
|
|
|
9
9
|
import { compareStringsByUnicodeCodePoint } from "../foundation/ordering.js";
|
|
10
10
|
import {
|
|
11
11
|
AGENT_CONTENT_STREAM_KINDS,
|
|
12
|
+
AGENT_CONTENT_REFERENCES_MAX_LENGTH,
|
|
13
|
+
AGENT_CONTENT_REFERENCE_ARGUMENT_BYTES_LIMIT,
|
|
12
14
|
AGENT_CONTEXT_COMPACTION_DURATION_MAX_MILLISECONDS,
|
|
13
15
|
AGENT_CONTEXT_COMPACTION_SUMMARY_PREVIEW_MAX_LENGTH,
|
|
14
16
|
AGENT_CONTEXT_COMPACTION_TRIGGERS,
|
|
@@ -20,6 +22,8 @@ import {
|
|
|
20
22
|
import {
|
|
21
23
|
AgentCanonicalIdValueSchema,
|
|
22
24
|
AgentErrorSchema,
|
|
25
|
+
AgentEnvironmentIdSchema,
|
|
26
|
+
AgentEffectiveContentIdSchema,
|
|
23
27
|
AgentIsoDateTimeSchema,
|
|
24
28
|
AgentItemIdSchema,
|
|
25
29
|
AgentTurnIdSchema,
|
|
@@ -76,9 +80,24 @@ const AgentImageInputPartSchema = z.object({
|
|
|
76
80
|
type: z.literal("image"),
|
|
77
81
|
source: AgentImageInputSourceSchema
|
|
78
82
|
}).strict().readonly();
|
|
83
|
+
const ContentReferenceRevisionSchema = z.number().int().positive().max(Number.MAX_SAFE_INTEGER);
|
|
84
|
+
const AgentContentReferenceInputPartSchema = z.object({
|
|
85
|
+
type: z.literal("content_reference"),
|
|
86
|
+
environmentId: AgentEnvironmentIdSchema,
|
|
87
|
+
environmentRevision: ContentReferenceRevisionSchema,
|
|
88
|
+
contentCatalogRevision: ContentReferenceRevisionSchema,
|
|
89
|
+
contentId: AgentEffectiveContentIdSchema,
|
|
90
|
+
contentRevision: ContentReferenceRevisionSchema,
|
|
91
|
+
arguments: z.string().max(AGENT_CONTENT_REFERENCE_ARGUMENT_BYTES_LIMIT).optional()
|
|
92
|
+
}).strict().superRefine((part, context) => {
|
|
93
|
+
if (part.arguments !== void 0 && new TextEncoder().encode(part.arguments).byteLength > AGENT_CONTENT_REFERENCE_ARGUMENT_BYTES_LIMIT) {
|
|
94
|
+
context.addIssue({ code: "custom", path: ["arguments"], message: "Content reference arguments exceed their UTF-8 byte limit." });
|
|
95
|
+
}
|
|
96
|
+
}).readonly();
|
|
79
97
|
const AgentTurnInputPartSchema = z.discriminatedUnion("type", [
|
|
80
98
|
AgentTextInputPartSchema,
|
|
81
|
-
AgentImageInputPartSchema
|
|
99
|
+
AgentImageInputPartSchema,
|
|
100
|
+
AgentContentReferenceInputPartSchema
|
|
82
101
|
]);
|
|
83
102
|
const AgentTurnInteractionModeSchema = z.enum(
|
|
84
103
|
AGENT_TURN_INTERACTION_MODES
|
|
@@ -89,6 +108,19 @@ const AgentTurnInputContentShape = {
|
|
|
89
108
|
};
|
|
90
109
|
const AgentTurnInputContentObjectSchema = z.object(AgentTurnInputContentShape).strict();
|
|
91
110
|
const AgentTurnInputContentRefinedSchema = AgentTurnInputContentObjectSchema.superRefine((input, context) => {
|
|
111
|
+
const references = input.parts.filter((part) => part.type === "content_reference");
|
|
112
|
+
if (references.length > AGENT_CONTENT_REFERENCES_MAX_LENGTH) {
|
|
113
|
+
context.addIssue({ code: "custom", path: ["parts"], message: "Too many content references." });
|
|
114
|
+
}
|
|
115
|
+
const identities = /* @__PURE__ */ new Set();
|
|
116
|
+
input.parts.forEach((part, index) => {
|
|
117
|
+
if (part.type !== "content_reference") return;
|
|
118
|
+
const identity = JSON.stringify([part.environmentId, part.contentId]);
|
|
119
|
+
if (identities.has(identity)) {
|
|
120
|
+
context.addIssue({ code: "custom", path: ["parts", index], message: "Content references must be unique." });
|
|
121
|
+
}
|
|
122
|
+
identities.add(identity);
|
|
123
|
+
});
|
|
92
124
|
const content = {
|
|
93
125
|
parts: input.parts,
|
|
94
126
|
...input.summary === void 0 ? {} : { summary: input.summary }
|
|
@@ -408,6 +440,7 @@ export {
|
|
|
408
440
|
AgentCollaborationToolCallDetailsSchema,
|
|
409
441
|
AgentCommandExecutionDetailsSchema,
|
|
410
442
|
AgentComputerActionDetailsSchema,
|
|
443
|
+
AgentContentReferenceInputPartSchema,
|
|
411
444
|
AgentContentStreamKindSchema,
|
|
412
445
|
AgentContextCompactionDetailsSchema,
|
|
413
446
|
AgentDiffSummarySchema,
|
|
@@ -3,33 +3,61 @@ import type { AgentAccountQuotaSnapshot, AgentAccountQuotaWindow } from '../acco
|
|
|
3
3
|
import type { AgentArtifactDescriptor } from '../artifacts/types.js';
|
|
4
4
|
import type { AgentCapabilities } from '../capabilities/types.js';
|
|
5
5
|
import type { AgentCollaborationControlInput, AgentCollaborationNode, AgentCollaborationSpawnInput } from '../collaboration/types.js';
|
|
6
|
+
import type { AgentCommandCatalog, AgentCommandDescriptor } from '../commands/types.js';
|
|
6
7
|
import type { AgentConfigurationCatalog, AgentConfigurationSelectionInput } from '../configuration/types.js';
|
|
8
|
+
import type { AgentEffectiveContentCatalog, AgentEffectiveContentDescriptor } from '../effectiveContent/types.js';
|
|
9
|
+
import type { AgentEnvironmentCapability, AgentEnvironmentInvalidation, AgentEnvironmentSnapshot } from '../environment/types.js';
|
|
7
10
|
import type { AgentEvent } from '../events/types.js';
|
|
11
|
+
import type { AgentExtensionCatalog, AgentExtensionDescriptor } from '../extensions/types.js';
|
|
8
12
|
import type { AgentError, AgentJsonValue, AgentProviderRefs } from '../foundation/types.js';
|
|
9
|
-
import type { AgentIntegrationCatalog, AgentIntegrationDescriptor } from '../integrations/types.js';
|
|
13
|
+
import type { AgentIntegrationCatalog, AgentIntegrationDescriptor, AgentMcpIntegrationDescriptor } from '../integrations/types.js';
|
|
10
14
|
import type { AgentManagedContentCatalog, AgentManagedContentDescriptor } from '../managedContent/types.js';
|
|
11
15
|
import type { AgentOperationCatalog, AgentOperationDescriptor, AgentOperationInvocation, AgentOperationResult } from '../operations/types.js';
|
|
12
16
|
import type { AgentRequest, AgentRequestResolution } from '../requests/types.js';
|
|
13
17
|
import type { AgentGeneratedResourceDescriptor } from '../resources/types.js';
|
|
14
18
|
import type { AgentSessionBinding, AgentSessionConfiguration, AgentSessionOpenInput } from '../sessions/types.js';
|
|
15
|
-
import type { AgentItemSnapshot, AgentTurnInputContent, AgentTurnInterruptionInput, AgentTurnRunInput } from '../turns/types.js';
|
|
19
|
+
import type { AgentContentReferenceInputPart, AgentItemSnapshot, AgentTurnInputContent, AgentTurnInterruptionInput, AgentTurnRunInput } from '../turns/types.js';
|
|
16
20
|
import { AgentAccountQuotaSnapshotSchema, AgentAccountQuotaWindowSchema } from './accountQuota.js';
|
|
17
21
|
import { AgentArtifactDescriptorSchema } from './artifacts.js';
|
|
18
22
|
import { AgentCapabilitiesSchema } from './capabilities.js';
|
|
19
23
|
import { AgentCollaborationControlInputSchema, AgentCollaborationNodeSchema, AgentCollaborationSpawnInputSchema } from './collaboration.js';
|
|
24
|
+
import { AgentCommandCatalogSchema, AgentCommandDescriptorSchema } from './commands.js';
|
|
20
25
|
import { AgentConfigurationCatalogSchema, AgentConfigurationSelectionInputSchema } from './configuration.js';
|
|
26
|
+
import { AgentEffectiveContentCatalogSchema, AgentEffectiveContentDescriptorSchema } from './effectiveContent.js';
|
|
27
|
+
import { AgentEnvironmentCapabilitySchema, AgentEnvironmentInvalidationSchema, AgentEnvironmentSnapshotSchema } from './environment.js';
|
|
21
28
|
import { AgentEventSchema } from './events.js';
|
|
29
|
+
import { AgentExtensionCatalogSchema, AgentExtensionDescriptorSchema } from './extensions.js';
|
|
22
30
|
import { AgentErrorSchema, AgentJsonValueSchema, AgentProviderRefsSchema } from './foundation.js';
|
|
23
|
-
import { AgentIntegrationCatalogSchema, AgentIntegrationDescriptorSchema } from './integrations.js';
|
|
31
|
+
import { AgentIntegrationCatalogSchema, AgentIntegrationDescriptorSchema, AgentMcpIntegrationDescriptorSchema } from './integrations.js';
|
|
24
32
|
import { AgentManagedContentCatalogSchema, AgentManagedContentDescriptorSchema } from './managedContent.js';
|
|
25
33
|
import { AgentOperationCatalogSchema, AgentOperationDescriptorSchema, AgentOperationInvocationSchema, AgentOperationResultSchema } from './operations.js';
|
|
26
34
|
import { AgentRequestResolutionSchema, AgentRequestSchema } from './requests.js';
|
|
27
35
|
import { AgentGeneratedResourceDescriptorSchema } from './resources.js';
|
|
28
36
|
import { AgentSessionBindingSchema, AgentSessionConfigurationSchema, AgentSessionOpenInputSchema } from './sessions.js';
|
|
29
|
-
import { AgentItemSnapshotSchema, AgentTurnInputContentSchema, AgentTurnInterruptionInputSchema, AgentTurnRunInputSchema } from './turns.js';
|
|
37
|
+
import { AgentContentReferenceInputPartSchema, AgentItemSnapshotSchema, AgentTurnInputContentSchema, AgentTurnInterruptionInputSchema, AgentTurnRunInputSchema } from './turns.js';
|
|
30
38
|
type Extends<Left, Right> = [Left] extends [Right] ? true : false;
|
|
31
39
|
type Assert<Value extends true> = Value;
|
|
32
40
|
export type AgentProtocolSchemaTypeAssertions = readonly [
|
|
41
|
+
Assert<Extends<z.output<typeof AgentEffectiveContentCatalogSchema>, AgentEffectiveContentCatalog>>,
|
|
42
|
+
Assert<Extends<AgentEffectiveContentCatalog, z.output<typeof AgentEffectiveContentCatalogSchema>>>,
|
|
43
|
+
Assert<Extends<z.output<typeof AgentEffectiveContentDescriptorSchema>, AgentEffectiveContentDescriptor>>,
|
|
44
|
+
Assert<Extends<AgentEffectiveContentDescriptor, z.output<typeof AgentEffectiveContentDescriptorSchema>>>,
|
|
45
|
+
Assert<Extends<z.output<typeof AgentCommandCatalogSchema>, AgentCommandCatalog>>,
|
|
46
|
+
Assert<Extends<AgentCommandCatalog, z.output<typeof AgentCommandCatalogSchema>>>,
|
|
47
|
+
Assert<Extends<z.output<typeof AgentCommandDescriptorSchema>, AgentCommandDescriptor>>,
|
|
48
|
+
Assert<Extends<AgentCommandDescriptor, z.output<typeof AgentCommandDescriptorSchema>>>,
|
|
49
|
+
Assert<Extends<z.output<typeof AgentExtensionCatalogSchema>, AgentExtensionCatalog>>,
|
|
50
|
+
Assert<Extends<AgentExtensionCatalog, z.output<typeof AgentExtensionCatalogSchema>>>,
|
|
51
|
+
Assert<Extends<z.output<typeof AgentExtensionDescriptorSchema>, AgentExtensionDescriptor>>,
|
|
52
|
+
Assert<Extends<AgentExtensionDescriptor, z.output<typeof AgentExtensionDescriptorSchema>>>,
|
|
53
|
+
Assert<Extends<z.output<typeof AgentEnvironmentSnapshotSchema>, AgentEnvironmentSnapshot>>,
|
|
54
|
+
Assert<Extends<AgentEnvironmentSnapshot, z.output<typeof AgentEnvironmentSnapshotSchema>>>,
|
|
55
|
+
Assert<Extends<z.output<typeof AgentEnvironmentInvalidationSchema>, AgentEnvironmentInvalidation>>,
|
|
56
|
+
Assert<Extends<AgentEnvironmentInvalidation, z.output<typeof AgentEnvironmentInvalidationSchema>>>,
|
|
57
|
+
Assert<Extends<z.output<typeof AgentEnvironmentCapabilitySchema>, AgentEnvironmentCapability>>,
|
|
58
|
+
Assert<Extends<AgentEnvironmentCapability, z.output<typeof AgentEnvironmentCapabilitySchema>>>,
|
|
59
|
+
Assert<Extends<z.output<typeof AgentContentReferenceInputPartSchema>, AgentContentReferenceInputPart>>,
|
|
60
|
+
Assert<Extends<AgentContentReferenceInputPart, z.output<typeof AgentContentReferenceInputPartSchema>>>,
|
|
33
61
|
Assert<Extends<z.output<typeof AgentAccountQuotaSnapshotSchema>, AgentAccountQuotaSnapshot>>,
|
|
34
62
|
Assert<Extends<AgentAccountQuotaSnapshot, z.output<typeof AgentAccountQuotaSnapshotSchema>>>,
|
|
35
63
|
Assert<Extends<z.output<typeof AgentAccountQuotaWindowSchema>, AgentAccountQuotaWindow>>,
|
|
@@ -78,6 +106,8 @@ export type AgentProtocolSchemaTypeAssertions = readonly [
|
|
|
78
106
|
Assert<Extends<AgentIntegrationCatalog, z.output<typeof AgentIntegrationCatalogSchema>>>,
|
|
79
107
|
Assert<Extends<z.output<typeof AgentIntegrationDescriptorSchema>, AgentIntegrationDescriptor>>,
|
|
80
108
|
Assert<Extends<AgentIntegrationDescriptor, z.output<typeof AgentIntegrationDescriptorSchema>>>,
|
|
109
|
+
Assert<Extends<z.output<typeof AgentMcpIntegrationDescriptorSchema>, AgentMcpIntegrationDescriptor>>,
|
|
110
|
+
Assert<Extends<AgentMcpIntegrationDescriptor, z.output<typeof AgentMcpIntegrationDescriptorSchema>>>,
|
|
81
111
|
Assert<Extends<z.output<typeof AgentCollaborationNodeSchema>, AgentCollaborationNode>>,
|
|
82
112
|
Assert<Extends<AgentCollaborationNode, z.output<typeof AgentCollaborationNodeSchema>>>,
|
|
83
113
|
Assert<Extends<z.output<typeof AgentCollaborationSpawnInputSchema>, AgentCollaborationSpawnInput>>,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agen-ai/agent-protocol",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Provider-neutral sessions, turns, requests, capabilities, artifacts, and events for coding-agent runtimes.",
|
|
6
6
|
"type": "module",
|
|
@@ -80,11 +80,27 @@
|
|
|
80
80
|
"./account-quota": {
|
|
81
81
|
"types": "./dist/public/accountQuota.d.ts",
|
|
82
82
|
"import": "./dist/public/accountQuota.js"
|
|
83
|
+
},
|
|
84
|
+
"./effective-content": {
|
|
85
|
+
"types": "./dist/public/effectiveContent.d.ts",
|
|
86
|
+
"import": "./dist/public/effectiveContent.js"
|
|
87
|
+
},
|
|
88
|
+
"./commands": {
|
|
89
|
+
"types": "./dist/public/commands.d.ts",
|
|
90
|
+
"import": "./dist/public/commands.js"
|
|
91
|
+
},
|
|
92
|
+
"./extensions": {
|
|
93
|
+
"types": "./dist/public/extensions.d.ts",
|
|
94
|
+
"import": "./dist/public/extensions.js"
|
|
95
|
+
},
|
|
96
|
+
"./environment": {
|
|
97
|
+
"types": "./dist/public/environment.d.ts",
|
|
98
|
+
"import": "./dist/public/environment.js"
|
|
83
99
|
}
|
|
84
100
|
},
|
|
85
101
|
"dependencies": {
|
|
86
102
|
"zod": "4.4.3",
|
|
87
|
-
"@agen-ai/validation": "^0.
|
|
103
|
+
"@agen-ai/validation": "^0.3.0"
|
|
88
104
|
},
|
|
89
105
|
"devDependencies": {
|
|
90
106
|
"ajv": "8.17.1",
|