mastracode 0.26.0-alpha.5 → 0.26.0

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.
Files changed (117) hide show
  1. package/CHANGELOG.md +133 -0
  2. package/dist/acp/agent.d.ts +4 -4
  3. package/dist/acp/agent.d.ts.map +1 -1
  4. package/dist/acp/event-mapper.d.ts +3 -3
  5. package/dist/acp/event-mapper.d.ts.map +1 -1
  6. package/dist/acp/server.d.ts +2 -2
  7. package/dist/acp/server.d.ts.map +1 -1
  8. package/dist/{acp-7DQDVR3M.js → acp-G5OLW7EV.js} +12 -12
  9. package/dist/acp-G5OLW7EV.js.map +1 -0
  10. package/dist/{acp-NTTZEFVN.cjs → acp-YSYEXVBE.cjs} +15 -15
  11. package/dist/acp-YSYEXVBE.cjs.map +1 -0
  12. package/dist/acp.cjs +2 -2
  13. package/dist/acp.js +1 -1
  14. package/dist/agents/instructions.d.ts.map +1 -1
  15. package/dist/agents/mastracode-gateway.d.ts +8 -1
  16. package/dist/agents/mastracode-gateway.d.ts.map +1 -1
  17. package/dist/agents/memory.d.ts +1 -1
  18. package/dist/agents/model.d.ts +1 -1
  19. package/dist/agents/modes/build.d.ts +2 -2
  20. package/dist/agents/modes/build.d.ts.map +1 -1
  21. package/dist/agents/modes/explore.d.ts +2 -2
  22. package/dist/agents/modes/explore.d.ts.map +1 -1
  23. package/dist/agents/modes/plan.d.ts +2 -2
  24. package/dist/agents/modes/plan.d.ts.map +1 -1
  25. package/dist/agents/prompts/plan.d.ts +5 -4
  26. package/dist/agents/prompts/plan.d.ts.map +1 -1
  27. package/dist/agents/thread-caveman-state.d.ts +2 -2
  28. package/dist/agents/thread-caveman-state.d.ts.map +1 -1
  29. package/dist/agents/tool-availability.d.ts +5 -1
  30. package/dist/agents/tool-availability.d.ts.map +1 -1
  31. package/dist/{chunk-QO4KIOLG.js → chunk-GT3A3LAA.js} +221 -117
  32. package/dist/chunk-GT3A3LAA.js.map +1 -0
  33. package/dist/{chunk-IU477VVQ.js → chunk-IFUIWWGJ.js} +8 -8
  34. package/dist/chunk-IFUIWWGJ.js.map +1 -0
  35. package/dist/{chunk-DVBJN36L.cjs → chunk-KGBCGF6C.cjs} +47 -23
  36. package/dist/chunk-KGBCGF6C.cjs.map +1 -0
  37. package/dist/{chunk-L67CU2OP.js → chunk-LUSQ75XP.js} +233 -136
  38. package/dist/chunk-LUSQ75XP.js.map +1 -0
  39. package/dist/{chunk-F3TKSK3C.js → chunk-NDCWIAKG.js} +43 -21
  40. package/dist/chunk-NDCWIAKG.js.map +1 -0
  41. package/dist/{chunk-UW25EMMX.cjs → chunk-NUKVNLFS.cjs} +1160 -1063
  42. package/dist/chunk-NUKVNLFS.cjs.map +1 -0
  43. package/dist/{chunk-DPRNPXVC.cjs → chunk-VBH3L4LD.cjs} +8 -8
  44. package/dist/chunk-VBH3L4LD.cjs.map +1 -0
  45. package/dist/{chunk-MUZ2ZLWN.cjs → chunk-Z3HFSXTB.cjs} +256 -152
  46. package/dist/chunk-Z3HFSXTB.cjs.map +1 -0
  47. package/dist/cli.cjs +33 -33
  48. package/dist/cli.cjs.map +1 -1
  49. package/dist/cli.js +18 -18
  50. package/dist/cli.js.map +1 -1
  51. package/dist/evals/context-builder.d.ts +5 -5
  52. package/dist/evals/context-builder.d.ts.map +1 -1
  53. package/dist/headless.d.ts +3 -3
  54. package/dist/headless.d.ts.map +1 -1
  55. package/dist/index.cjs +10 -10
  56. package/dist/index.d.ts +36 -34
  57. package/dist/index.d.ts.map +1 -1
  58. package/dist/index.js +1 -1
  59. package/dist/mcp/config.d.ts +6 -2
  60. package/dist/mcp/config.d.ts.map +1 -1
  61. package/dist/processors/plan-rejection-abort.d.ts.map +1 -1
  62. package/dist/tools/request-sandbox-access.d.ts.map +1 -1
  63. package/dist/tools/utils.d.ts +2 -2
  64. package/dist/tui/commands/api-keys.d.ts +15 -0
  65. package/dist/tui/commands/api-keys.d.ts.map +1 -1
  66. package/dist/tui/commands/clone.d.ts +1 -1
  67. package/dist/tui/commands/goal.d.ts +2 -2
  68. package/dist/tui/commands/goal.d.ts.map +1 -1
  69. package/dist/tui/commands/types.d.ts +3 -3
  70. package/dist/tui/commands/types.d.ts.map +1 -1
  71. package/dist/tui/components/assistant-message.d.ts +3 -3
  72. package/dist/tui/components/assistant-message.d.ts.map +1 -1
  73. package/dist/tui/components/help-overlay.d.ts +1 -1
  74. package/dist/tui/components/help-overlay.d.ts.map +1 -1
  75. package/dist/tui/components/login-selector.d.ts +1 -1
  76. package/dist/tui/components/om-progress.d.ts +2 -2
  77. package/dist/tui/components/om-progress.d.ts.map +1 -1
  78. package/dist/tui/components/plan-approval-inline.d.ts.map +1 -1
  79. package/dist/tui/components/task-progress.d.ts +1 -1
  80. package/dist/tui/components/thread-selector.d.ts +4 -4
  81. package/dist/tui/components/thread-selector.d.ts.map +1 -1
  82. package/dist/tui/event-dispatch.d.ts +3 -3
  83. package/dist/tui/event-dispatch.d.ts.map +1 -1
  84. package/dist/tui/handlers/agent-lifecycle.d.ts +1 -1
  85. package/dist/tui/handlers/agent-lifecycle.d.ts.map +1 -1
  86. package/dist/tui/handlers/message.d.ts +4 -4
  87. package/dist/tui/handlers/message.d.ts.map +1 -1
  88. package/dist/tui/handlers/prompts.d.ts +1 -1
  89. package/dist/tui/handlers/prompts.d.ts.map +1 -1
  90. package/dist/tui/handlers/types.d.ts +3 -2
  91. package/dist/tui/handlers/types.d.ts.map +1 -1
  92. package/dist/tui/mastra-tui.d.ts +3 -3
  93. package/dist/tui/mastra-tui.d.ts.map +1 -1
  94. package/dist/tui/render-messages.d.ts +4 -3
  95. package/dist/tui/render-messages.d.ts.map +1 -1
  96. package/dist/tui/setup.d.ts +1 -1
  97. package/dist/tui/setup.d.ts.map +1 -1
  98. package/dist/tui/state.d.ts +24 -10
  99. package/dist/tui/state.d.ts.map +1 -1
  100. package/dist/tui/status-line.d.ts.map +1 -1
  101. package/dist/tui.cjs +19 -19
  102. package/dist/tui.js +2 -2
  103. package/dist/utils/plan-diff.d.ts +25 -0
  104. package/dist/utils/plan-diff.d.ts.map +1 -0
  105. package/dist/utils/plans.d.ts +41 -12
  106. package/dist/utils/plans.d.ts.map +1 -1
  107. package/package.json +16 -16
  108. package/dist/acp-7DQDVR3M.js.map +0 -1
  109. package/dist/acp-NTTZEFVN.cjs.map +0 -1
  110. package/dist/chunk-DPRNPXVC.cjs.map +0 -1
  111. package/dist/chunk-DVBJN36L.cjs.map +0 -1
  112. package/dist/chunk-F3TKSK3C.js.map +0 -1
  113. package/dist/chunk-IU477VVQ.js.map +0 -1
  114. package/dist/chunk-L67CU2OP.js.map +0 -1
  115. package/dist/chunk-MUZ2ZLWN.cjs.map +0 -1
  116. package/dist/chunk-QO4KIOLG.js.map +0 -1
  117. package/dist/chunk-UW25EMMX.cjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,138 @@
1
1
  # mastracode
2
2
 
