@effect-agent/storage-sqlite 0.1.0-beta.53 → 0.1.0-beta.55
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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
|
|
2
|
-
import { a as initializeSqliteJournal } from "./sqlite-journal-
|
|
2
|
+
import { a as initializeSqliteJournal } from "./sqlite-journal-Ce8lwVYx.mjs";
|
|
3
3
|
import { Effect, Layer, Result, Schema } from "effect";
|
|
4
4
|
import * as SqlClientService from "effect/unstable/sql/SqlClient";
|
|
5
5
|
import { ScheduleCapacityError, ScheduleChange, ScheduleConflict, ScheduleDueCursor, ScheduleFailpoint, ScheduleId, ScheduleInstant, ScheduleKey, ScheduleNotFound, ScheduleOwner, SchedulePageRequest, ScheduleRecord, ScheduleStorageError, ScheduleStore, defaultSchedulingLimits } from "@effect-agent/thread/Schedule";
|
|
@@ -2,7 +2,7 @@ import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
|
|
|
2
2
|
import { SqliteStorageConfig } from "./SqliteStorageConfig.mjs";
|
|
3
3
|
import { SqliteLedgerError, SqliteStorageCorruptionError, SqliteStorageError, SqliteWriteContention } from "./SqliteStorageError.mjs";
|
|
4
4
|
import { SqliteStorageFailpoint } from "./SqliteStorageFailpoint.mjs";
|
|
5
|
-
import { a as initializeSqliteJournal, i as decodeRows } from "./sqlite-journal-
|
|
5
|
+
import { a as initializeSqliteJournal, i as decodeRows } from "./sqlite-journal-Ce8lwVYx.mjs";
|
|
6
6
|
import { storageConfigLayer, storageFailpointLayer } from "./SqliteThreadStore.mjs";
|
|
7
7
|
import { ApprovalDecision, CanonicalSequence, DefinitionDigests, Digest, PersistedJson, ProducerEpoch, RecordEnvelope, SettlementOutcome } from "@effect-agent/thread/Records";
|
|
8
8
|
import { Clock, Context, Crypto, DateTime, Effect, Layer, Option, Schema, Stream } from "effect";
|
|
@@ -1583,7 +1583,7 @@ const makeServices = Effect.fn("SqliteSubmissionLedger.makeServices")(function*
|
|
|
1583
1583
|
const loadRecoverySnapshot = Effect.fn("SqliteSubmissionLedger.loadRecoverySnapshot")(function* (request) {
|
|
1584
1584
|
const operation = "ledger load recovery snapshot";
|
|
1585
1585
|
const validated = yield* Schema.decodeUnknownEffect(Schema.toType(RecoverySnapshotRequest))(request).pipe(Effect.mapError(internalFailure(operation)));
|
|
1586
|
-
return yield*
|
|
1586
|
+
return yield* journal.withReadTransaction(operation)(Effect.gen(function* () {
|
|
1587
1587
|
const submissionRow = yield* requireSubmission(operation, validated.submissionId);
|
|
1588
1588
|
const submission = yield* decodeSubmissionSnapshot(operation, submissionRow);
|
|
1589
1589
|
let ownership;
|
|
@@ -1681,7 +1681,7 @@ const makeServices = Effect.fn("SqliteSubmissionLedger.makeServices")(function*
|
|
|
1681
1681
|
...reservation === void 0 ? {} : { reservation },
|
|
1682
1682
|
...abortIntent === void 0 ? {} : { abortIntent }
|
|
1683
1683
|
});
|
|
1684
|
-
})).pipe(Effect.catchTag("
|
|
1684
|
+
})).pipe(Effect.catchTag("SqliteStorageError", (error) => Effect.fail(internalFailure(operation)(error))));
|
|
1685
1685
|
});
|
|
1686
1686
|
return Context.make(SubmissionLedger, SubmissionLedger.of({
|
|
1687
1687
|
capabilities,
|