@agen-ai/agent-protocol 0.2.1 → 0.2.3
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 +22 -12
- package/dist/capabilities/types.d.ts +64 -18
- package/dist/capabilities/types.js +0 -6
- package/dist/collaboration/index.d.ts +3 -0
- package/dist/collaboration/index.js +2 -0
- package/dist/collaboration/parsers.d.ts +9 -0
- package/dist/collaboration/parsers.js +32 -0
- package/dist/collaboration/types.d.ts +88 -0
- package/dist/collaboration/types.js +64 -0
- package/dist/configuration/index.d.ts +3 -0
- package/dist/configuration/index.js +2 -0
- package/dist/configuration/parsers.d.ts +9 -0
- package/dist/configuration/parsers.js +98 -0
- package/dist/configuration/types.d.ts +72 -0
- package/dist/configuration/types.js +27 -0
- package/dist/events/types.d.ts +15 -3
- package/dist/events/types.js +3 -0
- package/dist/foundation/parsers.d.ts +19 -1
- package/dist/foundation/parsers.js +70 -0
- package/dist/foundation/types.d.ts +10 -1
- package/dist/foundation/types.js +1 -1
- package/dist/integrations/index.d.ts +3 -0
- package/dist/integrations/index.js +2 -0
- package/dist/integrations/parsers.d.ts +7 -0
- package/dist/integrations/parsers.js +23 -0
- package/dist/integrations/types.d.ts +43 -0
- package/dist/integrations/types.js +23 -0
- package/dist/jsonSchema/generated.d.ts +9573 -3378
- package/dist/jsonSchema/generated.js +4935 -973
- package/dist/managedContent/index.d.ts +3 -0
- package/dist/managedContent/index.js +2 -0
- package/dist/managedContent/parsers.d.ts +7 -0
- package/dist/managedContent/parsers.js +23 -0
- package/dist/managedContent/types.d.ts +39 -0
- package/dist/managedContent/types.js +21 -0
- package/dist/operations/index.d.ts +3 -0
- package/dist/operations/index.js +2 -0
- package/dist/operations/parsers.d.ts +15 -0
- package/dist/operations/parsers.js +181 -0
- package/dist/operations/types.d.ts +112 -0
- package/dist/operations/types.js +67 -0
- package/dist/public/collaboration.d.ts +2 -0
- package/dist/public/collaboration.js +1 -0
- package/dist/public/configuration.d.ts +2 -0
- package/dist/public/configuration.js +1 -0
- package/dist/public/index.d.ts +6 -0
- package/dist/public/index.js +6 -0
- package/dist/public/integrations.d.ts +2 -0
- package/dist/public/integrations.js +1 -0
- package/dist/public/managedContent.d.ts +2 -0
- package/dist/public/managedContent.js +1 -0
- package/dist/public/operations.d.ts +2 -0
- package/dist/public/operations.js +1 -0
- package/dist/public/resources.d.ts +2 -0
- package/dist/public/resources.js +1 -0
- package/dist/requests/parsers.js +40 -11
- package/dist/requests/types.d.ts +35 -8
- package/dist/requests/types.js +15 -1
- package/dist/resources/index.d.ts +3 -0
- package/dist/resources/index.js +2 -0
- package/dist/resources/parsers.d.ts +5 -0
- package/dist/resources/parsers.js +12 -0
- package/dist/resources/types.d.ts +39 -0
- package/dist/resources/types.js +19 -0
- package/dist/sessions/types.d.ts +15 -4
- package/dist/zod/capabilities.d.ts +103 -15
- package/dist/zod/capabilities.js +218 -56
- package/dist/zod/collaboration.d.ts +60 -0
- package/dist/zod/collaboration.js +155 -0
- package/dist/zod/configuration.d.ts +177 -0
- package/dist/zod/configuration.js +157 -0
- package/dist/zod/events.d.ts +214 -22
- package/dist/zod/events.js +15 -0
- package/dist/zod/foundation.d.ts +10 -1
- package/dist/zod/foundation.js +18 -0
- package/dist/zod/index.d.ts +7 -1
- package/dist/zod/index.js +62 -0
- package/dist/zod/integrations.d.ts +76 -0
- package/dist/zod/integrations.js +92 -0
- package/dist/zod/managedContent.d.ts +9 -0
- package/dist/zod/managedContent.js +70 -0
- package/dist/zod/operations.d.ts +339 -0
- package/dist/zod/operations.js +229 -0
- package/dist/zod/requests.d.ts +100 -11
- package/dist/zod/requests.js +68 -27
- package/dist/zod/resources.d.ts +43 -0
- package/dist/zod/resources.js +82 -0
- package/dist/zod/sessions.d.ts +168 -21
- package/dist/zod/sessions.js +54 -42
- package/dist/zod/typeEquality.generated.d.ts +40 -0
- package/package.json +26 -2
package/dist/events/types.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import type { AgentArtifactDescriptor } from '../artifacts/index.js';
|
|
2
|
+
import type { AgentCollaborationNode } from '../collaboration/index.js';
|
|
2
3
|
import type { AgentArtifactId, AgentError, AgentErrorContext, AgentIsoDateTime, AgentItemId, AgentProviderRefs, AgentRequestId, AgentSessionId, AgentTurnId } from '../foundation/index.js';
|
|
3
4
|
import type { AgentRequest } from '../requests/index.js';
|
|
5
|
+
import type { AgentOperationResult } from '../operations/index.js';
|
|
6
|
+
import type { AgentGeneratedResourceDescriptor } from '../resources/index.js';
|
|
4
7
|
import type { AgentContentStreamKind, AgentContextUsage, AgentDiffSummary, AgentItemSnapshot, AgentPlanStep, AgentTurnCompletedPayload, AgentTurnState } from '../turns/index.js';
|
|
5
|
-
export declare const AGENT_EVENT_TYPES: readonly ["turn.started", "turn.state_changed", "turn.completed", "item.started", "item.updated", "item.completed", "content.delta", "turn.plan.updated", "turn.plan.proposed", "turn.diff.updated", "request.opened", "progress.updated", "context.usage.updated", "artifact.referenced", "runtime.warning", "runtime.error", "provider.diagnostic"];
|
|
8
|
+
export declare const AGENT_EVENT_TYPES: readonly ["turn.started", "turn.state_changed", "turn.completed", "item.started", "item.updated", "item.completed", "content.delta", "turn.plan.updated", "turn.plan.proposed", "turn.diff.updated", "request.opened", "progress.updated", "context.usage.updated", "artifact.referenced", "operation.updated", "collaboration.updated", "resource.updated", "runtime.warning", "runtime.error", "provider.diagnostic"];
|
|
6
9
|
export type AgentEventType = (typeof AGENT_EVENT_TYPES)[number];
|
|
7
10
|
interface AgentEventBase<Type extends AgentEventType, Payload> {
|
|
8
|
-
readonly protocolVersion:
|
|
11
|
+
readonly protocolVersion: 8;
|
|
9
12
|
readonly type: Type;
|
|
10
13
|
readonly sessionId: AgentSessionId;
|
|
11
14
|
readonly providerRefs?: AgentProviderRefs;
|
|
@@ -60,6 +63,15 @@ export type AgentContextUsageUpdatedEvent = AgentTurnEventBase<'context.usage.up
|
|
|
60
63
|
export type AgentArtifactReferencedEvent = AgentOptionallyTurnScopedEventBase<'artifact.referenced', Readonly<{
|
|
61
64
|
artifact: AgentArtifactDescriptor;
|
|
62
65
|
}>>;
|
|
66
|
+
export type AgentOperationUpdatedEvent = AgentOptionallyTurnScopedEventBase<'operation.updated', Readonly<{
|
|
67
|
+
result: AgentOperationResult;
|
|
68
|
+
}>>;
|
|
69
|
+
export type AgentCollaborationUpdatedEvent = AgentOptionallyTurnScopedEventBase<'collaboration.updated', Readonly<{
|
|
70
|
+
node: AgentCollaborationNode;
|
|
71
|
+
}>>;
|
|
72
|
+
export type AgentResourceUpdatedEvent = AgentOptionallyTurnScopedEventBase<'resource.updated', Readonly<{
|
|
73
|
+
resource: AgentGeneratedResourceDescriptor;
|
|
74
|
+
}>>;
|
|
63
75
|
export type AgentRuntimeWarningEvent = AgentOptionallyTurnScopedEventBase<'runtime.warning', Readonly<{
|
|
64
76
|
code: string;
|
|
65
77
|
message: string;
|
|
@@ -74,6 +86,6 @@ export type AgentProviderDiagnosticEvent = AgentOptionallyTurnScopedEventBase<'p
|
|
|
74
86
|
message: string;
|
|
75
87
|
context?: AgentErrorContext;
|
|
76
88
|
}>>;
|
|
77
|
-
export type AgentEvent = AgentTurnStartedEvent | AgentTurnStateChangedEvent | AgentTurnCompletedEvent | AgentItemStartedEvent | AgentItemUpdatedEvent | AgentItemCompletedEvent | AgentContentDeltaEvent | AgentPlanUpdatedEvent | AgentPlanProposedEvent | AgentDiffUpdatedEvent | AgentRequestOpenedEvent | AgentProgressUpdatedEvent | AgentContextUsageUpdatedEvent | AgentArtifactReferencedEvent | AgentRuntimeWarningEvent | AgentRuntimeErrorEvent | AgentProviderDiagnosticEvent;
|
|
89
|
+
export type AgentEvent = AgentTurnStartedEvent | AgentTurnStateChangedEvent | AgentTurnCompletedEvent | AgentItemStartedEvent | AgentItemUpdatedEvent | AgentItemCompletedEvent | AgentContentDeltaEvent | AgentPlanUpdatedEvent | AgentPlanProposedEvent | AgentDiffUpdatedEvent | AgentRequestOpenedEvent | AgentProgressUpdatedEvent | AgentContextUsageUpdatedEvent | AgentArtifactReferencedEvent | AgentOperationUpdatedEvent | AgentCollaborationUpdatedEvent | AgentResourceUpdatedEvent | AgentRuntimeWarningEvent | AgentRuntimeErrorEvent | AgentProviderDiagnosticEvent;
|
|
78
90
|
export {};
|
|
79
91
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/events/types.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AgentArtifactId, AgentApprovalOptionId, AgentConfigurationRevisionId, AgentError, AgentInstanceId, AgentIsoDateTime, AgentItemId, AgentJsonValue, AgentProviderConversationId, AgentProviderHistoryAnchor, AgentProviderItemRef, AgentProviderKey, AgentProviderRefs, AgentProviderRequestRef, AgentProviderTurnRef, AgentRequestFieldId, AgentRequestId, AgentSessionId, AgentTurnId } from './types.js';
|
|
1
|
+
import type { AgentArtifactId, AgentApprovalOptionId, AgentCollaborationId, AgentConfigurationRevisionId, AgentError, AgentGeneratedResourceId, AgentInstanceId, AgentIntegrationId, AgentIntegrationResourceId, AgentIntegrationServerId, AgentIntegrationToolId, AgentIsoDateTime, AgentItemId, AgentJsonValue, AgentManagedContentId, AgentOperationId, AgentOperationInvocationId, AgentProviderConversationId, AgentProviderHistoryAnchor, AgentProviderItemRef, AgentProviderKey, AgentProviderRefs, AgentProviderRequestRef, AgentProviderTurnRef, AgentRequestFieldId, AgentRequestId, AgentSessionId, AgentTurnId } from './types.js';
|
|
2
2
|
import type { AgentProtocolParseResult } from './validation.js';
|
|
3
3
|
export declare const parseAgentInstanceId: (input: unknown) => AgentInstanceId;
|
|
4
4
|
export declare const safeParseAgentInstanceId: (input: unknown) => AgentProtocolParseResult<AgentInstanceId>;
|
|
@@ -16,6 +16,24 @@ export declare const parseAgentRequestFieldId: (input: unknown) => AgentRequestF
|
|
|
16
16
|
export declare const safeParseAgentRequestFieldId: (input: unknown) => AgentProtocolParseResult<AgentRequestFieldId>;
|
|
17
17
|
export declare const parseAgentArtifactId: (input: unknown) => AgentArtifactId;
|
|
18
18
|
export declare const safeParseAgentArtifactId: (input: unknown) => AgentProtocolParseResult<AgentArtifactId>;
|
|
19
|
+
export declare const parseAgentOperationId: (input: unknown) => AgentOperationId;
|
|
20
|
+
export declare const safeParseAgentOperationId: (input: unknown) => AgentProtocolParseResult<AgentOperationId>;
|
|
21
|
+
export declare const parseAgentOperationInvocationId: (input: unknown) => AgentOperationInvocationId;
|
|
22
|
+
export declare const safeParseAgentOperationInvocationId: (input: unknown) => AgentProtocolParseResult<AgentOperationInvocationId>;
|
|
23
|
+
export declare const parseAgentManagedContentId: (input: unknown) => AgentManagedContentId;
|
|
24
|
+
export declare const safeParseAgentManagedContentId: (input: unknown) => AgentProtocolParseResult<AgentManagedContentId>;
|
|
25
|
+
export declare const parseAgentIntegrationId: (input: unknown) => AgentIntegrationId;
|
|
26
|
+
export declare const safeParseAgentIntegrationId: (input: unknown) => AgentProtocolParseResult<AgentIntegrationId>;
|
|
27
|
+
export declare const parseAgentIntegrationServerId: (input: unknown) => AgentIntegrationServerId;
|
|
28
|
+
export declare const safeParseAgentIntegrationServerId: (input: unknown) => AgentProtocolParseResult<AgentIntegrationServerId>;
|
|
29
|
+
export declare const parseAgentIntegrationToolId: (input: unknown) => AgentIntegrationToolId;
|
|
30
|
+
export declare const safeParseAgentIntegrationToolId: (input: unknown) => AgentProtocolParseResult<AgentIntegrationToolId>;
|
|
31
|
+
export declare const parseAgentIntegrationResourceId: (input: unknown) => AgentIntegrationResourceId;
|
|
32
|
+
export declare const safeParseAgentIntegrationResourceId: (input: unknown) => AgentProtocolParseResult<AgentIntegrationResourceId>;
|
|
33
|
+
export declare const parseAgentCollaborationId: (input: unknown) => AgentCollaborationId;
|
|
34
|
+
export declare const safeParseAgentCollaborationId: (input: unknown) => AgentProtocolParseResult<AgentCollaborationId>;
|
|
35
|
+
export declare const parseAgentGeneratedResourceId: (input: unknown) => AgentGeneratedResourceId;
|
|
36
|
+
export declare const safeParseAgentGeneratedResourceId: (input: unknown) => AgentProtocolParseResult<AgentGeneratedResourceId>;
|
|
19
37
|
export declare const parseAgentConfigurationRevisionId: (input: unknown) => AgentConfigurationRevisionId;
|
|
20
38
|
export declare const safeParseAgentConfigurationRevisionId: (input: unknown) => AgentProtocolParseResult<AgentConfigurationRevisionId>;
|
|
21
39
|
export declare const parseAgentProviderConversationId: (input: unknown) => AgentProviderConversationId;
|
|
@@ -2,12 +2,21 @@ import { parseWithSchema, safeParseWithSchema } from "../internal/parsers.js";
|
|
|
2
2
|
import {
|
|
3
3
|
AgentArtifactIdSchema,
|
|
4
4
|
AgentApprovalOptionIdSchema,
|
|
5
|
+
AgentCollaborationIdSchema,
|
|
5
6
|
AgentConfigurationRevisionIdSchema,
|
|
7
|
+
AgentGeneratedResourceIdSchema,
|
|
6
8
|
AgentErrorSchema,
|
|
7
9
|
AgentInstanceIdSchema,
|
|
10
|
+
AgentIntegrationIdSchema,
|
|
11
|
+
AgentIntegrationResourceIdSchema,
|
|
12
|
+
AgentIntegrationServerIdSchema,
|
|
13
|
+
AgentIntegrationToolIdSchema,
|
|
8
14
|
AgentIsoDateTimeSchema,
|
|
9
15
|
AgentItemIdSchema,
|
|
10
16
|
AgentJsonValueSchema,
|
|
17
|
+
AgentManagedContentIdSchema,
|
|
18
|
+
AgentOperationIdSchema,
|
|
19
|
+
AgentOperationInvocationIdSchema,
|
|
11
20
|
AgentProviderConversationIdSchema,
|
|
12
21
|
AgentProviderHistoryAnchorSchema,
|
|
13
22
|
AgentProviderItemRefSchema,
|
|
@@ -38,6 +47,31 @@ const requestFieldIdParser = idParser(
|
|
|
38
47
|
AgentRequestFieldIdSchema
|
|
39
48
|
);
|
|
40
49
|
const artifactIdParser = idParser(AgentArtifactIdSchema);
|
|
50
|
+
const operationIdParser = idParser(AgentOperationIdSchema);
|
|
51
|
+
const operationInvocationIdParser = idParser(
|
|
52
|
+
AgentOperationInvocationIdSchema
|
|
53
|
+
);
|
|
54
|
+
const managedContentIdParser = idParser(
|
|
55
|
+
AgentManagedContentIdSchema
|
|
56
|
+
);
|
|
57
|
+
const integrationIdParser = idParser(
|
|
58
|
+
AgentIntegrationIdSchema
|
|
59
|
+
);
|
|
60
|
+
const integrationServerIdParser = idParser(
|
|
61
|
+
AgentIntegrationServerIdSchema
|
|
62
|
+
);
|
|
63
|
+
const integrationToolIdParser = idParser(
|
|
64
|
+
AgentIntegrationToolIdSchema
|
|
65
|
+
);
|
|
66
|
+
const integrationResourceIdParser = idParser(
|
|
67
|
+
AgentIntegrationResourceIdSchema
|
|
68
|
+
);
|
|
69
|
+
const collaborationIdParser = idParser(
|
|
70
|
+
AgentCollaborationIdSchema
|
|
71
|
+
);
|
|
72
|
+
const generatedResourceIdParser = idParser(
|
|
73
|
+
AgentGeneratedResourceIdSchema
|
|
74
|
+
);
|
|
41
75
|
const revisionIdParser = idParser(
|
|
42
76
|
AgentConfigurationRevisionIdSchema
|
|
43
77
|
);
|
|
@@ -72,6 +106,24 @@ const parseAgentRequestFieldId = requestFieldIdParser.parse;
|
|
|
72
106
|
const safeParseAgentRequestFieldId = requestFieldIdParser.safeParse;
|
|
73
107
|
const parseAgentArtifactId = artifactIdParser.parse;
|
|
74
108
|
const safeParseAgentArtifactId = artifactIdParser.safeParse;
|
|
109
|
+
const parseAgentOperationId = operationIdParser.parse;
|
|
110
|
+
const safeParseAgentOperationId = operationIdParser.safeParse;
|
|
111
|
+
const parseAgentOperationInvocationId = operationInvocationIdParser.parse;
|
|
112
|
+
const safeParseAgentOperationInvocationId = operationInvocationIdParser.safeParse;
|
|
113
|
+
const parseAgentManagedContentId = managedContentIdParser.parse;
|
|
114
|
+
const safeParseAgentManagedContentId = managedContentIdParser.safeParse;
|
|
115
|
+
const parseAgentIntegrationId = integrationIdParser.parse;
|
|
116
|
+
const safeParseAgentIntegrationId = integrationIdParser.safeParse;
|
|
117
|
+
const parseAgentIntegrationServerId = integrationServerIdParser.parse;
|
|
118
|
+
const safeParseAgentIntegrationServerId = integrationServerIdParser.safeParse;
|
|
119
|
+
const parseAgentIntegrationToolId = integrationToolIdParser.parse;
|
|
120
|
+
const safeParseAgentIntegrationToolId = integrationToolIdParser.safeParse;
|
|
121
|
+
const parseAgentIntegrationResourceId = integrationResourceIdParser.parse;
|
|
122
|
+
const safeParseAgentIntegrationResourceId = integrationResourceIdParser.safeParse;
|
|
123
|
+
const parseAgentCollaborationId = collaborationIdParser.parse;
|
|
124
|
+
const safeParseAgentCollaborationId = collaborationIdParser.safeParse;
|
|
125
|
+
const parseAgentGeneratedResourceId = generatedResourceIdParser.parse;
|
|
126
|
+
const safeParseAgentGeneratedResourceId = generatedResourceIdParser.safeParse;
|
|
75
127
|
const parseAgentConfigurationRevisionId = revisionIdParser.parse;
|
|
76
128
|
const safeParseAgentConfigurationRevisionId = revisionIdParser.safeParse;
|
|
77
129
|
const parseAgentProviderConversationId = conversationIdParser.parse;
|
|
@@ -117,12 +169,21 @@ function safeParseAgentError(input) {
|
|
|
117
169
|
export {
|
|
118
170
|
parseAgentApprovalOptionId,
|
|
119
171
|
parseAgentArtifactId,
|
|
172
|
+
parseAgentCollaborationId,
|
|
120
173
|
parseAgentConfigurationRevisionId,
|
|
121
174
|
parseAgentError,
|
|
175
|
+
parseAgentGeneratedResourceId,
|
|
122
176
|
parseAgentInstanceId,
|
|
177
|
+
parseAgentIntegrationId,
|
|
178
|
+
parseAgentIntegrationResourceId,
|
|
179
|
+
parseAgentIntegrationServerId,
|
|
180
|
+
parseAgentIntegrationToolId,
|
|
123
181
|
parseAgentIsoDateTime,
|
|
124
182
|
parseAgentItemId,
|
|
125
183
|
parseAgentJsonValue,
|
|
184
|
+
parseAgentManagedContentId,
|
|
185
|
+
parseAgentOperationId,
|
|
186
|
+
parseAgentOperationInvocationId,
|
|
126
187
|
parseAgentProviderConversationId,
|
|
127
188
|
parseAgentProviderHistoryAnchor,
|
|
128
189
|
parseAgentProviderItemRef,
|
|
@@ -136,12 +197,21 @@ export {
|
|
|
136
197
|
parseAgentTurnId,
|
|
137
198
|
safeParseAgentApprovalOptionId,
|
|
138
199
|
safeParseAgentArtifactId,
|
|
200
|
+
safeParseAgentCollaborationId,
|
|
139
201
|
safeParseAgentConfigurationRevisionId,
|
|
140
202
|
safeParseAgentError,
|
|
203
|
+
safeParseAgentGeneratedResourceId,
|
|
141
204
|
safeParseAgentInstanceId,
|
|
205
|
+
safeParseAgentIntegrationId,
|
|
206
|
+
safeParseAgentIntegrationResourceId,
|
|
207
|
+
safeParseAgentIntegrationServerId,
|
|
208
|
+
safeParseAgentIntegrationToolId,
|
|
142
209
|
safeParseAgentIsoDateTime,
|
|
143
210
|
safeParseAgentItemId,
|
|
144
211
|
safeParseAgentJsonValue,
|
|
212
|
+
safeParseAgentManagedContentId,
|
|
213
|
+
safeParseAgentOperationId,
|
|
214
|
+
safeParseAgentOperationInvocationId,
|
|
145
215
|
safeParseAgentProviderConversationId,
|
|
146
216
|
safeParseAgentProviderHistoryAnchor,
|
|
147
217
|
safeParseAgentProviderItemRef,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type { AgentProtocolParseFailure, AgentProtocolParseResult, AgentProtocolParseSuccess, ValidationIssue, ValidationPathSegment, } from './validation.js';
|
|
2
2
|
export { AgentProtocolValidationError } from './validation.js';
|
|
3
|
-
export declare const AGENT_PROTOCOL_VERSION:
|
|
3
|
+
export declare const AGENT_PROTOCOL_VERSION: 8;
|
|
4
4
|
export declare const AGENT_PROTOCOL_ID_MAX_LENGTH = 256;
|
|
5
5
|
export declare const AGENT_PROTOCOL_PROVIDER_REFERENCE_MAX_LENGTH = 512;
|
|
6
6
|
export declare const AGENT_PROTOCOL_PROVIDER_KEY_MAX_LENGTH = 100;
|
|
@@ -25,6 +25,15 @@ export type AgentRequestId = AgentProtocolId<'AgentRequestId'>;
|
|
|
25
25
|
export type AgentApprovalOptionId = AgentProtocolId<'AgentApprovalOptionId'>;
|
|
26
26
|
export type AgentRequestFieldId = AgentProtocolId<'AgentRequestFieldId'>;
|
|
27
27
|
export type AgentArtifactId = AgentProtocolId<'AgentArtifactId'>;
|
|
28
|
+
export type AgentOperationId = AgentProtocolId<'AgentOperationId'>;
|
|
29
|
+
export type AgentOperationInvocationId = AgentProtocolId<'AgentOperationInvocationId'>;
|
|
30
|
+
export type AgentManagedContentId = AgentProtocolId<'AgentManagedContentId'>;
|
|
31
|
+
export type AgentIntegrationId = AgentProtocolId<'AgentIntegrationId'>;
|
|
32
|
+
export type AgentIntegrationServerId = AgentProtocolId<'AgentIntegrationServerId'>;
|
|
33
|
+
export type AgentIntegrationToolId = AgentProtocolId<'AgentIntegrationToolId'>;
|
|
34
|
+
export type AgentIntegrationResourceId = AgentProtocolId<'AgentIntegrationResourceId'>;
|
|
35
|
+
export type AgentCollaborationId = AgentProtocolId<'AgentCollaborationId'>;
|
|
36
|
+
export type AgentGeneratedResourceId = AgentProtocolId<'AgentGeneratedResourceId'>;
|
|
28
37
|
export type AgentConfigurationRevisionId = AgentProtocolId<'AgentConfigurationRevisionId'>;
|
|
29
38
|
export type AgentProviderConversationId = AgentProtocolId<'AgentProviderConversationId'>;
|
|
30
39
|
export type AgentProviderHistoryAnchor = AgentProtocolId<'AgentProviderHistoryAnchor'>;
|
package/dist/foundation/types.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AgentProtocolValidationError } from "./validation.js";
|
|
2
|
-
const AGENT_PROTOCOL_VERSION =
|
|
2
|
+
const AGENT_PROTOCOL_VERSION = 8;
|
|
3
3
|
const AGENT_PROTOCOL_ID_MAX_LENGTH = 256;
|
|
4
4
|
const AGENT_PROTOCOL_PROVIDER_REFERENCE_MAX_LENGTH = 512;
|
|
5
5
|
const AGENT_PROTOCOL_PROVIDER_KEY_MAX_LENGTH = 100;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AgentProtocolParseResult } from '../foundation/index.js';
|
|
2
|
+
import type { AgentIntegrationCatalog, AgentIntegrationDescriptor } from './types.js';
|
|
3
|
+
export declare function parseAgentIntegrationDescriptor(input: unknown): AgentIntegrationDescriptor;
|
|
4
|
+
export declare function safeParseAgentIntegrationDescriptor(input: unknown): AgentProtocolParseResult<AgentIntegrationDescriptor>;
|
|
5
|
+
export declare function parseAgentIntegrationCatalog(input: unknown): AgentIntegrationCatalog;
|
|
6
|
+
export declare function safeParseAgentIntegrationCatalog(input: unknown): AgentProtocolParseResult<AgentIntegrationCatalog>;
|
|
7
|
+
//# sourceMappingURL=parsers.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { parseWithSchema, safeParseWithSchema } from "../internal/parsers.js";
|
|
2
|
+
import {
|
|
3
|
+
AgentIntegrationCatalogSchema,
|
|
4
|
+
AgentIntegrationDescriptorSchema
|
|
5
|
+
} from "../zod/integrations.js";
|
|
6
|
+
function parseAgentIntegrationDescriptor(input) {
|
|
7
|
+
return parseWithSchema(AgentIntegrationDescriptorSchema, input);
|
|
8
|
+
}
|
|
9
|
+
function safeParseAgentIntegrationDescriptor(input) {
|
|
10
|
+
return safeParseWithSchema(AgentIntegrationDescriptorSchema, input);
|
|
11
|
+
}
|
|
12
|
+
function parseAgentIntegrationCatalog(input) {
|
|
13
|
+
return parseWithSchema(AgentIntegrationCatalogSchema, input);
|
|
14
|
+
}
|
|
15
|
+
function safeParseAgentIntegrationCatalog(input) {
|
|
16
|
+
return safeParseWithSchema(AgentIntegrationCatalogSchema, input);
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
parseAgentIntegrationCatalog,
|
|
20
|
+
parseAgentIntegrationDescriptor,
|
|
21
|
+
safeParseAgentIntegrationCatalog,
|
|
22
|
+
safeParseAgentIntegrationDescriptor
|
|
23
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { AgentIntegrationId, AgentIntegrationResourceId, AgentIntegrationServerId, AgentIntegrationToolId, AgentIsoDateTime } from '../foundation/index.js';
|
|
2
|
+
export declare const AGENT_INTEGRATION_STATUSES: readonly ["starting", "ready", "degraded", "unavailable"];
|
|
3
|
+
export declare const AGENT_INTEGRATION_KINDS: readonly ["mcp"];
|
|
4
|
+
export declare const AGENT_INTEGRATION_NAME_MAX_LENGTH = 200;
|
|
5
|
+
export declare const AGENT_INTEGRATION_DESCRIPTION_MAX_LENGTH = 2000;
|
|
6
|
+
export declare const AGENT_INTEGRATION_CATALOG_MAX_LENGTH = 32;
|
|
7
|
+
export declare const AGENT_INTEGRATION_SERVERS_MAX_LENGTH = 32;
|
|
8
|
+
export declare const AGENT_INTEGRATION_TOOLS_MAX_LENGTH = 100;
|
|
9
|
+
export declare const AGENT_INTEGRATION_RESOURCES_MAX_LENGTH = 100;
|
|
10
|
+
export type AgentIntegrationStatus = (typeof AGENT_INTEGRATION_STATUSES)[number];
|
|
11
|
+
export type AgentIntegrationKind = (typeof AGENT_INTEGRATION_KINDS)[number];
|
|
12
|
+
export interface AgentIntegrationToolDescriptor {
|
|
13
|
+
readonly toolId: AgentIntegrationToolId;
|
|
14
|
+
readonly name: string;
|
|
15
|
+
readonly description?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface AgentIntegrationResourceDescriptor {
|
|
18
|
+
readonly resourceId: AgentIntegrationResourceId;
|
|
19
|
+
readonly name: string;
|
|
20
|
+
readonly description?: string;
|
|
21
|
+
readonly mediaType?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface AgentIntegrationServerDescriptor {
|
|
24
|
+
readonly serverId: AgentIntegrationServerId;
|
|
25
|
+
readonly name: string;
|
|
26
|
+
readonly status: AgentIntegrationStatus;
|
|
27
|
+
readonly tools: readonly AgentIntegrationToolDescriptor[];
|
|
28
|
+
readonly resources: readonly AgentIntegrationResourceDescriptor[];
|
|
29
|
+
}
|
|
30
|
+
export interface AgentIntegrationDescriptor {
|
|
31
|
+
readonly integrationId: AgentIntegrationId;
|
|
32
|
+
readonly revision: number;
|
|
33
|
+
readonly kind: AgentIntegrationKind;
|
|
34
|
+
readonly name: string;
|
|
35
|
+
readonly status: AgentIntegrationStatus;
|
|
36
|
+
readonly servers: readonly AgentIntegrationServerDescriptor[];
|
|
37
|
+
}
|
|
38
|
+
export interface AgentIntegrationCatalog {
|
|
39
|
+
readonly revision: number;
|
|
40
|
+
readonly observedAt: AgentIsoDateTime;
|
|
41
|
+
readonly integrations: readonly AgentIntegrationDescriptor[];
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const AGENT_INTEGRATION_STATUSES = [
|
|
2
|
+
"starting",
|
|
3
|
+
"ready",
|
|
4
|
+
"degraded",
|
|
5
|
+
"unavailable"
|
|
6
|
+
];
|
|
7
|
+
const AGENT_INTEGRATION_KINDS = ["mcp"];
|
|
8
|
+
const AGENT_INTEGRATION_NAME_MAX_LENGTH = 200;
|
|
9
|
+
const AGENT_INTEGRATION_DESCRIPTION_MAX_LENGTH = 2e3;
|
|
10
|
+
const AGENT_INTEGRATION_CATALOG_MAX_LENGTH = 32;
|
|
11
|
+
const AGENT_INTEGRATION_SERVERS_MAX_LENGTH = 32;
|
|
12
|
+
const AGENT_INTEGRATION_TOOLS_MAX_LENGTH = 100;
|
|
13
|
+
const AGENT_INTEGRATION_RESOURCES_MAX_LENGTH = 100;
|
|
14
|
+
export {
|
|
15
|
+
AGENT_INTEGRATION_CATALOG_MAX_LENGTH,
|
|
16
|
+
AGENT_INTEGRATION_DESCRIPTION_MAX_LENGTH,
|
|
17
|
+
AGENT_INTEGRATION_KINDS,
|
|
18
|
+
AGENT_INTEGRATION_NAME_MAX_LENGTH,
|
|
19
|
+
AGENT_INTEGRATION_RESOURCES_MAX_LENGTH,
|
|
20
|
+
AGENT_INTEGRATION_SERVERS_MAX_LENGTH,
|
|
21
|
+
AGENT_INTEGRATION_STATUSES,
|
|
22
|
+
AGENT_INTEGRATION_TOOLS_MAX_LENGTH
|
|
23
|
+
};
|