mastracode 0.50.3-alpha.5 → 0.50.3-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.
- package/CHANGELOG.md +40 -0
- package/dist/cli.cjs +1 -3
- package/dist/cli.js +1 -3
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/login-command-CT7RA_DY.js +0 -2
- package/dist/login-command-DvbCd7Pz.cjs +0 -2
- package/dist/{run-tui-gx0rq6fN.cjs → run-tui-CXd1xOg-.cjs} +2 -4
- package/dist/{run-tui-CV_tuhrx.js → run-tui-DmE2VxN-.js} +2 -4
- package/dist/run-tui.cjs +1 -1
- package/dist/run-tui.js +1 -1
- package/dist/tui/codex-fast-entries.d.ts +14 -0
- package/dist/tui/commands/models-pack.d.ts +1 -0
- package/dist/tui/components/model-selector.d.ts +5 -0
- package/dist/tui/mastra-tui.d.ts +1 -0
- package/dist/{tui-IoCMmeHj.js → tui-D4xVz0S2.js} +62 -9
- package/dist/{tui-BfBjFTxw.cjs → tui-DvbAOJ3z.cjs} +62 -9
- package/dist/tui.cjs +1 -1
- package/dist/tui.js +1 -1
- package/package.json +18 -17
- package/dist/acp.d.ts.map +0 -1
- package/dist/browser-lifecycle.d.ts.map +0 -1
- package/dist/cli.cjs.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/commit-attribution.d.ts.map +0 -1
- package/dist/headless.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/initial-prompt.d.ts.map +0 -1
- package/dist/login-command-CT7RA_DY.js.map +0 -1
- package/dist/login-command-DvbCd7Pz.cjs.map +0 -1
- package/dist/login-command.d.ts.map +0 -1
- package/dist/main.d.ts.map +0 -1
- package/dist/plugin.d.ts.map +0 -1
- package/dist/process-memory-diagnostics-lifecycle.d.ts.map +0 -1
- package/dist/resume-command.d.ts.map +0 -1
- package/dist/run-tui-CV_tuhrx.js.map +0 -1
- package/dist/run-tui-gx0rq6fN.cjs.map +0 -1
- package/dist/run-tui.d.ts.map +0 -1
- package/dist/tui/assistant-render-registry.d.ts.map +0 -1
- package/dist/tui/background-activity.d.ts.map +0 -1
- package/dist/tui/background-tool-result.d.ts.map +0 -1
- package/dist/tui/bundled-themes.d.ts.map +0 -1
- package/dist/tui/chat-boundary-reconciliation.d.ts.map +0 -1
- package/dist/tui/command-dispatch.d.ts.map +0 -1
- package/dist/tui/commands/api-keys.d.ts.map +0 -1
- package/dist/tui/commands/browser.d.ts.map +0 -1
- package/dist/tui/commands/clone.d.ts.map +0 -1
- package/dist/tui/commands/connect.d.ts.map +0 -1
- package/dist/tui/commands/context.d.ts.map +0 -1
- package/dist/tui/commands/cost.d.ts.map +0 -1
- package/dist/tui/commands/custom-providers.d.ts.map +0 -1
- package/dist/tui/commands/diff.d.ts.map +0 -1
- package/dist/tui/commands/exit.d.ts.map +0 -1
- package/dist/tui/commands/factory.d.ts.map +0 -1
- package/dist/tui/commands/feedback.d.ts.map +0 -1
- package/dist/tui/commands/github.d.ts.map +0 -1
- package/dist/tui/commands/goal.d.ts.map +0 -1
- package/dist/tui/commands/help.d.ts.map +0 -1
- package/dist/tui/commands/hooks.d.ts.map +0 -1
- package/dist/tui/commands/index.d.ts.map +0 -1
- package/dist/tui/commands/knowledge-command.d.ts.map +0 -1
- package/dist/tui/commands/login.d.ts.map +0 -1
- package/dist/tui/commands/mastra-gateway.d.ts.map +0 -1
- package/dist/tui/commands/mcp.d.ts.map +0 -1
- package/dist/tui/commands/mode.d.ts.map +0 -1
- package/dist/tui/commands/models-pack.d.ts.map +0 -1
- package/dist/tui/commands/models.d.ts.map +0 -1
- package/dist/tui/commands/name.d.ts.map +0 -1
- package/dist/tui/commands/new.d.ts.map +0 -1
- package/dist/tui/commands/observability.d.ts.map +0 -1
- package/dist/tui/commands/om.d.ts.map +0 -1
- package/dist/tui/commands/permissions.d.ts.map +0 -1
- package/dist/tui/commands/plugins.d.ts.map +0 -1
- package/dist/tui/commands/profile.d.ts.map +0 -1
- package/dist/tui/commands/prune.d.ts.map +0 -1
- package/dist/tui/commands/report-issue.d.ts.map +0 -1
- package/dist/tui/commands/resource.d.ts.map +0 -1
- package/dist/tui/commands/review.d.ts.map +0 -1
- package/dist/tui/commands/sandbox.d.ts.map +0 -1
- package/dist/tui/commands/schedules.d.ts.map +0 -1
- package/dist/tui/commands/send-slash-command-message.d.ts.map +0 -1
- package/dist/tui/commands/settings.d.ts.map +0 -1
- package/dist/tui/commands/setup.d.ts.map +0 -1
- package/dist/tui/commands/skill-filters.d.ts.map +0 -1
- package/dist/tui/commands/skills.d.ts.map +0 -1
- package/dist/tui/commands/subagents.d.ts.map +0 -1
- package/dist/tui/commands/theme.d.ts.map +0 -1
- package/dist/tui/commands/think.d.ts.map +0 -1
- package/dist/tui/commands/thread-tag-dir.d.ts.map +0 -1
- package/dist/tui/commands/thread.d.ts.map +0 -1
- package/dist/tui/commands/threads.d.ts.map +0 -1
- package/dist/tui/commands/types.d.ts.map +0 -1
- package/dist/tui/commands/update.d.ts.map +0 -1
- package/dist/tui/commands/voice.d.ts.map +0 -1
- package/dist/tui/commands/workflows.d.ts.map +0 -1
- package/dist/tui/commands/yolo.d.ts.map +0 -1
- package/dist/tui/components/account-switch-notice.d.ts.map +0 -1
- package/dist/tui/components/ansi.d.ts.map +0 -1
- package/dist/tui/components/api-key-dialog.d.ts.map +0 -1
- package/dist/tui/components/ask-question-dialog.d.ts.map +0 -1
- package/dist/tui/components/ask-question-inline.d.ts.map +0 -1
- package/dist/tui/components/assistant-message.d.ts.map +0 -1
- package/dist/tui/components/background-activity-selector.d.ts.map +0 -1
- package/dist/tui/components/banner.d.ts.map +0 -1
- package/dist/tui/components/chat-boundary-spacer.d.ts.map +0 -1
- package/dist/tui/components/chat-spacing.d.ts.map +0 -1
- package/dist/tui/components/collapsible.d.ts.map +0 -1
- package/dist/tui/components/connect-method-selector.d.ts.map +0 -1
- package/dist/tui/components/custom-editor.d.ts.map +0 -1
- package/dist/tui/components/diff-output.d.ts.map +0 -1
- package/dist/tui/components/error-display.d.ts.map +0 -1
- package/dist/tui/components/github-pr-picker.d.ts.map +0 -1
- package/dist/tui/components/global-background-notice.d.ts.map +0 -1
- package/dist/tui/components/goal-cycles-dialog.d.ts.map +0 -1
- package/dist/tui/components/help-overlay.d.ts.map +0 -1
- package/dist/tui/components/idle-counter.d.ts.map +0 -1
- package/dist/tui/components/judge-display.d.ts.map +0 -1
- package/dist/tui/components/knowledge-browser.d.ts.map +0 -1
- package/dist/tui/components/login-account-manager.d.ts.map +0 -1
- package/dist/tui/components/login-dialog.d.ts.map +0 -1
- package/dist/tui/components/login-mode-selector.d.ts.map +0 -1
- package/dist/tui/components/login-selector.d.ts.map +0 -1
- package/dist/tui/components/masked-input.d.ts.map +0 -1
- package/dist/tui/components/mcp-selector.d.ts.map +0 -1
- package/dist/tui/components/model-selector.d.ts.map +0 -1
- package/dist/tui/components/multi-step-progress.d.ts.map +0 -1
- package/dist/tui/components/multiline-input.d.ts.map +0 -1
- package/dist/tui/components/notification-summary.d.ts.map +0 -1
- package/dist/tui/components/notification.d.ts.map +0 -1
- package/dist/tui/components/obi-loader.d.ts.map +0 -1
- package/dist/tui/components/om-marker.d.ts.map +0 -1
- package/dist/tui/components/om-output.d.ts.map +0 -1
- package/dist/tui/components/om-progress.d.ts.map +0 -1
- package/dist/tui/components/om-settings.d.ts.map +0 -1
- package/dist/tui/components/picker-list.d.ts.map +0 -1
- package/dist/tui/components/plan-approval-inline.d.ts.map +0 -1
- package/dist/tui/components/reactive-signal.d.ts.map +0 -1
- package/dist/tui/components/schedule-fire.d.ts.map +0 -1
- package/dist/tui/components/settings.d.ts.map +0 -1
- package/dist/tui/components/shell-output.d.ts.map +0 -1
- package/dist/tui/components/simple-progress.d.ts.map +0 -1
- package/dist/tui/components/simple-select.d.ts.map +0 -1
- package/dist/tui/components/slash-command.d.ts.map +0 -1
- package/dist/tui/components/state-signal.d.ts.map +0 -1
- package/dist/tui/components/subagent-execution.d.ts.map +0 -1
- package/dist/tui/components/surface.d.ts.map +0 -1
- package/dist/tui/components/system-reminder.d.ts.map +0 -1
- package/dist/tui/components/task-progress.d.ts.map +0 -1
- package/dist/tui/components/temporal-gap.d.ts.map +0 -1
- package/dist/tui/components/thinking-settings.d.ts.map +0 -1
- package/dist/tui/components/thread-selector.d.ts.map +0 -1
- package/dist/tui/components/tool-approval-dialog.d.ts.map +0 -1
- package/dist/tui/components/tool-execution-enhanced.d.ts.map +0 -1
- package/dist/tui/components/tool-execution-interface.d.ts.map +0 -1
- package/dist/tui/components/tool-validation-error.d.ts.map +0 -1
- package/dist/tui/components/user-message.d.ts.map +0 -1
- package/dist/tui/components/width-aware-container.d.ts.map +0 -1
- package/dist/tui/components/wrapping-autocomplete-list.d.ts.map +0 -1
- package/dist/tui/components/wrapping-select-list.d.ts.map +0 -1
- package/dist/tui/custom-themes.d.ts.map +0 -1
- package/dist/tui/db-message-parts.d.ts.map +0 -1
- package/dist/tui/detect-theme.d.ts.map +0 -1
- package/dist/tui/display.d.ts.map +0 -1
- package/dist/tui/event-dispatch.d.ts.map +0 -1
- package/dist/tui/footer-animation-renderer.d.ts.map +0 -1
- package/dist/tui/goal-input-lock.d.ts.map +0 -1
- package/dist/tui/goal-manager.d.ts.map +0 -1
- package/dist/tui/handlers/agent-lifecycle.d.ts.map +0 -1
- package/dist/tui/handlers/index.d.ts.map +0 -1
- package/dist/tui/handlers/message.d.ts.map +0 -1
- package/dist/tui/handlers/om.d.ts.map +0 -1
- package/dist/tui/handlers/prompts.d.ts.map +0 -1
- package/dist/tui/handlers/subagent.d.ts.map +0 -1
- package/dist/tui/handlers/tool.d.ts.map +0 -1
- package/dist/tui/handlers/types.d.ts.map +0 -1
- package/dist/tui/index.d.ts.map +0 -1
- package/dist/tui/key-input.d.ts.map +0 -1
- package/dist/tui/mastra-tui.d.ts.map +0 -1
- package/dist/tui/modal-question.d.ts.map +0 -1
- package/dist/tui/model-packs/apply.d.ts.map +0 -1
- package/dist/tui/mouse/controller.d.ts.map +0 -1
- package/dist/tui/mouse/hit-test.d.ts.map +0 -1
- package/dist/tui/mouse/hover-marker.d.ts.map +0 -1
- package/dist/tui/mouse/input-selection.d.ts.map +0 -1
- package/dist/tui/mouse/pi-tui-internals.d.ts.map +0 -1
- package/dist/tui/mouse/sgr.d.ts.map +0 -1
- package/dist/tui/notify.d.ts.map +0 -1
- package/dist/tui/om-model.d.ts.map +0 -1
- package/dist/tui/onboarding-inline.d.ts.map +0 -1
- package/dist/tui/overlay.d.ts.map +0 -1
- package/dist/tui/preview-lines.d.ts.map +0 -1
- package/dist/tui/prompt-api-key.d.ts.map +0 -1
- package/dist/tui/prune-chat.d.ts.map +0 -1
- package/dist/tui/render-messages.d.ts.map +0 -1
- package/dist/tui/render-scheduler.d.ts.map +0 -1
- package/dist/tui/runtime.d.ts.map +0 -1
- package/dist/tui/sanitize-ansi.d.ts.map +0 -1
- package/dist/tui/session-errors.d.ts.map +0 -1
- package/dist/tui/setup.d.ts.map +0 -1
- package/dist/tui/shell-config.d.ts.map +0 -1
- package/dist/tui/shell-result.d.ts.map +0 -1
- package/dist/tui/shell-runner.d.ts.map +0 -1
- package/dist/tui/shell.d.ts.map +0 -1
- package/dist/tui/state.d.ts.map +0 -1
- package/dist/tui/status-duration.d.ts.map +0 -1
- package/dist/tui/status-line.d.ts.map +0 -1
- package/dist/tui/syntax-highlight.d.ts.map +0 -1
- package/dist/tui/theme.d.ts.map +0 -1
- package/dist/tui/thread-routing.d.ts.map +0 -1
- package/dist/tui/thread-startup.d.ts.map +0 -1
- package/dist/tui/thread-title.d.ts.map +0 -1
- package/dist/tui/update-flow.d.ts.map +0 -1
- package/dist/tui/utils/bounded-output.d.ts.map +0 -1
- package/dist/tui/utils/experimental-features.d.ts.map +0 -1
- package/dist/tui/voice/engines/cloud-engine.d.ts.map +0 -1
- package/dist/tui/voice/engines/index.d.ts.map +0 -1
- package/dist/tui/voice/engines/macos-native-engine.d.ts.map +0 -1
- package/dist/tui/voice/engines/types.d.ts.map +0 -1
- package/dist/tui/voice/mic-capture.d.ts.map +0 -1
- package/dist/tui/voice/native/compile.d.ts.map +0 -1
- package/dist/tui/voice/native/open-settings.d.ts.map +0 -1
- package/dist/tui/voice/transcribe.d.ts.map +0 -1
- package/dist/tui/voice/voice-controller.d.ts.map +0 -1
- package/dist/tui-BfBjFTxw.cjs.map +0 -1
- package/dist/tui-IoCMmeHj.js.map +0 -1
- package/dist/update-command.d.ts.map +0 -1
- package/dist/update-output.d.ts.map +0 -1
- package/dist/version.d.ts.map +0 -1
- package/dist/vitest-setup.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,45 @@
|
|
|
1
1
|
# mastracode
|
|
2
2
|
|
|
3
|
+
## 0.50.3-alpha.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- **Model picker** — `/model` now lists a Fast entry (for example `openai/gpt-6.2-sol:fast`) next to each OpenAI model that has a Fast tier when you sign in to OpenAI with your ChatGPT account. When the session is on Fast, `/model` keeps the Fast entry selected, so pressing Enter no longer switches back to standard speed. ([#30882](https://github.com/mastra-ai/mastra/pull/30882))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`6bc0c6c`](https://github.com/mastra-ai/mastra/commit/6bc0c6cdc68342e32bb48076f9e9ba17e6669256), [`432e9be`](https://github.com/mastra-ai/mastra/commit/432e9bee6a30750e092c972a28e2f40027c6d7c5), [`f030844`](https://github.com/mastra-ai/mastra/commit/f03084426faf5d65c78ab391b74c3773ac173b0c), [`c28f67d`](https://github.com/mastra-ai/mastra/commit/c28f67d81eede65d220ff742f2f56804603c6674), [`0d8280d`](https://github.com/mastra-ai/mastra/commit/0d8280ddd778487b89bd2504ced24e3586e7711f), [`bc2dcc7`](https://github.com/mastra-ai/mastra/commit/bc2dcc78b75b4467d95afaf2b7369c54880d207a), [`0d8280d`](https://github.com/mastra-ai/mastra/commit/0d8280ddd778487b89bd2504ced24e3586e7711f)]:
|
|
10
|
+
- @mastra/code-sdk@1.21.0-alpha.8
|
|
11
|
+
- @mastra/core@1.86.0-alpha.7
|
|
12
|
+
- @mastra/memory@1.41.3-alpha.3
|
|
13
|
+
- @mastra/libsql@1.32.0-alpha.1
|
|
14
|
+
- @mastra/pg@1.37.1-alpha.2
|
|
15
|
+
- @mastra/mcp@2.11.0-alpha.1
|
|
16
|
+
|
|
17
|
+
## 0.50.3-alpha.6
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Stopped publishing JavaScript source maps (`.js.map` and `.cjs.map` files) and their `//# sourceMappingURL=` comments. They made up more than half of the installed size of some packages and pointed at `src/*.ts` files that are not included in the package. ([#31176](https://github.com/mastra-ai/mastra/pull/31176))
|
|
22
|
+
|
|
23
|
+
- Fixed the terminal UI staying silent when the local embedder package `@mastra/fastembed` can't be loaded. It now shows one warning that memory recall is off and that reinstalling Mastra Code fixes it. ([#31172](https://github.com/mastra-ai/mastra/pull/31172))
|
|
24
|
+
|
|
25
|
+
- Stopped publishing TypeScript declaration map files (`.d.ts.map`). They pointed at source files that are not included in the package, so they could not be used after install. Installs are smaller (about 1,050 fewer files and 2 MB less for `@mastra/core`), and go to definition and type checking work exactly as before. ([#31173](https://github.com/mastra-ai/mastra/pull/31173))
|
|
26
|
+
|
|
27
|
+
- Updated dependencies [[`3fe2318`](https://github.com/mastra-ai/mastra/commit/3fe2318cba624a0e48cff0ec5c8503bfa0a4804b), [`16c6902`](https://github.com/mastra-ai/mastra/commit/16c6902f8b971c4950fea55e13a8038022bde8bb), [`8bbaab6`](https://github.com/mastra-ai/mastra/commit/8bbaab64784fac9426f5b2bd0e35f1bd6ae4640a), [`16428c7`](https://github.com/mastra-ai/mastra/commit/16428c7ad01ac22cd76a09a6721566d31202b41b), [`5972780`](https://github.com/mastra-ai/mastra/commit/59727806f9f8dbbaecb31c38875106f4b93aec12), [`d5546d6`](https://github.com/mastra-ai/mastra/commit/d5546d686498ddb3981f4e1e05c322eba9777e07), [`3b11b67`](https://github.com/mastra-ai/mastra/commit/3b11b677ee2c1755c7a6ab2691cb3ac7269cde84), [`16428c7`](https://github.com/mastra-ai/mastra/commit/16428c7ad01ac22cd76a09a6721566d31202b41b), [`4db2889`](https://github.com/mastra-ai/mastra/commit/4db2889ec46b0443a1e11812220666579b44c79d), [`43d9916`](https://github.com/mastra-ai/mastra/commit/43d99160d1bfcb1c5b2f26621a519a36ac87fbeb), [`7388601`](https://github.com/mastra-ai/mastra/commit/73886018497772a47154f67ce512081d8f3e9818), [`3b11b67`](https://github.com/mastra-ai/mastra/commit/3b11b677ee2c1755c7a6ab2691cb3ac7269cde84), [`45320c3`](https://github.com/mastra-ai/mastra/commit/45320c334035c969dcef98a91de6ad2a6610c8c0), [`182a01f`](https://github.com/mastra-ai/mastra/commit/182a01f0d684de865c42cb9a1c0cdd61d9009d12), [`3fe2318`](https://github.com/mastra-ai/mastra/commit/3fe2318cba624a0e48cff0ec5c8503bfa0a4804b), [`8fab5e2`](https://github.com/mastra-ai/mastra/commit/8fab5e2fda43beca4be00e43d4f231cdd87fd7fd), [`3fe2318`](https://github.com/mastra-ai/mastra/commit/3fe2318cba624a0e48cff0ec5c8503bfa0a4804b), [`c736a22`](https://github.com/mastra-ai/mastra/commit/c736a22be04a3960793a86d9fff2cbc6ad8c2227), [`89fb271`](https://github.com/mastra-ai/mastra/commit/89fb27175fd7036b8600241da8a6d288a7f2bae4), [`4aeb6ce`](https://github.com/mastra-ai/mastra/commit/4aeb6ce414105e45b1c36d174258f9165738ecef), [`e3ed577`](https://github.com/mastra-ai/mastra/commit/e3ed57715f9668d9da55e7636ebefa10b141ebc4), [`55a2249`](https://github.com/mastra-ai/mastra/commit/55a2249be2f5505e3022856d477628e6ca2fd9a9)]:
|
|
28
|
+
- @mastra/code-sdk@1.21.0-alpha.7
|
|
29
|
+
- @mastra/agent-browser@0.7.0-alpha.1
|
|
30
|
+
- @mastra/core@1.86.0-alpha.6
|
|
31
|
+
- @mastra/duckdb@1.19.2-alpha.0
|
|
32
|
+
- @mastra/fastembed@1.4.0-alpha.1
|
|
33
|
+
- @mastra/github-signals@0.5.4-alpha.0
|
|
34
|
+
- @mastra/libsql@1.32.0-alpha.0
|
|
35
|
+
- @mastra/mcp@2.11.0-alpha.1
|
|
36
|
+
- @mastra/memory@1.41.3-alpha.2
|
|
37
|
+
- @mastra/observability@1.24.3-alpha.1
|
|
38
|
+
- @mastra/pg@1.37.1-alpha.1
|
|
39
|
+
- @mastra/schema-compat@1.4.1-alpha.0
|
|
40
|
+
- @mastra/stagehand@0.4.1-alpha.0
|
|
41
|
+
- @mastra/tavily@1.1.4-alpha.0
|
|
42
|
+
|
|
3
43
|
## 0.50.3-alpha.5
|
|
4
44
|
|
|
5
45
|
### Patch Changes
|
package/dist/cli.cjs
CHANGED
package/dist/cli.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { t as runTui } from "./run-tui-
|
|
2
|
+
import { t as runTui } from "./run-tui-DmE2VxN-.js";
|
|
3
3
|
// src/main.ts
|
|
4
4
|
/**
|
|
5
5
|
* Main entry point for Mastra Code TUI.
|
|
6
6
|
*/
|
|
7
7
|
runTui();
|
|
8
8
|
export {};
|
|
9
|
-
|
|
10
|
-
//# sourceMappingURL=cli.js.map
|
package/dist/docs/SKILL.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_tui = require("./tui-
|
|
1
|
+
const require_tui = require("./tui-DvbAOJ3z.cjs");
|
|
2
2
|
let _mastra_code_sdk = require("@mastra/code-sdk");
|
|
3
3
|
let child_process = require("child_process");
|
|
4
4
|
let fs = require("fs");
|
|
@@ -264,7 +264,7 @@ async function runUpdateCommand({ args = [], output = process.stdout, errorOutpu
|
|
|
264
264
|
}
|
|
265
265
|
// src/version.ts
|
|
266
266
|
function getCurrentVersion() {
|
|
267
|
-
return "0.50.3-alpha.
|
|
267
|
+
return "0.50.3-alpha.7";
|
|
268
268
|
}
|
|
269
269
|
/** Whether the invocation is `mastracode --version` or `mastracode -v`. */
|
|
270
270
|
function isVersionCommand(argv) {
|
|
@@ -747,5 +747,3 @@ Object.defineProperty(exports, "runTui", {
|
|
|
747
747
|
return runTui;
|
|
748
748
|
}
|
|
749
749
|
});
|
|
750
|
-
|
|
751
|
-
//# sourceMappingURL=run-tui-gx0rq6fN.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as closeActiveBrowser, E as activeBrowserGeneration, O as discardBrowser, T as TUI_CO_AUTHOR, _ as normalizeThemePreference, a as formatUpdateHeader, g as applyThemePreference, i as formatUpToDate, k as replaceActiveBrowser, n as formatInstallingLabel, o as formatUpdateOutcome, r as formatRegistryError, t as MastraTUI } from "./tui-
|
|
1
|
+
import { D as closeActiveBrowser, E as activeBrowserGeneration, O as discardBrowser, T as TUI_CO_AUTHOR, _ as normalizeThemePreference, a as formatUpdateHeader, g as applyThemePreference, i as formatUpToDate, k as replaceActiveBrowser, n as formatInstallingLabel, o as formatUpdateOutcome, r as formatRegistryError, t as MastraTUI } from "./tui-D4xVz0S2.js";
|
|
2
2
|
import { createMastraCode, resolveSubagentsSetting } from "@mastra/code-sdk";
|
|
3
3
|
import { spawn } from "child_process";
|
|
4
4
|
import fs from "fs";
|
|
@@ -263,7 +263,7 @@ async function runUpdateCommand({ args = [], output = process.stdout, errorOutpu
|
|
|
263
263
|
}
|
|
264
264
|
// src/version.ts
|
|
265
265
|
function getCurrentVersion() {
|
|
266
|
-
return "0.50.3-alpha.
|
|
266
|
+
return "0.50.3-alpha.7";
|
|
267
267
|
}
|
|
268
268
|
/** Whether the invocation is `mastracode --version` or `mastracode -v`. */
|
|
269
269
|
function isVersionCommand(argv) {
|
|
@@ -741,5 +741,3 @@ function runTui(options = {}) {
|
|
|
741
741
|
});
|
|
742
742
|
}
|
|
743
743
|
export { runTui as t };
|
|
744
|
-
|
|
745
|
-
//# sourceMappingURL=run-tui-CV_tuhrx.js.map
|
package/dist/run-tui.cjs
CHANGED
package/dist/run-tui.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as runTui } from "./run-tui-
|
|
1
|
+
export { t as runTui } from "./run-tui-DmE2VxN-.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { AuthStorage } from '@mastra/code-sdk/auth/storage';
|
|
2
|
+
/**
|
|
3
|
+
* Adds each connected OpenAI model's Fast entry to a model picker's list when OpenAI is signed in with ChatGPT.
|
|
4
|
+
* A Factory's own list already says which Fast entries exist, so it is left as the Factory sent it.
|
|
5
|
+
*/
|
|
6
|
+
export declare function withFastEntries<T extends {
|
|
7
|
+
id: string;
|
|
8
|
+
modelName: string;
|
|
9
|
+
hasApiKey: boolean;
|
|
10
|
+
}>(models: T[], { authStorage, factory }: {
|
|
11
|
+
authStorage?: AuthStorage;
|
|
12
|
+
factory?: unknown;
|
|
13
|
+
}): T[];
|
|
14
|
+
//# sourceMappingURL=codex-fast-entries.d.ts.map
|
|
@@ -5,6 +5,7 @@ import type { SlashCommandContext } from './types.js';
|
|
|
5
5
|
export { removeCustomPackFromSettings };
|
|
6
6
|
export declare function serializePack(pack: ModePack): string;
|
|
7
7
|
export declare function deserializePack(input: string): ModePack | null;
|
|
8
|
+
export declare function selectModel(ctx: SlashCommandContext, title: string, modeColor?: string, currentModelId?: string): Promise<string | undefined>;
|
|
8
9
|
type AccountLabelLookup = (providerId: string) => Array<{
|
|
9
10
|
id: string;
|
|
10
11
|
label: string;
|
|
@@ -73,6 +73,11 @@ export declare class ModelSelectorComponent extends Box implements Focusable {
|
|
|
73
73
|
constructor(options: ModelSelectorOptions);
|
|
74
74
|
private buildUI;
|
|
75
75
|
private sortModels;
|
|
76
|
+
/**
|
|
77
|
+
* Puts each Codex Fast entry directly under its standard model. A Fast entry that is the current model stays first,
|
|
78
|
+
* with its standard model right below it. `:fast` on any other provider is part of the model name and stays put.
|
|
79
|
+
*/
|
|
80
|
+
private keepFastEntriesNextToStandard;
|
|
76
81
|
/** Whether the custom "Use: ..." item is showing at the top */
|
|
77
82
|
private hasCustomItem;
|
|
78
83
|
private filterModels;
|
package/dist/tui/mastra-tui.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export declare class MastraTUI {
|
|
|
15
15
|
private cleanupPluginReloadListener?;
|
|
16
16
|
private cleanupPluginUpdateListener?;
|
|
17
17
|
private cleanupPluginErrorListener?;
|
|
18
|
+
private cleanupEmbedderNoticeListener?;
|
|
18
19
|
private cleanupBackgroundCompletionListener?;
|
|
19
20
|
private backgroundNoticeQueue;
|
|
20
21
|
private lastStreamError;
|
|
@@ -13,12 +13,14 @@ import * as path$1 from "path";
|
|
|
13
13
|
import path, { basename, dirname, extname, isAbsolute, join, relative, resolve } from "path";
|
|
14
14
|
import { mastraBrand } from "@mastra/code-sdk/theme-palette";
|
|
15
15
|
import chalk from "chalk";
|
|
16
|
+
import { onEmbedderPackageMissing } from "@mastra/code-sdk/agents/fastembed-subprocess";
|
|
16
17
|
import { ACCOUNT_SWITCH_PART_TYPE, MODEL_FALLBACK_PART_TYPE, MODEL_FALLBACK_STATE_KEY, accountSwitchNoticeText, isAccountSwitchReason, isModelFallbackReason, modelFallbackNoticeText, providerFromModelId } from "@mastra/code-sdk/auth/account-rotation-processor";
|
|
17
18
|
import { PROVIDER_DEFAULT_MODELS, getOAuthProviders } from "@mastra/code-sdk/auth/storage";
|
|
18
19
|
import { ONBOARDING_VERSION, getAvailableModePacks, loadSettings as loadSettings$1, saveSettings as saveSettings$1 } from "@mastra/code-sdk/onboarding/index";
|
|
19
20
|
import { detectPackageManager, fetchChangelog, fetchLatestVersion, isNewerVersion, performUpdate, planUpdate } from "@mastra/code-sdk/utils/update-check";
|
|
20
21
|
import { assignTaskIds, mastraDBMessageToSignal } from "@mastra/core/signals";
|
|
21
22
|
import { z } from "zod";
|
|
23
|
+
import { getCredentialProviderId, parseCodexModelSelection, remapOpenAIModelForCodexOAuth, withCodexFastModels } from "@mastra/code-sdk/providers/model-ids";
|
|
22
24
|
import { processSlashCommand } from "@mastra/code-sdk/utils/slash-command-processor";
|
|
23
25
|
import { createGoalReminderSignal } from "@mastra/code-sdk/goal-signal";
|
|
24
26
|
import { defaultOMProgressState, isSessionStartupCancelledError, parseSubagentMeta } from "@mastra/core/agent-controller";
|
|
@@ -53,7 +55,6 @@ import { removeCustomPackFromSettings } from "@mastra/code-sdk/onboarding/custom
|
|
|
53
55
|
import { canUseProvider, getActiveRouteMemoryModelId } from "@mastra/code-sdk/agents/model";
|
|
54
56
|
import { removeCustomProviderFromSettings, upsertCustomProviderInSettings } from "@mastra/code-sdk/onboarding/custom-providers";
|
|
55
57
|
import { applyOmRoleAuto, applyOmRoleOverride, persistOmObserveAttachments } from "@mastra/code-sdk/onboarding/om-settings";
|
|
56
|
-
import { getCredentialProviderId, remapOpenAIModelForCodexOAuth } from "@mastra/code-sdk/providers/model-ids";
|
|
57
58
|
import { getOAuthProviders as getOAuthProviders$1 } from "@mastra/code-sdk/auth/index";
|
|
58
59
|
import { createFactoryUserSession, listFactoryProjects } from "@mastra/code-sdk/factory/client";
|
|
59
60
|
import { GatewayRegistry } from "@mastra/core/llm";
|
|
@@ -2817,6 +2818,16 @@ function getCompactRunLabelColor(participants) {
|
|
|
2817
2818
|
if (participants.some((participant) => participant.getOwnCompactToolLabelColor?.() === "error")) return "error";
|
|
2818
2819
|
return "toolTitle";
|
|
2819
2820
|
}
|
|
2821
|
+
// src/tui/codex-fast-entries.ts
|
|
2822
|
+
/**
|
|
2823
|
+
* Adds each connected OpenAI model's Fast entry to a model picker's list when OpenAI is signed in with ChatGPT.
|
|
2824
|
+
* A Factory's own list already says which Fast entries exist, so it is left as the Factory sent it.
|
|
2825
|
+
*/
|
|
2826
|
+
function withFastEntries(models, { authStorage, factory }) {
|
|
2827
|
+
if (factory) return models;
|
|
2828
|
+
const codexOAuth = authStorage?.get(getCredentialProviderId("openai"))?.type === "oauth";
|
|
2829
|
+
return withCodexFastModels(models, { codexOAuth });
|
|
2830
|
+
}
|
|
2820
2831
|
// src/tui/components/goal-cycles-dialog.ts
|
|
2821
2832
|
/**
|
|
2822
2833
|
* Goal max-cycles input dialog.
|
|
@@ -2945,6 +2956,7 @@ function makeCustomModelItem(id, models) {
|
|
|
2945
2956
|
};
|
|
2946
2957
|
}
|
|
2947
2958
|
const MASTRACODE_GATEWAY_PREFIX = "mastracode/";
|
|
2959
|
+
const FAST_SUFFIX = ":fast";
|
|
2948
2960
|
/**
|
|
2949
2961
|
* The shared catalog namespaces the MastraCode gateway's providers (the user's
|
|
2950
2962
|
* custom providers) as `mastracode/<provider>/<model>`, but Mastra Code
|
|
@@ -2991,8 +3003,9 @@ var ModelSelectorComponent = class extends Box {
|
|
|
2991
3003
|
this.tui = options.tui;
|
|
2992
3004
|
this.title = options.title ?? "Select Model";
|
|
2993
3005
|
this.titleColor = options.titleColor;
|
|
2994
|
-
|
|
2995
|
-
this.currentModelId = options.currentModelId;
|
|
3006
|
+
const models = toCanonicalModelItems(options.models);
|
|
3007
|
+
this.currentModelId = options.currentModelId && !models.some((model) => model.id === options.currentModelId) ? parseCodexModelSelection(options.currentModelId).modelId : options.currentModelId;
|
|
3008
|
+
this.allModels = this.sortModels(models, this.currentModelId);
|
|
2996
3009
|
this.onSelectCallback = options.onSelect;
|
|
2997
3010
|
this.onCancelCallback = options.onCancel;
|
|
2998
3011
|
this.filteredModels = this.allModels;
|
|
@@ -3042,7 +3055,32 @@ var ModelSelectorComponent = class extends Box {
|
|
|
3042
3055
|
if (providerCompare !== 0) return providerCompare;
|
|
3043
3056
|
return a.modelName.localeCompare(b.modelName);
|
|
3044
3057
|
});
|
|
3045
|
-
return sorted;
|
|
3058
|
+
return this.keepFastEntriesNextToStandard(sorted, currentModelId);
|
|
3059
|
+
}
|
|
3060
|
+
/**
|
|
3061
|
+
* Puts each Codex Fast entry directly under its standard model. A Fast entry that is the current model stays first,
|
|
3062
|
+
* with its standard model right below it. `:fast` on any other provider is part of the model name and stays put.
|
|
3063
|
+
*/
|
|
3064
|
+
keepFastEntriesNextToStandard(sorted, currentModelId) {
|
|
3065
|
+
const byId = new Map(sorted.map((model) => [model.id, model]));
|
|
3066
|
+
const isFastEntry = (model) => model !== void 0 && parseCodexModelSelection(model.id).codexServiceTier === "fast";
|
|
3067
|
+
const standardOf = (model) => isFastEntry(model) ? byId.get(parseCodexModelSelection(model.id).modelId) : void 0;
|
|
3068
|
+
const placed = /* @__PURE__ */ new Set();
|
|
3069
|
+
const result = [];
|
|
3070
|
+
for (const model of sorted) {
|
|
3071
|
+
if (placed.has(model.id)) continue;
|
|
3072
|
+
const standard = standardOf(model);
|
|
3073
|
+
if (standard && model.id !== currentModelId) continue;
|
|
3074
|
+
result.push(model);
|
|
3075
|
+
placed.add(model.id);
|
|
3076
|
+
const fastEntry = byId.get(`${model.id}${FAST_SUFFIX}`);
|
|
3077
|
+
const partner = standard ?? (isFastEntry(fastEntry) ? fastEntry : void 0);
|
|
3078
|
+
if (partner && !placed.has(partner.id)) {
|
|
3079
|
+
result.push(partner);
|
|
3080
|
+
placed.add(partner.id);
|
|
3081
|
+
}
|
|
3082
|
+
}
|
|
3083
|
+
return result;
|
|
3046
3084
|
}
|
|
3047
3085
|
/** Whether the custom "Use: ..." item is showing at the top */
|
|
3048
3086
|
hasCustomItem = false;
|
|
@@ -16627,7 +16665,10 @@ async function handleModelCommand(ctx) {
|
|
|
16627
16665
|
}
|
|
16628
16666
|
const models = await ctx.state.controller.listAvailableModels();
|
|
16629
16667
|
const currentModelId = ctx.state.session.model.get();
|
|
16630
|
-
const
|
|
16668
|
+
const { modelId: currentCatalogId } = parseCodexModelSelection(currentModelId);
|
|
16669
|
+
const codexOAuth = ctx.authStorage?.get(getCredentialProviderId("openai"))?.type === "oauth";
|
|
16670
|
+
const available = models.filter((model) => model.hasApiKey || model.id === currentCatalogId);
|
|
16671
|
+
const connected = ctx.state.factory ? available : withCodexFastModels(available, { codexOAuth });
|
|
16631
16672
|
if (connected.length === 0) {
|
|
16632
16673
|
ctx.showInfo("No connected models. Use /connect to add a provider account or API key.");
|
|
16633
16674
|
return;
|
|
@@ -17406,7 +17447,10 @@ function deserializePack(input) {
|
|
|
17406
17447
|
}
|
|
17407
17448
|
}
|
|
17408
17449
|
async function selectModel(ctx, title, modeColor, currentModelId) {
|
|
17409
|
-
const availableModels = await ctx.state.controller.listAvailableModels()
|
|
17450
|
+
const availableModels = withFastEntries(await ctx.state.controller.listAvailableModels(), {
|
|
17451
|
+
authStorage: ctx.authStorage,
|
|
17452
|
+
factory: ctx.state.factory
|
|
17453
|
+
});
|
|
17410
17454
|
if (availableModels.length === 0) return void 0;
|
|
17411
17455
|
return new Promise((resolve) => {
|
|
17412
17456
|
const selector = new ModelSelectorComponent({
|
|
@@ -28824,6 +28868,7 @@ var MastraTUI = class MastraTUI {
|
|
|
28824
28868
|
cleanupPluginReloadListener;
|
|
28825
28869
|
cleanupPluginUpdateListener;
|
|
28826
28870
|
cleanupPluginErrorListener;
|
|
28871
|
+
cleanupEmbedderNoticeListener;
|
|
28827
28872
|
cleanupBackgroundCompletionListener;
|
|
28828
28873
|
backgroundNoticeQueue = Promise.resolve();
|
|
28829
28874
|
lastStreamError = null;
|
|
@@ -29230,6 +29275,10 @@ var MastraTUI = class MastraTUI {
|
|
|
29230
29275
|
this.cleanupPluginErrorListener();
|
|
29231
29276
|
this.cleanupPluginErrorListener = void 0;
|
|
29232
29277
|
}
|
|
29278
|
+
if (this.cleanupEmbedderNoticeListener) {
|
|
29279
|
+
this.cleanupEmbedderNoticeListener();
|
|
29280
|
+
this.cleanupEmbedderNoticeListener = void 0;
|
|
29281
|
+
}
|
|
29233
29282
|
if (this.cleanupBackgroundCompletionListener) {
|
|
29234
29283
|
this.cleanupBackgroundCompletionListener();
|
|
29235
29284
|
this.cleanupBackgroundCompletionListener = void 0;
|
|
@@ -29324,6 +29373,9 @@ var MastraTUI = class MastraTUI {
|
|
|
29324
29373
|
if (this.state.pluginManager && !this.cleanupPluginErrorListener) this.cleanupPluginErrorListener = this.state.pluginManager.onPluginError((event) => {
|
|
29325
29374
|
showError(this.state, event.message);
|
|
29326
29375
|
});
|
|
29376
|
+
if (!this.cleanupEmbedderNoticeListener) this.cleanupEmbedderNoticeListener = onEmbedderPackageMissing((error) => {
|
|
29377
|
+
showLines(this.state, [theme.fg("warning", `Warning: ${error.message}`)]);
|
|
29378
|
+
});
|
|
29327
29379
|
if (this.shouldShowOnboarding()) {
|
|
29328
29380
|
await this.showOnboarding();
|
|
29329
29381
|
if (this.stopped) return;
|
|
@@ -29870,7 +29922,10 @@ var MastraTUI = class MastraTUI {
|
|
|
29870
29922
|
});
|
|
29871
29923
|
},
|
|
29872
29924
|
onSelectModel: async (title, modeColor) => {
|
|
29873
|
-
const availableModels = await this.state.controller.listAvailableModels()
|
|
29925
|
+
const availableModels = withFastEntries(await this.state.controller.listAvailableModels(), {
|
|
29926
|
+
authStorage: this.state.authStorage,
|
|
29927
|
+
factory: this.state.factory
|
|
29928
|
+
});
|
|
29874
29929
|
if (this.stopped || availableModels.length === 0) return void 0;
|
|
29875
29930
|
return new Promise((resolveModel) => {
|
|
29876
29931
|
const selector = new ModelSelectorComponent({
|
|
@@ -30007,5 +30062,3 @@ var MastraTUI = class MastraTUI {
|
|
|
30007
30062
|
}
|
|
30008
30063
|
};
|
|
30009
30064
|
export { mastraBrand as C, closeActiveBrowser as D, activeBrowserGeneration as E, discardBrowser as O, mastra as S, TUI_CO_AUTHOR as T, normalizeThemePreference as _, formatUpdateHeader as a, getMarkdownTheme as b, LoginDialogComponent as c, createTUIState as d, UserMessageComponent as f, applyThemePreference as g, AssistantMessageComponent as h, formatUpToDate as i, replaceActiveBrowser as k, OMProgressComponent as l, ModelSelectorComponent as m, formatInstallingLabel as n, formatUpdateOutcome as o, ToolExecutionComponentEnhanced as p, formatRegistryError as r, LoginSelectorComponent as s, MastraTUI as t, formatOMStatus as u, applyThemeMode as v, theme as w, getThemeMode as x, getEditorTheme as y };
|
|
30010
|
-
|
|
30011
|
-
//# sourceMappingURL=tui-IoCMmeHj.js.map
|
|
@@ -34,12 +34,14 @@ path = __toESM(path, 1);
|
|
|
34
34
|
let _mastra_code_sdk_theme_palette = require("@mastra/code-sdk/theme-palette");
|
|
35
35
|
let chalk = require("chalk");
|
|
36
36
|
chalk = __toESM(chalk, 1);
|
|
37
|
+
let _mastra_code_sdk_agents_fastembed_subprocess = require("@mastra/code-sdk/agents/fastembed-subprocess");
|
|
37
38
|
let _mastra_code_sdk_auth_account_rotation_processor = require("@mastra/code-sdk/auth/account-rotation-processor");
|
|
38
39
|
let _mastra_code_sdk_auth_storage = require("@mastra/code-sdk/auth/storage");
|
|
39
40
|
let _mastra_code_sdk_onboarding_index = require("@mastra/code-sdk/onboarding/index");
|
|
40
41
|
let _mastra_code_sdk_utils_update_check = require("@mastra/code-sdk/utils/update-check");
|
|
41
42
|
let _mastra_core_signals = require("@mastra/core/signals");
|
|
42
43
|
let zod = require("zod");
|
|
44
|
+
let _mastra_code_sdk_providers_model_ids = require("@mastra/code-sdk/providers/model-ids");
|
|
43
45
|
let _mastra_code_sdk_utils_slash_command_processor = require("@mastra/code-sdk/utils/slash-command-processor");
|
|
44
46
|
let _mastra_code_sdk_goal_signal = require("@mastra/code-sdk/goal-signal");
|
|
45
47
|
let _mastra_core_agent_controller = require("@mastra/core/agent-controller");
|
|
@@ -77,7 +79,6 @@ let _mastra_code_sdk_onboarding_custom_packs = require("@mastra/code-sdk/onboard
|
|
|
77
79
|
let _mastra_code_sdk_agents_model = require("@mastra/code-sdk/agents/model");
|
|
78
80
|
let _mastra_code_sdk_onboarding_custom_providers = require("@mastra/code-sdk/onboarding/custom-providers");
|
|
79
81
|
let _mastra_code_sdk_onboarding_om_settings = require("@mastra/code-sdk/onboarding/om-settings");
|
|
80
|
-
let _mastra_code_sdk_providers_model_ids = require("@mastra/code-sdk/providers/model-ids");
|
|
81
82
|
let _mastra_code_sdk_auth_index = require("@mastra/code-sdk/auth/index");
|
|
82
83
|
let _mastra_code_sdk_factory_client = require("@mastra/code-sdk/factory/client");
|
|
83
84
|
let _mastra_core_llm = require("@mastra/core/llm");
|
|
@@ -2841,6 +2842,16 @@ function getCompactRunLabelColor(participants) {
|
|
|
2841
2842
|
if (participants.some((participant) => participant.getOwnCompactToolLabelColor?.() === "error")) return "error";
|
|
2842
2843
|
return "toolTitle";
|
|
2843
2844
|
}
|
|
2845
|
+
// src/tui/codex-fast-entries.ts
|
|
2846
|
+
/**
|
|
2847
|
+
* Adds each connected OpenAI model's Fast entry to a model picker's list when OpenAI is signed in with ChatGPT.
|
|
2848
|
+
* A Factory's own list already says which Fast entries exist, so it is left as the Factory sent it.
|
|
2849
|
+
*/
|
|
2850
|
+
function withFastEntries(models, { authStorage, factory }) {
|
|
2851
|
+
if (factory) return models;
|
|
2852
|
+
const codexOAuth = authStorage?.get((0, _mastra_code_sdk_providers_model_ids.getCredentialProviderId)("openai"))?.type === "oauth";
|
|
2853
|
+
return (0, _mastra_code_sdk_providers_model_ids.withCodexFastModels)(models, { codexOAuth });
|
|
2854
|
+
}
|
|
2844
2855
|
// src/tui/components/goal-cycles-dialog.ts
|
|
2845
2856
|
/**
|
|
2846
2857
|
* Goal max-cycles input dialog.
|
|
@@ -2969,6 +2980,7 @@ function makeCustomModelItem(id, models) {
|
|
|
2969
2980
|
};
|
|
2970
2981
|
}
|
|
2971
2982
|
const MASTRACODE_GATEWAY_PREFIX = "mastracode/";
|
|
2983
|
+
const FAST_SUFFIX = ":fast";
|
|
2972
2984
|
/**
|
|
2973
2985
|
* The shared catalog namespaces the MastraCode gateway's providers (the user's
|
|
2974
2986
|
* custom providers) as `mastracode/<provider>/<model>`, but Mastra Code
|
|
@@ -3015,8 +3027,9 @@ var ModelSelectorComponent = class extends _earendil_works_pi_tui.Box {
|
|
|
3015
3027
|
this.tui = options.tui;
|
|
3016
3028
|
this.title = options.title ?? "Select Model";
|
|
3017
3029
|
this.titleColor = options.titleColor;
|
|
3018
|
-
|
|
3019
|
-
this.currentModelId = options.currentModelId;
|
|
3030
|
+
const models = toCanonicalModelItems(options.models);
|
|
3031
|
+
this.currentModelId = options.currentModelId && !models.some((model) => model.id === options.currentModelId) ? (0, _mastra_code_sdk_providers_model_ids.parseCodexModelSelection)(options.currentModelId).modelId : options.currentModelId;
|
|
3032
|
+
this.allModels = this.sortModels(models, this.currentModelId);
|
|
3020
3033
|
this.onSelectCallback = options.onSelect;
|
|
3021
3034
|
this.onCancelCallback = options.onCancel;
|
|
3022
3035
|
this.filteredModels = this.allModels;
|
|
@@ -3066,7 +3079,32 @@ var ModelSelectorComponent = class extends _earendil_works_pi_tui.Box {
|
|
|
3066
3079
|
if (providerCompare !== 0) return providerCompare;
|
|
3067
3080
|
return a.modelName.localeCompare(b.modelName);
|
|
3068
3081
|
});
|
|
3069
|
-
return sorted;
|
|
3082
|
+
return this.keepFastEntriesNextToStandard(sorted, currentModelId);
|
|
3083
|
+
}
|
|
3084
|
+
/**
|
|
3085
|
+
* Puts each Codex Fast entry directly under its standard model. A Fast entry that is the current model stays first,
|
|
3086
|
+
* with its standard model right below it. `:fast` on any other provider is part of the model name and stays put.
|
|
3087
|
+
*/
|
|
3088
|
+
keepFastEntriesNextToStandard(sorted, currentModelId) {
|
|
3089
|
+
const byId = new Map(sorted.map((model) => [model.id, model]));
|
|
3090
|
+
const isFastEntry = (model) => model !== void 0 && (0, _mastra_code_sdk_providers_model_ids.parseCodexModelSelection)(model.id).codexServiceTier === "fast";
|
|
3091
|
+
const standardOf = (model) => isFastEntry(model) ? byId.get((0, _mastra_code_sdk_providers_model_ids.parseCodexModelSelection)(model.id).modelId) : void 0;
|
|
3092
|
+
const placed = /* @__PURE__ */ new Set();
|
|
3093
|
+
const result = [];
|
|
3094
|
+
for (const model of sorted) {
|
|
3095
|
+
if (placed.has(model.id)) continue;
|
|
3096
|
+
const standard = standardOf(model);
|
|
3097
|
+
if (standard && model.id !== currentModelId) continue;
|
|
3098
|
+
result.push(model);
|
|
3099
|
+
placed.add(model.id);
|
|
3100
|
+
const fastEntry = byId.get(`${model.id}${FAST_SUFFIX}`);
|
|
3101
|
+
const partner = standard ?? (isFastEntry(fastEntry) ? fastEntry : void 0);
|
|
3102
|
+
if (partner && !placed.has(partner.id)) {
|
|
3103
|
+
result.push(partner);
|
|
3104
|
+
placed.add(partner.id);
|
|
3105
|
+
}
|
|
3106
|
+
}
|
|
3107
|
+
return result;
|
|
3070
3108
|
}
|
|
3071
3109
|
/** Whether the custom "Use: ..." item is showing at the top */
|
|
3072
3110
|
hasCustomItem = false;
|
|
@@ -16657,7 +16695,10 @@ async function handleModelCommand(ctx) {
|
|
|
16657
16695
|
}
|
|
16658
16696
|
const models = await ctx.state.controller.listAvailableModels();
|
|
16659
16697
|
const currentModelId = ctx.state.session.model.get();
|
|
16660
|
-
const
|
|
16698
|
+
const { modelId: currentCatalogId } = (0, _mastra_code_sdk_providers_model_ids.parseCodexModelSelection)(currentModelId);
|
|
16699
|
+
const codexOAuth = ctx.authStorage?.get((0, _mastra_code_sdk_providers_model_ids.getCredentialProviderId)("openai"))?.type === "oauth";
|
|
16700
|
+
const available = models.filter((model) => model.hasApiKey || model.id === currentCatalogId);
|
|
16701
|
+
const connected = ctx.state.factory ? available : (0, _mastra_code_sdk_providers_model_ids.withCodexFastModels)(available, { codexOAuth });
|
|
16661
16702
|
if (connected.length === 0) {
|
|
16662
16703
|
ctx.showInfo("No connected models. Use /connect to add a provider account or API key.");
|
|
16663
16704
|
return;
|
|
@@ -17436,7 +17477,10 @@ function deserializePack(input) {
|
|
|
17436
17477
|
}
|
|
17437
17478
|
}
|
|
17438
17479
|
async function selectModel(ctx, title, modeColor, currentModelId) {
|
|
17439
|
-
const availableModels = await ctx.state.controller.listAvailableModels()
|
|
17480
|
+
const availableModels = withFastEntries(await ctx.state.controller.listAvailableModels(), {
|
|
17481
|
+
authStorage: ctx.authStorage,
|
|
17482
|
+
factory: ctx.state.factory
|
|
17483
|
+
});
|
|
17440
17484
|
if (availableModels.length === 0) return void 0;
|
|
17441
17485
|
return new Promise((resolve) => {
|
|
17442
17486
|
const selector = new ModelSelectorComponent({
|
|
@@ -28854,6 +28898,7 @@ var MastraTUI = class MastraTUI {
|
|
|
28854
28898
|
cleanupPluginReloadListener;
|
|
28855
28899
|
cleanupPluginUpdateListener;
|
|
28856
28900
|
cleanupPluginErrorListener;
|
|
28901
|
+
cleanupEmbedderNoticeListener;
|
|
28857
28902
|
cleanupBackgroundCompletionListener;
|
|
28858
28903
|
backgroundNoticeQueue = Promise.resolve();
|
|
28859
28904
|
lastStreamError = null;
|
|
@@ -29260,6 +29305,10 @@ var MastraTUI = class MastraTUI {
|
|
|
29260
29305
|
this.cleanupPluginErrorListener();
|
|
29261
29306
|
this.cleanupPluginErrorListener = void 0;
|
|
29262
29307
|
}
|
|
29308
|
+
if (this.cleanupEmbedderNoticeListener) {
|
|
29309
|
+
this.cleanupEmbedderNoticeListener();
|
|
29310
|
+
this.cleanupEmbedderNoticeListener = void 0;
|
|
29311
|
+
}
|
|
29263
29312
|
if (this.cleanupBackgroundCompletionListener) {
|
|
29264
29313
|
this.cleanupBackgroundCompletionListener();
|
|
29265
29314
|
this.cleanupBackgroundCompletionListener = void 0;
|
|
@@ -29354,6 +29403,9 @@ var MastraTUI = class MastraTUI {
|
|
|
29354
29403
|
if (this.state.pluginManager && !this.cleanupPluginErrorListener) this.cleanupPluginErrorListener = this.state.pluginManager.onPluginError((event) => {
|
|
29355
29404
|
showError(this.state, event.message);
|
|
29356
29405
|
});
|
|
29406
|
+
if (!this.cleanupEmbedderNoticeListener) this.cleanupEmbedderNoticeListener = (0, _mastra_code_sdk_agents_fastembed_subprocess.onEmbedderPackageMissing)((error) => {
|
|
29407
|
+
showLines(this.state, [theme.fg("warning", `Warning: ${error.message}`)]);
|
|
29408
|
+
});
|
|
29357
29409
|
if (this.shouldShowOnboarding()) {
|
|
29358
29410
|
await this.showOnboarding();
|
|
29359
29411
|
if (this.stopped) return;
|
|
@@ -29900,7 +29952,10 @@ var MastraTUI = class MastraTUI {
|
|
|
29900
29952
|
});
|
|
29901
29953
|
},
|
|
29902
29954
|
onSelectModel: async (title, modeColor) => {
|
|
29903
|
-
const availableModels = await this.state.controller.listAvailableModels()
|
|
29955
|
+
const availableModels = withFastEntries(await this.state.controller.listAvailableModels(), {
|
|
29956
|
+
authStorage: this.state.authStorage,
|
|
29957
|
+
factory: this.state.factory
|
|
29958
|
+
});
|
|
29904
29959
|
if (this.stopped || availableModels.length === 0) return void 0;
|
|
29905
29960
|
return new Promise((resolveModel) => {
|
|
29906
29961
|
const selector = new ModelSelectorComponent({
|
|
@@ -30210,5 +30265,3 @@ Object.defineProperty(exports, "theme", {
|
|
|
30210
30265
|
return theme;
|
|
30211
30266
|
}
|
|
30212
30267
|
});
|
|
30213
|
-
|
|
30214
|
-
//# sourceMappingURL=tui-BfBjFTxw.cjs.map
|
package/dist/tui.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_tui = require("./tui-
|
|
2
|
+
const require_tui = require("./tui-DvbAOJ3z.cjs");
|
|
3
3
|
let _mastra_code_sdk_theme_palette = require("@mastra/code-sdk/theme-palette");
|
|
4
4
|
exports.AssistantMessageComponent = require_tui.AssistantMessageComponent;
|
|
5
5
|
exports.LoginDialogComponent = require_tui.LoginDialogComponent;
|
package/dist/tui.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { h as AssistantMessageComponent, c as LoginDialogComponent, s as LoginSelectorComponent, t as MastraTUI, m as ModelSelectorComponent, l as OMProgressComponent, p as ToolExecutionComponentEnhanced, f as UserMessageComponent, v as applyThemeMode, d as createTUIState, u as formatOMStatus, y as getEditorTheme, b as getMarkdownTheme, x as getThemeMode, S as mastra, C as mastraBrand, w as theme } from "./tui-
|
|
1
|
+
export { h as AssistantMessageComponent, c as LoginDialogComponent, s as LoginSelectorComponent, t as MastraTUI, m as ModelSelectorComponent, l as OMProgressComponent, p as ToolExecutionComponentEnhanced, f as UserMessageComponent, v as applyThemeMode, d as createTUIState, u as formatOMStatus, y as getEditorTheme, b as getMarkdownTheme, x as getThemeMode, S as mastra, C as mastraBrand, w as theme } from "./tui-D4xVz0S2.js";
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mastracode",
|
|
3
|
-
"version": "0.50.3-alpha.
|
|
3
|
+
"version": "0.50.3-alpha.7",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
8
|
+
"!dist/**/*.d.*ts.map",
|
|
8
9
|
"CHANGELOG.md"
|
|
9
10
|
],
|
|
10
11
|
"homepage": "https://mastra.ai",
|
|
@@ -105,20 +106,20 @@
|
|
|
105
106
|
"vscode-languageserver-protocol": "^3.18.5",
|
|
106
107
|
"yaml": "^2.9.1",
|
|
107
108
|
"zod": "^4.6.7",
|
|
108
|
-
"@mastra/agent-browser": "0.7.0-alpha.
|
|
109
|
-
"@mastra/code-sdk": "^1.21.0-alpha.
|
|
110
|
-
"@mastra/core": "1.86.0-alpha.
|
|
111
|
-
"@mastra/duckdb": "1.19.
|
|
112
|
-
"@mastra/fastembed": "1.4.0-alpha.
|
|
113
|
-
"@mastra/
|
|
114
|
-
"@mastra/
|
|
115
|
-
"@mastra/
|
|
116
|
-
"@mastra/
|
|
117
|
-
"@mastra/
|
|
118
|
-
"@mastra/
|
|
119
|
-
"@mastra/
|
|
120
|
-
"@mastra/stagehand": "0.4.0",
|
|
121
|
-
"@mastra/
|
|
109
|
+
"@mastra/agent-browser": "0.7.0-alpha.1",
|
|
110
|
+
"@mastra/code-sdk": "^1.21.0-alpha.8",
|
|
111
|
+
"@mastra/core": "1.86.0-alpha.7",
|
|
112
|
+
"@mastra/duckdb": "1.19.2-alpha.0",
|
|
113
|
+
"@mastra/fastembed": "1.4.0-alpha.1",
|
|
114
|
+
"@mastra/libsql": "1.32.0-alpha.1",
|
|
115
|
+
"@mastra/mcp": "2.11.0-alpha.1",
|
|
116
|
+
"@mastra/memory": "1.41.3-alpha.3",
|
|
117
|
+
"@mastra/observability": "1.24.3-alpha.1",
|
|
118
|
+
"@mastra/pg": "1.37.1-alpha.2",
|
|
119
|
+
"@mastra/schema-compat": "1.4.1-alpha.0",
|
|
120
|
+
"@mastra/tavily": "1.1.4-alpha.0",
|
|
121
|
+
"@mastra/stagehand": "0.4.1-alpha.0",
|
|
122
|
+
"@mastra/github-signals": "0.5.4-alpha.0"
|
|
122
123
|
},
|
|
123
124
|
"devDependencies": {
|
|
124
125
|
"@copilotkit/aimock": "^1.46.0",
|
|
@@ -130,8 +131,8 @@
|
|
|
130
131
|
"tsx": "^4.23.15",
|
|
131
132
|
"typescript": "^6.0.3",
|
|
132
133
|
"vitest": "5.1.0",
|
|
133
|
-
"@internal/
|
|
134
|
-
"@internal/
|
|
134
|
+
"@internal/lint": "0.0.151",
|
|
135
|
+
"@internal/types-builder": "0.0.126"
|
|
135
136
|
},
|
|
136
137
|
"engines": {
|
|
137
138
|
"node": ">=22.19.0"
|
package/dist/acp.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acp.d.ts","sourceRoot":"","sources":["../src/acp.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"browser-lifecycle.d.ts","sourceRoot":"","sources":["../src/browser-lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAwC1D,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD;AAED,8EAA8E;AAC9E,wBAAgB,cAAc,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAEpE;AASD;;;;;;;;GAQG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,aAAa,GAAG,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,CAU5F;AAED,6EAA6E;AAC7E,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAExD"}
|
package/dist/cli.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli.cjs","names":["runTui"],"sources":["../src/main.ts"],"sourcesContent":["#!/usr/bin/env node\n/**\n * Main entry point for Mastra Code TUI.\n */\nimport { runTui } from './run-tui.js';\n\nvoid runTui();\n"],"mappings":";;;;;A,gCAMKA,CAAAA,CAAAA,OAAO"}
|
package/dist/cli.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","names":[],"sources":["../src/main.ts"],"sourcesContent":["#!/usr/bin/env node\n/**\n * Main entry point for Mastra Code TUI.\n */\nimport { runTui } from './run-tui.js';\n\nvoid runTui();\n"],"mappings":";;;;;;AAMK,OAAO"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"commit-attribution.d.ts","sourceRoot":"","sources":["../src/commit-attribution.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa;aAAK,IAAI,EAAE,YAAY;CAAW,CAAC"}
|
package/dist/headless.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"headless.d.ts","sourceRoot":"","sources":["../src/headless.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC"}
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"initial-prompt.d.ts","sourceRoot":"","sources":["../src/initial-prompt.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,EAAG,sBAA+B,CAAC;AACnE,eAAO,MAAM,kBAAkB,kCAAkC,CAAC;AAElE,eAAO,MAAM,eAAe,EAAG,cAAuB,CAAC;AAEvD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,6GAA6G;IAC7G,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kFAAkF;IAClF,IAAI,CAAC,EAAE,OAAO,mBAAmB,GAAG,OAAO,eAAe,CAAC;IAC3D;;;OAGG;IACH,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,iBAAiB,CAyB3F;AAED,wFAAwF;AACxF,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,sBAItG;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,IAAI,CAAC,iBAAiB,EAAE,QAAQ,GAAG,MAAM,CAAC,EAChD,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACpC,MAAM,GAAG,SAAS,CAKpB;AAED,+DAA+D;AAC/D,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,IAAI,CAAC,iBAAiB,EAAE,QAAQ,GAAG,cAAc,CAAC,EACxD,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GACzB;IAAE,cAAc,CAAC,EAAE,MAAM,CAAC;IAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAAE,CAUxD;AAED,eAAO,MAAM,SAAS,EAAG,QAAiB,CAAC;AAE3C,MAAM,MAAM,YAAY,GAAG;IACzB,gDAAgD;IAChD,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,0DAA0D;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oDAAoD;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,YAAY,CAyBzD"}
|