@mastra/server 2.0.1-alpha.0 → 2.0.1-alpha.2
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 +79 -4
- package/dist/_tsup-dts-rollup.d.ts +79 -4
- package/dist/chunk-2PP5GZLP.cjs +311 -0
- package/dist/{chunk-CWUJ6DED.cjs → chunk-55HTWX4C.cjs} +1 -6
- package/dist/chunk-7LT5EOQ3.js +299 -0
- package/dist/{chunk-YE2P6K2L.js → chunk-Q6SHQECN.js} +1 -6
- package/dist/server/handlers/vNextWorkflows.cjs +46 -0
- package/dist/server/handlers/vNextWorkflows.d.cts +10 -0
- package/dist/server/handlers/vNextWorkflows.d.ts +10 -0
- package/dist/server/handlers/vNextWorkflows.js +1 -0
- package/dist/server/handlers/voice.cjs +4 -4
- package/dist/server/handlers/voice.js +1 -1
- package/dist/server/handlers.cjs +7 -2
- package/dist/server/handlers.d.cts +1 -0
- package/dist/server/handlers.d.ts +1 -0
- package/dist/server/handlers.js +2 -1
- package/package.json +4 -4
|
@@ -9,19 +9,26 @@ import type { Mastra } from '@mastra/core/mastra';
|
|
|
9
9
|
import type { MastraMemory } from '@mastra/core/memory';
|
|
10
10
|
import { Message } from 'ai';
|
|
11
11
|
import { MessageType } from '@mastra/core/memory';
|
|
12
|
+
import { NewStep } from '@mastra/core/workflows/vNext';
|
|
13
|
+
import type { NewWorkflow } from '@mastra/core/workflows/vNext';
|
|
12
14
|
import type { QueryResult } from '@mastra/core/vector';
|
|
13
15
|
import { ReadableStream as ReadableStream_2 } from 'node:stream/web';
|
|
14
|
-
import type { RuntimeContext } from '@mastra/core/
|
|
16
|
+
import type { RuntimeContext } from '@mastra/core/runtime-context';
|
|
17
|
+
import type { RuntimeContext as RuntimeContext_2 } from '@mastra/core/di';
|
|
15
18
|
import { Step } from '@mastra/core/workflows';
|
|
16
19
|
import { StepExecutionContext } from '@mastra/core/workflows';
|
|
20
|
+
import { StepFlowEntry } from '@mastra/core/workflows/vNext';
|
|
17
21
|
import { StepGraph } from '@mastra/core/workflows';
|
|
18
22
|
import { StorageThreadType } from '@mastra/core/memory';
|
|
19
23
|
import type { ToolAction } from '@mastra/core/tools';
|
|
20
24
|
import type { VercelTool } from '@mastra/core/tools';
|
|
21
25
|
import type { Workflow } from '@mastra/core/workflows';
|
|
22
26
|
import { WorkflowContext as WorkflowContext_2 } from '@mastra/core/workflows';
|
|
27
|
+
import { WorkflowResult } from '@mastra/core/workflows/vNext';
|
|
23
28
|
import { WorkflowRunResult } from '@mastra/core/workflows';
|
|
24
29
|
import type { WorkflowRuns } from '@mastra/core/storage';
|
|
30
|
+
import { ZodType } from 'zod';
|
|
31
|
+
import { ZodTypeDef } from 'zod';
|
|
25
32
|
|
|
26
33
|
export declare namespace agents {
|
|
27
34
|
export {
|
|
@@ -67,6 +74,10 @@ export declare function createThreadHandler({ mastra, agentId, body, }: Pick<Mem
|
|
|
67
74
|
};
|
|
68
75
|
}): Promise<StorageThreadType>;
|
|
69
76
|
|
|
77
|
+
export declare function createVNextWorkflowRunHandler({ mastra, workflowId, runId: prevRunId, }: Pick<VNextWorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<{
|
|
78
|
+
runId: string;
|
|
79
|
+
}>;
|
|
80
|
+
|
|
70
81
|
export declare function deleteIndex({ mastra, vectorName, indexName, }: Pick<VectorContext, 'mastra' | 'vectorName'> & {
|
|
71
82
|
indexName?: string;
|
|
72
83
|
}): Promise<{
|
|
@@ -121,9 +132,7 @@ export declare function generateSpeechHandler({ mastra, agentId, body, }: VoiceC
|
|
|
121
132
|
text?: string;
|
|
122
133
|
speakerId?: string;
|
|
123
134
|
};
|
|
124
|
-
}): Promise<
|
|
125
|
-
audioData: Buffer<ArrayBuffer>;
|
|
126
|
-
}>;
|
|
135
|
+
}): Promise<NodeJS.ReadableStream>;
|
|
127
136
|
|
|
128
137
|
export declare function getAgentByIdHandler({ mastra, agentId }: Context & {
|
|
129
138
|
agentId: string;
|
|
@@ -225,6 +234,20 @@ export declare function getToolByIdHandler({ tools, toolId }: Pick<ToolsContext,
|
|
|
225
234
|
|
|
226
235
|
export declare function getToolsHandler({ tools }: Pick<ToolsContext, 'tools'>): Promise<Record<string, any>>;
|
|
227
236
|
|
|
237
|
+
export declare function getVNextWorkflowByIdHandler({ mastra, workflowId }: VNextWorkflowContext): Promise<{
|
|
238
|
+
steps: any;
|
|
239
|
+
name: string | undefined;
|
|
240
|
+
stepGraph: StepFlowEntry[];
|
|
241
|
+
inputSchema: string | undefined;
|
|
242
|
+
outputSchema: string | undefined;
|
|
243
|
+
}>;
|
|
244
|
+
|
|
245
|
+
export declare function getVNextWorkflowRunHandler({ mastra, workflowId, runId, }: Pick<VNextWorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<ReturnType<NewWorkflow['getWorkflowRun']>>;
|
|
246
|
+
|
|
247
|
+
export declare function getVNextWorkflowRunsHandler({ mastra, workflowId }: VNextWorkflowContext): Promise<WorkflowRuns>;
|
|
248
|
+
|
|
249
|
+
export declare function getVNextWorkflowsHandler({ mastra }: VNextWorkflowContext): Promise<any>;
|
|
250
|
+
|
|
228
251
|
export declare function getWorkflowByIdHandler({ mastra, workflowId }: WorkflowContext): Promise<{
|
|
229
252
|
stepGraph: StepGraph;
|
|
230
253
|
stepSubscriberGraph: Record<string, StepGraph>;
|
|
@@ -366,6 +389,14 @@ export declare function queryVectors({ mastra, vectorName, query, }: Pick<Vector
|
|
|
366
389
|
|
|
367
390
|
declare type RedirectStatusCode = 300 | 301 | 302 | 303 | 304 | DeprecatedStatusCode | 307 | 308;
|
|
368
391
|
|
|
392
|
+
export declare function resumeAsyncVNextWorkflowHandler({ mastra, workflowId, runId, body, runtimeContext, }: VNextWorkflowContext & {
|
|
393
|
+
body: {
|
|
394
|
+
step: string | string[];
|
|
395
|
+
resumeData?: unknown;
|
|
396
|
+
};
|
|
397
|
+
runtimeContext?: RuntimeContext_2;
|
|
398
|
+
}): Promise<WorkflowResult<ZodType<any, ZodTypeDef, any>, NewStep<string, any, any, any, any>[]>>;
|
|
399
|
+
|
|
369
400
|
export declare function resumeAsyncWorkflowHandler({ mastra, workflowId, runId, body, runtimeContext, }: WorkflowContext & {
|
|
370
401
|
body: {
|
|
371
402
|
stepId: string;
|
|
@@ -374,6 +405,16 @@ export declare function resumeAsyncWorkflowHandler({ mastra, workflowId, runId,
|
|
|
374
405
|
runtimeContext: RuntimeContext;
|
|
375
406
|
}): Promise<Omit<WorkflowRunResult<any, Step<string, any, any, StepExecutionContext<any, WorkflowContext_2<any, Step<string, any, any, any>[], Record<string, any>>>>[], any>, "runId"> | undefined>;
|
|
376
407
|
|
|
408
|
+
export declare function resumeVNextWorkflowHandler({ mastra, workflowId, runId, body, runtimeContext, }: VNextWorkflowContext & {
|
|
409
|
+
body: {
|
|
410
|
+
step: string | string[];
|
|
411
|
+
resumeData?: unknown;
|
|
412
|
+
};
|
|
413
|
+
runtimeContext?: RuntimeContext_2;
|
|
414
|
+
}): Promise<{
|
|
415
|
+
message: string;
|
|
416
|
+
}>;
|
|
417
|
+
|
|
377
418
|
export declare function resumeWorkflowHandler({ mastra, workflowId, runId, body, runtimeContext, }: WorkflowContext & {
|
|
378
419
|
body: {
|
|
379
420
|
stepId: string;
|
|
@@ -392,11 +433,23 @@ export declare function saveMessagesHandler({ mastra, agentId, body, }: Pick<Mem
|
|
|
392
433
|
|
|
393
434
|
declare type ServerErrorStatusCode = 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511;
|
|
394
435
|
|
|
436
|
+
export declare function startAsyncVNextWorkflowHandler({ mastra, runtimeContext, workflowId, runId, inputData, }: Pick<VNextWorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
|
|
437
|
+
inputData?: unknown;
|
|
438
|
+
runtimeContext?: RuntimeContext_2;
|
|
439
|
+
}): Promise<WorkflowResult<ZodType<any, ZodTypeDef, any>, NewStep<string, any, any, any, any>[]>>;
|
|
440
|
+
|
|
395
441
|
export declare function startAsyncWorkflowHandler({ mastra, runtimeContext, workflowId, runId, triggerData, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
|
|
396
442
|
triggerData?: unknown;
|
|
397
443
|
runtimeContext: RuntimeContext;
|
|
398
444
|
}): Promise<WorkflowRunResult<any, Step<string, any, any, StepExecutionContext<any, WorkflowContext_2<any, Step<string, any, any, any>[], Record<string, any>>>>[], any>>;
|
|
399
445
|
|
|
446
|
+
export declare function startVNextWorkflowRunHandler({ mastra, runtimeContext, workflowId, runId, inputData, }: Pick<VNextWorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
|
|
447
|
+
inputData?: unknown;
|
|
448
|
+
runtimeContext?: RuntimeContext_2;
|
|
449
|
+
}): Promise<{
|
|
450
|
+
message: string;
|
|
451
|
+
}>;
|
|
452
|
+
|
|
400
453
|
export declare function startWorkflowRunHandler({ mastra, runtimeContext, workflowId, runId, triggerData, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
|
|
401
454
|
triggerData?: unknown;
|
|
402
455
|
runtimeContext: RuntimeContext;
|
|
@@ -536,6 +589,26 @@ declare interface VectorContext extends Context {
|
|
|
536
589
|
vectorName?: string;
|
|
537
590
|
}
|
|
538
591
|
|
|
592
|
+
declare interface VNextWorkflowContext extends Context {
|
|
593
|
+
workflowId?: string;
|
|
594
|
+
runId?: string;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
export declare namespace vNextWorkflows {
|
|
598
|
+
export {
|
|
599
|
+
getVNextWorkflowsHandler,
|
|
600
|
+
getVNextWorkflowByIdHandler,
|
|
601
|
+
getVNextWorkflowRunHandler,
|
|
602
|
+
createVNextWorkflowRunHandler,
|
|
603
|
+
startAsyncVNextWorkflowHandler,
|
|
604
|
+
startVNextWorkflowRunHandler,
|
|
605
|
+
watchVNextWorkflowHandler,
|
|
606
|
+
resumeAsyncVNextWorkflowHandler,
|
|
607
|
+
resumeVNextWorkflowHandler,
|
|
608
|
+
getVNextWorkflowRunsHandler
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
|
|
539
612
|
export declare namespace voice {
|
|
540
613
|
export {
|
|
541
614
|
getSpeakersHandler,
|
|
@@ -548,6 +621,8 @@ declare interface VoiceContext extends Context {
|
|
|
548
621
|
agentId?: string;
|
|
549
622
|
}
|
|
550
623
|
|
|
624
|
+
export declare function watchVNextWorkflowHandler({ mastra, workflowId, runId, }: Pick<VNextWorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<ReadableStream_2<string>>;
|
|
625
|
+
|
|
551
626
|
export declare function watchWorkflowHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<ReadableStream_2<string>>;
|
|
552
627
|
|
|
553
628
|
declare interface WorkflowContext extends Context {
|
|
@@ -9,19 +9,26 @@ import type { Mastra } from '@mastra/core/mastra';
|
|
|
9
9
|
import type { MastraMemory } from '@mastra/core/memory';
|
|
10
10
|
import { Message } from 'ai';
|
|
11
11
|
import { MessageType } from '@mastra/core/memory';
|
|
12
|
+
import { NewStep } from '@mastra/core/workflows/vNext';
|
|
13
|
+
import type { NewWorkflow } from '@mastra/core/workflows/vNext';
|
|
12
14
|
import type { QueryResult } from '@mastra/core/vector';
|
|
13
15
|
import { ReadableStream as ReadableStream_2 } from 'node:stream/web';
|
|
14
|
-
import type { RuntimeContext } from '@mastra/core/
|
|
16
|
+
import type { RuntimeContext } from '@mastra/core/runtime-context';
|
|
17
|
+
import type { RuntimeContext as RuntimeContext_2 } from '@mastra/core/di';
|
|
15
18
|
import { Step } from '@mastra/core/workflows';
|
|
16
19
|
import { StepExecutionContext } from '@mastra/core/workflows';
|
|
20
|
+
import { StepFlowEntry } from '@mastra/core/workflows/vNext';
|
|
17
21
|
import { StepGraph } from '@mastra/core/workflows';
|
|
18
22
|
import { StorageThreadType } from '@mastra/core/memory';
|
|
19
23
|
import type { ToolAction } from '@mastra/core/tools';
|
|
20
24
|
import type { VercelTool } from '@mastra/core/tools';
|
|
21
25
|
import type { Workflow } from '@mastra/core/workflows';
|
|
22
26
|
import { WorkflowContext as WorkflowContext_2 } from '@mastra/core/workflows';
|
|
27
|
+
import { WorkflowResult } from '@mastra/core/workflows/vNext';
|
|
23
28
|
import { WorkflowRunResult } from '@mastra/core/workflows';
|
|
24
29
|
import type { WorkflowRuns } from '@mastra/core/storage';
|
|
30
|
+
import { ZodType } from 'zod';
|
|
31
|
+
import { ZodTypeDef } from 'zod';
|
|
25
32
|
|
|
26
33
|
export declare namespace agents {
|
|
27
34
|
export {
|
|
@@ -67,6 +74,10 @@ export declare function createThreadHandler({ mastra, agentId, body, }: Pick<Mem
|
|
|
67
74
|
};
|
|
68
75
|
}): Promise<StorageThreadType>;
|
|
69
76
|
|
|
77
|
+
export declare function createVNextWorkflowRunHandler({ mastra, workflowId, runId: prevRunId, }: Pick<VNextWorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<{
|
|
78
|
+
runId: string;
|
|
79
|
+
}>;
|
|
80
|
+
|
|
70
81
|
export declare function deleteIndex({ mastra, vectorName, indexName, }: Pick<VectorContext, 'mastra' | 'vectorName'> & {
|
|
71
82
|
indexName?: string;
|
|
72
83
|
}): Promise<{
|
|
@@ -121,9 +132,7 @@ export declare function generateSpeechHandler({ mastra, agentId, body, }: VoiceC
|
|
|
121
132
|
text?: string;
|
|
122
133
|
speakerId?: string;
|
|
123
134
|
};
|
|
124
|
-
}): Promise<
|
|
125
|
-
audioData: Buffer<ArrayBuffer>;
|
|
126
|
-
}>;
|
|
135
|
+
}): Promise<NodeJS.ReadableStream>;
|
|
127
136
|
|
|
128
137
|
export declare function getAgentByIdHandler({ mastra, agentId }: Context & {
|
|
129
138
|
agentId: string;
|
|
@@ -225,6 +234,20 @@ export declare function getToolByIdHandler({ tools, toolId }: Pick<ToolsContext,
|
|
|
225
234
|
|
|
226
235
|
export declare function getToolsHandler({ tools }: Pick<ToolsContext, 'tools'>): Promise<Record<string, any>>;
|
|
227
236
|
|
|
237
|
+
export declare function getVNextWorkflowByIdHandler({ mastra, workflowId }: VNextWorkflowContext): Promise<{
|
|
238
|
+
steps: any;
|
|
239
|
+
name: string | undefined;
|
|
240
|
+
stepGraph: StepFlowEntry[];
|
|
241
|
+
inputSchema: string | undefined;
|
|
242
|
+
outputSchema: string | undefined;
|
|
243
|
+
}>;
|
|
244
|
+
|
|
245
|
+
export declare function getVNextWorkflowRunHandler({ mastra, workflowId, runId, }: Pick<VNextWorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<ReturnType<NewWorkflow['getWorkflowRun']>>;
|
|
246
|
+
|
|
247
|
+
export declare function getVNextWorkflowRunsHandler({ mastra, workflowId }: VNextWorkflowContext): Promise<WorkflowRuns>;
|
|
248
|
+
|
|
249
|
+
export declare function getVNextWorkflowsHandler({ mastra }: VNextWorkflowContext): Promise<any>;
|
|
250
|
+
|
|
228
251
|
export declare function getWorkflowByIdHandler({ mastra, workflowId }: WorkflowContext): Promise<{
|
|
229
252
|
stepGraph: StepGraph;
|
|
230
253
|
stepSubscriberGraph: Record<string, StepGraph>;
|
|
@@ -366,6 +389,14 @@ export declare function queryVectors({ mastra, vectorName, query, }: Pick<Vector
|
|
|
366
389
|
|
|
367
390
|
declare type RedirectStatusCode = 300 | 301 | 302 | 303 | 304 | DeprecatedStatusCode | 307 | 308;
|
|
368
391
|
|
|
392
|
+
export declare function resumeAsyncVNextWorkflowHandler({ mastra, workflowId, runId, body, runtimeContext, }: VNextWorkflowContext & {
|
|
393
|
+
body: {
|
|
394
|
+
step: string | string[];
|
|
395
|
+
resumeData?: unknown;
|
|
396
|
+
};
|
|
397
|
+
runtimeContext?: RuntimeContext_2;
|
|
398
|
+
}): Promise<WorkflowResult<ZodType<any, ZodTypeDef, any>, NewStep<string, any, any, any, any>[]>>;
|
|
399
|
+
|
|
369
400
|
export declare function resumeAsyncWorkflowHandler({ mastra, workflowId, runId, body, runtimeContext, }: WorkflowContext & {
|
|
370
401
|
body: {
|
|
371
402
|
stepId: string;
|
|
@@ -374,6 +405,16 @@ export declare function resumeAsyncWorkflowHandler({ mastra, workflowId, runId,
|
|
|
374
405
|
runtimeContext: RuntimeContext;
|
|
375
406
|
}): Promise<Omit<WorkflowRunResult<any, Step<string, any, any, StepExecutionContext<any, WorkflowContext_2<any, Step<string, any, any, any>[], Record<string, any>>>>[], any>, "runId"> | undefined>;
|
|
376
407
|
|
|
408
|
+
export declare function resumeVNextWorkflowHandler({ mastra, workflowId, runId, body, runtimeContext, }: VNextWorkflowContext & {
|
|
409
|
+
body: {
|
|
410
|
+
step: string | string[];
|
|
411
|
+
resumeData?: unknown;
|
|
412
|
+
};
|
|
413
|
+
runtimeContext?: RuntimeContext_2;
|
|
414
|
+
}): Promise<{
|
|
415
|
+
message: string;
|
|
416
|
+
}>;
|
|
417
|
+
|
|
377
418
|
export declare function resumeWorkflowHandler({ mastra, workflowId, runId, body, runtimeContext, }: WorkflowContext & {
|
|
378
419
|
body: {
|
|
379
420
|
stepId: string;
|
|
@@ -392,11 +433,23 @@ export declare function saveMessagesHandler({ mastra, agentId, body, }: Pick<Mem
|
|
|
392
433
|
|
|
393
434
|
declare type ServerErrorStatusCode = 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511;
|
|
394
435
|
|
|
436
|
+
export declare function startAsyncVNextWorkflowHandler({ mastra, runtimeContext, workflowId, runId, inputData, }: Pick<VNextWorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
|
|
437
|
+
inputData?: unknown;
|
|
438
|
+
runtimeContext?: RuntimeContext_2;
|
|
439
|
+
}): Promise<WorkflowResult<ZodType<any, ZodTypeDef, any>, NewStep<string, any, any, any, any>[]>>;
|
|
440
|
+
|
|
395
441
|
export declare function startAsyncWorkflowHandler({ mastra, runtimeContext, workflowId, runId, triggerData, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
|
|
396
442
|
triggerData?: unknown;
|
|
397
443
|
runtimeContext: RuntimeContext;
|
|
398
444
|
}): Promise<WorkflowRunResult<any, Step<string, any, any, StepExecutionContext<any, WorkflowContext_2<any, Step<string, any, any, any>[], Record<string, any>>>>[], any>>;
|
|
399
445
|
|
|
446
|
+
export declare function startVNextWorkflowRunHandler({ mastra, runtimeContext, workflowId, runId, inputData, }: Pick<VNextWorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
|
|
447
|
+
inputData?: unknown;
|
|
448
|
+
runtimeContext?: RuntimeContext_2;
|
|
449
|
+
}): Promise<{
|
|
450
|
+
message: string;
|
|
451
|
+
}>;
|
|
452
|
+
|
|
400
453
|
export declare function startWorkflowRunHandler({ mastra, runtimeContext, workflowId, runId, triggerData, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
|
|
401
454
|
triggerData?: unknown;
|
|
402
455
|
runtimeContext: RuntimeContext;
|
|
@@ -536,6 +589,26 @@ declare interface VectorContext extends Context {
|
|
|
536
589
|
vectorName?: string;
|
|
537
590
|
}
|
|
538
591
|
|
|
592
|
+
declare interface VNextWorkflowContext extends Context {
|
|
593
|
+
workflowId?: string;
|
|
594
|
+
runId?: string;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
export declare namespace vNextWorkflows {
|
|
598
|
+
export {
|
|
599
|
+
getVNextWorkflowsHandler,
|
|
600
|
+
getVNextWorkflowByIdHandler,
|
|
601
|
+
getVNextWorkflowRunHandler,
|
|
602
|
+
createVNextWorkflowRunHandler,
|
|
603
|
+
startAsyncVNextWorkflowHandler,
|
|
604
|
+
startVNextWorkflowRunHandler,
|
|
605
|
+
watchVNextWorkflowHandler,
|
|
606
|
+
resumeAsyncVNextWorkflowHandler,
|
|
607
|
+
resumeVNextWorkflowHandler,
|
|
608
|
+
getVNextWorkflowRunsHandler
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
|
|
539
612
|
export declare namespace voice {
|
|
540
613
|
export {
|
|
541
614
|
getSpeakersHandler,
|
|
@@ -548,6 +621,8 @@ declare interface VoiceContext extends Context {
|
|
|
548
621
|
agentId?: string;
|
|
549
622
|
}
|
|
550
623
|
|
|
624
|
+
export declare function watchVNextWorkflowHandler({ mastra, workflowId, runId, }: Pick<VNextWorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<ReadableStream_2<string>>;
|
|
625
|
+
|
|
551
626
|
export declare function watchWorkflowHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<ReadableStream_2<string>>;
|
|
552
627
|
|
|
553
628
|
declare interface WorkflowContext extends Context {
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk5SWCVTNL_cjs = require('./chunk-5SWCVTNL.cjs');
|
|
4
|
+
var chunkZLBRQFDD_cjs = require('./chunk-ZLBRQFDD.cjs');
|
|
5
|
+
var chunkFV45V6WC_cjs = require('./chunk-FV45V6WC.cjs');
|
|
6
|
+
var web = require('stream/web');
|
|
7
|
+
|
|
8
|
+
// src/server/handlers/vNextWorkflows.ts
|
|
9
|
+
var vNextWorkflows_exports = {};
|
|
10
|
+
chunkFV45V6WC_cjs.__export(vNextWorkflows_exports, {
|
|
11
|
+
createVNextWorkflowRunHandler: () => createVNextWorkflowRunHandler,
|
|
12
|
+
getVNextWorkflowByIdHandler: () => getVNextWorkflowByIdHandler,
|
|
13
|
+
getVNextWorkflowRunHandler: () => getVNextWorkflowRunHandler,
|
|
14
|
+
getVNextWorkflowRunsHandler: () => getVNextWorkflowRunsHandler,
|
|
15
|
+
getVNextWorkflowsHandler: () => getVNextWorkflowsHandler,
|
|
16
|
+
resumeAsyncVNextWorkflowHandler: () => resumeAsyncVNextWorkflowHandler,
|
|
17
|
+
resumeVNextWorkflowHandler: () => resumeVNextWorkflowHandler,
|
|
18
|
+
startAsyncVNextWorkflowHandler: () => startAsyncVNextWorkflowHandler,
|
|
19
|
+
startVNextWorkflowRunHandler: () => startVNextWorkflowRunHandler,
|
|
20
|
+
watchVNextWorkflowHandler: () => watchVNextWorkflowHandler
|
|
21
|
+
});
|
|
22
|
+
async function getVNextWorkflowsHandler({ mastra }) {
|
|
23
|
+
try {
|
|
24
|
+
const workflows = mastra.vnext_getWorkflows({ serialized: false });
|
|
25
|
+
const _workflows = Object.entries(workflows).reduce((acc, [key, workflow]) => {
|
|
26
|
+
acc[key] = {
|
|
27
|
+
name: workflow.name,
|
|
28
|
+
steps: Object.entries(workflow.steps).reduce((acc2, [key2, step]) => {
|
|
29
|
+
acc2[key2] = {
|
|
30
|
+
...step,
|
|
31
|
+
inputSchema: step.inputSchema ? chunk5SWCVTNL_cjs.stringify(chunk5SWCVTNL_cjs.esm_default(step.inputSchema)) : void 0,
|
|
32
|
+
outputSchema: step.outputSchema ? chunk5SWCVTNL_cjs.stringify(chunk5SWCVTNL_cjs.esm_default(step.outputSchema)) : void 0,
|
|
33
|
+
resumeSchema: step.resumeSchema ? chunk5SWCVTNL_cjs.stringify(chunk5SWCVTNL_cjs.esm_default(step.resumeSchema)) : void 0
|
|
34
|
+
};
|
|
35
|
+
return acc2;
|
|
36
|
+
}, {}),
|
|
37
|
+
stepGraph: workflow.stepGraph,
|
|
38
|
+
inputSchema: workflow.inputSchema ? chunk5SWCVTNL_cjs.stringify(chunk5SWCVTNL_cjs.esm_default(workflow.inputSchema)) : void 0,
|
|
39
|
+
outputSchema: workflow.outputSchema ? chunk5SWCVTNL_cjs.stringify(chunk5SWCVTNL_cjs.esm_default(workflow.outputSchema)) : void 0
|
|
40
|
+
};
|
|
41
|
+
return acc;
|
|
42
|
+
}, {});
|
|
43
|
+
return _workflows;
|
|
44
|
+
} catch (error) {
|
|
45
|
+
throw new chunkFV45V6WC_cjs.HTTPException(500, { message: error?.message || "Error getting workflows" });
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
async function getVNextWorkflowByIdHandler({ mastra, workflowId }) {
|
|
49
|
+
try {
|
|
50
|
+
if (!workflowId) {
|
|
51
|
+
throw new chunkFV45V6WC_cjs.HTTPException(400, { message: "Workflow ID is required" });
|
|
52
|
+
}
|
|
53
|
+
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
54
|
+
if (!workflow) {
|
|
55
|
+
throw new chunkFV45V6WC_cjs.HTTPException(404, { message: "Workflow not found" });
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
steps: Object.entries(workflow.steps).reduce((acc, [key, step]) => {
|
|
59
|
+
acc[key] = {
|
|
60
|
+
...step,
|
|
61
|
+
inputSchema: step.inputSchema ? chunk5SWCVTNL_cjs.stringify(chunk5SWCVTNL_cjs.esm_default(step.inputSchema)) : void 0,
|
|
62
|
+
outputSchema: step.outputSchema ? chunk5SWCVTNL_cjs.stringify(chunk5SWCVTNL_cjs.esm_default(step.outputSchema)) : void 0,
|
|
63
|
+
resumeSchema: step.resumeSchema ? chunk5SWCVTNL_cjs.stringify(chunk5SWCVTNL_cjs.esm_default(step.resumeSchema)) : void 0
|
|
64
|
+
};
|
|
65
|
+
return acc;
|
|
66
|
+
}, {}),
|
|
67
|
+
name: workflow.name,
|
|
68
|
+
stepGraph: workflow.stepGraph,
|
|
69
|
+
inputSchema: workflow.inputSchema ? chunk5SWCVTNL_cjs.stringify(chunk5SWCVTNL_cjs.esm_default(workflow.inputSchema)) : void 0,
|
|
70
|
+
outputSchema: workflow.outputSchema ? chunk5SWCVTNL_cjs.stringify(chunk5SWCVTNL_cjs.esm_default(workflow.outputSchema)) : void 0
|
|
71
|
+
};
|
|
72
|
+
} catch (error) {
|
|
73
|
+
throw new chunkFV45V6WC_cjs.HTTPException(500, { message: error?.message || "Error getting workflow" });
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
async function getVNextWorkflowRunHandler({
|
|
77
|
+
mastra,
|
|
78
|
+
workflowId,
|
|
79
|
+
runId
|
|
80
|
+
}) {
|
|
81
|
+
try {
|
|
82
|
+
if (!workflowId) {
|
|
83
|
+
throw new chunkFV45V6WC_cjs.HTTPException(400, { message: "Workflow ID is required" });
|
|
84
|
+
}
|
|
85
|
+
if (!runId) {
|
|
86
|
+
throw new chunkFV45V6WC_cjs.HTTPException(400, { message: "Run ID is required" });
|
|
87
|
+
}
|
|
88
|
+
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
89
|
+
if (!workflow) {
|
|
90
|
+
throw new chunkFV45V6WC_cjs.HTTPException(404, { message: "Workflow not found" });
|
|
91
|
+
}
|
|
92
|
+
const run = await workflow.getWorkflowRun(runId);
|
|
93
|
+
if (!run) {
|
|
94
|
+
throw new chunkFV45V6WC_cjs.HTTPException(404, { message: "Workflow run not found" });
|
|
95
|
+
}
|
|
96
|
+
return run;
|
|
97
|
+
} catch (error) {
|
|
98
|
+
throw new chunkFV45V6WC_cjs.HTTPException(500, { message: error?.message || "Error getting workflow run" });
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
async function createVNextWorkflowRunHandler({
|
|
102
|
+
mastra,
|
|
103
|
+
workflowId,
|
|
104
|
+
runId: prevRunId
|
|
105
|
+
}) {
|
|
106
|
+
try {
|
|
107
|
+
if (!workflowId) {
|
|
108
|
+
throw new chunkFV45V6WC_cjs.HTTPException(400, { message: "Workflow ID is required" });
|
|
109
|
+
}
|
|
110
|
+
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
111
|
+
if (!workflow) {
|
|
112
|
+
throw new chunkFV45V6WC_cjs.HTTPException(404, { message: "Workflow not found" });
|
|
113
|
+
}
|
|
114
|
+
const run = workflow.createRun({ runId: prevRunId });
|
|
115
|
+
return { runId: run.runId };
|
|
116
|
+
} catch (error) {
|
|
117
|
+
throw new chunkFV45V6WC_cjs.HTTPException(500, { message: error?.message || "Error creating workflow run" });
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
async function startAsyncVNextWorkflowHandler({
|
|
121
|
+
mastra,
|
|
122
|
+
runtimeContext,
|
|
123
|
+
workflowId,
|
|
124
|
+
runId,
|
|
125
|
+
inputData
|
|
126
|
+
}) {
|
|
127
|
+
try {
|
|
128
|
+
if (!workflowId) {
|
|
129
|
+
throw new chunkFV45V6WC_cjs.HTTPException(400, { message: "Workflow ID is required" });
|
|
130
|
+
}
|
|
131
|
+
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
132
|
+
if (!workflow) {
|
|
133
|
+
throw new chunkFV45V6WC_cjs.HTTPException(404, { message: "Workflow not found" });
|
|
134
|
+
}
|
|
135
|
+
const _run = workflow.createRun({ runId });
|
|
136
|
+
const result = await _run.start({
|
|
137
|
+
inputData,
|
|
138
|
+
runtimeContext
|
|
139
|
+
});
|
|
140
|
+
return result;
|
|
141
|
+
} catch (error) {
|
|
142
|
+
throw new chunkFV45V6WC_cjs.HTTPException(500, { message: error?.message || "Error executing workflow" });
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
async function startVNextWorkflowRunHandler({
|
|
146
|
+
mastra,
|
|
147
|
+
runtimeContext,
|
|
148
|
+
workflowId,
|
|
149
|
+
runId,
|
|
150
|
+
inputData
|
|
151
|
+
}) {
|
|
152
|
+
try {
|
|
153
|
+
if (!workflowId) {
|
|
154
|
+
throw new chunkFV45V6WC_cjs.HTTPException(400, { message: "Workflow ID is required" });
|
|
155
|
+
}
|
|
156
|
+
if (!runId) {
|
|
157
|
+
throw new chunkFV45V6WC_cjs.HTTPException(400, { message: "runId required to start run" });
|
|
158
|
+
}
|
|
159
|
+
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
160
|
+
const run = await workflow.getWorkflowRun(runId);
|
|
161
|
+
if (!run) {
|
|
162
|
+
throw new chunkFV45V6WC_cjs.HTTPException(404, { message: "Workflow run not found" });
|
|
163
|
+
}
|
|
164
|
+
const _run = workflow.createRun({ runId });
|
|
165
|
+
await _run.start({
|
|
166
|
+
inputData,
|
|
167
|
+
runtimeContext
|
|
168
|
+
});
|
|
169
|
+
return { message: "Workflow run started" };
|
|
170
|
+
} catch (e) {
|
|
171
|
+
return chunkZLBRQFDD_cjs.handleError(e, "Error starting workflow run");
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
async function watchVNextWorkflowHandler({
|
|
175
|
+
mastra,
|
|
176
|
+
workflowId,
|
|
177
|
+
runId
|
|
178
|
+
}) {
|
|
179
|
+
try {
|
|
180
|
+
if (!workflowId) {
|
|
181
|
+
throw new chunkFV45V6WC_cjs.HTTPException(400, { message: "Workflow ID is required" });
|
|
182
|
+
}
|
|
183
|
+
if (!runId) {
|
|
184
|
+
throw new chunkFV45V6WC_cjs.HTTPException(400, { message: "runId required to watch workflow" });
|
|
185
|
+
}
|
|
186
|
+
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
187
|
+
const run = await workflow.getWorkflowRun(runId);
|
|
188
|
+
if (!run) {
|
|
189
|
+
throw new chunkFV45V6WC_cjs.HTTPException(404, { message: "Workflow run not found" });
|
|
190
|
+
}
|
|
191
|
+
const _run = workflow.createRun({ runId });
|
|
192
|
+
let unwatch;
|
|
193
|
+
let asyncRef = null;
|
|
194
|
+
const stream = new web.ReadableStream({
|
|
195
|
+
start(controller) {
|
|
196
|
+
unwatch = _run.watch(({ type, payload, eventTimestamp }) => {
|
|
197
|
+
controller.enqueue(JSON.stringify({ type, payload, eventTimestamp, runId }));
|
|
198
|
+
if (asyncRef) {
|
|
199
|
+
clearImmediate(asyncRef);
|
|
200
|
+
asyncRef = null;
|
|
201
|
+
}
|
|
202
|
+
asyncRef = setImmediate(async () => {
|
|
203
|
+
const runDone = payload.workflowState.status !== "running";
|
|
204
|
+
if (runDone) {
|
|
205
|
+
controller.close();
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
});
|
|
209
|
+
},
|
|
210
|
+
cancel() {
|
|
211
|
+
unwatch?.();
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
return stream;
|
|
215
|
+
} catch (error) {
|
|
216
|
+
return chunkZLBRQFDD_cjs.handleError(error, "Error watching workflow");
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
async function resumeAsyncVNextWorkflowHandler({
|
|
220
|
+
mastra,
|
|
221
|
+
workflowId,
|
|
222
|
+
runId,
|
|
223
|
+
body,
|
|
224
|
+
runtimeContext
|
|
225
|
+
}) {
|
|
226
|
+
try {
|
|
227
|
+
if (!workflowId) {
|
|
228
|
+
throw new chunkFV45V6WC_cjs.HTTPException(400, { message: "Workflow ID is required" });
|
|
229
|
+
}
|
|
230
|
+
if (!runId) {
|
|
231
|
+
throw new chunkFV45V6WC_cjs.HTTPException(400, { message: "runId required to resume workflow" });
|
|
232
|
+
}
|
|
233
|
+
if (!body.step) {
|
|
234
|
+
throw new chunkFV45V6WC_cjs.HTTPException(400, { message: "step required to resume workflow" });
|
|
235
|
+
}
|
|
236
|
+
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
237
|
+
const run = await workflow.getWorkflowRun(runId);
|
|
238
|
+
if (!run) {
|
|
239
|
+
throw new chunkFV45V6WC_cjs.HTTPException(404, { message: "Workflow run not found" });
|
|
240
|
+
}
|
|
241
|
+
const _run = workflow.createRun({ runId });
|
|
242
|
+
const result = await _run.resume({
|
|
243
|
+
step: body.step,
|
|
244
|
+
resumeData: body.resumeData,
|
|
245
|
+
runtimeContext
|
|
246
|
+
});
|
|
247
|
+
return result;
|
|
248
|
+
} catch (error) {
|
|
249
|
+
return chunkZLBRQFDD_cjs.handleError(error, "Error resuming workflow step");
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
async function resumeVNextWorkflowHandler({
|
|
253
|
+
mastra,
|
|
254
|
+
workflowId,
|
|
255
|
+
runId,
|
|
256
|
+
body,
|
|
257
|
+
runtimeContext
|
|
258
|
+
}) {
|
|
259
|
+
try {
|
|
260
|
+
if (!workflowId) {
|
|
261
|
+
throw new chunkFV45V6WC_cjs.HTTPException(400, { message: "Workflow ID is required" });
|
|
262
|
+
}
|
|
263
|
+
if (!runId) {
|
|
264
|
+
throw new chunkFV45V6WC_cjs.HTTPException(400, { message: "runId required to resume workflow" });
|
|
265
|
+
}
|
|
266
|
+
if (!body.step) {
|
|
267
|
+
throw new chunkFV45V6WC_cjs.HTTPException(400, { message: "step required to resume workflow" });
|
|
268
|
+
}
|
|
269
|
+
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
270
|
+
const run = await workflow.getWorkflowRun(runId);
|
|
271
|
+
if (!run) {
|
|
272
|
+
throw new chunkFV45V6WC_cjs.HTTPException(404, { message: "Workflow run not found" });
|
|
273
|
+
}
|
|
274
|
+
const _run = workflow.createRun({ runId });
|
|
275
|
+
await _run.resume({
|
|
276
|
+
step: body.step,
|
|
277
|
+
resumeData: body.resumeData,
|
|
278
|
+
runtimeContext
|
|
279
|
+
});
|
|
280
|
+
return { message: "Workflow run resumed" };
|
|
281
|
+
} catch (error) {
|
|
282
|
+
return chunkZLBRQFDD_cjs.handleError(error, "Error resuming workflow");
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
async function getVNextWorkflowRunsHandler({ mastra, workflowId }) {
|
|
286
|
+
try {
|
|
287
|
+
if (!workflowId) {
|
|
288
|
+
throw new chunkFV45V6WC_cjs.HTTPException(400, { message: "Workflow ID is required" });
|
|
289
|
+
}
|
|
290
|
+
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
291
|
+
const workflowRuns = await workflow.getWorkflowRuns() || {
|
|
292
|
+
runs: [],
|
|
293
|
+
total: 0
|
|
294
|
+
};
|
|
295
|
+
return workflowRuns;
|
|
296
|
+
} catch (error) {
|
|
297
|
+
return chunkZLBRQFDD_cjs.handleError(error, "Error getting workflow runs");
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
exports.createVNextWorkflowRunHandler = createVNextWorkflowRunHandler;
|
|
302
|
+
exports.getVNextWorkflowByIdHandler = getVNextWorkflowByIdHandler;
|
|
303
|
+
exports.getVNextWorkflowRunHandler = getVNextWorkflowRunHandler;
|
|
304
|
+
exports.getVNextWorkflowRunsHandler = getVNextWorkflowRunsHandler;
|
|
305
|
+
exports.getVNextWorkflowsHandler = getVNextWorkflowsHandler;
|
|
306
|
+
exports.resumeAsyncVNextWorkflowHandler = resumeAsyncVNextWorkflowHandler;
|
|
307
|
+
exports.resumeVNextWorkflowHandler = resumeVNextWorkflowHandler;
|
|
308
|
+
exports.startAsyncVNextWorkflowHandler = startAsyncVNextWorkflowHandler;
|
|
309
|
+
exports.startVNextWorkflowRunHandler = startVNextWorkflowRunHandler;
|
|
310
|
+
exports.vNextWorkflows_exports = vNextWorkflows_exports;
|
|
311
|
+
exports.watchVNextWorkflowHandler = watchVNextWorkflowHandler;
|
|
@@ -53,12 +53,7 @@ async function generateSpeechHandler({
|
|
|
53
53
|
if (!audioStream) {
|
|
54
54
|
throw new chunkFV45V6WC_cjs.HTTPException(500, { message: "Failed to generate speech" });
|
|
55
55
|
}
|
|
56
|
-
|
|
57
|
-
for await (const chunk of audioStream) {
|
|
58
|
-
chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
|
|
59
|
-
}
|
|
60
|
-
const audioData = Buffer.concat(chunks);
|
|
61
|
-
return { audioData };
|
|
56
|
+
return audioStream;
|
|
62
57
|
} catch (error) {
|
|
63
58
|
return chunkZLBRQFDD_cjs.handleError(error, "Error generating speech");
|
|
64
59
|
}
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
import { stringify, esm_default } from './chunk-OMN3UI6X.js';
|
|
2
|
+
import { handleError } from './chunk-3AHQ5RGN.js';
|
|
3
|
+
import { __export, HTTPException } from './chunk-TRDNDNGQ.js';
|
|
4
|
+
import { ReadableStream } from 'node:stream/web';
|
|
5
|
+
|
|
6
|
+
// src/server/handlers/vNextWorkflows.ts
|
|
7
|
+
var vNextWorkflows_exports = {};
|
|
8
|
+
__export(vNextWorkflows_exports, {
|
|
9
|
+
createVNextWorkflowRunHandler: () => createVNextWorkflowRunHandler,
|
|
10
|
+
getVNextWorkflowByIdHandler: () => getVNextWorkflowByIdHandler,
|
|
11
|
+
getVNextWorkflowRunHandler: () => getVNextWorkflowRunHandler,
|
|
12
|
+
getVNextWorkflowRunsHandler: () => getVNextWorkflowRunsHandler,
|
|
13
|
+
getVNextWorkflowsHandler: () => getVNextWorkflowsHandler,
|
|
14
|
+
resumeAsyncVNextWorkflowHandler: () => resumeAsyncVNextWorkflowHandler,
|
|
15
|
+
resumeVNextWorkflowHandler: () => resumeVNextWorkflowHandler,
|
|
16
|
+
startAsyncVNextWorkflowHandler: () => startAsyncVNextWorkflowHandler,
|
|
17
|
+
startVNextWorkflowRunHandler: () => startVNextWorkflowRunHandler,
|
|
18
|
+
watchVNextWorkflowHandler: () => watchVNextWorkflowHandler
|
|
19
|
+
});
|
|
20
|
+
async function getVNextWorkflowsHandler({ mastra }) {
|
|
21
|
+
try {
|
|
22
|
+
const workflows = mastra.vnext_getWorkflows({ serialized: false });
|
|
23
|
+
const _workflows = Object.entries(workflows).reduce((acc, [key, workflow]) => {
|
|
24
|
+
acc[key] = {
|
|
25
|
+
name: workflow.name,
|
|
26
|
+
steps: Object.entries(workflow.steps).reduce((acc2, [key2, step]) => {
|
|
27
|
+
acc2[key2] = {
|
|
28
|
+
...step,
|
|
29
|
+
inputSchema: step.inputSchema ? stringify(esm_default(step.inputSchema)) : void 0,
|
|
30
|
+
outputSchema: step.outputSchema ? stringify(esm_default(step.outputSchema)) : void 0,
|
|
31
|
+
resumeSchema: step.resumeSchema ? stringify(esm_default(step.resumeSchema)) : void 0
|
|
32
|
+
};
|
|
33
|
+
return acc2;
|
|
34
|
+
}, {}),
|
|
35
|
+
stepGraph: workflow.stepGraph,
|
|
36
|
+
inputSchema: workflow.inputSchema ? stringify(esm_default(workflow.inputSchema)) : void 0,
|
|
37
|
+
outputSchema: workflow.outputSchema ? stringify(esm_default(workflow.outputSchema)) : void 0
|
|
38
|
+
};
|
|
39
|
+
return acc;
|
|
40
|
+
}, {});
|
|
41
|
+
return _workflows;
|
|
42
|
+
} catch (error) {
|
|
43
|
+
throw new HTTPException(500, { message: error?.message || "Error getting workflows" });
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
async function getVNextWorkflowByIdHandler({ mastra, workflowId }) {
|
|
47
|
+
try {
|
|
48
|
+
if (!workflowId) {
|
|
49
|
+
throw new HTTPException(400, { message: "Workflow ID is required" });
|
|
50
|
+
}
|
|
51
|
+
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
52
|
+
if (!workflow) {
|
|
53
|
+
throw new HTTPException(404, { message: "Workflow not found" });
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
steps: Object.entries(workflow.steps).reduce((acc, [key, step]) => {
|
|
57
|
+
acc[key] = {
|
|
58
|
+
...step,
|
|
59
|
+
inputSchema: step.inputSchema ? stringify(esm_default(step.inputSchema)) : void 0,
|
|
60
|
+
outputSchema: step.outputSchema ? stringify(esm_default(step.outputSchema)) : void 0,
|
|
61
|
+
resumeSchema: step.resumeSchema ? stringify(esm_default(step.resumeSchema)) : void 0
|
|
62
|
+
};
|
|
63
|
+
return acc;
|
|
64
|
+
}, {}),
|
|
65
|
+
name: workflow.name,
|
|
66
|
+
stepGraph: workflow.stepGraph,
|
|
67
|
+
inputSchema: workflow.inputSchema ? stringify(esm_default(workflow.inputSchema)) : void 0,
|
|
68
|
+
outputSchema: workflow.outputSchema ? stringify(esm_default(workflow.outputSchema)) : void 0
|
|
69
|
+
};
|
|
70
|
+
} catch (error) {
|
|
71
|
+
throw new HTTPException(500, { message: error?.message || "Error getting workflow" });
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
async function getVNextWorkflowRunHandler({
|
|
75
|
+
mastra,
|
|
76
|
+
workflowId,
|
|
77
|
+
runId
|
|
78
|
+
}) {
|
|
79
|
+
try {
|
|
80
|
+
if (!workflowId) {
|
|
81
|
+
throw new HTTPException(400, { message: "Workflow ID is required" });
|
|
82
|
+
}
|
|
83
|
+
if (!runId) {
|
|
84
|
+
throw new HTTPException(400, { message: "Run ID is required" });
|
|
85
|
+
}
|
|
86
|
+
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
87
|
+
if (!workflow) {
|
|
88
|
+
throw new HTTPException(404, { message: "Workflow not found" });
|
|
89
|
+
}
|
|
90
|
+
const run = await workflow.getWorkflowRun(runId);
|
|
91
|
+
if (!run) {
|
|
92
|
+
throw new HTTPException(404, { message: "Workflow run not found" });
|
|
93
|
+
}
|
|
94
|
+
return run;
|
|
95
|
+
} catch (error) {
|
|
96
|
+
throw new HTTPException(500, { message: error?.message || "Error getting workflow run" });
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
async function createVNextWorkflowRunHandler({
|
|
100
|
+
mastra,
|
|
101
|
+
workflowId,
|
|
102
|
+
runId: prevRunId
|
|
103
|
+
}) {
|
|
104
|
+
try {
|
|
105
|
+
if (!workflowId) {
|
|
106
|
+
throw new HTTPException(400, { message: "Workflow ID is required" });
|
|
107
|
+
}
|
|
108
|
+
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
109
|
+
if (!workflow) {
|
|
110
|
+
throw new HTTPException(404, { message: "Workflow not found" });
|
|
111
|
+
}
|
|
112
|
+
const run = workflow.createRun({ runId: prevRunId });
|
|
113
|
+
return { runId: run.runId };
|
|
114
|
+
} catch (error) {
|
|
115
|
+
throw new HTTPException(500, { message: error?.message || "Error creating workflow run" });
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
async function startAsyncVNextWorkflowHandler({
|
|
119
|
+
mastra,
|
|
120
|
+
runtimeContext,
|
|
121
|
+
workflowId,
|
|
122
|
+
runId,
|
|
123
|
+
inputData
|
|
124
|
+
}) {
|
|
125
|
+
try {
|
|
126
|
+
if (!workflowId) {
|
|
127
|
+
throw new HTTPException(400, { message: "Workflow ID is required" });
|
|
128
|
+
}
|
|
129
|
+
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
130
|
+
if (!workflow) {
|
|
131
|
+
throw new HTTPException(404, { message: "Workflow not found" });
|
|
132
|
+
}
|
|
133
|
+
const _run = workflow.createRun({ runId });
|
|
134
|
+
const result = await _run.start({
|
|
135
|
+
inputData,
|
|
136
|
+
runtimeContext
|
|
137
|
+
});
|
|
138
|
+
return result;
|
|
139
|
+
} catch (error) {
|
|
140
|
+
throw new HTTPException(500, { message: error?.message || "Error executing workflow" });
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
async function startVNextWorkflowRunHandler({
|
|
144
|
+
mastra,
|
|
145
|
+
runtimeContext,
|
|
146
|
+
workflowId,
|
|
147
|
+
runId,
|
|
148
|
+
inputData
|
|
149
|
+
}) {
|
|
150
|
+
try {
|
|
151
|
+
if (!workflowId) {
|
|
152
|
+
throw new HTTPException(400, { message: "Workflow ID is required" });
|
|
153
|
+
}
|
|
154
|
+
if (!runId) {
|
|
155
|
+
throw new HTTPException(400, { message: "runId required to start run" });
|
|
156
|
+
}
|
|
157
|
+
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
158
|
+
const run = await workflow.getWorkflowRun(runId);
|
|
159
|
+
if (!run) {
|
|
160
|
+
throw new HTTPException(404, { message: "Workflow run not found" });
|
|
161
|
+
}
|
|
162
|
+
const _run = workflow.createRun({ runId });
|
|
163
|
+
await _run.start({
|
|
164
|
+
inputData,
|
|
165
|
+
runtimeContext
|
|
166
|
+
});
|
|
167
|
+
return { message: "Workflow run started" };
|
|
168
|
+
} catch (e) {
|
|
169
|
+
return handleError(e, "Error starting workflow run");
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
async function watchVNextWorkflowHandler({
|
|
173
|
+
mastra,
|
|
174
|
+
workflowId,
|
|
175
|
+
runId
|
|
176
|
+
}) {
|
|
177
|
+
try {
|
|
178
|
+
if (!workflowId) {
|
|
179
|
+
throw new HTTPException(400, { message: "Workflow ID is required" });
|
|
180
|
+
}
|
|
181
|
+
if (!runId) {
|
|
182
|
+
throw new HTTPException(400, { message: "runId required to watch workflow" });
|
|
183
|
+
}
|
|
184
|
+
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
185
|
+
const run = await workflow.getWorkflowRun(runId);
|
|
186
|
+
if (!run) {
|
|
187
|
+
throw new HTTPException(404, { message: "Workflow run not found" });
|
|
188
|
+
}
|
|
189
|
+
const _run = workflow.createRun({ runId });
|
|
190
|
+
let unwatch;
|
|
191
|
+
let asyncRef = null;
|
|
192
|
+
const stream = new ReadableStream({
|
|
193
|
+
start(controller) {
|
|
194
|
+
unwatch = _run.watch(({ type, payload, eventTimestamp }) => {
|
|
195
|
+
controller.enqueue(JSON.stringify({ type, payload, eventTimestamp, runId }));
|
|
196
|
+
if (asyncRef) {
|
|
197
|
+
clearImmediate(asyncRef);
|
|
198
|
+
asyncRef = null;
|
|
199
|
+
}
|
|
200
|
+
asyncRef = setImmediate(async () => {
|
|
201
|
+
const runDone = payload.workflowState.status !== "running";
|
|
202
|
+
if (runDone) {
|
|
203
|
+
controller.close();
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
});
|
|
207
|
+
},
|
|
208
|
+
cancel() {
|
|
209
|
+
unwatch?.();
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
return stream;
|
|
213
|
+
} catch (error) {
|
|
214
|
+
return handleError(error, "Error watching workflow");
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
async function resumeAsyncVNextWorkflowHandler({
|
|
218
|
+
mastra,
|
|
219
|
+
workflowId,
|
|
220
|
+
runId,
|
|
221
|
+
body,
|
|
222
|
+
runtimeContext
|
|
223
|
+
}) {
|
|
224
|
+
try {
|
|
225
|
+
if (!workflowId) {
|
|
226
|
+
throw new HTTPException(400, { message: "Workflow ID is required" });
|
|
227
|
+
}
|
|
228
|
+
if (!runId) {
|
|
229
|
+
throw new HTTPException(400, { message: "runId required to resume workflow" });
|
|
230
|
+
}
|
|
231
|
+
if (!body.step) {
|
|
232
|
+
throw new HTTPException(400, { message: "step required to resume workflow" });
|
|
233
|
+
}
|
|
234
|
+
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
235
|
+
const run = await workflow.getWorkflowRun(runId);
|
|
236
|
+
if (!run) {
|
|
237
|
+
throw new HTTPException(404, { message: "Workflow run not found" });
|
|
238
|
+
}
|
|
239
|
+
const _run = workflow.createRun({ runId });
|
|
240
|
+
const result = await _run.resume({
|
|
241
|
+
step: body.step,
|
|
242
|
+
resumeData: body.resumeData,
|
|
243
|
+
runtimeContext
|
|
244
|
+
});
|
|
245
|
+
return result;
|
|
246
|
+
} catch (error) {
|
|
247
|
+
return handleError(error, "Error resuming workflow step");
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
async function resumeVNextWorkflowHandler({
|
|
251
|
+
mastra,
|
|
252
|
+
workflowId,
|
|
253
|
+
runId,
|
|
254
|
+
body,
|
|
255
|
+
runtimeContext
|
|
256
|
+
}) {
|
|
257
|
+
try {
|
|
258
|
+
if (!workflowId) {
|
|
259
|
+
throw new HTTPException(400, { message: "Workflow ID is required" });
|
|
260
|
+
}
|
|
261
|
+
if (!runId) {
|
|
262
|
+
throw new HTTPException(400, { message: "runId required to resume workflow" });
|
|
263
|
+
}
|
|
264
|
+
if (!body.step) {
|
|
265
|
+
throw new HTTPException(400, { message: "step required to resume workflow" });
|
|
266
|
+
}
|
|
267
|
+
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
268
|
+
const run = await workflow.getWorkflowRun(runId);
|
|
269
|
+
if (!run) {
|
|
270
|
+
throw new HTTPException(404, { message: "Workflow run not found" });
|
|
271
|
+
}
|
|
272
|
+
const _run = workflow.createRun({ runId });
|
|
273
|
+
await _run.resume({
|
|
274
|
+
step: body.step,
|
|
275
|
+
resumeData: body.resumeData,
|
|
276
|
+
runtimeContext
|
|
277
|
+
});
|
|
278
|
+
return { message: "Workflow run resumed" };
|
|
279
|
+
} catch (error) {
|
|
280
|
+
return handleError(error, "Error resuming workflow");
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
async function getVNextWorkflowRunsHandler({ mastra, workflowId }) {
|
|
284
|
+
try {
|
|
285
|
+
if (!workflowId) {
|
|
286
|
+
throw new HTTPException(400, { message: "Workflow ID is required" });
|
|
287
|
+
}
|
|
288
|
+
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
289
|
+
const workflowRuns = await workflow.getWorkflowRuns() || {
|
|
290
|
+
runs: [],
|
|
291
|
+
total: 0
|
|
292
|
+
};
|
|
293
|
+
return workflowRuns;
|
|
294
|
+
} catch (error) {
|
|
295
|
+
return handleError(error, "Error getting workflow runs");
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
export { createVNextWorkflowRunHandler, getVNextWorkflowByIdHandler, getVNextWorkflowRunHandler, getVNextWorkflowRunsHandler, getVNextWorkflowsHandler, resumeAsyncVNextWorkflowHandler, resumeVNextWorkflowHandler, startAsyncVNextWorkflowHandler, startVNextWorkflowRunHandler, vNextWorkflows_exports, watchVNextWorkflowHandler };
|
|
@@ -51,12 +51,7 @@ async function generateSpeechHandler({
|
|
|
51
51
|
if (!audioStream) {
|
|
52
52
|
throw new HTTPException(500, { message: "Failed to generate speech" });
|
|
53
53
|
}
|
|
54
|
-
|
|
55
|
-
for await (const chunk of audioStream) {
|
|
56
|
-
chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
|
|
57
|
-
}
|
|
58
|
-
const audioData = Buffer.concat(chunks);
|
|
59
|
-
return { audioData };
|
|
54
|
+
return audioStream;
|
|
60
55
|
} catch (error) {
|
|
61
56
|
return handleError(error, "Error generating speech");
|
|
62
57
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk2PP5GZLP_cjs = require('../../chunk-2PP5GZLP.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "createVNextWorkflowRunHandler", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunk2PP5GZLP_cjs.createVNextWorkflowRunHandler; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "getVNextWorkflowByIdHandler", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunk2PP5GZLP_cjs.getVNextWorkflowByIdHandler; }
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "getVNextWorkflowRunHandler", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return chunk2PP5GZLP_cjs.getVNextWorkflowRunHandler; }
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports, "getVNextWorkflowRunsHandler", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () { return chunk2PP5GZLP_cjs.getVNextWorkflowRunsHandler; }
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports, "getVNextWorkflowsHandler", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function () { return chunk2PP5GZLP_cjs.getVNextWorkflowsHandler; }
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(exports, "resumeAsyncVNextWorkflowHandler", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function () { return chunk2PP5GZLP_cjs.resumeAsyncVNextWorkflowHandler; }
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, "resumeVNextWorkflowHandler", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () { return chunk2PP5GZLP_cjs.resumeVNextWorkflowHandler; }
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(exports, "startAsyncVNextWorkflowHandler", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function () { return chunk2PP5GZLP_cjs.startAsyncVNextWorkflowHandler; }
|
|
38
|
+
});
|
|
39
|
+
Object.defineProperty(exports, "startVNextWorkflowRunHandler", {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
get: function () { return chunk2PP5GZLP_cjs.startVNextWorkflowRunHandler; }
|
|
42
|
+
});
|
|
43
|
+
Object.defineProperty(exports, "watchVNextWorkflowHandler", {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () { return chunk2PP5GZLP_cjs.watchVNextWorkflowHandler; }
|
|
46
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { getVNextWorkflowsHandler } from '../../_tsup-dts-rollup.cjs';
|
|
2
|
+
export { getVNextWorkflowByIdHandler } from '../../_tsup-dts-rollup.cjs';
|
|
3
|
+
export { getVNextWorkflowRunHandler } from '../../_tsup-dts-rollup.cjs';
|
|
4
|
+
export { createVNextWorkflowRunHandler } from '../../_tsup-dts-rollup.cjs';
|
|
5
|
+
export { startAsyncVNextWorkflowHandler } from '../../_tsup-dts-rollup.cjs';
|
|
6
|
+
export { startVNextWorkflowRunHandler } from '../../_tsup-dts-rollup.cjs';
|
|
7
|
+
export { watchVNextWorkflowHandler } from '../../_tsup-dts-rollup.cjs';
|
|
8
|
+
export { resumeAsyncVNextWorkflowHandler } from '../../_tsup-dts-rollup.cjs';
|
|
9
|
+
export { resumeVNextWorkflowHandler } from '../../_tsup-dts-rollup.cjs';
|
|
10
|
+
export { getVNextWorkflowRunsHandler } from '../../_tsup-dts-rollup.cjs';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { getVNextWorkflowsHandler } from '../../_tsup-dts-rollup.js';
|
|
2
|
+
export { getVNextWorkflowByIdHandler } from '../../_tsup-dts-rollup.js';
|
|
3
|
+
export { getVNextWorkflowRunHandler } from '../../_tsup-dts-rollup.js';
|
|
4
|
+
export { createVNextWorkflowRunHandler } from '../../_tsup-dts-rollup.js';
|
|
5
|
+
export { startAsyncVNextWorkflowHandler } from '../../_tsup-dts-rollup.js';
|
|
6
|
+
export { startVNextWorkflowRunHandler } from '../../_tsup-dts-rollup.js';
|
|
7
|
+
export { watchVNextWorkflowHandler } from '../../_tsup-dts-rollup.js';
|
|
8
|
+
export { resumeAsyncVNextWorkflowHandler } from '../../_tsup-dts-rollup.js';
|
|
9
|
+
export { resumeVNextWorkflowHandler } from '../../_tsup-dts-rollup.js';
|
|
10
|
+
export { getVNextWorkflowRunsHandler } from '../../_tsup-dts-rollup.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createVNextWorkflowRunHandler, getVNextWorkflowByIdHandler, getVNextWorkflowRunHandler, getVNextWorkflowRunsHandler, getVNextWorkflowsHandler, resumeAsyncVNextWorkflowHandler, resumeVNextWorkflowHandler, startAsyncVNextWorkflowHandler, startVNextWorkflowRunHandler, watchVNextWorkflowHandler } from '../../chunk-7LT5EOQ3.js';
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk55HTWX4C_cjs = require('../../chunk-55HTWX4C.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "generateSpeechHandler", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunk55HTWX4C_cjs.generateSpeechHandler; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "getSpeakersHandler", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunk55HTWX4C_cjs.getSpeakersHandler; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "transcribeSpeechHandler", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunk55HTWX4C_cjs.transcribeSpeechHandler; }
|
|
18
18
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { generateSpeechHandler, getSpeakersHandler, transcribeSpeechHandler } from '../../chunk-
|
|
1
|
+
export { generateSpeechHandler, getSpeakersHandler, transcribeSpeechHandler } from '../../chunk-Q6SHQECN.js';
|
package/dist/server/handlers.cjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkD3G23FP3_cjs = require('../chunk-D3G23FP3.cjs');
|
|
4
|
+
var chunk2PP5GZLP_cjs = require('../chunk-2PP5GZLP.cjs');
|
|
4
5
|
var chunkM56ECCHK_cjs = require('../chunk-M56ECCHK.cjs');
|
|
5
|
-
var
|
|
6
|
+
var chunk55HTWX4C_cjs = require('../chunk-55HTWX4C.cjs');
|
|
6
7
|
var chunkTZK63M5N_cjs = require('../chunk-TZK63M5N.cjs');
|
|
7
8
|
var chunkHCOPJZ4A_cjs = require('../chunk-HCOPJZ4A.cjs');
|
|
8
9
|
var chunkSKBVVI24_cjs = require('../chunk-SKBVVI24.cjs');
|
|
@@ -16,13 +17,17 @@ Object.defineProperty(exports, "tools", {
|
|
|
16
17
|
enumerable: true,
|
|
17
18
|
get: function () { return chunkD3G23FP3_cjs.tools_exports; }
|
|
18
19
|
});
|
|
20
|
+
Object.defineProperty(exports, "vNextWorkflows", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () { return chunk2PP5GZLP_cjs.vNextWorkflows_exports; }
|
|
23
|
+
});
|
|
19
24
|
Object.defineProperty(exports, "vector", {
|
|
20
25
|
enumerable: true,
|
|
21
26
|
get: function () { return chunkM56ECCHK_cjs.vector_exports; }
|
|
22
27
|
});
|
|
23
28
|
Object.defineProperty(exports, "voice", {
|
|
24
29
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunk55HTWX4C_cjs.voice_exports; }
|
|
26
31
|
});
|
|
27
32
|
Object.defineProperty(exports, "workflows", {
|
|
28
33
|
enumerable: true,
|
|
@@ -5,5 +5,6 @@ export { network } from '../_tsup-dts-rollup.cjs';
|
|
|
5
5
|
export { telemetry } from '../_tsup-dts-rollup.cjs';
|
|
6
6
|
export { tools } from '../_tsup-dts-rollup.cjs';
|
|
7
7
|
export { workflows } from '../_tsup-dts-rollup.cjs';
|
|
8
|
+
export { vNextWorkflows } from '../_tsup-dts-rollup.cjs';
|
|
8
9
|
export { vector } from '../_tsup-dts-rollup.cjs';
|
|
9
10
|
export { voice } from '../_tsup-dts-rollup.cjs';
|
|
@@ -5,5 +5,6 @@ export { network } from '../_tsup-dts-rollup.js';
|
|
|
5
5
|
export { telemetry } from '../_tsup-dts-rollup.js';
|
|
6
6
|
export { tools } from '../_tsup-dts-rollup.js';
|
|
7
7
|
export { workflows } from '../_tsup-dts-rollup.js';
|
|
8
|
+
export { vNextWorkflows } from '../_tsup-dts-rollup.js';
|
|
8
9
|
export { vector } from '../_tsup-dts-rollup.js';
|
|
9
10
|
export { voice } from '../_tsup-dts-rollup.js';
|
package/dist/server/handlers.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { tools_exports as tools } from '../chunk-5JNVY6DU.js';
|
|
2
|
+
export { vNextWorkflows_exports as vNextWorkflows } from '../chunk-7LT5EOQ3.js';
|
|
2
3
|
export { vector_exports as vector } from '../chunk-4JINXASC.js';
|
|
3
|
-
export { voice_exports as voice } from '../chunk-
|
|
4
|
+
export { voice_exports as voice } from '../chunk-Q6SHQECN.js';
|
|
4
5
|
export { workflows_exports as workflows } from '../chunk-LFOBHRFO.js';
|
|
5
6
|
export { agents_exports as agents } from '../chunk-R4J7XQYU.js';
|
|
6
7
|
export { logs_exports as logs } from '../chunk-3EJZQ6TQ.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/server",
|
|
3
|
-
"version": "2.0.1-alpha.
|
|
3
|
+
"version": "2.0.1-alpha.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"license": "Elastic-2.0",
|
|
47
47
|
"dependencies": {},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@mastra/core": "^0.9.1-alpha.
|
|
49
|
+
"@mastra/core": "^0.9.1-alpha.2"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@ai-sdk/openai": "^1.3.2",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"typescript": "^5.8.2",
|
|
59
59
|
"vitest": "^2.1.9",
|
|
60
60
|
"zod-to-json-schema": "^3.24.3",
|
|
61
|
-
"@
|
|
62
|
-
"@
|
|
61
|
+
"@internal/lint": "0.0.2",
|
|
62
|
+
"@mastra/core": "0.9.1-alpha.2"
|
|
63
63
|
},
|
|
64
64
|
"scripts": {
|
|
65
65
|
"build": "tsup src/index.ts src/server/handlers.ts src/server/handlers/*.ts !src/server/handlers/*.test.ts --format esm,cjs --clean --experimental-dts --treeshake=smallest --splitting",
|