@mastra/client-js 0.0.0-message-list-update-20250715150321 → 0.0.0-mssql-store-20250804200341

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 (73) hide show
  1. package/.turbo/turbo-build.log +2 -17
  2. package/CHANGELOG.md +286 -3
  3. package/README.md +1 -0
  4. package/dist/adapters/agui.d.ts +23 -0
  5. package/dist/adapters/agui.d.ts.map +1 -0
  6. package/dist/client.d.ts +265 -0
  7. package/dist/client.d.ts.map +1 -0
  8. package/dist/example.d.ts +2 -0
  9. package/dist/example.d.ts.map +1 -0
  10. package/dist/index.cjs +377 -253
  11. package/dist/index.cjs.map +1 -0
  12. package/dist/index.d.ts +4 -1194
  13. package/dist/index.d.ts.map +1 -0
  14. package/dist/index.js +377 -253
  15. package/dist/index.js.map +1 -0
  16. package/dist/resources/a2a.d.ts +44 -0
  17. package/dist/resources/a2a.d.ts.map +1 -0
  18. package/dist/resources/agent.d.ts +112 -0
  19. package/dist/resources/agent.d.ts.map +1 -0
  20. package/dist/resources/base.d.ts +13 -0
  21. package/dist/resources/base.d.ts.map +1 -0
  22. package/dist/resources/index.d.ts +11 -0
  23. package/dist/resources/index.d.ts.map +1 -0
  24. package/dist/resources/legacy-workflow.d.ts +87 -0
  25. package/dist/resources/legacy-workflow.d.ts.map +1 -0
  26. package/dist/resources/mcp-tool.d.ts +27 -0
  27. package/dist/resources/mcp-tool.d.ts.map +1 -0
  28. package/dist/resources/memory-thread.d.ts +53 -0
  29. package/dist/resources/memory-thread.d.ts.map +1 -0
  30. package/dist/resources/network-memory-thread.d.ts +47 -0
  31. package/dist/resources/network-memory-thread.d.ts.map +1 -0
  32. package/dist/resources/network.d.ts +30 -0
  33. package/dist/resources/network.d.ts.map +1 -0
  34. package/dist/resources/tool.d.ts +23 -0
  35. package/dist/resources/tool.d.ts.map +1 -0
  36. package/dist/resources/vNextNetwork.d.ts +42 -0
  37. package/dist/resources/vNextNetwork.d.ts.map +1 -0
  38. package/dist/resources/vector.d.ts +48 -0
  39. package/dist/resources/vector.d.ts.map +1 -0
  40. package/dist/resources/workflow.d.ts +154 -0
  41. package/dist/resources/workflow.d.ts.map +1 -0
  42. package/dist/types.d.ts +422 -0
  43. package/dist/types.d.ts.map +1 -0
  44. package/dist/utils/index.d.ts +3 -0
  45. package/dist/utils/index.d.ts.map +1 -0
  46. package/dist/utils/process-client-tools.d.ts +3 -0
  47. package/dist/utils/process-client-tools.d.ts.map +1 -0
  48. package/dist/utils/zod-to-json-schema.d.ts +105 -0
  49. package/dist/utils/zod-to-json-schema.d.ts.map +1 -0
  50. package/integration-tests/agui-adapter.test.ts +122 -0
  51. package/integration-tests/package.json +18 -0
  52. package/integration-tests/src/mastra/index.ts +35 -0
  53. package/integration-tests/vitest.config.ts +9 -0
  54. package/package.json +10 -7
  55. package/src/adapters/agui.test.ts +145 -3
  56. package/src/client.ts +97 -0
  57. package/src/index.test.ts +402 -6
  58. package/src/index.ts +1 -0
  59. package/src/resources/agent.ts +285 -300
  60. package/src/resources/base.ts +5 -1
  61. package/src/resources/memory-thread.test.ts +285 -0
  62. package/src/resources/memory-thread.ts +36 -0
  63. package/src/resources/network-memory-thread.test.ts +269 -0
  64. package/src/resources/network-memory-thread.ts +18 -0
  65. package/src/resources/network.ts +4 -3
  66. package/src/resources/workflow.ts +17 -3
  67. package/src/types.ts +81 -7
  68. package/src/utils/process-client-tools.ts +1 -1
  69. package/src/v2-messages.test.ts +180 -0
  70. package/tsconfig.build.json +9 -0
  71. package/tsconfig.json +1 -1
  72. package/tsup.config.ts +22 -0
  73. package/dist/index.d.cts +0 -1194
@@ -1,19 +1,4 @@
1
1
 
