mastracode 0.18.0 → 0.18.1-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # mastracode
2
2
 
3
+ ## 0.18.1-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Fixed a bug where clicking Approve on a plan from `/plan` mode would show the system reminder twice and sometimes hang instead of starting build execution. Approving now reliably triggers the build agent with a single reminder. ([#16521](https://github.com/mastra-ai/mastra/pull/16521))
8
+
9
+ - Updated dependencies [[`3e63fca`](https://github.com/mastra-ai/mastra/commit/3e63fca7aa41269b2a9518effdd09b8ab8f1ff04), [`bc386e0`](https://github.com/mastra-ai/mastra/commit/bc386e08249dd30f3e66cf59de0c151a8dc26afb)]:
10
+ - @mastra/core@1.33.1-alpha.1
11
+
12
+ ## 0.18.1-alpha.0
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies [[`6ba46dc`](https://github.com/mastra-ai/mastra/commit/6ba46dc1ac04af635d0f59377d7384ca6af44cd1)]:
17
+ - @mastra/core@1.33.1-alpha.0
18
+
3
19
  ## 0.18.0
4
20
 
5
21
  ### Minor Changes
@@ -1025,7 +1025,7 @@ function getInstallCommand(pm, version) {
1025
1025
  }
1026
1026
  function getCurrentVersion() {
1027
1027
  {
1028
- return "0.18.0";
1028
+ return "0.18.1-alpha.1";
1029
1029
  }
1030
1030
  }
1031
1031
  async function fetchLatestVersion() {
@@ -2055,12 +2055,6 @@ function createGoalReminderSignal(goal) {
2055
2055
  }
2056
2056
  };
2057
2057
  }
2058
- function createGoalReminderXml(message) {
2059
- return `<system-reminder type="goal">${escapeXml(message)}</system-reminder>`;
2060
- }
2061
- function escapeXml(value) {
2062
- return value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;");
2063
- }
2064
2058
 
2065
2059
  // src/tui/components/help-overlay.ts
2066
2060
  function getCommands(modes) {
@@ -12943,26 +12937,21 @@ async function handlePlanApproval(ctx, planId, title, plan) {
12943
12937
  onApprove: async () => {
12944
12938
  state.activeInlinePlanApproval = void 0;
12945
12939
  await approvePlan(ctx, planId, title, plan);
12946
- setTimeout(() => {
12947
- const reminderText = "<system-reminder>The user has approved the plan, begin executing.</system-reminder>";
12948
- ctx.addUserMessage({
12949
- id: `system-${Date.now()}`,
12950
- role: "user",
12951
- content: [{ type: "text", text: reminderText }],
12952
- createdAt: /* @__PURE__ */ new Date()
12953
- });
12954
- ctx.fireMessage(reminderText);
12955
- }, 50);
12940
+ try {
12941
+ await state.harness.sendSignal({
12942
+ type: "system-reminder",
12943
+ contents: "The user has approved the plan, begin executing."
12944
+ }).accepted;
12945
+ } catch (err) {
12946
+ ctx.showError(`Failed to start build agent: ${err instanceof Error ? err.message : String(err)}`);
12947
+ }
12956
12948
  resolve3();
12957
12949
  },
12958
12950
  onGoal: async () => {
12959
12951
  state.activeInlinePlanApproval = void 0;
12960
12952
  await approvePlan(ctx, planId, title, plan);
12961
12953
  const objective = formatPlanGoalObjective(title, plan);
12962
- await ctx.startGoal(objective, "Goal cancelled.", { trigger: "none" });
12963
- setTimeout(() => {
12964
- ctx.fireMessage(createGoalReminderXml(objective));
12965
- }, 50);
12954
+ await ctx.startGoal(objective, "Goal cancelled.");
12966
12955
  resolve3();
12967
12956
  },
12968
12957
  onReject: async (feedback) => {
@@ -15506,5 +15495,5 @@ exports.createTUIState = createTUIState;
15506
15495
  exports.detectTerminalTheme = detectTerminalTheme;
15507
15496
  exports.formatOMStatus = formatOMStatus;
15508
15497
  exports.getCurrentVersion = getCurrentVersion;
15509
- //# sourceMappingURL=chunk-5VY4WXIR.cjs.map
15510
- //# sourceMappingURL=chunk-5VY4WXIR.cjs.map
15498
+ //# sourceMappingURL=chunk-RNJ3EJCF.cjs.map
15499
+ //# sourceMappingURL=chunk-RNJ3EJCF.cjs.map