@mastra/libsql 0.0.0-fix-workflow-step-timing-and-parallel-status-20260715180716 → 0.0.0-fix-thread-subscription-multi-instance-redis-streams-20260720232722
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 +14 -3
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/docs-memory-overview.md +4 -0
- package/dist/index.cjs +6 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/storage/db/utils.d.ts.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
# @mastra/libsql
|
|
2
2
|
|
|
3
|
-
## 0.0.0-fix-
|
|
3
|
+
## 0.0.0-fix-thread-subscription-multi-instance-redis-streams-20260720232722
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
|
|
7
|
+
- Fixed an uncaught `RangeError: Maximum call stack size exceeded` when writing deeply-nested values (such as a long chained `Error.cause`) to LibSQL storage. `safeStringify` now caps its recursion depth and substitutes a `"[Max depth exceeded]"` sentinel instead of overflowing the stack. ([#19610](https://github.com/mastra-ai/mastra/pull/19610))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`ec857fc`](https://github.com/mastra-ai/mastra/commit/ec857fc79c264b53b38e16478c789b7177f2ad59), [`1426af2`](https://github.com/mastra-ai/mastra/commit/1426af24975879c000d13ac75673f630fcc970c1), [`a40adeb`](https://github.com/mastra-ai/mastra/commit/a40adeb222b961a56a58af56a106106525721b74), [`8a0d145`](https://github.com/mastra-ai/mastra/commit/8a0d145aadbdf7278665aceaaec364b35dd9bd94), [`bd2f1d2`](https://github.com/mastra-ai/mastra/commit/bd2f1d274d05e60e2366f005ea0d94d5cea0d5ff), [`e1f2fae`](https://github.com/mastra-ai/mastra/commit/e1f2faebaf048c3d4c2e2c01d293767c195d5794), [`63aa799`](https://github.com/mastra-ai/mastra/commit/63aa799c6b44eacc7806cda6846b7c5bbee06b37), [`b7e79c3`](https://github.com/mastra-ai/mastra/commit/b7e79c3c02ac5cd415db34ba0975ceafc1464333), [`21a0eb8`](https://github.com/mastra-ai/mastra/commit/21a0eb86746ba0b703acea360d4f84c6a5a493f2), [`8b20926`](https://github.com/mastra-ai/mastra/commit/8b20926cd59e2ba3d66458e062fa0e6e2ada3e68), [`975295d`](https://github.com/mastra-ai/mastra/commit/975295d418552f0d46a59edfef4c3ee555f9930a), [`73db8db`](https://github.com/mastra-ai/mastra/commit/73db8db90d69ab6153c7942749f624db0d96952d), [`4cfdd64`](https://github.com/mastra-ai/mastra/commit/4cfdd645794feaea0c4ea711e70ecdfbef0c5b8e), [`b75d749`](https://github.com/mastra-ai/mastra/commit/b75d749621ff5d17e86bcb4ee809d301fb4f7cf3), [`821648b`](https://github.com/mastra-ai/mastra/commit/821648bf2871ef840100c7bacbecf676010bd12a), [`de86fd7`](https://github.com/mastra-ai/mastra/commit/de86fd7119f0438381d1a642e3d258143c0b9c29), [`2745031`](https://github.com/mastra-ai/mastra/commit/2745031d1d4a4978f037092da371428c32e2842a), [`74faf8b`](https://github.com/mastra-ai/mastra/commit/74faf8bd9c1018f2492653c06b1e25fc8300e9e6), [`1fadac4`](https://github.com/mastra-ai/mastra/commit/1fadac44537caeefe81f9f775ae2f2f3d94e9069), [`cf24430`](https://github.com/mastra-ai/mastra/commit/cf24430226a6ecb104bc1d54d6e401defd7cb53f), [`73db8db`](https://github.com/mastra-ai/mastra/commit/73db8db90d69ab6153c7942749f624db0d96952d), [`76b7181`](https://github.com/mastra-ai/mastra/commit/76b71810366e6d90b9d3973149d1c7ba3659ffb9), [`792ec9a`](https://github.com/mastra-ai/mastra/commit/792ec9a0869bab8274cf5e0ed2840738737a1607), [`712b864`](https://github.com/mastra-ai/mastra/commit/712b864aa1ed12b14c54390ec17b69de163c37f7), [`85e4fb5`](https://github.com/mastra-ai/mastra/commit/85e4fb50087a81c74df3a762f53b56373db0b912), [`0c0e8d7`](https://github.com/mastra-ai/mastra/commit/0c0e8d7becd4d1445c656b78d5d845f606c1ff9d), [`8f7a5de`](https://github.com/mastra-ai/mastra/commit/8f7a5dedc246cdc938bb65516703cf9b27b03756), [`11f6cd9`](https://github.com/mastra-ai/mastra/commit/11f6cd96fe42582403416608beb212cc1a2cc79e), [`ef03c0c`](https://github.com/mastra-ai/mastra/commit/ef03c0cfc62367a458e4cc56462e2148b35681c5), [`4fb4d88`](https://github.com/mastra-ai/mastra/commit/4fb4d881bc107acee13890ad4d78661016c510ed), [`9f7c67a`](https://github.com/mastra-ai/mastra/commit/9f7c67abeeb52c41c51a9b5edee60b62afe7cd8d), [`3b65e68`](https://github.com/mastra-ai/mastra/commit/3b65e68d7f1c771c7a70eea42d83fefdd28cad88), [`4eba27a`](https://github.com/mastra-ai/mastra/commit/4eba27adcf60f991df0e62f94b3e75b4e67f3b4b), [`c701be3`](https://github.com/mastra-ai/mastra/commit/c701be32d7d9aa94a66da8c6cc38dcac6856f464), [`db650ce`](https://github.com/mastra-ai/mastra/commit/db650ce490348914e85b93651d83acdf8f2a4c31), [`6354eeb`](https://github.com/mastra-ai/mastra/commit/6354eeb32efa9f5f68f51dda394e90e2ee76f1fb), [`a8799bb`](https://github.com/mastra-ai/mastra/commit/a8799bb8e44f4a60d01e4e2acd3448ff80bf14f8), [`e3868e2`](https://github.com/mastra-ai/mastra/commit/e3868e22babfffd0133771669ca724501c2dd58e), [`c0bec73`](https://github.com/mastra-ai/mastra/commit/c0bec732c93d1a22ae5e51ed66cf8cacca8bd6a6)]:
|
|
10
|
+
- @mastra/core@0.0.0-fix-thread-subscription-multi-instance-redis-streams-20260720232722
|
|
11
|
+
|
|
12
|
+
## 1.16.1-alpha.0
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Fixed an uncaught `RangeError: Maximum call stack size exceeded` when writing deeply-nested values (such as a long chained `Error.cause`) to LibSQL storage. `safeStringify` now caps its recursion depth and substitutes a `"[Max depth exceeded]"` sentinel instead of overflowing the stack. ([#19610](https://github.com/mastra-ai/mastra/pull/19610))
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [[`ec857fc`](https://github.com/mastra-ai/mastra/commit/ec857fc79c264b53b38e16478c789b7177f2ad59), [`e1f2fae`](https://github.com/mastra-ai/mastra/commit/e1f2faebaf048c3d4c2e2c01d293767c195d5794), [`63aa799`](https://github.com/mastra-ai/mastra/commit/63aa799c6b44eacc7806cda6846b7c5bbee06b37), [`73db8db`](https://github.com/mastra-ai/mastra/commit/73db8db90d69ab6153c7942749f624db0d96952d), [`73db8db`](https://github.com/mastra-ai/mastra/commit/73db8db90d69ab6153c7942749f624db0d96952d), [`76b7181`](https://github.com/mastra-ai/mastra/commit/76b71810366e6d90b9d3973149d1c7ba3659ffb9), [`0c0e8d7`](https://github.com/mastra-ai/mastra/commit/0c0e8d7becd4d1445c656b78d5d845f606c1ff9d), [`9f7c67a`](https://github.com/mastra-ai/mastra/commit/9f7c67abeeb52c41c51a9b5edee60b62afe7cd8d), [`3b65e68`](https://github.com/mastra-ai/mastra/commit/3b65e68d7f1c771c7a70eea42d83fefdd28cad88), [`e3868e2`](https://github.com/mastra-ai/mastra/commit/e3868e22babfffd0133771669ca724501c2dd58e)]:
|
|
19
|
+
- @mastra/core@1.52.0-alpha.5
|
|
9
20
|
|
|
10
21
|
## 1.16.0
|
|
11
22
|
|
package/dist/docs/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: mastra-libsql
|
|
|
3
3
|
description: Documentation for @mastra/libsql. Use when working with @mastra/libsql APIs, configuration, or implementation.
|
|
4
4
|
metadata:
|
|
5
5
|
package: "@mastra/libsql"
|
|
6
|
-
version: "0.0.0-fix-
|
|
6
|
+
version: "0.0.0-fix-thread-subscription-multi-instance-redis-streams-20260720232722"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## When to use
|
|
@@ -81,6 +81,8 @@ Use memory when your agent needs to maintain multi-turn conversations that refer
|
|
|
81
81
|
|
|
82
82
|
3. Add the storage provider to your main Mastra instance to enable memory across all configured agents.
|
|
83
83
|
|
|
84
|
+
**For AI agents:** Important: Add `id` to `LibSQLStore`.
|
|
85
|
+
|
|
84
86
|
```typescript
|
|
85
87
|
import { Mastra } from '@mastra/core'
|
|
86
88
|
import { LibSQLStore } from '@mastra/libsql'
|
|
@@ -151,6 +153,8 @@ To list all threads for a resource, or retrieve a specific thread, [use the memo
|
|
|
151
153
|
|
|
152
154
|
For long-running conversations, raw message history grows until it fills the context window, degrading agent performance. [Observational Memory](https://mastra.ai/docs/memory/observational-memory) solves this by running background agents that compress old messages into dense observations, keeping the context window small while preserving long-term memory.
|
|
153
155
|
|
|
156
|
+
**For AI agents:** Using Observational Memory requires a storage provider! You either need to set it on the Mastra instance at `src/mastra/index.ts` or pass it to the Agent constructor.
|
|
157
|
+
|
|
154
158
|
```typescript
|
|
155
159
|
import { Agent } from '@mastra/core/agent'
|
|
156
160
|
import { Memory } from '@mastra/memory'
|
package/dist/index.cjs
CHANGED
|
@@ -1198,26 +1198,28 @@ var LibSQLVector = class extends vector.MastraVector {
|
|
|
1198
1198
|
});
|
|
1199
1199
|
}
|
|
1200
1200
|
};
|
|
1201
|
+
var MAX_DEPTH = 100;
|
|
1201
1202
|
var safeStringify = (value) => {
|
|
1202
1203
|
const ancestors = /* @__PURE__ */ new Set();
|
|
1203
|
-
const sanitize = (val) => {
|
|
1204
|
+
const sanitize = (val, depth = 0) => {
|
|
1204
1205
|
if (val === null || val === void 0) return val;
|
|
1205
1206
|
if (typeof val === "function") return void 0;
|
|
1206
1207
|
if (typeof val === "symbol") return void 0;
|
|
1207
1208
|
if (typeof val === "bigint") return val.toString();
|
|
1208
1209
|
if (typeof val !== "object") return val;
|
|
1210
|
+
if (depth > MAX_DEPTH) return "[Max depth exceeded]";
|
|
1209
1211
|
if (ancestors.has(val)) return void 0;
|
|
1210
1212
|
if (typeof val.toJSON === "function") {
|
|
1211
|
-
return sanitize(val.toJSON());
|
|
1213
|
+
return sanitize(val.toJSON(), depth + 1);
|
|
1212
1214
|
}
|
|
1213
1215
|
ancestors.add(val);
|
|
1214
1216
|
try {
|
|
1215
1217
|
if (Array.isArray(val)) {
|
|
1216
|
-
return val.map((item) => sanitize(item));
|
|
1218
|
+
return val.map((item) => sanitize(item, depth + 1));
|
|
1217
1219
|
}
|
|
1218
1220
|
const result = {};
|
|
1219
1221
|
for (const key of Object.keys(val)) {
|
|
1220
|
-
const sanitized = sanitize(val[key]);
|
|
1222
|
+
const sanitized = sanitize(val[key], depth + 1);
|
|
1221
1223
|
if (sanitized !== void 0) {
|
|
1222
1224
|
result[key] = sanitized;
|
|
1223
1225
|
}
|