mastracode 0.1.0 → 0.2.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.
- package/CHANGELOG.md +144 -0
- package/README.md +11 -24
- package/dist/agents/model.d.ts.map +1 -1
- package/dist/agents/prompts/agent-instructions.d.ts +2 -2
- package/dist/agents/prompts/base.d.ts.map +1 -1
- package/dist/agents/prompts/build.d.ts +1 -1
- package/dist/agents/subagents/audit-tests.d.ts +10 -0
- package/dist/agents/subagents/audit-tests.d.ts.map +1 -0
- package/dist/agents/subagents/index.d.ts.map +1 -1
- package/dist/agents/tools.d.ts +2 -2
- package/dist/agents/tools.d.ts.map +1 -1
- package/dist/{chunk-FKCM2XJN.js → chunk-7V6U7OKQ.js} +103 -123
- package/dist/chunk-7V6U7OKQ.js.map +1 -0
- package/dist/{chunk-4URZA2RS.cjs → chunk-BQ4ZKTYN.cjs} +1908 -1609
- package/dist/chunk-BQ4ZKTYN.cjs.map +1 -0
- package/dist/{chunk-FR7IVEHR.js → chunk-BYMDWH2E.js} +158 -241
- package/dist/chunk-BYMDWH2E.js.map +1 -0
- package/dist/{chunk-FFJQITRW.js → chunk-FYTZFUHD.js} +1607 -1309
- package/dist/chunk-FYTZFUHD.js.map +1 -0
- package/dist/{chunk-QT3Z5WU7.cjs → chunk-LVGWM7ZS.cjs} +181 -262
- package/dist/chunk-LVGWM7ZS.cjs.map +1 -0
- package/dist/{chunk-RAZEF2K6.cjs → chunk-MT3YCFCC.cjs} +4 -4
- package/dist/{chunk-RAZEF2K6.cjs.map → chunk-MT3YCFCC.cjs.map} +1 -1
- package/dist/{chunk-INONHGY2.cjs → chunk-QDLLGD43.cjs} +144 -164
- package/dist/chunk-QDLLGD43.cjs.map +1 -0
- package/dist/{chunk-WQ5P4QLV.js → chunk-U5A7TFNT.js} +4 -4
- package/dist/{chunk-WQ5P4QLV.js.map → chunk-U5A7TFNT.js.map} +1 -1
- package/dist/cli.cjs +9 -8
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +4 -3
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/index.d.ts +2 -1
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/manager.d.ts +16 -39
- package/dist/mcp/manager.d.ts.map +1 -1
- package/dist/permissions-2HIUSRQN.cjs +40 -0
- package/dist/{permissions-DQKS6UWB.cjs.map → permissions-2HIUSRQN.cjs.map} +1 -1
- package/dist/permissions-CVXKYIWR.js +3 -0
- package/dist/{permissions-5LKXYCOP.js.map → permissions-CVXKYIWR.js.map} +1 -1
- package/dist/permissions.d.ts +1 -1
- package/dist/schema.d.ts +1 -1
- package/dist/tools/file-editor.d.ts.map +1 -1
- package/dist/tools/file-view.d.ts +1 -1
- package/dist/tools/file-view.d.ts.map +1 -1
- package/dist/tools/index.d.ts +0 -3
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/subagent.d.ts.map +1 -1
- package/dist/tools/web-search.d.ts +2 -19
- package/dist/tools/web-search.d.ts.map +1 -1
- package/dist/tui/components/custom-editor.d.ts.map +1 -1
- package/dist/tui/components/task-progress.d.ts +23 -0
- package/dist/tui/components/task-progress.d.ts.map +1 -0
- package/dist/tui/components/tool-execution-enhanced.d.ts +7 -0
- package/dist/tui/components/tool-execution-enhanced.d.ts.map +1 -1
- package/dist/tui/index.d.ts +2 -0
- package/dist/tui/index.d.ts.map +1 -1
- package/dist/tui/mastra-tui.d.ts +27 -91
- package/dist/tui/mastra-tui.d.ts.map +1 -1
- package/dist/tui/state.d.ts +157 -0
- package/dist/tui/state.d.ts.map +1 -0
- package/dist/tui.cjs +20 -16
- package/dist/tui.js +2 -2
- package/package.json +12 -11
- package/dist/chunk-4URZA2RS.cjs.map +0 -1
- package/dist/chunk-FFJQITRW.js.map +0 -1
- package/dist/chunk-FKCM2XJN.js.map +0 -1
- package/dist/chunk-FR7IVEHR.js.map +0 -1
- package/dist/chunk-INONHGY2.cjs.map +0 -1
- package/dist/chunk-QT3Z5WU7.cjs.map +0 -1
- package/dist/permissions-5LKXYCOP.js +0 -3
- package/dist/permissions-DQKS6UWB.cjs +0 -40
- package/dist/tools/todo-check.d.ts +0 -5
- package/dist/tools/todo-check.d.ts.map +0 -1
- package/dist/tools/todo.d.ts +0 -23
- package/dist/tools/todo.d.ts.map +0 -1
- package/dist/tui/components/todo-progress.d.ts +0 -27
- package/dist/tui/components/todo-progress.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,149 @@
|
|
|
1
1
|
# mastracode
|
|
2
2
|
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Added streaming tool argument previews across all tool renderers. Tool names, file paths, and commands now appear immediately as the model generates them, rather than waiting for the complete tool call. ([#13328](https://github.com/mastra-ai/mastra/pull/13328))
|
|
8
|
+
- **Generic tools** show live key/value argument previews as args stream in
|
|
9
|
+
- **Edit tool** renders a bordered diff preview as soon as `old_str` and `new_str` are available, even before the tool result arrives
|
|
10
|
+
- **Write tool** streams syntax-highlighted file content in a bordered box while args arrive
|
|
11
|
+
- **Find files** shows the glob pattern in the pending header
|
|
12
|
+
- **Task write** streams items directly into the pinned task list component in real-time
|
|
13
|
+
|
|
14
|
+
All tools use partial JSON parsing to progressively display argument information. This is enabled automatically for all Harness-based agents — no configuration required.
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Improved subagent usage guidance: subagents are now only recommended when spawning multiple in parallel, and the main agent must verify all subagent output before proceeding. ([#13339](https://github.com/mastra-ai/mastra/pull/13339))
|
|
19
|
+
|
|
20
|
+
- Updated TUI to work with the new Harness object-parameter API, ensuring all commands, approvals, and thread flows continue to function correctly. ([#13353](https://github.com/mastra-ai/mastra/pull/13353))
|
|
21
|
+
|
|
22
|
+
- Added audit-tests subagent that reviews test quality in a branch. The parent agent passes a description of the branch work along with changed files to this read-only subagent, which explores existing test conventions then audits for behavioral coverage, intent-vs-test alignment, LLM-generated test slop, redundant assertions, file organization, and missing edge cases. ([#13331](https://github.com/mastra-ai/mastra/pull/13331))
|
|
23
|
+
|
|
24
|
+
- Fixed the `/mcp` slash command always showing "MCP system not initialized" even when MCP servers were configured and working. Server status and `/mcp reload` now work as expected. ([#13311](https://github.com/mastra-ai/mastra/pull/13311))
|
|
25
|
+
|
|
26
|
+
- Improved Observational Memory activation timing by halving the buffer interval when approaching the activation threshold, producing finer-grained chunks for more precise context management. ([#13357](https://github.com/mastra-ai/mastra/pull/13357))
|
|
27
|
+
|
|
28
|
+
- Fixed stale OAuth credentials when resolving the OpenAI Codex model. Auth storage is now reloaded before each model resolution, preventing authentication failures after token refresh. ([#13307](https://github.com/mastra-ai/mastra/pull/13307))
|
|
29
|
+
|
|
30
|
+
- Improved TUI composability for external consumers by exposing a structured `TUIState` interface and `createTUIState` factory. ([#13350](https://github.com/mastra-ai/mastra/pull/13350))
|
|
31
|
+
|
|
32
|
+
- Added AGENTS.md to the instruction file loader so projects created by create-mastra are automatically picked up. Removed support for the deprecated AGENT.md (singular) convention. ([#13346](https://github.com/mastra-ai/mastra/pull/13346))
|
|
33
|
+
|
|
34
|
+
- Fixed an issue where memory activation could shrink the message window too aggressively due to a token counting inaccuracy, resulting in very small context windows (~300 tokens). Temporarily raised the buffer activation threshold to prevent this. ([#13349](https://github.com/mastra-ai/mastra/pull/13349))
|
|
35
|
+
|
|
36
|
+
- Fixed assistant message text disappearing when todo_write tool calls were made during streaming ([#13335](https://github.com/mastra-ai/mastra/pull/13335))
|
|
37
|
+
|
|
38
|
+
- Fixed the view tool to gracefully handle view_range when viewing directories. Previously, passing view_range with a directory path would throw an error, and passing undefined values would fail schema validation. Now, view_range slices the directory listing to show a subset of entries, enabling pagination through large directories. ([#13355](https://github.com/mastra-ai/mastra/pull/13355))
|
|
39
|
+
|
|
40
|
+
- Updated README with current installation instructions for npm, pnpm, and Homebrew. ([#13294](https://github.com/mastra-ai/mastra/pull/13294))
|
|
41
|
+
|
|
42
|
+
- Simplified the MCP management API by replacing the `MCPManager` class with a `createMcpManager()` factory function. All existing behavior (TUI `/mcp` command, tool collection, config merging) is preserved. ([#13347](https://github.com/mastra-ai/mastra/pull/13347))
|
|
43
|
+
|
|
44
|
+
- **@mastra/core:** Added optional `threadLock` callbacks to `HarnessConfig` for preventing concurrent thread access across processes. The Harness calls `acquire`/`release` during `selectOrCreateThread`, `createThread`, and `switchThread` when configured. Locking is opt-in — when `threadLock` is not provided, behavior is unchanged. ([#13334](https://github.com/mastra-ai/mastra/pull/13334))
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
const harness = new Harness({
|
|
48
|
+
id: 'my-harness',
|
|
49
|
+
storage: myStore,
|
|
50
|
+
modes: [{ id: 'default', agent: myAgent }],
|
|
51
|
+
threadLock: {
|
|
52
|
+
acquire: threadId => acquireThreadLock(threadId),
|
|
53
|
+
release: threadId => releaseThreadLock(threadId),
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**mastracode:** Wires the existing filesystem-based thread lock (`thread-lock.ts`) into the new `threadLock` config, restoring the concurrent access protection that was lost during the monorepo migration.
|
|
59
|
+
|
|
60
|
+
- Migrated from todo_write/todo_check tools to the new built-in task_write/task_check tools from @mastra/core/harness. Renamed all todo terminology to task across prompts, TUI components, and agent configurations. ([#13344](https://github.com/mastra-ai/mastra/pull/13344))
|
|
61
|
+
|
|
62
|
+
- Fixed Observational Memory status not updating during conversations. The harness was missing streaming handlers for OM data chunks (status, observation start/end, buffering, activation), so the TUI never received real-time OM progress updates. Also added switchObserverModel and switchReflectorModel methods so changing OM models properly emits events to subscribers. ([#13330](https://github.com/mastra-ai/mastra/pull/13330))
|
|
63
|
+
|
|
64
|
+
- Fixed Ctrl+F follow-up queueing to resolve autocomplete suggestions before reading editor text, so partially typed slash commands (e.g. /rev) are expanded to their full form (e.g. /review). Slash commands queued via Ctrl+F are now properly processed through the slash command handler after the agent finishes, instead of being sent as raw text to the LLM. ([#13345](https://github.com/mastra-ai/mastra/pull/13345))
|
|
65
|
+
|
|
66
|
+
- Reduced tool result token limits to prevent oversized responses. Lowered file view and grep token limits from 3,000 to 2,000 tokens. Added 2,000 token truncation to web search and web extract tools, which previously returned unbounded results. ([#13348](https://github.com/mastra-ai/mastra/pull/13348))
|
|
67
|
+
|
|
68
|
+
- Fixed thread resuming in git worktrees. Previously, starting mastracode in a new worktree would resume a thread from another worktree of the same repo. Threads are now auto-tagged with the project path and filtered on resume so each worktree gets its own thread scope. ([#13343](https://github.com/mastra-ai/mastra/pull/13343))
|
|
69
|
+
|
|
70
|
+
- Updated dependencies [[`5c70aeb`](https://github.com/mastra-ai/mastra/commit/5c70aeb391434c34f9e43caa2e8572d412bcb2b0), [`0d9efb4`](https://github.com/mastra-ai/mastra/commit/0d9efb47992c34aa90581c18b9f51f774f6252a5), [`5caa13d`](https://github.com/mastra-ai/mastra/commit/5caa13d1b2a496e2565ab124a11de9a51ad3e3b9), [`270dd16`](https://github.com/mastra-ai/mastra/commit/270dd168a86698a699d8a9de8dbce1a40f72d862), [`940163f`](https://github.com/mastra-ai/mastra/commit/940163fc492401d7562301e6f106ccef4fefe06f), [`5c70aeb`](https://github.com/mastra-ai/mastra/commit/5c70aeb391434c34f9e43caa2e8572d412bcb2b0), [`b260123`](https://github.com/mastra-ai/mastra/commit/b2601234bd093d358c92081a58f9b0befdae52b3), [`47892c8`](https://github.com/mastra-ai/mastra/commit/47892c85708eac348209f99f10f9a5f5267e11c0), [`45bb78b`](https://github.com/mastra-ai/mastra/commit/45bb78b70bd9db29678fe49476cd9f4ed01bfd0b), [`5c70aeb`](https://github.com/mastra-ai/mastra/commit/5c70aeb391434c34f9e43caa2e8572d412bcb2b0), [`70eef84`](https://github.com/mastra-ai/mastra/commit/70eef84b8f44493598fdafa2980a0e7283415eda), [`d84e52d`](https://github.com/mastra-ai/mastra/commit/d84e52d0f6511283ddd21ed5fe7f945449d0f799), [`24b80af`](https://github.com/mastra-ai/mastra/commit/24b80af87da93bb84d389340181e17b7477fa9ca), [`608e156`](https://github.com/mastra-ai/mastra/commit/608e156def954c9604c5e3f6d9dfce3bcc7aeab0), [`78d1c80`](https://github.com/mastra-ai/mastra/commit/78d1c808ad90201897a300af551bcc1d34458a20), [`2b2e157`](https://github.com/mastra-ai/mastra/commit/2b2e157a092cd597d9d3f0000d62b8bb4a7348ed), [`78d1c80`](https://github.com/mastra-ai/mastra/commit/78d1c808ad90201897a300af551bcc1d34458a20), [`59d30b5`](https://github.com/mastra-ai/mastra/commit/59d30b5d0cb44ea7a1c440e7460dfb57eac9a9b5), [`453693b`](https://github.com/mastra-ai/mastra/commit/453693bf9e265ddccecef901d50da6caaea0fbc6), [`78d1c80`](https://github.com/mastra-ai/mastra/commit/78d1c808ad90201897a300af551bcc1d34458a20), [`c204b63`](https://github.com/mastra-ai/mastra/commit/c204b632d19e66acb6d6e19b11c4540dd6ad5380), [`742a417`](https://github.com/mastra-ai/mastra/commit/742a417896088220a3b5560c354c45c5ca6d88b9)]:
|
|
71
|
+
- @mastra/libsql@1.6.0
|
|
72
|
+
- @mastra/core@1.6.0
|
|
73
|
+
- @mastra/memory@1.5.0
|
|
74
|
+
|
|
75
|
+
## 0.2.0-alpha.0
|
|
76
|
+
|
|
77
|
+
### Minor Changes
|
|
78
|
+
|
|
79
|
+
- Added streaming tool argument previews across all tool renderers. Tool names, file paths, and commands now appear immediately as the model generates them, rather than waiting for the complete tool call. ([#13328](https://github.com/mastra-ai/mastra/pull/13328))
|
|
80
|
+
- **Generic tools** show live key/value argument previews as args stream in
|
|
81
|
+
- **Edit tool** renders a bordered diff preview as soon as `old_str` and `new_str` are available, even before the tool result arrives
|
|
82
|
+
- **Write tool** streams syntax-highlighted file content in a bordered box while args arrive
|
|
83
|
+
- **Find files** shows the glob pattern in the pending header
|
|
84
|
+
- **Task write** streams items directly into the pinned task list component in real-time
|
|
85
|
+
|
|
86
|
+
All tools use partial JSON parsing to progressively display argument information. This is enabled automatically for all Harness-based agents — no configuration required.
|
|
87
|
+
|
|
88
|
+
### Patch Changes
|
|
89
|
+
|
|
90
|
+
- Improved subagent usage guidance: subagents are now only recommended when spawning multiple in parallel, and the main agent must verify all subagent output before proceeding. ([#13339](https://github.com/mastra-ai/mastra/pull/13339))
|
|
91
|
+
|
|
92
|
+
- Updated TUI to work with the new Harness object-parameter API, ensuring all commands, approvals, and thread flows continue to function correctly. ([#13353](https://github.com/mastra-ai/mastra/pull/13353))
|
|
93
|
+
|
|
94
|
+
- Added audit-tests subagent that reviews test quality in a branch. The parent agent passes a description of the branch work along with changed files to this read-only subagent, which explores existing test conventions then audits for behavioral coverage, intent-vs-test alignment, LLM-generated test slop, redundant assertions, file organization, and missing edge cases. ([#13331](https://github.com/mastra-ai/mastra/pull/13331))
|
|
95
|
+
|
|
96
|
+
- Fixed the `/mcp` slash command always showing "MCP system not initialized" even when MCP servers were configured and working. Server status and `/mcp reload` now work as expected. ([#13311](https://github.com/mastra-ai/mastra/pull/13311))
|
|
97
|
+
|
|
98
|
+
- Improved Observational Memory activation timing by halving the buffer interval when approaching the activation threshold, producing finer-grained chunks for more precise context management. ([#13357](https://github.com/mastra-ai/mastra/pull/13357))
|
|
99
|
+
|
|
100
|
+
- Fixed stale OAuth credentials when resolving the OpenAI Codex model. Auth storage is now reloaded before each model resolution, preventing authentication failures after token refresh. ([#13307](https://github.com/mastra-ai/mastra/pull/13307))
|
|
101
|
+
|
|
102
|
+
- Improved TUI composability for external consumers by exposing a structured `TUIState` interface and `createTUIState` factory. ([#13350](https://github.com/mastra-ai/mastra/pull/13350))
|
|
103
|
+
|
|
104
|
+
- Added AGENTS.md to the instruction file loader so projects created by create-mastra are automatically picked up. Removed support for the deprecated AGENT.md (singular) convention. ([#13346](https://github.com/mastra-ai/mastra/pull/13346))
|
|
105
|
+
|
|
106
|
+
- Fixed an issue where memory activation could shrink the message window too aggressively due to a token counting inaccuracy, resulting in very small context windows (~300 tokens). Temporarily raised the buffer activation threshold to prevent this. ([#13349](https://github.com/mastra-ai/mastra/pull/13349))
|
|
107
|
+
|
|
108
|
+
- Fixed assistant message text disappearing when todo_write tool calls were made during streaming ([#13335](https://github.com/mastra-ai/mastra/pull/13335))
|
|
109
|
+
|
|
110
|
+
- Fixed the view tool to gracefully handle view_range when viewing directories. Previously, passing view_range with a directory path would throw an error, and passing undefined values would fail schema validation. Now, view_range slices the directory listing to show a subset of entries, enabling pagination through large directories. ([#13355](https://github.com/mastra-ai/mastra/pull/13355))
|
|
111
|
+
|
|
112
|
+
- Updated README with current installation instructions for npm, pnpm, and Homebrew. ([#13294](https://github.com/mastra-ai/mastra/pull/13294))
|
|
113
|
+
|
|
114
|
+
- Simplified the MCP management API by replacing the `MCPManager` class with a `createMcpManager()` factory function. All existing behavior (TUI `/mcp` command, tool collection, config merging) is preserved. ([#13347](https://github.com/mastra-ai/mastra/pull/13347))
|
|
115
|
+
|
|
116
|
+
- **@mastra/core:** Added optional `threadLock` callbacks to `HarnessConfig` for preventing concurrent thread access across processes. The Harness calls `acquire`/`release` during `selectOrCreateThread`, `createThread`, and `switchThread` when configured. Locking is opt-in — when `threadLock` is not provided, behavior is unchanged. ([#13334](https://github.com/mastra-ai/mastra/pull/13334))
|
|
117
|
+
|
|
118
|
+
```ts
|
|
119
|
+
const harness = new Harness({
|
|
120
|
+
id: 'my-harness',
|
|
121
|
+
storage: myStore,
|
|
122
|
+
modes: [{ id: 'default', agent: myAgent }],
|
|
123
|
+
threadLock: {
|
|
124
|
+
acquire: threadId => acquireThreadLock(threadId),
|
|
125
|
+
release: threadId => releaseThreadLock(threadId),
|
|
126
|
+
},
|
|
127
|
+
});
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**mastracode:** Wires the existing filesystem-based thread lock (`thread-lock.ts`) into the new `threadLock` config, restoring the concurrent access protection that was lost during the monorepo migration.
|
|
131
|
+
|
|
132
|
+
- Migrated from todo_write/todo_check tools to the new built-in task_write/task_check tools from @mastra/core/harness. Renamed all todo terminology to task across prompts, TUI components, and agent configurations. ([#13344](https://github.com/mastra-ai/mastra/pull/13344))
|
|
133
|
+
|
|
134
|
+
- Fixed Observational Memory status not updating during conversations. The harness was missing streaming handlers for OM data chunks (status, observation start/end, buffering, activation), so the TUI never received real-time OM progress updates. Also added switchObserverModel and switchReflectorModel methods so changing OM models properly emits events to subscribers. ([#13330](https://github.com/mastra-ai/mastra/pull/13330))
|
|
135
|
+
|
|
136
|
+
- Fixed Ctrl+F follow-up queueing to resolve autocomplete suggestions before reading editor text, so partially typed slash commands (e.g. /rev) are expanded to their full form (e.g. /review). Slash commands queued via Ctrl+F are now properly processed through the slash command handler after the agent finishes, instead of being sent as raw text to the LLM. ([#13345](https://github.com/mastra-ai/mastra/pull/13345))
|
|
137
|
+
|
|
138
|
+
- Reduced tool result token limits to prevent oversized responses. Lowered file view and grep token limits from 3,000 to 2,000 tokens. Added 2,000 token truncation to web search and web extract tools, which previously returned unbounded results. ([#13348](https://github.com/mastra-ai/mastra/pull/13348))
|
|
139
|
+
|
|
140
|
+
- Fixed thread resuming in git worktrees. Previously, starting mastracode in a new worktree would resume a thread from another worktree of the same repo. Threads are now auto-tagged with the project path and filtered on resume so each worktree gets its own thread scope. ([#13343](https://github.com/mastra-ai/mastra/pull/13343))
|
|
141
|
+
|
|
142
|
+
- Updated dependencies [[`5c70aeb`](https://github.com/mastra-ai/mastra/commit/5c70aeb391434c34f9e43caa2e8572d412bcb2b0), [`0d9efb4`](https://github.com/mastra-ai/mastra/commit/0d9efb47992c34aa90581c18b9f51f774f6252a5), [`5caa13d`](https://github.com/mastra-ai/mastra/commit/5caa13d1b2a496e2565ab124a11de9a51ad3e3b9), [`270dd16`](https://github.com/mastra-ai/mastra/commit/270dd168a86698a699d8a9de8dbce1a40f72d862), [`940163f`](https://github.com/mastra-ai/mastra/commit/940163fc492401d7562301e6f106ccef4fefe06f), [`5c70aeb`](https://github.com/mastra-ai/mastra/commit/5c70aeb391434c34f9e43caa2e8572d412bcb2b0), [`b260123`](https://github.com/mastra-ai/mastra/commit/b2601234bd093d358c92081a58f9b0befdae52b3), [`47892c8`](https://github.com/mastra-ai/mastra/commit/47892c85708eac348209f99f10f9a5f5267e11c0), [`45bb78b`](https://github.com/mastra-ai/mastra/commit/45bb78b70bd9db29678fe49476cd9f4ed01bfd0b), [`5c70aeb`](https://github.com/mastra-ai/mastra/commit/5c70aeb391434c34f9e43caa2e8572d412bcb2b0), [`70eef84`](https://github.com/mastra-ai/mastra/commit/70eef84b8f44493598fdafa2980a0e7283415eda), [`d84e52d`](https://github.com/mastra-ai/mastra/commit/d84e52d0f6511283ddd21ed5fe7f945449d0f799), [`24b80af`](https://github.com/mastra-ai/mastra/commit/24b80af87da93bb84d389340181e17b7477fa9ca), [`608e156`](https://github.com/mastra-ai/mastra/commit/608e156def954c9604c5e3f6d9dfce3bcc7aeab0), [`78d1c80`](https://github.com/mastra-ai/mastra/commit/78d1c808ad90201897a300af551bcc1d34458a20), [`2b2e157`](https://github.com/mastra-ai/mastra/commit/2b2e157a092cd597d9d3f0000d62b8bb4a7348ed), [`78d1c80`](https://github.com/mastra-ai/mastra/commit/78d1c808ad90201897a300af551bcc1d34458a20), [`59d30b5`](https://github.com/mastra-ai/mastra/commit/59d30b5d0cb44ea7a1c440e7460dfb57eac9a9b5), [`453693b`](https://github.com/mastra-ai/mastra/commit/453693bf9e265ddccecef901d50da6caaea0fbc6), [`78d1c80`](https://github.com/mastra-ai/mastra/commit/78d1c808ad90201897a300af551bcc1d34458a20), [`c204b63`](https://github.com/mastra-ai/mastra/commit/c204b632d19e66acb6d6e19b11c4540dd6ad5380), [`742a417`](https://github.com/mastra-ai/mastra/commit/742a417896088220a3b5560c354c45c5ca6d88b9)]:
|
|
143
|
+
- @mastra/libsql@1.6.0-alpha.0
|
|
144
|
+
- @mastra/core@1.6.0-alpha.0
|
|
145
|
+
- @mastra/memory@1.5.0-alpha.0
|
|
146
|
+
|
|
3
147
|
## 0.1.0
|
|
4
148
|
|
|
5
149
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -4,34 +4,28 @@ A terminal-based coding agent TUI built with [Mastra](https://mastra.ai) and [pi
|
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
|
-
- 🤖 **Multi-model support
|
|
8
|
-
- 🔐 **OAuth login
|
|
9
|
-
- 💾 **Persistent conversations
|
|
10
|
-
- 🛠️ **Coding tools
|
|
11
|
-
- 📊 **Token tracking
|
|
12
|
-
- 🎨 **Beautiful TUI
|
|
7
|
+
- 🤖 **Multi-model support**: Use Claude, GPT, Gemini, and 70+ other models via Mastra's unified model router
|
|
8
|
+
- 🔐 **OAuth login**: Authenticate with Anthropic (Claude Max) and OpenAI (ChatGPT Plus/Codex)
|
|
9
|
+
- 💾 **Persistent conversations**: Threads are saved per-project and resume automatically
|
|
10
|
+
- 🛠️ **Coding tools**: View files, edit code, run shell commands
|
|
11
|
+
- 📊 **Token tracking**: Monitor usage with persistent token counts per thread
|
|
12
|
+
- 🎨 **Beautiful TUI**: Polished terminal interface with streaming responses
|
|
13
13
|
|
|
14
14
|
## Installation
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Install `mastracode` globally with your package manager of choice.
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
|
-
|
|
20
|
-
git clone https://github.com/mastra-ai/mastra.git
|
|
21
|
-
cd mastracode
|
|
22
|
-
|
|
23
|
-
# Install dependencies
|
|
24
|
-
pnpm install
|
|
19
|
+
npm install -g mastracode
|
|
25
20
|
```
|
|
26
21
|
|
|
27
|
-
|
|
22
|
+
If you prefer not to install packages globally, you can use `npx`:
|
|
28
23
|
|
|
29
24
|
```bash
|
|
30
|
-
|
|
31
|
-
alias mastracode="pnpm dlx tsx /absolute/path/mastracode/src/main.ts"
|
|
25
|
+
npx mastracode
|
|
32
26
|
```
|
|
33
27
|
|
|
34
|
-
|
|
28
|
+
Once you start `mastracode`, execute the `/login` command to authenticate with your AI providers.
|
|
35
29
|
|
|
36
30
|
## Usage
|
|
37
31
|
|
|
@@ -131,13 +125,6 @@ pnpm typecheck
|
|
|
131
125
|
pnpm build
|
|
132
126
|
```
|
|
133
127
|
|
|
134
|
-
## Roadmap
|
|
135
|
-
|
|
136
|
-
- [ ] Tool approval UI for dangerous operations
|
|
137
|
-
- [ ] Streaming tool output
|
|
138
|
-
- [ ] More tools (search, grep, etc.)
|
|
139
|
-
- [ ] Multi-agent collaboration (network mode)
|
|
140
|
-
|
|
141
128
|
## Credits
|
|
142
129
|
|
|
143
130
|
- [Mastra](https://mastra.ai) - AI agent framework
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/agents/model.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAG9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAQnE;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,GAAG,mBAAmB,
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/agents/model.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAG9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAQnE;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,GAAG,mBAAmB,CAsBnF;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAC9B,cAAc,GACf,EAAE;IACD,cAAc,EAAE,cAAc,CAAC;CAChC,GAAG,eAAe,GAAG,mBAAmB,CASxC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Load project and global agent instruction files (
|
|
3
|
-
* Prefers
|
|
2
|
+
* Load project and global agent instruction files (AGENTS.md, CLAUDE.md).
|
|
3
|
+
* Prefers AGENTS.md over CLAUDE.md when multiple exist at the same location.
|
|
4
4
|
*/
|
|
5
5
|
interface InstructionSource {
|
|
6
6
|
path: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/agents/prompts/base.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CACzE;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/agents/prompts/base.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CACzE;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAkJ1D"}
|
|
@@ -8,5 +8,5 @@ import type { PromptContext } from './base.js';
|
|
|
8
8
|
* knows exactly what to implement.
|
|
9
9
|
*/
|
|
10
10
|
export declare function buildModePromptFn(ctx: PromptContext): string;
|
|
11
|
-
export declare const buildModePrompt = "\n# Build Mode\n\nYou are in BUILD mode. You have full access to all tools and can read, write, edit, and execute commands.\n\n## Working Style\n\n**For simple tasks** (typo fixes, small edits, single-file changes):\n- Just do it. No need to explain your plan first.\n\n**For non-trivial tasks** (3+ files, architectural decisions, unclear requirements):\n- Use
|
|
11
|
+
export declare const buildModePrompt = "\n# Build Mode\n\nYou are in BUILD mode. You have full access to all tools and can read, write, edit, and execute commands.\n\n## Working Style\n\n**For simple tasks** (typo fixes, small edits, single-file changes):\n- Just do it. No need to explain your plan first.\n\n**For non-trivial tasks** (3+ files, architectural decisions, unclear requirements):\n- Use task_write to track your steps\n- Work on ONE step at a time \u2014 complete it and verify it works before moving on\n- If the approach is risky or ambiguous, ask the user before proceeding\n\n## The Implementation Loop\n\nFor each change you make:\n\n1. **Understand** \u2014 Read the relevant code. Check how similar things are done elsewhere.\n2. **Implement** \u2014 Make the change. Follow existing patterns and conventions.\n3. **Verify** \u2014 Test that it works. Don't assume \u2014 actually run it.\n4. **Clean up** \u2014 Ensure no broken code, no debug statements, no half-done features.\n\nOnly move to the next change after the current one is verified working.\n\n## Verification is Required\n\nBefore considering any task complete:\n- Run relevant tests (check package.json for test scripts)\n- For TypeScript, run `tsc --noEmit` to catch type errors\n- If there are no automated tests, manually verify the behavior works as expected\n- Use task_check to ensure all tracked tasks are done\n\n**Don't mark something as done until you've verified it actually works.**\n\n## Error Recovery\n\nWhen something breaks:\n1. Read the full error output carefully \u2014 don't guess\n2. Find the root cause, not just the symptom\n3. Fix it properly \u2014 no casts or suppressions to hide errors\n4. Re-run to confirm the fix\n5. If stuck after 2 attempts, tell the user what you've tried\n\n## Git in Build Mode\n\n- Don't commit unless asked \u2014 just report what you changed\n- Before committing, verify the code compiles and passes lint\n- Use descriptive branch names: `feat/...`, `fix/...`, `refactor/...`\n";
|
|
12
12
|
//# sourceMappingURL=build.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Audit-tests subagent — read-only test quality auditor.
|
|
3
|
+
*
|
|
4
|
+
* This subagent reviews test files provided by the parent agent,
|
|
5
|
+
* explores the repo's existing testing conventions, and produces
|
|
6
|
+
* a detailed audit report with actionable improvement recommendations.
|
|
7
|
+
*/
|
|
8
|
+
import type { SubagentDefinition } from './types.js';
|
|
9
|
+
export declare const auditTestsSubagent: SubagentDefinition;
|
|
10
|
+
//# sourceMappingURL=audit-tests.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit-tests.d.ts","sourceRoot":"","sources":["../../../src/agents/subagents/audit-tests.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAErD,eAAO,MAAM,kBAAkB,EAAE,kBA+GhC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agents/subagents/index.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agents/subagents/index.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAUrD;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS,CAEhF;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,MAAM,EAAE,CAEzC;AAED,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM;;;;;;;;;;;;;;;;;EA0CnD"}
|
package/dist/agents/tools.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RequestContext } from '@mastra/core/request-context';
|
|
2
|
-
import type {
|
|
3
|
-
export declare function createDynamicTools(mcpManager?:
|
|
2
|
+
import type { McpManager } from '../mcp/index.js';
|
|
3
|
+
export declare function createDynamicTools(mcpManager?: McpManager): ({ requestContext }: {
|
|
4
4
|
requestContext: RequestContext;
|
|
5
5
|
}) => Record<string, any>;
|
|
6
6
|
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/agents/tools.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/agents/tools.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAgBzC,wBAAgB,kBAAkB,CAAC,UAAU,CAAC,EAAE,UAAU,IACxB,oBAAoB;IAAE,cAAc,EAAE,cAAc,CAAA;CAAE,yBAgDvF"}
|