@effect-agent/storage-sqlite 0.1.0-beta.6 → 0.1.0-beta.61

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.
Files changed (59) hide show
  1. package/dist/SqliteActivityStore.d.mts +14 -0
  2. package/dist/SqliteActivityStore.mjs +310 -0
  3. package/dist/SqliteActivityStore.mjs.map +1 -0
  4. package/dist/SqliteMessageDeliveryStore.d.mts +14 -0
  5. package/dist/SqliteMessageDeliveryStore.mjs +24 -0
  6. package/dist/SqliteMessageDeliveryStore.mjs.map +1 -0
  7. package/dist/SqliteScheduleStore.d.mts +14 -0
  8. package/dist/SqliteScheduleStore.mjs +255 -0
  9. package/dist/SqliteScheduleStore.mjs.map +1 -0
  10. package/dist/SqliteStorageConfig.d.mts +34 -0
  11. package/dist/SqliteStorageConfig.mjs +39 -0
  12. package/dist/SqliteStorageConfig.mjs.map +1 -0
  13. package/dist/SqliteStorageError-CzKmwCLl.d.mts +86 -0
  14. package/dist/SqliteStorageError.d.mts +2 -0
  15. package/dist/SqliteStorageError.mjs +148 -0
  16. package/dist/SqliteStorageError.mjs.map +1 -0
  17. package/dist/SqliteStorageFailpoint.d.mts +17 -0
  18. package/dist/SqliteStorageFailpoint.mjs +14 -0
  19. package/dist/SqliteStorageFailpoint.mjs.map +1 -0
  20. package/dist/SqliteStorageFailpointTesting.d.mts +15 -0
  21. package/dist/SqliteStorageFailpointTesting.mjs +19 -0
  22. package/dist/SqliteStorageFailpointTesting.mjs.map +1 -0
  23. package/dist/SqliteStorageVersion-gA7_96xM.d.mts +9 -0
  24. package/dist/SqliteStorageVersion.d.mts +2 -0
  25. package/dist/SqliteStorageVersion.mjs +8 -0
  26. package/dist/SqliteStorageVersion.mjs.map +1 -0
  27. package/dist/SqliteSubmissionLedger.d.mts +23 -0
  28. package/dist/SqliteSubmissionLedger.mjs +1765 -0
  29. package/dist/SqliteSubmissionLedger.mjs.map +1 -0
  30. package/dist/SqliteSubscriptionStore.d.mts +13 -0
  31. package/dist/SqliteSubscriptionStore.mjs +28 -0
  32. package/dist/SqliteSubscriptionStore.mjs.map +1 -0
  33. package/dist/SqliteThreadStore.d.mts +49 -0
  34. package/dist/SqliteThreadStore.mjs +427 -0
  35. package/dist/SqliteThreadStore.mjs.map +1 -0
  36. package/dist/index.d.mts +11 -193
  37. package/dist/index.mjs +11 -3082
  38. package/dist/migrations-dnTR0RKq.mjs +326 -0
  39. package/dist/migrations-dnTR0RKq.mjs.map +1 -0
  40. package/dist/rolldown-runtime-D7D4PA-g.mjs +13 -0
  41. package/dist/sqlite-journal-lDduEakl.mjs +887 -0
  42. package/dist/sqlite-journal-lDduEakl.mjs.map +1 -0
  43. package/package.json +1 -41
  44. package/src/SqliteActivityStore.ts +556 -0
  45. package/src/SqliteMessageDeliveryStore.ts +42 -0
  46. package/src/SqliteScheduleStore.ts +404 -0
  47. package/src/{sqlite-storage-config.ts → SqliteStorageConfig.ts} +1 -1
  48. package/src/{errors.ts → SqliteStorageError.ts} +8 -3
  49. package/src/SqliteStorageFailpoint.ts +23 -0
  50. package/src/{sqlite-storage-failpoint.ts → SqliteStorageFailpointTesting.ts} +7 -18
  51. package/src/SqliteStorageVersion.ts +2 -0
  52. package/src/{sqlite-ledger.ts → SqliteSubmissionLedger.ts} +753 -118
  53. package/src/SqliteSubscriptionStore.ts +59 -0
  54. package/src/{sqlite-conversation-store.ts → SqliteThreadStore.ts} +372 -302
  55. package/src/index.ts +10 -6
  56. package/src/internal/message-delivery-schema.ts +24 -0
  57. package/src/{migrations.ts → internal/migrations.ts} +145 -79
  58. package/src/{sqlite-journal.ts → internal/sqlite-journal.ts} +534 -222
  59. package/dist/index.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SqliteStorageError.mjs","names":[],"sources":["../src/SqliteStorageError.ts"],"sourcesContent":["import { CanonicalSequence, ProducerEpoch } from \"@effect-agent/thread/Records\";\nimport { Schema } from \"effect\";\n\n/** The SQLite file uses a private-development format this adapter cannot read. */\nexport class SqliteStorageCompatibilityError extends Schema.TaggedError<SqliteStorageCompatibilityError>()(\n \"SqliteStorageCompatibilityError\",\n {\n actualVersion: Schema.Int,\n message: Schema.String,\n supportedVersion: Schema.Int,\n },\n) {}\n\n/** Stored bytes failed the current Schema and cannot be used as recovery truth. */\nexport class SqliteStorageCorruptionError extends Schema.TaggedError<SqliteStorageCorruptionError>()(\n \"SqliteStorageCorruptionError\",\n {\n message: Schema.String,\n rowKey: Schema.String,\n table: Schema.String,\n },\n) {}\n\n/** SQLite infrastructure failed while opening or operating the store. */\nexport class SqliteStorageError extends Schema.TaggedError<SqliteStorageError>()(\n \"SqliteStorageError\",\n {\n cause: Schema.optionalKey(Schema.Defect()),\n message: Schema.String,\n operation: Schema.String,\n },\n) {}\n\n/**\n * SQLite infrastructure failed while operating the Submission Ledger. Surfaces at the\n * SubmissionLedger port as the typed `LedgerError` with this error preserved as its cause,\n * so the adapter-level tag is never erased.\n */\nexport class SqliteLedgerError extends Schema.TaggedError<SqliteLedgerError>()(\n \"SqliteLedgerError\",\n {\n cause: Schema.optionalKey(Schema.Defect()),\n message: Schema.String,\n operation: Schema.String,\n },\n) {}\n\n/**\n * A canonical batch retry conflicts with existing append state. Tail conflicts carry the\n * actual committed tail as a diagnostic resume hint.\n */\nexport class SqliteAppendConflict extends Schema.TaggedError<SqliteAppendConflict>()(\n \"SqliteAppendConflict\",\n {\n message: Schema.String,\n reason: Schema.Literals([\"batch-digest\", \"record-identity\", \"tail\"]),\n actualTailSequence: Schema.optionalKey(CanonicalSequence),\n actualTailDigest: Schema.optionalKey(Schema.String),\n },\n) {}\n\n/**\n * A producer epoch does not match the Thread's current writer registration. Appends\n * require the exact registered epoch, so both older and newer unregistered epochs are fenced;\n * a newer epoch takes over by materializing first.\n */\nexport class SqliteFenceRejected extends Schema.TaggedError<SqliteFenceRejected>()(\n \"SqliteFenceRejected\",\n {\n actualEpoch: ProducerEpoch,\n message: Schema.String,\n producerEpoch: ProducerEpoch,\n },\n) {}\n\n/**\n * A write transaction could not acquire the SQLite write lock within the configured busy\n * timeout (SQLITE_BUSY / SQLITE_LOCKED). Another transiently coexisting owner is writing;\n * the operation did not mutate canonical state and is safe to retry.\n */\nexport class SqliteWriteContention extends Schema.TaggedError<SqliteWriteContention>()(\n \"SqliteWriteContention\",\n {\n cause: Schema.optionalKey(Schema.Defect()),\n message: Schema.String,\n operation: Schema.String,\n },\n) {}\n\n/** A checkpoint conflicts with a previously stored checkpoint at the same offset. */\nexport class SqliteCheckpointConflict extends Schema.TaggedError<SqliteCheckpointConflict>()(\n \"SqliteCheckpointConflict\",\n {\n message: Schema.String,\n },\n) {}\n\nexport const SqliteStorageFailpointLocation = Schema.Literals([\n \"upgrade:before-mutation\",\n \"upgrade:after-mutation\",\n \"upgrade:before-version\",\n \"upgrade:after-version\",\n \"materialize:before\",\n \"materialize:after\",\n \"append:before\",\n \"append:after-batch-insert\",\n \"append:after-record-insert\",\n \"append:after-tail-update\",\n \"append:after\",\n \"export:after-thread-read\",\n \"save-checkpoint:before\",\n \"save-checkpoint:after\",\n \"ledger:admit:before\",\n \"ledger:admit:after\",\n \"ledger:mark-ready:before\",\n \"ledger:mark-ready:after\",\n \"ledger:claim:before\",\n \"ledger:claim:after\",\n \"ledger:mark-input-applied:before\",\n \"ledger:mark-input-applied:after\",\n \"ledger:renew:before\",\n \"ledger:renew:after\",\n \"ledger:reserve-settlement:before\",\n \"ledger:reserve-settlement:after\",\n \"ledger:finalize-settlement:before\",\n \"ledger:finalize-settlement:after\",\n \"ledger:request-abort:before\",\n \"ledger:request-abort:after\",\n \"ledger:release:before\",\n \"ledger:release:after\",\n \"ledger:claim-joining:before\",\n \"ledger:claim-joining:after\",\n \"ledger:mark-joined:before\",\n \"ledger:mark-joined:after\",\n \"ledger:revert-joining:before\",\n \"ledger:revert-joining:after\",\n \"ledger:suspend:before\",\n \"ledger:suspend:after\",\n \"ledger:approval-decision:before\",\n \"ledger:approval-decision:after\",\n \"ledger:mark-unknown:before\",\n \"ledger:mark-unknown:after\",\n \"ledger:unknown-resolution:before\",\n \"ledger:unknown-resolution:after\",\n \"ledger:child-reservation:before\",\n \"ledger:child-reservation:after\",\n \"ledger:child-attach:before\",\n \"ledger:child-attach:after\",\n \"ledger:child-release-pending:before\",\n \"ledger:child-release-pending:after\",\n \"ledger:child-release:before\",\n \"ledger:child-release:after\",\n \"ledger:child-settled:before\",\n \"ledger:child-settled:after\",\n]);\n\nexport type SqliteStorageFailpointLocation = typeof SqliteStorageFailpointLocation.Type;\n\n/** Deterministic test-only fault or pause injected at a SQLite operation boundary. */\nexport class SqliteStorageFailpointError extends Schema.TaggedError<SqliteStorageFailpointError>()(\n \"SqliteStorageFailpointError\",\n {\n location: SqliteStorageFailpointLocation,\n },\n) {\n override get message() {\n return `Injected SQLite storage failure at ${this.location}.`;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAIA,IAAa,kCAAb,cAAqD,OAAO,YAA6C,CAAC,CACxG,mCACA;CACE,eAAe,OAAO;CACtB,SAAS,OAAO;CAChB,kBAAkB,OAAO;AAC3B,CACF,CAAC,CAAC,CAAC;;AAGH,IAAa,+BAAb,cAAkD,OAAO,YAA0C,CAAC,CAClG,gCACA;CACE,SAAS,OAAO;CAChB,QAAQ,OAAO;CACf,OAAO,OAAO;AAChB,CACF,CAAC,CAAC,CAAC;;AAGH,IAAa,qBAAb,cAAwC,OAAO,YAAgC,CAAC,CAC9E,sBACA;CACE,OAAO,OAAO,YAAY,OAAO,OAAO,CAAC;CACzC,SAAS,OAAO;CAChB,WAAW,OAAO;AACpB,CACF,CAAC,CAAC,CAAC;;;;;;AAOH,IAAa,oBAAb,cAAuC,OAAO,YAA+B,CAAC,CAC5E,qBACA;CACE,OAAO,OAAO,YAAY,OAAO,OAAO,CAAC;CACzC,SAAS,OAAO;CAChB,WAAW,OAAO;AACpB,CACF,CAAC,CAAC,CAAC;;;;;AAMH,IAAa,uBAAb,cAA0C,OAAO,YAAkC,CAAC,CAClF,wBACA;CACE,SAAS,OAAO;CAChB,QAAQ,OAAO,SAAS;EAAC;EAAgB;EAAmB;CAAM,CAAC;CACnE,oBAAoB,OAAO,YAAY,iBAAiB;CACxD,kBAAkB,OAAO,YAAY,OAAO,MAAM;AACpD,CACF,CAAC,CAAC,CAAC;;;;;;AAOH,IAAa,sBAAb,cAAyC,OAAO,YAAiC,CAAC,CAChF,uBACA;CACE,aAAa;CACb,SAAS,OAAO;CAChB,eAAe;AACjB,CACF,CAAC,CAAC,CAAC;;;;;;AAOH,IAAa,wBAAb,cAA2C,OAAO,YAAmC,CAAC,CACpF,yBACA;CACE,OAAO,OAAO,YAAY,OAAO,OAAO,CAAC;CACzC,SAAS,OAAO;CAChB,WAAW,OAAO;AACpB,CACF,CAAC,CAAC,CAAC;;AAGH,IAAa,2BAAb,cAA8C,OAAO,YAAsC,CAAC,CAC1F,4BACA,EACE,SAAS,OAAO,OAClB,CACF,CAAC,CAAC,CAAC;AAEH,MAAa,iCAAiC,OAAO,SAAS;CAC5D;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;;AAKD,IAAa,8BAAb,cAAiD,OAAO,YAAyC,CAAC,CAChG,+BACA,EACE,UAAU,+BACZ,CACF,CAAC,CAAC;CACA,IAAa,UAAU;EACrB,OAAO,sCAAsC,KAAK,SAAS;CAC7D;AACF"}
