@smthrs/engine-store 1.0.0-rc.5 → 1.0.0-rc.7
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/README.md +15 -15
- package/dist/cjs/ArtifactGc.d.ts +1 -1
- package/dist/cjs/ArtifactGc.d.ts.map +1 -1
- package/dist/cjs/ArtifactGc.js +1 -1
- package/dist/cjs/ArtifactGc.js.map +1 -1
- package/dist/cjs/DeferredClockFold.d.ts +4 -4
- package/dist/cjs/DeferredClockFold.d.ts.map +1 -1
- package/dist/cjs/DeferredClockFold.js +1 -1
- package/dist/cjs/DeferredClockFold.js.map +1 -1
- package/dist/cjs/DisasterRecovery.d.ts +1 -1
- package/dist/cjs/DisasterRecovery.d.ts.map +1 -1
- package/dist/cjs/DisasterRecovery.js +1 -1
- package/dist/cjs/DisasterRecovery.js.map +1 -1
- package/dist/cjs/DurableEngineState.d.ts +1 -1
- package/dist/cjs/DurableEngineState.d.ts.map +1 -1
- package/dist/cjs/DurableEngineState.js +1 -1
- package/dist/cjs/DurableEngineState.js.map +1 -1
- package/dist/cjs/ExecutionSnapshot.d.ts +2 -2
- package/dist/cjs/ExecutionSnapshot.d.ts.map +1 -1
- package/dist/cjs/ExecutionSnapshot.js +1 -1
- package/dist/cjs/ExecutionSnapshot.js.map +1 -1
- package/dist/cjs/Migrations.d.ts +2 -2
- package/dist/cjs/Migrations.d.ts.map +1 -1
- package/dist/cjs/OwnerIdentity.js +1 -1
- package/dist/cjs/OwnerIdentity.js.map +2 -2
- package/dist/cjs/PlanInputStore.d.ts +1 -1
- package/dist/cjs/PlanInputStore.d.ts.map +1 -1
- package/dist/cjs/PlanInputStore.js +1 -1
- package/dist/cjs/PlanInputStore.js.map +1 -1
- package/dist/cjs/PlanMergeStore.d.ts +1 -1
- package/dist/cjs/PlanMergeStore.d.ts.map +1 -1
- package/dist/cjs/PlanMergeStore.js +1 -1
- package/dist/cjs/PlanMergeStore.js.map +1 -1
- package/dist/cjs/Retention.d.ts +2 -2
- package/dist/cjs/Retention.d.ts.map +1 -1
- package/dist/cjs/Retention.js +1 -1
- package/dist/cjs/Retention.js.map +1 -1
- package/dist/cjs/RunChangeFeed.d.ts +1 -1
- package/dist/cjs/RunChangeFeed.d.ts.map +1 -1
- package/dist/cjs/RunChangeFeed.js +1 -1
- package/dist/cjs/RunChangeFeed.js.map +1 -1
- package/dist/cjs/SelectionStore.d.ts +1 -1
- package/dist/cjs/SelectionStore.d.ts.map +1 -1
- package/dist/cjs/SelectionStore.js +1 -1
- package/dist/cjs/SelectionStore.js.map +1 -1
- package/dist/cjs/StepBoundary.d.ts +8 -6
- package/dist/cjs/StepBoundary.d.ts.map +1 -1
- package/dist/cjs/StepBoundary.js +13 -10
- package/dist/cjs/StepBoundary.js.map +2 -2
- package/dist/cjs/StepCacheFold.d.ts +2 -2
- package/dist/cjs/StepCacheFold.d.ts.map +1 -1
- package/dist/cjs/StepCacheFold.js +1 -1
- package/dist/cjs/StepCacheFold.js.map +1 -1
- package/dist/cjs/internal/EngineStateSchema.d.ts +1 -1
- package/dist/cjs/internal/EngineStateSchema.d.ts.map +1 -1
- package/dist/cjs/internal/EngineStateSchema.js.map +1 -1
- package/dist/cjs/internal/ExecutionSnapshotRead.d.ts +3 -3
- package/dist/cjs/internal/ExecutionSnapshotRead.d.ts.map +1 -1
- package/dist/cjs/internal/ExecutionSnapshotRead.js.map +1 -1
- package/dist/cjs/internal/ExecutionSnapshotRelations.d.ts +1 -1
- package/dist/cjs/internal/ExecutionSnapshotRelations.d.ts.map +1 -1
- package/dist/cjs/internal/ExecutionSnapshotRelations.js.map +1 -1
- package/dist/cjs/internal/RetentionOps.d.ts +2 -2
- package/dist/cjs/internal/RetentionOps.d.ts.map +1 -1
- package/dist/cjs/internal/RetentionOps.js +1 -1
- package/dist/cjs/internal/RetentionOps.js.map +1 -1
- package/dist/cjs/internal/RunCatalogOps.d.ts +1 -1
- package/dist/cjs/internal/RunCatalogOps.d.ts.map +1 -1
- package/dist/cjs/internal/RunCatalogOps.js +1 -1
- package/dist/cjs/internal/RunCatalogOps.js.map +1 -1
- package/dist/cjs/internal/RunListing.d.ts +1 -1
- package/dist/cjs/internal/RunListing.d.ts.map +1 -1
- package/dist/cjs/internal/RunListing.js +1 -1
- package/dist/cjs/internal/RunListing.js.map +1 -1
- package/dist/cjs/migrations/0001_initial.d.ts +1 -1
- package/dist/cjs/migrations/0001_initial.d.ts.map +1 -1
- package/dist/cjs/migrations/0001_initial.js +1 -1
- package/dist/cjs/migrations/0001_initial.js.map +1 -1
- package/dist/cjs/migrations/0002_selection_store.d.ts +1 -1
- package/dist/cjs/migrations/0002_selection_store.d.ts.map +1 -1
- package/dist/cjs/migrations/0002_selection_store.js +1 -1
- package/dist/cjs/migrations/0002_selection_store.js.map +1 -1
- package/dist/cjs/migrations/0003_plan_inputs.d.ts +1 -1
- package/dist/cjs/migrations/0003_plan_inputs.d.ts.map +1 -1
- package/dist/cjs/migrations/0003_plan_inputs.js +1 -1
- package/dist/cjs/migrations/0003_plan_inputs.js.map +1 -1
- package/dist/cjs/migrations/0004_plan_environment.d.ts +1 -1
- package/dist/cjs/migrations/0004_plan_environment.d.ts.map +1 -1
- package/dist/cjs/migrations/0004_plan_environment.js +1 -1
- package/dist/cjs/migrations/0004_plan_environment.js.map +1 -1
- package/dist/cjs/migrations/0005_plan_merges.d.ts +1 -1
- package/dist/cjs/migrations/0005_plan_merges.d.ts.map +1 -1
- package/dist/cjs/migrations/0005_plan_merges.js +1 -1
- package/dist/cjs/migrations/0005_plan_merges.js.map +1 -1
- package/dist/cjs/migrations/0006_execution_listing.d.ts +1 -1
- package/dist/cjs/migrations/0006_execution_listing.d.ts.map +1 -1
- package/dist/cjs/migrations/0006_execution_listing.js +1 -1
- package/dist/cjs/migrations/0006_execution_listing.js.map +1 -1
- package/dist/cjs/migrations/0007_run_parent_sequence.d.ts +1 -1
- package/dist/cjs/migrations/0007_run_parent_sequence.d.ts.map +1 -1
- package/dist/cjs/migrations/0007_run_parent_sequence.js +1 -1
- package/dist/cjs/migrations/0007_run_parent_sequence.js.map +1 -1
- package/dist/cjs/migrations/0008_deferred_consumption.d.ts +1 -1
- package/dist/cjs/migrations/0008_deferred_consumption.d.ts.map +1 -1
- package/dist/cjs/migrations/0008_deferred_consumption.js +1 -1
- package/dist/cjs/migrations/0008_deferred_consumption.js.map +1 -1
- package/dist/cjs/migrations/0009_deferred_clock_facts.d.ts +1 -1
- package/dist/cjs/migrations/0009_deferred_clock_facts.d.ts.map +1 -1
- package/dist/cjs/migrations/0009_deferred_clock_facts.js +1 -1
- package/dist/cjs/migrations/0009_deferred_clock_facts.js.map +1 -1
- package/dist/cjs/migrations/0010_pending_cancellation.d.ts +1 -1
- package/dist/cjs/migrations/0010_pending_cancellation.d.ts.map +1 -1
- package/dist/cjs/migrations/0010_pending_cancellation.js +1 -1
- package/dist/cjs/migrations/0010_pending_cancellation.js.map +1 -1
- package/dist/cjs/test/TestStores.d.ts +4 -4
- package/dist/cjs/test/TestStores.d.ts.map +1 -1
- package/dist/esm/ArtifactGc.d.ts +1 -1
- package/dist/esm/ArtifactGc.d.ts.map +1 -1
- package/dist/esm/ArtifactGc.js +1 -1
- package/dist/esm/ArtifactGc.js.map +1 -1
- package/dist/esm/DeferredClockFold.d.ts +4 -4
- package/dist/esm/DeferredClockFold.d.ts.map +1 -1
- package/dist/esm/DeferredClockFold.js +1 -1
- package/dist/esm/DeferredClockFold.js.map +1 -1
- package/dist/esm/DisasterRecovery.d.ts +1 -1
- package/dist/esm/DisasterRecovery.d.ts.map +1 -1
- package/dist/esm/DisasterRecovery.js +1 -1
- package/dist/esm/DisasterRecovery.js.map +1 -1
- package/dist/esm/DurableEngineState.d.ts +1 -1
- package/dist/esm/DurableEngineState.d.ts.map +1 -1
- package/dist/esm/DurableEngineState.js +1 -1
- package/dist/esm/DurableEngineState.js.map +1 -1
- package/dist/esm/ExecutionSnapshot.d.ts +2 -2
- package/dist/esm/ExecutionSnapshot.d.ts.map +1 -1
- package/dist/esm/ExecutionSnapshot.js +1 -1
- package/dist/esm/ExecutionSnapshot.js.map +1 -1
- package/dist/esm/Migrations.d.ts +2 -2
- package/dist/esm/Migrations.d.ts.map +1 -1
- package/dist/esm/OwnerIdentity.js +1 -1
- package/dist/esm/OwnerIdentity.js.map +1 -1
- package/dist/esm/PlanInputStore.d.ts +1 -1
- package/dist/esm/PlanInputStore.d.ts.map +1 -1
- package/dist/esm/PlanInputStore.js +1 -1
- package/dist/esm/PlanInputStore.js.map +1 -1
- package/dist/esm/PlanMergeStore.d.ts +1 -1
- package/dist/esm/PlanMergeStore.d.ts.map +1 -1
- package/dist/esm/PlanMergeStore.js +1 -1
- package/dist/esm/PlanMergeStore.js.map +1 -1
- package/dist/esm/Retention.d.ts +2 -2
- package/dist/esm/Retention.d.ts.map +1 -1
- package/dist/esm/Retention.js +1 -1
- package/dist/esm/Retention.js.map +1 -1
- package/dist/esm/RunChangeFeed.d.ts +1 -1
- package/dist/esm/RunChangeFeed.d.ts.map +1 -1
- package/dist/esm/RunChangeFeed.js +1 -1
- package/dist/esm/RunChangeFeed.js.map +1 -1
- package/dist/esm/SelectionStore.d.ts +1 -1
- package/dist/esm/SelectionStore.d.ts.map +1 -1
- package/dist/esm/SelectionStore.js +1 -1
- package/dist/esm/SelectionStore.js.map +1 -1
- package/dist/esm/StepBoundary.d.ts +8 -6
- package/dist/esm/StepBoundary.d.ts.map +1 -1
- package/dist/esm/StepBoundary.js +20 -11
- package/dist/esm/StepBoundary.js.map +1 -1
- package/dist/esm/StepCacheFold.d.ts +2 -2
- package/dist/esm/StepCacheFold.d.ts.map +1 -1
- package/dist/esm/StepCacheFold.js +1 -1
- package/dist/esm/StepCacheFold.js.map +1 -1
- package/dist/esm/internal/EngineStateSchema.d.ts +1 -1
- package/dist/esm/internal/EngineStateSchema.d.ts.map +1 -1
- package/dist/esm/internal/EngineStateSchema.js.map +1 -1
- package/dist/esm/internal/ExecutionSnapshotRead.d.ts +3 -3
- package/dist/esm/internal/ExecutionSnapshotRead.d.ts.map +1 -1
- package/dist/esm/internal/ExecutionSnapshotRead.js.map +1 -1
- package/dist/esm/internal/ExecutionSnapshotRelations.d.ts +1 -1
- package/dist/esm/internal/ExecutionSnapshotRelations.d.ts.map +1 -1
- package/dist/esm/internal/ExecutionSnapshotRelations.js.map +1 -1
- package/dist/esm/internal/RetentionOps.d.ts +2 -2
- package/dist/esm/internal/RetentionOps.d.ts.map +1 -1
- package/dist/esm/internal/RetentionOps.js +1 -1
- package/dist/esm/internal/RetentionOps.js.map +1 -1
- package/dist/esm/internal/RunCatalogOps.d.ts +1 -1
- package/dist/esm/internal/RunCatalogOps.d.ts.map +1 -1
- package/dist/esm/internal/RunCatalogOps.js +1 -1
- package/dist/esm/internal/RunCatalogOps.js.map +1 -1
- package/dist/esm/internal/RunListing.d.ts +1 -1
- package/dist/esm/internal/RunListing.d.ts.map +1 -1
- package/dist/esm/internal/RunListing.js +1 -1
- package/dist/esm/internal/RunListing.js.map +1 -1
- package/dist/esm/migrations/0001_initial.d.ts +1 -1
- package/dist/esm/migrations/0001_initial.d.ts.map +1 -1
- package/dist/esm/migrations/0001_initial.js +1 -1
- package/dist/esm/migrations/0001_initial.js.map +1 -1
- package/dist/esm/migrations/0002_selection_store.d.ts +1 -1
- package/dist/esm/migrations/0002_selection_store.d.ts.map +1 -1
- package/dist/esm/migrations/0002_selection_store.js +1 -1
- package/dist/esm/migrations/0002_selection_store.js.map +1 -1
- package/dist/esm/migrations/0003_plan_inputs.d.ts +1 -1
- package/dist/esm/migrations/0003_plan_inputs.d.ts.map +1 -1
- package/dist/esm/migrations/0003_plan_inputs.js +1 -1
- package/dist/esm/migrations/0003_plan_inputs.js.map +1 -1
- package/dist/esm/migrations/0004_plan_environment.d.ts +1 -1
- package/dist/esm/migrations/0004_plan_environment.d.ts.map +1 -1
- package/dist/esm/migrations/0004_plan_environment.js +1 -1
- package/dist/esm/migrations/0004_plan_environment.js.map +1 -1
- package/dist/esm/migrations/0005_plan_merges.d.ts +1 -1
- package/dist/esm/migrations/0005_plan_merges.d.ts.map +1 -1
- package/dist/esm/migrations/0005_plan_merges.js +1 -1
- package/dist/esm/migrations/0005_plan_merges.js.map +1 -1
- package/dist/esm/migrations/0006_execution_listing.d.ts +1 -1
- package/dist/esm/migrations/0006_execution_listing.d.ts.map +1 -1
- package/dist/esm/migrations/0006_execution_listing.js +1 -1
- package/dist/esm/migrations/0006_execution_listing.js.map +1 -1
- package/dist/esm/migrations/0007_run_parent_sequence.d.ts +1 -1
- package/dist/esm/migrations/0007_run_parent_sequence.d.ts.map +1 -1
- package/dist/esm/migrations/0007_run_parent_sequence.js +1 -1
- package/dist/esm/migrations/0007_run_parent_sequence.js.map +1 -1
- package/dist/esm/migrations/0008_deferred_consumption.d.ts +1 -1
- package/dist/esm/migrations/0008_deferred_consumption.d.ts.map +1 -1
- package/dist/esm/migrations/0008_deferred_consumption.js +1 -1
- package/dist/esm/migrations/0008_deferred_consumption.js.map +1 -1
- package/dist/esm/migrations/0009_deferred_clock_facts.d.ts +1 -1
- package/dist/esm/migrations/0009_deferred_clock_facts.d.ts.map +1 -1
- package/dist/esm/migrations/0009_deferred_clock_facts.js +1 -1
- package/dist/esm/migrations/0009_deferred_clock_facts.js.map +1 -1
- package/dist/esm/migrations/0010_pending_cancellation.d.ts +1 -1
- package/dist/esm/migrations/0010_pending_cancellation.d.ts.map +1 -1
- package/dist/esm/migrations/0010_pending_cancellation.js +1 -1
- package/dist/esm/migrations/0010_pending_cancellation.js.map +1 -1
- package/dist/esm/test/TestStores.d.ts +4 -4
- package/dist/esm/test/TestStores.d.ts.map +1 -1
- package/docs/api.md +19 -16
- package/package.json +22 -22
- package/src/ArtifactGc.ts +1 -1
- package/src/DeferredClockFold.ts +1 -1
- package/src/DisasterRecovery.ts +1 -1
- package/src/DurableEngineState.ts +1 -1
- package/src/ExecutionSnapshot.ts +1 -1
- package/src/OwnerIdentity.ts +1 -1
- package/src/PlanInputStore.ts +1 -1
- package/src/PlanMergeStore.ts +1 -1
- package/src/Retention.ts +2 -2
- package/src/RunChangeFeed.ts +1 -1
- package/src/SelectionStore.ts +1 -1
- package/src/StepBoundary.ts +32 -17
- package/src/StepCacheFold.ts +1 -1
- package/src/internal/EngineStateSchema.ts +1 -1
- package/src/internal/ExecutionSnapshotRead.ts +1 -1
- package/src/internal/ExecutionSnapshotRelations.ts +1 -1
- package/src/internal/RetentionOps.ts +2 -2
- package/src/internal/RunCatalogOps.ts +1 -1
- package/src/internal/RunListing.ts +1 -1
- package/src/migrations/0001_initial.ts +1 -1
- package/src/migrations/0002_selection_store.ts +1 -1
- package/src/migrations/0003_plan_inputs.ts +1 -1
- package/src/migrations/0004_plan_environment.ts +1 -1
- package/src/migrations/0005_plan_merges.ts +1 -1
- package/src/migrations/0006_execution_listing.ts +1 -1
- package/src/migrations/0007_run_parent_sequence.ts +1 -1
- package/src/migrations/0008_deferred_consumption.ts +1 -1
- package/src/migrations/0009_deferred_clock_facts.ts +1 -1
- package/src/migrations/0010_pending_cancellation.ts +1 -1
|
@@ -39,7 +39,7 @@ export interface TestStoresOptions {
|
|
|
39
39
|
* @category layers
|
|
40
40
|
* @since 0.1.0
|
|
41
41
|
*/
|
|
42
|
-
export declare const database: Layer.Layer<import("effect/
|
|
42
|
+
export declare const database: Layer.Layer<import("effect/sql/SqlClient").SqlClient | DurableWriter.DurableWriter, import("effect/sql/SqlError").SqlError | import("effect/sql/Migrator").MigrationError, never>;
|
|
43
43
|
/**
|
|
44
44
|
* Provides the production SQLite journal, run, attempt, and cache services
|
|
45
45
|
* over one in-memory database. Migrations run before any durable service is
|
|
@@ -54,7 +54,7 @@ export declare const database: Layer.Layer<import("effect/unstable/sql/SqlClient
|
|
|
54
54
|
* @category layers
|
|
55
55
|
* @since 0.1.0
|
|
56
56
|
*/
|
|
57
|
-
export declare const layer: (options?: TestStoresOptions) => Layer.Layer<DurableWriter.DurableWriter | CacheStore.CacheStore | import("@smthrs/journal/Journal").Journal | RunStore.RunStore | AttemptStore.AttemptStore | OwnerIdentity.OwnerIdentity | PlanInputStore.PlanInputStore | PlanMergeStore.PlanMergeStore | PlanStore.PlanStore, import("effect/
|
|
57
|
+
export declare const layer: (options?: TestStoresOptions) => Layer.Layer<DurableWriter.DurableWriter | CacheStore.CacheStore | import("@smthrs/journal/Journal").Journal | RunStore.RunStore | AttemptStore.AttemptStore | OwnerIdentity.OwnerIdentity | PlanInputStore.PlanInputStore | PlanMergeStore.PlanMergeStore | PlanStore.PlanStore, import("effect/sql/SqlError").SqlError | import("effect/sql/Migrator").MigrationError | import("@smthrs/journal/Journal").JournalError, import("effect/Crypto").Crypto>;
|
|
58
58
|
/**
|
|
59
59
|
* The same schema over a named SQLite database or PostgreSQL URL, with the connection exposed.
|
|
60
60
|
*
|
|
@@ -68,7 +68,7 @@ export declare const layer: (options?: TestStoresOptions) => Layer.Layer<Durable
|
|
|
68
68
|
* @category layers
|
|
69
69
|
* @since 0.1.0
|
|
70
70
|
*/
|
|
71
|
-
export declare const databaseAt: (filename: string) => Layer.Layer<import("effect/
|
|
71
|
+
export declare const databaseAt: (filename: string) => Layer.Layer<import("effect/sql/SqlClient").SqlClient | DurableWriter.DurableWriter, import("effect/sql/SqlError").SqlError | import("effect/sql/Migrator").MigrationError, never>;
|
|
72
72
|
/**
|
|
73
73
|
* Every durable engine service over one named database, connection included.
|
|
74
74
|
*
|
|
@@ -85,5 +85,5 @@ export declare const databaseAt: (filename: string) => Layer.Layer<import("effec
|
|
|
85
85
|
* @category layers
|
|
86
86
|
* @since 0.1.0
|
|
87
87
|
*/
|
|
88
|
-
export declare const layerAt: (filename: string, options?: TestStoresOptions) => Layer.Layer<import("effect/
|
|
88
|
+
export declare const layerAt: (filename: string, options?: TestStoresOptions) => Layer.Layer<import("effect/sql/SqlClient").SqlClient | DurableWriter.DurableWriter | CacheStore.CacheStore | import("@smthrs/journal/Journal").Journal | RunStore.RunStore | DurableEngineState.DurableEngineState | AttemptStore.AttemptStore | OwnerIdentity.OwnerIdentity | PlanInputStore.PlanInputStore | PlanMergeStore.PlanMergeStore | PlanStore.PlanStore, import("effect/sql/SqlError").SqlError | import("effect/sql/Migrator").MigrationError | import("@smthrs/journal/Journal").JournalError, import("effect/Crypto").Crypto>;
|
|
89
89
|
//# sourceMappingURL=TestStores.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestStores.d.ts","sourceRoot":"","sources":["../../../src/test/TestStores.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,aAAa,MAAM,gCAAgC,CAAA;AAI/D,OAAO,KAAK,SAAS,MAAM,8BAA8B,CAAA;AACzD,OAAO,KAAK,YAAY,MAAM,gCAAgC,CAAA;AAC9D,OAAO,KAAK,QAAQ,MAAM,4BAA4B,CAAA;AACtD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAA;AAE3D,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,KAAK,kBAAkB,MAAM,0BAA0B,CAAA;AAE9D,OAAO,KAAK,aAAa,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,cAAc,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,cAAc,MAAM,sBAAsB,CAAA;AAEtD;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,GAAG,aAAa,GAAG,aAAa,CAAA;IAC5D,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"TestStores.d.ts","sourceRoot":"","sources":["../../../src/test/TestStores.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,aAAa,MAAM,gCAAgC,CAAA;AAI/D,OAAO,KAAK,SAAS,MAAM,8BAA8B,CAAA;AACzD,OAAO,KAAK,YAAY,MAAM,gCAAgC,CAAA;AAC9D,OAAO,KAAK,QAAQ,MAAM,4BAA4B,CAAA;AACtD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAA;AAE3D,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,KAAK,kBAAkB,MAAM,0BAA0B,CAAA;AAE9D,OAAO,KAAK,aAAa,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,cAAc,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,cAAc,MAAM,sBAAsB,CAAA;AAEtD;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,GAAG,aAAa,GAAG,aAAa,CAAA;IAC5D,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,mLAA2D,CAAA;AAEhF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,KAAK,GAAI,UAAU,iBAAiB,6bAckB,CAAA;AAEnE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,UAAU,GAAI,UAAU,MAAM,sLAkB1C,CAAA;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,OAAO,GAAI,UAAU,MAAM,EAAE,UAAU,iBAAiB,ghBAce,CAAA"}
|
package/docs/api.md
CHANGED
|
@@ -369,16 +369,16 @@ interface Service {
|
|
|
369
369
|
}
|
|
370
370
|
```
|
|
371
371
|
|
|
372
|
-
| Export | Signature | Meaning
|
|
373
|
-
| ------------------- | -------------------------------------------------------------------------------------------------------- |
|
|
374
|
-
| `StepBoundary` | `Context.Service<Service>` | Service tag.
|
|
375
|
-
| `make` | `(service: Service) => Service` | Brands an implementation, so a wrong shape is reported where it is written.
|
|
376
|
-
| `makeFileSystem` | `(fs: FileSystem, path: Path, artifacts: ArtifactStore.Service, options?: FileSystemOptions) => Service` | The production boundary.
|
|
377
|
-
| `layer` | `Layer<Service, never, FileSystem \| Path \| ArtifactStore>` | Provides it,
|
|
378
|
-
| `layerTest` | `(options?: TestOptions) => Layer<Service>` | Deterministic in-memory boundary.
|
|
379
|
-
| `exactReads` | `(descriptor: FileBoundary) => ReadonlyArray<FileInput>` | Exact read inputs, ignoring declarations that still need expansion.
|
|
380
|
-
| `readSetMatches` | `(prepared: PreparedBoundary) => boolean` | Whether the measured snapshot still matches the declaration.
|
|
381
|
-
| `referencedDigests` | `(evidence: BoundaryEvidence) => ReadonlyArray<ArtifactStore.Digest>` | The digests the evidence references rather than inlines. Evidence from a foreign implementation yields the empty list.
|
|
372
|
+
| Export | Signature | Meaning |
|
|
373
|
+
| ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
374
|
+
| `StepBoundary` | `Context.Service<Service>` | Service tag. |
|
|
375
|
+
| `make` | `(service: Service) => Service` | Brands an implementation, so a wrong shape is reported where it is written. |
|
|
376
|
+
| `makeFileSystem` | `(fs: FileSystem, path: Path, artifacts: ArtifactStore.Service, options?: FileSystemOptions) => Service` | The production boundary. |
|
|
377
|
+
| `layer` | `Layer<Service, never, FileSystem \| Path \| ArtifactStore>` | Provides it, rooting measurement and replay at the kernel `Workspace` root when one is in context. Resolves that root with the host `Path`. |
|
|
378
|
+
| `layerTest` | `(options?: TestOptions) => Layer<Service>` | Deterministic in-memory boundary. |
|
|
379
|
+
| `exactReads` | `(descriptor: FileBoundary) => ReadonlyArray<FileInput>` | Exact read inputs, ignoring declarations that still need expansion. |
|
|
380
|
+
| `readSetMatches` | `(prepared: PreparedBoundary) => boolean` | Whether the measured snapshot still matches the declaration. |
|
|
381
|
+
| `referencedDigests` | `(evidence: BoundaryEvidence) => ReadonlyArray<ArtifactStore.Digest>` | The digests the evidence references rather than inlines. Evidence from a foreign implementation yields the empty list. |
|
|
382
382
|
|
|
383
383
|
### Schemas
|
|
384
384
|
|
|
@@ -393,11 +393,11 @@ interface Service {
|
|
|
393
393
|
|
|
394
394
|
### FileSystemOptions
|
|
395
395
|
|
|
396
|
-
| Field | Default | Meaning
|
|
397
|
-
| --------------------- | ------- |
|
|
398
|
-
| `maxInlineBytes` | 1 MiB | The largest single output inlined into the evidence. Anything larger is stored by digest reference.
|
|
399
|
-
| `maxTotalInlineBytes` | 8 MiB | The largest aggregate inline payload one settle may fold in. Past it, an output is spilled even though it individually fits.
|
|
400
|
-
| `root` | cwd | The root replay confines writes and removals to. A filesystem already confined to a root keeps its own.
|
|
396
|
+
| Field | Default | Meaning |
|
|
397
|
+
| --------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
398
|
+
| `maxInlineBytes` | 1 MiB | The largest single output inlined into the evidence. Anything larger is stored by digest reference. |
|
|
399
|
+
| `maxTotalInlineBytes` | 8 MiB | The largest aggregate inline payload one settle may fold in. Past it, an output is spilled even though it individually fits. |
|
|
400
|
+
| `root` | cwd | The root declared paths resolve against: `prepare` and `settle` measure under it, and replay confines writes and removals to it. A filesystem already confined to a root keeps its own. |
|
|
401
401
|
|
|
402
402
|
`replayOutputs` writes and deletes what the evidence names, so it confines its
|
|
403
403
|
own mutations instead of trusting the composition. Every write, removal, probe,
|
|
@@ -406,7 +406,10 @@ one descriptor-relative, no-follow request per call against the pinned root. A
|
|
|
406
406
|
symlink on a replayed path (a parent, the final component, or a member of a
|
|
407
407
|
replayed tree) refuses with `UnsupportedBoundary`, and so does a host with no
|
|
408
408
|
descriptor-relative executor or isolation attestation, before any host call.
|
|
409
|
-
`prepare` and `settle` only read and keep the caller's filesystem
|
|
409
|
+
`prepare` and `settle` only read and keep the caller's filesystem, but hand a
|
|
410
|
+
path-based host each declared path resolved against `root`, the root a step's
|
|
411
|
+
own FileSystem resolves against. A same-named file in the process working
|
|
412
|
+
directory therefore never answers the dirty check (issue #3911).
|
|
410
413
|
|
|
411
414
|
### TestOptions
|
|
412
415
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smthrs/engine-store",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.0-rc.
|
|
4
|
+
"version": "1.0.0-rc.7",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"smthrs": {
|
|
7
7
|
"group": "engine"
|
|
@@ -386,33 +386,33 @@
|
|
|
386
386
|
"tag": "next"
|
|
387
387
|
},
|
|
388
388
|
"dependencies": {
|
|
389
|
-
"@smthrs/artifacts": "1.0.0-rc.
|
|
390
|
-
"@smthrs/canonical": "1.0.0-rc.
|
|
391
|
-
"@smthrs/crypto": "1.0.0-rc.
|
|
392
|
-
"@smthrs/database": "1.0.0-rc.
|
|
393
|
-
"@smthrs/engine": "1.0.0-rc.
|
|
394
|
-
"@smthrs/flow": "1.0.0-rc.
|
|
395
|
-
"@smthrs/journal": "1.0.0-rc.
|
|
396
|
-
"@smthrs/kernel": "1.0.0-rc.
|
|
397
|
-
"@smthrs/keys": "1.0.0-rc.
|
|
398
|
-
"@smthrs/plan": "1.0.0-rc.
|
|
399
|
-
"@smthrs/plan-store": "1.0.0-rc.
|
|
400
|
-
"@smthrs/run-store": "1.0.0-rc.
|
|
401
|
-
"@smthrs/step-cache": "1.0.0-rc.
|
|
402
|
-
"@smthrs/capability": "1.0.0-rc.
|
|
389
|
+
"@smthrs/artifacts": "1.0.0-rc.7",
|
|
390
|
+
"@smthrs/canonical": "1.0.0-rc.7",
|
|
391
|
+
"@smthrs/crypto": "1.0.0-rc.7",
|
|
392
|
+
"@smthrs/database": "1.0.0-rc.7",
|
|
393
|
+
"@smthrs/engine": "1.0.0-rc.7",
|
|
394
|
+
"@smthrs/flow": "1.0.0-rc.7",
|
|
395
|
+
"@smthrs/journal": "1.0.0-rc.7",
|
|
396
|
+
"@smthrs/kernel": "1.0.0-rc.7",
|
|
397
|
+
"@smthrs/keys": "1.0.0-rc.7",
|
|
398
|
+
"@smthrs/plan": "1.0.0-rc.7",
|
|
399
|
+
"@smthrs/plan-store": "1.0.0-rc.7",
|
|
400
|
+
"@smthrs/run-store": "1.0.0-rc.7",
|
|
401
|
+
"@smthrs/step-cache": "1.0.0-rc.7",
|
|
402
|
+
"@smthrs/capability": "1.0.0-rc.7"
|
|
403
403
|
},
|
|
404
404
|
"devDependencies": {
|
|
405
405
|
"@effect/language-service": "0.87.2",
|
|
406
|
-
"@effect/platform-node": "4.0.
|
|
407
|
-
"@effect/vitest": "4.0.
|
|
406
|
+
"@effect/platform-node": "4.0.4",
|
|
407
|
+
"@effect/vitest": "4.0.4",
|
|
408
408
|
"@eslint/js": "9.39.5",
|
|
409
|
-
"@smthrs/core": "1.0.0-rc.
|
|
410
|
-
"@smthrs/patterns": "1.0.0-rc.
|
|
411
|
-
"@smthrs/platform-node": "1.0.0-rc.
|
|
409
|
+
"@smthrs/core": "1.0.0-rc.7",
|
|
410
|
+
"@smthrs/patterns": "1.0.0-rc.7",
|
|
411
|
+
"@smthrs/platform-node": "1.0.0-rc.7",
|
|
412
412
|
"@types/node": "26.4.1",
|
|
413
413
|
"@vitest/coverage-v8": "5.0.0",
|
|
414
414
|
"dprint": "0.57.1",
|
|
415
|
-
"effect": "4.0.
|
|
415
|
+
"effect": "4.0.4",
|
|
416
416
|
"esbuild": "0.28.2",
|
|
417
417
|
"eslint": "9.39.5",
|
|
418
418
|
"eslint-import-resolver-typescript": "4.4.5",
|
|
@@ -426,7 +426,7 @@
|
|
|
426
426
|
"vitest": "5.0.0"
|
|
427
427
|
},
|
|
428
428
|
"peerDependencies": {
|
|
429
|
-
"effect": "4.0.
|
|
429
|
+
"effect": "^4.0.4"
|
|
430
430
|
},
|
|
431
431
|
"scripts": {
|
|
432
432
|
"lint": "eslint src --max-warnings=0 && dprint check",
|
package/src/ArtifactGc.ts
CHANGED
|
@@ -46,7 +46,7 @@ import type * as FileSystem from "effect/FileSystem"
|
|
|
46
46
|
import * as Layer from "effect/Layer"
|
|
47
47
|
import * as Option from "effect/Option"
|
|
48
48
|
import * as Schema from "effect/Schema"
|
|
49
|
-
import * as SqlClient from "effect/
|
|
49
|
+
import * as SqlClient from "effect/sql/SqlClient"
|
|
50
50
|
import * as ArtifactRoots from "./internal/ArtifactRoots.ts"
|
|
51
51
|
|
|
52
52
|
/**
|
package/src/DeferredClockFold.ts
CHANGED
|
@@ -37,7 +37,7 @@ import { Journal, JournalEvent, Projection } from "@smthrs/journal"
|
|
|
37
37
|
import * as Effect from "effect/Effect"
|
|
38
38
|
import * as Option from "effect/Option"
|
|
39
39
|
import * as Schema from "effect/Schema"
|
|
40
|
-
import * as SqlClient from "effect/
|
|
40
|
+
import * as SqlClient from "effect/sql/SqlClient"
|
|
41
41
|
import { EventTypes } from "./EventTypes.ts"
|
|
42
42
|
|
|
43
43
|
/**
|
package/src/DisasterRecovery.ts
CHANGED
|
@@ -46,7 +46,7 @@ import * as Effect from "effect/Effect"
|
|
|
46
46
|
import * as FileSystem from "effect/FileSystem"
|
|
47
47
|
import type * as Layer from "effect/Layer"
|
|
48
48
|
import * as Schema from "effect/Schema"
|
|
49
|
-
import * as SqlClient from "effect/
|
|
49
|
+
import * as SqlClient from "effect/sql/SqlClient"
|
|
50
50
|
import * as ArtifactRoots from "./internal/ArtifactRoots.ts"
|
|
51
51
|
|
|
52
52
|
/**
|
|
@@ -24,7 +24,7 @@ import * as Option from "effect/Option"
|
|
|
24
24
|
import * as Result from "effect/Result"
|
|
25
25
|
import * as Schema from "effect/Schema"
|
|
26
26
|
import * as Semaphore from "effect/Semaphore"
|
|
27
|
-
import * as SqlClient from "effect/
|
|
27
|
+
import * as SqlClient from "effect/sql/SqlClient"
|
|
28
28
|
import * as EngineStateSchema from "./internal/EngineStateSchema.ts"
|
|
29
29
|
import { compareText } from "./internal/Ordering.ts"
|
|
30
30
|
import type { OnParentExit } from "./RunState.ts"
|
package/src/ExecutionSnapshot.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import * as Dialect from "@smthrs/database/Dialect"
|
|
8
8
|
import type { RunStoreError } from "@smthrs/run-store/RunStore"
|
|
9
9
|
import { Context, Effect, Layer, Schema } from "effect"
|
|
10
|
-
import * as SqlClient from "effect/
|
|
10
|
+
import * as SqlClient from "effect/sql/SqlClient"
|
|
11
11
|
import * as Read from "./internal/ExecutionSnapshotRead.ts"
|
|
12
12
|
import * as Relations from "./internal/ExecutionSnapshotRelations.ts"
|
|
13
13
|
|
package/src/OwnerIdentity.ts
CHANGED
|
@@ -94,7 +94,7 @@ export const makeIncarnation = (pid: number | undefined, crypto: Crypto.Crypto):
|
|
|
94
94
|
return {
|
|
95
95
|
hostId,
|
|
96
96
|
pid: yield* incarnationId,
|
|
97
|
-
nonce: yield* crypto.randomUUIDv4.pipe(Effect.orDie)
|
|
97
|
+
nonce: yield* crypto.randomUUIDv4().pipe(Effect.orDie)
|
|
98
98
|
} satisfies OwnerId
|
|
99
99
|
})
|
|
100
100
|
})
|
package/src/PlanInputStore.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { FileSet, Plan } from "@smthrs/plan"
|
|
|
10
10
|
import { OwnerId } from "@smthrs/run-store/Ownership"
|
|
11
11
|
import { Context, Effect, Layer, Option, Schema } from "effect"
|
|
12
12
|
import type * as Crypto from "effect/Crypto"
|
|
13
|
-
import * as SqlClient from "effect/
|
|
13
|
+
import * as SqlClient from "effect/sql/SqlClient"
|
|
14
14
|
|
|
15
15
|
const Natural = Schema.Int.check(Schema.isGreaterThanOrEqualTo(0))
|
|
16
16
|
|
package/src/PlanMergeStore.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { Plan } from "@smthrs/plan"
|
|
|
10
10
|
import { OwnerId } from "@smthrs/run-store/Ownership"
|
|
11
11
|
import { Context, Effect, Layer, Option, Schema } from "effect"
|
|
12
12
|
import type * as Crypto from "effect/Crypto"
|
|
13
|
-
import * as SqlClient from "effect/
|
|
13
|
+
import * as SqlClient from "effect/sql/SqlClient"
|
|
14
14
|
|
|
15
15
|
const Natural = Schema.Int.check(Schema.isGreaterThanOrEqualTo(0))
|
|
16
16
|
const Positive = Schema.Int.check(Schema.isGreaterThan(0))
|
package/src/Retention.ts
CHANGED
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
import * as Dialect from "@smthrs/database/Dialect"
|
|
35
35
|
import * as DurableWriter from "@smthrs/database/DurableWriter"
|
|
36
36
|
import * as Effect from "effect/Effect"
|
|
37
|
-
import * as SqlClient from "effect/
|
|
38
|
-
import type { SqlError } from "effect/
|
|
37
|
+
import * as SqlClient from "effect/sql/SqlClient"
|
|
38
|
+
import type { SqlError } from "effect/sql/SqlError"
|
|
39
39
|
import * as RetentionOps from "./internal/RetentionOps.ts"
|
|
40
40
|
|
|
41
41
|
export {
|
package/src/RunChangeFeed.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import { RunStoreError } from "@smthrs/run-store/RunStore"
|
|
8
8
|
import { Context, Effect, Layer, Schema } from "effect"
|
|
9
|
-
import * as SqlClient from "effect/
|
|
9
|
+
import * as SqlClient from "effect/sql/SqlClient"
|
|
10
10
|
import type { Position } from "./ExecutionSnapshot.ts"
|
|
11
11
|
import * as Read from "./internal/ExecutionSnapshotRead.ts"
|
|
12
12
|
|
package/src/SelectionStore.ts
CHANGED
|
@@ -26,7 +26,7 @@ import * as Context from "effect/Context"
|
|
|
26
26
|
import * as Effect from "effect/Effect"
|
|
27
27
|
import * as Layer from "effect/Layer"
|
|
28
28
|
import * as Schema from "effect/Schema"
|
|
29
|
-
import * as SqlClient from "effect/
|
|
29
|
+
import * as SqlClient from "effect/sql/SqlClient"
|
|
30
30
|
import * as Selection from "./Selection.ts"
|
|
31
31
|
|
|
32
32
|
/**
|
package/src/StepBoundary.ts
CHANGED
|
@@ -16,7 +16,7 @@ import * as FileSet from "@smthrs/plan/FileSet"
|
|
|
16
16
|
import * as Context from "effect/Context"
|
|
17
17
|
import type * as Crypto from "effect/Crypto"
|
|
18
18
|
import * as Effect from "effect/Effect"
|
|
19
|
-
import * as
|
|
19
|
+
import * as Base64 from "effect/encoding/Base64"
|
|
20
20
|
import * as FileSystem from "effect/FileSystem"
|
|
21
21
|
import * as Layer from "effect/Layer"
|
|
22
22
|
import * as Path from "effect/Path"
|
|
@@ -496,12 +496,14 @@ export interface FileSystemOptions {
|
|
|
496
496
|
*/
|
|
497
497
|
readonly maxTotalInlineBytes?: number | undefined
|
|
498
498
|
/**
|
|
499
|
-
* The workspace root
|
|
500
|
-
*
|
|
501
|
-
*
|
|
502
|
-
*
|
|
503
|
-
*
|
|
504
|
-
*
|
|
499
|
+
* The workspace root every declared path resolves against: `prepare` and
|
|
500
|
+
* `settle` measure under it, and cache replay confines its writes, removals,
|
|
501
|
+
* and prune walk to it. A filesystem already confined to a root (the
|
|
502
|
+
* kernel-guarded layer's service, or a `confined` view) keeps its own root
|
|
503
|
+
* and ignores this. Otherwise it defaults to the process working directory,
|
|
504
|
+
* the root a path-based host resolves a relative path against. {@link layer}
|
|
505
|
+
* passes the kernel `Workspace` root when one is in context, which is the
|
|
506
|
+
* root a step's own FileSystem resolves against (issue #3911).
|
|
505
507
|
*/
|
|
506
508
|
readonly root?: string | undefined
|
|
507
509
|
}
|
|
@@ -573,7 +575,16 @@ export const makeFileSystem = (
|
|
|
573
575
|
const digest = yield* Schema.decodeUnknownEffect(Sha256)(bytes).pipe(Effect.orDie)
|
|
574
576
|
return { digest, bytes } satisfies MeasuredDigest
|
|
575
577
|
})
|
|
576
|
-
|
|
578
|
+
// Declared paths are workspace-relative. A confined filesystem resolves them
|
|
579
|
+
// against its own root, but a path-based host resolves them against the
|
|
580
|
+
// process working directory, where a same-named file would answer the dirty
|
|
581
|
+
// check and let a stale declaration serve a cache hit (issue #3911). Such a
|
|
582
|
+
// host is handed each path resolved against the configured root; results
|
|
583
|
+
// stay keyed by the declared path.
|
|
584
|
+
const readRoot = KernelFileSystem.confinedRoot(fs) === undefined ? options.root : undefined
|
|
585
|
+
const hostPath = (path: string): string => readRoot === undefined ? path : platformPath.resolve(readRoot, path)
|
|
586
|
+
const enumeration: FileEnumeration.EnumerationOptions = readRoot === undefined ? {} : { resolve: hostPath }
|
|
587
|
+
const readDigest = (path: string) => readDigestFrom(fs, hostPath(path))
|
|
577
588
|
const batch = KernelFileSystem.batch(fs)
|
|
578
589
|
const measurements = Effect.fn("StepBoundary.measurements")(
|
|
579
590
|
function*(paths: ReadonlyArray<string>, content: boolean) {
|
|
@@ -594,7 +605,7 @@ export const makeFileSystem = (
|
|
|
594
605
|
const response = yield* batch.execute(
|
|
595
606
|
paths.slice(offset, offset + batch.maxSize).map((path) => ({
|
|
596
607
|
operation: "digest",
|
|
597
|
-
path,
|
|
608
|
+
path: hostPath(path),
|
|
598
609
|
content
|
|
599
610
|
}))
|
|
600
611
|
).pipe(Effect.mapError(hostFailure))
|
|
@@ -636,10 +647,14 @@ export const makeFileSystem = (
|
|
|
636
647
|
// workspace-relative expansion and let a tree replay delete dotfiles the
|
|
637
648
|
// producer wrote.
|
|
638
649
|
const expandGlob = Effect.fn("StepBoundary.expandGlob")(function*(glob: FileSet.Glob) {
|
|
639
|
-
return yield* FileEnumeration.expandGlob(fs, glob).pipe(Effect.mapError(hostFailure))
|
|
650
|
+
return yield* FileEnumeration.expandGlob(fs, glob, enumeration).pipe(Effect.mapError(hostFailure))
|
|
640
651
|
})
|
|
641
|
-
const treeEntries = Effect.fn("StepBoundary.treeEntries")(function*(
|
|
642
|
-
|
|
652
|
+
const treeEntries = Effect.fn("StepBoundary.treeEntries")(function*(
|
|
653
|
+
host: FileSystem.FileSystem,
|
|
654
|
+
path: string,
|
|
655
|
+
resolution: FileEnumeration.EnumerationOptions
|
|
656
|
+
) {
|
|
657
|
+
return yield* FileEnumeration.entriesUnder(host, path, resolution).pipe(Effect.mapError(hostFailure))
|
|
643
658
|
})
|
|
644
659
|
// Replay writes and deletes what evidence names, so the lexical check alone
|
|
645
660
|
// is not a boundary: a symlink planted on a lexically valid path would carry
|
|
@@ -647,7 +662,7 @@ export const makeFileSystem = (
|
|
|
647
662
|
// its prune walk go through a view pinned to the root, where each call is
|
|
648
663
|
// one descriptor-relative, no-follow request and a symlink anywhere on the
|
|
649
664
|
// path is refused rather than followed. `prepare` and `settle` only read,
|
|
650
|
-
// and keep the caller's filesystem
|
|
665
|
+
// and keep the caller's filesystem, rooted through `hostPath`.
|
|
651
666
|
const replayRoot = KernelFileSystem.confinedRoot(fs) ?? options.root ?? "."
|
|
652
667
|
const replayHost: Effect.Effect<FileSystem.FileSystem, UnsupportedBoundary> = KernelFileSystem.isConfinable(fs)
|
|
653
668
|
? KernelFileSystem.confined(fs, replayRoot).pipe(
|
|
@@ -680,7 +695,7 @@ export const makeFileSystem = (
|
|
|
680
695
|
path,
|
|
681
696
|
digest,
|
|
682
697
|
sizeBytes: bytes.length,
|
|
683
|
-
content:
|
|
698
|
+
content: Base64.encode(bytes)
|
|
684
699
|
} satisfies MaterializedOutput,
|
|
685
700
|
inlinedBytes: bytes.length
|
|
686
701
|
}
|
|
@@ -720,7 +735,7 @@ export const makeFileSystem = (
|
|
|
720
735
|
if (current) return
|
|
721
736
|
let bytes: Uint8Array
|
|
722
737
|
if (output.content !== undefined) {
|
|
723
|
-
const decoded =
|
|
738
|
+
const decoded = Base64.decode(output.content)
|
|
724
739
|
if (Result.isFailure(decoded)) {
|
|
725
740
|
// Inline content is cache-origin bytes: an undecodable payload is a
|
|
726
741
|
// tampered durable row, classified exactly like a digest mismatch so
|
|
@@ -849,7 +864,7 @@ export const makeFileSystem = (
|
|
|
849
864
|
if (typeof entry === "string") outputPaths.push(entry)
|
|
850
865
|
else if (entry._tag === "Glob") outputPaths.push(...yield* expandGlob(entry))
|
|
851
866
|
else {
|
|
852
|
-
const files = (yield* treeEntries(fs, entry.path)).files
|
|
867
|
+
const files = (yield* treeEntries(fs, entry.path, enumeration)).files
|
|
853
868
|
outputPaths.push(...files)
|
|
854
869
|
treeMembers.push({ path: entry.path, files })
|
|
855
870
|
}
|
|
@@ -1007,7 +1022,7 @@ export const makeFileSystem = (
|
|
|
1007
1022
|
.map((output) => output.path)
|
|
1008
1023
|
.filter((path) => path.startsWith(prefix))
|
|
1009
1024
|
)
|
|
1010
|
-
const entries = yield* treeEntries(host, tree.path)
|
|
1025
|
+
const entries = yield* treeEntries(host, tree.path, {})
|
|
1011
1026
|
for (const path of entries.files) {
|
|
1012
1027
|
if (!recorded.has(path)) yield* host.remove(path).pipe(Effect.mapError(hostFailure))
|
|
1013
1028
|
}
|
package/src/StepCacheFold.ts
CHANGED
|
@@ -42,7 +42,7 @@ import { CacheStore } from "@smthrs/step-cache"
|
|
|
42
42
|
import * as Effect from "effect/Effect"
|
|
43
43
|
import * as HashMap from "effect/HashMap"
|
|
44
44
|
import * as HashSet from "effect/HashSet"
|
|
45
|
-
import * as SqlClient from "effect/
|
|
45
|
+
import * as SqlClient from "effect/sql/SqlClient"
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
48
|
* The journal event type the fold reads.
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
import { isReadOnly } from "@smthrs/database/Dialect"
|
|
21
21
|
import type { Service as WriterService } from "@smthrs/database/DurableWriter"
|
|
22
22
|
import * as Effect from "effect/Effect"
|
|
23
|
-
import type * as SqlClient from "effect/
|
|
23
|
+
import type * as SqlClient from "effect/sql/SqlClient"
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* SQL dialects a statement is known to be accepted by, verbatim.
|
|
@@ -8,7 +8,7 @@ import * as Sha256 from "@smthrs/crypto/Sha256"
|
|
|
8
8
|
import { OwnerId } from "@smthrs/journal/OwnerId"
|
|
9
9
|
import { RunStatus, RunStoreError } from "@smthrs/run-store/RunStore"
|
|
10
10
|
import { Cause, Effect, Exit, Option, Schema } from "effect"
|
|
11
|
-
import type * as SqlClient from "effect/
|
|
11
|
+
import type * as SqlClient from "effect/sql/SqlClient"
|
|
12
12
|
import type { Batch } from "../ExecutionSnapshot.ts"
|
|
13
13
|
import { RunState } from "../RunState.ts"
|
|
14
14
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import * as Dialect from "@smthrs/database/Dialect"
|
|
8
8
|
import { RunStoreError } from "@smthrs/run-store/RunStore"
|
|
9
9
|
import { Effect, Schema } from "effect"
|
|
10
|
-
import type * as SqlClient from "effect/
|
|
10
|
+
import type * as SqlClient from "effect/sql/SqlClient"
|
|
11
11
|
import type { Batch, Snapshot } from "../ExecutionSnapshot.ts"
|
|
12
12
|
import * as Read from "./ExecutionSnapshotRead.ts"
|
|
13
13
|
|
|
@@ -58,8 +58,8 @@ import * as Context from "effect/Context"
|
|
|
58
58
|
import * as Effect from "effect/Effect"
|
|
59
59
|
import * as Layer from "effect/Layer"
|
|
60
60
|
import * as Schema from "effect/Schema"
|
|
61
|
-
import * as SqlClient from "effect/
|
|
62
|
-
import type { SqlError } from "effect/
|
|
61
|
+
import * as SqlClient from "effect/sql/SqlClient"
|
|
62
|
+
import type { SqlError } from "effect/sql/SqlError"
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* Stable error codes returned by retention.
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
import * as Context from "effect/Context"
|
|
27
27
|
import * as Effect from "effect/Effect"
|
|
28
28
|
import * as Layer from "effect/Layer"
|
|
29
|
-
import * as SqlClient from "effect/
|
|
29
|
+
import * as SqlClient from "effect/sql/SqlClient"
|
|
30
30
|
import * as RunListing from "./RunListing.ts"
|
|
31
31
|
import { RunCatalogError } from "./RunListingError.ts"
|
|
32
32
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import * as Dialect from "@smthrs/database/Dialect"
|
|
8
8
|
import { RunStatus } from "@smthrs/run-store/RunStore"
|
|
9
9
|
import { Cause, Effect, Schema } from "effect"
|
|
10
|
-
import * as SqlClient from "effect/
|
|
10
|
+
import * as SqlClient from "effect/sql/SqlClient"
|
|
11
11
|
import * as Read from "./ExecutionSnapshotRead.ts"
|
|
12
12
|
import { RunCatalogError } from "./RunListingError.ts"
|
|
13
13
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import * as Dialect from "@smthrs/database/Dialect"
|
|
10
10
|
import * as Effect from "effect/Effect"
|
|
11
|
-
import * as SqlClient from "effect/
|
|
11
|
+
import * as SqlClient from "effect/sql/SqlClient"
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Creates the `flows_deferred_completions` and `flows_clock_deadlines` tables.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import * as Dialect from "@smthrs/database/Dialect"
|
|
8
8
|
import * as Effect from "effect/Effect"
|
|
9
|
-
import * as SqlClient from "effect/
|
|
9
|
+
import * as SqlClient from "effect/sql/SqlClient"
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Creates the `flows_selection_suspected_edges` table.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import * as Dialect from "@smthrs/database/Dialect"
|
|
7
7
|
import * as Effect from "effect/Effect"
|
|
8
|
-
import * as SqlClient from "effect/
|
|
8
|
+
import * as SqlClient from "effect/sql/SqlClient"
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Creates input generations and marks pre-observation executions as non-recoverable.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import * as Dialect from "@smthrs/database/Dialect"
|
|
7
7
|
import * as Effect from "effect/Effect"
|
|
8
|
-
import * as SqlClient from "effect/
|
|
8
|
+
import * as SqlClient from "effect/sql/SqlClient"
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Older heads retain NULL: their original runtime environment is unknowable.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import * as Dialect from "@smthrs/database/Dialect"
|
|
7
7
|
import * as Effect from "effect/Effect"
|
|
8
|
-
import * as SqlClient from "effect/
|
|
8
|
+
import * as SqlClient from "effect/sql/SqlClient"
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Existing heads retain an unknown merge-state version; a later runtime must
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import * as Dialect from "@smthrs/database/Dialect"
|
|
8
8
|
import * as Effect from "effect/Effect"
|
|
9
|
-
import * as SqlClient from "effect/
|
|
9
|
+
import * as SqlClient from "effect/sql/SqlClient"
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Brings existing spawn edges into the migration ladder and binds changes to
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import * as Dialect from "@smthrs/database/Dialect"
|
|
8
8
|
import * as Effect from "effect/Effect"
|
|
9
|
-
import * as SqlClient from "effect/
|
|
9
|
+
import * as SqlClient from "effect/sql/SqlClient"
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Retains completion values for replay while removing consumed rows from sweeps.
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import { FlowEngine } from "@smthrs/engine"
|
|
8
8
|
import * as JournalEvent from "@smthrs/journal/JournalEvent"
|
|
9
9
|
import * as Effect from "effect/Effect"
|
|
10
|
-
import * as SqlClient from "effect/
|
|
10
|
+
import * as SqlClient from "effect/sql/SqlClient"
|
|
11
11
|
import { EventTypes } from "../EventTypes.ts"
|
|
12
12
|
|
|
13
13
|
interface ClockRow {
|