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,358 @@
|
|
|
1
|
+
import { type Author, type ContextSnapshot, type ExecutionPolicy, type WorkGraph } from '../../contracts/index.ts';
|
|
2
|
+
import type { Harness } from '../../control/harness.ts';
|
|
3
|
+
import type { RunnerHooks } from '../../engine/runner.ts';
|
|
4
|
+
import { type LoadedConfig } from './config.ts';
|
|
5
|
+
import { RelaySink, type ReconcileDecision } from './delivery.ts';
|
|
6
|
+
import { HistoryRecorder } from './history.ts';
|
|
7
|
+
import { RelayWorkSource } from './source.ts';
|
|
8
|
+
import { ConnectorStore } from './store.ts';
|
|
9
|
+
import type { RelayTransport } from './transport.ts';
|
|
10
|
+
/**
|
|
11
|
+
* Пользовательский путь коннектора — общий для CLI и библиотеки:
|
|
12
|
+
* `check` → `snapshot` → (review-plan/approve) → `run` → `status` →
|
|
13
|
+
* `deliver`/`reconcile`. Ни одна операция не требует писать TypeScript.
|
|
14
|
+
*/
|
|
15
|
+
export declare const OWNERSHIP_NOTE = "\u041E\u0434\u0438\u043D \u0432\u043B\u0430\u0434\u0435\u043B\u0435\u0446 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438 \u0433\u0430\u0440\u0430\u043D\u0442\u0438\u0440\u043E\u0432\u0430\u043D \u0442\u043E\u043B\u044C\u043A\u043E \u0434\u043B\u044F \u043F\u0440\u043E\u0446\u0435\u0441\u0441\u043E\u0432 \u0441 \u043E\u0431\u0449\u0438\u043C \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u043E\u043C \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u044F \u043A\u043E\u043D\u043D\u0435\u043A\u0442\u043E\u0440\u0430 (lease \u0441 fencing \u0432 \u0435\u0433\u043E SQLite). \u041D\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043C\u044B\u0435 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0438 \u0441 \u0440\u0430\u0437\u043D\u044B\u043C\u0438 \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0430\u043C\u0438 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u044F \u0432\u043D\u0435 \u0433\u0430\u0440\u0430\u043D\u0442\u0438\u0438: \u043E\u043D\u0438 \u043C\u043E\u0433\u0443\u0442 \u0434\u043E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043E\u0434\u043D\u0443 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u044E \u0434\u0432\u0430\u0436\u0434\u044B.";
|
|
16
|
+
export interface OpenOptions {
|
|
17
|
+
/** Каталог состояния harness (`--state`); используется, если в конфигурации нет `stateDir`. */
|
|
18
|
+
stateDir: string;
|
|
19
|
+
/** Готовый транспорт (тесты, библиотека); без него — адаптер по provider. */
|
|
20
|
+
transport?: RelayTransport;
|
|
21
|
+
/** Значения, которые маскируются в итогах для получателя. */
|
|
22
|
+
secrets?: string[];
|
|
23
|
+
/** Точка отказа записи состояния коннектора (тесты). */
|
|
24
|
+
onStoreWrite?: (what: string) => void;
|
|
25
|
+
owner?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare function openConnector(source: string | LoadedConfig, options: OpenOptions): Promise<Connector>;
|
|
28
|
+
export declare class Connector {
|
|
29
|
+
readonly loaded: LoadedConfig;
|
|
30
|
+
readonly options: OpenOptions;
|
|
31
|
+
readonly id: string;
|
|
32
|
+
readonly stateDir: string;
|
|
33
|
+
readonly storeFile: string;
|
|
34
|
+
private storeInstance?;
|
|
35
|
+
private readonly redact;
|
|
36
|
+
/** Транспорт с замаскированными ошибками (известные секреты не выходят в диагностику). */
|
|
37
|
+
readonly transport: RelayTransport;
|
|
38
|
+
constructor(loaded: LoadedConfig, transport: RelayTransport, options: OpenOptions);
|
|
39
|
+
get config(): {
|
|
40
|
+
provider: "relay-v1-http";
|
|
41
|
+
relay: Record<string, unknown> & {
|
|
42
|
+
[x: string]: unknown;
|
|
43
|
+
endpoint: string;
|
|
44
|
+
};
|
|
45
|
+
version: 1;
|
|
46
|
+
projectId: string;
|
|
47
|
+
actor: string;
|
|
48
|
+
repository: {
|
|
49
|
+
id: string;
|
|
50
|
+
path?: string | undefined;
|
|
51
|
+
};
|
|
52
|
+
tasks: {
|
|
53
|
+
ref: string;
|
|
54
|
+
role: string;
|
|
55
|
+
writeScope: string[];
|
|
56
|
+
criteria: {
|
|
57
|
+
gate: string;
|
|
58
|
+
evidence: "gate" | "test";
|
|
59
|
+
id?: string | undefined;
|
|
60
|
+
title?: string | undefined;
|
|
61
|
+
testId?: string | undefined;
|
|
62
|
+
}[];
|
|
63
|
+
requiredDocuments: string[];
|
|
64
|
+
repositoryId?: string | undefined;
|
|
65
|
+
gates?: string[] | undefined;
|
|
66
|
+
}[];
|
|
67
|
+
completion: {
|
|
68
|
+
mode: "complete" | "review-only";
|
|
69
|
+
historicalComment: boolean;
|
|
70
|
+
column?: "ready" | "review" | "cancelled" | "done" | "in-progress" | "inbox" | undefined;
|
|
71
|
+
};
|
|
72
|
+
eligibility: {
|
|
73
|
+
columns: ("ready" | "review" | "cancelled" | "done" | "in-progress" | "inbox")[];
|
|
74
|
+
};
|
|
75
|
+
limits: {
|
|
76
|
+
documents: number;
|
|
77
|
+
documentBytes: number;
|
|
78
|
+
totalBytes: number;
|
|
79
|
+
taskBytes: number;
|
|
80
|
+
rereads: number;
|
|
81
|
+
leaseMs: number;
|
|
82
|
+
};
|
|
83
|
+
history: {
|
|
84
|
+
enabled: boolean;
|
|
85
|
+
client: string;
|
|
86
|
+
};
|
|
87
|
+
stateDir?: string | undefined;
|
|
88
|
+
} | {
|
|
89
|
+
provider: "relay-v2-cli";
|
|
90
|
+
relay: Record<string, unknown> & {
|
|
91
|
+
[x: string]: unknown;
|
|
92
|
+
binary: string;
|
|
93
|
+
config: string;
|
|
94
|
+
project?: string | undefined;
|
|
95
|
+
env?: Record<string, string> | undefined;
|
|
96
|
+
};
|
|
97
|
+
version: 1;
|
|
98
|
+
projectId: string;
|
|
99
|
+
actor: string;
|
|
100
|
+
repository: {
|
|
101
|
+
id: string;
|
|
102
|
+
path?: string | undefined;
|
|
103
|
+
};
|
|
104
|
+
tasks: {
|
|
105
|
+
ref: string;
|
|
106
|
+
role: string;
|
|
107
|
+
writeScope: string[];
|
|
108
|
+
criteria: {
|
|
109
|
+
gate: string;
|
|
110
|
+
evidence: "gate" | "test";
|
|
111
|
+
id?: string | undefined;
|
|
112
|
+
title?: string | undefined;
|
|
113
|
+
testId?: string | undefined;
|
|
114
|
+
}[];
|
|
115
|
+
requiredDocuments: string[];
|
|
116
|
+
repositoryId?: string | undefined;
|
|
117
|
+
gates?: string[] | undefined;
|
|
118
|
+
}[];
|
|
119
|
+
completion: {
|
|
120
|
+
mode: "complete" | "review-only";
|
|
121
|
+
historicalComment: boolean;
|
|
122
|
+
column?: "ready" | "review" | "cancelled" | "done" | "in-progress" | "inbox" | undefined;
|
|
123
|
+
};
|
|
124
|
+
eligibility: {
|
|
125
|
+
columns: ("ready" | "review" | "cancelled" | "done" | "in-progress" | "inbox")[];
|
|
126
|
+
};
|
|
127
|
+
limits: {
|
|
128
|
+
documents: number;
|
|
129
|
+
documentBytes: number;
|
|
130
|
+
totalBytes: number;
|
|
131
|
+
taskBytes: number;
|
|
132
|
+
rereads: number;
|
|
133
|
+
leaseMs: number;
|
|
134
|
+
};
|
|
135
|
+
history: {
|
|
136
|
+
enabled: boolean;
|
|
137
|
+
client: string;
|
|
138
|
+
};
|
|
139
|
+
stateDir?: string | undefined;
|
|
140
|
+
};
|
|
141
|
+
/** Состояние коннектора (создаётся при первой записи). */
|
|
142
|
+
get store(): ConnectorStore;
|
|
143
|
+
/** Только чтение: без создания файла; нет состояния — `undefined`. */
|
|
144
|
+
private readStore;
|
|
145
|
+
get source(): RelayWorkSource;
|
|
146
|
+
get history(): HistoryRecorder;
|
|
147
|
+
get sink(): RelaySink;
|
|
148
|
+
/** Хуки runner для `HarnessOptions.hooks`: история до исполнения попытки. */
|
|
149
|
+
hooks(): RunnerHooks;
|
|
150
|
+
close(): void;
|
|
151
|
+
/**
|
|
152
|
+
* Подключение, идентичность, capabilities, совпадение проекта и mapping —
|
|
153
|
+
* только чтением: без мутаций backend, без записи истории и без создания
|
|
154
|
+
* состояния коннектора.
|
|
155
|
+
*/
|
|
156
|
+
check(policy?: ExecutionPolicy): Promise<{
|
|
157
|
+
history: {
|
|
158
|
+
enabled: boolean;
|
|
159
|
+
capability: boolean;
|
|
160
|
+
};
|
|
161
|
+
mapping: {
|
|
162
|
+
ref: string;
|
|
163
|
+
key?: string;
|
|
164
|
+
problems: string[];
|
|
165
|
+
}[];
|
|
166
|
+
ownership: {
|
|
167
|
+
stateDir: string;
|
|
168
|
+
store: string;
|
|
169
|
+
note: string;
|
|
170
|
+
};
|
|
171
|
+
problems: string[];
|
|
172
|
+
identity?: {
|
|
173
|
+
capabilities: string[];
|
|
174
|
+
build: Record<string, string>;
|
|
175
|
+
} | undefined;
|
|
176
|
+
provider: "relay-v1-http" | "relay-v2-cli";
|
|
177
|
+
projectId: string;
|
|
178
|
+
connector: string;
|
|
179
|
+
connected: boolean;
|
|
180
|
+
projectMatches: boolean;
|
|
181
|
+
}>;
|
|
182
|
+
private checkReport;
|
|
183
|
+
/**
|
|
184
|
+
* Прочитать и предпросмотреть снимок; записать graph/context/manifest для
|
|
185
|
+
* `review-plan`/`approve`. Снимок закрепляется в состоянии коннектора по
|
|
186
|
+
* semantic digest: повтор неизменной постановки ничего не меняет.
|
|
187
|
+
*/
|
|
188
|
+
snapshot(outDir?: string): Promise<{
|
|
189
|
+
connector: string;
|
|
190
|
+
graphId: string;
|
|
191
|
+
graphDigest: string;
|
|
192
|
+
contextDigest: string;
|
|
193
|
+
revision: string;
|
|
194
|
+
created: boolean;
|
|
195
|
+
eligible: boolean;
|
|
196
|
+
problems: string[];
|
|
197
|
+
truncated: string[];
|
|
198
|
+
tasks: {
|
|
199
|
+
identity: string;
|
|
200
|
+
key: string;
|
|
201
|
+
orderId: string;
|
|
202
|
+
semanticDigest: string;
|
|
203
|
+
casRevision: number;
|
|
204
|
+
column: string;
|
|
205
|
+
}[];
|
|
206
|
+
files: {
|
|
207
|
+
graph: string;
|
|
208
|
+
context: string;
|
|
209
|
+
manifest: string;
|
|
210
|
+
};
|
|
211
|
+
snapshot: import("./snapshot.ts").BuiltSnapshot;
|
|
212
|
+
}>;
|
|
213
|
+
/**
|
|
214
|
+
* Перед запуском — свежее чтение: semantic digest обязан совпасть с
|
|
215
|
+
* закреплённым снимком (тем, что прошёл ревью/согласование), eligibility —
|
|
216
|
+
* выполняться. Иначе отказ до любого вызова runtime. Исполняется ровно
|
|
217
|
+
* закреплённый граф и контекст (те же байты, что видел reviewer плана).
|
|
218
|
+
*/
|
|
219
|
+
prepareRun(h: Harness): Promise<{
|
|
220
|
+
graph: WorkGraph;
|
|
221
|
+
context: ContextSnapshot;
|
|
222
|
+
}>;
|
|
223
|
+
run(h: Harness, options?: {
|
|
224
|
+
author?: Author;
|
|
225
|
+
once?: boolean;
|
|
226
|
+
}): Promise<{
|
|
227
|
+
works: {
|
|
228
|
+
blockers: {
|
|
229
|
+
code: "NOT_READY" | "PAUSED" | "ATTEMPTS_EXHAUSTED" | "APPROVAL_STALE" | "APPROVAL_REQUIRED" | "BUDGET_EXHAUSTED" | "REVIEWER_SAME_VENDOR" | "REVIEWER_MISSING" | "INVALID_INPUT";
|
|
230
|
+
message: string;
|
|
231
|
+
}[];
|
|
232
|
+
resultSha?: string | undefined;
|
|
233
|
+
runId?: string | undefined;
|
|
234
|
+
id: string;
|
|
235
|
+
status: "ready" | "failed" | "cancelled" | "draft" | "running" | "verifying" | "reviewing" | "integrating" | "done";
|
|
236
|
+
}[];
|
|
237
|
+
workflow?: {
|
|
238
|
+
history: {
|
|
239
|
+
at: string;
|
|
240
|
+
stage: number;
|
|
241
|
+
event: string;
|
|
242
|
+
}[];
|
|
243
|
+
error?: string | undefined;
|
|
244
|
+
key: string;
|
|
245
|
+
kind: string;
|
|
246
|
+
id: string;
|
|
247
|
+
stage: number;
|
|
248
|
+
status: "failed" | "completed" | "running" | "queued" | "stale";
|
|
249
|
+
attempts: number;
|
|
250
|
+
repairs: number;
|
|
251
|
+
repairBudget: number;
|
|
252
|
+
} | undefined;
|
|
253
|
+
graphId: string;
|
|
254
|
+
digest: string;
|
|
255
|
+
resumed: boolean;
|
|
256
|
+
}>;
|
|
257
|
+
private workIds;
|
|
258
|
+
/**
|
|
259
|
+
* Локальное состояние (принято, доставлено, конфликт, неизвестный исход) и
|
|
260
|
+
* независимое чтение получателя. Ошибка чтения получателя показывается, а не
|
|
261
|
+
* заменяется пустым состоянием.
|
|
262
|
+
*/
|
|
263
|
+
status(h?: Harness): Promise<{
|
|
264
|
+
ownership: {
|
|
265
|
+
stateDir: string;
|
|
266
|
+
store: string;
|
|
267
|
+
note: string;
|
|
268
|
+
};
|
|
269
|
+
tasks: {
|
|
270
|
+
workId: string;
|
|
271
|
+
local: {
|
|
272
|
+
resultSha?: string | undefined;
|
|
273
|
+
status: "ready" | "failed" | "cancelled" | "draft" | "running" | "verifying" | "reviewing" | "integrating" | "done";
|
|
274
|
+
attempt: number;
|
|
275
|
+
} | {
|
|
276
|
+
status: string;
|
|
277
|
+
};
|
|
278
|
+
deliveries: {
|
|
279
|
+
status: string;
|
|
280
|
+
key: string;
|
|
281
|
+
operation?: string;
|
|
282
|
+
}[];
|
|
283
|
+
operations: {
|
|
284
|
+
steps: {
|
|
285
|
+
n: number;
|
|
286
|
+
kind: "history" | "comment" | "historical-comment" | "criterion" | "move" | "session.start" | "session.intent" | "session.fork" | "session.attach" | "session.checkpoint" | "session.finish";
|
|
287
|
+
status: import("./store.ts").StepStatus;
|
|
288
|
+
marker: string;
|
|
289
|
+
}[];
|
|
290
|
+
lease: {
|
|
291
|
+
owner: string;
|
|
292
|
+
expiresAt: string;
|
|
293
|
+
} | undefined;
|
|
294
|
+
currentRevision?: string | undefined;
|
|
295
|
+
reason?: string | undefined;
|
|
296
|
+
key: string;
|
|
297
|
+
runId: string;
|
|
298
|
+
outcome: string;
|
|
299
|
+
status: import("./store.ts").OperationStatus;
|
|
300
|
+
}[];
|
|
301
|
+
remote: Record<string, unknown>;
|
|
302
|
+
key?: string | undefined;
|
|
303
|
+
identity?: string | undefined;
|
|
304
|
+
index: number;
|
|
305
|
+
ref: string;
|
|
306
|
+
}[];
|
|
307
|
+
snapshot?: {
|
|
308
|
+
revision: string;
|
|
309
|
+
graphId: string;
|
|
310
|
+
} | undefined;
|
|
311
|
+
connector: string;
|
|
312
|
+
provider: "relay-v1-http" | "relay-v2-cli";
|
|
313
|
+
projectId: string;
|
|
314
|
+
}>;
|
|
315
|
+
/** Доставить результаты (повтор — с тем же ключом, без writer/reviewer и Git). */
|
|
316
|
+
deliver(h: Harness, workId?: string): Promise<{
|
|
317
|
+
connector: string;
|
|
318
|
+
deliveries: {
|
|
319
|
+
workId: string;
|
|
320
|
+
delivery: {
|
|
321
|
+
sink: string;
|
|
322
|
+
key: string;
|
|
323
|
+
revision: string;
|
|
324
|
+
status: "failed" | "pending" | "delivered" | "conflict" | "uncertain";
|
|
325
|
+
attempts: number;
|
|
326
|
+
updatedAt: string;
|
|
327
|
+
lastError?: string | undefined;
|
|
328
|
+
operation?: string | undefined;
|
|
329
|
+
currentRevision?: string | undefined;
|
|
330
|
+
receipt?: string | undefined;
|
|
331
|
+
}[];
|
|
332
|
+
outcome: "accepted" | "rejected" | "blocked" | "cancelled" | "stopped";
|
|
333
|
+
}[];
|
|
334
|
+
}>;
|
|
335
|
+
/** Разбор неизвестного исхода/конфликта и, если факты позволяют, продолжение доставки. */
|
|
336
|
+
reconcile(h: Harness, operation: string, decision?: ReconcileDecision): Promise<{
|
|
337
|
+
delivery?: {
|
|
338
|
+
sink: string;
|
|
339
|
+
key: string;
|
|
340
|
+
revision: string;
|
|
341
|
+
status: "failed" | "pending" | "delivered" | "conflict" | "uncertain";
|
|
342
|
+
attempts: number;
|
|
343
|
+
updatedAt: string;
|
|
344
|
+
lastError?: string | undefined;
|
|
345
|
+
operation?: string | undefined;
|
|
346
|
+
currentRevision?: string | undefined;
|
|
347
|
+
receipt?: string | undefined;
|
|
348
|
+
}[] | undefined;
|
|
349
|
+
operation: string;
|
|
350
|
+
workId: string;
|
|
351
|
+
before: "failed" | "delivered" | "conflict" | "uncertain" | "intent" | "in-progress";
|
|
352
|
+
after: import("./store.ts").OperationStatus;
|
|
353
|
+
resolved: boolean;
|
|
354
|
+
facts: string[];
|
|
355
|
+
}>;
|
|
356
|
+
/** Расшифровка решения CLI `--decision resend|recheck|adopt:<id>`. */
|
|
357
|
+
static decision(text: string | undefined): ReconcileDecision | undefined;
|
|
358
|
+
}
|