@axiom-lattice/local-stores 1.0.1 → 1.0.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/.turbo/turbo-build.log +10 -10
- package/CHANGELOG.md +9 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/stores/LocalWorkflowTrackingStore.ts +9 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axiom-lattice/local-stores",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Local SQLite-based stores for Axiom Lattice framework",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"@langchain/langgraph-checkpoint-sqlite": "^1.0.3",
|
|
25
25
|
"@types/sql.js": "^1.4.11",
|
|
26
26
|
"sql.js": "^1.14.1",
|
|
27
|
-
"@axiom-lattice/core": "2.1.
|
|
28
|
-
"@axiom-lattice/protocols": "2.1.
|
|
27
|
+
"@axiom-lattice/core": "2.1.80",
|
|
28
|
+
"@axiom-lattice/protocols": "2.1.42"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/node": "^20.11.24",
|
|
@@ -202,6 +202,15 @@ export class LocalWorkflowTrackingStore implements WorkflowTrackingStore {
|
|
|
202
202
|
};
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
+
async upsertRunStep(request: CreateRunStepRequest): Promise<RunStep> {
|
|
206
|
+
// Look up by (run_id, step_type, step_name) — the idempotency key
|
|
207
|
+
const row = this.db.prepare(
|
|
208
|
+
`SELECT * FROM lt_workflow_steps WHERE run_id = ? AND step_type = ? AND step_name = ?`,
|
|
209
|
+
).get(request.runId, request.stepType, request.stepName) as unknown as StepRow | undefined;
|
|
210
|
+
if (row) return mapRowToStep(row);
|
|
211
|
+
return this.createRunStep(request);
|
|
212
|
+
}
|
|
213
|
+
|
|
205
214
|
async updateRunStep(runId: string, stepId: string, updates: UpdateRunStepRequest): Promise<RunStep | null> {
|
|
206
215
|
const setClauses: string[] = [];
|
|
207
216
|
const values: unknown[] = [];
|