mastracode 0.30.1-alpha.2 → 0.31.0-alpha.10
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 +114 -0
- package/README.md +8 -45
- package/dist/{chunk-73PDBQZY.js → chunk-DOIRTZT6.js} +736 -443
- package/dist/chunk-DOIRTZT6.js.map +1 -0
- package/dist/{chunk-SYQIV27J.cjs → chunk-FWMMMQLI.cjs} +736 -443
- package/dist/chunk-FWMMMQLI.cjs.map +1 -0
- package/dist/cli.cjs +6 -5
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +2 -1
- package/dist/cli.js.map +1 -1
- package/dist/tui/command-dispatch.d.ts.map +1 -1
- package/dist/tui/commands/index.d.ts +2 -1
- package/dist/tui/commands/index.d.ts.map +1 -1
- package/dist/tui/commands/login.d.ts.map +1 -1
- package/dist/tui/commands/mastra-gateway.d.ts +3 -0
- package/dist/tui/commands/mastra-gateway.d.ts.map +1 -0
- package/dist/tui/commands/prune.d.ts +3 -0
- package/dist/tui/commands/prune.d.ts.map +1 -0
- package/dist/tui/components/custom-editor.d.ts +2 -0
- package/dist/tui/components/custom-editor.d.ts.map +1 -1
- package/dist/tui/components/help-overlay.d.ts.map +1 -1
- package/dist/tui/components/judge-display.d.ts +3 -3
- package/dist/tui/components/judge-display.d.ts.map +1 -1
- package/dist/tui/components/notification.d.ts +4 -2
- package/dist/tui/components/notification.d.ts.map +1 -1
- package/dist/tui/components/om-output.d.ts +3 -3
- package/dist/tui/components/om-output.d.ts.map +1 -1
- package/dist/tui/components/om-progress.d.ts +15 -27
- package/dist/tui/components/om-progress.d.ts.map +1 -1
- package/dist/tui/components/om-settings.d.ts.map +1 -1
- package/dist/tui/components/shell-output.d.ts +3 -3
- package/dist/tui/components/shell-output.d.ts.map +1 -1
- package/dist/tui/components/slash-command.d.ts +3 -3
- package/dist/tui/components/slash-command.d.ts.map +1 -1
- package/dist/tui/components/subagent-execution.d.ts +3 -3
- package/dist/tui/components/subagent-execution.d.ts.map +1 -1
- package/dist/tui/components/system-reminder.d.ts +3 -3
- package/dist/tui/components/system-reminder.d.ts.map +1 -1
- package/dist/tui/components/task-progress.d.ts +3 -9
- package/dist/tui/components/task-progress.d.ts.map +1 -1
- package/dist/tui/components/tool-execution-enhanced.d.ts +6 -5
- package/dist/tui/components/tool-execution-enhanced.d.ts.map +1 -1
- package/dist/tui/components/width-aware-container.d.ts +10 -0
- package/dist/tui/components/width-aware-container.d.ts.map +1 -0
- package/dist/tui/event-dispatch.d.ts.map +1 -1
- package/dist/tui/handlers/agent-lifecycle.d.ts.map +1 -1
- package/dist/tui/handlers/index.d.ts +1 -1
- package/dist/tui/handlers/index.d.ts.map +1 -1
- package/dist/tui/handlers/message.d.ts.map +1 -1
- package/dist/tui/handlers/subagent.d.ts.map +1 -1
- package/dist/tui/handlers/tool.d.ts +5 -3
- package/dist/tui/handlers/tool.d.ts.map +1 -1
- package/dist/tui/mastra-tui.d.ts.map +1 -1
- package/dist/tui/render-scheduler.d.ts +24 -0
- package/dist/tui/render-scheduler.d.ts.map +1 -0
- package/dist/tui/setup.d.ts.map +1 -1
- package/dist/tui/state.d.ts +5 -0
- package/dist/tui/state.d.ts.map +1 -1
- package/dist/tui/status-line.d.ts.map +1 -1
- package/dist/tui.cjs +18 -18
- package/dist/tui.js +1 -1
- package/package.json +25 -22
- package/dist/chunk-73PDBQZY.js.map +0 -1
- package/dist/chunk-SYQIV27J.cjs.map +0 -1
- package/dist/tui/commands/memory-gateway.d.ts +0 -3
- package/dist/tui/commands/memory-gateway.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,119 @@
|
|
|
1
1
|
# mastracode
|
|
2
2
|
|
|
3
|
+
## 0.31.0-alpha.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`edce8d2`](https://github.com/mastra-ai/mastra/commit/edce8d2769f19e27a05737c627af2d765472a4f8)]:
|
|
8
|
+
- @mastra/core@1.51.0-alpha.9
|
|
9
|
+
- @mastra/code-sdk@0.1.0-alpha.9
|
|
10
|
+
|
|
11
|
+
## 0.31.0-alpha.9
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Improved Mastra Code responsiveness while tool inputs and command output stream. ([#19376](https://github.com/mastra-ai/mastra/pull/19376))
|
|
16
|
+
|
|
17
|
+
- dependencies updates: ([#16699](https://github.com/mastra-ai/mastra/pull/16699))
|
|
18
|
+
- Updated dependency [`@ai-sdk/amazon-bedrock@^3.0.105` ↗︎](https://www.npmjs.com/package/@ai-sdk/amazon-bedrock/v/3.0.105) (from `^3.0.102`, in `dependencies`)
|
|
19
|
+
- Updated dependency [`@ai-sdk/anthropic@^3.0.92` ↗︎](https://www.npmjs.com/package/@ai-sdk/anthropic/v/3.0.92) (from `^3.0.82`, in `dependencies`)
|
|
20
|
+
- Updated dependency [`@ai-sdk/openai@^3.0.80` ↗︎](https://www.npmjs.com/package/@ai-sdk/openai/v/3.0.80) (from `^3.0.63`, in `dependencies`)
|
|
21
|
+
- Updated dependency [`@ai-sdk/openai-compatible@^2.0.56` ↗︎](https://www.npmjs.com/package/@ai-sdk/openai-compatible/v/2.0.56) (from `^2.0.47`, in `dependencies`)
|
|
22
|
+
- Updated dependency [`ai@^6.0.219` ↗︎](https://www.npmjs.com/package/ai/v/6.0.219) (from `^6.0.176`, in `dependencies`)
|
|
23
|
+
|
|
24
|
+
- dependencies updates: ([#19385](https://github.com/mastra-ai/mastra/pull/19385))
|
|
25
|
+
- Updated dependency [`@ai-sdk/anthropic@^3.0.96` ↗︎](https://www.npmjs.com/package/@ai-sdk/anthropic/v/3.0.96) (from `^3.0.92`, in `dependencies`)
|
|
26
|
+
- Updated dependency [`@ai-sdk/openai@^3.0.84` ↗︎](https://www.npmjs.com/package/@ai-sdk/openai/v/3.0.84) (from `^3.0.80`, in `dependencies`)
|
|
27
|
+
- Updated dependency [`@ai-sdk/openai-compatible@^2.0.59` ↗︎](https://www.npmjs.com/package/@ai-sdk/openai-compatible/v/2.0.59) (from `^2.0.56`, in `dependencies`)
|
|
28
|
+
- Updated dependency [`ai@^6.0.224` ↗︎](https://www.npmjs.com/package/ai/v/6.0.224) (from `^6.0.219`, in `dependencies`)
|
|
29
|
+
- Updated dependencies [[`bd6d240`](https://github.com/mastra-ai/mastra/commit/bd6d2402db93dddaef0721667e7e8a030e7c6e16), [`96a3749`](https://github.com/mastra-ai/mastra/commit/96a37492235f5b8076b3e3177d83ed5a5e44a640), [`bd6d240`](https://github.com/mastra-ai/mastra/commit/bd6d2402db93dddaef0721667e7e8a030e7c6e16), [`0111486`](https://github.com/mastra-ai/mastra/commit/01114867612593eef5cfa2fda6a1194dfedda841), [`96a3749`](https://github.com/mastra-ai/mastra/commit/96a37492235f5b8076b3e3177d83ed5a5e44a640), [`c3a6638`](https://github.com/mastra-ai/mastra/commit/c3a6638c791ab839c52a3250ba90420c6259ae56), [`3e26c87`](https://github.com/mastra-ai/mastra/commit/3e26c87de0c5bc2583b795ce6ca5889b6b161acb), [`a5008f2`](https://github.com/mastra-ai/mastra/commit/a5008f22ae710ad9402ea9f2547d8c02f74d384b)]:
|
|
30
|
+
- @mastra/code-sdk@0.1.0-alpha.8
|
|
31
|
+
- @mastra/core@1.51.0-alpha.8
|
|
32
|
+
|
|
33
|
+
## 0.31.0-alpha.8
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- Renamed the gateway setup confirmation messages to say "Gateway" instead of "Memory gateway" and added `/gateway` as an alias for the existing `/memory-gateway` setup command. ([#18691](https://github.com/mastra-ai/mastra/pull/18691))
|
|
38
|
+
|
|
39
|
+
- Improved Observational Memory settings by adding the `/memory` command and clarifying what each token setting counts. ([#19293](https://github.com/mastra-ai/mastra/pull/19293))
|
|
40
|
+
|
|
41
|
+
- Simplified the observational memory context indicator in the TUI footer. ([#19260](https://github.com/mastra-ai/mastra/pull/19260))
|
|
42
|
+
|
|
43
|
+
- Updated dependencies [[`25e7c12`](https://github.com/mastra-ai/mastra/commit/25e7c126a770069ae7fb7ecf1d2adb40e017b009), [`1ce5121`](https://github.com/mastra-ai/mastra/commit/1ce512155d122bb21f47d98383e82ffbf84b39e8), [`3cfc47a`](https://github.com/mastra-ai/mastra/commit/3cfc47a6b89940aadd0f46fb01ae9624a73a865d), [`2bb7817`](https://github.com/mastra-ai/mastra/commit/2bb78176112fde628483de2830528f7eee911e56), [`51d9870`](https://github.com/mastra-ai/mastra/commit/51d987032c689c2855374d0f244f5d654da809d1), [`5cab274`](https://github.com/mastra-ai/mastra/commit/5cab2744250e22d12fefa7b32637dce224233cee), [`7fa27d3`](https://github.com/mastra-ai/mastra/commit/7fa27d3b6f5ed68cd34e454a4d3ad9c482a0cfbc), [`a58dcbb`](https://github.com/mastra-ai/mastra/commit/a58dcbb546d7e1d65ebdc1f39e55f0908fcd9391), [`153bd3b`](https://github.com/mastra-ai/mastra/commit/153bd3b396bdfed6b74cf43de12db8fd2d83c04a), [`07bb863`](https://github.com/mastra-ai/mastra/commit/07bb8631919c6f7cf377dccd45b096e0f17fbed0), [`ae510ef`](https://github.com/mastra-ai/mastra/commit/ae510ef404f760d1b34eb25e99d5e6a9e9fcbdba), [`8a586ec`](https://github.com/mastra-ai/mastra/commit/8a586eca9a4914f31dff6140d0d45ac375b00669), [`3927473`](https://github.com/mastra-ai/mastra/commit/392747323ddb10c643d12be7b9ae913159dfaeed), [`dce50dc`](https://github.com/mastra-ai/mastra/commit/dce50dc9a1c1fcd0f427bb5f6250ec74910cb04b), [`dce50dc`](https://github.com/mastra-ai/mastra/commit/dce50dc9a1c1fcd0f427bb5f6250ec74910cb04b), [`634caff`](https://github.com/mastra-ai/mastra/commit/634caff29a9200ad058b67d53f96d9e5832fb8a2), [`5ad8d04`](https://github.com/mastra-ai/mastra/commit/5ad8d045d2f0363690f9752180e0934beca9f33a), [`2eb656e`](https://github.com/mastra-ai/mastra/commit/2eb656ecb64671d4a95e3c94bf507ce6a0ef9e3b), [`8a586ec`](https://github.com/mastra-ai/mastra/commit/8a586eca9a4914f31dff6140d0d45ac375b00669)]:
|
|
44
|
+
- @mastra/core@1.51.0-alpha.7
|
|
45
|
+
- @mastra/code-sdk@0.1.0-alpha.7
|
|
46
|
+
- @mastra/observability@1.16.1-alpha.1
|
|
47
|
+
- @mastra/mcp@1.14.0-alpha.0
|
|
48
|
+
|
|
49
|
+
## 0.31.0-alpha.7
|
|
50
|
+
|
|
51
|
+
### Patch Changes
|
|
52
|
+
|
|
53
|
+
- Updated dependencies [[`e2d5f37`](https://github.com/mastra-ai/mastra/commit/e2d5f373bd289be534d5f8694d34465010533df6)]:
|
|
54
|
+
- @mastra/core@1.51.0-alpha.6
|
|
55
|
+
- @mastra/code-sdk@0.1.0-alpha.6
|
|
56
|
+
|
|
57
|
+
## 0.31.0-alpha.6
|
|
58
|
+
|
|
59
|
+
### Patch Changes
|
|
60
|
+
|
|
61
|
+
- Updated dependencies [[`fb8aea3`](https://github.com/mastra-ai/mastra/commit/fb8aea384291e77311be3a64ee1717320d5c3c73), [`bd4d720`](https://github.com/mastra-ai/mastra/commit/bd4d720458e42c49b6829c4662812332be32cfcf), [`4ce0163`](https://github.com/mastra-ai/mastra/commit/4ce0163dc86e675a86809685c8ce6c49f1aeb87e)]:
|
|
62
|
+
- @mastra/core@1.51.0-alpha.5
|
|
63
|
+
- @mastra/observability@1.16.1-alpha.0
|
|
64
|
+
- @mastra/code-sdk@0.1.0-alpha.5
|
|
65
|
+
- @mastra/mcp@1.14.0-alpha.0
|
|
66
|
+
|
|
67
|
+
## 0.31.0-alpha.5
|
|
68
|
+
|
|
69
|
+
### Patch Changes
|
|
70
|
+
|
|
71
|
+
- Fixed terminal output reflow and slash command input alignment when resizing. ([#19198](https://github.com/mastra-ai/mastra/pull/19198))
|
|
72
|
+
|
|
73
|
+
- Fixed the /login command changing your active model and model pack. Logging in to a provider now keeps your current model selection; the provider default is only auto-selected during onboarding or when no model has been chosen yet. ([#19250](https://github.com/mastra-ai/mastra/pull/19250))
|
|
74
|
+
|
|
75
|
+
- Updated dependencies [[`a5c6337`](https://github.com/mastra-ai/mastra/commit/a5c6337d23c7686c81a32ce62f550f610543a240), [`031931a`](https://github.com/mastra-ai/mastra/commit/031931a715405fb90759b1903c9c25cbf05994af), [`eb70da9`](https://github.com/mastra-ai/mastra/commit/eb70da98e1007b18e1463d75121bc07db55f8e09), [`8b97958`](https://github.com/mastra-ai/mastra/commit/8b979589f9aa59ba67cac565949475f2ffeb4ac3), [`8410541`](https://github.com/mastra-ai/mastra/commit/84105412c60ecd3bb33a9838146f59c4b588228f), [`01b338c`](https://github.com/mastra-ai/mastra/commit/01b338c56271f0219606710e3e8b26dee27ac6c2), [`8b7361d`](https://github.com/mastra-ai/mastra/commit/8b7361d35de68b80d05d30a74e0c69e7218fd612), [`85fb642`](https://github.com/mastra-ai/mastra/commit/85fb642f4d112d0da9f39808617397f7e47fe622), [`481c112`](https://github.com/mastra-ai/mastra/commit/481c1125b752489673ec671fcb7ca80f9c86ffb1), [`c43f3a9`](https://github.com/mastra-ai/mastra/commit/c43f3a9d1efde99b38789364ba4d0ba670f430e3), [`c43f3a9`](https://github.com/mastra-ai/mastra/commit/c43f3a9d1efde99b38789364ba4d0ba670f430e3)]:
|
|
76
|
+
- @mastra/core@1.51.0-alpha.4
|
|
77
|
+
- @mastra/memory@1.23.0-alpha.3
|
|
78
|
+
- @mastra/mcp@1.14.0-alpha.0
|
|
79
|
+
- @mastra/code-sdk@0.1.0-alpha.4
|
|
80
|
+
|
|
81
|
+
## 0.31.0-alpha.4
|
|
82
|
+
|
|
83
|
+
### Patch Changes
|
|
84
|
+
|
|
85
|
+
- Updated dependencies [[`177010f`](https://github.com/mastra-ai/mastra/commit/177010ff096d2e4b28d89803be5b1a4cad2a0d6b), [`54a51e0`](https://github.com/mastra-ai/mastra/commit/54a51e0a484fe1ebad3fb1f7ef5282a075709eb7)]:
|
|
86
|
+
- @mastra/core@1.51.0-alpha.3
|
|
87
|
+
- @mastra/code-sdk@0.1.0-alpha.3
|
|
88
|
+
|
|
89
|
+
## 0.31.0-alpha.3
|
|
90
|
+
|
|
91
|
+
### Minor Changes
|
|
92
|
+
|
|
93
|
+
- Added storage retention and a new `/prune` command to keep the local database from growing without bound. ([#19059](https://github.com/mastra-ai/mastra/pull/19059))
|
|
94
|
+
|
|
95
|
+
**Default retention policies** are now applied to Mastra Code storage: chat messages and threads are kept for 90 days, observability spans and logs for 14 days, scores and workflow snapshots for 30 days. Rows older than these limits are only removed when you run `/prune` — nothing is deleted automatically.
|
|
96
|
+
|
|
97
|
+
**New `/prune` command:**
|
|
98
|
+
- `/prune` closes the TUI, hands the terminal over to a maintenance run that deletes rows older than the retention policies with live progress output, then exits (start `mastracode` again for a new session)
|
|
99
|
+
- `/prune vacuum` additionally compacts local libsql database files to return the freed space to your disk, and reports the reclaimed size. Compaction streams a `VACUUM INTO` copy and swaps it into place — bounded memory and no WAL growth even on multi-GB databases — and refuses to start without enough free disk space for the copy
|
|
100
|
+
- `/prune keep-memory` skips chat history (messages and threads) so conversations are preserved for later use (fine-tuning, evals) while telemetry and run records are still deleted. Flags combine in any order, e.g. `/prune vacuum keep-memory`
|
|
101
|
+
- Compaction proves it has exclusive access to each database file before swapping. If another Mastra Code session still has the file open, `/prune vacuum` refuses with a clear message instead of silently orphaning that session's writes
|
|
102
|
+
|
|
103
|
+
Maintenance runs outside the TUI so retention deletes and `VACUUM` never contend with a live session for the database.
|
|
104
|
+
|
|
105
|
+
Also, when local tracing is disabled, observability data is no longer written to the libsql database at all.
|
|
106
|
+
|
|
107
|
+
### Patch Changes
|
|
108
|
+
|
|
109
|
+
- Updated dependencies [[`e955965`](https://github.com/mastra-ai/mastra/commit/e955965dce575a903e37cf054d28ea99aa48785e), [`bc1121a`](https://github.com/mastra-ai/mastra/commit/bc1121a7bb98f7cd73e82e3a7913a667a9fa9911), [`860ef7e`](https://github.com/mastra-ai/mastra/commit/860ef7e77d92b63469cbe5857aa1e626197e43e9), [`17e818c`](https://github.com/mastra-ai/mastra/commit/17e818c51a958ba90641b1a959dc38faf8c034e9), [`4451dfe`](https://github.com/mastra-ai/mastra/commit/4451dfe857428e7abcc0261a507a2e186dae6d47), [`4451dfe`](https://github.com/mastra-ai/mastra/commit/4451dfe857428e7abcc0261a507a2e186dae6d47), [`1d39058`](https://github.com/mastra-ai/mastra/commit/1d39058e548efd691799985d5c8af2737f1c3bd2)]:
|
|
110
|
+
- @mastra/core@1.51.0-alpha.2
|
|
111
|
+
- @mastra/schema-compat@1.3.4-alpha.1
|
|
112
|
+
- @mastra/libsql@1.16.0-alpha.0
|
|
113
|
+
- @mastra/code-sdk@0.1.0-alpha.2
|
|
114
|
+
- @mastra/mcp@1.13.1
|
|
115
|
+
- @mastra/memory@1.23.0-alpha.2
|
|
116
|
+
|
|
3
117
|
## 0.30.1-alpha.2
|
|
4
118
|
|
|
5
119
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -88,7 +88,7 @@ Select a suggestion with arrow keys and press Tab to insert it.
|
|
|
88
88
|
| `/custom-providers` | Manage custom OpenAI-compatible providers/models |
|
|
89
89
|
| `/mode` | Switch agent mode |
|
|
90
90
|
| `/subagents` | Configure subagent model defaults |
|
|
91
|
-
| `/
|
|
91
|
+
| `/memory` | Configure Observational Memory (`/om` alias) |
|
|
92
92
|
| `/think` | Set thinking level (Anthropic) |
|
|
93
93
|
| `/judge` | Configure the default judge model and max attempts for goals |
|
|
94
94
|
| `/goal` | Start or manage an autonomous goal |
|
|
@@ -323,45 +323,17 @@ detects the stopped VM and re-provisions automatically.
|
|
|
323
323
|
Without a sandbox provider, users can still connect GitHub and pick repos, but opening a repo
|
|
324
324
|
project shows a clear "sandbox not configured" error.
|
|
325
325
|
|
|
326
|
-
###
|
|
326
|
+
### Storage
|
|
327
327
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
also isolated. The database location is derived server-side from a hash of `(orgId, userId)` (no
|
|
333
|
-
client-supplied paths); users without an org fall back to a user-only key.
|
|
334
|
-
|
|
335
|
-
```bash
|
|
336
|
-
# Local files (default): one isolated DB dir per tenant under this root
|
|
337
|
-
export MASTRACODE_TENANT_DB_ROOT=~/.mastracode/web/tenants # optional
|
|
338
|
-
|
|
339
|
-
# Or remote libSQL/Turso per tenant ({id} = hashed (orgId, userId)). This mode
|
|
340
|
-
# assumes each tenant DB already exists at the templated URL.
|
|
341
|
-
export MASTRACODE_TENANT_DB_URL_TEMPLATE=libsql://{id}-org.turso.io # optional
|
|
342
|
-
export MASTRACODE_TENANT_VECTOR_URL_TEMPLATE=libsql://{id}-vec-org.turso.io # optional
|
|
343
|
-
export MASTRACODE_TENANT_DB_AUTH_TOKEN=... # optional
|
|
344
|
-
export MASTRACODE_TENANT_VECTOR_AUTH_TOKEN=... # optional
|
|
345
|
-
|
|
346
|
-
# Or auto-provision a Turso database per tenant on first access via the Turso
|
|
347
|
-
# Platform API (no pre-created DBs needed). Requires APP_DATABASE_URL: the
|
|
348
|
-
# stable db-name/hostname mapping is persisted there so replicas converge on
|
|
349
|
-
# one DB and cold starts don't re-create it. A scoped token is minted fresh per
|
|
350
|
-
# resolution, so no long-lived credential is stored.
|
|
351
|
-
export MASTRACODE_TURSO_PLATFORM_TOKEN=... # optional
|
|
352
|
-
export MASTRACODE_TURSO_ORG=my-org # optional
|
|
353
|
-
export MASTRACODE_TURSO_GROUP=default # optional (default "default")
|
|
354
|
-
```
|
|
355
|
-
|
|
356
|
-
Resolution priority: explicit `MASTRACODE_TENANT_DB_URL_TEMPLATE` → Turso
|
|
357
|
-
auto-provisioning (when the platform token + org are set) → local libSQL files.
|
|
358
|
-
|
|
359
|
-
When web auth is disabled the server uses a single shared store, exactly as before.
|
|
328
|
+
All agent state (threads, messages, memory, observational memory, recall vectors) persists in the
|
|
329
|
+
single application Postgres (`APP_DATABASE_URL`) alongside the GitHub project metadata — one shared
|
|
330
|
+
database, with users separated by `resourceId` scoping. Without `APP_DATABASE_URL` (bare local
|
|
331
|
+
dev), agent state falls back to a local libSQL file.
|
|
360
332
|
|
|
361
333
|
### Multi-replica deployment
|
|
362
334
|
|
|
363
|
-
The web server
|
|
364
|
-
|
|
335
|
+
The web server serializes per-user git write operations. For hosted, multi-replica deployments a
|
|
336
|
+
few settings make this safe and bounded:
|
|
365
337
|
|
|
366
338
|
```bash
|
|
367
339
|
# Replica-stable state signing — REQUIRED across replicas. Without an explicit
|
|
@@ -373,15 +345,6 @@ export GITHUB_APP_WEBHOOK_SECRET=...
|
|
|
373
345
|
# advisory locks (default on, requires APP_DATABASE_URL). Set 0 for local dev.
|
|
374
346
|
export MASTRACODE_DISTRIBUTED_LOCK=1
|
|
375
347
|
|
|
376
|
-
# Persist/share tenant DBs across replicas — fail/warn at startup if no remote
|
|
377
|
-
# tenant DB backend (URL template OR Turso auto-provisioning) is configured
|
|
378
|
-
# (local-file DBs don't survive restarts or sharing).
|
|
379
|
-
export MASTRACODE_REQUIRE_REMOTE_TENANT_DB=1
|
|
380
|
-
|
|
381
|
-
# Bound in-memory tenant caches as the team grows.
|
|
382
|
-
export MASTRACODE_TENANT_IDLE_MINUTES=30 # idle eviction window (0 disables)
|
|
383
|
-
export MASTRACODE_TENANT_MAX_APPS=100 # LRU cap on cached stacks (0 disables)
|
|
384
|
-
|
|
385
348
|
# Per-replica cap on concurrently live sandboxes (0 / unset = unlimited).
|
|
386
349
|
export MASTRACODE_MAX_SANDBOXES=50
|
|
387
350
|
```
|