@mastra/client-js 0.0.0-fix-message-list-args-missing-20250807205055 → 0.0.0-fix-zod-to-json-schema-ref-strategy-20250910193441
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 +512 -3
- package/README.md +5 -3
- package/dist/client.d.ts +21 -6
- package/dist/client.d.ts.map +1 -1
- package/dist/index.cjs +1235 -376
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1237 -378
- package/dist/index.js.map +1 -1
- package/dist/resources/a2a.d.ts +13 -16
- package/dist/resources/a2a.d.ts.map +1 -1
- package/dist/resources/agent-builder.d.ts +161 -0
- package/dist/resources/agent-builder.d.ts.map +1 -0
- package/dist/resources/agent.d.ts +50 -7
- package/dist/resources/agent.d.ts.map +1 -1
- package/dist/resources/base.d.ts.map +1 -1
- package/dist/resources/index.d.ts +2 -0
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/memory-thread.d.ts +1 -1
- package/dist/resources/memory-thread.d.ts.map +1 -1
- package/dist/resources/network-memory-thread.d.ts +1 -1
- package/dist/resources/network-memory-thread.d.ts.map +1 -1
- package/dist/resources/network.d.ts +1 -1
- package/dist/resources/network.d.ts.map +1 -1
- package/dist/resources/observability.d.ts +19 -0
- package/dist/resources/observability.d.ts.map +1 -0
- package/dist/resources/tool.d.ts.map +1 -1
- package/dist/resources/vNextNetwork.d.ts +1 -1
- package/dist/resources/vNextNetwork.d.ts.map +1 -1
- package/dist/resources/workflow.d.ts +15 -0
- package/dist/resources/workflow.d.ts.map +1 -1
- package/dist/types.d.ts +42 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/process-client-tools.d.ts.map +1 -1
- package/dist/utils/process-mastra-stream.d.ts +7 -0
- package/dist/utils/process-mastra-stream.d.ts.map +1 -0
- package/dist/utils/zod-to-json-schema.d.ts +2 -104
- package/dist/utils/zod-to-json-schema.d.ts.map +1 -1
- package/package.json +22 -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/eslint.config.js +0 -6
- 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 -322
- package/src/adapters/agui.ts +0 -257
- package/src/client.ts +0 -623
- package/src/example.ts +0 -95
- package/src/index.test.ts +0 -1226
- package/src/index.ts +0 -3
- package/src/resources/a2a.ts +0 -88
- package/src/resources/agent.ts +0 -785
- package/src/resources/base.ts +0 -76
- package/src/resources/index.ts +0 -10
- 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/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 -502
- package/src/utils/index.ts +0 -11
- package/src/utils/process-client-tools.ts +0 -32
- package/src/utils/zod-to-json-schema.ts +0 -10
- 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
package/dist/resources/a2a.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AgentCard, GetTaskResponse, MessageSendParams, SendMessageResponse, SendStreamingMessageResponse, Task, TaskQueryParams } from '@mastra/core/a2a';
|
|
2
2
|
import type { ClientOptions } from '../types.js';
|
|
3
3
|
import { BaseResource } from './base.js';
|
|
4
4
|
/**
|
|
@@ -13,32 +13,29 @@ export declare class A2A extends BaseResource {
|
|
|
13
13
|
*/
|
|
14
14
|
getCard(): Promise<AgentCard>;
|
|
15
15
|
/**
|
|
16
|
-
* Send a message to the agent and
|
|
16
|
+
* Send a message to the agent and gets a message or task response
|
|
17
17
|
* @param params - Parameters for the task
|
|
18
|
-
* @returns Promise containing the
|
|
18
|
+
* @returns Promise containing the response
|
|
19
|
+
*/
|
|
20
|
+
sendMessage(params: MessageSendParams): Promise<SendMessageResponse>;
|
|
21
|
+
/**
|
|
22
|
+
* Sends a message to an agent to initiate/continue a task and subscribes
|
|
23
|
+
* the client to real-time updates for that task via Server-Sent Events (SSE).
|
|
24
|
+
* @param params - Parameters for the task
|
|
25
|
+
* @returns A stream of Server-Sent Events. Each SSE `data` field contains a `SendStreamingMessageResponse`
|
|
19
26
|
*/
|
|
20
|
-
|
|
21
|
-
task: Task;
|
|
22
|
-
}>;
|
|
27
|
+
sendStreamingMessage(params: MessageSendParams): Promise<AsyncIterable<SendStreamingMessageResponse>>;
|
|
23
28
|
/**
|
|
24
29
|
* Get the status and result of a task
|
|
25
30
|
* @param params - Parameters for querying the task
|
|
26
31
|
* @returns Promise containing the task response
|
|
27
32
|
*/
|
|
28
|
-
getTask(params: TaskQueryParams): Promise<
|
|
33
|
+
getTask(params: TaskQueryParams): Promise<GetTaskResponse>;
|
|
29
34
|
/**
|
|
30
35
|
* Cancel a running task
|
|
31
36
|
* @param params - Parameters identifying the task to cancel
|
|
32
37
|
* @returns Promise containing the task response
|
|
33
38
|
*/
|
|
34
|
-
cancelTask(params:
|
|
35
|
-
task: Task;
|
|
36
|
-
}>;
|
|
37
|
-
/**
|
|
38
|
-
* Send a message and subscribe to streaming updates (not fully implemented)
|
|
39
|
-
* @param params - Parameters for the task
|
|
40
|
-
* @returns Promise containing the task response
|
|
41
|
-
*/
|
|
42
|
-
sendAndSubscribe(params: TaskSendParams): Promise<Response>;
|
|
39
|
+
cancelTask(params: TaskQueryParams): Promise<Task>;
|
|
43
40
|
}
|
|
44
41
|
//# sourceMappingURL=a2a.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a2a.d.ts","sourceRoot":"","sources":["../../src/resources/a2a.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"a2a.d.ts","sourceRoot":"","sources":["../../src/resources/a2a.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,4BAA4B,EAC5B,IAAI,EACJ,eAAe,EAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,qBAAa,GAAI,SAAQ,YAAY;IAGjC,OAAO,CAAC,OAAO;gBADf,OAAO,EAAE,aAAa,EACd,OAAO,EAAE,MAAM;IAKzB;;;OAGG;IACG,OAAO,IAAI,OAAO,CAAC,SAAS,CAAC;IAInC;;;;OAIG;IACG,WAAW,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAY1E;;;;;OAKG;IACG,oBAAoB,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,aAAa,CAAC,4BAA4B,CAAC,CAAC;IAY3G;;;;OAIG;IACG,OAAO,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;IAYhE;;;;OAIG;IACG,UAAU,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;CASzD"}
|
|
@@ -0,0 +1,161 @@
|
|
|
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
|
+
* Creates a new agent builder action run and returns the runId.
|
|
30
|
+
* This calls `/api/agent-builder/:actionId/create-run`.
|
|
31
|
+
*/
|
|
32
|
+
createRun(params?: {
|
|
33
|
+
runId?: string;
|
|
34
|
+
}): Promise<{
|
|
35
|
+
runId: string;
|
|
36
|
+
}>;
|
|
37
|
+
/**
|
|
38
|
+
* Creates a new workflow run (alias for createRun)
|
|
39
|
+
* @param params - Optional object containing the optional runId
|
|
40
|
+
* @returns Promise containing the runId of the created run
|
|
41
|
+
*/
|
|
42
|
+
createRunAsync(params?: {
|
|
43
|
+
runId?: string;
|
|
44
|
+
}): Promise<{
|
|
45
|
+
runId: string;
|
|
46
|
+
}>;
|
|
47
|
+
/**
|
|
48
|
+
* Starts agent builder action asynchronously and waits for completion.
|
|
49
|
+
* This calls `/api/agent-builder/:actionId/start-async`.
|
|
50
|
+
*/
|
|
51
|
+
startAsync(params: AgentBuilderActionRequest, runId?: string): Promise<AgentBuilderActionResult>;
|
|
52
|
+
/**
|
|
53
|
+
* Starts an existing agent builder action run.
|
|
54
|
+
* This calls `/api/agent-builder/:actionId/start`.
|
|
55
|
+
*/
|
|
56
|
+
startActionRun(params: AgentBuilderActionRequest, runId: string): Promise<{
|
|
57
|
+
message: string;
|
|
58
|
+
}>;
|
|
59
|
+
/**
|
|
60
|
+
* Resumes a suspended agent builder action step.
|
|
61
|
+
* This calls `/api/agent-builder/:actionId/resume`.
|
|
62
|
+
*/
|
|
63
|
+
resume(params: {
|
|
64
|
+
step: string | string[];
|
|
65
|
+
resumeData?: unknown;
|
|
66
|
+
runtimeContext?: RuntimeContext;
|
|
67
|
+
}, runId: string): Promise<{
|
|
68
|
+
message: string;
|
|
69
|
+
}>;
|
|
70
|
+
/**
|
|
71
|
+
* Resumes a suspended agent builder action step asynchronously.
|
|
72
|
+
* This calls `/api/agent-builder/:actionId/resume-async`.
|
|
73
|
+
*/
|
|
74
|
+
resumeAsync(params: {
|
|
75
|
+
step: string | string[];
|
|
76
|
+
resumeData?: unknown;
|
|
77
|
+
runtimeContext?: RuntimeContext;
|
|
78
|
+
}, runId: string): Promise<AgentBuilderActionResult>;
|
|
79
|
+
/**
|
|
80
|
+
* Creates an async generator that processes a readable stream and yields action records
|
|
81
|
+
* separated by the Record Separator character (\x1E)
|
|
82
|
+
*
|
|
83
|
+
* @param stream - The readable stream to process
|
|
84
|
+
* @returns An async generator that yields parsed records
|
|
85
|
+
*/
|
|
86
|
+
private streamProcessor;
|
|
87
|
+
/**
|
|
88
|
+
* Streams agent builder action progress in real-time.
|
|
89
|
+
* This calls `/api/agent-builder/:actionId/stream`.
|
|
90
|
+
*/
|
|
91
|
+
stream(params: AgentBuilderActionRequest, runId?: string): Promise<import("stream/web").ReadableStream<{
|
|
92
|
+
type: string;
|
|
93
|
+
payload: any;
|
|
94
|
+
}>>;
|
|
95
|
+
/**
|
|
96
|
+
* Streams agent builder action progress in real-time using VNext streaming.
|
|
97
|
+
* This calls `/api/agent-builder/:actionId/streamVNext`.
|
|
98
|
+
*/
|
|
99
|
+
streamVNext(params: AgentBuilderActionRequest, runId?: string): Promise<import("stream/web").ReadableStream<{
|
|
100
|
+
type: string;
|
|
101
|
+
payload: any;
|
|
102
|
+
}>>;
|
|
103
|
+
/**
|
|
104
|
+
* Watches an existing agent builder action run by runId.
|
|
105
|
+
* This is used for hot reload recovery - it loads the existing run state
|
|
106
|
+
* and streams any remaining progress.
|
|
107
|
+
* This calls `/api/agent-builder/:actionId/watch`.
|
|
108
|
+
*/
|
|
109
|
+
watch({ runId, eventType }: {
|
|
110
|
+
runId: string;
|
|
111
|
+
eventType?: 'watch' | 'watch-v2';
|
|
112
|
+
}, onRecord: (record: {
|
|
113
|
+
type: string;
|
|
114
|
+
payload: any;
|
|
115
|
+
}) => void): Promise<void>;
|
|
116
|
+
/**
|
|
117
|
+
* Gets a specific action run by its ID.
|
|
118
|
+
* This calls `/api/agent-builder/:actionId/runs/:runId`.
|
|
119
|
+
*/
|
|
120
|
+
runById(runId: string): Promise<unknown>;
|
|
121
|
+
/**
|
|
122
|
+
* Gets details about this agent builder action.
|
|
123
|
+
* This calls `/api/agent-builder/:actionId`.
|
|
124
|
+
*/
|
|
125
|
+
details(): Promise<WorkflowInfo>;
|
|
126
|
+
/**
|
|
127
|
+
* Gets all runs for this agent builder action.
|
|
128
|
+
* This calls `/api/agent-builder/:actionId/runs`.
|
|
129
|
+
*/
|
|
130
|
+
runs(params?: {
|
|
131
|
+
fromDate?: Date;
|
|
132
|
+
toDate?: Date;
|
|
133
|
+
limit?: number;
|
|
134
|
+
offset?: number;
|
|
135
|
+
resourceId?: string;
|
|
136
|
+
}): Promise<unknown>;
|
|
137
|
+
/**
|
|
138
|
+
* Gets the execution result of an agent builder action run.
|
|
139
|
+
* This calls `/api/agent-builder/:actionId/runs/:runId/execution-result`.
|
|
140
|
+
*/
|
|
141
|
+
runExecutionResult(runId: string): Promise<unknown>;
|
|
142
|
+
/**
|
|
143
|
+
* Cancels an agent builder action run.
|
|
144
|
+
* This calls `/api/agent-builder/:actionId/runs/:runId/cancel`.
|
|
145
|
+
*/
|
|
146
|
+
cancelRun(runId: string): Promise<{
|
|
147
|
+
message: string;
|
|
148
|
+
}>;
|
|
149
|
+
/**
|
|
150
|
+
* Sends an event to an agent builder action run.
|
|
151
|
+
* This calls `/api/agent-builder/:actionId/runs/:runId/send-event`.
|
|
152
|
+
*/
|
|
153
|
+
sendRunEvent(params: {
|
|
154
|
+
runId: string;
|
|
155
|
+
event: string;
|
|
156
|
+
data: unknown;
|
|
157
|
+
}): Promise<{
|
|
158
|
+
message: string;
|
|
159
|
+
}>;
|
|
160
|
+
}
|
|
161
|
+
//# 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,uBAAuB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{ RuntimeContext } from '@mastra/core/runtime-context';
|
|
4
|
+
import type { OutputSchema, MastraModelOutput } from '@mastra/core/stream';
|
|
3
5
|
import type { JSONSchema7 } from 'json-schema';
|
|
4
|
-
import { ZodSchema } from 'zod';
|
|
5
|
-
import type { GenerateParams, GetAgentResponse, GetEvalsByAgentIdResponse, GetToolResponse, ClientOptions, StreamParams } from '../types.js';
|
|
6
|
+
import type { ZodType, ZodSchema } 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';
|
|
6
9
|
import { BaseResource } from './base.js';
|
|
7
|
-
import type { RuntimeContext } from '@mastra/core/runtime-context';
|
|
8
10
|
export declare class AgentVoice extends BaseResource {
|
|
9
11
|
private agentId;
|
|
10
12
|
constructor(options: ClientOptions, agentId: string);
|
|
@@ -61,23 +63,56 @@ export declare class Agent extends BaseResource {
|
|
|
61
63
|
output?: never;
|
|
62
64
|
experimental_output?: never;
|
|
63
65
|
}): Promise<GenerateReturn<any, undefined, undefined>>;
|
|
64
|
-
generate<Output extends JSONSchema7 |
|
|
66
|
+
generate<Output extends JSONSchema7 | ZodType>(params: GenerateParams<Output> & {
|
|
65
67
|
output: Output;
|
|
66
68
|
experimental_output?: never;
|
|
67
69
|
}): Promise<GenerateReturn<any, Output, undefined>>;
|
|
68
|
-
generate<StructuredOutput extends JSONSchema7 |
|
|
70
|
+
generate<StructuredOutput extends JSONSchema7 | ZodType>(params: GenerateParams<StructuredOutput> & {
|
|
69
71
|
output?: never;
|
|
70
72
|
experimental_output: StructuredOutput;
|
|
71
73
|
}): Promise<GenerateReturn<any, undefined, StructuredOutput>>;
|
|
74
|
+
/**
|
|
75
|
+
* Generates a response from the agent
|
|
76
|
+
* @param params - Generation parameters including prompt
|
|
77
|
+
* @returns Promise containing the generated response
|
|
78
|
+
*/
|
|
79
|
+
generateLegacy(params: GenerateParams<undefined> & {
|
|
80
|
+
output?: never;
|
|
81
|
+
experimental_output?: never;
|
|
82
|
+
}): Promise<GenerateReturn<any, undefined, undefined>>;
|
|
83
|
+
generateLegacy<Output extends JSONSchema7 | ZodType>(params: GenerateParams<Output> & {
|
|
84
|
+
output: Output;
|
|
85
|
+
experimental_output?: never;
|
|
86
|
+
}): Promise<GenerateReturn<any, Output, undefined>>;
|
|
87
|
+
generateLegacy<StructuredOutput extends JSONSchema7 | ZodType>(params: GenerateParams<StructuredOutput> & {
|
|
88
|
+
output?: never;
|
|
89
|
+
experimental_output: StructuredOutput;
|
|
90
|
+
}): Promise<GenerateReturn<any, undefined, StructuredOutput>>;
|
|
91
|
+
generateVNext<T extends OutputSchema | undefined = undefined, STRUCTURED_OUTPUT extends ZodSchema | JSONSchema7 | undefined = undefined>(params: StreamVNextParams<T, STRUCTURED_OUTPUT>): Promise<ReturnType<MastraModelOutput['getFullOutput']>>;
|
|
72
92
|
private processChatResponse;
|
|
73
93
|
/**
|
|
74
94
|
* Streams a response from the agent
|
|
75
95
|
* @param params - Stream parameters including prompt
|
|
76
96
|
* @returns Promise containing the enhanced Response object with processDataStream method
|
|
77
97
|
*/
|
|
78
|
-
stream<T extends JSONSchema7 |
|
|
98
|
+
stream<T extends JSONSchema7 | ZodType | undefined = undefined>(params: StreamParams<T>): Promise<Response & {
|
|
79
99
|
processDataStream: (options?: Omit<Parameters<typeof processDataStream>[0], 'stream'>) => Promise<void>;
|
|
80
100
|
}>;
|
|
101
|
+
/**
|
|
102
|
+
* Streams a response from the agent
|
|
103
|
+
* @param params - Stream parameters including prompt
|
|
104
|
+
* @returns Promise containing the enhanced Response object with processDataStream method
|
|
105
|
+
*/
|
|
106
|
+
streamLegacy<T extends JSONSchema7 | ZodType | undefined = undefined>(params: StreamParams<T>): Promise<Response & {
|
|
107
|
+
processDataStream: (options?: Omit<Parameters<typeof processDataStream>[0], 'stream'>) => Promise<void>;
|
|
108
|
+
}>;
|
|
109
|
+
private processChatResponse_vNext;
|
|
110
|
+
processStreamResponse_vNext(processedParams: any, writable: any): Promise<Response>;
|
|
111
|
+
streamVNext<T extends OutputSchema | undefined = undefined, STRUCTURED_OUTPUT extends ZodSchema | JSONSchema7 | undefined = undefined>(params: StreamVNextParams<T, STRUCTURED_OUTPUT>): Promise<Response & {
|
|
112
|
+
processDataStream: ({ onChunk, }: {
|
|
113
|
+
onChunk: Parameters<typeof processMastraStream>[0]['onChunk'];
|
|
114
|
+
}) => Promise<void>;
|
|
115
|
+
}>;
|
|
81
116
|
/**
|
|
82
117
|
* Processes the stream response and handles tool calls
|
|
83
118
|
*/
|
|
@@ -108,5 +143,13 @@ export declare class Agent extends BaseResource {
|
|
|
108
143
|
* @returns Promise containing live agent evaluations
|
|
109
144
|
*/
|
|
110
145
|
liveEvals(): Promise<GetEvalsByAgentIdResponse>;
|
|
146
|
+
/**
|
|
147
|
+
* Updates the model for the agent
|
|
148
|
+
* @param params - Parameters for updating the model
|
|
149
|
+
* @returns Promise containing the updated model
|
|
150
|
+
*/
|
|
151
|
+
updateModel(params: UpdateModelParams): Promise<{
|
|
152
|
+
message: string;
|
|
153
|
+
}>;
|
|
111
154
|
}
|
|
112
155
|
//# sourceMappingURL=agent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/resources/agent.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/resources/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAYvE,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,OA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AC;gBAEpB,OAAO,EAAE,aAAa;IAIlC;;;;;OAKG;IACU,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/resources/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9D,qBAAa,YAAY;IACvB,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;gBAEpB,OAAO,EAAE,aAAa;IAIlC;;;;;OAKG;IACU,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,CAAC,CAAC;CA6DhF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,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"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,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,4 +1,4 @@
|
|
|
1
|
-
import type { StorageThreadType } from '@mastra/core';
|
|
1
|
+
import type { StorageThreadType } from '@mastra/core/memory';
|
|
2
2
|
import type { GetMemoryThreadMessagesResponse, ClientOptions, UpdateMemoryThreadParams, GetMemoryThreadMessagesParams, GetMemoryThreadMessagesPaginatedParams, GetMemoryThreadMessagesPaginatedResponse } from '../types.js';
|
|
3
3
|
import { BaseResource } from './base.js';
|
|
4
4
|
export declare class MemoryThread extends BaseResource {
|
|
@@ -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,
|
|
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,aAAa,EACb,wBAAwB,EACxB,6BAA6B,EAC7B,sCAAsC,EACtC,wCAAwC,EACzC,MAAM,UAAU,CAAC;AAElB,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;;;OAGG;IACH,GAAG,IAAI,OAAO,CAAC,iBAAiB,CAAC;IAIjC;;;;OAIG;IACH,MAAM,CAAC,MAAM,EAAE,wBAAwB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAOpE;;;OAGG;IACH,MAAM,IAAI,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAMrC;;;;OAIG;IACH,WAAW,CAAC,MAAM,CAAC,EAAE,6BAA6B,GAAG,OAAO,CAAC,+BAA+B,CAAC;IAQ7F;;;;OAIG;IACH,oBAAoB,CAAC,EACnB,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,sCAAsC,GAAG,OAAO,CAAC,wCAAwC,CAAC;IAQ7F;;;;;OAKG;IACH,cAAc,CACZ,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,EAAE,GAChE,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CASlD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { StorageThreadType } from '@mastra/core';
|
|
1
|
+
import type { StorageThreadType } from '@mastra/core/memory';
|
|
2
2
|
import type { GetMemoryThreadMessagesResponse, ClientOptions, UpdateMemoryThreadParams, GetMemoryThreadMessagesParams } from '../types.js';
|
|
3
3
|
import { BaseResource } from './base.js';
|
|
4
4
|
export declare class NetworkMemoryThread extends BaseResource {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network-memory-thread.d.ts","sourceRoot":"","sources":["../../src/resources/network-memory-thread.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"network-memory-thread.d.ts","sourceRoot":"","sources":["../../src/resources/network-memory-thread.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,KAAK,EACV,+BAA+B,EAC/B,aAAa,EACb,wBAAwB,EACxB,6BAA6B,EAC9B,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,qBAAa,mBAAoB,SAAQ,YAAY;IAGjD,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,SAAS;gBAFjB,OAAO,EAAE,aAAa,EACd,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM;IAK3B;;;OAGG;IACH,GAAG,IAAI,OAAO,CAAC,iBAAiB,CAAC;IAIjC;;;;OAIG;IACH,MAAM,CAAC,MAAM,EAAE,wBAAwB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAOpE;;;OAGG;IACH,MAAM,IAAI,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAMrC;;;;OAIG;IACH,WAAW,CAAC,MAAM,CAAC,EAAE,6BAA6B,GAAG,OAAO,CAAC,+BAA+B,CAAC;IAQ7F;;;;;OAKG;IACH,cAAc,CACZ,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,EAAE,GAChE,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CASlD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { processDataStream } from '@ai-sdk/ui-utils';
|
|
2
|
-
import type { GenerateReturn } from '@mastra/core';
|
|
2
|
+
import type { GenerateReturn } from '@mastra/core/llm';
|
|
3
3
|
import type { JSONSchema7 } from 'json-schema';
|
|
4
4
|
import type { ZodSchema } from 'zod';
|
|
5
5
|
import type { GenerateParams, ClientOptions, StreamParams, GetNetworkResponse } from '../types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../src/resources/network.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../src/resources/network.ts"],"names":[],"mappings":"AAAA,O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ptions, GetAITracesResponse } from '../types.js';
|
|
3
|
+
import { BaseResource } from './base.js';
|
|
4
|
+
export declare class Observability extends BaseResource {
|
|
5
|
+
constructor(options: ClientOptions);
|
|
6
|
+
/**
|
|
7
|
+
* Retrieves a specific AI trace by ID
|
|
8
|
+
* @param traceId - ID of the trace to retrieve
|
|
9
|
+
* @returns Promise containing the AI trace with all its spans
|
|
10
|
+
*/
|
|
11
|
+
getTrace(traceId: string): Promise<AITraceRecord>;
|
|
12
|
+
/**
|
|
13
|
+
* Retrieves paginated list of AI traces with optional filtering
|
|
14
|
+
* @param params - Parameters for pagination and filtering
|
|
15
|
+
* @returns Promise containing paginated traces and pagination info
|
|
16
|
+
*/
|
|
17
|
+
getTraces(params: AITracesPaginatedArg): Promise<GetAITracesResponse>;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=observability.d.ts.map
|
|
@@ -0,0 +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;CAkCtE"}
|
|
@@ -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;
|
|
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;;;OAGG;IACH,OAAO,IAAI,OAAO,CAAC,eAAe,CAAC;IAInC;;;;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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { RuntimeContext } from '@mastra/core/runtime-context';
|
|
1
2
|
import type { WatchEvent } from '@mastra/core/workflows';
|
|
2
3
|
import type { ClientOptions, GetVNextNetworkResponse, GenerateVNextNetworkResponse, LoopVNextNetworkResponse, GenerateOrStreamVNextNetworkParams, LoopStreamVNextNetworkParams } from '../types.js';
|
|
3
4
|
import { BaseResource } from './base.js';
|
|
4
|
-
import type { RuntimeContext } from '@mastra/core/runtime-context';
|
|
5
5
|
export declare class VNextNetwork extends BaseResource {
|
|
6
6
|
private networkId;
|
|
7
7
|
constructor(options: ClientOptions, networkId: string);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vNextNetwork.d.ts","sourceRoot":"","sources":["../../src/resources/vNextNetwork.ts"],"names":[],"mappings":"A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,KAAK,IAAI;CA0B9F"}
|
|
@@ -123,6 +123,21 @@ export declare class Workflow extends BaseResource {
|
|
|
123
123
|
type: string;
|
|
124
124
|
payload: any;
|
|
125
125
|
}>>;
|
|
126
|
+
/**
|
|
127
|
+
* Starts a workflow run and returns a stream
|
|
128
|
+
* @param params - Object containing the optional runId, inputData and runtimeContext
|
|
129
|
+
* @returns Promise containing the workflow execution results
|
|
130
|
+
*/
|
|
131
|
+
streamVNext(params: {
|
|
132
|
+
runId?: string;
|
|
133
|
+
inputData: Record<string, any>;
|
|
134
|
+
runtimeContext?: RuntimeContext;
|
|
135
|
+
}): Promise<import("stream/web").ReadableStream<{
|
|
136
|
+
type: string;
|
|
137
|
+
payload: any;
|
|
138
|
+
runId: string;
|
|
139
|
+
from: "AGENT" | "WORKFLOW";
|
|
140
|
+
}>>;
|
|
126
141
|
/**
|
|
127
142
|
* Resumes a suspended workflow step asynchronously and returns a promise that resolves when the workflow is complete
|
|
128
143
|
* @param params - Object containing the runId, step, resumeData and runtimeContext
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/resources/workflow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACnB,uBAAuB,EACvB,qBAAqB,EACrB,iBAAiB,EACjB,mBAAmB,EACnB,0BAA0B,EAC1B,qCAAqC,EACtC,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAItC,qBAAa,QAAS,SAAQ,YAAY;IAGtC,OAAO,CAAC,UAAU;gBADlB,OAAO,EAAE,aAAa,EACd,UAAU,EAAE,MAAM;IAK5B;;;;;;OAMG;YACY,eAAe;IAgE9B;;;OAGG;IACH,OAAO,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAIvC;;;;OAIG;IACH,IAAI,CAAC,MAA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AAC;IAe9B;;;;OAIG;IACG,MAAM,CAAC,MAAM,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAAC,cAAc,CAAC,EAAE,cAAc,CAAA;KAAE;cA6BrC,MAAM;iBAAW,GAAG;;IAiCvF;;;;OAIG;IACG,WAAW,CAAC,MAAM,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAAC,cAAc,CAAC,EAAE,cAAc,CAAA;KAAE;cA+BjG,MAAM;iBAAW,GAAG;eAAS,MAAM;cAAQ,OAAO,GAAG,UAAU;;IAkC3E;;;;OAIG;IACH,WAAW,CAAC,MAAM,EAAE;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;QACxB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QACjC,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KACvD,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAY9B;;;;OAIG;IACG,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI;IAsB1F;;;;;;OAMG;IACH,MAAM,CAAC,kBAAkB,CAAC,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC,GAAG,cAAc;CAgBvF"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { AgentExecutionOptions, AgentGenerateOptions, AgentStreamOptions, StructuredOutputOptions, ToolsInput, UIMessageWithMetadata } from '@mastra/core/agent';
|
|
2
|
+
import type { MessageListInput } from '@mastra/core/agent/message-list';
|
|
3
|
+
import type { CoreMessage } from '@mastra/core/llm';
|
|
3
4
|
import type { BaseLogMessage, LogLevel } from '@mastra/core/logger';
|
|
4
5
|
import type { MCPToolType, ServerInfo } from '@mastra/core/mcp';
|
|
6
|
+
import type { AiMessageType, MastraMessageV1, MastraMessageV2, StorageThreadType } from '@mastra/core/memory';
|
|
5
7
|
import type { RuntimeContext } from '@mastra/core/runtime-context';
|
|
6
8
|
import type { MastraScorerEntry, ScoreRowData } from '@mastra/core/scores';
|
|
9
|
+
import type { AITraceRecord, AISpanRecord, LegacyWorkflowRuns, StorageGetMessagesArg, PaginationInfo, WorkflowRun, WorkflowRuns } from '@mastra/core/storage';
|
|
10
|
+
import type { OutputSchema } from '@mastra/core/stream';
|
|
11
|
+
import type { QueryResult } from '@mastra/core/vector';
|
|
7
12
|
import type { Workflow, WatchEvent, WorkflowResult } from '@mastra/core/workflows';
|
|
8
13
|
import type { StepAction, StepGraph, LegacyWorkflowRunResult as CoreLegacyWorkflowRunResult } from '@mastra/core/workflows/legacy';
|
|
9
14
|
import type { JSONSchema7 } from 'json-schema';
|
|
@@ -21,12 +26,16 @@ export interface ClientOptions {
|
|
|
21
26
|
headers?: Record<string, string>;
|
|
22
27
|
/** Abort signal for request */
|
|
23
28
|
abortSignal?: AbortSignal;
|
|
29
|
+
/** Credentials mode for requests. See https://developer.mozilla.org/en-US/docs/Web/API/Request/credentials for more info. */
|
|
30
|
+
credentials?: 'omit' | 'same-origin' | 'include';
|
|
24
31
|
}
|
|
25
32
|
export interface RequestOptions {
|
|
26
33
|
method?: string;
|
|
27
34
|
headers?: Record<string, string>;
|
|
28
35
|
body?: any;
|
|
29
36
|
stream?: boolean;
|
|
37
|
+
/** Credentials mode for requests. See https://developer.mozilla.org/en-US/docs/Web/API/Request/credentials for more info. */
|
|
38
|
+
credentials?: 'omit' | 'same-origin' | 'include';
|
|
30
39
|
}
|
|
31
40
|
type WithoutMethods<T> = {
|
|
32
41
|
[K in keyof T as T[K] extends (...args: any[]) => any ? never : T[K] extends {
|
|
@@ -40,6 +49,7 @@ export interface GetAgentResponse {
|
|
|
40
49
|
workflows: Record<string, GetWorkflowResponse>;
|
|
41
50
|
provider: string;
|
|
42
51
|
modelId: string;
|
|
52
|
+
modelVersion: string;
|
|
43
53
|
defaultGenerateOptions: WithoutMethods<AgentGenerateOptions>;
|
|
44
54
|
defaultStreamOptions: WithoutMethods<AgentStreamOptions>;
|
|
45
55
|
}
|
|
@@ -57,6 +67,17 @@ export type StreamParams<T extends JSONSchema7 | ZodSchema | undefined = undefin
|
|
|
57
67
|
runtimeContext?: RuntimeContext | Record<string, any>;
|
|
58
68
|
clientTools?: ToolsInput;
|
|
59
69
|
} & WithoutMethods<Omit<AgentStreamOptions<T>, 'output' | 'experimental_output' | 'runtimeContext' | 'clientTools' | 'abortSignal'>>;
|
|
70
|
+
export type StreamVNextParams<OUTPUT extends OutputSchema | undefined = undefined, STRUCTURED_OUTPUT extends ZodSchema | JSONSchema7 | undefined = undefined> = {
|
|
71
|
+
messages: MessageListInput;
|
|
72
|
+
output?: OUTPUT;
|
|
73
|
+
runtimeContext?: RuntimeContext | Record<string, any>;
|
|
74
|
+
clientTools?: ToolsInput;
|
|
75
|
+
structuredOutput?: STRUCTURED_OUTPUT extends ZodSchema ? Omit<StructuredOutputOptions<STRUCTURED_OUTPUT>, 'model'> : never;
|
|
76
|
+
} & WithoutMethods<Omit<AgentExecutionOptions<OUTPUT, STRUCTURED_OUTPUT>, 'output' | 'runtimeContext' | 'clientTools' | 'options' | 'structuredOutput'>>;
|
|
77
|
+
export type UpdateModelParams = {
|
|
78
|
+
modelId: string;
|
|
79
|
+
provider: 'openai' | 'anthropic' | 'groq' | 'xai' | 'google';
|
|
80
|
+
};
|
|
60
81
|
export interface GetEvalsByAgentIdResponse extends GetAgentResponse {
|
|
61
82
|
evals: any[];
|
|
62
83
|
instructions: string;
|
|
@@ -418,5 +439,24 @@ export type GetScorerResponse = MastraScorerEntry & {
|
|
|
418
439
|
export interface GetScorersResponse {
|
|
419
440
|
scorers: Array<GetScorerResponse>;
|
|
420
441
|
}
|
|
442
|
+
export interface TemplateInstallationRequest {
|
|
443
|
+
/** Template repository URL or slug */
|
|
444
|
+
repo: string;
|
|
445
|
+
/** Git ref (branch/tag/commit) to install from */
|
|
446
|
+
ref?: string;
|
|
447
|
+
/** Template slug for identification */
|
|
448
|
+
slug?: string;
|
|
449
|
+
/** Target project path */
|
|
450
|
+
targetPath?: string;
|
|
451
|
+
/** Environment variables for template */
|
|
452
|
+
variables?: Record<string, string>;
|
|
453
|
+
}
|
|
454
|
+
export interface GetAITraceResponse {
|
|
455
|
+
trace: AITraceRecord;
|
|
456
|
+
}
|
|
457
|
+
export interface GetAITracesResponse {
|
|
458
|
+
spans: AISpanRecord[];
|
|
459
|
+
pagination: PaginationInfo;
|
|
460
|
+
}
|
|
421
461
|
export {};
|
|
422
462
|
//# sourceMappingURL=types.d.ts.map
|