@effect-agent/storage-sqlite 0.1.0-beta.39 → 0.1.0-beta.40
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.d.mts +19 -2
- package/dist/index.mjs +713 -157
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -4
- package/src/index.ts +2 -0
- package/src/migrations.ts +9 -68
- package/src/sqlite-activity-store.ts +503 -0
- package/src/sqlite-memory-store.ts +532 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
import { a as SqliteFenceRejected, c as SqliteStorageCorruptionError, d as SqliteStorageFailpointLocation, f as SqliteWriteContention, i as SqliteCheckpointConflict, l as SqliteStorageError, n as SqliteStorageFailpointHandler, o as SqliteLedgerError, r as SqliteAppendConflict, s as SqliteStorageCompatibilityError, t as SqliteStorageFailpoint, u as SqliteStorageFailpointError } from "./sqlite-storage-failpoint-Cr0SXflP.mjs";
|
|
2
|
-
import { ScheduleStore, SourcePartition, SubmissionLedger, SubscriptionError, SubscriptionStore, ThreadStore, ThreadStoreError } from "@effect-agent/thread";
|
|
2
|
+
import { ActivityMutationFailpoint, ActivityMutationFailure, ActivityProcessorStore, ActivityStoreError, ScheduleStore, SourcePartition, SubmissionLedger, SubscriptionError, SubscriptionStore, ThreadStore, ThreadStoreError } from "@effect-agent/thread";
|
|
3
3
|
import { Context, Crypto, Effect, Layer, Schema } from "effect";
|
|
4
4
|
import { SqliteMigrator } from "@effect/sql-sqlite-node";
|
|
5
5
|
import * as SqlClientService from "effect/unstable/sql/SqlClient";
|
|
6
|
+
import { MemoryMutationFailpoint, MemoryMutationFailure, MemoryReader, MemoryStorageError, MemoryWriter } from "@effect-agent/core";
|
|
6
7
|
//#region src/migrations.d.ts
|
|
7
8
|
declare const CurrentSqliteStorageVersion = 7;
|
|
8
9
|
//#endregion
|
|
10
|
+
//#region src/sqlite-activity-store.d.ts
|
|
11
|
+
type SqliteActivityInitializationError = ActivityStoreError | ActivityMutationFailure;
|
|
12
|
+
/** SQLite activity progress with mutation failpoints kept injectable for recovery tests. */
|
|
13
|
+
declare const activityProcessorStoreLayerWithFailpoints: Layer.Layer<ActivityProcessorStore, SqliteActivityInitializationError, SqlClientService.SqlClient | ActivityMutationFailpoint>;
|
|
14
|
+
/** SQLite activity progress with the production no-op mutation failpoint. */
|
|
15
|
+
declare const activityProcessorStoreLayer: Layer.Layer<ActivityProcessorStore, SqliteActivityInitializationError, SqlClientService.SqlClient>;
|
|
16
|
+
//#endregion
|
|
9
17
|
//#region src/sqlite-storage-config.d.ts
|
|
10
18
|
declare const SqliteStorageConfigValue_base: Schema.Class<SqliteStorageConfigValue, Schema.Struct<{
|
|
11
19
|
readonly observationPollInterval: Schema.Int;
|
|
@@ -89,6 +97,15 @@ declare const submissionLedgerLayer: Layer.Layer<SubmissionLedger, SqliteStorage
|
|
|
89
97
|
*/
|
|
90
98
|
declare const ledgerLayer: (options: SqliteStorageOptions) => Layer.Layer<SubmissionLedger, SqliteStorageInitializationError>;
|
|
91
99
|
//#endregion
|
|
100
|
+
//#region src/sqlite-memory-store.d.ts
|
|
101
|
+
type SqliteMemoryInitializationError = MemoryStorageError | MemoryMutationFailure;
|
|
102
|
+
/** SQLite memory ports with the mutation failpoint kept injectable for recovery tests. */
|
|
103
|
+
declare const memoryStoreLayerWithFailpoints: Layer.Layer<MemoryReader | MemoryWriter, SqliteMemoryInitializationError, SqlClientService.SqlClient | MemoryMutationFailpoint>;
|
|
104
|
+
/** SQLite memory reader and writer with the production no-op mutation failpoint. */
|
|
105
|
+
declare const memoryStoreLayer: Layer.Layer<MemoryReader | MemoryWriter, SqliteMemoryInitializationError, SqlClientService.SqlClient>;
|
|
106
|
+
/** Reads an existing memory schema without writes, transactions, or mutation failpoints. */
|
|
107
|
+
declare const memoryReaderLayer: Layer.Layer<MemoryReader, MemoryStorageError, SqlClientService.SqlClient>;
|
|
108
|
+
//#endregion
|
|
92
109
|
//#region src/sqlite-schedule-store.d.ts
|
|
93
110
|
/** SQLite implementation of the atomic ScheduleStore port. */
|
|
94
111
|
declare const scheduleStoreLayer: Layer.Layer<ScheduleStore, SqliteStorageInitializationError, SqliteStorageConfig | SqliteStorageFailpoint | SqlClientService.SqlClient>;
|
|
@@ -96,5 +113,5 @@ declare const scheduleStoreLayer: Layer.Layer<ScheduleStore, SqliteStorageInitia
|
|
|
96
113
|
//#region src/sqlite-subscription-store.d.ts
|
|
97
114
|
declare const subscriptionStoreLayer: (partition: SourcePartition) => Layer.Layer<SubscriptionStore, SqliteStorageInitializationError | SubscriptionError, SqliteStorageConfig | SqliteStorageFailpoint | SqlClientService.SqlClient>;
|
|
98
115
|
//#endregion
|
|
99
|
-
export { CurrentSqliteStorageVersion, SqliteAppendConflict, SqliteCheckpointConflict, SqliteFenceRejected, SqliteLedgerError, SqliteStorageCompatibilityError, SqliteStorageConfig, SqliteStorageConfigValue, SqliteStorageCorruptionError, SqliteStorageError, SqliteStorageFailpoint, SqliteStorageFailpointError, SqliteStorageFailpointHandler, SqliteStorageFailpointLocation, SqliteStorageInitializationError, SqliteStorageOptions, SqliteWriteContention, layer, ledgerLayer, observationOffsetAt, scheduleStoreLayer, storageConfigLayer, storageFailpointLayer, submissionLedgerLayer, subscriptionStoreLayer, threadStoreLayer };
|
|
116
|
+
export { CurrentSqliteStorageVersion, SqliteActivityInitializationError, SqliteAppendConflict, SqliteCheckpointConflict, SqliteFenceRejected, SqliteLedgerError, SqliteMemoryInitializationError, SqliteStorageCompatibilityError, SqliteStorageConfig, SqliteStorageConfigValue, SqliteStorageCorruptionError, SqliteStorageError, SqliteStorageFailpoint, SqliteStorageFailpointError, SqliteStorageFailpointHandler, SqliteStorageFailpointLocation, SqliteStorageInitializationError, SqliteStorageOptions, SqliteWriteContention, activityProcessorStoreLayer, activityProcessorStoreLayerWithFailpoints, layer, ledgerLayer, memoryReaderLayer, memoryStoreLayer, memoryStoreLayerWithFailpoints, observationOffsetAt, scheduleStoreLayer, storageConfigLayer, storageFailpointLayer, submissionLedgerLayer, subscriptionStoreLayer, threadStoreLayer };
|
|
100
117
|
//# sourceMappingURL=index.d.mts.map
|