@effect-agent/platform-node 0.1.0-beta.84 → 0.1.0-beta.86
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/{NodeDurableAgentRuntime-CFElFzNF.d.mts → NodeDurableAgentRuntime-Cs_E9W_9.d.mts} +32 -36
- package/dist/NodeDurableAgentRuntime.d.mts +1 -1
- package/dist/NodeDurableAgentRuntime.mjs +18 -18
- package/dist/NodeDurableAgentRuntime.mjs.map +1 -1
- package/dist/{NodeDurableHost-BMSajuQn.mjs → NodeDurableHost-CG2xAhfb.mjs} +12 -12
- package/dist/NodeDurableHost-CG2xAhfb.mjs.map +1 -0
- package/dist/NodeDurableHost.d.mts +46 -54
- package/dist/NodeDurableHost.mjs +1 -1
- package/dist/NodeScheduling.d.mts +2 -2
- package/dist/NodeScheduling.mjs +2 -2
- package/dist/NodeScheduling.mjs.map +1 -1
- package/dist/NodeSubscriptions.d.mts +6 -6
- package/dist/NodeSubscriptions.mjs +7 -7
- package/dist/NodeSubscriptions.mjs.map +1 -1
- package/dist/{NodeWakeScheduler-4ZeXYwPu.d.mts → NodeWakeScheduler-CCgm1t-G.d.mts} +3 -3
- package/dist/NodeWakeScheduler.d.mts +1 -1
- package/dist/NodeWakeScheduler.mjs +3 -3
- package/dist/NodeWakeScheduler.mjs.map +1 -1
- package/dist/NodeWorkflow.d.mts +1 -1
- package/dist/NodeWorkflow.mjs +5 -5
- package/dist/NodeWorkflow.mjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/NodeDurableAgentRuntime.ts +29 -35
- package/src/NodeDurableHost.ts +12 -15
- package/src/NodeScheduling.ts +4 -8
- package/src/NodeSubscriptions.ts +8 -12
- package/src/NodeWakeScheduler.ts +3 -3
- package/src/NodeWorkflow.ts +8 -8
- package/src/internal/message-delivery.ts +2 -2
- package/src/internal/prepared-admission.ts +6 -6
- package/dist/NodeDurableHost-BMSajuQn.mjs.map +0 -1
|
@@ -1,59 +1,53 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
CurrentToolFailureObserver,
|
|
4
|
-
RunContextPreparationPassthrough,
|
|
5
|
-
RunToolAuthorization,
|
|
6
|
-
toolFailureObserverLayer,
|
|
7
|
-
type RunContextPreparation,
|
|
8
|
-
type RunCostEstimator,
|
|
9
|
-
type RunToolFailureObserver,
|
|
10
|
-
} from "@effect-agent/engine/RunOptions";
|
|
11
|
-
import { messageDeliveryStoreLayer } from "@effect-agent/storage-sqlite/SqliteMessageDeliveryStore";
|
|
12
|
-
import { scheduleStoreLayer } from "@effect-agent/storage-sqlite/SqliteScheduleStore";
|
|
1
|
+
import { messageDeliveryStoreLayer } from "@effect-agent/storage-sqlite/sqlite-message-delivery-store";
|
|
2
|
+
import { scheduleStoreLayer } from "@effect-agent/storage-sqlite/sqlite-schedule-store";
|
|
13
3
|
import {
|
|
14
4
|
SqliteStorageConfig,
|
|
15
5
|
SqliteStorageConfigValue,
|
|
16
|
-
} from "@effect-agent/storage-sqlite/
|
|
6
|
+
} from "@effect-agent/storage-sqlite/sqlite-storage-config";
|
|
17
7
|
import {
|
|
18
8
|
type SqliteStorageFailpoint,
|
|
19
9
|
type SqliteStorageFailpointHandler,
|
|
20
|
-
} from "@effect-agent/storage-sqlite/
|
|
21
|
-
import { submissionLedgerLayer } from "@effect-agent/storage-sqlite/
|
|
10
|
+
} from "@effect-agent/storage-sqlite/sqlite-storage-failpoint";
|
|
11
|
+
import { submissionLedgerLayer } from "@effect-agent/storage-sqlite/sqlite-submission-ledger";
|
|
22
12
|
import {
|
|
23
13
|
threadStoreLayer,
|
|
24
14
|
storageFailpointLayer,
|
|
25
15
|
type SqliteStorageInitializationError,
|
|
26
|
-
} from "@effect-agent/storage-sqlite/
|
|
27
|
-
import {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
} from "
|
|
31
|
-
import {
|
|
32
|
-
DurableAgentRuntime,
|
|
33
|
-
DurableRuntimeConfig,
|
|
34
|
-
} from "@effect-agent/thread/DurableAgentRuntime";
|
|
16
|
+
} from "@effect-agent/storage-sqlite/sqlite-thread-store";
|
|
17
|
+
import { NodeCrypto } from "@effect/platform-node";
|
|
18
|
+
import { SqliteClient } from "@effect/sql-sqlite-node";
|
|
19
|
+
import { Context, type Crypto, Duration, Effect, Layer, Ref, Schema } from "effect";
|
|
20
|
+
import { type AgentRegistration, type ResolvedBinding } from "effect-agent/agent-registration";
|
|
21
|
+
import { DurableAgentRuntime, DurableRuntimeConfig } from "effect-agent/durable-agent-runtime";
|
|
35
22
|
import {
|
|
36
23
|
DurableRuntimeFailpoint,
|
|
37
24
|
type DurableRuntimeFailpointHandler,
|
|
38
|
-
} from "
|
|
25
|
+
} from "effect-agent/durable-failpoint";
|
|
26
|
+
import { type SubmissionId } from "effect-agent/identifiers";
|
|
39
27
|
import {
|
|
40
28
|
type MessageDeliveryError,
|
|
41
29
|
type MessageDeliveryStore,
|
|
42
|
-
} from "
|
|
43
|
-
import { DeploymentId, ProducerId } from "
|
|
44
|
-
import {
|
|
30
|
+
} from "effect-agent/message-delivery";
|
|
31
|
+
import { DeploymentId, ProducerId } from "effect-agent/records";
|
|
32
|
+
import {
|
|
33
|
+
CurrentToolFailureObserver,
|
|
34
|
+
RunContextPreparationPassthrough,
|
|
35
|
+
RunToolAuthorization,
|
|
36
|
+
toolFailureObserverLayer,
|
|
37
|
+
type RunContextPreparation,
|
|
38
|
+
type RunCostEstimator,
|
|
39
|
+
type RunToolFailureObserver,
|
|
40
|
+
} from "effect-agent/run-options";
|
|
41
|
+
import { type ScheduleStore } from "effect-agent/schedule";
|
|
45
42
|
import {
|
|
46
43
|
DEFAULT_OWNERSHIP_LEASE_DURATION,
|
|
47
44
|
ReleaseOwnershipRequest,
|
|
48
45
|
SubmissionLedger,
|
|
49
46
|
type OwnershipToken,
|
|
50
|
-
} from "
|
|
51
|
-
import { type ThreadStore } from "
|
|
52
|
-
import { ToolReconciler } from "
|
|
53
|
-
import { type WakeScheduler } from "
|
|
54
|
-
import { NodeCrypto } from "@effect/platform-node";
|
|
55
|
-
import { SqliteClient } from "@effect/sql-sqlite-node";
|
|
56
|
-
import { Context, type Crypto, Duration, Effect, Layer, Ref, Schema } from "effect";
|
|
47
|
+
} from "effect-agent/submission-ledger";
|
|
48
|
+
import { type ThreadStore } from "effect-agent/thread-store";
|
|
49
|
+
import { ToolReconciler } from "effect-agent/tool-reconciler";
|
|
50
|
+
import { type WakeScheduler } from "effect-agent/wake-scheduler";
|
|
57
51
|
import type * as SqlClientService from "effect/unstable/sql/SqlClient";
|
|
58
52
|
|
|
59
53
|
import { NodeWakeSchedulerConfig, nodeWakeSchedulerLayer } from "./NodeWakeScheduler.ts";
|
package/src/NodeDurableHost.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NodeCrypto } from "@effect/platform-node";
|
|
2
|
+
import { type Stream, Context, Effect, Fiber, Layer, Ref, Schema } from "effect";
|
|
2
3
|
import {
|
|
3
4
|
type IntegrityReport,
|
|
4
5
|
type ObligationReport,
|
|
5
6
|
type ObligationThresholds,
|
|
6
7
|
type RecoveryExplanation,
|
|
7
8
|
type RetryCommand,
|
|
8
|
-
} from "
|
|
9
|
+
} from "effect-agent/admin";
|
|
9
10
|
import {
|
|
10
11
|
type AgentRegistration,
|
|
11
12
|
type ResolvedBinding,
|
|
12
13
|
type DurableBindingFailure,
|
|
13
|
-
} from "
|
|
14
|
+
} from "effect-agent/agent-registration";
|
|
14
15
|
import {
|
|
15
16
|
DurableAgentRuntime,
|
|
16
17
|
type DurableAbortFailure,
|
|
@@ -26,26 +27,22 @@ import {
|
|
|
26
27
|
type DurableWorkerFailure,
|
|
27
28
|
type Receipt,
|
|
28
29
|
type RecoveryReport,
|
|
29
|
-
} from "
|
|
30
|
+
} from "effect-agent/durable-agent-runtime";
|
|
31
|
+
import { type ThreadId, type SubmissionId } from "effect-agent/identifiers";
|
|
30
32
|
import {
|
|
31
33
|
type MessageDeliveryStore,
|
|
32
34
|
MessageDeliveryDriver,
|
|
33
35
|
type MessageDeliveryError,
|
|
34
|
-
} from "
|
|
35
|
-
import { type OperationDenied } from "
|
|
36
|
-
import { PreparedInputAdmission } from "
|
|
37
|
-
import { type CanonicalRecordEnvelope } from "
|
|
36
|
+
} from "effect-agent/message-delivery";
|
|
37
|
+
import { type OperationDenied } from "effect-agent/operation-authorizer";
|
|
38
|
+
import { PreparedInputAdmission } from "effect-agent/prepared-input-admission";
|
|
39
|
+
import { type CanonicalRecordEnvelope } from "effect-agent/records";
|
|
38
40
|
import {
|
|
39
41
|
type AbortCommand,
|
|
40
42
|
type AbortIntent,
|
|
41
43
|
type Settlement,
|
|
42
|
-
} from "
|
|
43
|
-
import {
|
|
44
|
-
type ThreadNotMaterialized,
|
|
45
|
-
type ThreadStoreError,
|
|
46
|
-
} from "@effect-agent/thread/ThreadStore";
|
|
47
|
-
import { NodeCrypto } from "@effect/platform-node";
|
|
48
|
-
import { type Stream, Context, Effect, Fiber, Layer, Ref, Schema } from "effect";
|
|
44
|
+
} from "effect-agent/submission-ledger";
|
|
45
|
+
import { type ThreadNotMaterialized, type ThreadStoreError } from "effect-agent/thread-store";
|
|
49
46
|
|
|
50
47
|
import { runNodeMessageDeliveries } from "./internal/message-delivery.ts";
|
|
51
48
|
import { makeNodePreparedInputAdmission, NodeAdmission } from "./internal/prepared-admission.ts";
|
package/src/NodeScheduling.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { NodeCrypto } from "@effect/platform-node";
|
|
2
|
+
import { Cause, Duration, Effect, Layer, Option, PubSub, Result } from "effect";
|
|
1
3
|
import {
|
|
2
4
|
type ScheduleAuthorizer,
|
|
3
5
|
type SchedulingLimits,
|
|
@@ -6,14 +8,8 @@ import {
|
|
|
6
8
|
type ScheduleValidationError,
|
|
7
9
|
ScheduleWake,
|
|
8
10
|
defaultSchedulingLimits,
|
|
9
|
-
} from "
|
|
10
|
-
import {
|
|
11
|
-
type ScheduleProcessFailure,
|
|
12
|
-
Scheduling,
|
|
13
|
-
ScheduleDriver,
|
|
14
|
-
} from "@effect-agent/thread/Scheduling";
|
|
15
|
-
import { NodeCrypto } from "@effect/platform-node";
|
|
16
|
-
import { Cause, Duration, Effect, Layer, Option, PubSub, Result } from "effect";
|
|
11
|
+
} from "effect-agent/schedule";
|
|
12
|
+
import { type ScheduleProcessFailure, Scheduling, ScheduleDriver } from "effect-agent/scheduling";
|
|
17
13
|
|
|
18
14
|
import type { NodeDurableHost } from "./NodeDurableHost.ts";
|
|
19
15
|
import { nodeScheduledInputAdmissionLayer } from "./NodeSubscriptions.ts";
|
package/src/NodeSubscriptions.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { type
|
|
1
|
+
import { NodeCrypto } from "@effect/platform-node";
|
|
2
|
+
import { Cause, Duration, Effect, Exit, Layer, Option } from "effect";
|
|
3
|
+
import { type EventSources } from "effect-agent/event-source";
|
|
4
|
+
import { PreparedInputAdmission } from "effect-agent/prepared-input-admission";
|
|
5
|
+
import { type ScheduledEnvelope, ScheduledInputAdmission } from "effect-agent/schedule";
|
|
4
6
|
import {
|
|
5
7
|
type PreparedInput,
|
|
6
8
|
type SubscriptionAuthorizer,
|
|
@@ -9,15 +11,9 @@ import {
|
|
|
9
11
|
type SubscriptionStoreFailure,
|
|
10
12
|
SubscriptionStore,
|
|
11
13
|
defaultSubscriptionLimits,
|
|
12
|
-
} from "
|
|
13
|
-
import { type SubscriptionInputBindings } from "
|
|
14
|
-
import {
|
|
15
|
-
SubscriptionDriver,
|
|
16
|
-
SubscriptionIntake,
|
|
17
|
-
Subscriptions,
|
|
18
|
-
} from "@effect-agent/thread/Subscriptions";
|
|
19
|
-
import { NodeCrypto } from "@effect/platform-node";
|
|
20
|
-
import { Cause, Duration, Effect, Exit, Layer, Option } from "effect";
|
|
14
|
+
} from "effect-agent/subscription";
|
|
15
|
+
import { type SubscriptionInputBindings } from "effect-agent/subscription-input";
|
|
16
|
+
import { SubscriptionDriver, SubscriptionIntake, Subscriptions } from "effect-agent/subscriptions";
|
|
21
17
|
|
|
22
18
|
import { makeNodePreparedInputAdmission, NodeAdmission } from "./internal/prepared-admission.ts";
|
|
23
19
|
import { NodeDurableHost } from "./NodeDurableHost.ts";
|
package/src/NodeWakeScheduler.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { type ThreadId } from "@effect-agent/core/Identifiers";
|
|
2
|
-
import { SubmissionLedger } from "@effect-agent/thread/SubmissionLedger";
|
|
3
|
-
import { makeWakeSubscriptionHub, WakeScheduler } from "@effect-agent/thread/WakeScheduler";
|
|
4
1
|
import type { Duration } from "effect";
|
|
5
2
|
import { Context, Effect, Layer, PubSub, Stream } from "effect";
|
|
3
|
+
import { type ThreadId } from "effect-agent/identifiers";
|
|
4
|
+
import { SubmissionLedger } from "effect-agent/submission-ledger";
|
|
5
|
+
import { makeWakeSubscriptionHub, WakeScheduler } from "effect-agent/wake-scheduler";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Bounded in-process wake buffer. Wake hints are droppable by contract (the ledger-scan fallback
|
package/src/NodeWorkflow.ts
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
WorkflowDispatchScan,
|
|
5
5
|
WorkflowDispatchStore,
|
|
6
6
|
WorkflowRepairTrigger,
|
|
7
|
-
} from "@effect-agent/workflow/
|
|
7
|
+
} from "@effect-agent/workflow/workflow-dispatch";
|
|
8
8
|
import { Cause, Duration, Effect, Layer, Option, Schema } from "effect";
|
|
9
9
|
import { SqlClient } from "effect/unstable/sql";
|
|
10
10
|
|
|
@@ -78,7 +78,7 @@ export class SqlWorkflowDispatchStore {
|
|
|
78
78
|
|
|
79
79
|
const put = Effect.fn("SqlWorkflowDispatchStore.put")(
|
|
80
80
|
function* (input: WorkflowDispatchIntent) {
|
|
81
|
-
const intent = yield* Schema.
|
|
81
|
+
const intent = yield* Schema.decodeEffect(WorkflowDispatchIntent)(input);
|
|
82
82
|
const encoded = yield* encodeIntent(intent);
|
|
83
83
|
|
|
84
84
|
yield* sql`
|
|
@@ -148,7 +148,7 @@ export class SqlWorkflowDispatchStore {
|
|
|
148
148
|
|
|
149
149
|
const scan = Effect.fn("SqlWorkflowDispatchStore.scan")(
|
|
150
150
|
function* (input: WorkflowDispatchScan) {
|
|
151
|
-
const request = yield* Schema.
|
|
151
|
+
const request = yield* Schema.decodeEffect(WorkflowDispatchScan)(input);
|
|
152
152
|
|
|
153
153
|
const rows = yield* sql`
|
|
154
154
|
SELECT deployment_id, workflow_name, execution_id, intent_json
|
|
@@ -167,7 +167,7 @@ export class SqlWorkflowDispatchStore {
|
|
|
167
167
|
|
|
168
168
|
const remove = Effect.fn("SqlWorkflowDispatchStore.remove")(
|
|
169
169
|
function* (input: WorkflowDispatchIntent) {
|
|
170
|
-
const intent = yield* Schema.
|
|
170
|
+
const intent = yield* Schema.decodeEffect(WorkflowDispatchIntent)(input);
|
|
171
171
|
|
|
172
172
|
const rows = yield* sql`
|
|
173
173
|
SELECT deployment_id, workflow_name, execution_id, intent_json
|
|
@@ -236,10 +236,10 @@ export class NodeWorkflowRepairTrigger {
|
|
|
236
236
|
return WorkflowRepairTrigger.of({
|
|
237
237
|
register: Effect.fn("NodeWorkflowRepairTrigger.register")(function* (repair) {
|
|
238
238
|
const attempt = repair.pipe(
|
|
239
|
-
Effect.
|
|
240
|
-
Cause.hasInterruptsOnly(cause)
|
|
241
|
-
|
|
242
|
-
|
|
239
|
+
Effect.catchCauseIf(
|
|
240
|
+
(cause) => !Cause.hasInterruptsOnly(cause),
|
|
241
|
+
(cause) =>
|
|
242
|
+
Effect.logError("Workflow repair trigger failed; next poll will retry", cause),
|
|
243
243
|
),
|
|
244
244
|
);
|
|
245
245
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { Cause, Clock, Effect, Exit, Option } from "effect";
|
|
1
2
|
import {
|
|
2
3
|
MessageDeliveryDriver,
|
|
3
4
|
type MessageDeliveryFailure,
|
|
4
5
|
MessageDeliveryStore,
|
|
5
|
-
} from "
|
|
6
|
-
import { Cause, Clock, Effect, Exit, Option } from "effect";
|
|
6
|
+
} from "effect-agent/message-delivery";
|
|
7
7
|
|
|
8
8
|
const reportFailure = (cause: Cause.Cause<MessageDeliveryFailure>): Effect.Effect<void> =>
|
|
9
9
|
Cause.hasInterruptsOnly(cause)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type DurableSubmitAgent } from "
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { Context, Effect } from "effect";
|
|
2
|
+
import { type DurableSubmitAgent } from "effect-agent/durable-agent-runtime";
|
|
3
|
+
import { type AgentId } from "effect-agent/identifiers";
|
|
4
|
+
import { PreparedInputAdmission } from "effect-agent/prepared-input-admission";
|
|
5
|
+
import { PersistedJson } from "effect-agent/records";
|
|
5
6
|
import {
|
|
6
7
|
ScheduledInputRetryable,
|
|
7
8
|
ScheduledInputRefused,
|
|
8
9
|
ScheduleStorageError,
|
|
9
|
-
} from "
|
|
10
|
-
import { Context, Effect } from "effect";
|
|
10
|
+
} from "effect-agent/schedule";
|
|
11
11
|
|
|
12
12
|
import { type NodeDurableHost } from "../NodeDurableHost.ts";
|
|
13
13
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NodeDurableHost-BMSajuQn.mjs","names":[],"sources":["../src/internal/message-delivery.ts","../src/internal/prepared-admission.ts","../src/NodeDurableHost.ts"],"sourcesContent":["import {\n MessageDeliveryDriver,\n type MessageDeliveryFailure,\n MessageDeliveryStore,\n} from \"@effect-agent/thread/MessageDelivery\";\nimport { Cause, Clock, Effect, Exit, Option } from \"effect\";\n\nconst reportFailure = (cause: Cause.Cause<MessageDeliveryFailure>): Effect.Effect<void> =>\n Cause.hasInterruptsOnly(cause)\n ? Effect.interrupt\n : Effect.logWarning(\"Node message delivery pass failed\").pipe(\n Effect.annotateLogs({\n failureTag: Option.match(Cause.findErrorOption(cause), {\n onNone: () => \"Defect\",\n onSome: (failure) => failure._tag,\n }),\n }),\n );\n\n/** Caller-owned loop. Indexed scans repair absent hints even when both Threads have settled. */\nexport const runNodeMessageDeliveries = Effect.fn(\"NodeMessageDelivery.run\")(function* (\n scanInterval: number,\n) {\n const driver = yield* MessageDeliveryDriver;\n const store = yield* MessageDeliveryStore;\n\n while (true) {\n const pass = yield* driver.runDue().pipe(Effect.exit);\n\n if (Exit.isFailure(pass)) {\n yield* reportFailure(pass.cause);\n yield* Effect.sleep(scanInterval);\n continue;\n }\n\n const deadline = yield* store.nextDeadline().pipe(Effect.exit);\n\n if (Exit.isFailure(deadline)) {\n yield* reportFailure(deadline.cause);\n yield* Effect.sleep(scanInterval);\n continue;\n }\n\n const nowMillis = yield* Clock.currentTimeMillis;\n\n const delay =\n deadline.value === null\n ? scanInterval\n : Math.max(1, Math.min(deadline.value - nowMillis, scanInterval));\n\n yield* Effect.sleep(delay);\n }\n});\n","import { type AgentId } from \"@effect-agent/core/Identifiers\";\nimport { type DurableSubmitAgent } from \"@effect-agent/thread/DurableAgentRuntime\";\nimport { PreparedInputAdmission } from \"@effect-agent/thread/PreparedInputAdmission\";\nimport { PersistedJson } from \"@effect-agent/thread/Records\";\nimport {\n ScheduledInputRetryable,\n ScheduledInputRefused,\n ScheduleStorageError,\n} from \"@effect-agent/thread/Schedule\";\nimport { Context, Effect } from \"effect\";\n\nimport { type NodeDurableHost } from \"../NodeDurableHost.ts\";\n\nconst passthroughSubmitAgent = (agentId: AgentId): DurableSubmitAgent<typeof PersistedJson> => ({\n definition: { id: agentId, input: PersistedJson },\n});\n\nconst ambiguous = (): ScheduledInputRetryable =>\n ScheduledInputRetryable.make({ reason: \"ambiguous\" });\n\nconst corrupt = (operation: string): ScheduleStorageError =>\n ScheduleStorageError.make({ operation, reason: \"corrupt\" });\n\n/** Host-owned admission gate, available while the host's worker pool is being assembled. */\nexport class NodeAdmission extends Context.Service<\n NodeAdmission,\n Pick<NodeDurableHost[\"Service\"], \"submit\" | \"submissionStatus\">\n>()(\"@effect-agent/platform-node/internal/NodeAdmission\") {}\n\n/** Acquire the gated source once; worker callers cannot replace its admission authority. */\nexport const makeNodePreparedInputAdmission = Effect.gen(function* () {\n const host = yield* NodeAdmission;\n\n return PreparedInputAdmission.of({\n submissionStatus: (receipt) =>\n host\n .submissionStatus(receipt)\n .pipe(Effect.mapError(() => ScheduledInputRetryable.make({ reason: \"storage\" }))),\n submit: (envelope) =>\n host\n .submit(passthroughSubmitAgent(envelope.agentId), envelope.input, {\n threadId: envelope.threadId,\n principal: envelope.deliveryPrincipal,\n idempotencyKey: envelope.admissionKey,\n ...(envelope.admissionGroup === undefined\n ? {}\n : { admissionGroup: envelope.admissionGroup }),\n ...(envelope.admissionFence === undefined\n ? {}\n : { admissionFence: envelope.admissionFence }),\n ...(envelope.workerAdmission === undefined\n ? {}\n : { workerAdmission: envelope.workerAdmission }),\n ...(envelope.messageAdmission === undefined\n ? {}\n : { messageAdmission: envelope.messageAdmission }),\n definitions: envelope.definitions,\n })\n .pipe(\n Effect.catchTags({\n AdmissionClosed: () =>\n Effect.fail(ScheduledInputRetryable.make({ reason: \"host-closed\" })),\n AgentInputError: () => Effect.fail(corrupt(\"prepared admission input\")),\n AdmissionConflict: () => Effect.fail(corrupt(\"prepared admission conflict\")),\n DigestError: () => Effect.fail(ambiguous()),\n AdmissionPolicyError: (error) =>\n error.reason === \"refused\"\n ? ScheduledInputRefused.make({ code: error.code })\n : ScheduledInputRetryable.make({\n reason: error.reason === \"occupied\" ? \"capacity\" : \"storage\",\n }),\n LedgerError: () => ScheduledInputRetryable.make({ reason: \"storage\" }),\n ThreadStoreError: () => Effect.fail(ambiguous()),\n ThreadNotMaterialized: () => Effect.fail(ambiguous()),\n AppendConflict: () => Effect.fail(ambiguous()),\n FenceRejected: () => Effect.fail(ambiguous()),\n DurableRuntimeFailpointError: () => Effect.fail(ambiguous()),\n }),\n ),\n });\n});\n","import { type ThreadId, type SubmissionId } from \"@effect-agent/core/Identifiers\";\nimport {\n type IntegrityReport,\n type ObligationReport,\n type ObligationThresholds,\n type RecoveryExplanation,\n type RetryCommand,\n} from \"@effect-agent/thread/Admin\";\nimport {\n type AgentRegistration,\n type ResolvedBinding,\n type DurableBindingFailure,\n} from \"@effect-agent/thread/AgentRegistration\";\nimport {\n DurableAgentRuntime,\n type DurableAbortFailure,\n type DurableAwaitFailure,\n type DurableExplainFailure,\n type DurableObserveOptions,\n type DurableObligationFailure,\n type DurableRetryFailure,\n type DurableSubmitAgent,\n type DurableSubmitFailure,\n type DurableSubmitOptions,\n type DurableVerifyFailure,\n type DurableWorkerFailure,\n type Receipt,\n type RecoveryReport,\n} from \"@effect-agent/thread/DurableAgentRuntime\";\nimport {\n type MessageDeliveryStore,\n MessageDeliveryDriver,\n type MessageDeliveryError,\n} from \"@effect-agent/thread/MessageDelivery\";\nimport { type OperationDenied } from \"@effect-agent/thread/OperationAuthorizer\";\nimport { PreparedInputAdmission } from \"@effect-agent/thread/PreparedInputAdmission\";\nimport { type CanonicalRecordEnvelope } from \"@effect-agent/thread/Records\";\nimport {\n type AbortCommand,\n type AbortIntent,\n type Settlement,\n} from \"@effect-agent/thread/SubmissionLedger\";\nimport {\n type ThreadNotMaterialized,\n type ThreadStoreError,\n} from \"@effect-agent/thread/ThreadStore\";\nimport { NodeCrypto } from \"@effect/platform-node\";\nimport { type Stream, Context, Effect, Fiber, Layer, Ref, Schema } from \"effect\";\n\nimport { runNodeMessageDeliveries } from \"./internal/message-delivery.ts\";\nimport { makeNodePreparedInputAdmission, NodeAdmission } from \"./internal/prepared-admission.ts\";\nimport {\n NodeDurableAgentRuntime,\n NodeDurableAgentRuntimeConfig,\n type NodeDurableAgentRuntimeOptions,\n} from \"./NodeDurableAgentRuntime.ts\";\n\n/**\n * Admission is not open on this host: it is shutting down (deployment §6 step 1, DEPLOY-005).\n * Accepted work is unaffected — only NEW admissions are refused.\n */\nexport class AdmissionClosed extends Schema.TaggedError<AdmissionClosed>()(\"AdmissionClosed\", {\n message: Schema.String,\n}) {}\n\nconst makeHost = Effect.fn(\"NodeDurableHost.make\")(function* (startWorkers: boolean) {\n const runtime = yield* DurableAgentRuntime;\n const config = yield* NodeDurableAgentRuntimeConfig;\n\n // Startup gate (deployment §5, plan §host): configuration decoding and storage compatibility\n // already gated this Layer's dependencies; the last gate before admission opens is recovering\n // EVERY nonterminal Submission. Work needing a live Agent Binding is reported `deferred` and\n // stays a visible obligation for `runWorkers`; lanes durably blocked on an Unknown Outcome are\n // reported `unknown` and wait for the authorized `resolveUnknown` path (DUR-017) — they consume\n // no worker permit while the settlement obligation stays owed.\n const startupRecovery = yield* runtime.runRecovery;\n\n const admission = yield* Ref.make(true);\n\n const requireAdmission: Effect.Effect<void, AdmissionClosed> = Ref.get(admission).pipe(\n Effect.flatMap((open) =>\n open\n ? Effect.void\n : Effect.fail(\n AdmissionClosed.make({ message: \"The host is shutting down; admission is closed.\" }),\n ),\n ),\n );\n\n const submit = <InputSchema extends Schema.Top>(\n agent: DurableSubmitAgent<InputSchema>,\n input: InputSchema[\"Type\"],\n options: DurableSubmitOptions,\n ): Effect.Effect<\n Receipt,\n AdmissionClosed | DurableSubmitFailure,\n InputSchema[\"EncodingServices\"]\n > => requireAdmission.pipe(Effect.andThen(runtime.submit(agent, input, options)));\n\n const deliveryServices = yield* Effect.context<MessageDeliveryStore>();\n\n const deliveryContext = yield* Layer.build(\n MessageDeliveryDriver.layer({\n batchSize: 100,\n concurrency: Math.min(config.workerConcurrency, 32),\n }).pipe(\n Layer.provide(NodeCrypto.layer),\n Layer.provide(\n Layer.effect(PreparedInputAdmission, makeNodePreparedInputAdmission).pipe(\n Layer.provide(\n Layer.succeed(NodeAdmission, { submit, submissionStatus: runtime.submissionStatus }),\n ),\n ),\n ),\n ),\n );\n\n const runDeliveries = runNodeMessageDeliveries(config.wakeScanInterval).pipe(\n Effect.provide(Context.merge(deliveryServices, deliveryContext)),\n );\n\n const runWorkers = <A, E, R>(worker: Effect.Effect<A, E, R>): Effect.Effect<void, E, R> =>\n Effect.scoped(\n // Either side exiting stops and joins the other; delivery interruption cannot leave\n // an apparently healthy worker pool running without message recovery.\n Effect.raceFirst(\n Effect.forEach(\n Array.from({ length: config.workerConcurrency }, (_, index) => index),\n () => worker,\n { concurrency: \"unbounded\", discard: true },\n ),\n runDeliveries,\n ),\n );\n\n // S2 multi-binding pool: every claimed head resolves its exact registered Binding through\n // the host's exact registrations, so one bounded\n // pool serves parent and child lanes — the spec §12 smallest-pool suspension/wakeup proof\n // runs `workerConcurrency: 1` over exactly this loop.\n const runResolvedWorkers = runWorkers(runtime.runResolvedWorker);\n\n const run = startWorkers\n ? Fiber.join(\n yield* runResolvedWorkers.pipe(\n Effect.onExit(() => Ref.set(admission, false)),\n Effect.forkScoped,\n ),\n )\n : runResolvedWorkers;\n\n // Register after the worker fiber: close admission, interrupt/join workers, drain\n // runtime ownership, then close storage and captured application services.\n yield* Effect.addFinalizer(() => Ref.set(admission, false));\n\n return NodeDurableHost.of({\n startupRecovery,\n admissionOpen: Ref.get(admission),\n submit,\n awaitSettlement: runtime.awaitSettlement,\n submissionStatus: runtime.submissionStatus,\n observe: runtime.observe,\n abort: runtime.abort,\n explain: runtime.explain,\n explainThread: runtime.explainThread,\n verify: runtime.verify,\n retry: runtime.retry,\n wake: runtime.wake,\n scanObligations: runtime.scanObligations,\n runWorkers,\n run,\n runResolvedWorkers: run,\n });\n});\n\n/**\n * Operational host service. Prefer the module's `layer` and `run` for managed workers.\n * The static constructors on this class retain explicit, manual worker ownership.\n *\n * Startup gates run during Layer construction, so the service existing implies readiness:\n * configuration was schema-decoded, the SQLite file passed the exact-version compatibility check,\n * and every nonterminal Submission went through one full recovery pass BEFORE admission opened.\n * `startupRecovery` is the auditable evidence of that reconciliation pass.\n *\n * Shutdown runs in reverse Layer order when the owning Scope closes: `submit` starts refusing\n * with `AdmissionClosed` first, then the runtime Layer's ownership drain releases every claim\n * still held so another host can take over the lanes immediately, then the SQLite resources\n * close. Forced termination at any point stays safe — the durability protocol, not graceful\n * shutdown, provides correctness (DEPLOY-006).\n */\nexport class NodeDurableHost extends Context.Service<\n NodeDurableHost,\n {\n /**\n * The recovery decisions executed (or deferred) by this host's startup reconciliation.\n * Reports with the `unknown` disposition identify lanes blocked on Unknown Outcomes that\n * only the authorized DUR-017 resolution path can release.\n */\n readonly startupRecovery: ReadonlyArray<RecoveryReport>;\n /** Admission-role readiness (deployment §7): true until shutdown begins. */\n readonly admissionOpen: Effect.Effect<boolean>;\n /** Observe the managed worker pool, preserving its failure. Manual hosts start their pool here. */\n readonly run: Effect.Effect<void, DurableWorkerFailure | DurableBindingFailure>;\n /** `DurableAgentRuntime.submit` behind the host admission gate. */\n readonly submit: <InputSchema extends Schema.Top>(\n agent: DurableSubmitAgent<InputSchema>,\n input: InputSchema[\"Type\"],\n options: DurableSubmitOptions,\n ) => Effect.Effect<\n Receipt,\n AdmissionClosed | DurableSubmitFailure,\n InputSchema[\"EncodingServices\"]\n >;\n readonly submissionStatus: DurableAgentRuntime[\"Service\"][\"submissionStatus\"];\n readonly awaitSettlement: (receipt: Receipt) => Effect.Effect<Settlement, DurableAwaitFailure>;\n readonly observe: (\n receipt: Receipt,\n options?: DurableObserveOptions,\n ) => Stream.Stream<\n CanonicalRecordEnvelope,\n ThreadStoreError | ThreadNotMaterialized | OperationDenied\n >;\n readonly abort: (command: AbortCommand) => Effect.Effect<AbortIntent, DurableAbortFailure>;\n /** `DurableAgentRuntime.explain` — read-only recovery explanation of one Submission (P7). */\n readonly explain: (\n submissionId: SubmissionId,\n ) => Effect.Effect<RecoveryExplanation, DurableExplainFailure>;\n /** `DurableAgentRuntime.explainThread` — explain every nonterminal lane member. */\n readonly explainThread: (\n threadId: ThreadId,\n ) => Effect.Effect<ReadonlyArray<RecoveryExplanation>, DurableExplainFailure>;\n /** `DurableAgentRuntime.verify` — read-only integrity checks, never a repair (P7). */\n readonly verify: (threadId: ThreadId) => Effect.Effect<IntegrityReport, DurableVerifyFailure>;\n /** `DurableAgentRuntime.retry` — audited single-Submission re-drive with typed refusals. */\n readonly retry: (command: RetryCommand) => Effect.Effect<RecoveryReport, DurableRetryFailure>;\n /** `DurableAgentRuntime.wake` — the documented operator liveness nudge for one lane. */\n readonly wake: (threadId: ThreadId) => Effect.Effect<void, OperationDenied>;\n /** `DurableAgentRuntime.scanObligations` — the scan-based DUR-017/OPS-001 report. */\n readonly scanObligations: (\n thresholds: ObligationThresholds,\n ) => Effect.Effect<ObligationReport, DurableObligationFailure>;\n /**\n * Run `workerConcurrency` copies of the given worker effect (typically\n * `DurableAgentRuntime.runWorker(agent)`) until the caller's Scope interrupts them. The\n * same Scope drives pending message admission and settlement observation independently\n * of Submission liveness. The host never forks daemon fibers.\n */\n readonly runWorkers: <A, E, R>(worker: Effect.Effect<A, E, R>) => Effect.Effect<void, E, R>;\n /**\n * Run `workerConcurrency` copies of `DurableAgentRuntime.runResolvedWorker` over the host's\n * registered Bindings (S2): every claimed head resolves its exact stored Binding before any\n * code runs (SUB-023), so one bounded pool serves parent and attached-child lanes.\n * Hosts built with the module-level `layer` instead join their existing pool.\n */\n readonly runResolvedWorkers: Effect.Effect<void, DurableWorkerFailure | DurableBindingFailure>;\n }\n>()(\"@effect-agent/platform-node/NodeDurableHost\") {\n /**\n * Compile typed registrations and acquire the complete host in one Layer Scope.\n * Node supplies Crypto; model, tool, instruction, and schema services remain required.\n * Startup recovery and shutdown gates are unchanged. Workers start only when the caller\n * runs runResolvedWorkers; this constructor never starts a background worker.\n */\n static layerRegistered<\n const Entries extends ReadonlyArray<AgentRegistration>,\n ContextError = never,\n ContextRequirements = never,\n AuthorizationError = never,\n AuthorizationRequirements = never,\n ReconcilerError = never,\n ReconcilerRequirements = never,\n >(\n registrations: Entries,\n options: NodeDurableAgentRuntimeOptions<\n ContextError,\n ContextRequirements,\n AuthorizationError,\n AuthorizationRequirements,\n ReconcilerError,\n ReconcilerRequirements\n >,\n ) {\n return NodeDurableHost.layer.pipe(\n Layer.provideMerge(NodeDurableAgentRuntime.layerRegistered(registrations, options)),\n );\n }\n\n /**\n * Host gates over an assembled `NodeDurableAgentRuntime` stack. The runtime Layer owns\n * executable registrations; omission registers no Agents, so resolved work fails closed.\n */\n static readonly layer: Layer.Layer<\n NodeDurableHost,\n DurableWorkerFailure | MessageDeliveryError,\n DurableAgentRuntime | NodeDurableAgentRuntimeConfig | MessageDeliveryStore\n > = Layer.effect(NodeDurableHost)(makeHost(false));\n\n /** The complete DN host: `NodeDurableAgentRuntime.layer(options)` plus the host lifecycle gates. */\n static layerStack<\n ContextError = never,\n ContextRequirements = never,\n AuthorizationError = never,\n AuthorizationRequirements = never,\n ReconcilerError = never,\n ReconcilerRequirements = never,\n >(\n options: NodeDurableAgentRuntimeOptions<\n ContextError,\n ContextRequirements,\n AuthorizationError,\n AuthorizationRequirements,\n ReconcilerError,\n ReconcilerRequirements\n > & { readonly bindings?: ReadonlyArray<ResolvedBinding> },\n ) {\n const { bindings = [], ...runtimeOptions } = options;\n\n return NodeDurableHost.layer.pipe(\n Layer.provideMerge(NodeDurableAgentRuntime.layerWithBindings(bindings, runtimeOptions)),\n );\n }\n}\n\n/**\n * Acquire a complete Node host and start one bounded, scoped worker pool after recovery.\n * Provide model, tool, instruction, and schema dependencies to this Layer. Reusing the Layer\n * shares the same pool. A worker failure closes admission; observe it with `run` at the process\n * boundary so the application exits and releases the host instead of remaining idle.\n */\nexport const layer = <\n const Entries extends ReadonlyArray<AgentRegistration>,\n ContextError = never,\n ContextRequirements = never,\n AuthorizationError = never,\n AuthorizationRequirements = never,\n ReconcilerError = never,\n ReconcilerRequirements = never,\n>(\n registrations: Entries,\n options: NodeDurableAgentRuntimeOptions<\n ContextError,\n ContextRequirements,\n AuthorizationError,\n AuthorizationRequirements,\n ReconcilerError,\n ReconcilerRequirements\n >,\n) =>\n Layer.effect(NodeDurableHost)(makeHost(true)).pipe(\n Layer.provideMerge(NodeDurableAgentRuntime.layerRegistered(registrations, options)),\n );\n\n/**\n * Supervise the host's existing workers without starting another pool. Use with\n * `Effect.provide(HostLive)` and `NodeRuntime.runMain`; race it with a server Effect when\n * the same process also serves requests. Unlike `Layer.launch`, this observes worker failures.\n */\nexport const run = Effect.gen(function* () {\n const host = yield* NodeDurableHost;\n\n return yield* host.run;\n});\n"],"mappings":";;;;;;;;;;;;;;;;AAOA,MAAM,iBAAiB,UACrB,MAAM,kBAAkB,KAAK,IACzB,OAAO,YACP,OAAO,WAAW,mCAAmC,CAAC,CAAC,KACrD,OAAO,aAAa,EAClB,YAAY,OAAO,MAAM,MAAM,gBAAgB,KAAK,GAAG;CACrD,cAAc;CACd,SAAS,YAAY,QAAQ;AAC/B,CAAC,EACH,CAAC,CACH;;AAGN,MAAa,2BAA2B,OAAO,GAAG,yBAAyB,CAAC,CAAC,WAC3E,cACA;CACA,MAAM,SAAS,OAAO;CACtB,MAAM,QAAQ,OAAO;CAErB,OAAO,MAAM;EACX,MAAM,OAAO,OAAO,OAAO,OAAO,CAAC,CAAC,KAAK,OAAO,IAAI;EAEpD,IAAI,KAAK,UAAU,IAAI,GAAG;GACxB,OAAO,cAAc,KAAK,KAAK;GAC/B,OAAO,OAAO,MAAM,YAAY;GAChC;EACF;EAEA,MAAM,WAAW,OAAO,MAAM,aAAa,CAAC,CAAC,KAAK,OAAO,IAAI;EAE7D,IAAI,KAAK,UAAU,QAAQ,GAAG;GAC5B,OAAO,cAAc,SAAS,KAAK;GACnC,OAAO,OAAO,MAAM,YAAY;GAChC;EACF;EAEA,MAAM,YAAY,OAAO,MAAM;EAE/B,MAAM,QACJ,SAAS,UAAU,OACf,eACA,KAAK,IAAI,GAAG,KAAK,IAAI,SAAS,QAAQ,WAAW,YAAY,CAAC;EAEpE,OAAO,OAAO,MAAM,KAAK;CAC3B;AACF,CAAC;;;ACvCD,MAAM,0BAA0B,aAAgE,EAC9F,YAAY;CAAE,IAAI;CAAS,OAAO;AAAc,EAClD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