devcontour-harness 0.0.0-stage → 0.1.0-alpha.12
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 +21 -0
- package/README.md +268 -2
- package/docs/architecture.md +496 -0
- package/docs/compatibility-versions.md +60 -0
- package/docs/compatibility.md +192 -0
- package/docs/connectors.md +323 -0
- package/docs/contracts.md +630 -0
- package/docs/integrations/hindsight.md +148 -0
- package/docs/quickstart.md +185 -0
- package/docs/release-notes/0.1.0-alpha.10.md +50 -0
- package/docs/release-notes/0.1.0-alpha.11.md +44 -0
- package/docs/release-notes/0.1.0-alpha.12.md +66 -0
- package/docs/release-notes/0.1.0-alpha.6.md +238 -0
- package/docs/release-notes/0.1.0-alpha.7.md +71 -0
- package/docs/release-notes/0.1.0-alpha.8.md +73 -0
- package/docs/release-notes/0.1.0-alpha.9.md +55 -0
- package/docs/review-probes.md +199 -0
- package/docs/review-protocol.md +251 -0
- package/docs/standalone.md +271 -0
- package/docs/toolchains.md +167 -0
- package/docs/turbo-starter.md +269 -0
- package/docs/upgrade.md +219 -0
- package/examples/README.md +27 -0
- package/examples/external-connector/README.md +19 -0
- package/examples/external-connector/connector.mjs +55 -0
- package/examples/files-only/README.md +28 -0
- package/examples/files-only/context/norms/rules.md +4 -0
- package/examples/files-only/graph.json +23 -0
- package/examples/files-only/policy.json +30 -0
- package/examples/one-vendor/README.md +19 -0
- package/examples/one-vendor/policy.json +27 -0
- package/examples/single-task/README.md +18 -0
- package/examples/single-task/graph.json +27 -0
- package/examples/single-task/policy-same-vendor.json +55 -0
- package/examples/single-task/policy.json +52 -0
- package/examples/single-task/src/.gitkeep +0 -0
- package/examples/single-task/test/run.js +19 -0
- package/examples/toolchains/README.md +32 -0
- package/examples/toolchains/go/bad/label/label.go +9 -0
- package/examples/toolchains/go/good/label/label.go +9 -0
- package/examples/toolchains/go/policy.json +79 -0
- package/examples/toolchains/go/repo/REQUIREMENTS.md +9 -0
- package/examples/toolchains/go/repo/_gitignore +1 -0
- package/examples/toolchains/go/repo/go.mod +5 -0
- package/examples/toolchains/go/repo/go.sum +2 -0
- package/examples/toolchains/go/repo/label/label.go +9 -0
- package/examples/toolchains/go/repo/label/label_test.go +27 -0
- package/examples/toolchains/go/repo/label/version.go +9 -0
- package/examples/toolchains/go/task.json +25 -0
- package/examples/toolchains/mixed-go/bad/backend/label/label.go +9 -0
- package/examples/toolchains/mixed-go/bad/frontend/src/label.js +4 -0
- package/examples/toolchains/mixed-go/good/backend/label/label.go +9 -0
- package/examples/toolchains/mixed-go/good/frontend/src/label.js +4 -0
- package/examples/toolchains/mixed-go/policy.json +126 -0
- package/examples/toolchains/mixed-go/repo/REQUIREMENTS.md +9 -0
- package/examples/toolchains/mixed-go/repo/_gitignore +6 -0
- package/examples/toolchains/mixed-go/repo/backend/go.mod +3 -0
- package/examples/toolchains/mixed-go/repo/backend/label/label.go +9 -0
- package/examples/toolchains/mixed-go/repo/backend/label/label_test.go +30 -0
- package/examples/toolchains/mixed-go/repo/contract/check.mjs +17 -0
- package/examples/toolchains/mixed-go/repo/contract/label.json +9 -0
- package/examples/toolchains/mixed-go/repo/frontend/package.json +15 -0
- package/examples/toolchains/mixed-go/repo/frontend/pnpm-lock.yaml +22 -0
- package/examples/toolchains/mixed-go/repo/frontend/src/label.js +4 -0
- package/examples/toolchains/mixed-go/repo/frontend/test/label.test.js +11 -0
- package/examples/toolchains/mixed-go/task.json +25 -0
- package/examples/toolchains/mixed-python/bad/backend/src/fx_backend/__init__.py +6 -0
- package/examples/toolchains/mixed-python/bad/frontend/src/label.js +4 -0
- package/examples/toolchains/mixed-python/good/backend/src/fx_backend/__init__.py +6 -0
- package/examples/toolchains/mixed-python/good/frontend/src/label.js +4 -0
- package/examples/toolchains/mixed-python/policy.json +121 -0
- package/examples/toolchains/mixed-python/repo/REQUIREMENTS.md +9 -0
- package/examples/toolchains/mixed-python/repo/_gitignore +6 -0
- package/examples/toolchains/mixed-python/repo/backend/.python-version +1 -0
- package/examples/toolchains/mixed-python/repo/backend/pyproject.toml +19 -0
- package/examples/toolchains/mixed-python/repo/backend/src/fx_backend/__init__.py +6 -0
- package/examples/toolchains/mixed-python/repo/backend/tests/test_label.py +11 -0
- package/examples/toolchains/mixed-python/repo/backend/uv.lock +108 -0
- package/examples/toolchains/mixed-python/repo/contract/check.mjs +17 -0
- package/examples/toolchains/mixed-python/repo/contract/label.json +9 -0
- package/examples/toolchains/mixed-python/repo/frontend/package.json +15 -0
- package/examples/toolchains/mixed-python/repo/frontend/pnpm-lock.yaml +22 -0
- package/examples/toolchains/mixed-python/repo/frontend/src/label.js +4 -0
- package/examples/toolchains/mixed-python/repo/frontend/test/label.test.js +11 -0
- package/examples/toolchains/mixed-python/task.json +25 -0
- package/examples/toolchains/npm/bad/src/label.js +4 -0
- package/examples/toolchains/npm/good/src/label.js +4 -0
- package/examples/toolchains/npm/policy.json +82 -0
- package/examples/toolchains/npm/repo/REQUIREMENTS.md +9 -0
- package/examples/toolchains/npm/repo/_gitignore +4 -0
- package/examples/toolchains/npm/repo/package-lock.json +22 -0
- package/examples/toolchains/npm/repo/package.json +13 -0
- package/examples/toolchains/npm/repo/src/label.js +4 -0
- package/examples/toolchains/npm/repo/test/label.test.js +13 -0
- package/examples/toolchains/npm/task.json +25 -0
- package/examples/toolchains/pnpm/bad/packages/label/src/label.js +4 -0
- package/examples/toolchains/pnpm/good/packages/label/src/label.js +4 -0
- package/examples/toolchains/pnpm/policy.json +85 -0
- package/examples/toolchains/pnpm/repo/REQUIREMENTS.md +9 -0
- package/examples/toolchains/pnpm/repo/_gitignore +4 -0
- package/examples/toolchains/pnpm/repo/package.json +10 -0
- package/examples/toolchains/pnpm/repo/packages/checker/check.mjs +5 -0
- package/examples/toolchains/pnpm/repo/packages/checker/package.json +9 -0
- package/examples/toolchains/pnpm/repo/packages/label/package.json +14 -0
- package/examples/toolchains/pnpm/repo/packages/label/src/label.js +4 -0
- package/examples/toolchains/pnpm/repo/packages/label/test/label.test.js +13 -0
- package/examples/toolchains/pnpm/repo/pnpm-lock.yaml +29 -0
- package/examples/toolchains/pnpm/repo/pnpm-workspace.yaml +2 -0
- package/examples/toolchains/pnpm/task.json +25 -0
- package/examples/toolchains/python/bad/src/fx_label/__init__.py +6 -0
- package/examples/toolchains/python/good/src/fx_label/__init__.py +6 -0
- package/examples/toolchains/python/policy.json +80 -0
- package/examples/toolchains/python/repo/.python-version +1 -0
- package/examples/toolchains/python/repo/REQUIREMENTS.md +9 -0
- package/examples/toolchains/python/repo/_gitignore +5 -0
- package/examples/toolchains/python/repo/pyproject.toml +19 -0
- package/examples/toolchains/python/repo/src/fx_label/__init__.py +6 -0
- package/examples/toolchains/python/repo/tests/test_label.py +13 -0
- package/examples/toolchains/python/repo/uv.lock +108 -0
- package/examples/toolchains/python/task.json +25 -0
- package/examples/toolchains/turbo/bad/packages/label/src/label.js +4 -0
- package/examples/toolchains/turbo/good/packages/label/src/label.js +4 -0
- package/examples/toolchains/turbo/policy.json +110 -0
- package/examples/toolchains/turbo/repo/REQUIREMENTS.md +9 -0
- package/examples/toolchains/turbo/repo/_gitignore +4 -0
- package/examples/toolchains/turbo/repo/package.json +13 -0
- package/examples/toolchains/turbo/repo/packages/checker/check.mjs +5 -0
- package/examples/toolchains/turbo/repo/packages/checker/package.json +9 -0
- package/examples/toolchains/turbo/repo/packages/label/package.json +14 -0
- package/examples/toolchains/turbo/repo/packages/label/src/label.js +4 -0
- package/examples/toolchains/turbo/repo/packages/label/test/label.test.js +13 -0
- package/examples/toolchains/turbo/repo/pnpm-lock.yaml +94 -0
- package/examples/toolchains/turbo/repo/pnpm-workspace.yaml +2 -0
- package/examples/toolchains/turbo/repo/turbo.json +7 -0
- package/examples/toolchains/turbo/task.json +25 -0
- package/examples/turbo-starter/README.md +16 -0
- package/examples/turbo-starter/changes/issued-at-consumer-only.patch +12 -0
- package/examples/turbo-starter/changes/issued-at.patch +130 -0
- package/examples/turbo-starter/cleanup.mjs +58 -0
- package/examples/turbo-starter/graph.json +32 -0
- package/examples/turbo-starter/harness/acceptance/db-isolation.test.mjs +97 -0
- package/examples/turbo-starter/harness/acceptance/env-probe.test.mjs +75 -0
- package/examples/turbo-starter/harness/acceptance/generation.test.mjs +54 -0
- package/examples/turbo-starter/harness/acceptance/issued-at.test.mjs +43 -0
- package/examples/turbo-starter/harness/acceptance/lifecycle-probe.test.mjs +47 -0
- package/examples/turbo-starter/harness/compose-bridge.mjs +593 -0
- package/examples/turbo-starter/harness/compose.acceptance.yml +23 -0
- package/examples/turbo-starter/harness/env/backend.env.template +7 -0
- package/examples/turbo-starter/harness/env/compose.env.template +6 -0
- package/examples/turbo-starter/policy.json +109 -0
- package/examples/turbo-starter/policy.lifecycle.json +114 -0
- package/examples/turbo-starter/setup.mjs +352 -0
- package/examples/two-vendors/policy.json +30 -0
- package/lib/agents/cli-adapter.d.ts +48 -0
- package/lib/agents/cli-adapter.js +393 -0
- package/lib/agents/inspect.d.ts +60 -0
- package/lib/agents/inspect.js +296 -0
- package/lib/agents/probe-server.d.ts +2 -0
- package/lib/agents/probe-server.js +13 -0
- package/lib/agents/review-probe.d.ts +345 -0
- package/lib/agents/review-probe.js +1037 -0
- package/lib/agents/runtime-events.d.ts +11 -0
- package/lib/agents/runtime-events.js +21 -0
- package/lib/agents/schemas.d.ts +217 -0
- package/lib/agents/schemas.js +124 -0
- package/lib/agents/usage.d.ts +8 -0
- package/lib/agents/usage.js +83 -0
- package/lib/catalog/bytes.d.ts +9 -0
- package/lib/catalog/bytes.js +14 -0
- package/lib/catalog/harness.d.ts +3 -0
- package/lib/catalog/harness.js +11 -0
- package/lib/catalog/index.d.ts +5 -0
- package/lib/catalog/index.js +5 -0
- package/lib/catalog/operations.d.ts +24 -0
- package/lib/catalog/operations.js +74 -0
- package/lib/catalog/page.d.ts +46 -0
- package/lib/catalog/page.js +128 -0
- package/lib/catalog/shared.d.ts +37 -0
- package/lib/catalog/shared.js +67 -0
- package/lib/cli.d.ts +2 -0
- package/lib/cli.js +673 -0
- package/lib/connectors/files.d.ts +108 -0
- package/lib/connectors/files.js +133 -0
- package/lib/contracts/catalog.d.ts +31 -0
- package/lib/contracts/catalog.js +18 -0
- package/lib/contracts/checks.d.ts +307 -0
- package/lib/contracts/checks.js +181 -0
- package/lib/contracts/cli.d.ts +4665 -0
- package/lib/contracts/cli.js +840 -0
- package/lib/contracts/context.d.ts +135 -0
- package/lib/contracts/context.js +129 -0
- package/lib/contracts/diagnosis.d.ts +108 -0
- package/lib/contracts/diagnosis.js +69 -0
- package/lib/contracts/digest.d.ts +9 -0
- package/lib/contracts/digest.js +22 -0
- package/lib/contracts/errors.d.ts +89 -0
- package/lib/contracts/errors.js +74 -0
- package/lib/contracts/events.d.ts +827 -0
- package/lib/contracts/events.js +258 -0
- package/lib/contracts/execution.d.ts +3423 -0
- package/lib/contracts/execution.js +936 -0
- package/lib/contracts/failure.d.ts +38 -0
- package/lib/contracts/failure.js +53 -0
- package/lib/contracts/index.d.ts +22 -0
- package/lib/contracts/index.js +22 -0
- package/lib/contracts/planning.d.ts +433 -0
- package/lib/contracts/planning.js +159 -0
- package/lib/contracts/policy.d.ts +1075 -0
- package/lib/contracts/policy.js +544 -0
- package/lib/contracts/ports.d.ts +417 -0
- package/lib/contracts/ports.js +1 -0
- package/lib/contracts/primitives.d.ts +63 -0
- package/lib/contracts/primitives.js +73 -0
- package/lib/contracts/profiles.d.ts +340 -0
- package/lib/contracts/profiles.js +109 -0
- package/lib/contracts/project.d.ts +69 -0
- package/lib/contracts/project.js +47 -0
- package/lib/contracts/published.d.ts +3467 -0
- package/lib/contracts/published.js +40 -0
- package/lib/contracts/repair-policy.d.ts +31 -0
- package/lib/contracts/repair-policy.js +77 -0
- package/lib/contracts/result.d.ts +1284 -0
- package/lib/contracts/result.js +311 -0
- package/lib/contracts/review.d.ts +441 -0
- package/lib/contracts/review.js +477 -0
- package/lib/contracts/toolchain.d.ts +96 -0
- package/lib/contracts/toolchain.js +89 -0
- package/lib/contracts/version.d.ts +17 -0
- package/lib/contracts/version.js +17 -0
- package/lib/contracts/work.d.ts +171 -0
- package/lib/contracts/work.js +178 -0
- package/lib/control/base-move.d.ts +44 -0
- package/lib/control/base-move.js +90 -0
- package/lib/control/doctor.d.ts +50 -0
- package/lib/control/doctor.js +113 -0
- package/lib/control/harness.d.ts +1125 -0
- package/lib/control/harness.js +741 -0
- package/lib/control/provenance.d.ts +17 -0
- package/lib/control/provenance.js +25 -0
- package/lib/control/recovery.d.ts +237 -0
- package/lib/control/recovery.js +236 -0
- package/lib/control/review.d.ts +62 -0
- package/lib/control/review.js +182 -0
- package/lib/control/workflow.d.ts +256 -0
- package/lib/control/workflow.js +277 -0
- package/lib/engine/budget.d.ts +345 -0
- package/lib/engine/budget.js +278 -0
- package/lib/engine/classify.d.ts +8 -0
- package/lib/engine/classify.js +41 -0
- package/lib/engine/engine.d.ts +1564 -0
- package/lib/engine/engine.js +2283 -0
- package/lib/engine/failure.d.ts +1 -0
- package/lib/engine/failure.js +3 -0
- package/lib/engine/joint-runner.d.ts +257 -0
- package/lib/engine/joint-runner.js +254 -0
- package/lib/engine/measured.d.ts +15 -0
- package/lib/engine/measured.js +82 -0
- package/lib/engine/prompt.d.ts +66 -0
- package/lib/engine/prompt.js +131 -0
- package/lib/engine/property-recovery.d.ts +50 -0
- package/lib/engine/property-recovery.js +171 -0
- package/lib/engine/repair.d.ts +33 -0
- package/lib/engine/repair.js +82 -0
- package/lib/engine/result.d.ts +9 -0
- package/lib/engine/result.js +194 -0
- package/lib/engine/reuse.d.ts +80 -0
- package/lib/engine/reuse.js +102 -0
- package/lib/engine/runner.d.ts +360 -0
- package/lib/engine/runner.js +1844 -0
- package/lib/engine/standalone.d.ts +6 -0
- package/lib/engine/standalone.js +48 -0
- package/lib/engine/usage.d.ts +87 -0
- package/lib/engine/usage.js +165 -0
- package/lib/environment/isolation.d.ts +110 -0
- package/lib/environment/isolation.js +238 -0
- package/lib/environment/lifecycle.d.ts +40 -0
- package/lib/environment/lifecycle.js +197 -0
- package/lib/environment/live-calls.d.ts +14 -0
- package/lib/environment/live-calls.js +73 -0
- package/lib/environment/os-tools.d.ts +16 -0
- package/lib/environment/os-tools.js +35 -0
- package/lib/environment/process.d.ts +40 -0
- package/lib/environment/process.js +375 -0
- package/lib/environment/redaction.d.ts +22 -0
- package/lib/environment/redaction.js +102 -0
- package/lib/environment/resources.d.ts +31 -0
- package/lib/environment/resources.js +120 -0
- package/lib/explain/diagnose.d.ts +25 -0
- package/lib/explain/diagnose.js +60 -0
- package/lib/explain/state.d.ts +18 -0
- package/lib/explain/state.js +305 -0
- package/lib/index.d.ts +72 -0
- package/lib/index.js +74 -0
- package/lib/init/policy.d.ts +40 -0
- package/lib/init/policy.js +73 -0
- package/lib/init/project.d.ts +52 -0
- package/lib/init/project.js +412 -0
- package/lib/integrations/connector/commands.d.ts +358 -0
- package/lib/integrations/connector/commands.js +428 -0
- package/lib/integrations/connector/config.d.ts +215 -0
- package/lib/integrations/connector/config.js +214 -0
- package/lib/integrations/connector/delivery.d.ts +107 -0
- package/lib/integrations/connector/delivery.js +591 -0
- package/lib/integrations/connector/fake.d.ts +291 -0
- package/lib/integrations/connector/fake.js +786 -0
- package/lib/integrations/connector/history.d.ts +124 -0
- package/lib/integrations/connector/history.js +497 -0
- package/lib/integrations/connector/index.d.ts +16 -0
- package/lib/integrations/connector/index.js +16 -0
- package/lib/integrations/connector/redact.d.ts +19 -0
- package/lib/integrations/connector/redact.js +91 -0
- package/lib/integrations/connector/registry.d.ts +15 -0
- package/lib/integrations/connector/registry.js +43 -0
- package/lib/integrations/connector/snapshot.d.ts +131 -0
- package/lib/integrations/connector/snapshot.js +422 -0
- package/lib/integrations/connector/source.d.ts +37 -0
- package/lib/integrations/connector/source.js +73 -0
- package/lib/integrations/connector/steps.d.ts +71 -0
- package/lib/integrations/connector/steps.js +188 -0
- package/lib/integrations/connector/store.d.ts +140 -0
- package/lib/integrations/connector/store.js +277 -0
- package/lib/integrations/connector/summary.d.ts +38 -0
- package/lib/integrations/connector/summary.js +59 -0
- package/lib/integrations/connector/testing-worker.d.ts +1 -0
- package/lib/integrations/connector/testing-worker.js +81 -0
- package/lib/integrations/connector/testing.d.ts +205 -0
- package/lib/integrations/connector/testing.js +1615 -0
- package/lib/integrations/connector/transport.d.ts +240 -0
- package/lib/integrations/connector/transport.js +28 -0
- package/lib/integrations/memory/context.d.ts +120 -0
- package/lib/integrations/memory/context.js +239 -0
- package/lib/integrations/memory/index.d.ts +8 -0
- package/lib/integrations/memory/index.js +8 -0
- package/lib/integrations/memory/provider.d.ts +79 -0
- package/lib/integrations/memory/provider.js +22 -0
- package/lib/integrations/memory/sink.d.ts +56 -0
- package/lib/integrations/memory/sink.js +116 -0
- package/lib/integrations/memory/testing.d.ts +44 -0
- package/lib/integrations/memory/testing.js +61 -0
- package/lib/integrations/relay-v1/index.d.ts +122 -0
- package/lib/integrations/relay-v1/index.js +860 -0
- package/lib/integrations/relay-v2/index.d.ts +145 -0
- package/lib/integrations/relay-v2/index.js +752 -0
- package/lib/integrations/relay-v2/process.d.ts +32 -0
- package/lib/integrations/relay-v2/process.js +112 -0
- package/lib/integrations/relay-v2/protocol.d.ts +172 -0
- package/lib/integrations/relay-v2/protocol.js +142 -0
- package/lib/package.d.ts +2 -0
- package/lib/package.js +3 -0
- package/lib/planning/check.d.ts +26 -0
- package/lib/planning/check.js +174 -0
- package/lib/planning/facts.d.ts +13 -0
- package/lib/planning/facts.js +47 -0
- package/lib/planning/graph.d.ts +20 -0
- package/lib/planning/graph.js +114 -0
- package/lib/planning/index.d.ts +6 -0
- package/lib/planning/index.js +6 -0
- package/lib/planning/issues.d.ts +19 -0
- package/lib/planning/issues.js +210 -0
- package/lib/planning/request.d.ts +19 -0
- package/lib/planning/request.js +57 -0
- package/lib/planning/standalone.d.ts +16 -0
- package/lib/planning/standalone.js +19 -0
- package/lib/planning/stub.d.ts +2 -0
- package/lib/planning/stub.js +5 -0
- package/lib/profiles/resolve.d.ts +266 -0
- package/lib/profiles/resolve.js +322 -0
- package/lib/projections/chain.d.ts +35 -0
- package/lib/projections/chain.js +72 -0
- package/lib/projections/clip.d.ts +6 -0
- package/lib/projections/clip.js +23 -0
- package/lib/projections/enums.d.ts +7 -0
- package/lib/projections/enums.js +19 -0
- package/lib/projections/index.d.ts +8 -0
- package/lib/projections/index.js +9 -0
- package/lib/projections/next.d.ts +28 -0
- package/lib/projections/next.js +75 -0
- package/lib/projections/progress.d.ts +27 -0
- package/lib/projections/progress.js +37 -0
- package/lib/projections/queue.d.ts +21 -0
- package/lib/projections/queue.js +18 -0
- package/lib/projections/stop.d.ts +98 -0
- package/lib/projections/stop.js +532 -0
- package/lib/setup/files.d.ts +45 -0
- package/lib/setup/files.js +280 -0
- package/lib/storage/document.d.ts +1286 -0
- package/lib/storage/document.js +80 -0
- package/lib/storage/sqlite.d.ts +35 -0
- package/lib/storage/sqlite.js +260 -0
- package/lib/testing/index.d.ts +5 -0
- package/lib/testing/index.js +5 -0
- package/lib/testing/store-contract.d.ts +8 -0
- package/lib/testing/store-contract.js +167 -0
- package/lib/toolchains/index.d.ts +9 -0
- package/lib/toolchains/index.js +9 -0
- package/lib/toolchains/inspect.d.ts +105 -0
- package/lib/toolchains/inspect.js +831 -0
- package/lib/toolchains/manifests.d.ts +67 -0
- package/lib/toolchains/manifests.js +238 -0
- package/lib/toolchains/probe.d.ts +28 -0
- package/lib/toolchains/probe.js +54 -0
- package/lib/toolchains/recipes.d.ts +33 -0
- package/lib/toolchains/recipes.js +51 -0
- package/lib/validate.d.ts +37 -0
- package/lib/validate.js +182 -0
- package/lib/verification/acceptance.d.ts +284 -0
- package/lib/verification/acceptance.js +670 -0
- package/lib/verification/checks.d.ts +72 -0
- package/lib/verification/checks.js +190 -0
- package/lib/verification/confirm.d.ts +125 -0
- package/lib/verification/confirm.js +411 -0
- package/lib/verification/corpus.d.ts +1303 -0
- package/lib/verification/corpus.js +744 -0
- package/lib/verification/dependencies.d.ts +66 -0
- package/lib/verification/dependencies.js +144 -0
- package/lib/verification/gates.d.ts +182 -0
- package/lib/verification/gates.js +641 -0
- package/lib/verification/joint.d.ts +63 -0
- package/lib/verification/joint.js +121 -0
- package/lib/verification/proof.d.ts +54 -0
- package/lib/verification/proof.js +96 -0
- package/lib/verification/property.d.ts +86 -0
- package/lib/verification/property.js +214 -0
- package/lib/verification/requirements.d.ts +25 -0
- package/lib/verification/requirements.js +69 -0
- package/lib/verification/self-check.d.ts +29 -0
- package/lib/verification/self-check.js +99 -0
- package/lib/verification/spike.d.ts +79 -0
- package/lib/verification/spike.js +124 -0
- package/package.json +104 -4
- package/profiles/expo-mobile.json +15 -0
- package/profiles/go-api.json +15 -0
- package/profiles/go-gotestsum.json +21 -0
- package/profiles/mobile-maestro.json +29 -0
- package/profiles/nest-api.json +26 -0
- package/profiles/next-product.json +72 -0
- package/profiles/node-checks.json +77 -0
- package/profiles/npm-ci.json +22 -0
- package/profiles/pnpm-frozen.json +24 -0
- package/profiles/python-api.json +32 -0
- package/profiles/python-uv.json +26 -0
- package/profiles/react-native.json +50 -0
- package/profiles/react-vite-admin.json +71 -0
- package/schemas/context-snapshot.schema.json +231 -0
- package/schemas/contract-document.schema.json +385 -0
- package/schemas/execution-document.schema.json +3881 -0
- package/schemas/execution-policy.schema.json +2196 -0
- package/schemas/joint-verification.schema.json +617 -0
- package/schemas/plan-draft.schema.json +217 -0
- package/schemas/project-manifest.schema.json +167 -0
- package/schemas/result-envelope.schema.json +1654 -0
- package/schemas/review-record.schema.json +177 -0
- package/schemas/run-event.schema.json +2458 -0
- package/schemas/run-result.schema.json +1572 -0
- package/schemas/stack-profile.schema.json +535 -0
- package/schemas/stop-diagnosis.schema.json +169 -0
- package/schemas/work-graph.schema.json +381 -0
- package/schemas/work-order.schema.json +256 -0
- package/skills/harness/SKILL.md +247 -0
- package/skills/harness-setup/SKILL.md +356 -0
- package/templates/AGENTS.md +13 -0
- package/templates/controller-mode/AGENTS.controller.md +58 -0
- package/templates/controller-mode/README.md +44 -0
- package/templates/graph.json +22 -0
- package/templates/plan-draft.json +35 -0
- package/templates/policy.json +28 -0
|
@@ -0,0 +1,1303 @@
|
|
|
1
|
+
import { type CheckSuite, type ExecutionView, type WorkState } from '../contracts/index.ts';
|
|
2
|
+
import type { Engine } from '../engine/engine.ts';
|
|
3
|
+
/**
|
|
4
|
+
* Версионируемый корпус подтверждённых случаев.
|
|
5
|
+
*
|
|
6
|
+
* Воспроизведение из находки ревью — наблюдение, а не обязательство.
|
|
7
|
+
* Обязательство хранится здесь: случай подтверждён закреплённым эталоном на
|
|
8
|
+
* дефектном SHA, вошёл в неизменяемую добавочную версию корпуса, и поручение
|
|
9
|
+
* приняло эту версию отдельной операцией. Корпус — локальная запись
|
|
10
|
+
* владельца-репозитория (`check-suites`); в журнал событий тела случаев не
|
|
11
|
+
* попадают.
|
|
12
|
+
*/
|
|
13
|
+
export type CorpusCase = CheckSuite['cases'][string];
|
|
14
|
+
export type CorpusVersion = CheckSuite['versions'][number];
|
|
15
|
+
export type CaseDecision = CheckSuite['decisions'][number];
|
|
16
|
+
export type PendingAdoption = CheckSuite['pending'][number];
|
|
17
|
+
/** Предел случая: вход и ожидание вместе. */
|
|
18
|
+
export declare const MAX_CASE_BYTES: number;
|
|
19
|
+
/** Предел корпуса целиком: запись переносится одним файлом. */
|
|
20
|
+
export declare const MAX_SUITE_BYTES = 1500000;
|
|
21
|
+
export declare const sha256: (text: string) => string;
|
|
22
|
+
/**
|
|
23
|
+
* Канонический JSON в рамках объявленного формата: ключи объектов
|
|
24
|
+
* сортируются (порядок ключей в JSON не несёт смысла), порядок массивов
|
|
25
|
+
* сохраняется, числа и строки не смешиваются — `1` и `"1"` разные входы.
|
|
26
|
+
*/
|
|
27
|
+
export declare function canonicalJson(value: unknown): string;
|
|
28
|
+
export declare function parseCanonical(text: string, what: string): string;
|
|
29
|
+
/** Канонический файл корпуса версии — его байты дают digest и Git blob. */
|
|
30
|
+
export declare function corpusFile(suite: CheckSuite, cases: string[], number: number): string;
|
|
31
|
+
export declare function scrubLocalPaths(text: string, roots?: string[]): string;
|
|
32
|
+
/** Локальные корни установки — и в заданном, и в разрешённом виде. */
|
|
33
|
+
export declare function localRoots(paths: (string | undefined)[]): string[];
|
|
34
|
+
export declare const caseId: (property: string, input: string, basis: string) => string;
|
|
35
|
+
/**
|
|
36
|
+
* Версия корпуса по ссылке. Digest однозначен; номер — только если в
|
|
37
|
+
* истории одна версия с ним: после объединения клонов номера могут совпасть.
|
|
38
|
+
*/
|
|
39
|
+
export declare function versionOf(suite: CheckSuite, ref: {
|
|
40
|
+
number?: number;
|
|
41
|
+
digest?: string;
|
|
42
|
+
}): {
|
|
43
|
+
number: number;
|
|
44
|
+
digest: string;
|
|
45
|
+
previous: string | null;
|
|
46
|
+
cases: string[];
|
|
47
|
+
blob: string;
|
|
48
|
+
createdAt: string;
|
|
49
|
+
reason: string;
|
|
50
|
+
decisions: string[];
|
|
51
|
+
};
|
|
52
|
+
export { suiteBasis } from './checks.ts';
|
|
53
|
+
/**
|
|
54
|
+
* Операции корпуса под транзакциями хранилища исполнения. Запись решения и
|
|
55
|
+
* версии — одна транзакция; принятие версии поручениями меняет их
|
|
56
|
+
* `checkVersion` и удержание в той же транзакции, что и запись корпуса.
|
|
57
|
+
*/
|
|
58
|
+
export declare class CorpusStore {
|
|
59
|
+
readonly engine: Engine;
|
|
60
|
+
/** Локальные корни для очистки переносимой диагностики. */
|
|
61
|
+
readonly roots: string[];
|
|
62
|
+
constructor(engine: Engine,
|
|
63
|
+
/** Локальные корни для очистки переносимой диагностики. */
|
|
64
|
+
roots?: string[]);
|
|
65
|
+
private get store();
|
|
66
|
+
private now;
|
|
67
|
+
private leaseMs;
|
|
68
|
+
all(view: ExecutionView, repositoryId?: string): {
|
|
69
|
+
id: string;
|
|
70
|
+
repositoryId: string;
|
|
71
|
+
contractId: string;
|
|
72
|
+
contractDigest: string;
|
|
73
|
+
gate: string;
|
|
74
|
+
basis: string;
|
|
75
|
+
cases: Record<string, {
|
|
76
|
+
id: string;
|
|
77
|
+
property: string;
|
|
78
|
+
input: string;
|
|
79
|
+
expected: string;
|
|
80
|
+
source: {
|
|
81
|
+
kind: "oracle";
|
|
82
|
+
decision: string;
|
|
83
|
+
sha: string;
|
|
84
|
+
runId?: string | undefined;
|
|
85
|
+
taskId?: string | undefined;
|
|
86
|
+
reproduction?: string | undefined;
|
|
87
|
+
};
|
|
88
|
+
addedAt: string;
|
|
89
|
+
}>;
|
|
90
|
+
versions: {
|
|
91
|
+
number: number;
|
|
92
|
+
digest: string;
|
|
93
|
+
previous: string | null;
|
|
94
|
+
cases: string[];
|
|
95
|
+
blob: string;
|
|
96
|
+
createdAt: string;
|
|
97
|
+
reason: string;
|
|
98
|
+
decisions: string[];
|
|
99
|
+
}[];
|
|
100
|
+
decisions: {
|
|
101
|
+
id: string;
|
|
102
|
+
property: string;
|
|
103
|
+
input: string;
|
|
104
|
+
inputHash: string;
|
|
105
|
+
outcome: "rejected" | "inconclusive" | "confirmed" | "refuted";
|
|
106
|
+
reason: string;
|
|
107
|
+
source: {
|
|
108
|
+
sha: string;
|
|
109
|
+
runId?: string | undefined;
|
|
110
|
+
taskId?: string | undefined;
|
|
111
|
+
};
|
|
112
|
+
origin: {
|
|
113
|
+
kind: "review" | "agent" | "operator" | "lead";
|
|
114
|
+
runtime?: string | undefined;
|
|
115
|
+
};
|
|
116
|
+
at: string;
|
|
117
|
+
key?: string | undefined;
|
|
118
|
+
claimed?: {
|
|
119
|
+
expected: string | null;
|
|
120
|
+
actual: string | null;
|
|
121
|
+
reproduction?: string | undefined;
|
|
122
|
+
} | undefined;
|
|
123
|
+
observed?: {
|
|
124
|
+
repeats: number;
|
|
125
|
+
durationsMs: number[];
|
|
126
|
+
expected?: string | undefined;
|
|
127
|
+
actual?: string | undefined;
|
|
128
|
+
equal?: boolean | undefined;
|
|
129
|
+
} | undefined;
|
|
130
|
+
method?: {
|
|
131
|
+
gate: string;
|
|
132
|
+
artifacts: {
|
|
133
|
+
path: string;
|
|
134
|
+
blob: string;
|
|
135
|
+
}[];
|
|
136
|
+
contract: string;
|
|
137
|
+
basis: string;
|
|
138
|
+
command?: string[] | undefined;
|
|
139
|
+
} | undefined;
|
|
140
|
+
caseId?: string | undefined;
|
|
141
|
+
version?: number | undefined;
|
|
142
|
+
}[];
|
|
143
|
+
adoptions: {
|
|
144
|
+
id: string;
|
|
145
|
+
taskId: string;
|
|
146
|
+
from: {
|
|
147
|
+
number: number;
|
|
148
|
+
digest: string;
|
|
149
|
+
} | null;
|
|
150
|
+
to: {
|
|
151
|
+
number: number;
|
|
152
|
+
digest: string;
|
|
153
|
+
};
|
|
154
|
+
actor: string;
|
|
155
|
+
reason: string;
|
|
156
|
+
operation: string;
|
|
157
|
+
at: string;
|
|
158
|
+
}[];
|
|
159
|
+
pending: {
|
|
160
|
+
id: string;
|
|
161
|
+
version: number;
|
|
162
|
+
tasks: string[];
|
|
163
|
+
status: "completed" | "waiting";
|
|
164
|
+
results: Record<string, string>;
|
|
165
|
+
actor: string;
|
|
166
|
+
reason: string;
|
|
167
|
+
requestedAt: string;
|
|
168
|
+
digest?: string | undefined;
|
|
169
|
+
awaitingOperator?: boolean | undefined;
|
|
170
|
+
completedAt?: string | undefined;
|
|
171
|
+
}[];
|
|
172
|
+
operations: Record<string, {
|
|
173
|
+
key: string;
|
|
174
|
+
status: "completed" | "running";
|
|
175
|
+
startedAt: string;
|
|
176
|
+
token?: string | undefined;
|
|
177
|
+
leaseUntil?: number | undefined;
|
|
178
|
+
decision?: string | undefined;
|
|
179
|
+
}>;
|
|
180
|
+
revision: number;
|
|
181
|
+
}[];
|
|
182
|
+
get(view: ExecutionView, id: string): {
|
|
183
|
+
id: string;
|
|
184
|
+
repositoryId: string;
|
|
185
|
+
contractId: string;
|
|
186
|
+
contractDigest: string;
|
|
187
|
+
gate: string;
|
|
188
|
+
basis: string;
|
|
189
|
+
cases: Record<string, {
|
|
190
|
+
id: string;
|
|
191
|
+
property: string;
|
|
192
|
+
input: string;
|
|
193
|
+
expected: string;
|
|
194
|
+
source: {
|
|
195
|
+
kind: "oracle";
|
|
196
|
+
decision: string;
|
|
197
|
+
sha: string;
|
|
198
|
+
runId?: string | undefined;
|
|
199
|
+
taskId?: string | undefined;
|
|
200
|
+
reproduction?: string | undefined;
|
|
201
|
+
};
|
|
202
|
+
addedAt: string;
|
|
203
|
+
}>;
|
|
204
|
+
versions: {
|
|
205
|
+
number: number;
|
|
206
|
+
digest: string;
|
|
207
|
+
previous: string | null;
|
|
208
|
+
cases: string[];
|
|
209
|
+
blob: string;
|
|
210
|
+
createdAt: string;
|
|
211
|
+
reason: string;
|
|
212
|
+
decisions: string[];
|
|
213
|
+
}[];
|
|
214
|
+
decisions: {
|
|
215
|
+
id: string;
|
|
216
|
+
property: string;
|
|
217
|
+
input: string;
|
|
218
|
+
inputHash: string;
|
|
219
|
+
outcome: "rejected" | "inconclusive" | "confirmed" | "refuted";
|
|
220
|
+
reason: string;
|
|
221
|
+
source: {
|
|
222
|
+
sha: string;
|
|
223
|
+
runId?: string | undefined;
|
|
224
|
+
taskId?: string | undefined;
|
|
225
|
+
};
|
|
226
|
+
origin: {
|
|
227
|
+
kind: "review" | "agent" | "operator" | "lead";
|
|
228
|
+
runtime?: string | undefined;
|
|
229
|
+
};
|
|
230
|
+
at: string;
|
|
231
|
+
key?: string | undefined;
|
|
232
|
+
claimed?: {
|
|
233
|
+
expected: string | null;
|
|
234
|
+
actual: string | null;
|
|
235
|
+
reproduction?: string | undefined;
|
|
236
|
+
} | undefined;
|
|
237
|
+
observed?: {
|
|
238
|
+
repeats: number;
|
|
239
|
+
durationsMs: number[];
|
|
240
|
+
expected?: string | undefined;
|
|
241
|
+
actual?: string | undefined;
|
|
242
|
+
equal?: boolean | undefined;
|
|
243
|
+
} | undefined;
|
|
244
|
+
method?: {
|
|
245
|
+
gate: string;
|
|
246
|
+
artifacts: {
|
|
247
|
+
path: string;
|
|
248
|
+
blob: string;
|
|
249
|
+
}[];
|
|
250
|
+
contract: string;
|
|
251
|
+
basis: string;
|
|
252
|
+
command?: string[] | undefined;
|
|
253
|
+
} | undefined;
|
|
254
|
+
caseId?: string | undefined;
|
|
255
|
+
version?: number | undefined;
|
|
256
|
+
}[];
|
|
257
|
+
adoptions: {
|
|
258
|
+
id: string;
|
|
259
|
+
taskId: string;
|
|
260
|
+
from: {
|
|
261
|
+
number: number;
|
|
262
|
+
digest: string;
|
|
263
|
+
} | null;
|
|
264
|
+
to: {
|
|
265
|
+
number: number;
|
|
266
|
+
digest: string;
|
|
267
|
+
};
|
|
268
|
+
actor: string;
|
|
269
|
+
reason: string;
|
|
270
|
+
operation: string;
|
|
271
|
+
at: string;
|
|
272
|
+
}[];
|
|
273
|
+
pending: {
|
|
274
|
+
id: string;
|
|
275
|
+
version: number;
|
|
276
|
+
tasks: string[];
|
|
277
|
+
status: "completed" | "waiting";
|
|
278
|
+
results: Record<string, string>;
|
|
279
|
+
actor: string;
|
|
280
|
+
reason: string;
|
|
281
|
+
requestedAt: string;
|
|
282
|
+
digest?: string | undefined;
|
|
283
|
+
awaitingOperator?: boolean | undefined;
|
|
284
|
+
completedAt?: string | undefined;
|
|
285
|
+
}[];
|
|
286
|
+
operations: Record<string, {
|
|
287
|
+
key: string;
|
|
288
|
+
status: "completed" | "running";
|
|
289
|
+
startedAt: string;
|
|
290
|
+
token?: string | undefined;
|
|
291
|
+
leaseUntil?: number | undefined;
|
|
292
|
+
decision?: string | undefined;
|
|
293
|
+
}>;
|
|
294
|
+
revision: number;
|
|
295
|
+
};
|
|
296
|
+
read(id: string): {
|
|
297
|
+
id: string;
|
|
298
|
+
repositoryId: string;
|
|
299
|
+
contractId: string;
|
|
300
|
+
contractDigest: string;
|
|
301
|
+
gate: string;
|
|
302
|
+
basis: string;
|
|
303
|
+
cases: Record<string, {
|
|
304
|
+
id: string;
|
|
305
|
+
property: string;
|
|
306
|
+
input: string;
|
|
307
|
+
expected: string;
|
|
308
|
+
source: {
|
|
309
|
+
kind: "oracle";
|
|
310
|
+
decision: string;
|
|
311
|
+
sha: string;
|
|
312
|
+
runId?: string | undefined;
|
|
313
|
+
taskId?: string | undefined;
|
|
314
|
+
reproduction?: string | undefined;
|
|
315
|
+
};
|
|
316
|
+
addedAt: string;
|
|
317
|
+
}>;
|
|
318
|
+
versions: {
|
|
319
|
+
number: number;
|
|
320
|
+
digest: string;
|
|
321
|
+
previous: string | null;
|
|
322
|
+
cases: string[];
|
|
323
|
+
blob: string;
|
|
324
|
+
createdAt: string;
|
|
325
|
+
reason: string;
|
|
326
|
+
decisions: string[];
|
|
327
|
+
}[];
|
|
328
|
+
decisions: {
|
|
329
|
+
id: string;
|
|
330
|
+
property: string;
|
|
331
|
+
input: string;
|
|
332
|
+
inputHash: string;
|
|
333
|
+
outcome: "rejected" | "inconclusive" | "confirmed" | "refuted";
|
|
334
|
+
reason: string;
|
|
335
|
+
source: {
|
|
336
|
+
sha: string;
|
|
337
|
+
runId?: string | undefined;
|
|
338
|
+
taskId?: string | undefined;
|
|
339
|
+
};
|
|
340
|
+
origin: {
|
|
341
|
+
kind: "review" | "agent" | "operator" | "lead";
|
|
342
|
+
runtime?: string | undefined;
|
|
343
|
+
};
|
|
344
|
+
at: string;
|
|
345
|
+
key?: string | undefined;
|
|
346
|
+
claimed?: {
|
|
347
|
+
expected: string | null;
|
|
348
|
+
actual: string | null;
|
|
349
|
+
reproduction?: string | undefined;
|
|
350
|
+
} | undefined;
|
|
351
|
+
observed?: {
|
|
352
|
+
repeats: number;
|
|
353
|
+
durationsMs: number[];
|
|
354
|
+
expected?: string | undefined;
|
|
355
|
+
actual?: string | undefined;
|
|
356
|
+
equal?: boolean | undefined;
|
|
357
|
+
} | undefined;
|
|
358
|
+
method?: {
|
|
359
|
+
gate: string;
|
|
360
|
+
artifacts: {
|
|
361
|
+
path: string;
|
|
362
|
+
blob: string;
|
|
363
|
+
}[];
|
|
364
|
+
contract: string;
|
|
365
|
+
basis: string;
|
|
366
|
+
command?: string[] | undefined;
|
|
367
|
+
} | undefined;
|
|
368
|
+
caseId?: string | undefined;
|
|
369
|
+
version?: number | undefined;
|
|
370
|
+
}[];
|
|
371
|
+
adoptions: {
|
|
372
|
+
id: string;
|
|
373
|
+
taskId: string;
|
|
374
|
+
from: {
|
|
375
|
+
number: number;
|
|
376
|
+
digest: string;
|
|
377
|
+
} | null;
|
|
378
|
+
to: {
|
|
379
|
+
number: number;
|
|
380
|
+
digest: string;
|
|
381
|
+
};
|
|
382
|
+
actor: string;
|
|
383
|
+
reason: string;
|
|
384
|
+
operation: string;
|
|
385
|
+
at: string;
|
|
386
|
+
}[];
|
|
387
|
+
pending: {
|
|
388
|
+
id: string;
|
|
389
|
+
version: number;
|
|
390
|
+
tasks: string[];
|
|
391
|
+
status: "completed" | "waiting";
|
|
392
|
+
results: Record<string, string>;
|
|
393
|
+
actor: string;
|
|
394
|
+
reason: string;
|
|
395
|
+
requestedAt: string;
|
|
396
|
+
digest?: string | undefined;
|
|
397
|
+
awaitingOperator?: boolean | undefined;
|
|
398
|
+
completedAt?: string | undefined;
|
|
399
|
+
}[];
|
|
400
|
+
operations: Record<string, {
|
|
401
|
+
key: string;
|
|
402
|
+
status: "completed" | "running";
|
|
403
|
+
startedAt: string;
|
|
404
|
+
token?: string | undefined;
|
|
405
|
+
leaseUntil?: number | undefined;
|
|
406
|
+
decision?: string | undefined;
|
|
407
|
+
}>;
|
|
408
|
+
revision: number;
|
|
409
|
+
};
|
|
410
|
+
private save;
|
|
411
|
+
/** Корпус договора поручения; создаётся (в памяти) при первом обращении. */
|
|
412
|
+
suiteFor(view: ExecutionView, work: WorkState, property: string): {
|
|
413
|
+
suite: {
|
|
414
|
+
id: string;
|
|
415
|
+
repositoryId: string;
|
|
416
|
+
contractId: string;
|
|
417
|
+
contractDigest: string;
|
|
418
|
+
gate: string;
|
|
419
|
+
basis: string;
|
|
420
|
+
cases: Record<string, {
|
|
421
|
+
id: string;
|
|
422
|
+
property: string;
|
|
423
|
+
input: string;
|
|
424
|
+
expected: string;
|
|
425
|
+
source: {
|
|
426
|
+
kind: "oracle";
|
|
427
|
+
decision: string;
|
|
428
|
+
sha: string;
|
|
429
|
+
runId?: string | undefined;
|
|
430
|
+
taskId?: string | undefined;
|
|
431
|
+
reproduction?: string | undefined;
|
|
432
|
+
};
|
|
433
|
+
addedAt: string;
|
|
434
|
+
}>;
|
|
435
|
+
versions: {
|
|
436
|
+
number: number;
|
|
437
|
+
digest: string;
|
|
438
|
+
previous: string | null;
|
|
439
|
+
cases: string[];
|
|
440
|
+
blob: string;
|
|
441
|
+
createdAt: string;
|
|
442
|
+
reason: string;
|
|
443
|
+
decisions: string[];
|
|
444
|
+
}[];
|
|
445
|
+
decisions: {
|
|
446
|
+
id: string;
|
|
447
|
+
property: string;
|
|
448
|
+
input: string;
|
|
449
|
+
inputHash: string;
|
|
450
|
+
outcome: "rejected" | "inconclusive" | "confirmed" | "refuted";
|
|
451
|
+
reason: string;
|
|
452
|
+
source: {
|
|
453
|
+
sha: string;
|
|
454
|
+
runId?: string | undefined;
|
|
455
|
+
taskId?: string | undefined;
|
|
456
|
+
};
|
|
457
|
+
origin: {
|
|
458
|
+
kind: "review" | "agent" | "operator" | "lead";
|
|
459
|
+
runtime?: string | undefined;
|
|
460
|
+
};
|
|
461
|
+
at: string;
|
|
462
|
+
key?: string | undefined;
|
|
463
|
+
claimed?: {
|
|
464
|
+
expected: string | null;
|
|
465
|
+
actual: string | null;
|
|
466
|
+
reproduction?: string | undefined;
|
|
467
|
+
} | undefined;
|
|
468
|
+
observed?: {
|
|
469
|
+
repeats: number;
|
|
470
|
+
durationsMs: number[];
|
|
471
|
+
expected?: string | undefined;
|
|
472
|
+
actual?: string | undefined;
|
|
473
|
+
equal?: boolean | undefined;
|
|
474
|
+
} | undefined;
|
|
475
|
+
method?: {
|
|
476
|
+
gate: string;
|
|
477
|
+
artifacts: {
|
|
478
|
+
path: string;
|
|
479
|
+
blob: string;
|
|
480
|
+
}[];
|
|
481
|
+
contract: string;
|
|
482
|
+
basis: string;
|
|
483
|
+
command?: string[] | undefined;
|
|
484
|
+
} | undefined;
|
|
485
|
+
caseId?: string | undefined;
|
|
486
|
+
version?: number | undefined;
|
|
487
|
+
}[];
|
|
488
|
+
adoptions: {
|
|
489
|
+
id: string;
|
|
490
|
+
taskId: string;
|
|
491
|
+
from: {
|
|
492
|
+
number: number;
|
|
493
|
+
digest: string;
|
|
494
|
+
} | null;
|
|
495
|
+
to: {
|
|
496
|
+
number: number;
|
|
497
|
+
digest: string;
|
|
498
|
+
};
|
|
499
|
+
actor: string;
|
|
500
|
+
reason: string;
|
|
501
|
+
operation: string;
|
|
502
|
+
at: string;
|
|
503
|
+
}[];
|
|
504
|
+
pending: {
|
|
505
|
+
id: string;
|
|
506
|
+
version: number;
|
|
507
|
+
tasks: string[];
|
|
508
|
+
status: "completed" | "waiting";
|
|
509
|
+
results: Record<string, string>;
|
|
510
|
+
actor: string;
|
|
511
|
+
reason: string;
|
|
512
|
+
requestedAt: string;
|
|
513
|
+
digest?: string | undefined;
|
|
514
|
+
awaitingOperator?: boolean | undefined;
|
|
515
|
+
completedAt?: string | undefined;
|
|
516
|
+
}[];
|
|
517
|
+
operations: Record<string, {
|
|
518
|
+
key: string;
|
|
519
|
+
status: "completed" | "running";
|
|
520
|
+
startedAt: string;
|
|
521
|
+
token?: string | undefined;
|
|
522
|
+
leaseUntil?: number | undefined;
|
|
523
|
+
decision?: string | undefined;
|
|
524
|
+
}>;
|
|
525
|
+
revision: number;
|
|
526
|
+
};
|
|
527
|
+
contract: {
|
|
528
|
+
apiVersion: "devcontour-harness/v1alpha1";
|
|
529
|
+
id: string;
|
|
530
|
+
title: string;
|
|
531
|
+
content: string;
|
|
532
|
+
repositoryId?: string | undefined;
|
|
533
|
+
artifacts?: {
|
|
534
|
+
path: string;
|
|
535
|
+
blob: string;
|
|
536
|
+
}[] | undefined;
|
|
537
|
+
checks?: {
|
|
538
|
+
version: 1;
|
|
539
|
+
gate: string;
|
|
540
|
+
obligations: {
|
|
541
|
+
property: string;
|
|
542
|
+
requirements: string[];
|
|
543
|
+
promise: "functional" | "accuracy" | "optimality" | "completeness" | "performance" | "invariant" | "other";
|
|
544
|
+
domain: {
|
|
545
|
+
inputs: string;
|
|
546
|
+
bounds: string;
|
|
547
|
+
invalid: string;
|
|
548
|
+
units?: string | undefined;
|
|
549
|
+
};
|
|
550
|
+
answer: {
|
|
551
|
+
rules: string;
|
|
552
|
+
ties?: string | undefined;
|
|
553
|
+
rounding?: string | undefined;
|
|
554
|
+
tolerance?: string | undefined;
|
|
555
|
+
refusals?: string | undefined;
|
|
556
|
+
};
|
|
557
|
+
method: {
|
|
558
|
+
kind: "scenario" | "invariant" | "other" | "oracle" | "certificate" | "analytic";
|
|
559
|
+
description: string;
|
|
560
|
+
applicability: string;
|
|
561
|
+
artifacts: string[];
|
|
562
|
+
};
|
|
563
|
+
coverage: {
|
|
564
|
+
families: {
|
|
565
|
+
id: string;
|
|
566
|
+
kind: "typical" | "boundary" | "adversarial";
|
|
567
|
+
description: string;
|
|
568
|
+
minCases: number;
|
|
569
|
+
}[];
|
|
570
|
+
minCases: number;
|
|
571
|
+
corpus: boolean;
|
|
572
|
+
};
|
|
573
|
+
resources: {
|
|
574
|
+
subject: string;
|
|
575
|
+
oracle: string;
|
|
576
|
+
benchmark?: {
|
|
577
|
+
method: string;
|
|
578
|
+
environment: string;
|
|
579
|
+
} | undefined;
|
|
580
|
+
};
|
|
581
|
+
hard: boolean;
|
|
582
|
+
explanation?: string | undefined;
|
|
583
|
+
feasibility?: {
|
|
584
|
+
spike: string;
|
|
585
|
+
digest: string;
|
|
586
|
+
} | undefined;
|
|
587
|
+
}[];
|
|
588
|
+
corpus?: {
|
|
589
|
+
format: string;
|
|
590
|
+
extensible: boolean;
|
|
591
|
+
maxCases: number;
|
|
592
|
+
} | undefined;
|
|
593
|
+
} | undefined;
|
|
594
|
+
};
|
|
595
|
+
obligation: {
|
|
596
|
+
property: string;
|
|
597
|
+
requirements: string[];
|
|
598
|
+
promise: "functional" | "accuracy" | "optimality" | "completeness" | "performance" | "invariant" | "other";
|
|
599
|
+
domain: {
|
|
600
|
+
inputs: string;
|
|
601
|
+
bounds: string;
|
|
602
|
+
invalid: string;
|
|
603
|
+
units?: string | undefined;
|
|
604
|
+
};
|
|
605
|
+
answer: {
|
|
606
|
+
rules: string;
|
|
607
|
+
ties?: string | undefined;
|
|
608
|
+
rounding?: string | undefined;
|
|
609
|
+
tolerance?: string | undefined;
|
|
610
|
+
refusals?: string | undefined;
|
|
611
|
+
};
|
|
612
|
+
method: {
|
|
613
|
+
kind: "scenario" | "invariant" | "other" | "oracle" | "certificate" | "analytic";
|
|
614
|
+
description: string;
|
|
615
|
+
applicability: string;
|
|
616
|
+
artifacts: string[];
|
|
617
|
+
};
|
|
618
|
+
coverage: {
|
|
619
|
+
families: {
|
|
620
|
+
id: string;
|
|
621
|
+
kind: "typical" | "boundary" | "adversarial";
|
|
622
|
+
description: string;
|
|
623
|
+
minCases: number;
|
|
624
|
+
}[];
|
|
625
|
+
minCases: number;
|
|
626
|
+
corpus: boolean;
|
|
627
|
+
};
|
|
628
|
+
resources: {
|
|
629
|
+
subject: string;
|
|
630
|
+
oracle: string;
|
|
631
|
+
benchmark?: {
|
|
632
|
+
method: string;
|
|
633
|
+
environment: string;
|
|
634
|
+
} | undefined;
|
|
635
|
+
};
|
|
636
|
+
hard: boolean;
|
|
637
|
+
explanation?: string | undefined;
|
|
638
|
+
feasibility?: {
|
|
639
|
+
spike: string;
|
|
640
|
+
digest: string;
|
|
641
|
+
} | undefined;
|
|
642
|
+
};
|
|
643
|
+
};
|
|
644
|
+
head(suite: CheckSuite): {
|
|
645
|
+
number: number;
|
|
646
|
+
digest: string;
|
|
647
|
+
previous: string | null;
|
|
648
|
+
cases: string[];
|
|
649
|
+
blob: string;
|
|
650
|
+
createdAt: string;
|
|
651
|
+
reason: string;
|
|
652
|
+
decisions: string[];
|
|
653
|
+
} | undefined;
|
|
654
|
+
/** Случаи закреплённой версии и её канонический файл: их исполняет gate. */
|
|
655
|
+
snapshot(view: ExecutionView, binding: NonNullable<WorkState['checkVersion']>): {
|
|
656
|
+
digest: string;
|
|
657
|
+
content: string;
|
|
658
|
+
cases: {
|
|
659
|
+
id: string;
|
|
660
|
+
property: string;
|
|
661
|
+
}[];
|
|
662
|
+
};
|
|
663
|
+
/** Начать операцию подтверждения или вернуть её прежний исход по ключу. */
|
|
664
|
+
begin(initial: CheckSuite, key: string): {
|
|
665
|
+
done: CaseDecision;
|
|
666
|
+
token?: undefined;
|
|
667
|
+
} | {
|
|
668
|
+
token: string;
|
|
669
|
+
done?: undefined;
|
|
670
|
+
};
|
|
671
|
+
heartbeat(suiteId: string, key: string, token: string): void;
|
|
672
|
+
/** Снять владение операцией без решения: она завершилась отказом до проверки. */
|
|
673
|
+
end(suiteId: string, key: string, token: string): void;
|
|
674
|
+
private guard;
|
|
675
|
+
/**
|
|
676
|
+
* Записать решение и, если случай подтверждён, добавочную версию корпуса и
|
|
677
|
+
* отложенное принятие её поручениями. Одна транзакция: решение без версии
|
|
678
|
+
* или версия без решения не возникают. Конкурентная добавка не теряется:
|
|
679
|
+
* новая версия строится от текущей головы с повторной проверкой конфликта
|
|
680
|
+
* ожиданий.
|
|
681
|
+
*/
|
|
682
|
+
record(initial: CheckSuite, key: string, token: string, decision: Omit<CaseDecision, 'id' | 'at' | 'caseId' | 'version'>, blobFor: (content: string) => string, adopt: {
|
|
683
|
+
works: string[];
|
|
684
|
+
actor: string;
|
|
685
|
+
manual?: boolean;
|
|
686
|
+
}): {
|
|
687
|
+
decision: {
|
|
688
|
+
id: string;
|
|
689
|
+
property: string;
|
|
690
|
+
input: string;
|
|
691
|
+
inputHash: string;
|
|
692
|
+
outcome: "rejected" | "inconclusive" | "confirmed" | "refuted";
|
|
693
|
+
reason: string;
|
|
694
|
+
source: {
|
|
695
|
+
sha: string;
|
|
696
|
+
runId?: string | undefined;
|
|
697
|
+
taskId?: string | undefined;
|
|
698
|
+
};
|
|
699
|
+
origin: {
|
|
700
|
+
kind: "review" | "agent" | "operator" | "lead";
|
|
701
|
+
runtime?: string | undefined;
|
|
702
|
+
};
|
|
703
|
+
at: string;
|
|
704
|
+
key?: string | undefined;
|
|
705
|
+
claimed?: {
|
|
706
|
+
expected: string | null;
|
|
707
|
+
actual: string | null;
|
|
708
|
+
reproduction?: string | undefined;
|
|
709
|
+
} | undefined;
|
|
710
|
+
observed?: {
|
|
711
|
+
repeats: number;
|
|
712
|
+
durationsMs: number[];
|
|
713
|
+
expected?: string | undefined;
|
|
714
|
+
actual?: string | undefined;
|
|
715
|
+
equal?: boolean | undefined;
|
|
716
|
+
} | undefined;
|
|
717
|
+
method?: {
|
|
718
|
+
gate: string;
|
|
719
|
+
artifacts: {
|
|
720
|
+
path: string;
|
|
721
|
+
blob: string;
|
|
722
|
+
}[];
|
|
723
|
+
contract: string;
|
|
724
|
+
basis: string;
|
|
725
|
+
command?: string[] | undefined;
|
|
726
|
+
} | undefined;
|
|
727
|
+
caseId?: string | undefined;
|
|
728
|
+
version?: number | undefined;
|
|
729
|
+
};
|
|
730
|
+
suite: {
|
|
731
|
+
id: string;
|
|
732
|
+
repositoryId: string;
|
|
733
|
+
contractId: string;
|
|
734
|
+
contractDigest: string;
|
|
735
|
+
gate: string;
|
|
736
|
+
basis: string;
|
|
737
|
+
cases: Record<string, {
|
|
738
|
+
id: string;
|
|
739
|
+
property: string;
|
|
740
|
+
input: string;
|
|
741
|
+
expected: string;
|
|
742
|
+
source: {
|
|
743
|
+
kind: "oracle";
|
|
744
|
+
decision: string;
|
|
745
|
+
sha: string;
|
|
746
|
+
runId?: string | undefined;
|
|
747
|
+
taskId?: string | undefined;
|
|
748
|
+
reproduction?: string | undefined;
|
|
749
|
+
};
|
|
750
|
+
addedAt: string;
|
|
751
|
+
}>;
|
|
752
|
+
versions: {
|
|
753
|
+
number: number;
|
|
754
|
+
digest: string;
|
|
755
|
+
previous: string | null;
|
|
756
|
+
cases: string[];
|
|
757
|
+
blob: string;
|
|
758
|
+
createdAt: string;
|
|
759
|
+
reason: string;
|
|
760
|
+
decisions: string[];
|
|
761
|
+
}[];
|
|
762
|
+
decisions: {
|
|
763
|
+
id: string;
|
|
764
|
+
property: string;
|
|
765
|
+
input: string;
|
|
766
|
+
inputHash: string;
|
|
767
|
+
outcome: "rejected" | "inconclusive" | "confirmed" | "refuted";
|
|
768
|
+
reason: string;
|
|
769
|
+
source: {
|
|
770
|
+
sha: string;
|
|
771
|
+
runId?: string | undefined;
|
|
772
|
+
taskId?: string | undefined;
|
|
773
|
+
};
|
|
774
|
+
origin: {
|
|
775
|
+
kind: "review" | "agent" | "operator" | "lead";
|
|
776
|
+
runtime?: string | undefined;
|
|
777
|
+
};
|
|
778
|
+
at: string;
|
|
779
|
+
key?: string | undefined;
|
|
780
|
+
claimed?: {
|
|
781
|
+
expected: string | null;
|
|
782
|
+
actual: string | null;
|
|
783
|
+
reproduction?: string | undefined;
|
|
784
|
+
} | undefined;
|
|
785
|
+
observed?: {
|
|
786
|
+
repeats: number;
|
|
787
|
+
durationsMs: number[];
|
|
788
|
+
expected?: string | undefined;
|
|
789
|
+
actual?: string | undefined;
|
|
790
|
+
equal?: boolean | undefined;
|
|
791
|
+
} | undefined;
|
|
792
|
+
method?: {
|
|
793
|
+
gate: string;
|
|
794
|
+
artifacts: {
|
|
795
|
+
path: string;
|
|
796
|
+
blob: string;
|
|
797
|
+
}[];
|
|
798
|
+
contract: string;
|
|
799
|
+
basis: string;
|
|
800
|
+
command?: string[] | undefined;
|
|
801
|
+
} | undefined;
|
|
802
|
+
caseId?: string | undefined;
|
|
803
|
+
version?: number | undefined;
|
|
804
|
+
}[];
|
|
805
|
+
adoptions: {
|
|
806
|
+
id: string;
|
|
807
|
+
taskId: string;
|
|
808
|
+
from: {
|
|
809
|
+
number: number;
|
|
810
|
+
digest: string;
|
|
811
|
+
} | null;
|
|
812
|
+
to: {
|
|
813
|
+
number: number;
|
|
814
|
+
digest: string;
|
|
815
|
+
};
|
|
816
|
+
actor: string;
|
|
817
|
+
reason: string;
|
|
818
|
+
operation: string;
|
|
819
|
+
at: string;
|
|
820
|
+
}[];
|
|
821
|
+
pending: {
|
|
822
|
+
id: string;
|
|
823
|
+
version: number;
|
|
824
|
+
tasks: string[];
|
|
825
|
+
status: "completed" | "waiting";
|
|
826
|
+
results: Record<string, string>;
|
|
827
|
+
actor: string;
|
|
828
|
+
reason: string;
|
|
829
|
+
requestedAt: string;
|
|
830
|
+
digest?: string | undefined;
|
|
831
|
+
awaitingOperator?: boolean | undefined;
|
|
832
|
+
completedAt?: string | undefined;
|
|
833
|
+
}[];
|
|
834
|
+
operations: Record<string, {
|
|
835
|
+
key: string;
|
|
836
|
+
status: "completed" | "running";
|
|
837
|
+
startedAt: string;
|
|
838
|
+
token?: string | undefined;
|
|
839
|
+
leaseUntil?: number | undefined;
|
|
840
|
+
decision?: string | undefined;
|
|
841
|
+
}>;
|
|
842
|
+
revision: number;
|
|
843
|
+
};
|
|
844
|
+
pending: {
|
|
845
|
+
id: string;
|
|
846
|
+
version: number;
|
|
847
|
+
tasks: string[];
|
|
848
|
+
status: "completed" | "waiting";
|
|
849
|
+
results: Record<string, string>;
|
|
850
|
+
actor: string;
|
|
851
|
+
reason: string;
|
|
852
|
+
requestedAt: string;
|
|
853
|
+
digest?: string | undefined;
|
|
854
|
+
awaitingOperator?: boolean | undefined;
|
|
855
|
+
completedAt?: string | undefined;
|
|
856
|
+
} | undefined;
|
|
857
|
+
};
|
|
858
|
+
private declarationOf;
|
|
859
|
+
/**
|
|
860
|
+
* Принять версию корпуса явно перечисленными поручениями.
|
|
861
|
+
*
|
|
862
|
+
* Посередине активной попытки принятие недопустимо: выдача поручения
|
|
863
|
+
* удерживается, и принятие завершится после окончания попытки. Принятое
|
|
864
|
+
* поручение не меняется. Повтор идемпотентен; снимается только собственное
|
|
865
|
+
* удержание операции.
|
|
866
|
+
*/
|
|
867
|
+
adopt(suiteId: string, pendingId: string): {
|
|
868
|
+
pending: {
|
|
869
|
+
id: string;
|
|
870
|
+
version: number;
|
|
871
|
+
tasks: string[];
|
|
872
|
+
status: "completed" | "waiting";
|
|
873
|
+
results: Record<string, string>;
|
|
874
|
+
actor: string;
|
|
875
|
+
reason: string;
|
|
876
|
+
requestedAt: string;
|
|
877
|
+
digest?: string | undefined;
|
|
878
|
+
awaitingOperator?: boolean | undefined;
|
|
879
|
+
completedAt?: string | undefined;
|
|
880
|
+
};
|
|
881
|
+
suite: {
|
|
882
|
+
id: string;
|
|
883
|
+
repositoryId: string;
|
|
884
|
+
contractId: string;
|
|
885
|
+
contractDigest: string;
|
|
886
|
+
gate: string;
|
|
887
|
+
basis: string;
|
|
888
|
+
cases: Record<string, {
|
|
889
|
+
id: string;
|
|
890
|
+
property: string;
|
|
891
|
+
input: string;
|
|
892
|
+
expected: string;
|
|
893
|
+
source: {
|
|
894
|
+
kind: "oracle";
|
|
895
|
+
decision: string;
|
|
896
|
+
sha: string;
|
|
897
|
+
runId?: string | undefined;
|
|
898
|
+
taskId?: string | undefined;
|
|
899
|
+
reproduction?: string | undefined;
|
|
900
|
+
};
|
|
901
|
+
addedAt: string;
|
|
902
|
+
}>;
|
|
903
|
+
versions: {
|
|
904
|
+
number: number;
|
|
905
|
+
digest: string;
|
|
906
|
+
previous: string | null;
|
|
907
|
+
cases: string[];
|
|
908
|
+
blob: string;
|
|
909
|
+
createdAt: string;
|
|
910
|
+
reason: string;
|
|
911
|
+
decisions: string[];
|
|
912
|
+
}[];
|
|
913
|
+
decisions: {
|
|
914
|
+
id: string;
|
|
915
|
+
property: string;
|
|
916
|
+
input: string;
|
|
917
|
+
inputHash: string;
|
|
918
|
+
outcome: "rejected" | "inconclusive" | "confirmed" | "refuted";
|
|
919
|
+
reason: string;
|
|
920
|
+
source: {
|
|
921
|
+
sha: string;
|
|
922
|
+
runId?: string | undefined;
|
|
923
|
+
taskId?: string | undefined;
|
|
924
|
+
};
|
|
925
|
+
origin: {
|
|
926
|
+
kind: "review" | "agent" | "operator" | "lead";
|
|
927
|
+
runtime?: string | undefined;
|
|
928
|
+
};
|
|
929
|
+
at: string;
|
|
930
|
+
key?: string | undefined;
|
|
931
|
+
claimed?: {
|
|
932
|
+
expected: string | null;
|
|
933
|
+
actual: string | null;
|
|
934
|
+
reproduction?: string | undefined;
|
|
935
|
+
} | undefined;
|
|
936
|
+
observed?: {
|
|
937
|
+
repeats: number;
|
|
938
|
+
durationsMs: number[];
|
|
939
|
+
expected?: string | undefined;
|
|
940
|
+
actual?: string | undefined;
|
|
941
|
+
equal?: boolean | undefined;
|
|
942
|
+
} | undefined;
|
|
943
|
+
method?: {
|
|
944
|
+
gate: string;
|
|
945
|
+
artifacts: {
|
|
946
|
+
path: string;
|
|
947
|
+
blob: string;
|
|
948
|
+
}[];
|
|
949
|
+
contract: string;
|
|
950
|
+
basis: string;
|
|
951
|
+
command?: string[] | undefined;
|
|
952
|
+
} | undefined;
|
|
953
|
+
caseId?: string | undefined;
|
|
954
|
+
version?: number | undefined;
|
|
955
|
+
}[];
|
|
956
|
+
adoptions: {
|
|
957
|
+
id: string;
|
|
958
|
+
taskId: string;
|
|
959
|
+
from: {
|
|
960
|
+
number: number;
|
|
961
|
+
digest: string;
|
|
962
|
+
} | null;
|
|
963
|
+
to: {
|
|
964
|
+
number: number;
|
|
965
|
+
digest: string;
|
|
966
|
+
};
|
|
967
|
+
actor: string;
|
|
968
|
+
reason: string;
|
|
969
|
+
operation: string;
|
|
970
|
+
at: string;
|
|
971
|
+
}[];
|
|
972
|
+
pending: {
|
|
973
|
+
id: string;
|
|
974
|
+
version: number;
|
|
975
|
+
tasks: string[];
|
|
976
|
+
status: "completed" | "waiting";
|
|
977
|
+
results: Record<string, string>;
|
|
978
|
+
actor: string;
|
|
979
|
+
reason: string;
|
|
980
|
+
requestedAt: string;
|
|
981
|
+
digest?: string | undefined;
|
|
982
|
+
awaitingOperator?: boolean | undefined;
|
|
983
|
+
completedAt?: string | undefined;
|
|
984
|
+
}[];
|
|
985
|
+
operations: Record<string, {
|
|
986
|
+
key: string;
|
|
987
|
+
status: "completed" | "running";
|
|
988
|
+
startedAt: string;
|
|
989
|
+
token?: string | undefined;
|
|
990
|
+
leaseUntil?: number | undefined;
|
|
991
|
+
decision?: string | undefined;
|
|
992
|
+
}>;
|
|
993
|
+
revision: number;
|
|
994
|
+
};
|
|
995
|
+
};
|
|
996
|
+
private release;
|
|
997
|
+
private adoptable;
|
|
998
|
+
/**
|
|
999
|
+
* Явно принять уже существующую версию корпуса перечисленными поручениями.
|
|
1000
|
+
* Новых случаев не создаёт. В operator mode агент только запрашивает.
|
|
1001
|
+
*/
|
|
1002
|
+
request(suiteId: string, ref: {
|
|
1003
|
+
number?: number;
|
|
1004
|
+
digest?: string;
|
|
1005
|
+
}, works: string[], actor: string, reason: string, manual?: boolean): {
|
|
1006
|
+
pending: {
|
|
1007
|
+
id: string;
|
|
1008
|
+
version: number;
|
|
1009
|
+
tasks: string[];
|
|
1010
|
+
status: "completed" | "waiting";
|
|
1011
|
+
results: Record<string, string>;
|
|
1012
|
+
actor: string;
|
|
1013
|
+
reason: string;
|
|
1014
|
+
requestedAt: string;
|
|
1015
|
+
digest?: string | undefined;
|
|
1016
|
+
awaitingOperator?: boolean | undefined;
|
|
1017
|
+
completedAt?: string | undefined;
|
|
1018
|
+
};
|
|
1019
|
+
suite: {
|
|
1020
|
+
id: string;
|
|
1021
|
+
repositoryId: string;
|
|
1022
|
+
contractId: string;
|
|
1023
|
+
contractDigest: string;
|
|
1024
|
+
gate: string;
|
|
1025
|
+
basis: string;
|
|
1026
|
+
cases: Record<string, {
|
|
1027
|
+
id: string;
|
|
1028
|
+
property: string;
|
|
1029
|
+
input: string;
|
|
1030
|
+
expected: string;
|
|
1031
|
+
source: {
|
|
1032
|
+
kind: "oracle";
|
|
1033
|
+
decision: string;
|
|
1034
|
+
sha: string;
|
|
1035
|
+
runId?: string | undefined;
|
|
1036
|
+
taskId?: string | undefined;
|
|
1037
|
+
reproduction?: string | undefined;
|
|
1038
|
+
};
|
|
1039
|
+
addedAt: string;
|
|
1040
|
+
}>;
|
|
1041
|
+
versions: {
|
|
1042
|
+
number: number;
|
|
1043
|
+
digest: string;
|
|
1044
|
+
previous: string | null;
|
|
1045
|
+
cases: string[];
|
|
1046
|
+
blob: string;
|
|
1047
|
+
createdAt: string;
|
|
1048
|
+
reason: string;
|
|
1049
|
+
decisions: string[];
|
|
1050
|
+
}[];
|
|
1051
|
+
decisions: {
|
|
1052
|
+
id: string;
|
|
1053
|
+
property: string;
|
|
1054
|
+
input: string;
|
|
1055
|
+
inputHash: string;
|
|
1056
|
+
outcome: "rejected" | "inconclusive" | "confirmed" | "refuted";
|
|
1057
|
+
reason: string;
|
|
1058
|
+
source: {
|
|
1059
|
+
sha: string;
|
|
1060
|
+
runId?: string | undefined;
|
|
1061
|
+
taskId?: string | undefined;
|
|
1062
|
+
};
|
|
1063
|
+
origin: {
|
|
1064
|
+
kind: "review" | "agent" | "operator" | "lead";
|
|
1065
|
+
runtime?: string | undefined;
|
|
1066
|
+
};
|
|
1067
|
+
at: string;
|
|
1068
|
+
key?: string | undefined;
|
|
1069
|
+
claimed?: {
|
|
1070
|
+
expected: string | null;
|
|
1071
|
+
actual: string | null;
|
|
1072
|
+
reproduction?: string | undefined;
|
|
1073
|
+
} | undefined;
|
|
1074
|
+
observed?: {
|
|
1075
|
+
repeats: number;
|
|
1076
|
+
durationsMs: number[];
|
|
1077
|
+
expected?: string | undefined;
|
|
1078
|
+
actual?: string | undefined;
|
|
1079
|
+
equal?: boolean | undefined;
|
|
1080
|
+
} | undefined;
|
|
1081
|
+
method?: {
|
|
1082
|
+
gate: string;
|
|
1083
|
+
artifacts: {
|
|
1084
|
+
path: string;
|
|
1085
|
+
blob: string;
|
|
1086
|
+
}[];
|
|
1087
|
+
contract: string;
|
|
1088
|
+
basis: string;
|
|
1089
|
+
command?: string[] | undefined;
|
|
1090
|
+
} | undefined;
|
|
1091
|
+
caseId?: string | undefined;
|
|
1092
|
+
version?: number | undefined;
|
|
1093
|
+
}[];
|
|
1094
|
+
adoptions: {
|
|
1095
|
+
id: string;
|
|
1096
|
+
taskId: string;
|
|
1097
|
+
from: {
|
|
1098
|
+
number: number;
|
|
1099
|
+
digest: string;
|
|
1100
|
+
} | null;
|
|
1101
|
+
to: {
|
|
1102
|
+
number: number;
|
|
1103
|
+
digest: string;
|
|
1104
|
+
};
|
|
1105
|
+
actor: string;
|
|
1106
|
+
reason: string;
|
|
1107
|
+
operation: string;
|
|
1108
|
+
at: string;
|
|
1109
|
+
}[];
|
|
1110
|
+
pending: {
|
|
1111
|
+
id: string;
|
|
1112
|
+
version: number;
|
|
1113
|
+
tasks: string[];
|
|
1114
|
+
status: "completed" | "waiting";
|
|
1115
|
+
results: Record<string, string>;
|
|
1116
|
+
actor: string;
|
|
1117
|
+
reason: string;
|
|
1118
|
+
requestedAt: string;
|
|
1119
|
+
digest?: string | undefined;
|
|
1120
|
+
awaitingOperator?: boolean | undefined;
|
|
1121
|
+
completedAt?: string | undefined;
|
|
1122
|
+
}[];
|
|
1123
|
+
operations: Record<string, {
|
|
1124
|
+
key: string;
|
|
1125
|
+
status: "completed" | "running";
|
|
1126
|
+
startedAt: string;
|
|
1127
|
+
token?: string | undefined;
|
|
1128
|
+
leaseUntil?: number | undefined;
|
|
1129
|
+
decision?: string | undefined;
|
|
1130
|
+
}>;
|
|
1131
|
+
revision: number;
|
|
1132
|
+
};
|
|
1133
|
+
};
|
|
1134
|
+
/**
|
|
1135
|
+
* В operator mode выдача перечисленных незавершённых поручений удерживается
|
|
1136
|
+
* до ручного подтверждения: иначе следующая попытка шла бы без нового корпуса.
|
|
1137
|
+
*/
|
|
1138
|
+
private holdForOperator;
|
|
1139
|
+
/** Ручное техническое подтверждение принятия (operator mode). */
|
|
1140
|
+
approveAdoption(suiteId: string, pendingId: string): {
|
|
1141
|
+
pending: {
|
|
1142
|
+
id: string;
|
|
1143
|
+
version: number;
|
|
1144
|
+
tasks: string[];
|
|
1145
|
+
status: "completed" | "waiting";
|
|
1146
|
+
results: Record<string, string>;
|
|
1147
|
+
actor: string;
|
|
1148
|
+
reason: string;
|
|
1149
|
+
requestedAt: string;
|
|
1150
|
+
digest?: string | undefined;
|
|
1151
|
+
awaitingOperator?: boolean | undefined;
|
|
1152
|
+
completedAt?: string | undefined;
|
|
1153
|
+
};
|
|
1154
|
+
suite: {
|
|
1155
|
+
id: string;
|
|
1156
|
+
repositoryId: string;
|
|
1157
|
+
contractId: string;
|
|
1158
|
+
contractDigest: string;
|
|
1159
|
+
gate: string;
|
|
1160
|
+
basis: string;
|
|
1161
|
+
cases: Record<string, {
|
|
1162
|
+
id: string;
|
|
1163
|
+
property: string;
|
|
1164
|
+
input: string;
|
|
1165
|
+
expected: string;
|
|
1166
|
+
source: {
|
|
1167
|
+
kind: "oracle";
|
|
1168
|
+
decision: string;
|
|
1169
|
+
sha: string;
|
|
1170
|
+
runId?: string | undefined;
|
|
1171
|
+
taskId?: string | undefined;
|
|
1172
|
+
reproduction?: string | undefined;
|
|
1173
|
+
};
|
|
1174
|
+
addedAt: string;
|
|
1175
|
+
}>;
|
|
1176
|
+
versions: {
|
|
1177
|
+
number: number;
|
|
1178
|
+
digest: string;
|
|
1179
|
+
previous: string | null;
|
|
1180
|
+
cases: string[];
|
|
1181
|
+
blob: string;
|
|
1182
|
+
createdAt: string;
|
|
1183
|
+
reason: string;
|
|
1184
|
+
decisions: string[];
|
|
1185
|
+
}[];
|
|
1186
|
+
decisions: {
|
|
1187
|
+
id: string;
|
|
1188
|
+
property: string;
|
|
1189
|
+
input: string;
|
|
1190
|
+
inputHash: string;
|
|
1191
|
+
outcome: "rejected" | "inconclusive" | "confirmed" | "refuted";
|
|
1192
|
+
reason: string;
|
|
1193
|
+
source: {
|
|
1194
|
+
sha: string;
|
|
1195
|
+
runId?: string | undefined;
|
|
1196
|
+
taskId?: string | undefined;
|
|
1197
|
+
};
|
|
1198
|
+
origin: {
|
|
1199
|
+
kind: "review" | "agent" | "operator" | "lead";
|
|
1200
|
+
runtime?: string | undefined;
|
|
1201
|
+
};
|
|
1202
|
+
at: string;
|
|
1203
|
+
key?: string | undefined;
|
|
1204
|
+
claimed?: {
|
|
1205
|
+
expected: string | null;
|
|
1206
|
+
actual: string | null;
|
|
1207
|
+
reproduction?: string | undefined;
|
|
1208
|
+
} | undefined;
|
|
1209
|
+
observed?: {
|
|
1210
|
+
repeats: number;
|
|
1211
|
+
durationsMs: number[];
|
|
1212
|
+
expected?: string | undefined;
|
|
1213
|
+
actual?: string | undefined;
|
|
1214
|
+
equal?: boolean | undefined;
|
|
1215
|
+
} | undefined;
|
|
1216
|
+
method?: {
|
|
1217
|
+
gate: string;
|
|
1218
|
+
artifacts: {
|
|
1219
|
+
path: string;
|
|
1220
|
+
blob: string;
|
|
1221
|
+
}[];
|
|
1222
|
+
contract: string;
|
|
1223
|
+
basis: string;
|
|
1224
|
+
command?: string[] | undefined;
|
|
1225
|
+
} | undefined;
|
|
1226
|
+
caseId?: string | undefined;
|
|
1227
|
+
version?: number | undefined;
|
|
1228
|
+
}[];
|
|
1229
|
+
adoptions: {
|
|
1230
|
+
id: string;
|
|
1231
|
+
taskId: string;
|
|
1232
|
+
from: {
|
|
1233
|
+
number: number;
|
|
1234
|
+
digest: string;
|
|
1235
|
+
} | null;
|
|
1236
|
+
to: {
|
|
1237
|
+
number: number;
|
|
1238
|
+
digest: string;
|
|
1239
|
+
};
|
|
1240
|
+
actor: string;
|
|
1241
|
+
reason: string;
|
|
1242
|
+
operation: string;
|
|
1243
|
+
at: string;
|
|
1244
|
+
}[];
|
|
1245
|
+
pending: {
|
|
1246
|
+
id: string;
|
|
1247
|
+
version: number;
|
|
1248
|
+
tasks: string[];
|
|
1249
|
+
status: "completed" | "waiting";
|
|
1250
|
+
results: Record<string, string>;
|
|
1251
|
+
actor: string;
|
|
1252
|
+
reason: string;
|
|
1253
|
+
requestedAt: string;
|
|
1254
|
+
digest?: string | undefined;
|
|
1255
|
+
awaitingOperator?: boolean | undefined;
|
|
1256
|
+
completedAt?: string | undefined;
|
|
1257
|
+
}[];
|
|
1258
|
+
operations: Record<string, {
|
|
1259
|
+
key: string;
|
|
1260
|
+
status: "completed" | "running";
|
|
1261
|
+
startedAt: string;
|
|
1262
|
+
token?: string | undefined;
|
|
1263
|
+
leaseUntil?: number | undefined;
|
|
1264
|
+
decision?: string | undefined;
|
|
1265
|
+
}>;
|
|
1266
|
+
revision: number;
|
|
1267
|
+
};
|
|
1268
|
+
};
|
|
1269
|
+
/** Продолжить отложенные принятия: поручение освободилось. Ничего не запускает. */
|
|
1270
|
+
resume(): void;
|
|
1271
|
+
/**
|
|
1272
|
+
* Снять удержание операции принятия. Только своё: чужая операция
|
|
1273
|
+
* чужое удержание не снимает.
|
|
1274
|
+
*/
|
|
1275
|
+
abandon(suiteId: string, pendingId: string, operation: string): {
|
|
1276
|
+
pending: string;
|
|
1277
|
+
};
|
|
1278
|
+
}
|
|
1279
|
+
/**
|
|
1280
|
+
* Переносимая форма корпуса. Локальные операции (lease, token, отложенные
|
|
1281
|
+
* принятия) и исполняемая конфигурация (команда checker) не переносятся:
|
|
1282
|
+
* команда остаётся локальной политикой, и ссылка на artifact сама по себе
|
|
1283
|
+
* права исполнения не даёт.
|
|
1284
|
+
*/
|
|
1285
|
+
export type PortableSuite = Omit<CheckSuite, 'cases' | 'pending' | 'operations' | 'revision' | 'decisions'> & {
|
|
1286
|
+
cases: CorpusCase[];
|
|
1287
|
+
decisions: (Omit<CaseDecision, 'method'> & {
|
|
1288
|
+
method?: Omit<NonNullable<CaseDecision['method']>, 'command'>;
|
|
1289
|
+
})[];
|
|
1290
|
+
};
|
|
1291
|
+
export declare function portableSuite(suite: CheckSuite, roots?: string[]): PortableSuite;
|
|
1292
|
+
/**
|
|
1293
|
+
* Диагностические поля проходят очистку путей и на экспорте, и на чтении:
|
|
1294
|
+
* запись прежней версии могла сохранить их до появления очистки. Очистка
|
|
1295
|
+
* идемпотентна, нормативные поля (вход, ожидание, digest) не меняются.
|
|
1296
|
+
*/
|
|
1297
|
+
export declare function scrubPortable(suite: PortableSuite, roots?: string[]): PortableSuite;
|
|
1298
|
+
/**
|
|
1299
|
+
* Проверка переносимого корпуса: каждая версия собирается из своих случаев в
|
|
1300
|
+
* канонический файл, и его digest совпадает с записанным. Запись, где версия
|
|
1301
|
+
* ссылается на отсутствующий случай или подменён digest, не принимается.
|
|
1302
|
+
*/
|
|
1303
|
+
export declare function verifySuite(suite: PortableSuite): Map<string, string>;
|