@gpustack/loopwright 0.0.0-stage → 0.0.3
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/LICENSE +191 -0
- package/README.md +356 -2
- package/bin/loopwright.js +3 -0
- package/node_modules/@loopwright/agent-pi/dist/adapter-v2.d.ts +9 -0
- package/node_modules/@loopwright/agent-pi/dist/adapter-v2.js +122 -0
- package/node_modules/@loopwright/agent-pi/dist/adapter.d.ts +30 -0
- package/node_modules/@loopwright/agent-pi/dist/adapter.js +340 -0
- package/node_modules/@loopwright/agent-pi/dist/admission.d.ts +25 -0
- package/node_modules/@loopwright/agent-pi/dist/admission.js +65 -0
- package/node_modules/@loopwright/agent-pi/dist/artifacts.d.ts +15 -0
- package/node_modules/@loopwright/agent-pi/dist/artifacts.js +76 -0
- package/node_modules/@loopwright/agent-pi/dist/boundary.d.ts +18 -0
- package/node_modules/@loopwright/agent-pi/dist/boundary.js +113 -0
- package/node_modules/@loopwright/agent-pi/dist/broker-channel.d.ts +4 -0
- package/node_modules/@loopwright/agent-pi/dist/broker-channel.js +121 -0
- package/node_modules/@loopwright/agent-pi/dist/candidate.d.ts +96 -0
- package/node_modules/@loopwright/agent-pi/dist/candidate.js +1712 -0
- package/node_modules/@loopwright/agent-pi/dist/capture.d.ts +39 -0
- package/node_modules/@loopwright/agent-pi/dist/capture.js +146 -0
- package/node_modules/@loopwright/agent-pi/dist/cas.d.ts +51 -0
- package/node_modules/@loopwright/agent-pi/dist/cas.js +836 -0
- package/node_modules/@loopwright/agent-pi/dist/catalog-api.d.ts +3 -0
- package/node_modules/@loopwright/agent-pi/dist/catalog-api.js +2 -0
- package/node_modules/@loopwright/agent-pi/dist/catalog.d.ts +39 -0
- package/node_modules/@loopwright/agent-pi/dist/catalog.js +280 -0
- package/node_modules/@loopwright/agent-pi/dist/circuit-breaker-limits.d.ts +9 -0
- package/node_modules/@loopwright/agent-pi/dist/circuit-breaker-limits.js +12 -0
- package/node_modules/@loopwright/agent-pi/dist/containers.d.ts +29 -0
- package/node_modules/@loopwright/agent-pi/dist/containers.js +160 -0
- package/node_modules/@loopwright/agent-pi/dist/context.d.ts +56 -0
- package/node_modules/@loopwright/agent-pi/dist/context.js +351 -0
- package/node_modules/@loopwright/agent-pi/dist/daemon.d.ts +8 -0
- package/node_modules/@loopwright/agent-pi/dist/daemon.js +52 -0
- package/node_modules/@loopwright/agent-pi/dist/deadline.d.ts +6 -0
- package/node_modules/@loopwright/agent-pi/dist/deadline.js +18 -0
- package/node_modules/@loopwright/agent-pi/dist/decode-capture.d.ts +39 -0
- package/node_modules/@loopwright/agent-pi/dist/decode-capture.js +287 -0
- package/node_modules/@loopwright/agent-pi/dist/descriptor.d.ts +12 -0
- package/node_modules/@loopwright/agent-pi/dist/descriptor.js +17 -0
- package/node_modules/@loopwright/agent-pi/dist/docker-absence.d.ts +2 -0
- package/node_modules/@loopwright/agent-pi/dist/docker-absence.js +9 -0
- package/node_modules/@loopwright/agent-pi/dist/errors.d.ts +7 -0
- package/node_modules/@loopwright/agent-pi/dist/errors.js +19 -0
- package/node_modules/@loopwright/agent-pi/dist/event-sequence.d.ts +6 -0
- package/node_modules/@loopwright/agent-pi/dist/event-sequence.js +64 -0
- package/node_modules/@loopwright/agent-pi/dist/events.d.ts +19 -0
- package/node_modules/@loopwright/agent-pi/dist/events.js +132 -0
- package/node_modules/@loopwright/agent-pi/dist/execution-guard.d.ts +9 -0
- package/node_modules/@loopwright/agent-pi/dist/execution-guard.js +25 -0
- package/node_modules/@loopwright/agent-pi/dist/execution-lease.d.ts +24 -0
- package/node_modules/@loopwright/agent-pi/dist/execution-lease.js +316 -0
- package/node_modules/@loopwright/agent-pi/dist/execution.d.ts +32 -0
- package/node_modules/@loopwright/agent-pi/dist/execution.js +476 -0
- package/node_modules/@loopwright/agent-pi/dist/external-mcp.d.ts +87 -0
- package/node_modules/@loopwright/agent-pi/dist/external-mcp.js +526 -0
- package/node_modules/@loopwright/agent-pi/dist/factory-bootstrap.d.ts +15 -0
- package/node_modules/@loopwright/agent-pi/dist/factory-bootstrap.js +74 -0
- package/node_modules/@loopwright/agent-pi/dist/host-session.d.ts +51 -0
- package/node_modules/@loopwright/agent-pi/dist/host-session.js +2094 -0
- package/node_modules/@loopwright/agent-pi/dist/http-mcp.d.ts +32 -0
- package/node_modules/@loopwright/agent-pi/dist/http-mcp.js +353 -0
- package/node_modules/@loopwright/agent-pi/dist/index.d.ts +7 -0
- package/node_modules/@loopwright/agent-pi/dist/index.js +4 -0
- package/node_modules/@loopwright/agent-pi/dist/lifecycle.d.ts +13 -0
- package/node_modules/@loopwright/agent-pi/dist/lifecycle.js +11 -0
- package/node_modules/@loopwright/agent-pi/dist/mcp-process.d.ts +35 -0
- package/node_modules/@loopwright/agent-pi/dist/mcp-process.js +92 -0
- package/node_modules/@loopwright/agent-pi/dist/mcp-transport.d.ts +25 -0
- package/node_modules/@loopwright/agent-pi/dist/mcp-transport.js +63 -0
- package/node_modules/@loopwright/agent-pi/dist/mcp.d.ts +23 -0
- package/node_modules/@loopwright/agent-pi/dist/mcp.js +212 -0
- package/node_modules/@loopwright/agent-pi/dist/operation.d.ts +5 -0
- package/node_modules/@loopwright/agent-pi/dist/operation.js +28 -0
- package/node_modules/@loopwright/agent-pi/dist/policy-v2.d.ts +10 -0
- package/node_modules/@loopwright/agent-pi/dist/policy-v2.js +64 -0
- package/node_modules/@loopwright/agent-pi/dist/policy.d.ts +13 -0
- package/node_modules/@loopwright/agent-pi/dist/policy.js +260 -0
- package/node_modules/@loopwright/agent-pi/dist/preflight.d.ts +60 -0
- package/node_modules/@loopwright/agent-pi/dist/preflight.js +700 -0
- package/node_modules/@loopwright/agent-pi/dist/progress-summary.d.ts +1 -0
- package/node_modules/@loopwright/agent-pi/dist/progress-summary.js +119 -0
- package/node_modules/@loopwright/agent-pi/dist/protocol.d.ts +17 -0
- package/node_modules/@loopwright/agent-pi/dist/protocol.js +131 -0
- package/node_modules/@loopwright/agent-pi/dist/provider.d.ts +62 -0
- package/node_modules/@loopwright/agent-pi/dist/provider.js +217 -0
- package/node_modules/@loopwright/agent-pi/dist/receipt.d.ts +3 -0
- package/node_modules/@loopwright/agent-pi/dist/receipt.js +64 -0
- package/node_modules/@loopwright/agent-pi/dist/recovery.d.ts +6 -0
- package/node_modules/@loopwright/agent-pi/dist/recovery.js +188 -0
- package/node_modules/@loopwright/agent-pi/dist/resources.d.ts +13 -0
- package/node_modules/@loopwright/agent-pi/dist/resources.js +81 -0
- package/node_modules/@loopwright/agent-pi/dist/response.d.ts +20 -0
- package/node_modules/@loopwright/agent-pi/dist/response.js +259 -0
- package/node_modules/@loopwright/agent-pi/dist/runtime-profile.d.ts +6 -0
- package/node_modules/@loopwright/agent-pi/dist/runtime-profile.js +37 -0
- package/node_modules/@loopwright/agent-pi/dist/sdk-worker.d.ts +14 -0
- package/node_modules/@loopwright/agent-pi/dist/sdk-worker.js +633 -0
- package/node_modules/@loopwright/agent-pi/dist/sender.d.ts +46 -0
- package/node_modules/@loopwright/agent-pi/dist/sender.js +553 -0
- package/node_modules/@loopwright/agent-pi/dist/session-host.d.ts +21 -0
- package/node_modules/@loopwright/agent-pi/dist/session-host.js +315 -0
- package/node_modules/@loopwright/agent-pi/dist/snapshot-transfer.d.ts +14 -0
- package/node_modules/@loopwright/agent-pi/dist/snapshot-transfer.js +102 -0
- package/node_modules/@loopwright/agent-pi/dist/snapshot.d.ts +19 -0
- package/node_modules/@loopwright/agent-pi/dist/snapshot.js +121 -0
- package/node_modules/@loopwright/agent-pi/dist/tool-process.d.ts +32 -0
- package/node_modules/@loopwright/agent-pi/dist/tool-process.js +85 -0
- package/node_modules/@loopwright/agent-pi/dist/tool-worker.d.ts +2 -0
- package/node_modules/@loopwright/agent-pi/dist/tool-worker.js +105 -0
- package/node_modules/@loopwright/agent-pi/dist/tools.d.ts +36 -0
- package/node_modules/@loopwright/agent-pi/dist/tools.js +128 -0
- package/node_modules/@loopwright/agent-pi/dist/types-v2.d.ts +71 -0
- package/node_modules/@loopwright/agent-pi/dist/types-v2.js +1 -0
- package/node_modules/@loopwright/agent-pi/dist/types.d.ts +314 -0
- package/node_modules/@loopwright/agent-pi/dist/types.js +1 -0
- package/node_modules/@loopwright/agent-pi/dist/usage.d.ts +18 -0
- package/node_modules/@loopwright/agent-pi/dist/usage.js +314 -0
- package/node_modules/@loopwright/agent-pi/dist/workspace-mcp.d.ts +27 -0
- package/node_modules/@loopwright/agent-pi/dist/workspace-mcp.js +142 -0
- package/node_modules/@loopwright/agent-pi/package.json +24 -0
- package/node_modules/@loopwright/agent-pi/runtime/Dockerfile +8 -0
- package/node_modules/@loopwright/agent-pi/runtime/seccomp.json +1 -0
- package/node_modules/@loopwright/cli/dist/arguments.d.ts +19 -0
- package/node_modules/@loopwright/cli/dist/arguments.js +358 -0
- package/node_modules/@loopwright/cli/dist/closure.d.ts +93 -0
- package/node_modules/@loopwright/cli/dist/closure.js +230 -0
- package/node_modules/@loopwright/cli/dist/draft.d.ts +9 -0
- package/node_modules/@loopwright/cli/dist/draft.js +106 -0
- package/node_modules/@loopwright/cli/dist/failure-matrix.d.ts +9 -0
- package/node_modules/@loopwright/cli/dist/failure-matrix.js +701 -0
- package/node_modules/@loopwright/cli/dist/index.d.ts +6 -0
- package/node_modules/@loopwright/cli/dist/index.js +5 -0
- package/node_modules/@loopwright/cli/dist/main.d.ts +22 -0
- package/node_modules/@loopwright/cli/dist/main.js +1855 -0
- package/node_modules/@loopwright/cli/package.json +16 -0
- package/node_modules/@loopwright/controller/dist/acceptance.d.ts +43 -0
- package/node_modules/@loopwright/controller/dist/acceptance.js +446 -0
- package/node_modules/@loopwright/controller/dist/benchmark-gate.d.ts +273 -0
- package/node_modules/@loopwright/controller/dist/benchmark-gate.js +3147 -0
- package/node_modules/@loopwright/controller/dist/budget-observations.d.ts +25 -0
- package/node_modules/@loopwright/controller/dist/budget-observations.js +139 -0
- package/node_modules/@loopwright/controller/dist/bundle.d.ts +26 -0
- package/node_modules/@loopwright/controller/dist/bundle.js +64 -0
- package/node_modules/@loopwright/controller/dist/capture.d.ts +89 -0
- package/node_modules/@loopwright/controller/dist/capture.js +587 -0
- package/node_modules/@loopwright/controller/dist/compile.d.ts +3 -0
- package/node_modules/@loopwright/controller/dist/compile.js +402 -0
- package/node_modules/@loopwright/controller/dist/config.d.ts +22 -0
- package/node_modules/@loopwright/controller/dist/config.js +255 -0
- package/node_modules/@loopwright/controller/dist/controller.d.ts +177 -0
- package/node_modules/@loopwright/controller/dist/controller.js +2135 -0
- package/node_modules/@loopwright/controller/dist/credentials.d.ts +29 -0
- package/node_modules/@loopwright/controller/dist/credentials.js +189 -0
- package/node_modules/@loopwright/controller/dist/deadlines.d.ts +18 -0
- package/node_modules/@loopwright/controller/dist/deadlines.js +71 -0
- package/node_modules/@loopwright/controller/dist/errors.d.ts +27 -0
- package/node_modules/@loopwright/controller/dist/errors.js +41 -0
- package/node_modules/@loopwright/controller/dist/events.d.ts +52 -0
- package/node_modules/@loopwright/controller/dist/events.js +228 -0
- package/node_modules/@loopwright/controller/dist/files.d.ts +51 -0
- package/node_modules/@loopwright/controller/dist/files.js +386 -0
- package/node_modules/@loopwright/controller/dist/finalize.d.ts +25 -0
- package/node_modules/@loopwright/controller/dist/finalize.js +32 -0
- package/node_modules/@loopwright/controller/dist/gate.d.ts +84 -0
- package/node_modules/@loopwright/controller/dist/gate.js +640 -0
- package/node_modules/@loopwright/controller/dist/git-objects.d.ts +11 -0
- package/node_modules/@loopwright/controller/dist/git-objects.js +59 -0
- package/node_modules/@loopwright/controller/dist/git-reader.d.ts +17 -0
- package/node_modules/@loopwright/controller/dist/git-reader.js +40 -0
- package/node_modules/@loopwright/controller/dist/handlers.d.ts +6 -0
- package/node_modules/@loopwright/controller/dist/handlers.js +45 -0
- package/node_modules/@loopwright/controller/dist/handoff.d.ts +71 -0
- package/node_modules/@loopwright/controller/dist/handoff.js +554 -0
- package/node_modules/@loopwright/controller/dist/index.d.ts +41 -0
- package/node_modules/@loopwright/controller/dist/index.js +21 -0
- package/node_modules/@loopwright/controller/dist/inspect.d.ts +30 -0
- package/node_modules/@loopwright/controller/dist/inspect.js +372 -0
- package/node_modules/@loopwright/controller/dist/interpolation.d.ts +9 -0
- package/node_modules/@loopwright/controller/dist/interpolation.js +79 -0
- package/node_modules/@loopwright/controller/dist/ownership.d.ts +41 -0
- package/node_modules/@loopwright/controller/dist/ownership.js +666 -0
- package/node_modules/@loopwright/controller/dist/parser.d.ts +5 -0
- package/node_modules/@loopwright/controller/dist/parser.js +200 -0
- package/node_modules/@loopwright/controller/dist/progress.d.ts +41 -0
- package/node_modules/@loopwright/controller/dist/progress.js +904 -0
- package/node_modules/@loopwright/controller/dist/publication.d.ts +60 -0
- package/node_modules/@loopwright/controller/dist/publication.js +329 -0
- package/node_modules/@loopwright/controller/dist/reconcile.d.ts +26 -0
- package/node_modules/@loopwright/controller/dist/reconcile.js +1378 -0
- package/node_modules/@loopwright/controller/dist/recovery.d.ts +10 -0
- package/node_modules/@loopwright/controller/dist/recovery.js +315 -0
- package/node_modules/@loopwright/controller/dist/refusal-record.d.ts +43 -0
- package/node_modules/@loopwright/controller/dist/refusal-record.js +150 -0
- package/node_modules/@loopwright/controller/dist/registry.d.ts +6 -0
- package/node_modules/@loopwright/controller/dist/registry.js +374 -0
- package/node_modules/@loopwright/controller/dist/repair.d.ts +31 -0
- package/node_modules/@loopwright/controller/dist/repair.js +102 -0
- package/node_modules/@loopwright/controller/dist/report.d.ts +64 -0
- package/node_modules/@loopwright/controller/dist/report.js +596 -0
- package/node_modules/@loopwright/controller/dist/retained.d.ts +284 -0
- package/node_modules/@loopwright/controller/dist/retained.js +193 -0
- package/node_modules/@loopwright/controller/dist/rules.d.ts +31 -0
- package/node_modules/@loopwright/controller/dist/rules.js +110 -0
- package/node_modules/@loopwright/controller/dist/run-eval.d.ts +115 -0
- package/node_modules/@loopwright/controller/dist/run-eval.js +959 -0
- package/node_modules/@loopwright/controller/dist/scheduler.d.ts +10 -0
- package/node_modules/@loopwright/controller/dist/scheduler.js +41 -0
- package/node_modules/@loopwright/controller/dist/schema.d.ts +17 -0
- package/node_modules/@loopwright/controller/dist/schema.js +78 -0
- package/node_modules/@loopwright/controller/dist/source.d.ts +69 -0
- package/node_modules/@loopwright/controller/dist/source.js +872 -0
- package/node_modules/@loopwright/controller/dist/step.d.ts +38 -0
- package/node_modules/@loopwright/controller/dist/step.js +1776 -0
- package/node_modules/@loopwright/controller/dist/storage.d.ts +90 -0
- package/node_modules/@loopwright/controller/dist/storage.js +1345 -0
- package/node_modules/@loopwright/controller/dist/submission.d.ts +51 -0
- package/node_modules/@loopwright/controller/dist/submission.js +292 -0
- package/node_modules/@loopwright/controller/dist/types.d.ts +585 -0
- package/node_modules/@loopwright/controller/dist/types.js +9 -0
- package/node_modules/@loopwright/controller/dist/verification.d.ts +124 -0
- package/node_modules/@loopwright/controller/dist/verification.js +1308 -0
- package/node_modules/@loopwright/controller/dist/verifier-protocol.d.ts +105 -0
- package/node_modules/@loopwright/controller/dist/verifier-protocol.js +1312 -0
- package/node_modules/@loopwright/controller/dist/verifier-worker.d.ts +1 -0
- package/node_modules/@loopwright/controller/dist/verifier-worker.js +33 -0
- package/node_modules/@loopwright/controller/package.json +12 -0
- package/node_modules/@loopwright/core/dist/acceptance.d.ts +108 -0
- package/node_modules/@loopwright/core/dist/acceptance.js +327 -0
- package/node_modules/@loopwright/core/dist/artifacts.d.ts +63 -0
- package/node_modules/@loopwright/core/dist/artifacts.js +356 -0
- package/node_modules/@loopwright/core/dist/boundary.d.ts +21 -0
- package/node_modules/@loopwright/core/dist/boundary.js +484 -0
- package/node_modules/@loopwright/core/dist/contracts.d.ts +287 -0
- package/node_modules/@loopwright/core/dist/contracts.js +694 -0
- package/node_modules/@loopwright/core/dist/diagnostics.d.ts +21 -0
- package/node_modules/@loopwright/core/dist/diagnostics.js +51 -0
- package/node_modules/@loopwright/core/dist/evidence.d.ts +92 -0
- package/node_modules/@loopwright/core/dist/evidence.js +85 -0
- package/node_modules/@loopwright/core/dist/graph.d.ts +8 -0
- package/node_modules/@loopwright/core/dist/graph.js +44 -0
- package/node_modules/@loopwright/core/dist/identity.d.ts +162 -0
- package/node_modules/@loopwright/core/dist/identity.js +80 -0
- package/node_modules/@loopwright/core/dist/index.d.ts +30 -0
- package/node_modules/@loopwright/core/dist/index.js +39 -0
- package/node_modules/@loopwright/core/dist/limits.d.ts +99 -0
- package/node_modules/@loopwright/core/dist/limits.js +59 -0
- package/node_modules/@loopwright/core/dist/results.d.ts +161 -0
- package/node_modules/@loopwright/core/dist/results.js +98 -0
- package/node_modules/@loopwright/core/dist/scope.d.ts +13 -0
- package/node_modules/@loopwright/core/dist/scope.js +154 -0
- package/node_modules/@loopwright/core/dist/scrubber.d.ts +13 -0
- package/node_modules/@loopwright/core/dist/scrubber.js +63 -0
- package/node_modules/@loopwright/core/dist/usage.d.ts +68 -0
- package/node_modules/@loopwright/core/dist/usage.js +56 -0
- package/node_modules/@loopwright/core/package.json +12 -0
- package/node_modules/@loopwright/decisions/dist/benchmark.d.ts +23 -0
- package/node_modules/@loopwright/decisions/dist/benchmark.js +337 -0
- package/node_modules/@loopwright/decisions/dist/client.d.ts +74 -0
- package/node_modules/@loopwright/decisions/dist/client.js +292 -0
- package/node_modules/@loopwright/decisions/dist/index.d.ts +15 -0
- package/node_modules/@loopwright/decisions/dist/index.js +8 -0
- package/node_modules/@loopwright/decisions/dist/nodes.d.ts +63 -0
- package/node_modules/@loopwright/decisions/dist/nodes.js +282 -0
- package/node_modules/@loopwright/decisions/dist/primitives.d.ts +36 -0
- package/node_modules/@loopwright/decisions/dist/primitives.js +300 -0
- package/node_modules/@loopwright/decisions/dist/redaction.d.ts +23 -0
- package/node_modules/@loopwright/decisions/dist/redaction.js +146 -0
- package/node_modules/@loopwright/decisions/dist/router.d.ts +55 -0
- package/node_modules/@loopwright/decisions/dist/router.js +248 -0
- package/node_modules/@loopwright/decisions/dist/schema.d.ts +25 -0
- package/node_modules/@loopwright/decisions/dist/schema.js +536 -0
- package/node_modules/@loopwright/decisions/dist/types.d.ts +394 -0
- package/node_modules/@loopwright/decisions/dist/types.js +80 -0
- package/node_modules/@loopwright/decisions/package.json +12 -0
- package/node_modules/@loopwright/github-app/dist/action.d.ts +90 -0
- package/node_modules/@loopwright/github-app/dist/action.js +2429 -0
- package/node_modules/@loopwright/github-app/dist/config.d.ts +23 -0
- package/node_modules/@loopwright/github-app/dist/config.js +297 -0
- package/node_modules/@loopwright/github-app/dist/digests.d.ts +1 -0
- package/node_modules/@loopwright/github-app/dist/digests.js +1 -0
- package/node_modules/@loopwright/github-app/dist/index.d.ts +14 -0
- package/node_modules/@loopwright/github-app/dist/index.js +13 -0
- package/node_modules/@loopwright/github-app/dist/models-config.d.ts +1 -0
- package/node_modules/@loopwright/github-app/dist/models-config.js +1 -0
- package/node_modules/@loopwright/github-app/dist/output-format.d.ts +1 -0
- package/node_modules/@loopwright/github-app/dist/output-format.js +1 -0
- package/node_modules/@loopwright/github-app/dist/preflight.d.ts +1 -0
- package/node_modules/@loopwright/github-app/dist/preflight.js +1 -0
- package/node_modules/@loopwright/github-app/dist/publisher.d.ts +58 -0
- package/node_modules/@loopwright/github-app/dist/publisher.js +1368 -0
- package/node_modules/@loopwright/github-app/dist/qualification.d.ts +1 -0
- package/node_modules/@loopwright/github-app/dist/qualification.js +1 -0
- package/node_modules/@loopwright/github-app/dist/sandbox.d.ts +1 -0
- package/node_modules/@loopwright/github-app/dist/sandbox.js +1 -0
- package/node_modules/@loopwright/github-app/dist/schema.d.ts +1 -0
- package/node_modules/@loopwright/github-app/dist/schema.js +1 -0
- package/node_modules/@loopwright/github-app/dist/service.d.ts +52 -0
- package/node_modules/@loopwright/github-app/dist/service.js +1658 -0
- package/node_modules/@loopwright/github-app/dist/suite-pr-lookup.d.ts +90 -0
- package/node_modules/@loopwright/github-app/dist/suite-pr-lookup.js +392 -0
- package/node_modules/@loopwright/github-app/dist/taskpack.d.ts +1 -0
- package/node_modules/@loopwright/github-app/dist/taskpack.js +1 -0
- package/node_modules/@loopwright/github-app/dist/tenant-queue.d.ts +44 -0
- package/node_modules/@loopwright/github-app/dist/tenant-queue.js +423 -0
- package/node_modules/@loopwright/github-app/dist/token-broker.d.ts +50 -0
- package/node_modules/@loopwright/github-app/dist/token-broker.js +262 -0
- package/node_modules/@loopwright/github-app/dist/turnkey-memory.d.ts +35 -0
- package/node_modules/@loopwright/github-app/dist/turnkey-memory.js +1654 -0
- package/node_modules/@loopwright/github-app/dist/turnkey.d.ts +16 -0
- package/node_modules/@loopwright/github-app/dist/turnkey.js +34 -0
- package/node_modules/@loopwright/github-app/dist/types.d.ts +220 -0
- package/node_modules/@loopwright/github-app/dist/types.js +14 -0
- package/node_modules/@loopwright/github-app/dist/upstreams.d.ts +13 -0
- package/node_modules/@loopwright/github-app/dist/upstreams.js +65 -0
- package/node_modules/@loopwright/github-app/dist/webhook.d.ts +34 -0
- package/node_modules/@loopwright/github-app/dist/webhook.js +241 -0
- package/node_modules/@loopwright/github-app/dist/yaml.d.ts +1 -0
- package/node_modules/@loopwright/github-app/dist/yaml.js +1 -0
- package/node_modules/@loopwright/github-app/package.json +12 -0
- package/node_modules/@loopwright/hardware-runner/dist/config.d.ts +48 -0
- package/node_modules/@loopwright/hardware-runner/dist/config.js +719 -0
- package/node_modules/@loopwright/hardware-runner/dist/evaluator.d.ts +230 -0
- package/node_modules/@loopwright/hardware-runner/dist/evaluator.js +3178 -0
- package/node_modules/@loopwright/hardware-runner/dist/index.d.ts +13 -0
- package/node_modules/@loopwright/hardware-runner/dist/index.js +9 -0
- package/node_modules/@loopwright/hardware-runner/dist/provenance.d.ts +128 -0
- package/node_modules/@loopwright/hardware-runner/dist/provenance.js +1500 -0
- package/node_modules/@loopwright/hardware-runner/dist/queue.d.ts +81 -0
- package/node_modules/@loopwright/hardware-runner/dist/queue.js +1081 -0
- package/node_modules/@loopwright/hardware-runner/dist/relay-server.d.ts +13 -0
- package/node_modules/@loopwright/hardware-runner/dist/relay-server.js +2997 -0
- package/node_modules/@loopwright/hardware-runner/dist/types.d.ts +239 -0
- package/node_modules/@loopwright/hardware-runner/dist/types.js +12 -0
- package/node_modules/@loopwright/hardware-runner/dist/worker.d.ts +49 -0
- package/node_modules/@loopwright/hardware-runner/dist/worker.js +1648 -0
- package/node_modules/@loopwright/hardware-runner/package.json +12 -0
- package/node_modules/@loopwright/memory/dist/cas.d.ts +21 -0
- package/node_modules/@loopwright/memory/dist/cas.js +510 -0
- package/node_modules/@loopwright/memory/dist/compaction.d.ts +18 -0
- package/node_modules/@loopwright/memory/dist/compaction.js +110 -0
- package/node_modules/@loopwright/memory/dist/finalizer.d.ts +23 -0
- package/node_modules/@loopwright/memory/dist/finalizer.js +538 -0
- package/node_modules/@loopwright/memory/dist/index.d.ts +9 -0
- package/node_modules/@loopwright/memory/dist/index.js +8 -0
- package/node_modules/@loopwright/memory/dist/schema.d.ts +36 -0
- package/node_modules/@loopwright/memory/dist/schema.js +510 -0
- package/node_modules/@loopwright/memory/dist/selector.d.ts +7 -0
- package/node_modules/@loopwright/memory/dist/selector.js +157 -0
- package/node_modules/@loopwright/memory/dist/store.d.ts +51 -0
- package/node_modules/@loopwright/memory/dist/store.js +554 -0
- package/node_modules/@loopwright/memory/dist/types.d.ts +442 -0
- package/node_modules/@loopwright/memory/dist/types.js +8 -0
- package/node_modules/@loopwright/memory/dist/verifier.d.ts +5 -0
- package/node_modules/@loopwright/memory/dist/verifier.js +328 -0
- package/node_modules/@loopwright/memory/package.json +12 -0
- package/node_modules/@loopwright/state/dist/admission.d.ts +321 -0
- package/node_modules/@loopwright/state/dist/admission.js +199 -0
- package/node_modules/@loopwright/state/dist/boundary.d.ts +53 -0
- package/node_modules/@loopwright/state/dist/boundary.js +194 -0
- package/node_modules/@loopwright/state/dist/checkpoint.d.ts +16 -0
- package/node_modules/@loopwright/state/dist/checkpoint.js +84 -0
- package/node_modules/@loopwright/state/dist/clock.d.ts +8 -0
- package/node_modules/@loopwright/state/dist/clock.js +27 -0
- package/node_modules/@loopwright/state/dist/connection.d.ts +55 -0
- package/node_modules/@loopwright/state/dist/connection.js +391 -0
- package/node_modules/@loopwright/state/dist/errors.d.ts +13 -0
- package/node_modules/@loopwright/state/dist/errors.js +34 -0
- package/node_modules/@loopwright/state/dist/index.d.ts +3 -0
- package/node_modules/@loopwright/state/dist/index.js +1 -0
- package/node_modules/@loopwright/state/dist/journal.d.ts +119 -0
- package/node_modules/@loopwright/state/dist/journal.js +72 -0
- package/node_modules/@loopwright/state/dist/model.d.ts +40 -0
- package/node_modules/@loopwright/state/dist/model.js +58 -0
- package/node_modules/@loopwright/state/dist/ownership.d.ts +14 -0
- package/node_modules/@loopwright/state/dist/ownership.js +45 -0
- package/node_modules/@loopwright/state/dist/pages.d.ts +11 -0
- package/node_modules/@loopwright/state/dist/pages.js +41 -0
- package/node_modules/@loopwright/state/dist/receipts.d.ts +33 -0
- package/node_modules/@loopwright/state/dist/receipts.js +97 -0
- package/node_modules/@loopwright/state/dist/schema.d.ts +28 -0
- package/node_modules/@loopwright/state/dist/schema.js +41 -0
- package/node_modules/@loopwright/state/dist/settlement.d.ts +10 -0
- package/node_modules/@loopwright/state/dist/settlement.js +129 -0
- package/node_modules/@loopwright/state/dist/store.d.ts +52 -0
- package/node_modules/@loopwright/state/dist/store.js +100 -0
- package/node_modules/@loopwright/state/dist/types.d.ts +315 -0
- package/node_modules/@loopwright/state/dist/types.js +1 -0
- package/node_modules/@loopwright/state/package.json +12 -0
- package/node_modules/@loopwright/taskpack/dist/baseline-align.d.ts +195 -0
- package/node_modules/@loopwright/taskpack/dist/baseline-align.js +1847 -0
- package/node_modules/@loopwright/taskpack/dist/digests.d.ts +61 -0
- package/node_modules/@loopwright/taskpack/dist/digests.js +715 -0
- package/node_modules/@loopwright/taskpack/dist/index.d.ts +18 -0
- package/node_modules/@loopwright/taskpack/dist/index.js +17 -0
- package/node_modules/@loopwright/taskpack/dist/models-config.d.ts +112 -0
- package/node_modules/@loopwright/taskpack/dist/models-config.js +1026 -0
- package/node_modules/@loopwright/taskpack/dist/output-format.d.ts +28 -0
- package/node_modules/@loopwright/taskpack/dist/output-format.js +157 -0
- package/node_modules/@loopwright/taskpack/dist/preflight.d.ts +130 -0
- package/node_modules/@loopwright/taskpack/dist/preflight.js +1497 -0
- package/node_modules/@loopwright/taskpack/dist/qualification.d.ts +23 -0
- package/node_modules/@loopwright/taskpack/dist/qualification.js +120 -0
- package/node_modules/@loopwright/taskpack/dist/sandbox.d.ts +121 -0
- package/node_modules/@loopwright/taskpack/dist/sandbox.js +2642 -0
- package/node_modules/@loopwright/taskpack/dist/schema.d.ts +197 -0
- package/node_modules/@loopwright/taskpack/dist/schema.js +4189 -0
- package/node_modules/@loopwright/taskpack/dist/scrubber.d.ts +47 -0
- package/node_modules/@loopwright/taskpack/dist/scrubber.js +283 -0
- package/node_modules/@loopwright/taskpack/dist/suite.d.ts +124 -0
- package/node_modules/@loopwright/taskpack/dist/suite.js +3256 -0
- package/node_modules/@loopwright/taskpack/dist/taskpack.d.ts +154 -0
- package/node_modules/@loopwright/taskpack/dist/taskpack.js +3634 -0
- package/node_modules/@loopwright/taskpack/dist/turnkey-memory.d.ts +122 -0
- package/node_modules/@loopwright/taskpack/dist/turnkey-memory.js +483 -0
- package/node_modules/@loopwright/taskpack/dist/turnkey.d.ts +437 -0
- package/node_modules/@loopwright/taskpack/dist/turnkey.js +7335 -0
- package/node_modules/@loopwright/taskpack/dist/types.d.ts +1274 -0
- package/node_modules/@loopwright/taskpack/dist/types.js +99 -0
- package/node_modules/@loopwright/taskpack/dist/upstreams.d.ts +261 -0
- package/node_modules/@loopwright/taskpack/dist/upstreams.js +2242 -0
- package/node_modules/@loopwright/taskpack/dist/yaml.d.ts +18 -0
- package/node_modules/@loopwright/taskpack/dist/yaml.js +167 -0
- package/node_modules/@loopwright/taskpack/package.json +12 -0
- package/node_modules/@loopwright/taskpack-runner/dist/compile-taskpack.d.ts +137 -0
- package/node_modules/@loopwright/taskpack-runner/dist/compile-taskpack.js +474 -0
- package/node_modules/@loopwright/taskpack-runner/dist/corpus.d.ts +8 -0
- package/node_modules/@loopwright/taskpack-runner/dist/corpus.js +129 -0
- package/node_modules/@loopwright/taskpack-runner/dist/index.d.ts +13 -0
- package/node_modules/@loopwright/taskpack-runner/dist/index.js +7 -0
- package/node_modules/@loopwright/taskpack-runner/dist/intake.d.ts +149 -0
- package/node_modules/@loopwright/taskpack-runner/dist/intake.js +135 -0
- package/node_modules/@loopwright/taskpack-runner/dist/parity.d.ts +130 -0
- package/node_modules/@loopwright/taskpack-runner/dist/parity.js +927 -0
- package/node_modules/@loopwright/taskpack-runner/dist/python-bridge.d.ts +68 -0
- package/node_modules/@loopwright/taskpack-runner/dist/python-bridge.js +517 -0
- package/node_modules/@loopwright/taskpack-runner/dist/service.d.ts +149 -0
- package/node_modules/@loopwright/taskpack-runner/dist/service.js +1796 -0
- package/node_modules/@loopwright/taskpack-runner/dist/types.d.ts +29 -0
- package/node_modules/@loopwright/taskpack-runner/dist/types.js +11 -0
- package/node_modules/@loopwright/taskpack-runner/package.json +12 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/README.md +77 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/docs/support-records.md +57 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/docs/supported-runners.md +98 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/manifest.json +205 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/pack/expand_matrix.sh +273 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/pack/matrix.yaml +280 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/pack/resolve_dockerfile.sh +24 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/pyproject.toml +46 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/runtime_runner/runner.py.json +5270 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tests/auto_sync/fixtures/discovery/legacy-support.md +86 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tests/auto_sync/fixtures/github/service.py +401 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tests/auto_sync/fixtures/proposals/analysis.json +95 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tests/auto_sync/fixtures/proposals/ready.json +109 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tests/auto_sync/test_assemble.py +263 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tests/auto_sync/test_check_draft.py +333 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tests/auto_sync/test_checks.py +1099 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tests/auto_sync/test_discovery.py +817 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tests/auto_sync/test_proposal.py +658 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tests/auto_sync/test_publish.py +987 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tests/auto_sync/test_summary.py +107 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tools/auto_sync/agent.py +610 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tools/auto_sync/assemble.py +84 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tools/auto_sync/check_draft.py +94 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tools/auto_sync/checks.py +1002 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tools/auto_sync/discovery.py +789 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tools/auto_sync/model.py +557 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tools/auto_sync/progress.py +174 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tools/auto_sync/prompts/analysis.md +40 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tools/auto_sync/prompts/proposal.md +65 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tools/auto_sync/prompts/repair.md +17 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tools/auto_sync/proposal.py +903 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tools/auto_sync/publish.py +997 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tools/auto_sync/summary.py +131 -0
- package/node_modules/@loopwright/taskpack-runner/vendor/runner-auto-sync/tools/auto_sync/tool-versions.json +133 -0
- package/node_modules/package-lock.json +3025 -0
- package/package-lock.json +3025 -0
- package/package.json +52 -4
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { lstat, readdir, realpath } from 'node:fs/promises';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
/** Diagnostic codes carried by closure matrix refusals; exit mapping in main.ts stays deterministic. */
|
|
4
|
+
export const CLOSURE_FALSIFICATION_FORBIDDEN = 'CLOSURE_FALSIFICATION_FORBIDDEN';
|
|
5
|
+
export const CLOSURE_EVIDENCE_MISSING = 'CLOSURE_EVIDENCE_MISSING';
|
|
6
|
+
export const CLOSURE_EVIDENCE_UNTRUSTED = 'CLOSURE_EVIDENCE_UNTRUSTED';
|
|
7
|
+
const DISPOSITIONS = ['closed_local', 'deferred_owned', 'blocked_external'];
|
|
8
|
+
const EVIDENCE_LEVELS = ['unit_and_integration', 'controlled_local_qualification', 'frozen_offline_parity', 'unprovisioned_external'];
|
|
9
|
+
const STATUSES = ['passed', 'failed', 'blocked', 'not_run'];
|
|
10
|
+
const OWNER_PACKAGES = ['@loopwright/core', '@loopwright/state', '@loopwright/agent-pi', '@loopwright/controller', '@loopwright/cli', '@loopwright/taskpack-runner', '@loopwright/memory', '@loopwright/taskpack', '@loopwright/github-app', '@loopwright/decisions', '@loopwright/hardware-runner'];
|
|
11
|
+
function text(value) { return typeof value === 'string' ? value : ''; }
|
|
12
|
+
function entryShapeErrors(entry, path) {
|
|
13
|
+
const errors = [];
|
|
14
|
+
const requireText = (field, minimum) => {
|
|
15
|
+
if (text(entry[field]).length < minimum)
|
|
16
|
+
errors.push({ code: 'CAPABILITY_UNSUPPORTED', capabilityId: entry.id, path: `${path}/${field}`, detail: 'must be a non-empty string' });
|
|
17
|
+
};
|
|
18
|
+
if (!DISPOSITIONS.includes(entry.disposition))
|
|
19
|
+
errors.push({ code: 'CAPABILITY_UNSUPPORTED', capabilityId: entry.id, path: `${path}/disposition`, detail: 'unknown disposition' });
|
|
20
|
+
if (!EVIDENCE_LEVELS.includes(entry.evidenceLevel))
|
|
21
|
+
errors.push({ code: 'CAPABILITY_UNSUPPORTED', capabilityId: entry.id, path: `${path}/evidenceLevel`, detail: 'unknown evidence level' });
|
|
22
|
+
if (!STATUSES.includes(entry.verificationStatus))
|
|
23
|
+
errors.push({ code: 'CAPABILITY_UNSUPPORTED', capabilityId: entry.id, path: `${path}/verificationStatus`, detail: 'unknown verification status' });
|
|
24
|
+
if (!OWNER_PACKAGES.includes(entry.ownerPackage))
|
|
25
|
+
errors.push({ code: 'CAPABILITY_UNSUPPORTED', capabilityId: entry.id, path: `${path}/ownerPackage`, detail: 'unknown owner package' });
|
|
26
|
+
requireText('title', 1);
|
|
27
|
+
requireText('closureCriterion', 1);
|
|
28
|
+
requireText('residualBoundary', 1);
|
|
29
|
+
requireText('subsystem', 1);
|
|
30
|
+
if (!Array.isArray(entry.evidencePaths) || entry.evidencePaths.length < 1)
|
|
31
|
+
errors.push({ code: 'CAPABILITY_UNSUPPORTED', capabilityId: entry.id, path: `${path}/evidencePaths`, detail: 'must list at least one relative path' });
|
|
32
|
+
else
|
|
33
|
+
for (const candidate of entry.evidencePaths)
|
|
34
|
+
if (!isRelativeEvidencePath(candidate))
|
|
35
|
+
errors.push({ code: 'CAPABILITY_UNSUPPORTED', capabilityId: entry.id, path: `${path}/evidencePaths`, detail: `"${candidate}" is not a repository-relative path` });
|
|
36
|
+
const needsUnlock = entry.disposition !== 'closed_local' || entry.verificationStatus !== 'passed';
|
|
37
|
+
if (needsUnlock && (entry.unlockPrerequisite === null || entry.unlockPrerequisite.trim().length === 0))
|
|
38
|
+
errors.push({ code: 'CAPABILITY_UNSUPPORTED', capabilityId: entry.id, path: `${path}/unlockPrerequisite`, detail: 'non-passed rows must name an unlock prerequisite' });
|
|
39
|
+
if (!needsUnlock && entry.unlockPrerequisite !== null)
|
|
40
|
+
errors.push({ code: 'CAPABILITY_UNSUPPORTED', capabilityId: entry.id, path: `${path}/unlockPrerequisite`, detail: 'passed closed rows must not name an unlock prerequisite' });
|
|
41
|
+
if (entry.disposition === 'closed_local' && entry.verificationStatus !== 'passed')
|
|
42
|
+
errors.push({ code: 'CAPABILITY_UNSUPPORTED', capabilityId: entry.id, path: `${path}/verificationStatus`, detail: 'closed_local rows must be passed' });
|
|
43
|
+
return errors;
|
|
44
|
+
}
|
|
45
|
+
function isRelativeEvidencePath(candidate) {
|
|
46
|
+
if (candidate.length === 0 || candidate.startsWith('/') || candidate.includes('\\'))
|
|
47
|
+
return false;
|
|
48
|
+
return candidate.split('/').every(segment => segment.length > 0 && segment !== '.' && segment !== '..');
|
|
49
|
+
}
|
|
50
|
+
function freezeEntries(entries) {
|
|
51
|
+
return Object.freeze(entries.map(entry => Object.freeze({ ...entry, evidencePaths: Object.freeze([...entry.evidencePaths]) })));
|
|
52
|
+
}
|
|
53
|
+
function ledgerEntry(entry) {
|
|
54
|
+
const errors = entryShapeErrors(entry, '/ledger');
|
|
55
|
+
if (errors.length > 0)
|
|
56
|
+
throw new Error(`CLOSURE_LEDGER_INVALID: ${errors.map(error => `${error.path} ${error.detail}`).join('; ')}`);
|
|
57
|
+
return entry;
|
|
58
|
+
}
|
|
59
|
+
const CLOSED = (id, title, subsystem, ownerPackage, evidenceLevel, criterion, residual, evidencePaths) => ledgerEntry({ id, title, subsystem, ownerPackage, disposition: 'closed_local', verificationStatus: 'passed', evidenceLevel, closureCriterion: criterion, residualBoundary: residual, unlockPrerequisite: null, evidencePaths });
|
|
60
|
+
const EXTERNAL = (id, title, subsystem, ownerPackage, disposition, status, criterion, residual, unlock, evidencePaths) => ledgerEntry({ id, title, subsystem, ownerPackage, disposition, verificationStatus: status, evidenceLevel: 'unprovisioned_external', closureCriterion: criterion, residualBoundary: residual, unlockPrerequisite: unlock, evidencePaths });
|
|
61
|
+
/** The frozen 23-row Capability Closure Ledger; every evidence path is a committed repository file. */
|
|
62
|
+
export const CLOSURE_CAPABILITY_LEDGER = freezeEntries([
|
|
63
|
+
CLOSED('exclusive-owner-and-unknown-usage', 'Exclusive owner fencing and unknown-usage retention', 'controller-execution', '@loopwright/controller', 'controlled_local_qualification', 'A single active owner survives recovery and every unknown-outcome dispatch retains its reservation until reconciled.', 'Recovery beyond the retained local store requires an operator-supplied receipt.', ['packages/controller/src/ownership.ts', 'packages/controller/test/progress-ownership.test.ts']),
|
|
64
|
+
CLOSED('frozen-runner-parity-corpus', 'Frozen offline runner parity corpus', 'runner-parity', '@loopwright/taskpack-runner', 'frozen_offline_parity', 'The vendored offline corpus reproduces legacy scenario outcomes with digest-pinned manifests.', 'Live upstream acquisition and real pull requests stay outside the frozen corpus.', ['packages/taskpack-runner/src/corpus.ts', 'packages/taskpack-runner/vendor/runner-auto-sync/manifest.json']),
|
|
65
|
+
CLOSED('frozen-sdk-and-resource-inventory', 'Frozen Pi SDK and resource inventory', 'pi-sdk-inventory', '@loopwright/agent-pi', 'controlled_local_qualification', 'The pinned Pi SDK graph and adapter resource inventory digest-match the installed lockfile.', 'Upstream SDK releases require requalification before admission.', ['packages/agent-pi/src/descriptor.ts', 'packages/agent-pi/src/catalog.ts', 'packages/agent-pi/qualification/absence.test.mjs']),
|
|
66
|
+
CLOSED('external-name-and-repair-cap-controls', 'External name and repair cap controls', 'core-contract-limits', '@loopwright/core', 'unit_and_integration', 'External names, repair caps, and identifier validation enforce the documented limits.', 'Provider-side behavior beyond the parsed contract is out of scope.', ['packages/core/src/limits.ts', 'packages/core/test/contracts.test.ts']),
|
|
67
|
+
CLOSED('contract-adversarial-review-coverage', 'Contract adversarial review coverage', 'core-contract-review', '@loopwright/core', 'unit_and_integration', 'Adversarial review coverage proves contract refusals for malformed and conflicting documents.', 'New document kinds extend the matrix through the follow-on contract suite.', ['packages/core/test/integration.test.ts', 'packages/core/test/acceptance.test.ts']),
|
|
68
|
+
CLOSED('duplicate-json-pointer-rejection', 'Duplicate JSON member rejection', 'core-json-boundary', '@loopwright/core', 'unit_and_integration', 'Duplicate JSON members are rejected before document validation runs.', 'Duplicate semantics in foreign configuration formats stay out of scope.', ['packages/core/src/boundary.ts', 'packages/core/test/boundary.test.ts']),
|
|
69
|
+
CLOSED('immutable-elapsed-clock-basis', 'Immutable elapsed clock basis', 'state-clock', '@loopwright/state', 'unit_and_integration', 'Elapsed time derives from an immutable monotonic basis with bounded drift.', 'Wall-clock alignment to external time authorities is out of scope.', ['packages/state/src/clock.ts', 'packages/state/test/clock.test.ts']),
|
|
70
|
+
CLOSED('qualified-host-clock-and-storage-profile', 'Qualified host clock and storage profile', 'host-qualification', '@loopwright/taskpack', 'unit_and_integration', 'Host qualification refuses unqualified filesystems, unqualified platforms, and drifting clocks.', 'Deployed host qualification requires the deployed control plane.', ['packages/taskpack/src/qualification.ts', 'packages/taskpack/src/sandbox.ts', 'packages/taskpack/test/qualification.test.ts', 'packages/taskpack/test/sandbox.test.ts']),
|
|
71
|
+
CLOSED('state-interface-and-sqlite-limits', 'State interface and SQLite limits', 'state-store-interface', '@loopwright/state', 'unit_and_integration', 'The retained store interface honors SQLite limits for pages, records, and reopen.', 'Non-SQLite storage engines are out of scope.', ['packages/state/src/store.ts', 'packages/state/src/connection.ts', 'packages/state/test/store.test.ts']),
|
|
72
|
+
CLOSED('admission-error-precedence', 'Admission error precedence', 'state-admission', '@loopwright/state', 'unit_and_integration', 'Admission refusals surface the highest-precedence documented error code.', 'Provider-side admission errors are out of scope.', ['packages/state/src/admission.ts', 'packages/state/src/errors.ts', 'packages/state/test/admission.test.ts']),
|
|
73
|
+
CLOSED('pre-send-context-bound-and-estimated-guard', 'Pre-send context bound and estimated guard', 'pi-context-guard', '@loopwright/agent-pi', 'controlled_local_qualification', 'Pre-send context stays inside the estimated guard with explicit operator opt-in.', 'Live provider context windows require the qualified runtime image.', ['packages/agent-pi/src/context.ts', 'packages/agent-pi/src/admission.ts']),
|
|
74
|
+
CLOSED('digest-pinned-runtime-image-availability', 'Digest-pinned runtime image availability', 'pi-runtime-image', '@loopwright/agent-pi', 'controlled_local_qualification', 'The runtime image is digest-pinned and its absence is refused before dispatch.', 'Image availability inside the deployed registry stays an external gate.', ['packages/agent-pi/src/containers.ts', 'packages/agent-pi/qualification/docker-socket.test.mjs']),
|
|
75
|
+
CLOSED('trusted-config-interpolation-and-mcp-token', 'Trusted configuration interpolation and MCP token custody', 'controller-config-trust', '@loopwright/controller', 'controlled_local_qualification', 'Configuration interpolation keeps MCP tokens inside credential bindings and out of compiled plans.', 'External secret stores are out of scope.', ['packages/controller/src/interpolation.ts', 'packages/controller/src/credentials.ts']),
|
|
76
|
+
CLOSED('mcp-nested-deadline-and-limits-accounting', 'Nested MCP deadline and limits accounting', 'pi-mcp-accounting', '@loopwright/agent-pi', 'controlled_local_qualification', 'Nested MCP deadlines and limits charge exactly once against the parent reservation.', 'Nested accounting for non-MCP extensions stays out of scope.', ['packages/agent-pi/src/deadline.ts', 'packages/agent-pi/src/broker-channel.ts']),
|
|
77
|
+
CLOSED('retained-store-clock-drift-and-reopen-guard', 'Retained store clock drift and reopen guard', 'state-retention', '@loopwright/state', 'unit_and_integration', 'Reopen refuses drifted clocks and incomplete retained stores.', 'Cross-host store migration is out of scope.', ['packages/state/src/connection.ts', 'packages/state/src/clock.ts']),
|
|
78
|
+
CLOSED('controller-recovery-cancellation-and-cli-surface', 'Controller recovery, cancellation, and CLI surface', 'cli-recovery-surface', '@loopwright/cli', 'controlled_local_qualification', 'Recovery, cancellation exits, and the CLI surface keep the documented exit codes.', 'Remote operator consoles are out of scope.', ['packages/cli/src/main.ts', 'packages/cli/src/arguments.ts', 'packages/cli/test/arguments.test.ts', 'packages/controller/src/recovery.ts']),
|
|
79
|
+
EXTERNAL('external-build-and-accelerator-matrix', 'External build and accelerator matrix', 'external-build-matrix', '@loopwright/controller', 'blocked_external', 'blocked', 'A qualified external build host must reproduce the accelerator matrix with attestations.', 'No local host can close the multi-architecture accelerator matrix.', 'Provision a multi-architecture build host with physical accelerators and attach a hash-bound qualification receipt.', [
|
|
80
|
+
'packages/hardware-runner/src/relay-server.ts',
|
|
81
|
+
'packages/hardware-runner/src/worker.ts',
|
|
82
|
+
'packages/hardware-runner/src/evaluator.ts',
|
|
83
|
+
'packages/hardware-runner/test/e2e-nat-loopback.test.ts',
|
|
84
|
+
'docs/configuration/sandbox-backends.md',
|
|
85
|
+
]),
|
|
86
|
+
EXTERNAL('remote-host-loss-and-durable-wake', 'Remote host loss and durable wake', 'remote-durability', '@loopwright/state', 'blocked_external', 'not_run', 'A remote host loss with durable wake must retain fenced state across the outage.', 'Local crash tests park owned children; remote loss stays unprovisioned.', 'Provision a remote host with durable storage and run the wake qualification against it.', ['docs/contribute/state.md']),
|
|
87
|
+
EXTERNAL('interactive-mcp-oauth-browser-flow', 'Interactive MCP OAuth browser flow', 'interactive-oauth', '@loopwright/taskpack', 'deferred_owned', 'blocked', 'Interactive browser OAuth flows are refused pre-admission and stay deferred.', 'No browser, loopback listener, or anonymous fallback exists in the control plane.', 'Approve an interactive OAuth qualification plan with a bound browser harness receipt.', ['packages/taskpack/src/qualification.ts']),
|
|
88
|
+
EXTERNAL('deployed-github-app-and-webhook-ingress', 'Deployed GitHub App and webhook ingress', 'deployed-ingress', '@loopwright/github-app', 'blocked_external', 'not_run', 'Deployed GitHub App webhook ingress must verify signatures under the deployed control plane.', 'The loopback service double cannot prove deployed ingress.', 'Deploy the GitHub App control plane with a reachable webhook endpoint and attach the deployment receipt.', ['packages/github-app/src/webhook.ts', 'docs/contribute/github-app-internals.md']),
|
|
89
|
+
EXTERNAL('live-provider-billing-and-effort-attestation', 'Live provider billing and effort attestation', 'provider-attestation', '@loopwright/agent-pi', 'deferred_owned', 'not_run', 'Live provider billing and effort attestation require provider-side statements.', 'Local accounting proves bounds, not provider billing.', 'Attach a provider billing attestation covering the qualified model matrix.', ['packages/core/src/usage.ts', 'docs/configuration/sandbox-backends.md']),
|
|
90
|
+
CLOSED('reviewed-memory-and-cas-compaction', 'Reviewed memory and CAS compaction', 'memory-compaction', '@loopwright/memory', 'unit_and_integration', 'Reviewed memory proposals verify, apply under CAS, and compact only past safe boundaries.', 'Cross-repository memory federation is out of scope.', ['packages/memory/src/compaction.ts', 'packages/memory/src/cas.ts', 'packages/memory/test/compaction.test.ts']),
|
|
91
|
+
CLOSED('system-one-decision-routing-and-benchmark', 'System-One decision routing and benchmark', 'decision-routing', '@loopwright/decisions', 'unit_and_integration', 'Decision authority boundaries refuse non-delegable intents and the controlled benchmark pins routing quality.', 'Live provider routing quality beyond the frozen benchmark corpus stays unmeasured.', ['packages/decisions/src/router.ts', 'packages/decisions/src/benchmark.ts', 'packages/decisions/test/benchmark.test.ts']),
|
|
92
|
+
]);
|
|
93
|
+
function receiptErrors(receipt) {
|
|
94
|
+
if (typeof receipt.capabilityId !== 'string' || receipt.capabilityId.length === 0)
|
|
95
|
+
return 'receipt names no capability';
|
|
96
|
+
if (text(receipt.targetEnvironment).trim().length === 0)
|
|
97
|
+
return 'receipt targetEnvironment must be a non-empty string';
|
|
98
|
+
if (!/^[0-9a-f]{64}$/.test(receipt.artifactSha256))
|
|
99
|
+
return 'receipt artifactSha256 must match ^[0-9a-f]{64}$';
|
|
100
|
+
if (!/^[0-9a-f]{64,}$/.test(receipt.verifierSignature))
|
|
101
|
+
return 'receipt verifierSignature must match ^[0-9a-f]{64,}$';
|
|
102
|
+
if (!Number.isSafeInteger(receipt.issuedAtMs) || receipt.issuedAtMs <= 0)
|
|
103
|
+
return 'receipt issuedAtMs must be a positive integer';
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
/** Verify every ledger evidence path resolves to a committed regular file inside the repository root. */
|
|
107
|
+
export async function verifyClosureLedgerIntegrity(repoRoot, entries = CLOSURE_CAPABILITY_LEDGER) {
|
|
108
|
+
const failures = [];
|
|
109
|
+
let checkedFiles = 0;
|
|
110
|
+
let root;
|
|
111
|
+
try {
|
|
112
|
+
root = await realpath(repoRoot);
|
|
113
|
+
const rootStats = await lstat(root);
|
|
114
|
+
if (!rootStats.isDirectory())
|
|
115
|
+
throw new Error('not a directory');
|
|
116
|
+
}
|
|
117
|
+
catch {
|
|
118
|
+
return { ok: false, checkedFiles: 0, failures: [{ capabilityId: null, path: '.', code: CLOSURE_EVIDENCE_UNTRUSTED, detail: 'repository root is missing or not a real directory' }] };
|
|
119
|
+
}
|
|
120
|
+
const workflowsDir = join(root, '.github', 'workflows');
|
|
121
|
+
let wfStats;
|
|
122
|
+
try {
|
|
123
|
+
wfStats = await lstat(workflowsDir);
|
|
124
|
+
}
|
|
125
|
+
catch {
|
|
126
|
+
wfStats = null;
|
|
127
|
+
}
|
|
128
|
+
if (wfStats !== null) {
|
|
129
|
+
let workflowsValid = !wfStats.isSymbolicLink() && wfStats.isDirectory();
|
|
130
|
+
if (workflowsValid) {
|
|
131
|
+
try {
|
|
132
|
+
const wfEntries = await readdir(workflowsDir);
|
|
133
|
+
for (const name of wfEntries) {
|
|
134
|
+
if (!name.endsWith('.yml') && !name.endsWith('.yaml')) {
|
|
135
|
+
workflowsValid = false;
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
const entryStats = await lstat(join(workflowsDir, name));
|
|
139
|
+
if (entryStats.isSymbolicLink() || !entryStats.isFile()) {
|
|
140
|
+
workflowsValid = false;
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
catch {
|
|
146
|
+
workflowsValid = false;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
if (!workflowsValid) {
|
|
150
|
+
failures.push({
|
|
151
|
+
capabilityId: null,
|
|
152
|
+
path: '.github/workflows',
|
|
153
|
+
code: CLOSURE_EVIDENCE_UNTRUSTED,
|
|
154
|
+
detail: '.github/workflows must be a real directory containing only regular YAML workflow files',
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
for (const entry of entries)
|
|
159
|
+
for (const candidate of entry.evidencePaths) {
|
|
160
|
+
if (!isRelativeEvidencePath(candidate)) {
|
|
161
|
+
failures.push({ capabilityId: entry.id, path: candidate, code: CLOSURE_EVIDENCE_UNTRUSTED, detail: 'path must be relative without dot-dot segments' });
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
let stats;
|
|
165
|
+
try {
|
|
166
|
+
stats = await lstat(join(root, candidate));
|
|
167
|
+
}
|
|
168
|
+
catch {
|
|
169
|
+
failures.push({ capabilityId: entry.id, path: candidate, code: CLOSURE_EVIDENCE_MISSING, detail: 'evidence file is missing' });
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
if (stats.isSymbolicLink() || !stats.isFile()) {
|
|
173
|
+
failures.push({ capabilityId: entry.id, path: candidate, code: CLOSURE_EVIDENCE_UNTRUSTED, detail: 'evidence must be a regular file without symlinks' });
|
|
174
|
+
continue;
|
|
175
|
+
}
|
|
176
|
+
try {
|
|
177
|
+
const resolved = await realpath(join(root, candidate));
|
|
178
|
+
if (resolved !== join(root, candidate))
|
|
179
|
+
throw new Error('escapes the repository root through an intermediate symlink');
|
|
180
|
+
}
|
|
181
|
+
catch {
|
|
182
|
+
failures.push({ capabilityId: entry.id, path: candidate, code: CLOSURE_EVIDENCE_UNTRUSTED, detail: 'evidence path escapes the repository root or traverses a symlink' });
|
|
183
|
+
continue;
|
|
184
|
+
}
|
|
185
|
+
checkedFiles += 1;
|
|
186
|
+
}
|
|
187
|
+
return { ok: failures.length === 0, checkedFiles, failures };
|
|
188
|
+
}
|
|
189
|
+
function receiptFor(receipts, id) {
|
|
190
|
+
return receipts?.find(receipt => receipt.capabilityId === id);
|
|
191
|
+
}
|
|
192
|
+
/** Evaluate the closure matrix: shape invariants, the non-falsification guard, optional repository evidence integrity, and the optional failure matrix. */
|
|
193
|
+
export async function evaluateClosureMatrix(options = {}) {
|
|
194
|
+
const entries = options.entries ?? CLOSURE_CAPABILITY_LEDGER;
|
|
195
|
+
const diagnostics = [];
|
|
196
|
+
let falsificationDetected = false;
|
|
197
|
+
const seen = new Set();
|
|
198
|
+
for (const [index, entry] of entries.entries()) {
|
|
199
|
+
const path = `/entries/${index}`;
|
|
200
|
+
if (seen.has(entry.id)) {
|
|
201
|
+
diagnostics.push({ code: 'CAPABILITY_UNSUPPORTED', capabilityId: entry.id, path: `${path}/id`, detail: 'duplicate capability id' });
|
|
202
|
+
continue;
|
|
203
|
+
}
|
|
204
|
+
seen.add(entry.id);
|
|
205
|
+
diagnostics.push(...entryShapeErrors(entry, path));
|
|
206
|
+
if (entry.evidenceLevel === 'unprovisioned_external' && (entry.disposition === 'closed_local' || entry.verificationStatus === 'passed')) {
|
|
207
|
+
const receipt = receiptFor(options.receipts, entry.id);
|
|
208
|
+
const invalid = receipt === undefined ? 'no qualification receipt supplied for an unprovisioned external upgrade' : receiptErrors(receipt);
|
|
209
|
+
if (invalid !== null) {
|
|
210
|
+
falsificationDetected = true;
|
|
211
|
+
diagnostics.push({ code: CLOSURE_FALSIFICATION_FORBIDDEN, capabilityId: entry.id, path: `${path}/disposition`, detail: invalid });
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
const integrity = options.repoRoot === undefined
|
|
216
|
+
? { ok: true, checkedFiles: 0, failures: [] }
|
|
217
|
+
: await verifyClosureLedgerIntegrity(options.repoRoot, entries);
|
|
218
|
+
const failureMatrix = options.verifyFailures === true
|
|
219
|
+
? await (options.runFailureMatrix !== undefined ? options.runFailureMatrix() : (await import('./failure-matrix.js')).runIntegratedFailureMatrix())
|
|
220
|
+
: null;
|
|
221
|
+
const summary = {
|
|
222
|
+
total: entries.length,
|
|
223
|
+
closedLocal: entries.filter(entry => entry.disposition === 'closed_local').length,
|
|
224
|
+
deferredOwned: entries.filter(entry => entry.disposition === 'deferred_owned').length,
|
|
225
|
+
blockedExternal: entries.filter(entry => entry.disposition === 'blocked_external').length,
|
|
226
|
+
unprovisionedExternal: entries.filter(entry => entry.evidenceLevel === 'unprovisioned_external').length,
|
|
227
|
+
passed: entries.filter(entry => entry.verificationStatus === 'passed').length,
|
|
228
|
+
};
|
|
229
|
+
return { version: 1, integrity, falsificationDetected, diagnostics, summary, failureMatrix };
|
|
230
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function canonicalPath(path: string): Promise<void>;
|
|
2
|
+
export declare function writeOutput(path: string, bytes: Uint8Array): Promise<void>;
|
|
3
|
+
export declare function appendStepSummary(path: string, bytes: Uint8Array): Promise<void>;
|
|
4
|
+
export declare function initDraft(path: string, force: boolean): Promise<{
|
|
5
|
+
version: number;
|
|
6
|
+
readiness: string;
|
|
7
|
+
contextMode: string;
|
|
8
|
+
files: string[];
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { constants } from 'node:fs';
|
|
2
|
+
import { lstat, mkdir, open, rename } from 'node:fs/promises';
|
|
3
|
+
import { dirname, join, resolve } from 'node:path';
|
|
4
|
+
import { randomBytes, createHash } from 'node:crypto';
|
|
5
|
+
import { stringify } from 'yaml';
|
|
6
|
+
export async function canonicalPath(path) {
|
|
7
|
+
let current = resolve(path);
|
|
8
|
+
for (;;) {
|
|
9
|
+
if ((await lstat(current)).isSymbolicLink())
|
|
10
|
+
throw new Error('CLI_PATH');
|
|
11
|
+
const parent = dirname(current);
|
|
12
|
+
if (parent === current)
|
|
13
|
+
break;
|
|
14
|
+
current = parent;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export async function writeOutput(path, bytes) {
|
|
18
|
+
if (bytes.byteLength > 1048576)
|
|
19
|
+
throw new Error('CLI_OUTPUT_LIMIT');
|
|
20
|
+
await canonicalPath(dirname(resolve(path)));
|
|
21
|
+
const file = await open(resolve(path), constants.O_CREAT | constants.O_EXCL | constants.O_WRONLY | constants.O_NOFOLLOW, 0o600);
|
|
22
|
+
try {
|
|
23
|
+
await file.writeFile(bytes);
|
|
24
|
+
await file.sync();
|
|
25
|
+
}
|
|
26
|
+
finally {
|
|
27
|
+
await file.close();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export async function appendStepSummary(path, bytes) {
|
|
31
|
+
if (bytes.byteLength > 1048576)
|
|
32
|
+
throw new Error('CLI_OUTPUT_LIMIT');
|
|
33
|
+
const resolved = resolve(path);
|
|
34
|
+
await canonicalPath(dirname(resolved));
|
|
35
|
+
const file = await open(resolved, constants.O_CREAT | constants.O_APPEND | constants.O_WRONLY | constants.O_NOFOLLOW, 0o600);
|
|
36
|
+
try {
|
|
37
|
+
const info = await file.stat();
|
|
38
|
+
if (!info.isFile())
|
|
39
|
+
throw new Error('CLI_PATH');
|
|
40
|
+
await file.writeFile(bytes);
|
|
41
|
+
await file.sync();
|
|
42
|
+
}
|
|
43
|
+
finally {
|
|
44
|
+
await file.close();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
export async function initDraft(path, force) {
|
|
48
|
+
const directory = resolve(path);
|
|
49
|
+
await canonicalPath(dirname(directory));
|
|
50
|
+
try {
|
|
51
|
+
await mkdir(directory, { mode: 0o700 });
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
if (error.code !== 'EEXIST')
|
|
55
|
+
throw error;
|
|
56
|
+
}
|
|
57
|
+
await canonicalPath(directory);
|
|
58
|
+
const parent = await lstat(directory);
|
|
59
|
+
if (!parent.isDirectory() || parent.uid !== process.getuid?.() || parent.mode & 0o077)
|
|
60
|
+
throw new Error('CLI_PATH');
|
|
61
|
+
const registry = { apiVersion: 'loopwright.dev/v1alpha1', kind: 'TrustedRegistry', metadata: { name: 'operator-draft' }, spec: { version: 1, resourceVersion: 'context-draft', handlers: [], roleProfiles: [], runtimeProfiles: [], resources: [], credentialBindings: [], environmentBindings: [] } };
|
|
62
|
+
const registryBytes = Buffer.from(stringify(registry, { indent: 2, schema: 'core', lineWidth: 0 }), 'utf8'), digest = createHash('sha256').update(registryBytes).digest('hex');
|
|
63
|
+
const task = { apiVersion: 'loopwright.dev/v1alpha1', kind: 'TaskContract', spec: {
|
|
64
|
+
goal: 'Replace this draft with an explicit task and approved operator bindings.', taskpack: 'local', target: { repository: 'team/repository', baseRevision: 'REVIEW_REQUIRED', sourceRevision: 'REVIEW_REQUIRED', matrix: null },
|
|
65
|
+
scope: { writable: ['result.json'], protected: [] }, roles: [{ id: 'builder', adapter: 'pi', provider: 'zai', model: 'REVIEW_REQUIRED', thinking: 'high', tools: ['read'] }],
|
|
66
|
+
trustedContext: { revision: 'context-draft', discovery: 'disabled', resources: [] }, budgets: { wallTimeMs: 600000, totalTokens: 32768, perCallOutputTokens: 1024, maxModelCalls: 8, maxConcurrency: 1, maxFormatRepairs: 0, maxImplementationRepairs: 0, maxTransportRetries: 1,
|
|
67
|
+
enforcement: { wallTime: 'hard_admission', tokens: 'soft_accounting', modelCalls: 'hard_admission', concurrency: 'hard_admission', formatRepairs: 'hard_admission', implementationRepairs: 'hard_admission', transportRetries: 'hard_admission' } },
|
|
68
|
+
steps: [{ id: 'build', kind: 'agent', uses: 'REVIEW_REQUIRED', roleId: 'builder', dependsOn: [] }], acceptance: { required: ['tests'], checks: [{ id: 'tests', allowedEvidenceLevels: ['local_execution'] }] }
|
|
69
|
+
} };
|
|
70
|
+
const config = { apiVersion: 'loopwright.dev/v1alpha1', kind: 'ControllerConfig', spec: { task, registry: { name: 'operator-draft', digest: { algorithm: 'sha256', hex: digest } }, profiles: { roles: [{ roleId: 'builder', profileRef: 'REVIEW_REQUIRED' }], steps: [{ stepId: 'build', handlerRef: 'REVIEW_REQUIRED' }] }, credentials: [], controls: { maxAttempts: 8, drainReserveMs: 120000, repeatFailureLimit: 2, submission: { mode: 'artifact_or_assistant', path: null } } } };
|
|
71
|
+
const files = new Map([['controller.draft.yaml', Buffer.from(stringify(config, { indent: 2, schema: 'core', lineWidth: 0 }), 'utf8')], ['registry.draft.yaml', registryBytes], ['README.draft.md', Buffer.from('Execution readiness: unsupported (draft).\nContext mode: proven_bound (strict default); live proven bound unavailable.\nDraft files: controller.draft.yaml and registry.draft.yaml.\nNo credentials, approved runtime, handlers or resources are installed.\nApprove registry bytes outside the repository and working directory; pass explicit absolute paths and SHA256.\nReplace REVIEW_REQUIRED values and supply the exact installed identities.\nAny estimated_guard context requires explicit immutable operator opt-in.\n')]]);
|
|
72
|
+
const originals = new Map();
|
|
73
|
+
for (const name of files.keys()) {
|
|
74
|
+
try {
|
|
75
|
+
const info = await lstat(join(directory, name));
|
|
76
|
+
if (!force || !info.isFile() || info.nlink !== 1 || info.uid !== process.getuid?.() || info.mode & 0o077)
|
|
77
|
+
throw new Error('CLI_OVERWRITE');
|
|
78
|
+
originals.set(name, info);
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
if (error.code !== 'ENOENT')
|
|
82
|
+
throw error;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
for (const [name, bytes] of files) {
|
|
86
|
+
const original = originals.get(name), target = join(directory, name);
|
|
87
|
+
if (!original)
|
|
88
|
+
await writeOutput(target, bytes);
|
|
89
|
+
else {
|
|
90
|
+
const currentParent = await lstat(directory), current = await lstat(target);
|
|
91
|
+
if (currentParent.ino !== parent.ino || currentParent.dev !== parent.dev || current.ino !== original.ino || current.dev !== original.dev || current.size !== original.size || current.mtimeMs !== original.mtimeMs || current.ctimeMs !== original.ctimeMs)
|
|
92
|
+
throw new Error('CLI_PATH');
|
|
93
|
+
const temporary = join(directory, '.' + name + '.' + randomBytes(16).toString('hex'));
|
|
94
|
+
await writeOutput(temporary, bytes);
|
|
95
|
+
await rename(temporary, target);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
const held = await open(directory, constants.O_RDONLY | constants.O_NOFOLLOW);
|
|
99
|
+
try {
|
|
100
|
+
await held.sync();
|
|
101
|
+
}
|
|
102
|
+
finally {
|
|
103
|
+
await held.close();
|
|
104
|
+
}
|
|
105
|
+
return { version: 1, readiness: 'unsupported', contextMode: 'proven_bound', files: [...files.keys()] };
|
|
106
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IntegratedFailureMatrixReport, IntegratedFailureScenarioId, IntegratedFailureScenarioResult } from './closure.js';
|
|
2
|
+
export type { IntegratedFailureMatrixReport, IntegratedFailureScenarioId, IntegratedFailureScenarioResult };
|
|
3
|
+
export declare const INTEGRATED_FAILURE_SCENARIO_IDS: readonly IntegratedFailureScenarioId[];
|
|
4
|
+
export interface IntegratedFailureMatrixOptions {
|
|
5
|
+
/** Injected fault overrides let negative tests force a single failing scenario. */
|
|
6
|
+
readonly scenarioOverrides?: Partial<Record<IntegratedFailureScenarioId, () => IntegratedFailureScenarioResult | Promise<IntegratedFailureScenarioResult>>>;
|
|
7
|
+
}
|
|
8
|
+
/** Run all 14 cross-package failure probes in-process; deterministic, offline, and Docker-free. */
|
|
9
|
+
export declare function runIntegratedFailureMatrix(options?: IntegratedFailureMatrixOptions): Promise<IntegratedFailureMatrixReport>;
|