@effect-agent/storage-cloudflare 0.1.0-beta.45 → 0.1.0-beta.46
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/DoMemoryStore.d.mts +24 -0
- package/dist/DoMemoryStore.mjs +50 -0
- package/dist/DoMemoryStore.mjs.map +1 -0
- package/dist/DoScheduleStore.d.mts +36 -0
- package/dist/DoScheduleStore.mjs +369 -0
- package/dist/DoScheduleStore.mjs.map +1 -0
- package/dist/DoStorageConfig.d.mts +45 -0
- package/dist/DoStorageConfig.mjs +52 -0
- package/dist/DoStorageConfig.mjs.map +1 -0
- package/dist/{do-storage-failpoint-9XB9tuif.d.mts → DoStorageError-Qwybzk0O.d.mts} +6 -15
- package/dist/DoStorageError.d.mts +2 -0
- package/dist/DoStorageError.mjs +158 -0
- package/dist/DoStorageError.mjs.map +1 -0
- package/dist/DoStorageFailpoint.d.mts +17 -0
- package/dist/{do-storage-failpoint-C-Qtchs7.mjs → DoStorageFailpoint.mjs} +5 -3
- package/dist/DoStorageFailpoint.mjs.map +1 -0
- package/dist/{testing.d.mts → DoStorageFailpointTesting.d.mts} +4 -3
- package/dist/{testing.mjs → DoStorageFailpointTesting.mjs} +3 -3
- package/dist/DoStorageFailpointTesting.mjs.map +1 -0
- package/dist/DoStorageVersion-KrYUXqeJ.d.mts +10 -0
- package/dist/DoStorageVersion.d.mts +2 -0
- package/dist/DoStorageVersion.mjs +8 -0
- package/dist/DoStorageVersion.mjs.map +1 -0
- package/dist/DoSubmissionLedger.d.mts +23 -0
- package/dist/DoSubmissionLedger.mjs +1716 -0
- package/dist/DoSubmissionLedger.mjs.map +1 -0
- package/dist/DoSubscriptionStore.d.mts +25 -0
- package/dist/DoSubscriptionStore.mjs +720 -0
- package/dist/DoSubscriptionStore.mjs.map +1 -0
- package/dist/DoThreadStore-D9ebIYPv.mjs +1083 -0
- package/dist/DoThreadStore-D9ebIYPv.mjs.map +1 -0
- package/dist/DoThreadStore.d.mts +59 -0
- package/dist/DoThreadStore.mjs +5 -0
- package/dist/MemoryProtocol.d.mts +19796 -0
- package/dist/MemoryProtocol.mjs +182 -0
- package/dist/MemoryProtocol.mjs.map +1 -0
- package/dist/PortProtocol.d.mts +1587 -0
- package/dist/PortProtocol.mjs +175 -0
- package/dist/PortProtocol.mjs.map +1 -0
- package/dist/PortRouting.d.mts +82 -0
- package/dist/PortRouting.mjs +404 -0
- package/dist/PortRouting.mjs.map +1 -0
- package/dist/index.d.mts +13 -21619
- package/dist/index.mjs +13 -4954
- package/dist/migrations-Bo4GU-pp.mjs +236 -0
- package/dist/migrations-Bo4GU-pp.mjs.map +1 -0
- package/dist/rolldown-runtime-D7D4PA-g.mjs +13 -0
- package/package.json +1 -1
- package/src/{do-memory-store.ts → DoMemoryStore.ts} +5 -2
- package/src/{do-schedule-store.ts → DoScheduleStore.ts} +6 -4
- package/src/{errors.ts → DoStorageError.ts} +1 -1
- package/src/{do-storage-failpoint.ts → DoStorageFailpoint.ts} +1 -1
- package/src/{do-storage-failpoint-testing.ts → DoStorageFailpointTesting.ts} +2 -2
- package/src/DoStorageVersion.ts +2 -0
- package/src/{do-ledger.ts → DoSubmissionLedger.ts} +22 -20
- package/src/{do-subscription-store.ts → DoSubscriptionStore.ts} +10 -8
- package/src/{do-thread-store.ts → DoThreadStore.ts} +19 -21
- package/src/{memory-protocol.ts → MemoryProtocol.ts} +15 -10
- package/src/{port-protocol.ts → PortProtocol.ts} +13 -11
- package/src/{routing.ts → PortRouting.ts} +10 -8
- package/src/index.ts +12 -36
- package/src/{do-journal.ts → internal/do-journal.ts} +2 -2
- package/dist/do-storage-failpoint-C-Qtchs7.mjs.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/testing.mjs.map +0 -1
- package/src/testing.ts +0 -2
- /package/src/{do-storage-config.ts → DoStorageConfig.ts} +0 -0
- /package/src/{migrations.ts → internal/migrations.ts} +0 -0
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AdmissionIndeterminate,
|
|
3
3
|
AdmissionConflict,
|
|
4
|
-
AppendConflict,
|
|
5
4
|
ChildAttachmentSnapshot,
|
|
6
|
-
ThreadMaterialization,
|
|
7
|
-
ThreadNotMaterialized,
|
|
8
|
-
ThreadStore,
|
|
9
|
-
ThreadStoreError,
|
|
10
|
-
FenceRejected,
|
|
11
5
|
JoinedToHost,
|
|
12
6
|
LedgerError,
|
|
13
7
|
RecoverySnapshot,
|
|
@@ -16,7 +10,15 @@ import {
|
|
|
16
10
|
SubmissionLookupById,
|
|
17
11
|
type SubmissionLookupByKey,
|
|
18
12
|
type SubmissionSnapshot,
|
|
19
|
-
} from "@effect-agent/thread";
|
|
13
|
+
} from "@effect-agent/thread/SubmissionLedger";
|
|
14
|
+
import {
|
|
15
|
+
AppendConflict,
|
|
16
|
+
ThreadMaterialization,
|
|
17
|
+
ThreadNotMaterialized,
|
|
18
|
+
ThreadStore,
|
|
19
|
+
ThreadStoreError,
|
|
20
|
+
FenceRejected,
|
|
21
|
+
} from "@effect-agent/thread/ThreadStore";
|
|
20
22
|
import { Context, Effect, Layer, Option, Predicate, Schema, Stream } from "effect";
|
|
21
23
|
|
|
22
24
|
import {
|
|
@@ -55,7 +57,7 @@ import {
|
|
|
55
57
|
type PortRequestEnvelope,
|
|
56
58
|
type PortResponse,
|
|
57
59
|
type PortResult,
|
|
58
|
-
} from "./
|
|
60
|
+
} from "./PortProtocol.ts";
|
|
59
61
|
|
|
60
62
|
type ThreadId = ThreadMaterialization["threadId"];
|
|
61
63
|
type SubmissionId = SubmissionSnapshot["submissionId"];
|
package/src/index.ts
CHANGED
|
@@ -1,36 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* WP2 adds the cross-Object distribution seam: `port-protocol.ts` (the Schema
|
|
15
|
-
* request/response/failure envelopes for the CLOSED route-capable port subset) and
|
|
16
|
-
* `routing.ts` (the `ThreadPortTransport` service, the routed decorator Layers over
|
|
17
|
-
* the local facets — this-thread → local, route-capable foreign → transport, anything
|
|
18
|
-
* else foreign → fail fast typed — and the owner-side `handleEncodedPortRequest` endpoint
|
|
19
|
-
* body for the Thread Object's `portCall`).
|
|
20
|
-
*
|
|
21
|
-
* This package never imports the `cloudflare:workers` runtime module — Durable Object handles
|
|
22
|
-
* (`ctx.storage`) are injected as Layer construction values, and `@cloudflare/workers-types`
|
|
23
|
-
* stays a types-only devDependency.
|
|
24
|
-
*/
|
|
25
|
-
export * from "./errors.ts";
|
|
26
|
-
export { CurrentDoStorageVersion } from "./migrations.ts";
|
|
27
|
-
export * from "./do-thread-store.ts";
|
|
28
|
-
export * from "./do-ledger.ts";
|
|
29
|
-
export * from "./do-schedule-store.ts";
|
|
30
|
-
export * from "./do-subscription-store.ts";
|
|
31
|
-
export * from "./do-storage-config.ts";
|
|
32
|
-
export * from "./do-storage-failpoint.ts";
|
|
33
|
-
export * from "./port-protocol.ts";
|
|
34
|
-
export * from "./routing.ts";
|
|
35
|
-
export * from "./do-memory-store.ts";
|
|
36
|
-
export * from "./memory-protocol.ts";
|
|
1
|
+
export * as DoMemoryStore from "./DoMemoryStore.ts";
|
|
2
|
+
export * as DoScheduleStore from "./DoScheduleStore.ts";
|
|
3
|
+
export * as DoStorageConfig from "./DoStorageConfig.ts";
|
|
4
|
+
export * as DoStorageError from "./DoStorageError.ts";
|
|
5
|
+
export * as DoStorageFailpoint from "./DoStorageFailpoint.ts";
|
|
6
|
+
export * as DoStorageVersion from "./DoStorageVersion.ts";
|
|
7
|
+
export * as DoSubmissionLedger from "./DoSubmissionLedger.ts";
|
|
8
|
+
export * as DoSubscriptionStore from "./DoSubscriptionStore.ts";
|
|
9
|
+
export * as DoThreadStore from "./DoThreadStore.ts";
|
|
10
|
+
export * as MemoryProtocol from "./MemoryProtocol.ts";
|
|
11
|
+
export * as PortProtocol from "./PortProtocol.ts";
|
|
12
|
+
export * as PortRouting from "./PortRouting.ts";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CanonicalSequence, ProducerEpoch } from "@effect-agent/thread";
|
|
1
|
+
import { CanonicalSequence, ProducerEpoch } from "@effect-agent/thread/Records";
|
|
2
2
|
import { SqliteMigrator } from "@effect/sql-sqlite-do";
|
|
3
3
|
import { Effect, Schema } from "effect";
|
|
4
4
|
import * as SqlClient from "effect/unstable/sql/SqlClient";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
DoStorageError,
|
|
15
15
|
DoValueBoundExceeded,
|
|
16
16
|
type DoStorageFailpointLocation,
|
|
17
|
-
} from "
|
|
17
|
+
} from "../DoStorageError.ts";
|
|
18
18
|
import { CurrentDoStorageVersion, doMigrations } from "./migrations.ts";
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"do-storage-failpoint-C-Qtchs7.mjs","names":[],"sources":["../src/do-storage-failpoint.ts"],"sourcesContent":["import { Context, Effect, Layer } from \"effect\";\n\nimport type { DoStorageFailpointError, DoStorageFailpointLocation } from \"./errors.ts\";\n\nexport type DoStorageFailpointHandler = (\n location: DoStorageFailpointLocation,\n) => Effect.Effect<void, DoStorageFailpointError>;\n\nconst noFailpoint: DoStorageFailpointHandler = () => Effect.void;\n\n/** Explicit fault-injection authority used at Durable Object storage operation boundaries. */\nexport class DoStorageFailpoint extends Context.Service<\n DoStorageFailpoint,\n {\n readonly hit: DoStorageFailpointHandler;\n }\n>()(\"@effect-agent/storage-cloudflare/DoStorageFailpoint\") {\n /** Production default: no fault injection. */\n static readonly layer = Layer.succeed(this)({ hit: noFailpoint });\n}\n"],"mappings":";;AAQA,MAAM,oBAA+C,OAAO;;AAG5D,IAAa,qBAAb,cAAwC,QAAQ,QAK9C,CAAC,CAAC,qDAAqD,CAAC,CAAC;;CAEzD,OAAgB,QAAQ,MAAM,QAAQ,IAAI,CAAC,CAAC,EAAE,KAAK,YAAY,CAAC;AAClE"}
|