mastracode 0.18.0-alpha.5 → 0.18.0-alpha.7

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 (67) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +46 -1
  3. package/dist/{chunk-7JEIW7QK.js → chunk-35USXMCL.js} +24 -495
  4. package/dist/chunk-35USXMCL.js.map +1 -0
  5. package/dist/{chunk-5IY6MTU5.cjs → chunk-DLEPYUVF.cjs} +51 -522
  6. package/dist/chunk-DLEPYUVF.cjs.map +1 -0
  7. package/dist/{chunk-KNBZLIUE.cjs → chunk-H3UXL3U6.cjs} +481 -3
  8. package/dist/chunk-H3UXL3U6.cjs.map +1 -0
  9. package/dist/{chunk-TWS344XV.cjs → chunk-P4Z7TFM3.cjs} +4092 -3189
  10. package/dist/chunk-P4Z7TFM3.cjs.map +1 -0
  11. package/dist/{chunk-GURLKQU4.js → chunk-PJGHWIG6.js} +1493 -590
  12. package/dist/chunk-PJGHWIG6.js.map +1 -0
  13. package/dist/{chunk-RARRWPIY.js → chunk-UOD3QQE3.js} +479 -5
  14. package/dist/chunk-UOD3QQE3.js.map +1 -0
  15. package/dist/cli.cjs +17 -17
  16. package/dist/cli.js +3 -3
  17. package/dist/index.cjs +3 -3
  18. package/dist/index.js +1 -1
  19. package/dist/onboarding/settings.d.ts +4 -0
  20. package/dist/onboarding/settings.d.ts.map +1 -1
  21. package/dist/tui/command-dispatch.d.ts.map +1 -1
  22. package/dist/tui/commands/goal.d.ts +19 -0
  23. package/dist/tui/commands/goal.d.ts.map +1 -0
  24. package/dist/tui/commands/index.d.ts +1 -0
  25. package/dist/tui/commands/index.d.ts.map +1 -1
  26. package/dist/tui/components/ask-question-inline.d.ts +1 -0
  27. package/dist/tui/components/ask-question-inline.d.ts.map +1 -1
  28. package/dist/tui/components/custom-editor.d.ts.map +1 -1
  29. package/dist/tui/components/goal-cycles-dialog.d.ts +22 -0
  30. package/dist/tui/components/goal-cycles-dialog.d.ts.map +1 -0
  31. package/dist/tui/components/help-overlay.d.ts.map +1 -1
  32. package/dist/tui/components/judge-display.d.ts +12 -0
  33. package/dist/tui/components/judge-display.d.ts.map +1 -0
  34. package/dist/tui/components/plan-approval-inline.d.ts +3 -0
  35. package/dist/tui/components/plan-approval-inline.d.ts.map +1 -1
  36. package/dist/tui/components/system-reminder.d.ts +4 -0
  37. package/dist/tui/components/system-reminder.d.ts.map +1 -1
  38. package/dist/tui/event-dispatch.d.ts.map +1 -1
  39. package/dist/tui/goal-input-lock.d.ts +6 -0
  40. package/dist/tui/goal-input-lock.d.ts.map +1 -0
  41. package/dist/tui/goal-manager.d.ts +57 -0
  42. package/dist/tui/goal-manager.d.ts.map +1 -0
  43. package/dist/tui/handlers/agent-lifecycle.d.ts.map +1 -1
  44. package/dist/tui/handlers/message.d.ts.map +1 -1
  45. package/dist/tui/handlers/prompts.d.ts +0 -4
  46. package/dist/tui/handlers/prompts.d.ts.map +1 -1
  47. package/dist/tui/handlers/tool.d.ts.map +1 -1
  48. package/dist/tui/handlers/types.d.ts +1 -0
  49. package/dist/tui/handlers/types.d.ts.map +1 -1
  50. package/dist/tui/mastra-tui.d.ts +1 -0
  51. package/dist/tui/mastra-tui.d.ts.map +1 -1
  52. package/dist/tui/render-messages.d.ts.map +1 -1
  53. package/dist/tui/setup.d.ts.map +1 -1
  54. package/dist/tui/state.d.ts +8 -1
  55. package/dist/tui/state.d.ts.map +1 -1
  56. package/dist/tui/status-line.d.ts.map +1 -1
  57. package/dist/tui.cjs +19 -19
  58. package/dist/tui.js +2 -2
  59. package/dist/utils/slash-command-loader.d.ts +2 -0
  60. package/dist/utils/slash-command-loader.d.ts.map +1 -1
  61. package/package.json +8 -8
  62. package/dist/chunk-5IY6MTU5.cjs.map +0 -1
  63. package/dist/chunk-7JEIW7QK.js.map +0 -1
  64. package/dist/chunk-GURLKQU4.js.map +0 -1
  65. package/dist/chunk-KNBZLIUE.cjs.map +0 -1
  66. package/dist/chunk-RARRWPIY.js.map +0 -1
  67. package/dist/chunk-TWS344XV.cjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # mastracode
2
2
 
