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.
Files changed (199) hide show
  1. package/README.md +36 -29
  2. package/dist/api.cjs +1994 -2
  3. package/dist/api.d.cts +29 -0
  4. package/dist/api.d.ts +25 -1
  5. package/dist/api.js +1801 -2
  6. package/dist/core-DcGxYeok.d.ts +1238 -0
  7. package/dist/core-XN6gWSAb.d.cts +1238 -0
  8. package/dist/core.cjs +1773 -2
  9. package/dist/core.d.cts +7 -0
  10. package/dist/core.d.ts +7 -5
  11. package/dist/core.js +1725 -2
  12. package/dist/extensions.cjs +798 -2
  13. package/dist/extensions.d.cts +244 -0
  14. package/dist/extensions.d.ts +240 -1
  15. package/dist/extensions.js +652 -2
  16. package/dist/index.cjs +3142 -2
  17. package/dist/index.d.cts +10 -0
  18. package/dist/index.d.ts +10 -7
  19. package/dist/index.js +2781 -2
  20. package/dist/index.umd.js +16509 -2
  21. package/dist/schemas-Dy3P_eAt.d.cts +57 -0
  22. package/dist/schemas-Dy3P_eAt.d.ts +57 -0
  23. package/dist/server.cjs +2762 -0
  24. package/dist/server.d.cts +244 -0
  25. package/dist/server.d.ts +244 -0
  26. package/dist/server.js +2716 -0
  27. package/dist/types-B5B3b0V2.d.cts +396 -0
  28. package/dist/types-B5B3b0V2.d.ts +396 -0
  29. package/dist/types-CmEs5_Ag.d.cts +3522 -0
  30. package/dist/types-DJm5-rZZ.d.ts +3522 -0
  31. package/dist/types-DvLt-XuC.d.ts +866 -0
  32. package/dist/types-E26YDM19.d.cts +866 -0
  33. package/dist/types-MfIzGgpV.d.cts +43 -0
  34. package/dist/types-MfIzGgpV.d.ts +43 -0
  35. package/package.json +36 -21
  36. package/src/client/a2a/extensions/auth/oauth/index.ts +6 -6
  37. package/src/client/a2a/extensions/auth/secrets/index.ts +6 -6
  38. package/src/client/a2a/extensions/interactions/approval/index.ts +7 -7
  39. package/src/client/a2a/extensions/services/embedding/index.ts +7 -3
  40. package/src/client/a2a/extensions/services/form/index.ts +3 -3
  41. package/src/client/a2a/extensions/services/llm/index.ts +3 -3
  42. package/src/client/a2a/extensions/services/mcp/index.ts +3 -3
  43. package/src/client/a2a/extensions/services/platform-api/index.ts +2 -2
  44. package/src/client/a2a/extensions/ui/agent-detail/index.ts +4 -4
  45. package/src/client/a2a/extensions/ui/canvas/index.ts +4 -4
  46. package/src/client/a2a/extensions/ui/citation/index.ts +4 -4
  47. package/src/client/a2a/extensions/ui/error/index.ts +4 -4
  48. package/src/client/a2a/extensions/ui/form-request/index.ts +4 -4
  49. package/src/client/a2a/extensions/ui/settings/index.ts +7 -3
  50. package/src/client/a2a/extensions/ui/trajectory/index.ts +4 -4
  51. package/src/client/core/extensions/types.ts +8 -1
  52. package/src/client/core/handle-task-status-update.ts +10 -3
  53. package/src/client/core/index.ts +1 -0
  54. package/src/client/core/utils/extract-text-from-message.ts +15 -0
  55. package/src/examples/hello-world.ts +34 -0
  56. package/src/experimental/server/a2a/extensions/agent-detail/index.ts +35 -0
  57. package/src/experimental/server/a2a/extensions/agent-detail/types.ts +10 -0
  58. package/src/experimental/server/a2a/extensions/index.ts +11 -0
  59. package/src/experimental/server/a2a/extensions/llm/index.ts +70 -0
  60. package/src/experimental/server/a2a/extensions/llm/types.ts +16 -0
  61. package/src/experimental/server/a2a/extensions/platform-self-registration/index.ts +34 -0
  62. package/src/experimental/server/a2a/extensions/platform-self-registration/types.ts +10 -0
  63. package/src/experimental/server/a2a/helpers.ts +95 -0
  64. package/{dist/client/a2a/index.d.ts → src/experimental/server/a2a/index.ts} +1 -1
  65. package/src/experimental/server/a2a/utils.ts +43 -0
  66. package/src/experimental/server/core/config/index.ts +17 -0
  67. package/src/experimental/server/core/config/schemas.ts +15 -0
  68. package/src/experimental/server/core/config/types.ts +10 -0
  69. package/src/experimental/server/core/context/index.ts +18 -0
  70. package/src/experimental/server/core/extensions/types.ts +24 -0
  71. package/{dist/client/a2a/protocol/index.d.ts → src/experimental/server/core/index.ts} +4 -0
  72. package/{dist/client/a2a/protocol/tests.d.ts → src/experimental/server/core/schemas.ts} +2 -1
  73. package/src/experimental/server/core/server/autoregistration.ts +142 -0
  74. package/src/experimental/server/core/server/executor.ts +284 -0
  75. package/src/experimental/server/core/server/helpers.ts +12 -0
  76. package/src/experimental/server/core/server/index.ts +166 -0
  77. package/src/experimental/server/core/server/types.ts +58 -0
  78. package/src/experimental/server/core/types.ts +8 -0
  79. package/src/experimental/server/core/utils.ts +59 -0
  80. package/{dist/client/api/core/errors/index.d.ts → src/server.ts} +3 -2
  81. package/dist/api.cjs.map +0 -1
  82. package/dist/api.js.map +0 -1
  83. package/dist/api.umd.js +0 -2
  84. package/dist/api.umd.js.map +0 -1
  85. package/dist/client/a2a/extensions/auth/oauth/index.d.ts +0 -10
  86. package/dist/client/a2a/extensions/auth/oauth/schemas.d.ts +0 -32
  87. package/dist/client/a2a/extensions/auth/oauth/types.d.ts +0 -13
  88. package/dist/client/a2a/extensions/auth/secrets/index.d.ts +0 -10
  89. package/dist/client/a2a/extensions/auth/secrets/schemas.d.ts +0 -23
  90. package/dist/client/a2a/extensions/auth/secrets/types.d.ts +0 -10
  91. package/dist/client/a2a/extensions/common/form/schemas.d.ts +0 -290
  92. package/dist/client/a2a/extensions/common/form/types.d.ts +0 -24
  93. package/dist/client/a2a/extensions/index.d.ts +0 -21
  94. package/dist/client/a2a/extensions/interactions/approval/index.d.ts +0 -10
  95. package/dist/client/a2a/extensions/interactions/approval/schemas.d.ts +0 -43
  96. package/dist/client/a2a/extensions/interactions/approval/types.d.ts +0 -14
  97. package/dist/client/a2a/extensions/schemas.d.ts +0 -19
  98. package/dist/client/a2a/extensions/services/embedding/index.d.ts +0 -9
  99. package/dist/client/a2a/extensions/services/embedding/schemas.d.ts +0 -29
  100. package/dist/client/a2a/extensions/services/embedding/types.d.ts +0 -10
  101. package/dist/client/a2a/extensions/services/form/index.d.ts +0 -9
  102. package/dist/client/a2a/extensions/services/form/schemas.d.ts +0 -97
  103. package/dist/client/a2a/extensions/services/form/types.d.ts +0 -8
  104. package/dist/client/a2a/extensions/services/llm/index.d.ts +0 -9
  105. package/dist/client/a2a/extensions/services/llm/schemas.d.ts +0 -29
  106. package/dist/client/a2a/extensions/services/llm/types.d.ts +0 -10
  107. package/dist/client/a2a/extensions/services/mcp/index.d.ts +0 -9
  108. package/dist/client/a2a/extensions/services/mcp/schemas.d.ts +0 -35
  109. package/dist/client/a2a/extensions/services/mcp/types.d.ts +0 -14
  110. package/dist/client/a2a/extensions/services/platform-api/index.d.ts +0 -11
  111. package/dist/client/a2a/extensions/services/platform-api/schemas.d.ts +0 -10
  112. package/dist/client/a2a/extensions/services/platform-api/types.d.ts +0 -7
  113. package/dist/client/a2a/extensions/types.d.ts +0 -19
  114. package/dist/client/a2a/extensions/ui/agent-detail/index.d.ts +0 -9
  115. package/dist/client/a2a/extensions/ui/agent-detail/schemas.d.ts +0 -41
  116. package/dist/client/a2a/extensions/ui/agent-detail/types.d.ts +0 -13
  117. package/dist/client/a2a/extensions/ui/canvas/index.d.ts +0 -9
  118. package/dist/client/a2a/extensions/ui/canvas/schemas.d.ts +0 -11
  119. package/dist/client/a2a/extensions/ui/canvas/types.d.ts +0 -7
  120. package/dist/client/a2a/extensions/ui/citation/index.d.ts +0 -9
  121. package/dist/client/a2a/extensions/ui/citation/schemas.d.ts +0 -21
  122. package/dist/client/a2a/extensions/ui/citation/types.d.ts +0 -8
  123. package/dist/client/a2a/extensions/ui/error/index.d.ts +0 -9
  124. package/dist/client/a2a/extensions/ui/error/schemas.d.ts +0 -30
  125. package/dist/client/a2a/extensions/ui/error/types.d.ts +0 -9
  126. package/dist/client/a2a/extensions/ui/form-request/index.d.ts +0 -9
  127. package/dist/client/a2a/extensions/ui/settings/index.d.ts +0 -9
  128. package/dist/client/a2a/extensions/ui/settings/schemas.d.ts +0 -113
  129. package/dist/client/a2a/extensions/ui/settings/types.d.ts +0 -18
  130. package/dist/client/a2a/extensions/ui/trajectory/index.d.ts +0 -9
  131. package/dist/client/a2a/extensions/ui/trajectory/schemas.d.ts +0 -10
  132. package/dist/client/a2a/extensions/ui/trajectory/types.d.ts +0 -7
  133. package/dist/client/a2a/protocol/schemas.d.ts +0 -988
  134. package/dist/client/a2a/protocol/types.d.ts +0 -52
  135. package/dist/client/a2a/protocol/utils.d.ts +0 -6
  136. package/dist/client/api/common/schemas.d.ts +0 -30
  137. package/dist/client/api/common/types.d.ts +0 -18
  138. package/dist/client/api/configuration/api.d.ts +0 -22
  139. package/dist/client/api/configuration/schemas.d.ts +0 -31
  140. package/dist/client/api/configuration/types.d.ts +0 -11
  141. package/dist/client/api/connectors/api.d.ts +0 -78
  142. package/dist/client/api/connectors/schemas.d.ts +0 -114
  143. package/dist/client/api/connectors/types.d.ts +0 -28
  144. package/dist/client/api/contexts/api.d.ts +0 -133
  145. package/dist/client/api/contexts/schemas.d.ts +0 -359
  146. package/dist/client/api/contexts/types.d.ts +0 -34
  147. package/dist/client/api/core/client.d.ts +0 -1273
  148. package/dist/client/api/core/errors/types.d.ts +0 -36
  149. package/dist/client/api/core/errors/utils.d.ts +0 -23
  150. package/dist/client/api/core/index.d.ts +0 -7
  151. package/dist/client/api/core/schemas.d.ts +0 -17
  152. package/dist/client/api/core/types.d.ts +0 -45
  153. package/dist/client/api/core/utils.d.ts +0 -23
  154. package/dist/client/api/files/api.d.ts +0 -32
  155. package/dist/client/api/files/schemas.d.ts +0 -61
  156. package/dist/client/api/files/types.d.ts +0 -19
  157. package/dist/client/api/index.d.ts +0 -7
  158. package/dist/client/api/model-providers/api.d.ts +0 -50
  159. package/dist/client/api/model-providers/schemas.d.ts +0 -80
  160. package/dist/client/api/model-providers/types.d.ts +0 -44
  161. package/dist/client/api/provider-builds/api.d.ts +0 -143
  162. package/dist/client/api/provider-builds/schemas.d.ts +0 -250
  163. package/dist/client/api/provider-builds/types.d.ts +0 -31
  164. package/dist/client/api/providers/api.d.ts +0 -847
  165. package/dist/client/api/providers/schemas.d.ts +0 -1335
  166. package/dist/client/api/providers/types.d.ts +0 -45
  167. package/dist/client/api/schemas.d.ts +0 -15
  168. package/dist/client/api/types.d.ts +0 -15
  169. package/dist/client/api/user-feedback/api.d.ts +0 -9
  170. package/dist/client/api/user-feedback/schemas.d.ts +0 -15
  171. package/dist/client/api/user-feedback/types.d.ts +0 -8
  172. package/dist/client/api/users/api.d.ts +0 -13
  173. package/dist/client/api/users/schemas.d.ts +0 -20
  174. package/dist/client/api/users/types.d.ts +0 -14
  175. package/dist/client/api/variables/api.d.ts +0 -12
  176. package/dist/client/api/variables/schemas.d.ts +0 -13
  177. package/dist/client/api/variables/types.d.ts +0 -10
  178. package/dist/client/core/create-authenticated-fetch.d.ts +0 -5
  179. package/dist/client/core/extensions/extract.d.ts +0 -8
  180. package/dist/client/core/extensions/fulfill.d.ts +0 -8
  181. package/dist/client/core/extensions/resolve-user-metadata.d.ts +0 -6
  182. package/dist/client/core/extensions/types.d.ts +0 -68
  183. package/dist/client/core/fulfillment-resolvers/build-llm-extension-fulfillment-resolver.d.ts +0 -8
  184. package/dist/client/core/handle-agent-card.d.ts +0 -128
  185. package/dist/client/core/handle-task-status-update.d.ts +0 -7
  186. package/dist/client/core/index.d.ts +0 -14
  187. package/dist/client/core/utils/build-message-builder.d.ts +0 -9
  188. package/dist/client/core/utils/get-agent-card-path.d.ts +0 -5
  189. package/dist/core.cjs.map +0 -1
  190. package/dist/core.js.map +0 -1
  191. package/dist/core.umd.js +0 -2
  192. package/dist/core.umd.js.map +0 -1
  193. package/dist/extensions.cjs.map +0 -1
  194. package/dist/extensions.js.map +0 -1
  195. package/dist/extensions.umd.js +0 -2
  196. package/dist/extensions.umd.js.map +0 -1
  197. package/dist/index.cjs.map +0 -1
  198. package/dist/index.js.map +0 -1
  199. package/dist/index.umd.js.map +0 -1
