@mastra/server 2.0.4 → 2.1.0-alpha.1
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 +97 -95
- package/dist/_tsup-dts-rollup.d.ts +97 -95
- package/dist/{chunk-IU5VO2I2.js → chunk-55DOQLP6.js} +2 -2
- package/dist/{chunk-UCTEMO2Q.cjs → chunk-6B4OMWT6.cjs} +46 -44
- package/dist/{chunk-OGCNNUHF.cjs → chunk-7DLZLWJV.cjs} +3 -2
- package/dist/{chunk-4YZ3U35L.cjs → chunk-BNEY4P4P.cjs} +2 -2
- package/dist/{chunk-MIQYDLLM.js → chunk-QY36IPTP.js} +36 -34
- package/dist/{chunk-EJO45KYT.js → chunk-W7VCKPAD.js} +34 -34
- package/dist/{chunk-HWZVAG3H.js → chunk-WFBJJNCK.js} +3 -2
- package/dist/{chunk-I2B73Y4I.cjs → chunk-YIOVBYZH.cjs} +44 -44
- 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/vector.cjs +7 -7
- package/dist/server/handlers/vector.js +1 -1
- package/dist/server/handlers/workflows.cjs +13 -13
- package/dist/server/handlers/workflows.d.cts +2 -2
- package/dist/server/handlers/workflows.d.ts +2 -2
- package/dist/server/handlers/workflows.js +1 -1
- package/dist/server/handlers.cjs +16 -16
- package/dist/server/handlers.d.cts +1 -1
- package/dist/server/handlers.d.ts +1 -1
- package/dist/server/handlers.js +5 -5
- package/package.json +4 -4
- 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';
|
|
@@ -37,9 +39,8 @@ 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';
|
|
39
41
|
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';
|
|
42
|
+
import { WorkflowContext as WorkflowContext_2 } from '@mastra/core/workflows/legacy';
|
|
43
|
+
import { WorkflowResult } from '@mastra/core/workflows';
|
|
43
44
|
import type { WorkflowRuns } from '@mastra/core/storage';
|
|
44
45
|
import { ZodType } from 'zod';
|
|
45
46
|
import { ZodTypeDef } from 'zod';
|
|
@@ -95,7 +96,7 @@ declare interface CreateIndexRequest {
|
|
|
95
96
|
metric?: 'cosine' | 'euclidean' | 'dotproduct';
|
|
96
97
|
}
|
|
97
98
|
|
|
98
|
-
export declare function
|
|
99
|
+
export declare function createLegacyWorkflowRunHandler({ mastra, workflowId, runId: prevRunId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<{
|
|
99
100
|
runId: string;
|
|
100
101
|
}>;
|
|
101
102
|
|
|
@@ -114,7 +115,7 @@ export declare function createThreadHandler({ mastra, agentId, body, }: Pick<Mem
|
|
|
114
115
|
};
|
|
115
116
|
}): Promise<StorageThreadType>;
|
|
116
117
|
|
|
117
|
-
export declare function
|
|
118
|
+
export declare function createWorkflowRunHandler({ mastra, workflowId, runId: prevRunId, }: Pick<WorkflowContext_3, 'mastra' | 'workflowId' | 'runId'>): Promise<{
|
|
118
119
|
runId: string;
|
|
119
120
|
}>;
|
|
120
121
|
|
|
@@ -207,7 +208,7 @@ export declare function getAgentExecutionHandler({ requestId, mastra, agentId, r
|
|
|
207
208
|
method: 'tasks/send' | 'tasks/sendSubscribe' | 'tasks/get' | 'tasks/cancel';
|
|
208
209
|
params: TaskSendParams | TaskQueryParams | TaskIdParams;
|
|
209
210
|
taskStore?: InMemoryTaskStore;
|
|
210
|
-
logger?:
|
|
211
|
+
logger?: IMastraLogger;
|
|
211
212
|
}): Promise<any>;
|
|
212
213
|
|
|
213
214
|
export declare function getAgentsHandler({ mastra, runtimeContext }: Context & {
|
|
@@ -230,6 +231,28 @@ export declare function getEvalsByAgentIdHandler({ mastra, runtimeContext, agent
|
|
|
230
231
|
evals: EvalRow[];
|
|
231
232
|
}>;
|
|
232
233
|
|
|
234
|
+
export declare function getLegacyWorkflowByIdHandler({ mastra, workflowId }: WorkflowContext): Promise<{
|
|
235
|
+
stepGraph: StepGraph;
|
|
236
|
+
stepSubscriberGraph: Record<string, StepGraph>;
|
|
237
|
+
serializedStepGraph: StepGraph;
|
|
238
|
+
serializedStepSubscriberGraph: Record<string, StepGraph>;
|
|
239
|
+
name: string;
|
|
240
|
+
triggerSchema: string | undefined;
|
|
241
|
+
steps: any;
|
|
242
|
+
}>;
|
|
243
|
+
|
|
244
|
+
export declare function getLegacyWorkflowRunHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<ReturnType<LegacyWorkflow['getRun']>>;
|
|
245
|
+
|
|
246
|
+
export declare function getLegacyWorkflowRunsHandler({ mastra, workflowId, fromDate, toDate, limit, offset, resourceId, }: WorkflowContext & {
|
|
247
|
+
fromDate?: Date;
|
|
248
|
+
toDate?: Date;
|
|
249
|
+
limit?: number;
|
|
250
|
+
offset?: number;
|
|
251
|
+
resourceId?: string;
|
|
252
|
+
}): Promise<LegacyWorkflowRuns>;
|
|
253
|
+
|
|
254
|
+
export declare function getLegacyWorkflowsHandler({ mastra }: WorkflowContext): Promise<any>;
|
|
255
|
+
|
|
233
256
|
export declare function getLiveEvalsByAgentIdHandler({ mastra, runtimeContext, agentId, }: Context & {
|
|
234
257
|
runtimeContext: RuntimeContext;
|
|
235
258
|
agentId: string;
|
|
@@ -240,7 +263,7 @@ export declare function getLiveEvalsByAgentIdHandler({ mastra, runtimeContext, a
|
|
|
240
263
|
evals: EvalRow[];
|
|
241
264
|
}>;
|
|
242
265
|
|
|
243
|
-
export declare function getLogsByRunIdHandler({ mastra, runId, transportId, }: Pick<LogsContext, 'mastra' | 'runId' | 'transportId'>): Promise<
|
|
266
|
+
export declare function getLogsByRunIdHandler({ mastra, runId, transportId, }: Pick<LogsContext, 'mastra' | 'runId' | 'transportId'>): Promise<any[]>;
|
|
244
267
|
|
|
245
268
|
export declare function getLogsHandler({ mastra, transportId, }: Pick<LogsContext, 'mastra' | 'transportId'>): Promise<BaseLogMessage[]>;
|
|
246
269
|
|
|
@@ -306,17 +329,18 @@ export declare function getToolByIdHandler({ tools, toolId }: Pick<ToolsContext,
|
|
|
306
329
|
|
|
307
330
|
export declare function getToolsHandler({ tools }: Pick<ToolsContext, 'tools'>): Promise<Record<string, any>>;
|
|
308
331
|
|
|
309
|
-
export declare function
|
|
332
|
+
export declare function getWorkflowByIdHandler({ mastra, workflowId }: WorkflowContext_3): Promise<{
|
|
310
333
|
steps: SerializedStep[];
|
|
311
334
|
name: string | undefined;
|
|
335
|
+
description: string | undefined;
|
|
312
336
|
stepGraph: SerializedStepFlowEntry[];
|
|
313
337
|
inputSchema: string | undefined;
|
|
314
338
|
outputSchema: string | undefined;
|
|
315
339
|
}>;
|
|
316
340
|
|
|
317
|
-
export declare function
|
|
341
|
+
export declare function getWorkflowRunByIdHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext_3, 'mastra' | 'workflowId' | 'runId'>): Promise<ReturnType<Workflow['getWorkflowRunById']>>;
|
|
318
342
|
|
|
319
|
-
export declare function
|
|
343
|
+
export declare function getWorkflowRunsHandler({ mastra, workflowId, fromDate, toDate, limit, offset, resourceId, }: WorkflowContext_3 & {
|
|
320
344
|
fromDate?: Date;
|
|
321
345
|
toDate?: Date;
|
|
322
346
|
limit?: number;
|
|
@@ -324,29 +348,7 @@ export declare function getVNextWorkflowRunsHandler({ mastra, workflowId, fromDa
|
|
|
324
348
|
resourceId?: string;
|
|
325
349
|
}): Promise<WorkflowRuns>;
|
|
326
350
|
|
|
327
|
-
export declare function
|
|
328
|
-
|
|
329
|
-
export declare function getWorkflowByIdHandler({ mastra, workflowId }: WorkflowContext): Promise<{
|
|
330
|
-
stepGraph: StepGraph;
|
|
331
|
-
stepSubscriberGraph: Record<string, StepGraph>;
|
|
332
|
-
serializedStepGraph: StepGraph;
|
|
333
|
-
serializedStepSubscriberGraph: Record<string, StepGraph>;
|
|
334
|
-
name: string;
|
|
335
|
-
triggerSchema: string | undefined;
|
|
336
|
-
steps: any;
|
|
337
|
-
}>;
|
|
338
|
-
|
|
339
|
-
export declare function getWorkflowRunHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<ReturnType<Workflow['getRun']>>;
|
|
340
|
-
|
|
341
|
-
export declare function getWorkflowRunsHandler({ mastra, workflowId, fromDate, toDate, limit, offset, resourceId, }: WorkflowContext & {
|
|
342
|
-
fromDate?: Date;
|
|
343
|
-
toDate?: Date;
|
|
344
|
-
limit?: number;
|
|
345
|
-
offset?: number;
|
|
346
|
-
resourceId?: string;
|
|
347
|
-
}): Promise<WorkflowRuns>;
|
|
348
|
-
|
|
349
|
-
export declare function getWorkflowsHandler({ mastra }: WorkflowContext): Promise<any>;
|
|
351
|
+
export declare function getWorkflowsHandler({ mastra }: WorkflowContext_3): Promise<any>;
|
|
350
352
|
|
|
351
353
|
export declare function handleError(error: unknown, defaultMessage: string): never;
|
|
352
354
|
|
|
@@ -355,7 +357,7 @@ export declare function handleTaskCancel({ requestId, taskStore, agentId, taskId
|
|
|
355
357
|
taskStore: InMemoryTaskStore;
|
|
356
358
|
agentId: string;
|
|
357
359
|
taskId: string;
|
|
358
|
-
logger?:
|
|
360
|
+
logger?: IMastraLogger;
|
|
359
361
|
}): Promise<JSONRPCResponse<Task, unknown>>;
|
|
360
362
|
|
|
361
363
|
export declare function handleTaskGet({ requestId, taskStore, agentId, taskId, }: {
|
|
@@ -370,7 +372,7 @@ export declare function handleTaskSend({ requestId, params, taskStore, agent, lo
|
|
|
370
372
|
params: TaskSendParams;
|
|
371
373
|
taskStore: InMemoryTaskStore;
|
|
372
374
|
agent: Agent;
|
|
373
|
-
logger?:
|
|
375
|
+
logger?: IMastraLogger;
|
|
374
376
|
runtimeContext: RuntimeContext;
|
|
375
377
|
}): Promise<JSONRPCResponse<null, unknown> | JSONRPCResponse<Task, unknown>>;
|
|
376
378
|
|
|
@@ -379,7 +381,7 @@ export declare function handleTaskSendSubscribe({ requestId, params, taskStore,
|
|
|
379
381
|
params: TaskSendParams;
|
|
380
382
|
taskStore: InMemoryTaskStore;
|
|
381
383
|
agent: Agent;
|
|
382
|
-
logger?:
|
|
384
|
+
logger?: IMastraLogger;
|
|
383
385
|
runtimeContext: RuntimeContext;
|
|
384
386
|
}): AsyncGenerator<JSONRPCResponse<null, unknown> | JSONRPCResponse<Task, unknown> | JSONRPCResponse< {
|
|
385
387
|
state: string;
|
|
@@ -466,6 +468,21 @@ export declare class InMemoryTaskStore {
|
|
|
466
468
|
}): Promise<void>;
|
|
467
469
|
}
|
|
468
470
|
|
|
471
|
+
export declare namespace legacyWorkflows {
|
|
472
|
+
export {
|
|
473
|
+
getLegacyWorkflowsHandler,
|
|
474
|
+
getLegacyWorkflowByIdHandler,
|
|
475
|
+
startAsyncLegacyWorkflowHandler,
|
|
476
|
+
getLegacyWorkflowRunHandler,
|
|
477
|
+
createLegacyWorkflowRunHandler,
|
|
478
|
+
startLegacyWorkflowRunHandler,
|
|
479
|
+
watchLegacyWorkflowHandler,
|
|
480
|
+
resumeAsyncLegacyWorkflowHandler,
|
|
481
|
+
resumeLegacyWorkflowHandler,
|
|
482
|
+
getLegacyWorkflowRunsHandler
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
|
|
469
486
|
export declare function listIndexes({ mastra, vectorName }: Pick<VectorContext, 'mastra' | 'vectorName'>): Promise<string[]>;
|
|
470
487
|
|
|
471
488
|
export declare function loadOrCreateTaskAndHistory({ agentId, taskId, taskStore, message, sessionId, metadata, logger, }: {
|
|
@@ -475,7 +492,7 @@ export declare function loadOrCreateTaskAndHistory({ agentId, taskId, taskStore,
|
|
|
475
492
|
message: Message_2;
|
|
476
493
|
sessionId?: string | null;
|
|
477
494
|
metadata?: Record<string, unknown> | null;
|
|
478
|
-
logger?:
|
|
495
|
+
logger?: IMastraLogger;
|
|
479
496
|
}): Promise<TaskAndHistory>;
|
|
480
497
|
|
|
481
498
|
export declare namespace logs {
|
|
@@ -525,7 +542,7 @@ declare interface NetworkContext extends Context {
|
|
|
525
542
|
runtimeContext: RuntimeContext;
|
|
526
543
|
}
|
|
527
544
|
|
|
528
|
-
export declare function normalizeError(error: any, reqId: number | string | null, taskId?: string, logger?:
|
|
545
|
+
export declare function normalizeError(error: any, reqId: number | string | null, taskId?: string, logger?: IMastraLogger): JSONRPCResponse<null, unknown>;
|
|
529
546
|
|
|
530
547
|
declare interface QueryRequest {
|
|
531
548
|
indexName: string;
|
|
@@ -541,39 +558,39 @@ export declare function queryVectors({ mastra, vectorName, query, }: Pick<Vector
|
|
|
541
558
|
|
|
542
559
|
declare type RedirectStatusCode = 300 | 301 | 302 | 303 | 304 | DeprecatedStatusCode | 307 | 308;
|
|
543
560
|
|
|
544
|
-
export declare function
|
|
561
|
+
export declare function resumeAsyncLegacyWorkflowHandler({ mastra, workflowId, runId, body, runtimeContext, }: WorkflowContext & {
|
|
562
|
+
body: {
|
|
563
|
+
stepId: string;
|
|
564
|
+
context: any;
|
|
565
|
+
};
|
|
566
|
+
runtimeContext: RuntimeContext;
|
|
567
|
+
}): Promise<Omit<LegacyWorkflowRunResult<any, LegacyStep<string, any, any, StepExecutionContext<any, WorkflowContext_2<any, LegacyStep<string, any, any, any>[], Record<string, any>>>>[], any>, "runId"> | undefined>;
|
|
568
|
+
|
|
569
|
+
export declare function resumeAsyncWorkflowHandler({ mastra, workflowId, runId, body, runtimeContext, runtimeContextFromRequest, }: WorkflowContext_3 & {
|
|
545
570
|
body: {
|
|
546
571
|
step: string | string[];
|
|
547
572
|
resumeData?: unknown;
|
|
548
573
|
};
|
|
549
574
|
runtimeContext?: RuntimeContext_2;
|
|
550
575
|
runtimeContextFromRequest?: Record<string, unknown>;
|
|
551
|
-
}): Promise<WorkflowResult<ZodType<any, ZodTypeDef, any>,
|
|
576
|
+
}): Promise<WorkflowResult<ZodType<any, ZodTypeDef, any>, Step<string, any, any, any, any>[]>>;
|
|
552
577
|
|
|
553
|
-
export declare function
|
|
578
|
+
export declare function resumeLegacyWorkflowHandler({ mastra, workflowId, runId, body, runtimeContext, }: WorkflowContext & {
|
|
554
579
|
body: {
|
|
555
580
|
stepId: string;
|
|
556
581
|
context: any;
|
|
557
582
|
};
|
|
558
583
|
runtimeContext: RuntimeContext;
|
|
559
|
-
}): Promise<Omit<WorkflowRunResult<any, Step<string, any, any, StepExecutionContext<any, WorkflowContext_2<any, Step<string, any, any, any>[], Record<string, any>>>>[], any>, "runId"> | undefined>;
|
|
560
|
-
|
|
561
|
-
export declare function resumeVNextWorkflowHandler({ mastra, workflowId, runId, body, runtimeContext, }: VNextWorkflowContext & {
|
|
562
|
-
body: {
|
|
563
|
-
step: string | string[];
|
|
564
|
-
resumeData?: unknown;
|
|
565
|
-
};
|
|
566
|
-
runtimeContext?: RuntimeContext_2;
|
|
567
584
|
}): Promise<{
|
|
568
585
|
message: string;
|
|
569
586
|
}>;
|
|
570
587
|
|
|
571
|
-
export declare function resumeWorkflowHandler({ mastra, workflowId, runId, body, runtimeContext, }:
|
|
588
|
+
export declare function resumeWorkflowHandler({ mastra, workflowId, runId, body, runtimeContext, }: WorkflowContext_3 & {
|
|
572
589
|
body: {
|
|
573
|
-
|
|
574
|
-
|
|
590
|
+
step: string | string[];
|
|
591
|
+
resumeData?: unknown;
|
|
575
592
|
};
|
|
576
|
-
runtimeContext
|
|
593
|
+
runtimeContext?: RuntimeContext_2;
|
|
577
594
|
}): Promise<{
|
|
578
595
|
message: string;
|
|
579
596
|
}>;
|
|
@@ -595,28 +612,28 @@ declare type SerializedStep = {
|
|
|
595
612
|
|
|
596
613
|
declare type ServerErrorStatusCode = 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511;
|
|
597
614
|
|
|
598
|
-
export declare function
|
|
599
|
-
inputData?: unknown;
|
|
600
|
-
runtimeContext?: RuntimeContext_2;
|
|
601
|
-
runtimeContextFromRequest?: Record<string, unknown>;
|
|
602
|
-
}): Promise<WorkflowResult<ZodType<any, ZodTypeDef, any>, NewStep<string, any, any, any, any>[]>>;
|
|
603
|
-
|
|
604
|
-
export declare function startAsyncWorkflowHandler({ mastra, runtimeContext, workflowId, runId, triggerData, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
|
|
615
|
+
export declare function startAsyncLegacyWorkflowHandler({ mastra, runtimeContext, workflowId, runId, triggerData, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
|
|
605
616
|
triggerData?: unknown;
|
|
606
617
|
runtimeContext: RuntimeContext;
|
|
607
|
-
}): Promise<
|
|
618
|
+
}): Promise<LegacyWorkflowRunResult<any, LegacyStep<string, any, any, StepExecutionContext<any, WorkflowContext_2<any, LegacyStep<string, any, any, any>[], Record<string, any>>>>[], any>>;
|
|
608
619
|
|
|
609
|
-
export declare function
|
|
620
|
+
export declare function startAsyncWorkflowHandler({ mastra, runtimeContext, workflowId, runId, inputData, runtimeContextFromRequest, }: Pick<WorkflowContext_3, 'mastra' | 'workflowId' | 'runId'> & {
|
|
610
621
|
inputData?: unknown;
|
|
611
622
|
runtimeContext?: RuntimeContext_2;
|
|
612
623
|
runtimeContextFromRequest?: Record<string, unknown>;
|
|
624
|
+
}): Promise<WorkflowResult<ZodType<any, ZodTypeDef, any>, Step<string, any, any, any, any>[]>>;
|
|
625
|
+
|
|
626
|
+
export declare function startLegacyWorkflowRunHandler({ mastra, runtimeContext, workflowId, runId, triggerData, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
|
|
627
|
+
triggerData?: unknown;
|
|
628
|
+
runtimeContext: RuntimeContext;
|
|
613
629
|
}): Promise<{
|
|
614
630
|
message: string;
|
|
615
631
|
}>;
|
|
616
632
|
|
|
617
|
-
export declare function startWorkflowRunHandler({ mastra, runtimeContext, workflowId, runId,
|
|
618
|
-
|
|
619
|
-
runtimeContext
|
|
633
|
+
export declare function startWorkflowRunHandler({ mastra, runtimeContext, workflowId, runId, inputData, runtimeContextFromRequest, }: Pick<WorkflowContext_3, 'mastra' | 'workflowId' | 'runId'> & {
|
|
634
|
+
inputData?: unknown;
|
|
635
|
+
runtimeContext?: RuntimeContext_2;
|
|
636
|
+
runtimeContextFromRequest?: Record<string, unknown>;
|
|
620
637
|
}): Promise<{
|
|
621
638
|
message: string;
|
|
622
639
|
}>;
|
|
@@ -756,26 +773,6 @@ declare interface VectorContext extends Context {
|
|
|
756
773
|
vectorName?: string;
|
|
757
774
|
}
|
|
758
775
|
|
|
759
|
-
declare interface VNextWorkflowContext extends Context {
|
|
760
|
-
workflowId?: string;
|
|
761
|
-
runId?: string;
|
|
762
|
-
}
|
|
763
|
-
|
|
764
|
-
export declare namespace vNextWorkflows {
|
|
765
|
-
export {
|
|
766
|
-
getVNextWorkflowsHandler,
|
|
767
|
-
getVNextWorkflowByIdHandler,
|
|
768
|
-
getVNextWorkflowRunByIdHandler,
|
|
769
|
-
createVNextWorkflowRunHandler,
|
|
770
|
-
startAsyncVNextWorkflowHandler,
|
|
771
|
-
startVNextWorkflowRunHandler,
|
|
772
|
-
watchVNextWorkflowHandler,
|
|
773
|
-
resumeAsyncVNextWorkflowHandler,
|
|
774
|
-
resumeVNextWorkflowHandler,
|
|
775
|
-
getVNextWorkflowRunsHandler
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
|
|
779
776
|
export declare namespace voice {
|
|
780
777
|
export {
|
|
781
778
|
getSpeakersHandler,
|
|
@@ -788,22 +785,27 @@ declare interface VoiceContext extends Context {
|
|
|
788
785
|
agentId?: string;
|
|
789
786
|
}
|
|
790
787
|
|
|
791
|
-
export declare function
|
|
788
|
+
export declare function watchLegacyWorkflowHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<ReadableStream_2<string>>;
|
|
792
789
|
|
|
793
|
-
export declare function watchWorkflowHandler({ mastra, workflowId, runId, }: Pick<
|
|
790
|
+
export declare function watchWorkflowHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext_3, 'mastra' | 'workflowId' | 'runId'>): Promise<ReadableStream_2<string>>;
|
|
794
791
|
|
|
795
792
|
declare interface WorkflowContext extends Context {
|
|
796
793
|
workflowId?: string;
|
|
797
794
|
runId?: string;
|
|
798
795
|
}
|
|
799
796
|
|
|
797
|
+
declare interface WorkflowContext_3 extends Context {
|
|
798
|
+
workflowId?: string;
|
|
799
|
+
runId?: string;
|
|
800
|
+
}
|
|
801
|
+
|
|
800
802
|
export declare namespace workflows {
|
|
801
803
|
export {
|
|
802
804
|
getWorkflowsHandler,
|
|
803
805
|
getWorkflowByIdHandler,
|
|
806
|
+
getWorkflowRunByIdHandler,
|
|
807
|
+
createWorkflowRunHandler,
|
|
804
808
|
startAsyncWorkflowHandler,
|
|
805
|
-
getWorkflowRunHandler,
|
|
806
|
-
createRunHandler,
|
|
807
809
|
startWorkflowRunHandler,
|
|
808
810
|
watchWorkflowHandler,
|
|
809
811
|
resumeAsyncWorkflowHandler,
|