3
+ ## 0.26.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Added a live tokens/sec counter to the MastraCode terminal and web status lines. ([#18501](https://github.com/mastra-ai/mastra/pull/18501))
8
+
9
+ The counter shows how fast the model is generating, measured over decode time only — the window from the first streamed token of a step to when that step finishes. This excludes time-to-first-token, tool execution, and scheduling gaps, so the number reflects real generation speed instead of reading artificially low. Reasoning tokens are included, and the rate is smoothed with an exponential moving average for a stable readout.
10
+
11
+ The last reading stays visible while idle so you can read it after a turn finishes, and it clears when the next turn begins.
12
+
13
+ - Add a browser UI for MastraCode. ([#18364](https://github.com/mastra-ai/mastra/pull/18364))
14
+
15
+ The web app boots the real MastraCode Harness, registers it on a Mastra
16
+ instance, mounts the Harness HTTP routes (via `@mastra/server`) on a Hono
17
+ server, and serves a React UI built with Vite. The UI drives a session over the
18
+ `@mastra/client-js` harness resource (SSE event stream + JSON commands) and
19
+ reaches feature parity with the terminal for the core interactive workflows:
20
+ chat streaming, tool execution, tool approvals, interactive suspensions
21
+ (`ask_user` / `submit_plan` / `request_access`), mode/model switching, thread
22
+ lifecycle, task tracking, goals, notifications, steer/abort, follow-ups, a
23
+ TUI-parity status line (message/reflection budgets and active-goal indicator),
24
+ and project-scoped workspaces with a server-driven directory picker.
25
+
26
+ A full Settings surface mirrors the terminal's configuration commands: model
27
+ selection, behavior (`yolo`, thinking level, notifications, smart editing,
28
+ per-category tool permissions), observational-memory models and thresholds,
29
+ model packs, API keys, and custom providers. These are backed by
30
+ `/api/web/config/*` routes that read and write the same global `settings.json`
31
+ the terminal uses, so configuration stays in sync across the terminal and the
32
+ browser.
33
+
34
+ The web server shares its storage with the registered Harness, and projects
35
+ resolve the same `resourceId` as the terminal, so the two share durable threads
36
+ and observations for a given project. Thread lists are scoped by project path so
37
+ worktrees that share a `resourceId` don't bleed each other's threads.
38
+
39
+ Internally, harness startup is shared through a single base factory with small
40
+ per-environment helpers, so the terminal app and the web server build the exact
41
+ same harness without duplicating wiring. The published `mastracode` package
42
+ remains terminal-only — the web UI lives in the repository for local
43
+ development and is excluded from the published package.
44
+
45
+ Includes a scenario test suite that drives the production stack
46
+ (`MastraClient` → Hono → `@mastra/server` routes → Harness → AIMock) end to end.
47
+
48
+ ### Patch Changes
49
+
50
+ - Fixed MastraCode queued follow-up E2E tests to wait for stable terminal output. ([#18507](https://github.com/mastra-ai/mastra/pull/18507))
51
+
52
+ - Reworked plan mode to use named plan files. The agent writes its plan to a markdown file under `.mastracode/plans/` and calls `submit_plan` with the `path` to that file, so multiple plans stay on disk for review. The host validates the submitted path is a `.md` file inside `.mastracode/plans/` before reading it, so the tool can't be pointed at arbitrary files. Plan mode can write any `.md` file inside `.mastracode/plans/` (enforced by a tool guard) but nothing else, submitted plan snapshots are persisted for history replay, revision diffs are computed from a real line-ending-normalized LCS diff and only shown when the change is small relative to the plan, "Request Changes" stops the run immediately with no trailing model output, and diffs only compare revisions of the same plan file. ([#18490](https://github.com/mastra-ai/mastra/pull/18490))
53
+
54
+ - Fixed thread auto-resume selecting the wrong thread in git worktrees by scoping startup selection to threads tagged with the current project path. When Mastra Code detects a matching project thread on a different resource after resourceId drift, it now prompts before cloning and resuming that thread under the current resource; accepting the prompt leaves the old thread untouched and loads the clone, while declining starts fresh and leaves the old resource untouched. ([#18333](https://github.com/mastra-ai/mastra/pull/18333))
55
+
56
+ - Switched internal imports to the canonical `@mastra/core/agent-controller` entrypoint, replacing the deprecated `@mastra/core/harness` path and `Harness` types. Updated the web client to call `getAgentController()` and use the new `AgentControllerEvent` type, renamed the `useHarnessSession` hook to `useAgentControllerSession`, and renamed the `handleHarnessEvent` ACP mapper to `handleAgentControllerEvent`. ([#18510](https://github.com/mastra-ai/mastra/pull/18510))
57
+
58
+ - Resolve all Harness models through gateways. The Harness now builds its available-models catalog, model auth status, mode agents, Observational Memory models, and subagents from the gateways you register, instead of the separate `resolveModel`, `customModelCatalogProvider`, and `modelAuthChecker` config hooks. Removed those three options from `HarnessConfig` (and the `ModelAuthChecker` type) — register a gateway via `gateways` instead. ([#18382](https://github.com/mastra-ai/mastra/pull/18382))
59
+
60
+ `listAvailableModels()` and `getCurrentModelAuthStatus()` are now sourced entirely from gateways: model discovery comes from each gateway's `fetchProviders()` (a network call for gateways like models.dev and Netlify), and auth status is resolved through the same gateway chain the model router uses at run time (`resolveAuth()`, falling back to `getApiKey()`). There is no static provider-registry fallback — everything the model picker shows comes from a gateway.
61
+
62
+ The gateway-chain operations shared by `ModelRouterLanguageModel` and the Harness (gateway merging, model→gateway selection, auth resolution, provider/model listing) are now centralized in a new `GatewayManager` class exported from `@mastra/core`. Both consumers delegate to it, eliminating duplicated logic. `defaultGateways` is still re-exported from the same paths for backward compatibility.
63
+
64
+ - Fixed OAuth logins (such as Anthropic and OpenAI sign-in) not being recognized for the selected model. The model status bar no longer shows a false "missing API key" error, and the `/api-keys` command and web settings panel now display a distinct "oauth" status for providers you are signed into instead of treating them as unset. ([#18503](https://github.com/mastra-ai/mastra/pull/18503))
65
+
66
+ - Added support for reading MCP server config from a project root `.mcp.json` (the file Claude Code uses). Projects that already keep their MCP servers there no longer need a duplicate under `.mastracode/`. The root file sits below `.mastracode/mcp.json` in priority, so project-specific config still wins. ([#18494](https://github.com/mastra-ai/mastra/pull/18494))
67
+
68
+ - MastraCode now passes a deterministic session `id` and `ownerId` to the Harness session. The session id is derived from the project resource ID and is stable across restarts for the same project directory. The owner id is derived from the machine hostname and project root path, tying the session to the local machine. ([#18372](https://github.com/mastra-ai/mastra/pull/18372))
69
+
70
+ - Expand `${VAR}`, `${VAR:-default}`, and bare `$VAR` references in MCP server HTTP headers. Header values such as `"x-api-key": "${MY_API_KEY}"` in `mcp.json` are now resolved from the environment when the config is loaded, instead of being sent verbatim. This matches how Claude Code reads `.mcp.json` and lets header-authenticated HTTP servers pull secrets from the environment. ([#18240](https://github.com/mastra-ai/mastra/pull/18240))
71
+
72
+ - Updated plan and explore modes to declare `availableTools` allowlists so tool visibility is gated at LLM-call time instead of workspace construction. Plan mode includes read-only tools plus plan-file editing and delivery tools; explore mode includes only read-only tools. Build mode remains unrestricted. Workspace creation no longer branches on mode for tool visibility — all modes now share the same workspace instance. ([#18463](https://github.com/mastra-ai/mastra/pull/18463))
73
+
74
+ - Improved plan mode UX: "Request changes" stops the agent via processor-based abort and lets you provide revision feedback via chat. Plan resubmissions show a diff of what changed. Plans save to title-derived filenames (e.g. `add-dark-mode.md`) for multi-plan support. Plan filename displayed in TUI header. ([#18323](https://github.com/mastra-ai/mastra/pull/18323))
75
+
76
+ - Add MastraCode browser tool availability scenarios ([#18498](https://github.com/mastra-ai/mastra/pull/18498))
77
+
78
+ - Updated dependencies [[`86623c1`](https://github.com/mastra-ai/mastra/commit/86623c1adf7d22de32cc916dda17f4155184db36), [`023766f`](https://github.com/mastra-ai/mastra/commit/023766f44d59b30a50f3a381e33eddde8ab56c00), [`0200e75`](https://github.com/mastra-ai/mastra/commit/0200e7552d02d4221cd6040bf4eddf189a97a156), [`7c9dd77`](https://github.com/mastra-ai/mastra/commit/7c9dd77bd18cb8dc72797e25f1a0fbdc71a11347), [`42d74d5`](https://github.com/mastra-ai/mastra/commit/42d74d5671f95aa6076576e32a9b7d11f13dd208), [`7f9ae70`](https://github.com/mastra-ai/mastra/commit/7f9ae70826b047e5a66218f9e92f20e54a2d791f), [`b4e97e6`](https://github.com/mastra-ai/mastra/commit/b4e97e676232a3a398ef32d3e78faa0c91c5fa1c), [`a0509c7`](https://github.com/mastra-ai/mastra/commit/a0509c731a08aa3ed626557c5338126362856f57), [`06e0d63`](https://github.com/mastra-ai/mastra/commit/06e0d63d42bc2a202e18bc091f3781f409f5e6fb), [`bf3fe49`](https://github.com/mastra-ai/mastra/commit/bf3fe49f9467dbbdb8f9eaf74e0f7971ffb19559), [`01caf93`](https://github.com/mastra-ai/mastra/commit/01caf93d71ae2c1e65f49735cafb531975187426), [`438a971`](https://github.com/mastra-ai/mastra/commit/438a9715c8b4398e5eaf8914a1f19dc8a85dc1de), [`9990965`](https://github.com/mastra-ai/mastra/commit/999096571635a83b42ef40841fd7028cfa630779), [`24ceaea`](https://github.com/mastra-ai/mastra/commit/24ceaea0bdd8609cabbab764380608ca6621a194), [`77518cc`](https://github.com/mastra-ai/mastra/commit/77518ccb5bb8cc684875081e64213dc85cffdbee), [`fbeda0c`](https://github.com/mastra-ai/mastra/commit/fbeda0c0f35def07e6837936dd3a003b2b7c5172), [`8a68844`](https://github.com/mastra-ai/mastra/commit/8a688443013816105a09f89c6afa34b5ff13e26d), [`bb2a13b`](https://github.com/mastra-ai/mastra/commit/bb2a13bb4b32e6bb807200fe7b18ae8fa4322118), [`24ceaea`](https://github.com/mastra-ai/mastra/commit/24ceaea0bdd8609cabbab764380608ca6621a194), [`a73cd1a`](https://github.com/mastra-ai/mastra/commit/a73cd1a62a5e4ca023dcc39ba150029f4f1f74c1), [`24ceaea`](https://github.com/mastra-ai/mastra/commit/24ceaea0bdd8609cabbab764380608ca6621a194), [`c0ffa3c`](https://github.com/mastra-ai/mastra/commit/c0ffa3c897ccd326de880df734740a7f0681a18f), [`462a769`](https://github.com/mastra-ai/mastra/commit/462a769da61850862ca1be3d74134d33078ee6a7), [`0504bf5`](https://github.com/mastra-ai/mastra/commit/0504bf5e8cffc571a4b343326178de371e6f859b), [`fbeda0c`](https://github.com/mastra-ai/mastra/commit/fbeda0c0f35def07e6837936dd3a003b2b7c5172), [`9e45902`](https://github.com/mastra-ai/mastra/commit/9e4590208e745055cecca202e2db0e5c65e17d3c), [`0b5cc47`](https://github.com/mastra-ai/mastra/commit/0b5cc4726dc18d9a685a27520db39ff1b36bb89a), [`87f38a3`](https://github.com/mastra-ai/mastra/commit/87f38a3de03e24731f2dd6f8ed6a60b6722b85a1), [`d5fa3cd`](https://github.com/mastra-ai/mastra/commit/d5fa3cda1788c3cb93a361a3c6ec47de6ba21e98), [`fe98ef2`](https://github.com/mastra-ai/mastra/commit/fe98ef2e66dbfcbd7d645c88c9ee1e67b458a136), [`e1f272d`](https://github.com/mastra-ai/mastra/commit/e1f272d2bf1963c0ccb060f34b103b0b780bbff0), [`6ccf67b`](https://github.com/mastra-ai/mastra/commit/6ccf67bf075753754927a57bc2e1734ba2c820c5), [`26f54af`](https://github.com/mastra-ai/mastra/commit/26f54afb5dbfbbb02d4d09bec4bd7c5029751767), [`793ea0f`](https://github.com/mastra-ai/mastra/commit/793ea0f52f831178837f21c83af6af93bf4ce638), [`825d8de`](https://github.com/mastra-ai/mastra/commit/825d8def9fa64c2bcc3d8dd6b49e09342c3ac5c7), [`507a5c4`](https://github.com/mastra-ai/mastra/commit/507a5c461bdc3136ad80744c0efbb55ce1f18f97), [`5afe423`](https://github.com/mastra-ai/mastra/commit/5afe423e4badf040f1b0d4525183a856fcb8146e), [`307573b`](https://github.com/mastra-ai/mastra/commit/307573b9ff3149b70c79540dbc86f1319b180f29), [`79b3626`](https://github.com/mastra-ai/mastra/commit/79b3626f8d647307eb07c8da14c9073c2699719d), [`c2c1d7b`](https://github.com/mastra-ai/mastra/commit/c2c1d7bb61d2602955f14ed3952f807c2d6eb576), [`86623c1`](https://github.com/mastra-ai/mastra/commit/86623c1adf7d22de32cc916dda17f4155184db36), [`1505c07`](https://github.com/mastra-ai/mastra/commit/1505c07603f6346bae12aa82f140e8b88ffea9ab), [`f328049`](https://github.com/mastra-ai/mastra/commit/f3280498c324afd2a8d36cd828f5b9f94a2dddc1), [`e545228`](https://github.com/mastra-ai/mastra/commit/e54522856934a5dc030b7b6385771e3548020d59), [`74f447a`](https://github.com/mastra-ai/mastra/commit/74f447a6fae171ac3a6ec2d9e61be171ca46d23c), [`3eb852e`](https://github.com/mastra-ai/mastra/commit/3eb852e5435bc908b800193498103dc724f455b0), [`ffa09e7`](https://github.com/mastra-ai/mastra/commit/ffa09e772a5c92270eabe2090fc42d45bd8ec4b7), [`8c9f1c0`](https://github.com/mastra-ai/mastra/commit/8c9f1c0361d89066f9bcd14a2f69e761b01766c8), [`461a7c5`](https://github.com/mastra-ai/mastra/commit/461a7c501449295287f4f0ee4b0b42344f39fcf8), [`4211472`](https://github.com/mastra-ai/mastra/commit/4211472a5a2bd319c60cd2e42d9109c3eef7ac1c), [`9e45902`](https://github.com/mastra-ai/mastra/commit/9e4590208e745055cecca202e2db0e5c65e17d3c), [`5c0df77`](https://github.com/mastra-ai/mastra/commit/5c0df776c40efa420f8c07a2f3ee66010296618e), [`e940f09`](https://github.com/mastra-ai/mastra/commit/e940f099ef5d18b403e6f2b4937e086a4da857b1)]:
79
+ - @mastra/core@1.47.0
80
+ - @mastra/server@1.47.0
81
+ - @mastra/observability@1.15.2
82
+ - @mastra/memory@1.21.2
83
+ - @mastra/pg@1.14.2
84
+ - @mastra/libsql@1.14.2
85
+ - @mastra/github-signals@0.2.2
86
+ - @mastra/schema-compat@1.3.1
87
+ - @mastra/hono@1.5.2
88
+ - @mastra/mcp@1.12.0
89
+
90
+ ## 0.26.0-alpha.8
91
+
92
+ ### Patch Changes
93
+
94
+ - Reworked plan mode to use named plan files. The agent writes its plan to a markdown file under `.mastracode/plans/` and calls `submit_plan` with the `path` to that file, so multiple plans stay on disk for review. The host validates the submitted path is a `.md` file inside `.mastracode/plans/` before reading it, so the tool can't be pointed at arbitrary files. Plan mode can write any `.md` file inside `.mastracode/plans/` (enforced by a tool guard) but nothing else, submitted plan snapshots are persisted for history replay, revision diffs are computed from a real line-ending-normalized LCS diff and only shown when the change is small relative to the plan, "Request Changes" stops the run immediately with no trailing model output, and diffs only compare revisions of the same plan file. ([#18490](https://github.com/mastra-ai/mastra/pull/18490))
95
+
96
+ - Updated dependencies [[`8a68844`](https://github.com/mastra-ai/mastra/commit/8a688443013816105a09f89c6afa34b5ff13e26d)]:
97
+ - @mastra/core@1.47.0-alpha.7
98
+ - @mastra/server@1.47.0-alpha.7
99
+ - @mastra/hono@1.5.2-alpha.7
100
+
101
+ ## 0.26.0-alpha.7
102
+
103
+ ### Patch Changes
104
+
105
+ - Fixed MastraCode queued follow-up E2E tests to wait for stable terminal output. ([#18507](https://github.com/mastra-ai/mastra/pull/18507))
106
+
107
+ ## 0.26.0-alpha.6
108
+
109
+ ### Minor Changes
110
+
111
+ - Added a live tokens/sec counter to the MastraCode terminal and web status lines. ([#18501](https://github.com/mastra-ai/mastra/pull/18501))
112
+
113
+ The counter shows how fast the model is generating, measured over decode time only — the window from the first streamed token of a step to when that step finishes. This excludes time-to-first-token, tool execution, and scheduling gaps, so the number reflects real generation speed instead of reading artificially low. Reasoning tokens are included, and the rate is smoothed with an exponential moving average for a stable readout.
114
+
115
+ The last reading stays visible while idle so you can read it after a turn finishes, and it clears when the next turn begins.
116
+
117
+ ### Patch Changes
118
+
119
+ - Switched internal imports to the canonical `@mastra/core/agent-controller` entrypoint, replacing the deprecated `@mastra/core/harness` path and `Harness` types. Updated the web client to call `getAgentController()` and use the new `AgentControllerEvent` type, renamed the `useHarnessSession` hook to `useAgentControllerSession`, and renamed the `handleHarnessEvent` ACP mapper to `handleAgentControllerEvent`. ([#18510](https://github.com/mastra-ai/mastra/pull/18510))
120
+
121
+ - Fixed OAuth logins (such as Anthropic and OpenAI sign-in) not being recognized for the selected model. The model status bar no longer shows a false "missing API key" error, and the `/api-keys` command and web settings panel now display a distinct "oauth" status for providers you are signed into instead of treating them as unset. ([#18503](https://github.com/mastra-ai/mastra/pull/18503))
122
+
123
+ - Added support for reading MCP server config from a project root `.mcp.json` (the file Claude Code uses). Projects that already keep their MCP servers there no longer need a duplicate under `.mastracode/`. The root file sits below `.mastracode/mcp.json` in priority, so project-specific config still wins. ([#18494](https://github.com/mastra-ai/mastra/pull/18494))
124
+
125
+ - Add MastraCode browser tool availability scenarios ([#18498](https://github.com/mastra-ai/mastra/pull/18498))
126
+
127
+ - Updated dependencies [[`0200e75`](https://github.com/mastra-ai/mastra/commit/0200e7552d02d4221cd6040bf4eddf189a97a156), [`42d74d5`](https://github.com/mastra-ai/mastra/commit/42d74d5671f95aa6076576e32a9b7d11f13dd208), [`b4e97e6`](https://github.com/mastra-ai/mastra/commit/b4e97e676232a3a398ef32d3e78faa0c91c5fa1c), [`06e0d63`](https://github.com/mastra-ai/mastra/commit/06e0d63d42bc2a202e18bc091f3781f409f5e6fb), [`438a971`](https://github.com/mastra-ai/mastra/commit/438a9715c8b4398e5eaf8914a1f19dc8a85dc1de), [`77518cc`](https://github.com/mastra-ai/mastra/commit/77518ccb5bb8cc684875081e64213dc85cffdbee), [`bb2a13b`](https://github.com/mastra-ai/mastra/commit/bb2a13bb4b32e6bb807200fe7b18ae8fa4322118), [`a73cd1a`](https://github.com/mastra-ai/mastra/commit/a73cd1a62a5e4ca023dcc39ba150029f4f1f74c1), [`0b5cc47`](https://github.com/mastra-ai/mastra/commit/0b5cc4726dc18d9a685a27520db39ff1b36bb89a), [`87f38a3`](https://github.com/mastra-ai/mastra/commit/87f38a3de03e24731f2dd6f8ed6a60b6722b85a1), [`d5fa3cd`](https://github.com/mastra-ai/mastra/commit/d5fa3cda1788c3cb93a361a3c6ec47de6ba21e98), [`fe98ef2`](https://github.com/mastra-ai/mastra/commit/fe98ef2e66dbfcbd7d645c88c9ee1e67b458a136), [`793ea0f`](https://github.com/mastra-ai/mastra/commit/793ea0f52f831178837f21c83af6af93bf4ce638), [`507a5c4`](https://github.com/mastra-ai/mastra/commit/507a5c461bdc3136ad80744c0efbb55ce1f18f97), [`79b3626`](https://github.com/mastra-ai/mastra/commit/79b3626f8d647307eb07c8da14c9073c2699719d)]:
128
+ - @mastra/server@1.47.0-alpha.6
129
+ - @mastra/core@1.47.0-alpha.6
130
+ - @mastra/observability@1.15.2-alpha.1
131
+ - @mastra/memory@1.21.2-alpha.1
132
+ - @mastra/schema-compat@1.3.1-alpha.0
133
+ - @mastra/hono@1.5.2-alpha.6
134
+ - @mastra/mcp@1.12.0
135
+
3
136
  ## 0.26.0-alpha.5
4
137
 
5
138
  ### Minor Changes
@@ -1,12 +1,12 @@
1
1
  import type { Agent, AgentSideConnection, InitializeRequest, InitializeResponse, NewSessionRequest, NewSessionResponse, PromptRequest, PromptResponse, CancelNotification, ContentBlock } from '@agentclientprotocol/sdk';
2
- import type { Harness, HarnessMode, Session } from '@mastra/core/harness';
2
+ import type { AgentController, AgentControllerMode, Session } from '@mastra/core/agent-controller';
3
3
  /**
4
- * ACP Agent implementation that wraps a mastracode Harness.
4
+ * ACP Agent implementation that wraps a mastracode Controller.
5
5
  * Each instance represents one ACP connection from a client.
6
6
  */
7
7
  export declare class MastraCodeAcpAgent implements Agent {
8
8
  private readonly connection;
9
- private readonly harness;
9
+ private readonly controller;
10
10
  private readonly session;
11
11
  private readonly modes;
12
12
  private readonly unsubscribeSessionEvents;
@@ -14,7 +14,7 @@ export declare class MastraCodeAcpAgent implements Agent {
14
14
  private currentPromptState;
15
15
  private promptMutex;
16
16
  private getThreadIdOrThrow;
17
- constructor(connection: AgentSideConnection, harness: Harness, session: Session, modes: HarnessMode[]);
17
+ constructor(connection: AgentSideConnection, controller: AgentController, session: Session, modes: AgentControllerMode[]);
18
18
  dispose(): void;
19
19
  initialize(_request: InitializeRequest): Promise<InitializeResponse>;
20
20
  authenticate(): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"agent.d.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AAE,OAAO,EAChB,KAAK,EAAE,mBAAmB,EAAE;IAa9B,OAAO,IAAI,IAAI;IAIT,UAAU,CAAC,QAAQ,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAcpE,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAI7B,UAAU,CAAC,QAAQ,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IA0CpE,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC;IAsEvD,MAAM,CAAC,aAAa,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAIxD,cAAc,CAAC,MAAM,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAM5E,wBAAwB,CAAC,MAAM,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAK9F;AAED,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,CAY3E;AAED,wBAAgB,aAAa,CAC3B,MAAM,EAAE,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,WAAW,GACrD,UAAU,GAAG,WAAW,GAAG,YAAY,GAAG,mBAAmB,GAAG,SAAS,CAW3E"}
@@ -1,5 +1,5 @@
1
1
  import type { AgentSideConnection } from '@agentclientprotocol/sdk';
2
- import type { HarnessEvent, Session, TokenUsage } from '@mastra/core/harness';
2
+ import type { AgentControllerEvent, Session, TokenUsage } from '@mastra/core/agent-controller';
3
3
  /**
4
4
  * Enable or disable automatic tool approval (set via --dangerous-auto-approve CLI flag).
5
5
  */
@@ -14,9 +14,9 @@ export interface PromptState {
14
14
  resolve: (reason: 'complete' | 'aborted' | 'error' | 'suspended') => void;
15
15
  }
16
16
  /**
17
- * Translate a HarnessEvent into an ACP SessionNotification and send it
17
+ * Translate an AgentControllerEvent into an ACP SessionNotification and send it
18
18
  * via the provided connection. Returns null for events that don't produce
19
19
  * a session update.
20
20
  */
21
- export declare function handleHarnessEvent(event: HarnessEvent, state: PromptState | null, connection: AgentSideConnection, session: Session): void;
21
+ export declare function handleAgentControllerEvent(event: AgentControllerEvent, state: PromptState | null, connection: AgentSideConnection, session: Session): void;
22
22
  //# sourceMappingURL=event-mapper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"event-mapper.d.ts","sourceRoot":"","sources":["../../src/acp/event-mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiD,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACnH,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAI9E;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAEnD;AA4BD;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,UAAU,CAAC;IAClB,OAAO,EAAE,CAAC,MAAM,EAAE,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,WAAW,KAAK,IAAI,CAAC;CAC3E;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,YAAY,EACnB,KAAK,EAAE,WAAW,GAAG,IAAI,EACzB,UAAU,EAAE,mBAAmB,EAC/B,OAAO,EAAE,OAAO,GACf,IAAI,CAyEN"}
1
+ {"version":3,"file":"event-mapper.d.ts","sourceRoot":"","sources":["../../src/acp/event-mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiD,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACnH,OAAO,KAAK,EAAE,oBAAoB,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAI/F;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAEnD;AA4BD;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,UAAU,CAAC;IAClB,OAAO,EAAE,CAAC,MAAM,EAAE,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,WAAW,KAAK,IAAI,CAAC;CAC3E;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,oBAAoB,EAC3B,KAAK,EAAE,WAAW,GAAG,IAAI,EACzB,UAAU,EAAE,mBAAmB,EAC/B,OAAO,EAAE,OAAO,GACf,IAAI,CAyEN"}
@@ -1,7 +1,7 @@
1
- import type { Harness, HarnessMode } from '@mastra/core/harness';
1
+ import type { AgentController, AgentControllerMode } from '@mastra/core/agent-controller';
2
2
  /**
3
3
  * Run the ACP server over stdio.
4
4
  * This sets up the JSON-RPC stream and keeps the process alive until the client disconnects.
5
5
  */
6
- export declare function runAcpServer(harness: Harness, modes: HarnessMode[], cleanup?: () => Promise<void>): Promise<void>;
6
+ export declare function runAcpServer(controller: AgentController, modes: AgentControllerMode[], cleanup?: () => Promise<void>): Promise<void>;
7
7
  //# sourceMappingURL=server.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/acp/server.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAW,MAAM,sBAAsB,CAAC;AAG1E;;;GAGG;AACH,wBAAsB,YAAY,CAChC,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,WAAW,EAAE,EACpB,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAC5B,OAAO,CAAC,IAAI,CAAC,CA+Bf"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/acp/server.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAW,MAAM,+BAA+B,CAAC;AAGnG;;;GAGG;AACH,wBAAsB,YAAY,CAChC,UAAU,EAAE,eAAe,EAC3B,KAAK,EAAE,mBAAmB,EAAE,EAC5B,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAC5B,OAAO,CAAC,IAAI,CAAC,CA+Bf"}
@@ -1,24 +1,24 @@
1
- import { createMastraCode } from './chunk-QO4KIOLG.js';
2
- import { releaseAllThreadLocks } from './chunk-F3TKSK3C.js';
3
- import { setAutoApprove, MastraCodeAcpAgent } from './chunk-IU477VVQ.js';
1
+ import { createMastraCode } from './chunk-GT3A3LAA.js';
2
+ import { releaseAllThreadLocks } from './chunk-NDCWIAKG.js';
3
+ import { setAutoApprove, MastraCodeAcpAgent } from './chunk-IFUIWWGJ.js';
4
4
  import { randomUUID } from 'crypto';
5
5
  import { Readable, Writable } from 'stream';
6
6
  import { ndJsonStream, AgentSideConnection } from '@agentclientprotocol/sdk';
7
7
 
8
- async function runAcpServer(harness, modes, cleanup) {
8
+ async function runAcpServer(controller, modes, cleanup) {
9
9
  const input = Readable.toWeb(process.stdin);
10
10
  const output = Writable.toWeb(process.stdout);
11
11
  const stream = ndJsonStream(output, input);
12
12
  let session;
13
13
  let agent;
14
14
  try {
15
- session = await harness.createSession({
15
+ session = await controller.createSession({
16
16
  id: `acp-${randomUUID()}`,
17
17
  ownerId: `acp-owner-${randomUUID()}`
18
18
  });
19
19
  const activeSession = session;
20
20
  const connection = new AgentSideConnection((conn) => {
21
- agent = new MastraCodeAcpAgent(conn, harness, activeSession, modes);
21
+ agent = new MastraCodeAcpAgent(conn, controller, activeSession, modes);
22
22
  return agent;
23
23
  }, stream);
24
24
  await connection.closed;
@@ -48,7 +48,7 @@ async function acpMain(options) {
48
48
  disableMcp: false,
49
49
  disableHooks: false
50
50
  });
51
- const { harness, mcpManager, signalsPubSub } = result;
51
+ const { controller, mcpManager, signalsPubSub } = result;
52
52
  const modes = [
53
53
  { id: "build", name: "Build" },
54
54
  { id: "plan", name: "Plan" },
@@ -59,8 +59,8 @@ async function acpMain(options) {
59
59
  const closeSignalsPubSub = signalsPubSub?.close;
60
60
  await Promise.allSettled([
61
61
  mcpManager?.disconnect(),
62
- harness?.getMastra()?.stopWorkers(),
63
- harness?.stopHeartbeats(),
62
+ controller?.getMastra()?.stopWorkers(),
63
+ controller?.stopHeartbeats(),
64
64
  closeSignalsPubSub?.()
65
65
  ]);
66
66
  console.log = originalConsoleLog;
@@ -71,7 +71,7 @@ async function acpMain(options) {
71
71
  };
72
72
  process.on("SIGINT", handleSignal);
73
73
  process.on("SIGTERM", handleSignal);
74
- await runAcpServer(harness, modes, cleanup);
74
+ await runAcpServer(controller, modes, cleanup);
75
75
  } catch (error) {
76
76
  process.stderr.write(`[acp] Fatal error: ${error}
77
77
  `);
@@ -81,5 +81,5 @@ async function acpMain(options) {
81
81
  }
82
82
 
83
83
  export { acpMain };
84
- //# sourceMappingURL=acp-7DQDVR3M.js.map
85
- //# sourceMappingURL=acp-7DQDVR3M.js.map
84
+ //# sourceMappingURL=acp-G5OLW7EV.js.map
85
+ //# sourceMappingURL=acp-G5OLW7EV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/acp/server.ts","../src/acp/index.ts"],"names":[],"mappings":";;;;;;;AAUA,eAAsB,YAAA,CACpB,UAAA,EACA,KAAA,EACA,OAAA,EACe;AAEf,EAAA,MAAM,KAAA,GAAQ,QAAA,CAAS,KAAA,CAAM,OAAA,CAAQ,KAAK,CAAA;AAC1C,EAAA,MAAM,MAAA,GAAS,QAAA,CAAS,KAAA,CAAM,OAAA,CAAQ,MAAM,CAAA;AAC5C,EAAA,MAAM,MAAA,GAAS,YAAA,CAAa,MAAA,EAAQ,KAAK,CAAA;AACzC,EAAA,IAAI,OAAA;AACJ,EAAA,IAAI,KAAA;AAGJ,EAAA,IAAI;AACF,IAAA,OAAA,GAAU,MAAM,WAAW,aAAA,CA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":["import { randomUUID } from 'node:crypto';\nimport { Readable, Writable } from 'node:stream';\nimport { AgentSideConnection, ndJsonStream } from '@agentclientprotocol/sdk';\nimport type { AgentController, AgentControllerMode, Session } from '@mastra/core/agent-controller';\nimport { MastraCodeAcpAgent } from './agent.js';\n\n/**\n * Run the ACP server over stdio.\n * This sets up the JSON-RPC stream and keeps the process alive until the client disconnects.\n */\nexport async function runAcpServer(\n controller: AgentController,\n modes: AgentControllerMode[],\n cleanup?: () => Promise<void>,\n): Promise<void> {\n // Create the ndJSON stream from stdin/stdout\n const input = Readable.toWeb(process.stdin) as ReadableStream<Uint8Array>;\n const output = Writable.toWeb(process.stdout) as WritableStream<Uint8Array>;\n const stream = ndJsonStream(output, input);\n let session: Session | undefined;\n let agent: MastraCodeAcpAgent | undefined;\n\n // Handle cleanup on disconnect (success or error)\n try {\n session = await controller.createSession({\n id: `acp-${randomUUID()}`,\n ownerId: `acp-owner-${randomUUID()}`,\n });\n const activeSession = session;\n\n // Create the agent-side connection\n const connection = new AgentSideConnection(conn => {\n agent = new MastraCodeAcpAgent(conn, controller, activeSession, modes);\n return agent;\n }, stream);\n\n await connection.closed;\n } finally {\n agent?.dispose();\n session?.thread.detachFromCurrent();\n await session?.thread.clearAndReleaseLock();\n if (cleanup) {\n await cleanup();\n }\n }\n}\n","import type { AgentControllerMode } from '@mastra/core/agent-controller';\n\nimport { createMastraCode } from '../index.js';\nimport { releaseAllThreadLocks } from '../utils/thread-lock.js';\nimport { setAutoApprove } from './event-mapper.js';\nimport { runAcpServer } from './server.js';\n\n/**\n * Entry point for ACP server mode.\n * Initializes mastracode and runs the ACP protocol over stdio.\n */\nexport async function acpMain(options?: { dangerousAutoApprove?: boolean }): Promise<void> {\n if (options?.dangerousAutoApprove) {\n setAutoApprove(true);\n }\n // Redirect console.log to stderr to avoid polluting the JSON-RPC stream on stdout.\n // eslint-disable-next-line no-console\n const originalConsoleLog = console.log;\n // eslint-disable-next-line no-console\n console.log = (...args: unknown[]) => {\n process.stderr.write(args.map(String).join(' ') + '\\n');\n };\n\n let result: Awaited<ReturnType<typeof createMastraCode>> | undefined;\n\n try {\n result = await createMastraCode({\n unixSocketPubSub: false,\n disableMcp: false,\n disableHooks: false,\n });\n\n const { controller, mcpManager, signalsPubSub } = result;\n\n // Default modes (same as createMastraCode defaults)\n const modes: AgentControllerMode[] = [\n { id: 'build', name: 'Build' },\n { id: 'plan', name: 'Plan' },\n { id: 'fast', name: 'Fast' },\n ];\n\n // Cleanup function (mirrors main.ts asyncCleanup)\n const cleanup = async () => {\n releaseAllThreadLocks();\n const closeSignalsPubSub = (signalsPubSub as { close?: () => Promise<void> | void } | undefined)?.close;\n await Promise.allSettled([\n mcpManager?.disconnect(),\n controller?.getMastra()?.stopWorkers(),\n controller?.stopHeartbeats(),\n closeSignalsPubSub?.(),\n ]);\n\n // Restore console.log\n // eslint-disable-next-line no-console\n console.log = originalConsoleLog;\n };\n\n // Handle signals\n const handleSignal = async () => {\n await cleanup();\n process.exit(0);\n };\n\n process.on('SIGINT', handleSignal);\n process.on('SIGTERM', handleSignal);\n\n await runAcpServer(controller, modes, cleanup);\n } catch (error) {\n process.stderr.write(`[acp] Fatal error: ${error}\\n`);\n // eslint-disable-next-line no-console\n console.log = originalConsoleLog;\n process.exit(1);\n }\n}\n"]}
@@ -1,26 +1,26 @@
1
1
  'use strict';
2
2
 
3
- var chunkMUZ2ZLWN_cjs = require('./chunk-MUZ2ZLWN.cjs');
4
- var chunkDVBJN36L_cjs = require('./chunk-DVBJN36L.cjs');
5
- var chunkDPRNPXVC_cjs = require('./chunk-DPRNPXVC.cjs');
3
+ var chunkZ3HFSXTB_cjs = require('./chunk-Z3HFSXTB.cjs');
4
+ var chunkKGBCGF6C_cjs = require('./chunk-KGBCGF6C.cjs');
5
+ var chunkVBH3L4LD_cjs = require('./chunk-VBH3L4LD.cjs');
6
6
  var crypto = require('crypto');
7
7
  var stream = require('stream');
8
8
  var sdk = require('@agentclientprotocol/sdk');
9
9
 
10
- async function runAcpServer(harness, modes, cleanup) {
10
+ async function runAcpServer(controller, modes, cleanup) {
11
11
  const input = stream.Readable.toWeb(process.stdin);
12
12
  const output = stream.Writable.toWeb(process.stdout);
13
13
  const stream$1 = sdk.ndJsonStream(output, input);
14
14
  let session;
15
15
  let agent;
16
16
  try {
17
- session = await harness.createSession({
17
+ session = await controller.createSession({
18
18
  id: `acp-${crypto.randomUUID()}`,
19
19
  ownerId: `acp-owner-${crypto.randomUUID()}`
20
20
  });
21
21
  const activeSession = session;
22
22
  const connection = new sdk.AgentSideConnection((conn) => {
23
- agent = new chunkDPRNPXVC_cjs.MastraCodeAcpAgent(conn, harness, activeSession, modes);
23
+ agent = new chunkVBH3L4LD_cjs.MastraCodeAcpAgent(conn, controller, activeSession, modes);
24
24
  return agent;
25
25
  }, stream$1);
26
26
  await connection.closed;
@@ -37,7 +37,7 @@ async function runAcpServer(harness, modes, cleanup) {
37
37
  // src/acp/index.ts
38
38
  async function acpMain(options) {
39
39
  if (options?.dangerousAutoApprove) {
40
- chunkDPRNPXVC_cjs.setAutoApprove(true);
40
+ chunkVBH3L4LD_cjs.setAutoApprove(true);
41
41
  }
42
42
  const originalConsoleLog = console.log;
43
43
  console.log = (...args) => {
@@ -45,24 +45,24 @@ async function acpMain(options) {
45
45
  };
46
46
  let result;
47
47
  try {
48
- result = await chunkMUZ2ZLWN_cjs.createMastraCode({
48
+ result = await chunkZ3HFSXTB_cjs.createMastraCode({
49
49
  unixSocketPubSub: false,
50
50
  disableMcp: false,
51
51
  disableHooks: false
52
52
  });
53
- const { harness, mcpManager, signalsPubSub } = result;
53
+ const { controller, mcpManager, signalsPubSub } = result;
54
54
  const modes = [
55
55
  { id: "build", name: "Build" },
56
56
  { id: "plan", name: "Plan" },
57
57
  { id: "fast", name: "Fast" }
58
58
  ];
59
59
  const cleanup = async () => {
60
- chunkDVBJN36L_cjs.releaseAllThreadLocks();
60
+ chunkKGBCGF6C_cjs.releaseAllThreadLocks();
61
61
  const closeSignalsPubSub = signalsPubSub?.close;
62
62
  await Promise.allSettled([
63
63
  mcpManager?.disconnect(),
64
- harness?.getMastra()?.stopWorkers(),
65
- harness?.stopHeartbeats(),
64
+ controller?.getMastra()?.stopWorkers(),
65
+ controller?.stopHeartbeats(),
66
66
  closeSignalsPubSub?.()
67
67
  ]);
68
68
  console.log = originalConsoleLog;
@@ -73,7 +73,7 @@ async function acpMain(options) {
73
73
  };
74
74
  process.on("SIGINT", handleSignal);
75
75
  process.on("SIGTERM", handleSignal);
76
- await runAcpServer(harness, modes, cleanup);
76
+ await runAcpServer(controller, modes, cleanup);
77
77
  } catch (error) {
78
78
  process.stderr.write(`[acp] Fatal error: ${error}
79
79
  `);
@@ -83,5 +83,5 @@ async function acpMain(options) {
83
83
  }
84
84
 
85
85
  exports.acpMain = acpMain;
86
- //# sourceMappingURL=acp-NTTZEFVN.cjs.map
87
- //# sourceMappingURL=acp-NTTZEFVN.cjs.map
86
+ //# sourceMappingURL=acp-YSYEXVBE.cjs.map
87
+ //# sourceMappingURL=acp-YSYEXVBE.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/acp/server.ts","../src/acp/index.ts"],"names":["Readable","Writable","stream","ndJsonStream","randomUUID","AgentSideConnection","MastraCodeAcpAgent","setAutoApprove","createMastraCode","releaseAllThreadLocks"],"mappings":";;;;;;;;;AAUA,eAAsB,YAAA,CACpB,UAAA,EACA,KAAA,EACA,OAAA,EACe;AAEf,EAAA,MAAM,KAAA,GAAQA,eAAA,CAAS,KAAA,CAAM,OAAA,CAAQ,KAAK,CAAA;AAC1C,EAAA,MAAM,MAAA,GAASC,eAAA,CAAS,KAAA,CAAM,OAAA,CAAQ,MAAM,CAAA;AAC5C,EAAA,MAAMC,QAAA,GAASC,gBAAA,CAAa,MAAA,EAAQ,KAAK,CAAA;AACzC,EAAA,IAAI,OAAA;AACJ,EAAA,IAAI,KAAA;AAGJ,EAAA,IAAI;AACF,IAAA,OAAA,GAAU,MAAM,WAAW,aAAA,CAAc;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.cjs","sourcesContent":["import { randomUUID } from 'node:crypto';\nimport { Readable, Writable } from 'node:stream';\nimport { AgentSideConnection, ndJsonStream } from '@agentclientprotocol/sdk';\nimport type { AgentController, AgentControllerMode, Session } from '@mastra/core/agent-controller';\nimport { MastraCodeAcpAgent } from './agent.js';\n\n/**\n * Run the ACP server over stdio.\n * This sets up the JSON-RPC stream and keeps the process alive until the client disconnects.\n */\nexport async function runAcpServer(\n controller: AgentController,\n modes: AgentControllerMode[],\n cleanup?: () => Promise<void>,\n): Promise<void> {\n // Create the ndJSON stream from stdin/stdout\n const input = Readable.toWeb(process.stdin) as ReadableStream<Uint8Array>;\n const output = Writable.toWeb(process.stdout) as WritableStream<Uint8Array>;\n const stream = ndJsonStream(output, input);\n let session: Session | undefined;\n let agent: MastraCodeAcpAgent | undefined;\n\n // Handle cleanup on disconnect (success or error)\n try {\n session = await controller.createSession({\n id: `acp-${randomUUID()}`,\n ownerId: `acp-owner-${randomUUID()}`,\n });\n const activeSession = session;\n\n // Create the agent-side connection\n const connection = new AgentSideConnection(conn => {\n agent = new MastraCodeAcpAgent(conn, controller, activeSession, modes);\n return agent;\n }, stream);\n\n await connection.closed;\n } finally {\n agent?.dispose();\n session?.thread.detachFromCurrent();\n await session?.thread.clearAndReleaseLock();\n if (cleanup) {\n await cleanup();\n }\n }\n}\n","import type { AgentControllerMode } from '@mastra/core/agent-controller';\n\nimport { createMastraCode } from '../index.js';\nimport { releaseAllThreadLocks } from '../utils/thread-lock.js';\nimport { setAutoApprove } from './event-mapper.js';\nimport { runAcpServer } from './server.js';\n\n/**\n * Entry point for ACP server mode.\n * Initializes mastracode and runs the ACP protocol over stdio.\n */\nexport async function acpMain(options?: { dangerousAutoApprove?: boolean }): Promise<void> {\n if (options?.dangerousAutoApprove) {\n setAutoApprove(true);\n }\n // Redirect console.log to stderr to avoid polluting the JSON-RPC stream on stdout.\n // eslint-disable-next-line no-console\n const originalConsoleLog = console.log;\n // eslint-disable-next-line no-console\n console.log = (...args: unknown[]) => {\n process.stderr.write(args.map(String).join(' ') + '\\n');\n };\n\n let result: Awaited<ReturnType<typeof createMastraCode>> | undefined;\n\n try {\n result = await createMastraCode({\n unixSocketPubSub: false,\n disableMcp: false,\n disableHooks: false,\n });\n\n const { controller, mcpManager, signalsPubSub } = result;\n\n // Default modes (same as createMastraCode defaults)\n const modes: AgentControllerMode[] = [\n { id: 'build', name: 'Build' },\n { id: 'plan', name: 'Plan' },\n { id: 'fast', name: 'Fast' },\n ];\n\n // Cleanup function (mirrors main.ts asyncCleanup)\n const cleanup = async () => {\n releaseAllThreadLocks();\n const closeSignalsPubSub = (signalsPubSub as { close?: () => Promise<void> | void } | undefined)?.close;\n await Promise.allSettled([\n mcpManager?.disconnect(),\n controller?.getMastra()?.stopWorkers(),\n controller?.stopHeartbeats(),\n closeSignalsPubSub?.(),\n ]);\n\n // Restore console.log\n // eslint-disable-next-line no-console\n console.log = originalConsoleLog;\n };\n\n // Handle signals\n const handleSignal = async () => {\n await cleanup();\n process.exit(0);\n };\n\n process.on('SIGINT', handleSignal);\n process.on('SIGTERM', handleSignal);\n\n await runAcpServer(controller, modes, cleanup);\n } catch (error) {\n process.stderr.write(`[acp] Fatal error: ${error}\\n`);\n // eslint-disable-next-line no-console\n console.log = originalConsoleLog;\n process.exit(1);\n }\n}\n"]}
package/dist/acp.cjs CHANGED
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var chunkDPRNPXVC_cjs = require('./chunk-DPRNPXVC.cjs');
3
+ var chunkVBH3L4LD_cjs = require('./chunk-VBH3L4LD.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "MastraCodeAcpAgent", {
8
8
  enumerable: true,
9
- get: function () { return chunkDPRNPXVC_cjs.MastraCodeAcpAgent; }
9
+ get: function () { return chunkVBH3L4LD_cjs.MastraCodeAcpAgent; }
10
10
  });
11
11
  //# sourceMappingURL=acp.cjs.map
12
12
  //# sourceMappingURL=acp.cjs.map
package/dist/acp.js CHANGED
@@ -1,3 +1,3 @@
1
- export { MastraCodeAcpAgent } from './chunk-IU477VVQ.js';
1
+ export { MastraCodeAcpAgent } from './chunk-IFUIWWGJ.js';
2
2
  //# sourceMappingURL=acp.js.map
3
3
  //# sourceMappingURL=acp.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../../src/agents/instructions.ts"],"names":[],"mappings":"AAOA,wBAAsB,sBAAsB,CAAC,EAAE,cAAc,EAAE,EAAE;IAAE,cAAc,EAAE;QAAE,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAA;CAAE,mBAuBjH"}
1
+ {"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../../src/agents/instructions.ts"],"names":[],"mappings":"AAOA,wBAAsB,sBAAsB,CAAC,EAAE,cAAc,EAAE,EAAE;IAAE,cAAc,EAAE;QAAE,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAA;CAAE,mBAyBjH"}
@@ -1,4 +1,4 @@
1
- import type { CustomModelCatalogProvider } from '@mastra/core/harness';
1
+ import type { CustomModelCatalogProvider } from '@mastra/core/agent-controller';
2
2
  import { MastraModelGateway } from '@mastra/core/llm';
3
3
  import type { GatewayAuthRequest, GatewayAuthResult, GatewayLanguageModel, MastraModelGatewayInterface, ProviderConfig } from '@mastra/core/llm';
4
4
  import type { ThinkingLevel } from '../providers/openai-codex.js';
@@ -39,6 +39,13 @@ export declare class MastraCodeGateway extends MastraModelGateway {
39
39
  readonly name = "MastraCode Gateway";
40
40
  constructor({ mastraGatewayBaseUrl, mastraGatewayApiKey, routeThroughMastraGateway, thinkingLevel, customProviders, settingsPath, }: MastraCodeGatewayOptions);
41
41
  static getMemoryGatewayApiKey(): string | undefined;
42
+ /**
43
+ * Claim an unprefixed model id (e.g. a bare `anthropic/...`) when this gateway
44
+ * can authenticate it via OAuth or a stored/env credential. This lets the
45
+ * shared gateway router select MastraCode for auth resolution, so the status
46
+ * bar and `/api-keys` reflect OAuth logins instead of only checking env vars.
47
+ */
48
+ handlesModel(modelId: string): boolean;
42
49
  static resolveProviderAuth(request: GatewayAuthRequest, memoryGatewayApiKey?: string): GatewayAuthResult | undefined;
43
50
  static createModelCatalogProvider(gateway: MastraModelGatewayInterface): CustomModelCatalogProvider;
44
51
  createModelCatalogProvider(): CustomModelCatalogProvider;
@@ -1 +1 @@
1
- {"version":3,"file":"mastracode-gateway.d.ts","sourceRoot":"","sources":["../../src/agents/mastracode-gateway.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAwB,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAC7F,OAAO,EAGL,kBAAkB,EAGnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EACV,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,2BAA2B,EAC3B,cAAc,EACf,MAAM,kBAAkB,CAAC;AAkB1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAElE,eAAO,MAAM,aAAa,YAAY,CAAC;AACvC,eAAO,MAAM,qBAAqB,YAAY,CAAC;AAC/C,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAYlD,MAAM,MAAM,wBAAwB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAEzG,MAAM,MAAM,wBAAwB,GAAG;IACrC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,yBAAyB,EAAE,OAAO,CAAC;IACnC,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,eAAe,CAAC,EAAE,wBAAwB,EAAE,CAAC;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAIF,wBAAgB,iBAAiB,SAE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;QACzB,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;QACnB,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACjC,SAAS,CAAC,EAAE,GAAG,CAAC;QAChB,kBAAkB,CAAC,EAAE,GAAG,CAAC;KAC1B,GAAG,oBAAoB;CA0JzB"}
@@ -4,7 +4,7 @@ import type { MastraVector } from '@mastra/core/vector';
4
4
  import { Memory } from '@mastra/memory';
5
5
  /**
6
6
  * Dynamic memory factory function.
7
- * Reads OM thresholds from harness state via requestContext.
7
+ * Reads OM thresholds from controller state via requestContext.
8
8
  * Model functions also read from requestContext (no mutable bridge needed).
9
9
  */
10
10
  export declare function getDynamicMemory(storage: MastraCompositeStore, vector?: MastraVector): ({ requestContext }: {
@@ -23,7 +23,7 @@ export declare function resolveModel(modelId: string, options?: {
23
23
  requestContext?: RequestContext;
24
24
  }): GatewayLanguageModel;
25
25
  /**
26
- * Dynamic model function that reads the current model from harness state.
26
+ * Dynamic model function that reads the current model from controller state.
27
27
  * This allows runtime model switching via the /models picker.
28
28
  */
29
29
  export declare function getDynamicModel({ requestContext }: {
@@ -5,6 +5,6 @@
5
5
  * read and write tools to complete it. It can modify files, run commands,
6
6
  * and perform actual development work within a constrained scope.
7
7
  */
8
- import type { HarnessMode } from '@mastra/core/harness';
9
- export declare const buildMode: HarnessMode;
8
+ import type { AgentControllerMode } from '@mastra/core/agent-controller';
9
+ export declare const buildMode: AgentControllerMode;
10
10
  //# sourceMappingURL=build.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/agents/modes/build.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,eAAO,MAAM,SAAS,EAAE,WAyCvB,CAAC"}
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/agents/modes/build.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEzE,eAAO,MAAM,SAAS,EAAE,mBAyCvB,CAAC"}
@@ -5,6 +5,6 @@
5
5
  * "understand how module Y works") and uses read-only tools to explore
6
6
  * the codebase, then returns a concise summary of its findings.
7
7
  */
8
- import type { HarnessMode } from '@mastra/core/harness';
9
- export declare const fastMode: HarnessMode;
8
+ import type { AgentControllerMode } from '@mastra/core/agent-controller';
9
+ export declare const fastMode: AgentControllerMode;
10
10
  //# sourceMappingURL=explore.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"explore.d.ts","sourceRoot":"","sources":["../../../src/agents/modes/explore.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGxD,eAAO,MAAM,QAAQ,EAAE,WAkCtB,CAAC"}
1
+ {"version":3,"file":"explore.d.ts","sourceRoot":"","sources":["../../../src/agents/modes/explore.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAGzE,eAAO,MAAM,QAAQ,EAAE,mBAkCtB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Plan mode — read-only analysis and planning.
3
3
  */
4
- import type { HarnessMode } from '@mastra/core/harness';
5
- export declare const planMode: HarnessMode;
4
+ import type { AgentControllerMode } from '@mastra/core/agent-controller';
5
+ export declare const planMode: AgentControllerMode;
6
6
  //# sourceMappingURL=plan.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../src/agents/modes/plan.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGxD,eAAO,MAAM,QAAQ,EAAE,WAiCtB,CAAC"}
1
+ {"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../src/agents/modes/plan.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAGzE,eAAO,MAAM,QAAQ,EAAE,mBAmCtB,CAAC"}
@@ -1,5 +1,6 @@
1
- /**
2
- * Plan mode prompt — read-only exploration and planning.
3
- */
4
- export declare const planModePrompt = "\n# Plan Mode \u2014 READ-ONLY (except plan files)\n\nYou are in PLAN mode. Your job is to explore the codebase and design an implementation plan \u2014 NOT to make changes to the project.\n\n## CRITICAL: Read-Only Mode (project files)\n\nThis mode is **read-only for project files**. You must NOT modify the project.\n\n- Do NOT modify, create, or delete project files\n- Do NOT run commands that change state (no git commit, no npm install, no file creation)\n- Do NOT run build commands, tests, or scripts that have side effects\n\nThe ONE exception is your plan file: you CAN write to `.mastracode/plans/` to create and edit your plan.\n\nIf the user asks you to make changes while in Plan mode, explain that you're in read-only mode and they should switch to Build mode (`/mode build`) first.\n\n## Exploration Strategy\n\nBefore writing any plan, build a mental model of the codebase:\n1. Start with the directory structure (`view` on the project root or relevant subdirectory).\n2. Find the relevant entry points and core files using `search_content` and `find_files`.\n3. Read the actual code \u2014 don't assume based on file names alone.\n4. Trace data flow: where does input come from, how is it transformed, where does it go?\n5. Identify existing patterns the codebase uses (naming, structure, error handling, testing).\n\n## Goal-Ready Plans\n\nThe submit_plan approval UI can let the user approve the plan normally or start it as a persistent goal. Write plans so they can be carried out as a goal if the user chooses that option:\n- Make the desired outcome explicit and verifiable.\n- Break work into ordered, actionable steps that can be executed autonomously.\n- Include constraints, risks, blockers, and decision points that may require user input.\n- Include concrete verification criteria so the goal judge can tell when the work is done.\n\n## Your Plan Output\n\nProduce a clear, step-by-step plan with this structure:\n\n### Overview\nOne paragraph: what the change does and why.\n\n### Complexity Estimate\n- **Size**: Small (1-2 files) / Medium (3-5 files) / Large (6+ files)\n- **Risk**: Low (additive, no breaking changes) / Medium (modifies existing behavior) / High (architectural, affects many consumers)\n- **Dependencies**: List any new packages, external services, or migration steps needed.\n\n### Steps\nFor each step:\n1. **File**: path to create or modify\n2. **Change**: what to add/modify/remove, with enough specificity to implement directly\n3. **Why**: brief rationale connecting this step to the overall goal\n\n### Verification\n- What tests to run\n- What to check manually\n- What could go wrong\n\n## Plan File Workflow\n\nYour plan lives as a `.md` file in `.mastracode/plans/` \u2014 the filename is derived from your plan title (e.g. `add-dark-mode-toggle.md`). Use regular workspace tools to manage it:\n\n1. **First submission**: Write your plan to `.mastracode/plans/<slug>.md` using `write_file`, then call `submit_plan` with the plan content.\n2. **Reading**: Use `view` to read the plan file.\n3. **Editing**: Use `string_replace_lsp` for targeted edits to specific sections.\n\n## IMMEDIATE ACTION: Write plan file, then call submit_plan\n\nAs soon as your plan is complete:\n1. Write it to `.mastracode/plans/<slug>.md` (slugified from your title) using `write_file`\n2. Call `submit_plan` with the plan content\n\n**CRITICAL:** Do NOT generate a long text response describing your plan. The plan content belongs in the file and the `submit_plan` tool call, not in your text output.\n\n```javascript\nsubmit_plan({\n title: \"short descriptive title\",\n plan: \"your full plan in markdown\"\n})\n```\n\nThe user will see the plan rendered inline and can:\n- **Approve** \u2014 automatically switches to Build mode for implementation\n- **Start as goal** \u2014 approves the plan and enters goal mode so the agent keeps working toward the plan until judged complete, paused, or waiting for user input\n- **Request changes** \u2014 rejects the plan; the agent stops immediately and the user provides revision feedback in their next chat message\n\n## Revision Workflow\n\nIf the user requests changes, you will be stopped immediately. Wait for their next message \u2014 it will contain their revision feedback. When you receive it:\n1. Use `view` to read your plan file in `.mastracode/plans/`\n2. Use `string_replace_lsp` to make targeted edits based on feedback\n3. Use `view` to re-read the updated file\n4. Call `submit_plan` again with the full updated plan content\n\nThe user will see a diff of what changed between the previous and revised plan. Use `string_replace_lsp` for targeted edits so the diff is clear and meaningful \u2014 do NOT rewrite the entire plan from scratch for small changes.\n\n**IMPORTANT**: If a plan file already exists in `.mastracode/plans/`, you previously submitted a plan that was rejected. Read it to see your previous attempt before revising.\n\nDo NOT start implementing until the plan is approved.\n";
1
+ interface PlanPromptContext {
2
+ state?: Record<string, unknown>;
3
+ }
4
+ export declare function planModePrompt(_ctx: PlanPromptContext): string;
5
+ export {};
5
6
  //# sourceMappingURL=plan.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../src/agents/prompts/plan.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,cAAc,84JAkG1B,CAAC"}
1
+ {"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../src/agents/prompts/plan.ts"],"names":[],"mappings":"AAKA,UAAU,iBAAiB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,CAsG9D"}
@@ -1,6 +1,6 @@
1
- import type { Session } from '@mastra/core/harness';
1
+ import type { Session } from '@mastra/core/agent-controller';
2
2
  /**
3
- * Wires MastraCode-owned OM settings into harness thread events so they persist
3
+ * Wires MastraCode-owned OM settings into controller thread events so they persist
4
4
  * per-thread and new threads inherit the most recent value.
5
5
  *
6
6
  * This is intentionally implemented in mastracode rather than core: these
@@ -1 +1 @@
1
- {"version":3,"file":"thread-caveman-state.d.ts","sourceRoot":"","sources":["../../src/agents/thread-caveman-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAuEnE;;;;;;;GAOG;AACH,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,IAAI,CAS9F;AAED;;;;GAIG;AACH,wBAAsB,oCAAoC,CAAC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAInH"}
1
+ {"version":3,"file":"thread-caveman-state.d.ts","sourceRoot":"","sources":["../../src/agents/thread-caveman-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAyB,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAuEpF;;;;;;;GAOG;AACH,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,IAAI,CAS9F;AAED;;;;GAIG;AACH,wBAAsB,oCAAoC,CAAC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAInH"}