@mastra/client-js 0.0.0-fix-multi-modal-for-cloud-20251028082043 → 0.0.0-fix-persist-session-cache-option-mcp-server-20251030171242
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 +33 -3
- package/README.md +7 -7
- package/dist/client.d.ts +35 -56
- package/dist/client.d.ts.map +1 -1
- package/dist/index.cjs +364 -358
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +364 -358
- package/dist/index.js.map +1 -1
- package/dist/resources/agent-builder.d.ts +55 -7
- package/dist/resources/agent-builder.d.ts.map +1 -1
- package/dist/resources/agent.d.ts +20 -25
- 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 +16 -8
- package/dist/resources/memory-thread.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 +41 -41
- package/dist/resources/workflow.d.ts.map +1 -1
- package/dist/types.d.ts +35 -34
- 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/package.json +4 -4
- 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;
|
|
@@ -25,6 +25,10 @@ export declare class AgentBuilder extends BaseResource {
|
|
|
25
25
|
private actionId;
|
|
26
26
|
constructor(options: ClientOptions, actionId: string);
|
|
27
27
|
transformWorkflowResult(result: any): AgentBuilderActionResult;
|
|
28
|
+
/**
|
|
29
|
+
* Creates a transform stream that parses binary chunks into JSON records.
|
|
30
|
+
*/
|
|
31
|
+
private createRecordParserTransform;
|
|
28
32
|
/**
|
|
29
33
|
* @deprecated Use createRunAsync() instead.
|
|
30
34
|
* @throws {Error} Always throws an error directing users to use createRunAsync()
|
|
@@ -60,9 +64,9 @@ export declare class AgentBuilder extends BaseResource {
|
|
|
60
64
|
* This calls `/api/agent-builder/:actionId/resume`.
|
|
61
65
|
*/
|
|
62
66
|
resume(params: {
|
|
63
|
-
step
|
|
67
|
+
step?: string | string[];
|
|
64
68
|
resumeData?: unknown;
|
|
65
|
-
|
|
69
|
+
requestContext?: RequestContext;
|
|
66
70
|
}, runId: string): Promise<{
|
|
67
71
|
message: string;
|
|
68
72
|
}>;
|
|
@@ -71,9 +75,9 @@ export declare class AgentBuilder extends BaseResource {
|
|
|
71
75
|
* This calls `/api/agent-builder/:actionId/resume-async`.
|
|
72
76
|
*/
|
|
73
77
|
resumeAsync(params: {
|
|
74
|
-
step
|
|
78
|
+
step?: string | string[];
|
|
75
79
|
resumeData?: unknown;
|
|
76
|
-
|
|
80
|
+
requestContext?: RequestContext;
|
|
77
81
|
}, runId: string): Promise<AgentBuilderActionResult>;
|
|
78
82
|
/**
|
|
79
83
|
* Creates an async generator that processes a readable stream and yields action records
|
|
@@ -112,6 +116,50 @@ export declare class AgentBuilder extends BaseResource {
|
|
|
112
116
|
type: string;
|
|
113
117
|
payload: any;
|
|
114
118
|
}) => void): Promise<void>;
|
|
119
|
+
/**
|
|
120
|
+
* Observes an existing agent builder action run stream.
|
|
121
|
+
* Replays cached execution from the beginning, then continues with live stream.
|
|
122
|
+
* This is the recommended method for recovery after page refresh/hot reload.
|
|
123
|
+
* This calls `/api/agent-builder/:actionId/observe` (which delegates to observeStreamVNext).
|
|
124
|
+
*/
|
|
125
|
+
observeStream(params: {
|
|
126
|
+
runId: string;
|
|
127
|
+
}): Promise<import("stream/web").ReadableStream<{
|
|
128
|
+
type: string;
|
|
129
|
+
payload: any;
|
|
130
|
+
}>>;
|
|
131
|
+
/**
|
|
132
|
+
* Observes an existing agent builder action run stream using VNext streaming API.
|
|
133
|
+
* Replays cached execution from the beginning, then continues with live stream.
|
|
134
|
+
* This calls `/api/agent-builder/:actionId/observe-streamVNext`.
|
|
135
|
+
*/
|
|
136
|
+
observeStreamVNext(params: {
|
|
137
|
+
runId: string;
|
|
138
|
+
}): Promise<import("stream/web").ReadableStream<{
|
|
139
|
+
type: string;
|
|
140
|
+
payload: any;
|
|
141
|
+
}>>;
|
|
142
|
+
/**
|
|
143
|
+
* Observes an existing agent builder action run stream using legacy streaming API.
|
|
144
|
+
* Replays cached execution from the beginning, then continues with live stream.
|
|
145
|
+
* This calls `/api/agent-builder/:actionId/observe-stream-legacy`.
|
|
146
|
+
*/
|
|
147
|
+
observeStreamLegacy(params: {
|
|
148
|
+
runId: string;
|
|
149
|
+
}): Promise<import("stream/web").ReadableStream<{
|
|
150
|
+
type: string;
|
|
151
|
+
payload: any;
|
|
152
|
+
}>>;
|
|
153
|
+
/**
|
|
154
|
+
* Resumes a suspended agent builder action and streams the results.
|
|
155
|
+
* This calls `/api/agent-builder/:actionId/resume-stream`.
|
|
156
|
+
*/
|
|
157
|
+
resumeStream(params: {
|
|
158
|
+
runId: string;
|
|
159
|
+
step: string | string[];
|
|
160
|
+
resumeData?: unknown;
|
|
161
|
+
requestContext?: RequestContext;
|
|
162
|
+
}): Promise<ReadableStream>;
|
|
115
163
|
/**
|
|
116
164
|
* Gets a specific action run by its ID.
|
|
117
165
|
* This calls `/api/agent-builder/:actionId/runs/:runId`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-builder.d.ts","source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M,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;IAO5D;;;OAGG;IACG,YAAY,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CAO1G"}
|
|
@@ -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,10 @@ 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
63
|
enhanceInstructions(instructions: string, comment: string): Promise<{
|
|
64
64
|
explanation: string;
|
|
65
65
|
new_prompt: string;
|
|
@@ -132,10 +132,10 @@ export declare class Agent extends BaseResource {
|
|
|
132
132
|
/**
|
|
133
133
|
* Gets details about a specific tool available to the agent
|
|
134
134
|
* @param toolId - ID of the tool to retrieve
|
|
135
|
-
* @param
|
|
135
|
+
* @param requestContext - Optional request context to pass as query parameter
|
|
136
136
|
* @returns Promise containing tool details
|
|
137
137
|
*/
|
|
138
|
-
getTool(toolId: string,
|
|
138
|
+
getTool(toolId: string, requestContext?: RequestContext | Record<string, any>): Promise<GetToolResponse>;
|
|
139
139
|
/**
|
|
140
140
|
* Executes a tool for the agent
|
|
141
141
|
* @param toolId - ID of the tool to execute
|
|
@@ -144,20 +144,8 @@ export declare class Agent extends BaseResource {
|
|
|
144
144
|
*/
|
|
145
145
|
executeTool(toolId: string, params: {
|
|
146
146
|
data: any;
|
|
147
|
-
|
|
147
|
+
requestContext?: RequestContext | Record<string, any>;
|
|
148
148
|
}): Promise<any>;
|
|
149
|
-
/**
|
|
150
|
-
* Retrieves evaluation results for the agent
|
|
151
|
-
* @param runtimeContext - Optional runtime context to pass as query parameter
|
|
152
|
-
* @returns Promise containing agent evaluations
|
|
153
|
-
*/
|
|
154
|
-
evals(runtimeContext?: RuntimeContext | Record<string, any>): Promise<GetEvalsByAgentIdResponse>;
|
|
155
|
-
/**
|
|
156
|
-
* Retrieves live evaluation results for the agent
|
|
157
|
-
* @param runtimeContext - Optional runtime context to pass as query parameter
|
|
158
|
-
* @returns Promise containing live agent evaluations
|
|
159
|
-
*/
|
|
160
|
-
liveEvals(runtimeContext?: RuntimeContext | Record<string, any>): Promise<GetEvalsByAgentIdResponse>;
|
|
161
149
|
/**
|
|
162
150
|
* Updates the model for the agent
|
|
163
151
|
* @param params - Parameters for updating the model
|
|
@@ -166,6 +154,13 @@ export declare class Agent extends BaseResource {
|
|
|
166
154
|
updateModel(params: UpdateModelParams): Promise<{
|
|
167
155
|
message: string;
|
|
168
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
|
+
}>;
|
|
169
164
|
/**
|
|
170
165
|
* Updates the model for the agent in the model list
|
|
171
166
|
* @param params - Parameters for updating the model
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/resources/agent.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AC;SAC/D,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;KACrB,CACF;IAEK,WAAW,CAAC,MAAM,SAAS,YAAY,GAAG,SAAS,EACvD,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC,GAC3B,OAAO,CACR,QAAQ,GAAG;QACT,iBAAiB,EAAE,CAAC,EAClB,OAAO,GACR,EAAE;YACD,OAAO,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;SAC/D,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;KACrB,CACF;CAeF"}
|
|
@@ -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,3 +1,4 @@
|
|
|
1
|
+
import type { RequestContext } from '@mastra/core/di';
|
|
1
2
|
import type { StorageThreadType } from '@mastra/core/memory';
|
|
2
3
|
import type { GetMemoryThreadMessagesResponse, ClientOptions, UpdateMemoryThreadParams, GetMemoryThreadMessagesParams, GetMemoryThreadMessagesPaginatedParams, GetMemoryThreadMessagesPaginatedResponse } from '../types.js';
|
|
3
4
|
import { BaseResource } from './base.js';
|
|
@@ -7,45 +8,52 @@ 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
30
|
* Retrieves messages associated with the thread
|
|
28
|
-
* @param params - Optional parameters including limit for number of messages to retrieve
|
|
31
|
+
* @param params - Optional parameters including limit for number of messages to retrieve and request context
|
|
29
32
|
* @returns Promise containing thread messages and UI messages
|
|
30
33
|
*/
|
|
31
|
-
getMessages(params?: GetMemoryThreadMessagesParams
|
|
34
|
+
getMessages(params?: GetMemoryThreadMessagesParams & {
|
|
35
|
+
requestContext?: RequestContext | Record<string, any>;
|
|
36
|
+
}): Promise<GetMemoryThreadMessagesResponse>;
|
|
32
37
|
/**
|
|
33
38
|
* 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,
|
|
39
|
+
* @param params - Pagination parameters including selectBy criteria, page, perPage, date ranges, message inclusion options, and request context
|
|
35
40
|
* @returns Promise containing paginated thread messages with pagination metadata (total, page, perPage, hasMore)
|
|
36
41
|
*/
|
|
37
|
-
getMessagesPaginated({ selectBy, ...rest }: GetMemoryThreadMessagesPaginatedParams
|
|
42
|
+
getMessagesPaginated({ selectBy, requestContext, ...rest }: GetMemoryThreadMessagesPaginatedParams & {
|
|
43
|
+
requestContext?: RequestContext | Record<string, any>;
|
|
44
|
+
}): Promise<GetMemoryThreadMessagesPaginatedResponse>;
|
|
38
45
|
/**
|
|
39
46
|
* Deletes one or more messages from the thread
|
|
40
47
|
* @param messageIds - Can be a single message ID (string), array of message IDs,
|
|
41
48
|
* message object with id property, or array of message objects
|
|
49
|
+
* @param requestContext - Optional request context to pass as query parameter
|
|
42
50
|
* @returns Promise containing deletion result
|
|
43
51
|
*/
|
|
44
52
|
deleteMessages(messageIds: string | string[] | {
|
|
45
53
|
id: string;
|
|
46
54
|
} | {
|
|
47
55
|
id: string;
|
|
48
|
-
}[]): Promise<{
|
|
56
|
+
}[], requestContext?: RequestContext | Record<string, any>): Promise<{
|
|
49
57
|
success: boolean;
|
|
50
58
|
message: string;
|
|
51
59
|
}>;
|
|
@@ -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,+BAA+B,EAC/B,a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Q,EACR,cAAc,EACd,GAAG,IAAI,EACR,EAAE,sCAAsC,GAAG;QAC1C,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KACvD,GAAG,OAAO,CAAC,wCAAwC,CAAC;IAUrD;;;;;;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"}
|
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
|
/**
|