agentstack-sdk 0.6.1 → 0.6.2-rc2
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 +36 -29
- package/dist/api.cjs +1994 -2
- package/dist/api.d.cts +29 -0
- package/dist/api.d.ts +25 -1
- package/dist/api.js +1801 -2
- package/dist/core-DcGxYeok.d.ts +1238 -0
- package/dist/core-XN6gWSAb.d.cts +1238 -0
- package/dist/core.cjs +1773 -2
- package/dist/core.d.cts +7 -0
- package/dist/core.d.ts +7 -5
- package/dist/core.js +1725 -2
- package/dist/extensions.cjs +798 -2
- package/dist/extensions.d.cts +244 -0
- package/dist/extensions.d.ts +240 -1
- package/dist/extensions.js +652 -2
- package/dist/index.cjs +3142 -2
- package/dist/index.d.cts +10 -0
- package/dist/index.d.ts +10 -7
- package/dist/index.js +2781 -2
- package/dist/index.umd.js +16509 -2
- package/dist/schemas-Dy3P_eAt.d.cts +57 -0
- package/dist/schemas-Dy3P_eAt.d.ts +57 -0
- package/dist/server.cjs +2762 -0
- package/dist/server.d.cts +244 -0
- package/dist/server.d.ts +244 -0
- package/dist/server.js +2716 -0
- package/dist/types-B5B3b0V2.d.cts +396 -0
- package/dist/types-B5B3b0V2.d.ts +396 -0
- package/dist/types-CmEs5_Ag.d.cts +3522 -0
- package/dist/types-DJm5-rZZ.d.ts +3522 -0
- package/dist/types-DvLt-XuC.d.ts +866 -0
- package/dist/types-E26YDM19.d.cts +866 -0
- package/dist/types-MfIzGgpV.d.cts +43 -0
- package/dist/types-MfIzGgpV.d.ts +43 -0
- package/package.json +36 -21
- package/src/client/a2a/extensions/auth/oauth/index.ts +6 -6
- package/src/client/a2a/extensions/auth/secrets/index.ts +6 -6
- package/src/client/a2a/extensions/interactions/approval/index.ts +7 -7
- package/src/client/a2a/extensions/services/embedding/index.ts +7 -3
- package/src/client/a2a/extensions/services/form/index.ts +3 -3
- package/src/client/a2a/extensions/services/llm/index.ts +3 -3
- package/src/client/a2a/extensions/services/mcp/index.ts +3 -3
- package/src/client/a2a/extensions/services/platform-api/index.ts +2 -2
- package/src/client/a2a/extensions/ui/agent-detail/index.ts +4 -4
- package/src/client/a2a/extensions/ui/canvas/index.ts +4 -4
- package/src/client/a2a/extensions/ui/citation/index.ts +4 -4
- package/src/client/a2a/extensions/ui/error/index.ts +4 -4
- package/src/client/a2a/extensions/ui/form-request/index.ts +4 -4
- package/src/client/a2a/extensions/ui/settings/index.ts +7 -3
- package/src/client/a2a/extensions/ui/trajectory/index.ts +4 -4
- package/src/client/core/extensions/types.ts +8 -1
- package/src/client/core/handle-task-status-update.ts +10 -3
- package/src/client/core/index.ts +1 -0
- package/src/client/core/utils/extract-text-from-message.ts +15 -0
- package/src/examples/hello-world.ts +34 -0
- package/src/experimental/server/a2a/extensions/agent-detail/index.ts +35 -0
- package/src/experimental/server/a2a/extensions/agent-detail/types.ts +10 -0
- package/src/experimental/server/a2a/extensions/index.ts +11 -0
- package/src/experimental/server/a2a/extensions/llm/index.ts +70 -0
- package/src/experimental/server/a2a/extensions/llm/types.ts +16 -0
- package/src/experimental/server/a2a/extensions/platform-self-registration/index.ts +34 -0
- package/src/experimental/server/a2a/extensions/platform-self-registration/types.ts +10 -0
- package/src/experimental/server/a2a/helpers.ts +95 -0
- package/{dist/client/a2a/index.d.ts → src/experimental/server/a2a/index.ts} +1 -1
- package/src/experimental/server/a2a/utils.ts +43 -0
- package/src/experimental/server/core/config/index.ts +17 -0
- package/src/experimental/server/core/config/schemas.ts +15 -0
- package/src/experimental/server/core/config/types.ts +10 -0
- package/src/experimental/server/core/context/index.ts +18 -0
- package/src/experimental/server/core/extensions/types.ts +24 -0
- package/{dist/client/a2a/protocol/index.d.ts → src/experimental/server/core/index.ts} +4 -0
- package/{dist/client/a2a/protocol/tests.d.ts → src/experimental/server/core/schemas.ts} +2 -1
- package/src/experimental/server/core/server/autoregistration.ts +142 -0
- package/src/experimental/server/core/server/executor.ts +284 -0
- package/src/experimental/server/core/server/helpers.ts +12 -0
- package/src/experimental/server/core/server/index.ts +166 -0
- package/src/experimental/server/core/server/types.ts +58 -0
- package/src/experimental/server/core/types.ts +8 -0
- package/src/experimental/server/core/utils.ts +59 -0
- package/{dist/client/api/core/errors/index.d.ts → src/server.ts} +3 -2
- package/dist/api.cjs.map +0 -1
- package/dist/api.js.map +0 -1
- package/dist/api.umd.js +0 -2
- package/dist/api.umd.js.map +0 -1
- package/dist/client/a2a/extensions/auth/oauth/index.d.ts +0 -10
- package/dist/client/a2a/extensions/auth/oauth/schemas.d.ts +0 -32
- package/dist/client/a2a/extensions/auth/oauth/types.d.ts +0 -13
- package/dist/client/a2a/extensions/auth/secrets/index.d.ts +0 -10
- package/dist/client/a2a/extensions/auth/secrets/schemas.d.ts +0 -23
- package/dist/client/a2a/extensions/auth/secrets/types.d.ts +0 -10
- package/dist/client/a2a/extensions/common/form/schemas.d.ts +0 -290
- package/dist/client/a2a/extensions/common/form/types.d.ts +0 -24
- package/dist/client/a2a/extensions/index.d.ts +0 -21
- package/dist/client/a2a/extensions/interactions/approval/index.d.ts +0 -10
- package/dist/client/a2a/extensions/interactions/approval/schemas.d.ts +0 -43
- package/dist/client/a2a/extensions/interactions/approval/types.d.ts +0 -14
- package/dist/client/a2a/extensions/schemas.d.ts +0 -19
- package/dist/client/a2a/extensions/services/embedding/index.d.ts +0 -9
- package/dist/client/a2a/extensions/services/embedding/schemas.d.ts +0 -29
- package/dist/client/a2a/extensions/services/embedding/types.d.ts +0 -10
- package/dist/client/a2a/extensions/services/form/index.d.ts +0 -9
- package/dist/client/a2a/extensions/services/form/schemas.d.ts +0 -97
- package/dist/client/a2a/extensions/services/form/types.d.ts +0 -8
- package/dist/client/a2a/extensions/services/llm/index.d.ts +0 -9
- package/dist/client/a2a/extensions/services/llm/schemas.d.ts +0 -29
- package/dist/client/a2a/extensions/services/llm/types.d.ts +0 -10
- package/dist/client/a2a/extensions/services/mcp/index.d.ts +0 -9
- package/dist/client/a2a/extensions/services/mcp/schemas.d.ts +0 -35
- package/dist/client/a2a/extensions/services/mcp/types.d.ts +0 -14
- package/dist/client/a2a/extensions/services/platform-api/index.d.ts +0 -11
- package/dist/client/a2a/extensions/services/platform-api/schemas.d.ts +0 -10
- package/dist/client/a2a/extensions/services/platform-api/types.d.ts +0 -7
- package/dist/client/a2a/extensions/types.d.ts +0 -19
- package/dist/client/a2a/extensions/ui/agent-detail/index.d.ts +0 -9
- package/dist/client/a2a/extensions/ui/agent-detail/schemas.d.ts +0 -41
- package/dist/client/a2a/extensions/ui/agent-detail/types.d.ts +0 -13
- package/dist/client/a2a/extensions/ui/canvas/index.d.ts +0 -9
- package/dist/client/a2a/extensions/ui/canvas/schemas.d.ts +0 -11
- package/dist/client/a2a/extensions/ui/canvas/types.d.ts +0 -7
- package/dist/client/a2a/extensions/ui/citation/index.d.ts +0 -9
- package/dist/client/a2a/extensions/ui/citation/schemas.d.ts +0 -21
- package/dist/client/a2a/extensions/ui/citation/types.d.ts +0 -8
- package/dist/client/a2a/extensions/ui/error/index.d.ts +0 -9
- package/dist/client/a2a/extensions/ui/error/schemas.d.ts +0 -30
- package/dist/client/a2a/extensions/ui/error/types.d.ts +0 -9
- package/dist/client/a2a/extensions/ui/form-request/index.d.ts +0 -9
- package/dist/client/a2a/extensions/ui/settings/index.d.ts +0 -9
- package/dist/client/a2a/extensions/ui/settings/schemas.d.ts +0 -113
- package/dist/client/a2a/extensions/ui/settings/types.d.ts +0 -18
- package/dist/client/a2a/extensions/ui/trajectory/index.d.ts +0 -9
- package/dist/client/a2a/extensions/ui/trajectory/schemas.d.ts +0 -10
- package/dist/client/a2a/extensions/ui/trajectory/types.d.ts +0 -7
- package/dist/client/a2a/protocol/schemas.d.ts +0 -988
- package/dist/client/a2a/protocol/types.d.ts +0 -52
- package/dist/client/a2a/protocol/utils.d.ts +0 -6
- package/dist/client/api/common/schemas.d.ts +0 -30
- package/dist/client/api/common/types.d.ts +0 -18
- package/dist/client/api/configuration/api.d.ts +0 -22
- package/dist/client/api/configuration/schemas.d.ts +0 -31
- package/dist/client/api/configuration/types.d.ts +0 -11
- package/dist/client/api/connectors/api.d.ts +0 -78
- package/dist/client/api/connectors/schemas.d.ts +0 -114
- package/dist/client/api/connectors/types.d.ts +0 -28
- package/dist/client/api/contexts/api.d.ts +0 -133
- package/dist/client/api/contexts/schemas.d.ts +0 -359
- package/dist/client/api/contexts/types.d.ts +0 -34
- package/dist/client/api/core/client.d.ts +0 -1273
- package/dist/client/api/core/errors/types.d.ts +0 -36
- package/dist/client/api/core/errors/utils.d.ts +0 -23
- package/dist/client/api/core/index.d.ts +0 -7
- package/dist/client/api/core/schemas.d.ts +0 -17
- package/dist/client/api/core/types.d.ts +0 -45
- package/dist/client/api/core/utils.d.ts +0 -23
- package/dist/client/api/files/api.d.ts +0 -32
- package/dist/client/api/files/schemas.d.ts +0 -61
- package/dist/client/api/files/types.d.ts +0 -19
- package/dist/client/api/index.d.ts +0 -7
- package/dist/client/api/model-providers/api.d.ts +0 -50
- package/dist/client/api/model-providers/schemas.d.ts +0 -80
- package/dist/client/api/model-providers/types.d.ts +0 -44
- package/dist/client/api/provider-builds/api.d.ts +0 -143
- package/dist/client/api/provider-builds/schemas.d.ts +0 -250
- package/dist/client/api/provider-builds/types.d.ts +0 -31
- package/dist/client/api/providers/api.d.ts +0 -847
- package/dist/client/api/providers/schemas.d.ts +0 -1335
- package/dist/client/api/providers/types.d.ts +0 -45
- package/dist/client/api/schemas.d.ts +0 -15
- package/dist/client/api/types.d.ts +0 -15
- package/dist/client/api/user-feedback/api.d.ts +0 -9
- package/dist/client/api/user-feedback/schemas.d.ts +0 -15
- package/dist/client/api/user-feedback/types.d.ts +0 -8
- package/dist/client/api/users/api.d.ts +0 -13
- package/dist/client/api/users/schemas.d.ts +0 -20
- package/dist/client/api/users/types.d.ts +0 -14
- package/dist/client/api/variables/api.d.ts +0 -12
- package/dist/client/api/variables/schemas.d.ts +0 -13
- package/dist/client/api/variables/types.d.ts +0 -10
- package/dist/client/core/create-authenticated-fetch.d.ts +0 -5
- package/dist/client/core/extensions/extract.d.ts +0 -8
- package/dist/client/core/extensions/fulfill.d.ts +0 -8
- package/dist/client/core/extensions/resolve-user-metadata.d.ts +0 -6
- package/dist/client/core/extensions/types.d.ts +0 -68
- package/dist/client/core/fulfillment-resolvers/build-llm-extension-fulfillment-resolver.d.ts +0 -8
- package/dist/client/core/handle-agent-card.d.ts +0 -128
- package/dist/client/core/handle-task-status-update.d.ts +0 -7
- package/dist/client/core/index.d.ts +0 -14
- package/dist/client/core/utils/build-message-builder.d.ts +0 -9
- package/dist/client/core/utils/get-agent-card-path.d.ts +0 -5
- package/dist/core.cjs.map +0 -1
- package/dist/core.js.map +0 -1
- package/dist/core.umd.js +0 -2
- package/dist/core.umd.js.map +0 -1
- package/dist/extensions.cjs.map +0 -1
- package/dist/extensions.js.map +0 -1
- package/dist/extensions.umd.js +0 -2
- package/dist/extensions.umd.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/index.umd.js.map +0 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import z__default from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Copyright 2025 © BeeAI a Series of LF Projects, LLC
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
declare const llmDemandSchema: z__default.ZodObject<{
|
|
9
|
+
description: z__default.ZodOptional<z__default.ZodNullable<z__default.ZodString>>;
|
|
10
|
+
suggested: z__default.ZodOptional<z__default.ZodNullable<z__default.ZodArray<z__default.ZodString>>>;
|
|
11
|
+
}, z__default.core.$strip>;
|
|
12
|
+
declare const llmDemandsSchema: z__default.ZodObject<{
|
|
13
|
+
llm_demands: z__default.ZodRecord<z__default.ZodString, z__default.ZodObject<{
|
|
14
|
+
description: z__default.ZodOptional<z__default.ZodNullable<z__default.ZodString>>;
|
|
15
|
+
suggested: z__default.ZodOptional<z__default.ZodNullable<z__default.ZodArray<z__default.ZodString>>>;
|
|
16
|
+
}, z__default.core.$strip>>;
|
|
17
|
+
}, z__default.core.$strip>;
|
|
18
|
+
declare const llmFulfillmentSchema: z__default.ZodObject<{
|
|
19
|
+
identifier: z__default.ZodOptional<z__default.ZodNullable<z__default.ZodString>>;
|
|
20
|
+
api_base: z__default.ZodString;
|
|
21
|
+
api_key: z__default.ZodString;
|
|
22
|
+
api_model: z__default.ZodString;
|
|
23
|
+
}, z__default.core.$strip>;
|
|
24
|
+
declare const llmFulfillmentsSchema: z__default.ZodObject<{
|
|
25
|
+
llm_fulfillments: z__default.ZodRecord<z__default.ZodString, z__default.ZodObject<{
|
|
26
|
+
identifier: z__default.ZodOptional<z__default.ZodNullable<z__default.ZodString>>;
|
|
27
|
+
api_base: z__default.ZodString;
|
|
28
|
+
api_key: z__default.ZodString;
|
|
29
|
+
api_model: z__default.ZodString;
|
|
30
|
+
}, z__default.core.$strip>>;
|
|
31
|
+
}, z__default.core.$strip>;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Copyright 2025 © BeeAI a Series of LF Projects, LLC
|
|
35
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
type LLMDemand = z__default.infer<typeof llmDemandSchema>;
|
|
39
|
+
type LLMDemands = z__default.infer<typeof llmDemandsSchema>;
|
|
40
|
+
type LLMFulfillment = z__default.infer<typeof llmFulfillmentSchema>;
|
|
41
|
+
type LLMFulfillments = z__default.infer<typeof llmFulfillmentsSchema>;
|
|
42
|
+
|
|
43
|
+
export { type LLMDemand as L, type LLMDemands as a, type LLMFulfillment as b, type LLMFulfillments as c, llmDemandsSchema as d, llmFulfillmentSchema as e, llmFulfillmentsSchema as f, llmDemandSchema as l };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import z__default from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Copyright 2025 © BeeAI a Series of LF Projects, LLC
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
declare const llmDemandSchema: z__default.ZodObject<{
|
|
9
|
+
description: z__default.ZodOptional<z__default.ZodNullable<z__default.ZodString>>;
|
|
10
|
+
suggested: z__default.ZodOptional<z__default.ZodNullable<z__default.ZodArray<z__default.ZodString>>>;
|
|
11
|
+
}, z__default.core.$strip>;
|
|
12
|
+
declare const llmDemandsSchema: z__default.ZodObject<{
|
|
13
|
+
llm_demands: z__default.ZodRecord<z__default.ZodString, z__default.ZodObject<{
|
|
14
|
+
description: z__default.ZodOptional<z__default.ZodNullable<z__default.ZodString>>;
|
|
15
|
+
suggested: z__default.ZodOptional<z__default.ZodNullable<z__default.ZodArray<z__default.ZodString>>>;
|
|
16
|
+
}, z__default.core.$strip>>;
|
|
17
|
+
}, z__default.core.$strip>;
|
|
18
|
+
declare const llmFulfillmentSchema: z__default.ZodObject<{
|
|
19
|
+
identifier: z__default.ZodOptional<z__default.ZodNullable<z__default.ZodString>>;
|
|
20
|
+
api_base: z__default.ZodString;
|
|
21
|
+
api_key: z__default.ZodString;
|
|
22
|
+
api_model: z__default.ZodString;
|
|
23
|
+
}, z__default.core.$strip>;
|
|
24
|
+
declare const llmFulfillmentsSchema: z__default.ZodObject<{
|
|
25
|
+
llm_fulfillments: z__default.ZodRecord<z__default.ZodString, z__default.ZodObject<{
|
|
26
|
+
identifier: z__default.ZodOptional<z__default.ZodNullable<z__default.ZodString>>;
|
|
27
|
+
api_base: z__default.ZodString;
|
|
28
|
+
api_key: z__default.ZodString;
|
|
29
|
+
api_model: z__default.ZodString;
|
|
30
|
+
}, z__default.core.$strip>>;
|
|
31
|
+
}, z__default.core.$strip>;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Copyright 2025 © BeeAI a Series of LF Projects, LLC
|
|
35
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
type LLMDemand = z__default.infer<typeof llmDemandSchema>;
|
|
39
|
+
type LLMDemands = z__default.infer<typeof llmDemandsSchema>;
|
|
40
|
+
type LLMFulfillment = z__default.infer<typeof llmFulfillmentSchema>;
|
|
41
|
+
type LLMFulfillments = z__default.infer<typeof llmFulfillmentsSchema>;
|
|
42
|
+
|
|
43
|
+
export { type LLMDemand as L, type LLMDemands as a, type LLMFulfillment as b, type LLMFulfillments as c, llmDemandsSchema as d, llmFulfillmentSchema as e, llmFulfillmentsSchema as f, llmDemandSchema as l };
|
package/package.json
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentstack-sdk",
|
|
3
3
|
"author": "IBM Corp.",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.2-rc2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"build": "
|
|
8
|
-
"dev": "
|
|
7
|
+
"build": "tsup",
|
|
8
|
+
"dev": "tsup --watch",
|
|
9
|
+
"experimental:example:hello-world": "tsx watch src/examples/hello-world.ts",
|
|
10
|
+
"test": "vitest run",
|
|
11
|
+
"test:watch": "vitest"
|
|
9
12
|
},
|
|
10
13
|
"source": "src/index.ts",
|
|
11
14
|
"repository": {
|
|
@@ -21,9 +24,7 @@
|
|
|
21
24
|
"import": {
|
|
22
25
|
"types": "./dist/index.d.ts",
|
|
23
26
|
"default": "./dist/index.js"
|
|
24
|
-
}
|
|
25
|
-
"types": "./dist/index.d.ts",
|
|
26
|
-
"default": "./dist/index.js"
|
|
27
|
+
}
|
|
27
28
|
},
|
|
28
29
|
"./api": {
|
|
29
30
|
"require": {
|
|
@@ -33,9 +34,7 @@
|
|
|
33
34
|
"import": {
|
|
34
35
|
"types": "./dist/api.d.ts",
|
|
35
36
|
"default": "./dist/api.js"
|
|
36
|
-
}
|
|
37
|
-
"types": "./dist/api.d.ts",
|
|
38
|
-
"default": "./dist/api.js"
|
|
37
|
+
}
|
|
39
38
|
},
|
|
40
39
|
"./core": {
|
|
41
40
|
"require": {
|
|
@@ -45,9 +44,7 @@
|
|
|
45
44
|
"import": {
|
|
46
45
|
"types": "./dist/core.d.ts",
|
|
47
46
|
"default": "./dist/core.js"
|
|
48
|
-
}
|
|
49
|
-
"types": "./dist/core.d.ts",
|
|
50
|
-
"default": "./dist/core.js"
|
|
47
|
+
}
|
|
51
48
|
},
|
|
52
49
|
"./extensions": {
|
|
53
50
|
"require": {
|
|
@@ -57,9 +54,17 @@
|
|
|
57
54
|
"import": {
|
|
58
55
|
"types": "./dist/extensions.d.ts",
|
|
59
56
|
"default": "./dist/extensions.js"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"./experimental/server": {
|
|
60
|
+
"require": {
|
|
61
|
+
"types": "./dist/server.d.cts",
|
|
62
|
+
"default": "./dist/server.cjs"
|
|
60
63
|
},
|
|
61
|
-
"
|
|
62
|
-
|
|
64
|
+
"import": {
|
|
65
|
+
"types": "./dist/server.d.ts",
|
|
66
|
+
"default": "./dist/server.js"
|
|
67
|
+
}
|
|
63
68
|
},
|
|
64
69
|
"./package.json": "./package.json"
|
|
65
70
|
},
|
|
@@ -73,16 +78,26 @@
|
|
|
73
78
|
"module": "dist/index.js",
|
|
74
79
|
"unpkg": "dist/index.umd.js",
|
|
75
80
|
"dependencies": {
|
|
76
|
-
"@a2a-js/sdk": "^0.3.
|
|
77
|
-
"zod": "^4.
|
|
81
|
+
"@a2a-js/sdk": "^0.3.10",
|
|
82
|
+
"zod": "^4.3.6"
|
|
83
|
+
},
|
|
84
|
+
"peerDependencies": {
|
|
85
|
+
"express": "^4.18.0 || ^5.0.0"
|
|
86
|
+
},
|
|
87
|
+
"peerDependenciesMeta": {
|
|
88
|
+
"express": {
|
|
89
|
+
"optional": true
|
|
90
|
+
}
|
|
78
91
|
},
|
|
79
92
|
"devDependencies": {
|
|
80
93
|
"@i-am-bee/lint-config": "workspace:*",
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"prettier": "^3.
|
|
84
|
-
"
|
|
85
|
-
"
|
|
94
|
+
"@types/express": "^4.17.21",
|
|
95
|
+
"eslint": "^9.39.2",
|
|
96
|
+
"prettier": "^3.8.1",
|
|
97
|
+
"tsup": "^8.4.0",
|
|
98
|
+
"tsx": "^4.19.4",
|
|
99
|
+
"typescript": "^5.9.3",
|
|
100
|
+
"vitest": "^3.1.3"
|
|
86
101
|
},
|
|
87
102
|
"packageManager": "pnpm@9.9.0"
|
|
88
103
|
}
|
|
@@ -9,15 +9,15 @@ import type { A2AServiceExtension, A2AUiExtension } from '../../../../core/exten
|
|
|
9
9
|
import { oauthDemandsSchema, oauthFulfillmentsSchema, oauthRequestSchema } from './schemas';
|
|
10
10
|
import type { OAuthDemands, OAuthFulfillments, OAuthRequest } from './types';
|
|
11
11
|
|
|
12
|
-
const
|
|
12
|
+
export const OAUTH_EXTENSION_URI = 'https://a2a-extensions.agentstack.beeai.dev/auth/oauth/v1';
|
|
13
13
|
|
|
14
|
-
export const oauthExtension: A2AServiceExtension<typeof
|
|
15
|
-
getUri: () =>
|
|
14
|
+
export const oauthExtension: A2AServiceExtension<typeof OAUTH_EXTENSION_URI, OAuthDemands, OAuthFulfillments> = {
|
|
15
|
+
getUri: () => OAUTH_EXTENSION_URI,
|
|
16
16
|
getDemandsSchema: () => oauthDemandsSchema,
|
|
17
17
|
getFulfillmentsSchema: () => oauthFulfillmentsSchema,
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
export const oauthRequestExtension: A2AUiExtension<typeof
|
|
21
|
-
getUri: () =>
|
|
22
|
-
getMessageMetadataSchema: () => z.object({ [
|
|
20
|
+
export const oauthRequestExtension: A2AUiExtension<typeof OAUTH_EXTENSION_URI, OAuthRequest> = {
|
|
21
|
+
getUri: () => OAUTH_EXTENSION_URI,
|
|
22
|
+
getMessageMetadataSchema: () => z.object({ [OAUTH_EXTENSION_URI]: oauthRequestSchema }).partial(),
|
|
23
23
|
};
|
|
@@ -9,15 +9,15 @@ import type { A2AServiceExtension, A2AUiExtension } from '../../../../core/exten
|
|
|
9
9
|
import { secretDemandsSchema, secretFulfillmentsSchema } from './schemas';
|
|
10
10
|
import type { SecretDemands, SecretFulfillments } from './types';
|
|
11
11
|
|
|
12
|
-
const
|
|
12
|
+
export const SECRETS_EXTENSION_URI = 'https://a2a-extensions.agentstack.beeai.dev/auth/secrets/v1';
|
|
13
13
|
|
|
14
|
-
export const secretsExtension: A2AServiceExtension<typeof
|
|
15
|
-
getUri: () =>
|
|
14
|
+
export const secretsExtension: A2AServiceExtension<typeof SECRETS_EXTENSION_URI, SecretDemands, SecretFulfillments> = {
|
|
15
|
+
getUri: () => SECRETS_EXTENSION_URI,
|
|
16
16
|
getDemandsSchema: () => secretDemandsSchema,
|
|
17
17
|
getFulfillmentsSchema: () => secretFulfillmentsSchema,
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
export const secretsRequestExtension: A2AUiExtension<typeof
|
|
21
|
-
getUri: () =>
|
|
22
|
-
getMessageMetadataSchema: () => z.object({ [
|
|
20
|
+
export const secretsRequestExtension: A2AUiExtension<typeof SECRETS_EXTENSION_URI, SecretDemands> = {
|
|
21
|
+
getUri: () => SECRETS_EXTENSION_URI,
|
|
22
|
+
getMessageMetadataSchema: () => z.object({ [SECRETS_EXTENSION_URI]: secretDemandsSchema }).partial(),
|
|
23
23
|
};
|
|
@@ -9,14 +9,14 @@ import type { A2AUiExtension } from '../../../../core/extensions/types';
|
|
|
9
9
|
import { approvalRequestSchema, approvalResponseSchema } from './schemas';
|
|
10
10
|
import type { ApprovalRequest, ApprovalResponse } from './types';
|
|
11
11
|
|
|
12
|
-
const
|
|
12
|
+
export const APPROVAL_EXTENSION_URI = 'https://a2a-extensions.agentstack.beeai.dev/interactions/approval/v1';
|
|
13
13
|
|
|
14
|
-
export const approvalExtension: A2AUiExtension<typeof
|
|
15
|
-
getUri: () =>
|
|
16
|
-
getMessageMetadataSchema: () => z.object({ [
|
|
14
|
+
export const approvalExtension: A2AUiExtension<typeof APPROVAL_EXTENSION_URI, ApprovalRequest> = {
|
|
15
|
+
getUri: () => APPROVAL_EXTENSION_URI,
|
|
16
|
+
getMessageMetadataSchema: () => z.object({ [APPROVAL_EXTENSION_URI]: approvalRequestSchema }).partial(),
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
export const approvalResponseExtension: A2AUiExtension<typeof
|
|
20
|
-
getUri: () =>
|
|
21
|
-
getMessageMetadataSchema: () => z.object({ [
|
|
19
|
+
export const approvalResponseExtension: A2AUiExtension<typeof APPROVAL_EXTENSION_URI, ApprovalResponse> = {
|
|
20
|
+
getUri: () => APPROVAL_EXTENSION_URI,
|
|
21
|
+
getMessageMetadataSchema: () => z.object({ [APPROVAL_EXTENSION_URI]: approvalResponseSchema }).partial(),
|
|
22
22
|
};
|
|
@@ -7,10 +7,14 @@ import type { A2AServiceExtension } from '../../../../core/extensions/types';
|
|
|
7
7
|
import { embeddingDemandsSchema, embeddingFulfillmentsSchema } from './schemas';
|
|
8
8
|
import type { EmbeddingDemands, EmbeddingFulfillments } from './types';
|
|
9
9
|
|
|
10
|
-
const
|
|
10
|
+
export const EMBEDDING_EXTENSION_URI = 'https://a2a-extensions.agentstack.beeai.dev/services/embedding/v1';
|
|
11
11
|
|
|
12
|
-
export const embeddingExtension: A2AServiceExtension<
|
|
13
|
-
|
|
12
|
+
export const embeddingExtension: A2AServiceExtension<
|
|
13
|
+
typeof EMBEDDING_EXTENSION_URI,
|
|
14
|
+
EmbeddingDemands,
|
|
15
|
+
EmbeddingFulfillments
|
|
16
|
+
> = {
|
|
17
|
+
getUri: () => EMBEDDING_EXTENSION_URI,
|
|
14
18
|
getDemandsSchema: () => embeddingDemandsSchema,
|
|
15
19
|
getFulfillmentsSchema: () => embeddingFulfillmentsSchema,
|
|
16
20
|
};
|
|
@@ -7,10 +7,10 @@ import type { A2AServiceExtension } from '../../../../core/extensions/types';
|
|
|
7
7
|
import { formDemandsSchema, formFulfillmentsSchema } from './schemas';
|
|
8
8
|
import type { FormDemands, FormFulfillments } from './types';
|
|
9
9
|
|
|
10
|
-
const
|
|
10
|
+
export const FORM_EXTENSION_URI = 'https://a2a-extensions.agentstack.beeai.dev/services/form/v1';
|
|
11
11
|
|
|
12
|
-
export const formExtension: A2AServiceExtension<typeof
|
|
13
|
-
getUri: () =>
|
|
12
|
+
export const formExtension: A2AServiceExtension<typeof FORM_EXTENSION_URI, FormDemands, FormFulfillments> = {
|
|
13
|
+
getUri: () => FORM_EXTENSION_URI,
|
|
14
14
|
getDemandsSchema: () => formDemandsSchema,
|
|
15
15
|
getFulfillmentsSchema: () => formFulfillmentsSchema,
|
|
16
16
|
};
|
|
@@ -7,10 +7,10 @@ import type { A2AServiceExtension } from '../../../../core/extensions/types';
|
|
|
7
7
|
import { llmDemandsSchema, llmFulfillmentsSchema } from './schemas';
|
|
8
8
|
import type { LLMDemands, LLMFulfillments } from './types';
|
|
9
9
|
|
|
10
|
-
const
|
|
10
|
+
export const LLM_EXTENSION_URI = 'https://a2a-extensions.agentstack.beeai.dev/services/llm/v1';
|
|
11
11
|
|
|
12
|
-
export const llmExtension: A2AServiceExtension<typeof
|
|
13
|
-
getUri: () =>
|
|
12
|
+
export const llmExtension: A2AServiceExtension<typeof LLM_EXTENSION_URI, LLMDemands, LLMFulfillments> = {
|
|
13
|
+
getUri: () => LLM_EXTENSION_URI,
|
|
14
14
|
getDemandsSchema: () => llmDemandsSchema,
|
|
15
15
|
getFulfillmentsSchema: () => llmFulfillmentsSchema,
|
|
16
16
|
};
|
|
@@ -7,10 +7,10 @@ import type { A2AServiceExtension } from '../../../../core/extensions/types';
|
|
|
7
7
|
import { mcpDemandsSchema, mcpFulfillmentsSchema } from './schemas';
|
|
8
8
|
import type { MCPDemands, MCPFulfillments } from './types';
|
|
9
9
|
|
|
10
|
-
const
|
|
10
|
+
export const MCP_EXTENSION_URI = 'https://a2a-extensions.agentstack.beeai.dev/services/mcp/v1';
|
|
11
11
|
|
|
12
|
-
export const mcpExtension: A2AServiceExtension<typeof
|
|
13
|
-
getUri: () =>
|
|
12
|
+
export const mcpExtension: A2AServiceExtension<typeof MCP_EXTENSION_URI, MCPDemands, MCPFulfillments> = {
|
|
13
|
+
getUri: () => MCP_EXTENSION_URI,
|
|
14
14
|
getDemandsSchema: () => mcpDemandsSchema,
|
|
15
15
|
getFulfillmentsSchema: () => mcpFulfillmentsSchema,
|
|
16
16
|
};
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
|
|
6
6
|
import type { ContextToken } from '../../../../api/contexts/types';
|
|
7
7
|
|
|
8
|
-
const
|
|
8
|
+
export const PLATFORM_API_EXTENSION_URI = 'https://a2a-extensions.agentstack.beeai.dev/services/platform_api/v1';
|
|
9
9
|
|
|
10
10
|
export const platformApiExtension = (metadata: Record<string, unknown>, contextToken: ContextToken) => {
|
|
11
11
|
return {
|
|
12
12
|
...metadata,
|
|
13
|
-
[
|
|
13
|
+
[PLATFORM_API_EXTENSION_URI]: {
|
|
14
14
|
auth_token: contextToken.token,
|
|
15
15
|
expires_at: contextToken.expires_at,
|
|
16
16
|
},
|
|
@@ -9,9 +9,9 @@ import type { A2AUiExtension } from '../../../../core/extensions/types';
|
|
|
9
9
|
import { agentDetailSchema } from './schemas';
|
|
10
10
|
import type { AgentDetail } from './types';
|
|
11
11
|
|
|
12
|
-
const
|
|
12
|
+
export const AGENT_DETAIL_EXTENSION_URI = 'https://a2a-extensions.agentstack.beeai.dev/ui/agent-detail/v1';
|
|
13
13
|
|
|
14
|
-
export const agentDetailExtension: A2AUiExtension<typeof
|
|
15
|
-
getUri: () =>
|
|
16
|
-
getMessageMetadataSchema: () => z.object({ [
|
|
14
|
+
export const agentDetailExtension: A2AUiExtension<typeof AGENT_DETAIL_EXTENSION_URI, AgentDetail> = {
|
|
15
|
+
getUri: () => AGENT_DETAIL_EXTENSION_URI,
|
|
16
|
+
getMessageMetadataSchema: () => z.object({ [AGENT_DETAIL_EXTENSION_URI]: agentDetailSchema }).partial(),
|
|
17
17
|
};
|
|
@@ -9,9 +9,9 @@ import type { A2AUiExtension } from '../../../../core/extensions/types';
|
|
|
9
9
|
import { canvasEditRequestSchema } from './schemas';
|
|
10
10
|
import type { CanvasEditRequest } from './types';
|
|
11
11
|
|
|
12
|
-
const
|
|
12
|
+
export const CANVAS_EXTENSION_URI = 'https://a2a-extensions.agentstack.beeai.dev/ui/canvas/v1';
|
|
13
13
|
|
|
14
|
-
export const canvasExtension: A2AUiExtension<typeof
|
|
15
|
-
getUri: () =>
|
|
16
|
-
getMessageMetadataSchema: () => z.object({ [
|
|
14
|
+
export const canvasExtension: A2AUiExtension<typeof CANVAS_EXTENSION_URI, CanvasEditRequest> = {
|
|
15
|
+
getUri: () => CANVAS_EXTENSION_URI,
|
|
16
|
+
getMessageMetadataSchema: () => z.object({ [CANVAS_EXTENSION_URI]: canvasEditRequestSchema }).partial(),
|
|
17
17
|
};
|
|
@@ -9,9 +9,9 @@ import type { A2AUiExtension } from '../../../../core/extensions/types';
|
|
|
9
9
|
import { citationMetadataSchema } from './schemas';
|
|
10
10
|
import type { CitationMetadata } from './types';
|
|
11
11
|
|
|
12
|
-
const
|
|
12
|
+
export const CITATION_EXTENSION_URI = 'https://a2a-extensions.agentstack.beeai.dev/ui/citation/v1';
|
|
13
13
|
|
|
14
|
-
export const citationExtension: A2AUiExtension<typeof
|
|
15
|
-
getUri: () =>
|
|
16
|
-
getMessageMetadataSchema: () => z.object({ [
|
|
14
|
+
export const citationExtension: A2AUiExtension<typeof CITATION_EXTENSION_URI, CitationMetadata> = {
|
|
15
|
+
getUri: () => CITATION_EXTENSION_URI,
|
|
16
|
+
getMessageMetadataSchema: () => z.object({ [CITATION_EXTENSION_URI]: citationMetadataSchema }).partial(),
|
|
17
17
|
};
|
|
@@ -9,9 +9,9 @@ import type { A2AUiExtension } from '../../../../core/extensions/types';
|
|
|
9
9
|
import { errorMetadataSchema } from './schemas';
|
|
10
10
|
import type { ErrorMetadata } from './types';
|
|
11
11
|
|
|
12
|
-
const
|
|
12
|
+
export const ERROR_EXTENSION_URI = 'https://a2a-extensions.agentstack.beeai.dev/ui/error/v1';
|
|
13
13
|
|
|
14
|
-
export const errorExtension: A2AUiExtension<typeof
|
|
15
|
-
getUri: () =>
|
|
16
|
-
getMessageMetadataSchema: () => z.object({ [
|
|
14
|
+
export const errorExtension: A2AUiExtension<typeof ERROR_EXTENSION_URI, ErrorMetadata> = {
|
|
15
|
+
getUri: () => ERROR_EXTENSION_URI,
|
|
16
|
+
getMessageMetadataSchema: () => z.object({ [ERROR_EXTENSION_URI]: errorMetadataSchema }).partial(),
|
|
17
17
|
};
|
|
@@ -9,9 +9,9 @@ import type { A2AUiExtension } from '../../../../core/extensions/types';
|
|
|
9
9
|
import { formRenderSchema } from '../../common/form/schemas';
|
|
10
10
|
import type { FormRender } from '../../common/form/types';
|
|
11
11
|
|
|
12
|
-
const
|
|
12
|
+
export const FORM_REQUEST_EXTENSION_URI = 'https://a2a-extensions.agentstack.beeai.dev/ui/form_request/v1';
|
|
13
13
|
|
|
14
|
-
export const formRequestExtension: A2AUiExtension<typeof
|
|
15
|
-
getUri: () =>
|
|
16
|
-
getMessageMetadataSchema: () => z.object({ [
|
|
14
|
+
export const formRequestExtension: A2AUiExtension<typeof FORM_REQUEST_EXTENSION_URI, FormRender> = {
|
|
15
|
+
getUri: () => FORM_REQUEST_EXTENSION_URI,
|
|
16
|
+
getMessageMetadataSchema: () => z.object({ [FORM_REQUEST_EXTENSION_URI]: formRenderSchema }).partial(),
|
|
17
17
|
};
|
|
@@ -7,10 +7,14 @@ import type { A2AServiceExtension } from '../../../../core/extensions/types';
|
|
|
7
7
|
import { settingsDemandsSchema, settingsFulfillmentsSchema } from './schemas';
|
|
8
8
|
import type { SettingsDemands, SettingsFulfillments } from './types';
|
|
9
9
|
|
|
10
|
-
const
|
|
10
|
+
export const SETTINGS_EXTENSION_URI = 'https://a2a-extensions.agentstack.beeai.dev/ui/settings/v1';
|
|
11
11
|
|
|
12
|
-
export const settingsExtension: A2AServiceExtension<
|
|
13
|
-
|
|
12
|
+
export const settingsExtension: A2AServiceExtension<
|
|
13
|
+
typeof SETTINGS_EXTENSION_URI,
|
|
14
|
+
SettingsDemands,
|
|
15
|
+
SettingsFulfillments
|
|
16
|
+
> = {
|
|
17
|
+
getUri: () => SETTINGS_EXTENSION_URI,
|
|
14
18
|
getDemandsSchema: () => settingsDemandsSchema,
|
|
15
19
|
getFulfillmentsSchema: () => settingsFulfillmentsSchema,
|
|
16
20
|
};
|
|
@@ -9,9 +9,9 @@ import type { A2AUiExtension } from '../../../../core/extensions/types';
|
|
|
9
9
|
import { trajectoryMetadataSchema } from './schemas';
|
|
10
10
|
import type { TrajectoryMetadata } from './types';
|
|
11
11
|
|
|
12
|
-
const
|
|
12
|
+
export const TRAJECTORY_EXTENSION_URI = 'https://a2a-extensions.agentstack.beeai.dev/ui/trajectory/v1';
|
|
13
13
|
|
|
14
|
-
export const trajectoryExtension: A2AUiExtension<typeof
|
|
15
|
-
getUri: () =>
|
|
16
|
-
getMessageMetadataSchema: () => z.object({ [
|
|
14
|
+
export const trajectoryExtension: A2AUiExtension<typeof TRAJECTORY_EXTENSION_URI, TrajectoryMetadata> = {
|
|
15
|
+
getUri: () => TRAJECTORY_EXTENSION_URI,
|
|
16
|
+
getMessageMetadataSchema: () => z.object({ [TRAJECTORY_EXTENSION_URI]: trajectoryMetadataSchema }).partial(),
|
|
17
17
|
};
|
|
@@ -56,6 +56,7 @@ export enum TaskStatusUpdateType {
|
|
|
56
56
|
FormRequired = 'form-required',
|
|
57
57
|
OAuthRequired = 'oauth-required',
|
|
58
58
|
ApprovalRequired = 'approval-required',
|
|
59
|
+
TextInputRequired = 'text-input-required',
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
export interface SecretRequiredResult {
|
|
@@ -78,8 +79,14 @@ export interface ApprovalRequiredResult {
|
|
|
78
79
|
request: ApprovalRequest;
|
|
79
80
|
}
|
|
80
81
|
|
|
82
|
+
export interface TextInputRequiredResult {
|
|
83
|
+
type: TaskStatusUpdateType.TextInputRequired;
|
|
84
|
+
text: string;
|
|
85
|
+
}
|
|
86
|
+
|
|
81
87
|
export type TaskStatusUpdateResult =
|
|
82
88
|
| SecretRequiredResult
|
|
83
89
|
| FormRequiredResult
|
|
84
90
|
| OAuthRequiredResult
|
|
85
|
-
| ApprovalRequiredResult
|
|
91
|
+
| ApprovalRequiredResult
|
|
92
|
+
| TextInputRequiredResult;
|
|
@@ -11,6 +11,7 @@ import type { TaskStatusUpdateEvent } from '../a2a/protocol/types';
|
|
|
11
11
|
import { extractUiExtensionData } from './extensions/extract';
|
|
12
12
|
import type { TaskStatusUpdateResult } from './extensions/types';
|
|
13
13
|
import { TaskStatusUpdateType } from './extensions/types';
|
|
14
|
+
import { extractTextFromMessage } from './utils/extract-text-from-message';
|
|
14
15
|
|
|
15
16
|
const secretsRequestExtensionExtractor = extractUiExtensionData(secretsRequestExtension);
|
|
16
17
|
const oauthRequestExtensionExtractor = extractUiExtensionData(oauthRequestExtension);
|
|
@@ -46,13 +47,19 @@ export const handleTaskStatusUpdate = (event: TaskStatusUpdateEvent): TaskStatus
|
|
|
46
47
|
type: TaskStatusUpdateType.FormRequired,
|
|
47
48
|
form: formRequired,
|
|
48
49
|
});
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
if (approvalRequired) {
|
|
50
|
+
} else if (approvalRequired) {
|
|
52
51
|
results.push({
|
|
53
52
|
type: TaskStatusUpdateType.ApprovalRequired,
|
|
54
53
|
request: approvalRequired,
|
|
55
54
|
});
|
|
55
|
+
} else {
|
|
56
|
+
const text = extractTextFromMessage(event.status.message);
|
|
57
|
+
if (text) {
|
|
58
|
+
results.push({
|
|
59
|
+
type: TaskStatusUpdateType.TextInputRequired,
|
|
60
|
+
text,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
56
63
|
}
|
|
57
64
|
}
|
|
58
65
|
|
package/src/client/core/index.ts
CHANGED
|
@@ -12,4 +12,5 @@ export * from './fulfillment-resolvers/build-llm-extension-fulfillment-resolver'
|
|
|
12
12
|
export * from './handle-agent-card';
|
|
13
13
|
export * from './handle-task-status-update';
|
|
14
14
|
export * from './utils/build-message-builder';
|
|
15
|
+
export * from './utils/extract-text-from-message';
|
|
15
16
|
export * from './utils/get-agent-card-path';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 © BeeAI a Series of LF Projects, LLC
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Message } from '@a2a-js/sdk';
|
|
7
|
+
|
|
8
|
+
export function extractTextFromMessage(message: Message | undefined) {
|
|
9
|
+
const text = message?.parts
|
|
10
|
+
.filter((part) => part.kind === 'text')
|
|
11
|
+
.map((part) => part.text)
|
|
12
|
+
.join('\n');
|
|
13
|
+
|
|
14
|
+
return text;
|
|
15
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025 © BeeAI a Series of LF Projects, LLC
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { isTextPart } from '../experimental/server/a2a/utils';
|
|
7
|
+
import { InteractionMode } from '../extensions';
|
|
8
|
+
import { Server } from '../server';
|
|
9
|
+
|
|
10
|
+
const server = new Server();
|
|
11
|
+
|
|
12
|
+
server
|
|
13
|
+
.agent({
|
|
14
|
+
name: 'HelloWorld',
|
|
15
|
+
description: 'A simple hello world agent',
|
|
16
|
+
version: '0.0.1',
|
|
17
|
+
detail: {
|
|
18
|
+
interaction_mode: InteractionMode.MultiTurn,
|
|
19
|
+
user_greeting: 'Hello! How can I help you?',
|
|
20
|
+
author: {
|
|
21
|
+
name: 'Agent Stack',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
handler: async function* (input) {
|
|
25
|
+
const firstPart = input.parts.at(0);
|
|
26
|
+
|
|
27
|
+
if (isTextPart(firstPart)) {
|
|
28
|
+
yield `Hello! You said: ${firstPart.text}`;
|
|
29
|
+
} else {
|
|
30
|
+
yield `No text part found`;
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
})
|
|
34
|
+
.run({ port: 8000 });
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025 © BeeAI a Series of LF Projects, LLC
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { AGENT_DETAIL_EXTENSION_URI } from '../../../../../extensions';
|
|
7
|
+
import type { ExtensionSpec } from '../../../core/extensions/types';
|
|
8
|
+
import type { AgentDetailExtensionFulfillments, AgentDetailExtensionParams } from './types';
|
|
9
|
+
|
|
10
|
+
export class AgentDetailExtensionSpec implements ExtensionSpec<
|
|
11
|
+
AgentDetailExtensionParams,
|
|
12
|
+
AgentDetailExtensionFulfillments
|
|
13
|
+
> {
|
|
14
|
+
readonly uri = AGENT_DETAIL_EXTENSION_URI;
|
|
15
|
+
readonly params: AgentDetailExtensionParams;
|
|
16
|
+
|
|
17
|
+
constructor(params: AgentDetailExtensionParams) {
|
|
18
|
+
this.params = {
|
|
19
|
+
...params,
|
|
20
|
+
programming_language: params.programming_language ?? 'TypeScript',
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
toAgentCardExtension() {
|
|
25
|
+
return {
|
|
26
|
+
uri: this.uri,
|
|
27
|
+
required: false,
|
|
28
|
+
params: this.params,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
parseFulfillments() {
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025 © BeeAI a Series of LF Projects, LLC
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { AgentDetail } from '../../../../../extensions';
|
|
7
|
+
|
|
8
|
+
export type AgentDetailExtensionParams = AgentDetail;
|
|
9
|
+
|
|
10
|
+
export type AgentDetailExtensionFulfillments = undefined;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025 © BeeAI a Series of LF Projects, LLC
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export * from './agent-detail';
|
|
7
|
+
export * from './agent-detail/types';
|
|
8
|
+
export * from './llm';
|
|
9
|
+
export * from './llm/types';
|
|
10
|
+
export * from './platform-self-registration';
|
|
11
|
+
export * from './platform-self-registration/types';
|