agentstack-sdk 0.4.2-rc1

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 (57) hide show
  1. package/dist/client/a2a/extensions/common/form.d.ts +244 -0
  2. package/dist/client/a2a/extensions/fulfillment-resolvers/build-llm-extension-fulfillment-resolver.d.ts +8 -0
  3. package/dist/client/a2a/extensions/handle-agent-card.d.ts +146 -0
  4. package/dist/client/a2a/extensions/handle-input-required.d.ts +11 -0
  5. package/dist/client/a2a/extensions/handle-task-status-update.d.ts +26 -0
  6. package/dist/client/a2a/extensions/services/embedding.d.ts +25 -0
  7. package/dist/client/a2a/extensions/services/form.d.ts +103 -0
  8. package/dist/client/a2a/extensions/services/llm.d.ts +25 -0
  9. package/dist/client/a2a/extensions/services/mcp.d.ts +46 -0
  10. package/dist/client/a2a/extensions/services/oauth-provider.d.ts +30 -0
  11. package/dist/client/a2a/extensions/services/platform.d.ts +11 -0
  12. package/dist/client/a2a/extensions/services/secrets.d.ts +28 -0
  13. package/dist/client/a2a/extensions/types.d.ts +16 -0
  14. package/dist/client/a2a/extensions/ui/agent-detail.d.ts +49 -0
  15. package/dist/client/a2a/extensions/ui/citation.d.ts +27 -0
  16. package/dist/client/a2a/extensions/ui/form-request.d.ts +11 -0
  17. package/dist/client/a2a/extensions/ui/oauth.d.ts +13 -0
  18. package/dist/client/a2a/extensions/ui/settings.d.ts +110 -0
  19. package/dist/client/a2a/extensions/ui/trajectory.d.ts +15 -0
  20. package/dist/client/a2a/extensions/utils/build-message-builder.d.ts +9 -0
  21. package/dist/client/a2a/extensions/utils.d.ts +11 -0
  22. package/dist/client/api/build-api-client.d.ts +27 -0
  23. package/dist/client/api/types.d.ts +59 -0
  24. package/dist/index.cjs +2 -0
  25. package/dist/index.cjs.map +1 -0
  26. package/dist/index.d.ts +27 -0
  27. package/dist/index.js +2 -0
  28. package/dist/index.js.map +1 -0
  29. package/dist/index.umd.js +2 -0
  30. package/dist/index.umd.js.map +1 -0
  31. package/dist/types.d.ts +10 -0
  32. package/package.json +56 -0
  33. package/src/client/a2a/extensions/common/form.ts +144 -0
  34. package/src/client/a2a/extensions/fulfillment-resolvers/build-llm-extension-fulfillment-resolver.ts +43 -0
  35. package/src/client/a2a/extensions/handle-agent-card.ts +116 -0
  36. package/src/client/a2a/extensions/handle-input-required.ts +29 -0
  37. package/src/client/a2a/extensions/handle-task-status-update.ts +74 -0
  38. package/src/client/a2a/extensions/services/embedding.ts +43 -0
  39. package/src/client/a2a/extensions/services/form.ts +31 -0
  40. package/src/client/a2a/extensions/services/llm.ts +39 -0
  41. package/src/client/a2a/extensions/services/mcp.ts +59 -0
  42. package/src/client/a2a/extensions/services/oauth-provider.ts +52 -0
  43. package/src/client/a2a/extensions/services/platform.ts +22 -0
  44. package/src/client/a2a/extensions/services/secrets.ts +46 -0
  45. package/src/client/a2a/extensions/types.ts +20 -0
  46. package/src/client/a2a/extensions/ui/agent-detail.ts +46 -0
  47. package/src/client/a2a/extensions/ui/citation.ts +30 -0
  48. package/src/client/a2a/extensions/ui/form-request.ts +18 -0
  49. package/src/client/a2a/extensions/ui/oauth.ts +21 -0
  50. package/src/client/a2a/extensions/ui/settings.ts +84 -0
  51. package/src/client/a2a/extensions/ui/trajectory.ts +23 -0
  52. package/src/client/a2a/extensions/utils/build-message-builder.ts +28 -0
  53. package/src/client/a2a/extensions/utils.ts +66 -0
  54. package/src/client/api/build-api-client.ts +74 -0
  55. package/src/client/api/types.ts +72 -0
  56. package/src/index.ts +32 -0
  57. package/src/types.ts +9 -0
