@mastra/libsql 1.17.1-alpha.0 → 1.17.1-alpha.1
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 +9 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/docs-memory-message-history.md +1 -1
- package/dist/docs/references/reference-memory-memory-class.md +1 -1
- package/dist/index.cjs +6 -39
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -39
- package/dist/index.js.map +1 -1
- package/dist/storage/factory-storage.d.ts +0 -3
- package/dist/storage/factory-storage.d.ts.map +1 -1
- package/dist/storage/index.d.ts +1 -9
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/vector/index.d.ts +1 -7
- package/dist/vector/index.d.ts.map +1 -1
- package/dist/vector/sql-builder.d.ts.map +1 -1
- package/package.json +6 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @mastra/libsql
|
|
2
2
|
|
|
3
|
+
## 1.17.1-alpha.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fixed local LibSQL stores changing shared database journal state when they close. ([#20227](https://github.com/mastra-ai/mastra/pull/20227))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`73839cb`](https://github.com/mastra-ai/mastra/commit/73839cb58322679c170627d1015669ede5f619aa), [`8e4dc79`](https://github.com/mastra-ai/mastra/commit/8e4dc793dcf035ea506f9ce79f56d2d501a4be14), [`2db93cc`](https://github.com/mastra-ai/mastra/commit/2db93ccd0b872e4de7853a93383efe0647901df8), [`094ab61`](https://github.com/mastra-ai/mastra/commit/094ab6129a1a3ecf6eeb86decac17d5faea4e02a), [`fe80944`](https://github.com/mastra-ai/mastra/commit/fe80944f3ef6681fea6eae8200fce387b7bb3c2f), [`e51e166`](https://github.com/mastra-ai/mastra/commit/e51e166c52e220abc9b64554ce37359dca8544b1)]:
|
|
10
|
+
- @mastra/core@1.53.0-alpha.4
|
|
11
|
+
|
|
3
12
|
## 1.17.1-alpha.0
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/dist/docs/SKILL.md
CHANGED
|
@@ -124,7 +124,7 @@ You can use this history in two ways:
|
|
|
124
124
|
|
|
125
125
|
## Thread title generation
|
|
126
126
|
|
|
127
|
-
Mastra can automatically generate descriptive thread titles
|
|
127
|
+
Mastra can automatically generate descriptive thread titles from the conversation transcript when `generateTitle` is enabled. Use this option when you build a chat interface that renders conversation titles in a thread list or sidebar.
|
|
128
128
|
|
|
129
129
|
```typescript
|
|
130
130
|
import { Agent } from '@mastra/core/agent'
|
|
@@ -47,7 +47,7 @@ export const agent = new Agent({
|
|
|
47
47
|
|
|
48
48
|
**options.observationalMemory** (`boolean | ObservationalMemoryOptions`): Enable Observational Memory for long-context agentic memory. Set to true for defaults, or pass a config object to customize token budgets, models, and scope. See Observational Memory reference for configuration details.
|
|
49
49
|
|
|
50
|
-
**options.generateTitle** (`boolean | { model: DynamicArgument<MastraLanguageModel>; instructions?: DynamicArgument<string> }`): Controls automatic thread title generation from the
|
|
50
|
+
**options.generateTitle** (`boolean | { model: DynamicArgument<MastraLanguageModel>; instructions?: DynamicArgument<string> }`): Controls automatic thread title generation from the conversation transcript. Can be a boolean or an object with custom model and instructions.
|
|
51
51
|
|
|
52
52
|
## Returns
|
|
53
53
|
|
package/dist/index.cjs
CHANGED
|
@@ -546,29 +546,14 @@ var LibSQLVector = class extends vector.MastraVector {
|
|
|
546
546
|
this.vectorIndexes = this.isMemoryDb ? Promise.resolve(/* @__PURE__ */ new Set()) : this.discoverVectorIndexes();
|
|
547
547
|
}
|
|
548
548
|
/**
|
|
549
|
-
* Closes the underlying libsql client, releasing
|
|
550
|
-
*
|
|
551
|
-
* For local file databases, first runs PRAGMA wal_checkpoint(TRUNCATE) and
|
|
552
|
-
* switches back to journal_mode=DELETE so the -wal and -shm sidecar files
|
|
553
|
-
* are released promptly (mirrors LibSQLStore.close()).
|
|
554
|
-
*
|
|
555
|
-
* Remote (Turso) databases skip the WAL pragmas and just close the client.
|
|
549
|
+
* Closes the underlying libsql client, releasing this vector store's OS file handles.
|
|
556
550
|
*
|
|
557
551
|
* Safe to call more than once; subsequent calls are no-ops.
|
|
558
552
|
*/
|
|
559
553
|
async close() {
|
|
560
|
-
if (this.turso.closed) {
|
|
561
|
-
|
|
562
|
-
}
|
|
563
|
-
if (this.turso.protocol === "file" && !this.isMemoryDb) {
|
|
564
|
-
try {
|
|
565
|
-
await this.turso.execute("PRAGMA wal_checkpoint(TRUNCATE);");
|
|
566
|
-
await this.turso.execute("PRAGMA journal_mode=DELETE;");
|
|
567
|
-
} catch (err) {
|
|
568
|
-
this.logger.warn("LibSQLVector: Failed to checkpoint WAL before close.", err);
|
|
569
|
-
}
|
|
554
|
+
if (!this.turso.closed) {
|
|
555
|
+
this.turso.close();
|
|
570
556
|
}
|
|
571
|
-
this.turso.close();
|
|
572
557
|
}
|
|
573
558
|
async discoverVectorIndexes() {
|
|
574
559
|
try {
|
|
@@ -14018,32 +14003,14 @@ var LibSQLStore = class extends storage.MastraCompositeStore {
|
|
|
14018
14003
|
await this.initDomainsSequentially();
|
|
14019
14004
|
}
|
|
14020
14005
|
/**
|
|
14021
|
-
* Closes the underlying libsql client, releasing
|
|
14022
|
-
*
|
|
14023
|
-
* For local file databases, first runs PRAGMA wal_checkpoint(TRUNCATE) and
|
|
14024
|
-
* switches back to journal_mode=DELETE so that Windows releases the -wal
|
|
14025
|
-
* and -shm sidecar files promptly. Without this, the handles stay open
|
|
14026
|
-
* until process exit, causing EBUSY errors when callers try to fs.rm the
|
|
14027
|
-
* storage directory after Mastra.shutdown().
|
|
14028
|
-
*
|
|
14029
|
-
* Remote (Turso) databases skip the WAL pragmas and just close the client.
|
|
14006
|
+
* Closes the underlying libsql client, releasing this store's OS file handles.
|
|
14030
14007
|
*
|
|
14031
14008
|
* Safe to call more than once; subsequent calls are no-ops.
|
|
14032
14009
|
*/
|
|
14033
14010
|
async close() {
|
|
14034
|
-
if (this.client.closed) {
|
|
14035
|
-
|
|
14036
|
-
}
|
|
14037
|
-
const isLocalFileDb = this.isLocalDb || this.client.protocol === "file";
|
|
14038
|
-
if (isLocalFileDb) {
|
|
14039
|
-
try {
|
|
14040
|
-
await this.client.execute("PRAGMA wal_checkpoint(TRUNCATE);");
|
|
14041
|
-
await this.client.execute("PRAGMA journal_mode=DELETE;");
|
|
14042
|
-
} catch (err) {
|
|
14043
|
-
this.logger.warn("LibSQLStore: Failed to checkpoint WAL before close.", err);
|
|
14044
|
-
}
|
|
14011
|
+
if (!this.client.closed) {
|
|
14012
|
+
this.client.close();
|
|
14045
14013
|
}
|
|
14046
|
-
this.client.close();
|
|
14047
14014
|
}
|
|
14048
14015
|
};
|
|
14049
14016
|
|