mastracode 0.21.2-alpha.2 → 0.21.2-alpha.3
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 +42 -0
- package/dist/{chunk-US5JFRXN.cjs → chunk-2TQ5QO5H.cjs} +38 -38
- package/dist/{chunk-US5JFRXN.cjs.map → chunk-2TQ5QO5H.cjs.map} +1 -1
- package/dist/{chunk-UKDTDKN4.js → chunk-535FCN2X.js} +3 -3
- package/dist/{chunk-UKDTDKN4.js.map → chunk-535FCN2X.js.map} +1 -1
- package/dist/{chunk-QJKDPMZA.cjs → chunk-DJBUYADN.cjs} +17 -2
- package/dist/chunk-DJBUYADN.cjs.map +1 -0
- package/dist/{chunk-RTMEH24Q.js → chunk-HFGEUXMI.js} +17 -2
- package/dist/chunk-HFGEUXMI.js.map +1 -0
- package/dist/{chunk-UXKLLBN5.cjs → chunk-NSW6VKHO.cjs} +1389 -939
- package/dist/chunk-NSW6VKHO.cjs.map +1 -0
- package/dist/{chunk-352GFWIW.js → chunk-QHK24KWZ.js} +502 -52
- package/dist/chunk-QHK24KWZ.js.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/onboarding/settings.d.ts +11 -0
- package/dist/onboarding/settings.d.ts.map +1 -1
- package/dist/tui/commands/help.d.ts.map +1 -1
- package/dist/tui/components/ask-question-dialog.d.ts +10 -0
- package/dist/tui/components/ask-question-dialog.d.ts.map +1 -1
- package/dist/tui/components/ask-question-inline.d.ts +20 -0
- package/dist/tui/components/ask-question-inline.d.ts.map +1 -1
- package/dist/tui/components/custom-editor.d.ts.map +1 -1
- package/dist/tui/components/help-overlay.d.ts +2 -0
- package/dist/tui/components/help-overlay.d.ts.map +1 -1
- package/dist/tui/components/wrapping-autocomplete-list.d.ts +42 -0
- package/dist/tui/components/wrapping-autocomplete-list.d.ts.map +1 -0
- package/dist/tui/components/wrapping-select-list.d.ts +7 -1
- package/dist/tui/components/wrapping-select-list.d.ts.map +1 -1
- package/dist/tui/handlers/prompts.d.ts +6 -1
- package/dist/tui/handlers/prompts.d.ts.map +1 -1
- package/dist/tui/shell-config.d.ts +30 -0
- package/dist/tui/shell-config.d.ts.map +1 -0
- package/dist/tui/shell-result.d.ts +13 -0
- package/dist/tui/shell-result.d.ts.map +1 -0
- package/dist/tui/shell-runner.d.ts +26 -0
- package/dist/tui/shell-runner.d.ts.map +1 -0
- package/dist/tui/shell.d.ts.map +1 -1
- package/dist/tui.cjs +19 -19
- package/dist/tui.js +2 -2
- package/package.json +14 -14
- package/dist/chunk-352GFWIW.js.map +0 -1
- package/dist/chunk-QJKDPMZA.cjs.map +0 -1
- package/dist/chunk-RTMEH24Q.js.map +0 -1
- package/dist/chunk-UXKLLBN5.cjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,47 @@
|
|
|
1
1
|
# mastracode
|
|
2
2
|
|
|
3
|
+
## 0.21.2-alpha.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Added configurable shell passthrough for direct TUI `!` commands. You can now choose which shell runs `!` commands via `settings.json` or environment variables, with support for POSIX shells, `cmd.exe`, and PowerShell. ([#17283](https://github.com/mastra-ai/mastra/pull/17283))
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
{
|
|
11
|
+
"shellPassthrough": {
|
|
12
|
+
"mode": "path",
|
|
13
|
+
"executable": "/bin/zsh",
|
|
14
|
+
"family": "posix"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Or via environment variables:
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
export MASTRACODE_SHELL=/bin/zsh
|
|
23
|
+
export MASTRACODE_SHELL_MODE=path
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
The default behavior is preserved when no configuration is set.
|
|
27
|
+
|
|
28
|
+
- Fixed the `ask_user` tool's `multi_select` mode in Mastra Code, which previously rendered as a single-select list and returned only one answer. ([#17334](https://github.com/mastra-ai/mastra/pull/17334))
|
|
29
|
+
|
|
30
|
+
When an agent calls `ask_user` with `selectionMode: "multi_select"`, the CLI now shows a multi-select picker — press Space to toggle each option and Enter to confirm — and returns every selected label to the agent as an array instead of a single string.
|
|
31
|
+
|
|
32
|
+
- Wrap long slash-command and skill descriptions in the autocomplete picker instead of truncating them on a single line. The picker dropdown now word-wraps descriptions across multiple rows (continuation rows indented under the description column), so long command/skill descriptions stay fully readable without widening the terminal. ([#17333](https://github.com/mastra-ai/mastra/pull/17333))
|
|
33
|
+
|
|
34
|
+
- Updated dependencies [[`00eca42`](https://github.com/mastra-ai/mastra/commit/00eca4252393aa114dc8c9a5e1da68df91fa06cf), [`8ace89d`](https://github.com/mastra-ai/mastra/commit/8ace89df77f762e622d3b9f7f65ad7524350d050), [`fa63872`](https://github.com/mastra-ai/mastra/commit/fa6387280954e6b667bec5714b55ba082bc627ff), [`f07b646`](https://github.com/mastra-ai/mastra/commit/f07b64604ab7d25391179790b7fd4823df9e2dff), [`d8838ae`](https://github.com/mastra-ai/mastra/commit/d8838ae80b69780361693d27098f7f6684af12fe), [`40f9297`](https://github.com/mastra-ai/mastra/commit/40f9297003b921c62373d3e8d3a4bda76c9f6de3), [`82785f6`](https://github.com/mastra-ai/mastra/commit/82785f614bad7936ecbdcb526673f8da47779731), [`0f0d1ba`](https://github.com/mastra-ai/mastra/commit/0f0d1ba67bfcb2204e571401662f1eceefc03357), [`8c31bcd`](https://github.com/mastra-ai/mastra/commit/8c31bcdb00e597880d5939b1b7d7566fbe5dacae), [`95b14cd`](https://github.com/mastra-ai/mastra/commit/95b14cdd820e86d97ac05fe568424c513a252e31), [`2c79486`](https://github.com/mastra-ai/mastra/commit/2c79486e1a812db9bfc8fd25a93dd47359b330e7), [`cb137cd`](https://github.com/mastra-ai/mastra/commit/cb137cdeed7c15ea4e8061f79d1d55d2ecea74d7), [`0e51c36`](https://github.com/mastra-ai/mastra/commit/0e51c362be673502ac79626a75d1416479b0b76e), [`aa36be2`](https://github.com/mastra-ai/mastra/commit/aa36be23aa513b7dc53cb8ca16b7fab8f20e43ad), [`212c635`](https://github.com/mastra-ai/mastra/commit/212c635203e61d036ab41db8ff86c3893dc795b3), [`d8838ae`](https://github.com/mastra-ai/mastra/commit/d8838ae80b69780361693d27098f7f6684af12fe), [`9aa5a73`](https://github.com/mastra-ai/mastra/commit/9aa5a73e7e110f6e9365eec69364a33d5f03bb56), [`f73c789`](https://github.com/mastra-ai/mastra/commit/f73c789e8ef21561580395d2c410119cab5848c8), [`8bd16da`](https://github.com/mastra-ai/mastra/commit/8bd16da73a4cb874d739373643dbd6a6e7f88684), [`09be9d9`](https://github.com/mastra-ai/mastra/commit/09be9d92043fc8db5b82319a729071ebfee26cca), [`c8630f8`](https://github.com/mastra-ai/mastra/commit/c8630f80d4f40cb5d22e60ab162b618b1907167a), [`8cdde58`](https://github.com/mastra-ai/mastra/commit/8cdde5875bbba6702d9df226f2b20232b8d75d6c), [`47f71dc`](https://github.com/mastra-ai/mastra/commit/47f71dc6fbcbd12d71e21a979e676e20a02bd77d), [`e191065`](https://github.com/mastra-ai/mastra/commit/e191065af6039cf6388e05aa2b84f6f5d69af4c9), [`50ceae2`](https://github.com/mastra-ai/mastra/commit/50ceae270878e2f8fb2b2c6c2faab09df0007c8a), [`8cdde58`](https://github.com/mastra-ai/mastra/commit/8cdde5875bbba6702d9df226f2b20232b8d75d6c), [`847ff1e`](https://github.com/mastra-ai/mastra/commit/847ff1e0d94368d94b2e173e4e0908e115568ef3), [`259d409`](https://github.com/mastra-ai/mastra/commit/259d409a514174299dbde1ff5e1121209b3ba850), [`9e16c68`](https://github.com/mastra-ai/mastra/commit/9e16c6818b6485ccb43df28aba6f3a2219d28662), [`a3372df`](https://github.com/mastra-ai/mastra/commit/a3372dfaf107461f47fb50a6f90088fa01d87567), [`cefca33`](https://github.com/mastra-ai/mastra/commit/cefca33ae666e69810c935fedf95a929c173d1d7), [`d00e8c5`](https://github.com/mastra-ai/mastra/commit/d00e8c50daebe5bce5bf2f48bde39c86fc3d2fe4), [`36fa7e2`](https://github.com/mastra-ai/mastra/commit/36fa7e24d14e58a1eb46147097b32f583e5b8775), [`87e9774`](https://github.com/mastra-ai/mastra/commit/87e97741c1e493cd6d62f478eb810b49bda4d57c), [`65a72e7`](https://github.com/mastra-ai/mastra/commit/65a72e70c25eedea8ff985a6624b96be2850236b), [`0f77241`](https://github.com/mastra-ai/mastra/commit/0f7724108806703799a8ba80ad0f09414afd5066), [`d8838ae`](https://github.com/mastra-ai/mastra/commit/d8838ae80b69780361693d27098f7f6684af12fe), [`92ff509`](https://github.com/mastra-ai/mastra/commit/92ff5098ef8a990438ca038077021a5f7541ec1d), [`3fce5e7`](https://github.com/mastra-ai/mastra/commit/3fce5e70d011d289043e75003ef3336ed4aa43c3), [`a763592`](https://github.com/mastra-ai/mastra/commit/a763592c3db46963ef1011cfe16fe372816e775e), [`80c7737`](https://github.com/mastra-ai/mastra/commit/80c7737e32d7917b5f356957d67c169d01744fd3), [`9f9a8dc`](https://github.com/mastra-ai/mastra/commit/9f9a8dc97684a0a9879390faf4525f3225ef8453), [`ab3b611`](https://github.com/mastra-ai/mastra/commit/ab3b611d086c07d7e0c9ece270b51fc17b9f54b8), [`3f1cf47`](https://github.com/mastra-ai/mastra/commit/3f1cf476f74c1e4cc2df908837e05853a5347e31), [`ff9d743`](https://github.com/mastra-ai/mastra/commit/ff9d743f71d7e072927725c0d700632aca0c1fee)]:
|
|
35
|
+
- @mastra/schema-compat@1.2.11-alpha.0
|
|
36
|
+
- @mastra/core@1.38.0-alpha.3
|
|
37
|
+
- @mastra/mcp@1.9.0-alpha.0
|
|
38
|
+
- @mastra/observability@1.14.1-alpha.0
|
|
39
|
+
- @mastra/fastembed@1.1.2-alpha.0
|
|
40
|
+
- @mastra/libsql@1.12.0-alpha.0
|
|
41
|
+
- @mastra/memory@1.20.1-alpha.1
|
|
42
|
+
- @mastra/agent-browser@0.3.0-alpha.0
|
|
43
|
+
- @mastra/pg@1.12.0-alpha.0
|
|
44
|
+
|
|
3
45
|
## 0.21.2-alpha.2
|
|
4
46
|
|
|
5
47
|
### Patch Changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkDJBUYADN_cjs = require('./chunk-DJBUYADN.cjs');
|
|
4
4
|
var chunkJ3ISOP5J_cjs = require('./chunk-J3ISOP5J.cjs');
|
|
5
5
|
var chunkAWYGW5ZV_cjs = require('./chunk-AWYGW5ZV.cjs');
|
|
6
6
|
var path = require('path');
|
|
@@ -598,8 +598,8 @@ function getDynamicWorkspace({ requestContext, mastra: mastra2 }) {
|
|
|
598
598
|
existing.setToolsConfig(isPlanMode ? { ...chunkAWYGW5ZV_cjs.TOOL_NAME_OVERRIDES, ...planModeTools } : chunkAWYGW5ZV_cjs.TOOL_NAME_OVERRIDES);
|
|
599
599
|
return existing;
|
|
600
600
|
}
|
|
601
|
-
const userLsp =
|
|
602
|
-
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-
|
|
601
|
+
const userLsp = chunkDJBUYADN_cjs.loadSettings().lsp ?? {};
|
|
602
|
+
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-2TQ5QO5H.cjs', document.baseURI).href)))), "..");
|
|
603
603
|
const lspConfig = {
|
|
604
604
|
...userLsp,
|
|
605
605
|
packageRunner: userLsp.packageRunner || detectPackageRunner(projectPath),
|
|
@@ -1067,14 +1067,14 @@ function getHarnessState(requestContext) {
|
|
|
1067
1067
|
}
|
|
1068
1068
|
function getObserverModel({ requestContext }) {
|
|
1069
1069
|
const state = getHarnessState(requestContext);
|
|
1070
|
-
return
|
|
1070
|
+
return chunkDJBUYADN_cjs.resolveModel(state?.observerModelId ?? chunkJ3ISOP5J_cjs.DEFAULT_OM_MODEL_ID, {
|
|
1071
1071
|
remapForCodexOAuth: true,
|
|
1072
1072
|
requestContext
|
|
1073
1073
|
});
|
|
1074
1074
|
}
|
|
1075
1075
|
function getReflectorModel({ requestContext }) {
|
|
1076
1076
|
const state = getHarnessState(requestContext);
|
|
1077
|
-
return
|
|
1077
|
+
return chunkDJBUYADN_cjs.resolveModel(state?.reflectorModelId ?? chunkJ3ISOP5J_cjs.DEFAULT_OM_MODEL_ID, {
|
|
1078
1078
|
remapForCodexOAuth: true,
|
|
1079
1079
|
requestContext
|
|
1080
1080
|
});
|
|
@@ -3029,15 +3029,15 @@ var PROVIDER_TO_OAUTH_ID = {
|
|
|
3029
3029
|
};
|
|
3030
3030
|
function createAuthStorage() {
|
|
3031
3031
|
const authStorage = new chunkJ3ISOP5J_cjs.AuthStorage();
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3032
|
+
chunkDJBUYADN_cjs.setAuthStorage(authStorage);
|
|
3033
|
+
chunkDJBUYADN_cjs.setAuthStorage3(authStorage);
|
|
3034
|
+
chunkDJBUYADN_cjs.setAuthStorage2(authStorage);
|
|
3035
3035
|
return authStorage;
|
|
3036
3036
|
}
|
|
3037
3037
|
function resolveCloudObservabilityConfig(settings, authStorage, resourceId) {
|
|
3038
3038
|
const resourceConfig = settings.observability.resources[resourceId];
|
|
3039
3039
|
if (resourceConfig) {
|
|
3040
|
-
const token = authStorage.getStoredApiKey(`${
|
|
3040
|
+
const token = authStorage.getStoredApiKey(`${chunkDJBUYADN_cjs.OBSERVABILITY_AUTH_PREFIX}${resourceId}`);
|
|
3041
3041
|
if (token) {
|
|
3042
3042
|
return { accessToken: token, projectId: resourceConfig.projectId };
|
|
3043
3043
|
}
|
|
@@ -3059,8 +3059,8 @@ async function createMastraCode(config) {
|
|
|
3059
3059
|
}
|
|
3060
3060
|
const gatewayRegistry = llm.GatewayRegistry.getInstance({ useDynamicLoading: true });
|
|
3061
3061
|
const authStorage = createAuthStorage();
|
|
3062
|
-
const globalSettings =
|
|
3063
|
-
const storedGatewayKey = authStorage.getStoredApiKey(
|
|
3062
|
+
const globalSettings = chunkDJBUYADN_cjs.loadSettings(config?.settingsPath);
|
|
3063
|
+
const storedGatewayKey = authStorage.getStoredApiKey(chunkDJBUYADN_cjs.MEMORY_GATEWAY_PROVIDER);
|
|
3064
3064
|
const storedGatewayUrl = globalSettings.memoryGateway?.baseUrl;
|
|
3065
3065
|
if (storedGatewayKey) {
|
|
3066
3066
|
process.env["MASTRA_GATEWAY_API_KEY"] ??= storedGatewayKey;
|
|
@@ -3075,11 +3075,11 @@ async function createMastraCode(config) {
|
|
|
3075
3075
|
const envVars = cfg?.apiKeyEnvVar;
|
|
3076
3076
|
providerEnvVars[provider] = Array.isArray(envVars) ? envVars[0] : envVars;
|
|
3077
3077
|
}
|
|
3078
|
-
providerEnvVars[
|
|
3078
|
+
providerEnvVars[chunkDJBUYADN_cjs.MEMORY_GATEWAY_PROVIDER] ??= "MASTRA_GATEWAY_API_KEY";
|
|
3079
3079
|
authStorage.loadStoredApiKeysIntoEnv(providerEnvVars);
|
|
3080
3080
|
} catch {
|
|
3081
3081
|
authStorage.loadStoredApiKeysIntoEnv({
|
|
3082
|
-
[
|
|
3082
|
+
[chunkDJBUYADN_cjs.MEMORY_GATEWAY_PROVIDER]: "MASTRA_GATEWAY_API_KEY",
|
|
3083
3083
|
anthropic: "ANTHROPIC_API_KEY",
|
|
3084
3084
|
openai: "OPENAI_API_KEY",
|
|
3085
3085
|
google: "GOOGLE_GENERATIVE_AI_API_KEY",
|
|
@@ -3193,7 +3193,7 @@ async function createMastraCode(config) {
|
|
|
3193
3193
|
id: "code-agent",
|
|
3194
3194
|
name: "Code Agent",
|
|
3195
3195
|
instructions: getDynamicInstructions,
|
|
3196
|
-
model:
|
|
3196
|
+
model: chunkDJBUYADN_cjs.getDynamicModel,
|
|
3197
3197
|
tools: createDynamicTools(mcpManager, config?.extraTools, hookManager, config?.disabledTools),
|
|
3198
3198
|
scorers: {
|
|
3199
3199
|
outcome: {
|
|
@@ -3224,21 +3224,21 @@ async function createMastraCode(config) {
|
|
|
3224
3224
|
name: "Build",
|
|
3225
3225
|
default: true,
|
|
3226
3226
|
defaultModelId: "anthropic/claude-opus-4-6",
|
|
3227
|
-
color:
|
|
3227
|
+
color: chunkDJBUYADN_cjs.mastra.green,
|
|
3228
3228
|
agent: codeAgent
|
|
3229
3229
|
},
|
|
3230
3230
|
{
|
|
3231
3231
|
id: "plan",
|
|
3232
3232
|
name: "Plan",
|
|
3233
3233
|
defaultModelId: "openai/gpt-5.2-codex",
|
|
3234
|
-
color:
|
|
3234
|
+
color: chunkDJBUYADN_cjs.mastra.purple,
|
|
3235
3235
|
agent: codeAgent
|
|
3236
3236
|
},
|
|
3237
3237
|
{
|
|
3238
3238
|
id: "fast",
|
|
3239
3239
|
name: "Fast",
|
|
3240
3240
|
defaultModelId: "cerebras/zai-glm-4.7",
|
|
3241
|
-
color:
|
|
3241
|
+
color: chunkDJBUYADN_cjs.mastra.orange,
|
|
3242
3242
|
agent: codeAgent
|
|
3243
3243
|
}
|
|
3244
3244
|
];
|
|
@@ -3277,11 +3277,11 @@ async function createMastraCode(config) {
|
|
|
3277
3277
|
}
|
|
3278
3278
|
} catch {
|
|
3279
3279
|
}
|
|
3280
|
-
const builtinPacks =
|
|
3281
|
-
const builtinOmPacks =
|
|
3282
|
-
const effectiveDefaults =
|
|
3283
|
-
const effectiveObserverModel =
|
|
3284
|
-
const effectiveReflectorModel =
|
|
3280
|
+
const builtinPacks = chunkDJBUYADN_cjs.getAvailableModePacks(startupAccess);
|
|
3281
|
+
const builtinOmPacks = chunkDJBUYADN_cjs.getAvailableOmPacks(startupAccess);
|
|
3282
|
+
const effectiveDefaults = chunkDJBUYADN_cjs.resolveModelDefaults(globalSettings, builtinPacks);
|
|
3283
|
+
const effectiveObserverModel = chunkDJBUYADN_cjs.resolveOmRoleModel(globalSettings, "observer", builtinOmPacks);
|
|
3284
|
+
const effectiveReflectorModel = chunkDJBUYADN_cjs.resolveOmRoleModel(globalSettings, "reflector", builtinOmPacks);
|
|
3285
3285
|
const effectiveObservationThreshold = globalSettings.models.omObservationThreshold ?? void 0;
|
|
3286
3286
|
const effectiveReflectionThreshold = globalSettings.models.omReflectionThreshold ?? void 0;
|
|
3287
3287
|
const effectiveCavemanObservations = globalSettings.models.omCavemanObservations ?? void 0;
|
|
@@ -3354,7 +3354,7 @@ async function createMastraCode(config) {
|
|
|
3354
3354
|
pubsub: signalsPubSub,
|
|
3355
3355
|
stateSchema: typedStateSchema,
|
|
3356
3356
|
subagents,
|
|
3357
|
-
resolveModel: (modelId) =>
|
|
3357
|
+
resolveModel: (modelId) => chunkDJBUYADN_cjs.resolveModel(modelId),
|
|
3358
3358
|
toolCategoryResolver: chunkAWYGW5ZV_cjs.getToolCategory,
|
|
3359
3359
|
initialState: {
|
|
3360
3360
|
projectPath: project.rootPath,
|
|
@@ -3372,7 +3372,7 @@ async function createMastraCode(config) {
|
|
|
3372
3372
|
modes,
|
|
3373
3373
|
heartbeatHandlers: config?.heartbeatHandlers ?? defaultHeartbeatHandlers,
|
|
3374
3374
|
modelAuthChecker: (provider) => {
|
|
3375
|
-
const gatewayKey = authStorage.getStoredApiKey(
|
|
3375
|
+
const gatewayKey = authStorage.getStoredApiKey(chunkDJBUYADN_cjs.MEMORY_GATEWAY_PROVIDER) ?? process.env["MASTRA_GATEWAY_API_KEY"];
|
|
3376
3376
|
if (gatewayKey) {
|
|
3377
3377
|
const providerConfig = gatewayRegistry.getProviders()[provider];
|
|
3378
3378
|
if (providerConfig?.gateway === "mastra") return true;
|
|
@@ -3396,32 +3396,32 @@ async function createMastraCode(config) {
|
|
|
3396
3396
|
return true;
|
|
3397
3397
|
}
|
|
3398
3398
|
}
|
|
3399
|
-
const customProvider =
|
|
3400
|
-
return provider ===
|
|
3399
|
+
const customProvider = chunkDJBUYADN_cjs.loadSettings().customProviders.find((entry) => {
|
|
3400
|
+
return provider === chunkDJBUYADN_cjs.getCustomProviderId(entry.name);
|
|
3401
3401
|
});
|
|
3402
3402
|
if (customProvider) {
|
|
3403
3403
|
return true;
|
|
3404
3404
|
}
|
|
3405
3405
|
return void 0;
|
|
3406
3406
|
},
|
|
3407
|
-
modelUseCountProvider: () =>
|
|
3407
|
+
modelUseCountProvider: () => chunkDJBUYADN_cjs.loadSettings().modelUseCounts,
|
|
3408
3408
|
modelUseCountTracker: (modelId) => {
|
|
3409
3409
|
try {
|
|
3410
|
-
const settings =
|
|
3410
|
+
const settings = chunkDJBUYADN_cjs.loadSettings();
|
|
3411
3411
|
settings.modelUseCounts[modelId] = (settings.modelUseCounts[modelId] ?? 0) + 1;
|
|
3412
|
-
|
|
3412
|
+
chunkDJBUYADN_cjs.saveSettings(settings);
|
|
3413
3413
|
} catch (error) {
|
|
3414
3414
|
console.error("Failed to persist model usage count", error);
|
|
3415
3415
|
}
|
|
3416
3416
|
},
|
|
3417
3417
|
customModelCatalogProvider: async () => {
|
|
3418
|
-
const settings =
|
|
3418
|
+
const settings = chunkDJBUYADN_cjs.loadSettings();
|
|
3419
3419
|
const customModels = [];
|
|
3420
3420
|
for (const provider of settings.customProviders) {
|
|
3421
|
-
const providerId =
|
|
3421
|
+
const providerId = chunkDJBUYADN_cjs.getCustomProviderId(provider.name);
|
|
3422
3422
|
for (const modelName of provider.models) {
|
|
3423
3423
|
customModels.push({
|
|
3424
|
-
id:
|
|
3424
|
+
id: chunkDJBUYADN_cjs.toCustomProviderModelId(provider.name, modelName),
|
|
3425
3425
|
provider: providerId,
|
|
3426
3426
|
modelName,
|
|
3427
3427
|
hasApiKey: true,
|
|
@@ -3430,7 +3430,7 @@ async function createMastraCode(config) {
|
|
|
3430
3430
|
}
|
|
3431
3431
|
}
|
|
3432
3432
|
try {
|
|
3433
|
-
const copilotModels = await
|
|
3433
|
+
const copilotModels = await chunkDJBUYADN_cjs.getCopilotModelCatalog({ authStorage });
|
|
3434
3434
|
for (const m of copilotModels) {
|
|
3435
3435
|
customModels.push({
|
|
3436
3436
|
id: `github-copilot/${m.id}`,
|
|
@@ -3446,8 +3446,8 @@ async function createMastraCode(config) {
|
|
|
3446
3446
|
return customModels;
|
|
3447
3447
|
},
|
|
3448
3448
|
threadLock: crossProcessPubSub ? void 0 : {
|
|
3449
|
-
acquire:
|
|
3450
|
-
release:
|
|
3449
|
+
acquire: chunkDJBUYADN_cjs.acquireThreadLock,
|
|
3450
|
+
release: chunkDJBUYADN_cjs.releaseThreadLock
|
|
3451
3451
|
}
|
|
3452
3452
|
});
|
|
3453
3453
|
if (hookManager) {
|
|
@@ -3469,7 +3469,7 @@ async function createMastraCode(config) {
|
|
|
3469
3469
|
hookManager,
|
|
3470
3470
|
signalsPubSub,
|
|
3471
3471
|
authStorage,
|
|
3472
|
-
resolveModel:
|
|
3472
|
+
resolveModel: chunkDJBUYADN_cjs.resolveModel,
|
|
3473
3473
|
storageWarning,
|
|
3474
3474
|
observabilityWarning,
|
|
3475
3475
|
builtinPacks,
|
|
@@ -3480,5 +3480,5 @@ async function createMastraCode(config) {
|
|
|
3480
3480
|
|
|
3481
3481
|
exports.createAuthStorage = createAuthStorage;
|
|
3482
3482
|
exports.createMastraCode = createMastraCode;
|
|
3483
|
-
//# sourceMappingURL=chunk-
|
|
3484
|
-
//# sourceMappingURL=chunk-
|
|
3483
|
+
//# sourceMappingURL=chunk-2TQ5QO5H.cjs.map
|
|
3484
|
+
//# sourceMappingURL=chunk-2TQ5QO5H.cjs.map
|