@effect-agent/storage-sqlite 0.0.1-beta.2 → 0.0.1-beta.3

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/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@effect-agent/storage-sqlite",
3
- "version": "0.0.1-beta.2",
3
+ "version": "0.0.1-beta.3",
4
4
  "description": "Node SQLite Conversation store and submission ledger adapters for the Effect Agent durable runtime.",
5
- "license": "UNLICENSED",
5
+ "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/danieljvdm/effect-agent.git",
@@ -28,13 +28,13 @@
28
28
  "test": "vp test --passWithNoTests"
29
29
  },
30
30
  "dependencies": {
31
- "@effect-agent/session": "0.0.1-beta.2",
32
- "@effect/platform-node": "4.0.0-beta.105",
33
- "@effect/sql-sqlite-node": "4.0.0-beta.105",
34
- "effect": "4.0.0-beta.105"
31
+ "@effect-agent/session": "0.0.1-beta.3",
32
+ "@effect/platform-node": "4.0.0-beta.102",
33
+ "@effect/sql-sqlite-node": "4.0.0-beta.102",
34
+ "effect": "4.0.0-beta.102"
35
35
  },
36
36
  "devDependencies": {
37
- "@effect/vitest": "4.0.0-beta.105",
37
+ "@effect/vitest": "4.0.0-beta.102",
38
38
  "typescript": "7.0.2",
39
39
  "vite-plus": "0.2.6"
40
40
  }
package/src/errors.ts CHANGED
@@ -2,7 +2,7 @@ import { CanonicalSequence, ProducerEpoch } from "@effect-agent/session";
2
2
  import { Schema } from "effect";
3
3
 
4
4
  /** The SQLite file uses a private-development format this adapter cannot read. */
5
- export class SqliteStorageCompatibilityError extends Schema.TaggedError<SqliteStorageCompatibilityError>()(
5
+ export class SqliteStorageCompatibilityError extends Schema.TaggedErrorClass<SqliteStorageCompatibilityError>()(
6
6
  "SqliteStorageCompatibilityError",
7
7
  {
8
8
  actualVersion: Schema.Int,
@@ -12,7 +12,7 @@ export class SqliteStorageCompatibilityError extends Schema.TaggedError<SqliteSt
12
12
  ) {}
13
13
 
14
14
  /** Stored bytes failed the current Schema and cannot be used as recovery truth. */
15
- export class SqliteStorageCorruptionError extends Schema.TaggedError<SqliteStorageCorruptionError>()(
15
+ export class SqliteStorageCorruptionError extends Schema.TaggedErrorClass<SqliteStorageCorruptionError>()(
16
16
  "SqliteStorageCorruptionError",
17
17
  {
18
18
  message: Schema.String,
@@ -22,7 +22,7 @@ export class SqliteStorageCorruptionError extends Schema.TaggedError<SqliteStora
22
22
  ) {}
23
23
 
24
24
  /** SQLite infrastructure failed while opening or operating the store. */
25
- export class SqliteStorageError extends Schema.TaggedError<SqliteStorageError>()(
25
+ export class SqliteStorageError extends Schema.TaggedErrorClass<SqliteStorageError>()(
26
26
  "SqliteStorageError",
27
27
  {
28
28
  cause: Schema.optionalKey(Schema.Defect()),
@@ -36,7 +36,7 @@ export class SqliteStorageError extends Schema.TaggedError<SqliteStorageError>()
36
36
  * SubmissionLedger port as the typed `LedgerError` with this error preserved as its cause,
37
37
  * so the adapter-level tag is never erased.
38
38
  */
39
- export class SqliteLedgerError extends Schema.TaggedError<SqliteLedgerError>()(
39
+ export class SqliteLedgerError extends Schema.TaggedErrorClass<SqliteLedgerError>()(
40
40
  "SqliteLedgerError",
41
41
  {
42
42
  cause: Schema.optionalKey(Schema.Defect()),
@@ -49,7 +49,7 @@ export class SqliteLedgerError extends Schema.TaggedError<SqliteLedgerError>()(
49
49
  * A canonical batch retry conflicts with existing append state. Tail conflicts carry the
50
50
  * actual committed tail as a diagnostic resume hint.
51
51
  */
52
- export class SqliteAppendConflict extends Schema.TaggedError<SqliteAppendConflict>()(
52
+ export class SqliteAppendConflict extends Schema.TaggedErrorClass<SqliteAppendConflict>()(
53
53
  "SqliteAppendConflict",
54
54
  {
55
55
  message: Schema.String,
@@ -64,7 +64,7 @@ export class SqliteAppendConflict extends Schema.TaggedError<SqliteAppendConflic
64
64
  * require the exact registered epoch, so both older and newer unregistered epochs are fenced;
65
65
  * a newer epoch takes over by materializing first.
66
66
  */
67
- export class SqliteFenceRejected extends Schema.TaggedError<SqliteFenceRejected>()(
67
+ export class SqliteFenceRejected extends Schema.TaggedErrorClass<SqliteFenceRejected>()(
68
68
  "SqliteFenceRejected",
69
69
  {
70
70
  actualEpoch: ProducerEpoch,
@@ -78,7 +78,7 @@ export class SqliteFenceRejected extends Schema.TaggedError<SqliteFenceRejected>
78
78
  * timeout (SQLITE_BUSY / SQLITE_LOCKED). Another transiently coexisting owner is writing;
79
79
  * the operation did not mutate canonical state and is safe to retry.
80
80
  */
81
- export class SqliteWriteContention extends Schema.TaggedError<SqliteWriteContention>()(
81
+ export class SqliteWriteContention extends Schema.TaggedErrorClass<SqliteWriteContention>()(
82
82
  "SqliteWriteContention",
83
83
  {
84
84
  cause: Schema.optionalKey(Schema.Defect()),
@@ -88,7 +88,7 @@ export class SqliteWriteContention extends Schema.TaggedError<SqliteWriteContent
88
88
  ) {}
89
89
 
90
90
  /** A checkpoint conflicts with a previously stored checkpoint at the same offset. */
91
- export class SqliteCheckpointConflict extends Schema.TaggedError<SqliteCheckpointConflict>()(
91
+ export class SqliteCheckpointConflict extends Schema.TaggedErrorClass<SqliteCheckpointConflict>()(
92
92
  "SqliteCheckpointConflict",
93
93
  {
94
94
  message: Schema.String,
@@ -152,7 +152,7 @@ export const SqliteStorageFailpointLocation = Schema.Literals([
152
152
  export type SqliteStorageFailpointLocation = typeof SqliteStorageFailpointLocation.Type;
153
153
 
154
154
  /** Deterministic test-only fault or pause injected at a SQLite operation boundary. */
155
- export class SqliteStorageFailpointError extends Schema.TaggedError<SqliteStorageFailpointError>()(
155
+ export class SqliteStorageFailpointError extends Schema.TaggedErrorClass<SqliteStorageFailpointError>()(
156
156
  "SqliteStorageFailpointError",
157
157
  {
158
158
  location: SqliteStorageFailpointLocation,