@mastra/client-js 0.16.9-alpha.0 → 1.0.0-beta.0
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 +280 -47
- package/README.md +8 -10
- package/dist/client.d.ts +52 -77
- package/dist/client.d.ts.map +1 -1
- package/dist/index.cjs +404 -621
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +404 -621
- package/dist/index.js.map +1 -1
- package/dist/resources/agent-builder.d.ts +49 -34
- package/dist/resources/agent-builder.d.ts.map +1 -1
- package/dist/resources/agent.d.ts +17 -43
- package/dist/resources/agent.d.ts.map +1 -1
- package/dist/resources/mcp-tool.d.ts +5 -5
- package/dist/resources/memory-thread.d.ts +14 -22
- package/dist/resources/memory-thread.d.ts.map +1 -1
- package/dist/resources/observability.d.ts +8 -8
- package/dist/resources/observability.d.ts.map +1 -1
- package/dist/resources/tool.d.ts +4 -4
- package/dist/resources/vector.d.ts +5 -5
- package/dist/resources/workflow.d.ts +32 -97
- package/dist/resources/workflow.d.ts.map +1 -1
- package/dist/types.d.ts +92 -125
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/index.d.ts +6 -6
- package/package.json +6 -10
- package/dist/resources/network-memory-thread.d.ts +0 -47
- package/dist/resources/network-memory-thread.d.ts.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RequestContext } from '@mastra/core/request-context';
|
|
2
2
|
import type { WorkflowInfo } from '@mastra/core/workflows';
|
|
3
3
|
import type { ClientOptions } from '../types.js';
|
|
4
4
|
import { BaseResource } from './base.js';
|
|
5
5
|
export interface AgentBuilderActionRequest {
|
|
6
6
|
/** Input data specific to the workflow type */
|
|
7
7
|
inputData: any;
|
|
8
|
-
/**
|
|
9
|
-
|
|
8
|
+
/** Request context for the action execution */
|
|
9
|
+
requestContext?: RequestContext;
|
|
10
10
|
}
|
|
11
11
|
export interface AgentBuilderActionResult {
|
|
12
12
|
success: boolean;
|
|
@@ -26,19 +26,14 @@ export declare class AgentBuilder extends BaseResource {
|
|
|
26
26
|
constructor(options: ClientOptions, actionId: string);
|
|
27
27
|
transformWorkflowResult(result: any): AgentBuilderActionResult;
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
30
|
-
* @throws {Error} Always throws an error directing users to use createRunAsync()
|
|
29
|
+
* Creates a transform stream that parses binary chunks into JSON records.
|
|
31
30
|
*/
|
|
32
|
-
|
|
33
|
-
runId?: string;
|
|
34
|
-
}): Promise<{
|
|
35
|
-
runId: string;
|
|
36
|
-
}>;
|
|
31
|
+
private createRecordParserTransform;
|
|
37
32
|
/**
|
|
38
33
|
* Creates a new agent builder action run and returns the runId.
|
|
39
34
|
* This calls `/api/agent-builder/:actionId/create-run`.
|
|
40
35
|
*/
|
|
41
|
-
|
|
36
|
+
createRun(params?: {
|
|
42
37
|
runId?: string;
|
|
43
38
|
}): Promise<{
|
|
44
39
|
runId: string;
|
|
@@ -62,7 +57,7 @@ export declare class AgentBuilder extends BaseResource {
|
|
|
62
57
|
resume(params: {
|
|
63
58
|
step?: string | string[];
|
|
64
59
|
resumeData?: unknown;
|
|
65
|
-
|
|
60
|
+
requestContext?: RequestContext;
|
|
66
61
|
}, runId: string): Promise<{
|
|
67
62
|
message: string;
|
|
68
63
|
}>;
|
|
@@ -73,7 +68,7 @@ export declare class AgentBuilder extends BaseResource {
|
|
|
73
68
|
resumeAsync(params: {
|
|
74
69
|
step?: string | string[];
|
|
75
70
|
resumeData?: unknown;
|
|
76
|
-
|
|
71
|
+
requestContext?: RequestContext;
|
|
77
72
|
}, runId: string): Promise<AgentBuilderActionResult>;
|
|
78
73
|
/**
|
|
79
74
|
* Creates an async generator that processes a readable stream and yields action records
|
|
@@ -100,18 +95,49 @@ export declare class AgentBuilder extends BaseResource {
|
|
|
100
95
|
payload: any;
|
|
101
96
|
}>>;
|
|
102
97
|
/**
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
* This calls `/api/agent-builder/:actionId/
|
|
98
|
+
* Observes an existing agent builder action run stream.
|
|
99
|
+
* Replays cached execution from the beginning, then continues with live stream.
|
|
100
|
+
* This is the recommended method for recovery after page refresh/hot reload.
|
|
101
|
+
* This calls `/api/agent-builder/:actionId/observe` (which delegates to observeStreamVNext).
|
|
102
|
+
*/
|
|
103
|
+
observeStream(params: {
|
|
104
|
+
runId: string;
|
|
105
|
+
}): Promise<import("stream/web").ReadableStream<{
|
|
106
|
+
type: string;
|
|
107
|
+
payload: any;
|
|
108
|
+
}>>;
|
|
109
|
+
/**
|
|
110
|
+
* Observes an existing agent builder action run stream using VNext streaming API.
|
|
111
|
+
* Replays cached execution from the beginning, then continues with live stream.
|
|
112
|
+
* This calls `/api/agent-builder/:actionId/observe-streamVNext`.
|
|
107
113
|
*/
|
|
108
|
-
|
|
114
|
+
observeStreamVNext(params: {
|
|
109
115
|
runId: string;
|
|
110
|
-
|
|
111
|
-
}, onRecord: (record: {
|
|
116
|
+
}): Promise<import("stream/web").ReadableStream<{
|
|
112
117
|
type: string;
|
|
113
118
|
payload: any;
|
|
114
|
-
}
|
|
119
|
+
}>>;
|
|
120
|
+
/**
|
|
121
|
+
* Observes an existing agent builder action run stream using legacy streaming API.
|
|
122
|
+
* Replays cached execution from the beginning, then continues with live stream.
|
|
123
|
+
* This calls `/api/agent-builder/:actionId/observe-stream-legacy`.
|
|
124
|
+
*/
|
|
125
|
+
observeStreamLegacy(params: {
|
|
126
|
+
runId: string;
|
|
127
|
+
}): Promise<import("stream/web").ReadableStream<{
|
|
128
|
+
type: string;
|
|
129
|
+
payload: any;
|
|
130
|
+
}>>;
|
|
131
|
+
/**
|
|
132
|
+
* Resumes a suspended agent builder action and streams the results.
|
|
133
|
+
* This calls `/api/agent-builder/:actionId/resume-stream`.
|
|
134
|
+
*/
|
|
135
|
+
resumeStream(params: {
|
|
136
|
+
runId: string;
|
|
137
|
+
step: string | string[];
|
|
138
|
+
resumeData?: unknown;
|
|
139
|
+
requestContext?: RequestContext;
|
|
140
|
+
}): Promise<ReadableStream>;
|
|
115
141
|
/**
|
|
116
142
|
* Gets a specific action run by its ID.
|
|
117
143
|
* This calls `/api/agent-builder/:actionId/runs/:runId`.
|
|
@@ -129,8 +155,8 @@ export declare class AgentBuilder extends BaseResource {
|
|
|
129
155
|
runs(params?: {
|
|
130
156
|
fromDate?: Date;
|
|
131
157
|
toDate?: Date;
|
|
132
|
-
|
|
133
|
-
|
|
158
|
+
perPage?: number;
|
|
159
|
+
page?: number;
|
|
134
160
|
resourceId?: string;
|
|
135
161
|
}): Promise<unknown>;
|
|
136
162
|
/**
|
|
@@ -145,16 +171,5 @@ export declare class AgentBuilder extends BaseResource {
|
|
|
145
171
|
cancelRun(runId: string): Promise<{
|
|
146
172
|
message: string;
|
|
147
173
|
}>;
|
|
148
|
-
/**
|
|
149
|
-
* Sends an event to an agent builder action run.
|
|
150
|
-
* This calls `/api/agent-builder/:actionId/runs/:runId/send-event`.
|
|
151
|
-
*/
|
|
152
|
-
sendRunEvent(params: {
|
|
153
|
-
runId: string;
|
|
154
|
-
event: string;
|
|
155
|
-
data: unknown;
|
|
156
|
-
}): Promise<{
|
|
157
|
-
message: string;
|
|
158
|
-
}>;
|
|
159
174
|
}
|
|
160
175
|
//# sourceMappingURL=agent-builder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-builder.d.ts","sourceRoot":"","sources":["../../src/resources/agent-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAItC,MAAM,WAAW,yBAAyB;IACxC,+CAA+C;IAC/C,SAAS,EAAE,GAAG,CAAC;IACf,+CAA+C;IAC/C,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AM,CAAA;KAAE,CAAC;CAM7D"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { processDataStream } from '@ai-sdk/ui-utils';
|
|
2
2
|
import type { MessageListInput } from '@mastra/core/agent/message-list';
|
|
3
3
|
import type { GenerateReturn } from '@mastra/core/llm';
|
|
4
|
-
import type {
|
|
4
|
+
import type { RequestContext } from '@mastra/core/request-context';
|
|
5
5
|
import type { OutputSchema, MastraModelOutput } from '@mastra/core/stream';
|
|
6
6
|
import type { JSONSchema7 } from 'json-schema';
|
|
7
7
|
import type { ZodType } from 'zod';
|
|
8
|
-
import type { GenerateLegacyParams, GetAgentResponse,
|
|
8
|
+
import type { GenerateLegacyParams, GetAgentResponse, GetToolResponse, ClientOptions, StreamParams, StreamLegacyParams, UpdateModelParams, UpdateModelInModelListParams, ReorderModelListParams, NetworkStreamParams } from '../types.js';
|
|
9
9
|
import { processMastraNetworkStream, processMastraStream } from '../utils/process-mastra-stream.js';
|
|
10
10
|
import { BaseResource } from './base.js';
|
|
11
11
|
export declare class AgentVoice extends BaseResource {
|
|
@@ -32,21 +32,21 @@ export declare class AgentVoice extends BaseResource {
|
|
|
32
32
|
}>;
|
|
33
33
|
/**
|
|
34
34
|
* Get available speakers for the agent's voice provider
|
|
35
|
-
* @param
|
|
36
|
-
* @param
|
|
35
|
+
* @param requestContext - Optional request context to pass as query parameter
|
|
36
|
+
* @param requestContext - Optional request context to pass as query parameter
|
|
37
37
|
* @returns Promise containing list of available speakers
|
|
38
38
|
*/
|
|
39
|
-
getSpeakers(
|
|
39
|
+
getSpeakers(requestContext?: RequestContext | Record<string, any>): Promise<Array<{
|
|
40
40
|
voiceId: string;
|
|
41
41
|
[key: string]: any;
|
|
42
42
|
}>>;
|
|
43
43
|
/**
|
|
44
44
|
* Get the listener configuration for the agent's voice provider
|
|
45
|
-
* @param
|
|
46
|
-
* @param
|
|
45
|
+
* @param requestContext - Optional request context to pass as query parameter
|
|
46
|
+
* @param requestContext - Optional request context to pass as query parameter
|
|
47
47
|
* @returns Promise containing a check if the agent has listening capabilities
|
|
48
48
|
*/
|
|
49
|
-
getListener(
|
|
49
|
+
getListener(requestContext?: RequestContext | Record<string, any>): Promise<{
|
|
50
50
|
enabled: boolean;
|
|
51
51
|
}>;
|
|
52
52
|
}
|
|
@@ -56,10 +56,14 @@ export declare class Agent extends BaseResource {
|
|
|
56
56
|
constructor(options: ClientOptions, agentId: string);
|
|
57
57
|
/**
|
|
58
58
|
* Retrieves details about the agent
|
|
59
|
-
* @param
|
|
59
|
+
* @param requestContext - Optional request context to pass as query parameter
|
|
60
60
|
* @returns Promise containing agent details including model and instructions
|
|
61
61
|
*/
|
|
62
|
-
details(
|
|
62
|
+
details(requestContext?: RequestContext | Record<string, any>): Promise<GetAgentResponse>;
|
|
63
|
+
enhanceInstructions(instructions: string, comment: string): Promise<{
|
|
64
|
+
explanation: string;
|
|
65
|
+
new_prompt: string;
|
|
66
|
+
}>;
|
|
63
67
|
/**
|
|
64
68
|
* Generates a response from the agent
|
|
65
69
|
* @param params - Generation parameters including prompt
|
|
@@ -128,10 +132,10 @@ export declare class Agent extends BaseResource {
|
|
|
128
132
|
/**
|
|
129
133
|
* Gets details about a specific tool available to the agent
|
|
130
134
|
* @param toolId - ID of the tool to retrieve
|
|
131
|
-
* @param
|
|
135
|
+
* @param requestContext - Optional request context to pass as query parameter
|
|
132
136
|
* @returns Promise containing tool details
|
|
133
137
|
*/
|
|
134
|
-
getTool(toolId: string,
|
|
138
|
+
getTool(toolId: string, requestContext?: RequestContext | Record<string, any>): Promise<GetToolResponse>;
|
|
135
139
|
/**
|
|
136
140
|
* Executes a tool for the agent
|
|
137
141
|
* @param toolId - ID of the tool to execute
|
|
@@ -140,20 +144,8 @@ export declare class Agent extends BaseResource {
|
|
|
140
144
|
*/
|
|
141
145
|
executeTool(toolId: string, params: {
|
|
142
146
|
data: any;
|
|
143
|
-
|
|
147
|
+
requestContext?: RequestContext | Record<string, any>;
|
|
144
148
|
}): Promise<any>;
|
|
145
|
-
/**
|
|
146
|
-
* Retrieves evaluation results for the agent
|
|
147
|
-
* @param runtimeContext - Optional runtime context to pass as query parameter
|
|
148
|
-
* @returns Promise containing agent evaluations
|
|
149
|
-
*/
|
|
150
|
-
evals(runtimeContext?: RuntimeContext | Record<string, any>): Promise<GetEvalsByAgentIdResponse>;
|
|
151
|
-
/**
|
|
152
|
-
* Retrieves live evaluation results for the agent
|
|
153
|
-
* @param runtimeContext - Optional runtime context to pass as query parameter
|
|
154
|
-
* @returns Promise containing live agent evaluations
|
|
155
|
-
*/
|
|
156
|
-
liveEvals(runtimeContext?: RuntimeContext | Record<string, any>): Promise<GetEvalsByAgentIdResponse>;
|
|
157
149
|
/**
|
|
158
150
|
* Updates the model for the agent
|
|
159
151
|
* @param params - Parameters for updating the model
|
|
@@ -185,23 +177,5 @@ export declare class Agent extends BaseResource {
|
|
|
185
177
|
reorderModelList(params: ReorderModelListParams): Promise<{
|
|
186
178
|
message: string;
|
|
187
179
|
}>;
|
|
188
|
-
/**
|
|
189
|
-
* @deprecated generateVNext has been renamed to generate. Please use generate instead.
|
|
190
|
-
*/
|
|
191
|
-
generateVNext<OUTPUT extends OutputSchema = undefined>(messages: MessageListInput, options?: Omit<StreamParams<OUTPUT>, 'messages'>): Promise<ReturnType<MastraModelOutput['getFullOutput']>>;
|
|
192
|
-
generateVNext<OUTPUT extends OutputSchema = undefined>(params: StreamParams<OUTPUT>): Promise<ReturnType<MastraModelOutput['getFullOutput']>>;
|
|
193
|
-
/**
|
|
194
|
-
* @deprecated streamVNext has been renamed to stream. Please use stream instead.
|
|
195
|
-
*/
|
|
196
|
-
streamVNext<OUTPUT extends OutputSchema = undefined>(messages: MessageListInput, options?: Omit<StreamParams<OUTPUT>, 'messages'>): Promise<Response & {
|
|
197
|
-
processDataStream: ({ onChunk, }: {
|
|
198
|
-
onChunk: Parameters<typeof processMastraStream>[0]['onChunk'];
|
|
199
|
-
}) => Promise<void>;
|
|
200
|
-
}>;
|
|
201
|
-
streamVNext<OUTPUT extends OutputSchema = undefined>(params: StreamParams<OUTPUT>): Promise<Response & {
|
|
202
|
-
processDataStream: ({ onChunk, }: {
|
|
203
|
-
onChunk: Parameters<typeof processMastraStream>[0]['onChunk'];
|
|
204
|
-
}) => Promise<void>;
|
|
205
|
-
}>;
|
|
206
180
|
}
|
|
207
181
|
//# sourceMappingURL=agent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/resources/agent.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAWvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAExE,OAAO,KAAK,EAAE,cAAc,EAAe,MAAM,kBAAkB,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACnC,OAAO,KAAK,EACV,oBAAoB,EACpB,gBAAgB,EAChB,
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/resources/agent.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAWvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAExE,OAAO,KAAK,EAAE,cAAc,EAAe,MAAM,kBAAkB,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;A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KG;IACH,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,eAAe,CAAC;IAIxG;;;;;OAKG;IACH,WAAW,CACT,MAAM,EAAE,MAAM,EACd,MAAM,EAAE;QAAE,IAAI,EAAE,GAAG,CAAC;QAAC,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;KAAE,GAC3E,OAAO,CAAC,GAAG,CAAC;IAWf;;;;OAIG;IACH,WAAW,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAOpE;;;OAGG;IACH,UAAU,IAAI,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAM1C;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,aAAa,EAAE,GAAG,MAAM,EAAE,EAAE,4BAA4B,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAOhH;;;;OAIG;IACH,gBAAgB,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CAM/E"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RequestContext } from '@mastra/core/request-context';
|
|
2
2
|
import type { ClientOptions, McpToolInfo } from '../types.js';
|
|
3
3
|
import { BaseResource } from './base.js';
|
|
4
4
|
/**
|
|
@@ -11,18 +11,18 @@ export declare class MCPTool extends BaseResource {
|
|
|
11
11
|
constructor(options: ClientOptions, serverId: string, toolId: string);
|
|
12
12
|
/**
|
|
13
13
|
* Retrieves details about this specific tool from the MCP server.
|
|
14
|
-
* @param
|
|
14
|
+
* @param requestContext - Optional request context to pass as query parameter
|
|
15
15
|
* @returns Promise containing the tool's information (name, description, schema).
|
|
16
16
|
*/
|
|
17
|
-
details(
|
|
17
|
+
details(requestContext?: RequestContext | Record<string, any>): Promise<McpToolInfo>;
|
|
18
18
|
/**
|
|
19
19
|
* Executes this specific tool on the MCP server.
|
|
20
|
-
* @param params - Parameters for tool execution, including data/args and optional
|
|
20
|
+
* @param params - Parameters for tool execution, including data/args and optional requestContext.
|
|
21
21
|
* @returns Promise containing the result of the tool execution.
|
|
22
22
|
*/
|
|
23
23
|
execute(params: {
|
|
24
24
|
data?: any;
|
|
25
|
-
|
|
25
|
+
requestContext?: RequestContext;
|
|
26
26
|
}): Promise<any>;
|
|
27
27
|
}
|
|
28
28
|
//# sourceMappingURL=mcp-tool.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RequestContext } from '@mastra/core/di';
|
|
2
2
|
import type { StorageThreadType } from '@mastra/core/memory';
|
|
3
|
-
import type {
|
|
3
|
+
import type { ClientOptions, UpdateMemoryThreadParams, ListMemoryThreadMessagesParams, ListMemoryThreadMessagesResponse } from '../types.js';
|
|
4
4
|
import { BaseResource } from './base.js';
|
|
5
5
|
export declare class MemoryThread extends BaseResource {
|
|
6
6
|
private threadId;
|
|
@@ -8,52 +8,44 @@ export declare class MemoryThread extends BaseResource {
|
|
|
8
8
|
constructor(options: ClientOptions, threadId: string, agentId: string);
|
|
9
9
|
/**
|
|
10
10
|
* Retrieves the memory thread details
|
|
11
|
-
* @param
|
|
11
|
+
* @param requestContext - Optional request context to pass as query parameter
|
|
12
12
|
* @returns Promise containing thread details including title and metadata
|
|
13
13
|
*/
|
|
14
|
-
get(
|
|
14
|
+
get(requestContext?: RequestContext | Record<string, any>): Promise<StorageThreadType>;
|
|
15
15
|
/**
|
|
16
16
|
* Updates the memory thread properties
|
|
17
|
-
* @param params - Update parameters including title, metadata, and optional
|
|
17
|
+
* @param params - Update parameters including title, metadata, and optional request context
|
|
18
18
|
* @returns Promise containing updated thread details
|
|
19
19
|
*/
|
|
20
20
|
update(params: UpdateMemoryThreadParams): Promise<StorageThreadType>;
|
|
21
21
|
/**
|
|
22
22
|
* Deletes the memory thread
|
|
23
|
-
* @param
|
|
23
|
+
* @param requestContext - Optional request context to pass as query parameter
|
|
24
24
|
* @returns Promise containing deletion result
|
|
25
25
|
*/
|
|
26
|
-
delete(
|
|
26
|
+
delete(requestContext?: RequestContext | Record<string, any>): Promise<{
|
|
27
27
|
result: string;
|
|
28
28
|
}>;
|
|
29
29
|
/**
|
|
30
|
-
* Retrieves messages associated with the thread
|
|
31
|
-
* @param params -
|
|
32
|
-
* @returns Promise containing thread messages and UI messages
|
|
33
|
-
*/
|
|
34
|
-
getMessages(params?: GetMemoryThreadMessagesParams & {
|
|
35
|
-
runtimeContext?: RuntimeContext | Record<string, any>;
|
|
36
|
-
}): Promise<GetMemoryThreadMessagesResponse>;
|
|
37
|
-
/**
|
|
38
|
-
* Retrieves paginated messages associated with the thread with advanced filtering and selection options
|
|
39
|
-
* @param params - Pagination parameters including selectBy criteria, page, perPage, date ranges, message inclusion options, and runtime context
|
|
30
|
+
* Retrieves paginated messages associated with the thread with filtering and ordering options
|
|
31
|
+
* @param params - Pagination parameters including page, perPage, orderBy, filter, include options, and request context
|
|
40
32
|
* @returns Promise containing paginated thread messages with pagination metadata (total, page, perPage, hasMore)
|
|
41
33
|
*/
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}): Promise<
|
|
34
|
+
listMessages(params?: ListMemoryThreadMessagesParams & {
|
|
35
|
+
requestContext?: RequestContext | Record<string, any>;
|
|
36
|
+
}): Promise<ListMemoryThreadMessagesResponse>;
|
|
45
37
|
/**
|
|
46
38
|
* Deletes one or more messages from the thread
|
|
47
39
|
* @param messageIds - Can be a single message ID (string), array of message IDs,
|
|
48
40
|
* message object with id property, or array of message objects
|
|
49
|
-
* @param
|
|
41
|
+
* @param requestContext - Optional request context to pass as query parameter
|
|
50
42
|
* @returns Promise containing deletion result
|
|
51
43
|
*/
|
|
52
44
|
deleteMessages(messageIds: string | string[] | {
|
|
53
45
|
id: string;
|
|
54
46
|
} | {
|
|
55
47
|
id: string;
|
|
56
|
-
}[],
|
|
48
|
+
}[], requestContext?: RequestContext | Record<string, any>): Promise<{
|
|
57
49
|
success: boolean;
|
|
58
50
|
message: string;
|
|
59
51
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-thread.d.ts","sourceRoot":"","sources":["../../src/resources/memory-thread.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,KAAK,EACV
|
|
1
|
+
{"version":3,"file":"memory-thread.d.ts","sourceRoot":"","sources":["../../src/resources/memory-thread.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,KAAK,EACV,aAAa,EACb,wBAAwB,EACxB,8BAA8B,EAC9B,gCAAgC,EACjC,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,qBAAa,YAAa,SAAQ,YAAY;IAG1C,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,OAAO;gBAFf,OAAO,EAAE,aAAa,EACd,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM;IAKzB;;;;OAIG;IACH,GAAG,CAAC,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAMtF;;;;OAIG;IACH,MAAM,CAAC,MAAM,EAAE,wBAAwB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAUpE;;;;OAIG;IACH,MAAM,CAAC,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAS1F;;;;OAIG;IACH,YAAY,CACV,MAAM,GAAE,8BAA8B,GAAG;QACvC,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KAClD,GACL,OAAO,CAAC,gCAAgC,CAAC;IAiB5C;;;;;;OAMG;IACH,cAAc,CACZ,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,EAAE,EACjE,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACpD,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CAYlD"}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { ClientOptions,
|
|
1
|
+
import type { TraceRecord, TracesPaginatedArg } from '@mastra/core/storage';
|
|
2
|
+
import type { ClientOptions, GetTracesResponse, ListScoresBySpanParams, ListScoresResponse } from '../types.js';
|
|
3
3
|
import { BaseResource } from './base.js';
|
|
4
4
|
export declare class Observability extends BaseResource {
|
|
5
5
|
constructor(options: ClientOptions);
|
|
6
6
|
/**
|
|
7
|
-
* Retrieves a specific
|
|
7
|
+
* Retrieves a specific trace by ID
|
|
8
8
|
* @param traceId - ID of the trace to retrieve
|
|
9
|
-
* @returns Promise containing the
|
|
9
|
+
* @returns Promise containing the trace with all its spans
|
|
10
10
|
*/
|
|
11
|
-
getTrace(traceId: string): Promise<
|
|
11
|
+
getTrace(traceId: string): Promise<TraceRecord>;
|
|
12
12
|
/**
|
|
13
|
-
* Retrieves paginated list of
|
|
13
|
+
* Retrieves paginated list of traces with optional filtering
|
|
14
14
|
* @param params - Parameters for pagination and filtering
|
|
15
15
|
* @returns Promise containing paginated traces and pagination info
|
|
16
16
|
*/
|
|
17
|
-
getTraces(params:
|
|
17
|
+
getTraces(params: TracesPaginatedArg): Promise<GetTracesResponse>;
|
|
18
18
|
/**
|
|
19
19
|
* Retrieves scores by trace ID and span ID
|
|
20
20
|
* @param params - Parameters containing trace ID, span ID, and pagination options
|
|
21
21
|
* @returns Promise containing scores and pagination info
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
listScoresBySpan(params: ListScoresBySpanParams): Promise<ListScoresResponse>;
|
|
24
24
|
score(params: {
|
|
25
25
|
scorerName: string;
|
|
26
26
|
targets: Array<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observability.d.ts","sourceRoot":"","sources":["../../src/resources/observability.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"observability.d.ts","sourceRoot":"","sources":["../../src/resources/observability.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC7G,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,qBAAa,aAAc,SAAQ,YAAY;gBACjC,OAAO,EAAE,aAAa;IAIlC;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAI/C;;;;OAIG;IACH,SAAS,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAmCjE;;;;OAIG;IACI,gBAAgB,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAiBpF,KAAK,CAAC,MAAM,EAAE;QACZ,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE,KAAK,CAAC;YAAE,OAAO,EAAE,MAAM,CAAC;YAAC,MAAM,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;KACtD,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CAMjD"}
|
package/dist/resources/tool.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RequestContext } from '@mastra/core/request-context';
|
|
2
2
|
import type { GetToolResponse, ClientOptions } from '../types.js';
|
|
3
3
|
import { BaseResource } from './base.js';
|
|
4
4
|
export declare class Tool extends BaseResource {
|
|
@@ -6,10 +6,10 @@ export declare class Tool extends BaseResource {
|
|
|
6
6
|
constructor(options: ClientOptions, toolId: string);
|
|
7
7
|
/**
|
|
8
8
|
* Retrieves details about the tool
|
|
9
|
-
* @param
|
|
9
|
+
* @param requestContext - Optional request context to pass as query parameter
|
|
10
10
|
* @returns Promise containing tool details including description and schemas
|
|
11
11
|
*/
|
|
12
|
-
details(
|
|
12
|
+
details(requestContext?: RequestContext | Record<string, any>): Promise<GetToolResponse>;
|
|
13
13
|
/**
|
|
14
14
|
* Executes the tool with the provided parameters
|
|
15
15
|
* @param params - Parameters required for tool execution
|
|
@@ -18,7 +18,7 @@ export declare class Tool extends BaseResource {
|
|
|
18
18
|
execute(params: {
|
|
19
19
|
data: any;
|
|
20
20
|
runId?: string;
|
|
21
|
-
|
|
21
|
+
requestContext?: RequestContext | Record<string, any>;
|
|
22
22
|
}): Promise<any>;
|
|
23
23
|
}
|
|
24
24
|
//# sourceMappingURL=tool.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RequestContext } from '@mastra/core/request-context';
|
|
2
2
|
import type { CreateIndexParams, GetVectorIndexResponse, QueryVectorParams, QueryVectorResponse, ClientOptions, UpsertVectorParams } from '../types.js';
|
|
3
3
|
import { BaseResource } from './base.js';
|
|
4
4
|
export declare class Vector extends BaseResource {
|
|
@@ -7,10 +7,10 @@ export declare class Vector extends BaseResource {
|
|
|
7
7
|
/**
|
|
8
8
|
* Retrieves details about a specific vector index
|
|
9
9
|
* @param indexName - Name of the index to get details for
|
|
10
|
-
* @param
|
|
10
|
+
* @param requestContext - Optional request context to pass as query parameter
|
|
11
11
|
* @returns Promise containing vector index details
|
|
12
12
|
*/
|
|
13
|
-
details(indexName: string,
|
|
13
|
+
details(indexName: string, requestContext?: RequestContext | Record<string, any>): Promise<GetVectorIndexResponse>;
|
|
14
14
|
/**
|
|
15
15
|
* Deletes a vector index
|
|
16
16
|
* @param indexName - Name of the index to delete
|
|
@@ -21,10 +21,10 @@ export declare class Vector extends BaseResource {
|
|
|
21
21
|
}>;
|
|
22
22
|
/**
|
|
23
23
|
* Retrieves a list of all available indexes
|
|
24
|
-
* @param
|
|
24
|
+
* @param requestContext - Optional request context to pass as query parameter
|
|
25
25
|
* @returns Promise containing array of index names
|
|
26
26
|
*/
|
|
27
|
-
getIndexes(
|
|
27
|
+
getIndexes(requestContext?: RequestContext | Record<string, any>): Promise<{
|
|
28
28
|
indexes: string[];
|
|
29
29
|
}>;
|
|
30
30
|
/**
|