@artinet/sdk 0.5.16 → 0.5.18
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 +108 -58
- package/dist/browser/browser.d.ts +9 -0
- package/dist/browser/browser.js +10 -0
- package/dist/browser/client/a2a-client.d.ts +126 -0
- package/dist/browser/client/a2a-client.js +221 -0
- package/dist/browser/client/index.d.ts +1 -0
- package/dist/browser/client/index.js +1 -0
- package/dist/browser/services/a2a/helpers/message-builder.d.ts +12 -0
- package/dist/browser/services/a2a/helpers/message-builder.js +61 -0
- package/dist/browser/transport/rpc/parser.d.ts +15 -0
- package/dist/browser/transport/rpc/parser.js +48 -0
- package/dist/browser/transport/rpc/rpc-client.d.ts +80 -0
- package/dist/browser/transport/rpc/rpc-client.js +189 -0
- package/dist/browser/transport/streaming/event-stream.d.ts +25 -0
- package/dist/browser/transport/streaming/event-stream.js +99 -0
- package/dist/browser/types/ext.d.ts +13 -0
- package/dist/browser/types/ext.js +10 -0
- package/dist/browser/types/index.d.ts +4 -0
- package/dist/browser/types/index.js +4 -0
- package/dist/browser/types/interfaces/client.d.ts +135 -0
- package/dist/browser/types/interfaces/client.js +5 -0
- package/dist/browser/types/interfaces/index.d.ts +3 -0
- package/dist/browser/types/interfaces/index.js +3 -0
- package/dist/browser/types/interfaces/services/a2a/builder.d.ts +37 -0
- package/dist/browser/types/interfaces/services/a2a/builder.js +5 -0
- package/dist/browser/types/interfaces/services/a2a/context.d.ts +162 -0
- package/dist/browser/types/interfaces/services/a2a/context.js +5 -0
- package/dist/browser/types/interfaces/services/a2a/engine.d.ts +7 -0
- package/dist/browser/types/interfaces/services/a2a/engine.js +5 -0
- package/dist/browser/types/interfaces/services/a2a/index.d.ts +5 -0
- package/dist/browser/types/interfaces/services/a2a/index.js +5 -0
- package/dist/browser/types/interfaces/services/a2a/legacy.d.ts +93 -0
- package/dist/browser/types/interfaces/services/a2a/legacy.js +5 -0
- package/dist/browser/types/interfaces/services/a2a/service.d.ts +413 -0
- package/dist/browser/types/interfaces/services/a2a/service.js +5 -0
- package/dist/browser/types/interfaces/services/core/context/command.d.ts +25 -0
- package/dist/browser/types/interfaces/services/core/context/command.js +5 -0
- package/dist/browser/types/interfaces/services/core/context/context.d.ts +207 -0
- package/dist/browser/types/interfaces/services/core/context/context.js +5 -0
- package/dist/browser/types/interfaces/services/core/context/index.d.ts +3 -0
- package/dist/browser/types/interfaces/services/core/context/index.js +3 -0
- package/dist/browser/types/interfaces/services/core/context/types.d.ts +11 -0
- package/dist/browser/types/interfaces/services/core/context/types.js +5 -0
- package/dist/browser/types/interfaces/services/core/execution/engine.d.ts +106 -0
- package/dist/browser/types/interfaces/services/core/execution/engine.js +5 -0
- package/dist/browser/types/interfaces/services/core/execution/environment.d.ts +11 -0
- package/dist/browser/types/interfaces/services/core/execution/environment.js +5 -0
- package/dist/browser/types/interfaces/services/core/execution/execute.d.ts +7 -0
- package/dist/browser/types/interfaces/services/core/execution/execute.js +5 -0
- package/dist/browser/types/interfaces/services/core/execution/index.d.ts +3 -0
- package/dist/browser/types/interfaces/services/core/execution/index.js +3 -0
- package/dist/browser/types/interfaces/services/core/index.d.ts +4 -0
- package/dist/browser/types/interfaces/services/core/index.js +4 -0
- package/dist/browser/types/interfaces/services/core/managers/cancellation.d.ts +9 -0
- package/dist/browser/types/interfaces/services/core/managers/cancellation.js +5 -0
- package/dist/browser/types/interfaces/services/core/managers/connection.d.ts +9 -0
- package/dist/browser/types/interfaces/services/core/managers/connection.js +5 -0
- package/dist/browser/types/interfaces/services/core/managers/context.d.ts +17 -0
- package/dist/browser/types/interfaces/services/core/managers/context.js +5 -0
- package/dist/browser/types/interfaces/services/core/managers/event.d.ts +328 -0
- package/dist/browser/types/interfaces/services/core/managers/event.js +5 -0
- package/dist/browser/types/interfaces/services/core/managers/index.d.ts +6 -0
- package/dist/browser/types/interfaces/services/core/managers/index.js +6 -0
- package/dist/browser/types/interfaces/services/core/managers/stream.d.ts +217 -0
- package/dist/browser/types/interfaces/services/core/managers/stream.js +5 -0
- package/dist/browser/types/interfaces/services/core/managers/task.d.ts +9 -0
- package/dist/browser/types/interfaces/services/core/managers/task.js +1 -0
- package/dist/browser/types/interfaces/services/core/service.d.ts +115 -0
- package/dist/browser/types/interfaces/services/core/service.js +5 -0
- package/dist/browser/types/interfaces/services/index.d.ts +4 -0
- package/dist/browser/types/interfaces/services/index.js +4 -0
- package/dist/browser/types/interfaces/services/mcp/index.d.ts +1 -0
- package/dist/browser/types/interfaces/services/mcp/index.js +1 -0
- package/dist/browser/types/interfaces/services/mcp/service.d.ts +49 -0
- package/dist/browser/types/interfaces/services/mcp/service.js +5 -0
- package/dist/browser/types/interfaces/services/protocol.d.ts +33 -0
- package/dist/browser/types/interfaces/services/protocol.js +34 -0
- package/dist/browser/types/interfaces/storage.d.ts +8 -0
- package/dist/browser/types/interfaces/storage.js +5 -0
- package/dist/browser/types/schemas/a2a/agent.d.ts +2583 -0
- package/dist/browser/types/schemas/a2a/agent.js +323 -0
- package/dist/browser/types/schemas/a2a/auth.d.ts +908 -0
- package/dist/browser/types/schemas/a2a/auth.js +283 -0
- package/dist/browser/types/schemas/a2a/error.d.ts +396 -0
- package/dist/browser/types/schemas/a2a/error.js +163 -0
- package/dist/browser/types/schemas/a2a/index.d.ts +11 -0
- package/dist/browser/types/schemas/a2a/index.js +11 -0
- package/dist/browser/types/schemas/a2a/kind.d.ts +11 -0
- package/dist/browser/types/schemas/a2a/kind.js +20 -0
- package/dist/browser/types/schemas/a2a/message.d.ts +10343 -0
- package/dist/browser/types/schemas/a2a/message.js +130 -0
- package/dist/browser/types/schemas/a2a/notification.d.ts +1517 -0
- package/dist/browser/types/schemas/a2a/notification.js +203 -0
- package/dist/browser/types/schemas/a2a/parameters.d.ts +956 -0
- package/dist/browser/types/schemas/a2a/parameters.js +241 -0
- package/dist/browser/types/schemas/a2a/protocol.d.ts +14363 -0
- package/dist/browser/types/schemas/a2a/protocol.js +59 -0
- package/dist/browser/types/schemas/a2a/rpc.d.ts +182 -0
- package/dist/browser/types/schemas/a2a/rpc.js +126 -0
- package/dist/browser/types/schemas/a2a/task.d.ts +5886 -0
- package/dist/browser/types/schemas/a2a/task.js +134 -0
- package/dist/browser/types/schemas/a2a/transport.d.ts +31 -0
- package/dist/browser/types/schemas/a2a/transport.js +28 -0
- package/dist/browser/types/schemas/index.d.ts +1 -0
- package/dist/browser/types/schemas/index.js +1 -0
- package/dist/browser/types/utils/index.d.ts +1 -0
- package/dist/browser/types/utils/index.js +1 -0
- package/dist/browser/types/utils/transform.d.ts +64 -0
- package/dist/browser/types/utils/transform.js +35 -0
- package/dist/browser/utils/common/constants.d.ts +11 -0
- package/dist/browser/utils/common/constants.js +38 -0
- package/dist/browser/utils/common/errors.d.ts +24 -0
- package/dist/browser/utils/common/errors.js +42 -0
- package/dist/browser/utils/common/utils.d.ts +9 -0
- package/dist/browser/utils/common/utils.js +11 -0
- package/dist/browser/utils/logging/index.d.ts +2 -0
- package/dist/browser/utils/logging/index.js +2 -0
- package/dist/browser/utils/logging/log.d.ts +33 -0
- package/dist/browser/utils/logging/log.js +75 -0
- package/dist/browser/utils/logging/logger.d.ts +18 -0
- package/dist/browser/utils/logging/logger.js +18 -0
- package/dist/client/a2a-client.d.ts +2 -1
- package/dist/client/a2a-client.js +13 -4
- package/dist/server/express/errors.js +1 -1
- package/dist/server/express/middeware.d.ts +2 -2
- package/dist/server/express/middeware.js +26 -6
- package/dist/server/express/server.d.ts +26 -25
- package/dist/server/express/server.js +32 -6
- package/dist/services/a2a/factory/builder.d.ts +24 -24
- package/dist/services/a2a/factory/builder.js +6 -1
- package/dist/services/a2a/factory/service.js +2 -1
- package/dist/services/a2a/helpers/agentcard-builder.d.ts +7 -0
- package/dist/services/a2a/helpers/agentcard-builder.js +23 -0
- package/dist/services/a2a/helpers/history.d.ts +2 -0
- package/dist/services/a2a/helpers/history.js +3 -0
- package/dist/services/a2a/helpers/index.d.ts +3 -0
- package/dist/services/a2a/helpers/index.js +3 -0
- package/dist/services/a2a/methods/get-task.d.ts +46 -46
- package/dist/services/a2a/methods/get-task.js +2 -0
- package/dist/services/a2a/methods/send-message.js +18 -1
- package/dist/services/a2a/service.d.ts +154 -153
- package/dist/services/a2a/service.js +20 -6
- package/dist/services/mcp/service.js +0 -1
- package/dist/transport/rpc/parser.js +2 -2
- package/dist/transport/rpc/rpc-client.js +2 -2
- package/dist/transport/trpc/a2a/factory/router.d.ts +1084 -1084
- package/dist/transport/trpc/a2a/routes/info.d.ts +36 -36
- package/dist/transport/trpc/a2a/routes/message/route.d.ts +225 -225
- package/dist/transport/trpc/a2a/routes/tasks/route.d.ts +257 -257
- package/dist/transport/trpc/a2a/trpc.d.ts +120 -120
- package/dist/types/interfaces/services/a2a/service.d.ts +6 -1
- package/dist/types/schemas/a2a/agent.d.ts +818 -818
- package/dist/types/schemas/a2a/agent.js +1 -23
- package/dist/types/schemas/a2a/auth.d.ts +197 -197
- package/dist/types/schemas/a2a/auth.js +4 -19
- package/dist/types/schemas/a2a/error.d.ts +24 -24
- package/dist/types/schemas/a2a/message.d.ts +4499 -4499
- package/dist/types/schemas/a2a/message.js +2 -10
- package/dist/types/schemas/a2a/notification.d.ts +403 -403
- package/dist/types/schemas/a2a/notification.js +3 -7
- package/dist/types/schemas/a2a/parameters.d.ts +264 -264
- package/dist/types/schemas/a2a/parameters.js +1 -14
- package/dist/types/schemas/a2a/protocol.d.ts +5988 -5988
- package/dist/types/schemas/a2a/rpc.d.ts +20 -20
- package/dist/types/schemas/a2a/rpc.js +0 -5
- package/dist/types/schemas/a2a/task.d.ts +2513 -2513
- package/dist/types/schemas/a2a/task.js +10 -11
- package/dist/utils/common/constants.js +1 -1
- package/dist/utils/common/errors.d.ts +2 -1
- package/dist/utils/common/errors.js +2 -1
- package/dist/utils/common/schema-validation.d.ts +2 -0
- package/dist/utils/common/schema-validation.js +12 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/package.json +20 -17
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025 The Artinet Project
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
import { SecuritySchemeSchema } from "./auth.js";
|
|
7
|
+
import { TransportProtocolSchema, AgentInterfaceSchema } from "./transport.js";
|
|
8
|
+
import { JSONRPCRequestSchema, JSONRPCSuccessResponseSchema, JSONRPCErrorResponseSchema, } from "./rpc.js";
|
|
9
|
+
/**
|
|
10
|
+
* @description Represents the provider or organization behind an agent.
|
|
11
|
+
*/
|
|
12
|
+
export const AgentProviderSchema = z
|
|
13
|
+
.object({
|
|
14
|
+
/**
|
|
15
|
+
* @required The name of the organization providing the agent.
|
|
16
|
+
*/
|
|
17
|
+
organization: z
|
|
18
|
+
.string()
|
|
19
|
+
.describe("The name of the organization providing the agent."),
|
|
20
|
+
/**
|
|
21
|
+
* @required URL associated with the agent provider.
|
|
22
|
+
*/
|
|
23
|
+
url: z.string().url().describe("URL associated with the agent provider."),
|
|
24
|
+
})
|
|
25
|
+
.describe("The provider or organization behind an agent.");
|
|
26
|
+
/**
|
|
27
|
+
* @description A declaration of an extension supported by an Agent.
|
|
28
|
+
*/
|
|
29
|
+
export const AgentExtensionSchema = z
|
|
30
|
+
.object({
|
|
31
|
+
/**
|
|
32
|
+
* @required The URI of the extension.
|
|
33
|
+
*/
|
|
34
|
+
uri: z.string().describe("The URI of the extension."),
|
|
35
|
+
/**
|
|
36
|
+
* @optional A description of how this agent uses this extension.
|
|
37
|
+
*/
|
|
38
|
+
description: z
|
|
39
|
+
.string()
|
|
40
|
+
.optional()
|
|
41
|
+
.describe("A description of how this agent uses this extension."),
|
|
42
|
+
/**
|
|
43
|
+
* @optional Whether the client must follow specific requirements of the extension.
|
|
44
|
+
*/
|
|
45
|
+
required: z
|
|
46
|
+
.boolean()
|
|
47
|
+
.optional()
|
|
48
|
+
.describe("Whether the client must follow specific requirements of the extension."),
|
|
49
|
+
/**
|
|
50
|
+
* @optional Optional configuration for the extension.
|
|
51
|
+
*/
|
|
52
|
+
params: z
|
|
53
|
+
.record(z.string(), z.unknown())
|
|
54
|
+
.optional()
|
|
55
|
+
.describe("Optional configuration for the extension."),
|
|
56
|
+
})
|
|
57
|
+
.describe("A declaration of an extension supported by an Agent.");
|
|
58
|
+
/**
|
|
59
|
+
* @description Defines optional capabilities supported by an agent.
|
|
60
|
+
*/
|
|
61
|
+
export const AgentCapabilitiesSchema = z
|
|
62
|
+
.object({
|
|
63
|
+
/**
|
|
64
|
+
* @optional Indicates if the agent supports streaming responses.
|
|
65
|
+
*/
|
|
66
|
+
streaming: z
|
|
67
|
+
.boolean()
|
|
68
|
+
.optional()
|
|
69
|
+
.describe("Indicates if the agent supports streaming responses."),
|
|
70
|
+
/**
|
|
71
|
+
* @optional Indicates if the agent supports push notification mechanisms.
|
|
72
|
+
*/
|
|
73
|
+
pushNotifications: z
|
|
74
|
+
.boolean()
|
|
75
|
+
.optional()
|
|
76
|
+
.describe("Indicates if the agent supports push notification mechanisms."),
|
|
77
|
+
/**
|
|
78
|
+
* @optional Indicates if the agent supports providing state transition history.
|
|
79
|
+
*/
|
|
80
|
+
stateTransitionHistory: z
|
|
81
|
+
.boolean()
|
|
82
|
+
.optional()
|
|
83
|
+
.describe("Indicates if the agent supports providing state transition history."),
|
|
84
|
+
/**
|
|
85
|
+
* @optional Extensions supported by this agent.
|
|
86
|
+
*/
|
|
87
|
+
extensions: z
|
|
88
|
+
.array(AgentExtensionSchema)
|
|
89
|
+
.optional()
|
|
90
|
+
.describe("Extensions supported by this agent."),
|
|
91
|
+
})
|
|
92
|
+
.describe("Defines optional capabilities supported by an agent.");
|
|
93
|
+
/**
|
|
94
|
+
* @description Represents a unit of capability that an agent can perform.
|
|
95
|
+
*/
|
|
96
|
+
export const AgentSkillSchema = z
|
|
97
|
+
.object({
|
|
98
|
+
/**
|
|
99
|
+
* @required Unique identifier for the skill.
|
|
100
|
+
*/
|
|
101
|
+
id: z.string().describe("Unique identifier for the skill."),
|
|
102
|
+
/**
|
|
103
|
+
* @required Human-readable name of the skill.
|
|
104
|
+
*/
|
|
105
|
+
name: z.string().describe("Human-readable name of the skill."),
|
|
106
|
+
/**
|
|
107
|
+
* @required Description of the skill.
|
|
108
|
+
*/
|
|
109
|
+
description: z.string().describe("Description of the skill."),
|
|
110
|
+
/**
|
|
111
|
+
* @required List of tags associated with the skill for categorization.
|
|
112
|
+
*/
|
|
113
|
+
tags: z
|
|
114
|
+
.array(z.string())
|
|
115
|
+
.describe("List of tags associated with the skill for categorization."),
|
|
116
|
+
/**
|
|
117
|
+
* @optional List of example inputs or use cases for the skill.
|
|
118
|
+
*/
|
|
119
|
+
examples: z
|
|
120
|
+
.array(z.string())
|
|
121
|
+
.optional()
|
|
122
|
+
.describe("List of example inputs or use cases for the skill."),
|
|
123
|
+
/**
|
|
124
|
+
* @optional List of input modes supported by this skill.
|
|
125
|
+
*/
|
|
126
|
+
inputModes: z
|
|
127
|
+
.array(z.string())
|
|
128
|
+
.optional()
|
|
129
|
+
.describe("List of input modes supported by this skill."),
|
|
130
|
+
/**
|
|
131
|
+
* @optional List of output modes supported by this skill.
|
|
132
|
+
*/
|
|
133
|
+
outputModes: z
|
|
134
|
+
.array(z.string())
|
|
135
|
+
.optional()
|
|
136
|
+
.describe("List of output modes supported by this skill."),
|
|
137
|
+
/**
|
|
138
|
+
* @optional Security schemes necessary for the agent to leverage this skill.
|
|
139
|
+
*/
|
|
140
|
+
security: z
|
|
141
|
+
.array(z.record(z.string(), z.array(z.string())))
|
|
142
|
+
.optional()
|
|
143
|
+
.describe("Security schemes necessary for the agent to leverage this skill."),
|
|
144
|
+
})
|
|
145
|
+
.describe("A unit of capability that an agent can perform.");
|
|
146
|
+
/**
|
|
147
|
+
* @description AgentCardSignature represents a JWS signature of an AgentCard.
|
|
148
|
+
*/
|
|
149
|
+
export const AgentCardSignatureSchema = z
|
|
150
|
+
.object({
|
|
151
|
+
/**
|
|
152
|
+
* @required The protected JWS header for the signature.
|
|
153
|
+
*/
|
|
154
|
+
protected: z
|
|
155
|
+
.string()
|
|
156
|
+
.describe("The protected JWS header for the signature."),
|
|
157
|
+
/**
|
|
158
|
+
* @required The computed signature, Base64url-encoded.
|
|
159
|
+
*/
|
|
160
|
+
signature: z
|
|
161
|
+
.string()
|
|
162
|
+
.describe("The computed signature, Base64url-encoded."),
|
|
163
|
+
/**
|
|
164
|
+
* @optional The unprotected JWS header values.
|
|
165
|
+
*/
|
|
166
|
+
header: z
|
|
167
|
+
.record(z.string(), z.unknown())
|
|
168
|
+
.optional()
|
|
169
|
+
.describe("The unprotected JWS header values."),
|
|
170
|
+
})
|
|
171
|
+
.describe("A JWS signature of an AgentCard.");
|
|
172
|
+
/**
|
|
173
|
+
* @description An AgentCard conveys key information about an agent's identity,
|
|
174
|
+
* capabilities, skills, authentication requirements, and communication modalities.
|
|
175
|
+
*/
|
|
176
|
+
export const AgentCardSchema = z
|
|
177
|
+
.object({
|
|
178
|
+
/**
|
|
179
|
+
* @required The version of the A2A protocol this agent supports.
|
|
180
|
+
*/
|
|
181
|
+
protocolVersion: z
|
|
182
|
+
.string()
|
|
183
|
+
.default("0.3.0")
|
|
184
|
+
.describe("The version of the A2A protocol this agent supports."),
|
|
185
|
+
/**
|
|
186
|
+
* @required Human readable name of the agent.
|
|
187
|
+
*/
|
|
188
|
+
name: z.string().describe("Human readable name of the agent."),
|
|
189
|
+
/**
|
|
190
|
+
* @required A human-readable description of the agent.
|
|
191
|
+
*/
|
|
192
|
+
description: z
|
|
193
|
+
.string()
|
|
194
|
+
.describe("A human-readable description of the agent."),
|
|
195
|
+
/**
|
|
196
|
+
* @required The preferred endpoint URL for interacting with the agent.
|
|
197
|
+
*/
|
|
198
|
+
url: z
|
|
199
|
+
.string()
|
|
200
|
+
.url()
|
|
201
|
+
.describe("The preferred endpoint URL for interacting with the agent."),
|
|
202
|
+
/**
|
|
203
|
+
* @optional The transport protocol for the preferred endpoint.
|
|
204
|
+
*/
|
|
205
|
+
preferredTransport: z
|
|
206
|
+
.union([TransportProtocolSchema, z.string()])
|
|
207
|
+
.optional()
|
|
208
|
+
.describe("The preferred transport protocol for the agent."),
|
|
209
|
+
/**
|
|
210
|
+
* @optional Additional supported interfaces (transport and URL combinations).
|
|
211
|
+
*/
|
|
212
|
+
additionalInterfaces: z
|
|
213
|
+
.array(AgentInterfaceSchema)
|
|
214
|
+
.optional()
|
|
215
|
+
.describe("Additional supported interfaces (transport and URL combinations)."),
|
|
216
|
+
/**
|
|
217
|
+
* @optional The URL of the agent's icon.
|
|
218
|
+
*/
|
|
219
|
+
iconUrl: z
|
|
220
|
+
.string()
|
|
221
|
+
.url()
|
|
222
|
+
.optional()
|
|
223
|
+
.describe("The URL of the agent's icon."),
|
|
224
|
+
/**
|
|
225
|
+
* @optional The service provider of the agent.
|
|
226
|
+
*/
|
|
227
|
+
provider: AgentProviderSchema.optional().describe("The service provider of the agent."),
|
|
228
|
+
/**
|
|
229
|
+
* @required The version identifier for the agent or its API.
|
|
230
|
+
*/
|
|
231
|
+
version: z
|
|
232
|
+
.string()
|
|
233
|
+
.describe("The version identifier for the agent or its API."),
|
|
234
|
+
/**
|
|
235
|
+
* @optional An optional URL pointing to the agent's documentation.
|
|
236
|
+
*/
|
|
237
|
+
documentationUrl: z
|
|
238
|
+
.string()
|
|
239
|
+
.url()
|
|
240
|
+
.optional()
|
|
241
|
+
.describe("An optional URL pointing to the agent's documentation."),
|
|
242
|
+
/**
|
|
243
|
+
* @required The capabilities supported by the agent.
|
|
244
|
+
*/
|
|
245
|
+
capabilities: AgentCapabilitiesSchema.describe("The capabilities supported by the agent."),
|
|
246
|
+
/**
|
|
247
|
+
* @optional Security scheme details used for authenticating with this agent.
|
|
248
|
+
* Maps scheme names to their configurations.
|
|
249
|
+
*/
|
|
250
|
+
securitySchemes: z
|
|
251
|
+
.record(z.string(), SecuritySchemeSchema)
|
|
252
|
+
.optional()
|
|
253
|
+
.describe("Security scheme details used for authenticating with this agent. Maps scheme names to their configurations."),
|
|
254
|
+
/**
|
|
255
|
+
* @optional Security requirements for contacting the agent.
|
|
256
|
+
* Array of security requirement objects, where each object maps scheme names to scope arrays.
|
|
257
|
+
*/
|
|
258
|
+
security: z
|
|
259
|
+
.array(z.record(z.string(), z.array(z.string())))
|
|
260
|
+
.optional()
|
|
261
|
+
.describe("Security requirements for contacting the agent. Array of security requirement objects, where each object maps scheme names to scope arrays."),
|
|
262
|
+
/**
|
|
263
|
+
* @required The default input modes supported by the agent.
|
|
264
|
+
*/
|
|
265
|
+
defaultInputModes: z
|
|
266
|
+
.array(z.string())
|
|
267
|
+
.describe("The default input modes supported by the agent."),
|
|
268
|
+
/**
|
|
269
|
+
* @required The default output modes supported by the agent.
|
|
270
|
+
*/
|
|
271
|
+
defaultOutputModes: z
|
|
272
|
+
.array(z.string())
|
|
273
|
+
.describe("The default output modes supported by the agent."),
|
|
274
|
+
/**
|
|
275
|
+
* @required List of specific skills offered by the agent.
|
|
276
|
+
*/
|
|
277
|
+
skills: z
|
|
278
|
+
.array(AgentSkillSchema)
|
|
279
|
+
.describe("List of specific skills offered by the agent."),
|
|
280
|
+
/**
|
|
281
|
+
* @optional True if the agent supports providing an extended agent card when the user is authenticated.
|
|
282
|
+
*/
|
|
283
|
+
supportsAuthenticatedExtendedCard: z
|
|
284
|
+
.boolean()
|
|
285
|
+
.optional()
|
|
286
|
+
.describe("True if the agent supports providing an extended agent card when the user is authenticated."),
|
|
287
|
+
/**
|
|
288
|
+
* @optional JSON Web Signatures computed for this AgentCard.
|
|
289
|
+
*/
|
|
290
|
+
signatures: z
|
|
291
|
+
.array(AgentCardSignatureSchema)
|
|
292
|
+
.optional()
|
|
293
|
+
.describe("JSON Web Signatures computed for this AgentCard."),
|
|
294
|
+
})
|
|
295
|
+
.describe("An AgentCard conveys key information about an agent's identity, capabilities, skills, authentication requirements, and communication modalities.");
|
|
296
|
+
/**
|
|
297
|
+
* @description Request to get an authenticated extended card.
|
|
298
|
+
*/
|
|
299
|
+
export const GetAuthenticatedExtendedCardRequestSchema = JSONRPCRequestSchema.extend({
|
|
300
|
+
method: z.literal("agent/getAuthenticatedExtendedCard"),
|
|
301
|
+
params: z
|
|
302
|
+
.never()
|
|
303
|
+
.optional()
|
|
304
|
+
.describe("Defines the parameters for a request to get an authenticated extended card."),
|
|
305
|
+
}).describe("Represents a JSON-RPC request for the `agent/getAuthenticatedExtendedCard` method.");
|
|
306
|
+
/**
|
|
307
|
+
* @description JSON-RPC success response model for the 'agent/getAuthenticatedExtendedCard' method.
|
|
308
|
+
*/
|
|
309
|
+
export const GetAuthenticatedExtendedCardSuccessResponseSchema = JSONRPCSuccessResponseSchema.extend({
|
|
310
|
+
/**
|
|
311
|
+
* @required The result is an Agent Card object.
|
|
312
|
+
*/
|
|
313
|
+
result: AgentCardSchema.describe("The result is an Agent Card object"),
|
|
314
|
+
}).describe("JSON-RPC success response model for the 'agent/getAuthenticatedExtendedCard' method.");
|
|
315
|
+
/**
|
|
316
|
+
* @description Response to a `agent/getAuthenticatedExtendedCard` request.
|
|
317
|
+
*/
|
|
318
|
+
export const GetAuthenticatedExtendedCardResponseSchema = z
|
|
319
|
+
.union([
|
|
320
|
+
GetAuthenticatedExtendedCardSuccessResponseSchema,
|
|
321
|
+
JSONRPCErrorResponseSchema,
|
|
322
|
+
])
|
|
323
|
+
.describe("Response to a `agent/getAuthenticatedExtendedCard` request.");
|