2
- > @mastra/client-js@0.10.14-alpha.0 build /home/runner/work/mastra/mastra/client-sdks/client-js
3
- > tsup src/index.ts --format esm,cjs --dts --clean --treeshake=smallest --splitting
2
+ > @mastra/client-js@0.10.19-alpha.0 build /home/runner/work/mastra/mastra/client-sdks/client-js
3
+ > tsup --silent --config tsup.config.ts
4
4
 
5
- CLI Building entry: src/index.ts
6
- CLI Using tsconfig: tsconfig.json
7
- CLI tsup v8.5.0
8
- CLI Target: es2022
9
- CLI Cleaning output folder
10
- ESM Build start
11
- CJS Build start
12
- ESM dist/index.js 71.12 KB
13
- ESM ⚡️ Build success in 2405ms
14
- CJS dist/index.cjs 71.41 KB
15
- CJS ⚡️ Build success in 2403ms
16
- DTS Build start
17
- DTS ⚡️ Build success in 18378ms
18
- DTS dist/index.d.ts 41.95 KB
19
- DTS dist/index.d.cts 41.95 KB
package/CHANGELOG.md CHANGED
@@ -1,6 +1,277 @@
1
1
  # @mastra/client-js
2
2
 
3
- ## 0.0.0-message-list-update-20250715150321
3
+ ## 0.0.0-mssql-store-20250804200341
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [94f4812]
8
+ - Updated dependencies [e202b82]
9
+ - Updated dependencies [e00f6a0]
10
+ - Updated dependencies [b0e43c1]
11
+ - Updated dependencies [1fb812e]
12
+ - Updated dependencies [35c5798]
13
+ - @mastra/core@0.0.0-mssql-store-20250804200341
14
+
15
+ ## 0.10.19-alpha.0
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies [94f4812]
20
+ - Updated dependencies [e202b82]
21
+ - Updated dependencies [e00f6a0]
22
+ - @mastra/core@0.12.2-alpha.0
23
+
24
+ ## 0.10.18
25
+
26
+ ### Patch Changes
27
+
28
+ - 6690a16: dependencies updates:
29
+ - Updated dependency [`@ag-ui/client@^0.0.35` ↗︎](https://www.npmjs.com/package/@ag-ui/client/v/0.0.35) (from `^0.0.27`, in `dependencies`)
30
+ - Updated dependencies [33dcb07]
31
+ - Updated dependencies [d0d9500]
32
+ - Updated dependencies [d30b1a0]
33
+ - Updated dependencies [bff87f7]
34
+ - Updated dependencies [b4a8df0]
35
+ - @mastra/core@0.12.1
36
+
37
+ ## 0.10.18-alpha.1
38
+
39
+ ### Patch Changes
40
+
41
+ - Updated dependencies [d0d9500]
42
+ - @mastra/core@0.12.1-alpha.1
43
+
44
+ ## 0.10.18-alpha.0
45
+
46
+ ### Patch Changes
47
+
48
+ - 6690a16: dependencies updates:
49
+ - Updated dependency [`@ag-ui/client@^0.0.35` ↗︎](https://www.npmjs.com/package/@ag-ui/client/v/0.0.35) (from `^0.0.27`, in `dependencies`)
50
+ - Updated dependencies [33dcb07]
51
+ - Updated dependencies [d30b1a0]
52
+ - Updated dependencies [bff87f7]
53
+ - Updated dependencies [b4a8df0]
54
+ - @mastra/core@0.12.1-alpha.0
55
+
56
+ ## 0.10.17
57
+
58
+ ### Patch Changes
59
+
60
+ - aa2715b: process stream response error handling
61
+ - 6bd354c: Should not send content type if body instance of FormData
62
+ - cda801d: Added the ability to pass in metadata for UIMessage and MastraMessageV2 in client-js and agent.stream/generate
63
+ - b641ba3: fix: save score params
64
+ - 9802f42: Added types and tests to ensure client-js and hono endpoints can save memory messages where the input is either a v1 or v2 mastra message
65
+ - 1ac8f6b: deduplicate message
66
+ - b8efbb9: feat: add flexible deleteMessages method to memory API
67
+ - Added `memory.deleteMessages(input)` method that accepts multiple input types:
68
+ - Single message ID as string: `deleteMessages('msg-123')`
69
+ - Array of message IDs: `deleteMessages(['msg-1', 'msg-2'])`
70
+ - Message object with id property: `deleteMessages({ id: 'msg-123' })`
71
+ - Array of message objects: `deleteMessages([{ id: 'msg-1' }, { id: 'msg-2' }])`
72
+ - Implemented in all storage adapters (LibSQL, PostgreSQL, Upstash, InMemory)
73
+ - Added REST API endpoint: `POST /api/memory/messages/delete`
74
+ - Updated client SDK: `thread.deleteMessages()` accepts all input types
75
+ - Updates thread timestamps when messages are deleted
76
+ - Added comprehensive test coverage and documentation
77
+
78
+ - Updated dependencies [510e2c8]
79
+ - Updated dependencies [2f72fb2]
80
+ - Updated dependencies [27cc97a]
81
+ - Updated dependencies [3f89307]
82
+ - Updated dependencies [9eda7d4]
83
+ - Updated dependencies [9d49408]
84
+ - Updated dependencies [41daa63]
85
+ - Updated dependencies [ad0a58b]
86
+ - Updated dependencies [254a36b]
87
+ - Updated dependencies [2ecf658]
88
+ - Updated dependencies [7a7754f]
89
+ - Updated dependencies [fc92d80]
90
+ - Updated dependencies [e0f73c6]
91
+ - Updated dependencies [0b89602]
92
+ - Updated dependencies [4d37822]
93
+ - Updated dependencies [23a6a7c]
94
+ - Updated dependencies [cda801d]
95
+ - Updated dependencies [a77c823]
96
+ - Updated dependencies [ff9c125]
97
+ - Updated dependencies [09bca64]
98
+ - Updated dependencies [b8efbb9]
99
+ - Updated dependencies [71466e7]
100
+ - Updated dependencies [0c99fbe]
101
+ - @mastra/core@0.12.0
102
+
103
+ ## 0.10.17-alpha.5
104
+
105
+ ### Patch Changes
106
+
107
+ - @mastra/core@0.12.0-alpha.5
108
+
109
+ ## 0.10.17-alpha.4
110
+
111
+ ### Patch Changes
112
+
113
+ - Updated dependencies [ad0a58b]
114
+ - @mastra/core@0.12.0-alpha.4
115
+
116
+ ## 0.10.17-alpha.3
117
+
118
+ ### Patch Changes
119
+
120
+ - 9802f42: Added types and tests to ensure client-js and hono endpoints can save memory messages where the input is either a v1 or v2 mastra message
121
+ - 1ac8f6b: deduplicate message
122
+ - @mastra/core@0.12.0-alpha.3
123
+
124
+ ## 0.10.17-alpha.2
125
+
126
+ ### Patch Changes
127
+
128
+ - aa2715b: process stream response error handling
129
+ - b8efbb9: feat: add flexible deleteMessages method to memory API
130
+ - Added `memory.deleteMessages(input)` method that accepts multiple input types:
131
+ - Single message ID as string: `deleteMessages('msg-123')`
132
+ - Array of message IDs: `deleteMessages(['msg-1', 'msg-2'])`
133
+ - Message object with id property: `deleteMessages({ id: 'msg-123' })`
134
+ - Array of message objects: `deleteMessages([{ id: 'msg-1' }, { id: 'msg-2' }])`
135
+ - Implemented in all storage adapters (LibSQL, PostgreSQL, Upstash, InMemory)
136
+ - Added REST API endpoint: `POST /api/memory/messages/delete`
137
+ - Updated client SDK: `thread.deleteMessages()` accepts all input types
138
+ - Updates thread timestamps when messages are deleted
139
+ - Added comprehensive test coverage and documentation
140
+
141
+ - Updated dependencies [27cc97a]
142
+ - Updated dependencies [41daa63]
143
+ - Updated dependencies [254a36b]
144
+ - Updated dependencies [0b89602]
145
+ - Updated dependencies [4d37822]
146
+ - Updated dependencies [ff9c125]
147
+ - Updated dependencies [b8efbb9]
148
+ - Updated dependencies [71466e7]
149
+ - Updated dependencies [0c99fbe]
150
+ - @mastra/core@0.12.0-alpha.2
151
+
152
+ ## 0.10.17-alpha.1
153
+
154
+ ### Patch Changes
155
+
156
+ - cda801d: Added the ability to pass in metadata for UIMessage and MastraMessageV2 in client-js and agent.stream/generate
157
+ - Updated dependencies [e0f73c6]
158
+ - Updated dependencies [cda801d]
159
+ - Updated dependencies [a77c823]
160
+ - @mastra/core@0.12.0-alpha.1
161
+
162
+ ## 0.10.17-alpha.0
163
+
164
+ ### Patch Changes
165
+
166
+ - 6bd354c: Should not send content type if body instance of FormData
167
+ - b641ba3: fix: save score params
168
+ - Updated dependencies [510e2c8]
169
+ - Updated dependencies [2f72fb2]
170
+ - Updated dependencies [3f89307]
171
+ - Updated dependencies [9eda7d4]
172
+ - Updated dependencies [9d49408]
173
+ - Updated dependencies [2ecf658]
174
+ - Updated dependencies [7a7754f]
175
+ - Updated dependencies [fc92d80]
176
+ - Updated dependencies [23a6a7c]
177
+ - Updated dependencies [09bca64]
178
+ - @mastra/core@0.12.0-alpha.0
179
+
180
+ ## 0.10.16
181
+
182
+ ### Patch Changes
183
+
184
+ - @mastra/core@0.11.1
185
+
186
+ ## 0.10.15
187
+
188
+ ### Patch Changes
189
+
190
+ - 4832752: Do not set content-type header when making POST/PUT requests without a body
191
+ - f248d53: Adding `getMessagesPaginated` to the serve, deployer, and client-js
192
+ - 2affc57: Fix output type of network loop
193
+ - 032cb66: ClientJS
194
+ - 7827943: Handle streaming large data
195
+ - 65e3395: Add Scores playground-ui and add scorer hooks
196
+ - 80c2b06: Fix agent chat stop button to cancel stream/generate reqs in the playground
197
+ - 6f6e651: Alias createRun -> createRunAsync to match Mastra Workflow class
198
+ - Updated dependencies [f248d53]
199
+ - Updated dependencies [2affc57]
200
+ - Updated dependencies [66e13e3]
201
+ - Updated dependencies [edd9482]
202
+ - Updated dependencies [18344d7]
203
+ - Updated dependencies [9d372c2]
204
+ - Updated dependencies [40c2525]
205
+ - Updated dependencies [e473f27]
206
+ - Updated dependencies [032cb66]
207
+ - Updated dependencies [703ac71]
208
+ - Updated dependencies [a723d69]
209
+ - Updated dependencies [7827943]
210
+ - Updated dependencies [5889a31]
211
+ - Updated dependencies [bf1e7e7]
212
+ - Updated dependencies [65e3395]
213
+ - Updated dependencies [4933192]
214
+ - Updated dependencies [d1c77a4]
215
+ - Updated dependencies [bea9dd1]
216
+ - Updated dependencies [dcd4802]
217
+ - Updated dependencies [cbddd18]
218
+ - Updated dependencies [7ba91fa]
219
+ - @mastra/core@0.11.0
220
+
221
+ ## 0.10.15-alpha.3
222
+
223
+ ### Patch Changes
224
+
225
+ - @mastra/core@0.11.0-alpha.3
226
+
227
+ ## 0.10.15-alpha.2
228
+
229
+ ### Patch Changes
230
+
231
+ - 4832752: Do not set content-type header when making POST/PUT requests without a body
232
+ - f248d53: Adding `getMessagesPaginated` to the serve, deployer, and client-js
233
+ - 2affc57: Fix output type of network loop
234
+ - 032cb66: ClientJS
235
+ - 65e3395: Add Scores playground-ui and add scorer hooks
236
+ - 80c2b06: Fix agent chat stop button to cancel stream/generate reqs in the playground
237
+ - 6f6e651: Alias createRun -> createRunAsync to match Mastra Workflow class
238
+ - Updated dependencies [f248d53]
239
+ - Updated dependencies [2affc57]
240
+ - Updated dependencies [66e13e3]
241
+ - Updated dependencies [edd9482]
242
+ - Updated dependencies [18344d7]
243
+ - Updated dependencies [9d372c2]
244
+ - Updated dependencies [40c2525]
245
+ - Updated dependencies [e473f27]
246
+ - Updated dependencies [032cb66]
247
+ - Updated dependencies [703ac71]
248
+ - Updated dependencies [a723d69]
249
+ - Updated dependencies [5889a31]
250
+ - Updated dependencies [65e3395]
251
+ - Updated dependencies [4933192]
252
+ - Updated dependencies [d1c77a4]
253
+ - Updated dependencies [bea9dd1]
254
+ - Updated dependencies [dcd4802]
255
+ - Updated dependencies [7ba91fa]
256
+ - @mastra/core@0.11.0-alpha.2
257
+
258
+ ## 0.10.15-alpha.1
259
+
260
+ ### Patch Changes
261
+
262
+ - @mastra/core@0.11.0-alpha.1
263
+
264
+ ## 0.10.15-alpha.0
265
+
266
+ ### Patch Changes
267
+
268
+ - 7827943: Handle streaming large data
269
+ - Updated dependencies [7827943]
270
+ - Updated dependencies [bf1e7e7]
271
+ - Updated dependencies [cbddd18]
272
+ - @mastra/core@0.11.0-alpha.0
273
+
274
+ ## 0.10.14
4
275
 
5
276
  ### Patch Changes
6
277
 
@@ -11,16 +282,28 @@
11
282
  - Updated dependencies [db5cc15]
12
283
  - Updated dependencies [2ba5b76]
13
284
  - Updated dependencies [5237998]
285
+ - Updated dependencies [c3a30de]
14
286
  - Updated dependencies [37c1acd]
15
287
  - Updated dependencies [1aa60b1]
16
288
  - Updated dependencies [89ec9d4]
17
289
  - Updated dependencies [cf3a184]
18
- - Updated dependencies [3759392]
290
+ - Updated dependencies [d6bfd60]
19
291
  - Updated dependencies [626b0f4]
20
292
  - Updated dependencies [c22a91f]
21
293
  - Updated dependencies [f7403ab]
22
294
  - Updated dependencies [6c89d7f]
23
- - @mastra/core@0.0.0-message-list-update-20250715150321
295
+ - @mastra/core@0.10.15
296
+
297
+ ## 0.10.14-alpha.1
298
+
299
+ ### Patch Changes
300
+
301
+ - Updated dependencies [0b56518]
302
+ - Updated dependencies [2ba5b76]
303
+ - Updated dependencies [c3a30de]
304
+ - Updated dependencies [cf3a184]
305
+ - Updated dependencies [d6bfd60]
306
+ - @mastra/core@0.10.15-alpha.1
24
307
 
25
308
  ## 0.10.14-alpha.0
26
309
 
package/README.md CHANGED
@@ -80,6 +80,7 @@ const client = new MastraClient({
80
80
  - `getWorkflow(workflowId)`: Get a workflow instance
81
81
  - `workflow.details()`: Get workflow details
82
82
  - `workflow.createRun()`: Create workflow run
83
+ - `workflow.createRunAsync()`: Create workflow run (alias)
83
84
  - `workflow.startAsync(params)`: Execute the workflow and wait for execution results
84
85
  - `workflow.resumeAsync(parmas)`: Resume suspended workflow step async
85
86
  - `workflow.watch({runId},(record)=>{})`: Watch the step transitions of the workflow run
@@ -0,0 +1,23 @@
1
+ import type { AgentConfig, BaseEvent, Message, RunAgentInput } from '@ag-ui/client';
2
+ import { AbstractAgent } from '@ag-ui/client';
3
+ import type { CoreMessage } from '@mastra/core';
4
+ import { Observable } from 'rxjs';
5
+ import type { Agent } from '../resources/agent';
6
+ interface MastraAgentConfig extends AgentConfig {
7
+ agent: Agent;
8
+ agentId: string;
9
+ resourceId?: string;
10
+ }
11
+ export declare class AGUIAdapter extends AbstractAgent {
12
+ agent: Agent;
13
+ resourceId?: string;
14
+ constructor({ agent, agentId, resourceId, ...rest }: MastraAgentConfig);
15
+ protected run(input: RunAgentInput): Observable<BaseEvent>;
16
+ }
17
+ /**
18
+ * Generates a UUID v4 that works in both browser and Node.js environments
19
+ */
20
+ export declare function generateUUID(): string;
21
+ export declare function convertMessagesToMastraMessages(messages: Message[]): CoreMessage[];
22
+ export {};
23
+ //# sourceMappingURL=agui.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agui.d.ts","sourceRoot":"","sources":["../../src/adapters/agui.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EACT,OAAO,EACP,aAAa,EASd,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,aAAa,EAAa,MAAM,eAAe,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAEhD,UAAU,iBAAkB,SAAQ,WAAW;IAC7C,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,qBAAa,WAAY,SAAQ,aAAa;IAC5C,KAAK,EAAE,KAAK,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;gBACR,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,EAAE,iBAAiB;IAStE,SAAS,CAAC,GAAG,CAAC,KAAK,EAAE,aAAa,GAAG,UAAU,CAAC,SAAS,CAAC;CA+G3D;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAgCrC;AAED,wBAAgB,+BAA+B,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,WAAW,EAAE,CAkDlF"}
@@ -0,0 +1,265 @@
1
+ import type { AbstractAgent } from '@ag-ui/client';
2
+ import type { ServerDetailInfo } from '@mastra/core/mcp';
3
+ import { Agent, MemoryThread, Tool, Workflow, Vector, BaseResource, Network, A2A, MCPTool, LegacyWorkflow } from './resources';
4
+ import { NetworkMemoryThread } from './resources/network-memory-thread';
5
+ import { VNextNetwork } from './resources/vNextNetwork';
6
+ import type { ClientOptions, CreateMemoryThreadParams, CreateMemoryThreadResponse, GetAgentResponse, GetLogParams, GetLogsParams, GetLogsResponse, GetMemoryThreadParams, GetMemoryThreadResponse, GetNetworkResponse, GetTelemetryParams, GetTelemetryResponse, GetToolResponse, GetWorkflowResponse, SaveMessageToMemoryParams, SaveMessageToMemoryResponse, McpServerListResponse, McpServerToolListResponse, GetLegacyWorkflowResponse, GetVNextNetworkResponse, GetNetworkMemoryThreadParams, CreateNetworkMemoryThreadParams, SaveNetworkMessageToMemoryParams, GetScorerResponse, GetScoresByScorerIdParams, GetScoresResponse, GetScoresByRunIdParams, GetScoresByEntityIdParams, SaveScoreParams, SaveScoreResponse } from './types';
7
+ export declare class MastraClient extends BaseResource {
8
+ constructor(options: ClientOptions);
9
+ /**
10
+ * Retrieves all available agents
11
+ * @returns Promise containing map of agent IDs to agent details
12
+ */
13
+ getAgents(): Promise<Record<string, GetAgentResponse>>;
14
+ getAGUI({ resourceId }: {
15
+ resourceId: string;
16
+ }): Promise<Record<string, AbstractAgent>>;
17
+ /**
18
+ * Gets an agent instance by ID
19
+ * @param agentId - ID of the agent to retrieve
20
+ * @returns Agent instance
21
+ */
22
+ getAgent(agentId: string): Agent;
23
+ /**
24
+ * Retrieves memory threads for a resource
25
+ * @param params - Parameters containing the resource ID
26
+ * @returns Promise containing array of memory threads
27
+ */
28
+ getMemoryThreads(params: GetMemoryThreadParams): Promise<GetMemoryThreadResponse>;
29
+ /**
30
+ * Creates a new memory thread
31
+ * @param params - Parameters for creating the memory thread
32
+ * @returns Promise containing the created memory thread
33
+ */
34
+ createMemoryThread(params: CreateMemoryThreadParams): Promise<CreateMemoryThreadResponse>;
35
+ /**
36
+ * Gets a memory thread instance by ID
37
+ * @param threadId - ID of the memory thread to retrieve
38
+ * @returns MemoryThread instance
39
+ */
40
+ getMemoryThread(threadId: string, agentId: string): MemoryThread;
41
+ /**
42
+ * Saves messages to memory
43
+ * @param params - Parameters containing messages to save
44
+ * @returns Promise containing the saved messages
45
+ */
46
+ saveMessageToMemory(params: SaveMessageToMemoryParams): Promise<SaveMessageToMemoryResponse>;
47
+ /**
48
+ * Gets the status of the memory system
49
+ * @returns Promise containing memory system status
50
+ */
51
+ getMemoryStatus(agentId: string): Promise<{
52
+ result: boolean;
53
+ }>;
54
+ /**
55
+ * Retrieves memory threads for a resource
56
+ * @param params - Parameters containing the resource ID
57
+ * @returns Promise containing array of memory threads
58
+ */
59
+ getNetworkMemoryThreads(params: GetNetworkMemoryThreadParams): Promise<GetMemoryThreadResponse>;
60
+ /**
61
+ * Creates a new memory thread
62
+ * @param params - Parameters for creating the memory thread
63
+ * @returns Promise containing the created memory thread
64
+ */
65
+ createNetworkMemoryThread(params: CreateNetworkMemoryThreadParams): Promise<CreateMemoryThreadResponse>;
66
+ /**
67
+ * Gets a memory thread instance by ID
68
+ * @param threadId - ID of the memory thread to retrieve
69
+ * @returns MemoryThread instance
70
+ */
71
+ getNetworkMemoryThread(threadId: string, networkId: string): NetworkMemoryThread;
72
+ /**
73
+ * Saves messages to memory
74
+ * @param params - Parameters containing messages to save
75
+ * @returns Promise containing the saved messages
76
+ */
77
+ saveNetworkMessageToMemory(params: SaveNetworkMessageToMemoryParams): Promise<SaveMessageToMemoryResponse>;
78
+ /**
79
+ * Gets the status of the memory system
80
+ * @returns Promise containing memory system status
81
+ */
82
+ getNetworkMemoryStatus(networkId: string): Promise<{
83
+ result: boolean;
84
+ }>;
85
+ /**
86
+ * Retrieves all available tools
87
+ * @returns Promise containing map of tool IDs to tool details
88
+ */
89
+ getTools(): Promise<Record<string, GetToolResponse>>;
90
+ /**
91
+ * Gets a tool instance by ID
92
+ * @param toolId - ID of the tool to retrieve
93
+ * @returns Tool instance
94
+ */
95
+ getTool(toolId: string): Tool;
96
+ /**
97
+ * Retrieves all available legacy workflows
98
+ * @returns Promise containing map of legacy workflow IDs to legacy workflow details
99
+ */
100
+ getLegacyWorkflows(): Promise<Record<string, GetLegacyWorkflowResponse>>;
101
+ /**
102
+ * Gets a legacy workflow instance by ID
103
+ * @param workflowId - ID of the legacy workflow to retrieve
104
+ * @returns Legacy Workflow instance
105
+ */
106
+ getLegacyWorkflow(workflowId: string): LegacyWorkflow;
107
+ /**
108
+ * Retrieves all available workflows
109
+ * @returns Promise containing map of workflow IDs to workflow details
110
+ */
111
+ getWorkflows(): Promise<Record<string, GetWorkflowResponse>>;
112
+ /**
113
+ * Gets a workflow instance by ID
114
+ * @param workflowId - ID of the workflow to retrieve
115
+ * @returns Workflow instance
116
+ */
117
+ getWorkflow(workflowId: string): Workflow;
118
+ /**
119
+ * Gets a vector instance by name
120
+ * @param vectorName - Name of the vector to retrieve
121
+ * @returns Vector instance
122
+ */
123
+ getVector(vectorName: string): Vector;
124
+ /**
125
+ * Retrieves logs
126
+ * @param params - Parameters for filtering logs
127
+ * @returns Promise containing array of log messages
128
+ */
129
+ getLogs(params: GetLogsParams): Promise<GetLogsResponse>;
130
+ /**
131
+ * Gets logs for a specific run
132
+ * @param params - Parameters containing run ID to retrieve
133
+ * @returns Promise containing array of log messages
134
+ */
135
+ getLogForRun(params: GetLogParams): Promise<GetLogsResponse>;
136
+ /**
137
+ * List of all log transports
138
+ * @returns Promise containing list of log transports
139
+ */
140
+ getLogTransports(): Promise<{
141
+ transports: string[];
142
+ }>;
143
+ /**
144
+ * List of all traces (paged)
145
+ * @param params - Parameters for filtering traces
146
+ * @returns Promise containing telemetry data
147
+ */
148
+ getTelemetry(params?: GetTelemetryParams): Promise<GetTelemetryResponse>;
149
+ /**
150
+ * Retrieves all available networks
151
+ * @returns Promise containing map of network IDs to network details
152
+ */
153
+ getNetworks(): Promise<Array<GetNetworkResponse>>;
154
+ /**
155
+ * Retrieves all available vNext networks
156
+ * @returns Promise containing map of vNext network IDs to vNext network details
157
+ */
158
+ getVNextNetworks(): Promise<Array<GetVNextNetworkResponse>>;
159
+ /**
160
+ * Gets a network instance by ID
161
+ * @param networkId - ID of the network to retrieve
162
+ * @returns Network instance
163
+ */
164
+ getNetwork(networkId: string): Network;
165
+ /**
166
+ * Gets a vNext network instance by ID
167
+ * @param networkId - ID of the vNext network to retrieve
168
+ * @returns vNext Network instance
169
+ */
170
+ getVNextNetwork(networkId: string): VNextNetwork;
171
+ /**
172
+ * Retrieves a list of available MCP servers.
173
+ * @param params - Optional parameters for pagination (limit, offset).
174
+ * @returns Promise containing the list of MCP servers and pagination info.
175
+ */
176
+ getMcpServers(params?: {
177
+ limit?: number;
178
+ offset?: number;
179
+ }): Promise<McpServerListResponse>;
180
+ /**
181
+ * Retrieves detailed information for a specific MCP server.
182
+ * @param serverId - The ID of the MCP server to retrieve.
183
+ * @param params - Optional parameters, e.g., specific version.
184
+ * @returns Promise containing the detailed MCP server information.
185
+ */
186
+ getMcpServerDetails(serverId: string, params?: {
187
+ version?: string;
188
+ }): Promise<ServerDetailInfo>;
189
+ /**
190
+ * Retrieves a list of tools for a specific MCP server.
191
+ * @param serverId - The ID of the MCP server.
192
+ * @returns Promise containing the list of tools.
193
+ */
194
+ getMcpServerTools(serverId: string): Promise<McpServerToolListResponse>;
195
+ /**
196
+ * Gets an MCPTool resource instance for a specific tool on an MCP server.
197
+ * This instance can then be used to fetch details or execute the tool.
198
+ * @param serverId - The ID of the MCP server.
199
+ * @param toolId - The ID of the tool.
200
+ * @returns MCPTool instance.
201
+ */
202
+ getMcpServerTool(serverId: string, toolId: string): MCPTool;
203
+ /**
204
+ * Gets an A2A client for interacting with an agent via the A2A protocol
205
+ * @param agentId - ID of the agent to interact with
206
+ * @returns A2A client instance
207
+ */
208
+ getA2A(agentId: string): A2A;
209
+ /**
210
+ * Retrieves the working memory for a specific thread (optionally resource-scoped).
211
+ * @param agentId - ID of the agent.
212
+ * @param threadId - ID of the thread.
213
+ * @param resourceId - Optional ID of the resource.
214
+ * @returns Working memory for the specified thread or resource.
215
+ */
216
+ getWorkingMemory({ agentId, threadId, resourceId, }: {
217
+ agentId: string;
218
+ threadId: string;
219
+ resourceId?: string;
220
+ }): Promise<unknown>;
221
+ /**
222
+ * Updates the working memory for a specific thread (optionally resource-scoped).
223
+ * @param agentId - ID of the agent.
224
+ * @param threadId - ID of the thread.
225
+ * @param workingMemory - The new working memory content.
226
+ * @param resourceId - Optional ID of the resource.
227
+ */
228
+ updateWorkingMemory({ agentId, threadId, workingMemory, resourceId, }: {
229
+ agentId: string;
230
+ threadId: string;
231
+ workingMemory: string;
232
+ resourceId?: string;
233
+ }): Promise<unknown>;
234
+ /**
235
+ * Retrieves all available scorers
236
+ * @returns Promise containing list of available scorers
237
+ */
238
+ getScorers(): Promise<Record<string, GetScorerResponse>>;
239
+ /**
240
+ * Retrieves a scorer by ID
241
+ * @param scorerId - ID of the scorer to retrieve
242
+ * @returns Promise containing the scorer
243
+ */
244
+ getScorer(scorerId: string): Promise<GetScorerResponse>;
245
+ getScoresByScorerId(params: GetScoresByScorerIdParams): Promise<GetScoresResponse>;
246
+ /**
247
+ * Retrieves scores by run ID
248
+ * @param params - Parameters containing run ID and pagination options
249
+ * @returns Promise containing scores and pagination info
250
+ */
251
+ getScoresByRunId(params: GetScoresByRunIdParams): Promise<GetScoresResponse>;
252
+ /**
253
+ * Retrieves scores by entity ID and type
254
+ * @param params - Parameters containing entity ID, type, and pagination options
255
+ * @returns Promise containing scores and pagination info
256
+ */
257
+ getScoresByEntityId(params: GetScoresByEntityIdParams): Promise<GetScoresResponse>;
258
+ /**
259
+ * Saves a score
260
+ * @param params - Parameters containing the score data to save
261
+ * @returns Promise containing the saved score
262
+ */
263
+ saveScore(params: SaveScoreParams): Promise<SaveScoreResponse>;
264
+ }
265
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,OAAO,EACL,KAAK,EACL,YAAY,EACZ,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,YAAY,EACZ,OAAO,EACP,GAAG,EACH,OAAO,EACP,cAAc,EACf,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,KAAK,EACV,aAAa,EACb,wBAAwB,EACxB,0BAA0B,EAC1B,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACvB,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,EACf,mBAAmB,EACnB,yBAAyB,EACzB,2BAA2B,EAC3B,qBAAqB,EACrB,yBAAyB,EACzB,yBAAyB,EACzB,uBAAuB,EACvB,4BAA4B,EAC5B,+BAA+B,EAC/B,gCAAgC,EAChC,iBA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CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAenF;;;;OAIG;IACI,mBAAmB,CAAC,MAAM,EAAE,yBAAyB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAezF;;;;OAIG;IACI,SAAS,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAMtE"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=example.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"example.d.ts","sourceRoot":"","sources":["../src/example.ts"],"names":[],"mappings":""}