@mastra/server 0.0.0-generate-message-id-20250512171942 → 0.0.0-inject-middleware-20250528213451
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/dist/_tsup-dts-rollup.d.cts +114 -96
- package/dist/_tsup-dts-rollup.d.ts +114 -96
- package/dist/{chunk-IU5VO2I2.js → chunk-55DOQLP6.js} +2 -2
- package/dist/{chunk-3HQNCTZ2.cjs → chunk-A3KDUGS7.cjs} +42 -2
- package/dist/{chunk-4YZ3U35L.cjs → chunk-BNEY4P4P.cjs} +2 -2
- package/dist/{chunk-X3ZDCS52.js → chunk-DJJIUEL2.js} +9 -2
- package/dist/{chunk-HWZVAG3H.js → chunk-DQLE3DVM.js} +2 -2
- package/dist/{chunk-Q6KMBIAN.js → chunk-J3PKLB3A.js} +42 -2
- package/dist/{chunk-MIQYDLLM.js → chunk-KUNQFY2W.js} +70 -34
- package/dist/{chunk-UCTEMO2Q.cjs → chunk-MMO2HDM6.cjs} +81 -44
- package/dist/{chunk-OGCNNUHF.cjs → chunk-NEOOQUKW.cjs} +2 -2
- package/dist/{chunk-EJO45KYT.js → chunk-W7VCKPAD.js} +34 -34
- package/dist/{chunk-24EGIVT7.cjs → chunk-Y7UWRW5X.cjs} +9 -2
- package/dist/{chunk-I2B73Y4I.cjs → chunk-YIOVBYZH.cjs} +44 -44
- package/dist/server/handlers/agents.cjs +7 -7
- package/dist/server/handlers/agents.js +1 -1
- package/dist/server/handlers/legacyWorkflows.cjs +46 -0
- package/dist/server/handlers/legacyWorkflows.d.cts +10 -0
- package/dist/server/handlers/legacyWorkflows.d.ts +10 -0
- package/dist/server/handlers/legacyWorkflows.js +1 -0
- package/dist/server/handlers/logs.cjs +4 -4
- package/dist/server/handlers/logs.js +1 -1
- package/dist/server/handlers/memory.cjs +9 -9
- package/dist/server/handlers/memory.js +1 -1
- package/dist/server/handlers/vector.cjs +7 -7
- package/dist/server/handlers/vector.js +1 -1
- package/dist/server/handlers/workflows.cjs +17 -13
- package/dist/server/handlers/workflows.d.cts +3 -2
- package/dist/server/handlers/workflows.d.ts +3 -2
- package/dist/server/handlers/workflows.js +1 -1
- package/dist/server/handlers.cjs +20 -20
- package/dist/server/handlers.d.cts +1 -1
- package/dist/server/handlers.d.ts +1 -1
- package/dist/server/handlers.js +7 -7
- package/package.json +5 -5
- package/dist/server/handlers/vNextWorkflows.cjs +0 -46
- package/dist/server/handlers/vNextWorkflows.d.cts +0 -10
- package/dist/server/handlers/vNextWorkflows.d.ts +0 -10
- package/dist/server/handlers/vNextWorkflows.js +0 -1
|
@@ -8,24 +8,26 @@ import type { CoreMessage as CoreMessage_2 } from '@mastra/core/llm';
|
|
|
8
8
|
import { EvalRow } from '@mastra/core/storage';
|
|
9
9
|
import { GenerateObjectResult } from 'ai';
|
|
10
10
|
import { GenerateTextResult } from 'ai';
|
|
11
|
+
import type { IMastraLogger } from '@mastra/core/logger';
|
|
11
12
|
import type { JSONRPCError } from '@mastra/core/a2a';
|
|
12
13
|
import { JSONRPCResponse } from '@mastra/core/a2a';
|
|
13
|
-
import
|
|
14
|
+
import { LegacyStep } from '@mastra/core/workflows/legacy';
|
|
15
|
+
import type { LegacyWorkflow } from '@mastra/core/workflows/legacy';
|
|
16
|
+
import { LegacyWorkflowRunResult } from '@mastra/core/workflows/legacy';
|
|
17
|
+
import type { LegacyWorkflowRuns } from '@mastra/core/storage';
|
|
14
18
|
import type { Mastra } from '@mastra/core/mastra';
|
|
15
19
|
import type { MastraMemory } from '@mastra/core/memory';
|
|
16
20
|
import { Message } from 'ai';
|
|
17
21
|
import type { Message as Message_2 } from '@mastra/core/a2a';
|
|
18
22
|
import { MessageType } from '@mastra/core/memory';
|
|
19
|
-
import { NewStep } from '@mastra/core/workflows/vNext';
|
|
20
|
-
import type { NewWorkflow } from '@mastra/core/workflows/vNext';
|
|
21
23
|
import type { QueryResult } from '@mastra/core/vector';
|
|
22
24
|
import { ReadableStream as ReadableStream_2 } from 'node:stream/web';
|
|
23
25
|
import { RuntimeContext } from '@mastra/core/runtime-context';
|
|
24
26
|
import { RuntimeContext as RuntimeContext_2 } from '@mastra/core/di';
|
|
25
|
-
import type { SerializedStepFlowEntry } from '@mastra/core/workflows
|
|
27
|
+
import type { SerializedStepFlowEntry } from '@mastra/core/workflows';
|
|
26
28
|
import { Step } from '@mastra/core/workflows';
|
|
27
|
-
import { StepExecutionContext } from '@mastra/core/workflows';
|
|
28
|
-
import { StepGraph } from '@mastra/core/workflows';
|
|
29
|
+
import { StepExecutionContext } from '@mastra/core/workflows/legacy';
|
|
30
|
+
import { StepGraph } from '@mastra/core/workflows/legacy';
|
|
29
31
|
import { StorageThreadType } from '@mastra/core/memory';
|
|
30
32
|
import { Task } from '@mastra/core/a2a';
|
|
31
33
|
import { TaskAndHistory } from '@mastra/core/a2a';
|
|
@@ -36,10 +38,10 @@ import type { TaskSendParams } from '@mastra/core/a2a';
|
|
|
36
38
|
import type { TaskStatus } from '@mastra/core/a2a';
|
|
37
39
|
import type { ToolAction } from '@mastra/core/tools';
|
|
38
40
|
import type { VercelTool } from '@mastra/core/tools';
|
|
41
|
+
import { WatchEvent } from '@mastra/core/workflows';
|
|
39
42
|
import type { Workflow } from '@mastra/core/workflows';
|
|
40
|
-
import { WorkflowContext as WorkflowContext_2 } from '@mastra/core/workflows';
|
|
41
|
-
import { WorkflowResult } from '@mastra/core/workflows
|
|
42
|
-
import { WorkflowRunResult } from '@mastra/core/workflows';
|
|
43
|
+
import { WorkflowContext as WorkflowContext_2 } from '@mastra/core/workflows/legacy';
|
|
44
|
+
import { WorkflowResult } from '@mastra/core/workflows';
|
|
43
45
|
import type { WorkflowRuns } from '@mastra/core/storage';
|
|
44
46
|
import { ZodType } from 'zod';
|
|
45
47
|
import { ZodTypeDef } from 'zod';
|
|
@@ -95,7 +97,7 @@ declare interface CreateIndexRequest {
|
|
|
95
97
|
metric?: 'cosine' | 'euclidean' | 'dotproduct';
|
|
96
98
|
}
|
|
97
99
|
|
|
98
|
-
export declare function
|
|
100
|
+
export declare function createLegacyWorkflowRunHandler({ mastra, workflowId, runId: prevRunId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<{
|
|
99
101
|
runId: string;
|
|
100
102
|
}>;
|
|
101
103
|
|
|
@@ -114,7 +116,7 @@ export declare function createThreadHandler({ mastra, agentId, body, }: Pick<Mem
|
|
|
114
116
|
};
|
|
115
117
|
}): Promise<StorageThreadType>;
|
|
116
118
|
|
|
117
|
-
export declare function
|
|
119
|
+
export declare function createWorkflowRunHandler({ mastra, workflowId, runId: prevRunId, }: Pick<WorkflowContext_3, 'mastra' | 'workflowId' | 'runId'>): Promise<{
|
|
118
120
|
runId: string;
|
|
119
121
|
}>;
|
|
120
122
|
|
|
@@ -184,8 +186,11 @@ export declare function getAgentByIdHandler({ mastra, runtimeContext, agentId, }
|
|
|
184
186
|
name: any;
|
|
185
187
|
instructions: string;
|
|
186
188
|
tools: any;
|
|
189
|
+
workflows: {};
|
|
187
190
|
provider: string;
|
|
188
191
|
modelId: string;
|
|
192
|
+
defaultGenerateOptions: any;
|
|
193
|
+
defaultStreamOptions: any;
|
|
189
194
|
}>;
|
|
190
195
|
|
|
191
196
|
export declare function getAgentCardByIdHandler({ mastra, agentId, executionUrl, provider, version, runtimeContext, }: Context & {
|
|
@@ -206,7 +211,7 @@ export declare function getAgentExecutionHandler({ requestId, mastra, agentId, r
|
|
|
206
211
|
method: 'tasks/send' | 'tasks/sendSubscribe' | 'tasks/get' | 'tasks/cancel';
|
|
207
212
|
params: TaskSendParams | TaskQueryParams | TaskIdParams;
|
|
208
213
|
taskStore?: InMemoryTaskStore;
|
|
209
|
-
logger?:
|
|
214
|
+
logger?: IMastraLogger;
|
|
210
215
|
}): Promise<any>;
|
|
211
216
|
|
|
212
217
|
export declare function getAgentsHandler({ mastra, runtimeContext }: Context & {
|
|
@@ -229,6 +234,28 @@ export declare function getEvalsByAgentIdHandler({ mastra, runtimeContext, agent
|
|
|
229
234
|
evals: EvalRow[];
|
|
230
235
|
}>;
|
|
231
236
|
|
|
237
|
+
export declare function getLegacyWorkflowByIdHandler({ mastra, workflowId }: WorkflowContext): Promise<{
|
|
238
|
+
stepGraph: StepGraph;
|
|
239
|
+
stepSubscriberGraph: Record<string, StepGraph>;
|
|
240
|
+
serializedStepGraph: StepGraph;
|
|
241
|
+
serializedStepSubscriberGraph: Record<string, StepGraph>;
|
|
242
|
+
name: string;
|
|
243
|
+
triggerSchema: string | undefined;
|
|
244
|
+
steps: any;
|
|
245
|
+
}>;
|
|
246
|
+
|
|
247
|
+
export declare function getLegacyWorkflowRunHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<ReturnType<LegacyWorkflow['getRun']>>;
|
|
248
|
+
|
|
249
|
+
export declare function getLegacyWorkflowRunsHandler({ mastra, workflowId, fromDate, toDate, limit, offset, resourceId, }: WorkflowContext & {
|
|
250
|
+
fromDate?: Date;
|
|
251
|
+
toDate?: Date;
|
|
252
|
+
limit?: number;
|
|
253
|
+
offset?: number;
|
|
254
|
+
resourceId?: string;
|
|
255
|
+
}): Promise<LegacyWorkflowRuns>;
|
|
256
|
+
|
|
257
|
+
export declare function getLegacyWorkflowsHandler({ mastra }: WorkflowContext): Promise<any>;
|
|
258
|
+
|
|
232
259
|
export declare function getLiveEvalsByAgentIdHandler({ mastra, runtimeContext, agentId, }: Context & {
|
|
233
260
|
runtimeContext: RuntimeContext;
|
|
234
261
|
agentId: string;
|
|
@@ -239,7 +266,7 @@ export declare function getLiveEvalsByAgentIdHandler({ mastra, runtimeContext, a
|
|
|
239
266
|
evals: EvalRow[];
|
|
240
267
|
}>;
|
|
241
268
|
|
|
242
|
-
export declare function getLogsByRunIdHandler({ mastra, runId, transportId, }: Pick<LogsContext, 'mastra' | 'runId' | 'transportId'>): Promise<
|
|
269
|
+
export declare function getLogsByRunIdHandler({ mastra, runId, transportId, }: Pick<LogsContext, 'mastra' | 'runId' | 'transportId'>): Promise<any[]>;
|
|
243
270
|
|
|
244
271
|
export declare function getLogsHandler({ mastra, transportId, }: Pick<LogsContext, 'mastra' | 'transportId'>): Promise<BaseLogMessage[]>;
|
|
245
272
|
|
|
@@ -251,7 +278,9 @@ export declare function getMemoryStatusHandler({ mastra, agentId }: Pick<MemoryC
|
|
|
251
278
|
result: boolean;
|
|
252
279
|
}>;
|
|
253
280
|
|
|
254
|
-
export declare function getMessagesHandler({ mastra, agentId, threadId, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'threadId'>
|
|
281
|
+
export declare function getMessagesHandler({ mastra, agentId, threadId, limit, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'threadId'> & {
|
|
282
|
+
limit?: number;
|
|
283
|
+
}): Promise<{
|
|
255
284
|
messages: CoreMessage[];
|
|
256
285
|
uiMessages: Message[];
|
|
257
286
|
}>;
|
|
@@ -303,39 +332,18 @@ export declare function getToolByIdHandler({ tools, toolId }: Pick<ToolsContext,
|
|
|
303
332
|
|
|
304
333
|
export declare function getToolsHandler({ tools }: Pick<ToolsContext, 'tools'>): Promise<Record<string, any>>;
|
|
305
334
|
|
|
306
|
-
export declare function
|
|
335
|
+
export declare function getWorkflowByIdHandler({ mastra, workflowId }: WorkflowContext_3): Promise<{
|
|
307
336
|
steps: SerializedStep[];
|
|
308
337
|
name: string | undefined;
|
|
338
|
+
description: string | undefined;
|
|
309
339
|
stepGraph: SerializedStepFlowEntry[];
|
|
310
340
|
inputSchema: string | undefined;
|
|
311
341
|
outputSchema: string | undefined;
|
|
312
342
|
}>;
|
|
313
343
|
|
|
314
|
-
export declare function
|
|
315
|
-
|
|
316
|
-
export declare function getVNextWorkflowRunsHandler({ mastra, workflowId, fromDate, toDate, limit, offset, resourceId, }: VNextWorkflowContext & {
|
|
317
|
-
fromDate?: Date;
|
|
318
|
-
toDate?: Date;
|
|
319
|
-
limit?: number;
|
|
320
|
-
offset?: number;
|
|
321
|
-
resourceId?: string;
|
|
322
|
-
}): Promise<WorkflowRuns>;
|
|
323
|
-
|
|
324
|
-
export declare function getVNextWorkflowsHandler({ mastra }: VNextWorkflowContext): Promise<any>;
|
|
325
|
-
|
|
326
|
-
export declare function getWorkflowByIdHandler({ mastra, workflowId }: WorkflowContext): Promise<{
|
|
327
|
-
stepGraph: StepGraph;
|
|
328
|
-
stepSubscriberGraph: Record<string, StepGraph>;
|
|
329
|
-
serializedStepGraph: StepGraph;
|
|
330
|
-
serializedStepSubscriberGraph: Record<string, StepGraph>;
|
|
331
|
-
name: string;
|
|
332
|
-
triggerSchema: string | undefined;
|
|
333
|
-
steps: any;
|
|
334
|
-
}>;
|
|
335
|
-
|
|
336
|
-
export declare function getWorkflowRunHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<ReturnType<Workflow['getRun']>>;
|
|
344
|
+
export declare function getWorkflowRunByIdHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext_3, 'mastra' | 'workflowId' | 'runId'>): Promise<ReturnType<Workflow['getWorkflowRunById']>>;
|
|
337
345
|
|
|
338
|
-
export declare function getWorkflowRunsHandler({ mastra, workflowId, fromDate, toDate, limit, offset, resourceId, }:
|
|
346
|
+
export declare function getWorkflowRunsHandler({ mastra, workflowId, fromDate, toDate, limit, offset, resourceId, }: WorkflowContext_3 & {
|
|
339
347
|
fromDate?: Date;
|
|
340
348
|
toDate?: Date;
|
|
341
349
|
limit?: number;
|
|
@@ -343,7 +351,7 @@ export declare function getWorkflowRunsHandler({ mastra, workflowId, fromDate, t
|
|
|
343
351
|
resourceId?: string;
|
|
344
352
|
}): Promise<WorkflowRuns>;
|
|
345
353
|
|
|
346
|
-
export declare function getWorkflowsHandler({ mastra }:
|
|
354
|
+
export declare function getWorkflowsHandler({ mastra }: WorkflowContext_3): Promise<any>;
|
|
347
355
|
|
|
348
356
|
export declare function handleError(error: unknown, defaultMessage: string): never;
|
|
349
357
|
|
|
@@ -352,7 +360,7 @@ export declare function handleTaskCancel({ requestId, taskStore, agentId, taskId
|
|
|
352
360
|
taskStore: InMemoryTaskStore;
|
|
353
361
|
agentId: string;
|
|
354
362
|
taskId: string;
|
|
355
|
-
logger?:
|
|
363
|
+
logger?: IMastraLogger;
|
|
356
364
|
}): Promise<JSONRPCResponse<Task, unknown>>;
|
|
357
365
|
|
|
358
366
|
export declare function handleTaskGet({ requestId, taskStore, agentId, taskId, }: {
|
|
@@ -367,7 +375,7 @@ export declare function handleTaskSend({ requestId, params, taskStore, agent, lo
|
|
|
367
375
|
params: TaskSendParams;
|
|
368
376
|
taskStore: InMemoryTaskStore;
|
|
369
377
|
agent: Agent;
|
|
370
|
-
logger?:
|
|
378
|
+
logger?: IMastraLogger;
|
|
371
379
|
runtimeContext: RuntimeContext;
|
|
372
380
|
}): Promise<JSONRPCResponse<null, unknown> | JSONRPCResponse<Task, unknown>>;
|
|
373
381
|
|
|
@@ -376,7 +384,7 @@ export declare function handleTaskSendSubscribe({ requestId, params, taskStore,
|
|
|
376
384
|
params: TaskSendParams;
|
|
377
385
|
taskStore: InMemoryTaskStore;
|
|
378
386
|
agent: Agent;
|
|
379
|
-
logger?:
|
|
387
|
+
logger?: IMastraLogger;
|
|
380
388
|
runtimeContext: RuntimeContext;
|
|
381
389
|
}): AsyncGenerator<JSONRPCResponse<null, unknown> | JSONRPCResponse<Task, unknown> | JSONRPCResponse< {
|
|
382
390
|
state: string;
|
|
@@ -463,6 +471,21 @@ export declare class InMemoryTaskStore {
|
|
|
463
471
|
}): Promise<void>;
|
|
464
472
|
}
|
|
465
473
|
|
|
474
|
+
export declare namespace legacyWorkflows {
|
|
475
|
+
export {
|
|
476
|
+
getLegacyWorkflowsHandler,
|
|
477
|
+
getLegacyWorkflowByIdHandler,
|
|
478
|
+
startAsyncLegacyWorkflowHandler,
|
|
479
|
+
getLegacyWorkflowRunHandler,
|
|
480
|
+
createLegacyWorkflowRunHandler,
|
|
481
|
+
startLegacyWorkflowRunHandler,
|
|
482
|
+
watchLegacyWorkflowHandler,
|
|
483
|
+
resumeAsyncLegacyWorkflowHandler,
|
|
484
|
+
resumeLegacyWorkflowHandler,
|
|
485
|
+
getLegacyWorkflowRunsHandler
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
|
|
466
489
|
export declare function listIndexes({ mastra, vectorName }: Pick<VectorContext, 'mastra' | 'vectorName'>): Promise<string[]>;
|
|
467
490
|
|
|
468
491
|
export declare function loadOrCreateTaskAndHistory({ agentId, taskId, taskStore, message, sessionId, metadata, logger, }: {
|
|
@@ -472,7 +495,7 @@ export declare function loadOrCreateTaskAndHistory({ agentId, taskId, taskStore,
|
|
|
472
495
|
message: Message_2;
|
|
473
496
|
sessionId?: string | null;
|
|
474
497
|
metadata?: Record<string, unknown> | null;
|
|
475
|
-
logger?:
|
|
498
|
+
logger?: IMastraLogger;
|
|
476
499
|
}): Promise<TaskAndHistory>;
|
|
477
500
|
|
|
478
501
|
export declare namespace logs {
|
|
@@ -522,7 +545,7 @@ declare interface NetworkContext extends Context {
|
|
|
522
545
|
runtimeContext: RuntimeContext;
|
|
523
546
|
}
|
|
524
547
|
|
|
525
|
-
export declare function normalizeError(error: any, reqId: number | string | null, taskId?: string, logger?:
|
|
548
|
+
export declare function normalizeError(error: any, reqId: number | string | null, taskId?: string, logger?: IMastraLogger): JSONRPCResponse<null, unknown>;
|
|
526
549
|
|
|
527
550
|
declare interface QueryRequest {
|
|
528
551
|
indexName: string;
|
|
@@ -538,39 +561,39 @@ export declare function queryVectors({ mastra, vectorName, query, }: Pick<Vector
|
|
|
538
561
|
|
|
539
562
|
declare type RedirectStatusCode = 300 | 301 | 302 | 303 | 304 | DeprecatedStatusCode | 307 | 308;
|
|
540
563
|
|
|
541
|
-
export declare function
|
|
564
|
+
export declare function resumeAsyncLegacyWorkflowHandler({ mastra, workflowId, runId, body, runtimeContext, }: WorkflowContext & {
|
|
565
|
+
body: {
|
|
566
|
+
stepId: string;
|
|
567
|
+
context: any;
|
|
568
|
+
};
|
|
569
|
+
runtimeContext: RuntimeContext;
|
|
570
|
+
}): Promise<Omit<LegacyWorkflowRunResult<any, LegacyStep<string, any, any, StepExecutionContext<any, WorkflowContext_2<any, LegacyStep<string, any, any, any>[], Record<string, any>>>>[], any>, "runId"> | undefined>;
|
|
571
|
+
|
|
572
|
+
export declare function resumeAsyncWorkflowHandler({ mastra, workflowId, runId, body, runtimeContext, runtimeContextFromRequest, }: WorkflowContext_3 & {
|
|
542
573
|
body: {
|
|
543
574
|
step: string | string[];
|
|
544
575
|
resumeData?: unknown;
|
|
545
576
|
};
|
|
546
577
|
runtimeContext?: RuntimeContext_2;
|
|
547
578
|
runtimeContextFromRequest?: Record<string, unknown>;
|
|
548
|
-
}): Promise<WorkflowResult<ZodType<any, ZodTypeDef, any>,
|
|
579
|
+
}): Promise<WorkflowResult<ZodType<any, ZodTypeDef, any>, Step<string, any, any, any, any>[]>>;
|
|
549
580
|
|
|
550
|
-
export declare function
|
|
581
|
+
export declare function resumeLegacyWorkflowHandler({ mastra, workflowId, runId, body, runtimeContext, }: WorkflowContext & {
|
|
551
582
|
body: {
|
|
552
583
|
stepId: string;
|
|
553
584
|
context: any;
|
|
554
585
|
};
|
|
555
586
|
runtimeContext: RuntimeContext;
|
|
556
|
-
}): Promise<Omit<WorkflowRunResult<any, Step<string, any, any, StepExecutionContext<any, WorkflowContext_2<any, Step<string, any, any, any>[], Record<string, any>>>>[], any>, "runId"> | undefined>;
|
|
557
|
-
|
|
558
|
-
export declare function resumeVNextWorkflowHandler({ mastra, workflowId, runId, body, runtimeContext, }: VNextWorkflowContext & {
|
|
559
|
-
body: {
|
|
560
|
-
step: string | string[];
|
|
561
|
-
resumeData?: unknown;
|
|
562
|
-
};
|
|
563
|
-
runtimeContext?: RuntimeContext_2;
|
|
564
587
|
}): Promise<{
|
|
565
588
|
message: string;
|
|
566
589
|
}>;
|
|
567
590
|
|
|
568
|
-
export declare function resumeWorkflowHandler({ mastra, workflowId, runId, body, runtimeContext, }:
|
|
591
|
+
export declare function resumeWorkflowHandler({ mastra, workflowId, runId, body, runtimeContext, }: WorkflowContext_3 & {
|
|
569
592
|
body: {
|
|
570
|
-
|
|
571
|
-
|
|
593
|
+
step: string | string[];
|
|
594
|
+
resumeData?: unknown;
|
|
572
595
|
};
|
|
573
|
-
runtimeContext
|
|
596
|
+
runtimeContext?: RuntimeContext_2;
|
|
574
597
|
}): Promise<{
|
|
575
598
|
message: string;
|
|
576
599
|
}>;
|
|
@@ -592,28 +615,28 @@ declare type SerializedStep = {
|
|
|
592
615
|
|
|
593
616
|
declare type ServerErrorStatusCode = 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511;
|
|
594
617
|
|
|
595
|
-
export declare function
|
|
596
|
-
inputData?: unknown;
|
|
597
|
-
runtimeContext?: RuntimeContext_2;
|
|
598
|
-
runtimeContextFromRequest?: Record<string, unknown>;
|
|
599
|
-
}): Promise<WorkflowResult<ZodType<any, ZodTypeDef, any>, NewStep<string, any, any, any, any>[]>>;
|
|
600
|
-
|
|
601
|
-
export declare function startAsyncWorkflowHandler({ mastra, runtimeContext, workflowId, runId, triggerData, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
|
|
618
|
+
export declare function startAsyncLegacyWorkflowHandler({ mastra, runtimeContext, workflowId, runId, triggerData, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
|
|
602
619
|
triggerData?: unknown;
|
|
603
620
|
runtimeContext: RuntimeContext;
|
|
604
|
-
}): Promise<
|
|
621
|
+
}): Promise<LegacyWorkflowRunResult<any, LegacyStep<string, any, any, StepExecutionContext<any, WorkflowContext_2<any, LegacyStep<string, any, any, any>[], Record<string, any>>>>[], any>>;
|
|
605
622
|
|
|
606
|
-
export declare function
|
|
623
|
+
export declare function startAsyncWorkflowHandler({ mastra, runtimeContext, workflowId, runId, inputData, runtimeContextFromRequest, }: Pick<WorkflowContext_3, 'mastra' | 'workflowId' | 'runId'> & {
|
|
607
624
|
inputData?: unknown;
|
|
608
625
|
runtimeContext?: RuntimeContext_2;
|
|
609
626
|
runtimeContextFromRequest?: Record<string, unknown>;
|
|
627
|
+
}): Promise<WorkflowResult<ZodType<any, ZodTypeDef, any>, Step<string, any, any, any, any>[]>>;
|
|
628
|
+
|
|
629
|
+
export declare function startLegacyWorkflowRunHandler({ mastra, runtimeContext, workflowId, runId, triggerData, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
|
|
630
|
+
triggerData?: unknown;
|
|
631
|
+
runtimeContext: RuntimeContext;
|
|
610
632
|
}): Promise<{
|
|
611
633
|
message: string;
|
|
612
634
|
}>;
|
|
613
635
|
|
|
614
|
-
export declare function startWorkflowRunHandler({ mastra, runtimeContext, workflowId, runId,
|
|
615
|
-
|
|
616
|
-
runtimeContext
|
|
636
|
+
export declare function startWorkflowRunHandler({ mastra, runtimeContext, workflowId, runId, inputData, runtimeContextFromRequest, }: Pick<WorkflowContext_3, 'mastra' | 'workflowId' | 'runId'> & {
|
|
637
|
+
inputData?: unknown;
|
|
638
|
+
runtimeContext?: RuntimeContext_2;
|
|
639
|
+
runtimeContextFromRequest?: Record<string, unknown>;
|
|
617
640
|
}): Promise<{
|
|
618
641
|
message: string;
|
|
619
642
|
}>;
|
|
@@ -653,6 +676,15 @@ export declare function streamGenerateHandler_alias_1({ mastra, networkId, body,
|
|
|
653
676
|
} & Parameters<AgentNetwork['stream']>[1];
|
|
654
677
|
}): Promise<Response>;
|
|
655
678
|
|
|
679
|
+
export declare function streamWorkflowHandler({ mastra, runtimeContext, workflowId, runId, inputData, runtimeContextFromRequest, }: Pick<WorkflowContext_3, 'mastra' | 'workflowId' | 'runId'> & {
|
|
680
|
+
inputData?: unknown;
|
|
681
|
+
runtimeContext?: RuntimeContext_2;
|
|
682
|
+
runtimeContextFromRequest?: Record<string, unknown>;
|
|
683
|
+
}): {
|
|
684
|
+
stream: globalThis.ReadableStream<WatchEvent>;
|
|
685
|
+
getWorkflowState: () => Promise<WorkflowResult<ZodType<any, ZodTypeDef, any>, Step<string, any, any, any, any>[]>>;
|
|
686
|
+
};
|
|
687
|
+
|
|
656
688
|
declare type SuccessStatusCode = 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 226;
|
|
657
689
|
|
|
658
690
|
export declare namespace telemetry {
|
|
@@ -753,26 +785,6 @@ declare interface VectorContext extends Context {
|
|
|
753
785
|
vectorName?: string;
|
|
754
786
|
}
|
|
755
787
|
|
|
756
|
-
declare interface VNextWorkflowContext extends Context {
|
|
757
|
-
workflowId?: string;
|
|
758
|
-
runId?: string;
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
export declare namespace vNextWorkflows {
|
|
762
|
-
export {
|
|
763
|
-
getVNextWorkflowsHandler,
|
|
764
|
-
getVNextWorkflowByIdHandler,
|
|
765
|
-
getVNextWorkflowRunByIdHandler,
|
|
766
|
-
createVNextWorkflowRunHandler,
|
|
767
|
-
startAsyncVNextWorkflowHandler,
|
|
768
|
-
startVNextWorkflowRunHandler,
|
|
769
|
-
watchVNextWorkflowHandler,
|
|
770
|
-
resumeAsyncVNextWorkflowHandler,
|
|
771
|
-
resumeVNextWorkflowHandler,
|
|
772
|
-
getVNextWorkflowRunsHandler
|
|
773
|
-
}
|
|
774
|
-
}
|
|
775
|
-
|
|
776
788
|
export declare namespace voice {
|
|
777
789
|
export {
|
|
778
790
|
getSpeakersHandler,
|
|
@@ -785,24 +797,30 @@ declare interface VoiceContext extends Context {
|
|
|
785
797
|
agentId?: string;
|
|
786
798
|
}
|
|
787
799
|
|
|
788
|
-
export declare function
|
|
800
|
+
export declare function watchLegacyWorkflowHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<ReadableStream_2<string>>;
|
|
789
801
|
|
|
790
|
-
export declare function watchWorkflowHandler({ mastra, workflowId, runId, }: Pick<
|
|
802
|
+
export declare function watchWorkflowHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext_3, 'mastra' | 'workflowId' | 'runId'>): Promise<ReadableStream_2<string>>;
|
|
791
803
|
|
|
792
804
|
declare interface WorkflowContext extends Context {
|
|
793
805
|
workflowId?: string;
|
|
794
806
|
runId?: string;
|
|
795
807
|
}
|
|
796
808
|
|
|
809
|
+
declare interface WorkflowContext_3 extends Context {
|
|
810
|
+
workflowId?: string;
|
|
811
|
+
runId?: string;
|
|
812
|
+
}
|
|
813
|
+
|
|
797
814
|
export declare namespace workflows {
|
|
798
815
|
export {
|
|
799
816
|
getWorkflowsHandler,
|
|
800
817
|
getWorkflowByIdHandler,
|
|
818
|
+
getWorkflowRunByIdHandler,
|
|
819
|
+
createWorkflowRunHandler,
|
|
801
820
|
startAsyncWorkflowHandler,
|
|
802
|
-
getWorkflowRunHandler,
|
|
803
|
-
createRunHandler,
|
|
804
821
|
startWorkflowRunHandler,
|
|
805
822
|
watchWorkflowHandler,
|
|
823
|
+
streamWorkflowHandler,
|
|
806
824
|
resumeAsyncWorkflowHandler,
|
|
807
825
|
resumeWorkflowHandler,
|
|
808
826
|
getWorkflowRunsHandler
|