@@ -0,0 +1,17 @@
1
+ import { l as SqliteStorageFailpointError, u as SqliteStorageFailpointLocation } from "./SqliteStorageError-CzKmwCLl.mjs";
2
+ import { Context, Effect, Layer } from "effect";
3
+ declare namespace SqliteStorageFailpoint_d_exports {
4
+ export { SqliteStorageFailpoint, SqliteStorageFailpointHandler };
5
+ }
6
+ type SqliteStorageFailpointHandler = (location: SqliteStorageFailpointLocation) => Effect.Effect<void, SqliteStorageFailpointError>;
7
+ declare const SqliteStorageFailpoint_base: Context.ServiceClass<SqliteStorageFailpoint, "@effect-agent/storage-sqlite/SqliteStorageFailpoint", {
8
+ readonly hit: SqliteStorageFailpointHandler;
9
+ }>;
10
+ /** Explicit fault-injection authority used at SQLite operation boundaries. */
11
+ declare class SqliteStorageFailpoint extends SqliteStorageFailpoint_base {
12
+ /** Production default: no fault injection. */
13
+ static readonly layer: Layer.Layer<SqliteStorageFailpoint, never, never>;
14
+ }
15
+ //#endregion
16
+ export { SqliteStorageFailpoint, SqliteStorageFailpointHandler, SqliteStorageFailpoint_d_exports as t };
17
+ //# sourceMappingURL=SqliteStorageFailpoint.d.mts.map
@@ -0,0 +1,14 @@
1
+ import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
2
+ import { Context, Effect, Layer } from "effect";
3
+ //#region src/SqliteStorageFailpoint.ts
4
+ var SqliteStorageFailpoint_exports = /* @__PURE__ */ __exportAll({ SqliteStorageFailpoint: () => SqliteStorageFailpoint });
5
+ const noFailpoint = () => Effect.void;
6
+ /** Explicit fault-injection authority used at SQLite operation boundaries. */
7
+ var SqliteStorageFailpoint = class extends Context.Service()("@effect-agent/storage-sqlite/SqliteStorageFailpoint") {
8
+ /** Production default: no fault injection. */
9
+ static layer = Layer.succeed(this)({ hit: noFailpoint });
10
+ };
11
+ //#endregion
12
+ export { SqliteStorageFailpoint, SqliteStorageFailpoint_exports as t };
13
+
14
+ //# sourceMappingURL=SqliteStorageFailpoint.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SqliteStorageFailpoint.mjs","names":[],"sources":["../src/SqliteStorageFailpoint.ts"],"sourcesContent":["import { Context, Effect, Layer } from \"effect\";\n\nimport type {\n SqliteStorageFailpointError,\n SqliteStorageFailpointLocation,\n} from \"./SqliteStorageError.ts\";\n\nexport type SqliteStorageFailpointHandler = (\n location: SqliteStorageFailpointLocation,\n) => Effect.Effect<void, SqliteStorageFailpointError>;\n\nconst noFailpoint: SqliteStorageFailpointHandler = () => Effect.void;\n\n/** Explicit fault-injection authority used at SQLite operation boundaries. */\nexport class SqliteStorageFailpoint extends Context.Service<\n SqliteStorageFailpoint,\n {\n readonly hit: SqliteStorageFailpointHandler;\n }\n>()(\"@effect-agent/storage-sqlite/SqliteStorageFailpoint\") {\n /** Production default: no fault injection. */\n static readonly layer = Layer.succeed(this)({ hit: noFailpoint });\n}\n"],"mappings":";;;;AAWA,MAAM,oBAAmD,OAAO;;AAGhE,IAAa,yBAAb,cAA4C,QAAQ,QAKlD,CAAC,CAAC,qDAAqD,CAAC,CAAC;;CAEzD,OAAgB,QAAQ,MAAM,QAAQ,IAAI,CAAC,CAAC,EAAE,KAAK,YAAY,CAAC;AAClE"}
@@ -0,0 +1,15 @@
1
+ import { SqliteStorageFailpoint, SqliteStorageFailpointHandler } from "./SqliteStorageFailpoint.mjs";
2
+ import { Context, Effect, Layer } from "effect";
3
+ //#region src/SqliteStorageFailpointTesting.d.ts
4
+ declare const SqliteStorageFailpointTestControl_base: Context.ServiceClass<SqliteStorageFailpointTestControl, "@effect-agent/storage-sqlite/SqliteStorageFailpointTestControl", {
5
+ readonly clear: Effect.Effect<void>;
6
+ readonly setHandler: (handler: SqliteStorageFailpointHandler) => Effect.Effect<void>;
7
+ }>;
8
+ /** Test-only control for replacing the active SQLite failpoint handler. */
9
+ declare class SqliteStorageFailpointTestControl extends SqliteStorageFailpointTestControl_base {
10
+ /** Reusable test Layer with a control service backed by the same handler Ref. */
11
+ static readonly layer: Layer.Layer<SqliteStorageFailpoint | SqliteStorageFailpointTestControl, never, never>;
12
+ }
13
+ //#endregion
14
+ export { SqliteStorageFailpointTestControl };
15
+ //# sourceMappingURL=SqliteStorageFailpointTesting.d.mts.map
@@ -0,0 +1,19 @@
1
+ import { SqliteStorageFailpoint } from "./SqliteStorageFailpoint.mjs";
2
+ import { Context, Effect, Layer, Ref } from "effect";
3
+ //#region src/SqliteStorageFailpointTesting.ts
4
+ const noFailpoint = () => Effect.void;
5
+ /** Test-only control for replacing the active SQLite failpoint handler. */
6
+ var SqliteStorageFailpointTestControl = class SqliteStorageFailpointTestControl extends Context.Service()("@effect-agent/storage-sqlite/SqliteStorageFailpointTestControl") {
7
+ /** Reusable test Layer with a control service backed by the same handler Ref. */
8
+ static layer = Layer.effectContext(Effect.gen(function* () {
9
+ const handler = yield* Ref.make(noFailpoint);
10
+ return Context.make(SqliteStorageFailpoint, SqliteStorageFailpoint.of({ hit: (location) => Ref.get(handler).pipe(Effect.flatMap((current) => current(location))) })).pipe(Context.add(SqliteStorageFailpointTestControl, SqliteStorageFailpointTestControl.of({
11
+ clear: Ref.set(handler, noFailpoint),
12
+ setHandler: (next) => Ref.set(handler, next)
13
+ })));
14
+ }));
15
+ };
16
+ //#endregion
17
+ export { SqliteStorageFailpointTestControl };
18
+
19
+ //# sourceMappingURL=SqliteStorageFailpointTesting.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SqliteStorageFailpointTesting.mjs","names":[],"sources":["../src/SqliteStorageFailpointTesting.ts"],"sourcesContent":["import { Context, Effect, Layer, Ref } from \"effect\";\n\nimport {\n SqliteStorageFailpoint,\n type SqliteStorageFailpointHandler,\n} from \"./SqliteStorageFailpoint.ts\";\n\nconst noFailpoint: SqliteStorageFailpointHandler = () => Effect.void;\n\n/** Test-only control for replacing the active SQLite failpoint handler. */\nexport class SqliteStorageFailpointTestControl extends Context.Service<\n SqliteStorageFailpointTestControl,\n {\n readonly clear: Effect.Effect<void>;\n readonly setHandler: (handler: SqliteStorageFailpointHandler) => Effect.Effect<void>;\n }\n>()(\"@effect-agent/storage-sqlite/SqliteStorageFailpointTestControl\") {\n /** Reusable test Layer with a control service backed by the same handler Ref. */\n static readonly layer = Layer.effectContext(\n Effect.gen(function* () {\n const handler = yield* Ref.make<SqliteStorageFailpointHandler>(noFailpoint);\n\n return Context.make(\n SqliteStorageFailpoint,\n SqliteStorageFailpoint.of({\n hit: (location) => Ref.get(handler).pipe(Effect.flatMap((current) => current(location))),\n }),\n ).pipe(\n Context.add(\n SqliteStorageFailpointTestControl,\n SqliteStorageFailpointTestControl.of({\n clear: Ref.set(handler, noFailpoint),\n setHandler: (next) => Ref.set(handler, next),\n }),\n ),\n );\n }),\n );\n}\n"],"mappings":";;;AAOA,MAAM,oBAAmD,OAAO;;AAGhE,IAAa,oCAAb,MAAa,0CAA0C,QAAQ,QAM7D,CAAC,CAAC,gEAAgE,CAAC,CAAC;;CAEpE,OAAgB,QAAQ,MAAM,cAC5B,OAAO,IAAI,aAAa;EACtB,MAAM,UAAU,OAAO,IAAI,KAAoC,WAAW;EAE1E,OAAO,QAAQ,KACb,wBACA,uBAAuB,GAAG,EACxB,MAAM,aAAa,IAAI,IAAI,OAAO,CAAC,CAAC,KAAK,OAAO,SAAS,YAAY,QAAQ,QAAQ,CAAC,CAAC,EACzF,CAAC,CACH,CAAC,CAAC,KACA,QAAQ,IACN,mCACA,kCAAkC,GAAG;GACnC,OAAO,IAAI,IAAI,SAAS,WAAW;GACnC,aAAa,SAAS,IAAI,IAAI,SAAS,IAAI;EAC7C,CAAC,CACH,CACF;CACF,CAAC,CACH;AACF"}
@@ -0,0 +1,9 @@
1
+ import { SqliteMigrator } from "@effect/sql-sqlite-node";
2
+ //#region src/internal/migrations.d.ts
3
+ declare const CurrentSqliteStorageVersion = 9;
4
+ declare namespace SqliteStorageVersion_d_exports {
5
+ export { CurrentSqliteStorageVersion };
6
+ }
7
+ //#endregion
8
+ export { CurrentSqliteStorageVersion as n, SqliteStorageVersion_d_exports as t };
9
+ //# sourceMappingURL=SqliteStorageVersion-gA7_96xM.d.mts.map
@@ -0,0 +1,2 @@
1
+ import { n as CurrentSqliteStorageVersion } from "./SqliteStorageVersion-gA7_96xM.mjs";
2
+ export { CurrentSqliteStorageVersion };
@@ -0,0 +1,8 @@
1
+ import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
2
+ import { t as CurrentSqliteStorageVersion } from "./migrations-dnTR0RKq.mjs";
3
+ //#region src/SqliteStorageVersion.ts
4
+ var SqliteStorageVersion_exports = /* @__PURE__ */ __exportAll({ CurrentSqliteStorageVersion: () => 9 });
5
+ //#endregion
6
+ export { CurrentSqliteStorageVersion, SqliteStorageVersion_exports as t };
7
+
8
+ //# sourceMappingURL=SqliteStorageVersion.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SqliteStorageVersion.mjs","names":[],"sources":["../src/SqliteStorageVersion.ts"],"sourcesContent":["/** Public SqliteStorageVersion API. Implementation helpers remain private. */\nexport { CurrentSqliteStorageVersion } from \"./internal/migrations.ts\";\n"],"mappings":""}
@@ -0,0 +1,23 @@
1
+ import { SqliteStorageConfig } from "./SqliteStorageConfig.mjs";
2
+ import { SqliteStorageFailpoint } from "./SqliteStorageFailpoint.mjs";
3
+ import { SqliteStorageInitializationError, SqliteStorageOptions } from "./SqliteThreadStore.mjs";
4
+ import { Crypto, Layer } from "effect";
5
+ import * as SqlClientService from "effect/unstable/sql/SqlClient";
6
+ import { SubmissionLedger } from "@effect-agent/thread/SubmissionLedger";
7
+ declare namespace SqliteSubmissionLedger_d_exports {
8
+ export { ledgerLayer, submissionLedgerLayer };
9
+ }
10
+ /**
11
+ * SQLite SubmissionLedger implementation sharing the journal's database file, write
12
+ * transaction discipline, and producer-epoch fencing substrate. Configuration, failpoint,
13
+ * SQL, and Crypto authority stay visible in the input channel.
14
+ */
15
+ declare const submissionLedgerLayer: Layer.Layer<SubmissionLedger, SqliteStorageInitializationError, SqliteStorageConfig | SqliteStorageFailpoint | SqlClientService.SqlClient | Crypto.Crypto>;
16
+ /**
17
+ * A composition-root convenience Layer for the durable Submission Ledger. Point it at the
18
+ * same database file as the ThreadStore so claims fence the same producer epochs.
19
+ */
20
+ declare const ledgerLayer: (options: SqliteStorageOptions) => Layer.Layer<SubmissionLedger, SqliteStorageInitializationError>;
21
+ //#endregion
22
+ export { ledgerLayer, submissionLedgerLayer, SqliteSubmissionLedger_d_exports as t };
23
+ //# sourceMappingURL=SqliteSubmissionLedger.d.mts.map