@mastra/client-js 0.0.0-storage-20250225005900 → 0.0.0-stream-vnext-usage-20250908171242
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2639 -3
- package/LICENSE.md +15 -0
- package/README.md +12 -6
- package/dist/client.d.ts +280 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/example.d.ts +2 -0
- package/dist/example.d.ts.map +1 -0
- package/dist/index.cjs +3279 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3273 -0
- package/dist/index.js.map +1 -0
- package/dist/resources/a2a.d.ts +41 -0
- package/dist/resources/a2a.d.ts.map +1 -0
- package/dist/resources/agent-builder.d.ts +161 -0
- package/dist/resources/agent-builder.d.ts.map +1 -0
- package/dist/resources/agent.d.ts +155 -0
- package/dist/resources/agent.d.ts.map +1 -0
- package/dist/resources/base.d.ts +13 -0
- package/dist/resources/base.d.ts.map +1 -0
- package/dist/resources/index.d.ts +13 -0
- package/dist/resources/index.d.ts.map +1 -0
- package/dist/resources/legacy-workflow.d.ts +87 -0
- package/dist/resources/legacy-workflow.d.ts.map +1 -0
- package/dist/resources/mcp-tool.d.ts +27 -0
- package/dist/resources/mcp-tool.d.ts.map +1 -0
- package/dist/resources/memory-thread.d.ts +53 -0
- package/dist/resources/memory-thread.d.ts.map +1 -0
- package/dist/resources/network-memory-thread.d.ts +47 -0
- package/dist/resources/network-memory-thread.d.ts.map +1 -0
- package/dist/resources/network.d.ts +30 -0
- package/dist/resources/network.d.ts.map +1 -0
- package/dist/resources/observability.d.ts +19 -0
- package/dist/resources/observability.d.ts.map +1 -0
- package/dist/resources/tool.d.ts +23 -0
- package/dist/resources/tool.d.ts.map +1 -0
- package/dist/resources/vNextNetwork.d.ts +42 -0
- package/dist/resources/vNextNetwork.d.ts.map +1 -0
- package/dist/resources/vector.d.ts +48 -0
- package/dist/resources/vector.d.ts.map +1 -0
- package/dist/resources/workflow.d.ts +169 -0
- package/dist/resources/workflow.d.ts.map +1 -0
- package/dist/types.d.ts +461 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/process-client-tools.d.ts +3 -0
- package/dist/utils/process-client-tools.d.ts.map +1 -0
- package/dist/utils/process-mastra-stream.d.ts +7 -0
- package/dist/utils/process-mastra-stream.d.ts.map +1 -0
- package/dist/utils/zod-to-json-schema.d.ts +3 -0
- package/dist/utils/zod-to-json-schema.d.ts.map +1 -0
- package/package.json +50 -21
- package/.turbo/turbo-build.log +0 -16
- package/LICENSE +0 -44
- package/dist/index.d.mts +0 -405
- package/dist/index.mjs +0 -487
- package/eslint.config.js +0 -6
- package/src/client.ts +0 -205
- package/src/example.ts +0 -43
- package/src/index.test.ts +0 -597
- package/src/index.ts +0 -2
- package/src/resources/agent.ts +0 -116
- package/src/resources/base.ts +0 -68
- package/src/resources/index.ts +0 -6
- package/src/resources/memory-thread.ts +0 -60
- package/src/resources/tool.ts +0 -32
- package/src/resources/vector.ts +0 -83
- package/src/resources/workflow.ts +0 -68
- package/src/types.ts +0 -163
- package/tsconfig.json +0 -5
- package/vitest.config.js +0 -8
package/LICENSE
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
Elastic License 2.0 (ELv2)
|
|
2
|
-
|
|
3
|
-
**Acceptance**
|
|
4
|
-
By using the software, you agree to all of the terms and conditions below.
|
|
5
|
-
|
|
6
|
-
**Copyright License**
|
|
7
|
-
The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license to use, copy, distribute, make available, and prepare derivative works of the software, in each case subject to the limitations and conditions below
|
|
8
|
-
|
|
9
|
-
**Limitations**
|
|
10
|
-
You may not provide the software to third parties as a hosted or managed service, where the service provides users with access to any substantial set of the features or functionality of the software.
|
|
11
|
-
|
|
12
|
-
You may not move, change, disable, or circumvent the license key functionality in the software, and you may not remove or obscure any functionality in the software that is protected by the license key.
|
|
13
|
-
|
|
14
|
-
You may not alter, remove, or obscure any licensing, copyright, or other notices of the licensor in the software. Any use of the licensor’s trademarks is subject to applicable law.
|
|
15
|
-
|
|
16
|
-
**Patents**
|
|
17
|
-
The licensor grants you a license, under any patent claims the licensor can license, or becomes able to license, to make, have made, use, sell, offer for sale, import and have imported the software, in each case subject to the limitations and conditions in this license. This license does not cover any patent claims that you cause to be infringed by modifications or additions to the software. If you or your company make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
|
|
18
|
-
|
|
19
|
-
**Notices**
|
|
20
|
-
You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms.
|
|
21
|
-
|
|
22
|
-
If you modify the software, you must include in any modified copies of the software prominent notices stating that you have modified the software.
|
|
23
|
-
|
|
24
|
-
**No Other Rights**
|
|
25
|
-
These terms do not imply any licenses other than those expressly granted in these terms.
|
|
26
|
-
|
|
27
|
-
**Termination**
|
|
28
|
-
If you use the software in violation of these terms, such use is not licensed, and your licenses will automatically terminate. If the licensor provides you with a notice of your violation, and you cease all violation of this license no later than 30 days after you receive that notice, your licenses will be reinstated retroactively. However, if you violate these terms after such reinstatement, any additional violation of these terms will cause your licenses to terminate automatically and permanently.
|
|
29
|
-
|
|
30
|
-
**No Liability**
|
|
31
|
-
As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.
|
|
32
|
-
|
|
33
|
-
**Definitions**
|
|
34
|
-
The _licensor_ is the entity offering these terms, and the _software_ is the software the licensor makes available under these terms, including any portion of it.
|
|
35
|
-
|
|
36
|
-
_you_ refers to the individual or entity agreeing to these terms.
|
|
37
|
-
|
|
38
|
-
_your company_ is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. _control_ means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
|
|
39
|
-
|
|
40
|
-
_your licenses_ are all the licenses granted to you for the software under these terms.
|
|
41
|
-
|
|
42
|
-
_use_ means anything you do with the software requiring one of your licenses.
|
|
43
|
-
|
|
44
|
-
_trademark_ means trademarks, service marks, and similar rights.
|
package/dist/index.d.mts
DELETED
|
@@ -1,405 +0,0 @@
|
|
|
1
|
-
import { CoreMessage, OutputType, StorageThreadType, AiMessageType, MessageType, StepAction, StepGraph, QueryResult, BaseLogMessage, GenerateReturn } from '@mastra/core';
|
|
2
|
-
import { JSONSchema7 } from 'json-schema';
|
|
3
|
-
import { ZodSchema } from 'zod';
|
|
4
|
-
|
|
5
|
-
interface ClientOptions {
|
|
6
|
-
/** Base URL for API requests */
|
|
7
|
-
baseUrl: string;
|
|
8
|
-
/** Number of retry attempts for failed requests */
|
|
9
|
-
retries?: number;
|
|
10
|
-
/** Initial backoff time in milliseconds between retries */
|
|
11
|
-
backoffMs?: number;
|
|
12
|
-
/** Maximum backoff time in milliseconds between retries */
|
|
13
|
-
maxBackoffMs?: number;
|
|
14
|
-
/** Custom headers to include with requests */
|
|
15
|
-
headers?: Record<string, string>;
|
|
16
|
-
}
|
|
17
|
-
interface RequestOptions {
|
|
18
|
-
method?: string;
|
|
19
|
-
headers?: Record<string, string>;
|
|
20
|
-
body?: any;
|
|
21
|
-
stream?: boolean;
|
|
22
|
-
}
|
|
23
|
-
interface GetAgentResponse {
|
|
24
|
-
name: string;
|
|
25
|
-
instructions: string;
|
|
26
|
-
tools: Record<string, GetToolResponse>;
|
|
27
|
-
provider: string;
|
|
28
|
-
}
|
|
29
|
-
interface GenerateParams<T extends JSONSchema7 | ZodSchema | undefined = undefined> {
|
|
30
|
-
messages: string | string[] | CoreMessage[];
|
|
31
|
-
threadId?: string;
|
|
32
|
-
resourceid?: string;
|
|
33
|
-
output?: OutputType | T;
|
|
34
|
-
}
|
|
35
|
-
interface StreamParams<T extends JSONSchema7 | ZodSchema | undefined = undefined> {
|
|
36
|
-
messages: string | string[] | CoreMessage[];
|
|
37
|
-
threadId?: string;
|
|
38
|
-
resourceid?: string;
|
|
39
|
-
output?: OutputType | T;
|
|
40
|
-
}
|
|
41
|
-
interface GetEvalsByAgentIdResponse extends GetAgentResponse {
|
|
42
|
-
evals: any[];
|
|
43
|
-
}
|
|
44
|
-
interface GetToolResponse {
|
|
45
|
-
id: string;
|
|
46
|
-
description: string;
|
|
47
|
-
inputSchema: string;
|
|
48
|
-
outputSchema: string;
|
|
49
|
-
}
|
|
50
|
-
interface GetWorkflowResponse {
|
|
51
|
-
name: string;
|
|
52
|
-
triggerSchema: string;
|
|
53
|
-
steps: Record<string, StepAction<any, any, any, any>>;
|
|
54
|
-
stepGraph: StepGraph;
|
|
55
|
-
stepSubscriberGraph: Record<string, StepGraph>;
|
|
56
|
-
}
|
|
57
|
-
interface UpsertVectorParams {
|
|
58
|
-
indexName: string;
|
|
59
|
-
vectors: number[][];
|
|
60
|
-
metadata?: Record<string, any>[];
|
|
61
|
-
ids?: string[];
|
|
62
|
-
}
|
|
63
|
-
interface CreateIndexParams {
|
|
64
|
-
indexName: string;
|
|
65
|
-
dimension: number;
|
|
66
|
-
metric?: 'cosine' | 'euclidean' | 'dotproduct';
|
|
67
|
-
}
|
|
68
|
-
interface QueryVectorParams {
|
|
69
|
-
indexName: string;
|
|
70
|
-
queryVector: number[];
|
|
71
|
-
topK?: number;
|
|
72
|
-
filter?: Record<string, any>;
|
|
73
|
-
includeVector?: boolean;
|
|
74
|
-
}
|
|
75
|
-
interface QueryVectorResponse {
|
|
76
|
-
results: QueryResult[];
|
|
77
|
-
}
|
|
78
|
-
interface GetVectorIndexResponse {
|
|
79
|
-
dimension: number;
|
|
80
|
-
metric: 'cosine' | 'euclidean' | 'dotproduct';
|
|
81
|
-
count: number;
|
|
82
|
-
}
|
|
83
|
-
interface SaveMessageToMemoryParams {
|
|
84
|
-
messages: MessageType[];
|
|
85
|
-
agentId: string;
|
|
86
|
-
}
|
|
87
|
-
type SaveMessageToMemoryResponse = MessageType[];
|
|
88
|
-
interface CreateMemoryThreadParams {
|
|
89
|
-
title: string;
|
|
90
|
-
metadata: Record<string, any>;
|
|
91
|
-
resourceid: string;
|
|
92
|
-
threadId: string;
|
|
93
|
-
agentId: string;
|
|
94
|
-
}
|
|
95
|
-
type CreateMemoryThreadResponse = StorageThreadType;
|
|
96
|
-
interface GetMemoryThreadParams {
|
|
97
|
-
resourceId: string;
|
|
98
|
-
agentId: string;
|
|
99
|
-
}
|
|
100
|
-
type GetMemoryThreadResponse = StorageThreadType[];
|
|
101
|
-
interface UpdateMemoryThreadParams {
|
|
102
|
-
title: string;
|
|
103
|
-
metadata: Record<string, any>;
|
|
104
|
-
resourceid: string;
|
|
105
|
-
}
|
|
106
|
-
interface GetMemoryThreadMessagesResponse {
|
|
107
|
-
messages: CoreMessage[];
|
|
108
|
-
uiMessages: AiMessageType[];
|
|
109
|
-
}
|
|
110
|
-
interface GetLogsParams {
|
|
111
|
-
transportId: string;
|
|
112
|
-
}
|
|
113
|
-
interface GetLogParams {
|
|
114
|
-
runId: string;
|
|
115
|
-
transportId: string;
|
|
116
|
-
}
|
|
117
|
-
type GetLogsResponse = BaseLogMessage[];
|
|
118
|
-
type RequestFunction = (path: string, options?: RequestOptions) => Promise<any>;
|
|
119
|
-
interface GetTelemetryResponse {
|
|
120
|
-
traces: any[];
|
|
121
|
-
}
|
|
122
|
-
interface GetTelemetryParams {
|
|
123
|
-
name?: string;
|
|
124
|
-
scope?: string;
|
|
125
|
-
page?: number;
|
|
126
|
-
perPage?: number;
|
|
127
|
-
attribute?: Record<string, string>;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
declare class BaseResource {
|
|
131
|
-
readonly options: ClientOptions;
|
|
132
|
-
constructor(options: ClientOptions);
|
|
133
|
-
/**
|
|
134
|
-
* Makes an HTTP request to the API with retries and exponential backoff
|
|
135
|
-
* @param path - The API endpoint path
|
|
136
|
-
* @param options - Optional request configuration
|
|
137
|
-
* @returns Promise containing the response data
|
|
138
|
-
*/
|
|
139
|
-
request<T>(path: string, options?: RequestOptions): Promise<T>;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
declare class Agent extends BaseResource {
|
|
143
|
-
private agentId;
|
|
144
|
-
constructor(options: ClientOptions, agentId: string);
|
|
145
|
-
/**
|
|
146
|
-
* Retrieves details about the agent
|
|
147
|
-
* @returns Promise containing agent details including model and instructions
|
|
148
|
-
*/
|
|
149
|
-
details(): Promise<GetAgentResponse>;
|
|
150
|
-
/**
|
|
151
|
-
* Generates a response from the agent
|
|
152
|
-
* @param params - Generation parameters including prompt
|
|
153
|
-
* @returns Promise containing the generated response
|
|
154
|
-
*/
|
|
155
|
-
generate<T extends JSONSchema7 | ZodSchema | undefined = undefined>(params: GenerateParams<T>): Promise<GenerateReturn<T>>;
|
|
156
|
-
/**
|
|
157
|
-
* Streams a response from the agent
|
|
158
|
-
* @param params - Stream parameters including prompt
|
|
159
|
-
* @returns Promise containing the streamed response
|
|
160
|
-
*/
|
|
161
|
-
stream<T extends JSONSchema7 | ZodSchema | undefined = undefined>(params: StreamParams<T>): Promise<Response>;
|
|
162
|
-
/**
|
|
163
|
-
* Gets details about a specific tool available to the agent
|
|
164
|
-
* @param toolId - ID of the tool to retrieve
|
|
165
|
-
* @returns Promise containing tool details
|
|
166
|
-
*/
|
|
167
|
-
getTool(toolId: string): Promise<GetToolResponse>;
|
|
168
|
-
/**
|
|
169
|
-
* Retrieves evaluation results for the agent
|
|
170
|
-
* @returns Promise containing agent evaluations
|
|
171
|
-
*/
|
|
172
|
-
evals(): Promise<GetEvalsByAgentIdResponse>;
|
|
173
|
-
/**
|
|
174
|
-
* Retrieves live evaluation results for the agent
|
|
175
|
-
* @returns Promise containing live agent evaluations
|
|
176
|
-
*/
|
|
177
|
-
liveEvals(): Promise<GetEvalsByAgentIdResponse>;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
declare class MemoryThread extends BaseResource {
|
|
181
|
-
private threadId;
|
|
182
|
-
private agentId;
|
|
183
|
-
constructor(options: ClientOptions, threadId: string, agentId: string);
|
|
184
|
-
/**
|
|
185
|
-
* Retrieves the memory thread details
|
|
186
|
-
* @returns Promise containing thread details including title and metadata
|
|
187
|
-
*/
|
|
188
|
-
get(): Promise<StorageThreadType>;
|
|
189
|
-
/**
|
|
190
|
-
* Updates the memory thread properties
|
|
191
|
-
* @param params - Update parameters including title and metadata
|
|
192
|
-
* @returns Promise containing updated thread details
|
|
193
|
-
*/
|
|
194
|
-
update(params: UpdateMemoryThreadParams): Promise<StorageThreadType>;
|
|
195
|
-
/**
|
|
196
|
-
* Deletes the memory thread
|
|
197
|
-
* @returns Promise containing deletion result
|
|
198
|
-
*/
|
|
199
|
-
delete(): Promise<{
|
|
200
|
-
result: string;
|
|
201
|
-
}>;
|
|
202
|
-
/**
|
|
203
|
-
* Retrieves messages associated with the thread
|
|
204
|
-
* @returns Promise containing thread messages and UI messages
|
|
205
|
-
*/
|
|
206
|
-
getMessages(): Promise<GetMemoryThreadMessagesResponse>;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
declare class Vector extends BaseResource {
|
|
210
|
-
private vectorName;
|
|
211
|
-
constructor(options: ClientOptions, vectorName: string);
|
|
212
|
-
/**
|
|
213
|
-
* Retrieves details about a specific vector index
|
|
214
|
-
* @param indexName - Name of the index to get details for
|
|
215
|
-
* @returns Promise containing vector index details
|
|
216
|
-
*/
|
|
217
|
-
details(indexName: string): Promise<GetVectorIndexResponse>;
|
|
218
|
-
/**
|
|
219
|
-
* Deletes a vector index
|
|
220
|
-
* @param indexName - Name of the index to delete
|
|
221
|
-
* @returns Promise indicating deletion success
|
|
222
|
-
*/
|
|
223
|
-
delete(indexName: string): Promise<{
|
|
224
|
-
success: boolean;
|
|
225
|
-
}>;
|
|
226
|
-
/**
|
|
227
|
-
* Retrieves a list of all available indexes
|
|
228
|
-
* @returns Promise containing array of index names
|
|
229
|
-
*/
|
|
230
|
-
getIndexes(): Promise<{
|
|
231
|
-
indexes: string[];
|
|
232
|
-
}>;
|
|
233
|
-
/**
|
|
234
|
-
* Creates a new vector index
|
|
235
|
-
* @param params - Parameters for index creation including dimension and metric
|
|
236
|
-
* @returns Promise indicating creation success
|
|
237
|
-
*/
|
|
238
|
-
createIndex(params: CreateIndexParams): Promise<{
|
|
239
|
-
success: boolean;
|
|
240
|
-
}>;
|
|
241
|
-
/**
|
|
242
|
-
* Upserts vectors into an index
|
|
243
|
-
* @param params - Parameters containing vectors, metadata, and optional IDs
|
|
244
|
-
* @returns Promise containing array of vector IDs
|
|
245
|
-
*/
|
|
246
|
-
upsert(params: UpsertVectorParams): Promise<string[]>;
|
|
247
|
-
/**
|
|
248
|
-
* Queries vectors in an index
|
|
249
|
-
* @param params - Query parameters including query vector and search options
|
|
250
|
-
* @returns Promise containing query results
|
|
251
|
-
*/
|
|
252
|
-
query(params: QueryVectorParams): Promise<QueryVectorResponse>;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
declare class Workflow extends BaseResource {
|
|
256
|
-
private workflowId;
|
|
257
|
-
constructor(options: ClientOptions, workflowId: string);
|
|
258
|
-
/**
|
|
259
|
-
* Retrieves details about the workflow
|
|
260
|
-
* @returns Promise containing workflow details including steps and graphs
|
|
261
|
-
*/
|
|
262
|
-
details(): Promise<GetWorkflowResponse>;
|
|
263
|
-
/**
|
|
264
|
-
* Executes the workflow with the provided parameters
|
|
265
|
-
* @param params - Parameters required for workflow execution
|
|
266
|
-
* @returns Promise containing the workflow execution results
|
|
267
|
-
*/
|
|
268
|
-
execute(params: Record<string, any>): Promise<Record<string, any>>;
|
|
269
|
-
/**
|
|
270
|
-
* Resumes a suspended workflow step
|
|
271
|
-
* @param stepId - ID of the step to resume
|
|
272
|
-
* @param runId - ID of the workflow run
|
|
273
|
-
* @param context - Context to resume the workflow with
|
|
274
|
-
* @returns Promise containing the workflow resume results
|
|
275
|
-
*/
|
|
276
|
-
resume({ stepId, runId, context, }: {
|
|
277
|
-
stepId: string;
|
|
278
|
-
runId: string;
|
|
279
|
-
context: Record<string, any>;
|
|
280
|
-
}): Promise<Record<string, any>>;
|
|
281
|
-
/**
|
|
282
|
-
* Watches workflow transitions in real-time
|
|
283
|
-
* @returns Promise containing the workflow watch stream
|
|
284
|
-
*/
|
|
285
|
-
watch(): Promise<Response>;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
declare class Tool extends BaseResource {
|
|
289
|
-
private toolId;
|
|
290
|
-
constructor(options: ClientOptions, toolId: string);
|
|
291
|
-
/**
|
|
292
|
-
* Retrieves details about the tool
|
|
293
|
-
* @returns Promise containing tool details including description and schemas
|
|
294
|
-
*/
|
|
295
|
-
details(): Promise<GetToolResponse>;
|
|
296
|
-
/**
|
|
297
|
-
* Executes the tool with the provided parameters
|
|
298
|
-
* @param params - Parameters required for tool execution
|
|
299
|
-
* @returns Promise containing the tool execution results
|
|
300
|
-
*/
|
|
301
|
-
execute(params: {
|
|
302
|
-
data: any;
|
|
303
|
-
}): Promise<any>;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
declare class MastraClient extends BaseResource {
|
|
307
|
-
constructor(options: ClientOptions);
|
|
308
|
-
/**
|
|
309
|
-
* Retrieves all available agents
|
|
310
|
-
* @returns Promise containing map of agent IDs to agent details
|
|
311
|
-
*/
|
|
312
|
-
getAgents(): Promise<Record<string, GetAgentResponse>>;
|
|
313
|
-
/**
|
|
314
|
-
* Gets an agent instance by ID
|
|
315
|
-
* @param agentId - ID of the agent to retrieve
|
|
316
|
-
* @returns Agent instance
|
|
317
|
-
*/
|
|
318
|
-
getAgent(agentId: string): Agent;
|
|
319
|
-
/**
|
|
320
|
-
* Retrieves memory threads for a resource
|
|
321
|
-
* @param params - Parameters containing the resource ID
|
|
322
|
-
* @returns Promise containing array of memory threads
|
|
323
|
-
*/
|
|
324
|
-
getMemoryThreads(params: GetMemoryThreadParams): Promise<GetMemoryThreadResponse>;
|
|
325
|
-
/**
|
|
326
|
-
* Creates a new memory thread
|
|
327
|
-
* @param params - Parameters for creating the memory thread
|
|
328
|
-
* @returns Promise containing the created memory thread
|
|
329
|
-
*/
|
|
330
|
-
createMemoryThread(params: CreateMemoryThreadParams): Promise<CreateMemoryThreadResponse>;
|
|
331
|
-
/**
|
|
332
|
-
* Gets a memory thread instance by ID
|
|
333
|
-
* @param threadId - ID of the memory thread to retrieve
|
|
334
|
-
* @returns MemoryThread instance
|
|
335
|
-
*/
|
|
336
|
-
getMemoryThread(threadId: string, agentId: string): MemoryThread;
|
|
337
|
-
/**
|
|
338
|
-
* Saves messages to memory
|
|
339
|
-
* @param params - Parameters containing messages to save
|
|
340
|
-
* @returns Promise containing the saved messages
|
|
341
|
-
*/
|
|
342
|
-
saveMessageToMemory(params: SaveMessageToMemoryParams): Promise<SaveMessageToMemoryResponse>;
|
|
343
|
-
/**
|
|
344
|
-
* Gets the status of the memory system
|
|
345
|
-
* @returns Promise containing memory system status
|
|
346
|
-
*/
|
|
347
|
-
getMemoryStatus(agentId: string): Promise<{
|
|
348
|
-
result: boolean;
|
|
349
|
-
}>;
|
|
350
|
-
/**
|
|
351
|
-
* Retrieves all available tools
|
|
352
|
-
* @returns Promise containing map of tool IDs to tool details
|
|
353
|
-
*/
|
|
354
|
-
getTools(): Promise<Record<string, GetToolResponse>>;
|
|
355
|
-
/**
|
|
356
|
-
* Gets a tool instance by ID
|
|
357
|
-
* @param toolId - ID of the tool to retrieve
|
|
358
|
-
* @returns Tool instance
|
|
359
|
-
*/
|
|
360
|
-
getTool(toolId: string): Tool;
|
|
361
|
-
/**
|
|
362
|
-
* Retrieves all available workflows
|
|
363
|
-
* @returns Promise containing map of workflow IDs to workflow details
|
|
364
|
-
*/
|
|
365
|
-
getWorkflows(): Promise<Record<string, GetWorkflowResponse>>;
|
|
366
|
-
/**
|
|
367
|
-
* Gets a workflow instance by ID
|
|
368
|
-
* @param workflowId - ID of the workflow to retrieve
|
|
369
|
-
* @returns Workflow instance
|
|
370
|
-
*/
|
|
371
|
-
getWorkflow(workflowId: string): Workflow;
|
|
372
|
-
/**
|
|
373
|
-
* Gets a vector instance by name
|
|
374
|
-
* @param vectorName - Name of the vector to retrieve
|
|
375
|
-
* @returns Vector instance
|
|
376
|
-
*/
|
|
377
|
-
getVector(vectorName: string): Vector;
|
|
378
|
-
/**
|
|
379
|
-
* Retrieves logs
|
|
380
|
-
* @param params - Parameters for filtering logs
|
|
381
|
-
* @returns Promise containing array of log messages
|
|
382
|
-
*/
|
|
383
|
-
getLogs(params: GetLogsParams): Promise<GetLogsResponse>;
|
|
384
|
-
/**
|
|
385
|
-
* Gets logs for a specific run
|
|
386
|
-
* @param params - Parameters containing run ID to retrieve
|
|
387
|
-
* @returns Promise containing array of log messages
|
|
388
|
-
*/
|
|
389
|
-
getLogForRun(params: GetLogParams): Promise<GetLogsResponse>;
|
|
390
|
-
/**
|
|
391
|
-
* List of all log transports
|
|
392
|
-
* @returns Promise containing list of log transports
|
|
393
|
-
*/
|
|
394
|
-
getLogTransports(): Promise<{
|
|
395
|
-
transports: string[];
|
|
396
|
-
}>;
|
|
397
|
-
/**
|
|
398
|
-
* List of all traces (paged)
|
|
399
|
-
* @param params - Parameters for filtering traces
|
|
400
|
-
* @returns Promise containing telemetry data
|
|
401
|
-
*/
|
|
402
|
-
getTelemetry(params?: GetTelemetryParams): Promise<GetTelemetryResponse>;
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
export { type ClientOptions, type CreateIndexParams, type CreateMemoryThreadParams, type CreateMemoryThreadResponse, type GenerateParams, type GetAgentResponse, type GetEvalsByAgentIdResponse, type GetLogParams, type GetLogsParams, type GetLogsResponse, type GetMemoryThreadMessagesResponse, type GetMemoryThreadParams, type GetMemoryThreadResponse, type GetTelemetryParams, type GetTelemetryResponse, type GetToolResponse, type GetVectorIndexResponse, type GetWorkflowResponse, MastraClient, type QueryVectorParams, type QueryVectorResponse, type RequestFunction, type RequestOptions, type SaveMessageToMemoryParams, type SaveMessageToMemoryResponse, type StreamParams, type UpdateMemoryThreadParams, type UpsertVectorParams };
|