@mastra/client-js 0.0.0-vector-query-tool-provider-options-20250828222356 → 0.0.0-vector-extension-schema-20250922130418
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 +429 -4
- package/README.md +7 -9
- package/dist/client.d.ts +37 -21
- package/dist/client.d.ts.map +1 -1
- package/dist/index.cjs +871 -417
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +869 -417
- package/dist/index.js.map +1 -1
- package/dist/resources/agent-builder.d.ts +160 -0
- package/dist/resources/agent-builder.d.ts.map +1 -0
- package/dist/resources/agent.d.ts +56 -11
- package/dist/resources/agent.d.ts.map +1 -1
- package/dist/resources/index.d.ts +1 -1
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/legacy-workflow.d.ts +5 -2
- package/dist/resources/legacy-workflow.d.ts.map +1 -1
- package/dist/resources/mcp-tool.d.ts +2 -1
- package/dist/resources/mcp-tool.d.ts.map +1 -1
- package/dist/resources/observability.d.ts.map +1 -1
- package/dist/resources/tool.d.ts +2 -1
- package/dist/resources/tool.d.ts.map +1 -1
- package/dist/resources/vNextNetwork.d.ts +2 -1
- package/dist/resources/vNextNetwork.d.ts.map +1 -1
- package/dist/resources/vector.d.ts +5 -2
- package/dist/resources/vector.d.ts.map +1 -1
- package/dist/resources/workflow.d.ts +110 -10
- package/dist/resources/workflow.d.ts.map +1 -1
- package/dist/tools.d.ts +22 -0
- package/dist/tools.d.ts.map +1 -0
- package/dist/types.d.ts +36 -21
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/process-mastra-stream.d.ts +5 -1
- package/dist/utils/process-mastra-stream.d.ts.map +1 -1
- package/package.json +19 -15
- package/.turbo/turbo-build.log +0 -18
- package/dist/adapters/agui.d.ts +0 -23
- package/dist/adapters/agui.d.ts.map +0 -1
- package/dist/resources/network.d.ts +0 -30
- package/dist/resources/network.d.ts.map +0 -1
- package/eslint.config.js +0 -11
- package/integration-tests/agui-adapter.test.ts +0 -122
- package/integration-tests/package.json +0 -18
- package/integration-tests/src/mastra/index.ts +0 -35
- package/integration-tests/vitest.config.ts +0 -9
- package/src/adapters/agui.test.ts +0 -293
- package/src/adapters/agui.ts +0 -257
- package/src/client.ts +0 -644
- package/src/example.ts +0 -95
- package/src/index.test.ts +0 -1253
- package/src/index.ts +0 -3
- package/src/resources/a2a.ts +0 -98
- package/src/resources/agent.ts +0 -1460
- package/src/resources/base.ts +0 -77
- package/src/resources/index.ts +0 -11
- package/src/resources/legacy-workflow.ts +0 -242
- package/src/resources/mcp-tool.ts +0 -48
- package/src/resources/memory-thread.test.ts +0 -285
- package/src/resources/memory-thread.ts +0 -99
- package/src/resources/network-memory-thread.test.ts +0 -269
- package/src/resources/network-memory-thread.ts +0 -81
- package/src/resources/network.ts +0 -86
- package/src/resources/observability.ts +0 -53
- package/src/resources/tool.ts +0 -45
- package/src/resources/vNextNetwork.ts +0 -194
- package/src/resources/vector.ts +0 -83
- package/src/resources/workflow.ts +0 -410
- package/src/types.ts +0 -534
- package/src/utils/index.ts +0 -11
- package/src/utils/process-client-tools.ts +0 -32
- package/src/utils/process-mastra-stream.test.ts +0 -353
- package/src/utils/process-mastra-stream.ts +0 -49
- package/src/utils/zod-to-json-schema.ts +0 -30
- package/src/v2-messages.test.ts +0 -180
- package/tsconfig.build.json +0 -9
- package/tsconfig.json +0 -5
- package/tsup.config.ts +0 -17
- package/vitest.config.js +0 -8
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import type { RuntimeContext } from '@mastra/core/runtime-context';
|
|
2
|
+
import type { WorkflowInfo } from '@mastra/core/workflows';
|
|
3
|
+
import type { ClientOptions } from '../types.js';
|
|
4
|
+
import { BaseResource } from './base.js';
|
|
5
|
+
export interface AgentBuilderActionRequest {
|
|
6
|
+
/** Input data specific to the workflow type */
|
|
7
|
+
inputData: any;
|
|
8
|
+
/** Runtime context for the action execution */
|
|
9
|
+
runtimeContext?: RuntimeContext;
|
|
10
|
+
}
|
|
11
|
+
export interface AgentBuilderActionResult {
|
|
12
|
+
success: boolean;
|
|
13
|
+
applied: boolean;
|
|
14
|
+
branchName?: string;
|
|
15
|
+
message: string;
|
|
16
|
+
validationResults?: any;
|
|
17
|
+
error?: string;
|
|
18
|
+
errors?: string[];
|
|
19
|
+
stepResults?: any;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Agent Builder resource: operations related to agent-builder workflows via server endpoints.
|
|
23
|
+
*/
|
|
24
|
+
export declare class AgentBuilder extends BaseResource {
|
|
25
|
+
private actionId;
|
|
26
|
+
constructor(options: ClientOptions, actionId: string);
|
|
27
|
+
transformWorkflowResult(result: any): AgentBuilderActionResult;
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated Use createRunAsync() instead.
|
|
30
|
+
* @throws {Error} Always throws an error directing users to use createRunAsync()
|
|
31
|
+
*/
|
|
32
|
+
createRun(_params?: {
|
|
33
|
+
runId?: string;
|
|
34
|
+
}): Promise<{
|
|
35
|
+
runId: string;
|
|
36
|
+
}>;
|
|
37
|
+
/**
|
|
38
|
+
* Creates a new agent builder action run and returns the runId.
|
|
39
|
+
* This calls `/api/agent-builder/:actionId/create-run`.
|
|
40
|
+
*/
|
|
41
|
+
createRunAsync(params?: {
|
|
42
|
+
runId?: string;
|
|
43
|
+
}): Promise<{
|
|
44
|
+
runId: string;
|
|
45
|
+
}>;
|
|
46
|
+
/**
|
|
47
|
+
* Starts agent builder action asynchronously and waits for completion.
|
|
48
|
+
* This calls `/api/agent-builder/:actionId/start-async`.
|
|
49
|
+
*/
|
|
50
|
+
startAsync(params: AgentBuilderActionRequest, runId?: string): Promise<AgentBuilderActionResult>;
|
|
51
|
+
/**
|
|
52
|
+
* Starts an existing agent builder action run.
|
|
53
|
+
* This calls `/api/agent-builder/:actionId/start`.
|
|
54
|
+
*/
|
|
55
|
+
startActionRun(params: AgentBuilderActionRequest, runId: string): Promise<{
|
|
56
|
+
message: string;
|
|
57
|
+
}>;
|
|
58
|
+
/**
|
|
59
|
+
* Resumes a suspended agent builder action step.
|
|
60
|
+
* This calls `/api/agent-builder/:actionId/resume`.
|
|
61
|
+
*/
|
|
62
|
+
resume(params: {
|
|
63
|
+
step: string | string[];
|
|
64
|
+
resumeData?: unknown;
|
|
65
|
+
runtimeContext?: RuntimeContext;
|
|
66
|
+
}, runId: string): Promise<{
|
|
67
|
+
message: string;
|
|
68
|
+
}>;
|
|
69
|
+
/**
|
|
70
|
+
* Resumes a suspended agent builder action step asynchronously.
|
|
71
|
+
* This calls `/api/agent-builder/:actionId/resume-async`.
|
|
72
|
+
*/
|
|
73
|
+
resumeAsync(params: {
|
|
74
|
+
step: string | string[];
|
|
75
|
+
resumeData?: unknown;
|
|
76
|
+
runtimeContext?: RuntimeContext;
|
|
77
|
+
}, runId: string): Promise<AgentBuilderActionResult>;
|
|
78
|
+
/**
|
|
79
|
+
* Creates an async generator that processes a readable stream and yields action records
|
|
80
|
+
* separated by the Record Separator character (\x1E)
|
|
81
|
+
*
|
|
82
|
+
* @param stream - The readable stream to process
|
|
83
|
+
* @returns An async generator that yields parsed records
|
|
84
|
+
*/
|
|
85
|
+
private streamProcessor;
|
|
86
|
+
/**
|
|
87
|
+
* Streams agent builder action progress in real-time.
|
|
88
|
+
* This calls `/api/agent-builder/:actionId/stream`.
|
|
89
|
+
*/
|
|
90
|
+
stream(params: AgentBuilderActionRequest, runId?: string): Promise<import("stream/web").ReadableStream<{
|
|
91
|
+
type: string;
|
|
92
|
+
payload: any;
|
|
93
|
+
}>>;
|
|
94
|
+
/**
|
|
95
|
+
* Streams agent builder action progress in real-time using VNext streaming.
|
|
96
|
+
* This calls `/api/agent-builder/:actionId/streamVNext`.
|
|
97
|
+
*/
|
|
98
|
+
streamVNext(params: AgentBuilderActionRequest, runId?: string): Promise<import("stream/web").ReadableStream<{
|
|
99
|
+
type: string;
|
|
100
|
+
payload: any;
|
|
101
|
+
}>>;
|
|
102
|
+
/**
|
|
103
|
+
* Watches an existing agent builder action run by runId.
|
|
104
|
+
* This is used for hot reload recovery - it loads the existing run state
|
|
105
|
+
* and streams any remaining progress.
|
|
106
|
+
* This calls `/api/agent-builder/:actionId/watch`.
|
|
107
|
+
*/
|
|
108
|
+
watch({ runId, eventType }: {
|
|
109
|
+
runId: string;
|
|
110
|
+
eventType?: 'watch' | 'watch-v2';
|
|
111
|
+
}, onRecord: (record: {
|
|
112
|
+
type: string;
|
|
113
|
+
payload: any;
|
|
114
|
+
}) => void): Promise<void>;
|
|
115
|
+
/**
|
|
116
|
+
* Gets a specific action run by its ID.
|
|
117
|
+
* This calls `/api/agent-builder/:actionId/runs/:runId`.
|
|
118
|
+
*/
|
|
119
|
+
runById(runId: string): Promise<unknown>;
|
|
120
|
+
/**
|
|
121
|
+
* Gets details about this agent builder action.
|
|
122
|
+
* This calls `/api/agent-builder/:actionId`.
|
|
123
|
+
*/
|
|
124
|
+
details(): Promise<WorkflowInfo>;
|
|
125
|
+
/**
|
|
126
|
+
* Gets all runs for this agent builder action.
|
|
127
|
+
* This calls `/api/agent-builder/:actionId/runs`.
|
|
128
|
+
*/
|
|
129
|
+
runs(params?: {
|
|
130
|
+
fromDate?: Date;
|
|
131
|
+
toDate?: Date;
|
|
132
|
+
limit?: number;
|
|
133
|
+
offset?: number;
|
|
134
|
+
resourceId?: string;
|
|
135
|
+
}): Promise<unknown>;
|
|
136
|
+
/**
|
|
137
|
+
* Gets the execution result of an agent builder action run.
|
|
138
|
+
* This calls `/api/agent-builder/:actionId/runs/:runId/execution-result`.
|
|
139
|
+
*/
|
|
140
|
+
runExecutionResult(runId: string): Promise<unknown>;
|
|
141
|
+
/**
|
|
142
|
+
* Cancels an agent builder action run.
|
|
143
|
+
* This calls `/api/agent-builder/:actionId/runs/:runId/cancel`.
|
|
144
|
+
*/
|
|
145
|
+
cancelRun(runId: string): Promise<{
|
|
146
|
+
message: string;
|
|
147
|
+
}>;
|
|
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
|
+
}
|
|
160
|
+
//# sourceMappingURL=agent-builder.d.ts.map
|
|
@@ -0,0 +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,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,GAAG,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,CAAC,EAAE,GAAG,CAAC;CACnB;AAED;;GAEG;AACH,qBAAa,YAAa,SAAQ,YAAY;IAG1C,OAAO,CAAC,QAAQ;gBADhB,OAAO,EAAE,aAAa,EACd,QAAQ,EAAE,MAAM;IAM1B,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Return } from '@mastra/core/llm';
|
|
3
4
|
import type { RuntimeContext } from '@mastra/core/runtime-context';
|
|
4
5
|
import type { OutputSchema, MastraModelOutput } from '@mastra/core/stream';
|
|
5
6
|
import type { JSONSchema7 } from 'json-schema';
|
|
6
7
|
import type { ZodType } from 'zod';
|
|
7
|
-
import type { GenerateParams, GetAgentResponse, GetEvalsByAgentIdResponse, GetToolResponse, ClientOptions, StreamParams, UpdateModelParams, StreamVNextParams } from '../types.js';
|
|
8
|
-
import { processMastraStream } from '../utils/process-mastra-stream.js';
|
|
8
|
+
import type { GenerateParams, GetAgentResponse, GetEvalsByAgentIdResponse, GetToolResponse, ClientOptions, StreamParams, UpdateModelParams, StreamVNextParams, NetworkStreamParams } from '../types.js';
|
|
9
|
+
import { processMastraNetworkStream, processMastraStream } from '../utils/process-mastra-stream.js';
|
|
9
10
|
import { BaseResource } from './base.js';
|
|
10
11
|
export declare class AgentVoice extends BaseResource {
|
|
11
12
|
private agentId;
|
|
@@ -31,17 +32,21 @@ export declare class AgentVoice extends BaseResource {
|
|
|
31
32
|
}>;
|
|
32
33
|
/**
|
|
33
34
|
* Get available speakers for the agent's voice provider
|
|
35
|
+
* @param runtimeContext - Optional runtime context to pass as query parameter
|
|
36
|
+
* @param runtimeContext - Optional runtime context to pass as query parameter
|
|
34
37
|
* @returns Promise containing list of available speakers
|
|
35
38
|
*/
|
|
36
|
-
getSpeakers(): Promise<Array<{
|
|
39
|
+
getSpeakers(runtimeContext?: RuntimeContext | Record<string, any>): Promise<Array<{
|
|
37
40
|
voiceId: string;
|
|
38
41
|
[key: string]: any;
|
|
39
42
|
}>>;
|
|
40
43
|
/**
|
|
41
44
|
* Get the listener configuration for the agent's voice provider
|
|
45
|
+
* @param runtimeContext - Optional runtime context to pass as query parameter
|
|
46
|
+
* @param runtimeContext - Optional runtime context to pass as query parameter
|
|
42
47
|
* @returns Promise containing a check if the agent has listening capabilities
|
|
43
48
|
*/
|
|
44
|
-
getListener(): Promise<{
|
|
49
|
+
getListener(runtimeContext?: RuntimeContext | Record<string, any>): Promise<{
|
|
45
50
|
enabled: boolean;
|
|
46
51
|
}>;
|
|
47
52
|
}
|
|
@@ -51,9 +56,10 @@ export declare class Agent extends BaseResource {
|
|
|
51
56
|
constructor(options: ClientOptions, agentId: string);
|
|
52
57
|
/**
|
|
53
58
|
* Retrieves details about the agent
|
|
59
|
+
* @param runtimeContext - Optional runtime context to pass as query parameter
|
|
54
60
|
* @returns Promise containing agent details including model and instructions
|
|
55
61
|
*/
|
|
56
|
-
details(): Promise<GetAgentResponse>;
|
|
62
|
+
details(runtimeContext?: RuntimeContext | Record<string, any>): Promise<GetAgentResponse>;
|
|
57
63
|
/**
|
|
58
64
|
* Generates a response from the agent
|
|
59
65
|
* @param params - Generation parameters including prompt
|
|
@@ -71,7 +77,25 @@ export declare class Agent extends BaseResource {
|
|
|
71
77
|
output?: never;
|
|
72
78
|
experimental_output: StructuredOutput;
|
|
73
79
|
}): Promise<GenerateReturn<any, undefined, StructuredOutput>>;
|
|
74
|
-
|
|
80
|
+
/**
|
|
81
|
+
* Generates a response from the agent
|
|
82
|
+
* @param params - Generation parameters including prompt
|
|
83
|
+
* @returns Promise containing the generated response
|
|
84
|
+
*/
|
|
85
|
+
generateLegacy(params: GenerateParams<undefined> & {
|
|
86
|
+
output?: never;
|
|
87
|
+
experimental_output?: never;
|
|
88
|
+
}): Promise<GenerateReturn<any, undefined, undefined>>;
|
|
89
|
+
generateLegacy<Output extends JSONSchema7 | ZodType>(params: GenerateParams<Output> & {
|
|
90
|
+
output: Output;
|
|
91
|
+
experimental_output?: never;
|
|
92
|
+
}): Promise<GenerateReturn<any, Output, undefined>>;
|
|
93
|
+
generateLegacy<StructuredOutput extends JSONSchema7 | ZodType>(params: GenerateParams<StructuredOutput> & {
|
|
94
|
+
output?: never;
|
|
95
|
+
experimental_output: StructuredOutput;
|
|
96
|
+
}): Promise<GenerateReturn<any, undefined, StructuredOutput>>;
|
|
97
|
+
generateVNext<OUTPUT extends OutputSchema = undefined>(messages: MessageListInput, options?: Omit<StreamVNextParams<OUTPUT>, 'messages'>): Promise<ReturnType<MastraModelOutput['getFullOutput']>>;
|
|
98
|
+
generateVNext<OUTPUT extends OutputSchema = undefined>(params: StreamVNextParams<OUTPUT>): Promise<ReturnType<MastraModelOutput['getFullOutput']>>;
|
|
75
99
|
private processChatResponse;
|
|
76
100
|
/**
|
|
77
101
|
* Streams a response from the agent
|
|
@@ -81,9 +105,27 @@ export declare class Agent extends BaseResource {
|
|
|
81
105
|
stream<T extends JSONSchema7 | ZodType | undefined = undefined>(params: StreamParams<T>): Promise<Response & {
|
|
82
106
|
processDataStream: (options?: Omit<Parameters<typeof processDataStream>[0], 'stream'>) => Promise<void>;
|
|
83
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 & {
|
|
114
|
+
processDataStream: (options?: Omit<Parameters<typeof processDataStream>[0], 'stream'>) => Promise<void>;
|
|
115
|
+
}>;
|
|
84
116
|
private processChatResponse_vNext;
|
|
85
117
|
processStreamResponse_vNext(processedParams: any, writable: any): Promise<Response>;
|
|
86
|
-
|
|
118
|
+
network(params: NetworkStreamParams): Promise<Response & {
|
|
119
|
+
processDataStream: ({ onChunk, }: {
|
|
120
|
+
onChunk: Parameters<typeof processMastraNetworkStream>[0]['onChunk'];
|
|
121
|
+
}) => Promise<void>;
|
|
122
|
+
}>;
|
|
123
|
+
streamVNext<OUTPUT extends OutputSchema = undefined>(messages: MessageListInput, options?: Omit<StreamVNextParams<OUTPUT>, 'messages'>): Promise<Response & {
|
|
124
|
+
processDataStream: ({ onChunk, }: {
|
|
125
|
+
onChunk: Parameters<typeof processMastraStream>[0]['onChunk'];
|
|
126
|
+
}) => Promise<void>;
|
|
127
|
+
}>;
|
|
128
|
+
streamVNext<OUTPUT extends OutputSchema = undefined>(params: StreamVNextParams<OUTPUT>): Promise<Response & {
|
|
87
129
|
processDataStream: ({ onChunk, }: {
|
|
88
130
|
onChunk: Parameters<typeof processMastraStream>[0]['onChunk'];
|
|
89
131
|
}) => Promise<void>;
|
|
@@ -95,9 +137,10 @@ export declare class Agent extends BaseResource {
|
|
|
95
137
|
/**
|
|
96
138
|
* Gets details about a specific tool available to the agent
|
|
97
139
|
* @param toolId - ID of the tool to retrieve
|
|
140
|
+
* @param runtimeContext - Optional runtime context to pass as query parameter
|
|
98
141
|
* @returns Promise containing tool details
|
|
99
142
|
*/
|
|
100
|
-
getTool(toolId: string): Promise<GetToolResponse>;
|
|
143
|
+
getTool(toolId: string, runtimeContext?: RuntimeContext | Record<string, any>): Promise<GetToolResponse>;
|
|
101
144
|
/**
|
|
102
145
|
* Executes a tool for the agent
|
|
103
146
|
* @param toolId - ID of the tool to execute
|
|
@@ -106,18 +149,20 @@ export declare class Agent extends BaseResource {
|
|
|
106
149
|
*/
|
|
107
150
|
executeTool(toolId: string, params: {
|
|
108
151
|
data: any;
|
|
109
|
-
runtimeContext?: RuntimeContext
|
|
152
|
+
runtimeContext?: RuntimeContext | Record<string, any>;
|
|
110
153
|
}): Promise<any>;
|
|
111
154
|
/**
|
|
112
155
|
* Retrieves evaluation results for the agent
|
|
156
|
+
* @param runtimeContext - Optional runtime context to pass as query parameter
|
|
113
157
|
* @returns Promise containing agent evaluations
|
|
114
158
|
*/
|
|
115
|
-
evals(): Promise<GetEvalsByAgentIdResponse>;
|
|
159
|
+
evals(runtimeContext?: RuntimeContext | Record<string, any>): Promise<GetEvalsByAgentIdResponse>;
|
|
116
160
|
/**
|
|
117
161
|
* Retrieves live evaluation results for the agent
|
|
162
|
+
* @param runtimeContext - Optional runtime context to pass as query parameter
|
|
118
163
|
* @returns Promise containing live agent evaluations
|
|
119
164
|
*/
|
|
120
|
-
liveEvals(): Promise<GetEvalsByAgentIdResponse>;
|
|
165
|
+
liveEvals(runtimeContext?: RuntimeContext | Record<string, any>): Promise<GetEvalsByAgentIdResponse>;
|
|
121
166
|
/**
|
|
122
167
|
* Updates the model for the agent
|
|
123
168
|
* @param params - Parameters for updating the model
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/resources/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/resources/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAWvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACxE,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;AAEnC,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,yBAAyB,EACzB,eAAe,EACf,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,UAAU,CAAC;AAIlB,OAAO,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAEjG,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AA+EtC,qBAAa,UAAW,SAAQ,YAAY;IAGxC,OAAO,CAAC,OAAO;gBADf,OAAO,EAAE,aAAa,EACd,OAAO,EAAE,MAAM;IAMzB;;;;;OAKG;IACG,KAAK,CAAC,IAAI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G,CAAC,CAAA;KAAE,GAC3E,OAAO,CAAC,GAAG,CAAC;IAWf;;;;OAIG;IACH,KAAK,CAAC,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAIhG;;;;OAIG;IACH,SAAS,CAAC,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAGpG;;;;OAIG;IACH,WAAW,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CAMrE"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export * from './agent.js';
|
|
2
|
-
export * from './network.js';
|
|
3
2
|
export * from './memory-thread.js';
|
|
4
3
|
export * from './vector.js';
|
|
5
4
|
export * from './legacy-workflow.js';
|
|
@@ -8,5 +7,6 @@ export * from './base.js';
|
|
|
8
7
|
export * from './workflow.js';
|
|
9
8
|
export * from './a2a.js';
|
|
10
9
|
export * from './mcp-tool.js';
|
|
10
|
+
export * from './agent-builder.js';
|
|
11
11
|
export * from './observability.js';
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { RuntimeContext } from '@mastra/core/runtime-context';
|
|
1
2
|
import type { ClientOptions, LegacyWorkflowRunResult, GetLegacyWorkflowRunsResponse, GetWorkflowRunsParams, GetLegacyWorkflowResponse } from '../types.js';
|
|
2
3
|
import { BaseResource } from './base.js';
|
|
3
4
|
export declare class LegacyWorkflow extends BaseResource {
|
|
@@ -5,15 +6,17 @@ export declare class LegacyWorkflow extends BaseResource {
|
|
|
5
6
|
constructor(options: ClientOptions, workflowId: string);
|
|
6
7
|
/**
|
|
7
8
|
* Retrieves details about the legacy workflow
|
|
9
|
+
* @param runtimeContext - Optional runtime context to pass as query parameter
|
|
8
10
|
* @returns Promise containing legacy workflow details including steps and graphs
|
|
9
11
|
*/
|
|
10
|
-
details(): Promise<GetLegacyWorkflowResponse>;
|
|
12
|
+
details(runtimeContext?: RuntimeContext | Record<string, any>): Promise<GetLegacyWorkflowResponse>;
|
|
11
13
|
/**
|
|
12
14
|
* Retrieves all runs for a legacy workflow
|
|
13
15
|
* @param params - Parameters for filtering runs
|
|
16
|
+
* @param runtimeContext - Optional runtime context to pass as query parameter
|
|
14
17
|
* @returns Promise containing legacy workflow runs array
|
|
15
18
|
*/
|
|
16
|
-
runs(params?: GetWorkflowRunsParams): Promise<GetLegacyWorkflowRunsResponse>;
|
|
19
|
+
runs(params?: GetWorkflowRunsParams, runtimeContext?: RuntimeContext | Record<string, any>): Promise<GetLegacyWorkflowRunsResponse>;
|
|
17
20
|
/**
|
|
18
21
|
* Creates a new legacy workflow run
|
|
19
22
|
* @returns Promise containing the generated run ID
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legacy-workflow.d.ts","sourceRoot":"","sources":["../../src/resources/legacy-workflow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,uBAAuB,EACvB,6BAA6B,EA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;QACf,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KAC9B,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAUhC;;;;OAIG;IACH,UAAU,CAAC,MAAM,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;KAAE,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAa1G;;;;OAIG;IACH,WAAW,CAAC,MAAM,EAAE;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KAC9B,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAUpC;;;;;;OAMG;YACY,eAAe;IAgE9B;;;;OAIG;IACG,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,uBAAuB,KAAK,IAAI;CAiB/F"}
|
|
@@ -11,9 +11,10 @@ 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 runtimeContext - Optional runtime context to pass as query parameter
|
|
14
15
|
* @returns Promise containing the tool's information (name, description, schema).
|
|
15
16
|
*/
|
|
16
|
-
details(): Promise<McpToolInfo>;
|
|
17
|
+
details(runtimeContext?: RuntimeContext | Record<string, any>): Promise<McpToolInfo>;
|
|
17
18
|
/**
|
|
18
19
|
* Executes this specific tool on the MCP server.
|
|
19
20
|
* @param params - Parameters for tool execution, including data/args and optional runtimeContext.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-tool.d.ts","sourceRoot":"","sources":["../../src/resources/mcp-tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"mcp-tool.d.ts","sourceRoot":"","sources":["../../src/resources/mcp-tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE3D,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC;;;GAGG;AACH,qBAAa,OAAQ,SAAQ,YAAY;IACvC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,MAAM,CAAS;gBAEX,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAMpE;;;;OAIG;IACH,OAAO,CAAC,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC;IAIpF;;;;OAIG;IACH,OAAO,CAAC,MAAM,EAAE;QAAE,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,cAAc,CAAC,EAAE,cAAc,CAAA;KAAE,GAAG,OAAO,CAAC,GAAG,CAAC;CAgB/E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observability.d.ts","sourceRoot":"","sources":["../../src/resources/observability.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACnE,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,aAAa,CAAC;IAIjD;;;;OAIG;IACH,SAAS,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"observability.d.ts","sourceRoot":"","sources":["../../src/resources/observability.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACnE,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,aAAa,CAAC;IAIjD;;;;OAIG;IACH,SAAS,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,mBAAmB,CAAC;CAkCtE"}
|
package/dist/resources/tool.d.ts
CHANGED
|
@@ -6,9 +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 runtimeContext - Optional runtime context to pass as query parameter
|
|
9
10
|
* @returns Promise containing tool details including description and schemas
|
|
10
11
|
*/
|
|
11
|
-
details(): Promise<GetToolResponse>;
|
|
12
|
+
details(runtimeContext?: RuntimeContext | Record<string, any>): Promise<GetToolResponse>;
|
|
12
13
|
/**
|
|
13
14
|
* Executes the tool with the provided parameters
|
|
14
15
|
* @param params - Parameters required for tool execution
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../../src/resources/tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG/D,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,qBAAa,IAAK,SAAQ,YAAY;IAGlC,OAAO,CAAC,MAAM;gBADd,OAAO,EAAE,aAAa,EACd,MAAM,EAAE,MAAM;IAKxB
|
|
1
|
+
{"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../../src/resources/tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG/D,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,qBAAa,IAAK,SAAQ,YAAY;IAGlC,OAAO,CAAC,MAAM;gBADd,OAAO,EAAE,aAAa,EACd,MAAM,EAAE,MAAM;IAKxB;;;;OAIG;IACH,OAAO,CAAC,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,eAAe,CAAC;IAIxF;;;;OAIG;IACH,OAAO,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,GAAG,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;KAAE,GAAG,OAAO,CAAC,GAAG,CAAC;CAiBpH"}
|
|
@@ -7,9 +7,10 @@ export declare class VNextNetwork extends BaseResource {
|
|
|
7
7
|
constructor(options: ClientOptions, networkId: string);
|
|
8
8
|
/**
|
|
9
9
|
* Retrieves details about the network
|
|
10
|
+
* @param runtimeContext - Optional runtime context to pass as query parameter
|
|
10
11
|
* @returns Promise containing vNext network details
|
|
11
12
|
*/
|
|
12
|
-
details(): Promise<GetVNextNetworkResponse>;
|
|
13
|
+
details(runtimeContext?: RuntimeContext | Record<string, any>): Promise<GetVNextNetworkResponse>;
|
|
13
14
|
/**
|
|
14
15
|
* Generates a response from the v-next network
|
|
15
16
|
* @param params - Generation parameters including message
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vNextNetwork.d.ts","sourceRoot":"","sources":["../../src/resources/vNextNetwork.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,KAAK,EACV,aAAa,EACb,uBAAuB,EACvB,4BAA4B,EAC5B,wBAAwB,EACxB,kCAAkC,EAClC,4BAA4B,EAC7B,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAItC,qBAAa,YAAa,SAAQ,YAAY;IAG1C,OAAO,CAAC,SAAS;gBADjB,OAAO,EAAE,aAAa,EACd,SAAS,EAAE,MAAM;IAK3B
|
|
1
|
+
{"version":3,"file":"vNextNetwork.d.ts","sourceRoot":"","sources":["../../src/resources/vNextNetwork.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,KAAK,EACV,aAAa,EACb,uBAAuB,EACvB,4BAA4B,EAC5B,wBAAwB,EACxB,kCAAkC,EAClC,4BAA4B,EAC7B,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAItC,qBAAa,YAAa,SAAQ,YAAY;IAG1C,OAAO,CAAC,SAAS;gBADjB,OAAO,EAAE,aAAa,EACd,SAAS,EAAE,MAAM;IAK3B;;;;OAIG;IACH,OAAO,CAAC,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAIhG;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,kCAAkC,GAAG,OAAO,CAAC,4BAA4B,CAAC;IAU3F;;;;OAIG;IACH,IAAI,CAAC,MAAM,EAAE;QACX,OAAO,EAAE,MAAM,CAAC;QAChB,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KACvD,GAAG,OAAO,CAAC,wBAAwB,CAAC;YAUtB,eAAe;IAgE9B;;;;OAIG;IACG,MAAM,CAAC,MAAM,EAAE,kCAAkC,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI;IA2B/F;;;;OAIG;IACG,UAAU,CAAC,MAAM,EAAE,4BAA4B,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI;CA0B9F"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { RuntimeContext } from '@mastra/core/runtime-context';
|
|
1
2
|
import type { CreateIndexParams, GetVectorIndexResponse, QueryVectorParams, QueryVectorResponse, ClientOptions, UpsertVectorParams } from '../types.js';
|
|
2
3
|
import { BaseResource } from './base.js';
|
|
3
4
|
export declare class Vector extends BaseResource {
|
|
@@ -6,9 +7,10 @@ export declare class Vector extends BaseResource {
|
|
|
6
7
|
/**
|
|
7
8
|
* Retrieves details about a specific vector index
|
|
8
9
|
* @param indexName - Name of the index to get details for
|
|
10
|
+
* @param runtimeContext - Optional runtime context to pass as query parameter
|
|
9
11
|
* @returns Promise containing vector index details
|
|
10
12
|
*/
|
|
11
|
-
details(indexName: string): Promise<GetVectorIndexResponse>;
|
|
13
|
+
details(indexName: string, runtimeContext?: RuntimeContext | Record<string, any>): Promise<GetVectorIndexResponse>;
|
|
12
14
|
/**
|
|
13
15
|
* Deletes a vector index
|
|
14
16
|
* @param indexName - Name of the index to delete
|
|
@@ -19,9 +21,10 @@ export declare class Vector extends BaseResource {
|
|
|
19
21
|
}>;
|
|
20
22
|
/**
|
|
21
23
|
* Retrieves a list of all available indexes
|
|
24
|
+
* @param runtimeContext - Optional runtime context to pass as query parameter
|
|
22
25
|
* @returns Promise containing array of index names
|
|
23
26
|
*/
|
|
24
|
-
getIndexes(): Promise<{
|
|
27
|
+
getIndexes(runtimeContext?: RuntimeContext | Record<string, any>): Promise<{
|
|
25
28
|
indexes: string[];
|
|
26
29
|
}>;
|
|
27
30
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vector.d.ts","sourceRoot":"","sources":["../../src/resources/vector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EACnB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"vector.d.ts","sourceRoot":"","sources":["../../src/resources/vector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EACV,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EACnB,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,qBAAa,MAAO,SAAQ,YAAY;IAGpC,OAAO,CAAC,UAAU;gBADlB,OAAO,EAAE,aAAa,EACd,UAAU,EAAE,MAAM;IAK5B;;;;;OAKG;IACH,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAMlH;;;;OAIG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,C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