3
+ ## 0.18.0-alpha.7
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`a68d854`](https://github.com/mastra-ai/mastra/commit/a68d854bf3d042bef7d5e2f6b7d35e311673888b), [`00ef282`](https://github.com/mastra-ai/mastra/commit/00ef2826034d006b984b3f19cd33ba0bba14d6c6)]:
8
+ - @mastra/duckdb@1.3.1-alpha.0
9
+ - @mastra/observability@1.12.0-alpha.0
10
+
11
+ ## 0.18.0-alpha.6
12
+
13
+ ### Minor Changes
14
+
15
+ - Added `/goal` to Mastra Code, a persistent autonomous task loop similar to the goal modes in Codex and Hermes Agent. ([#16065](https://github.com/mastra-ai/mastra/pull/16065))
16
+
17
+ A user can start a goal with `/goal <objective>`. Mastra Code saves that objective to the current thread, runs the normal assistant turn, then asks a separate judge model whether the goal is `done`, should `continue`, or is `waiting` on an explicit user checkpoint. When the judge says to continue, Mastra Code feeds the judge feedback back into the conversation and keeps working until the goal is complete, paused, cleared, or reaches the configured attempt limit.
18
+
19
+ Use `/judge` to configure the default judge model and max attempts used by future goals.
20
+
21
+ Approved plans can be selected as a goal from the inline plan approval UI, slash commands can opt into `/goal/<command>` with top-level `goal: true`, and skills can opt into goal commands with `metadata.goal: true`. `/goal` objectives can also span multiple lines.
22
+
23
+ ### Patch Changes
24
+
25
+ - Fixed OpenAI Codex login when the default callback port is already in use. The login flow now falls back to the Codex-supported fallback port and shows a clear warning when both supported callback ports are unavailable. ([#16294](https://github.com/mastra-ai/mastra/pull/16294))
26
+
27
+ - Updated dependencies [[`bae019e`](https://github.com/mastra-ai/mastra/commit/bae019ecb6694da96909f7ec7b9eb3a0a33aa887), [`33f5061`](https://github.com/mastra-ai/mastra/commit/33f5061cd1c0335020c3faae61ce96de822854fa), [`99869ec`](https://github.com/mastra-ai/mastra/commit/99869ecb1f2aa6dfcc44fa4e843e5ee0344efa64), [`d86f031`](https://github.com/mastra-ai/mastra/commit/d86f031eb6b0b2570145afafea664e59bf688962)]:
28
+ - @mastra/core@1.33.0-alpha.5
29
+
3
30
  ## 0.18.0-alpha.5
4
31
 
5
32
  ### Patch Changes
package/README.md CHANGED
@@ -13,6 +13,7 @@ Learn more in the [documentation](https://code.mastra.ai/) and [announcement pos
13
13
  - **OAuth login**: Authenticate with Anthropic (Claude Max) and OpenAI (ChatGPT Plus/Codex)
14
14
  - **Persistent conversations**: Threads are saved per-project and resume automatically
15
15
  - **Coding tools**: View files, edit code, run shell commands
16
+ - **Goals**: Pursue longer-running objectives with configurable judge models and goal-enabled commands/skills
16
17
  - **Plan persistence**: Approved plans are saved as markdown files for future reference
17
18
  - **Token tracking**: Monitor usage with persistent token counts per thread
18
19
  - **Beautiful TUI**: Polished terminal interface with streaming responses
@@ -89,6 +90,8 @@ Select a suggestion with arrow keys and press Tab to insert it.
89
90
  | `/subagents` | Configure subagent model defaults |
90
91
  | `/om` | Configure Observational Memory models |
91
92
  | `/think` | Set thinking level (Anthropic) |
93
+ | `/judge` | Configure the default judge model and max attempts for goals |
94
+ | `/goal` | Start or manage an autonomous goal |
92
95
  | `/skills` | List available skills |
93
96
  | `/diff` | Show modified files or git diff |
94
97
  | `/name` | Rename current thread |
@@ -108,6 +111,48 @@ Select a suggestion with arrow keys and press Tab to insert it.
108
111
  | `/help` | Show available commands |
109
112
  | `/exit` | Exit the TUI |
110
113
 
114
+ ### Goals
115
+
116
+ Use `/goal <objective>` to have Mastra Code keep working toward an objective across turns. Goals use a judge model to decide whether the goal is complete, should continue, or should wait for an explicit user checkpoint. Configure defaults with `/judge`.
117
+
118
+ Goal objectives can span multiple lines:
119
+
120
+ ```text
121
+ /goal Fix the failing release checks
122
+ and open a PR when everything passes.
123
+ ```
124
+
125
+ When a plan is submitted with `submit_plan`, the inline approval UI also includes **Use as /goal**. That saves/approves the plan and starts a goal using the plan text as the objective.
126
+
127
+ Custom slash commands can opt into goal mode with top-level frontmatter:
128
+
129
+ ```md
130
+ ---
131
+ name: pr-triage
132
+ description: Triage open PRs
133
+ goal: true
134
+ ---
135
+
136
+ Inspect every open PR before pair-reviewing candidates.
137
+ ```
138
+
139
+ Run goal-enabled commands with `/goal/<command-name>`. The processed command content becomes the goal objective, so `$ARGUMENTS` and other command template features still apply.
140
+
141
+ Skills can opt into goal mode with skill metadata:
142
+
143
+ ```md
144
+ ---
145
+ name: review-prs
146
+ description: Review pull requests
147
+ metadata:
148
+ goal: true
149
+ ---
150
+
151
+ Review PRs until all relevant candidates have been categorized.
152
+ ```
153
+
154
+ Run goal-enabled skills with `/goal/<skill-name>`. Skill instructions become the goal objective; any extra arguments are included as context.
155
+
111
156
  ### Keyboard shortcuts
112
157
 
113
158
  | Shortcut | Action |
@@ -179,7 +224,7 @@ export MASTRACODE_DISABLE_CAFFEINATE=1
179
224
 
180
225
  ### Plan persistence
181
226
 
182
- When you approve a plan (via `submit_plan`), it is saved as a markdown file in the app data directory:
227
+ When you approve a plan (via `submit_plan`) or choose **Use as /goal** from the inline plan approval UI, it is saved as a markdown file in the app data directory:
183
228
 
184
229
  - **macOS**: `~/Library/Application Support/mastracode/plans/<resourceId>/`
185
230
  - **Linux**: `~/.local/share/mastracode/plans/<resourceId>/`