mastracode 0.31.0-alpha.8 → 0.31.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 CHANGED
@@ -1,5 +1,133 @@
1
1
  # mastracode
2
2
 
3
+ ## 0.31.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 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))
8
+
9
+ **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.
10
+
11
+ **New `/prune` command:**
12
+ - `/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)
13
+ - `/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
14
+ - `/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`
15
+ - 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
16
+
17
+ Maintenance runs outside the TUI so retention deletes and `VACUUM` never contend with a live session for the database.
18
+
19
+ Also, when local tracing is disabled, observability data is no longer written to the libsql database at all.
20
+
21
+ ### Patch Changes
22
+
23
+ - Fixed TUI height corruption caused by unsanitized ANSI escape codes in tool output. pi-tui's extractAnsiCode() only handles CSI sequences ending with m/G/K/H/J; other terminators (cursor movement, mode switches) caused the scanner to swallow subsequent visible text, making visibleWidth() undercount and collapsing the TUI to a few rows. Added sanitizeAnsiForRendering() to strip non-SGR CSI sequences at all content entry points. Also improved terminal cleanup on exit to prevent Kitty keyboard protocol from leaking (5;99~ codes). ([#18735](https://github.com/mastra-ai/mastra/pull/18735))
24
+
25
+ - Improved Mastra Code responsiveness while tool inputs and command output stream. ([#19376](https://github.com/mastra-ai/mastra/pull/19376))
26
+
27
+ - 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))
28
+
29
+ - dependencies updates: ([#16699](https://github.com/mastra-ai/mastra/pull/16699))
30
+ - 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`)
31
+ - 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`)
32
+ - 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`)
33
+ - 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`)
34
+ - Updated dependency [`ai@^6.0.219` ↗︎](https://www.npmjs.com/package/ai/v/6.0.219) (from `^6.0.176`, in `dependencies`)
35
+
36
+ - dependencies updates: ([#19385](https://github.com/mastra-ai/mastra/pull/19385))
37
+ - 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`)
38
+ - 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`)
39
+ - 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`)
40
+ - Updated dependency [`ai@^6.0.224` ↗︎](https://www.npmjs.com/package/ai/v/6.0.224) (from `^6.0.219`, in `dependencies`)
41
+
42
+ - 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))
43
+
44
+ - Fixed terminal output reflow and slash command input alignment when resizing. ([#19198](https://github.com/mastra-ai/mastra/pull/19198))
45
+
46
+ - Publish the Mastra Code agent core as `@mastra/code-sdk` (previously the internal `@internal/mastracode` package), so third parties can build their own UIs and surfaces on top of the Mastra Code coding agent. The `mastracode` CLI now consumes it as a regular runtime dependency instead of bundling it into its published output. ([#18986](https://github.com/mastra-ai/mastra/pull/18986))
47
+
48
+ - 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))
49
+
50
+ - Improved Mastra Code web interface state handling without changing behavior. ([#19107](https://github.com/mastra-ai/mastra/pull/19107))
51
+
52
+ - Simplified the observational memory context indicator in the TUI footer. ([#19260](https://github.com/mastra-ai/mastra/pull/19260))
53
+
54
+ - 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), [`fe1bda0`](https://github.com/mastra-ai/mastra/commit/fe1bda06f6af92a694a51712db747cda1e7185f0), [`25e7c12`](https://github.com/mastra-ai/mastra/commit/25e7c126a770069ae7fb7ecf1d2adb40e017b009), [`1ce5121`](https://github.com/mastra-ai/mastra/commit/1ce512155d122bb21f47d98383e82ffbf84b39e8), [`fb8aea3`](https://github.com/mastra-ai/mastra/commit/fb8aea384291e77311be3a64ee1717320d5c3c73), [`4adc391`](https://github.com/mastra-ai/mastra/commit/4adc3911075249c352bb4832d2471922826344de), [`a5c6337`](https://github.com/mastra-ai/mastra/commit/a5c6337d23c7686c81a32ce62f550f610543a240), [`031931a`](https://github.com/mastra-ai/mastra/commit/031931a715405fb90759b1903c9c25cbf05994af), [`3cfc47a`](https://github.com/mastra-ai/mastra/commit/3cfc47a6b89940aadd0f46fb01ae9624a73a865d), [`eb70da9`](https://github.com/mastra-ai/mastra/commit/eb70da98e1007b18e1463d75121bc07db55f8e09), [`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), [`8b97958`](https://github.com/mastra-ai/mastra/commit/8b979589f9aa59ba67cac565949475f2ffeb4ac3), [`8410541`](https://github.com/mastra-ai/mastra/commit/84105412c60ecd3bb33a9838146f59c4b588228f), [`ce16147`](https://github.com/mastra-ai/mastra/commit/ce16147c0dffb34d5df4602607e4b34349fbf547), [`a58dcbb`](https://github.com/mastra-ai/mastra/commit/a58dcbb546d7e1d65ebdc1f39e55f0908fcd9391), [`aa38805`](https://github.com/mastra-ai/mastra/commit/aa38805b878b827403be785eb90688d7172f5a40), [`153bd3b`](https://github.com/mastra-ai/mastra/commit/153bd3b396bdfed6b74cf43de12db8fd2d83c04a), [`45a8e65`](https://github.com/mastra-ai/mastra/commit/45a8e65e1556d1362cb3f25187023c36de26661d), [`e955965`](https://github.com/mastra-ai/mastra/commit/e955965dce575a903e37cf054d28ea99aa48785e), [`bc1121a`](https://github.com/mastra-ai/mastra/commit/bc1121a7bb98f7cd73e82e3a7913a667a9fa9911), [`2d22570`](https://github.com/mastra-ai/mastra/commit/2d22570c7dfdd02123d0ecc529efb05ccba2d9fc), [`07bb863`](https://github.com/mastra-ai/mastra/commit/07bb8631919c6f7cf377dccd45b096e0f17fbed0), [`171c3a2`](https://github.com/mastra-ai/mastra/commit/171c3a23f36199ad1354166fb515b22b57f310c2), [`c8ed116`](https://github.com/mastra-ai/mastra/commit/c8ed11699f62bcac70102ab4ec84d80d20541da6), [`ae510ef`](https://github.com/mastra-ai/mastra/commit/ae510ef404f760d1b34eb25e99d5e6a9e9fcbdba), [`01b338c`](https://github.com/mastra-ai/mastra/commit/01b338c56271f0219606710e3e8b26dee27ac6c2), [`0cf3826`](https://github.com/mastra-ai/mastra/commit/0cf38268cee1913d1292d7d917c76744ea2aee6c), [`bd4d720`](https://github.com/mastra-ai/mastra/commit/bd4d720458e42c49b6829c4662812332be32cfcf), [`aac3e5a`](https://github.com/mastra-ai/mastra/commit/aac3e5a098b08077c7d5020d782d6353b217797c), [`a99eae8`](https://github.com/mastra-ai/mastra/commit/a99eae8908e500c1b2d12f9d277be616b98617a5), [`860ef7e`](https://github.com/mastra-ai/mastra/commit/860ef7e77d92b63469cbe5857aa1e626197e43e9), [`17e818c`](https://github.com/mastra-ai/mastra/commit/17e818c51a958ba90641b1a959dc38faf8c034e9), [`edce8d2`](https://github.com/mastra-ai/mastra/commit/edce8d2769f19e27a05737c627af2d765472a4f8), [`4451dfe`](https://github.com/mastra-ai/mastra/commit/4451dfe857428e7abcc0261a507a2e186dae6d47), [`8a586ec`](https://github.com/mastra-ai/mastra/commit/8a586eca9a4914f31dff6140d0d45ac375b00669), [`4451dfe`](https://github.com/mastra-ai/mastra/commit/4451dfe857428e7abcc0261a507a2e186dae6d47), [`8b7361d`](https://github.com/mastra-ai/mastra/commit/8b7361d35de68b80d05d30a74e0c69e7218fd612), [`c3a6638`](https://github.com/mastra-ai/mastra/commit/c3a6638c791ab839c52a3250ba90420c6259ae56), [`1d39058`](https://github.com/mastra-ai/mastra/commit/1d39058e548efd691799985d5c8af2737f1c3bd2), [`3927473`](https://github.com/mastra-ai/mastra/commit/392747323ddb10c643d12be7b9ae913159dfaeed), [`fd13f8e`](https://github.com/mastra-ai/mastra/commit/fd13f8e21990f9904c3eedba3a626bb4a929cdb8), [`dce50dc`](https://github.com/mastra-ai/mastra/commit/dce50dc9a1c1fcd0f427bb5f6250ec74910cb04b), [`dce50dc`](https://github.com/mastra-ai/mastra/commit/dce50dc9a1c1fcd0f427bb5f6250ec74910cb04b), [`85fb642`](https://github.com/mastra-ai/mastra/commit/85fb642f4d112d0da9f39808617397f7e47fe622), [`6789ab4`](https://github.com/mastra-ai/mastra/commit/6789ab4191ddcd32a932898b360b191e80cee1a9), [`fd13f8e`](https://github.com/mastra-ai/mastra/commit/fd13f8e21990f9904c3eedba3a626bb4a929cdb8), [`634caff`](https://github.com/mastra-ai/mastra/commit/634caff29a9200ad058b67d53f96d9e5832fb8a2), [`e405085`](https://github.com/mastra-ai/mastra/commit/e405085fa8ee5ea07670b8d2b62b2376c0e0e414), [`f703f87`](https://github.com/mastra-ai/mastra/commit/f703f878de072d51fda557f9c50867d8252bef05), [`5ad8d04`](https://github.com/mastra-ai/mastra/commit/5ad8d045d2f0363690f9752180e0934beca9f33a), [`481c112`](https://github.com/mastra-ai/mastra/commit/481c1125b752489673ec671fcb7ca80f9c86ffb1), [`c43f3a9`](https://github.com/mastra-ai/mastra/commit/c43f3a9d1efde99b38789364ba4d0ba670f430e3), [`2eb656e`](https://github.com/mastra-ai/mastra/commit/2eb656ecb64671d4a95e3c94bf507ce6a0ef9e3b), [`3e26c87`](https://github.com/mastra-ai/mastra/commit/3e26c87de0c5bc2583b795ce6ca5889b6b161acb), [`8a586ec`](https://github.com/mastra-ai/mastra/commit/8a586eca9a4914f31dff6140d0d45ac375b00669), [`33f2b88`](https://github.com/mastra-ai/mastra/commit/33f2b88842c09a567f906fac4cb61cd5277ced59), [`0ad646f`](https://github.com/mastra-ai/mastra/commit/0ad646f71a530f2454664299e5e01bfd13fa12e5), [`177010f`](https://github.com/mastra-ai/mastra/commit/177010ff096d2e4b28d89803be5b1a4cad2a0d6b), [`0ad646f`](https://github.com/mastra-ai/mastra/commit/0ad646f71a530f2454664299e5e01bfd13fa12e5), [`b486abf`](https://github.com/mastra-ai/mastra/commit/b486abfa2a7528c6f527e4015c819ea9fa54aaad), [`54a51e0`](https://github.com/mastra-ai/mastra/commit/54a51e0a484fe1ebad3fb1f7ef5282a075709eb7), [`c43f3a9`](https://github.com/mastra-ai/mastra/commit/c43f3a9d1efde99b38789364ba4d0ba670f430e3), [`a5008f2`](https://github.com/mastra-ai/mastra/commit/a5008f22ae710ad9402ea9f2547d8c02f74d384b), [`e2d5f37`](https://github.com/mastra-ai/mastra/commit/e2d5f373bd289be534d5f8694d34465010533df6), [`1b6e676`](https://github.com/mastra-ai/mastra/commit/1b6e67613c2a019df5920d4273d79bed09555807), [`4ce0163`](https://github.com/mastra-ai/mastra/commit/4ce0163dc86e675a86809685c8ce6c49f1aeb87e), [`4378341`](https://github.com/mastra-ai/mastra/commit/43783412df5ea3dd35f5b1f6e4851e79c346fc89)]:
55
+ - @mastra/code-sdk@0.1.0
56
+ - @mastra/core@1.51.0
57
+ - @mastra/memory@1.23.0
58
+ - @mastra/mcp@1.14.0
59
+ - @mastra/schema-compat@1.3.4
60
+ - @mastra/observability@1.16.1
61
+ - @mastra/pg@1.16.0
62
+ - @mastra/libsql@1.16.0
63
+
64
+ ## 0.31.0-alpha.14
65
+
66
+ ### Patch Changes
67
+
68
+ - Updated dependencies [[`a99eae8`](https://github.com/mastra-ai/mastra/commit/a99eae8908e500c1b2d12f9d277be616b98617a5), [`fd13f8e`](https://github.com/mastra-ai/mastra/commit/fd13f8e21990f9904c3eedba3a626bb4a929cdb8), [`fd13f8e`](https://github.com/mastra-ai/mastra/commit/fd13f8e21990f9904c3eedba3a626bb4a929cdb8), [`f703f87`](https://github.com/mastra-ai/mastra/commit/f703f878de072d51fda557f9c50867d8252bef05), [`0ad646f`](https://github.com/mastra-ai/mastra/commit/0ad646f71a530f2454664299e5e01bfd13fa12e5), [`0ad646f`](https://github.com/mastra-ai/mastra/commit/0ad646f71a530f2454664299e5e01bfd13fa12e5)]:
69
+ - @mastra/core@1.51.0-alpha.13
70
+ - @mastra/pg@1.16.0-alpha.0
71
+ - @mastra/libsql@1.16.0-alpha.1
72
+ - @mastra/code-sdk@0.1.0-alpha.13
73
+
74
+ ## 0.31.0-alpha.13
75
+
76
+ ### Patch Changes
77
+
78
+ - Updated dependencies [[`ce16147`](https://github.com/mastra-ai/mastra/commit/ce16147c0dffb34d5df4602607e4b34349fbf547), [`aa38805`](https://github.com/mastra-ai/mastra/commit/aa38805b878b827403be785eb90688d7172f5a40), [`2d22570`](https://github.com/mastra-ai/mastra/commit/2d22570c7dfdd02123d0ecc529efb05ccba2d9fc), [`4378341`](https://github.com/mastra-ai/mastra/commit/43783412df5ea3dd35f5b1f6e4851e79c346fc89)]:
79
+ - @mastra/code-sdk@0.1.0-alpha.12
80
+ - @mastra/core@1.51.0-alpha.12
81
+
82
+ ## 0.31.0-alpha.12
83
+
84
+ ### Patch Changes
85
+
86
+ - Updated dependencies [[`45a8e65`](https://github.com/mastra-ai/mastra/commit/45a8e65e1556d1362cb3f25187023c36de26661d), [`c8ed116`](https://github.com/mastra-ai/mastra/commit/c8ed11699f62bcac70102ab4ec84d80d20541da6), [`33f2b88`](https://github.com/mastra-ai/mastra/commit/33f2b88842c09a567f906fac4cb61cd5277ced59)]:
87
+ - @mastra/core@1.51.0-alpha.11
88
+ - @mastra/code-sdk@0.1.0-alpha.11
89
+
90
+ ## 0.31.0-alpha.11
91
+
92
+ ### Patch Changes
93
+
94
+ - Updated dependencies [[`4adc391`](https://github.com/mastra-ai/mastra/commit/4adc3911075249c352bb4832d2471922826344de), [`171c3a2`](https://github.com/mastra-ai/mastra/commit/171c3a23f36199ad1354166fb515b22b57f310c2), [`b486abf`](https://github.com/mastra-ai/mastra/commit/b486abfa2a7528c6f527e4015c819ea9fa54aaad)]:
95
+ - @mastra/core@1.51.0-alpha.10
96
+ - @mastra/schema-compat@1.3.4-alpha.2
97
+ - @mastra/code-sdk@0.1.0-alpha.10
98
+ - @mastra/mcp@1.14.0-alpha.0
99
+ - @mastra/memory@1.23.0-alpha.4
100
+
101
+ ## 0.31.0-alpha.10
102
+
103
+ ### Patch Changes
104
+
105
+ - Updated dependencies [[`edce8d2`](https://github.com/mastra-ai/mastra/commit/edce8d2769f19e27a05737c627af2d765472a4f8)]:
106
+ - @mastra/core@1.51.0-alpha.9
107
+ - @mastra/code-sdk@0.1.0-alpha.9
108
+
109
+ ## 0.31.0-alpha.9
110
+
111
+ ### Patch Changes
112
+
113
+ - Improved Mastra Code responsiveness while tool inputs and command output stream. ([#19376](https://github.com/mastra-ai/mastra/pull/19376))
114
+
115
+ - dependencies updates: ([#16699](https://github.com/mastra-ai/mastra/pull/16699))
116
+ - 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`)
117
+ - 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`)
118
+ - 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`)
119
+ - 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`)
120
+ - Updated dependency [`ai@^6.0.219` ↗︎](https://www.npmjs.com/package/ai/v/6.0.219) (from `^6.0.176`, in `dependencies`)
121
+
122
+ - dependencies updates: ([#19385](https://github.com/mastra-ai/mastra/pull/19385))
123
+ - 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`)
124
+ - 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`)
125
+ - 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`)
126
+ - Updated dependency [`ai@^6.0.224` ↗︎](https://www.npmjs.com/package/ai/v/6.0.224) (from `^6.0.219`, in `dependencies`)
127
+ - 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)]:
128
+ - @mastra/code-sdk@0.1.0-alpha.8
129
+ - @mastra/core@1.51.0-alpha.8
130
+
3
131
  ## 0.31.0-alpha.8
4
132
 
5
133
  ### Patch Changes