@mastra/libsql 1.20.0-alpha.1 → 1.20.0-alpha.2
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 +19 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/docs-memory-multi-user-threads.md +1 -1
- package/dist/docs/references/docs-memory-semantic-recall.md +2 -1
- package/dist/docs/references/docs-memory-working-memory.md +1 -0
- package/dist/docs/references/docs-storage-overview.md +1 -0
- package/dist/docs/references/docs-workflows-snapshots.md +3 -1
- package/dist/docs/references/guides-rag-retrieval.md +17 -0
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/memory/index.d.ts +2 -2
- package/dist/storage/domains/memory/index.d.ts.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @mastra/libsql
|
|
2
2
|
|
|
3
|
+
## 1.20.0-alpha.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fixed generated thread titles being clobbered during a turn ([#21041](https://github.com/mastra-ai/mastra/pull/21041))
|
|
8
|
+
|
|
9
|
+
`updateThread` required both `title` and `metadata`, so callers that only needed to
|
|
10
|
+
change metadata (message persistence, working memory, observational memory, channel
|
|
11
|
+
subscriptions) had to read the thread and pass its title back. When title generation
|
|
12
|
+
finished between that read and the write, the freshly generated title was overwritten
|
|
13
|
+
with the stale one.
|
|
14
|
+
|
|
15
|
+
`title` and `metadata` are now independently optional: omitting one leaves that column
|
|
16
|
+
untouched. Callers that only change metadata no longer send a title, and message
|
|
17
|
+
persistence no longer rewrites a thread row it just read.
|
|
18
|
+
|
|
19
|
+
- Updated dependencies [[`1c75e32`](https://github.com/mastra-ai/mastra/commit/1c75e32f7fc0b9fb6f548b4407feaec8a1440212), [`c47165c`](https://github.com/mastra-ai/mastra/commit/c47165c983c87594c6952f1fd2fa51a90205034c), [`e08e789`](https://github.com/mastra-ai/mastra/commit/e08e789c1bf4cd2fe46363f7a4728536ceccc9bd), [`35cc901`](https://github.com/mastra-ai/mastra/commit/35cc90102cf834a84827acaf9eee0b6d6d1e2a3b), [`a8b4cf0`](https://github.com/mastra-ai/mastra/commit/a8b4cf02823cffebc4751a53337dfacf097c1ae1), [`f33264f`](https://github.com/mastra-ai/mastra/commit/f33264f517ae603279afd5c4251e2b40f6dd3618), [`689f2c4`](https://github.com/mastra-ai/mastra/commit/689f2c4b6c0835fe455702b01d21daa8abcd9331), [`eeae63e`](https://github.com/mastra-ai/mastra/commit/eeae63e7fbe8e1f237adc69bca6e2ac13c5ca907), [`4c186a0`](https://github.com/mastra-ai/mastra/commit/4c186a017275f45e6ed4c09de0f89550e2d09e8c), [`b0fa077`](https://github.com/mastra-ai/mastra/commit/b0fa077bcbc9b08551846fe372a0d3d15b71ed72)]:
|
|
20
|
+
- @mastra/core@1.58.0-alpha.8
|
|
21
|
+
|
|
3
22
|
## 1.20.0-alpha.1
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/dist/docs/SKILL.md
CHANGED
|
@@ -156,7 +156,7 @@ const memory = new Memory({
|
|
|
156
156
|
})
|
|
157
157
|
```
|
|
158
158
|
|
|
159
|
-
OM requires a storage adapter that supports it: `@mastra/libsql`, `@mastra/pg`, or `@mastra/
|
|
159
|
+
OM requires a storage adapter that supports it: `@mastra/libsql`, `@mastra/pg`, `@mastra/mongodb`, or `@mastra/oracledb`.
|
|
160
160
|
|
|
161
161
|
> **Note:** If you switch the Observer to a weaker model and see facts collapse to a generic `User`, use [`observation.instruction`](https://mastra.ai/reference/memory/observational-memory) to teach the Observer how to read the `<turn>` tag.
|
|
162
162
|
|
|
@@ -148,6 +148,7 @@ Each vector store page below includes installation instructions, configuration p
|
|
|
148
148
|
- [libSQL](https://mastra.ai/reference/vectors/libsql)
|
|
149
149
|
- [MongoDB](https://mastra.ai/reference/vectors/mongodb)
|
|
150
150
|
- [OpenSearch](https://mastra.ai/reference/vectors/opensearch)
|
|
151
|
+
- [OracleDB](https://mastra.ai/reference/vectors/oracledb)
|
|
151
152
|
- [Pinecone](https://mastra.ai/reference/vectors/pinecone)
|
|
152
153
|
- [PostgreSQL](https://mastra.ai/reference/vectors/pg)
|
|
153
154
|
- [Qdrant](https://mastra.ai/reference/vectors/qdrant)
|
|
@@ -180,7 +181,7 @@ const agent = new Agent({
|
|
|
180
181
|
})
|
|
181
182
|
```
|
|
182
183
|
|
|
183
|
-
> **Note:** `scope: 'resource'` is supported by the LibSQL, PostgreSQL, MongoDB, and Upstash storage adapters.
|
|
184
|
+
> **Note:** `scope: 'resource'` is supported by the LibSQL, OracleDB, PostgreSQL, MongoDB, and Upstash storage adapters.
|
|
184
185
|
|
|
185
186
|
### Metadata filtering
|
|
186
187
|
|
|
@@ -129,6 +129,7 @@ Resource-scoped working memory requires specific storage adapters that support t
|
|
|
129
129
|
|
|
130
130
|
- **libSQL** (`@mastra/libsql`)
|
|
131
131
|
- **PostgreSQL** (`@mastra/pg`)
|
|
132
|
+
- **OracleDB** (`@mastra/oracledb`)
|
|
132
133
|
- **Upstash** (`@mastra/upstash`)
|
|
133
134
|
- **MongoDB** (`@mastra/mongodb`)
|
|
134
135
|
|
|
@@ -193,6 +193,7 @@ Each provider page includes installation instructions, configuration parameters,
|
|
|
193
193
|
- [libSQL](https://mastra.ai/reference/storage/libsql)
|
|
194
194
|
- [PostgreSQL](https://mastra.ai/reference/storage/postgresql)
|
|
195
195
|
- [MongoDB](https://mastra.ai/reference/storage/mongodb)
|
|
196
|
+
- [OracleDB](https://mastra.ai/reference/storage/oracledb)
|
|
196
197
|
- [Upstash](https://mastra.ai/reference/storage/upstash)
|
|
197
198
|
- [Redis](https://mastra.ai/reference/storage/redis)
|
|
198
199
|
- [Cloudflare D1](https://mastra.ai/reference/storage/cloudflare-d1)
|
|
@@ -81,13 +81,14 @@ Each snapshot includes the `runId`, input, step status (`success`, `suspended`,
|
|
|
81
81
|
|
|
82
82
|
## How snapshots are saved and retrieved
|
|
83
83
|
|
|
84
|
-
Snapshots are saved to the configured storage system. By default, they use libSQL, but you can configure Upstash or
|
|
84
|
+
Snapshots are saved to the configured storage system. By default, they use libSQL, but you can configure Upstash, PostgreSQL, or OracleDB instead. Each snapshot is saved in the `workflow_snapshots` table and identified by the workflow's `runId`.
|
|
85
85
|
|
|
86
86
|
Read more about:
|
|
87
87
|
|
|
88
88
|
- [libSQL Storage](https://mastra.ai/reference/storage/libsql)
|
|
89
89
|
- [Upstash Storage](https://mastra.ai/reference/storage/upstash)
|
|
90
90
|
- [PostgreSQL Storage](https://mastra.ai/reference/storage/postgresql)
|
|
91
|
+
- [OracleDB Storage](https://mastra.ai/reference/storage/oracledb)
|
|
91
92
|
|
|
92
93
|
### Saving snapshots
|
|
93
94
|
|
|
@@ -141,6 +142,7 @@ export const mastra = new Mastra({
|
|
|
141
142
|
|
|
142
143
|
- [libSQL Storage](https://mastra.ai/reference/storage/libsql)
|
|
143
144
|
- [PostgreSQL Storage](https://mastra.ai/reference/storage/postgresql)
|
|
145
|
+
- [OracleDB Storage](https://mastra.ai/reference/storage/oracledb)
|
|
144
146
|
- [MongoDB Storage](https://mastra.ai/reference/storage/mongodb)
|
|
145
147
|
- [Upstash Storage](https://mastra.ai/reference/storage/upstash)
|
|
146
148
|
- [Cloudflare D1](https://mastra.ai/reference/storage/cloudflare-d1)
|
|
@@ -436,6 +436,23 @@ export const ragAgent = new Agent({
|
|
|
436
436
|
})
|
|
437
437
|
```
|
|
438
438
|
|
|
439
|
+
**OracleDB**:
|
|
440
|
+
|
|
441
|
+
```ts
|
|
442
|
+
import { ORACLEDB_PROMPT } from '@mastra/oracledb'
|
|
443
|
+
|
|
444
|
+
export const ragAgent = new Agent({
|
|
445
|
+
id: 'rag-agent',
|
|
446
|
+
name: 'RAG Agent',
|
|
447
|
+
model: 'openai/gpt-5.6-sol',
|
|
448
|
+
instructions: `
|
|
449
|
+
Process queries using the provided context. Structure responses to be concise and relevant.
|
|
450
|
+
${ORACLEDB_PROMPT}
|
|
451
|
+
`,
|
|
452
|
+
tools: { vectorQueryTool },
|
|
453
|
+
})
|
|
454
|
+
```
|
|
455
|
+
|
|
439
456
|
**S3Vectors**:
|
|
440
457
|
|
|
441
458
|
```ts
|
package/dist/index.cjs
CHANGED
|
@@ -7450,7 +7450,7 @@ var MemoryLibSQL = class MemoryLibSQL extends _mastra_core_storage.MemoryStorage
|
|
|
7450
7450
|
const now = /* @__PURE__ */ new Date();
|
|
7451
7451
|
const updatedThread = {
|
|
7452
7452
|
...thread,
|
|
7453
|
-
title,
|
|
7453
|
+
title: title ?? thread.title,
|
|
7454
7454
|
metadata: {
|
|
7455
7455
|
...thread.metadata,
|
|
7456
7456
|
...metadata
|
|
@@ -7459,9 +7459,9 @@ var MemoryLibSQL = class MemoryLibSQL extends _mastra_core_storage.MemoryStorage
|
|
|
7459
7459
|
};
|
|
7460
7460
|
try {
|
|
7461
7461
|
await this.#client.execute({
|
|
7462
|
-
sql: `UPDATE ${_mastra_core_storage.TABLE_THREADS} SET title = ?, metadata = jsonb(?), updatedAt = ? WHERE id = ?`,
|
|
7462
|
+
sql: `UPDATE ${_mastra_core_storage.TABLE_THREADS} SET title = COALESCE(?, title), metadata = jsonb(?), updatedAt = ? WHERE id = ?`,
|
|
7463
7463
|
args: [
|
|
7464
|
-
title,
|
|
7464
|
+
title ?? null,
|
|
7465
7465
|
JSON.stringify(updatedThread.metadata),
|
|
7466
7466
|
now.toISOString(),
|
|
7467
7467
|
id
|