@mastra/ai-sdk 0.0.0-chore-core-swap-aiv5-ai-package-naming-20251009203931 → 0.0.0-client-js-listmessages-agentid-fix-20251119175531
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +265 -5
- package/README.md +65 -1
- package/dist/chat-route.d.ts +52 -2
- package/dist/chat-route.d.ts.map +1 -1
- package/dist/convert-messages.d.ts +10 -0
- package/dist/convert-messages.d.ts.map +1 -0
- package/dist/convert-streams.d.ts +66 -0
- package/dist/convert-streams.d.ts.map +1 -0
- package/dist/helpers.d.ts +13 -4
- package/dist/helpers.d.ts.map +1 -1
- package/dist/index.cjs +719 -96
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +8 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +717 -96
- package/dist/index.js.map +1 -1
- package/dist/network-route.d.ts +14 -0
- package/dist/network-route.d.ts.map +1 -0
- package/dist/to-ai-sdk-format.d.ts +15 -32
- package/dist/to-ai-sdk-format.d.ts.map +1 -1
- package/dist/transformers.d.ts +139 -0
- package/dist/transformers.d.ts.map +1 -0
- package/dist/ui.cjs +16 -0
- package/dist/ui.cjs.map +1 -0
- package/dist/ui.d.ts +2 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +13 -0
- package/dist/ui.js.map +1 -0
- package/dist/utils.d.ts +10 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/workflow-route.d.ts +10 -0
- package/dist/workflow-route.d.ts.map +1 -0
- package/package.json +22 -7
package/dist/index.cjs
CHANGED
|
@@ -5,6 +5,33 @@ var ai = require('ai');
|
|
|
5
5
|
var stream = require('@mastra/core/stream');
|
|
6
6
|
|
|
7
7
|
// src/chat-route.ts
|
|
8
|
+
|
|
9
|
+
// src/utils.ts
|
|
10
|
+
var isDataChunkType = (chunk) => {
|
|
11
|
+
return chunk && typeof chunk === "object" && "type" in chunk && chunk.type?.startsWith("data-");
|
|
12
|
+
};
|
|
13
|
+
function safeParseErrorObject(obj) {
|
|
14
|
+
if (typeof obj !== "object" || obj === null) {
|
|
15
|
+
return String(obj);
|
|
16
|
+
}
|
|
17
|
+
try {
|
|
18
|
+
const stringified = JSON.stringify(obj);
|
|
19
|
+
if (stringified === "{}") {
|
|
20
|
+
return String(obj);
|
|
21
|
+
}
|
|
22
|
+
return stringified;
|
|
23
|
+
} catch {
|
|
24
|
+
return String(obj);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
var isAgentExecutionDataChunkType = (chunk) => {
|
|
28
|
+
return chunk && typeof chunk === "object" && "type" in chunk && chunk.type?.startsWith("agent-execution-event-") && "payload" in chunk && typeof chunk.payload === "object" && "type" in chunk.payload && chunk.payload.type?.startsWith("data-");
|
|
29
|
+
};
|
|
30
|
+
var isWorkflowExecutionDataChunkType = (chunk) => {
|
|
31
|
+
return chunk && typeof chunk === "object" && "type" in chunk && chunk.type?.startsWith("workflow-execution-event-") && "payload" in chunk && typeof chunk.payload === "object" && "type" in chunk.payload && chunk.payload.type?.startsWith("data-");
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
// src/helpers.ts
|
|
8
35
|
function convertMastraChunkToAISDKv5({
|
|
9
36
|
chunk,
|
|
10
37
|
mode = "stream"
|
|
@@ -210,6 +237,9 @@ function convertMastraChunkToAISDKv5({
|
|
|
210
237
|
...chunk.payload || {}
|
|
211
238
|
};
|
|
212
239
|
}
|
|
240
|
+
if ("type" in chunk && chunk.type?.startsWith("data-")) {
|
|
241
|
+
return chunk;
|
|
242
|
+
}
|
|
213
243
|
return;
|
|
214
244
|
}
|
|
215
245
|
}
|
|
@@ -223,7 +253,7 @@ function convertFullStreamChunkToUIMessageStream({
|
|
|
223
253
|
sendFinish,
|
|
224
254
|
responseMessageId
|
|
225
255
|
}) {
|
|
226
|
-
const partType = part
|
|
256
|
+
const partType = part?.type;
|
|
227
257
|
switch (partType) {
|
|
228
258
|
case "text-start": {
|
|
229
259
|
return {
|
|
@@ -255,6 +285,14 @@ function convertFullStreamChunkToUIMessageStream({
|
|
|
255
285
|
};
|
|
256
286
|
}
|
|
257
287
|
case "reasoning-delta": {
|
|
288
|
+
if (sendReasoning) {
|
|
289
|
+
return {
|
|
290
|
+
type: "reasoning-delta",
|
|
291
|
+
id: part.id,
|
|
292
|
+
delta: part.text,
|
|
293
|
+
...part.providerMetadata != null ? { providerMetadata: part.providerMetadata } : {}
|
|
294
|
+
};
|
|
295
|
+
}
|
|
258
296
|
return;
|
|
259
297
|
}
|
|
260
298
|
case "reasoning-end": {
|
|
@@ -272,6 +310,25 @@ function convertFullStreamChunkToUIMessageStream({
|
|
|
272
310
|
};
|
|
273
311
|
}
|
|
274
312
|
case "source": {
|
|
313
|
+
if (sendSources && part.sourceType === "url") {
|
|
314
|
+
return {
|
|
315
|
+
type: "source-url",
|
|
316
|
+
sourceId: part.id,
|
|
317
|
+
url: part.url,
|
|
318
|
+
title: part.title,
|
|
319
|
+
...part.providerMetadata != null ? { providerMetadata: part.providerMetadata } : {}
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
if (sendSources && part.sourceType === "document") {
|
|
323
|
+
return {
|
|
324
|
+
type: "source-document",
|
|
325
|
+
sourceId: part.id,
|
|
326
|
+
mediaType: part.mediaType,
|
|
327
|
+
title: part.title,
|
|
328
|
+
filename: part.filename,
|
|
329
|
+
...part.providerMetadata != null ? { providerMetadata: part.providerMetadata } : {}
|
|
330
|
+
};
|
|
331
|
+
}
|
|
275
332
|
return;
|
|
276
333
|
}
|
|
277
334
|
case "tool-input-start": {
|
|
@@ -317,6 +374,26 @@ function convertFullStreamChunkToUIMessageStream({
|
|
|
317
374
|
toolCallId: part.toolCallId,
|
|
318
375
|
payload: part.output
|
|
319
376
|
};
|
|
377
|
+
} else if (part.output.from === "WORKFLOW") {
|
|
378
|
+
return {
|
|
379
|
+
type: "tool-workflow",
|
|
380
|
+
toolCallId: part.toolCallId,
|
|
381
|
+
payload: part.output
|
|
382
|
+
};
|
|
383
|
+
} else if (part.output.from === "NETWORK") {
|
|
384
|
+
return {
|
|
385
|
+
type: "tool-network",
|
|
386
|
+
toolCallId: part.toolCallId,
|
|
387
|
+
payload: part.output
|
|
388
|
+
};
|
|
389
|
+
} else if (isDataChunkType(part.output)) {
|
|
390
|
+
if (!("data" in part.output)) {
|
|
391
|
+
throw new Error(
|
|
392
|
+
`UI Messages require a data property when using data- prefixed chunks
|
|
393
|
+
${JSON.stringify(part)}`
|
|
394
|
+
);
|
|
395
|
+
}
|
|
396
|
+
return part.output;
|
|
320
397
|
}
|
|
321
398
|
return;
|
|
322
399
|
}
|
|
@@ -342,21 +419,23 @@ function convertFullStreamChunkToUIMessageStream({
|
|
|
342
419
|
return { type: "finish-step" };
|
|
343
420
|
}
|
|
344
421
|
case "start": {
|
|
345
|
-
{
|
|
422
|
+
if (sendStart) {
|
|
346
423
|
return {
|
|
347
424
|
type: "start",
|
|
348
425
|
...messageMetadataValue != null ? { messageMetadata: messageMetadataValue } : {},
|
|
349
426
|
...responseMessageId != null ? { messageId: responseMessageId } : {}
|
|
350
427
|
};
|
|
351
428
|
}
|
|
429
|
+
return;
|
|
352
430
|
}
|
|
353
431
|
case "finish": {
|
|
354
|
-
{
|
|
432
|
+
if (sendFinish) {
|
|
355
433
|
return {
|
|
356
434
|
type: "finish",
|
|
357
435
|
...messageMetadataValue != null ? { messageMetadata: messageMetadataValue } : {}
|
|
358
436
|
};
|
|
359
437
|
}
|
|
438
|
+
return;
|
|
360
439
|
}
|
|
361
440
|
case "abort": {
|
|
362
441
|
return part;
|
|
@@ -368,119 +447,79 @@ function convertFullStreamChunkToUIMessageStream({
|
|
|
368
447
|
return;
|
|
369
448
|
}
|
|
370
449
|
default: {
|
|
371
|
-
|
|
372
|
-
|
|
450
|
+
if (isDataChunkType(part)) {
|
|
451
|
+
if (!("data" in part)) {
|
|
452
|
+
throw new Error(
|
|
453
|
+
`UI Messages require a data property when using data- prefixed chunks
|
|
454
|
+
${JSON.stringify(part)}`
|
|
455
|
+
);
|
|
456
|
+
}
|
|
457
|
+
return part;
|
|
458
|
+
}
|
|
459
|
+
return;
|
|
373
460
|
}
|
|
374
461
|
}
|
|
375
462
|
}
|
|
376
463
|
|
|
377
|
-
// src/
|
|
464
|
+
// src/transformers.ts
|
|
378
465
|
function WorkflowStreamToAISDKTransformer() {
|
|
379
|
-
const
|
|
466
|
+
const bufferedWorkflows = /* @__PURE__ */ new Map();
|
|
380
467
|
return new TransformStream({
|
|
381
468
|
start(controller) {
|
|
382
469
|
controller.enqueue({
|
|
383
|
-
|
|
384
|
-
type: "start",
|
|
385
|
-
messageId: "1"
|
|
386
|
-
})
|
|
470
|
+
type: "start"
|
|
387
471
|
});
|
|
388
472
|
},
|
|
389
473
|
flush(controller) {
|
|
390
474
|
controller.enqueue({
|
|
391
|
-
|
|
392
|
-
type: "finish"
|
|
393
|
-
})
|
|
475
|
+
type: "finish"
|
|
394
476
|
});
|
|
477
|
+
},
|
|
478
|
+
transform(chunk, controller) {
|
|
479
|
+
const transformed = transformWorkflow(chunk, bufferedWorkflows);
|
|
480
|
+
if (transformed) controller.enqueue(transformed);
|
|
481
|
+
}
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
function AgentNetworkToAISDKTransformer() {
|
|
485
|
+
const bufferedNetworks = /* @__PURE__ */ new Map();
|
|
486
|
+
return new TransformStream({
|
|
487
|
+
start(controller) {
|
|
488
|
+
controller.enqueue({
|
|
489
|
+
type: "start"
|
|
490
|
+
});
|
|
491
|
+
},
|
|
492
|
+
flush(controller) {
|
|
395
493
|
controller.enqueue({
|
|
396
|
-
|
|
494
|
+
type: "finish"
|
|
397
495
|
});
|
|
398
496
|
},
|
|
399
497
|
transform(chunk, controller) {
|
|
400
|
-
|
|
401
|
-
if (
|
|
402
|
-
workflowName = chunk.payload.workflowId;
|
|
403
|
-
controller.enqueue({
|
|
404
|
-
data: JSON.stringify({
|
|
405
|
-
type: "data-workflow",
|
|
406
|
-
id: chunk.runId,
|
|
407
|
-
data: {
|
|
408
|
-
name: workflowName,
|
|
409
|
-
status: "running",
|
|
410
|
-
steps: {},
|
|
411
|
-
output: null
|
|
412
|
-
}
|
|
413
|
-
})
|
|
414
|
-
});
|
|
415
|
-
} else if (chunk.type === "workflow-step-start") {
|
|
416
|
-
steps[chunk.payload.id] = {
|
|
417
|
-
// TODO swap with name
|
|
418
|
-
name: chunk.payload.id,
|
|
419
|
-
status: chunk.payload.status,
|
|
420
|
-
input: chunk.payload.payload ?? null,
|
|
421
|
-
output: null
|
|
422
|
-
};
|
|
423
|
-
controller.enqueue({
|
|
424
|
-
data: JSON.stringify({
|
|
425
|
-
type: "data-workflow",
|
|
426
|
-
id: chunk.runId,
|
|
427
|
-
data: {
|
|
428
|
-
name: workflowName,
|
|
429
|
-
status: "running",
|
|
430
|
-
steps,
|
|
431
|
-
output: null
|
|
432
|
-
}
|
|
433
|
-
})
|
|
434
|
-
});
|
|
435
|
-
} else if (chunk.type === "workflow-step-result") {
|
|
436
|
-
steps[chunk.payload.id] = {
|
|
437
|
-
...steps[chunk.payload.id],
|
|
438
|
-
status: chunk.payload.status,
|
|
439
|
-
output: chunk.payload.output ?? null
|
|
440
|
-
};
|
|
441
|
-
controller.enqueue({
|
|
442
|
-
data: JSON.stringify({
|
|
443
|
-
type: "data-workflow",
|
|
444
|
-
id: chunk.runId,
|
|
445
|
-
data: {
|
|
446
|
-
name: workflowName,
|
|
447
|
-
status: "running",
|
|
448
|
-
steps,
|
|
449
|
-
output: null
|
|
450
|
-
}
|
|
451
|
-
})
|
|
452
|
-
});
|
|
453
|
-
} else if (chunk.type === "workflow-finish") {
|
|
454
|
-
controller.enqueue({
|
|
455
|
-
data: JSON.stringify({
|
|
456
|
-
type: "data-workflow",
|
|
457
|
-
id: chunk.runId,
|
|
458
|
-
data: {
|
|
459
|
-
name: workflowName,
|
|
460
|
-
steps,
|
|
461
|
-
output: chunk.payload.output ?? null,
|
|
462
|
-
status: chunk.payload.workflowStatus
|
|
463
|
-
}
|
|
464
|
-
})
|
|
465
|
-
});
|
|
466
|
-
}
|
|
498
|
+
const transformed = transformNetwork(chunk, bufferedNetworks);
|
|
499
|
+
if (transformed) controller.enqueue(transformed);
|
|
467
500
|
}
|
|
468
501
|
});
|
|
469
502
|
}
|
|
470
|
-
function AgentStreamToAISDKTransformer(
|
|
503
|
+
function AgentStreamToAISDKTransformer({
|
|
504
|
+
lastMessageId,
|
|
505
|
+
sendStart,
|
|
506
|
+
sendFinish,
|
|
507
|
+
sendReasoning,
|
|
508
|
+
sendSources
|
|
509
|
+
}) {
|
|
471
510
|
let bufferedSteps = /* @__PURE__ */ new Map();
|
|
472
511
|
return new TransformStream({
|
|
473
512
|
transform(chunk, controller) {
|
|
474
513
|
const part = convertMastraChunkToAISDKv5({ chunk, mode: "stream" });
|
|
475
514
|
const transformedChunk = convertFullStreamChunkToUIMessageStream({
|
|
476
515
|
part,
|
|
477
|
-
sendReasoning
|
|
478
|
-
sendSources
|
|
479
|
-
sendStart
|
|
480
|
-
sendFinish
|
|
481
|
-
responseMessageId:
|
|
482
|
-
onError() {
|
|
483
|
-
return
|
|
516
|
+
sendReasoning,
|
|
517
|
+
sendSources,
|
|
518
|
+
sendStart,
|
|
519
|
+
sendFinish,
|
|
520
|
+
responseMessageId: lastMessageId,
|
|
521
|
+
onError(error) {
|
|
522
|
+
return safeParseErrorObject(error);
|
|
484
523
|
}
|
|
485
524
|
});
|
|
486
525
|
if (transformedChunk) {
|
|
@@ -488,6 +527,14 @@ function AgentStreamToAISDKTransformer() {
|
|
|
488
527
|
const payload = transformedChunk.payload;
|
|
489
528
|
const agentTransformed = transformAgent(payload, bufferedSteps);
|
|
490
529
|
if (agentTransformed) controller.enqueue(agentTransformed);
|
|
530
|
+
} else if (transformedChunk.type === "tool-workflow") {
|
|
531
|
+
const payload = transformedChunk.payload;
|
|
532
|
+
const workflowChunk = transformWorkflow(payload, bufferedSteps, true);
|
|
533
|
+
if (workflowChunk) controller.enqueue(workflowChunk);
|
|
534
|
+
} else if (transformedChunk.type === "tool-network") {
|
|
535
|
+
const payload = transformedChunk.payload;
|
|
536
|
+
const networkChunk = transformNetwork(payload, bufferedSteps, true);
|
|
537
|
+
if (networkChunk) controller.enqueue(networkChunk);
|
|
491
538
|
} else {
|
|
492
539
|
controller.enqueue(transformedChunk);
|
|
493
540
|
}
|
|
@@ -631,15 +678,386 @@ function transformAgent(payload, bufferedSteps) {
|
|
|
631
678
|
}
|
|
632
679
|
return null;
|
|
633
680
|
}
|
|
634
|
-
function
|
|
635
|
-
|
|
681
|
+
function transformWorkflow(payload, bufferedWorkflows, isNested) {
|
|
682
|
+
switch (payload.type) {
|
|
683
|
+
case "workflow-start":
|
|
684
|
+
bufferedWorkflows.set(payload.runId, {
|
|
685
|
+
name: payload.payload.workflowId,
|
|
686
|
+
steps: {}
|
|
687
|
+
});
|
|
688
|
+
return {
|
|
689
|
+
type: isNested ? "data-tool-workflow" : "data-workflow",
|
|
690
|
+
id: payload.runId,
|
|
691
|
+
data: {
|
|
692
|
+
name: bufferedWorkflows.get(payload.runId).name,
|
|
693
|
+
status: "running",
|
|
694
|
+
steps: bufferedWorkflows.get(payload.runId).steps,
|
|
695
|
+
output: null
|
|
696
|
+
}
|
|
697
|
+
};
|
|
698
|
+
case "workflow-step-start": {
|
|
699
|
+
const current = bufferedWorkflows.get(payload.runId) || { name: "", steps: {} };
|
|
700
|
+
current.steps[payload.payload.id] = {
|
|
701
|
+
name: payload.payload.id,
|
|
702
|
+
status: payload.payload.status,
|
|
703
|
+
input: payload.payload.payload ?? null,
|
|
704
|
+
output: null,
|
|
705
|
+
suspendPayload: null,
|
|
706
|
+
resumePayload: null
|
|
707
|
+
};
|
|
708
|
+
bufferedWorkflows.set(payload.runId, current);
|
|
709
|
+
return {
|
|
710
|
+
type: isNested ? "data-tool-workflow" : "data-workflow",
|
|
711
|
+
id: payload.runId,
|
|
712
|
+
data: {
|
|
713
|
+
name: current.name,
|
|
714
|
+
status: "running",
|
|
715
|
+
steps: current.steps,
|
|
716
|
+
output: null
|
|
717
|
+
}
|
|
718
|
+
};
|
|
719
|
+
}
|
|
720
|
+
case "workflow-step-result": {
|
|
721
|
+
const current = bufferedWorkflows.get(payload.runId);
|
|
722
|
+
if (!current) return null;
|
|
723
|
+
current.steps[payload.payload.id] = {
|
|
724
|
+
...current.steps[payload.payload.id],
|
|
725
|
+
status: payload.payload.status,
|
|
726
|
+
output: payload.payload.output ?? null
|
|
727
|
+
};
|
|
728
|
+
return {
|
|
729
|
+
type: isNested ? "data-tool-workflow" : "data-workflow",
|
|
730
|
+
id: payload.runId,
|
|
731
|
+
data: {
|
|
732
|
+
name: current.name,
|
|
733
|
+
status: "running",
|
|
734
|
+
steps: current.steps,
|
|
735
|
+
output: null
|
|
736
|
+
}
|
|
737
|
+
};
|
|
738
|
+
}
|
|
739
|
+
case "workflow-step-suspended": {
|
|
740
|
+
const current = bufferedWorkflows.get(payload.runId);
|
|
741
|
+
if (!current) return null;
|
|
742
|
+
current.steps[payload.payload.id] = {
|
|
743
|
+
...current.steps[payload.payload.id],
|
|
744
|
+
status: payload.payload.status,
|
|
745
|
+
suspendPayload: payload.payload.suspendPayload ?? null,
|
|
746
|
+
resumePayload: payload.payload.resumePayload ?? null,
|
|
747
|
+
output: null
|
|
748
|
+
};
|
|
749
|
+
return {
|
|
750
|
+
type: isNested ? "data-tool-workflow" : "data-workflow",
|
|
751
|
+
id: payload.runId,
|
|
752
|
+
data: {
|
|
753
|
+
name: current.name,
|
|
754
|
+
status: "suspended",
|
|
755
|
+
steps: current.steps,
|
|
756
|
+
output: null
|
|
757
|
+
}
|
|
758
|
+
};
|
|
759
|
+
}
|
|
760
|
+
case "workflow-finish": {
|
|
761
|
+
const current = bufferedWorkflows.get(payload.runId);
|
|
762
|
+
if (!current) return null;
|
|
763
|
+
return {
|
|
764
|
+
type: isNested ? "data-tool-workflow" : "data-workflow",
|
|
765
|
+
id: payload.runId,
|
|
766
|
+
data: {
|
|
767
|
+
name: current.name,
|
|
768
|
+
steps: current.steps,
|
|
769
|
+
output: payload.payload.output ?? null,
|
|
770
|
+
status: payload.payload.workflowStatus
|
|
771
|
+
}
|
|
772
|
+
};
|
|
773
|
+
}
|
|
774
|
+
default: {
|
|
775
|
+
if (isDataChunkType(payload)) {
|
|
776
|
+
if (!("data" in payload)) {
|
|
777
|
+
throw new Error(
|
|
778
|
+
`UI Messages require a data property when using data- prefixed chunks
|
|
779
|
+
${JSON.stringify(payload)}`
|
|
780
|
+
);
|
|
781
|
+
}
|
|
782
|
+
return payload;
|
|
783
|
+
}
|
|
784
|
+
return null;
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
function transformNetwork(payload, bufferedNetworks, isNested) {
|
|
789
|
+
switch (payload.type) {
|
|
790
|
+
case "routing-agent-start": {
|
|
791
|
+
if (!bufferedNetworks.has(payload.runId)) {
|
|
792
|
+
bufferedNetworks.set(payload.runId, {
|
|
793
|
+
name: payload.payload.agentId,
|
|
794
|
+
steps: [],
|
|
795
|
+
usage: null,
|
|
796
|
+
output: null
|
|
797
|
+
});
|
|
798
|
+
}
|
|
799
|
+
return {
|
|
800
|
+
type: isNested ? "data-tool-network" : "data-network",
|
|
801
|
+
id: payload.runId,
|
|
802
|
+
data: {
|
|
803
|
+
name: bufferedNetworks.get(payload.runId).name,
|
|
804
|
+
status: "running",
|
|
805
|
+
usage: null,
|
|
806
|
+
steps: bufferedNetworks.get(payload.runId).steps,
|
|
807
|
+
output: null
|
|
808
|
+
}
|
|
809
|
+
};
|
|
810
|
+
}
|
|
811
|
+
case "routing-agent-text-start": {
|
|
812
|
+
const current = bufferedNetworks.get(payload.runId);
|
|
813
|
+
if (!current) return null;
|
|
814
|
+
return {
|
|
815
|
+
type: "text-start",
|
|
816
|
+
id: payload.runId
|
|
817
|
+
};
|
|
818
|
+
}
|
|
819
|
+
case "routing-agent-text-delta": {
|
|
820
|
+
const current = bufferedNetworks.get(payload.runId);
|
|
821
|
+
if (!current) return null;
|
|
822
|
+
return {
|
|
823
|
+
type: "text-delta",
|
|
824
|
+
id: payload.runId,
|
|
825
|
+
delta: payload.payload.text
|
|
826
|
+
};
|
|
827
|
+
}
|
|
828
|
+
case "agent-execution-start": {
|
|
829
|
+
const current = bufferedNetworks.get(payload.runId) || { name: "", steps: [], usage: null, output: null };
|
|
830
|
+
current.steps.push({
|
|
831
|
+
name: payload.payload.agentId,
|
|
832
|
+
status: "running",
|
|
833
|
+
input: payload.payload.args || null,
|
|
834
|
+
output: null,
|
|
835
|
+
suspendPayload: null,
|
|
836
|
+
resumePayload: null
|
|
837
|
+
});
|
|
838
|
+
bufferedNetworks.set(payload.runId, current);
|
|
839
|
+
return {
|
|
840
|
+
type: isNested ? "data-tool-network" : "data-network",
|
|
841
|
+
id: payload.runId,
|
|
842
|
+
data: {
|
|
843
|
+
...current,
|
|
844
|
+
status: "running"
|
|
845
|
+
}
|
|
846
|
+
};
|
|
847
|
+
}
|
|
848
|
+
case "workflow-execution-start": {
|
|
849
|
+
const current = bufferedNetworks.get(payload.runId) || { name: "", steps: [], usage: null, output: null };
|
|
850
|
+
current.steps.push({
|
|
851
|
+
name: payload.payload.name,
|
|
852
|
+
status: "running",
|
|
853
|
+
input: payload.payload.args || null,
|
|
854
|
+
output: null,
|
|
855
|
+
suspendPayload: null,
|
|
856
|
+
resumePayload: null
|
|
857
|
+
});
|
|
858
|
+
bufferedNetworks.set(payload.runId, current);
|
|
859
|
+
return {
|
|
860
|
+
type: isNested ? "data-tool-network" : "data-network",
|
|
861
|
+
id: payload.runId,
|
|
862
|
+
data: {
|
|
863
|
+
...current,
|
|
864
|
+
status: "running"
|
|
865
|
+
}
|
|
866
|
+
};
|
|
867
|
+
}
|
|
868
|
+
case "tool-execution-start": {
|
|
869
|
+
const current = bufferedNetworks.get(payload.runId) || { name: "", steps: [], usage: null, output: null };
|
|
870
|
+
current.steps.push({
|
|
871
|
+
name: payload.payload.args?.toolName,
|
|
872
|
+
status: "running",
|
|
873
|
+
input: payload.payload.args?.args || null,
|
|
874
|
+
output: null,
|
|
875
|
+
suspendPayload: null,
|
|
876
|
+
resumePayload: null
|
|
877
|
+
});
|
|
878
|
+
bufferedNetworks.set(payload.runId, current);
|
|
879
|
+
return {
|
|
880
|
+
type: isNested ? "data-tool-network" : "data-network",
|
|
881
|
+
id: payload.runId,
|
|
882
|
+
data: {
|
|
883
|
+
...current,
|
|
884
|
+
status: "running"
|
|
885
|
+
}
|
|
886
|
+
};
|
|
887
|
+
}
|
|
888
|
+
case "agent-execution-end": {
|
|
889
|
+
const current = bufferedNetworks.get(payload.runId);
|
|
890
|
+
if (!current) return null;
|
|
891
|
+
current.steps.push({
|
|
892
|
+
name: payload.payload.agentId,
|
|
893
|
+
status: "success",
|
|
894
|
+
input: null,
|
|
895
|
+
output: payload.payload.result,
|
|
896
|
+
suspendPayload: null,
|
|
897
|
+
resumePayload: null
|
|
898
|
+
});
|
|
899
|
+
return {
|
|
900
|
+
type: isNested ? "data-tool-network" : "data-network",
|
|
901
|
+
id: payload.runId,
|
|
902
|
+
data: {
|
|
903
|
+
...current,
|
|
904
|
+
usage: payload.payload?.usage ?? current.usage,
|
|
905
|
+
status: "running",
|
|
906
|
+
output: payload.payload.result ?? current.output
|
|
907
|
+
}
|
|
908
|
+
};
|
|
909
|
+
}
|
|
910
|
+
case "tool-execution-end": {
|
|
911
|
+
const current = bufferedNetworks.get(payload.runId);
|
|
912
|
+
if (!current) return null;
|
|
913
|
+
current.steps.push({
|
|
914
|
+
name: payload.payload.toolName,
|
|
915
|
+
status: "success",
|
|
916
|
+
input: null,
|
|
917
|
+
output: payload.payload.result,
|
|
918
|
+
suspendPayload: null,
|
|
919
|
+
resumePayload: null
|
|
920
|
+
});
|
|
921
|
+
return {
|
|
922
|
+
type: isNested ? "data-tool-network" : "data-network",
|
|
923
|
+
id: payload.runId,
|
|
924
|
+
data: {
|
|
925
|
+
...current,
|
|
926
|
+
status: "running",
|
|
927
|
+
output: payload.payload.result ?? current.output
|
|
928
|
+
}
|
|
929
|
+
};
|
|
930
|
+
}
|
|
931
|
+
case "workflow-execution-end": {
|
|
932
|
+
const current = bufferedNetworks.get(payload.runId);
|
|
933
|
+
if (!current) return null;
|
|
934
|
+
current.steps.push({
|
|
935
|
+
name: payload.payload.name,
|
|
936
|
+
status: "success",
|
|
937
|
+
input: null,
|
|
938
|
+
output: payload.payload.result,
|
|
939
|
+
suspendPayload: null,
|
|
940
|
+
resumePayload: null
|
|
941
|
+
});
|
|
942
|
+
return {
|
|
943
|
+
type: isNested ? "data-tool-network" : "data-network",
|
|
944
|
+
id: payload.runId,
|
|
945
|
+
data: {
|
|
946
|
+
...current,
|
|
947
|
+
usage: payload.payload?.usage ?? current.usage,
|
|
948
|
+
status: "running",
|
|
949
|
+
output: payload.payload.result ?? current.output
|
|
950
|
+
}
|
|
951
|
+
};
|
|
952
|
+
}
|
|
953
|
+
case "routing-agent-end": {
|
|
954
|
+
const current = bufferedNetworks.get(payload.runId);
|
|
955
|
+
if (!current) return null;
|
|
956
|
+
return {
|
|
957
|
+
type: isNested ? "data-tool-network" : "data-network",
|
|
958
|
+
id: payload.runId,
|
|
959
|
+
data: {
|
|
960
|
+
...current,
|
|
961
|
+
status: "finished",
|
|
962
|
+
usage: payload.payload?.usage ?? current.usage,
|
|
963
|
+
output: payload.payload?.result ?? current.output
|
|
964
|
+
}
|
|
965
|
+
};
|
|
966
|
+
}
|
|
967
|
+
case "network-execution-event-step-finish": {
|
|
968
|
+
const current = bufferedNetworks.get(payload.runId);
|
|
969
|
+
if (!current) return null;
|
|
970
|
+
return {
|
|
971
|
+
type: isNested ? "data-tool-network" : "data-network",
|
|
972
|
+
id: payload.runId,
|
|
973
|
+
data: {
|
|
974
|
+
...current,
|
|
975
|
+
status: "finished",
|
|
976
|
+
output: payload.payload?.result ?? current.output
|
|
977
|
+
}
|
|
978
|
+
};
|
|
979
|
+
}
|
|
980
|
+
case "network-execution-event-finish": {
|
|
981
|
+
const current = bufferedNetworks.get(payload.runId);
|
|
982
|
+
if (!current) return null;
|
|
983
|
+
return {
|
|
984
|
+
type: isNested ? "data-tool-network" : "data-network",
|
|
985
|
+
id: payload.runId,
|
|
986
|
+
data: {
|
|
987
|
+
...current,
|
|
988
|
+
usage: payload.payload?.usage ?? current.usage,
|
|
989
|
+
status: "finished",
|
|
990
|
+
output: payload.payload?.result ?? current.output
|
|
991
|
+
}
|
|
992
|
+
};
|
|
993
|
+
}
|
|
994
|
+
default: {
|
|
995
|
+
if (isDataChunkType(payload)) {
|
|
996
|
+
if (!("data" in payload)) {
|
|
997
|
+
throw new Error(
|
|
998
|
+
`UI Messages require a data property when using data- prefixed chunks
|
|
999
|
+
${JSON.stringify(payload)}`
|
|
1000
|
+
);
|
|
1001
|
+
}
|
|
1002
|
+
return payload;
|
|
1003
|
+
}
|
|
1004
|
+
if (isAgentExecutionDataChunkType(payload)) {
|
|
1005
|
+
if (!("data" in payload.payload)) {
|
|
1006
|
+
throw new Error(
|
|
1007
|
+
`UI Messages require a data property when using data- prefixed chunks
|
|
1008
|
+
${JSON.stringify(payload)}`
|
|
1009
|
+
);
|
|
1010
|
+
}
|
|
1011
|
+
return payload.payload;
|
|
1012
|
+
}
|
|
1013
|
+
if (isWorkflowExecutionDataChunkType(payload)) {
|
|
1014
|
+
if (!("data" in payload.payload)) {
|
|
1015
|
+
throw new Error(
|
|
1016
|
+
`UI Messages require a data property when using data- prefixed chunks
|
|
1017
|
+
${JSON.stringify(payload)}`
|
|
1018
|
+
);
|
|
1019
|
+
}
|
|
1020
|
+
return payload.payload;
|
|
1021
|
+
}
|
|
1022
|
+
return null;
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
// src/convert-streams.ts
|
|
1028
|
+
function toAISdkV5Stream(stream, options = {
|
|
1029
|
+
from: "agent",
|
|
1030
|
+
sendStart: true,
|
|
1031
|
+
sendFinish: true
|
|
1032
|
+
}) {
|
|
1033
|
+
const from = options?.from;
|
|
1034
|
+
if (from === "workflow") {
|
|
1035
|
+
return stream.pipeThrough(WorkflowStreamToAISDKTransformer());
|
|
1036
|
+
}
|
|
1037
|
+
if (from === "network") {
|
|
1038
|
+
return stream.pipeThrough(AgentNetworkToAISDKTransformer());
|
|
1039
|
+
}
|
|
1040
|
+
const agentReadable = "fullStream" in stream ? stream.fullStream : stream;
|
|
1041
|
+
return agentReadable.pipeThrough(
|
|
1042
|
+
AgentStreamToAISDKTransformer({
|
|
1043
|
+
lastMessageId: options?.lastMessageId,
|
|
1044
|
+
sendStart: options?.sendStart,
|
|
1045
|
+
sendFinish: options?.sendFinish,
|
|
1046
|
+
sendReasoning: options?.sendReasoning,
|
|
1047
|
+
sendSources: options?.sendSources
|
|
1048
|
+
})
|
|
1049
|
+
);
|
|
636
1050
|
}
|
|
637
1051
|
|
|
638
1052
|
// src/chat-route.ts
|
|
639
1053
|
function chatRoute({
|
|
640
1054
|
path = "/chat/:agentId",
|
|
641
1055
|
agent,
|
|
642
|
-
defaultOptions
|
|
1056
|
+
defaultOptions,
|
|
1057
|
+
sendStart = true,
|
|
1058
|
+
sendFinish = true,
|
|
1059
|
+
sendReasoning = false,
|
|
1060
|
+
sendSources = false
|
|
643
1061
|
}) {
|
|
644
1062
|
if (!agent && !path.includes("/:agentId")) {
|
|
645
1063
|
throw new Error("Path must include :agentId to route to the correct agent or pass the agent explicitly");
|
|
@@ -740,6 +1158,7 @@ function chatRoute({
|
|
|
740
1158
|
handler: async (c) => {
|
|
741
1159
|
const { messages, ...rest } = await c.req.json();
|
|
742
1160
|
const mastra = c.get("mastra");
|
|
1161
|
+
const requestContext = c.get("requestContext");
|
|
743
1162
|
let agentToUse = agent;
|
|
744
1163
|
if (!agent) {
|
|
745
1164
|
const agentId = c.req.param("agentId");
|
|
@@ -750,6 +1169,9 @@ function chatRoute({
|
|
|
750
1169
|
`Fixed agent ID was set together with an agentId path parameter. This can lead to unexpected behavior.`
|
|
751
1170
|
);
|
|
752
1171
|
}
|
|
1172
|
+
if (requestContext && defaultOptions?.requestContext) {
|
|
1173
|
+
mastra.getLogger()?.warn(`"requestContext" set in the route options will be overridden by the request's "requestContext".`);
|
|
1174
|
+
}
|
|
753
1175
|
if (!agentToUse) {
|
|
754
1176
|
throw new Error("Agent ID is required");
|
|
755
1177
|
}
|
|
@@ -759,11 +1181,24 @@ function chatRoute({
|
|
|
759
1181
|
}
|
|
760
1182
|
const result = await agentObj.stream(messages, {
|
|
761
1183
|
...defaultOptions,
|
|
762
|
-
...rest
|
|
1184
|
+
...rest,
|
|
1185
|
+
requestContext: requestContext || defaultOptions?.requestContext
|
|
763
1186
|
});
|
|
1187
|
+
let lastMessageId;
|
|
1188
|
+
if (messages.length > 0 && messages[messages.length - 1].role === "assistant") {
|
|
1189
|
+
lastMessageId = messages[messages.length - 1].id;
|
|
1190
|
+
}
|
|
764
1191
|
const uiMessageStream = ai.createUIMessageStream({
|
|
1192
|
+
originalMessages: messages,
|
|
765
1193
|
execute: async ({ writer }) => {
|
|
766
|
-
for await (const part of
|
|
1194
|
+
for await (const part of toAISdkV5Stream(result, {
|
|
1195
|
+
from: "agent",
|
|
1196
|
+
lastMessageId,
|
|
1197
|
+
sendStart,
|
|
1198
|
+
sendFinish,
|
|
1199
|
+
sendReasoning,
|
|
1200
|
+
sendSources
|
|
1201
|
+
})) {
|
|
767
1202
|
writer.write(part);
|
|
768
1203
|
}
|
|
769
1204
|
}
|
|
@@ -774,9 +1209,197 @@ function chatRoute({
|
|
|
774
1209
|
}
|
|
775
1210
|
});
|
|
776
1211
|
}
|
|
1212
|
+
function workflowRoute({
|
|
1213
|
+
path = "/api/workflows/:workflowId/stream",
|
|
1214
|
+
workflow
|
|
1215
|
+
}) {
|
|
1216
|
+
if (!workflow && !path.includes("/:workflowId")) {
|
|
1217
|
+
throw new Error("Path must include :workflowId to route to the correct workflow or pass the workflow explicitly");
|
|
1218
|
+
}
|
|
1219
|
+
return server.registerApiRoute(path, {
|
|
1220
|
+
method: "POST",
|
|
1221
|
+
openapi: {
|
|
1222
|
+
summary: "Stream a workflow in AI SDK format",
|
|
1223
|
+
description: "Starts a workflow run and streams events as AI SDK UIMessage chunks",
|
|
1224
|
+
tags: ["ai-sdk"],
|
|
1225
|
+
parameters: [
|
|
1226
|
+
{
|
|
1227
|
+
name: "workflowId",
|
|
1228
|
+
in: "path",
|
|
1229
|
+
required: true,
|
|
1230
|
+
description: "The ID of the workflow to stream",
|
|
1231
|
+
schema: { type: "string" }
|
|
1232
|
+
}
|
|
1233
|
+
],
|
|
1234
|
+
requestBody: {
|
|
1235
|
+
required: true,
|
|
1236
|
+
content: {
|
|
1237
|
+
"application/json": {
|
|
1238
|
+
schema: {
|
|
1239
|
+
type: "object",
|
|
1240
|
+
properties: {
|
|
1241
|
+
runId: { type: "string" },
|
|
1242
|
+
resourceId: { type: "string" },
|
|
1243
|
+
inputData: { type: "object", additionalProperties: true },
|
|
1244
|
+
resumeData: { type: "object", additionalProperties: true },
|
|
1245
|
+
requestContext: { type: "object", additionalProperties: true },
|
|
1246
|
+
tracingOptions: { type: "object", additionalProperties: true },
|
|
1247
|
+
step: { type: "string" }
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
},
|
|
1253
|
+
responses: {
|
|
1254
|
+
"200": {
|
|
1255
|
+
description: "Workflow UIMessage event stream",
|
|
1256
|
+
content: {
|
|
1257
|
+
"text/plain": {
|
|
1258
|
+
schema: { type: "string", description: "SSE stream" }
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
},
|
|
1264
|
+
handler: async (c) => {
|
|
1265
|
+
const { runId, resourceId, inputData, resumeData, ...rest } = await c.req.json();
|
|
1266
|
+
const mastra = c.get("mastra");
|
|
1267
|
+
let workflowToUse = workflow;
|
|
1268
|
+
if (!workflow) {
|
|
1269
|
+
const workflowId = c.req.param("workflowId");
|
|
1270
|
+
workflowToUse = workflowId;
|
|
1271
|
+
}
|
|
1272
|
+
if (c.req.param("workflowId") && workflow) {
|
|
1273
|
+
mastra.getLogger()?.warn(
|
|
1274
|
+
`Fixed workflow ID was set together with a workflowId path parameter. This can lead to unexpected behavior.`
|
|
1275
|
+
);
|
|
1276
|
+
}
|
|
1277
|
+
if (!workflowToUse) {
|
|
1278
|
+
throw new Error("Workflow ID is required");
|
|
1279
|
+
}
|
|
1280
|
+
const workflowObj = mastra.getWorkflow(workflowToUse);
|
|
1281
|
+
if (!workflowObj) {
|
|
1282
|
+
throw new Error(`Workflow ${workflowToUse} not found`);
|
|
1283
|
+
}
|
|
1284
|
+
const run = await workflowObj.createRun({ runId, resourceId, ...rest });
|
|
1285
|
+
const stream = resumeData ? run.resumeStream({ resumeData, ...rest }) : run.stream({ inputData, ...rest });
|
|
1286
|
+
const uiMessageStream = ai.createUIMessageStream({
|
|
1287
|
+
execute: async ({ writer }) => {
|
|
1288
|
+
for await (const part of toAISdkV5Stream(stream, { from: "workflow" })) {
|
|
1289
|
+
writer.write(part);
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
});
|
|
1293
|
+
return ai.createUIMessageStreamResponse({ stream: uiMessageStream });
|
|
1294
|
+
}
|
|
1295
|
+
});
|
|
1296
|
+
}
|
|
1297
|
+
function networkRoute({
|
|
1298
|
+
path = "/network/:agentId",
|
|
1299
|
+
agent,
|
|
1300
|
+
defaultOptions
|
|
1301
|
+
}) {
|
|
1302
|
+
if (!agent && !path.includes("/:agentId")) {
|
|
1303
|
+
throw new Error("Path must include :agentId to route to the correct agent or pass the agent explicitly");
|
|
1304
|
+
}
|
|
1305
|
+
return server.registerApiRoute(path, {
|
|
1306
|
+
method: "POST",
|
|
1307
|
+
openapi: {
|
|
1308
|
+
summary: "Execute an agent network and stream AI SDK events",
|
|
1309
|
+
description: "Routes a request to an agent network and streams UIMessage chunks in AI SDK format",
|
|
1310
|
+
tags: ["ai-sdk"],
|
|
1311
|
+
parameters: [
|
|
1312
|
+
{
|
|
1313
|
+
name: "agentId",
|
|
1314
|
+
in: "path",
|
|
1315
|
+
required: true,
|
|
1316
|
+
description: "The ID of the routing agent to execute as a network",
|
|
1317
|
+
schema: { type: "string" }
|
|
1318
|
+
}
|
|
1319
|
+
],
|
|
1320
|
+
requestBody: {
|
|
1321
|
+
required: true,
|
|
1322
|
+
content: {
|
|
1323
|
+
"application/json": {
|
|
1324
|
+
schema: {
|
|
1325
|
+
type: "object",
|
|
1326
|
+
properties: {
|
|
1327
|
+
messages: { type: "array", items: { type: "object" } },
|
|
1328
|
+
requestContext: { type: "object", additionalProperties: true },
|
|
1329
|
+
runId: { type: "string" },
|
|
1330
|
+
maxSteps: { type: "number" },
|
|
1331
|
+
threadId: { type: "string" },
|
|
1332
|
+
resourceId: { type: "string" },
|
|
1333
|
+
modelSettings: { type: "object", additionalProperties: true },
|
|
1334
|
+
tools: { type: "array", items: { type: "object" } }
|
|
1335
|
+
},
|
|
1336
|
+
required: ["messages"]
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
},
|
|
1341
|
+
responses: {
|
|
1342
|
+
"200": {
|
|
1343
|
+
description: "Streaming AI SDK UIMessage event stream for the agent network",
|
|
1344
|
+
content: { "text/plain": { schema: { type: "string", description: "SSE stream" } } }
|
|
1345
|
+
},
|
|
1346
|
+
"404": {
|
|
1347
|
+
description: "Agent not found",
|
|
1348
|
+
content: {
|
|
1349
|
+
"application/json": {
|
|
1350
|
+
schema: { type: "object", properties: { error: { type: "string" } } }
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
},
|
|
1356
|
+
handler: async (c) => {
|
|
1357
|
+
const { messages, ...rest } = await c.req.json();
|
|
1358
|
+
const mastra = c.get("mastra");
|
|
1359
|
+
let agentToUse = agent;
|
|
1360
|
+
if (!agent) {
|
|
1361
|
+
const agentId = c.req.param("agentId");
|
|
1362
|
+
agentToUse = agentId;
|
|
1363
|
+
}
|
|
1364
|
+
if (c.req.param("agentId") && agent) {
|
|
1365
|
+
mastra.getLogger()?.warn(
|
|
1366
|
+
`Fixed agent ID was set together with an agentId path parameter. This can lead to unexpected behavior.`
|
|
1367
|
+
);
|
|
1368
|
+
}
|
|
1369
|
+
if (!agentToUse) {
|
|
1370
|
+
throw new Error("Agent ID is required");
|
|
1371
|
+
}
|
|
1372
|
+
const agentObj = mastra.getAgent(agentToUse);
|
|
1373
|
+
if (!agentObj) {
|
|
1374
|
+
throw new Error(`Agent ${agentToUse} not found`);
|
|
1375
|
+
}
|
|
1376
|
+
const result = await agentObj.network(messages, {
|
|
1377
|
+
...defaultOptions,
|
|
1378
|
+
...rest
|
|
1379
|
+
});
|
|
1380
|
+
const uiMessageStream = ai.createUIMessageStream({
|
|
1381
|
+
execute: async ({ writer }) => {
|
|
1382
|
+
for await (const part of toAISdkV5Stream(result, { from: "network" })) {
|
|
1383
|
+
writer.write(part);
|
|
1384
|
+
}
|
|
1385
|
+
}
|
|
1386
|
+
});
|
|
1387
|
+
return ai.createUIMessageStreamResponse({ stream: uiMessageStream });
|
|
1388
|
+
}
|
|
1389
|
+
});
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
// src/to-ai-sdk-format.ts
|
|
1393
|
+
function toAISdkFormat() {
|
|
1394
|
+
throw new Error(
|
|
1395
|
+
'toAISdkFormat() has been deprecated. Please use toAISdkStream() instead.\n\nMigration:\n import { toAISdkFormat } from "@mastra/ai-sdk";\n // Change to:\n import { toAISdkStream } from "@mastra/ai-sdk";\n\nThe function signature remains the same.'
|
|
1396
|
+
);
|
|
1397
|
+
}
|
|
777
1398
|
|
|
778
|
-
exports.WorkflowStreamToAISDKTransformer = WorkflowStreamToAISDKTransformer;
|
|
779
1399
|
exports.chatRoute = chatRoute;
|
|
1400
|
+
exports.networkRoute = networkRoute;
|
|
780
1401
|
exports.toAISdkFormat = toAISdkFormat;
|
|
1402
|
+
exports.toAISdkStream = toAISdkV5Stream;
|
|
1403
|
+
exports.workflowRoute = workflowRoute;
|
|
781
1404
|
//# sourceMappingURL=index.cjs.map
|
|
782
1405
|
//# sourceMappingURL=index.cjs.map
|