@mastra/libsql 1.25.2-alpha.0 → 1.25.2-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.
@@ -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: "1.25.2-alpha.0"
6
+ version: "1.25.2-alpha.1"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.25.2-alpha.0",
2
+ "version": "1.25.2-alpha.1",
3
3
  "package": "@mastra/libsql",
4
4
  "exports": {},
5
5
  "modules": {}
@@ -50,23 +50,25 @@ console.log(results)
50
50
 
51
51
  The `topK` parameter specifies the maximum number of most similar results to return from the vector search.
52
52
 
53
- Results include both the text content and a similarity score:
53
+ Each result includes an `id`, a similarity `score`, and the stored `metadata`. When you store chunk text in metadata, it's available as `metadata.text`:
54
54
 
55
55
  ```ts
56
56
  [
57
57
  {
58
- text: 'Climate change poses significant challenges...',
58
+ id: 'chunk-1',
59
59
  score: 0.89,
60
- metadata: { source: 'article1.txt' },
60
+ metadata: { text: 'Climate change poses significant challenges...', source: 'article1.txt' },
61
61
  },
62
62
  {
63
- text: 'Rising temperatures affect crop yields...',
63
+ id: 'chunk-2',
64
64
  score: 0.82,
65
- metadata: { source: 'article1.txt' },
65
+ metadata: { text: 'Rising temperatures affect crop yields...', source: 'article1.txt' },
66
66
  },
67
67
  ]
68
68
  ```
69
69
 
70
+ Results can also include `vector` when you set `includeVector: true`, and `document` when the store returns the original document (Chroma only).
71
+
70
72
  ## Advanced retrieval options
71
73
 
72
74
  ### Metadata Filtering
package/dist/index.cjs CHANGED
@@ -13460,7 +13460,7 @@ var WorkflowsLibSQL = class WorkflowsLibSQL extends _mastra_core_storage.Workflo
13460
13460
  this.logger.warn("LibSQL Workflows: Failed to set PRAGMA settings.", err);
13461
13461
  }
13462
13462
  }
13463
- async updateWorkflowResults({ workflowName, runId, stepId, result, requestContext }) {
13463
+ async updateWorkflowResults({ workflowName, runId, stepId, result, requestContext, state }) {
13464
13464
  return this.executeWithRetry(() => withClientWriteLock(this.#client, async () => {
13465
13465
  const tx = await this.#client.transaction("write");
13466
13466
  try {
@@ -13491,7 +13491,8 @@ var WorkflowsLibSQL = class WorkflowsLibSQL extends _mastra_core_storage.Workflo
13491
13491
  snapshot,
13492
13492
  stepId,
13493
13493
  result,
13494
- requestContext
13494
+ requestContext,
13495
+ state
13495
13496
  });
13496
13497
  const now = (/* @__PURE__ */ new Date()).toISOString();
13497
13498
  await tx.execute({