@effect-agent/storage-sqlite 0.1.0-beta.53 → 0.1.0-beta.54
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/SqliteScheduleStore.mjs +1 -1
- package/dist/SqliteSubmissionLedger.mjs +3 -3
- package/dist/SqliteSubmissionLedger.mjs.map +1 -1
- package/dist/SqliteSubscriptionStore.mjs +1 -1
- package/dist/SqliteThreadStore.mjs +7 -2
- package/dist/SqliteThreadStore.mjs.map +1 -1
- package/dist/{sqlite-journal-CQT5NSYL.mjs → sqlite-journal-Ce8lwVYx.mjs} +3 -2
- package/dist/{sqlite-journal-CQT5NSYL.mjs.map → sqlite-journal-Ce8lwVYx.mjs.map} +1 -1
- package/package.json +1 -1
- package/src/SqliteSubmissionLedger.ts +7 -3
- package/src/SqliteThreadStore.ts +14 -1
- package/src/internal/sqlite-journal.ts +1 -0
package/src/SqliteThreadStore.ts
CHANGED
|
@@ -799,7 +799,20 @@ const makeServices = Effect.fn("SqliteThreadStore.makeServices")(function* () {
|
|
|
799
799
|
message: `Expected at most one checkpoint row but found ${rows.length}.`,
|
|
800
800
|
});
|
|
801
801
|
}
|
|
802
|
-
const
|
|
802
|
+
const row = rows[0];
|
|
803
|
+
const checkpoint = yield* decodeCheckpoint(row.checkpoint_json);
|
|
804
|
+
|
|
805
|
+
if (
|
|
806
|
+
row.thread_id !== validated.threadId ||
|
|
807
|
+
checkpoint.threadId !== row.thread_id ||
|
|
808
|
+
checkpoint.throughSequence !== row.through_sequence ||
|
|
809
|
+
checkpoint.tailDigest !== row.tail_digest
|
|
810
|
+
) {
|
|
811
|
+
return yield* ThreadStoreError.make({
|
|
812
|
+
operation: "load checkpoint",
|
|
813
|
+
message: "Stored checkpoint metadata does not match its canonical row.",
|
|
814
|
+
});
|
|
815
|
+
}
|
|
803
816
|
|
|
804
817
|
const canonicalDigest = yield* tailDigestAt(
|
|
805
818
|
journal,
|