@artinet/sdk 0.5.2 → 0.5.4
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/CHANGELOG.md +20 -1
- package/README.md +69 -89
- package/dist/client/a2a-client.js +25 -7
- package/dist/client/a2a-client.js.map +1 -1
- package/dist/server/a2a-server.js +51 -241
- package/dist/server/a2a-server.js.map +1 -1
- package/dist/server/interfaces/params.js.map +1 -1
- package/dist/server/interfaces/store.js +16 -0
- package/dist/server/interfaces/store.js.map +1 -1
- package/dist/server/lib/express-server.js +211 -2
- package/dist/server/lib/express-server.js.map +1 -1
- package/dist/server/lib/middleware/a2a-methods.js +61 -24
- package/dist/server/lib/middleware/a2a-methods.js.map +1 -1
- package/dist/server/lib/middleware/factory.js +6 -6
- package/dist/server/lib/middleware/factory.js.map +1 -1
- package/dist/server/lib/state.js +44 -72
- package/dist/server/lib/state.js.map +1 -1
- package/dist/server/lib/storage/memory.js.map +1 -1
- package/dist/server/lib/update/base.js +109 -0
- package/dist/server/lib/update/base.js.map +1 -0
- package/dist/services/a2a/index.js +3 -0
- package/dist/services/a2a/index.js.map +1 -0
- package/dist/services/a2a/repository.js +160 -0
- package/dist/services/a2a/repository.js.map +1 -0
- package/dist/services/a2a/service.js +247 -0
- package/dist/services/a2a/service.js.map +1 -0
- package/dist/services/index.js +2 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/manager.js +61 -0
- package/dist/services/manager.js.map +1 -0
- package/dist/services/mcp/index.js +2 -0
- package/dist/services/mcp/index.js.map +1 -0
- package/dist/services/mcp/service.js +75 -0
- package/dist/services/mcp/service.js.map +1 -0
- package/dist/transport/rpc/parser.js +2 -1
- package/dist/transport/rpc/parser.js.map +1 -1
- package/dist/transport/rpc/rpc-client.js.map +1 -1
- package/dist/transport/streaming/stream.js +19 -36
- package/dist/transport/streaming/stream.js.map +1 -1
- package/dist/types/client/a2a-client.d.ts +21 -7
- package/dist/types/client/a2a-client.d.ts.map +1 -1
- package/dist/types/express.js +2 -0
- package/dist/types/express.js.map +1 -0
- package/dist/types/extended-schema.js +1 -1
- package/dist/types/extended-schema.js.map +1 -1
- package/dist/types/index.js +2 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/schemas/a2a/auth/auth.js +2 -0
- package/dist/types/schemas/a2a/auth/auth.js.map +1 -0
- package/dist/types/schemas/a2a/auth/base.js +2 -0
- package/dist/types/schemas/a2a/auth/base.js.map +1 -0
- package/dist/types/schemas/a2a/auth/index.js +4 -0
- package/dist/types/schemas/a2a/auth/index.js.map +1 -0
- package/dist/types/schemas/a2a/auth/oauth.js +2 -0
- package/dist/types/schemas/a2a/auth/oauth.js.map +1 -0
- package/dist/types/schemas/a2a/error.js +45 -0
- package/dist/types/schemas/a2a/error.js.map +1 -0
- package/dist/types/schemas/a2a/index.js +8 -0
- package/dist/types/schemas/a2a/index.js.map +1 -0
- package/dist/types/schemas/a2a/message.js +2 -0
- package/dist/types/schemas/a2a/message.js.map +1 -0
- package/dist/types/schemas/a2a/notification.js +2 -0
- package/dist/types/schemas/a2a/notification.js.map +1 -0
- package/dist/types/schemas/a2a/parameters.js +2 -0
- package/dist/types/schemas/a2a/parameters.js.map +1 -0
- package/dist/types/schemas/a2a/ref.js +25 -0
- package/dist/types/schemas/a2a/ref.js.map +1 -0
- package/dist/types/schemas/a2a/rpc.js +2 -0
- package/dist/types/schemas/a2a/rpc.js.map +1 -0
- package/dist/types/schemas/a2a/task.js +16 -0
- package/dist/types/schemas/a2a/task.js.map +1 -0
- package/dist/types/schemas/index.js +2 -0
- package/dist/types/schemas/index.js.map +1 -0
- package/dist/types/server/a2a-server.d.ts +9 -20
- package/dist/types/server/a2a-server.d.ts.map +1 -1
- package/dist/types/server/interfaces/params.d.ts +11 -11
- package/dist/types/server/interfaces/params.d.ts.map +1 -1
- package/dist/types/server/interfaces/server.d.ts +4 -4
- package/dist/types/server/interfaces/server.d.ts.map +1 -1
- package/dist/types/server/interfaces/store.d.ts +6 -1
- package/dist/types/server/interfaces/store.d.ts.map +1 -1
- package/dist/types/server/lib/express-server.d.ts +49 -1
- package/dist/types/server/lib/express-server.d.ts.map +1 -1
- package/dist/types/server/lib/middleware/a2a-methods.d.ts.map +1 -1
- package/dist/types/server/lib/middleware/factory.d.ts +2 -2
- package/dist/types/server/lib/middleware/factory.d.ts.map +1 -1
- package/dist/types/server/lib/state.d.ts +7 -15
- package/dist/types/server/lib/state.d.ts.map +1 -1
- package/dist/types/server/lib/storage/memory.d.ts.map +1 -1
- package/dist/types/server/lib/update/base.d.ts +21 -0
- package/dist/types/server/lib/update/base.d.ts.map +1 -0
- package/dist/types/services/a2a/index.d.ts +3 -0
- package/dist/types/services/a2a/index.d.ts.map +1 -0
- package/dist/types/services/a2a/repository.d.ts +77 -0
- package/dist/types/services/a2a/repository.d.ts.map +1 -0
- package/dist/types/services/a2a/repository.js +2 -0
- package/dist/types/services/a2a/repository.js.map +1 -0
- package/dist/types/services/a2a/service.d.ts +45 -0
- package/dist/types/services/a2a/service.d.ts.map +1 -0
- package/dist/types/services/a2a/service.js +2 -0
- package/dist/types/services/a2a/service.js.map +1 -0
- package/dist/types/services/context.js +29 -0
- package/dist/types/services/context.js.map +1 -0
- package/dist/types/services/dispatcher.js +33 -0
- package/dist/types/services/dispatcher.js.map +1 -0
- package/dist/types/services/index.d.ts +2 -0
- package/dist/types/services/index.d.ts.map +1 -0
- package/dist/types/services/index.js +9 -0
- package/dist/types/services/index.js.map +1 -0
- package/dist/types/services/manager.d.ts +44 -0
- package/dist/types/services/manager.d.ts.map +1 -0
- package/dist/types/services/manager.js +2 -0
- package/dist/types/services/manager.js.map +1 -0
- package/dist/types/services/mcp/index.d.ts +2 -0
- package/dist/types/services/mcp/index.d.ts.map +1 -0
- package/dist/types/services/mcp/service.d.ts +30 -0
- package/dist/types/services/mcp/service.d.ts.map +1 -0
- package/dist/types/services/mcp/service.js +8 -0
- package/dist/types/services/mcp/service.js.map +1 -0
- package/dist/types/services/protocol.js +31 -0
- package/dist/types/services/protocol.js.map +1 -0
- package/dist/types/services/service.js +2 -0
- package/dist/types/services/service.js.map +1 -0
- package/dist/types/transform.js +35 -0
- package/dist/types/transform.js.map +1 -0
- package/dist/types/transport/rpc/parser.d.ts.map +1 -1
- package/dist/types/transport/rpc/rpc-client.d.ts.map +1 -1
- package/dist/types/transport/streaming/stream.d.ts +6 -5
- package/dist/types/transport/streaming/stream.d.ts.map +1 -1
- package/dist/types/types/client.d.ts +26 -9
- package/dist/types/types/client.d.ts.map +1 -1
- package/dist/types/types/express.d.ts +66 -0
- package/dist/types/types/express.d.ts.map +1 -0
- package/dist/types/types/extended-schema.d.ts +88 -33
- package/dist/types/types/extended-schema.d.ts.map +1 -1
- package/dist/types/types/index.d.ts +2 -1
- package/dist/types/types/index.d.ts.map +1 -1
- package/dist/types/types/proxy.d.ts +4 -5
- package/dist/types/types/proxy.d.ts.map +1 -1
- package/dist/types/types/schemas/a2a/auth/auth.d.ts +80 -0
- package/dist/types/types/schemas/a2a/auth/auth.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/auth/base.d.ts +16 -0
- package/dist/types/types/schemas/a2a/auth/base.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/auth/index.d.ts +4 -0
- package/dist/types/types/schemas/a2a/auth/index.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/auth/oauth.d.ts +124 -0
- package/dist/types/types/schemas/a2a/auth/oauth.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/error.d.ts +75 -0
- package/dist/types/types/schemas/a2a/error.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/index.d.ts +220 -0
- package/dist/types/types/schemas/a2a/index.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/message.d.ts +90 -0
- package/dist/types/types/schemas/a2a/message.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/notification.d.ts +87 -0
- package/dist/types/types/schemas/a2a/notification.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/parameters.d.ts +188 -0
- package/dist/types/types/schemas/a2a/parameters.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/ref.d.ts +2057 -0
- package/dist/types/types/schemas/a2a/ref.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/rpc.d.ts +104 -0
- package/dist/types/types/schemas/a2a/rpc.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/task.d.ts +252 -0
- package/dist/types/types/schemas/a2a/task.d.ts.map +1 -0
- package/dist/types/types/schemas/index.d.ts +2 -0
- package/dist/types/types/schemas/index.d.ts.map +1 -0
- package/dist/types/types/services/a2a/repository.d.ts +85 -0
- package/dist/types/types/services/a2a/repository.d.ts.map +1 -0
- package/dist/types/types/services/a2a/service.d.ts +29 -0
- package/dist/types/types/services/a2a/service.d.ts.map +1 -0
- package/dist/types/types/services/context.d.ts +167 -0
- package/dist/types/types/services/context.d.ts.map +1 -0
- package/dist/types/types/services/dispatcher.d.ts +20 -0
- package/dist/types/types/services/dispatcher.d.ts.map +1 -0
- package/dist/types/types/services/index.d.ts +9 -0
- package/dist/types/types/services/index.d.ts.map +1 -0
- package/dist/types/types/services/manager.d.ts +42 -0
- package/dist/types/types/services/manager.d.ts.map +1 -0
- package/dist/types/types/services/mcp/service.d.ts +57 -0
- package/dist/types/types/services/mcp/service.d.ts.map +1 -0
- package/dist/types/types/services/protocol.d.ts +30 -0
- package/dist/types/types/services/protocol.d.ts.map +1 -0
- package/dist/types/types/services/service.d.ts +35 -0
- package/dist/types/types/services/service.d.ts.map +1 -0
- package/dist/types/types/transform.d.ts +61 -0
- package/dist/types/types/transform.d.ts.map +1 -0
- package/dist/types/utils/api/register.d.ts.map +1 -1
- package/dist/types/utils/common/constants.d.ts +4 -4
- package/dist/types/utils/common/constants.d.ts.map +1 -1
- package/dist/types/utils/common/errors.d.ts +19 -15
- package/dist/types/utils/common/errors.d.ts.map +1 -1
- package/dist/types/utils/common/utils.d.ts +2 -13
- package/dist/types/utils/common/utils.d.ts.map +1 -1
- package/dist/types/utils/deployment/task-wrapper.d.ts +5 -6
- package/dist/types/utils/deployment/task-wrapper.d.ts.map +1 -1
- package/dist/types/utils/deployment/test-deployment.d.ts +2 -2
- package/dist/types/utils/deployment/test-deployment.d.ts.map +1 -1
- package/dist/types/utils/logging/log.d.ts.map +1 -1
- package/dist/utils/api/register.js +1 -3
- package/dist/utils/api/register.js.map +1 -1
- package/dist/utils/common/constants.js +37 -24
- package/dist/utils/common/constants.js.map +1 -1
- package/dist/utils/common/errors.js +20 -9
- package/dist/utils/common/errors.js.map +1 -1
- package/dist/utils/common/utils.js +5 -27
- package/dist/utils/common/utils.js.map +1 -1
- package/dist/utils/deployment/agents.js.map +1 -1
- package/dist/utils/deployment/task-wrapper.js +3 -3
- package/dist/utils/deployment/task-wrapper.js.map +1 -1
- package/dist/utils/deployment/test-deployment.js +3 -4
- package/dist/utils/deployment/test-deployment.js.map +1 -1
- package/dist/utils/logging/log.js.map +1 -1
- package/package.json +9 -5
- package/dist/types/context.js +0 -2
- package/dist/types/context.js.map +0 -1
- package/dist/types/schema.js +0 -23
- package/dist/types/schema.js.map +0 -1
- package/dist/types/types/context.d.ts +0 -41
- package/dist/types/types/context.d.ts.map +0 -1
- package/dist/types/types/schema.d.ts +0 -694
- package/dist/types/types/schema.d.ts.map +0 -1
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { SecuritySchemeBase } from "./base.js";
|
|
2
|
+
import { OAuthFlows } from "./oauth.js";
|
|
3
|
+
/**
|
|
4
|
+
* @description API Key security scheme.
|
|
5
|
+
* @required type
|
|
6
|
+
* @required in
|
|
7
|
+
* @required name
|
|
8
|
+
*/
|
|
9
|
+
export interface APIKeySecurityScheme extends SecuritySchemeBase {
|
|
10
|
+
/**
|
|
11
|
+
* @required Type of the security scheme.
|
|
12
|
+
*/
|
|
13
|
+
type: "apiKey";
|
|
14
|
+
/**
|
|
15
|
+
* @required The location of the API key. Valid values are "query", "header", or "cookie".
|
|
16
|
+
*/
|
|
17
|
+
in: "query" | "header" | "cookie";
|
|
18
|
+
/**
|
|
19
|
+
* @required The name of the header, query or cookie parameter to be used.
|
|
20
|
+
*/
|
|
21
|
+
name: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @description HTTP Authentication security scheme.
|
|
25
|
+
* @required type
|
|
26
|
+
* @required scheme
|
|
27
|
+
* @optional bearerFormat
|
|
28
|
+
*/
|
|
29
|
+
export interface HTTPAuthSecurityScheme extends SecuritySchemeBase {
|
|
30
|
+
/**
|
|
31
|
+
* @required Type of the security scheme.
|
|
32
|
+
*/
|
|
33
|
+
type: "http";
|
|
34
|
+
/**
|
|
35
|
+
* @required The name of the HTTP Authentication scheme to be used in the Authorization header as defined
|
|
36
|
+
* in RFC7235. The values used SHOULD be registered in the IANA Authentication Scheme registry.
|
|
37
|
+
* The value is case-insensitive, as defined in RFC7235.
|
|
38
|
+
*/
|
|
39
|
+
scheme: string;
|
|
40
|
+
/**
|
|
41
|
+
* @optional A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually
|
|
42
|
+
* generated by an authorization server, so this information is primarily for documentation
|
|
43
|
+
* purposes.
|
|
44
|
+
*/
|
|
45
|
+
bearerFormat?: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* @description OAuth2 security scheme configuration.
|
|
49
|
+
* @required type
|
|
50
|
+
* @required flows
|
|
51
|
+
* Mirrors the OpenAPI Security Scheme Object
|
|
52
|
+
* (https://swagger.io/specification/#security-scheme-object)
|
|
53
|
+
*/
|
|
54
|
+
export interface OAuth2SecurityScheme extends SecuritySchemeBase {
|
|
55
|
+
/**
|
|
56
|
+
* @required Type of the security scheme.
|
|
57
|
+
*/
|
|
58
|
+
type: "oauth2";
|
|
59
|
+
/**
|
|
60
|
+
* @required An object containing configuration information for the flow types supported.
|
|
61
|
+
*/
|
|
62
|
+
flows: OAuthFlows;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* @description OpenID Connect security scheme.
|
|
66
|
+
* @required type
|
|
67
|
+
* @required openIdConnectUrl
|
|
68
|
+
*/
|
|
69
|
+
export interface OpenIdConnectSecurityScheme extends SecuritySchemeBase {
|
|
70
|
+
/**
|
|
71
|
+
* @required Type of the security scheme.
|
|
72
|
+
*/
|
|
73
|
+
type: "openIdConnect";
|
|
74
|
+
/**
|
|
75
|
+
* @required Well-known URL to discover the [[OpenID-Connect-Discovery]] provider metadata.
|
|
76
|
+
*/
|
|
77
|
+
openIdConnectUrl: string;
|
|
78
|
+
}
|
|
79
|
+
export type SecurityScheme = APIKeySecurityScheme | HTTPAuthSecurityScheme | OAuth2SecurityScheme | OpenIdConnectSecurityScheme;
|
|
80
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../../../src/types/schemas/a2a/auth/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC;;;;;GAKG;AACH,MAAM,WAAW,oBAAqB,SAAQ,kBAAkB;IAC9D;;OAEG;IACH,IAAI,EAAE,QAAQ,CAAC;IAEf;;OAEG;IACH,EAAE,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAElC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;GAKG;AACH,MAAM,WAAW,sBAAuB,SAAQ,kBAAkB;IAChE;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,oBAAqB,SAAQ,kBAAkB;IAC9D;;OAEG;IACH,IAAI,EAAE,QAAQ,CAAC;IAEf;;OAEG;IACH,KAAK,EAAE,UAAU,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,2BAA4B,SAAQ,kBAAkB;IACrE;;OAEG;IACH,IAAI,EAAE,eAAe,CAAC;IAEtB;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,MAAM,cAAc,GACtB,oBAAoB,GACpB,sBAAsB,GACtB,oBAAoB,GACpB,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description Base properties shared by all security schemes.
|
|
3
|
+
* @required type
|
|
4
|
+
* @optional description
|
|
5
|
+
*/
|
|
6
|
+
export interface SecuritySchemeBase {
|
|
7
|
+
/**
|
|
8
|
+
* @required Type of the security scheme.
|
|
9
|
+
*/
|
|
10
|
+
type: "apiKey" | "http" | "oauth2" | "openIdConnect";
|
|
11
|
+
/**
|
|
12
|
+
* @optional Description of this security scheme.
|
|
13
|
+
*/
|
|
14
|
+
description?: string;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../../../src/types/schemas/a2a/auth/base.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,eAAe,CAAC;IAErD;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/types/schemas/a2a/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description Configuration details for a supported Authorization Code OAuth Flow
|
|
3
|
+
* @required authorizationUrl
|
|
4
|
+
* @required tokenUrl
|
|
5
|
+
* @optional refreshUrl
|
|
6
|
+
* @required scopes
|
|
7
|
+
*/
|
|
8
|
+
export interface AuthorizationCodeOAuthFlow {
|
|
9
|
+
/**
|
|
10
|
+
* @required The authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2
|
|
11
|
+
* standard requires the use of TLS
|
|
12
|
+
*/
|
|
13
|
+
authorizationUrl: string;
|
|
14
|
+
/**
|
|
15
|
+
* @required The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard
|
|
16
|
+
* requires the use of TLS.
|
|
17
|
+
*/
|
|
18
|
+
tokenUrl: string;
|
|
19
|
+
/**
|
|
20
|
+
* @optional The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2
|
|
21
|
+
* standard requires the use of TLS.
|
|
22
|
+
*/
|
|
23
|
+
refreshUrl?: string;
|
|
24
|
+
/**
|
|
25
|
+
* @required The available scopes for the OAuth2 security scheme. A map between the scope name and a short
|
|
26
|
+
* description for it. The map MAY be empty.
|
|
27
|
+
*/
|
|
28
|
+
scopes: Record<string, string>;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* @description Configuration details for a supported Client Credentials OAuth Flow
|
|
32
|
+
* @required tokenUrl
|
|
33
|
+
* @optional refreshUrl
|
|
34
|
+
* @required scopes
|
|
35
|
+
*/
|
|
36
|
+
export interface ClientCredentialsOAuthFlow {
|
|
37
|
+
/**
|
|
38
|
+
* @required The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard
|
|
39
|
+
* requires the use of TLS.
|
|
40
|
+
*/
|
|
41
|
+
tokenUrl: string;
|
|
42
|
+
/**
|
|
43
|
+
* @optional The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2
|
|
44
|
+
* standard requires the use of TLS.
|
|
45
|
+
*/
|
|
46
|
+
refreshUrl?: string;
|
|
47
|
+
/**
|
|
48
|
+
* @required The available scopes for the OAuth2 security scheme. A map between the scope name and a short
|
|
49
|
+
* description for it. The map MAY be empty.
|
|
50
|
+
*/
|
|
51
|
+
scopes: Record<string, string>;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* @description Configuration details for a supported Implicit OAuth Flow
|
|
55
|
+
* @required authorizationUrl
|
|
56
|
+
* @optional refreshUrl
|
|
57
|
+
* @required scopes
|
|
58
|
+
*/
|
|
59
|
+
export interface ImplicitOAuthFlow {
|
|
60
|
+
/**
|
|
61
|
+
* @required The authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2
|
|
62
|
+
* standard requires the use of TLS
|
|
63
|
+
*/
|
|
64
|
+
authorizationUrl: string;
|
|
65
|
+
/**
|
|
66
|
+
* @optional The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2
|
|
67
|
+
* standard requires the use of TLS.
|
|
68
|
+
*/
|
|
69
|
+
refreshUrl?: string;
|
|
70
|
+
/**
|
|
71
|
+
* @required The available scopes for the OAuth2 security scheme. A map between the scope name and a short
|
|
72
|
+
* description for it. The map MAY be empty.
|
|
73
|
+
*/
|
|
74
|
+
scopes: Record<string, string>;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* @description Configuration details for a supported Password OAuth Flow
|
|
78
|
+
* @required tokenUrl
|
|
79
|
+
* @optional refreshUrl
|
|
80
|
+
* @required scopes
|
|
81
|
+
*/
|
|
82
|
+
export interface PasswordOAuthFlow {
|
|
83
|
+
/**
|
|
84
|
+
* @required The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard
|
|
85
|
+
* requires the use of TLS.
|
|
86
|
+
*/
|
|
87
|
+
tokenUrl: string;
|
|
88
|
+
/**
|
|
89
|
+
* @optional The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2
|
|
90
|
+
* standard requires the use of TLS.
|
|
91
|
+
*/
|
|
92
|
+
refreshUrl?: string;
|
|
93
|
+
/**
|
|
94
|
+
* @required The available scopes for the OAuth2 security scheme. A map between the scope name and a short
|
|
95
|
+
* description for it. The map MAY be empty.
|
|
96
|
+
*/
|
|
97
|
+
scopes: Record<string, string>;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* @description The configuration of supported OAuth Flows
|
|
101
|
+
* @optional authorizationCode
|
|
102
|
+
* @optional clientCredentials
|
|
103
|
+
* @optional implicit
|
|
104
|
+
* @optional password
|
|
105
|
+
*/
|
|
106
|
+
export interface OAuthFlows {
|
|
107
|
+
/**
|
|
108
|
+
* @optional Configuration for the OAuth Authorization Code flow. Previously called accessCode in OpenAPI 2.0.
|
|
109
|
+
*/
|
|
110
|
+
authorizationCode?: AuthorizationCodeOAuthFlow;
|
|
111
|
+
/**
|
|
112
|
+
* @optional Configuration for the OAuth Client Credentials flow. Previously called application in OpenAPI 2.0
|
|
113
|
+
*/
|
|
114
|
+
clientCredentials?: ClientCredentialsOAuthFlow;
|
|
115
|
+
/**
|
|
116
|
+
* @optional Configuration for the OAuth Implicit flow
|
|
117
|
+
*/
|
|
118
|
+
implicit?: ImplicitOAuthFlow;
|
|
119
|
+
/**
|
|
120
|
+
* @optional Configuration for the OAuth Resource Owner Password flow
|
|
121
|
+
*/
|
|
122
|
+
password?: PasswordOAuthFlow;
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=oauth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../../../../../src/types/schemas/a2a/auth/oauth.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC;AAED;;;;;GAKG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC;AAED;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC;AAED;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,iBAAiB,CAAC,EAAE,0BAA0B,CAAC;IAE/C;;OAEG;IACH,iBAAiB,CAAC,EAAE,0BAA0B,CAAC;IAE/C;;OAEG;IACH,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,EAAE,iBAAiB,CAAC;CAC9B"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { JSONRPCError } from "./rpc.js";
|
|
2
|
+
/**
|
|
3
|
+
* @description Error code for JSON Parse Error (-32700). Invalid JSON was received by the server.
|
|
4
|
+
*/
|
|
5
|
+
export declare const ErrorCodeParseError = -32700;
|
|
6
|
+
export type ErrorCodeParseError = typeof ErrorCodeParseError;
|
|
7
|
+
export type JSONParseError<Data = unknown> = JSONRPCError<ErrorCodeParseError, Data>;
|
|
8
|
+
/**
|
|
9
|
+
* @description Error code for Invalid Request (-32600). The JSON sent is not a valid Request object.
|
|
10
|
+
*/
|
|
11
|
+
export declare const ErrorCodeInvalidRequest = -32600;
|
|
12
|
+
export type ErrorCodeInvalidRequest = typeof ErrorCodeInvalidRequest;
|
|
13
|
+
export type InvalidRequestError<Data = unknown> = JSONRPCError<ErrorCodeInvalidRequest, Data>;
|
|
14
|
+
/**
|
|
15
|
+
* @description Error code for Method Not Found (-32601). The method does not exist / is not available.
|
|
16
|
+
*/
|
|
17
|
+
export declare const ErrorCodeMethodNotFound = -32601;
|
|
18
|
+
export type ErrorCodeMethodNotFound = typeof ErrorCodeMethodNotFound;
|
|
19
|
+
export type MethodNotFoundError<Data = unknown> = JSONRPCError<ErrorCodeMethodNotFound, Data>;
|
|
20
|
+
/**
|
|
21
|
+
* @description Error code for Invalid Params (-32602). Invalid method parameter(s).
|
|
22
|
+
*/
|
|
23
|
+
export declare const ErrorCodeInvalidParams = -32602;
|
|
24
|
+
export type ErrorCodeInvalidParams = typeof ErrorCodeInvalidParams;
|
|
25
|
+
export type InvalidParamsError<Data = unknown> = JSONRPCError<ErrorCodeInvalidParams, Data>;
|
|
26
|
+
/**
|
|
27
|
+
* @description Error code for Internal Error (-32603). Internal JSON-RPC error.
|
|
28
|
+
*/
|
|
29
|
+
export declare const ErrorCodeInternalError = -32603;
|
|
30
|
+
export type ErrorCodeInternalError = typeof ErrorCodeInternalError;
|
|
31
|
+
export type InternalError<Data = unknown> = JSONRPCError<ErrorCodeInternalError, Data>;
|
|
32
|
+
/**
|
|
33
|
+
* @description Error code for Task Not Found (-32001). The specified task was not found.
|
|
34
|
+
*/
|
|
35
|
+
export declare const ErrorCodeTaskNotFound = -32001;
|
|
36
|
+
export type ErrorCodeTaskNotFound = typeof ErrorCodeTaskNotFound;
|
|
37
|
+
export type TaskNotFoundError<Data = unknown> = JSONRPCError<ErrorCodeTaskNotFound, Data>;
|
|
38
|
+
/**
|
|
39
|
+
* @description Error code for Task Not Cancelable (-32002). The specified task cannot be canceled.
|
|
40
|
+
*/
|
|
41
|
+
export declare const ErrorCodeTaskNotCancelable = -32002;
|
|
42
|
+
export type ErrorCodeTaskNotCancelable = typeof ErrorCodeTaskNotCancelable;
|
|
43
|
+
export type TaskNotCancelableError<Data = unknown> = JSONRPCError<ErrorCodeTaskNotCancelable, Data>;
|
|
44
|
+
/**
|
|
45
|
+
* @description Error code for Push Notification Not Supported (-32003). Push Notifications are not supported for this operation or agent.
|
|
46
|
+
*/
|
|
47
|
+
export declare const ErrorCodePushNotificationNotSupported = -32003;
|
|
48
|
+
export type ErrorCodePushNotificationNotSupported = typeof ErrorCodePushNotificationNotSupported;
|
|
49
|
+
export type PushNotificationNotSupportedError<Data = unknown> = JSONRPCError<ErrorCodePushNotificationNotSupported, Data>;
|
|
50
|
+
/**
|
|
51
|
+
* @description Error code for Unsupported Operation (-32004). The requested operation is not supported by the agent.
|
|
52
|
+
*/
|
|
53
|
+
export declare const ErrorCodeUnsupportedOperation = -32004;
|
|
54
|
+
export type ErrorCodeUnsupportedOperation = typeof ErrorCodeUnsupportedOperation;
|
|
55
|
+
export type UnsupportedOperationError<Data = unknown> = JSONRPCError<ErrorCodeUnsupportedOperation, Data>;
|
|
56
|
+
/**
|
|
57
|
+
* @description Error code for Content Type Not Supported (-32005). The requested content type is not supported by the agent.
|
|
58
|
+
*/
|
|
59
|
+
export declare const ErrorCodeContentTypeNotSupported = -32005;
|
|
60
|
+
export type ErrorCodeContentTypeNotSupported = typeof ErrorCodeContentTypeNotSupported;
|
|
61
|
+
export type ContentTypeNotSupportedError<Data = unknown> = JSONRPCError<ErrorCodeContentTypeNotSupported, Data>;
|
|
62
|
+
/**
|
|
63
|
+
* @description Error code for Invalid Agent Response (-32006). The agent returned an invalid response for the current method.
|
|
64
|
+
*/
|
|
65
|
+
export declare const ErrorCodeInvalidAgentResponse = -32006;
|
|
66
|
+
export type ErrorCodeInvalidAgentResponse = typeof ErrorCodeInvalidAgentResponse;
|
|
67
|
+
export type InvalidAgentResponseError<Data = unknown> = JSONRPCError<ErrorCodeInvalidAgentResponse, Data>;
|
|
68
|
+
/**
|
|
69
|
+
* Union of all well-known A2A and standard JSON-RPC error codes defined in this schema.
|
|
70
|
+
* Use this type for checking against specific error codes. A server might theoretically
|
|
71
|
+
* use other codes within the valid JSON-RPC ranges.
|
|
72
|
+
*/
|
|
73
|
+
export type KnownErrorCode = typeof ErrorCodeParseError | typeof ErrorCodeInvalidRequest | typeof ErrorCodeMethodNotFound | typeof ErrorCodeInvalidParams | typeof ErrorCodeInternalError | typeof ErrorCodeTaskNotFound | typeof ErrorCodeTaskNotCancelable | typeof ErrorCodePushNotificationNotSupported | typeof ErrorCodeUnsupportedOperation | typeof ErrorCodeContentTypeNotSupported | typeof ErrorCodeInvalidAgentResponse;
|
|
74
|
+
export type A2AError<Data = unknown> = JSONParseError<Data> | InvalidRequestError<Data> | MethodNotFoundError<Data> | InvalidParamsError<Data> | InternalError<Data> | TaskNotFoundError<Data> | TaskNotCancelableError<Data> | PushNotificationNotSupportedError<Data> | UnsupportedOperationError<Data> | ContentTypeNotSupportedError<Data> | InvalidAgentResponseError<Data>;
|
|
75
|
+
//# sourceMappingURL=error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../../../src/types/schemas/a2a/error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC;;GAEG;AACH,eAAO,MAAM,mBAAmB,SAAS,CAAC;AAC1C,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC;AAE7D,MAAM,MAAM,cAAc,CAAC,IAAI,GAAG,OAAO,IAAI,YAAY,CACvD,mBAAmB,EACnB,IAAI,CACL,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,SAAS,CAAC;AAC9C,MAAM,MAAM,uBAAuB,GAAG,OAAO,uBAAuB,CAAC;AAErE,MAAM,MAAM,mBAAmB,CAAC,IAAI,GAAG,OAAO,IAAI,YAAY,CAC5D,uBAAuB,EACvB,IAAI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yB,CAAC,IAAI,CAAC,GAC/B,4BAA4B,CAAC,IAAI,CAAC,GAClC,yBAAyB,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { SecurityScheme } from "./auth/auth.js";
|
|
2
|
+
/**
|
|
3
|
+
* @description Represents the provider or organization behind an agent.
|
|
4
|
+
*/
|
|
5
|
+
export interface AgentProvider {
|
|
6
|
+
/**
|
|
7
|
+
* @required The name of the organization providing the agent.
|
|
8
|
+
*/
|
|
9
|
+
organization: string;
|
|
10
|
+
/**
|
|
11
|
+
* @required URL associated with the agent provider.
|
|
12
|
+
*/
|
|
13
|
+
url: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @description Defines optional capabilities supported by an agent.
|
|
17
|
+
*/
|
|
18
|
+
export interface AgentCapabilities {
|
|
19
|
+
/**
|
|
20
|
+
* @required Indicates if the agent supports streaming responses.
|
|
21
|
+
*/
|
|
22
|
+
streaming?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* @required Indicates if the agent supports push notification mechanisms.
|
|
25
|
+
*/
|
|
26
|
+
pushNotifications?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* @required Indicates if the agent supports providing state transition history.
|
|
29
|
+
*/
|
|
30
|
+
stateTransitionHistory?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* @optional Extensions supported by this agent.
|
|
33
|
+
*/
|
|
34
|
+
extensions?: AgentExtension[];
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* @description A declaration of an extension supported by an Agent.
|
|
38
|
+
*/
|
|
39
|
+
export interface AgentExtension {
|
|
40
|
+
/**
|
|
41
|
+
* @required The URI of the extension.
|
|
42
|
+
*/
|
|
43
|
+
uri: string;
|
|
44
|
+
/**
|
|
45
|
+
* @optional A description of how this agent uses this extension.
|
|
46
|
+
*/
|
|
47
|
+
description?: string;
|
|
48
|
+
/**
|
|
49
|
+
* @optional Whether the client must follow specific requirements of the extension.
|
|
50
|
+
*/
|
|
51
|
+
required?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* @optional Optional configuration for the extension.
|
|
54
|
+
*/
|
|
55
|
+
params?: Record<string, unknown>;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* @description Represents a unit of capability that an agent can perform.
|
|
59
|
+
*/
|
|
60
|
+
export interface AgentSkill {
|
|
61
|
+
/**
|
|
62
|
+
* @required Unique identifier for the skill.
|
|
63
|
+
*/
|
|
64
|
+
id: string;
|
|
65
|
+
/**
|
|
66
|
+
* @required Human-readable name of the skill.
|
|
67
|
+
*/
|
|
68
|
+
name: string;
|
|
69
|
+
/**
|
|
70
|
+
* @required description of the skill.
|
|
71
|
+
* @description Description of the skill - will be used by the client or a human
|
|
72
|
+
* as a hint to understand what the skill does.
|
|
73
|
+
*/
|
|
74
|
+
description: string;
|
|
75
|
+
/**
|
|
76
|
+
* @required list of tags associated with the skill for categorization.
|
|
77
|
+
* @description Set of tagwords describing classes of capabilities for this specific skill.
|
|
78
|
+
* @example ["cooking", "customer support", "billing"]
|
|
79
|
+
*/
|
|
80
|
+
tags: string[];
|
|
81
|
+
/**
|
|
82
|
+
* @optional list of example inputs or use cases for the skill.
|
|
83
|
+
* @description The set of example scenarios that the skill can perform.
|
|
84
|
+
* Will be used by the client as a hint to understand how the skill can be used.
|
|
85
|
+
* @example ["I need a recipe for bread"]
|
|
86
|
+
*/
|
|
87
|
+
examples?: string[];
|
|
88
|
+
/**
|
|
89
|
+
* @optional list of input modes supported by this skill.
|
|
90
|
+
* @description The set of interaction modes that the skill supports
|
|
91
|
+
* (if different than the default).
|
|
92
|
+
* Supported mime types for input.
|
|
93
|
+
*/
|
|
94
|
+
inputModes?: string[];
|
|
95
|
+
/**
|
|
96
|
+
* @optional list of output modes supported by this skil.
|
|
97
|
+
* @description Supported mime types for output.
|
|
98
|
+
*/
|
|
99
|
+
outputModes?: string[];
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* @description An AgentCard conveys key information:
|
|
103
|
+
* - Overall details (version, name, description, uses)
|
|
104
|
+
* - Skills: A set of capabilities the agent can perform
|
|
105
|
+
* - Default modalities/content types supported by the agent.
|
|
106
|
+
* - Authentication requirements
|
|
107
|
+
* @required name
|
|
108
|
+
* @required description
|
|
109
|
+
* @required url
|
|
110
|
+
* @optional iconUrl
|
|
111
|
+
* @required version
|
|
112
|
+
* @required capabilities
|
|
113
|
+
* @required defaultInputModes
|
|
114
|
+
* @required defaultOutputModes
|
|
115
|
+
* @required skills
|
|
116
|
+
* @optional provider
|
|
117
|
+
* @optional documentationUrl
|
|
118
|
+
* @optional securitySchemes
|
|
119
|
+
* @optional security
|
|
120
|
+
* @optional supportsAuthenticatedExtendedCard
|
|
121
|
+
*/
|
|
122
|
+
export interface AgentCard {
|
|
123
|
+
/**
|
|
124
|
+
* @required Human readable name of the agent.
|
|
125
|
+
* @example "Recipe Agent"
|
|
126
|
+
*/
|
|
127
|
+
name: string;
|
|
128
|
+
/**
|
|
129
|
+
* @required A human-readable description of the agent.
|
|
130
|
+
* @description Used to assist users and other agents in understanding what the agent can do.
|
|
131
|
+
* @example "Agent that helps users with recipes and cooking."
|
|
132
|
+
*/
|
|
133
|
+
description: string;
|
|
134
|
+
/**
|
|
135
|
+
* @required The base URL endpoint for interacting with the agent.
|
|
136
|
+
* @description The URL where the agent is hosted.
|
|
137
|
+
* @example "https://recipe-agent.com"
|
|
138
|
+
*/
|
|
139
|
+
url: string;
|
|
140
|
+
/**
|
|
141
|
+
* @optional The URL of the agent's icon.
|
|
142
|
+
* @description The URL of the agent's icon.
|
|
143
|
+
* @example "https://recipe-agent.com/icon.png"
|
|
144
|
+
*/
|
|
145
|
+
iconUrl?: string;
|
|
146
|
+
/**
|
|
147
|
+
* @optional the service provider of the agent.
|
|
148
|
+
* @description The organization or entity that provides the agent.
|
|
149
|
+
* @example { organization: "Recipe Inc.", url: "https://recipe-inc.com" }
|
|
150
|
+
*/
|
|
151
|
+
provider?: AgentProvider;
|
|
152
|
+
/**
|
|
153
|
+
* @required The version identifier for the agent or its API.
|
|
154
|
+
* @description The version of the agent - format is up to the provider.
|
|
155
|
+
* @example "1.0.0"
|
|
156
|
+
*/
|
|
157
|
+
version: string;
|
|
158
|
+
/**
|
|
159
|
+
* @optional An optional URL pointing to the agent's documentation.
|
|
160
|
+
* @description A URL to documentation for the agent.
|
|
161
|
+
* @example "https://recipe-agent.com/docs"
|
|
162
|
+
*/
|
|
163
|
+
documentationUrl?: string;
|
|
164
|
+
/**
|
|
165
|
+
* @required The capabilities supported by the agent.
|
|
166
|
+
* @description The capabilities supported by the agent.
|
|
167
|
+
* @example { "streaming": true, "pushNotifications": true, "stateTransitionHistory": true }
|
|
168
|
+
*/
|
|
169
|
+
capabilities: AgentCapabilities;
|
|
170
|
+
/**
|
|
171
|
+
* @optional Security scheme details used for authenticating with this agent.
|
|
172
|
+
* @description The security schemes supported by the agent.
|
|
173
|
+
*/
|
|
174
|
+
securitySchemes?: Record<string, SecurityScheme>;
|
|
175
|
+
/**
|
|
176
|
+
* @optional Security requirements for contacting the agent.
|
|
177
|
+
* @description The security requirements for contacting the agent.
|
|
178
|
+
*/
|
|
179
|
+
security?: Record<string, string[]>[];
|
|
180
|
+
/**
|
|
181
|
+
* @required The default input modes supported by the agent.
|
|
182
|
+
* @description The set of interaction modes that the agent supports across all skills. This can be overridden per-skill.
|
|
183
|
+
* Supported mime types for input.
|
|
184
|
+
*/
|
|
185
|
+
defaultInputModes: string[];
|
|
186
|
+
/**
|
|
187
|
+
* @required The default output modes supported by the agent.
|
|
188
|
+
* @description Supported mime types for output.
|
|
189
|
+
*/
|
|
190
|
+
defaultOutputModes: string[];
|
|
191
|
+
/**
|
|
192
|
+
* @required List of specific skills offered by the agent.
|
|
193
|
+
* @description The set of skills that the agent can perform.
|
|
194
|
+
* @example [{ "id": "recipe-search", "name": "Recipe Search", "description": "Search for recipes", "tags": ["cooking", "recipes"], "examples": ["I need a recipe for bread"] }]
|
|
195
|
+
*/
|
|
196
|
+
skills: AgentSkill[];
|
|
197
|
+
/**
|
|
198
|
+
* @optional true if the agent supports providing an extended agent card when the user is authenticated.
|
|
199
|
+
*/
|
|
200
|
+
supportsAuthenticatedExtendedCard?: boolean;
|
|
201
|
+
}
|
|
202
|
+
export * from "./task.js";
|
|
203
|
+
export * from "./message.js";
|
|
204
|
+
export * from "./parameters.js";
|
|
205
|
+
export * from "./notification.js";
|
|
206
|
+
export * from "./auth/index.js";
|
|
207
|
+
export * from "./rpc.js";
|
|
208
|
+
import { SendMessageRequest, SendMessageResponse, SendStreamingMessageRequest, SendStreamingMessageResponse } from "./message.js";
|
|
209
|
+
import { CancelTaskRequest, CancelTaskResponse, GetTaskRequest, GetTaskResponse, TaskResubscriptionRequest } from "./task.js";
|
|
210
|
+
import { SetTaskPushNotificationConfigResponse, GetTaskPushNotificationConfigResponse, SetTaskPushNotificationConfigRequest, GetTaskPushNotificationConfigRequest } from "./notification.js";
|
|
211
|
+
export type A2ARequest = SendMessageRequest | GetTaskRequest | CancelTaskRequest | SetTaskPushNotificationConfigRequest | GetTaskPushNotificationConfigRequest | TaskResubscriptionRequest | SendStreamingMessageRequest;
|
|
212
|
+
/**
|
|
213
|
+
* Represents any valid JSON-RPC response defined in the A2A protocol.
|
|
214
|
+
* (This is a helper type, not explicitly defined with `oneOf` in the schema like A2ARequest, but useful).
|
|
215
|
+
*/
|
|
216
|
+
export type A2AResponse = SendMessageResponse | SendStreamingMessageResponse | GetTaskResponse | CancelTaskResponse | SetTaskPushNotificationConfigResponse | GetTaskPushNotificationConfigResponse;
|
|
217
|
+
export * from "./error.js";
|
|
218
|
+
import { JSONParseError, InvalidRequestError, MethodNotFoundError, InvalidParamsError, InternalError, TaskNotFoundError, TaskNotCancelableError, PushNotificationNotSupportedError, UnsupportedOperationError, ContentTypeNotSupportedError, InvalidAgentResponseError } from "./error.js";
|
|
219
|
+
export type A2AError = JSONParseError | InvalidRequestError | MethodNotFoundError | InvalidParamsError | InternalError | TaskNotFoundError | TaskNotCancelableError | PushNotificationNotSupportedError | UnsupportedOperationError | ContentTypeNotSupportedError | InvalidAgentResponseError;
|
|
220
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/types/schemas/a2a/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B;;OAEG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC;;OAEG;IACH,UAAU,CAAC,EAAE,cAAc,EAAE,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,IAAI,EAAE,MAAM,EAAE,CAAC;IAEf;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IAEpB;;;;;OAKG;IACH,UAAU,CAAC,EAA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f,yBAAyB,EAC1B,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,qCAAqC,EACrC,qCAAqC,EACrC,oCAAoC,EACpC,oCAAoC,EACrC,MAAM,mBAAmB,CAAC;AAE3B,MAAM,MAAM,UAAU,GAClB,kBAAkB,GAClB,cAAc,GACd,iBAAiB,GACjB,oCAAoC,GACpC,oCAAoC,GACpC,yBAAyB,GACzB,2BAA2B,CAAC;AAEhC;;;GAGG;AACH,MAAM,MAAM,WAAW,GACnB,mBAAmB,GACnB,4BAA4B,GAC5B,eAAe,GACf,kBAAkB,GAClB,qCAAqC,GACrC,qCAAqC,CAAC;AAE1C,cAAc,YAAY,CAAC;AAE3B,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,sBAAsB,EACtB,iCAAiC,EACjC,yBAAyB,EACzB,4BAA4B,EAC5B,yBAAyB,EAC1B,MAAM,YAAY,CAAC;AAEpB,MAAM,MAAM,QAAQ,GAChB,cAAc,GACd,mBAAmB,GACnB,mBAAmB,GACnB,kBAAkB,GAClB,aAAa,GACb,iBAAiB,GACjB,sBAAsB,GACtB,iCAAiC,GACjC,yBAAyB,GACzB,4BAA4B,GAC5B,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { PushNotificationConfig } from "./notification.js";
|
|
2
|
+
import { Message } from "./parameters.js";
|
|
3
|
+
import { TaskArtifactUpdateEvent } from "./task.js";
|
|
4
|
+
import { TaskStatusUpdateEvent } from "./task.js";
|
|
5
|
+
import { JSONRPCErrorResponse, JSONRPCRequestWithParams, JSONRPCSuccessResponse } from "./rpc.js";
|
|
6
|
+
import { Task } from "./task.js";
|
|
7
|
+
/**
|
|
8
|
+
* @description Configuration for the send message request.
|
|
9
|
+
* @required acceptedOutputModes
|
|
10
|
+
* @optional historyLength
|
|
11
|
+
* @optional pushNotificationConfig
|
|
12
|
+
* @optional blocking
|
|
13
|
+
*/
|
|
14
|
+
export interface MessageSendConfiguration {
|
|
15
|
+
/**
|
|
16
|
+
* @required Accepted output modalities by the client.
|
|
17
|
+
*/
|
|
18
|
+
acceptedOutputModes: string[];
|
|
19
|
+
/**
|
|
20
|
+
* @optional Number of recent messages to be retrieved.
|
|
21
|
+
*/
|
|
22
|
+
historyLength?: number;
|
|
23
|
+
/**
|
|
24
|
+
* @optional Where the server should send notifications when disconnected.
|
|
25
|
+
*/
|
|
26
|
+
pushNotificationConfig?: PushNotificationConfig;
|
|
27
|
+
/**
|
|
28
|
+
* @optional If the server should treat the client as a blocking request.
|
|
29
|
+
*/
|
|
30
|
+
blocking?: boolean;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @description Sent by the client to the agent as a request. May create, continue or restart a task.
|
|
34
|
+
* @required message
|
|
35
|
+
* @optional configuration
|
|
36
|
+
* @optional metadata
|
|
37
|
+
*/
|
|
38
|
+
export interface MessageSendParams {
|
|
39
|
+
/**
|
|
40
|
+
* @required The message content to send to the agent for processing.
|
|
41
|
+
*/
|
|
42
|
+
message: Message;
|
|
43
|
+
/**
|
|
44
|
+
* @optional configuration information for the message.
|
|
45
|
+
*/
|
|
46
|
+
configuration?: MessageSendConfiguration;
|
|
47
|
+
/**
|
|
48
|
+
* @optional Extension metadata.
|
|
49
|
+
*/
|
|
50
|
+
metadata?: Record<string, unknown>;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* @description Request to send a message/initiate a task.
|
|
54
|
+
* @required id
|
|
55
|
+
* @required method
|
|
56
|
+
* @required params
|
|
57
|
+
*/
|
|
58
|
+
export type SendMessageRequest = JSONRPCRequestWithParams<"message/send", MessageSendParams>;
|
|
59
|
+
/**
|
|
60
|
+
* @description JSON-RPC success response model for the 'message/send' method.
|
|
61
|
+
* @required result
|
|
62
|
+
* @never error
|
|
63
|
+
* @oneOf Message | Task
|
|
64
|
+
*/
|
|
65
|
+
export type SendMessageSuccessResponse = JSONRPCSuccessResponse<Message | Task>;
|
|
66
|
+
/**
|
|
67
|
+
* @description JSON-RPC response model for the 'message/send' method.
|
|
68
|
+
* @oneOf SendMessageSuccessResponse | JSONRPCErrorResponse
|
|
69
|
+
*/
|
|
70
|
+
export type SendMessageResponse = SendMessageSuccessResponse | JSONRPCErrorResponse;
|
|
71
|
+
/**
|
|
72
|
+
* @description Request to send a message/initiate a task and subscribe to streaming updates.
|
|
73
|
+
* @required id
|
|
74
|
+
* @required method
|
|
75
|
+
* @required params
|
|
76
|
+
*/
|
|
77
|
+
export type SendStreamingMessageRequest = JSONRPCRequestWithParams<"message/stream", MessageSendParams>;
|
|
78
|
+
/**
|
|
79
|
+
* @description JSON-RPC success response model for the 'message/stream' method.
|
|
80
|
+
* @required result
|
|
81
|
+
* @never error
|
|
82
|
+
* @oneOf Message | Task | TaskStatusUpdateEvent | TaskArtifactUpdateEvent
|
|
83
|
+
*/
|
|
84
|
+
export type SendStreamingMessageSuccessResponse = JSONRPCSuccessResponse<Message | Task | TaskStatusUpdateEvent | TaskArtifactUpdateEvent>;
|
|
85
|
+
/**
|
|
86
|
+
* @description Response to a streaming task operation, either through `message/stream` or a subscription.
|
|
87
|
+
* @oneOf Message | Task | TaskStatusUpdateEvent | TaskArtifactUpdateEvent
|
|
88
|
+
*/
|
|
89
|
+
export type SendStreamingMessageResponse = SendStreamingMessageSuccessResponse | JSONRPCErrorResponse;
|
|
90
|
+
//# sourceMappingURL=message.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../../src/types/schemas/a2a/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,EACL,oBA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