clinkx 1.2.0 → 1.4.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 +60 -0
- package/README.md +17 -8
- package/clinkx-workflows/dist/architecture-arena/admission.d.ts +16 -0
- package/clinkx-workflows/dist/architecture-arena/admission.js +107 -0
- package/clinkx-workflows/dist/architecture-arena/admission.js.map +1 -0
- package/clinkx-workflows/dist/architecture-arena/contract.d.ts +1368 -0
- package/clinkx-workflows/dist/architecture-arena/contract.js +254 -0
- package/clinkx-workflows/dist/architecture-arena/contract.js.map +1 -0
- package/clinkx-workflows/dist/architecture-arena/runtime.d.ts +53 -0
- package/clinkx-workflows/dist/architecture-arena/runtime.js +511 -0
- package/clinkx-workflows/dist/architecture-arena/runtime.js.map +1 -0
- package/clinkx-workflows/dist/architecture-comparison/admission.d.ts +17 -1
- package/clinkx-workflows/dist/architecture-comparison/admission.js +27 -4
- package/clinkx-workflows/dist/architecture-comparison/admission.js.map +1 -1
- package/clinkx-workflows/dist/architecture-comparison/contract.d.ts +59 -62
- package/clinkx-workflows/dist/architecture-comparison/contract.js +4 -21
- package/clinkx-workflows/dist/architecture-comparison/contract.js.map +1 -1
- package/clinkx-workflows/dist/architecture-comparison/runtime.d.ts +4 -3
- package/clinkx-workflows/dist/architecture-comparison/runtime.js +22 -67
- package/clinkx-workflows/dist/architecture-comparison/runtime.js.map +1 -1
- package/clinkx-workflows/dist/artifacts.d.ts +19 -4
- package/clinkx-workflows/dist/artifacts.js +16 -7
- package/clinkx-workflows/dist/artifacts.js.map +1 -1
- package/clinkx-workflows/dist/backend.d.ts +30 -0
- package/clinkx-workflows/dist/child-env.d.ts +3 -0
- package/clinkx-workflows/dist/child-env.js +11 -0
- package/clinkx-workflows/dist/child-env.js.map +1 -1
- package/clinkx-workflows/dist/clink-client.d.ts +8 -2
- package/clinkx-workflows/dist/clink-client.js +4 -2
- package/clinkx-workflows/dist/clink-client.js.map +1 -1
- package/clinkx-workflows/dist/context-preflight.d.ts +6 -0
- package/clinkx-workflows/dist/context-preflight.js.map +1 -1
- package/clinkx-workflows/dist/council-execution-policy.d.ts +3 -1
- package/clinkx-workflows/dist/council-execution-policy.js +4 -0
- package/clinkx-workflows/dist/council-execution-policy.js.map +1 -1
- package/clinkx-workflows/dist/dashboard/api-routes.d.ts +21 -0
- package/clinkx-workflows/dist/dashboard/api-routes.js +27 -0
- package/clinkx-workflows/dist/dashboard/api-routes.js.map +1 -1
- package/clinkx-workflows/dist/dashboard/auth/challenge-store.d.ts +13 -0
- package/clinkx-workflows/dist/dashboard/auth/challenge-store.js.map +1 -1
- package/clinkx-workflows/dist/dashboard/auth/controller.d.ts +27 -0
- package/clinkx-workflows/dist/dashboard/auth/controller.js +262 -23
- package/clinkx-workflows/dist/dashboard/auth/controller.js.map +1 -1
- package/clinkx-workflows/dist/dashboard/auth/settings-step-up.d.ts +62 -0
- package/clinkx-workflows/dist/dashboard/auth/settings-step-up.js +70 -0
- package/clinkx-workflows/dist/dashboard/auth/settings-step-up.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/contracts.d.ts +586 -586
- package/clinkx-workflows/dist/dashboard/progress-report-contract.d.ts +28 -28
- package/clinkx-workflows/dist/dashboard/request-admission.d.ts +6 -0
- package/clinkx-workflows/dist/dashboard/request-admission.js +9 -0
- package/clinkx-workflows/dist/dashboard/request-admission.js.map +1 -1
- package/clinkx-workflows/dist/dashboard/server-factory.js +15 -1
- package/clinkx-workflows/dist/dashboard/server-factory.js.map +1 -1
- package/clinkx-workflows/dist/dashboard/session-log-contract.d.ts +32 -32
- package/clinkx-workflows/dist/dashboard/settings-contract.d.ts +1806 -0
- package/clinkx-workflows/dist/dashboard/settings-contract.js +630 -0
- package/clinkx-workflows/dist/dashboard/settings-contract.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/settings-process-reader.d.ts +48 -0
- package/clinkx-workflows/dist/dashboard/settings-process-reader.js +195 -0
- package/clinkx-workflows/dist/dashboard/settings-process-reader.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/settings-routes.d.ts +87 -0
- package/clinkx-workflows/dist/dashboard/settings-routes.js +690 -0
- package/clinkx-workflows/dist/dashboard/settings-routes.js.map +1 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/index-DSOtuS0p.js +122 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/style-C5guUjwN.css +1 -0
- package/clinkx-workflows/dist/dashboard-ui/index.html +2 -2
- package/clinkx-workflows/dist/delegate-signature.d.ts +4 -3
- package/clinkx-workflows/dist/delegate-signature.js +4 -3
- package/clinkx-workflows/dist/delegate-signature.js.map +1 -1
- package/clinkx-workflows/dist/durable-file-core.d.ts +76 -0
- package/clinkx-workflows/dist/durable-file-core.js +146 -0
- package/clinkx-workflows/dist/durable-file-core.js.map +1 -0
- package/clinkx-workflows/dist/durable-file.d.ts +13 -0
- package/clinkx-workflows/dist/durable-file.js +22 -0
- package/clinkx-workflows/dist/durable-file.js.map +1 -0
- package/clinkx-workflows/dist/engine.d.ts +42 -7
- package/clinkx-workflows/dist/engine.js +196 -24
- package/clinkx-workflows/dist/engine.js.map +1 -1
- package/clinkx-workflows/dist/index.js +68 -2
- package/clinkx-workflows/dist/index.js.map +1 -1
- package/clinkx-workflows/dist/ping-pong/admission.d.ts +127 -0
- package/clinkx-workflows/dist/ping-pong/admission.js +522 -0
- package/clinkx-workflows/dist/ping-pong/admission.js.map +1 -0
- package/clinkx-workflows/dist/ping-pong/contract.d.ts +2539 -0
- package/clinkx-workflows/dist/ping-pong/contract.js +819 -0
- package/clinkx-workflows/dist/ping-pong/contract.js.map +1 -0
- package/clinkx-workflows/dist/ping-pong/control.d.ts +67 -0
- package/clinkx-workflows/dist/ping-pong/control.js +12 -0
- package/clinkx-workflows/dist/ping-pong/control.js.map +1 -0
- package/clinkx-workflows/dist/ping-pong/runtime-handle.d.ts +24 -0
- package/clinkx-workflows/dist/ping-pong/runtime-handle.js +55 -0
- package/clinkx-workflows/dist/ping-pong/runtime-handle.js.map +1 -0
- package/clinkx-workflows/dist/ping-pong/runtime.d.ts +235 -0
- package/clinkx-workflows/dist/ping-pong/runtime.js +1183 -0
- package/clinkx-workflows/dist/ping-pong/runtime.js.map +1 -0
- package/clinkx-workflows/dist/ping-pong/settle.d.ts +57 -0
- package/clinkx-workflows/dist/ping-pong/settle.js +58 -0
- package/clinkx-workflows/dist/ping-pong/settle.js.map +1 -0
- package/clinkx-workflows/dist/ping-pong/sidecar.d.ts +65 -0
- package/clinkx-workflows/dist/ping-pong/sidecar.js +138 -0
- package/clinkx-workflows/dist/ping-pong/sidecar.js.map +1 -0
- package/clinkx-workflows/dist/plan-review/publication.d.ts +2 -1
- package/clinkx-workflows/dist/plan-review/publication.js +5 -6
- package/clinkx-workflows/dist/plan-review/publication.js.map +1 -1
- package/clinkx-workflows/dist/plan-review/snapshot.d.ts +3 -2
- package/clinkx-workflows/dist/plan-review/snapshot.js +8 -8
- package/clinkx-workflows/dist/plan-review/snapshot.js.map +1 -1
- package/clinkx-workflows/dist/recipe-host.d.ts +315 -0
- package/clinkx-workflows/dist/recipe-host.js +183 -0
- package/clinkx-workflows/dist/recipe-host.js.map +1 -0
- package/clinkx-workflows/dist/recipe-seats.d.ts +96 -0
- package/clinkx-workflows/dist/recipe-seats.js +163 -0
- package/clinkx-workflows/dist/recipe-seats.js.map +1 -0
- package/clinkx-workflows/dist/recipe-shared/evidence.d.ts +67 -0
- package/clinkx-workflows/dist/recipe-shared/evidence.js +111 -0
- package/clinkx-workflows/dist/recipe-shared/evidence.js.map +1 -0
- package/clinkx-workflows/dist/reducers/index.d.ts +9 -1
- package/clinkx-workflows/dist/reducers/index.js +30 -0
- package/clinkx-workflows/dist/reducers/index.js.map +1 -1
- package/clinkx-workflows/dist/run-lock-reclaim.d.ts +44 -0
- package/clinkx-workflows/dist/run-lock-reclaim.js +86 -0
- package/clinkx-workflows/dist/run-lock-reclaim.js.map +1 -0
- package/clinkx-workflows/dist/settings/audit.d.ts +101 -0
- package/clinkx-workflows/dist/settings/audit.js +318 -0
- package/clinkx-workflows/dist/settings/audit.js.map +1 -0
- package/clinkx-workflows/dist/settings/bootstrap.d.ts +35 -0
- package/clinkx-workflows/dist/settings/bootstrap.js +52 -0
- package/clinkx-workflows/dist/settings/bootstrap.js.map +1 -0
- package/clinkx-workflows/dist/settings/codec.d.ts +51 -0
- package/clinkx-workflows/dist/settings/codec.js +410 -0
- package/clinkx-workflows/dist/settings/codec.js.map +1 -0
- package/clinkx-workflows/dist/settings/durable-write.d.ts +48 -0
- package/clinkx-workflows/dist/settings/durable-write.js +31 -0
- package/clinkx-workflows/dist/settings/durable-write.js.map +1 -0
- package/clinkx-workflows/dist/settings/index.d.ts +20 -0
- package/clinkx-workflows/dist/settings/index.js +23 -0
- package/clinkx-workflows/dist/settings/index.js.map +1 -0
- package/clinkx-workflows/dist/settings/loader.d.ts +80 -0
- package/clinkx-workflows/dist/settings/loader.js +577 -0
- package/clinkx-workflows/dist/settings/loader.js.map +1 -0
- package/clinkx-workflows/dist/settings/lock.d.ts +108 -0
- package/clinkx-workflows/dist/settings/lock.js +344 -0
- package/clinkx-workflows/dist/settings/lock.js.map +1 -0
- package/clinkx-workflows/dist/settings/paths.d.ts +65 -0
- package/clinkx-workflows/dist/settings/paths.js +173 -0
- package/clinkx-workflows/dist/settings/paths.js.map +1 -0
- package/clinkx-workflows/dist/settings/process-heartbeat.d.ts +47 -0
- package/clinkx-workflows/dist/settings/process-heartbeat.js +305 -0
- package/clinkx-workflows/dist/settings/process-heartbeat.js.map +1 -0
- package/clinkx-workflows/dist/settings/registry.d.ts +178 -0
- package/clinkx-workflows/dist/settings/registry.js +1285 -0
- package/clinkx-workflows/dist/settings/registry.js.map +1 -0
- package/clinkx-workflows/dist/settings/schema.d.ts +404 -0
- package/clinkx-workflows/dist/settings/schema.js +415 -0
- package/clinkx-workflows/dist/settings/schema.js.map +1 -0
- package/clinkx-workflows/dist/settings/store.d.ts +157 -0
- package/clinkx-workflows/dist/settings/store.js +842 -0
- package/clinkx-workflows/dist/settings/store.js.map +1 -0
- package/clinkx-workflows/dist/state-schema.d.ts +11 -0
- package/clinkx-workflows/dist/state-schema.js +4 -1
- package/clinkx-workflows/dist/state-schema.js.map +1 -1
- package/clinkx-workflows/dist/state.d.ts +178 -3
- package/clinkx-workflows/dist/state.js +618 -83
- package/clinkx-workflows/dist/state.js.map +1 -1
- package/clinkx-workflows/dist/stdio-entry.d.ts +2 -0
- package/clinkx-workflows/dist/stdio-entry.js +52 -0
- package/clinkx-workflows/dist/stdio-entry.js.map +1 -0
- package/clinkx-workflows/dist/transport.d.ts +2 -1
- package/clinkx-workflows/dist/transport.js +5 -0
- package/clinkx-workflows/dist/transport.js.map +1 -1
- package/clinkx-workflows/dist/validators/architecture-arena.d.ts +6 -0
- package/clinkx-workflows/dist/validators/architecture-arena.js +16 -0
- package/clinkx-workflows/dist/validators/architecture-arena.js.map +1 -0
- package/clinkx-workflows/dist/validators/index.js +4 -0
- package/clinkx-workflows/dist/validators/index.js.map +1 -1
- package/clinkx-workflows/dist/validators/ping-pong.d.ts +6 -0
- package/clinkx-workflows/dist/validators/ping-pong.js +10 -0
- package/clinkx-workflows/dist/validators/ping-pong.js.map +1 -0
- package/clinkx-workflows/dist/workflow-tools.d.ts +51 -5
- package/clinkx-workflows/dist/workflow-tools.js +785 -34
- package/clinkx-workflows/dist/workflow-tools.js.map +1 -1
- package/clinkx-workflows/dist/workflow-verification-contract.d.ts +4 -4
- package/clinkx-workflows/templates/architecture-arena/candidate.txt +39 -0
- package/clinkx-workflows/templates/architecture-arena/judge.txt +34 -0
- package/clinkx-workflows/templates/ping-pong/implement.txt +14 -0
- package/clinkx-workflows/templates/ping-pong/remediate.txt +14 -0
- package/clinkx-workflows/templates/ping-pong/review.txt +27 -0
- package/clinkx-workflows/workflows/architecture-arena.yaml +127 -0
- package/clinkx-workflows/workflows/ping-pong.yaml +158 -0
- package/dist/context-builder/bundle.js +4 -3
- package/dist/context-builder/bundle.js.map +1 -1
- package/dist/context-builder/delegate-packet.d.ts +1 -0
- package/dist/context-builder/delegate-packet.js +66 -7
- package/dist/context-builder/delegate-packet.js.map +1 -1
- package/dist/context-builder/delegate-validation.d.ts +12 -3
- package/dist/context-builder/delegate-validation.js +23 -13
- package/dist/context-builder/delegate-validation.js.map +1 -1
- package/dist/context-builder/external-gaps.d.ts +14 -3
- package/dist/context-builder/external-gaps.js +124 -18
- package/dist/context-builder/external-gaps.js.map +1 -1
- package/dist/context-builder/handler.js +108 -191
- package/dist/context-builder/handler.js.map +1 -1
- package/dist/context-builder/review-coverage.js +27 -1
- package/dist/context-builder/review-coverage.js.map +1 -1
- package/dist/context-builder/secrets.js +1 -1
- package/dist/context-builder/secrets.js.map +1 -1
- package/dist/context-builder/versions.d.ts +10 -4
- package/dist/context-builder/versions.js +10 -4
- package/dist/context-builder/versions.js.map +1 -1
- package/dist/context-builder/workflow-runner.js +33 -24
- package/dist/context-builder/workflow-runner.js.map +1 -1
- package/dist/dashboard-cli.d.ts +2 -0
- package/dist/dashboard-cli.js +197 -58
- package/dist/dashboard-cli.js.map +1 -1
- package/dist/dashboard-companion/client.d.ts +10 -0
- package/dist/dashboard-companion/client.js +43 -1
- package/dist/dashboard-companion/client.js.map +1 -1
- package/dist/dashboard-companion/config.d.ts +19 -1
- package/dist/dashboard-companion/config.js +104 -3
- package/dist/dashboard-companion/config.js.map +1 -1
- package/dist/dashboard-companion/protocol.d.ts +16 -0
- package/dist/dashboard-companion/protocol.js +55 -1
- package/dist/dashboard-companion/protocol.js.map +1 -1
- package/dist/dashboard-companion/workstation-binding.d.ts +69 -0
- package/dist/dashboard-companion/workstation-binding.js +192 -0
- package/dist/dashboard-companion/workstation-binding.js.map +1 -0
- package/dist/dashboard-gateway/admin-cli.d.ts +10 -0
- package/dist/dashboard-gateway/admin-cli.js +266 -0
- package/dist/dashboard-gateway/admin-cli.js.map +1 -0
- package/dist/dashboard-gateway/config.d.ts +50 -0
- package/dist/dashboard-gateway/config.js +235 -1
- package/dist/dashboard-gateway/config.js.map +1 -1
- package/dist/dashboard-gateway/connection-registry.d.ts +100 -0
- package/dist/dashboard-gateway/connection-registry.js +228 -0
- package/dist/dashboard-gateway/connection-registry.js.map +1 -0
- package/dist/dashboard-gateway/control-plane/account-auth.d.ts +78 -0
- package/dist/dashboard-gateway/control-plane/account-auth.js +198 -0
- package/dist/dashboard-gateway/control-plane/account-auth.js.map +1 -0
- package/dist/dashboard-gateway/control-plane/billing.d.ts +264 -0
- package/dist/dashboard-gateway/control-plane/billing.js +787 -0
- package/dist/dashboard-gateway/control-plane/billing.js.map +1 -0
- package/dist/dashboard-gateway/control-plane/contracts.d.ts +1293 -0
- package/dist/dashboard-gateway/control-plane/contracts.js +280 -0
- package/dist/dashboard-gateway/control-plane/contracts.js.map +1 -0
- package/dist/dashboard-gateway/control-plane/cookies.d.ts +13 -0
- package/dist/dashboard-gateway/control-plane/cookies.js +46 -0
- package/dist/dashboard-gateway/control-plane/cookies.js.map +1 -0
- package/dist/dashboard-gateway/control-plane/credentials.d.ts +63 -0
- package/dist/dashboard-gateway/control-plane/credentials.js +66 -0
- package/dist/dashboard-gateway/control-plane/credentials.js.map +1 -0
- package/dist/dashboard-gateway/control-plane/entitlements.d.ts +118 -0
- package/dist/dashboard-gateway/control-plane/entitlements.js +329 -0
- package/dist/dashboard-gateway/control-plane/entitlements.js.map +1 -0
- package/dist/dashboard-gateway/control-plane/errors.d.ts +17 -0
- package/dist/dashboard-gateway/control-plane/errors.js +23 -0
- package/dist/dashboard-gateway/control-plane/errors.js.map +1 -0
- package/dist/dashboard-gateway/control-plane/hosts.d.ts +6 -0
- package/dist/dashboard-gateway/control-plane/hosts.js +16 -0
- package/dist/dashboard-gateway/control-plane/hosts.js.map +1 -0
- package/dist/dashboard-gateway/control-plane/http.d.ts +34 -0
- package/dist/dashboard-gateway/control-plane/http.js +331 -0
- package/dist/dashboard-gateway/control-plane/http.js.map +1 -0
- package/dist/dashboard-gateway/control-plane/schema.d.ts +9 -0
- package/dist/dashboard-gateway/control-plane/schema.js +247 -0
- package/dist/dashboard-gateway/control-plane/schema.js.map +1 -0
- package/dist/dashboard-gateway/control-plane/secrets.d.ts +20 -0
- package/dist/dashboard-gateway/control-plane/secrets.js +39 -0
- package/dist/dashboard-gateway/control-plane/secrets.js.map +1 -0
- package/dist/dashboard-gateway/control-plane/store.d.ts +579 -0
- package/dist/dashboard-gateway/control-plane/store.js +1115 -0
- package/dist/dashboard-gateway/control-plane/store.js.map +1 -0
- package/dist/dashboard-gateway/cookie-boundary.d.ts +60 -0
- package/dist/dashboard-gateway/cookie-boundary.js +205 -0
- package/dist/dashboard-gateway/cookie-boundary.js.map +1 -0
- package/dist/dashboard-gateway/index.js +271 -494
- package/dist/dashboard-gateway/index.js.map +1 -1
- package/dist/dashboard-gateway/main.js +7 -2
- package/dist/dashboard-gateway/main.js.map +1 -1
- package/dist/dashboard-gateway/routing.d.ts +43 -0
- package/dist/dashboard-gateway/routing.js +65 -0
- package/dist/dashboard-gateway/routing.js.map +1 -0
- package/dist/dashboard-gateway/tenant-gateway.d.ts +56 -0
- package/dist/dashboard-gateway/tenant-gateway.js +989 -0
- package/dist/dashboard-gateway/tenant-gateway.js.map +1 -0
- package/dist/dashboard-gateway/tenant-main.d.ts +41 -0
- package/dist/dashboard-gateway/tenant-main.js +303 -0
- package/dist/dashboard-gateway/tenant-main.js.map +1 -0
- package/dist/dashboard-gateway/tunnel-errors.d.ts +16 -0
- package/dist/dashboard-gateway/tunnel-errors.js +22 -0
- package/dist/dashboard-gateway/tunnel-errors.js.map +1 -0
- package/dist/dashboard-gateway/tunnel-http.d.ts +21 -0
- package/dist/dashboard-gateway/tunnel-http.js +195 -0
- package/dist/dashboard-gateway/tunnel-http.js.map +1 -0
- package/dist/elaris/config.d.ts +10 -0
- package/dist/elaris/config.js +27 -1
- package/dist/elaris/config.js.map +1 -1
- package/dist/elaris/tools.js +4 -1
- package/dist/elaris/tools.js.map +1 -1
- package/dist/handler.d.ts +6 -0
- package/dist/handler.js +17 -1
- package/dist/handler.js.map +1 -1
- package/dist/index.d.ts +0 -31
- package/dist/index.js +41 -404
- package/dist/index.js.map +1 -1
- package/dist/lib.d.ts +17 -0
- package/dist/lib.js +17 -0
- package/dist/lib.js.map +1 -0
- package/dist/local-clink-backend.d.ts +2 -1
- package/dist/local-clink-backend.js +28 -4
- package/dist/local-clink-backend.js.map +1 -1
- package/dist/parsers/extract.d.ts +19 -1
- package/dist/parsers/extract.js +68 -3
- package/dist/parsers/extract.js.map +1 -1
- package/dist/pipeline.d.ts +17 -1
- package/dist/pipeline.js +34 -6
- package/dist/pipeline.js.map +1 -1
- package/dist/process-group.d.ts +65 -0
- package/dist/process-group.js +153 -0
- package/dist/process-group.js.map +1 -0
- package/dist/progress-report/lock.d.ts +17 -59
- package/dist/progress-report/lock.js +25 -329
- package/dist/progress-report/lock.js.map +1 -1
- package/dist/progress-report/schema.d.ts +23 -23
- package/dist/project-verification/files.js +1 -1
- package/dist/project-verification/files.js.map +1 -1
- package/dist/project-verification/process.js +23 -44
- package/dist/project-verification/process.js.map +1 -1
- package/dist/project-verification/service.js +9 -1
- package/dist/project-verification/service.js.map +1 -1
- package/dist/prompt.d.ts +7 -0
- package/dist/prompt.js +18 -1
- package/dist/prompt.js.map +1 -1
- package/dist/recipe-host/git-trust.d.ts +43 -0
- package/dist/recipe-host/git-trust.js +360 -0
- package/dist/recipe-host/git-trust.js.map +1 -0
- package/dist/recipe-host/git.d.ts +42 -0
- package/dist/recipe-host/git.js +207 -0
- package/dist/recipe-host/git.js.map +1 -0
- package/dist/recipe-host/native-recipe-host.d.ts +127 -0
- package/dist/recipe-host/native-recipe-host.js +880 -0
- package/dist/recipe-host/native-recipe-host.js.map +1 -0
- package/dist/recipe-host/seat-cwd.d.ts +16 -0
- package/dist/recipe-host/seat-cwd.js +170 -0
- package/dist/recipe-host/seat-cwd.js.map +1 -0
- package/dist/runner.d.ts +43 -1
- package/dist/runner.js +234 -35
- package/dist/runner.js.map +1 -1
- package/dist/server.js +84 -5
- package/dist/server.js.map +1 -1
- package/dist/settings-cli/clients.d.ts +137 -0
- package/dist/settings-cli/clients.js +1124 -0
- package/dist/settings-cli/clients.js.map +1 -0
- package/dist/settings-cli/commands.d.ts +67 -0
- package/dist/settings-cli/commands.js +726 -0
- package/dist/settings-cli/commands.js.map +1 -0
- package/dist/settings-cli/format.d.ts +34 -0
- package/dist/settings-cli/format.js +40 -0
- package/dist/settings-cli/format.js.map +1 -0
- package/dist/settings-cli/main.d.ts +18 -0
- package/dist/settings-cli/main.js +256 -0
- package/dist/settings-cli/main.js.map +1 -0
- package/dist/stdio-main.d.ts +73 -0
- package/dist/stdio-main.js +455 -0
- package/dist/stdio-main.js.map +1 -0
- package/docs/configuration.md +362 -40
- package/docs/engineering-recipes.md +291 -0
- package/docs/security.md +234 -6
- package/docs/verification/project-checks.md +24 -2
- package/package.json +6 -2
- package/clinkx-workflows/dist/dashboard-ui/assets/index-BdpmbPps.js +0 -115
- package/clinkx-workflows/dist/dashboard-ui/assets/style-Im5i1iAs.css +0 -1
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Children owned by this server, drained by `killAllActive` at shutdown.
|
|
3
|
+
* Shared by the provider runner and host git so both are swept.
|
|
4
|
+
*/
|
|
5
|
+
export const activeProcesses = new Set();
|
|
6
|
+
/** Bounded wait for the group to vanish after a sweep's SIGKILL. */
|
|
7
|
+
export const GROUP_EXIT_CONFIRM_WAIT_MS = 1_000;
|
|
8
|
+
const GROUP_EXIT_PROBE_INTERVAL_MS = 10;
|
|
9
|
+
function isEsrch(err) {
|
|
10
|
+
return err?.code === "ESRCH";
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The one place a child's process group is probed or signalled. After any
|
|
14
|
+
* ESRCH the handle is retired and never addresses the numeric PGID again:
|
|
15
|
+
* once the group is empty the id can be reused, and a probe or signal would
|
|
16
|
+
* reach whoever holds it now.
|
|
17
|
+
*/
|
|
18
|
+
export class ProcessGroupHandle {
|
|
19
|
+
probeFirst;
|
|
20
|
+
/** Undefined when the pid cannot name a group we own (missing, <= 1, non-integer). */
|
|
21
|
+
pgid;
|
|
22
|
+
#state = "live";
|
|
23
|
+
#inflight;
|
|
24
|
+
#unconfirmedListeners = new Set();
|
|
25
|
+
/**
|
|
26
|
+
* @param probeFirst escalate only through `sweep` (SIGKILL only a group seen
|
|
27
|
+
* alive, never past EPERM) instead of an unconditional SIGKILL.
|
|
28
|
+
*/
|
|
29
|
+
constructor(pid, probeFirst = false) {
|
|
30
|
+
this.probeFirst = probeFirst;
|
|
31
|
+
// kill(-1) signals every process the user owns and kill(-0)/kill(0) the
|
|
32
|
+
// caller's own group.
|
|
33
|
+
this.pgid = pid !== undefined && Number.isSafeInteger(pid) && pid > 1 ? pid : undefined;
|
|
34
|
+
}
|
|
35
|
+
get state() {
|
|
36
|
+
return this.#state;
|
|
37
|
+
}
|
|
38
|
+
signal(sig) {
|
|
39
|
+
if (this.#state === "retired")
|
|
40
|
+
return "retired";
|
|
41
|
+
if (this.pgid === undefined)
|
|
42
|
+
return "failed";
|
|
43
|
+
try {
|
|
44
|
+
process.kill(-this.pgid, sig);
|
|
45
|
+
return "sent";
|
|
46
|
+
}
|
|
47
|
+
catch (err) {
|
|
48
|
+
if (isEsrch(err)) {
|
|
49
|
+
this.#state = "retired";
|
|
50
|
+
return "retired";
|
|
51
|
+
}
|
|
52
|
+
return "failed";
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Probe every GROUP_EXIT_PROBE_INTERVAL_MS for at most `waitMs`. The first
|
|
57
|
+
* probe that shows the group alive triggers one group SIGKILL. ESRCH is the
|
|
58
|
+
* only proof of exit. EPERM never triggers SIGKILL and never means exited,
|
|
59
|
+
* but it is not terminal either: on macOS a group holding only unreaped
|
|
60
|
+
* zombies answers EPERM briefly before ESRCH. A sweep requested while one is
|
|
61
|
+
* in flight joins it rather than starting a second escalation.
|
|
62
|
+
*/
|
|
63
|
+
sweep(waitMs = GROUP_EXIT_CONFIRM_WAIT_MS) {
|
|
64
|
+
if (this.#state === "retired")
|
|
65
|
+
return Promise.resolve({ exited: true });
|
|
66
|
+
if (this.pgid === undefined)
|
|
67
|
+
return Promise.resolve({ exited: false });
|
|
68
|
+
if (this.#inflight !== undefined)
|
|
69
|
+
return this.#inflight;
|
|
70
|
+
const run = this.#runSweep(this.pgid, waitMs).then((result) => {
|
|
71
|
+
this.#inflight = undefined;
|
|
72
|
+
// Retirement is absorbing: a concurrent ESRCH outranks this sweep's outcome.
|
|
73
|
+
if (this.#state === "retired")
|
|
74
|
+
return { exited: true };
|
|
75
|
+
if (!result.exited) {
|
|
76
|
+
this.#state = "unconfirmed";
|
|
77
|
+
for (const listener of [...this.#unconfirmedListeners])
|
|
78
|
+
listener();
|
|
79
|
+
}
|
|
80
|
+
return result;
|
|
81
|
+
});
|
|
82
|
+
this.#inflight = run;
|
|
83
|
+
return run;
|
|
84
|
+
}
|
|
85
|
+
/** Called after every sweep that ends without proof of exit. */
|
|
86
|
+
onUnconfirmed(listener) {
|
|
87
|
+
this.#unconfirmedListeners.add(listener);
|
|
88
|
+
return () => {
|
|
89
|
+
this.#unconfirmedListeners.delete(listener);
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
async #runSweep(pgid, waitMs) {
|
|
93
|
+
const deadline = Date.now() + waitMs;
|
|
94
|
+
let killSent = false;
|
|
95
|
+
for (;;) {
|
|
96
|
+
// A concurrent `signal()` can retire the group while this sweep sleeps.
|
|
97
|
+
if (this.#state === "retired")
|
|
98
|
+
return { exited: true };
|
|
99
|
+
let alive = false;
|
|
100
|
+
try {
|
|
101
|
+
process.kill(-pgid, 0);
|
|
102
|
+
alive = true;
|
|
103
|
+
}
|
|
104
|
+
catch (err) {
|
|
105
|
+
if (isEsrch(err)) {
|
|
106
|
+
this.#state = "retired";
|
|
107
|
+
return { exited: true };
|
|
108
|
+
}
|
|
109
|
+
// EPERM (or anything other than ESRCH) proves nothing about exit.
|
|
110
|
+
}
|
|
111
|
+
if (alive && !killSent) {
|
|
112
|
+
killSent = true;
|
|
113
|
+
try {
|
|
114
|
+
process.kill(-pgid, "SIGKILL");
|
|
115
|
+
}
|
|
116
|
+
catch (err) {
|
|
117
|
+
if (isEsrch(err)) {
|
|
118
|
+
this.#state = "retired";
|
|
119
|
+
return { exited: true };
|
|
120
|
+
}
|
|
121
|
+
// Otherwise the next probe decides.
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
if (Date.now() >= deadline)
|
|
125
|
+
return { exited: false };
|
|
126
|
+
await new Promise((r) => setTimeout(r, GROUP_EXIT_PROBE_INTERVAL_MS));
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
const handles = new WeakMap();
|
|
131
|
+
/** Record the group handle for a just-spawned `detached` child. */
|
|
132
|
+
export function trackProcessGroup(child, options) {
|
|
133
|
+
const handle = new ProcessGroupHandle(child.pid, options.probeFirst);
|
|
134
|
+
handles.set(child, handle);
|
|
135
|
+
return handle;
|
|
136
|
+
}
|
|
137
|
+
/** The child's handle; children registered without tracking get a plain one. */
|
|
138
|
+
export function processGroupHandleFor(child) {
|
|
139
|
+
let handle = handles.get(child);
|
|
140
|
+
if (handle === undefined) {
|
|
141
|
+
handle = new ProcessGroupHandle(child.pid);
|
|
142
|
+
handles.set(child, handle);
|
|
143
|
+
}
|
|
144
|
+
return handle;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* One-shot sweep of the group led by `pid`, with no retained state. Supervised
|
|
148
|
+
* children use their tracked handle instead so retirement is shared.
|
|
149
|
+
*/
|
|
150
|
+
export function confirmProcessGroupExit(pid, waitMs = GROUP_EXIT_CONFIRM_WAIT_MS) {
|
|
151
|
+
return new ProcessGroupHandle(pid, true).sweep(waitMs);
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=process-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process-group.js","sourceRoot":"","sources":["../src/process-group.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,26 +1,10 @@
|
|
|
1
|
-
export
|
|
2
|
-
/** Give up rather than block an MCP request forever on a contended session. */
|
|
3
|
-
export declare const LOCK_ACQUIRE_TIMEOUT_MS = 10000;
|
|
4
|
-
/**
|
|
5
|
-
* How often a holder refreshes its own lock's mtime. This is what makes a lock
|
|
6
|
-
* observably ALIVE to a reader that cannot probe our PID, and it is also what
|
|
7
|
-
* lets a stolen-from holder notice and abort. Matches the interval the workflow
|
|
8
|
-
* `run.lock` and the dashboard credential store already use.
|
|
9
|
-
*/
|
|
10
|
-
export declare const LOCK_HEARTBEAT_MS = 10000;
|
|
11
|
-
/**
|
|
12
|
-
* Floor for the foreign-host staleness window. A lock is only judged abandoned
|
|
13
|
-
* on heartbeat evidence once it has missed several beats AND at least this long
|
|
14
|
-
* has passed, so ordinary scheduling jitter never looks like death.
|
|
15
|
-
*/
|
|
16
|
-
export declare const LOCK_HEARTBEAT_STALE_FLOOR_MS = 60000;
|
|
1
|
+
export { LOCK_FILENAME, LOCK_ACQUIRE_TIMEOUT_MS } from "../../clinkx-workflows/dist/settings/lock.js";
|
|
17
2
|
/**
|
|
18
3
|
* A holder's live claim on the critical section.
|
|
19
4
|
*
|
|
20
|
-
* `assertHeld` is not decoration
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* which a stolen-from holder can still commit down to the syscall that follows.
|
|
5
|
+
* `assertHeld` is not decoration: callers that are about to make a durable
|
|
6
|
+
* change must re-establish ownership immediately beforehand. See the shared
|
|
7
|
+
* lock core for the full rationale.
|
|
24
8
|
*/
|
|
25
9
|
export interface SessionLockGuard {
|
|
26
10
|
assertHeld(): Promise<void>;
|
|
@@ -28,46 +12,20 @@ export interface SessionLockGuard {
|
|
|
28
12
|
/**
|
|
29
13
|
* Run `fn` while holding an exclusive cross-process lock on `sessionDir`.
|
|
30
14
|
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* RECLAMATION REQUIRES PROOF, NOT AGE. `O_EXCL` arbitrates creation only, so an
|
|
40
|
-
* unconditional unlink of a lock merely judged old is unsafe: two contenders can
|
|
41
|
-
* both judge the same abandoned lock, the first can unlink-recreate-and-enter,
|
|
42
|
-
* and the second's already-justified unlink then deletes the FIRST's live lock
|
|
43
|
-
* and lets it enter too. Both would then read the same revision, both pass the
|
|
44
|
-
* CAS, and one write would be silently lost. So a lock is reclaimed only on
|
|
45
|
-
* positive evidence of death: a dead PID on this host, or — for a lock written
|
|
46
|
-
* on another host, where no probe is possible — a heartbeat that has been
|
|
47
|
-
* missing for several declared intervals. Every other case waits. A holder that
|
|
48
|
-
* declared no heartbeat is never reclaimed on silence, which is what keeps a
|
|
49
|
-
* lock written by an older producer safe. Evidence alone is still not enough to
|
|
50
|
-
* make two simultaneous reclaimers safe, so the unlink itself is serialized
|
|
51
|
-
* behind a second `O_EXCL` file (`reclaimAbandonedLock`).
|
|
52
|
-
*
|
|
53
|
-
* Release is ownership-checked: the holder re-reads the lock body and unlinks
|
|
54
|
-
* only if the token is still its own, so a holder that was stolen from does not
|
|
55
|
-
* normally delete the new owner's lock. Node exposes no atomic
|
|
56
|
-
* compare-and-unlink, so that check is read-then-unlink and a steal landing
|
|
57
|
-
* inside that window is still possible; the guarantee is "will not", not
|
|
58
|
-
* "cannot".
|
|
15
|
+
* Thin wrapper (P9/R1): the exclusion primitive, the fail-closed foreign-host
|
|
16
|
+
* rule, the link-published atomic lock body and the steal-lock-serialized
|
|
17
|
+
* reclaim all live in ONE place — the settings lock in clinkx-workflows — so
|
|
18
|
+
* the two surfaces cannot drift apart again. This module only adapts that core
|
|
19
|
+
* to the progress-report surface: `warn` goes to the root logger, and
|
|
20
|
+
* `SettingsLockError` (the cw package must not import root error classes)
|
|
21
|
+
* maps onto `ExecutionError` with the message kept verbatim, including the
|
|
22
|
+
* lock path and the manual `rm` recovery step a foreign-host timeout names.
|
|
59
23
|
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
* the repo already accepts for `run.lock` and `contained-file.ts`. The steal
|
|
66
|
-
* lock adds one of its own: a process that dies while holding `.lock.steal`
|
|
67
|
-
* leaves it behind, which disables AUTOMATIC RECLAMATION for that session —
|
|
68
|
-
* normal acquisition and release are unaffected — until an operator removes the
|
|
69
|
-
* file. That is strictly the better failure mode: a session that needs a manual
|
|
70
|
-
* unwedge, rather than two writers in the critical section.
|
|
24
|
+
* A legacy lock body written by an older build of THIS module is still
|
|
25
|
+
* reclaimed: lock identity is `token`/`pid`/`hostname`, which the old
|
|
26
|
+
* snake_case body (`acquired_at`, `heartbeat_interval_ms`) already carries,
|
|
27
|
+
* and the shared core tolerates the missing camelCase `startedAt` — pinned by
|
|
28
|
+
* a test so same-host dead-PID reclaim keeps working across an upgrade.
|
|
71
29
|
*/
|
|
72
30
|
export declare function withSessionLock<T>(sessionDir: string, fn: (guard: SessionLockGuard) => Promise<T>, options?: {
|
|
73
31
|
readonly acquireTimeoutMs?: number;
|
|
@@ -1,343 +1,39 @@
|
|
|
1
|
-
import { randomBytes } from "node:crypto";
|
|
2
|
-
import { open, readFile, stat, unlink, utimes } from "node:fs/promises";
|
|
3
|
-
import { hostname } from "node:os";
|
|
4
|
-
import { join } from "node:path";
|
|
5
1
|
import { ExecutionError } from "../errors.js";
|
|
6
2
|
import { logger } from "../logger.js";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export const LOCK_ACQUIRE_TIMEOUT_MS = 10_000;
|
|
10
|
-
/**
|
|
11
|
-
* How often a holder refreshes its own lock's mtime. This is what makes a lock
|
|
12
|
-
* observably ALIVE to a reader that cannot probe our PID, and it is also what
|
|
13
|
-
* lets a stolen-from holder notice and abort. Matches the interval the workflow
|
|
14
|
-
* `run.lock` and the dashboard credential store already use.
|
|
15
|
-
*/
|
|
16
|
-
export const LOCK_HEARTBEAT_MS = 10_000;
|
|
17
|
-
/**
|
|
18
|
-
* Floor for the foreign-host staleness window. A lock is only judged abandoned
|
|
19
|
-
* on heartbeat evidence once it has missed several beats AND at least this long
|
|
20
|
-
* has passed, so ordinary scheduling jitter never looks like death.
|
|
21
|
-
*/
|
|
22
|
-
export const LOCK_HEARTBEAT_STALE_FLOOR_MS = 60_000;
|
|
23
|
-
/** An mtime this far in the future means clock skew, not liveness evidence. */
|
|
24
|
-
const LOCK_FUTURE_MTIME_TOLERANCE_MS = 60_000;
|
|
25
|
-
const RETRY_BASE_MS = 15;
|
|
26
|
-
const RETRY_JITTER_MS = 20;
|
|
27
|
-
function sleep(ms) {
|
|
28
|
-
return new Promise((resolve) => {
|
|
29
|
-
setTimeout(resolve, ms);
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
async function readLockBody(lockPath) {
|
|
33
|
-
try {
|
|
34
|
-
const raw = await readFile(lockPath, "utf8");
|
|
35
|
-
const parsed = JSON.parse(raw);
|
|
36
|
-
if (typeof parsed !== "object" || parsed === null)
|
|
37
|
-
return null;
|
|
38
|
-
const record = parsed;
|
|
39
|
-
const token = record["token"];
|
|
40
|
-
const pid = record["pid"];
|
|
41
|
-
const host = record["hostname"];
|
|
42
|
-
if (typeof token !== "string" || token === "")
|
|
43
|
-
return null;
|
|
44
|
-
const interval = record["heartbeat_interval_ms"];
|
|
45
|
-
return {
|
|
46
|
-
token,
|
|
47
|
-
pid: typeof pid === "number" && Number.isInteger(pid) && pid > 0 ? pid : 0,
|
|
48
|
-
hostname: typeof host === "string" ? host : "",
|
|
49
|
-
acquired_at: typeof record["acquired_at"] === "string" ? record["acquired_at"] : "",
|
|
50
|
-
heartbeat_interval_ms: typeof interval === "number" && Number.isFinite(interval) && interval > 0 ? interval : 0,
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
catch {
|
|
54
|
-
// Absent, unreadable, or unparseable: never provably ours, never provably dead.
|
|
55
|
-
return null;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
async function readLockToken(lockPath) {
|
|
59
|
-
return (await readLockBody(lockPath))?.token ?? null;
|
|
60
|
-
}
|
|
61
|
-
/** Serializes the one destructive step in this module. See `reclaimAbandonedLock`. */
|
|
62
|
-
const STEAL_LOCK_SUFFIX = ".steal";
|
|
63
|
-
function stealPathFor(lockPath) {
|
|
64
|
-
return `${lockPath}${STEAL_LOCK_SUFFIX}`;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Delete an abandoned lock, but only ever one contender at a time.
|
|
68
|
-
*
|
|
69
|
-
* Reclamation is the one destructive step here, so it gets its own `O_EXCL`
|
|
70
|
-
* file. Without it two contenders can both observe the SAME dead lock and both
|
|
71
|
-
* authorize an unlink; the first unlinks, recreates and enters, and the second's
|
|
72
|
-
* already-authorized unlink then lands on the winner's LIVE lock and lets it
|
|
73
|
-
* enter too. Both would read the same revision, both pass the CAS, and one
|
|
74
|
-
* update would be silently lost. Re-reading the token narrows that window but
|
|
75
|
-
* cannot close it, because the winner's unlink+create can land between the
|
|
76
|
-
* loser's read and its unlink. Holding the steal lock across the re-read makes
|
|
77
|
-
* the check-and-delete indivisible with respect to other reclaimers.
|
|
78
|
-
*
|
|
79
|
-
* Reports the REAL outcome, which is also the caller's "progress was made"
|
|
80
|
-
* signal. Reporting success on an unlink that did not happen would be worse
|
|
81
|
-
* than useless: the caller skips its backoff and immediately re-observes the
|
|
82
|
-
* same undeletable lock, so a lock that is readable but cannot be removed spins
|
|
83
|
-
* for the whole deadline at full CPU, emitting one untruthful "reclaiming"
|
|
84
|
-
* warn per iteration into the MCP client's captured stderr.
|
|
85
|
-
*/
|
|
86
|
-
async function reclaimAbandonedLock(lockPath, observedToken) {
|
|
87
|
-
const stealPath = stealPathFor(lockPath);
|
|
88
|
-
let handle;
|
|
89
|
-
try {
|
|
90
|
-
handle = await open(stealPath, "wx", 0o600);
|
|
91
|
-
}
|
|
92
|
-
catch (err) {
|
|
93
|
-
// Another contender is already reclaiming (or the steal lock is stranded);
|
|
94
|
-
// either way this contender waits rather than racing it. The errno is
|
|
95
|
-
// carried out because EEXIST (a real contender) and EACCES/EROFS/ENOSPC/
|
|
96
|
-
// ENOENT (the steal lock was never created at all) need different operator
|
|
97
|
-
// advice, and only the former makes "remove that file" sound guidance.
|
|
98
|
-
return {
|
|
99
|
-
kind: "steal_lock_unavailable",
|
|
100
|
-
code: err.code ?? "unknown",
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
try {
|
|
104
|
-
// Re-read UNDER the steal lock: if the winner already replaced the dead
|
|
105
|
-
// lock, the token no longer matches and we must not touch it.
|
|
106
|
-
if ((await readLockToken(lockPath)) !== observedToken)
|
|
107
|
-
return { kind: "superseded" };
|
|
108
|
-
try {
|
|
109
|
-
await unlink(lockPath);
|
|
110
|
-
return { kind: "reclaimed" };
|
|
111
|
-
}
|
|
112
|
-
catch (err) {
|
|
113
|
-
// ENOENT means somebody else already removed it, which IS progress.
|
|
114
|
-
// Anything else (an immutable flag, EPERM, a read-only mount) is a
|
|
115
|
-
// failure and must not be dressed up as a reclamation.
|
|
116
|
-
const code = err.code;
|
|
117
|
-
return code === "ENOENT" ? { kind: "reclaimed" } : { kind: "unlink_failed", code: code ?? "unknown" };
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
finally {
|
|
121
|
-
// A close() that rejects (EIO, ENOSPC) must not skip the unlink: stranding
|
|
122
|
-
// our OWN steal lock would trigger by accident the exact residual this
|
|
123
|
-
// design documents as its worst failure mode, and would escape
|
|
124
|
-
// `withSessionLock` as a raw unwrapped errno.
|
|
125
|
-
await handle.close().catch(() => undefined);
|
|
126
|
-
await unlink(stealPath).catch((err) => {
|
|
127
|
-
// Stranding this file disables automatic reclamation for the session until
|
|
128
|
-
// an operator removes it. That residual is documented, but swallowing it
|
|
129
|
-
// silently means it only ever surfaces to a LATER contender's timeout.
|
|
130
|
-
logger.warn({ stealPath, err: err.message }, "progress-report: could not remove the reclaim lock; automatic reclamation is disabled for this session until it is deleted");
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
/** Alive unless the OS positively says the process is gone. */
|
|
135
|
-
function sameHostProcessIsDead(pid) {
|
|
136
|
-
if (pid <= 0)
|
|
137
|
-
return false;
|
|
138
|
-
try {
|
|
139
|
-
process.kill(pid, 0);
|
|
140
|
-
return false;
|
|
141
|
-
}
|
|
142
|
-
catch (err) {
|
|
143
|
-
// EPERM means it exists and belongs to someone else — alive, not dead.
|
|
144
|
-
return err.code === "ESRCH";
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Decide whether the lock on disk may be reclaimed. Reclamation requires
|
|
149
|
-
* POSITIVE EVIDENCE OF DEATH; every ambiguity resolves to "unknown", which
|
|
150
|
-
* waits. A bare mtime age is never sufficient on its own.
|
|
151
|
-
*/
|
|
152
|
-
async function observeLock(lockPath) {
|
|
153
|
-
const body = await readLockBody(lockPath);
|
|
154
|
-
if (body === null) {
|
|
155
|
-
return { kind: "unknown", why: "lock body is absent, unreadable, or malformed" };
|
|
156
|
-
}
|
|
157
|
-
// Same host: the PID probe is the strongest possible evidence, so it wins
|
|
158
|
-
// outright and no heartbeat is consulted.
|
|
159
|
-
if (body.hostname !== "" && body.hostname === hostname()) {
|
|
160
|
-
return sameHostProcessIsDead(body.pid)
|
|
161
|
-
? { kind: "abandoned", token: body.token, why: `owner pid ${String(body.pid)} is gone` }
|
|
162
|
-
: { kind: "live" };
|
|
163
|
-
}
|
|
164
|
-
// Foreign host (or an unrecorded one): we cannot probe the process, so the
|
|
165
|
-
// only admissible evidence is a heartbeat the holder promised to send.
|
|
166
|
-
if (body.heartbeat_interval_ms <= 0) {
|
|
167
|
-
return { kind: "unknown", why: "holder declared no heartbeat, so silence proves nothing" };
|
|
168
|
-
}
|
|
169
|
-
const stats = await stat(lockPath).catch(() => null);
|
|
170
|
-
if (stats === null) {
|
|
171
|
-
return { kind: "unknown", why: "lock vanished while being observed" };
|
|
172
|
-
}
|
|
173
|
-
const ageMs = Date.now() - stats.mtimeMs;
|
|
174
|
-
if (ageMs < -LOCK_FUTURE_MTIME_TOLERANCE_MS) {
|
|
175
|
-
return { kind: "unknown", why: "lock mtime is in the future; clocks disagree" };
|
|
176
|
-
}
|
|
177
|
-
const staleAfterMs = Math.max(LOCK_HEARTBEAT_STALE_FLOOR_MS, body.heartbeat_interval_ms * 6);
|
|
178
|
-
return ageMs > staleAfterMs
|
|
179
|
-
? {
|
|
180
|
-
kind: "abandoned",
|
|
181
|
-
token: body.token,
|
|
182
|
-
why: `no heartbeat for ${String(Math.round(ageMs))}ms (stale after ${String(staleAfterMs)}ms)`,
|
|
183
|
-
}
|
|
184
|
-
: { kind: "live" };
|
|
185
|
-
}
|
|
3
|
+
import { SettingsLockError, withSettingsLock, } from "../../clinkx-workflows/dist/settings/lock.js";
|
|
4
|
+
export { LOCK_FILENAME, LOCK_ACQUIRE_TIMEOUT_MS } from "../../clinkx-workflows/dist/settings/lock.js";
|
|
186
5
|
/**
|
|
187
6
|
* Run `fn` while holding an exclusive cross-process lock on `sessionDir`.
|
|
188
7
|
*
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
*
|
|
8
|
+
* Thin wrapper (P9/R1): the exclusion primitive, the fail-closed foreign-host
|
|
9
|
+
* rule, the link-published atomic lock body and the steal-lock-serialized
|
|
10
|
+
* reclaim all live in ONE place — the settings lock in clinkx-workflows — so
|
|
11
|
+
* the two surfaces cannot drift apart again. This module only adapts that core
|
|
12
|
+
* to the progress-report surface: `warn` goes to the root logger, and
|
|
13
|
+
* `SettingsLockError` (the cw package must not import root error classes)
|
|
14
|
+
* maps onto `ExecutionError` with the message kept verbatim, including the
|
|
15
|
+
* lock path and the manual `rm` recovery step a foreign-host timeout names.
|
|
196
16
|
*
|
|
197
|
-
*
|
|
198
|
-
*
|
|
199
|
-
*
|
|
200
|
-
* and the
|
|
201
|
-
*
|
|
202
|
-
* CAS, and one write would be silently lost. So a lock is reclaimed only on
|
|
203
|
-
* positive evidence of death: a dead PID on this host, or — for a lock written
|
|
204
|
-
* on another host, where no probe is possible — a heartbeat that has been
|
|
205
|
-
* missing for several declared intervals. Every other case waits. A holder that
|
|
206
|
-
* declared no heartbeat is never reclaimed on silence, which is what keeps a
|
|
207
|
-
* lock written by an older producer safe. Evidence alone is still not enough to
|
|
208
|
-
* make two simultaneous reclaimers safe, so the unlink itself is serialized
|
|
209
|
-
* behind a second `O_EXCL` file (`reclaimAbandonedLock`).
|
|
210
|
-
*
|
|
211
|
-
* Release is ownership-checked: the holder re-reads the lock body and unlinks
|
|
212
|
-
* only if the token is still its own, so a holder that was stolen from does not
|
|
213
|
-
* normally delete the new owner's lock. Node exposes no atomic
|
|
214
|
-
* compare-and-unlink, so that check is read-then-unlink and a steal landing
|
|
215
|
-
* inside that window is still possible; the guarantee is "will not", not
|
|
216
|
-
* "cannot".
|
|
217
|
-
*
|
|
218
|
-
* Honest residuals, all accepted under a single-user local-filesystem model:
|
|
219
|
-
* `O_EXCL` is not reliable on some network filesystems (NFSv2/v3); a PID can be
|
|
220
|
-
* recycled, so a probe can report a live process that is not the original
|
|
221
|
-
* holder; and a holder suspended (SIGSTOP, a paused container) stops beating and
|
|
222
|
-
* looks abandoned to a foreign-host reader. These are the same class of residual
|
|
223
|
-
* the repo already accepts for `run.lock` and `contained-file.ts`. The steal
|
|
224
|
-
* lock adds one of its own: a process that dies while holding `.lock.steal`
|
|
225
|
-
* leaves it behind, which disables AUTOMATIC RECLAMATION for that session —
|
|
226
|
-
* normal acquisition and release are unaffected — until an operator removes the
|
|
227
|
-
* file. That is strictly the better failure mode: a session that needs a manual
|
|
228
|
-
* unwedge, rather than two writers in the critical section.
|
|
17
|
+
* A legacy lock body written by an older build of THIS module is still
|
|
18
|
+
* reclaimed: lock identity is `token`/`pid`/`hostname`, which the old
|
|
19
|
+
* snake_case body (`acquired_at`, `heartbeat_interval_ms`) already carries,
|
|
20
|
+
* and the shared core tolerates the missing camelCase `startedAt` — pinned by
|
|
21
|
+
* a test so same-host dead-PID reclaim keeps working across an upgrade.
|
|
229
22
|
*/
|
|
230
23
|
export async function withSessionLock(sessionDir, fn, options = {}) {
|
|
231
|
-
const lockPath = join(sessionDir, LOCK_FILENAME);
|
|
232
|
-
const token = randomBytes(16).toString("hex");
|
|
233
|
-
const acquireTimeoutMs = options.acquireTimeoutMs ?? LOCK_ACQUIRE_TIMEOUT_MS;
|
|
234
|
-
const deadline = Date.now() + acquireTimeoutMs;
|
|
235
|
-
// Carried into the timeout message. Without it every failure reads "locked by
|
|
236
|
-
// another writer", including the one case where there provably is no other
|
|
237
|
-
// writer — a stranded `.lock.steal` blocking the reclamation of a dead
|
|
238
|
-
// holder's lock — which points the operator at the wrong file for the single
|
|
239
|
-
// failure mode this design introduces.
|
|
240
|
-
let lastObservation = "the lock was not observed before the deadline";
|
|
241
|
-
for (;;) {
|
|
242
|
-
if (Date.now() >= deadline) {
|
|
243
|
-
throw new ExecutionError(`progress report session is locked by another writer and did not release within ${String(acquireTimeoutMs)}ms; ${lastObservation}`);
|
|
244
|
-
}
|
|
245
|
-
let created = false;
|
|
246
|
-
try {
|
|
247
|
-
const handle = await open(lockPath, "wx", 0o600);
|
|
248
|
-
try {
|
|
249
|
-
const body = {
|
|
250
|
-
token,
|
|
251
|
-
pid: process.pid,
|
|
252
|
-
hostname: hostname(),
|
|
253
|
-
acquired_at: new Date().toISOString(),
|
|
254
|
-
heartbeat_interval_ms: LOCK_HEARTBEAT_MS,
|
|
255
|
-
};
|
|
256
|
-
created = true;
|
|
257
|
-
await handle.writeFile(JSON.stringify(body), "utf8");
|
|
258
|
-
}
|
|
259
|
-
finally {
|
|
260
|
-
await handle.close();
|
|
261
|
-
}
|
|
262
|
-
break;
|
|
263
|
-
}
|
|
264
|
-
catch (err) {
|
|
265
|
-
const code = err.code;
|
|
266
|
-
if (code !== "EEXIST") {
|
|
267
|
-
// We created the lock but could not write its body (ENOSPC, EIO). Leaving
|
|
268
|
-
// it behind would strand every future writer behind a fresh-looking lock
|
|
269
|
-
// that nobody owns and no PID probe can ever clear.
|
|
270
|
-
if (created)
|
|
271
|
-
await unlink(lockPath).catch(() => undefined);
|
|
272
|
-
throw err;
|
|
273
|
-
}
|
|
274
|
-
const observation = await observeLock(lockPath);
|
|
275
|
-
if (observation.kind === "abandoned") {
|
|
276
|
-
const outcome = await reclaimAbandonedLock(lockPath, observation.token);
|
|
277
|
-
if (outcome.kind === "reclaimed") {
|
|
278
|
-
lastObservation = `the lock was abandoned (${observation.why}) and was reclaimed`;
|
|
279
|
-
logger.warn({ lockPath, reason: observation.why }, "progress-report: reclaiming abandoned session lock");
|
|
280
|
-
// Real progress was made, so retry immediately rather than sleeping.
|
|
281
|
-
continue;
|
|
282
|
-
}
|
|
283
|
-
// Reclamation was declined or lost: fall through to the backoff, so a
|
|
284
|
-
// repeatedly-failing reclaim waits out the deadline instead of spinning.
|
|
285
|
-
lastObservation =
|
|
286
|
-
outcome.kind === "steal_lock_unavailable"
|
|
287
|
-
? outcome.code === "EEXIST"
|
|
288
|
-
? `the lock looks abandoned (${observation.why}) but reclamation was declined because the reclaim lock ${stealPathFor(lockPath)} already exists — if no writer is running, remove that file`
|
|
289
|
-
: `the lock looks abandoned (${observation.why}) but the reclaim lock ${stealPathFor(lockPath)} could not be created (${outcome.code})`
|
|
290
|
-
: outcome.kind === "superseded"
|
|
291
|
-
? `the lock looked abandoned (${observation.why}) but another writer replaced it first`
|
|
292
|
-
: `the lock looks abandoned (${observation.why}) but it could not be deleted (${outcome.code})`;
|
|
293
|
-
}
|
|
294
|
-
else {
|
|
295
|
-
lastObservation =
|
|
296
|
-
observation.kind === "live"
|
|
297
|
-
? "the lock is held by a writer that still looks alive"
|
|
298
|
-
: `the lock could not be judged abandoned: ${observation.why}`;
|
|
299
|
-
}
|
|
300
|
-
await sleep(RETRY_BASE_MS + Math.floor(Math.random() * RETRY_JITTER_MS));
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
let ownershipLost = false;
|
|
304
|
-
let beating;
|
|
305
|
-
const heartbeat = setInterval(() => {
|
|
306
|
-
if (ownershipLost || beating !== undefined)
|
|
307
|
-
return;
|
|
308
|
-
const beat = (async () => {
|
|
309
|
-
const current = await readLockToken(lockPath);
|
|
310
|
-
if (current !== null && current !== token) {
|
|
311
|
-
// PROVEN loss: a complete, readable body whose token is not ours. An
|
|
312
|
-
// unreadable or absent lock is NOT proof and must not revoke our claim.
|
|
313
|
-
ownershipLost = true;
|
|
314
|
-
logger.warn({ lockPath }, "progress-report: session lock was taken from us");
|
|
315
|
-
return;
|
|
316
|
-
}
|
|
317
|
-
const at = new Date();
|
|
318
|
-
await utimes(lockPath, at, at).catch(() => undefined);
|
|
319
|
-
})().finally(() => {
|
|
320
|
-
beating = undefined;
|
|
321
|
-
});
|
|
322
|
-
beating = beat;
|
|
323
|
-
}, LOCK_HEARTBEAT_MS);
|
|
324
|
-
heartbeat.unref();
|
|
325
|
-
const guard = {
|
|
326
|
-
async assertHeld() {
|
|
327
|
-
if (ownershipLost || (await readLockToken(lockPath)) !== token) {
|
|
328
|
-
throw new ExecutionError("progress report session lock was reclaimed by another writer mid-update; nothing was written — re-read the report and retry");
|
|
329
|
-
}
|
|
330
|
-
},
|
|
331
|
-
};
|
|
332
24
|
try {
|
|
333
|
-
return await fn
|
|
25
|
+
return await withSettingsLock(sessionDir, fn, {
|
|
26
|
+
acquireTimeoutMs: options.acquireTimeoutMs,
|
|
27
|
+
warn: (fields, message) => {
|
|
28
|
+
logger.warn({ ...fields, component: "progress-report-lock" }, message);
|
|
29
|
+
},
|
|
30
|
+
});
|
|
334
31
|
}
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
if ((await readLockToken(lockPath)) === token) {
|
|
339
|
-
await unlink(lockPath).catch(() => undefined);
|
|
32
|
+
catch (err) {
|
|
33
|
+
if (err instanceof SettingsLockError) {
|
|
34
|
+
throw new ExecutionError(err.message);
|
|
340
35
|
}
|
|
36
|
+
throw err;
|
|
341
37
|
}
|
|
342
38
|
}
|
|
343
39
|
//# sourceMappingURL=lock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lock.js","sourceRoot":"","sources":["../../src/progress-report/lock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"lock.js","sourceRoot":"","sources":["../../src/progress-report/lock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EACL,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,8CAA8C,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AAatG;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,UAAkB,EAClB,EAA2C,EAC3C,UAAkD,EAAE;IAEpD,IAAI,CAAC;QACH,OAAO,MAAM,gBAAgB,CAAC,UAAU,EAAE,EAAE,EAAE;YAC5C,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;YAC1C,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE;gBACxB,MAAM,CAAC,IAAI,CAAC,EAAE,GAAG,MAAM,EAAE,SAAS,EAAE,sBAAsB,EAAE,EAAE,OAAO,CAAC,CAAC;YACzE,CAAC;SACF,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,GAAY,EAAE,CAAC;QACtB,IAAI,GAAG,YAAY,iBAAiB,EAAE,CAAC;YACrC,MAAM,IAAI,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACxC,CAAC;QACD,MAAM,GAAG,CAAC;IACZ,CAAC;AACH,CAAC"}
|