@mastra/client-js 0.0.0-cloud-deployer-for-core-0.19.1-20251001164939 → 0.0.0-cloud-storage-adapter-20251106204059
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 +855 -4
- package/README.md +12 -14
- package/dist/client.d.ts +54 -90
- package/dist/client.d.ts.map +1 -1
- package/dist/index.cjs +630 -832
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +630 -832
- package/dist/index.js.map +1 -1
- package/dist/resources/agent-builder.d.ts +51 -36
- package/dist/resources/agent-builder.d.ts.map +1 -1
- package/dist/resources/agent.d.ts +50 -60
- 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 -14
- 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 +47 -109
- package/dist/resources/workflow.d.ts.map +1 -1
- package/dist/types.d.ts +104 -131
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/index.d.ts +10 -4
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/process-mastra-stream.d.ts.map +1 -1
- package/package.json +9 -5
- package/dist/resources/network-memory-thread.d.ts +0 -47
- package/dist/resources/network-memory-thread.d.ts.map +0 -1
- package/dist/resources/vNextNetwork.d.ts +0 -43
- package/dist/resources/vNextNetwork.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;
|
|
@@ -60,9 +55,9 @@ export declare class AgentBuilder extends BaseResource {
|
|
|
60
55
|
* This calls `/api/agent-builder/:actionId/resume`.
|
|
61
56
|
*/
|
|
62
57
|
resume(params: {
|
|
63
|
-
step
|
|
58
|
+
step?: string | string[];
|
|
64
59
|
resumeData?: unknown;
|
|
65
|
-
|
|
60
|
+
requestContext?: RequestContext;
|
|
66
61
|
}, runId: string): Promise<{
|
|
67
62
|
message: string;
|
|
68
63
|
}>;
|
|
@@ -71,9 +66,9 @@ export declare class AgentBuilder extends BaseResource {
|
|
|
71
66
|
* This calls `/api/agent-builder/:actionId/resume-async`.
|
|
72
67
|
*/
|
|
73
68
|
resumeAsync(params: {
|
|
74
|
-
step
|
|
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`.
|
|
113
|
+
*/
|
|
114
|
+
observeStreamVNext(params: {
|
|
115
|
+
runId: string;
|
|
116
|
+
}): Promise<import("stream/web").ReadableStream<{
|
|
117
|
+
type: string;
|
|
118
|
+
payload: any;
|
|
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`.
|
|
107
124
|
*/
|
|
108
|
-
|
|
125
|
+
observeStreamLegacy(params: {
|
|
109
126
|
runId: string;
|
|
110
|
-
|
|
111
|
-
}, onRecord: (record: {
|
|
127
|
+
}): Promise<import("stream/web").ReadableStream<{
|
|
112
128
|
type: string;
|
|
113
129
|
payload: any;
|
|
114
|
-
}
|
|
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":"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EAAE,IAAI,CAAC;QAAC,MAAM,CAAC,EAAE,IAAI,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE;IAwB5G;;;OAGG;IACG,kBAAkB,CAAC,KAAK,EAAE,MAAM;IAOtC;;;OAGG;IACG,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,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 {
|
|
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,76 +56,71 @@ 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(
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
*/
|
|
68
|
-
generate(params: GenerateParams<undefined> & {
|
|
69
|
-
output?: never;
|
|
70
|
-
experimental_output?: never;
|
|
71
|
-
}): Promise<GenerateReturn<any, undefined, undefined>>;
|
|
72
|
-
generate<Output extends JSONSchema7 | ZodType>(params: GenerateParams<Output> & {
|
|
73
|
-
output: Output;
|
|
74
|
-
experimental_output?: never;
|
|
75
|
-
}): Promise<GenerateReturn<any, Output, undefined>>;
|
|
76
|
-
generate<StructuredOutput extends JSONSchema7 | ZodType>(params: GenerateParams<StructuredOutput> & {
|
|
77
|
-
output?: never;
|
|
78
|
-
experimental_output: StructuredOutput;
|
|
79
|
-
}): Promise<GenerateReturn<any, undefined, StructuredOutput>>;
|
|
62
|
+
details(requestContext?: RequestContext | Record<string, any>): Promise<GetAgentResponse>;
|
|
63
|
+
enhanceInstructions(instructions: string, comment: string): Promise<{
|
|
64
|
+
explanation: string;
|
|
65
|
+
new_prompt: string;
|
|
66
|
+
}>;
|
|
80
67
|
/**
|
|
81
68
|
* Generates a response from the agent
|
|
82
69
|
* @param params - Generation parameters including prompt
|
|
83
70
|
* @returns Promise containing the generated response
|
|
84
71
|
*/
|
|
85
|
-
generateLegacy(params:
|
|
72
|
+
generateLegacy(params: GenerateLegacyParams<undefined> & {
|
|
86
73
|
output?: never;
|
|
87
74
|
experimental_output?: never;
|
|
88
75
|
}): Promise<GenerateReturn<any, undefined, undefined>>;
|
|
89
|
-
generateLegacy<Output extends JSONSchema7 | ZodType>(params:
|
|
76
|
+
generateLegacy<Output extends JSONSchema7 | ZodType>(params: GenerateLegacyParams<Output> & {
|
|
90
77
|
output: Output;
|
|
91
78
|
experimental_output?: never;
|
|
92
79
|
}): Promise<GenerateReturn<any, Output, undefined>>;
|
|
93
|
-
generateLegacy<StructuredOutput extends JSONSchema7 | ZodType>(params:
|
|
80
|
+
generateLegacy<StructuredOutput extends JSONSchema7 | ZodType>(params: GenerateLegacyParams<StructuredOutput> & {
|
|
94
81
|
output?: never;
|
|
95
82
|
experimental_output: StructuredOutput;
|
|
96
83
|
}): Promise<GenerateReturn<any, undefined, StructuredOutput>>;
|
|
97
|
-
|
|
98
|
-
|
|
84
|
+
generate<OUTPUT extends OutputSchema = undefined>(messages: MessageListInput, options?: Omit<StreamParams<OUTPUT>, 'messages'>): Promise<ReturnType<MastraModelOutput<OUTPUT>['getFullOutput']>>;
|
|
85
|
+
generate<OUTPUT extends OutputSchema = undefined>(params: StreamParams<OUTPUT>): Promise<ReturnType<MastraModelOutput<OUTPUT>['getFullOutput']>>;
|
|
99
86
|
private processChatResponse;
|
|
100
87
|
/**
|
|
101
88
|
* Streams a response from the agent
|
|
102
89
|
* @param params - Stream parameters including prompt
|
|
103
90
|
* @returns Promise containing the enhanced Response object with processDataStream method
|
|
104
91
|
*/
|
|
105
|
-
|
|
106
|
-
processDataStream: (options?: Omit<Parameters<typeof processDataStream>[0], 'stream'>) => Promise<void>;
|
|
107
|
-
}>;
|
|
108
|
-
/**
|
|
109
|
-
* Streams a response from the agent
|
|
110
|
-
* @param params - Stream parameters including prompt
|
|
111
|
-
* @returns Promise containing the enhanced Response object with processDataStream method
|
|
112
|
-
*/
|
|
113
|
-
streamLegacy<T extends JSONSchema7 | ZodType | undefined = undefined>(params: StreamParams<T>): Promise<Response & {
|
|
92
|
+
streamLegacy<T extends JSONSchema7 | ZodType | undefined = undefined>(params: StreamLegacyParams<T>): Promise<Response & {
|
|
114
93
|
processDataStream: (options?: Omit<Parameters<typeof processDataStream>[0], 'stream'>) => Promise<void>;
|
|
115
94
|
}>;
|
|
116
95
|
private processChatResponse_vNext;
|
|
117
|
-
|
|
96
|
+
processStreamResponse(processedParams: any, writable: any, route?: string): Promise<Response>;
|
|
118
97
|
network(params: NetworkStreamParams): Promise<Response & {
|
|
119
98
|
processDataStream: ({ onChunk, }: {
|
|
120
99
|
onChunk: Parameters<typeof processMastraNetworkStream>[0]['onChunk'];
|
|
121
100
|
}) => Promise<void>;
|
|
122
101
|
}>;
|
|
123
|
-
|
|
102
|
+
stream<OUTPUT extends OutputSchema = undefined>(messages: MessageListInput, options?: Omit<StreamParams<OUTPUT>, 'messages'>): Promise<Response & {
|
|
103
|
+
processDataStream: ({ onChunk, }: {
|
|
104
|
+
onChunk: Parameters<typeof processMastraStream>[0]['onChunk'];
|
|
105
|
+
}) => Promise<void>;
|
|
106
|
+
}>;
|
|
107
|
+
stream<OUTPUT extends OutputSchema = undefined>(params: StreamParams<OUTPUT>): Promise<Response & {
|
|
124
108
|
processDataStream: ({ onChunk, }: {
|
|
125
109
|
onChunk: Parameters<typeof processMastraStream>[0]['onChunk'];
|
|
126
110
|
}) => Promise<void>;
|
|
127
111
|
}>;
|
|
128
|
-
|
|
112
|
+
approveToolCall(params: {
|
|
113
|
+
runId: string;
|
|
114
|
+
toolCallId: string;
|
|
115
|
+
}): Promise<Response & {
|
|
116
|
+
processDataStream: ({ onChunk, }: {
|
|
117
|
+
onChunk: Parameters<typeof processMastraStream>[0]['onChunk'];
|
|
118
|
+
}) => Promise<void>;
|
|
119
|
+
}>;
|
|
120
|
+
declineToolCall(params: {
|
|
121
|
+
runId: string;
|
|
122
|
+
toolCallId: string;
|
|
123
|
+
}): Promise<Response & {
|
|
129
124
|
processDataStream: ({ onChunk, }: {
|
|
130
125
|
onChunk: Parameters<typeof processMastraStream>[0]['onChunk'];
|
|
131
126
|
}) => Promise<void>;
|
|
@@ -133,14 +128,14 @@ export declare class Agent extends BaseResource {
|
|
|
133
128
|
/**
|
|
134
129
|
* Processes the stream response and handles tool calls
|
|
135
130
|
*/
|
|
136
|
-
private
|
|
131
|
+
private processStreamResponseLegacy;
|
|
137
132
|
/**
|
|
138
133
|
* Gets details about a specific tool available to the agent
|
|
139
134
|
* @param toolId - ID of the tool to retrieve
|
|
140
|
-
* @param
|
|
135
|
+
* @param requestContext - Optional request context to pass as query parameter
|
|
141
136
|
* @returns Promise containing tool details
|
|
142
137
|
*/
|
|
143
|
-
getTool(toolId: string,
|
|
138
|
+
getTool(toolId: string, requestContext?: RequestContext | Record<string, any>): Promise<GetToolResponse>;
|
|
144
139
|
/**
|
|
145
140
|
* Executes a tool for the agent
|
|
146
141
|
* @param toolId - ID of the tool to execute
|
|
@@ -149,20 +144,8 @@ export declare class Agent extends BaseResource {
|
|
|
149
144
|
*/
|
|
150
145
|
executeTool(toolId: string, params: {
|
|
151
146
|
data: any;
|
|
152
|
-
|
|
147
|
+
requestContext?: RequestContext | Record<string, any>;
|
|
153
148
|
}): Promise<any>;
|
|
154
|
-
/**
|
|
155
|
-
* Retrieves evaluation results for the agent
|
|
156
|
-
* @param runtimeContext - Optional runtime context to pass as query parameter
|
|
157
|
-
* @returns Promise containing agent evaluations
|
|
158
|
-
*/
|
|
159
|
-
evals(runtimeContext?: RuntimeContext | Record<string, any>): Promise<GetEvalsByAgentIdResponse>;
|
|
160
|
-
/**
|
|
161
|
-
* Retrieves live evaluation results for the agent
|
|
162
|
-
* @param runtimeContext - Optional runtime context to pass as query parameter
|
|
163
|
-
* @returns Promise containing live agent evaluations
|
|
164
|
-
*/
|
|
165
|
-
liveEvals(runtimeContext?: RuntimeContext | Record<string, any>): Promise<GetEvalsByAgentIdResponse>;
|
|
166
149
|
/**
|
|
167
150
|
* Updates the model for the agent
|
|
168
151
|
* @param params - Parameters for updating the model
|
|
@@ -171,6 +154,13 @@ export declare class Agent extends BaseResource {
|
|
|
171
154
|
updateModel(params: UpdateModelParams): Promise<{
|
|
172
155
|
message: string;
|
|
173
156
|
}>;
|
|
157
|
+
/**
|
|
158
|
+
* Resets the agent's model to the original model that was set during construction
|
|
159
|
+
* @returns Promise containing a success message
|
|
160
|
+
*/
|
|
161
|
+
resetModel(): Promise<{
|
|
162
|
+
message: string;
|
|
163
|
+
}>;
|
|
174
164
|
/**
|
|
175
165
|
* Updates the model for the agent in the model list
|
|
176
166
|
* @param params - Parameters for updating the model
|
|
@@ -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;
|
|
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,iBAA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K,OAAO,CAAC,IAAI,CAAC,CAAC;KACrB,CACF;IAmCD;;OAEG;YACW,2BAA2B;IA2IzC;;;;;OAKG;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,5 +1,6 @@
|
|
|
1
|
+
import type { RequestContext } from '@mastra/core/di';
|
|
1
2
|
import type { StorageThreadType } from '@mastra/core/memory';
|
|
2
|
-
import type {
|
|
3
|
+
import type { ClientOptions, UpdateMemoryThreadParams, ListMemoryThreadMessagesParams, ListMemoryThreadMessagesResponse } from '../types.js';
|
|
3
4
|
import { BaseResource } from './base.js';
|
|
4
5
|
export declare class MemoryThread extends BaseResource {
|
|
5
6
|
private threadId;
|
|
@@ -7,45 +8,44 @@ export declare class MemoryThread extends BaseResource {
|
|
|
7
8
|
constructor(options: ClientOptions, threadId: string, agentId: string);
|
|
8
9
|
/**
|
|
9
10
|
* Retrieves the memory thread details
|
|
11
|
+
* @param requestContext - Optional request context to pass as query parameter
|
|
10
12
|
* @returns Promise containing thread details including title and metadata
|
|
11
13
|
*/
|
|
12
|
-
get(): Promise<StorageThreadType>;
|
|
14
|
+
get(requestContext?: RequestContext | Record<string, any>): Promise<StorageThreadType>;
|
|
13
15
|
/**
|
|
14
16
|
* Updates the memory thread properties
|
|
15
|
-
* @param params - Update parameters including title and
|
|
17
|
+
* @param params - Update parameters including title, metadata, and optional request context
|
|
16
18
|
* @returns Promise containing updated thread details
|
|
17
19
|
*/
|
|
18
20
|
update(params: UpdateMemoryThreadParams): Promise<StorageThreadType>;
|
|
19
21
|
/**
|
|
20
22
|
* Deletes the memory thread
|
|
23
|
+
* @param requestContext - Optional request context to pass as query parameter
|
|
21
24
|
* @returns Promise containing deletion result
|
|
22
25
|
*/
|
|
23
|
-
delete(): Promise<{
|
|
26
|
+
delete(requestContext?: RequestContext | Record<string, any>): Promise<{
|
|
24
27
|
result: string;
|
|
25
28
|
}>;
|
|
26
29
|
/**
|
|
27
|
-
* Retrieves messages associated with the thread
|
|
28
|
-
* @param params -
|
|
29
|
-
* @returns Promise containing thread messages and UI messages
|
|
30
|
-
*/
|
|
31
|
-
getMessages(params?: GetMemoryThreadMessagesParams): Promise<GetMemoryThreadMessagesResponse>;
|
|
32
|
-
/**
|
|
33
|
-
* Retrieves paginated messages associated with the thread with advanced filtering and selection options
|
|
34
|
-
* @param params - Pagination parameters including selectBy criteria, page, perPage, date ranges, and message inclusion options
|
|
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
|
|
35
32
|
* @returns Promise containing paginated thread messages with pagination metadata (total, page, perPage, hasMore)
|
|
36
33
|
*/
|
|
37
|
-
|
|
34
|
+
listMessages(params?: ListMemoryThreadMessagesParams & {
|
|
35
|
+
requestContext?: RequestContext | Record<string, any>;
|
|
36
|
+
}): Promise<ListMemoryThreadMessagesResponse>;
|
|
38
37
|
/**
|
|
39
38
|
* Deletes one or more messages from the thread
|
|
40
39
|
* @param messageIds - Can be a single message ID (string), array of message IDs,
|
|
41
40
|
* message object with id property, or array of message objects
|
|
41
|
+
* @param requestContext - Optional request context to pass as query parameter
|
|
42
42
|
* @returns Promise containing deletion result
|
|
43
43
|
*/
|
|
44
44
|
deleteMessages(messageIds: string | string[] | {
|
|
45
45
|
id: string;
|
|
46
46
|
} | {
|
|
47
47
|
id: string;
|
|
48
|
-
}[]): Promise<{
|
|
48
|
+
}[], requestContext?: RequestContext | Record<string, any>): Promise<{
|
|
49
49
|
success: boolean;
|
|
50
50
|
message: string;
|
|
51
51
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-thread.d.ts","sourceRoot":"","sources":["../../src/resources/memory-thread.ts"],"names":[],"mappings":"AAAA,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
|
/**
|