@mastra/client-js 0.0.0-default-storage-virtual-file-20250410035748 → 0.0.0-dynamic-model-router-20251009204130

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 (68) hide show
  1. package/CHANGELOG.md +2430 -2
  2. package/LICENSE.md +15 -0
  3. package/README.md +7 -8
  4. package/dist/client.d.ts +278 -0
  5. package/dist/client.d.ts.map +1 -0
  6. package/dist/example.d.ts +2 -0
  7. package/dist/example.d.ts.map +1 -0
  8. package/dist/index.cjs +2734 -160
  9. package/dist/index.cjs.map +1 -0
  10. package/dist/index.d.ts +5 -587
  11. package/dist/index.d.ts.map +1 -0
  12. package/dist/index.js +2734 -166
  13. package/dist/index.js.map +1 -0
  14. package/dist/resources/a2a.d.ts +41 -0
  15. package/dist/resources/a2a.d.ts.map +1 -0
  16. package/dist/resources/agent-builder.d.ts +160 -0
  17. package/dist/resources/agent-builder.d.ts.map +1 -0
  18. package/dist/resources/agent.d.ts +184 -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/mcp-tool.d.ts +28 -0
  25. package/dist/resources/mcp-tool.d.ts.map +1 -0
  26. package/dist/resources/memory-thread.d.ts +53 -0
  27. package/dist/resources/memory-thread.d.ts.map +1 -0
  28. package/dist/resources/network-memory-thread.d.ts +47 -0
  29. package/dist/resources/network-memory-thread.d.ts.map +1 -0
  30. package/dist/resources/observability.d.ts +35 -0
  31. package/dist/resources/observability.d.ts.map +1 -0
  32. package/dist/resources/tool.d.ts +24 -0
  33. package/dist/resources/tool.d.ts.map +1 -0
  34. package/dist/resources/vector.d.ts +51 -0
  35. package/dist/resources/vector.d.ts.map +1 -0
  36. package/dist/resources/workflow.d.ts +269 -0
  37. package/dist/resources/workflow.d.ts.map +1 -0
  38. package/dist/tools.d.ts +22 -0
  39. package/dist/tools.d.ts.map +1 -0
  40. package/dist/types.d.ts +484 -0
  41. package/dist/types.d.ts.map +1 -0
  42. package/dist/utils/index.d.ts +5 -0
  43. package/dist/utils/index.d.ts.map +1 -0
  44. package/dist/utils/process-client-tools.d.ts +3 -0
  45. package/dist/utils/process-client-tools.d.ts.map +1 -0
  46. package/dist/utils/process-mastra-stream.d.ts +11 -0
  47. package/dist/utils/process-mastra-stream.d.ts.map +1 -0
  48. package/dist/utils/zod-to-json-schema.d.ts +3 -0
  49. package/dist/utils/zod-to-json-schema.d.ts.map +1 -0
  50. package/package.json +40 -18
  51. package/LICENSE +0 -44
  52. package/dist/index.d.cts +0 -587
  53. package/eslint.config.js +0 -6
  54. package/src/client.ts +0 -223
  55. package/src/example.ts +0 -65
  56. package/src/index.test.ts +0 -710
  57. package/src/index.ts +0 -2
  58. package/src/resources/agent.ts +0 -205
  59. package/src/resources/base.ts +0 -70
  60. package/src/resources/index.ts +0 -7
  61. package/src/resources/memory-thread.ts +0 -60
  62. package/src/resources/network.ts +0 -92
  63. package/src/resources/tool.ts +0 -32
  64. package/src/resources/vector.ts +0 -83
  65. package/src/resources/workflow.ts +0 -215
  66. package/src/types.ts +0 -224
  67. package/tsconfig.json +0 -5
  68. 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.cts DELETED
