@effect-agent/storage-cloudflare 0.0.1-beta.4 → 0.0.1-beta.6

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
@@ -6,19 +6,19 @@ import { BrowserCrypto } from "@effect/platform-browser";
6
6
  import { SqlError } from "effect/unstable/sql/SqlError";
7
7
  //#region src/errors.ts
8
8
  /** The Durable Object's SQLite storage uses a private-development format this adapter cannot read. */
9
- var DoStorageCompatibilityError = class extends Schema.TaggedErrorClass()("DoStorageCompatibilityError", {
9
+ var DoStorageCompatibilityError = class extends Schema.TaggedError()("DoStorageCompatibilityError", {
10
10
  actualVersion: Schema.Int,
11
11
  message: Schema.String,
12
12
  supportedVersion: Schema.Int
13
13
  }) {};
14
14
  /** Stored bytes failed the current Schema and cannot be used as recovery truth. */
15
- var DoStorageCorruptionError = class extends Schema.TaggedErrorClass()("DoStorageCorruptionError", {
15
+ var DoStorageCorruptionError = class extends Schema.TaggedError()("DoStorageCorruptionError", {
16
16
  message: Schema.String,
17
17
  rowKey: Schema.String,
18
18
  table: Schema.String
19
19
  }) {};
20
20
  /** Durable Object SQLite infrastructure failed while opening or operating the store. */
21
- var DoStorageError = class extends Schema.TaggedErrorClass()("DoStorageError", {
21
+ var DoStorageError = class extends Schema.TaggedError()("DoStorageError", {
22
22
  cause: Schema.optionalKey(Schema.Defect()),
23
23
  message: Schema.String,
24
24
  operation: Schema.String
@@ -28,7 +28,7 @@ var DoStorageError = class extends Schema.TaggedErrorClass()("DoStorageError", {
28
28
  * at the SubmissionLedger port as the typed `LedgerError` with this error preserved as its
29
29
  * cause, so the adapter-level tag is never erased.
30
30
  */
31
- var DoLedgerError = class extends Schema.TaggedErrorClass()("DoLedgerError", {
31
+ var DoLedgerError = class extends Schema.TaggedError()("DoLedgerError", {
32
32
  cause: Schema.optionalKey(Schema.Defect()),
33
33
  message: Schema.String,
34
34
  operation: Schema.String
@@ -40,7 +40,7 @@ var DoLedgerError = class extends Schema.TaggedErrorClass()("DoLedgerError", {
40
40
  * Payloads of this size are the designed overflow case for a future R2-backed AttachmentStore
41
41
  * (deployment spec §3.1, deferred until a real attachment requirement exists).
42
42
  */
43
- var DoValueBoundExceeded = class extends Schema.TaggedErrorClass()("DoValueBoundExceeded", {
43
+ var DoValueBoundExceeded = class extends Schema.TaggedError()("DoValueBoundExceeded", {
44
44
  actualBytes: Schema.Int,
45
45
  maxBytes: Schema.Int,
46
46
  operation: Schema.String
@@ -53,7 +53,7 @@ var DoValueBoundExceeded = class extends Schema.TaggedErrorClass()("DoValueBound
53
53
  * A canonical batch retry conflicts with existing append state. Tail conflicts carry the
54
54
  * actual committed tail as a diagnostic resume hint.
55
55
  */
56
- var DoAppendConflict = class extends Schema.TaggedErrorClass()("DoAppendConflict", {
56
+ var DoAppendConflict = class extends Schema.TaggedError()("DoAppendConflict", {
57
57
  message: Schema.String,
58
58
  reason: Schema.Literals([
59
59
  "batch-digest",
@@ -68,13 +68,13 @@ var DoAppendConflict = class extends Schema.TaggedErrorClass()("DoAppendConflict
68
68
  * require the exact registered epoch, so both older and newer unregistered epochs are fenced;
69
69
  * a newer epoch takes over by materializing first.
70
70
  */
71
- var DoFenceRejected = class extends Schema.TaggedErrorClass()("DoFenceRejected", {
71
+ var DoFenceRejected = class extends Schema.TaggedError()("DoFenceRejected", {
72
72
  actualEpoch: ProducerEpoch,
73
73
  message: Schema.String,
74
74
  producerEpoch: ProducerEpoch
75
75
  }) {};
76
76
  /** A checkpoint conflicts with a previously stored checkpoint at the same offset. */
77
- var DoCheckpointConflict = class extends Schema.TaggedErrorClass()("DoCheckpointConflict", { message: Schema.String }) {};
77
+ var DoCheckpointConflict = class extends Schema.TaggedError()("DoCheckpointConflict", { message: Schema.String }) {};
78
78
  /**
79
79
  * Deterministic fault-injection locations at Durable Object storage operation boundaries.
80
80
  *
@@ -138,7 +138,7 @@ const DoStorageFailpointLocation = Schema.Literals([
138
138
  "ledger:child-settled:after"
139
139
  ]);
140
140
  /** Deterministic test-only fault or pause injected at a Durable Object storage boundary. */
141
- var DoStorageFailpointError = class extends Schema.TaggedErrorClass()("DoStorageFailpointError", { location: DoStorageFailpointLocation }) {
141
+ var DoStorageFailpointError = class extends Schema.TaggedError()("DoStorageFailpointError", { location: DoStorageFailpointLocation }) {
142
142
  get message() {
143
143
  return `Injected Durable Object storage failure at ${this.location}.`;
144
144
  }
@@ -3237,7 +3237,7 @@ const boundPortDiagnostic = (value) => value.length > 4096 ? `${value.slice(0, M
3237
3237
  * except `resolveAdmission`, which folds it into `AdmissionIndeterminate` because a
3238
3238
  * non-answer is never proof of absence (SUB-031).
3239
3239
  */
3240
- var PortProtocolError = class extends Schema.TaggedErrorClass()("PortProtocolError", { message: BoundedDiagnostic }) {};
3240
+ var PortProtocolError = class extends Schema.TaggedError()("PortProtocolError", { message: BoundedDiagnostic }) {};
3241
3241
  /** Routed `SubmissionLedger.admit` — child establishment admits INTO the owning Object. */
3242
3242
  var LedgerAdmitCall = class extends Schema.TaggedClass("@effect-agent/storage-cloudflare/LedgerAdmitCall")("LedgerAdmit", { request: AdmissionRequest }) {};
3243
3243
  /** Routed `SubmissionLedger.markReady` for a Submission owned by another Object. */
@@ -3346,7 +3346,7 @@ const UUID_HEAD_PATTERN = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-f
3346
3346
  * authority was unreachable, which is exactly the case `AdmissionIndeterminate` was
3347
3347
  * specified for (SUB-031).
3348
3348
  */
3349
- var PortTransportError = class extends Schema.TaggedErrorClass()("PortTransportError", {
3349
+ var PortTransportError = class extends Schema.TaggedError()("PortTransportError", {
3350
3350
  target: Schema.String,
3351
3351
  message: Schema.String,
3352
3352
  retryable: Schema.optionalKey(Schema.Boolean),