@proofoftech/flowsafe 0.19.0 → 0.21.0
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/CHANGELOG.md +106 -0
- package/README.md +68 -6
- package/deployment-identity-protocol.d.mts +70 -1
- package/deployment-identity-protocol.mjs +423 -5
- package/dist/agent-host/index.d.ts +1 -1
- package/dist/agent-host/index.d.ts.map +1 -1
- package/dist/agent-host/index.js.map +1 -1
- package/dist/agent-host/router.d.ts.map +1 -1
- package/dist/agent-host/router.js +17 -4
- package/dist/agent-host/router.js.map +1 -1
- package/dist/agent-host/thread-host.d.ts +14 -1
- package/dist/agent-host/thread-host.d.ts.map +1 -1
- package/dist/agent-host/thread-host.js +865 -308
- package/dist/agent-host/thread-host.js.map +1 -1
- package/dist/agent-host/thread-topology.d.ts +43 -1
- package/dist/agent-host/thread-topology.d.ts.map +1 -1
- package/dist/agent-host/thread-topology.js +301 -28
- package/dist/agent-host/thread-topology.js.map +1 -1
- package/dist/agent-runner/durable-agent-runner.d.ts +107 -8
- package/dist/agent-runner/durable-agent-runner.d.ts.map +1 -1
- package/dist/agent-runner/durable-agent-runner.js +427 -55
- package/dist/agent-runner/durable-agent-runner.js.map +1 -1
- package/dist/agent-runner/index.d.ts +1 -1
- package/dist/agent-runner/index.d.ts.map +1 -1
- package/dist/agent-runner/index.js.map +1 -1
- package/dist/approval-api/actor-context.d.ts +4 -0
- package/dist/approval-api/actor-context.d.ts.map +1 -1
- package/dist/approval-api/actor-context.js +53 -5
- package/dist/approval-api/actor-context.js.map +1 -1
- package/dist/approval-api/d1-store.d.ts.map +1 -1
- package/dist/approval-api/d1-store.js +6 -3
- package/dist/approval-api/d1-store.js.map +1 -1
- package/dist/approval-api/principal-identity.d.ts +32 -0
- package/dist/approval-api/principal-identity.d.ts.map +1 -0
- package/dist/approval-api/principal-identity.js +69 -0
- package/dist/approval-api/principal-identity.js.map +1 -0
- package/dist/approval-api/principal.d.ts +10 -13
- package/dist/approval-api/principal.d.ts.map +1 -1
- package/dist/approval-api/principal.js +10 -46
- package/dist/approval-api/principal.js.map +1 -1
- package/dist/approval-api/retention.d.ts +1 -2
- package/dist/approval-api/retention.d.ts.map +1 -1
- package/dist/approval-api/retention.js.map +1 -1
- package/dist/approval-api/router.d.ts.map +1 -1
- package/dist/approval-api/router.js +9 -1
- package/dist/approval-api/router.js.map +1 -1
- package/dist/approval-api/service.d.ts +29 -14
- package/dist/approval-api/service.d.ts.map +1 -1
- package/dist/approval-api/service.js +83 -25
- package/dist/approval-api/service.js.map +1 -1
- package/dist/approval-api/types.d.ts +12 -0
- package/dist/approval-api/types.d.ts.map +1 -1
- package/dist/approval-api/types.js +12 -0
- package/dist/approval-api/types.js.map +1 -1
- package/dist/audit-export/index.d.ts +2 -2
- package/dist/audit-export/index.js +2 -2
- package/dist/background-tasks/d1-storage.d.ts +4 -3
- package/dist/background-tasks/d1-storage.d.ts.map +1 -1
- package/dist/background-tasks/d1-storage.js +7 -13
- package/dist/background-tasks/d1-storage.js.map +1 -1
- package/dist/background-tasks/host.d.ts +127 -14
- package/dist/background-tasks/host.d.ts.map +1 -1
- package/dist/background-tasks/host.js +579 -50
- package/dist/background-tasks/host.js.map +1 -1
- package/dist/background-tasks/index.d.ts +2 -2
- package/dist/background-tasks/index.d.ts.map +1 -1
- package/dist/background-tasks/index.js +11 -6
- package/dist/background-tasks/index.js.map +1 -1
- package/dist/background-tasks/routes.d.ts +19 -2
- package/dist/background-tasks/routes.d.ts.map +1 -1
- package/dist/background-tasks/routes.js +4 -4
- package/dist/background-tasks/routes.js.map +1 -1
- package/dist/deployment-identity-protocol.d.ts +2 -2
- package/dist/deployment-identity-protocol.d.ts.map +1 -1
- package/dist/deployment-identity-protocol.js +1 -1
- package/dist/deployment-identity-protocol.js.map +1 -1
- package/dist/do-runner/cause-chain.d.ts +53 -0
- package/dist/do-runner/cause-chain.d.ts.map +1 -0
- package/dist/do-runner/cause-chain.js +96 -0
- package/dist/do-runner/cause-chain.js.map +1 -0
- package/dist/do-runner/constants.d.ts +3 -0
- package/dist/do-runner/constants.d.ts.map +1 -0
- package/dist/do-runner/constants.js +3 -0
- package/dist/do-runner/constants.js.map +1 -0
- package/dist/do-runner/d1-storage.d.ts +47 -69
- package/dist/do-runner/d1-storage.d.ts.map +1 -1
- package/dist/do-runner/d1-storage.js +972 -196
- package/dist/do-runner/d1-storage.js.map +1 -1
- package/dist/do-runner/deployment-identity.d.ts +29 -5
- package/dist/do-runner/deployment-identity.d.ts.map +1 -1
- package/dist/do-runner/deployment-identity.js +23 -6
- package/dist/do-runner/deployment-identity.js.map +1 -1
- package/dist/do-runner/do-error-response.d.ts +4 -23
- package/dist/do-runner/do-error-response.d.ts.map +1 -1
- package/dist/do-runner/do-error-response.js +19 -24
- package/dist/do-runner/do-error-response.js.map +1 -1
- package/dist/do-runner/do-status-error.d.ts +37 -0
- package/dist/do-runner/do-status-error.d.ts.map +1 -0
- package/dist/do-runner/do-status-error.js +42 -0
- package/dist/do-runner/do-status-error.js.map +1 -0
- package/dist/do-runner/durable-object.d.ts +2 -1
- package/dist/do-runner/durable-object.d.ts.map +1 -1
- package/dist/do-runner/durable-object.js +617 -144
- package/dist/do-runner/durable-object.js.map +1 -1
- package/dist/do-runner/execution-admission.d.ts +114 -0
- package/dist/do-runner/execution-admission.d.ts.map +1 -0
- package/dist/do-runner/execution-admission.js +206 -0
- package/dist/do-runner/execution-admission.js.map +1 -0
- package/dist/do-runner/execution-context.d.ts.map +1 -1
- package/dist/do-runner/execution-context.js +1 -0
- package/dist/do-runner/execution-context.js.map +1 -1
- package/dist/do-runner/execution-fence.d.ts +379 -0
- package/dist/do-runner/execution-fence.d.ts.map +1 -0
- package/dist/do-runner/execution-fence.js +1098 -0
- package/dist/do-runner/execution-fence.js.map +1 -0
- package/dist/do-runner/fenced-workflow-capability.d.ts +64 -0
- package/dist/do-runner/fenced-workflow-capability.d.ts.map +1 -0
- package/dist/do-runner/fenced-workflow-capability.js +3 -0
- package/dist/do-runner/fenced-workflow-capability.js.map +1 -0
- package/dist/do-runner/fenced-workflows-d1.d.ts +15 -0
- package/dist/do-runner/fenced-workflows-d1.d.ts.map +1 -0
- package/dist/do-runner/fenced-workflows-d1.js +894 -0
- package/dist/do-runner/fenced-workflows-d1.js.map +1 -0
- package/dist/do-runner/index.d.ts +20 -8
- package/dist/do-runner/index.d.ts.map +1 -1
- package/dist/do-runner/index.js +21 -4
- package/dist/do-runner/index.js.map +1 -1
- package/dist/do-runner/init.d.ts +82 -1
- package/dist/do-runner/init.d.ts.map +1 -1
- package/dist/do-runner/init.js +58 -3
- package/dist/do-runner/init.js.map +1 -1
- package/dist/do-runner/initial-admission-refusal.d.ts +7 -0
- package/dist/do-runner/initial-admission-refusal.d.ts.map +1 -0
- package/dist/do-runner/initial-admission-refusal.js +41 -0
- package/dist/do-runner/initial-admission-refusal.js.map +1 -0
- package/dist/do-runner/inventory.d.ts +295 -0
- package/dist/do-runner/inventory.d.ts.map +1 -0
- package/dist/do-runner/inventory.js +800 -0
- package/dist/do-runner/inventory.js.map +1 -0
- package/dist/do-runner/notification-predicate.d.ts +8 -0
- package/dist/do-runner/notification-predicate.d.ts.map +1 -0
- package/dist/do-runner/notification-predicate.js +136 -0
- package/dist/do-runner/notification-predicate.js.map +1 -0
- package/dist/do-runner/run-lifecycle.d.ts +20 -1
- package/dist/do-runner/run-lifecycle.d.ts.map +1 -1
- package/dist/do-runner/run-lifecycle.js +67 -13
- package/dist/do-runner/run-lifecycle.js.map +1 -1
- package/dist/do-runner/run-provenance.d.ts +38 -0
- package/dist/do-runner/run-provenance.d.ts.map +1 -0
- package/dist/do-runner/run-provenance.js +152 -0
- package/dist/do-runner/run-provenance.js.map +1 -0
- package/dist/do-runner/run-storage-tables.d.ts +2 -0
- package/dist/do-runner/run-storage-tables.d.ts.map +1 -0
- package/dist/do-runner/run-storage-tables.js +4 -0
- package/dist/do-runner/run-storage-tables.js.map +1 -0
- package/dist/do-runner/run-terminal-state.d.ts +29 -0
- package/dist/do-runner/run-terminal-state.d.ts.map +1 -0
- package/dist/do-runner/run-terminal-state.js +105 -0
- package/dist/do-runner/run-terminal-state.js.map +1 -0
- package/dist/do-runner/runtime.d.ts +191 -46
- package/dist/do-runner/runtime.d.ts.map +1 -1
- package/dist/do-runner/runtime.js +994 -378
- package/dist/do-runner/runtime.js.map +1 -1
- package/dist/do-runner/start-idempotency.d.ts +285 -0
- package/dist/do-runner/start-idempotency.d.ts.map +1 -0
- package/dist/do-runner/start-idempotency.js +994 -0
- package/dist/do-runner/start-idempotency.js.map +1 -0
- package/dist/do-runner/start-reservation-contract.d.ts +103 -0
- package/dist/do-runner/start-reservation-contract.d.ts.map +1 -0
- package/dist/do-runner/start-reservation-contract.js +338 -0
- package/dist/do-runner/start-reservation-contract.js.map +1 -0
- package/dist/do-runner/suspension-deadline.d.ts +4 -11
- package/dist/do-runner/suspension-deadline.d.ts.map +1 -1
- package/dist/do-runner/suspension-deadline.js +8 -12
- package/dist/do-runner/suspension-deadline.js.map +1 -1
- package/dist/do-runner/table-prefix.d.ts.map +1 -1
- package/dist/do-runner/table-prefix.js +2 -1
- package/dist/do-runner/table-prefix.js.map +1 -1
- package/dist/do-runner/testing.d.ts +3 -0
- package/dist/do-runner/testing.d.ts.map +1 -0
- package/dist/do-runner/testing.js +3 -0
- package/dist/do-runner/testing.js.map +1 -0
- package/dist/do-runner/thread-do.d.ts +2 -1
- package/dist/do-runner/thread-do.d.ts.map +1 -1
- package/dist/do-runner/thread-do.js +14 -10
- package/dist/do-runner/thread-do.js.map +1 -1
- package/dist/do-runner/workflow-snapshot-row.d.ts +49 -0
- package/dist/do-runner/workflow-snapshot-row.d.ts.map +1 -0
- package/dist/do-runner/workflow-snapshot-row.js +97 -0
- package/dist/do-runner/workflow-snapshot-row.js.map +1 -0
- package/dist/goals/objective-routes.d.ts +15 -5
- package/dist/goals/objective-routes.d.ts.map +1 -1
- package/dist/goals/objective-routes.js +64 -64
- package/dist/goals/objective-routes.js.map +1 -1
- package/dist/host-kit/approval-bridge.d.ts.map +1 -1
- package/dist/host-kit/approval-bridge.js +10 -7
- package/dist/host-kit/approval-bridge.js.map +1 -1
- package/dist/host-kit/do-response.d.ts +16 -0
- package/dist/host-kit/do-response.d.ts.map +1 -1
- package/dist/host-kit/do-response.js +181 -0
- package/dist/host-kit/do-response.js.map +1 -1
- package/dist/host-kit/do-run-topology.d.ts +3 -0
- package/dist/host-kit/do-run-topology.d.ts.map +1 -1
- package/dist/host-kit/do-run-topology.js +36 -8
- package/dist/host-kit/do-run-topology.js.map +1 -1
- package/dist/host-kit/env-vars.d.ts.map +1 -1
- package/dist/host-kit/env-vars.js +5 -6
- package/dist/host-kit/env-vars.js.map +1 -1
- package/dist/host-kit/flowsafe-worker.d.ts +49 -6
- package/dist/host-kit/flowsafe-worker.d.ts.map +1 -1
- package/dist/host-kit/flowsafe-worker.js +409 -111
- package/dist/host-kit/flowsafe-worker.js.map +1 -1
- package/dist/host-kit/host-approval-service.d.ts +24 -14
- package/dist/host-kit/host-approval-service.d.ts.map +1 -1
- package/dist/host-kit/host-approval-service.js +29 -40
- package/dist/host-kit/host-approval-service.js.map +1 -1
- package/dist/host-kit/index.d.ts +9 -3
- package/dist/host-kit/index.d.ts.map +1 -1
- package/dist/host-kit/index.js +5 -1
- package/dist/host-kit/index.js.map +1 -1
- package/dist/host-kit/run-route-error.d.ts +8 -4
- package/dist/host-kit/run-route-error.d.ts.map +1 -1
- package/dist/host-kit/run-route-error.js +14 -11
- package/dist/host-kit/run-route-error.js.map +1 -1
- package/dist/host-kit/run-router.d.ts +63 -2
- package/dist/host-kit/run-router.d.ts.map +1 -1
- package/dist/host-kit/run-router.js +167 -45
- package/dist/host-kit/run-router.js.map +1 -1
- package/dist/host-kit/stream-router.d.ts.map +1 -1
- package/dist/host-kit/stream-router.js +18 -9
- package/dist/host-kit/stream-router.js.map +1 -1
- package/dist/host-kit/thread-topology.d.ts +1 -1
- package/dist/host-kit/thread-topology.d.ts.map +1 -1
- package/dist/host-kit/thread-topology.js +7 -3
- package/dist/host-kit/thread-topology.js.map +1 -1
- package/dist/internal-error-response.d.ts.map +1 -1
- package/dist/internal-error-response.js +16 -6
- package/dist/internal-error-response.js.map +1 -1
- package/dist/schedules/index.d.ts +1 -0
- package/dist/schedules/index.d.ts.map +1 -1
- package/dist/schedules/index.js +1 -7
- package/dist/schedules/index.js.map +1 -1
- package/dist/schedules/mutation-contract.d.ts +38 -0
- package/dist/schedules/mutation-contract.d.ts.map +1 -0
- package/dist/schedules/mutation-contract.js +21 -0
- package/dist/schedules/mutation-contract.js.map +1 -0
- package/dist/schedules/router.d.ts +15 -8
- package/dist/schedules/router.d.ts.map +1 -1
- package/dist/schedules/router.js +170 -59
- package/dist/schedules/router.js.map +1 -1
- package/dist/schedules/schedules-d1.d.ts +11 -5
- package/dist/schedules/schedules-d1.d.ts.map +1 -1
- package/dist/schedules/schedules-d1.js +570 -143
- package/dist/schedules/schedules-d1.js.map +1 -1
- package/dist/schedules/storage.d.ts +0 -7
- package/dist/schedules/storage.d.ts.map +1 -1
- package/dist/schedules/storage.js +0 -27
- package/dist/schedules/storage.js.map +1 -1
- package/dist/schedules/tick.d.ts +13 -0
- package/dist/schedules/tick.d.ts.map +1 -1
- package/dist/schedules/tick.js +66 -40
- package/dist/schedules/tick.js.map +1 -1
- package/dist/signal-providers/host-do.d.ts +12 -1
- package/dist/signal-providers/host-do.d.ts.map +1 -1
- package/dist/signal-providers/host-do.js +28 -3
- package/dist/signal-providers/host-do.js.map +1 -1
- package/dist/signal-providers/webhook-route.d.ts +15 -1
- package/dist/signal-providers/webhook-route.d.ts.map +1 -1
- package/dist/signal-providers/webhook-route.js +126 -113
- package/dist/signal-providers/webhook-route.js.map +1 -1
- package/dist/signals/d1-shared.d.ts +11 -8
- package/dist/signals/d1-shared.d.ts.map +1 -1
- package/dist/signals/d1-shared.js +1 -6
- package/dist/signals/d1-shared.js.map +1 -1
- package/dist/signals/index.d.ts +1 -1
- package/dist/signals/index.d.ts.map +1 -1
- package/dist/signals/index.js +1 -1
- package/dist/signals/index.js.map +1 -1
- package/dist/signals/notification-dispatch.d.ts +109 -5
- package/dist/signals/notification-dispatch.d.ts.map +1 -1
- package/dist/signals/notification-dispatch.js +430 -46
- package/dist/signals/notification-dispatch.js.map +1 -1
- package/dist/signals/notifications-d1.d.ts +14 -1
- package/dist/signals/notifications-d1.d.ts.map +1 -1
- package/dist/signals/notifications-d1.js +229 -18
- package/dist/signals/notifications-d1.js.map +1 -1
- package/dist/signals/router.d.ts +6 -4
- package/dist/signals/router.d.ts.map +1 -1
- package/dist/signals/router.js +49 -84
- package/dist/signals/router.js.map +1 -1
- package/dist/signals/thread-do-routes.d.ts +2 -0
- package/dist/signals/thread-do-routes.d.ts.map +1 -1
- package/dist/signals/thread-do-routes.js +330 -83
- package/dist/signals/thread-do-routes.js.map +1 -1
- package/package.json +6 -3
- package/patches/@mastra__core@1.53.0.patch +54 -0
- package/scripts/seed-deployment-identity.mjs +34 -9
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
import { type DeploymentIdentityProtocolRow, EXECUTION_FENCE_STATES } from '#deployment-identity-protocol';
|
|
2
|
+
import { DoStatusError } from './do-status-error.js';
|
|
3
|
+
import { type D1RunExecutionIdentity, type D1StartExecutionIdentity, ExecutionFenceUnreadableError, type ProofEntryExpectation, type RunExecutionIdentity } from './execution-admission.js';
|
|
4
|
+
import { type StartReservationReading } from './start-reservation-contract.js';
|
|
5
|
+
import { type D1RunAddress } from './workflow-snapshot-row.js';
|
|
6
|
+
export { ExecutionFenceUnreadableError } from './execution-admission.js';
|
|
7
|
+
/**
|
|
8
|
+
* The state vocabulary, the table, that table's fixed row key, and the DDL
|
|
9
|
+
* built from all three are IMPORTED, never declared here — and they are not
|
|
10
|
+
* re-exported from this module either.
|
|
11
|
+
*
|
|
12
|
+
* Imported because PROVISIONING creates this table
|
|
13
|
+
* (deployment-identity-protocol.mjs), and `CREATE TABLE IF NOT EXISTS` would
|
|
14
|
+
* silently accept a differently-shaped table it had already made — so a second
|
|
15
|
+
* copy of the schema would not fail loudly, it would quietly drop the CHECK
|
|
16
|
+
* constraints that make every CAS below total rather than "the CAS, on
|
|
17
|
+
* whichever row you meant". That module is also the only file both sides can
|
|
18
|
+
* share: it ships at the package root for the provisioning CLI and
|
|
19
|
+
* fleet-control, neither of which can import this package's TypeScript.
|
|
20
|
+
*
|
|
21
|
+
* Not re-exported because a raw constant with two homes is a constant two
|
|
22
|
+
* consumers can disagree about. `@proofoftech/flowsafe/deployment-identity-protocol`
|
|
23
|
+
* is the one place to import the table name or the state list from; what this
|
|
24
|
+
* module publishes is the TYPED surface built on them — the state type, the
|
|
25
|
+
* store, the refusals, and the admission predicates.
|
|
26
|
+
*/
|
|
27
|
+
export type ExecutionFenceState = (typeof EXECUTION_FENCE_STATES)[number];
|
|
28
|
+
/**
|
|
29
|
+
* The suspend-payload key the executor backstop stamps on a task it parked
|
|
30
|
+
* because the deployment was fenced mid-dispatch. Namespaced so it cannot
|
|
31
|
+
* collide with a tool's own suspend payload, and read back by
|
|
32
|
+
* `BackgroundTaskHost.#resumeFenceSuspendedTasks` — which is what makes the
|
|
33
|
+
* parking reversible rather than a quieter kind of loss.
|
|
34
|
+
*
|
|
35
|
+
* PUBLISHED via `./background-tasks` because it is the only way a host can tell
|
|
36
|
+
* a fence-parked row from a tool-suspended one: `listTasks({ status:
|
|
37
|
+
* 'suspended' })` returns both, and the marker lives in the suspend payload
|
|
38
|
+
* where no filter can express it. The drain inventory imports this same
|
|
39
|
+
* definition directly, so a rename cannot silently leave a hard-coded census
|
|
40
|
+
* predicate behind.
|
|
41
|
+
*/
|
|
42
|
+
export declare const EXECUTION_FENCE_SUSPEND_KEY = "flowsafe.executionFenced";
|
|
43
|
+
/**
|
|
44
|
+
* How a surface is wired to the fence: a store, or the typed opt-out.
|
|
45
|
+
*
|
|
46
|
+
* Written as a union with no `undefined` so every option type carrying it can
|
|
47
|
+
* be REQUIRED. That is the whole forcing function: a fence option a host may
|
|
48
|
+
* omit is one a host will omit, and a partially wired deployment is worse than
|
|
49
|
+
* an unwired one — an unfenced schedule tick claims a due fire through the CAS
|
|
50
|
+
* (which advances `nextFireAt`) and the fenced runtime then refuses the start,
|
|
51
|
+
* so the fire is consumed and never runs. Making the caller WRITE `'none'`
|
|
52
|
+
* turns that split brain into a decision someone made rather than one they
|
|
53
|
+
* missed, and `'none'` stays honest for the callers that genuinely have no
|
|
54
|
+
* database to fence against (in-memory tests, adapters).
|
|
55
|
+
*/
|
|
56
|
+
export type ExecutionFenceWiring = ExecutionFenceStore | 'none';
|
|
57
|
+
/** What one fence read observed. `proofKey`/`proofRunId` exist only in proof-only. */
|
|
58
|
+
export interface ExecutionFenceReading {
|
|
59
|
+
readonly state: ExecutionFenceState;
|
|
60
|
+
/** The key a proof-only start must carry to be admitted. */
|
|
61
|
+
readonly proofKey?: string;
|
|
62
|
+
/** The run the proof-only state has already admitted, once one started. */
|
|
63
|
+
readonly proofRunId?: string;
|
|
64
|
+
readonly mutationEpoch?: number;
|
|
65
|
+
readonly requireMutationEpoch?: boolean;
|
|
66
|
+
readonly transitionRevision?: number;
|
|
67
|
+
/** Server-side proof identity; omitted from the admin JSON projection. */
|
|
68
|
+
readonly proofExecution?: D1RunExecutionIdentity;
|
|
69
|
+
}
|
|
70
|
+
/** An authoritative store reading, including durable administrative versioning. */
|
|
71
|
+
export interface ExecutionFenceVersionedReading extends ExecutionFenceReading {
|
|
72
|
+
readonly mutationEpoch: number;
|
|
73
|
+
readonly requireMutationEpoch: boolean;
|
|
74
|
+
readonly transitionRevision: number;
|
|
75
|
+
}
|
|
76
|
+
/** The reading every unfenced surface uses — see `ExecutionFenceStore` absence. */
|
|
77
|
+
export declare const OPEN_EXECUTION_FENCE: ExecutionFenceVersionedReading;
|
|
78
|
+
/**
|
|
79
|
+
* Read the fence a surface was wired with, resolving the typed opt-out.
|
|
80
|
+
*
|
|
81
|
+
* ONE function rather than a `fence ? await fence.read() : OPEN` at every gate,
|
|
82
|
+
* because those are the places a mistake is invisible: an unfenced surface and
|
|
83
|
+
* an open one behave identically until the day an operator closes the fence, so
|
|
84
|
+
* a call site that got the ternary subtly wrong would pass every test written
|
|
85
|
+
* against an open deployment. Every gate resolving absence through here means
|
|
86
|
+
* there is exactly one definition of what "no fence" does.
|
|
87
|
+
*
|
|
88
|
+
* `undefined` is admitted alongside `'none'` for the surfaces whose fence
|
|
89
|
+
* arrives through an object the caller may not have populated (an
|
|
90
|
+
* `InitResult.executionFence` on an unfenced host); it reads as open for the
|
|
91
|
+
* same reason `'none'` does, and never as a silent default a host can reach by
|
|
92
|
+
* forgetting — the option types that feed this are required.
|
|
93
|
+
*/
|
|
94
|
+
export declare function readExecutionFence(fence: ExecutionFenceWiring | undefined): Promise<ExecutionFenceVersionedReading>;
|
|
95
|
+
export declare function executionFenceFor(db: ExecutionFenceDatabase): ExecutionFenceStore;
|
|
96
|
+
/**
|
|
97
|
+
* Minimal structural D1 surface, the same posture as SnapshotDatabase and
|
|
98
|
+
* ApprovalDatabase: tests back it with node:sqlite, Workers pass env.DB.
|
|
99
|
+
*
|
|
100
|
+
* `all()` rather than `first()` for the one read, deliberately: this exact
|
|
101
|
+
* shape is what DeploymentIdentityDatabase, SnapshotDatabase, and
|
|
102
|
+
* ApprovalDatabase all already satisfy, so every surface that must consult the
|
|
103
|
+
* fence can hand over the binding it already holds with no cast and no second
|
|
104
|
+
* seam. The fence's row is unique by primary key, so the two are equivalent.
|
|
105
|
+
*/
|
|
106
|
+
export interface ExecutionFenceDatabase {
|
|
107
|
+
prepare(query: string): ExecutionFenceStatement;
|
|
108
|
+
}
|
|
109
|
+
export interface ExecutionFenceStatement {
|
|
110
|
+
bind(...values: unknown[]): ExecutionFenceStatement;
|
|
111
|
+
run(): Promise<unknown>;
|
|
112
|
+
all<T = unknown>(): Promise<{
|
|
113
|
+
results: T[];
|
|
114
|
+
}>;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* The refusal a fenced surface answers with: 503, because the deployment is
|
|
118
|
+
* deliberately not executing right now and will be again — an operator's
|
|
119
|
+
* condition, not the caller's mistake and not a code fault. Providers,
|
|
120
|
+
* schedulers, and clients that honour Retry-After semantics therefore
|
|
121
|
+
* redeliver rather than discard.
|
|
122
|
+
*/
|
|
123
|
+
export declare class ExecutionFencedError extends DoStatusError {
|
|
124
|
+
readonly status = 503;
|
|
125
|
+
readonly reason: {
|
|
126
|
+
readonly code: 'EXECUTION_FENCED';
|
|
127
|
+
readonly state: ExecutionFenceState;
|
|
128
|
+
};
|
|
129
|
+
constructor(state: ExecutionFenceState, entry?: string);
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* A fence transition whose compare-and-set found a different state. 409 rather
|
|
133
|
+
* than 503: the deployment is fine, the CALLER's expectation is stale — two
|
|
134
|
+
* control-plane actors raced, or an operator retried a transition that already
|
|
135
|
+
* landed. The current state rides on the reason so the caller can re-plan
|
|
136
|
+
* without a second round trip.
|
|
137
|
+
*/
|
|
138
|
+
export declare class FenceTransitionConflictError extends DoStatusError {
|
|
139
|
+
readonly status = 409;
|
|
140
|
+
readonly reason: {
|
|
141
|
+
readonly code: 'FENCE_CAS_CONFLICT';
|
|
142
|
+
readonly state: ExecutionFenceState;
|
|
143
|
+
readonly mutationEpoch?: number;
|
|
144
|
+
readonly requireMutationEpoch?: boolean;
|
|
145
|
+
readonly transitionRevision?: number;
|
|
146
|
+
readonly proofKey?: string;
|
|
147
|
+
readonly proofRunId?: string;
|
|
148
|
+
readonly conflict?: 'expectation-mismatch' | 'versioned-expectation-required';
|
|
149
|
+
};
|
|
150
|
+
constructor(expected: ExecutionFenceState, current: ExecutionFenceState, details?: {
|
|
151
|
+
reading: ExecutionFenceVersionedReading;
|
|
152
|
+
conflict: 'expectation-mismatch' | 'versioned-expectation-required';
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Render a fence refusal as the JSON response the taxonomy specifies.
|
|
157
|
+
*
|
|
158
|
+
* For the surfaces that answer with a Response instead of throwing — a Worker
|
|
159
|
+
* router, or a Durable Object route whose own catch would re-map a thrown
|
|
160
|
+
* status. Built from the ERROR so the body a router writes and the body
|
|
161
|
+
* doErrorResponse writes for the same refusal cannot drift apart.
|
|
162
|
+
*/
|
|
163
|
+
export declare function executionFencedResponse(state: ExecutionFenceState, entry?: string): Response;
|
|
164
|
+
/**
|
|
165
|
+
* A fence reading as the JSON body a control-plane read answers with.
|
|
166
|
+
*
|
|
167
|
+
* Beside `executionFencedResponse` and for the same reason: the published
|
|
168
|
+
* `GET /admin/execution-fence` route and the spike's local control probe both
|
|
169
|
+
* project a reading into this exact shape, and a projection written twice is
|
|
170
|
+
* one an operator's tooling can watch drift. Absent fields are OMITTED rather
|
|
171
|
+
* than sent as null — `proofKey`/`proofRunId` exist only in proof-only, and a
|
|
172
|
+
* null would invite a caller to read "no proof run yet" out of a state that has
|
|
173
|
+
* no proof at all.
|
|
174
|
+
*/
|
|
175
|
+
export declare function executionFenceReadingPayload(reading: ExecutionFenceVersionedReading): ExecutionFenceVersionedReading;
|
|
176
|
+
export declare function executionFenceReadingPayload(reading: ExecutionFenceReading): ExecutionFenceReading;
|
|
177
|
+
/**
|
|
178
|
+
* A fence refusal that CROSSED a Durable Object boundary and was rebuilt on the
|
|
179
|
+
* far side.
|
|
180
|
+
*
|
|
181
|
+
* The run object throws ExecutionFencedError, `doErrorResponse` renders it, and
|
|
182
|
+
* `doSummary` reconstructs it as a `RunRouteError` carrying the same status,
|
|
183
|
+
* message and structured reason — but not the same class. This structural arm
|
|
184
|
+
* is what lets a Worker-side caller treat that reconstruction as the refusal it
|
|
185
|
+
* is, with the same three fields every render site already reads.
|
|
186
|
+
*/
|
|
187
|
+
export interface WireExecutionFenceRefusal {
|
|
188
|
+
readonly message: string;
|
|
189
|
+
readonly status: number;
|
|
190
|
+
readonly reason: {
|
|
191
|
+
readonly code: string;
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
/** Every fence-authored refusal — the family a fenced surface catches as one. */
|
|
195
|
+
export type ExecutionFenceRefusal = ExecutionFencedError | ExecutionFenceUnreadableError | WireExecutionFenceRefusal;
|
|
196
|
+
/**
|
|
197
|
+
* Whether an error is the fence refusing (or failing to answer). The two are
|
|
198
|
+
* one class for every CALLER that must degrade closed — an alarm swallowing
|
|
199
|
+
* both, a tick skipping its pass — because a state it could not read and a
|
|
200
|
+
* state that forbids the work lead to the same action.
|
|
201
|
+
*
|
|
202
|
+
* The CODE counts as well as the class, because a refusal that crossed a
|
|
203
|
+
* Durable Object boundary is no longer an instance of anything: the run object
|
|
204
|
+
* threw ExecutionFencedError, `doErrorResponse` rendered it, and `doSummary`
|
|
205
|
+
* rebuilt it on the Worker side as a `RunRouteError` carrying the same status
|
|
206
|
+
* and the same structured reason. That rebuilt error IS the fence refusing —
|
|
207
|
+
* the callers most in need of recognizing one (a run router deciding whether to
|
|
208
|
+
* give a reservation's claim back, a tick deciding whether to skip a pass) are
|
|
209
|
+
* exactly the ones sitting on the far side of that boundary, and an
|
|
210
|
+
* instanceof-only test would answer "no" for every one of them.
|
|
211
|
+
*
|
|
212
|
+
* The two codes are matched by name rather than by any structural sniff: only
|
|
213
|
+
* refusals this package authors publish them, and both are declared as literals
|
|
214
|
+
* on the corresponding error classes, so a code arriving over the wire came from one of them.
|
|
215
|
+
*/
|
|
216
|
+
export declare function isExecutionFenceRefusal(error: unknown): error is ExecutionFenceRefusal;
|
|
217
|
+
/**
|
|
218
|
+
* Validate a state name from a control-plane request. Exported because the
|
|
219
|
+
* admin route validates the WIRE shape and the package validates nothing else
|
|
220
|
+
* about a transition: which transitions are legal is host policy, and this
|
|
221
|
+
* package only enforces the state vocabulary, the CAS, and the proof-only
|
|
222
|
+
* key requirement.
|
|
223
|
+
*/
|
|
224
|
+
export declare function assertExecutionFenceState(value: unknown, field: string): ExecutionFenceState;
|
|
225
|
+
/** A malformed control-plane fence request — the caller's to fix. */
|
|
226
|
+
export declare class InvalidExecutionFenceRequestError extends DoStatusError {
|
|
227
|
+
readonly status = 400;
|
|
228
|
+
readonly reason: {
|
|
229
|
+
readonly code: 'INVALID_EXECUTION_FENCE_REQUEST';
|
|
230
|
+
};
|
|
231
|
+
constructor(message: string);
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* May a NEW run be minted? Only `open`, plus the proof-only exception: a start
|
|
235
|
+
* whose idempotency key is the nominated proof key. The key is internal
|
|
236
|
+
* material (never a request-body field, never an open request-context key), so
|
|
237
|
+
* nothing a tenant can send reaches this branch.
|
|
238
|
+
*/
|
|
239
|
+
export declare function admitsRunStart(reading: ExecutionFenceReading, idempotencyKey?: string): boolean;
|
|
240
|
+
/**
|
|
241
|
+
* May work proceed on a run that ALREADY exists — resume, approval decide,
|
|
242
|
+
* signal delivery? Through a drain, yes: a drain that refused these could
|
|
243
|
+
* never finish, because finishing is what the suspended runs are waiting for.
|
|
244
|
+
* In proof-only, only the nominated run.
|
|
245
|
+
*/
|
|
246
|
+
export declare function admitsExistingRun(reading: ExecutionFenceReading, candidate?: string | RunExecutionIdentity): boolean;
|
|
247
|
+
/**
|
|
248
|
+
* May standing configuration that ARMS future work be authored — a schedule
|
|
249
|
+
* created/updated/resumed, an objective set, a due schedule fire claimed?
|
|
250
|
+
* `open` only. Pausing and deleting stay allowed in every state: they remove
|
|
251
|
+
* future work, which is the direction a drain is going.
|
|
252
|
+
*/
|
|
253
|
+
export declare function admitsWorkAuthoring(reading: ExecutionFenceReading): boolean;
|
|
254
|
+
/**
|
|
255
|
+
* May queued, already-owned work be executed — a background task body, a
|
|
256
|
+
* notification dispatch pass? Through a drain, yes; that queue IS the work a
|
|
257
|
+
* drain exists to finish. Not in proof-only: the proof is one run, and a task
|
|
258
|
+
* queue re-driving itself alongside it is not a proof of anything.
|
|
259
|
+
*/
|
|
260
|
+
export declare function admitsDrainableExecution(reading: ExecutionFenceReading): boolean;
|
|
261
|
+
/** @internal Exact current-stage observation for initial admission. */
|
|
262
|
+
export interface ExecutionFenceAdmissionObservation {
|
|
263
|
+
readonly reading: ExecutionFenceVersionedReading;
|
|
264
|
+
readonly schemaStage: 7;
|
|
265
|
+
readonly raw: DeploymentIdentityProtocolRow;
|
|
266
|
+
}
|
|
267
|
+
/** @internal */
|
|
268
|
+
export declare function executionFenceAdmissionValues(observation: ExecutionFenceAdmissionObservation): readonly unknown[];
|
|
269
|
+
/** @internal */
|
|
270
|
+
export declare function executionFenceAdmissionSql(input: {
|
|
271
|
+
readonly callerEpoch: string;
|
|
272
|
+
readonly semantic: readonly string[];
|
|
273
|
+
readonly schema: string;
|
|
274
|
+
readonly statePredicate: string;
|
|
275
|
+
}): string;
|
|
276
|
+
/** @internal Validate an already-observed current-schema RETURNING row. */
|
|
277
|
+
export declare function decodeExecutionFenceAdmissionRow(row: DeploymentIdentityProtocolRow): ExecutionFenceAdmissionObservation;
|
|
278
|
+
/** @internal Validate actual PRAGMA rows from a consistent readback batch. */
|
|
279
|
+
export declare function validateExecutionFenceAdmissionSchema(result: unknown): Promise<void>;
|
|
280
|
+
/** @internal */
|
|
281
|
+
export declare function captureExecutionFenceAdmissionSchema(result: unknown): Promise<string>;
|
|
282
|
+
export interface ExecutionFenceStoreOptions {
|
|
283
|
+
/** Injectable clock for `updated_at` (tests, deterministic fixtures). */
|
|
284
|
+
now?: () => number;
|
|
285
|
+
}
|
|
286
|
+
export interface ExecutionFenceTransition {
|
|
287
|
+
/** The state the caller believes the fence is in. */
|
|
288
|
+
expected: ExecutionFenceState;
|
|
289
|
+
/** The state to move to. */
|
|
290
|
+
next: ExecutionFenceState;
|
|
291
|
+
/**
|
|
292
|
+
* Required when `next` is 'proof-only'; rejected otherwise.
|
|
293
|
+
*
|
|
294
|
+
* `unknown` rather than `string` because every caller is a control-plane
|
|
295
|
+
* route holding a parsed JSON body, and `#proofKeyFor` already validates it
|
|
296
|
+
* against PATH_SAFE_ID_PATTERN and throws InvalidExecutionFenceRequestError
|
|
297
|
+
* on anything else. Typing it `string` bought nothing and cost something: it
|
|
298
|
+
* made every route write `body.proofKey as string`, an assertion that is
|
|
299
|
+
* false exactly when the caller sent the wrong thing, so the one input this
|
|
300
|
+
* field exists to police arrived pre-blessed at the type level.
|
|
301
|
+
*/
|
|
302
|
+
proofKey?: unknown;
|
|
303
|
+
expectedMutationEpoch?: unknown;
|
|
304
|
+
expectedRevision?: unknown;
|
|
305
|
+
advanceMutationEpoch?: unknown;
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* The deployment's fence, over one D1 database — the SAME database the runner's
|
|
309
|
+
* snapshots and the deployment sentinel live in, so the fence cannot be
|
|
310
|
+
* separated from the state it fences by any binding mistake.
|
|
311
|
+
*/
|
|
312
|
+
export declare class ExecutionFenceStore {
|
|
313
|
+
#private;
|
|
314
|
+
constructor(db: ExecutionFenceDatabase, options?: ExecutionFenceStoreOptions);
|
|
315
|
+
/**
|
|
316
|
+
* The current fence state. NEVER memoized (see the module header) and never
|
|
317
|
+
* a write: this is on every gated request path, and a read path that emits
|
|
318
|
+
* `CREATE TABLE IF NOT EXISTS` is a write path wearing a read's name — it
|
|
319
|
+
* would make a fenced deployment mutate its own database to answer a
|
|
320
|
+
* question, and would turn a read-only replica or a revoked-write incident
|
|
321
|
+
* into an outage instead of a degrade.
|
|
322
|
+
*
|
|
323
|
+
* A missing table or missing legacy row reads as `open`. A missing modern row is
|
|
324
|
+
* unreadable and is never silently recreated.
|
|
325
|
+
*/
|
|
326
|
+
read(): Promise<ExecutionFenceVersionedReading>;
|
|
327
|
+
usesDatabase(binding: object): boolean;
|
|
328
|
+
/** @internal Pure strict observation; seed only on the admission preparation path. */
|
|
329
|
+
readForAdmission(): Promise<ExecutionFenceAdmissionObservation>;
|
|
330
|
+
/**
|
|
331
|
+
* Provisioning-time seeding: write the deployment's INITIAL fence state.
|
|
332
|
+
*
|
|
333
|
+
* INSERT-if-absent, never an overwrite. Seeding runs on every provisioning
|
|
334
|
+
* pass (including the already-owned early return), so a crash between the
|
|
335
|
+
* deployment sentinel and this row heals on the next attempt — but a
|
|
336
|
+
* re-provision of a LIVE deployment must never silently reopen a fence an
|
|
337
|
+
* operator closed, which an upsert would do.
|
|
338
|
+
*
|
|
339
|
+
* `state` has no default on purpose. The failure this closes is a migration
|
|
340
|
+
* host forgetting to ask for `migration-locked` and silently getting `open`;
|
|
341
|
+
* making the argument required turns that into a compile-time obligation,
|
|
342
|
+
* while still letting a host that wants an open deployment say so.
|
|
343
|
+
*/
|
|
344
|
+
seed(state: ExecutionFenceState): Promise<void>;
|
|
345
|
+
/**
|
|
346
|
+
* Move the fence, compare-and-set on the CURRENT state. One conditional
|
|
347
|
+
* UPDATE, so two control-plane actors racing the same transition cannot both
|
|
348
|
+
* win: the loser changes zero rows and gets the state the winner left behind.
|
|
349
|
+
*
|
|
350
|
+
* Unlike `read()` this MAY create the table — a transition is a control-plane
|
|
351
|
+
* write, and a legacy database whose fence is implicitly open has no row to
|
|
352
|
+
* compare against. The row is materialized as `open` first, which is the
|
|
353
|
+
* state the implicit reading already reported, so the CAS that follows means
|
|
354
|
+
* exactly what it would have meant on a seeded database.
|
|
355
|
+
*/
|
|
356
|
+
transition(input: ExecutionFenceTransition): Promise<ExecutionFenceVersionedReading>;
|
|
357
|
+
/**
|
|
358
|
+
* Bind the proof-only state to the run it admitted, conditionally.
|
|
359
|
+
*
|
|
360
|
+
* The condition is the whole point: between the read that ADMITTED a start
|
|
361
|
+
* and this write-back the fence may have moved, or a different run may have
|
|
362
|
+
* claimed the proof. Zero rows changed means the caller must refuse the
|
|
363
|
+
* start it was about to make — the fence is no longer the one it read.
|
|
364
|
+
* Re-writing the SAME runId is admitted so a retry of an interrupted start
|
|
365
|
+
* converges instead of deadlocking on its own earlier write.
|
|
366
|
+
*/
|
|
367
|
+
recordProofRun(proofKey: string, runId: string, admitted?: Pick<ExecutionFenceVersionedReading, 'mutationEpoch' | 'transitionRevision'>): Promise<boolean>;
|
|
368
|
+
readCurrentRunExecution(address: D1RunAddress): Promise<D1RunExecutionIdentity | undefined>;
|
|
369
|
+
rebindProofRun(options: {
|
|
370
|
+
reservation: StartReservationReading;
|
|
371
|
+
execution: D1StartExecutionIdentity;
|
|
372
|
+
proof: ProofEntryExpectation;
|
|
373
|
+
mutationEpoch?: number;
|
|
374
|
+
reservationStore: {
|
|
375
|
+
usesDatabase(binding: object): boolean;
|
|
376
|
+
};
|
|
377
|
+
}): Promise<boolean>;
|
|
378
|
+
}
|
|
379
|
+
//# sourceMappingURL=execution-fence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution-fence.d.ts","sourceRoot":"","sources":["../../src/do-runner/execution-fence.ts"],"names":[],"mappings":"AAyCA,OAAO,EAEL,KAAK,6BAA6B,EAIlC,sBAAsB,EAKvB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,6BAA6B,EAK7B,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EAC1B,MAAM,0BAA0B,CAAC;AAQlC,OAAO,EAIL,KAAK,uBAAuB,EAG7B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,KAAK,YAAY,EAIlB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AAEzE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1E;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,2BAA2B,6BAA6B,CAAC;AAEtE;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,oBAAoB,GAAG,mBAAmB,GAAG,MAAM,CAAC;AAEhE,sFAAsF;AACtF,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,KAAK,EAAE,mBAAmB,CAAC;IACpC,4DAA4D;IAC5D,QAAQ,CAAC,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