@effect-agent/storage-sqlite 0.0.1-beta.0 → 0.0.1-beta.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/dist/index.mjs CHANGED
@@ -5,19 +5,19 @@ import * as SqlClient from "effect/unstable/sql/SqlClient";
5
5
  import { NodeCrypto } from "@effect/platform-node";
6
6
  //#region src/errors.ts
7
7
  /** The SQLite file uses a private-development format this adapter cannot read. */
8
- var SqliteStorageCompatibilityError = class extends Schema.TaggedErrorClass()("SqliteStorageCompatibilityError", {
8
+ var SqliteStorageCompatibilityError = class extends Schema.TaggedError()("SqliteStorageCompatibilityError", {
9
9
  actualVersion: Schema.Int,
10
10
  message: Schema.String,
11
11
  supportedVersion: Schema.Int
12
12
  }) {};
13
13
  /** Stored bytes failed the current Schema and cannot be used as recovery truth. */
14
- var SqliteStorageCorruptionError = class extends Schema.TaggedErrorClass()("SqliteStorageCorruptionError", {
14
+ var SqliteStorageCorruptionError = class extends Schema.TaggedError()("SqliteStorageCorruptionError", {
15
15
  message: Schema.String,
16
16
  rowKey: Schema.String,
17
17
  table: Schema.String
18
18
  }) {};
19
19
  /** SQLite infrastructure failed while opening or operating the store. */
20
- var SqliteStorageError = class extends Schema.TaggedErrorClass()("SqliteStorageError", {
20
+ var SqliteStorageError = class extends Schema.TaggedError()("SqliteStorageError", {
21
21
  cause: Schema.optionalKey(Schema.Defect()),
22
22
  message: Schema.String,
23
23
  operation: Schema.String
@@ -27,7 +27,7 @@ var SqliteStorageError = class extends Schema.TaggedErrorClass()("SqliteStorageE
27
27
  * SubmissionLedger port as the typed `LedgerError` with this error preserved as its cause,
28
28
  * so the adapter-level tag is never erased.
29
29
  */
30
- var SqliteLedgerError = class extends Schema.TaggedErrorClass()("SqliteLedgerError", {
30
+ var SqliteLedgerError = class extends Schema.TaggedError()("SqliteLedgerError", {
31
31
  cause: Schema.optionalKey(Schema.Defect()),
32
32
  message: Schema.String,
33
33
  operation: Schema.String
@@ -36,7 +36,7 @@ var SqliteLedgerError = class extends Schema.TaggedErrorClass()("SqliteLedgerErr
36
36
  * A canonical batch retry conflicts with existing append state. Tail conflicts carry the
37
37
  * actual committed tail as a diagnostic resume hint.
38
38
  */
39
- var SqliteAppendConflict = class extends Schema.TaggedErrorClass()("SqliteAppendConflict", {
39
+ var SqliteAppendConflict = class extends Schema.TaggedError()("SqliteAppendConflict", {
40
40
  message: Schema.String,
41
41
  reason: Schema.Literals([
42
42
  "batch-digest",
@@ -51,7 +51,7 @@ var SqliteAppendConflict = class extends Schema.TaggedErrorClass()("SqliteAppend
51
51
  * require the exact registered epoch, so both older and newer unregistered epochs are fenced;
52
52
  * a newer epoch takes over by materializing first.
53
53
  */
54
- var SqliteFenceRejected = class extends Schema.TaggedErrorClass()("SqliteFenceRejected", {
54
+ var SqliteFenceRejected = class extends Schema.TaggedError()("SqliteFenceRejected", {
55
55
  actualEpoch: ProducerEpoch,
56
56
  message: Schema.String,
57
57
  producerEpoch: ProducerEpoch
@@ -61,13 +61,13 @@ var SqliteFenceRejected = class extends Schema.TaggedErrorClass()("SqliteFenceRe
61
61
  * timeout (SQLITE_BUSY / SQLITE_LOCKED). Another transiently coexisting owner is writing;
62
62
  * the operation did not mutate canonical state and is safe to retry.
63
63
  */
64
- var SqliteWriteContention = class extends Schema.TaggedErrorClass()("SqliteWriteContention", {
64
+ var SqliteWriteContention = class extends Schema.TaggedError()("SqliteWriteContention", {
65
65
  cause: Schema.optionalKey(Schema.Defect()),
66
66
  message: Schema.String,
67
67
  operation: Schema.String
68
68
  }) {};
69
69
  /** A checkpoint conflicts with a previously stored checkpoint at the same offset. */
70
- var SqliteCheckpointConflict = class extends Schema.TaggedErrorClass()("SqliteCheckpointConflict", { message: Schema.String }) {};
70
+ var SqliteCheckpointConflict = class extends Schema.TaggedError()("SqliteCheckpointConflict", { message: Schema.String }) {};
71
71
  const SqliteStorageFailpointLocation = Schema.Literals([
72
72
  "materialize:before",
73
73
  "materialize:after",
@@ -123,7 +123,7 @@ const SqliteStorageFailpointLocation = Schema.Literals([
123
123
  "ledger:child-settled:after"
124
124
  ]);
125
125
  /** Deterministic test-only fault or pause injected at a SQLite operation boundary. */
126
- var SqliteStorageFailpointError = class extends Schema.TaggedErrorClass()("SqliteStorageFailpointError", { location: SqliteStorageFailpointLocation }) {
126
+ var SqliteStorageFailpointError = class extends Schema.TaggedError()("SqliteStorageFailpointError", { location: SqliteStorageFailpointLocation }) {
127
127
  get message() {
128
128
  return `Injected SQLite storage failure at ${this.location}.`;
129
129
  }