@mastra/spanner 1.9.2-alpha.0 → 1.9.3-alpha.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/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +5 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/memory/index.d.ts.map +1 -1
- package/dist/storage/domains/workflows/index.d.ts +2 -1
- package/dist/storage/domains/workflows/index.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/docs/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: mastra-spanner
|
|
|
3
3
|
description: Documentation for @mastra/spanner. Use when working with @mastra/spanner APIs, configuration, or implementation.
|
|
4
4
|
metadata:
|
|
5
5
|
package: "@mastra/spanner"
|
|
6
|
-
version: "1.9.
|
|
6
|
+
version: "1.9.3-alpha.0"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## When to use
|
package/dist/index.cjs
CHANGED
|
@@ -7310,10 +7310,10 @@ var MemorySpanner = class MemorySpanner extends _mastra_core_storage.MemoryStora
|
|
|
7310
7310
|
};
|
|
7311
7311
|
const { sql: preparedWhereSql, params: whereParams, types: whereTypes } = this.db.prepareWhereClause(filters, _mastra_core_storage.TABLE_MESSAGES);
|
|
7312
7312
|
const metadataWhere = buildSpannerMessageMetadataFilter(metadataFilter);
|
|
7313
|
-
const whereSql =
|
|
7313
|
+
const whereSql = metadataWhere.clauses.reduce((sql, clause) => {
|
|
7314
7314
|
if (!clause) return sql;
|
|
7315
7315
|
return sql ? `${sql} AND ${clause}` : ` WHERE ${clause}`;
|
|
7316
|
-
},
|
|
7316
|
+
}, preparedWhereSql);
|
|
7317
7317
|
Object.assign(whereParams, metadataWhere.params);
|
|
7318
7318
|
if (perPage === 0 && (!include || include.length === 0)) return {
|
|
7319
7319
|
messages: [],
|
|
@@ -12526,7 +12526,7 @@ var WorkflowsSpanner = class WorkflowsSpanner extends _mastra_core_storage.Workf
|
|
|
12526
12526
|
}
|
|
12527
12527
|
}
|
|
12528
12528
|
/** Merges a step result and request-context delta into a snapshot inside an RW transaction. */
|
|
12529
|
-
async updateWorkflowResults({ workflowName, runId, stepId, result, requestContext }) {
|
|
12529
|
+
async updateWorkflowResults({ workflowName, runId, stepId, result, requestContext, state }) {
|
|
12530
12530
|
const table = quoteIdent(_mastra_core_storage.TABLE_WORKFLOW_SNAPSHOT, "table name");
|
|
12531
12531
|
try {
|
|
12532
12532
|
let mergedContext = {};
|
|
@@ -12562,6 +12562,7 @@ var WorkflowsSpanner = class WorkflowsSpanner extends _mastra_core_storage.Workf
|
|
|
12562
12562
|
snapshot = typeof raw === "string" ? JSON.parse(raw) : raw;
|
|
12563
12563
|
}
|
|
12564
12564
|
snapshot.context[stepId] = result;
|
|
12565
|
+
if (state !== void 0) snapshot.context.__state = state;
|
|
12565
12566
|
snapshot.requestContext = {
|
|
12566
12567
|
...snapshot.requestContext,
|
|
12567
12568
|
...requestContext
|
|
@@ -12608,6 +12609,7 @@ var WorkflowsSpanner = class WorkflowsSpanner extends _mastra_core_storage.Workf
|
|
|
12608
12609
|
try {
|
|
12609
12610
|
let updated;
|
|
12610
12611
|
await this.db.runWithAbortRetry(() => this.database.runTransactionAsync(async (tx) => {
|
|
12612
|
+
updated = void 0;
|
|
12611
12613
|
try {
|
|
12612
12614
|
const [rows] = await tx.run({
|
|
12613
12615
|
sql: `SELECT snapshot FROM ${table} WHERE workflow_name = @workflow_name AND run_id = @run_id`,
|