@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,87 @@
|
|
|
1
|
+
import { JSONRPCErrorResponse, JSONRPCRequestWithParams, JSONRPCSuccessResponse } from "./rpc.js";
|
|
2
|
+
import { TaskIdParams } from "./task.js";
|
|
3
|
+
/**
|
|
4
|
+
* @description Information required for setting up push notifications.
|
|
5
|
+
* @required schemes
|
|
6
|
+
* @optional credentials
|
|
7
|
+
*/
|
|
8
|
+
export interface PushNotificationAuthenticationInfo {
|
|
9
|
+
/**
|
|
10
|
+
* @required Supported authentication schemes - e.g. Basic, Bearer */
|
|
11
|
+
schemes: string[];
|
|
12
|
+
/**
|
|
13
|
+
* @optional credentials
|
|
14
|
+
*/
|
|
15
|
+
credentials?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @description Configuration for setting up push notifications for task updates.
|
|
19
|
+
* @required url
|
|
20
|
+
* @optional token
|
|
21
|
+
* @optional authentication
|
|
22
|
+
*/
|
|
23
|
+
export interface PushNotificationConfig {
|
|
24
|
+
/**
|
|
25
|
+
* @optional Push Notification ID - created by server to support multiple callbacks.
|
|
26
|
+
*/
|
|
27
|
+
id?: string;
|
|
28
|
+
/**
|
|
29
|
+
* @required The URL endpoint where the agent should send notifications.
|
|
30
|
+
*/
|
|
31
|
+
url: string;
|
|
32
|
+
/**
|
|
33
|
+
* @optional A token to be included in push notification requests for verification/authentication.
|
|
34
|
+
*/
|
|
35
|
+
token?: string;
|
|
36
|
+
/**
|
|
37
|
+
* @optional authentication details needed by the agent to call the notification URL.
|
|
38
|
+
*/
|
|
39
|
+
authentication?: PushNotificationAuthenticationInfo;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* @description Represents the push notification information associated with a specific task ID.
|
|
43
|
+
* Used as parameters for `tasks/pushNotificationConfig/set` and as a result type.
|
|
44
|
+
* @required taskId
|
|
45
|
+
* @required pushNotificationConfig
|
|
46
|
+
*/
|
|
47
|
+
export interface TaskPushNotificationConfig {
|
|
48
|
+
/**
|
|
49
|
+
* @required The ID of the task the notification config is associated with.
|
|
50
|
+
*/
|
|
51
|
+
taskId: string;
|
|
52
|
+
/**
|
|
53
|
+
* @required The push notification configuration details.
|
|
54
|
+
*/
|
|
55
|
+
pushNotificationConfig: PushNotificationConfig;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* @description Request to set or update the push notification config for a task.
|
|
59
|
+
* @required TaskPushNotificationConfig
|
|
60
|
+
*/
|
|
61
|
+
export type SetTaskPushNotificationConfigRequest = JSONRPCRequestWithParams<"tasks/pushNotificationConfig/set", TaskPushNotificationConfig>;
|
|
62
|
+
/**
|
|
63
|
+
* @description JSON-RPC success response model for the 'tasks/pushNotificationConfig/set' method.
|
|
64
|
+
* @required TaskPushNotificationConfig
|
|
65
|
+
*/
|
|
66
|
+
export type SetTaskPushNotificationConfigSuccessResponse = JSONRPCSuccessResponse<TaskPushNotificationConfig>;
|
|
67
|
+
/**
|
|
68
|
+
* @description Response to a `tasks/pushNotificationConfig/set` request. Contains the confirmed TaskPushNotificationConfig or an error.
|
|
69
|
+
* @oneOf SetTaskPushNotificationConfigSuccessResponse | JSONRPCErrorResponse
|
|
70
|
+
*/
|
|
71
|
+
export type SetTaskPushNotificationConfigResponse = SetTaskPushNotificationConfigSuccessResponse | JSONRPCErrorResponse;
|
|
72
|
+
/**
|
|
73
|
+
* @description Request to retrieve the currently configured push notification configuration for a task.
|
|
74
|
+
* @required TaskIdParams
|
|
75
|
+
*/
|
|
76
|
+
export type GetTaskPushNotificationConfigRequest = JSONRPCRequestWithParams<"tasks/pushNotificationConfig/get", TaskIdParams>;
|
|
77
|
+
/**
|
|
78
|
+
* @description JSON-RPC success response model for the 'tasks/pushNotificationConfig/get' method.
|
|
79
|
+
* @required TaskPushNotificationConfig
|
|
80
|
+
*/
|
|
81
|
+
export type GetTaskPushNotificationConfigSuccessResponse = JSONRPCSuccessResponse<TaskPushNotificationConfig>;
|
|
82
|
+
/**
|
|
83
|
+
* @description Response to a `tasks/pushNotificationConfig/get` request. Contains the TaskPushNotificationConfig or an error.
|
|
84
|
+
* @oneOf GetTaskPushNotificationConfigSuccessResponse | JSONRPCErrorResponse
|
|
85
|
+
*/
|
|
86
|
+
export type GetTaskPushNotificationConfigResponse = GetTaskPushNotificationConfigSuccessResponse | JSONRPCErrorResponse;
|
|
87
|
+
//# sourceMappingURL=notification.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification.d.ts","sourceRoot":"","sources":["../../../../../src/types/schemas/a2a/notification.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,sBAAsB,EACvB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC;;;;GAIG;AACH,MAAM,WAAW,kCAAkC;IACjD;yEACqE;IACrE,OAAO,EAAE,MAAM,EAAE,CAAC;IAElB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,cAAc,CAAC,EAAE,kCAAkC,CAAC;CACrD;AAED;;;;;GAKG;AACH,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,sBAAsB,EAAE,sBAAsB,CAAC;CAChD;AAED;;;GAGG;AACH,MAAM,MAAM,oCAAoC,GAAG,wBAAwB,CACzE,kCAAkC,EAClC,0BAA0B,CAC3B,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,4CAA4C,GACtD,sBAAsB,CAAC,0BAA0B,CAAC,CAAC;AAErD;;;GAGG;AACH,MAAM,MAAM,qCAAqC,GAC7C,4CAA4C,GAC5C,oBAAoB,CAAC;AAEzB;;;GAGG;AACH,MAAM,MAAM,oCAAoC,GAAG,wBAAwB,CACzE,kCAAkC,EAClC,YAAY,CACb,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,4CAA4C,GACtD,sBAAsB,CAAC,0BAA0B,CAAC,CAAC;AAErD;;;GAGG;AACH,MAAM,MAAM,qCAAqC,GAC7C,4CAA4C,GAC5C,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description Represents the base entity for FileParts
|
|
3
|
+
* @optional name
|
|
4
|
+
* @optional mimeType
|
|
5
|
+
*/
|
|
6
|
+
export interface FileBase {
|
|
7
|
+
/**
|
|
8
|
+
* @optional name of the file.
|
|
9
|
+
*/
|
|
10
|
+
name?: string;
|
|
11
|
+
/**
|
|
12
|
+
* @optional MIME type of the file content.
|
|
13
|
+
*/
|
|
14
|
+
mimeType?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* @description Represents a file with its content encoded as a Base64 string.
|
|
18
|
+
* @required bytes
|
|
19
|
+
* @optional uri
|
|
20
|
+
*/
|
|
21
|
+
export interface FileWithBytes extends FileBase {
|
|
22
|
+
/**
|
|
23
|
+
* @required File content encoded as a Base64 string. Use this OR `uri`.
|
|
24
|
+
*/
|
|
25
|
+
bytes: string;
|
|
26
|
+
/**
|
|
27
|
+
* @optional URI pointing to the file content.
|
|
28
|
+
*/
|
|
29
|
+
uri?: never;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @description Represents a file with its content encoded as a Base64 string.
|
|
33
|
+
* @required uri
|
|
34
|
+
* @optional bytes
|
|
35
|
+
*/
|
|
36
|
+
export interface FileWithUri extends FileBase {
|
|
37
|
+
/**
|
|
38
|
+
* @required URI pointing to the file content.
|
|
39
|
+
*/
|
|
40
|
+
uri: string;
|
|
41
|
+
/**
|
|
42
|
+
* @optional File content encoded as a Base64 string. Use this OR `uri`.
|
|
43
|
+
*/
|
|
44
|
+
bytes?: never;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* @description Represents the base entity for Parts
|
|
48
|
+
* @optional metadata
|
|
49
|
+
*/
|
|
50
|
+
export interface PartBase {
|
|
51
|
+
/**
|
|
52
|
+
* @optional metadata associated with the part.
|
|
53
|
+
*/
|
|
54
|
+
metadata?: Record<string, unknown>;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* @description Represents a part of a message containing text content.
|
|
58
|
+
* @required kind
|
|
59
|
+
* @required text
|
|
60
|
+
*/
|
|
61
|
+
export interface TextPart extends PartBase {
|
|
62
|
+
/**
|
|
63
|
+
* @required Type identifier for this part.
|
|
64
|
+
*/
|
|
65
|
+
kind: "text";
|
|
66
|
+
/**
|
|
67
|
+
* @required The text content.
|
|
68
|
+
*/
|
|
69
|
+
text: string;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* @description Represents a part of a message containing file content.
|
|
73
|
+
* @required kind
|
|
74
|
+
* @required file
|
|
75
|
+
*/
|
|
76
|
+
export interface FilePart extends PartBase {
|
|
77
|
+
/**
|
|
78
|
+
* @required Type identifier for this part.
|
|
79
|
+
*/
|
|
80
|
+
kind: "file";
|
|
81
|
+
/**
|
|
82
|
+
* @required The file content, provided either inline or via URI.
|
|
83
|
+
*/
|
|
84
|
+
file: FileWithBytes | FileWithUri;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* @description Represents a part of a message containing structured data (JSON).
|
|
88
|
+
* @required kind
|
|
89
|
+
* @required data
|
|
90
|
+
*/
|
|
91
|
+
export interface DataPart extends PartBase {
|
|
92
|
+
/**
|
|
93
|
+
* @required Type identifier for this part.
|
|
94
|
+
*/
|
|
95
|
+
kind: "data";
|
|
96
|
+
/**
|
|
97
|
+
* @required The structured data content as a JSON object.
|
|
98
|
+
*/
|
|
99
|
+
data: Record<string, unknown>;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* @description Represents a single part of a multi-part message. Can be text, file, or data.
|
|
103
|
+
*/
|
|
104
|
+
export type Part = TextPart | FilePart | DataPart;
|
|
105
|
+
/**
|
|
106
|
+
* @description Represents an artifact generated or used by a task, potentially composed of multiple parts.
|
|
107
|
+
* @required artifactId
|
|
108
|
+
* @optional name
|
|
109
|
+
* @optional description
|
|
110
|
+
* @required parts
|
|
111
|
+
* @optional metadata
|
|
112
|
+
* @optional extensions
|
|
113
|
+
*/
|
|
114
|
+
export interface Artifact {
|
|
115
|
+
/**
|
|
116
|
+
* @required Unique identifier for the artifact.
|
|
117
|
+
*/
|
|
118
|
+
artifactId: string;
|
|
119
|
+
/**
|
|
120
|
+
* @optional name for the artifact.
|
|
121
|
+
*/
|
|
122
|
+
name?: string;
|
|
123
|
+
/**
|
|
124
|
+
* @optional description of the artifact.
|
|
125
|
+
*/
|
|
126
|
+
description?: string;
|
|
127
|
+
/**
|
|
128
|
+
* @required The constituent parts of the artifact.
|
|
129
|
+
*/
|
|
130
|
+
parts: Part[];
|
|
131
|
+
/**
|
|
132
|
+
* @optional metadata associated with the artifact.
|
|
133
|
+
*/
|
|
134
|
+
metadata?: Record<string, unknown>;
|
|
135
|
+
/**
|
|
136
|
+
* @optional The URIs of extensions that are present or contributed to this Artifact.
|
|
137
|
+
*/
|
|
138
|
+
extension?: string;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* @description Represents a message exchanged between a user and an agent.
|
|
142
|
+
* @required role
|
|
143
|
+
* @required parts
|
|
144
|
+
* @optional metadata
|
|
145
|
+
* @optional extensions
|
|
146
|
+
* @optional referenceTaskIds
|
|
147
|
+
* @optional messageId
|
|
148
|
+
* @optional taskId
|
|
149
|
+
*/
|
|
150
|
+
export interface Message {
|
|
151
|
+
/**
|
|
152
|
+
* @required The role of the sender (user or agent).
|
|
153
|
+
*/
|
|
154
|
+
role: "user" | "agent";
|
|
155
|
+
/**
|
|
156
|
+
* @required The content of the message, composed of one or more parts.
|
|
157
|
+
*/
|
|
158
|
+
parts: Part[];
|
|
159
|
+
/**
|
|
160
|
+
* @optional metadata associated with the message.
|
|
161
|
+
*/
|
|
162
|
+
metadata?: Record<string, unknown>;
|
|
163
|
+
/**
|
|
164
|
+
* @optional The URIs of extensions that are present or contributed to this Message.
|
|
165
|
+
*/
|
|
166
|
+
extensions?: string[];
|
|
167
|
+
/**
|
|
168
|
+
* @optional List of tasks referenced as context by this message.
|
|
169
|
+
*/
|
|
170
|
+
referenceTaskIds?: string[];
|
|
171
|
+
/**
|
|
172
|
+
* @required Identifier created by the message creator
|
|
173
|
+
*/
|
|
174
|
+
messageId: string;
|
|
175
|
+
/**
|
|
176
|
+
* @optional Identifier of task the message is related to
|
|
177
|
+
*/
|
|
178
|
+
taskId?: string;
|
|
179
|
+
/**
|
|
180
|
+
* @optional The context the message is associated with
|
|
181
|
+
*/
|
|
182
|
+
contextId?: string;
|
|
183
|
+
/**
|
|
184
|
+
* @required Event type
|
|
185
|
+
*/
|
|
186
|
+
kind: "message";
|
|
187
|
+
}
|
|
188
|
+
//# sourceMappingURL=parameters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parameters.d.ts","sourceRoot":"","sources":["../../../../../src/types/schemas/a2a/parameters.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAc,SAAQ,QAAQ;IAC7C;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC;CACb;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAY,SAAQ,QAAQ;IAC3C;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED;;;;GAIG;AACH,MAAM,WAAW,QAAS,SAAQ,QAAQ;IACxC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,MAAM,WAAW,QAAS,SAAQ,QAAQ;IACxC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,aAAa,GAAG,WAAW,CAAC;CACnC;AAED;;;;GAIG;AACH,MAAM,WAAW,QAAS,SAAQ,QAAQ;IACxC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,MAAM,IAAI,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAElD;;;;;;;;GAQG;AACH,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,KAAK,EAAE,IAAI,EAAE,CAAC;IAEd;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEnC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAEvB;;OAEG;IACH,KAAK,EAAE,IAAI,EAAE,CAAC;IAEd;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEnC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IAEtB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE5B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC;CACjB"}
|