mastracode 0.20.0-alpha.9 → 0.20.1-alpha.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 +117 -0
- package/dist/{chunk-BX3BAWTX.cjs → chunk-5Y65J65P.cjs} +38 -38
- package/dist/{chunk-BX3BAWTX.cjs.map → chunk-5Y65J65P.cjs.map} +1 -1
- package/dist/{chunk-BAMGMQK2.js → chunk-MIZLLGL7.js} +3 -3
- package/dist/{chunk-BAMGMQK2.js.map → chunk-MIZLLGL7.js.map} +1 -1
- package/dist/{chunk-7VEHWBDA.js → chunk-N52MOFO3.js} +10 -3
- package/dist/chunk-N52MOFO3.js.map +1 -0
- package/dist/{chunk-JK32LCAR.cjs → chunk-PWXDLV2Z.cjs} +1492 -1294
- package/dist/chunk-PWXDLV2Z.cjs.map +1 -0
- package/dist/{chunk-7GF7BQFI.js → chunk-RGIAZBIJ.js} +688 -490
- package/dist/chunk-RGIAZBIJ.js.map +1 -0
- package/dist/{chunk-B4OZBWQJ.cjs → chunk-UPOCX7P4.cjs} +10 -2
- package/dist/chunk-UPOCX7P4.cjs.map +1 -0
- package/dist/cli.cjs +18 -18
- package/dist/cli.js +3 -3
- package/dist/index.cjs +3 -3
- package/dist/index.js +1 -1
- package/dist/tui/commands/goal.d.ts.map +1 -1
- package/dist/tui/components/ansi.d.ts.map +1 -1
- package/dist/tui/components/api-key-dialog.d.ts.map +1 -1
- package/dist/tui/components/ask-question-dialog.d.ts.map +1 -1
- package/dist/tui/components/goal-cycles-dialog.d.ts.map +1 -1
- package/dist/tui/components/login-dialog.d.ts.map +1 -1
- package/dist/tui/components/login-mode-selector.d.ts.map +1 -1
- package/dist/tui/components/login-selector.d.ts.map +1 -1
- package/dist/tui/components/mcp-selector.d.ts.map +1 -1
- package/dist/tui/components/model-selector.d.ts.map +1 -1
- package/dist/tui/components/plan-approval-inline.d.ts +2 -1
- package/dist/tui/components/plan-approval-inline.d.ts.map +1 -1
- package/dist/tui/components/task-progress.d.ts.map +1 -1
- package/dist/tui/components/thread-selector.d.ts.map +1 -1
- package/dist/tui/components/tool-approval-dialog.d.ts.map +1 -1
- package/dist/tui/components/tool-execution-enhanced.d.ts +2 -0
- package/dist/tui/components/tool-execution-enhanced.d.ts.map +1 -1
- package/dist/tui/goal-manager.d.ts +3 -0
- package/dist/tui/goal-manager.d.ts.map +1 -1
- package/dist/tui/handlers/prompts.d.ts.map +1 -1
- package/dist/tui/theme.d.ts +10 -0
- package/dist/tui/theme.d.ts.map +1 -1
- package/dist/tui.cjs +19 -19
- package/dist/tui.js +2 -2
- package/package.json +13 -13
- package/dist/chunk-7GF7BQFI.js.map +0 -1
- package/dist/chunk-7VEHWBDA.js.map +0 -1
- package/dist/chunk-B4OZBWQJ.cjs.map +0 -1
- package/dist/chunk-JK32LCAR.cjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,122 @@
|
|
|
1
1
|
# mastracode
|
|
2
2
|
|
|
3
|
+
## 0.20.1-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`cfa2e3a`](https://github.com/mastra-ai/mastra/commit/cfa2e3a5292322f48bb28b4d257d631da7f9d3cc)]:
|
|
8
|
+
- @mastra/core@1.36.1-alpha.0
|
|
9
|
+
|
|
10
|
+
## 0.20.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- Added automatic return to Plan mode when a goal started from an approved plan finishes. ([#16676](https://github.com/mastra-ai/mastra/pull/16676))
|
|
15
|
+
|
|
16
|
+
- Added the `/skill/<name>` command to explicitly activate an installed workspace skill in the current conversation. This complements automatic skill activation. ([#16618](https://github.com/mastra-ai/mastra/pull/16618))
|
|
17
|
+
|
|
18
|
+
```text
|
|
19
|
+
/skill/github-triage
|
|
20
|
+
/skill/release-check focus tests
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The command loads the skill's instructions (plus any `references/`, `scripts/`, and `assets/` paths the skill ships) and sends them to the agent. Use `/skills` to list available skills.
|
|
24
|
+
|
|
25
|
+
Skills can opt out of direct user invocation by setting `user-invocable: false` in their frontmatter — those skills remain available for automatic activation by the agent but do not appear in `/skill/<name>` autocomplete, the `/skills` listing, or accept direct invocation.
|
|
26
|
+
|
|
27
|
+
```md title=".mastracode/skills/internal-helper/SKILL.md"
|
|
28
|
+
---
|
|
29
|
+
name: internal-helper
|
|
30
|
+
description: Used by the agent internally; not for direct user invocation.
|
|
31
|
+
user-invocable: false
|
|
32
|
+
---
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Closes #16344.
|
|
36
|
+
|
|
37
|
+
- Added PostHog product analytics for MastraCode sessions, prompts, thread changes, command usage, and interactive prompts. Set MASTRA_TELEMETRY_DISABLED=1 to disable telemetry. ([#15173](https://github.com/mastra-ai/mastra/pull/15173))
|
|
38
|
+
|
|
39
|
+
### Patch Changes
|
|
40
|
+
|
|
41
|
+
- Fixed goal judge evaluations so they complete more reliably and retry when no structured decision is returned. Fixed `/goal resume` to retrigger judge evaluation after judge-related pauses instead of sending a normal continuation. ([#16843](https://github.com/mastra-ai/mastra/pull/16843))
|
|
42
|
+
|
|
43
|
+
- Improved quiet mode readability: use WCAG contrast-adapted 'muted' color for task counters and pending text, de-emphasize completed tasks, use visibleWidth for accurate task alignment, and adapt compact tool connector glyphs on non-black terminal backgrounds ([#16839](https://github.com/mastra-ai/mastra/pull/16839))
|
|
44
|
+
|
|
45
|
+
- Improved MastraCode rendering responsiveness during large streamed tool previews by upgrading the terminal UI renderer. ([#16835](https://github.com/mastra-ai/mastra/pull/16835))
|
|
46
|
+
|
|
47
|
+
- Add an "Observe attachments" toggle in `/om` settings that controls whether ([#16682](https://github.com/mastra-ai/mastra/pull/16682))
|
|
48
|
+
file and image attachments are forwarded to the Observer LLM. Turn it off when
|
|
49
|
+
running with a text-only observer model. Stored as `omObserveAttachments` in
|
|
50
|
+
global settings and seeded into the harness state at startup.
|
|
51
|
+
|
|
52
|
+
- Improved MastraCode quiet mode so terminal sessions are easier to scan. ([#16771](https://github.com/mastra-ai/mastra/pull/16771))
|
|
53
|
+
- Quiet mode is now the default for new installs, and existing classic users get a one-time prompt to choose whether to enable it.
|
|
54
|
+
- Added compact tool previews with a configurable preview-line limit, including an option to hide previews.
|
|
55
|
+
- Improved repeated tool-call rendering, path continuation handling, task wrapping, shell/error previews, and spacing between tools, messages, plans, and completed subagents.
|
|
56
|
+
- Added edited line ranges to workspace edit results so tool UIs can show where replacements happened.
|
|
57
|
+
|
|
58
|
+
- Updated MastraCode to use provider-aware Observational Memory idle activation. ([#16663](https://github.com/mastra-ai/mastra/pull/16663))
|
|
59
|
+
|
|
60
|
+
MastraCode now sets `activateAfterIdle: "auto"`, shows an idle-time counter above the input after one minute of inactivity, and combines back-to-back OM activation markers into a single line.
|
|
61
|
+
|
|
62
|
+
- Restore MastraCode local command execution to inherit parent environment variables while redacting env-shaped and secret-looking workspace trace data. ([#16691](https://github.com/mastra-ai/mastra/pull/16691))
|
|
63
|
+
|
|
64
|
+
- Fixed goal pursuit timers so they only count active work and stay paused while waiting for user input. ([#16690](https://github.com/mastra-ai/mastra/pull/16690))
|
|
65
|
+
|
|
66
|
+
- Added a Unix socket PubSub transport and wired the Mastra Code TUI through a per-resource socket so local sessions can coordinate thread streams across processes. Programmatic `createMastraCode` usage remains opt-in: ([#16669](https://github.com/mastra-ai/mastra/pull/16669))
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
await createMastraCode({ unixSocketPubSub: true });
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
- Fixed terminal rendering so command output, task lists, and plan feedback input stay aligned while redrawing. ([#16849](https://github.com/mastra-ai/mastra/pull/16849))
|
|
73
|
+
|
|
74
|
+
- Improved thread signal handling in the TUI to work with the simplified signal contents shape. ([#16622](https://github.com/mastra-ai/mastra/pull/16622))
|
|
75
|
+
|
|
76
|
+
- Updated dependencies [[`452036a`](https://github.com/mastra-ai/mastra/commit/452036a0d965b4f4c1efd93606e4f03b50b807a5), [`c272d50`](https://github.com/mastra-ai/mastra/commit/c272d50610a54496b6b6d92ccd4d37b333a2613a), [`27fd1b7`](https://github.com/mastra-ai/mastra/commit/27fd1b79ac62eb7694f92587eb7d1be05b59be01), [`5ba7253`](https://github.com/mastra-ai/mastra/commit/5ba7253745c85e8df8012a76d954c640ffa336f7), [`5556cc1`](https://github.com/mastra-ai/mastra/commit/5556cc1befec71518d84f826b3bfe3a079a9daf7), [`f73980d`](https://github.com/mastra-ai/mastra/commit/f73980d651eb5f7f1ab20582de4615a1b6f10fce), [`5499303`](https://github.com/mastra-ai/mastra/commit/54993032c1ebc09642625b78d2014e0cf84a3cae), [`a702009`](https://github.com/mastra-ai/mastra/commit/a702009d3cfaa745120f501e21c783ed4d6a3072), [`46cbb7e`](https://github.com/mastra-ai/mastra/commit/46cbb7e84a0fadcf8c26ddfad38278732c22143e), [`9430352`](https://github.com/mastra-ai/mastra/commit/94303523460cb09dcd0d8139c11926029631d6ba), [`5d8003c`](https://github.com/mastra-ai/mastra/commit/5d8003c7b082e0b916458cbaf0fa274f226b0734), [`9aee493`](https://github.com/mastra-ai/mastra/commit/9aee493ed6089b5133472623dcce49934bf2d509), [`d8692af`](https://github.com/mastra-ai/mastra/commit/d8692afa253028e39cdce2aafa0ac414071a762e), [`1a9cc60`](https://github.com/mastra-ai/mastra/commit/1a9cc6069f9910fc3d59e4953ac8cd95d89ad6f5), [`8cdb86c`](https://github.com/mastra-ai/mastra/commit/8cdb86ceed1137bc2768e147dce85a0692b9fb26), [`8534d79`](https://github.com/mastra-ai/mastra/commit/8534d791fa1cb70fe1c19e2604c4b63cc10dd051), [`eda90c5`](https://github.com/mastra-ai/mastra/commit/eda90c5bfd7de11805ecc9f4552716c895fbaf78), [`a935b0a`](https://github.com/mastra-ai/mastra/commit/a935b0a0977ae3f196b33ec7621f528069c82db0), [`9c88701`](https://github.com/mastra-ai/mastra/commit/9c8870195b41a38dc40b6ba2aa55eda04df8fa69), [`7f6a053`](https://github.com/mastra-ai/mastra/commit/7f6a053b6a76f12b8ab0f25da1709adbd5134cd6), [`c78f8cd`](https://github.com/mastra-ai/mastra/commit/c78f8cd6222a86e6c60ae5210b6929ad5221b6fb), [`14b69c6`](https://github.com/mastra-ai/mastra/commit/14b69c6b05ce1e50c140b030a48cafb41d0746e3), [`e146aad`](https://github.com/mastra-ai/mastra/commit/e146aadbba66c410ba0e74bac4c50135495cb8dd), [`4bd4e8e`](https://github.com/mastra-ai/mastra/commit/4bd4e8e042f6687559f49a560a7914cee9b85447), [`ac79462`](https://github.com/mastra-ai/mastra/commit/ac79462b98f1062394c45093aa515b0766f27ee2), [`6b8a53e`](https://github.com/mastra-ai/mastra/commit/6b8a53eea3b255a4fd0b29bc0237cdd1906bf55c), [`1a0ec78`](https://github.com/mastra-ai/mastra/commit/1a0ec789a26cae443744e9abbd62ed6ee676af39), [`e47bca7`](https://github.com/mastra-ai/mastra/commit/e47bca7b72866d3abd173b9f530ac4318113a8ff), [`eda90c5`](https://github.com/mastra-ai/mastra/commit/eda90c5bfd7de11805ecc9f4552716c895fbaf78), [`afc004f`](https://github.com/mastra-ai/mastra/commit/afc004f5cc7e30697809e7021820b9f5881e6719), [`0031d0f`](https://github.com/mastra-ai/mastra/commit/0031d0f13831d7843ac5d498734a7d92862e2ce3), [`841a222`](https://github.com/mastra-ai/mastra/commit/841a222560d8c19238f8213713f30535cdd82284), [`64c1e0b`](https://github.com/mastra-ai/mastra/commit/64c1e0b35165c96b659818bd0177aa18794ef11f), [`40d83a9`](https://github.com/mastra-ai/mastra/commit/40d83a90d9be31a1b83e04649edb703eb7753e33), [`4e88dc6`](https://github.com/mastra-ai/mastra/commit/4e88dc6b89f154c0eae37221c8126be0c23c569f), [`19018f0`](https://github.com/mastra-ai/mastra/commit/19018f05722af74a5978781a7731a654b26f7f2a), [`19281c7`](https://github.com/mastra-ai/mastra/commit/19281c70424f757219782de16c2699743c5e04d0), [`3498b49`](https://github.com/mastra-ai/mastra/commit/3498b4946be94f4313cd817733589680dcda5278), [`d52b6fe`](https://github.com/mastra-ai/mastra/commit/d52b6fe1c56853eb38864baae0bbfa75cc739ccb), [`408be73`](https://github.com/mastra-ai/mastra/commit/408be73449dfab92b51eab8c6623b6c443debc25), [`359439b`](https://github.com/mastra-ai/mastra/commit/359439bb8c635e048176306828195f8297f50021), [`96d225b`](https://github.com/mastra-ai/mastra/commit/96d225b05ed52ff250e0a342a7e6398e291945f0), [`71a820b`](https://github.com/mastra-ai/mastra/commit/71a820b2353fa1406772c50760a3732058a8b337), [`3552b1c`](https://github.com/mastra-ai/mastra/commit/3552b1c872988885f1c33d97122323567e2aff8e), [`1698f5e`](https://github.com/mastra-ai/mastra/commit/1698f5ec141d34f22a873efdb145ce3cdf848a5e)]:
|
|
77
|
+
- @mastra/core@1.36.0
|
|
78
|
+
- @mastra/memory@1.19.0
|
|
79
|
+
- @mastra/mcp@1.8.0
|
|
80
|
+
- @mastra/duckdb@1.4.0
|
|
81
|
+
- @mastra/stagehand@0.2.3
|
|
82
|
+
- @mastra/observability@1.13.0
|
|
83
|
+
- @mastra/libsql@1.11.1
|
|
84
|
+
- @mastra/pg@1.11.1
|
|
85
|
+
- @mastra/fastembed@1.1.0
|
|
86
|
+
|
|
87
|
+
## 0.20.0-alpha.12
|
|
88
|
+
|
|
89
|
+
### Patch Changes
|
|
90
|
+
|
|
91
|
+
- Fixed goal judge evaluations so they complete more reliably and retry when no structured decision is returned. Fixed `/goal resume` to retrigger judge evaluation after judge-related pauses instead of sending a normal continuation. ([#16843](https://github.com/mastra-ai/mastra/pull/16843))
|
|
92
|
+
|
|
93
|
+
- Improved quiet mode readability: use WCAG contrast-adapted 'muted' color for task counters and pending text, de-emphasize completed tasks, use visibleWidth for accurate task alignment, and adapt compact tool connector glyphs on non-black terminal backgrounds ([#16839](https://github.com/mastra-ai/mastra/pull/16839))
|
|
94
|
+
|
|
95
|
+
- Fixed terminal rendering so command output, task lists, and plan feedback input stay aligned while redrawing. ([#16849](https://github.com/mastra-ai/mastra/pull/16849))
|
|
96
|
+
|
|
97
|
+
- Updated dependencies [[`27fd1b7`](https://github.com/mastra-ai/mastra/commit/27fd1b79ac62eb7694f92587eb7d1be05b59be01), [`a702009`](https://github.com/mastra-ai/mastra/commit/a702009d3cfaa745120f501e21c783ed4d6a3072), [`46cbb7e`](https://github.com/mastra-ai/mastra/commit/46cbb7e84a0fadcf8c26ddfad38278732c22143e), [`8534d79`](https://github.com/mastra-ai/mastra/commit/8534d791fa1cb70fe1c19e2604c4b63cc10dd051), [`c78f8cd`](https://github.com/mastra-ai/mastra/commit/c78f8cd6222a86e6c60ae5210b6929ad5221b6fb), [`e146aad`](https://github.com/mastra-ai/mastra/commit/e146aadbba66c410ba0e74bac4c50135495cb8dd), [`1a0ec78`](https://github.com/mastra-ai/mastra/commit/1a0ec789a26cae443744e9abbd62ed6ee676af39), [`d52b6fe`](https://github.com/mastra-ai/mastra/commit/d52b6fe1c56853eb38864baae0bbfa75cc739ccb)]:
|
|
98
|
+
- @mastra/core@1.36.0-alpha.10
|
|
99
|
+
- @mastra/mcp@1.8.0-alpha.2
|
|
100
|
+
- @mastra/libsql@1.11.1-alpha.0
|
|
101
|
+
- @mastra/pg@1.11.1-alpha.0
|
|
102
|
+
|
|
103
|
+
## 0.20.0-alpha.11
|
|
104
|
+
|
|
105
|
+
### Patch Changes
|
|
106
|
+
|
|
107
|
+
- Improved MastraCode rendering responsiveness during large streamed tool previews by upgrading the terminal UI renderer. ([#16835](https://github.com/mastra-ai/mastra/pull/16835))
|
|
108
|
+
|
|
109
|
+
- Updated dependencies [[`1698f5e`](https://github.com/mastra-ai/mastra/commit/1698f5ec141d34f22a873efdb145ce3cdf848a5e)]:
|
|
110
|
+
- @mastra/core@1.36.0-alpha.9
|
|
111
|
+
|
|
112
|
+
## 0.20.0-alpha.10
|
|
113
|
+
|
|
114
|
+
### Patch Changes
|
|
115
|
+
|
|
116
|
+
- Updated dependencies [[`5d8003c`](https://github.com/mastra-ai/mastra/commit/5d8003c7b082e0b916458cbaf0fa274f226b0734), [`9aee493`](https://github.com/mastra-ai/mastra/commit/9aee493ed6089b5133472623dcce49934bf2d509)]:
|
|
117
|
+
- @mastra/duckdb@1.4.0-alpha.1
|
|
118
|
+
- @mastra/core@1.36.0-alpha.8
|
|
119
|
+
|
|
3
120
|
## 0.20.0-alpha.9
|
|
4
121
|
|
|
5
122
|
### Patch Changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkUPOCX7P4_cjs = require('./chunk-UPOCX7P4.cjs');
|
|
4
4
|
var chunkLS7LUEZX_cjs = require('./chunk-LS7LUEZX.cjs');
|
|
5
5
|
var chunkAWYGW5ZV_cjs = require('./chunk-AWYGW5ZV.cjs');
|
|
6
6
|
var path = require('path');
|
|
@@ -542,8 +542,8 @@ function getDynamicWorkspace({ requestContext, mastra: mastra2 }) {
|
|
|
542
542
|
existing.setToolsConfig(isPlanMode ? { ...chunkAWYGW5ZV_cjs.TOOL_NAME_OVERRIDES, ...planModeTools } : chunkAWYGW5ZV_cjs.TOOL_NAME_OVERRIDES);
|
|
543
543
|
return existing;
|
|
544
544
|
}
|
|
545
|
-
const userLsp =
|
|
546
|
-
const mcModulePath = path.join(path.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-
|
|
545
|
+
const userLsp = chunkUPOCX7P4_cjs.loadSettings().lsp ?? {};
|
|
546
|
+
const mcModulePath = path.join(path.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-5Y65J65P.cjs', document.baseURI).href)))), "..");
|
|
547
547
|
const lspConfig = {
|
|
548
548
|
...userLsp,
|
|
549
549
|
packageRunner: userLsp.packageRunner || detectPackageRunner(projectPath),
|
|
@@ -1009,14 +1009,14 @@ function getHarnessState(requestContext) {
|
|
|
1009
1009
|
}
|
|
1010
1010
|
function getObserverModel({ requestContext }) {
|
|
1011
1011
|
const state = getHarnessState(requestContext);
|
|
1012
|
-
return
|
|
1012
|
+
return chunkUPOCX7P4_cjs.resolveModel(state?.observerModelId ?? DEFAULT_OM_MODEL_ID, {
|
|
1013
1013
|
remapForCodexOAuth: true,
|
|
1014
1014
|
requestContext
|
|
1015
1015
|
});
|
|
1016
1016
|
}
|
|
1017
1017
|
function getReflectorModel({ requestContext }) {
|
|
1018
1018
|
const state = getHarnessState(requestContext);
|
|
1019
|
-
return
|
|
1019
|
+
return chunkUPOCX7P4_cjs.resolveModel(state?.reflectorModelId ?? DEFAULT_OM_MODEL_ID, {
|
|
1020
1020
|
remapForCodexOAuth: true,
|
|
1021
1021
|
requestContext
|
|
1022
1022
|
});
|
|
@@ -2881,15 +2881,15 @@ var PROVIDER_TO_OAUTH_ID = {
|
|
|
2881
2881
|
};
|
|
2882
2882
|
function createAuthStorage() {
|
|
2883
2883
|
const authStorage = new chunkLS7LUEZX_cjs.AuthStorage();
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2884
|
+
chunkUPOCX7P4_cjs.setAuthStorage(authStorage);
|
|
2885
|
+
chunkUPOCX7P4_cjs.setAuthStorage3(authStorage);
|
|
2886
|
+
chunkUPOCX7P4_cjs.setAuthStorage2(authStorage);
|
|
2887
2887
|
return authStorage;
|
|
2888
2888
|
}
|
|
2889
2889
|
function resolveCloudObservabilityConfig(settings, authStorage, resourceId) {
|
|
2890
2890
|
const resourceConfig = settings.observability.resources[resourceId];
|
|
2891
2891
|
if (resourceConfig) {
|
|
2892
|
-
const token = authStorage.getStoredApiKey(`${
|
|
2892
|
+
const token = authStorage.getStoredApiKey(`${chunkUPOCX7P4_cjs.OBSERVABILITY_AUTH_PREFIX}${resourceId}`);
|
|
2893
2893
|
if (token) {
|
|
2894
2894
|
return { accessToken: token, projectId: resourceConfig.projectId };
|
|
2895
2895
|
}
|
|
@@ -2907,8 +2907,8 @@ async function createMastraCode(config) {
|
|
|
2907
2907
|
}
|
|
2908
2908
|
const gatewayRegistry = llm.GatewayRegistry.getInstance({ useDynamicLoading: true });
|
|
2909
2909
|
const authStorage = createAuthStorage();
|
|
2910
|
-
const globalSettings =
|
|
2911
|
-
const storedGatewayKey = authStorage.getStoredApiKey(
|
|
2910
|
+
const globalSettings = chunkUPOCX7P4_cjs.loadSettings(config?.settingsPath);
|
|
2911
|
+
const storedGatewayKey = authStorage.getStoredApiKey(chunkUPOCX7P4_cjs.MEMORY_GATEWAY_PROVIDER);
|
|
2912
2912
|
const storedGatewayUrl = globalSettings.memoryGateway?.baseUrl;
|
|
2913
2913
|
if (storedGatewayKey) {
|
|
2914
2914
|
process.env["MASTRA_GATEWAY_API_KEY"] ??= storedGatewayKey;
|
|
@@ -2923,11 +2923,11 @@ async function createMastraCode(config) {
|
|
|
2923
2923
|
const envVars = cfg?.apiKeyEnvVar;
|
|
2924
2924
|
providerEnvVars[provider] = Array.isArray(envVars) ? envVars[0] : envVars;
|
|
2925
2925
|
}
|
|
2926
|
-
providerEnvVars[
|
|
2926
|
+
providerEnvVars[chunkUPOCX7P4_cjs.MEMORY_GATEWAY_PROVIDER] ??= "MASTRA_GATEWAY_API_KEY";
|
|
2927
2927
|
authStorage.loadStoredApiKeysIntoEnv(providerEnvVars);
|
|
2928
2928
|
} catch {
|
|
2929
2929
|
authStorage.loadStoredApiKeysIntoEnv({
|
|
2930
|
-
[
|
|
2930
|
+
[chunkUPOCX7P4_cjs.MEMORY_GATEWAY_PROVIDER]: "MASTRA_GATEWAY_API_KEY",
|
|
2931
2931
|
anthropic: "ANTHROPIC_API_KEY",
|
|
2932
2932
|
openai: "OPENAI_API_KEY",
|
|
2933
2933
|
google: "GOOGLE_GENERATIVE_AI_API_KEY",
|
|
@@ -3041,7 +3041,7 @@ async function createMastraCode(config) {
|
|
|
3041
3041
|
id: "code-agent",
|
|
3042
3042
|
name: "Code Agent",
|
|
3043
3043
|
instructions: getDynamicInstructions,
|
|
3044
|
-
model:
|
|
3044
|
+
model: chunkUPOCX7P4_cjs.getDynamicModel,
|
|
3045
3045
|
tools: createDynamicTools(mcpManager, config?.extraTools, hookManager, config?.disabledTools),
|
|
3046
3046
|
scorers: {
|
|
3047
3047
|
outcome: {
|
|
@@ -3072,21 +3072,21 @@ async function createMastraCode(config) {
|
|
|
3072
3072
|
name: "Build",
|
|
3073
3073
|
default: true,
|
|
3074
3074
|
defaultModelId: "anthropic/claude-opus-4-6",
|
|
3075
|
-
color:
|
|
3075
|
+
color: chunkUPOCX7P4_cjs.mastra.green,
|
|
3076
3076
|
agent: codeAgent
|
|
3077
3077
|
},
|
|
3078
3078
|
{
|
|
3079
3079
|
id: "plan",
|
|
3080
3080
|
name: "Plan",
|
|
3081
3081
|
defaultModelId: "openai/gpt-5.2-codex",
|
|
3082
|
-
color:
|
|
3082
|
+
color: chunkUPOCX7P4_cjs.mastra.purple,
|
|
3083
3083
|
agent: codeAgent
|
|
3084
3084
|
},
|
|
3085
3085
|
{
|
|
3086
3086
|
id: "fast",
|
|
3087
3087
|
name: "Fast",
|
|
3088
3088
|
defaultModelId: "cerebras/zai-glm-4.7",
|
|
3089
|
-
color:
|
|
3089
|
+
color: chunkUPOCX7P4_cjs.mastra.orange,
|
|
3090
3090
|
agent: codeAgent
|
|
3091
3091
|
}
|
|
3092
3092
|
];
|
|
@@ -3125,11 +3125,11 @@ async function createMastraCode(config) {
|
|
|
3125
3125
|
}
|
|
3126
3126
|
} catch {
|
|
3127
3127
|
}
|
|
3128
|
-
const builtinPacks =
|
|
3129
|
-
const builtinOmPacks =
|
|
3130
|
-
const effectiveDefaults =
|
|
3131
|
-
const effectiveObserverModel =
|
|
3132
|
-
const effectiveReflectorModel =
|
|
3128
|
+
const builtinPacks = chunkUPOCX7P4_cjs.getAvailableModePacks(startupAccess);
|
|
3129
|
+
const builtinOmPacks = chunkUPOCX7P4_cjs.getAvailableOmPacks(startupAccess);
|
|
3130
|
+
const effectiveDefaults = chunkUPOCX7P4_cjs.resolveModelDefaults(globalSettings, builtinPacks);
|
|
3131
|
+
const effectiveObserverModel = chunkUPOCX7P4_cjs.resolveOmRoleModel(globalSettings, "observer", builtinOmPacks);
|
|
3132
|
+
const effectiveReflectorModel = chunkUPOCX7P4_cjs.resolveOmRoleModel(globalSettings, "reflector", builtinOmPacks);
|
|
3133
3133
|
const effectiveObservationThreshold = globalSettings.models.omObservationThreshold ?? void 0;
|
|
3134
3134
|
const effectiveReflectionThreshold = globalSettings.models.omReflectionThreshold ?? void 0;
|
|
3135
3135
|
const effectiveCavemanObservations = globalSettings.models.omCavemanObservations ?? void 0;
|
|
@@ -3201,7 +3201,7 @@ async function createMastraCode(config) {
|
|
|
3201
3201
|
pubsub: signalsPubSub,
|
|
3202
3202
|
stateSchema,
|
|
3203
3203
|
subagents,
|
|
3204
|
-
resolveModel: (modelId) =>
|
|
3204
|
+
resolveModel: (modelId) => chunkUPOCX7P4_cjs.resolveModel(modelId),
|
|
3205
3205
|
toolCategoryResolver: chunkAWYGW5ZV_cjs.getToolCategory,
|
|
3206
3206
|
initialState: {
|
|
3207
3207
|
projectPath: project.rootPath,
|
|
@@ -3216,7 +3216,7 @@ async function createMastraCode(config) {
|
|
|
3216
3216
|
modes,
|
|
3217
3217
|
heartbeatHandlers: config?.heartbeatHandlers ?? defaultHeartbeatHandlers,
|
|
3218
3218
|
modelAuthChecker: (provider) => {
|
|
3219
|
-
const gatewayKey = authStorage.getStoredApiKey(
|
|
3219
|
+
const gatewayKey = authStorage.getStoredApiKey(chunkUPOCX7P4_cjs.MEMORY_GATEWAY_PROVIDER) ?? process.env["MASTRA_GATEWAY_API_KEY"];
|
|
3220
3220
|
if (gatewayKey) {
|
|
3221
3221
|
const providerConfig = gatewayRegistry.getProviders()[provider];
|
|
3222
3222
|
if (providerConfig?.gateway === "mastra") return true;
|
|
@@ -3240,32 +3240,32 @@ async function createMastraCode(config) {
|
|
|
3240
3240
|
return true;
|
|
3241
3241
|
}
|
|
3242
3242
|
}
|
|
3243
|
-
const customProvider =
|
|
3244
|
-
return provider ===
|
|
3243
|
+
const customProvider = chunkUPOCX7P4_cjs.loadSettings().customProviders.find((entry) => {
|
|
3244
|
+
return provider === chunkUPOCX7P4_cjs.getCustomProviderId(entry.name);
|
|
3245
3245
|
});
|
|
3246
3246
|
if (customProvider) {
|
|
3247
3247
|
return true;
|
|
3248
3248
|
}
|
|
3249
3249
|
return void 0;
|
|
3250
3250
|
},
|
|
3251
|
-
modelUseCountProvider: () =>
|
|
3251
|
+
modelUseCountProvider: () => chunkUPOCX7P4_cjs.loadSettings().modelUseCounts,
|
|
3252
3252
|
modelUseCountTracker: (modelId) => {
|
|
3253
3253
|
try {
|
|
3254
|
-
const settings =
|
|
3254
|
+
const settings = chunkUPOCX7P4_cjs.loadSettings();
|
|
3255
3255
|
settings.modelUseCounts[modelId] = (settings.modelUseCounts[modelId] ?? 0) + 1;
|
|
3256
|
-
|
|
3256
|
+
chunkUPOCX7P4_cjs.saveSettings(settings);
|
|
3257
3257
|
} catch (error) {
|
|
3258
3258
|
console.error("Failed to persist model usage count", error);
|
|
3259
3259
|
}
|
|
3260
3260
|
},
|
|
3261
3261
|
customModelCatalogProvider: async () => {
|
|
3262
|
-
const settings =
|
|
3262
|
+
const settings = chunkUPOCX7P4_cjs.loadSettings();
|
|
3263
3263
|
const customModels = [];
|
|
3264
3264
|
for (const provider of settings.customProviders) {
|
|
3265
|
-
const providerId =
|
|
3265
|
+
const providerId = chunkUPOCX7P4_cjs.getCustomProviderId(provider.name);
|
|
3266
3266
|
for (const modelName of provider.models) {
|
|
3267
3267
|
customModels.push({
|
|
3268
|
-
id:
|
|
3268
|
+
id: chunkUPOCX7P4_cjs.toCustomProviderModelId(provider.name, modelName),
|
|
3269
3269
|
provider: providerId,
|
|
3270
3270
|
modelName,
|
|
3271
3271
|
hasApiKey: true,
|
|
@@ -3274,7 +3274,7 @@ async function createMastraCode(config) {
|
|
|
3274
3274
|
}
|
|
3275
3275
|
}
|
|
3276
3276
|
try {
|
|
3277
|
-
const copilotModels = await
|
|
3277
|
+
const copilotModels = await chunkUPOCX7P4_cjs.getCopilotModelCatalog({ authStorage });
|
|
3278
3278
|
for (const m of copilotModels) {
|
|
3279
3279
|
customModels.push({
|
|
3280
3280
|
id: `github-copilot/${m.id}`,
|
|
@@ -3290,8 +3290,8 @@ async function createMastraCode(config) {
|
|
|
3290
3290
|
return customModels;
|
|
3291
3291
|
},
|
|
3292
3292
|
threadLock: crossProcessPubSub ? void 0 : {
|
|
3293
|
-
acquire:
|
|
3294
|
-
release:
|
|
3293
|
+
acquire: chunkUPOCX7P4_cjs.acquireThreadLock,
|
|
3294
|
+
release: chunkUPOCX7P4_cjs.releaseThreadLock
|
|
3295
3295
|
}
|
|
3296
3296
|
});
|
|
3297
3297
|
if (hookManager) {
|
|
@@ -3313,7 +3313,7 @@ async function createMastraCode(config) {
|
|
|
3313
3313
|
hookManager,
|
|
3314
3314
|
signalsPubSub,
|
|
3315
3315
|
authStorage,
|
|
3316
|
-
resolveModel:
|
|
3316
|
+
resolveModel: chunkUPOCX7P4_cjs.resolveModel,
|
|
3317
3317
|
storageWarning,
|
|
3318
3318
|
observabilityWarning,
|
|
3319
3319
|
builtinPacks,
|
|
@@ -3324,5 +3324,5 @@ async function createMastraCode(config) {
|
|
|
3324
3324
|
|
|
3325
3325
|
exports.createAuthStorage = createAuthStorage;
|
|
3326
3326
|
exports.createMastraCode = createMastraCode;
|
|
3327
|
-
//# sourceMappingURL=chunk-
|
|
3328
|
-
//# sourceMappingURL=chunk-
|
|
3327
|
+
//# sourceMappingURL=chunk-5Y65J65P.cjs.map
|
|
3328
|
+
//# sourceMappingURL=chunk-5Y65J65P.cjs.map
|