@mastra/server 0.0.0-fix-bundle-cleanup-20250911062914 → 0.0.0-fix-cloud-peer-deps-20250923194656
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 +211 -4
- package/README.md +0 -5
- package/dist/{chunk-GUI3CROV.cjs → chunk-2GDLSAVJ.cjs} +60 -22
- package/dist/chunk-2GDLSAVJ.cjs.map +1 -0
- package/dist/{chunk-3TETONBL.cjs → chunk-2WMATOMO.cjs} +93 -8
- package/dist/chunk-2WMATOMO.cjs.map +1 -0
- package/dist/{chunk-6LUKYSWE.cjs → chunk-57HWW2TY.cjs} +96 -119
- package/dist/chunk-57HWW2TY.cjs.map +1 -0
- package/dist/{chunk-R7NOGUZG.js → chunk-5KRXONRF.js} +43 -4
- package/dist/chunk-5KRXONRF.js.map +1 -0
- package/dist/{chunk-L265APUD.cjs → chunk-5N724Q2T.cjs} +43 -3
- package/dist/chunk-5N724Q2T.cjs.map +1 -0
- package/dist/{chunk-3THIIWWW.cjs → chunk-AVEPEUN4.cjs} +4 -3
- package/dist/chunk-AVEPEUN4.cjs.map +1 -0
- package/dist/{chunk-DMSCGAWM.js → chunk-BZT5VYDT.js} +92 -9
- package/dist/chunk-BZT5VYDT.js.map +1 -0
- package/dist/chunk-CNU4A2XU.js +129 -0
- package/dist/chunk-CNU4A2XU.js.map +1 -0
- package/dist/{chunk-B2V3PUB7.js → chunk-G662L2YZ.js} +93 -116
- package/dist/chunk-G662L2YZ.js.map +1 -0
- package/dist/chunk-GDWMF6SB.cjs +133 -0
- package/dist/chunk-GDWMF6SB.cjs.map +1 -0
- package/dist/{chunk-7QEJ5QG5.js → chunk-IYJW2OVQ.js} +60 -22
- package/dist/chunk-IYJW2OVQ.js.map +1 -0
- package/dist/{chunk-A75S4TDD.js → chunk-JRDEOHAJ.js} +19 -11
- package/dist/chunk-JRDEOHAJ.js.map +1 -0
- package/dist/{chunk-SYRRSBGL.js → chunk-KM7EJKXV.js} +8 -4
- package/dist/chunk-KM7EJKXV.js.map +1 -0
- package/dist/{chunk-J7BPKKOG.cjs → chunk-LJFAAEU7.cjs} +8 -4
- package/dist/chunk-LJFAAEU7.cjs.map +1 -0
- package/dist/{chunk-WZC6CIVD.cjs → chunk-NLWACBE7.cjs} +19 -11
- package/dist/chunk-NLWACBE7.cjs.map +1 -0
- package/dist/{chunk-2JEDATG5.cjs → chunk-PLNQ4XER.cjs} +191 -150
- package/dist/chunk-PLNQ4XER.cjs.map +1 -0
- package/dist/{chunk-5QUKZCEF.js → chunk-PUYSH3IL.js} +4 -3
- package/dist/chunk-PUYSH3IL.js.map +1 -0
- package/dist/{chunk-OTU37YZO.js → chunk-X7564COI.js} +172 -131
- package/dist/chunk-X7564COI.js.map +1 -0
- package/dist/index.cjs +4 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/server/handlers/a2a.cjs +7 -7
- package/dist/server/handlers/a2a.d.ts.map +1 -1
- package/dist/server/handlers/a2a.js +1 -1
- package/dist/server/handlers/agent-builder.cjs +16 -16
- package/dist/server/handlers/agent-builder.d.ts +5 -4
- package/dist/server/handlers/agent-builder.d.ts.map +1 -1
- package/dist/server/handlers/agent-builder.js +1 -1
- package/dist/server/handlers/agents.cjs +23 -15
- package/dist/server/handlers/agents.d.ts +46 -4
- package/dist/server/handlers/agents.d.ts.map +1 -1
- package/dist/server/handlers/agents.js +1 -1
- package/dist/server/handlers/observability.cjs +7 -3
- package/dist/server/handlers/observability.d.ts +18 -0
- package/dist/server/handlers/observability.d.ts.map +1 -1
- package/dist/server/handlers/observability.js +1 -1
- package/dist/server/handlers/scores.cjs +7 -7
- package/dist/server/handlers/scores.d.ts +208 -6
- package/dist/server/handlers/scores.d.ts.map +1 -1
- package/dist/server/handlers/scores.js +1 -1
- package/dist/server/handlers/tools.cjs +6 -6
- package/dist/server/handlers/tools.d.ts.map +1 -1
- package/dist/server/handlers/tools.js +1 -1
- package/dist/server/handlers/vNextNetwork.d.ts +73 -6
- package/dist/server/handlers/vNextNetwork.d.ts.map +1 -1
- package/dist/server/handlers/voice.cjs +5 -5
- package/dist/server/handlers/voice.d.ts +6 -4
- package/dist/server/handlers/voice.d.ts.map +1 -1
- package/dist/server/handlers/voice.js +1 -1
- package/dist/server/handlers/workflows.cjs +24 -16
- package/dist/server/handlers/workflows.d.ts +16 -7
- package/dist/server/handlers/workflows.d.ts.map +1 -1
- package/dist/server/handlers/workflows.js +1 -1
- package/dist/server/handlers.cjs +16 -21
- package/dist/server/handlers.d.ts +0 -1
- package/dist/server/handlers.d.ts.map +1 -1
- package/dist/server/handlers.js +8 -9
- package/dist/server/utils.d.ts +2 -0
- package/dist/server/utils.d.ts.map +1 -1
- package/package.json +8 -8
- package/dist/chunk-2JEDATG5.cjs.map +0 -1
- package/dist/chunk-3TETONBL.cjs.map +0 -1
- package/dist/chunk-3THIIWWW.cjs.map +0 -1
- package/dist/chunk-5QUKZCEF.js.map +0 -1
- package/dist/chunk-6LUKYSWE.cjs.map +0 -1
- package/dist/chunk-7QEJ5QG5.js.map +0 -1
- package/dist/chunk-A75S4TDD.js.map +0 -1
- package/dist/chunk-B2V3PUB7.js.map +0 -1
- package/dist/chunk-DMSCGAWM.js.map +0 -1
- package/dist/chunk-GUI3CROV.cjs.map +0 -1
- package/dist/chunk-IY34NOLA.cjs +0 -150
- package/dist/chunk-IY34NOLA.cjs.map +0 -1
- package/dist/chunk-J7BPKKOG.cjs.map +0 -1
- package/dist/chunk-L265APUD.cjs.map +0 -1
- package/dist/chunk-OTU37YZO.js.map +0 -1
- package/dist/chunk-R7NOGUZG.js.map +0 -1
- package/dist/chunk-SYRRSBGL.js.map +0 -1
- package/dist/chunk-U46VIX2V.js +0 -144
- package/dist/chunk-U46VIX2V.js.map +0 -1
- package/dist/chunk-WZC6CIVD.cjs.map +0 -1
- package/dist/server/handlers/network.cjs +0 -24
- package/dist/server/handlers/network.cjs.map +0 -1
- package/dist/server/handlers/network.d.ts +0 -50
- package/dist/server/handlers/network.d.ts.map +0 -1
- package/dist/server/handlers/network.js +0 -3
- package/dist/server/handlers/network.js.map +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getWorkflowByIdHandler, getWorkflowRunByIdHandler, getWorkflowRunExecutionResultHandler, createWorkflowRunHandler, startAsyncWorkflowHandler, startWorkflowRunHandler, watchWorkflowHandler, streamWorkflowHandler, streamVNextWorkflowHandler, resumeAsyncWorkflowHandler, resumeWorkflowHandler, getWorkflowRunsHandler, cancelWorkflowRunHandler, sendWorkflowRunEventHandler } from './chunk-G662L2YZ.js';
|
|
2
|
+
import { WorkflowRegistry, getWorkflowInfo } from './chunk-CNU4A2XU.js';
|
|
2
3
|
import { openai as openai$1 } from './chunk-4RRMWXQ2.js';
|
|
3
4
|
import { InvalidArgumentError, esm_default, APICallError, EmptyResponseBodyError, AISDKError as AISDKError$1, JSONParseError, TypeValidationError, EventSourceParserStream, NoSuchModelError } from './chunk-N7F33WAD.js';
|
|
4
5
|
import { openai } from './chunk-6GMFZ5LK.js';
|
|
@@ -3183,6 +3184,39 @@ function createAbortError() {
|
|
|
3183
3184
|
function extractResponseHeaders(response) {
|
|
3184
3185
|
return Object.fromEntries([...response.headers]);
|
|
3185
3186
|
}
|
|
3187
|
+
function getRuntimeEnvironmentUserAgent(globalThisAny = globalThis) {
|
|
3188
|
+
var _a19, _b8, _c;
|
|
3189
|
+
if (globalThisAny.window) {
|
|
3190
|
+
return `runtime/browser`;
|
|
3191
|
+
}
|
|
3192
|
+
if ((_a19 = globalThisAny.navigator) == null ? void 0 : _a19.userAgent) {
|
|
3193
|
+
return `runtime/${globalThisAny.navigator.userAgent.toLowerCase()}`;
|
|
3194
|
+
}
|
|
3195
|
+
if ((_c = (_b8 = globalThisAny.process) == null ? void 0 : _b8.versions) == null ? void 0 : _c.node) {
|
|
3196
|
+
return `runtime/node.js/${globalThisAny.process.version.substring(0)}`;
|
|
3197
|
+
}
|
|
3198
|
+
if (globalThisAny.EdgeRuntime) {
|
|
3199
|
+
return `runtime/vercel-edge`;
|
|
3200
|
+
}
|
|
3201
|
+
return "runtime/unknown";
|
|
3202
|
+
}
|
|
3203
|
+
function removeUndefinedEntries(record) {
|
|
3204
|
+
return Object.fromEntries(
|
|
3205
|
+
Object.entries(record).filter(([_key, value]) => value != null)
|
|
3206
|
+
);
|
|
3207
|
+
}
|
|
3208
|
+
function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
|
|
3209
|
+
const cleanedHeaders = removeUndefinedEntries(
|
|
3210
|
+
headers != null ? headers : {}
|
|
3211
|
+
);
|
|
3212
|
+
const normalizedHeaders = new Headers(cleanedHeaders);
|
|
3213
|
+
const currentUserAgentHeader = normalizedHeaders.get("user-agent") || "";
|
|
3214
|
+
normalizedHeaders.set(
|
|
3215
|
+
"user-agent",
|
|
3216
|
+
[currentUserAgentHeader, ...userAgentSuffixParts].filter(Boolean).join(" ")
|
|
3217
|
+
);
|
|
3218
|
+
return Object.fromEntries(normalizedHeaders);
|
|
3219
|
+
}
|
|
3186
3220
|
var createIdGenerator2 = ({
|
|
3187
3221
|
prefix,
|
|
3188
3222
|
size = 16,
|
|
@@ -3249,11 +3283,7 @@ function handleFetchError({
|
|
|
3249
3283
|
}
|
|
3250
3284
|
return error;
|
|
3251
3285
|
}
|
|
3252
|
-
|
|
3253
|
-
return Object.fromEntries(
|
|
3254
|
-
Object.entries(record).filter(([_key, value]) => value != null)
|
|
3255
|
-
);
|
|
3256
|
-
}
|
|
3286
|
+
var VERSION2 = "3.0.9" ;
|
|
3257
3287
|
var getOriginalFetch = () => globalThis.fetch;
|
|
3258
3288
|
var getFromApi = async ({
|
|
3259
3289
|
url,
|
|
@@ -3266,7 +3296,11 @@ var getFromApi = async ({
|
|
|
3266
3296
|
try {
|
|
3267
3297
|
const response = await fetch2(url, {
|
|
3268
3298
|
method: "GET",
|
|
3269
|
-
headers:
|
|
3299
|
+
headers: withUserAgentSuffix(
|
|
3300
|
+
headers,
|
|
3301
|
+
`ai-sdk/provider-utils/${VERSION2}`,
|
|
3302
|
+
getRuntimeEnvironmentUserAgent()
|
|
3303
|
+
),
|
|
3270
3304
|
signal: abortSignal
|
|
3271
3305
|
});
|
|
3272
3306
|
const responseHeaders = extractResponseHeaders(response);
|
|
@@ -3521,7 +3555,11 @@ var postToApi = async ({
|
|
|
3521
3555
|
try {
|
|
3522
3556
|
const response = await fetch2(url, {
|
|
3523
3557
|
method: "POST",
|
|
3524
|
-
headers:
|
|
3558
|
+
headers: withUserAgentSuffix(
|
|
3559
|
+
headers,
|
|
3560
|
+
`ai-sdk/provider-utils/${VERSION2}`,
|
|
3561
|
+
getRuntimeEnvironmentUserAgent()
|
|
3562
|
+
),
|
|
3525
3563
|
body: body.content,
|
|
3526
3564
|
signal: abortSignal
|
|
3527
3565
|
});
|
|
@@ -5361,7 +5399,7 @@ var GatewayEmbeddingModel = class {
|
|
|
5361
5399
|
),
|
|
5362
5400
|
body: {
|
|
5363
5401
|
input: values.length === 1 ? values[0] : values,
|
|
5364
|
-
...providerOptions
|
|
5402
|
+
...providerOptions ? { providerOptions } : {}
|
|
5365
5403
|
},
|
|
5366
5404
|
successfulResponseHandler: createJsonResponseHandler(
|
|
5367
5405
|
gatewayEmbeddingResponseSchema
|
|
@@ -6090,6 +6128,7 @@ function prepareRetries2({
|
|
|
6090
6128
|
function stepCountIs(stepCount) {
|
|
6091
6129
|
return ({ steps }) => steps.length === stepCount;
|
|
6092
6130
|
}
|
|
6131
|
+
var VERSION3 = "5.0.44" ;
|
|
6093
6132
|
createIdGenerator2({
|
|
6094
6133
|
prefix: "aitxt",
|
|
6095
6134
|
size: 24
|
|
@@ -6594,10 +6633,14 @@ async function embedMany2({
|
|
|
6594
6633
|
maxRetries: maxRetriesArg,
|
|
6595
6634
|
abortSignal
|
|
6596
6635
|
});
|
|
6636
|
+
const headersWithUserAgent = withUserAgentSuffix(
|
|
6637
|
+
headers != null ? headers : {},
|
|
6638
|
+
`ai/${VERSION3}`
|
|
6639
|
+
);
|
|
6597
6640
|
const baseTelemetryAttributes = getBaseTelemetryAttributes2({
|
|
6598
6641
|
model,
|
|
6599
6642
|
telemetry,
|
|
6600
|
-
headers,
|
|
6643
|
+
headers: headersWithUserAgent,
|
|
6601
6644
|
settings: { maxRetries }
|
|
6602
6645
|
});
|
|
6603
6646
|
const tracer = getTracer2(telemetry);
|
|
@@ -6646,7 +6689,7 @@ async function embedMany2({
|
|
|
6646
6689
|
const modelResponse = await model.doEmbed({
|
|
6647
6690
|
values,
|
|
6648
6691
|
abortSignal,
|
|
6649
|
-
headers,
|
|
6692
|
+
headers: headersWithUserAgent,
|
|
6650
6693
|
providerOptions
|
|
6651
6694
|
});
|
|
6652
6695
|
const embeddings3 = modelResponse.embeddings;
|
|
@@ -6728,7 +6771,7 @@ async function embedMany2({
|
|
|
6728
6771
|
const modelResponse = await model.doEmbed({
|
|
6729
6772
|
values: chunk,
|
|
6730
6773
|
abortSignal,
|
|
6731
|
-
headers,
|
|
6774
|
+
headers: headersWithUserAgent,
|
|
6732
6775
|
providerOptions
|
|
6733
6776
|
});
|
|
6734
6777
|
const embeddings2 = modelResponse.embeddings;
|
|
@@ -7095,6 +7138,7 @@ var toolUIPartSchemas = [
|
|
|
7095
7138
|
type: z$1.string().startsWith("tool-"),
|
|
7096
7139
|
toolCallId: z$1.string(),
|
|
7097
7140
|
state: z$1.literal("input-streaming"),
|
|
7141
|
+
providerExecuted: z$1.boolean().optional(),
|
|
7098
7142
|
input: z$1.unknown().optional(),
|
|
7099
7143
|
output: z$1.never().optional(),
|
|
7100
7144
|
errorText: z$1.never().optional()
|
|
@@ -7103,6 +7147,7 @@ var toolUIPartSchemas = [
|
|
|
7103
7147
|
type: z$1.string().startsWith("tool-"),
|
|
7104
7148
|
toolCallId: z$1.string(),
|
|
7105
7149
|
state: z$1.literal("input-available"),
|
|
7150
|
+
providerExecuted: z$1.boolean().optional(),
|
|
7106
7151
|
input: z$1.unknown(),
|
|
7107
7152
|
output: z$1.never().optional(),
|
|
7108
7153
|
errorText: z$1.never().optional(),
|
|
@@ -7112,6 +7157,7 @@ var toolUIPartSchemas = [
|
|
|
7112
7157
|
type: z$1.string().startsWith("tool-"),
|
|
7113
7158
|
toolCallId: z$1.string(),
|
|
7114
7159
|
state: z$1.literal("output-available"),
|
|
7160
|
+
providerExecuted: z$1.boolean().optional(),
|
|
7115
7161
|
input: z$1.unknown(),
|
|
7116
7162
|
output: z$1.unknown(),
|
|
7117
7163
|
errorText: z$1.never().optional(),
|
|
@@ -7122,6 +7168,7 @@ var toolUIPartSchemas = [
|
|
|
7122
7168
|
type: z$1.string().startsWith("tool-"),
|
|
7123
7169
|
toolCallId: z$1.string(),
|
|
7124
7170
|
state: z$1.literal("output-error"),
|
|
7171
|
+
providerExecuted: z$1.boolean().optional(),
|
|
7125
7172
|
input: z$1.unknown(),
|
|
7126
7173
|
output: z$1.never().optional(),
|
|
7127
7174
|
errorText: z$1.string(),
|
|
@@ -8556,7 +8603,7 @@ var Memory = class extends MastraMemory {
|
|
|
8556
8603
|
const resourceScope = typeof config?.semanticRecall === "object" && config?.semanticRecall?.scope === `resource`;
|
|
8557
8604
|
if (config?.semanticRecall && selectBy?.vectorSearchString && this.vector) {
|
|
8558
8605
|
const { embeddings, dimension } = await this.embedMessageContent(selectBy.vectorSearchString);
|
|
8559
|
-
const { indexName } = await this.createEmbeddingIndex(dimension);
|
|
8606
|
+
const { indexName } = await this.createEmbeddingIndex(dimension, config);
|
|
8560
8607
|
await Promise.all(
|
|
8561
8608
|
embeddings.map(async (embedding) => {
|
|
8562
8609
|
if (typeof this.vector === `undefined`) {
|
|
@@ -8910,7 +8957,7 @@ ${workingMemory}`;
|
|
|
8910
8957
|
if (!textForEmbedding) return;
|
|
8911
8958
|
const { embeddings, chunks, dimension } = await this.embedMessageContent(textForEmbedding);
|
|
8912
8959
|
if (typeof indexName === `undefined`) {
|
|
8913
|
-
indexName = this.createEmbeddingIndex(dimension).then((result2) => result2.indexName);
|
|
8960
|
+
indexName = this.createEmbeddingIndex(dimension, config).then((result2) => result2.indexName);
|
|
8914
8961
|
}
|
|
8915
8962
|
if (typeof this.vector === `undefined`) {
|
|
8916
8963
|
throw new Error(
|
|
@@ -9682,7 +9729,7 @@ function isInWorkspaceSubfolder(cwd) {
|
|
|
9682
9729
|
if (currentDir === cwd) {
|
|
9683
9730
|
continue;
|
|
9684
9731
|
}
|
|
9685
|
-
console.
|
|
9732
|
+
console.info(`Checking for workspace indicators in: ${currentDir}`);
|
|
9686
9733
|
if (existsSync(resolve$1(currentDir, "pnpm-workspace.yaml"))) {
|
|
9687
9734
|
return true;
|
|
9688
9735
|
}
|
|
@@ -9702,7 +9749,7 @@ function isInWorkspaceSubfolder(cwd) {
|
|
|
9702
9749
|
}
|
|
9703
9750
|
return false;
|
|
9704
9751
|
} catch (error) {
|
|
9705
|
-
console.
|
|
9752
|
+
console.warn(`Error in workspace detection: ${error}`);
|
|
9706
9753
|
return false;
|
|
9707
9754
|
}
|
|
9708
9755
|
}
|
|
@@ -9773,12 +9820,12 @@ function spawnWithOutput(command, args, options) {
|
|
|
9773
9820
|
}
|
|
9774
9821
|
async function spawnSWPM(cwd, command, packageNames) {
|
|
9775
9822
|
try {
|
|
9776
|
-
console.
|
|
9823
|
+
console.info("Running install command with swpm");
|
|
9777
9824
|
const swpmPath = createRequire(import.meta.filename).resolve("swpm");
|
|
9778
9825
|
await spawn(swpmPath, [command, ...packageNames], { cwd });
|
|
9779
9826
|
return;
|
|
9780
9827
|
} catch (e2) {
|
|
9781
|
-
console.
|
|
9828
|
+
console.warn("Failed to run install command with swpm", e2);
|
|
9782
9829
|
}
|
|
9783
9830
|
try {
|
|
9784
9831
|
let packageManager;
|
|
@@ -9806,11 +9853,11 @@ async function spawnSWPM(cwd, command, packageNames) {
|
|
|
9806
9853
|
}
|
|
9807
9854
|
}
|
|
9808
9855
|
args.push(...packageNames);
|
|
9809
|
-
console.
|
|
9856
|
+
console.info(`Falling back to ${packageManager} ${args.join(" ")}`);
|
|
9810
9857
|
await spawn(packageManager, args, { cwd });
|
|
9811
9858
|
return;
|
|
9812
9859
|
} catch (e2) {
|
|
9813
|
-
console.
|
|
9860
|
+
console.warn(`Failed to run install command with native package manager: ${e2}`);
|
|
9814
9861
|
}
|
|
9815
9862
|
throw new Error(`Failed to run install command with swpm and native package managers`);
|
|
9816
9863
|
}
|
|
@@ -9824,10 +9871,10 @@ async function logGitState(targetPath, label) {
|
|
|
9824
9871
|
const gitStatusResult = await git(targetPath, "status", "--porcelain");
|
|
9825
9872
|
const gitLogResult = await git(targetPath, "log", "--oneline", "-3");
|
|
9826
9873
|
const gitCountResult = await git(targetPath, "rev-list", "--count", "HEAD");
|
|
9827
|
-
console.
|
|
9828
|
-
console.
|
|
9829
|
-
console.
|
|
9830
|
-
console.
|
|
9874
|
+
console.info(`\u{1F4CA} Git state ${label}:`);
|
|
9875
|
+
console.info("Status:", gitStatusResult.stdout.trim() || "Clean working directory");
|
|
9876
|
+
console.info("Recent commits:", gitLogResult.stdout.trim());
|
|
9877
|
+
console.info("Total commits:", gitCountResult.stdout.trim());
|
|
9831
9878
|
} catch (gitError) {
|
|
9832
9879
|
console.warn(`Could not get git state ${label}:`, gitError);
|
|
9833
9880
|
}
|
|
@@ -9899,18 +9946,18 @@ async function gitCheckoutBranch(branchName, targetPath) {
|
|
|
9899
9946
|
try {
|
|
9900
9947
|
if (!await isInsideGitRepo(targetPath)) return;
|
|
9901
9948
|
await git(targetPath, "checkout", "-b", branchName);
|
|
9902
|
-
console.
|
|
9949
|
+
console.info(`Created new branch: ${branchName}`);
|
|
9903
9950
|
} catch (error) {
|
|
9904
9951
|
const errorStr = error instanceof Error ? error.message : String(error);
|
|
9905
9952
|
if (errorStr.includes("already exists")) {
|
|
9906
9953
|
try {
|
|
9907
9954
|
await git(targetPath, "checkout", branchName);
|
|
9908
|
-
console.
|
|
9955
|
+
console.info(`Switched to existing branch: ${branchName}`);
|
|
9909
9956
|
} catch {
|
|
9910
9957
|
const timestamp = Date.now().toString().slice(-6);
|
|
9911
9958
|
const uniqueBranchName = `${branchName}-${timestamp}`;
|
|
9912
9959
|
await git(targetPath, "checkout", "-b", uniqueBranchName);
|
|
9913
|
-
console.
|
|
9960
|
+
console.info(`Created unique branch: ${uniqueBranchName}`);
|
|
9914
9961
|
}
|
|
9915
9962
|
} else {
|
|
9916
9963
|
throw error;
|
|
@@ -9920,9 +9967,9 @@ async function gitCheckoutBranch(branchName, targetPath) {
|
|
|
9920
9967
|
async function backupAndReplaceFile(sourceFile, targetFile) {
|
|
9921
9968
|
const backupFile = `${targetFile}.backup-${Date.now()}`;
|
|
9922
9969
|
await copyFile(targetFile, backupFile);
|
|
9923
|
-
console.
|
|
9970
|
+
console.info(`\u{1F4E6} Created backup: ${basename(backupFile)}`);
|
|
9924
9971
|
await copyFile(sourceFile, targetFile);
|
|
9925
|
-
console.
|
|
9972
|
+
console.info(`\u{1F504} Replaced file with template version (backup created)`);
|
|
9926
9973
|
}
|
|
9927
9974
|
async function renameAndCopyFile(sourceFile, targetFile) {
|
|
9928
9975
|
let counter = 1;
|
|
@@ -9936,7 +9983,7 @@ async function renameAndCopyFile(sourceFile, targetFile) {
|
|
|
9936
9983
|
counter++;
|
|
9937
9984
|
}
|
|
9938
9985
|
await copyFile(sourceFile, uniqueTargetFile);
|
|
9939
|
-
console.
|
|
9986
|
+
console.info(`\u{1F4DD} Copied with unique name: ${basename(uniqueTargetFile)}`);
|
|
9940
9987
|
return uniqueTargetFile;
|
|
9941
9988
|
}
|
|
9942
9989
|
var isValidMastraLanguageModel = (model) => {
|
|
@@ -9985,7 +10032,7 @@ var mergeGitignoreFiles = (targetContent, templateContent, templateSlug) => {
|
|
|
9985
10032
|
if (!hasConflict) {
|
|
9986
10033
|
newEntries.push(trimmed);
|
|
9987
10034
|
} else {
|
|
9988
|
-
console.
|
|
10035
|
+
console.info(`\u26A0 Skipping conflicting .gitignore rule: ${trimmed} (conflicts with existing rule)`);
|
|
9989
10036
|
}
|
|
9990
10037
|
}
|
|
9991
10038
|
}
|
|
@@ -10020,7 +10067,7 @@ var mergeEnvFiles = (targetContent, templateVariables, templateSlug) => {
|
|
|
10020
10067
|
if (!existingVars.has(key)) {
|
|
10021
10068
|
newVars.push({ key, value });
|
|
10022
10069
|
} else {
|
|
10023
|
-
console.
|
|
10070
|
+
console.info(`\u26A0 Skipping existing environment variable: ${key} (already exists in .env)`);
|
|
10024
10071
|
}
|
|
10025
10072
|
}
|
|
10026
10073
|
if (newVars.length === 0) {
|
|
@@ -10041,7 +10088,7 @@ var detectAISDKVersion = async (projectPath) => {
|
|
|
10041
10088
|
try {
|
|
10042
10089
|
const packageJsonPath = join(projectPath, "package.json");
|
|
10043
10090
|
if (!existsSync(packageJsonPath)) {
|
|
10044
|
-
console.
|
|
10091
|
+
console.info("No package.json found, defaulting to v2");
|
|
10045
10092
|
return "v2";
|
|
10046
10093
|
}
|
|
10047
10094
|
const packageContent = await readFile(packageJsonPath, "utf-8");
|
|
@@ -10059,16 +10106,16 @@ var detectAISDKVersion = async (projectPath) => {
|
|
|
10059
10106
|
if (versionMatch) {
|
|
10060
10107
|
const majorVersion = parseInt(versionMatch[1]);
|
|
10061
10108
|
if (majorVersion >= 2) {
|
|
10062
|
-
console.
|
|
10109
|
+
console.info(`Detected ${pkg} v${majorVersion} -> using v2 specification`);
|
|
10063
10110
|
return "v2";
|
|
10064
10111
|
} else {
|
|
10065
|
-
console.
|
|
10112
|
+
console.info(`Detected ${pkg} v${majorVersion} -> using v1 specification`);
|
|
10066
10113
|
return "v1";
|
|
10067
10114
|
}
|
|
10068
10115
|
}
|
|
10069
10116
|
}
|
|
10070
10117
|
}
|
|
10071
|
-
console.
|
|
10118
|
+
console.info("No AI SDK version detected, defaulting to v2");
|
|
10072
10119
|
return "v2";
|
|
10073
10120
|
} catch (error) {
|
|
10074
10121
|
console.warn(`Failed to detect AI SDK version: ${error instanceof Error ? error.message : String(error)}`);
|
|
@@ -10129,7 +10176,7 @@ var createModelInstance = async (provider, modelId, version = "v2") => {
|
|
|
10129
10176
|
return null;
|
|
10130
10177
|
}
|
|
10131
10178
|
const modelInstance = await providerFn();
|
|
10132
|
-
console.
|
|
10179
|
+
console.info(`Created ${provider} model instance (${version}): ${modelId}`);
|
|
10133
10180
|
return modelInstance;
|
|
10134
10181
|
} catch (error) {
|
|
10135
10182
|
console.error(`Failed to create model instance: ${error instanceof Error ? error.message : String(error)}`);
|
|
@@ -10143,7 +10190,7 @@ var resolveModel = async ({
|
|
|
10143
10190
|
}) => {
|
|
10144
10191
|
const modelFromContext = runtimeContext.get("model");
|
|
10145
10192
|
if (modelFromContext) {
|
|
10146
|
-
console.
|
|
10193
|
+
console.info("Using model from runtime context");
|
|
10147
10194
|
if (isValidMastraLanguageModel(modelFromContext)) {
|
|
10148
10195
|
return modelFromContext;
|
|
10149
10196
|
}
|
|
@@ -10153,7 +10200,7 @@ var resolveModel = async ({
|
|
|
10153
10200
|
}
|
|
10154
10201
|
const selectedModel = runtimeContext.get("selectedModel");
|
|
10155
10202
|
if (selectedModel?.provider && selectedModel?.modelId && projectPath) {
|
|
10156
|
-
console.
|
|
10203
|
+
console.info(`Resolving selected model: ${selectedModel.provider}/${selectedModel.modelId}`);
|
|
10157
10204
|
const version = await detectAISDKVersion(projectPath);
|
|
10158
10205
|
const modelInstance = await createModelInstance(selectedModel.provider, selectedModel.modelId, version);
|
|
10159
10206
|
if (modelInstance) {
|
|
@@ -10161,7 +10208,7 @@ var resolveModel = async ({
|
|
|
10161
10208
|
return modelInstance;
|
|
10162
10209
|
}
|
|
10163
10210
|
}
|
|
10164
|
-
console.
|
|
10211
|
+
console.info("Using default model");
|
|
10165
10212
|
return defaultModel;
|
|
10166
10213
|
};
|
|
10167
10214
|
var AgentBuilderDefaults = class _AgentBuilderDefaults {
|
|
@@ -11195,7 +11242,7 @@ export const mastra = new Mastra({
|
|
|
11195
11242
|
error: stderr
|
|
11196
11243
|
};
|
|
11197
11244
|
} catch (error) {
|
|
11198
|
-
console.
|
|
11245
|
+
console.error(error);
|
|
11199
11246
|
return {
|
|
11200
11247
|
success: false,
|
|
11201
11248
|
message: `Failed to create project: ${error instanceof Error ? error.message : String(error)}`
|
|
@@ -11210,7 +11257,7 @@ export const mastra = new Mastra({
|
|
|
11210
11257
|
projectPath
|
|
11211
11258
|
}) {
|
|
11212
11259
|
try {
|
|
11213
|
-
console.
|
|
11260
|
+
console.info("Installing packages:", JSON.stringify(packages, null, 2));
|
|
11214
11261
|
const packageStrings = packages.map((p) => `${p.name}`);
|
|
11215
11262
|
await spawnSWPM(projectPath || "", "add", packageStrings);
|
|
11216
11263
|
return {
|
|
@@ -11234,7 +11281,7 @@ export const mastra = new Mastra({
|
|
|
11234
11281
|
projectPath
|
|
11235
11282
|
}) {
|
|
11236
11283
|
try {
|
|
11237
|
-
console.
|
|
11284
|
+
console.info("Upgrading specific packages:", JSON.stringify(packages, null, 2));
|
|
11238
11285
|
let packageNames = [];
|
|
11239
11286
|
if (packages && packages.length > 0) {
|
|
11240
11287
|
packageNames = packages.map((p) => `${p.name}`);
|
|
@@ -12825,13 +12872,13 @@ var analyzePackageStep = createStep({
|
|
|
12825
12872
|
inputSchema: CloneTemplateResultSchema,
|
|
12826
12873
|
outputSchema: PackageAnalysisSchema,
|
|
12827
12874
|
execute: async ({ inputData }) => {
|
|
12828
|
-
console.
|
|
12875
|
+
console.info("Analyzing template package.json...");
|
|
12829
12876
|
const { templateDir } = inputData;
|
|
12830
12877
|
const packageJsonPath = join(templateDir, "package.json");
|
|
12831
12878
|
try {
|
|
12832
12879
|
const packageJsonContent = await readFile(packageJsonPath, "utf-8");
|
|
12833
12880
|
const packageJson = JSON.parse(packageJsonContent);
|
|
12834
|
-
console.
|
|
12881
|
+
console.info("Template package.json:", JSON.stringify(packageJson, null, 2));
|
|
12835
12882
|
return {
|
|
12836
12883
|
dependencies: packageJson.dependencies || {},
|
|
12837
12884
|
devDependencies: packageJson.devDependencies || {},
|
|
@@ -12867,7 +12914,7 @@ var discoverUnitsStep = createStep({
|
|
|
12867
12914
|
const { templateDir } = inputData;
|
|
12868
12915
|
const targetPath = resolveTargetPath(inputData, runtimeContext);
|
|
12869
12916
|
const tools = await AgentBuilderDefaults.DEFAULT_TOOLS(templateDir);
|
|
12870
|
-
console.
|
|
12917
|
+
console.info("targetPath", targetPath);
|
|
12871
12918
|
const model = await resolveModel({ runtimeContext, projectPath: targetPath, defaultModel: openai("gpt-4.1") });
|
|
12872
12919
|
try {
|
|
12873
12920
|
const agent = new Agent({
|
|
@@ -12955,7 +13002,7 @@ Return the actual exported names of the units, as well as the file names.`,
|
|
|
12955
13002
|
template.other?.forEach((otherId) => {
|
|
12956
13003
|
units.push({ kind: "other", id: otherId.name, file: otherId.file });
|
|
12957
13004
|
});
|
|
12958
|
-
console.
|
|
13005
|
+
console.info("Discovered units:", JSON.stringify(units, null, 2));
|
|
12959
13006
|
if (units.length === 0) {
|
|
12960
13007
|
throw new Error(`No Mastra units (agents, workflows, tools) found in template.
|
|
12961
13008
|
Possible causes:
|
|
@@ -13031,7 +13078,7 @@ var packageMergeStep = createStep({
|
|
|
13031
13078
|
inputSchema: PackageMergeInputSchema,
|
|
13032
13079
|
outputSchema: PackageMergeResultSchema,
|
|
13033
13080
|
execute: async ({ inputData, runtimeContext }) => {
|
|
13034
|
-
console.
|
|
13081
|
+
console.info("Package merge step starting...");
|
|
13035
13082
|
const { slug, packageInfo } = inputData;
|
|
13036
13083
|
const targetPath = resolveTargetPath(inputData, runtimeContext);
|
|
13037
13084
|
try {
|
|
@@ -13108,7 +13155,7 @@ var installStep = createStep({
|
|
|
13108
13155
|
inputSchema: InstallInputSchema,
|
|
13109
13156
|
outputSchema: InstallResultSchema,
|
|
13110
13157
|
execute: async ({ inputData, runtimeContext }) => {
|
|
13111
|
-
console.
|
|
13158
|
+
console.info("Running install step...");
|
|
13112
13159
|
const targetPath = resolveTargetPath(inputData, runtimeContext);
|
|
13113
13160
|
try {
|
|
13114
13161
|
await spawnSWPM(targetPath, "install", []);
|
|
@@ -13136,7 +13183,7 @@ var programmaticFileCopyStep = createStep({
|
|
|
13136
13183
|
inputSchema: FileCopyInputSchema,
|
|
13137
13184
|
outputSchema: FileCopyResultSchema,
|
|
13138
13185
|
execute: async ({ inputData, runtimeContext }) => {
|
|
13139
|
-
console.
|
|
13186
|
+
console.info("Programmatic file copy step starting...");
|
|
13140
13187
|
const { orderedUnits, templateDir, commitSha, slug } = inputData;
|
|
13141
13188
|
const targetPath = resolveTargetPath(inputData, runtimeContext);
|
|
13142
13189
|
try {
|
|
@@ -13179,7 +13226,7 @@ var programmaticFileCopyStep = createStep({
|
|
|
13179
13226
|
}
|
|
13180
13227
|
};
|
|
13181
13228
|
for (const unit of orderedUnits) {
|
|
13182
|
-
console.
|
|
13229
|
+
console.info(`Processing ${unit.kind} unit "${unit.id}" from file "${unit.file}"`);
|
|
13183
13230
|
let sourceFile;
|
|
13184
13231
|
let resolvedUnitFile;
|
|
13185
13232
|
if (unit.file.includes("/")) {
|
|
@@ -13210,7 +13257,7 @@ var programmaticFileCopyStep = createStep({
|
|
|
13210
13257
|
}
|
|
13211
13258
|
const targetDir = dirname(resolvedUnitFile);
|
|
13212
13259
|
const namingConvention = await analyzeNamingConvention(targetDir);
|
|
13213
|
-
console.
|
|
13260
|
+
console.info(`Detected naming convention in ${targetDir}: ${namingConvention}`);
|
|
13214
13261
|
const hasExtension = extname(unit.id) !== "";
|
|
13215
13262
|
const baseId = hasExtension ? basename(unit.id, extname(unit.id)) : unit.id;
|
|
13216
13263
|
const fileExtension = extname(unit.file);
|
|
@@ -13218,7 +13265,7 @@ var programmaticFileCopyStep = createStep({
|
|
|
13218
13265
|
const targetFile = resolve$1(targetPath, targetDir, convertedFileName);
|
|
13219
13266
|
if (existsSync(targetFile)) {
|
|
13220
13267
|
const strategy = determineConflictStrategy();
|
|
13221
|
-
console.
|
|
13268
|
+
console.info(`File exists: ${convertedFileName}, using strategy: ${strategy}`);
|
|
13222
13269
|
switch (strategy) {
|
|
13223
13270
|
case "skip":
|
|
13224
13271
|
conflicts.push({
|
|
@@ -13227,7 +13274,7 @@ var programmaticFileCopyStep = createStep({
|
|
|
13227
13274
|
sourceFile: unit.file,
|
|
13228
13275
|
targetFile: `${targetDir}/${convertedFileName}`
|
|
13229
13276
|
});
|
|
13230
|
-
console.
|
|
13277
|
+
console.info(`\u23ED\uFE0F Skipped ${unit.kind} "${unit.id}": file already exists`);
|
|
13231
13278
|
continue;
|
|
13232
13279
|
case "backup-and-replace":
|
|
13233
13280
|
try {
|
|
@@ -13237,7 +13284,7 @@ var programmaticFileCopyStep = createStep({
|
|
|
13237
13284
|
destination: targetFile,
|
|
13238
13285
|
unit: { kind: unit.kind, id: unit.id }
|
|
13239
13286
|
});
|
|
13240
|
-
console.
|
|
13287
|
+
console.info(
|
|
13241
13288
|
`\u{1F504} Replaced ${unit.kind} "${unit.id}": ${unit.file} \u2192 ${convertedFileName} (backup created)`
|
|
13242
13289
|
);
|
|
13243
13290
|
continue;
|
|
@@ -13258,7 +13305,7 @@ var programmaticFileCopyStep = createStep({
|
|
|
13258
13305
|
destination: uniqueTargetFile,
|
|
13259
13306
|
unit: { kind: unit.kind, id: unit.id }
|
|
13260
13307
|
});
|
|
13261
|
-
console.
|
|
13308
|
+
console.info(`\u{1F4DD} Renamed ${unit.kind} "${unit.id}": ${unit.file} \u2192 ${basename(uniqueTargetFile)}`);
|
|
13262
13309
|
continue;
|
|
13263
13310
|
} catch (renameError) {
|
|
13264
13311
|
conflicts.push({
|
|
@@ -13287,7 +13334,7 @@ var programmaticFileCopyStep = createStep({
|
|
|
13287
13334
|
destination: targetFile,
|
|
13288
13335
|
unit: { kind: unit.kind, id: unit.id }
|
|
13289
13336
|
});
|
|
13290
|
-
console.
|
|
13337
|
+
console.info(`\u2713 Copied ${unit.kind} "${unit.id}": ${unit.file} \u2192 ${convertedFileName}`);
|
|
13291
13338
|
} catch (copyError) {
|
|
13292
13339
|
conflicts.push({
|
|
13293
13340
|
unit: { kind: unit.kind, id: unit.id },
|
|
@@ -13308,7 +13355,7 @@ var programmaticFileCopyStep = createStep({
|
|
|
13308
13355
|
destination: targetTsconfig,
|
|
13309
13356
|
unit: { kind: "other", id: "tsconfig.json" }
|
|
13310
13357
|
});
|
|
13311
|
-
console.
|
|
13358
|
+
console.info("\u2713 Copied tsconfig.json from template to target");
|
|
13312
13359
|
} else {
|
|
13313
13360
|
const minimalTsconfig = {
|
|
13314
13361
|
compilerOptions: {
|
|
@@ -13330,7 +13377,7 @@ var programmaticFileCopyStep = createStep({
|
|
|
13330
13377
|
destination: targetTsconfig,
|
|
13331
13378
|
unit: { kind: "other", id: "tsconfig.json" }
|
|
13332
13379
|
});
|
|
13333
|
-
console.
|
|
13380
|
+
console.info("\u2713 Generated minimal tsconfig.json in target");
|
|
13334
13381
|
}
|
|
13335
13382
|
}
|
|
13336
13383
|
} catch (e2) {
|
|
@@ -13355,7 +13402,7 @@ var programmaticFileCopyStep = createStep({
|
|
|
13355
13402
|
destination: targetMastraIndex,
|
|
13356
13403
|
unit: { kind: "other", id: "mastra-index" }
|
|
13357
13404
|
});
|
|
13358
|
-
console.
|
|
13405
|
+
console.info("\u2713 Copied Mastra index file from template");
|
|
13359
13406
|
}
|
|
13360
13407
|
}
|
|
13361
13408
|
} catch (e2) {
|
|
@@ -13379,7 +13426,7 @@ var programmaticFileCopyStep = createStep({
|
|
|
13379
13426
|
destination: targetGitignore,
|
|
13380
13427
|
unit: { kind: "other", id: "gitignore" }
|
|
13381
13428
|
});
|
|
13382
|
-
console.
|
|
13429
|
+
console.info("\u2713 Copied .gitignore from template to target");
|
|
13383
13430
|
} else {
|
|
13384
13431
|
const targetContent = await readFile(targetGitignore, "utf-8");
|
|
13385
13432
|
const templateContent = await readFile(templateGitignore, "utf-8");
|
|
@@ -13392,9 +13439,9 @@ var programmaticFileCopyStep = createStep({
|
|
|
13392
13439
|
destination: targetGitignore,
|
|
13393
13440
|
unit: { kind: "other", id: "gitignore-merge" }
|
|
13394
13441
|
});
|
|
13395
|
-
console.
|
|
13442
|
+
console.info(`\u2713 Merged template .gitignore entries into existing .gitignore (${addedLines} new entries)`);
|
|
13396
13443
|
} else {
|
|
13397
|
-
console.
|
|
13444
|
+
console.info("\u2139 No new .gitignore entries to add from template");
|
|
13398
13445
|
}
|
|
13399
13446
|
}
|
|
13400
13447
|
}
|
|
@@ -13422,7 +13469,7 @@ var programmaticFileCopyStep = createStep({
|
|
|
13422
13469
|
destination: targetEnv,
|
|
13423
13470
|
unit: { kind: "other", id: "env" }
|
|
13424
13471
|
});
|
|
13425
|
-
console.
|
|
13472
|
+
console.info(`\u2713 Created .env file with ${Object.keys(variables).length} template variables`);
|
|
13426
13473
|
} else {
|
|
13427
13474
|
const targetContent = await readFile(targetEnv, "utf-8");
|
|
13428
13475
|
const mergedContent = mergeEnvFiles(targetContent, variables, slug);
|
|
@@ -13434,9 +13481,9 @@ var programmaticFileCopyStep = createStep({
|
|
|
13434
13481
|
destination: targetEnv,
|
|
13435
13482
|
unit: { kind: "other", id: "env-merge" }
|
|
13436
13483
|
});
|
|
13437
|
-
console.
|
|
13484
|
+
console.info(`\u2713 Merged new environment variables into existing .env file (${addedLines} new entries)`);
|
|
13438
13485
|
} else {
|
|
13439
|
-
console.
|
|
13486
|
+
console.info("\u2139 No new environment variables to add (all already exist in .env)");
|
|
13440
13487
|
}
|
|
13441
13488
|
}
|
|
13442
13489
|
}
|
|
@@ -13457,13 +13504,13 @@ var programmaticFileCopyStep = createStep({
|
|
|
13457
13504
|
fileList,
|
|
13458
13505
|
{ skipIfNoStaged: true }
|
|
13459
13506
|
);
|
|
13460
|
-
console.
|
|
13507
|
+
console.info(`\u2713 Committed ${copiedFiles.length} copied files`);
|
|
13461
13508
|
} catch (commitError) {
|
|
13462
13509
|
console.warn("Failed to commit copied files:", commitError);
|
|
13463
13510
|
}
|
|
13464
13511
|
}
|
|
13465
13512
|
const message = `Programmatic file copy completed. Copied ${copiedFiles.length} files, ${conflicts.length} conflicts detected.`;
|
|
13466
|
-
console.
|
|
13513
|
+
console.info(message);
|
|
13467
13514
|
return {
|
|
13468
13515
|
success: true,
|
|
13469
13516
|
copiedFiles,
|
|
@@ -13488,7 +13535,7 @@ var intelligentMergeStep = createStep({
|
|
|
13488
13535
|
inputSchema: IntelligentMergeInputSchema,
|
|
13489
13536
|
outputSchema: IntelligentMergeResultSchema,
|
|
13490
13537
|
execute: async ({ inputData, runtimeContext }) => {
|
|
13491
|
-
console.
|
|
13538
|
+
console.info("Intelligent merge step starting...");
|
|
13492
13539
|
const { conflicts, copiedFiles, commitSha, slug, templateDir, branchName } = inputData;
|
|
13493
13540
|
const targetPath = resolveTargetPath(inputData, runtimeContext);
|
|
13494
13541
|
try {
|
|
@@ -13615,8 +13662,8 @@ Template information:
|
|
|
13615
13662
|
const registrableFiles = copiedFiles.filter((f) => registrableKinds.has(f.unit.kind));
|
|
13616
13663
|
const targetMastraIndex = resolve$1(targetPath, "src/mastra/index.ts");
|
|
13617
13664
|
const mastraIndexExists = existsSync(targetMastraIndex);
|
|
13618
|
-
console.
|
|
13619
|
-
console.
|
|
13665
|
+
console.info(`Mastra index exists: ${mastraIndexExists} at ${targetMastraIndex}`);
|
|
13666
|
+
console.info(
|
|
13620
13667
|
"Registrable components:",
|
|
13621
13668
|
registrableFiles.map((f) => `${f.unit.kind}:${f.unit.id}`)
|
|
13622
13669
|
);
|
|
@@ -13630,7 +13677,7 @@ Template information:
|
|
|
13630
13677
|
notes: `Components to register: ${registrableFiles.map((f) => `${f.unit.kind}:${f.unit.id}`).join(", ")}`
|
|
13631
13678
|
});
|
|
13632
13679
|
}
|
|
13633
|
-
console.
|
|
13680
|
+
console.info(`Creating task list with ${tasks.length} tasks...`);
|
|
13634
13681
|
await AgentBuilderDefaults.manageTaskList({ action: "create", tasks });
|
|
13635
13682
|
await logGitState(targetPath, "before intelligent merge");
|
|
13636
13683
|
const prompt = `
|
|
@@ -13682,12 +13729,12 @@ Start by listing your tasks and work through them systematically!
|
|
|
13682
13729
|
for await (const chunk of result.fullStream) {
|
|
13683
13730
|
if (chunk.type === "step-finish" || chunk.type === "step-start") {
|
|
13684
13731
|
const chunkData = "payload" in chunk ? chunk.payload : chunk;
|
|
13685
|
-
console.
|
|
13732
|
+
console.info({
|
|
13686
13733
|
type: chunk.type,
|
|
13687
13734
|
msgId: chunkData.messageId
|
|
13688
13735
|
});
|
|
13689
13736
|
} else {
|
|
13690
|
-
console.
|
|
13737
|
+
console.info(JSON.stringify(chunk, null, 2));
|
|
13691
13738
|
if (chunk.type === "tool-result") {
|
|
13692
13739
|
const chunkData = "payload" in chunk ? chunk.payload : chunk;
|
|
13693
13740
|
if (chunkData.toolName === "manageTaskList") {
|
|
@@ -13701,7 +13748,7 @@ Start by listing your tasks and work through them systematically!
|
|
|
13701
13748
|
content: toolResult.content || "",
|
|
13702
13749
|
notes: toolResult.notes
|
|
13703
13750
|
});
|
|
13704
|
-
console.
|
|
13751
|
+
console.info(`\u{1F4CB} Task completed: ${toolResult.taskId} - ${toolResult.content}`);
|
|
13705
13752
|
}
|
|
13706
13753
|
} catch (parseError) {
|
|
13707
13754
|
console.warn("Failed to parse task management result:", parseError);
|
|
@@ -13756,12 +13803,12 @@ var validationAndFixStep = createStep({
|
|
|
13756
13803
|
inputSchema: ValidationFixInputSchema,
|
|
13757
13804
|
outputSchema: ValidationFixResultSchema,
|
|
13758
13805
|
execute: async ({ inputData, runtimeContext }) => {
|
|
13759
|
-
console.
|
|
13806
|
+
console.info("Validation and fix step starting...");
|
|
13760
13807
|
const { commitSha, slug, orderedUnits, templateDir, copiedFiles, conflictsResolved, maxIterations = 5 } = inputData;
|
|
13761
13808
|
const targetPath = resolveTargetPath(inputData, runtimeContext);
|
|
13762
13809
|
const hasChanges = copiedFiles.length > 0 || conflictsResolved && conflictsResolved.length > 0;
|
|
13763
13810
|
if (!hasChanges) {
|
|
13764
|
-
console.
|
|
13811
|
+
console.info("\u23ED\uFE0F Skipping validation - no files copied or conflicts resolved");
|
|
13765
13812
|
return {
|
|
13766
13813
|
success: true,
|
|
13767
13814
|
applied: false,
|
|
@@ -13773,7 +13820,7 @@ var validationAndFixStep = createStep({
|
|
|
13773
13820
|
}
|
|
13774
13821
|
};
|
|
13775
13822
|
}
|
|
13776
|
-
console.
|
|
13823
|
+
console.info(
|
|
13777
13824
|
`\u{1F4CB} Changes detected: ${copiedFiles.length} files copied, ${conflictsResolved?.length || 0} conflicts resolved`
|
|
13778
13825
|
);
|
|
13779
13826
|
let currentIteration = 1;
|
|
@@ -13899,7 +13946,7 @@ Be thorough and methodical. Always use listDirectory to verify actual file exist
|
|
|
13899
13946
|
executeCommand: allTools.executeCommand
|
|
13900
13947
|
}
|
|
13901
13948
|
});
|
|
13902
|
-
console.
|
|
13949
|
+
console.info("Starting validation and fix agent with internal loop...");
|
|
13903
13950
|
let validationResults = {
|
|
13904
13951
|
valid: false,
|
|
13905
13952
|
errorsFixed: 0,
|
|
@@ -13910,7 +13957,7 @@ Be thorough and methodical. Always use listDirectory to verify actual file exist
|
|
|
13910
13957
|
// Store the actual error details
|
|
13911
13958
|
};
|
|
13912
13959
|
while (validationResults.remainingErrors > 0 && currentIteration <= maxIterations) {
|
|
13913
|
-
console.
|
|
13960
|
+
console.info(`
|
|
13914
13961
|
=== Validation Iteration ${currentIteration} ===`);
|
|
13915
13962
|
const iterationPrompt = currentIteration === 1 ? `Please validate the template integration and fix any errors found in the project at ${targetPath}. The template "${slug}" (${commitSha.substring(0, 7)}) was just integrated and may have validation issues that need fixing.
|
|
13916
13963
|
|
|
@@ -13930,13 +13977,13 @@ Previous iterations may have fixed some issues, so start by re-running validateC
|
|
|
13930
13977
|
for await (const chunk of result.fullStream) {
|
|
13931
13978
|
if (chunk.type === "step-finish" || chunk.type === "step-start") {
|
|
13932
13979
|
const chunkData = "payload" in chunk ? chunk.payload : chunk;
|
|
13933
|
-
console.
|
|
13980
|
+
console.info({
|
|
13934
13981
|
type: chunk.type,
|
|
13935
13982
|
msgId: chunkData.messageId,
|
|
13936
13983
|
iteration: currentIteration
|
|
13937
13984
|
});
|
|
13938
13985
|
} else {
|
|
13939
|
-
console.
|
|
13986
|
+
console.info(JSON.stringify(chunk, null, 2));
|
|
13940
13987
|
}
|
|
13941
13988
|
if (chunk.type === "tool-result") {
|
|
13942
13989
|
const chunkData = "payload" in chunk ? chunk.payload : chunk;
|
|
@@ -13945,7 +13992,7 @@ Previous iterations may have fixed some issues, so start by re-running validateC
|
|
|
13945
13992
|
lastValidationResult = toolResult;
|
|
13946
13993
|
if (toolResult?.summary) {
|
|
13947
13994
|
iterationErrors = toolResult.summary.totalErrors || 0;
|
|
13948
|
-
console.
|
|
13995
|
+
console.info(`Iteration ${currentIteration}: Found ${iterationErrors} errors`);
|
|
13949
13996
|
}
|
|
13950
13997
|
}
|
|
13951
13998
|
}
|
|
@@ -13957,12 +14004,12 @@ Previous iterations may have fixed some issues, so start by re-running validateC
|
|
|
13957
14004
|
if (iterationErrors > 0 && lastValidationResult?.errors) {
|
|
13958
14005
|
validationResults.lastValidationErrors = lastValidationResult.errors;
|
|
13959
14006
|
}
|
|
13960
|
-
console.
|
|
14007
|
+
console.info(`Iteration ${currentIteration} complete: ${iterationErrors} errors remaining`);
|
|
13961
14008
|
if (iterationErrors === 0) {
|
|
13962
|
-
console.
|
|
14009
|
+
console.info(`\u2705 All validation issues resolved in ${currentIteration} iterations!`);
|
|
13963
14010
|
break;
|
|
13964
14011
|
} else if (currentIteration >= maxIterations) {
|
|
13965
|
-
console.
|
|
14012
|
+
console.info(`\u26A0\uFE0F Max iterations (${maxIterations}) reached. ${iterationErrors} errors still remaining.`);
|
|
13966
14013
|
break;
|
|
13967
14014
|
}
|
|
13968
14015
|
currentIteration++;
|
|
@@ -14007,7 +14054,7 @@ Previous iterations may have fixed some issues, so start by re-running validateC
|
|
|
14007
14054
|
} finally {
|
|
14008
14055
|
try {
|
|
14009
14056
|
await rm(templateDir, { recursive: true, force: true });
|
|
14010
|
-
console.
|
|
14057
|
+
console.info(`\u2713 Cleaned up template directory: ${templateDir}`);
|
|
14011
14058
|
} catch (cleanupError) {
|
|
14012
14059
|
console.warn("Failed to cleanup template directory:", cleanupError);
|
|
14013
14060
|
}
|
|
@@ -14483,12 +14530,10 @@ var planningIterationStep = createStep({
|
|
|
14483
14530
|
research,
|
|
14484
14531
|
userAnswers
|
|
14485
14532
|
} = inputData;
|
|
14486
|
-
console.
|
|
14533
|
+
console.info("Starting planning iteration...");
|
|
14487
14534
|
const qaKey = "workflow-builder-qa";
|
|
14488
14535
|
let storedQAPairs = runtimeContext.get(qaKey) || [];
|
|
14489
14536
|
const newAnswers = { ...userAnswers || {}, ...resumeData?.answers || {} };
|
|
14490
|
-
console.log("before", storedQAPairs);
|
|
14491
|
-
console.log("newAnswers", newAnswers);
|
|
14492
14537
|
if (Object.keys(newAnswers).length > 0) {
|
|
14493
14538
|
storedQAPairs = storedQAPairs.map((pair) => {
|
|
14494
14539
|
if (newAnswers[pair.question.id]) {
|
|
@@ -14502,10 +14547,6 @@ var planningIterationStep = createStep({
|
|
|
14502
14547
|
});
|
|
14503
14548
|
runtimeContext.set(qaKey, storedQAPairs);
|
|
14504
14549
|
}
|
|
14505
|
-
console.log("after", storedQAPairs);
|
|
14506
|
-
console.log(
|
|
14507
|
-
`Current Q&A state: ${storedQAPairs.length} question-answer pairs, ${storedQAPairs.filter((p) => p.answer).length} answered`
|
|
14508
|
-
);
|
|
14509
14550
|
try {
|
|
14510
14551
|
const model = await resolveModel({ runtimeContext });
|
|
14511
14552
|
const planningAgent = new Agent({
|
|
@@ -14553,8 +14594,8 @@ var planningIterationStep = createStep({
|
|
|
14553
14594
|
};
|
|
14554
14595
|
}
|
|
14555
14596
|
if (planResult.questions && planResult.questions.length > 0 && !planResult.planComplete) {
|
|
14556
|
-
console.
|
|
14557
|
-
console.
|
|
14597
|
+
console.info(`Planning needs user clarification: ${planResult.questions.length} questions`);
|
|
14598
|
+
console.info(planResult.questions);
|
|
14558
14599
|
const newQAPairs = planResult.questions.map((question) => ({
|
|
14559
14600
|
question,
|
|
14560
14601
|
answer: null,
|
|
@@ -14563,7 +14604,7 @@ var planningIterationStep = createStep({
|
|
|
14563
14604
|
}));
|
|
14564
14605
|
storedQAPairs = [...storedQAPairs, ...newQAPairs];
|
|
14565
14606
|
runtimeContext.set(qaKey, storedQAPairs);
|
|
14566
|
-
console.
|
|
14607
|
+
console.info(
|
|
14567
14608
|
`Updated Q&A state: ${storedQAPairs.length} total question-answer pairs, ${storedQAPairs.filter((p) => p.answer).length} answered`
|
|
14568
14609
|
);
|
|
14569
14610
|
return suspend({
|
|
@@ -14575,9 +14616,9 @@ var planningIterationStep = createStep({
|
|
|
14575
14616
|
}
|
|
14576
14617
|
});
|
|
14577
14618
|
}
|
|
14578
|
-
console.
|
|
14619
|
+
console.info(`Planning complete with ${planResult.tasks.length} tasks`);
|
|
14579
14620
|
runtimeContext.set(qaKey, storedQAPairs);
|
|
14580
|
-
console.
|
|
14621
|
+
console.info(
|
|
14581
14622
|
`Final Q&A state: ${storedQAPairs.length} total question-answer pairs, ${storedQAPairs.filter((p) => p.answer).length} answered`
|
|
14582
14623
|
);
|
|
14583
14624
|
return {
|
|
@@ -14620,7 +14661,7 @@ var taskApprovalStep = createStep({
|
|
|
14620
14661
|
execute: async ({ inputData, resumeData, suspend }) => {
|
|
14621
14662
|
const { tasks } = inputData;
|
|
14622
14663
|
if (!resumeData?.approved && resumeData?.approved !== false) {
|
|
14623
|
-
console.
|
|
14664
|
+
console.info(`Requesting user approval for ${tasks.length} tasks`);
|
|
14624
14665
|
const summary = `Task List for Approval:
|
|
14625
14666
|
|
|
14626
14667
|
${tasks.length} tasks planned:
|
|
@@ -14633,14 +14674,14 @@ ${tasks.map((task, i) => `${i + 1}. [${task.priority.toUpperCase()}] ${task.cont
|
|
|
14633
14674
|
});
|
|
14634
14675
|
}
|
|
14635
14676
|
if (resumeData.approved) {
|
|
14636
|
-
console.
|
|
14677
|
+
console.info("Task list approved by user");
|
|
14637
14678
|
return {
|
|
14638
14679
|
approved: true,
|
|
14639
14680
|
tasks,
|
|
14640
14681
|
message: "Task list approved, ready for execution"
|
|
14641
14682
|
};
|
|
14642
14683
|
} else {
|
|
14643
|
-
console.
|
|
14684
|
+
console.info("Task list rejected by user");
|
|
14644
14685
|
return {
|
|
14645
14686
|
approved: false,
|
|
14646
14687
|
tasks,
|
|
@@ -14657,7 +14698,7 @@ var planningAndApprovalWorkflow = createWorkflow({
|
|
|
14657
14698
|
outputSchema: TaskApprovalOutputSchema,
|
|
14658
14699
|
steps: [planningIterationStep, taskApprovalStep]
|
|
14659
14700
|
}).dountil(planningIterationStep, async ({ inputData }) => {
|
|
14660
|
-
console.
|
|
14701
|
+
console.info(`Sub-workflow planning check: planComplete=${inputData.planComplete}`);
|
|
14661
14702
|
return inputData.planComplete === true;
|
|
14662
14703
|
}).map(async ({ inputData }) => {
|
|
14663
14704
|
return {
|
|
@@ -15108,12 +15149,12 @@ var workflowDiscoveryStep = createStep({
|
|
|
15108
15149
|
inputSchema: WorkflowBuilderInputSchema,
|
|
15109
15150
|
outputSchema: WorkflowDiscoveryResultSchema,
|
|
15110
15151
|
execute: async ({ inputData, runtimeContext: _runtimeContext }) => {
|
|
15111
|
-
console.
|
|
15152
|
+
console.info("Starting workflow discovery...");
|
|
15112
15153
|
const { projectPath = process.cwd() } = inputData;
|
|
15113
15154
|
try {
|
|
15114
15155
|
const workflowsPath = join(projectPath, "src/mastra/workflows");
|
|
15115
15156
|
if (!existsSync(workflowsPath)) {
|
|
15116
|
-
console.
|
|
15157
|
+
console.info("No workflows directory found");
|
|
15117
15158
|
return {
|
|
15118
15159
|
success: true,
|
|
15119
15160
|
workflows: [],
|
|
@@ -15142,7 +15183,7 @@ var workflowDiscoveryStep = createStep({
|
|
|
15142
15183
|
}
|
|
15143
15184
|
}
|
|
15144
15185
|
}
|
|
15145
|
-
console.
|
|
15186
|
+
console.info(`Discovered ${workflows.length} existing workflows`);
|
|
15146
15187
|
return {
|
|
15147
15188
|
success: true,
|
|
15148
15189
|
workflows,
|
|
@@ -15167,7 +15208,7 @@ var projectDiscoveryStep = createStep({
|
|
|
15167
15208
|
inputSchema: WorkflowDiscoveryResultSchema,
|
|
15168
15209
|
outputSchema: ProjectDiscoveryResultSchema,
|
|
15169
15210
|
execute: async ({ inputData: _inputData, runtimeContext: _runtimeContext }) => {
|
|
15170
|
-
console.
|
|
15211
|
+
console.info("Starting project discovery...");
|
|
15171
15212
|
try {
|
|
15172
15213
|
const projectPath = process.cwd();
|
|
15173
15214
|
const projectStructure = {
|
|
@@ -15188,7 +15229,7 @@ var projectDiscoveryStep = createStep({
|
|
|
15188
15229
|
console.warn("Failed to read package.json:", error);
|
|
15189
15230
|
}
|
|
15190
15231
|
}
|
|
15191
|
-
console.
|
|
15232
|
+
console.info("Project discovery completed");
|
|
15192
15233
|
return {
|
|
15193
15234
|
success: true,
|
|
15194
15235
|
structure: {
|
|
@@ -15229,7 +15270,7 @@ var workflowResearchStep = createStep({
|
|
|
15229
15270
|
inputSchema: ProjectDiscoveryResultSchema,
|
|
15230
15271
|
outputSchema: WorkflowResearchResultSchema,
|
|
15231
15272
|
execute: async ({ inputData, runtimeContext }) => {
|
|
15232
|
-
console.
|
|
15273
|
+
console.info("Starting workflow research...");
|
|
15233
15274
|
try {
|
|
15234
15275
|
const model = await resolveModel({ runtimeContext });
|
|
15235
15276
|
const researchAgent = new Agent({
|
|
@@ -15261,7 +15302,7 @@ var workflowResearchStep = createStep({
|
|
|
15261
15302
|
error: "Research agent failed to generate valid response"
|
|
15262
15303
|
};
|
|
15263
15304
|
}
|
|
15264
|
-
console.
|
|
15305
|
+
console.info("Research completed successfully");
|
|
15265
15306
|
return {
|
|
15266
15307
|
success: true,
|
|
15267
15308
|
documentation: {
|
|
@@ -15305,12 +15346,12 @@ var taskExecutionStep = createStep({
|
|
|
15305
15346
|
research,
|
|
15306
15347
|
projectPath
|
|
15307
15348
|
} = inputData;
|
|
15308
|
-
console.
|
|
15309
|
-
console.
|
|
15349
|
+
console.info(`Starting task execution for ${action}ing workflow: ${workflowName}`);
|
|
15350
|
+
console.info(`Executing ${tasks.length} tasks using AgentBuilder stream...`);
|
|
15310
15351
|
try {
|
|
15311
15352
|
const model = await resolveModel({ runtimeContext });
|
|
15312
15353
|
const currentProjectPath = projectPath || process.cwd();
|
|
15313
|
-
console.
|
|
15354
|
+
console.info("Pre-populating taskManager with planned tasks...");
|
|
15314
15355
|
const taskManagerContext = {
|
|
15315
15356
|
action: "create",
|
|
15316
15357
|
tasks: tasks.map((task) => ({
|
|
@@ -15323,7 +15364,7 @@ var taskExecutionStep = createStep({
|
|
|
15323
15364
|
}))
|
|
15324
15365
|
};
|
|
15325
15366
|
const taskManagerResult = await AgentBuilderDefaults.manageTaskList(taskManagerContext);
|
|
15326
|
-
console.
|
|
15367
|
+
console.info(`Task manager initialized with ${taskManagerResult.tasks.length} tasks`);
|
|
15327
15368
|
if (!taskManagerResult.success) {
|
|
15328
15369
|
throw new Error(`Failed to initialize task manager: ${taskManagerResult.message}`);
|
|
15329
15370
|
}
|
|
@@ -15376,13 +15417,13 @@ ${additionalInstructions}`;
|
|
|
15376
15417
|
const currentTaskStatus = await AgentBuilderDefaults.manageTaskList({ action: "list" });
|
|
15377
15418
|
const completedTasks = currentTaskStatus.tasks.filter((task) => task.status === "completed");
|
|
15378
15419
|
const pendingTasks = currentTaskStatus.tasks.filter((task) => task.status !== "completed");
|
|
15379
|
-
console.
|
|
15420
|
+
console.info(`
|
|
15380
15421
|
=== EXECUTION ITERATION ${iterationCount} ===`);
|
|
15381
|
-
console.
|
|
15382
|
-
console.
|
|
15422
|
+
console.info(`Completed tasks: ${completedTasks.length}/${expectedTaskIds.length}`);
|
|
15423
|
+
console.info(`Remaining tasks: ${pendingTasks.map((t2) => t2.id).join(", ")}`);
|
|
15383
15424
|
allTasksCompleted = pendingTasks.length === 0;
|
|
15384
15425
|
if (allTasksCompleted) {
|
|
15385
|
-
console.
|
|
15426
|
+
console.info("All tasks completed! Breaking execution loop.");
|
|
15386
15427
|
break;
|
|
15387
15428
|
}
|
|
15388
15429
|
const iterationPrompt = iterationCount === 1 ? executionPrompt : `${workflowBuilderPrompts.executionAgent.iterationPrompt({
|
|
@@ -15406,19 +15447,19 @@ ${workflowBuilderPrompts.validation.instructions}`;
|
|
|
15406
15447
|
finalMessage += chunk.payload.text;
|
|
15407
15448
|
}
|
|
15408
15449
|
if (chunk.type === "step-finish") {
|
|
15409
|
-
console.
|
|
15450
|
+
console.info(finalMessage);
|
|
15410
15451
|
finalMessage = "";
|
|
15411
15452
|
}
|
|
15412
15453
|
if (chunk.type === "tool-result") {
|
|
15413
|
-
console.
|
|
15454
|
+
console.info(JSON.stringify(chunk, null, 2));
|
|
15414
15455
|
}
|
|
15415
15456
|
if (chunk.type === "finish") {
|
|
15416
|
-
console.
|
|
15457
|
+
console.info(chunk);
|
|
15417
15458
|
}
|
|
15418
15459
|
}
|
|
15419
15460
|
await stream.consumeStream();
|
|
15420
15461
|
finalResult = await stream.object;
|
|
15421
|
-
console.
|
|
15462
|
+
console.info(`Iteration ${iterationCount} result:`, { finalResult });
|
|
15422
15463
|
if (!finalResult) {
|
|
15423
15464
|
throw new Error(`No result received from agent execution on iteration ${iterationCount}`);
|
|
15424
15465
|
}
|
|
@@ -15426,17 +15467,17 @@ ${workflowBuilderPrompts.validation.instructions}`;
|
|
|
15426
15467
|
const postCompletedTasks = postIterationTaskStatus.tasks.filter((task) => task.status === "completed");
|
|
15427
15468
|
const postPendingTasks = postIterationTaskStatus.tasks.filter((task) => task.status !== "completed");
|
|
15428
15469
|
allTasksCompleted = postPendingTasks.length === 0;
|
|
15429
|
-
console.
|
|
15470
|
+
console.info(
|
|
15430
15471
|
`After iteration ${iterationCount}: ${postCompletedTasks.length}/${expectedTaskIds.length} tasks completed in taskManager`
|
|
15431
15472
|
);
|
|
15432
15473
|
if (finalResult.status === "needs_clarification" && finalResult.questions && finalResult.questions.length > 0) {
|
|
15433
|
-
console.
|
|
15474
|
+
console.info(
|
|
15434
15475
|
`Agent needs clarification on iteration ${iterationCount}: ${finalResult.questions.length} questions`
|
|
15435
15476
|
);
|
|
15436
15477
|
break;
|
|
15437
15478
|
}
|
|
15438
15479
|
if (finalResult.status === "completed" && !allTasksCompleted) {
|
|
15439
|
-
console.
|
|
15480
|
+
console.info(
|
|
15440
15481
|
`Agent claimed completion but taskManager shows pending tasks: ${postPendingTasks.map((t2) => t2.id).join(", ")}`
|
|
15441
15482
|
);
|
|
15442
15483
|
}
|
|
@@ -15449,8 +15490,8 @@ ${workflowBuilderPrompts.validation.instructions}`;
|
|
|
15449
15490
|
throw new Error("No result received from agent execution");
|
|
15450
15491
|
}
|
|
15451
15492
|
if (finalResult.status === "needs_clarification" && finalResult.questions && finalResult.questions.length > 0) {
|
|
15452
|
-
console.
|
|
15453
|
-
console.
|
|
15493
|
+
console.info(`Agent needs clarification: ${finalResult.questions.length} questions`);
|
|
15494
|
+
console.info("finalResult", JSON.stringify(finalResult, null, 2));
|
|
15454
15495
|
return suspend({
|
|
15455
15496
|
questions: finalResult.questions,
|
|
15456
15497
|
currentProgress: finalResult.progress,
|
|
@@ -15466,7 +15507,7 @@ ${workflowBuilderPrompts.validation.instructions}`;
|
|
|
15466
15507
|
const finalAllTasksCompleted = finalPendingTasks.length === 0;
|
|
15467
15508
|
const success = finalAllTasksCompleted && !finalResult.error;
|
|
15468
15509
|
const message = success ? `Successfully completed workflow ${action} - all ${tasksExpected} tasks completed after ${iterationCount} iteration(s): ${finalResult.message}` : `Workflow execution finished with issues after ${iterationCount} iteration(s): ${finalResult.message}. Completed: ${tasksCompleted}/${tasksExpected} tasks`;
|
|
15469
|
-
console.
|
|
15510
|
+
console.info(message);
|
|
15470
15511
|
const missingTasks = finalPendingTasks.map((task) => task.id);
|
|
15471
15512
|
const validationErrors = [];
|
|
15472
15513
|
if (finalResult.error) {
|
|
@@ -15534,7 +15575,7 @@ var workflowBuilderWorkflow = createWorkflow({
|
|
|
15534
15575
|
userAnswers: void 0
|
|
15535
15576
|
};
|
|
15536
15577
|
}).dountil(planningAndApprovalWorkflow, async ({ inputData }) => {
|
|
15537
|
-
console.
|
|
15578
|
+
console.info(`Sub-workflow check: approved=${inputData.approved}`);
|
|
15538
15579
|
return inputData.approved === true;
|
|
15539
15580
|
}).map(async ({ getStepResult, getInitData }) => {
|
|
15540
15581
|
const initData = getInitData();
|
|
@@ -15667,5 +15708,5 @@ var sendAgentBuilderActionRunEventHandler = createAgentBuilderWorkflowHandler(
|
|
|
15667
15708
|
);
|
|
15668
15709
|
|
|
15669
15710
|
export { agent_builder_exports, cancelAgentBuilderActionRunHandler, createAgentBuilderActionRunHandler, getAgentBuilderActionByIdHandler, getAgentBuilderActionRunByIdHandler, getAgentBuilderActionRunExecutionResultHandler, getAgentBuilderActionRunsHandler, getAgentBuilderActionsHandler, resumeAgentBuilderActionHandler, resumeAsyncAgentBuilderActionHandler, sendAgentBuilderActionRunEventHandler, startAgentBuilderActionRunHandler, startAsyncAgentBuilderActionHandler, streamAgentBuilderActionHandler, streamVNextAgentBuilderActionHandler, watchAgentBuilderActionHandler };
|
|
15670
|
-
//# sourceMappingURL=chunk-
|
|
15671
|
-
//# sourceMappingURL=chunk-
|
|
15711
|
+
//# sourceMappingURL=chunk-X7564COI.js.map
|
|
15712
|
+
//# sourceMappingURL=chunk-X7564COI.js.map
|