@@ -1,587 +0,0 @@
1
- import { CoreMessage, AiMessageType, StorageThreadType, MessageType, StepAction, StepGraph, WorkflowRunResult as WorkflowRunResult$1, QueryResult, BaseLogMessage, GenerateReturn } from '@mastra/core';
2
- import { JSONSchema7 } from 'json-schema';
3
- import { ZodSchema } from 'zod';
4
- import { processDataStream } from '@ai-sdk/ui-utils';
5
- import { AgentGenerateOptions, AgentStreamOptions } from '@mastra/core/agent';
6
-
7
- interface ClientOptions {
8
- /** Base URL for API requests */
9
- baseUrl: string;
10
- /** Number of retry attempts for failed requests */
11
- retries?: number;
12
- /** Initial backoff time in milliseconds between retries */
13
- backoffMs?: number;
14
- /** Maximum backoff time in milliseconds between retries */
15
- maxBackoffMs?: number;
16
- /** Custom headers to include with requests */
17
- headers?: Record<string, string>;
18
- }
19
- interface RequestOptions {
20
- method?: string;
21
- headers?: Record<string, string>;
22
- body?: any;
23
- stream?: boolean;
24
- signal?: AbortSignal;
25
- }
26
- interface GetAgentResponse {
27
- name: string;
28
- instructions: string;
29
- tools: Record<string, GetToolResponse>;
30
- provider: string;
31
- modelId: string;
32
- }
33
- type GenerateParams<T extends JSONSchema7 | ZodSchema | undefined = undefined> = {
34
- messages: string | string[] | CoreMessage[] | AiMessageType[];
35
- } & Partial<AgentGenerateOptions<T>>;
36
- type StreamParams<T extends JSONSchema7 | ZodSchema | undefined = undefined> = {
37
- messages: string | string[] | CoreMessage[] | AiMessageType[];
38
- } & Omit<AgentStreamOptions<T>, 'onFinish' | 'onStepFinish' | 'telemetry'>;
39
- interface GetEvalsByAgentIdResponse extends GetAgentResponse {
40
- evals: any[];
41
- }
42
- interface GetToolResponse {
43
- id: string;
44
- description: string;
45
- inputSchema: string;
46
- outputSchema: string;
47
- }
48
- interface GetWorkflowResponse {
49
- name: string;
50
- triggerSchema: string;
51
- steps: Record<string, StepAction<any, any, any, any>>;
52
- stepGraph: StepGraph;
53
- stepSubscriberGraph: Record<string, StepGraph>;
54
- workflowId?: string;
55
- }
56
- type WorkflowRunResult = {
57
- activePaths: Record<string, {
58
- status: string;
59
- suspendPayload?: any;
60
- stepPath: string[];
61
- }>;
62
- results: WorkflowRunResult$1<any, any, any>['results'];
63
- timestamp: number;
64
- runId: string;
65
- };
66
- interface UpsertVectorParams {
67
- indexName: string;
68
- vectors: number[][];
69
- metadata?: Record<string, any>[];
70
- ids?: string[];
71
- }
72
- interface CreateIndexParams {
73
- indexName: string;
74
- dimension: number;
75
- metric?: 'cosine' | 'euclidean' | 'dotproduct';
76
- }
77
- interface QueryVectorParams {
78
- indexName: string;
79
- queryVector: number[];
80
- topK?: number;
81
- filter?: Record<string, any>;
82
- includeVector?: boolean;
83
- }
84
- interface QueryVectorResponse {
85
- results: QueryResult[];
86
- }
87
- interface GetVectorIndexResponse {
88
- dimension: number;
89
- metric: 'cosine' | 'euclidean' | 'dotproduct';
90
- count: number;
91
- }
92
- interface SaveMessageToMemoryParams {
93
- messages: MessageType[];
94
- agentId: string;
95
- }
96
- type SaveMessageToMemoryResponse = MessageType[];
97
- interface CreateMemoryThreadParams {
98
- title: string;
99
- metadata: Record<string, any>;
100
- resourceid: string;
101
- threadId: string;
102
- agentId: string;
103
- }
104
- type CreateMemoryThreadResponse = StorageThreadType;
105
- interface GetMemoryThreadParams {
106
- resourceId: string;
107
- agentId: string;
108
- }
109
- type GetMemoryThreadResponse = StorageThreadType[];
110
- interface UpdateMemoryThreadParams {
111
- title: string;
112
- metadata: Record<string, any>;
113
- resourceid: string;
114
- }
115
- interface GetMemoryThreadMessagesResponse {
116
- messages: CoreMessage[];
117
- uiMessages: AiMessageType[];
118
- }
119
- interface GetLogsParams {
120
- transportId: string;
121
- }
122
- interface GetLogParams {
123
- runId: string;
124
- transportId: string;
125
- }
126
- type GetLogsResponse = BaseLogMessage[];
127
- type RequestFunction = (path: string, options?: RequestOptions) => Promise<any>;
128
- type SpanStatus = {
129
- code: number;
130
- };
131
- type SpanOther = {
132
- droppedAttributesCount: number;
133
- droppedEventsCount: number;
134
- droppedLinksCount: number;
135
- };
136
- type SpanEventAttributes = {
137
- key: string;
138
- value: {
139
- [key: string]: string | number | boolean | null;
140
- };
141
- };
142
- type SpanEvent = {
143
- attributes: SpanEventAttributes[];
144
- name: string;
145
- timeUnixNano: string;
146
- droppedAttributesCount: number;
147
- };
148
- type Span = {
149
- id: string;
150
- parentSpanId: string | null;
151
- traceId: string;
152
- name: string;
153
- scope: string;
154
- kind: number;
155
- status: SpanStatus;
156
- events: SpanEvent[];
157
- links: any[];
158
- attributes: Record<string, string | number | boolean | null>;
159
- startTime: number;
160
- endTime: number;
161
- duration: number;
162
- other: SpanOther;
163
- createdAt: string;
164
- };
165
- interface GetTelemetryResponse {
166
- traces: {
167
- traces: Span[];
168
- };
169
- }
170
- interface GetTelemetryParams {
171
- name?: string;
172
- scope?: string;
173
- page?: number;
174
- perPage?: number;
175
- attribute?: Record<string, string>;
176
- }
177
- interface GetNetworkResponse {
178
- name: string;
179
- instructions: string;
180
- agents: Array<{
181
- name: string;
182
- provider: string;
183
- modelId: string;
184
- }>;
185
- routingModel: {
186
- provider: string;
187
- modelId: string;
188
- };
189
- state?: Record<string, any>;
190
- }
191
-
192
- declare class BaseResource {
193
- readonly options: ClientOptions;
194
- constructor(options: ClientOptions);
195
- /**
196
- * Makes an HTTP request to the API with retries and exponential backoff
197
- * @param path - The API endpoint path
198
- * @param options - Optional request configuration
199
- * @returns Promise containing the response data
200
- */
201
- request<T>(path: string, options?: RequestOptions): Promise<T>;
202
- }
203
-
204
- declare class AgentVoice extends BaseResource {
205
- private agentId;
206
- constructor(options: ClientOptions, agentId: string);
207
- /**
208
- * Convert text to speech using the agent's voice provider
209
- * @param text - Text to convert to speech
210
- * @param options - Optional provider-specific options for speech generation
211
- * @returns Promise containing the audio data
212
- */
213
- speak(text: string, options?: {
214
- speaker?: string;
215
- [key: string]: any;
216
- }): Promise<Response>;
217
- /**
218
- * Convert speech to text using the agent's voice provider
219
- * @param audio - Audio data to transcribe
220
- * @param options - Optional provider-specific options
221
- * @returns Promise containing the transcribed text
222
- */
223
- listen(audio: Blob, options?: Record<string, any>): Promise<Response>;
224
- /**
225
- * Get available speakers for the agent's voice provider
226
- * @returns Promise containing list of available speakers
227
- */
228
- getSpeakers(): Promise<Array<{
229
- voiceId: string;
230
- [key: string]: any;
231
- }>>;
232
- }
233
- declare class Agent extends BaseResource {
234
- private agentId;
235
- readonly voice: AgentVoice;
236
- constructor(options: ClientOptions, agentId: string);
237
- /**
238
- * Retrieves details about the agent
239
- * @returns Promise containing agent details including model and instructions
240
- */
241
- details(): Promise<GetAgentResponse>;
242
- /**
243
- * Generates a response from the agent
244
- * @param params - Generation parameters including prompt
245
- * @returns Promise containing the generated response
246
- */
247
- generate<T extends JSONSchema7 | ZodSchema | undefined = undefined>(params: GenerateParams<T>): Promise<GenerateReturn<T>>;
248
- /**
249
- * Streams a response from the agent
250
- * @param params - Stream parameters including prompt
251
- * @returns Promise containing the enhanced Response object with processDataStream method
252
- */
253
- stream<T extends JSONSchema7 | ZodSchema | undefined = undefined>(params: StreamParams<T>): Promise<Response & {
254
- processDataStream: (options?: Omit<Parameters<typeof processDataStream>[0], 'stream'>) => Promise<void>;
255
- }>;
256
- /**
257
- * Gets details about a specific tool available to the agent
258
- * @param toolId - ID of the tool to retrieve
259
- * @returns Promise containing tool details
260
- */
261
- getTool(toolId: string): Promise<GetToolResponse>;
262
- /**
263
- * Retrieves evaluation results for the agent
264
- * @returns Promise containing agent evaluations
265
- */
266
- evals(): Promise<GetEvalsByAgentIdResponse>;
267
- /**
268
- * Retrieves live evaluation results for the agent
269
- * @returns Promise containing live agent evaluations
270
- */
271
- liveEvals(): Promise<GetEvalsByAgentIdResponse>;
272
- }
273
-
274
- declare class Network extends BaseResource {
275
- private networkId;
276
- constructor(options: ClientOptions, networkId: string);
277
- /**
278
- * Retrieves details about the network
279
- * @returns Promise containing network details
280
- */
281
- details(): Promise<GetNetworkResponse>;
282
- /**
283
- * Generates a response from the agent
284
- * @param params - Generation parameters including prompt
285
- * @returns Promise containing the generated response
286
- */
287
- generate<T extends JSONSchema7 | ZodSchema | undefined = undefined>(params: GenerateParams<T>): Promise<GenerateReturn<T>>;
288
- /**
289
- * Streams a response from the agent
290
- * @param params - Stream parameters including prompt
291
- * @returns Promise containing the enhanced Response object with processDataStream method
292
- */
293
- stream<T extends JSONSchema7 | ZodSchema | undefined = undefined>(params: StreamParams<T>): Promise<Response & {
294
- processDataStream: (options?: Omit<Parameters<typeof processDataStream>[0], 'stream'>) => Promise<void>;
295
- }>;
296
- }
297
-
298
- declare class MemoryThread extends BaseResource {
299
- private threadId;
300
- private agentId;
301
- constructor(options: ClientOptions, threadId: string, agentId: string);
302
- /**
303
- * Retrieves the memory thread details
304
- * @returns Promise containing thread details including title and metadata
305
- */
306
- get(): Promise<StorageThreadType>;
307
- /**
308
- * Updates the memory thread properties
309
- * @param params - Update parameters including title and metadata
310
- * @returns Promise containing updated thread details
311
- */
312
- update(params: UpdateMemoryThreadParams): Promise<StorageThreadType>;
313
- /**
314
- * Deletes the memory thread
315
- * @returns Promise containing deletion result
316
- */
317
- delete(): Promise<{
318
- result: string;
319
- }>;
320
- /**
321
- * Retrieves messages associated with the thread
322
- * @returns Promise containing thread messages and UI messages
323
- */
324
- getMessages(): Promise<GetMemoryThreadMessagesResponse>;
325
- }
326
-
327
- declare class Vector extends BaseResource {
328
- private vectorName;
329
- constructor(options: ClientOptions, vectorName: string);
330
- /**
331
- * Retrieves details about a specific vector index
332
- * @param indexName - Name of the index to get details for
333
- * @returns Promise containing vector index details
334
- */
335
- details(indexName: string): Promise<GetVectorIndexResponse>;
336
- /**
337
- * Deletes a vector index
338
- * @param indexName - Name of the index to delete
339
- * @returns Promise indicating deletion success
340
- */
341
- delete(indexName: string): Promise<{
342
- success: boolean;
343
- }>;
344
- /**
345
- * Retrieves a list of all available indexes
346
- * @returns Promise containing array of index names
347
- */
348
- getIndexes(): Promise<{
349
- indexes: string[];
350
- }>;
351
- /**
352
- * Creates a new vector index
353
- * @param params - Parameters for index creation including dimension and metric
354
- * @returns Promise indicating creation success
355
- */
356
- createIndex(params: CreateIndexParams): Promise<{
357
- success: boolean;
358
- }>;
359
- /**
360
- * Upserts vectors into an index
361
- * @param params - Parameters containing vectors, metadata, and optional IDs
362
- * @returns Promise containing array of vector IDs
363
- */
364
- upsert(params: UpsertVectorParams): Promise<string[]>;
365
- /**
366
- * Queries vectors in an index
367
- * @param params - Query parameters including query vector and search options
368
- * @returns Promise containing query results
369
- */
370
- query(params: QueryVectorParams): Promise<QueryVectorResponse>;
371
- }
372
-
373
- declare class Workflow extends BaseResource {
374
- private workflowId;
375
- constructor(options: ClientOptions, workflowId: string);
376
- /**
377
- * Retrieves details about the workflow
378
- * @returns Promise containing workflow details including steps and graphs
379
- */
380
- details(): Promise<GetWorkflowResponse>;
381
- /**
382
- * @deprecated Use `startAsync` instead
383
- * Executes the workflow with the provided parameters
384
- * @param params - Parameters required for workflow execution
385
- * @returns Promise containing the workflow execution results
386
- */
387
- execute(params: Record<string, any>): Promise<WorkflowRunResult>;
388
- /**
389
- * Creates a new workflow run
390
- * @returns Promise containing the generated run ID
391
- */
392
- createRun(params?: {
393
- runId?: string;
394
- }): Promise<{
395
- runId: string;
396
- }>;
397
- /**
398
- * Starts a workflow run synchronously without waiting for the workflow to complete
399
- * @param params - Object containing the runId and triggerData
400
- * @returns Promise containing success message
401
- */
402
- start(params: {
403
- runId: string;
404
- triggerData: Record<string, any>;
405
- }): Promise<{
406
- message: string;
407
- }>;
408
- /**
409
- * Resumes a suspended workflow step synchronously without waiting for the workflow to complete
410
- * @param stepId - ID of the step to resume
411
- * @param runId - ID of the workflow run
412
- * @param context - Context to resume the workflow with
413
- * @returns Promise containing the workflow resume results
414
- */
415
- resume({ stepId, runId, context, }: {
416
- stepId: string;
417
- runId: string;
418
- context: Record<string, any>;
419
- }): Promise<{
420
- message: string;
421
- }>;
422
- /**
423
- * Starts a workflow run asynchronously and returns a promise that resolves when the workflow is complete
424
- * @param params - Object containing the optional runId and triggerData
425
- * @returns Promise containing the workflow execution results
426
- */
427
- startAsync(params: {
428
- runId?: string;
429
- triggerData: Record<string, any>;
430
- }): Promise<WorkflowRunResult>;
431
- /**
432
- * Resumes a suspended workflow step asynchronously and returns a promise that resolves when the workflow is complete
433
- * @param params - Object containing the runId, stepId, and context
434
- * @returns Promise containing the workflow resume results
435
- */
436
- resumeAsync(params: {
437
- runId: string;
438
- stepId: string;
439
- context: Record<string, any>;
440
- }): Promise<WorkflowRunResult>;
441
- /**
442
- * Creates an async generator that processes a readable stream and yields records
443
- * separated by the Record Separator character (\x1E)
444
- *
445
- * @param stream - The readable stream to process
446
- * @returns An async generator that yields parsed records
447
- */
448
- private streamProcessor;
449
- /**
450
- * Watches workflow transitions in real-time
451
- * @param runId - Optional run ID to filter the watch stream
452
- * @returns AsyncGenerator that yields parsed records from the workflow watch stream
453
- */
454
- watch({ runId }: {
455
- runId?: string;
456
- }, onRecord: (record: WorkflowRunResult) => void): Promise<void>;
457
- }
458
-
459
- declare class Tool extends BaseResource {
460
- private toolId;
461
- constructor(options: ClientOptions, toolId: string);
462
- /**
463
- * Retrieves details about the tool
464
- * @returns Promise containing tool details including description and schemas
465
- */
466
- details(): Promise<GetToolResponse>;
467
- /**
468
- * Executes the tool with the provided parameters
469
- * @param params - Parameters required for tool execution
470
- * @returns Promise containing the tool execution results
471
- */
472
- execute(params: {
473
- data: any;
474
- }): Promise<any>;
475
- }
476
-
477
- declare class MastraClient extends BaseResource {
478
- constructor(options: ClientOptions);
479
- /**
480
- * Retrieves all available agents
481
- * @returns Promise containing map of agent IDs to agent details
482
- */
483
- getAgents(): Promise<Record<string, GetAgentResponse>>;
484
- /**
485
- * Gets an agent instance by ID
486
- * @param agentId - ID of the agent to retrieve
487
- * @returns Agent instance
488
- */
489
- getAgent(agentId: string): Agent;
490
- /**
491
- * Retrieves memory threads for a resource
492
- * @param params - Parameters containing the resource ID
493
- * @returns Promise containing array of memory threads
494
- */
495
- getMemoryThreads(params: GetMemoryThreadParams): Promise<GetMemoryThreadResponse>;
496
- /**
497
- * Creates a new memory thread
498
- * @param params - Parameters for creating the memory thread
499
- * @returns Promise containing the created memory thread
500
- */
501
- createMemoryThread(params: CreateMemoryThreadParams): Promise<CreateMemoryThreadResponse>;
502
- /**
503
- * Gets a memory thread instance by ID
504
- * @param threadId - ID of the memory thread to retrieve
505
- * @returns MemoryThread instance
506
- */
507
- getMemoryThread(threadId: string, agentId: string): MemoryThread;
508
- /**
509
- * Saves messages to memory
510
- * @param params - Parameters containing messages to save
511
- * @returns Promise containing the saved messages
512
- */
513
- saveMessageToMemory(params: SaveMessageToMemoryParams): Promise<SaveMessageToMemoryResponse>;
514
- /**
515
- * Gets the status of the memory system
516
- * @returns Promise containing memory system status
517
- */
518
- getMemoryStatus(agentId: string): Promise<{
519
- result: boolean;
520
- }>;
521
- /**
522
- * Retrieves all available tools
523
- * @returns Promise containing map of tool IDs to tool details
524
- */
525
- getTools(): Promise<Record<string, GetToolResponse>>;
526
- /**
527
- * Gets a tool instance by ID
528
- * @param toolId - ID of the tool to retrieve
529
- * @returns Tool instance
530
- */
531
- getTool(toolId: string): Tool;
532
- /**
533
- * Retrieves all available workflows
534
- * @returns Promise containing map of workflow IDs to workflow details
535
- */
536
- getWorkflows(): Promise<Record<string, GetWorkflowResponse>>;
537
- /**
538
- * Gets a workflow instance by ID
539
- * @param workflowId - ID of the workflow to retrieve
540
- * @returns Workflow instance
541
- */
542
- getWorkflow(workflowId: string): Workflow;
543
- /**
544
- * Gets a vector instance by name
545
- * @param vectorName - Name of the vector to retrieve
546
- * @returns Vector instance
547
- */
548
- getVector(vectorName: string): Vector;
549
- /**
550
- * Retrieves logs
551
- * @param params - Parameters for filtering logs
552
- * @returns Promise containing array of log messages
553
- */
554
- getLogs(params: GetLogsParams): Promise<GetLogsResponse>;
555
- /**
556
- * Gets logs for a specific run
557
- * @param params - Parameters containing run ID to retrieve
558
- * @returns Promise containing array of log messages
559
- */
560
- getLogForRun(params: GetLogParams): Promise<GetLogsResponse>;
561
- /**
562
- * List of all log transports
563
- * @returns Promise containing list of log transports
564
- */
565
- getLogTransports(): Promise<{
566
- transports: string[];
567
- }>;
568
- /**
569
- * List of all traces (paged)
570
- * @param params - Parameters for filtering traces
571
- * @returns Promise containing telemetry data
572
- */
573
- getTelemetry(params?: GetTelemetryParams): Promise<GetTelemetryResponse>;
574
- /**
575
- * Retrieves all available networks
576
- * @returns Promise containing map of network IDs to network details
577
- */
578
- getNetworks(): Promise<Record<string, GetNetworkResponse>>;
579
- /**
580
- * Gets a network instance by ID
581
- * @param networkId - ID of the network to retrieve
582
- * @returns Network instance
583
- */
584
- getNetwork(networkId: string): Network;
585
- }
586
-
587
- 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 GetNetworkResponse, 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, type WorkflowRunResult };
package/eslint.config.js DELETED
@@ -1,6 +0,0 @@
1
- import { createConfig } from '@internal/lint/eslint';
2
-
3
- const config = await createConfig();
4
-
5
- /** @type {import("eslint").Linter.Config[]} */
6
- export default [...config];