mastracode 0.18.0-alpha.18 → 0.18.0-alpha.19
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 +10 -0
- package/dist/{chunk-MKJKKF6D.js → chunk-36KKPIKN.js} +14 -23
- package/dist/chunk-36KKPIKN.js.map +1 -0
- package/dist/{chunk-OQ56FG2P.cjs → chunk-SAKYZ2QG.cjs} +27 -46
- package/dist/chunk-SAKYZ2QG.cjs.map +1 -0
- package/dist/{chunk-QK2I7CGD.js → chunk-V5X5S6A2.js} +27 -46
- package/dist/chunk-V5X5S6A2.js.map +1 -0
- package/dist/{chunk-ZUZ5QUED.cjs → chunk-XAU4ESBR.cjs} +14 -23
- package/dist/chunk-XAU4ESBR.cjs.map +1 -0
- package/dist/cli.cjs +23 -15
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +20 -12
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/tui/mastra-tui.d.ts.map +1 -1
- package/dist/tui/render-messages.d.ts.map +1 -1
- package/dist/tui.cjs +11 -11
- package/dist/tui.js +1 -1
- package/dist/utils/storage-factory.d.ts.map +1 -1
- package/package.json +6 -6
- package/dist/chunk-MKJKKF6D.js.map +0 -1
- package/dist/chunk-OQ56FG2P.cjs.map +0 -1
- package/dist/chunk-QK2I7CGD.js.map +0 -1
- package/dist/chunk-ZUZ5QUED.cjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# mastracode
|
|
2
2
|
|
|
3
|
+
## 0.18.0-alpha.19
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Improved Mastra Code startup time by loading only the most recent thread messages during initial render, using app-specific local LibSQL PRAGMA tuning, and deferring browser setup, gateway sync, and update checks until after first render. ([#16513](https://github.com/mastra-ai/mastra/pull/16513))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`4999667`](https://github.com/mastra-ai/mastra/commit/49996678b68356cad7f088430009690406c50fbd), [`4999667`](https://github.com/mastra-ai/mastra/commit/49996678b68356cad7f088430009690406c50fbd), [`4999667`](https://github.com/mastra-ai/mastra/commit/49996678b68356cad7f088430009690406c50fbd)]:
|
|
10
|
+
- @mastra/libsql@1.10.1-alpha.3
|
|
11
|
+
- @mastra/core@1.33.0-alpha.17
|
|
12
|
+
|
|
3
13
|
## 0.18.0-alpha.18
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -19,7 +19,7 @@ import os__default, { homedir } from 'os';
|
|
|
19
19
|
import { LocalFilesystem, Workspace, LocalSandbox } from '@mastra/core/workspace';
|
|
20
20
|
import { z } from 'zod';
|
|
21
21
|
import * as fs2 from 'fs';
|
|
22
|
-
import {
|
|
22
|
+
import { readFileSync, existsSync } from 'fs';
|
|
23
23
|
import { fileURLToPath } from 'url';
|
|
24
24
|
import { fastembed } from '@mastra/fastembed';
|
|
25
25
|
import { Memory } from '@mastra/memory';
|
|
@@ -582,13 +582,6 @@ function getDynamicWorkspace({ requestContext, mastra: mastra2 }) {
|
|
|
582
582
|
lsp: lspConfig
|
|
583
583
|
});
|
|
584
584
|
}
|
|
585
|
-
var loadedSkillPaths = skillPaths.filter((p) => existsSync(p));
|
|
586
|
-
if (loadedSkillPaths.length > 0) {
|
|
587
|
-
console.info(`Skills loaded from:`);
|
|
588
|
-
for (const p of loadedSkillPaths) {
|
|
589
|
-
console.info(` - ${p}`);
|
|
590
|
-
}
|
|
591
|
-
}
|
|
592
585
|
|
|
593
586
|
// src/tools/utils.ts
|
|
594
587
|
function isPathAllowed(targetPath, projectRoot, allowedPaths = []) {
|
|
@@ -2681,10 +2674,15 @@ async function syncGateways(force = false) {
|
|
|
2681
2674
|
isSyncing = false;
|
|
2682
2675
|
}
|
|
2683
2676
|
}
|
|
2677
|
+
var MASTRA_CODE_LOCAL_PRAGMAS = {
|
|
2678
|
+
cacheSize: -128e3,
|
|
2679
|
+
mmapSize: 536870912
|
|
2680
|
+
};
|
|
2684
2681
|
function createFallbackLibSQL() {
|
|
2685
2682
|
return new LibSQLStore({
|
|
2686
2683
|
id: "mastra-code-storage",
|
|
2687
|
-
url: `file:${getDatabasePath()}
|
|
2684
|
+
url: `file:${getDatabasePath()}`,
|
|
2685
|
+
localPragmas: MASTRA_CODE_LOCAL_PRAGMAS
|
|
2688
2686
|
});
|
|
2689
2687
|
}
|
|
2690
2688
|
async function createStorage(config) {
|
|
@@ -2695,7 +2693,8 @@ async function createStorage(config) {
|
|
|
2695
2693
|
storage: new LibSQLStore({
|
|
2696
2694
|
id: "mastra-code-storage",
|
|
2697
2695
|
url: config.url,
|
|
2698
|
-
...config.authToken ? { authToken: config.authToken } : {}
|
|
2696
|
+
...config.authToken ? { authToken: config.authToken } : {},
|
|
2697
|
+
localPragmas: MASTRA_CODE_LOCAL_PRAGMAS
|
|
2699
2698
|
}),
|
|
2700
2699
|
backend: "libsql"
|
|
2701
2700
|
};
|
|
@@ -2818,12 +2817,9 @@ async function createMastraCode(config) {
|
|
|
2818
2817
|
deepseek: "DEEPSEEK_API_KEY"
|
|
2819
2818
|
});
|
|
2820
2819
|
}
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
console.warn("Failed to sync gateways at startup", error);
|
|
2825
|
-
}
|
|
2826
|
-
const mgApiKey = authStorage.getStoredApiKey(MEMORY_GATEWAY_PROVIDER) ?? process.env["MASTRA_GATEWAY_API_KEY"];
|
|
2820
|
+
void Promise.resolve(gatewayRegistry.syncGateways(true)).catch(() => {
|
|
2821
|
+
});
|
|
2822
|
+
const mgApiKey = storedGatewayKey ?? process.env["MASTRA_GATEWAY_API_KEY"];
|
|
2827
2823
|
const project = detectProject(cwd);
|
|
2828
2824
|
const resourceIdOverride = getResourceIdOverride(project.rootPath);
|
|
2829
2825
|
if (resourceIdOverride) {
|
|
@@ -2914,11 +2910,6 @@ async function createMastraCode(config) {
|
|
|
2914
2910
|
const memory = config?.memory ?? getDynamicMemory(storage, vectorStore);
|
|
2915
2911
|
const mcpManager = config?.disableMcp ? void 0 : createMcpManager(project.rootPath, config?.mcpServers);
|
|
2916
2912
|
const hookManager = config?.disableHooks ? void 0 : new HookManager(project.rootPath, "session-init");
|
|
2917
|
-
if (hookManager?.hasHooks()) {
|
|
2918
|
-
const hookConfig = hookManager.getConfig();
|
|
2919
|
-
const hookCount = Object.values(hookConfig).reduce((sum, hooks) => sum + (hooks?.length ?? 0), 0);
|
|
2920
|
-
console.info(`Hooks: ${hookCount} hook(s) configured`);
|
|
2921
|
-
}
|
|
2922
2913
|
const outcomeScorer = createOutcomeScorer();
|
|
2923
2914
|
const efficiencyScorer = createEfficiencyScorer();
|
|
2924
2915
|
const codeAgent = new Agent({
|
|
@@ -3201,5 +3192,5 @@ async function createMastraCode(config) {
|
|
|
3201
3192
|
}
|
|
3202
3193
|
|
|
3203
3194
|
export { createAuthStorage, createMastraCode };
|
|
3204
|
-
//# sourceMappingURL=chunk-
|
|
3205
|
-
//# sourceMappingURL=chunk-
|
|
3195
|
+
//# sourceMappingURL=chunk-36KKPIKN.js.map
|
|
3196
|
+
//# sourceMappingURL=chunk-36KKPIKN.js.map
|