@@ -0,0 +1,244 @@
1
+ import { AgentExtension, Message, Task, Part, TaskStatus, TaskStatusUpdateEvent, Artifact, AgentCard } from '@a2a-js/sdk';
2
+ import * as z from 'zod';
3
+ import z__default, { z as z$1 } from 'zod';
4
+ import { A as AgentDetail } from './schemas-Dy3P_eAt.cjs';
5
+ import * as zod_v4_core from 'zod/v4/core';
6
+ import { b as LLMFulfillment, c as LLMFulfillments, L as LLMDemand } from './types-MfIzGgpV.cjs';
7
+ import { ba as buildApiClient } from './types-CmEs5_Ag.cjs';
8
+ import './types-B5B3b0V2.cjs';
9
+
10
+ /**
11
+ * Copyright 2025 © BeeAI a Series of LF Projects, LLC
12
+ * SPDX-License-Identifier: Apache-2.0
13
+ */
14
+
15
+ interface ExtensionSpec<TParams = unknown, TFulfillments = unknown> {
16
+ uri: string;
17
+ params?: TParams;
18
+ fulfillmentsSchema?: z$1.ZodSchema<TFulfillments>;
19
+ toAgentCardExtension(): AgentExtension;
20
+ parseFulfillments(message: Message): TFulfillments | undefined;
21
+ }
22
+ interface ExtensionServer<TDeps = unknown, TParams = unknown, TFulfillments = unknown> {
23
+ spec: ExtensionSpec<TParams, TFulfillments>;
24
+ resolveDeps(fulfillments: TFulfillments | undefined): TDeps;
25
+ }
26
+ type ExtensionConfig<TDeps = unknown> = {
27
+ [K in keyof TDeps]: ExtensionServer<TDeps[K], unknown, unknown>;
28
+ };
29
+
30
+ /**
31
+ * Copyright 2025 © BeeAI a Series of LF Projects, LLC
32
+ * SPDX-License-Identifier: Apache-2.0
33
+ */
34
+
35
+ type AgentDetailExtensionParams = AgentDetail;
36
+ type AgentDetailExtensionFulfillments = undefined;
37
+
38
+ /**
39
+ * Copyright 2025 © BeeAI a Series of LF Projects, LLC
40
+ * SPDX-License-Identifier: Apache-2.0
41
+ */
42
+
43
+ declare class AgentDetailExtensionSpec implements ExtensionSpec<AgentDetailExtensionParams, AgentDetailExtensionFulfillments> {
44
+ readonly uri = "https://a2a-extensions.agentstack.beeai.dev/ui/agent-detail/v1";
45
+ readonly params: AgentDetailExtensionParams;
46
+ constructor(params: AgentDetailExtensionParams);
47
+ toAgentCardExtension(): {
48
+ uri: string;
49
+ required: boolean;
50
+ params: {
51
+ interaction_mode?: string | null | undefined;
52
+ user_greeting?: string | null | undefined;
53
+ input_placeholder?: string | null | undefined;
54
+ tools?: {
55
+ name: string;
56
+ description: string;
57
+ }[] | null | undefined;
58
+ framework?: string | null | undefined;
59
+ license?: string | null | undefined;
60
+ programming_language?: string | null | undefined;
61
+ homepage_url?: string | null | undefined;
62
+ source_code_url?: string | null | undefined;
63
+ container_image_url?: string | null | undefined;
64
+ author?: {
65
+ name: string;
66
+ email?: string | null | undefined;
67
+ url?: string | null | undefined;
68
+ } | null | undefined;
69
+ contributors?: {
70
+ name: string;
71
+ email?: string | null | undefined;
72
+ url?: string | null | undefined;
73
+ }[] | null | undefined;
74
+ };
75
+ };
76
+ parseFulfillments(): undefined;
77
+ }
78
+
79
+ /**
80
+ * Copyright 2025 © BeeAI a Series of LF Projects, LLC
81
+ * SPDX-License-Identifier: Apache-2.0
82
+ */
83
+
84
+ interface LLMExtensionParams {
85
+ demands: Record<string, LLMDemand>;
86
+ }
87
+ type LLMExtensionFulfillments = LLMFulfillments;
88
+ interface LLMExtensionDeps {
89
+ fulfillments?: Record<string, LLMFulfillment>;
90
+ }
91
+
92
+ declare class LLMExtensionSpec implements ExtensionSpec<LLMExtensionParams, LLMExtensionFulfillments> {
93
+ readonly uri = "https://a2a-extensions.agentstack.beeai.dev/services/llm/v1";
94
+ readonly params: LLMExtensionParams;
95
+ readonly fulfillmentsSchema: z.ZodObject<{
96
+ llm_fulfillments: z.ZodRecord<z.ZodString, z.ZodObject<{
97
+ identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
98
+ api_base: z.ZodString;
99
+ api_key: z.ZodString;
100
+ api_model: z.ZodString;
101
+ }, zod_v4_core.$strip>>;
102
+ }, zod_v4_core.$strip>;
103
+ constructor(params: LLMExtensionParams);
104
+ toAgentCardExtension(): {
105
+ uri: string;
106
+ required: boolean;
107
+ params: {
108
+ llm_demands: Record<string, {
109
+ description?: string | null | undefined;
110
+ suggested?: string[] | null | undefined;
111
+ }>;
112
+ };
113
+ };
114
+ parseFulfillments(message: Message): {
115
+ llm_fulfillments: Record<string, {
116
+ api_base: string;
117
+ api_key: string;
118
+ api_model: string;
119
+ identifier?: string | null | undefined;
120
+ }>;
121
+ } | undefined;
122
+ }
123
+ declare class LLMExtensionServer implements ExtensionServer<LLMExtensionDeps, LLMExtensionParams, LLMExtensionFulfillments> {
124
+ readonly spec: LLMExtensionSpec;
125
+ constructor(params: LLMExtensionParams);
126
+ resolveDeps(fulfillments: LLMExtensionFulfillments | undefined): LLMExtensionDeps;
127
+ }
128
+
129
+ /**
130
+ * Copyright 2025 © BeeAI a Series of LF Projects, LLC
131
+ * SPDX-License-Identifier: Apache-2.0
132
+ */
133
+ interface PlatformSelfRegistrationExtensionParams extends Record<string, unknown> {
134
+ self_registration_id: string;
135
+ }
136
+ type PlatformSelfRegistrationExtensionFulfillments = undefined;
137
+
138
+ /**
139
+ * Copyright 2025 © BeeAI a Series of LF Projects, LLC
140
+ * SPDX-License-Identifier: Apache-2.0
141
+ */
142
+
143
+ declare const PLATFORM_SELF_REGISTRATION_EXTENSION_URI = "https://a2a-extensions.agentstack.beeai.dev/services/platform-self-registration/v1";
144
+ declare class PlatformSelfRegistrationExtensionSpec implements ExtensionSpec<PlatformSelfRegistrationExtensionParams, PlatformSelfRegistrationExtensionFulfillments> {
145
+ readonly uri = "https://a2a-extensions.agentstack.beeai.dev/services/platform-self-registration/v1";
146
+ readonly params: PlatformSelfRegistrationExtensionParams;
147
+ constructor(params: PlatformSelfRegistrationExtensionParams);
148
+ toAgentCardExtension(): {
149
+ uri: string;
150
+ required: boolean;
151
+ params: PlatformSelfRegistrationExtensionParams;
152
+ };
153
+ parseFulfillments(): undefined;
154
+ }
155
+
156
+ /**
157
+ * Copyright 2025 © BeeAI a Series of LF Projects, LLC
158
+ * SPDX-License-Identifier: Apache-2.0
159
+ */
160
+ declare function loadConfig(): {
161
+ platformUrl: string;
162
+ productionMode: boolean;
163
+ };
164
+ declare function isProductionMode(): boolean;
165
+
166
+ /**
167
+ * Copyright 2025 © BeeAI a Series of LF Projects, LLC
168
+ * SPDX-License-Identifier: Apache-2.0
169
+ */
170
+
171
+ declare class RunContext {
172
+ readonly taskId: string;
173
+ readonly contextId: string;
174
+ readonly task?: Task;
175
+ constructor(taskId: string, contextId: string, task?: Task);
176
+ }
177
+
178
+ /**
179
+ * Copyright 2025 © BeeAI a Series of LF Projects, LLC
180
+ * SPDX-License-Identifier: Apache-2.0
181
+ */
182
+
183
+ declare const configSchema: z__default.ZodObject<{
184
+ platformUrl: z__default.ZodDefault<z__default.ZodString>;
185
+ productionMode: z__default.ZodDefault<z__default.ZodPipe<z__default.ZodOptional<z__default.ZodString>, z__default.ZodTransform<boolean, string | undefined>>>;
186
+ }, z__default.core.$strip>;
187
+
188
+ /**
189
+ * Copyright 2025 © BeeAI a Series of LF Projects, LLC
190
+ * SPDX-License-Identifier: Apache-2.0
191
+ */
192
+
193
+ type RunYield = string | Message | Part | TaskStatus | TaskStatusUpdateEvent | Artifact | Error | Record<string, unknown>;
194
+ type AgentFunction<TDeps = Record<string, never>> = (input: Message, ctx: RunContext, deps: TDeps) => AsyncIterable<RunYield> | Promise<RunYield | void>;
195
+ interface AgentOptions<TDeps = Record<string, never>> {
196
+ name: string;
197
+ description?: string;
198
+ detail?: AgentDetail;
199
+ extensions?: ExtensionConfig<TDeps>;
200
+ version?: string;
201
+ protocolVersion?: string;
202
+ handler: AgentFunction<TDeps>;
203
+ }
204
+ interface ServerOptions {
205
+ host?: string;
206
+ port?: number;
207
+ selfRegistrationId?: string;
208
+ platformUrl?: string;
209
+ }
210
+ interface ServerHandle {
211
+ port: number;
212
+ url: string;
213
+ close: () => Promise<void>;
214
+ }
215
+ interface AutoregistrationOptions {
216
+ selfRegistrationId: string;
217
+ agentCard: AgentCard;
218
+ host: string;
219
+ port: number;
220
+ api: ReturnType<typeof buildApiClient>;
221
+ }
222
+
223
+ /**
224
+ * Copyright 2025 © BeeAI a Series of LF Projects, LLC
225
+ * SPDX-License-Identifier: Apache-2.0
226
+ */
227
+
228
+ declare class Server {
229
+ private agentCard?;
230
+ private agentOptions?;
231
+ private agentConfigured;
232
+ agent<TDeps>(options: AgentOptions<TDeps>): this;
233
+ run(options?: ServerOptions): Promise<ServerHandle>;
234
+ private buildExtensions;
235
+ }
236
+
237
+ /**
238
+ * Copyright 2025 © BeeAI a Series of LF Projects, LLC
239
+ * SPDX-License-Identifier: Apache-2.0
240
+ */
241
+
242
+ type Config = z__default.infer<typeof configSchema>;
243
+
244
+ export { type AgentDetailExtensionFulfillments, type AgentDetailExtensionParams, AgentDetailExtensionSpec, type AgentFunction, type AgentOptions, type AutoregistrationOptions, type Config, type ExtensionConfig, type ExtensionServer, type ExtensionSpec, type LLMExtensionDeps, type LLMExtensionFulfillments, type LLMExtensionParams, LLMExtensionServer, LLMExtensionSpec, PLATFORM_SELF_REGISTRATION_EXTENSION_URI, type PlatformSelfRegistrationExtensionFulfillments, type PlatformSelfRegistrationExtensionParams, PlatformSelfRegistrationExtensionSpec, RunContext, type RunYield, Server, type ServerHandle, type ServerOptions, configSchema, isProductionMode, loadConfig };
@@ -0,0 +1,244 @@
1
+ import { AgentExtension, Message, Task, Part, TaskStatus, TaskStatusUpdateEvent, Artifact, AgentCard } from '@a2a-js/sdk';
2
+ import * as z from 'zod';
3
+ import z__default, { z as z$1 } from 'zod';
4
+ import { A as AgentDetail } from './schemas-Dy3P_eAt.js';
5
+ import * as zod_v4_core from 'zod/v4/core';
6
+ import { b as LLMFulfillment, c as LLMFulfillments, L as LLMDemand } from './types-MfIzGgpV.js';
7
+ import { ba as buildApiClient } from './types-DJm5-rZZ.js';
8
+ import './types-B5B3b0V2.js';
9
+
10
+ /**
11
+ * Copyright 2025 © BeeAI a Series of LF Projects, LLC
12
+ * SPDX-License-Identifier: Apache-2.0
13
+ */
14
+
15
+ interface ExtensionSpec<TParams = unknown, TFulfillments = unknown> {
16
+ uri: string;
17
+ params?: TParams;
18
+ fulfillmentsSchema?: z$1.ZodSchema<TFulfillments>;
19
+ toAgentCardExtension(): AgentExtension;
20
+ parseFulfillments(message: Message): TFulfillments | undefined;
21
+ }
22
+ interface ExtensionServer<TDeps = unknown, TParams = unknown, TFulfillments = unknown> {
23
+ spec: ExtensionSpec<TParams, TFulfillments>;
24
+ resolveDeps(fulfillments: TFulfillments | undefined): TDeps;
25
+ }
26
+ type ExtensionConfig<TDeps = unknown> = {
27
+ [K in keyof TDeps]: ExtensionServer<TDeps[K], unknown, unknown>;
28
+ };
29
+
30
+ /**
31
+ * Copyright 2025 © BeeAI a Series of LF Projects, LLC
32
+ * SPDX-License-Identifier: Apache-2.0
33
+ */
34
+
35
+ type AgentDetailExtensionParams = AgentDetail;
36
+ type AgentDetailExtensionFulfillments = undefined;
37
+
38
+ /**
39
+ * Copyright 2025 © BeeAI a Series of LF Projects, LLC
40
+ * SPDX-License-Identifier: Apache-2.0
41
+ */
42
+
43
+ declare class AgentDetailExtensionSpec implements ExtensionSpec<AgentDetailExtensionParams, AgentDetailExtensionFulfillments> {
44
+ readonly uri = "https://a2a-extensions.agentstack.beeai.dev/ui/agent-detail/v1";
45
+ readonly params: AgentDetailExtensionParams;
46
+ constructor(params: AgentDetailExtensionParams);
47
+ toAgentCardExtension(): {
48
+ uri: string;
49
+ required: boolean;
50
+ params: {
51
+ interaction_mode?: string | null | undefined;
52
+ user_greeting?: string | null | undefined;
53
+ input_placeholder?: string | null | undefined;
54
+ tools?: {
55
+ name: string;
56
+ description: string;
57
+ }[] | null | undefined;
58
+ framework?: string | null | undefined;
59
+ license?: string | null | undefined;
60
+ programming_language?: string | null | undefined;
61
+ homepage_url?: string | null | undefined;
62
+ source_code_url?: string | null | undefined;
63
+ container_image_url?: string | null | undefined;
64
+ author?: {
65
+ name: string;
66
+ email?: string | null | undefined;
67
+ url?: string | null | undefined;
68
+ } | null | undefined;
69
+ contributors?: {
70
+ name: string;
71
+ email?: string | null | undefined;
72
+ url?: string | null | undefined;
73
+ }[] | null | undefined;
74
+ };
75
+ };
76
+ parseFulfillments(): undefined;
77
+ }
78
+
79
+ /**
80
+ * Copyright 2025 © BeeAI a Series of LF Projects, LLC
81
+ * SPDX-License-Identifier: Apache-2.0
82
+ */
83
+
84
+ interface LLMExtensionParams {
85
+ demands: Record<string, LLMDemand>;
86
+ }
87
+ type LLMExtensionFulfillments = LLMFulfillments;
88
+ interface LLMExtensionDeps {
89
+ fulfillments?: Record<string, LLMFulfillment>;
90
+ }
91
+
92
+ declare class LLMExtensionSpec implements ExtensionSpec<LLMExtensionParams, LLMExtensionFulfillments> {
93
+ readonly uri = "https://a2a-extensions.agentstack.beeai.dev/services/llm/v1";
94
+ readonly params: LLMExtensionParams;
95
+ readonly fulfillmentsSchema: z.ZodObject<{
96
+ llm_fulfillments: z.ZodRecord<z.ZodString, z.ZodObject<{
97
+ identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
98
+ api_base: z.ZodString;
99
+ api_key: z.ZodString;
100
+ api_model: z.ZodString;
101
+ }, zod_v4_core.$strip>>;
102
+ }, zod_v4_core.$strip>;
103
+ constructor(params: LLMExtensionParams);
104
+ toAgentCardExtension(): {
105
+ uri: string;
106
+ required: boolean;
107
+ params: {
108
+ llm_demands: Record<string, {
109
+ description?: string | null | undefined;
110
+ suggested?: string[] | null | undefined;
111
+ }>;
112
+ };
113
+ };
114
+ parseFulfillments(message: Message): {
115
+ llm_fulfillments: Record<string, {
116
+ api_base: string;
117
+ api_key: string;
118
+ api_model: string;
119
+ identifier?: string | null | undefined;
120
+ }>;
121
+ } | undefined;
122
+ }
123
+ declare class LLMExtensionServer implements ExtensionServer<LLMExtensionDeps, LLMExtensionParams, LLMExtensionFulfillments> {
124
+ readonly spec: LLMExtensionSpec;
125
+ constructor(params: LLMExtensionParams);
126
+ resolveDeps(fulfillments: LLMExtensionFulfillments | undefined): LLMExtensionDeps;
127
+ }
128
+
129
+ /**
130
+ * Copyright 2025 © BeeAI a Series of LF Projects, LLC
131
+ * SPDX-License-Identifier: Apache-2.0
132
+ */
133
+ interface PlatformSelfRegistrationExtensionParams extends Record<string, unknown> {
134
+ self_registration_id: string;
135
+ }
136
+ type PlatformSelfRegistrationExtensionFulfillments = undefined;
137
+
138
+ /**
139
+ * Copyright 2025 © BeeAI a Series of LF Projects, LLC
140
+ * SPDX-License-Identifier: Apache-2.0
141
+ */
142
+
143
+ declare const PLATFORM_SELF_REGISTRATION_EXTENSION_URI = "https://a2a-extensions.agentstack.beeai.dev/services/platform-self-registration/v1";
144
+ declare class PlatformSelfRegistrationExtensionSpec implements ExtensionSpec<PlatformSelfRegistrationExtensionParams, PlatformSelfRegistrationExtensionFulfillments> {
145
+ readonly uri = "https://a2a-extensions.agentstack.beeai.dev/services/platform-self-registration/v1";
146
+ readonly params: PlatformSelfRegistrationExtensionParams;
147
+ constructor(params: PlatformSelfRegistrationExtensionParams);
148
+ toAgentCardExtension(): {
149
+ uri: string;
150
+ required: boolean;
151
+ params: PlatformSelfRegistrationExtensionParams;
152
+ };
153
+ parseFulfillments(): undefined;
154
+ }
155
+
156
+ /**
157
+ * Copyright 2025 © BeeAI a Series of LF Projects, LLC
158
+ * SPDX-License-Identifier: Apache-2.0
159
+ */
160
+ declare function loadConfig(): {
161
+ platformUrl: string;
162
+ productionMode: boolean;
163
+ };
164
+ declare function isProductionMode(): boolean;
165
+
166
+ /**
167
+ * Copyright 2025 © BeeAI a Series of LF Projects, LLC
168
+ * SPDX-License-Identifier: Apache-2.0
169
+ */
170
+
171
+ declare class RunContext {
172
+ readonly taskId: string;
173
+ readonly contextId: string;
174
+ readonly task?: Task;
175
+ constructor(taskId: string, contextId: string, task?: Task);
176
+ }
177
+
178
+ /**
179
+ * Copyright 2025 © BeeAI a Series of LF Projects, LLC
180
+ * SPDX-License-Identifier: Apache-2.0
181
+ */
182
+
183
+ declare const configSchema: z__default.ZodObject<{
184
+ platformUrl: z__default.ZodDefault<z__default.ZodString>;
185
+ productionMode: z__default.ZodDefault<z__default.ZodPipe<z__default.ZodOptional<z__default.ZodString>, z__default.ZodTransform<boolean, string | undefined>>>;
186
+ }, z__default.core.$strip>;
187
+
188
+ /**
189
+ * Copyright 2025 © BeeAI a Series of LF Projects, LLC
190
+ * SPDX-License-Identifier: Apache-2.0
191
+ */
192
+
193
+ type RunYield = string | Message | Part | TaskStatus | TaskStatusUpdateEvent | Artifact | Error | Record<string, unknown>;
194
+ type AgentFunction<TDeps = Record<string, never>> = (input: Message, ctx: RunContext, deps: TDeps) => AsyncIterable<RunYield> | Promise<RunYield | void>;
195
+ interface AgentOptions<TDeps = Record<string, never>> {
196
+ name: string;
197
+ description?: string;
198
+ detail?: AgentDetail;
199
+ extensions?: ExtensionConfig<TDeps>;
200
+ version?: string;
201
+ protocolVersion?: string;
202
+ handler: AgentFunction<TDeps>;
203
+ }
204
+ interface ServerOptions {
205
+ host?: string;
206
+ port?: number;
207
+ selfRegistrationId?: string;
208
+ platformUrl?: string;
209
+ }
210
+ interface ServerHandle {
211
+ port: number;
212
+ url: string;
213
+ close: () => Promise<void>;
214
+ }
215
+ interface AutoregistrationOptions {
216
+ selfRegistrationId: string;
217
+ agentCard: AgentCard;
218
+ host: string;
219
+ port: number;
220
+ api: ReturnType<typeof buildApiClient>;
221
+ }
222
+
223
+ /**
224
+ * Copyright 2025 © BeeAI a Series of LF Projects, LLC
225
+ * SPDX-License-Identifier: Apache-2.0
226
+ */
227
+
228
+ declare class Server {
229
+ private agentCard?;
230
+ private agentOptions?;
231
+ private agentConfigured;
232
+ agent<TDeps>(options: AgentOptions<TDeps>): this;
233
+ run(options?: ServerOptions): Promise<ServerHandle>;
234
+ private buildExtensions;
235
+ }
236
+
237
+ /**
238
+ * Copyright 2025 © BeeAI a Series of LF Projects, LLC
239
+ * SPDX-License-Identifier: Apache-2.0
240
+ */
241
+
242
+ type Config = z__default.infer<typeof configSchema>;
243
+
244
+ export { type AgentDetailExtensionFulfillments, type AgentDetailExtensionParams, AgentDetailExtensionSpec, type AgentFunction, type AgentOptions, type AutoregistrationOptions, type Config, type ExtensionConfig, type ExtensionServer, type ExtensionSpec, type LLMExtensionDeps, type LLMExtensionFulfillments, type LLMExtensionParams, LLMExtensionServer, LLMExtensionSpec, PLATFORM_SELF_REGISTRATION_EXTENSION_URI, type PlatformSelfRegistrationExtensionFulfillments, type PlatformSelfRegistrationExtensionParams, PlatformSelfRegistrationExtensionSpec, RunContext, type RunYield, Server, type ServerHandle, type ServerOptions, configSchema, isProductionMode, loadConfig };