@@ -0,0 +1,244 @@
1
+ /**
2
+ * Copyright 2025 © BeeAI a Series of LF Projects, LLC
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import z from 'zod';
6
+ declare const textField: z.ZodObject<{
7
+ id: z.ZodString;
8
+ label: z.ZodString;
9
+ required: z.ZodBoolean;
10
+ col_span: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
11
+ type: z.ZodLiteral<"text">;
12
+ placeholder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
+ default_value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14
+ auto_resize: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodBoolean>>>;
15
+ }, z.core.$strip>;
16
+ export declare const textFieldValue: z.ZodObject<{
17
+ type: z.ZodLiteral<"text">;
18
+ value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19
+ }, z.core.$strip>;
20
+ declare const dateField: z.ZodObject<{
21
+ id: z.ZodString;
22
+ label: z.ZodString;
23
+ required: z.ZodBoolean;
24
+ col_span: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
25
+ type: z.ZodLiteral<"date">;
26
+ placeholder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
27
+ default_value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
28
+ }, z.core.$strip>;
29
+ export declare const dateFieldValue: z.ZodObject<{
30
+ type: z.ZodLiteral<"date">;
31
+ value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
32
+ }, z.core.$strip>;
33
+ declare const fileField: z.ZodObject<{
34
+ id: z.ZodString;
35
+ label: z.ZodString;
36
+ required: z.ZodBoolean;
37
+ col_span: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
38
+ type: z.ZodLiteral<"file">;
39
+ accept: z.ZodArray<z.ZodString>;
40
+ }, z.core.$strip>;
41
+ export declare const fileFieldValue: z.ZodObject<{
42
+ type: z.ZodLiteral<"file">;
43
+ value: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
44
+ uri: z.ZodString;
45
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
46
+ mime_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
47
+ }, z.core.$strip>>>>;
48
+ }, z.core.$strip>;
49
+ export declare const singleSelectField: z.ZodObject<{
50
+ id: z.ZodString;
51
+ label: z.ZodString;
52
+ required: z.ZodBoolean;
53
+ col_span: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
54
+ type: z.ZodLiteral<"singleselect">;
55
+ options: z.ZodArray<z.ZodObject<{
56
+ id: z.ZodString;
57
+ label: z.ZodString;
58
+ }, z.core.$strip>>;
59
+ default_value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
60
+ }, z.core.$strip>;
61
+ export declare const singleSelectFieldValue: z.ZodObject<{
62
+ type: z.ZodLiteral<"singleselect">;
63
+ value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
64
+ }, z.core.$strip>;
65
+ export declare const multiSelectField: z.ZodObject<{
66
+ id: z.ZodString;
67
+ label: z.ZodString;
68
+ required: z.ZodBoolean;
69
+ col_span: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
70
+ type: z.ZodLiteral<"multiselect">;
71
+ options: z.ZodArray<z.ZodObject<{
72
+ id: z.ZodString;
73
+ label: z.ZodString;
74
+ }, z.core.$strip>>;
75
+ default_value: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
76
+ }, z.core.$strip>;
77
+ export declare const multiSelectFieldValue: z.ZodObject<{
78
+ type: z.ZodLiteral<"multiselect">;
79
+ value: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
80
+ }, z.core.$strip>;
81
+ export declare const checkboxField: z.ZodObject<{
82
+ id: z.ZodString;
83
+ label: z.ZodString;
84
+ required: z.ZodBoolean;
85
+ col_span: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
86
+ type: z.ZodLiteral<"checkbox">;
87
+ content: z.ZodString;
88
+ default_value: z.ZodBoolean;
89
+ }, z.core.$strip>;
90
+ export declare const checkboxFieldValue: z.ZodObject<{
91
+ type: z.ZodLiteral<"checkbox">;
92
+ value: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
93
+ }, z.core.$strip>;
94
+ declare const fieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
95
+ id: z.ZodString;
96
+ label: z.ZodString;
97
+ required: z.ZodBoolean;
98
+ col_span: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
99
+ type: z.ZodLiteral<"text">;
100
+ placeholder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
101
+ default_value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
102
+ auto_resize: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodBoolean>>>;
103
+ }, z.core.$strip>, z.ZodObject<{
104
+ id: z.ZodString;
105
+ label: z.ZodString;
106
+ required: z.ZodBoolean;
107
+ col_span: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
108
+ type: z.ZodLiteral<"date">;
109
+ placeholder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
110
+ default_value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
111
+ }, z.core.$strip>, z.ZodObject<{
112
+ id: z.ZodString;
113
+ label: z.ZodString;
114
+ required: z.ZodBoolean;
115
+ col_span: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
116
+ type: z.ZodLiteral<"file">;
117
+ accept: z.ZodArray<z.ZodString>;
118
+ }, z.core.$strip>, z.ZodObject<{
119
+ id: z.ZodString;
120
+ label: z.ZodString;
121
+ required: z.ZodBoolean;
122
+ col_span: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
123
+ type: z.ZodLiteral<"singleselect">;
124
+ options: z.ZodArray<z.ZodObject<{
125
+ id: z.ZodString;
126
+ label: z.ZodString;
127
+ }, z.core.$strip>>;
128
+ default_value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
129
+ }, z.core.$strip>, z.ZodObject<{
130
+ id: z.ZodString;
131
+ label: z.ZodString;
132
+ required: z.ZodBoolean;
133
+ col_span: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
134
+ type: z.ZodLiteral<"multiselect">;
135
+ options: z.ZodArray<z.ZodObject<{
136
+ id: z.ZodString;
137
+ label: z.ZodString;
138
+ }, z.core.$strip>>;
139
+ default_value: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
140
+ }, z.core.$strip>, z.ZodObject<{
141
+ id: z.ZodString;
142
+ label: z.ZodString;
143
+ required: z.ZodBoolean;
144
+ col_span: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
145
+ type: z.ZodLiteral<"checkbox">;
146
+ content: z.ZodString;
147
+ default_value: z.ZodBoolean;
148
+ }, z.core.$strip>], "type">;
149
+ export declare const formRenderSchema: z.ZodObject<{
150
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
151
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
152
+ columns: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
153
+ submit_label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
154
+ fields: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
155
+ id: z.ZodString;
156
+ label: z.ZodString;
157
+ required: z.ZodBoolean;
158
+ col_span: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
159
+ type: z.ZodLiteral<"text">;
160
+ placeholder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
161
+ default_value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
162
+ auto_resize: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodBoolean>>>;
163
+ }, z.core.$strip>, z.ZodObject<{
164
+ id: z.ZodString;
165
+ label: z.ZodString;
166
+ required: z.ZodBoolean;
167
+ col_span: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
168
+ type: z.ZodLiteral<"date">;
169
+ placeholder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
170
+ default_value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
171
+ }, z.core.$strip>, z.ZodObject<{
172
+ id: z.ZodString;
173
+ label: z.ZodString;
174
+ required: z.ZodBoolean;
175
+ col_span: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
176
+ type: z.ZodLiteral<"file">;
177
+ accept: z.ZodArray<z.ZodString>;
178
+ }, z.core.$strip>, z.ZodObject<{
179
+ id: z.ZodString;
180
+ label: z.ZodString;
181
+ required: z.ZodBoolean;
182
+ col_span: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
183
+ type: z.ZodLiteral<"singleselect">;
184
+ options: z.ZodArray<z.ZodObject<{
185
+ id: z.ZodString;
186
+ label: z.ZodString;
187
+ }, z.core.$strip>>;
188
+ default_value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
189
+ }, z.core.$strip>, z.ZodObject<{
190
+ id: z.ZodString;
191
+ label: z.ZodString;
192
+ required: z.ZodBoolean;
193
+ col_span: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
194
+ type: z.ZodLiteral<"multiselect">;
195
+ options: z.ZodArray<z.ZodObject<{
196
+ id: z.ZodString;
197
+ label: z.ZodString;
198
+ }, z.core.$strip>>;
199
+ default_value: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
200
+ }, z.core.$strip>, z.ZodObject<{
201
+ id: z.ZodString;
202
+ label: z.ZodString;
203
+ required: z.ZodBoolean;
204
+ col_span: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
205
+ type: z.ZodLiteral<"checkbox">;
206
+ content: z.ZodString;
207
+ default_value: z.ZodBoolean;
208
+ }, z.core.$strip>], "type">>;
209
+ }, z.core.$strip>;
210
+ export declare const formResponseSchema: z.ZodObject<{
211
+ values: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
212
+ type: z.ZodLiteral<"text">;
213
+ value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
214
+ }, z.core.$strip>, z.ZodObject<{
215
+ type: z.ZodLiteral<"date">;
216
+ value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
217
+ }, z.core.$strip>, z.ZodObject<{
218
+ type: z.ZodLiteral<"file">;
219
+ value: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
220
+ uri: z.ZodString;
221
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
222
+ mime_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
223
+ }, z.core.$strip>>>>;
224
+ }, z.core.$strip>, z.ZodObject<{
225
+ type: z.ZodLiteral<"singleselect">;
226
+ value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
227
+ }, z.core.$strip>, z.ZodObject<{
228
+ type: z.ZodLiteral<"multiselect">;
229
+ value: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
230
+ }, z.core.$strip>, z.ZodObject<{
231
+ type: z.ZodLiteral<"checkbox">;
232
+ value: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
233
+ }, z.core.$strip>], "type">>;
234
+ }, z.core.$strip>;
235
+ export type FormRender = z.infer<typeof formRenderSchema>;
236
+ export type TextField = z.infer<typeof textField>;
237
+ export type DateField = z.infer<typeof dateField>;
238
+ export type FileField = z.infer<typeof fileField>;
239
+ export type SingleSelectField = z.infer<typeof singleSelectField>;
240
+ export type MultiSelectField = z.infer<typeof multiSelectField>;
241
+ export type CheckboxField = z.infer<typeof checkboxField>;
242
+ export type FormField = z.infer<typeof fieldSchema>;
243
+ export type FormResponseValue = z.infer<typeof formResponseSchema>['values'][string];
244
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Copyright 2025 © BeeAI a Series of LF Projects, LLC
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import type { AgentstackClient } from '../../../api/build-api-client';
6
+ import type { ContextToken } from '../../../api/types';
7
+ import type { LLMDemands, LLMFulfillments } from '../services/llm';
8
+ export declare const buildLLMExtensionFulfillmentResolver: (api: AgentstackClient, token: ContextToken) => ({ llm_demands }: LLMDemands) => Promise<LLMFulfillments>;
@@ -0,0 +1,146 @@
1
+ /**
2
+ * Copyright 2025 © BeeAI a Series of LF Projects, LLC
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import type { AgentCapabilities } from '@a2a-js/sdk';
6
+ import type { ContextToken } from '../../api/types';
7
+ import type { EmbeddingDemands, EmbeddingFulfillments } from './services/embedding';
8
+ import type { FormDemands, FormFulfillments } from './services/form';
9
+ import type { LLMDemands, LLMFulfillments } from './services/llm';
10
+ import type { MCPDemands, MCPFulfillments } from './services/mcp';
11
+ import type { OAuthDemands, OAuthFulfillments } from './services/oauth-provider';
12
+ import type { SecretDemands, SecretFulfillments } from './services/secrets';
13
+ import type { SettingsDemands, SettingsFulfillments } from './ui/settings';
14
+ export interface Fulfillments {
15
+ llm: (demand: LLMDemands) => Promise<LLMFulfillments>;
16
+ embedding: (demand: EmbeddingDemands) => Promise<EmbeddingFulfillments>;
17
+ mcp: (demand: MCPDemands) => Promise<MCPFulfillments>;
18
+ oauth: (demand: OAuthDemands) => Promise<OAuthFulfillments>;
19
+ settings: (demand: SettingsDemands) => Promise<SettingsFulfillments>;
20
+ secrets: (demand: SecretDemands) => Promise<SecretFulfillments>;
21
+ form: (demand: FormDemands) => Promise<FormFulfillments>;
22
+ oauthRedirectUri: () => string | null;
23
+ getContextToken: () => ContextToken;
24
+ }
25
+ export declare const handleAgentCard: (agentCard: {
26
+ capabilities: AgentCapabilities;
27
+ }) => {
28
+ resolveMetadata: (fulfillments: Fulfillments) => Promise<Record<string, unknown>>;
29
+ demands: {
30
+ llmDemands: {
31
+ llm_demands: Record<string, {
32
+ description?: string | null | undefined;
33
+ suggested?: string[] | null | undefined;
34
+ }>;
35
+ } | null;
36
+ embeddingDemands: {
37
+ embedding_demands: Record<string, {
38
+ description?: string | null | undefined;
39
+ suggested?: string[] | null | undefined;
40
+ }>;
41
+ } | null;
42
+ mcpDemands: {
43
+ mcp_demands: Record<string, {
44
+ description?: string | null | undefined;
45
+ suggested?: string[] | null | undefined;
46
+ allowed_transports?: ("streamable_http" | "stdio")[] | null | undefined;
47
+ }>;
48
+ } | null;
49
+ oauthDemands: {
50
+ oauth_demands: Record<string, {
51
+ redirect_uri: boolean;
52
+ }>;
53
+ } | null;
54
+ settingsDemands: {
55
+ fields: ({
56
+ id: string;
57
+ type: "checkbox_group";
58
+ fields: {
59
+ id: string;
60
+ label: string;
61
+ default_value: boolean;
62
+ }[];
63
+ } | {
64
+ type: "single_select";
65
+ id: string;
66
+ label: string;
67
+ options: {
68
+ label: string;
69
+ value: string;
70
+ }[];
71
+ default_value: string;
72
+ })[];
73
+ } | null;
74
+ secretDemands: {
75
+ secret_demands: Record<string, {
76
+ name: string;
77
+ description?: string | null | undefined;
78
+ }>;
79
+ } | null;
80
+ formDemands: {
81
+ form_demands: {
82
+ initial_form?: {
83
+ fields: ({
84
+ id: string;
85
+ label: string;
86
+ required: boolean;
87
+ type: "text";
88
+ col_span?: number | null | undefined;
89
+ placeholder?: string | null | undefined;
90
+ default_value?: string | null | undefined;
91
+ auto_resize?: boolean | null | undefined;
92
+ } | {
93
+ id: string;
94
+ label: string;
95
+ required: boolean;
96
+ type: "date";
97
+ col_span?: number | null | undefined;
98
+ placeholder?: string | null | undefined;
99
+ default_value?: string | null | undefined;
100
+ } | {
101
+ id: string;
102
+ label: string;
103
+ required: boolean;
104
+ type: "file";
105
+ accept: string[];
106
+ col_span?: number | null | undefined;
107
+ } | {
108
+ id: string;
109
+ label: string;
110
+ required: boolean;
111
+ type: "singleselect";
112
+ options: {
113
+ id: string;
114
+ label: string;
115
+ }[];
116
+ col_span?: number | null | undefined;
117
+ default_value?: string | null | undefined;
118
+ } | {
119
+ id: string;
120
+ label: string;
121
+ required: boolean;
122
+ type: "multiselect";
123
+ options: {
124
+ id: string;
125
+ label: string;
126
+ }[];
127
+ col_span?: number | null | undefined;
128
+ default_value?: string[] | null | undefined;
129
+ } | {
130
+ id: string;
131
+ label: string;
132
+ required: boolean;
133
+ type: "checkbox";
134
+ content: string;
135
+ default_value: boolean;
136
+ col_span?: number | null | undefined;
137
+ })[];
138
+ title?: string | null | undefined;
139
+ description?: string | null | undefined;
140
+ columns?: number | null | undefined;
141
+ submit_label?: string | null | undefined;
142
+ } | undefined;
143
+ };
144
+ } | null;
145
+ };
146
+ };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Copyright 2025 © BeeAI a Series of LF Projects, LLC
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import type { FormResponseValue } from './common/form';
6
+ export type InputRequiredResponses = Partial<{
7
+ form: Record<string, FormResponseValue>;
8
+ }>;
9
+ export declare const handleInputRequired: () => {
10
+ resolveMetadata: (responses: InputRequiredResponses) => Promise<Record<string, unknown>>;
11
+ };
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Copyright 2025 © BeeAI a Series of LF Projects, LLC
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import type { TaskStatusUpdateEvent } from '@a2a-js/sdk';
6
+ import type { FormRender } from './common/form';
7
+ import type { SecretDemands } from './services/secrets';
8
+ export declare enum TaskStatusUpdateType {
9
+ SecretRequired = "secret-required",
10
+ FormRequired = "form-required",
11
+ OAuthRequired = "oauth-required"
12
+ }
13
+ export interface SecretRequiredResult {
14
+ type: TaskStatusUpdateType.SecretRequired;
15
+ demands: SecretDemands;
16
+ }
17
+ export interface FormRequiredResult {
18
+ type: TaskStatusUpdateType.FormRequired;
19
+ form: FormRender;
20
+ }
21
+ export interface OAuthRequiredResult {
22
+ type: TaskStatusUpdateType.OAuthRequired;
23
+ url: string;
24
+ }
25
+ export type TaskStatusUpdateResult = SecretRequiredResult | FormRequiredResult | OAuthRequiredResult;
26
+ export declare const handleTaskStatusUpdate: (event: TaskStatusUpdateEvent) => TaskStatusUpdateResult[];
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Copyright 2025 © BeeAI a Series of LF Projects, LLC
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import z from 'zod';
6
+ import type { A2AServiceExtension } from '../types';
7
+ declare const URI = "https://a2a-extensions.agentstack.beeai.dev/services/embedding/v1";
8
+ declare const embeddingDemandsSchema: z.ZodObject<{
9
+ embedding_demands: z.ZodRecord<z.ZodString, z.ZodObject<{
10
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11
+ suggested: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
12
+ }, z.core.$strip>>;
13
+ }, z.core.$strip>;
14
+ export type EmbeddingDemands = z.infer<typeof embeddingDemandsSchema>;
15
+ declare const embeddingFulfillmentsSchema: z.ZodObject<{
16
+ embedding_fulfillments: z.ZodRecord<z.ZodString, z.ZodObject<{
17
+ identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
18
+ api_base: z.ZodString;
19
+ api_key: z.ZodString;
20
+ api_model: z.ZodString;
21
+ }, z.core.$strip>>;
22
+ }, z.core.$strip>;
23
+ export type EmbeddingFulfillments = z.infer<typeof embeddingFulfillmentsSchema>;
24
+ export declare const embeddingExtension: A2AServiceExtension<typeof URI, z.infer<typeof embeddingDemandsSchema>, EmbeddingFulfillments>;
25
+ export {};
@@ -0,0 +1,103 @@
1
+ /**
2
+ * Copyright 2025 © BeeAI a Series of LF Projects, LLC
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import z from 'zod';
6
+ import type { A2AServiceExtension } from '../types';
7
+ declare const URI = "https://a2a-extensions.agentstack.beeai.dev/services/form/v1";
8
+ declare const formDemandSchema: z.ZodObject<{
9
+ form_demands: z.ZodObject<{
10
+ initial_form: z.ZodOptional<z.ZodObject<{
11
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
+ columns: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
14
+ submit_label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
+ fields: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
16
+ id: z.ZodString;
17
+ label: z.ZodString;
18
+ required: z.ZodBoolean;
19
+ col_span: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
20
+ type: z.ZodLiteral<"text">;
21
+ placeholder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
22
+ default_value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
23
+ auto_resize: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodBoolean>>>;
24
+ }, z.core.$strip>, z.ZodObject<{
25
+ id: z.ZodString;
26
+ label: z.ZodString;
27
+ required: z.ZodBoolean;
28
+ col_span: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
29
+ type: z.ZodLiteral<"date">;
30
+ placeholder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
31
+ default_value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
32
+ }, z.core.$strip>, z.ZodObject<{
33
+ id: z.ZodString;
34
+ label: z.ZodString;
35
+ required: z.ZodBoolean;
36
+ col_span: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
37
+ type: z.ZodLiteral<"file">;
38
+ accept: z.ZodArray<z.ZodString>;
39
+ }, z.core.$strip>, z.ZodObject<{
40
+ id: z.ZodString;
41
+ label: z.ZodString;
42
+ required: z.ZodBoolean;
43
+ col_span: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
44
+ type: z.ZodLiteral<"singleselect">;
45
+ options: z.ZodArray<z.ZodObject<{
46
+ id: z.ZodString;
47
+ label: z.ZodString;
48
+ }, z.core.$strip>>;
49
+ default_value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
50
+ }, z.core.$strip>, z.ZodObject<{
51
+ id: z.ZodString;
52
+ label: z.ZodString;
53
+ required: z.ZodBoolean;
54
+ col_span: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
55
+ type: z.ZodLiteral<"multiselect">;
56
+ options: z.ZodArray<z.ZodObject<{
57
+ id: z.ZodString;
58
+ label: z.ZodString;
59
+ }, z.core.$strip>>;
60
+ default_value: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
61
+ }, z.core.$strip>, z.ZodObject<{
62
+ id: z.ZodString;
63
+ label: z.ZodString;
64
+ required: z.ZodBoolean;
65
+ col_span: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
66
+ type: z.ZodLiteral<"checkbox">;
67
+ content: z.ZodString;
68
+ default_value: z.ZodBoolean;
69
+ }, z.core.$strip>], "type">>;
70
+ }, z.core.$strip>>;
71
+ }, z.core.$strip>;
72
+ }, z.core.$strip>;
73
+ export type FormDemands = z.infer<typeof formDemandSchema>;
74
+ declare const formFulfillmentSchema: z.ZodObject<{
75
+ form_fulfillments: z.ZodRecord<z.ZodString, z.ZodObject<{
76
+ values: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
77
+ type: z.ZodLiteral<"text">;
78
+ value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
79
+ }, z.core.$strip>, z.ZodObject<{
80
+ type: z.ZodLiteral<"date">;
81
+ value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
82
+ }, z.core.$strip>, z.ZodObject<{
83
+ type: z.ZodLiteral<"file">;
84
+ value: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
85
+ uri: z.ZodString;
86
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
87
+ mime_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
88
+ }, z.core.$strip>>>>;
89
+ }, z.core.$strip>, z.ZodObject<{
90
+ type: z.ZodLiteral<"singleselect">;
91
+ value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
92
+ }, z.core.$strip>, z.ZodObject<{
93
+ type: z.ZodLiteral<"multiselect">;
94
+ value: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
95
+ }, z.core.$strip>, z.ZodObject<{
96
+ type: z.ZodLiteral<"checkbox">;
97
+ value: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
98
+ }, z.core.$strip>], "type">>;
99
+ }, z.core.$strip>>;
100
+ }, z.core.$strip>;
101
+ export type FormFulfillments = z.infer<typeof formFulfillmentSchema>;
102
+ export declare const formExtension: A2AServiceExtension<typeof URI, FormDemands, FormFulfillments>;
103
+ export {};
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Copyright 2025 © BeeAI a Series of LF Projects, LLC
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import z from 'zod';
6
+ import type { A2AServiceExtension } from '../types';
7
+ declare const URI = "https://a2a-extensions.agentstack.beeai.dev/services/llm/v1";
8
+ declare const llmDemandsSchema: z.ZodObject<{
9
+ llm_demands: z.ZodRecord<z.ZodString, z.ZodObject<{
10
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11
+ suggested: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
12
+ }, z.core.$strip>>;
13
+ }, z.core.$strip>;
14
+ export type LLMDemands = z.infer<typeof llmDemandsSchema>;
15
+ declare const llmFulfillmentSchema: z.ZodObject<{
16
+ llm_fulfillments: z.ZodRecord<z.ZodString, z.ZodObject<{
17
+ identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
18
+ api_base: z.ZodString;
19
+ api_key: z.ZodString;
20
+ api_model: z.ZodString;
21
+ }, z.core.$strip>>;
22
+ }, z.core.$strip>;
23
+ export type LLMFulfillments = z.infer<typeof llmFulfillmentSchema>;
24
+ export declare const llmExtension: A2AServiceExtension<typeof URI, z.infer<typeof llmDemandsSchema>, LLMFulfillments>;
25
+ export {};
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Copyright 2025 © BeeAI a Series of LF Projects, LLC
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import z from 'zod';
6
+ import type { A2AServiceExtension } from '../types';
7
+ declare const URI = "https://a2a-extensions.agentstack.beeai.dev/services/mcp/v1";
8
+ declare const mcpTransportTypesEnum: z.ZodEnum<{
9
+ streamable_http: "streamable_http";
10
+ stdio: "stdio";
11
+ }>;
12
+ type MCPTransportType = z.infer<typeof mcpTransportTypesEnum>;
13
+ declare const mcpDemandsSchema: z.ZodObject<{
14
+ mcp_demands: z.ZodRecord<z.ZodString, z.ZodObject<{
15
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16
+ suggested: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
17
+ allowed_transports: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
18
+ streamable_http: "streamable_http";
19
+ stdio: "stdio";
20
+ }>>>>;
21
+ }, z.core.$strip>>;
22
+ }, z.core.$strip>;
23
+ export type MCPDemands = z.infer<typeof mcpDemandsSchema>;
24
+ declare const mcpFulfillmentSchema: z.ZodObject<{
25
+ mcp_fulfillments: z.ZodRecord<z.ZodString, z.ZodObject<{
26
+ transport: z.ZodObject<{
27
+ type: z.ZodEnum<{
28
+ streamable_http: "streamable_http";
29
+ stdio: "stdio";
30
+ }>;
31
+ url: z.ZodString;
32
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
33
+ }, z.core.$strip>;
34
+ }, z.core.$strip>>;
35
+ }, z.core.$strip>;
36
+ export type MCPFulfillments = z.infer<typeof mcpFulfillmentSchema>;
37
+ export declare const mcpExtension: A2AServiceExtension<typeof URI, z.infer<typeof mcpDemandsSchema>, {
38
+ mcp_fulfillments: Record<string, {
39
+ transport: {
40
+ type: MCPTransportType;
41
+ url: string;
42
+ headers?: Record<string, string>;
43
+ };
44
+ }>;
45
+ }>;
46
+ export {};
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Copyright 2025 © BeeAI a Series of LF Projects, LLC
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import z from 'zod';
6
+ import type { A2AServiceExtension } from '../types';
7
+ declare const URI = "https://a2a-extensions.agentstack.beeai.dev/auth/oauth/v1";
8
+ declare const oauthDemandsSchema: z.ZodObject<{
9
+ oauth_demands: z.ZodRecord<z.ZodString, z.ZodObject<{
10
+ redirect_uri: z.ZodBoolean;
11
+ }, z.core.$strip>>;
12
+ }, z.core.$strip>;
13
+ export type OAuthDemands = z.infer<typeof oauthDemandsSchema>;
14
+ declare const oauthFulfillmentSchema: z.ZodObject<{
15
+ oauth_fulfillments: z.ZodRecord<z.ZodString, z.ZodObject<{
16
+ redirect_uri: z.ZodString;
17
+ }, z.core.$strip>>;
18
+ }, z.core.$strip>;
19
+ export type OAuthFulfillments = z.infer<typeof oauthFulfillmentSchema>;
20
+ export declare const oauthProviderExtension: A2AServiceExtension<typeof URI, z.infer<typeof oauthDemandsSchema>, {
21
+ oauth_fulfillments: Record<string, {
22
+ redirect_uri: string;
23
+ }>;
24
+ }>;
25
+ export declare const oauthMessageSchema: z.ZodObject<{
26
+ data: z.ZodObject<{
27
+ redirect_uri: z.ZodString;
28
+ }, z.core.$strip>;
29
+ }, z.core.$strip>;
30
+ export {};