mastracode 0.38.1-alpha.2 → 0.38.1-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +2 -2
- package/dist/cli.js +2 -2
- package/dist/tui/handlers/prompts.d.ts.map +1 -1
- package/dist/{tui-DpWB9pec.cjs → tui-B1buaSP9.cjs} +10 -5
- package/dist/{tui-DpWB9pec.cjs.map → tui-B1buaSP9.cjs.map} +1 -1
- package/dist/{tui-DrUt7rlK.js → tui-BiBYLjQk.js} +10 -5
- package/dist/{tui-DrUt7rlK.js.map → tui-BiBYLjQk.js.map} +1 -1
- package/dist/tui.cjs +1 -1
- package/dist/tui.js +1 -1
- package/package.json +12 -12
package/dist/cli.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const require_tui = require("./tui-
|
|
2
|
+
const require_tui = require("./tui-B1buaSP9.cjs");
|
|
3
3
|
let _mastra_code_sdk = require("@mastra/code-sdk");
|
|
4
4
|
let fs = require("fs");
|
|
5
5
|
fs = require_tui.__toESM(fs, 1);
|
|
@@ -41,7 +41,7 @@ function createShutdownCoordinator(cleanup, exit, timeoutMs = 5e3) {
|
|
|
41
41
|
//#endregion
|
|
42
42
|
//#region src/version.ts
|
|
43
43
|
function getCurrentVersion() {
|
|
44
|
-
return "0.38.1-alpha.
|
|
44
|
+
return "0.38.1-alpha.4";
|
|
45
45
|
}
|
|
46
46
|
//#endregion
|
|
47
47
|
//#region src/main.ts
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { d as detectTerminalTheme, f as applyThemeMode, t as MastraTUI, v as restoreTerminalForeground } from "./tui-
|
|
2
|
+
import { d as detectTerminalTheme, f as applyThemeMode, t as MastraTUI, v as restoreTerminalForeground } from "./tui-BiBYLjQk.js";
|
|
3
3
|
import { createMastraCode } from "@mastra/code-sdk";
|
|
4
4
|
import fs from "fs";
|
|
5
5
|
import { createMastraCodeAnalytics } from "@mastra/code-sdk/analytics";
|
|
@@ -40,7 +40,7 @@ function createShutdownCoordinator(cleanup, exit, timeoutMs = 5e3) {
|
|
|
40
40
|
//#endregion
|
|
41
41
|
//#region src/version.ts
|
|
42
42
|
function getCurrentVersion() {
|
|
43
|
-
return "0.38.1-alpha.
|
|
43
|
+
return "0.38.1-alpha.4";
|
|
44
44
|
}
|
|
45
45
|
//#endregion
|
|
46
46
|
//#region src/main.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../../src/tui/handlers/prompts.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAQ/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAatD;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,mBAAmB,EACxB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,EACxD,aAAa,CAAC,EAAE,oBAAoB,GACnC,OAAO,CAAC,IAAI,CAAC,CA4Kf;AAED;;;;;;GAMG;AACH,wBAAsB,0BAA0B,CAC9C,GAAG,EAAE,mBAAmB,EACxB,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CAuDf;
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../../src/tui/handlers/prompts.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAQ/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAatD;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,mBAAmB,EACxB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,EACxD,aAAa,CAAC,EAAE,oBAAoB,GACnC,OAAO,CAAC,IAAI,CAAC,CA4Kf;AAED;;;;;;GAMG;AACH,wBAAsB,0BAA0B,CAC9C,GAAG,EAAE,mBAAmB,EACxB,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CAuDf;AA2DD,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,mBAAmB,EACxB,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,IAAI,CAAC,CAmKf"}
|
|
@@ -19584,7 +19584,7 @@ async function handleSandboxAccessRequest(ctx, toolCallId, requestedPath, reason
|
|
|
19584
19584
|
* "Request changes" rejects the tool call and aborts the agent so the user can
|
|
19585
19585
|
* provide revision feedback via a normal chat message.
|
|
19586
19586
|
*/
|
|
19587
|
-
async function
|
|
19587
|
+
async function prepareApprovedPlan(ctx, title, plan, planPath) {
|
|
19588
19588
|
const { state } = ctx;
|
|
19589
19589
|
await state.session.state.set({ activePlan: {
|
|
19590
19590
|
title,
|
|
@@ -19598,7 +19598,9 @@ async function approvePlan(ctx, toolCallId, title, plan, planPath, submittedPath
|
|
|
19598
19598
|
}).catch(() => {});
|
|
19599
19599
|
state.previousPlanSnapshot = void 0;
|
|
19600
19600
|
state.lastSubmitPlanComponent = void 0;
|
|
19601
|
-
|
|
19601
|
+
}
|
|
19602
|
+
function resumeApprovedPlan(ctx, toolCallId, title, plan, submittedPath) {
|
|
19603
|
+
return ctx.state.session.respondToToolSuspension({
|
|
19602
19604
|
toolCallId,
|
|
19603
19605
|
resumeData: {
|
|
19604
19606
|
action: "approved",
|
|
@@ -19646,13 +19648,16 @@ async function handlePlanApproval(ctx, toolCallId, submittedPath) {
|
|
|
19646
19648
|
onApprove: async () => {
|
|
19647
19649
|
releaseApprovalFocus();
|
|
19648
19650
|
firePermissionResult("approved");
|
|
19649
|
-
await
|
|
19651
|
+
await prepareApprovedPlan(ctx, resolvedTitle, plan, planPath);
|
|
19652
|
+
const resumed = resumeApprovedPlan(ctx, toolCallId, resolvedTitle, plan, snapshotKey);
|
|
19650
19653
|
resolve();
|
|
19654
|
+
await resumed;
|
|
19651
19655
|
},
|
|
19652
19656
|
onGoal: async () => {
|
|
19653
19657
|
releaseApprovalFocus();
|
|
19654
19658
|
firePermissionResult("approved");
|
|
19655
|
-
await
|
|
19659
|
+
await prepareApprovedPlan(ctx, resolvedTitle, plan, planPath);
|
|
19660
|
+
await resumeApprovedPlan(ctx, toolCallId, resolvedTitle, plan, snapshotKey);
|
|
19656
19661
|
const objective = formatPlanGoalObjective(resolvedTitle, plan);
|
|
19657
19662
|
await ctx.startGoal(objective, "Goal cancelled.");
|
|
19658
19663
|
const goal = state.goalManager.getGoal();
|
|
@@ -25172,4 +25177,4 @@ Object.defineProperty(exports, "theme", {
|
|
|
25172
25177
|
}
|
|
25173
25178
|
});
|
|
25174
25179
|
|
|
25175
|
-
//# sourceMappingURL=tui-
|
|
25180
|
+
//# sourceMappingURL=tui-B1buaSP9.cjs.map
|