@deftai/directive 0.125.1 → 0.126.0-beta.1
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/bin/deft-hook +14 -0
- package/bin/deft-hook.cmd +14 -0
- package/dist/bin.js +4333 -3
- package/package.json +12 -23
- package/dist/agents-refresh.d.ts +0 -11
- package/dist/agents-refresh.js +0 -90
- package/dist/authz.d.ts +0 -7
- package/dist/authz.js +0 -732
- package/dist/bin.d.ts +0 -3
- package/dist/branch-fixtures.d.ts +0 -45
- package/dist/branch-fixtures.js +0 -156
- package/dist/cache.d.ts +0 -4
- package/dist/cache.js +0 -10
- package/dist/capacity-backfill.d.ts +0 -3
- package/dist/capacity-backfill.js +0 -9
- package/dist/capacity-show.d.ts +0 -3
- package/dist/capacity-show.js +0 -9
- package/dist/change-init.d.ts +0 -3
- package/dist/change-init.js +0 -59
- package/dist/changelog-check.d.ts +0 -3
- package/dist/changelog-check.js +0 -52
- package/dist/check.d.ts +0 -15
- package/dist/check.js +0 -150
- package/dist/cli-package-version.d.ts +0 -3
- package/dist/cli-package-version.js +0 -23
- package/dist/cli-router/index.d.ts +0 -8
- package/dist/cli-router/index.js +0 -44
- package/dist/cli-router/route-argv.d.ts +0 -40
- package/dist/cli-router/route-argv.js +0 -371
- package/dist/codebase-default-extractor.d.ts +0 -3
- package/dist/codebase-default-extractor.js +0 -9
- package/dist/codebase-map-fresh.d.ts +0 -3
- package/dist/codebase-map-fresh.js +0 -9
- package/dist/codebase-map.d.ts +0 -3
- package/dist/codebase-map.js +0 -9
- package/dist/codebase-projection-registry.d.ts +0 -3
- package/dist/codebase-projection-registry.js +0 -9
- package/dist/codebase-provider.d.ts +0 -3
- package/dist/codebase-provider.js +0 -9
- package/dist/commit-lint.d.ts +0 -3
- package/dist/commit-lint.js +0 -44
- package/dist/content-validate-cli/validate-links.d.ts +0 -11
- package/dist/content-validate-cli/validate-links.js +0 -37
- package/dist/content-validate-cli/validate-strategy-output.d.ts +0 -13
- package/dist/content-validate-cli/validate-strategy-output.js +0 -56
- package/dist/content-validate-cli/verify-capacity.d.ts +0 -12
- package/dist/content-validate-cli/verify-capacity.js +0 -54
- package/dist/coverage-hotspots.d.ts +0 -18
- package/dist/coverage-hotspots.js +0 -158
- package/dist/design-critique-spend-resolve.d.ts +0 -18
- package/dist/design-critique-spend-resolve.js +0 -191
- package/dist/directive-finish-loop.d.ts +0 -3
- package/dist/directive-finish-loop.js +0 -10
- package/dist/dispatch.d.ts +0 -193
- package/dist/dispatch.js +0 -3082
- package/dist/doctor.d.ts +0 -19
- package/dist/doctor.js +0 -155
- package/dist/entrypoint.d.ts +0 -6
- package/dist/entrypoint.js +0 -19
- package/dist/escalation-cli.d.ts +0 -4
- package/dist/escalation-cli.js +0 -301
- package/dist/eval-health.d.ts +0 -13
- package/dist/eval-health.js +0 -63
- package/dist/eval-report.d.ts +0 -15
- package/dist/eval-report.js +0 -97
- package/dist/eval-run.d.ts +0 -17
- package/dist/eval-run.js +0 -122
- package/dist/eval-triggers.d.ts +0 -12
- package/dist/eval-triggers.js +0 -56
- package/dist/framework-check-updates.d.ts +0 -10
- package/dist/framework-check-updates.js +0 -68
- package/dist/gates-cli/_helpers.d.ts +0 -24
- package/dist/gates-cli/_helpers.js +0 -115
- package/dist/gates-cli/verify-bridge-drift.d.ts +0 -11
- package/dist/gates-cli/verify-bridge-drift.js +0 -47
- package/dist/gates-cli/verify-go-freeze.d.ts +0 -11
- package/dist/gates-cli/verify-go-freeze.js +0 -48
- package/dist/hook-bin.d.ts +0 -3
- package/dist/hook-bin.js +0 -11
- package/dist/hook-dispatch.d.ts +0 -80
- package/dist/hook-dispatch.js +0 -186
- package/dist/human-presence-mint.d.ts +0 -70
- package/dist/human-presence-mint.js +0 -204
- package/dist/identity-banner.d.ts +0 -13
- package/dist/identity-banner.js +0 -19
- package/dist/index.d.ts +0 -11
- package/dist/index.js +0 -14
- package/dist/init-cli/constants.d.ts +0 -42
- package/dist/init-cli/constants.js +0 -42
- package/dist/init-cli/help.d.ts +0 -9
- package/dist/init-cli/help.js +0 -43
- package/dist/init-cli/init.d.ts +0 -26
- package/dist/init-cli/init.js +0 -80
- package/dist/init-cli/migrate.d.ts +0 -3
- package/dist/init-cli/migrate.js +0 -51
- package/dist/init-cli/resolve-binary.d.ts +0 -34
- package/dist/init-cli/resolve-binary.js +0 -78
- package/dist/init-cli/run-deft-install.d.ts +0 -23
- package/dist/init-cli/run-deft-install.js +0 -71
- package/dist/init-cli/update.d.ts +0 -5
- package/dist/init-cli/update.js +0 -38
- package/dist/install-cli/coverage-map.d.ts +0 -14
- package/dist/install-cli/coverage-map.js +0 -113
- package/dist/install-uninstall.d.ts +0 -3
- package/dist/install-uninstall.js +0 -44
- package/dist/install-upgrade.d.ts +0 -41
- package/dist/install-upgrade.js +0 -86
- package/dist/lifecycle-cli/coverage-map.d.ts +0 -16
- package/dist/lifecycle-cli/coverage-map.js +0 -254
- package/dist/lifecycle-cli/helpers.d.ts +0 -8
- package/dist/lifecycle-cli/helpers.js +0 -20
- package/dist/lifecycle-event.d.ts +0 -11
- package/dist/lifecycle-event.js +0 -45
- package/dist/lifecycle-stats.d.ts +0 -12
- package/dist/lifecycle-stats.js +0 -100
- package/dist/migrate-category-b.d.ts +0 -9
- package/dist/migrate-category-b.js +0 -52
- package/dist/migrate-preflight.d.ts +0 -10
- package/dist/migrate-preflight.js +0 -85
- package/dist/migrate-xbrief.d.ts +0 -11
- package/dist/migrate-xbrief.js +0 -88
- package/dist/occupancy-grant.d.ts +0 -18
- package/dist/occupancy-grant.js +0 -121
- package/dist/occupancy-heartbeat.d.ts +0 -8
- package/dist/occupancy-heartbeat.js +0 -63
- package/dist/occupancy-release.d.ts +0 -18
- package/dist/occupancy-release.js +0 -94
- package/dist/occupancy-steal.d.ts +0 -10
- package/dist/occupancy-steal.js +0 -83
- package/dist/occupancy-unrecognized.d.ts +0 -3
- package/dist/occupancy-unrecognized.js +0 -5
- package/dist/orchestration-cli/coverage-map.d.ts +0 -21
- package/dist/orchestration-cli/coverage-map.js +0 -225
- package/dist/orchestration-cli/helpers.d.ts +0 -11
- package/dist/orchestration-cli/helpers.js +0 -35
- package/dist/ownership-doctor.d.ts +0 -10
- package/dist/ownership-doctor.js +0 -96
- package/dist/ownership-fix.d.ts +0 -10
- package/dist/ownership-fix.js +0 -93
- package/dist/plan-sequence.d.ts +0 -13
- package/dist/plan-sequence.js +0 -196
- package/dist/policy-fixtures.d.ts +0 -33
- package/dist/policy-fixtures.js +0 -118
- package/dist/policy.d.ts +0 -35
- package/dist/policy.js +0 -738
- package/dist/pr-closing-keywords.d.ts +0 -3
- package/dist/pr-closing-keywords.js +0 -10
- package/dist/pr-finish-loop.d.ts +0 -3
- package/dist/pr-finish-loop.js +0 -10
- package/dist/pr-merge-readiness.d.ts +0 -3
- package/dist/pr-merge-readiness.js +0 -10
- package/dist/pr-monitor.d.ts +0 -3
- package/dist/pr-monitor.js +0 -10
- package/dist/pr-protected-issues.d.ts +0 -3
- package/dist/pr-protected-issues.js +0 -10
- package/dist/pr-wait-mergeable.d.ts +0 -3
- package/dist/pr-wait-mergeable.js +0 -10
- package/dist/pr-watch.d.ts +0 -3
- package/dist/pr-watch.js +0 -10
- package/dist/pre-pr-run.d.ts +0 -39
- package/dist/pre-pr-run.js +0 -514
- package/dist/preflight-cache.d.ts +0 -18
- package/dist/preflight-cache.js +0 -113
- package/dist/preflight-gh.d.ts +0 -15
- package/dist/preflight-gh.js +0 -143
- package/dist/probe-session.d.ts +0 -3
- package/dist/probe-session.js +0 -10
- package/dist/release-e2e-fixtures.d.ts +0 -29
- package/dist/release-e2e-fixtures.js +0 -38
- package/dist/release-e2e.d.ts +0 -3
- package/dist/release-e2e.js +0 -10
- package/dist/release-publish.d.ts +0 -3
- package/dist/release-publish.js +0 -10
- package/dist/release-rollback.d.ts +0 -3
- package/dist/release-rollback.js +0 -10
- package/dist/release-wait-npm.d.ts +0 -3
- package/dist/release-wait-npm.js +0 -10
- package/dist/release.d.ts +0 -3
- package/dist/release.js +0 -10
- package/dist/render-cli/deft-ts-runner.d.ts +0 -17
- package/dist/render-cli/deft-ts-runner.js +0 -19
- package/dist/render-cli/export-spec-cli.d.ts +0 -2
- package/dist/render-cli/export-spec-cli.js +0 -6
- package/dist/render-cli/prd-render-cli.d.ts +0 -2
- package/dist/render-cli/prd-render-cli.js +0 -37
- package/dist/render-cli/project-render-cli.d.ts +0 -2
- package/dist/render-cli/project-render-cli.js +0 -6
- package/dist/render-cli/rule-map-cli.d.ts +0 -2
- package/dist/render-cli/rule-map-cli.js +0 -5
- package/dist/render-cli/spec-reconstruct-cli.d.ts +0 -3
- package/dist/render-cli/spec-reconstruct-cli.js +0 -15
- package/dist/render-cli/spec-render-cli.d.ts +0 -2
- package/dist/render-cli/spec-render-cli.js +0 -39
- package/dist/render-cli/spec-validate-cli.d.ts +0 -2
- package/dist/render-cli/spec-validate-cli.js +0 -38
- package/dist/review-monitor-register.d.ts +0 -19
- package/dist/review-monitor-register.js +0 -183
- package/dist/review-monitor-release.d.ts +0 -14
- package/dist/review-monitor-release.js +0 -123
- package/dist/scm-sync-default.d.ts +0 -34
- package/dist/scm-sync-default.js +0 -210
- package/dist/scope-lifecycle.d.ts +0 -4
- package/dist/scope-lifecycle.js +0 -34
- package/dist/scope-record-approved-scope.d.ts +0 -29
- package/dist/scope-record-approved-scope.js +0 -319
- package/dist/scope-record-intent-constraint.d.ts +0 -16
- package/dist/scope-record-intent-constraint.js +0 -202
- package/dist/scope-record-observable-scope.d.ts +0 -16
- package/dist/scope-record-observable-scope.js +0 -204
- package/dist/session-ready.d.ts +0 -15
- package/dist/session-ready.js +0 -144
- package/dist/session-start.d.ts +0 -56
- package/dist/session-start.js +0 -554
- package/dist/slice.d.ts +0 -4
- package/dist/slice.js +0 -34
- package/dist/story-ready-fixtures.d.ts +0 -47
- package/dist/story-ready-fixtures.js +0 -137
- package/dist/subagent-monitor.d.ts +0 -3
- package/dist/subagent-monitor.js +0 -10
- package/dist/subagent-pre-cancel.d.ts +0 -21
- package/dist/subagent-pre-cancel.js +0 -240
- package/dist/subagent-steer-write.d.ts +0 -41
- package/dist/subagent-steer-write.js +0 -333
- package/dist/toolchain-check.d.ts +0 -8
- package/dist/toolchain-check.js +0 -54
- package/dist/triage-actions.d.ts +0 -23
- package/dist/triage-actions.js +0 -225
- package/dist/triage-aux-a-fixtures.d.ts +0 -33
- package/dist/triage-aux-a-fixtures.js +0 -107
- package/dist/triage-aux-b-fixtures.d.ts +0 -30
- package/dist/triage-aux-b-fixtures.js +0 -167
- package/dist/triage-bootstrap-fixtures.d.ts +0 -42
- package/dist/triage-bootstrap-fixtures.js +0 -139
- package/dist/triage-bootstrap.d.ts +0 -24
- package/dist/triage-bootstrap.js +0 -175
- package/dist/triage-bulk.d.ts +0 -17
- package/dist/triage-bulk.js +0 -154
- package/dist/triage-classify-fixtures.d.ts +0 -38
- package/dist/triage-classify-fixtures.js +0 -137
- package/dist/triage-classify.d.ts +0 -45
- package/dist/triage-classify.js +0 -287
- package/dist/triage-evaluate.d.ts +0 -14
- package/dist/triage-evaluate.js +0 -153
- package/dist/triage-help.d.ts +0 -3
- package/dist/triage-help.js +0 -10
- package/dist/triage-queue-fixtures.d.ts +0 -59
- package/dist/triage-queue-fixtures.js +0 -284
- package/dist/triage-queue.d.ts +0 -38
- package/dist/triage-queue.js +0 -385
- package/dist/triage-reconcile.d.ts +0 -11
- package/dist/triage-reconcile.js +0 -76
- package/dist/triage-refresh.d.ts +0 -7
- package/dist/triage-refresh.js +0 -37
- package/dist/triage-scope-drift.d.ts +0 -12
- package/dist/triage-scope-drift.js +0 -117
- package/dist/triage-scope-fixtures.d.ts +0 -32
- package/dist/triage-scope-fixtures.js +0 -131
- package/dist/triage-scope.d.ts +0 -4
- package/dist/triage-scope.js +0 -34
- package/dist/triage-smoketest.d.ts +0 -3
- package/dist/triage-smoketest.js +0 -43
- package/dist/triage-strip-withdrawn.d.ts +0 -21
- package/dist/triage-strip-withdrawn.js +0 -102
- package/dist/triage-subscribe.d.ts +0 -15
- package/dist/triage-subscribe.js +0 -157
- package/dist/triage-summary.d.ts +0 -14
- package/dist/triage-summary.js +0 -83
- package/dist/triage-welcome.d.ts +0 -14
- package/dist/triage-welcome.js +0 -121
- package/dist/ts-check-lane.d.ts +0 -9
- package/dist/ts-check-lane.js +0 -49
- package/dist/umbrella-current-shape.d.ts +0 -9
- package/dist/umbrella-current-shape.js +0 -56
- package/dist/vbrief-activate.d.ts +0 -3
- package/dist/vbrief-activate.js +0 -7
- package/dist/vbrief-build.d.ts +0 -3
- package/dist/vbrief-build.js +0 -8
- package/dist/vbrief-preflight-fixtures.d.ts +0 -32
- package/dist/vbrief-preflight-fixtures.js +0 -79
- package/dist/vbrief-preflight.d.ts +0 -13
- package/dist/vbrief-preflight.js +0 -141
- package/dist/vbrief-reconcile.d.ts +0 -3
- package/dist/vbrief-reconcile.js +0 -7
- package/dist/vbrief-validate.d.ts +0 -3
- package/dist/vbrief-validate.js +0 -8
- package/dist/vbrief-validation.d.ts +0 -3
- package/dist/vbrief-validation.js +0 -8
- package/dist/verify-ac.d.ts +0 -28
- package/dist/verify-ac.js +0 -439
- package/dist/verify-agents-md-advisory.d.ts +0 -19
- package/dist/verify-agents-md-advisory.js +0 -65
- package/dist/verify-agents-md-budget.d.ts +0 -12
- package/dist/verify-agents-md-budget.js +0 -71
- package/dist/verify-branch.d.ts +0 -14
- package/dist/verify-branch.js +0 -81
- package/dist/verify-class-checks.d.ts +0 -11
- package/dist/verify-class-checks.js +0 -71
- package/dist/verify-cohort-review-monitors.d.ts +0 -5
- package/dist/verify-cohort-review-monitors.js +0 -11
- package/dist/verify-completed-tracked.d.ts +0 -19
- package/dist/verify-completed-tracked.js +0 -202
- package/dist/verify-completed-write-guard.d.ts +0 -13
- package/dist/verify-completed-write-guard.js +0 -84
- package/dist/verify-consumer-check-contract.d.ts +0 -12
- package/dist/verify-consumer-check-contract.js +0 -70
- package/dist/verify-consumer-header-placeholder.d.ts +0 -12
- package/dist/verify-consumer-header-placeholder.js +0 -73
- package/dist/verify-consumer-test-lane.d.ts +0 -12
- package/dist/verify-consumer-test-lane.js +0 -57
- package/dist/verify-durable-effect-acquisition.d.ts +0 -13
- package/dist/verify-durable-effect-acquisition.js +0 -70
- package/dist/verify-encoding.d.ts +0 -15
- package/dist/verify-encoding.js +0 -83
- package/dist/verify-eval-health-relocation.d.ts +0 -16
- package/dist/verify-eval-health-relocation.js +0 -93
- package/dist/verify-eval-triggers-relocation.d.ts +0 -14
- package/dist/verify-eval-triggers-relocation.js +0 -74
- package/dist/verify-evaluator-surface.d.ts +0 -15
- package/dist/verify-evaluator-surface.js +0 -87
- package/dist/verify-forward-coverage.d.ts +0 -19
- package/dist/verify-forward-coverage.js +0 -144
- package/dist/verify-hooks-installed.d.ts +0 -24
- package/dist/verify-hooks-installed.js +0 -140
- package/dist/verify-intent-constraint.d.ts +0 -15
- package/dist/verify-intent-constraint.js +0 -86
- package/dist/verify-investigation.d.ts +0 -3
- package/dist/verify-investigation.js +0 -10
- package/dist/verify-judgment-gates.d.ts +0 -3
- package/dist/verify-judgment-gates.js +0 -10
- package/dist/verify-l4-owner.d.ts +0 -15
- package/dist/verify-l4-owner.js +0 -132
- package/dist/verify-lifecycle-visible.d.ts +0 -13
- package/dist/verify-lifecycle-visible.js +0 -68
- package/dist/verify-literal-ac.d.ts +0 -14
- package/dist/verify-literal-ac.js +0 -168
- package/dist/verify-no-task-runtime.d.ts +0 -3
- package/dist/verify-no-task-runtime.js +0 -16
- package/dist/verify-observable-scope.d.ts +0 -15
- package/dist/verify-observable-scope.js +0 -86
- package/dist/verify-operator-scope-limit.d.ts +0 -17
- package/dist/verify-operator-scope-limit.js +0 -285
- package/dist/verify-orphan-active.d.ts +0 -17
- package/dist/verify-orphan-active.js +0 -135
- package/dist/verify-ownership.d.ts +0 -10
- package/dist/verify-ownership.js +0 -90
- package/dist/verify-persisted-planning-narratives.d.ts +0 -12
- package/dist/verify-persisted-planning-narratives.js +0 -82
- package/dist/verify-plan-sequence.d.ts +0 -14
- package/dist/verify-plan-sequence.js +0 -138
- package/dist/verify-pr-closeout-attestable.d.ts +0 -15
- package/dist/verify-pr-closeout-attestable.js +0 -114
- package/dist/verify-presentation-ceiling.d.ts +0 -11
- package/dist/verify-presentation-ceiling.js +0 -71
- package/dist/verify-presentation-coverage.d.ts +0 -14
- package/dist/verify-presentation-coverage.js +0 -90
- package/dist/verify-review-monitor.d.ts +0 -25
- package/dist/verify-review-monitor.js +0 -341
- package/dist/verify-scope-provenance.d.ts +0 -12
- package/dist/verify-scope-provenance.js +0 -83
- package/dist/verify-session-ritual.d.ts +0 -23
- package/dist/verify-session-ritual.js +0 -144
- package/dist/verify-source-cli/rule-ownership-lint.d.ts +0 -12
- package/dist/verify-source-cli/rule-ownership-lint.js +0 -61
- package/dist/verify-source-cli/verify-biome-config.d.ts +0 -11
- package/dist/verify-source-cli/verify-biome-config.js +0 -46
- package/dist/verify-source-cli/verify-closing-keywords.d.ts +0 -35
- package/dist/verify-source-cli/verify-closing-keywords.js +0 -139
- package/dist/verify-source-cli/verify-consumer-hard-stops.d.ts +0 -16
- package/dist/verify-source-cli/verify-consumer-hard-stops.js +0 -99
- package/dist/verify-source-cli/verify-contained-writes.d.ts +0 -13
- package/dist/verify-source-cli/verify-contained-writes.js +0 -67
- package/dist/verify-source-cli/verify-content-manifest.d.ts +0 -12
- package/dist/verify-source-cli/verify-content-manifest.js +0 -61
- package/dist/verify-source-cli/verify-contract-drift.d.ts +0 -11
- package/dist/verify-source-cli/verify-contract-drift.js +0 -47
- package/dist/verify-source-cli/verify-cursor-tier1.d.ts +0 -12
- package/dist/verify-source-cli/verify-cursor-tier1.js +0 -51
- package/dist/verify-source-cli/verify-deposit-closure.d.ts +0 -12
- package/dist/verify-source-cli/verify-deposit-closure.js +0 -52
- package/dist/verify-source-cli/verify-openclaw-tier1.d.ts +0 -12
- package/dist/verify-source-cli/verify-openclaw-tier1.js +0 -51
- package/dist/verify-source-cli/verify-scm-boundary.d.ts +0 -13
- package/dist/verify-source-cli/verify-scm-boundary.js +0 -66
- package/dist/verify-source-cli/verify-semantic-single-source.d.ts +0 -11
- package/dist/verify-source-cli/verify-semantic-single-source.js +0 -49
- package/dist/verify-source-cli/verify-skill-external-fetch-gate.d.ts +0 -11
- package/dist/verify-source-cli/verify-skill-external-fetch-gate.js +0 -46
- package/dist/verify-source-cli/verify-spec-drift.d.ts +0 -3
- package/dist/verify-source-cli/verify-spec-drift.js +0 -15
- package/dist/verify-source-cli/verify-spec-prd-fresh.d.ts +0 -3
- package/dist/verify-source-cli/verify-spec-prd-fresh.js +0 -15
- package/dist/verify-source-cli/verify-stubs.d.ts +0 -11
- package/dist/verify-source-cli/verify-stubs.js +0 -27
- package/dist/verify-source-cli/verify-telemetry-coverage.d.ts +0 -13
- package/dist/verify-source-cli/verify-telemetry-coverage.js +0 -67
- package/dist/verify-source-cli/verify-xbrief-drift.d.ts +0 -15
- package/dist/verify-source-cli/verify-xbrief-drift.js +0 -80
- package/dist/verify-story-ready.d.ts +0 -18
- package/dist/verify-story-ready.js +0 -190
- package/dist/verify-subagent-alive.d.ts +0 -21
- package/dist/verify-subagent-alive.js +0 -219
- package/dist/verify-subagent-steer.d.ts +0 -19
- package/dist/verify-subagent-steer.js +0 -136
- package/dist/verify-test-boundary.d.ts +0 -12
- package/dist/verify-test-boundary.js +0 -80
- package/dist/verify-tools.d.ts +0 -13
- package/dist/verify-tools.js +0 -67
- package/dist/verify-wip-cap.d.ts +0 -13
- package/dist/verify-wip-cap.js +0 -62
- package/dist/windows-bin-ps1.d.ts +0 -39
- package/dist/windows-bin-ps1.js +0 -226
- package/dist/wip-cap-fixtures.d.ts +0 -37
- package/dist/wip-cap-fixtures.js +0 -122
- package/dist/wsl-ownership-guard.d.ts +0 -2
- package/dist/wsl-ownership-guard.js +0 -15
- package/dist/xbrief-create.d.ts +0 -3
- package/dist/xbrief-create.js +0 -9
- package/dist/xbrief-verify.d.ts +0 -3
- package/dist/xbrief-verify.js +0 -9
- package/scripts/remove-windows-ps1-shims.mjs +0 -26
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* CLI for verify:presentation-ceiling (#5056).
|
|
4
|
-
*/
|
|
5
|
-
import { resolve } from "node:path";
|
|
6
|
-
import { presentationCeiling } from "@deftai/directive-core";
|
|
7
|
-
import { isDirectEntrypoint } from "./entrypoint.js";
|
|
8
|
-
export function parseArgs(argv) {
|
|
9
|
-
const parsed = {
|
|
10
|
-
projectRoot: ".",
|
|
11
|
-
baseRef: null,
|
|
12
|
-
quiet: false,
|
|
13
|
-
};
|
|
14
|
-
for (let i = 0; i < argv.length; i += 1) {
|
|
15
|
-
const arg = argv[i];
|
|
16
|
-
if (arg === "--quiet") {
|
|
17
|
-
parsed.quiet = true;
|
|
18
|
-
}
|
|
19
|
-
else if (arg === "--project-root") {
|
|
20
|
-
const value = argv[i + 1];
|
|
21
|
-
if (value === undefined) {
|
|
22
|
-
return { ...parsed, error: "argument --project-root: expected one argument" };
|
|
23
|
-
}
|
|
24
|
-
parsed.projectRoot = value;
|
|
25
|
-
i += 1;
|
|
26
|
-
}
|
|
27
|
-
else if (arg?.startsWith("--project-root=")) {
|
|
28
|
-
parsed.projectRoot = arg.slice("--project-root=".length);
|
|
29
|
-
}
|
|
30
|
-
else if (arg === "--base-ref") {
|
|
31
|
-
const value = argv[i + 1];
|
|
32
|
-
if (value === undefined) {
|
|
33
|
-
return { ...parsed, error: "argument --base-ref: expected one argument" };
|
|
34
|
-
}
|
|
35
|
-
parsed.baseRef = value;
|
|
36
|
-
i += 1;
|
|
37
|
-
}
|
|
38
|
-
else if (arg?.startsWith("--base-ref=")) {
|
|
39
|
-
parsed.baseRef = arg.slice("--base-ref=".length);
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
return { ...parsed, error: `unrecognized argument: ${arg}` };
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
return parsed;
|
|
46
|
-
}
|
|
47
|
-
export function run(argv) {
|
|
48
|
-
const args = parseArgs(argv);
|
|
49
|
-
if (args.error !== undefined) {
|
|
50
|
-
process.stderr.write(`verify_presentation_ceiling: ${args.error}\n`);
|
|
51
|
-
return 2;
|
|
52
|
-
}
|
|
53
|
-
const projectRoot = resolve(args.projectRoot);
|
|
54
|
-
const result = presentationCeiling.evaluatePresentationCeiling(projectRoot, {
|
|
55
|
-
baseRef: args.baseRef,
|
|
56
|
-
quiet: args.quiet,
|
|
57
|
-
});
|
|
58
|
-
if (result.exitCode === 0) {
|
|
59
|
-
if (!args.quiet) {
|
|
60
|
-
process.stdout.write(`${result.message}\n`);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
process.stderr.write(`${result.message}\n`);
|
|
65
|
-
}
|
|
66
|
-
return result.exitCode;
|
|
67
|
-
}
|
|
68
|
-
if (isDirectEntrypoint(import.meta.url)) {
|
|
69
|
-
process.exit(run(process.argv.slice(2)));
|
|
70
|
-
}
|
|
71
|
-
//# sourceMappingURL=verify-presentation-ceiling.js.map
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
interface ParsedArgs {
|
|
3
|
-
projectRoot: string;
|
|
4
|
-
originRef?: string;
|
|
5
|
-
staged: boolean;
|
|
6
|
-
quiet: boolean;
|
|
7
|
-
json: boolean;
|
|
8
|
-
planId?: string;
|
|
9
|
-
error?: string;
|
|
10
|
-
}
|
|
11
|
-
export declare function parseArgs(argv: string[]): ParsedArgs;
|
|
12
|
-
export declare function run(argv: string[]): number;
|
|
13
|
-
export {};
|
|
14
|
-
//# sourceMappingURL=verify-presentation-coverage.d.ts.map
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* CLI for verify:presentation-coverage (#5079).
|
|
4
|
-
*/
|
|
5
|
-
import { resolve } from "node:path";
|
|
6
|
-
import { presentationCoverage } from "@deftai/directive-core";
|
|
7
|
-
import { isDirectEntrypoint } from "./entrypoint.js";
|
|
8
|
-
export function parseArgs(argv) {
|
|
9
|
-
const parsed = { projectRoot: ".", staged: false, quiet: false, json: false };
|
|
10
|
-
for (let i = 0; i < argv.length; i += 1) {
|
|
11
|
-
const arg = argv[i];
|
|
12
|
-
if (arg === "--json") {
|
|
13
|
-
parsed.json = true;
|
|
14
|
-
}
|
|
15
|
-
else if (arg === "--plan-id") {
|
|
16
|
-
const value = argv[i + 1];
|
|
17
|
-
if (value === undefined || value.startsWith("--"))
|
|
18
|
-
return { ...parsed, error: "argument --plan-id: expected one argument" };
|
|
19
|
-
parsed.planId = value;
|
|
20
|
-
i += 1;
|
|
21
|
-
}
|
|
22
|
-
else if (arg === "--quiet") {
|
|
23
|
-
parsed.quiet = true;
|
|
24
|
-
}
|
|
25
|
-
else if (arg === "--staged") {
|
|
26
|
-
parsed.staged = true;
|
|
27
|
-
}
|
|
28
|
-
else if (arg === "--project-root") {
|
|
29
|
-
const value = argv[i + 1];
|
|
30
|
-
if (value === undefined || value.startsWith("--")) {
|
|
31
|
-
return { ...parsed, error: "argument --project-root: expected one argument" };
|
|
32
|
-
}
|
|
33
|
-
parsed.projectRoot = value;
|
|
34
|
-
i += 1;
|
|
35
|
-
}
|
|
36
|
-
else if (arg?.startsWith("--project-root=")) {
|
|
37
|
-
parsed.projectRoot = arg.slice("--project-root=".length);
|
|
38
|
-
}
|
|
39
|
-
else if (arg === "--origin-ref") {
|
|
40
|
-
const value = argv[i + 1];
|
|
41
|
-
if (value === undefined || value.startsWith("--")) {
|
|
42
|
-
return { ...parsed, error: "argument --origin-ref: expected one argument" };
|
|
43
|
-
}
|
|
44
|
-
parsed.originRef = value;
|
|
45
|
-
i += 1;
|
|
46
|
-
}
|
|
47
|
-
else if (arg?.startsWith("--origin-ref=")) {
|
|
48
|
-
parsed.originRef = arg.slice("--origin-ref=".length);
|
|
49
|
-
}
|
|
50
|
-
else if (arg === "--base-ref") {
|
|
51
|
-
return {
|
|
52
|
-
...parsed,
|
|
53
|
-
error: "unrecognized argument: --base-ref (baseline is the computed merge base; use --origin-ref to name the origin default)",
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
return { ...parsed, error: `unrecognized argument: ${arg}` };
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
return parsed;
|
|
61
|
-
}
|
|
62
|
-
export function run(argv) {
|
|
63
|
-
const args = parseArgs(argv);
|
|
64
|
-
if (args.error !== undefined) {
|
|
65
|
-
process.stderr.write(`verify_presentation_coverage: ${args.error}\n`);
|
|
66
|
-
return 2;
|
|
67
|
-
}
|
|
68
|
-
const result = presentationCoverage.evaluatePresentationCoverage({
|
|
69
|
-
projectRoot: resolve(args.projectRoot),
|
|
70
|
-
originRef: args.originRef,
|
|
71
|
-
staged: args.staged,
|
|
72
|
-
quiet: args.quiet,
|
|
73
|
-
planId: args.planId,
|
|
74
|
-
});
|
|
75
|
-
if (args.json) {
|
|
76
|
-
process.stdout.write(`${JSON.stringify(result)}\n`);
|
|
77
|
-
return result.code;
|
|
78
|
-
}
|
|
79
|
-
if (!args.quiet && result.message.length > 0) {
|
|
80
|
-
if (result.stream === "stdout")
|
|
81
|
-
process.stdout.write(`${result.message}\n`);
|
|
82
|
-
else if (result.stream === "stderr")
|
|
83
|
-
process.stderr.write(`${result.message}\n`);
|
|
84
|
-
}
|
|
85
|
-
return result.code;
|
|
86
|
-
}
|
|
87
|
-
if (isDirectEntrypoint(import.meta.url)) {
|
|
88
|
-
process.exit(run(process.argv.slice(2)));
|
|
89
|
-
}
|
|
90
|
-
//# sourceMappingURL=verify-presentation-coverage.js.map
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { type ReviewMonitorCallSite } from "@deftai/directive-core/review-monitor";
|
|
3
|
-
interface ParsedArgs {
|
|
4
|
-
pr: number | null;
|
|
5
|
-
projectRoot: string;
|
|
6
|
-
repo: string | null;
|
|
7
|
-
headSha: string | null;
|
|
8
|
-
callSite: ReviewMonitorCallSite;
|
|
9
|
-
approach3: boolean;
|
|
10
|
-
approach3Warned: boolean;
|
|
11
|
-
emitJson: boolean;
|
|
12
|
-
/** When true, also run the #4882 merge-path arm observer (attested flags). */
|
|
13
|
-
mergePathArm: boolean;
|
|
14
|
-
liveWait: boolean;
|
|
15
|
-
explicitFinish: boolean;
|
|
16
|
-
stickyLease: boolean;
|
|
17
|
-
/** DeliveryAttemptRecord.startedAt for Approach 1 arm-startup halt (#5278 P3). */
|
|
18
|
-
dispatchStartedAt: string | null;
|
|
19
|
-
help: boolean;
|
|
20
|
-
error?: string;
|
|
21
|
-
}
|
|
22
|
-
export declare function parseVerifyReviewMonitorArgs(argv: readonly string[]): ParsedArgs;
|
|
23
|
-
export declare function run(argv: readonly string[]): number;
|
|
24
|
-
export {};
|
|
25
|
-
//# sourceMappingURL=verify-review-monitor.d.ts.map
|
|
@@ -1,341 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { resolve } from "node:path";
|
|
3
|
-
import { fileURLToPath } from "node:url";
|
|
4
|
-
import { bindLivePhaseCorrectWait, evaluateMergePathArm, } from "@deftai/directive-core/dist/pr-watch/main.js";
|
|
5
|
-
import { evaluateApproach1ArmStartup } from "@deftai/directive-core/orchestration";
|
|
6
|
-
import { EXIT_CONFIG_ERROR, EXIT_NOT_READY, evaluateReviewMonitorGate, formatApproach1BabysitterOneLiner, isTier1, REVIEW_MONITOR_HELP, spawnRedirect, verifyResultToJson, } from "@deftai/directive-core/review-monitor";
|
|
7
|
-
import { writeMergePathExplicitFinishAttestation } from "@deftai/directive-core/swarm";
|
|
8
|
-
const CALL_SITES = new Set([
|
|
9
|
-
"solo",
|
|
10
|
-
"swarm-phase5-6",
|
|
11
|
-
"swarm-phase6-cascade",
|
|
12
|
-
"unspecified",
|
|
13
|
-
]);
|
|
14
|
-
export function parseVerifyReviewMonitorArgs(argv) {
|
|
15
|
-
const acc = {
|
|
16
|
-
pr: null,
|
|
17
|
-
projectRoot: ".",
|
|
18
|
-
repo: null,
|
|
19
|
-
headSha: null,
|
|
20
|
-
callSite: "unspecified",
|
|
21
|
-
approach3: false,
|
|
22
|
-
approach3Warned: false,
|
|
23
|
-
emitJson: false,
|
|
24
|
-
mergePathArm: false,
|
|
25
|
-
liveWait: false,
|
|
26
|
-
explicitFinish: false,
|
|
27
|
-
stickyLease: false,
|
|
28
|
-
dispatchStartedAt: null,
|
|
29
|
-
help: false,
|
|
30
|
-
};
|
|
31
|
-
for (let i = 0; i < argv.length; i += 1) {
|
|
32
|
-
const arg = argv[i];
|
|
33
|
-
if (arg === "--help" || arg === "-h") {
|
|
34
|
-
return { ...acc, help: true };
|
|
35
|
-
}
|
|
36
|
-
if (arg === "--json") {
|
|
37
|
-
acc.emitJson = true;
|
|
38
|
-
}
|
|
39
|
-
else if (arg === "--merge-path-arm") {
|
|
40
|
-
acc.mergePathArm = true;
|
|
41
|
-
}
|
|
42
|
-
else if (arg === "--live-wait") {
|
|
43
|
-
acc.liveWait = true;
|
|
44
|
-
}
|
|
45
|
-
else if (arg === "--explicit-finish") {
|
|
46
|
-
acc.explicitFinish = true;
|
|
47
|
-
}
|
|
48
|
-
else if (arg === "--sticky-lease") {
|
|
49
|
-
acc.stickyLease = true;
|
|
50
|
-
}
|
|
51
|
-
else if (arg === "--dispatch-started-at") {
|
|
52
|
-
const value = argv[i + 1];
|
|
53
|
-
if (value === undefined) {
|
|
54
|
-
return { ...acc, error: "argument --dispatch-started-at: expected one argument" };
|
|
55
|
-
}
|
|
56
|
-
acc.dispatchStartedAt = value;
|
|
57
|
-
i += 1;
|
|
58
|
-
}
|
|
59
|
-
else if (arg?.startsWith("--dispatch-started-at=")) {
|
|
60
|
-
acc.dispatchStartedAt = arg.slice("--dispatch-started-at=".length);
|
|
61
|
-
}
|
|
62
|
-
else if (arg === "--approach3") {
|
|
63
|
-
acc.approach3 = true;
|
|
64
|
-
}
|
|
65
|
-
else if (arg === "--approach3-warned") {
|
|
66
|
-
acc.approach3Warned = true;
|
|
67
|
-
}
|
|
68
|
-
else if (arg === "--pr") {
|
|
69
|
-
const value = argv[i + 1];
|
|
70
|
-
if (value === undefined) {
|
|
71
|
-
return { ...acc, error: "argument --pr: expected one argument" };
|
|
72
|
-
}
|
|
73
|
-
const n = Number(value);
|
|
74
|
-
if (!Number.isInteger(n) || n <= 0) {
|
|
75
|
-
return { ...acc, error: `invalid --pr value: ${value}` };
|
|
76
|
-
}
|
|
77
|
-
acc.pr = n;
|
|
78
|
-
i += 1;
|
|
79
|
-
}
|
|
80
|
-
else if (arg?.startsWith("--pr=")) {
|
|
81
|
-
const n = Number(arg.slice("--pr=".length));
|
|
82
|
-
if (!Number.isInteger(n) || n <= 0) {
|
|
83
|
-
return { ...acc, error: `invalid --pr value: ${arg}` };
|
|
84
|
-
}
|
|
85
|
-
acc.pr = n;
|
|
86
|
-
}
|
|
87
|
-
else if (arg === "--repo") {
|
|
88
|
-
const value = argv[i + 1];
|
|
89
|
-
if (value === undefined) {
|
|
90
|
-
return { ...acc, error: "argument --repo: expected one argument" };
|
|
91
|
-
}
|
|
92
|
-
acc.repo = value;
|
|
93
|
-
i += 1;
|
|
94
|
-
}
|
|
95
|
-
else if (arg?.startsWith("--repo=")) {
|
|
96
|
-
acc.repo = arg.slice("--repo=".length);
|
|
97
|
-
}
|
|
98
|
-
else if (arg === "--head-sha") {
|
|
99
|
-
const value = argv[i + 1];
|
|
100
|
-
if (value === undefined) {
|
|
101
|
-
return { ...acc, error: "argument --head-sha: expected one argument" };
|
|
102
|
-
}
|
|
103
|
-
acc.headSha = value;
|
|
104
|
-
i += 1;
|
|
105
|
-
}
|
|
106
|
-
else if (arg?.startsWith("--head-sha=")) {
|
|
107
|
-
acc.headSha = arg.slice("--head-sha=".length);
|
|
108
|
-
}
|
|
109
|
-
else if (arg === "--project-root") {
|
|
110
|
-
const value = argv[i + 1];
|
|
111
|
-
if (value === undefined) {
|
|
112
|
-
return { ...acc, error: "argument --project-root: expected one argument" };
|
|
113
|
-
}
|
|
114
|
-
acc.projectRoot = value;
|
|
115
|
-
i += 1;
|
|
116
|
-
}
|
|
117
|
-
else if (arg?.startsWith("--project-root=")) {
|
|
118
|
-
acc.projectRoot = arg.slice("--project-root=".length);
|
|
119
|
-
}
|
|
120
|
-
else if (arg === "--call-site") {
|
|
121
|
-
const value = argv[i + 1];
|
|
122
|
-
if (value === undefined) {
|
|
123
|
-
return { ...acc, error: "argument --call-site: expected one argument" };
|
|
124
|
-
}
|
|
125
|
-
if (!CALL_SITES.has(value)) {
|
|
126
|
-
return { ...acc, error: `invalid --call-site: ${value}` };
|
|
127
|
-
}
|
|
128
|
-
acc.callSite = value;
|
|
129
|
-
i += 1;
|
|
130
|
-
}
|
|
131
|
-
else if (arg?.startsWith("--call-site=")) {
|
|
132
|
-
const value = arg.slice("--call-site=".length);
|
|
133
|
-
if (!CALL_SITES.has(value)) {
|
|
134
|
-
return { ...acc, error: `invalid --call-site: ${value}` };
|
|
135
|
-
}
|
|
136
|
-
acc.callSite = value;
|
|
137
|
-
}
|
|
138
|
-
else if (arg?.startsWith("-")) {
|
|
139
|
-
return { ...acc, error: `unrecognized argument: ${arg}` };
|
|
140
|
-
}
|
|
141
|
-
else {
|
|
142
|
-
return { ...acc, error: `unrecognized argument: ${arg}` };
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
return acc;
|
|
146
|
-
}
|
|
147
|
-
export function run(argv) {
|
|
148
|
-
const args = parseVerifyReviewMonitorArgs(argv);
|
|
149
|
-
if (args.help) {
|
|
150
|
-
process.stdout.write(REVIEW_MONITOR_HELP);
|
|
151
|
-
process.stdout.write("\n#4882 / #5020 / #5219 merge-path arm observer (optional):\n" +
|
|
152
|
-
" --merge-path-arm Fail closed when neither live wait nor explicit finish\n" +
|
|
153
|
-
" --live-wait Require still-running wait evidence for this PR\n" +
|
|
154
|
-
" (Tier 1: lease + active polling heartbeat with pid liveness;\n" +
|
|
155
|
-
" lease+flag alone is not armed — #5020).\n" +
|
|
156
|
-
" On spawn_subagent hosts, lease platform_primitive must be\n" +
|
|
157
|
-
" spawn_subagent and heartbeat parent_id must match the lease\n" +
|
|
158
|
-
" monitor_agent_id, or pr-wait-mergeable only after local\n" +
|
|
159
|
-
" pr:watch CLEAN attestation — #5219;\n" +
|
|
160
|
-
" parent-shell pr:watch (parent_id=pr-watch) does not arm.\n" +
|
|
161
|
-
" --explicit-finish Attest option-C BLOCKED/FAILED finish for this PR\n" +
|
|
162
|
-
" --sticky-lease Attest a fresh sticky lease (not sufficient alone)\n" +
|
|
163
|
-
" --dispatch-started-at DeliveryAttemptRecord.startedAt ISO for Approach 1\n" +
|
|
164
|
-
" arm-startup halt (#5278); when merge-path-arm stays\n" +
|
|
165
|
-
" red past the 3m allowance, emit approach1-arm-startup.\n" +
|
|
166
|
-
" Prefer Approach 1 / native pr:watch --monitor-agent-id <id> or post-CLEAN\n" +
|
|
167
|
-
" pr:wait-mergeable-and-merge; homemade line-parsed --json is not an arm.\n");
|
|
168
|
-
return 0;
|
|
169
|
-
}
|
|
170
|
-
if (args.error !== undefined) {
|
|
171
|
-
process.stderr.write(`verify_review_monitor: ${args.error}\n`);
|
|
172
|
-
process.stderr.write("Try: task verify:review-monitor -- --help\n");
|
|
173
|
-
return 2;
|
|
174
|
-
}
|
|
175
|
-
if (args.pr === null) {
|
|
176
|
-
process.stderr.write("verify_review_monitor: --pr is required\n");
|
|
177
|
-
process.stderr.write("Try: task verify:review-monitor -- --help\n");
|
|
178
|
-
return 2;
|
|
179
|
-
}
|
|
180
|
-
// Always evaluate the gate first so --project-root / repo config errors stay
|
|
181
|
-
// exit 2 even when --merge-path-arm would otherwise fail closed as unarmed.
|
|
182
|
-
const result = evaluateReviewMonitorGate({
|
|
183
|
-
pr: args.pr,
|
|
184
|
-
projectRoot: resolve(args.projectRoot),
|
|
185
|
-
repo: args.repo,
|
|
186
|
-
headSha: args.headSha,
|
|
187
|
-
callSite: args.callSite,
|
|
188
|
-
approach3: args.approach3,
|
|
189
|
-
approach3Warned: args.approach3Warned,
|
|
190
|
-
environ: process.env,
|
|
191
|
-
});
|
|
192
|
-
let arm = null;
|
|
193
|
-
if (args.mergePathArm) {
|
|
194
|
-
// Durable option-C attestation for cohort inventory halted-explicit (#5318).
|
|
195
|
-
// Do not write (or arm from) --explicit-finish when the monitor gate is a config error,
|
|
196
|
-
// and fail closed if the durable write itself fails.
|
|
197
|
-
let explicitFinishDurable = false;
|
|
198
|
-
if (args.explicitFinish) {
|
|
199
|
-
if (result.exitCode === EXIT_CONFIG_ERROR) {
|
|
200
|
-
explicitFinishDurable = false;
|
|
201
|
-
}
|
|
202
|
-
else {
|
|
203
|
-
const written = writeMergePathExplicitFinishAttestation(resolve(args.projectRoot), args.pr, {
|
|
204
|
-
source: "verify:review-monitor --explicit-finish",
|
|
205
|
-
});
|
|
206
|
-
if (!written.ok) {
|
|
207
|
-
process.stderr.write(`verify_review_monitor: ${written.reason}
|
|
208
|
-
`);
|
|
209
|
-
return EXIT_CONFIG_ERROR;
|
|
210
|
-
}
|
|
211
|
-
explicitFinishDurable = true;
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
// Bind --live-wait to lease (#5018) + process-liveness heartbeat (#5020) on Tier 1.
|
|
215
|
-
// spawn_subagent identity join is already applied in evaluateReviewMonitorGate (#5219).
|
|
216
|
-
const leaseEvidence = result.monitorRecord !== null;
|
|
217
|
-
const liveBind = bindLivePhaseCorrectWait({
|
|
218
|
-
liveWaitFlag: args.liveWait,
|
|
219
|
-
tierIs1: isTier1(result.tier),
|
|
220
|
-
leaseEvidence,
|
|
221
|
-
heartbeatActive: result.heartbeatActive,
|
|
222
|
-
pr: args.pr,
|
|
223
|
-
});
|
|
224
|
-
arm = evaluateMergePathArm({
|
|
225
|
-
livePhaseCorrectWait: liveBind.livePhaseCorrectWait,
|
|
226
|
-
explicitFinish: explicitFinishDurable,
|
|
227
|
-
stickyLeaseActive: args.stickyLease || leaseEvidence,
|
|
228
|
-
});
|
|
229
|
-
if (args.liveWait && !liveBind.livePhaseCorrectWait && !args.explicitFinish && !arm.armed) {
|
|
230
|
-
const spawnHost = result.tier.primitive === "spawn_subagent";
|
|
231
|
-
const lease = result.monitorRecord;
|
|
232
|
-
let message = liveBind.message;
|
|
233
|
-
if (spawnHost && lease !== null && lease.platform_primitive !== "spawn_subagent") {
|
|
234
|
-
message =
|
|
235
|
-
`unarmed stand-down: Tier-1 spawn_subagent requires lease ` +
|
|
236
|
-
`platform_primitive=spawn_subagent for PR #${args.pr} (#5219); ` +
|
|
237
|
-
`got ${lease.platform_primitive}.\n` +
|
|
238
|
-
` ${spawnRedirect(result.tier)}`;
|
|
239
|
-
}
|
|
240
|
-
else if (spawnHost &&
|
|
241
|
-
lease !== null &&
|
|
242
|
-
lease.platform_primitive === "spawn_subagent" &&
|
|
243
|
-
liveBind.reason === "missing_process_liveness") {
|
|
244
|
-
message =
|
|
245
|
-
`unarmed stand-down: --live-wait for PR #${args.pr} has spawn_subagent lease ` +
|
|
246
|
-
`(monitor_agent_id=${lease.monitor_agent_id}) but no child-bound wait identity ` +
|
|
247
|
-
`(heartbeat parent_id must match monitor_agent_id, or pr-wait-mergeable after ` +
|
|
248
|
-
`pr:watch CLEAN attestation; start child pr:watch before verify; ` +
|
|
249
|
-
`parent-shell pr:watch does not arm) (#5219).\n` +
|
|
250
|
-
` Cheaper path:\n` +
|
|
251
|
-
` ${formatApproach1BabysitterOneLiner(args.pr, lease.monitor_agent_id)}\n` +
|
|
252
|
-
` ${spawnRedirect(result.tier)}`;
|
|
253
|
-
}
|
|
254
|
-
else if (message === null) {
|
|
255
|
-
message = arm.message;
|
|
256
|
-
}
|
|
257
|
-
arm = {
|
|
258
|
-
armed: false,
|
|
259
|
-
reason: "unarmed_stand_down",
|
|
260
|
-
message,
|
|
261
|
-
};
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
// Approach 1 arm-startup halt (#5278 P3): production caller for evaluateApproach1ArmStartup.
|
|
265
|
-
let armStartupHalt = null;
|
|
266
|
-
if (args.mergePathArm &&
|
|
267
|
-
args.dispatchStartedAt !== null &&
|
|
268
|
-
args.dispatchStartedAt.trim().length > 0 &&
|
|
269
|
-
arm !== null &&
|
|
270
|
-
!arm.armed &&
|
|
271
|
-
!args.explicitFinish) {
|
|
272
|
-
armStartupHalt = evaluateApproach1ArmStartup({
|
|
273
|
-
dispatchStartedAt: args.dispatchStartedAt,
|
|
274
|
-
probeReady: false,
|
|
275
|
-
});
|
|
276
|
-
if (armStartupHalt.halt && armStartupHalt.message.length > 0) {
|
|
277
|
-
arm = {
|
|
278
|
-
armed: false,
|
|
279
|
-
reason: "unarmed_stand_down",
|
|
280
|
-
message: `${arm.message}\n${armStartupHalt.message}`,
|
|
281
|
-
};
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
if (args.emitJson) {
|
|
285
|
-
const payload = verifyResultToJson(result);
|
|
286
|
-
if (arm !== null) {
|
|
287
|
-
payload.merge_path_arm = {
|
|
288
|
-
armed: arm.armed,
|
|
289
|
-
reason: arm.reason,
|
|
290
|
-
message: arm.message,
|
|
291
|
-
live_wait: args.liveWait,
|
|
292
|
-
explicit_finish: args.explicitFinish,
|
|
293
|
-
sticky_lease: args.stickyLease,
|
|
294
|
-
lease_evidence: result.monitorRecord !== null,
|
|
295
|
-
heartbeat_active: result.heartbeatActive,
|
|
296
|
-
};
|
|
297
|
-
if (armStartupHalt !== null) {
|
|
298
|
-
payload.approach1_arm_startup = {
|
|
299
|
-
halt: armStartupHalt.halt,
|
|
300
|
-
halt_class: armStartupHalt.halt_class,
|
|
301
|
-
elapsed_seconds: armStartupHalt.elapsed_seconds,
|
|
302
|
-
message: armStartupHalt.message,
|
|
303
|
-
};
|
|
304
|
-
}
|
|
305
|
-
// Combined gate+arm: unarmed fails closed even when the monitor gate is ready.
|
|
306
|
-
if (!arm.armed && result.exitCode !== EXIT_CONFIG_ERROR) {
|
|
307
|
-
payload.ready = false;
|
|
308
|
-
payload.exit_code = EXIT_NOT_READY;
|
|
309
|
-
// Gate-ready → arm diagnosis; both failing → keep both messages.
|
|
310
|
-
payload.message = result.exitCode === 0 ? arm.message : `${result.message}\n${arm.message}`;
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
process.stdout.write(`${JSON.stringify(payload, null, 2)}\n`);
|
|
314
|
-
}
|
|
315
|
-
else if (result.exitCode === EXIT_CONFIG_ERROR) {
|
|
316
|
-
process.stderr.write(`${result.message}\n`);
|
|
317
|
-
}
|
|
318
|
-
else if (arm !== null && !arm.armed) {
|
|
319
|
-
process.stderr.write(`${arm.message}\n`);
|
|
320
|
-
}
|
|
321
|
-
else if (result.exitCode === 0) {
|
|
322
|
-
process.stdout.write(`${result.message}\n`);
|
|
323
|
-
if (arm !== null) {
|
|
324
|
-
process.stdout.write(`${arm.message}\n`);
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
else {
|
|
328
|
-
process.stderr.write(`${result.message}\n`);
|
|
329
|
-
}
|
|
330
|
-
if (result.exitCode === EXIT_CONFIG_ERROR) {
|
|
331
|
-
return EXIT_CONFIG_ERROR;
|
|
332
|
-
}
|
|
333
|
-
if (arm !== null && !arm.armed) {
|
|
334
|
-
return EXIT_NOT_READY;
|
|
335
|
-
}
|
|
336
|
-
return result.exitCode;
|
|
337
|
-
}
|
|
338
|
-
if (process.argv[1] !== undefined && fileURLToPath(import.meta.url) === process.argv[1]) {
|
|
339
|
-
process.exit(run(process.argv.slice(2)));
|
|
340
|
-
}
|
|
341
|
-
//# sourceMappingURL=verify-review-monitor.js.map
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
interface ParsedArgs {
|
|
3
|
-
projectRoot: string;
|
|
4
|
-
baseRef: string;
|
|
5
|
-
enforce: boolean;
|
|
6
|
-
quiet: boolean;
|
|
7
|
-
error?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare function parseArgs(argv: string[]): ParsedArgs;
|
|
10
|
-
export declare function run(argv: string[]): number;
|
|
11
|
-
export {};
|
|
12
|
-
//# sourceMappingURL=verify-scope-provenance.d.ts.map
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* CLI for verify:scope-provenance (#3145 / #4956 / #4774).
|
|
4
|
-
*
|
|
5
|
-
* Membership against the declared allowlist (mint / brief file_scope) is
|
|
6
|
-
* evaluated inside evaluateScopeProvenance; this CLI only forwards
|
|
7
|
-
* --base-ref / --enforce.
|
|
8
|
-
*/
|
|
9
|
-
import { resolve } from "node:path";
|
|
10
|
-
import { scopeProvenance } from "@deftai/directive-core";
|
|
11
|
-
import { isDirectEntrypoint } from "./entrypoint.js";
|
|
12
|
-
export function parseArgs(argv) {
|
|
13
|
-
const parsed = {
|
|
14
|
-
projectRoot: ".",
|
|
15
|
-
// Empty means use PR-aware default (origin/master...), not bare HEAD.
|
|
16
|
-
baseRef: "",
|
|
17
|
-
enforce: false,
|
|
18
|
-
quiet: false,
|
|
19
|
-
};
|
|
20
|
-
for (let i = 0; i < argv.length; i += 1) {
|
|
21
|
-
const arg = argv[i];
|
|
22
|
-
if (arg === "--quiet") {
|
|
23
|
-
parsed.quiet = true;
|
|
24
|
-
}
|
|
25
|
-
else if (arg === "--enforce") {
|
|
26
|
-
parsed.enforce = true;
|
|
27
|
-
}
|
|
28
|
-
else if (arg === "--warn") {
|
|
29
|
-
parsed.enforce = false;
|
|
30
|
-
}
|
|
31
|
-
else if (arg === "--project-root") {
|
|
32
|
-
const value = argv[i + 1];
|
|
33
|
-
if (value === undefined) {
|
|
34
|
-
return { ...parsed, error: "argument --project-root: expected one argument" };
|
|
35
|
-
}
|
|
36
|
-
parsed.projectRoot = value;
|
|
37
|
-
i += 1;
|
|
38
|
-
}
|
|
39
|
-
else if (arg?.startsWith("--project-root=")) {
|
|
40
|
-
parsed.projectRoot = arg.slice("--project-root=".length);
|
|
41
|
-
}
|
|
42
|
-
else if (arg === "--base-ref") {
|
|
43
|
-
const value = argv[i + 1];
|
|
44
|
-
if (value === undefined) {
|
|
45
|
-
return { ...parsed, error: "argument --base-ref: expected one argument" };
|
|
46
|
-
}
|
|
47
|
-
parsed.baseRef = value;
|
|
48
|
-
i += 1;
|
|
49
|
-
}
|
|
50
|
-
else if (arg?.startsWith("--base-ref=")) {
|
|
51
|
-
parsed.baseRef = arg.slice("--base-ref=".length);
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
return { ...parsed, error: `unrecognized argument: ${arg}` };
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
return parsed;
|
|
58
|
-
}
|
|
59
|
-
export function run(argv) {
|
|
60
|
-
const args = parseArgs(argv);
|
|
61
|
-
if (args.error !== undefined) {
|
|
62
|
-
process.stderr.write(`verify_scope_provenance: ${args.error}\n`);
|
|
63
|
-
return 2;
|
|
64
|
-
}
|
|
65
|
-
const projectRoot = resolve(args.projectRoot);
|
|
66
|
-
const result = scopeProvenance.evaluateScopeProvenance(projectRoot, {
|
|
67
|
-
...(args.baseRef.length > 0 ? { baseRef: args.baseRef } : {}),
|
|
68
|
-
enforce: args.enforce,
|
|
69
|
-
});
|
|
70
|
-
if (result.exitCode === 0) {
|
|
71
|
-
if (!args.quiet) {
|
|
72
|
-
process.stdout.write(`${result.message}\n`);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
process.stderr.write(`${result.message}\n`);
|
|
77
|
-
}
|
|
78
|
-
return result.exitCode;
|
|
79
|
-
}
|
|
80
|
-
if (isDirectEntrypoint(import.meta.url)) {
|
|
81
|
-
process.exit(run(process.argv.slice(2)));
|
|
82
|
-
}
|
|
83
|
-
//# sourceMappingURL=verify-scope-provenance.js.map
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { type DirectivePosture, type VerifyResult } from "@deftai/directive-core/session";
|
|
3
|
-
export interface VerifySessionRitualRunDeps {
|
|
4
|
-
readonly verifySessionRitual?: (projectRoot: string, options: {
|
|
5
|
-
tier: "quick" | "gated";
|
|
6
|
-
posture?: DirectivePosture;
|
|
7
|
-
}) => VerifyResult;
|
|
8
|
-
}
|
|
9
|
-
interface ParsedArgs {
|
|
10
|
-
projectRoot: string;
|
|
11
|
-
tier: "quick" | "gated";
|
|
12
|
-
posture: DirectivePosture | null;
|
|
13
|
-
emitJson: boolean;
|
|
14
|
-
error?: string;
|
|
15
|
-
}
|
|
16
|
-
/** Parse verify-session-ritual CLI args, mirroring scripts/verify_session_ritual.py. */
|
|
17
|
-
export declare function parseArgs(argv: string[]): ParsedArgs;
|
|
18
|
-
/** True when the ritual failure is the gated cache_fresh step (#3506 / #3507). */
|
|
19
|
-
export declare function isCacheFreshFailureMessage(message: string): boolean;
|
|
20
|
-
/** Run the gate and return the process exit code. */
|
|
21
|
-
export declare function run(argv: string[], deps?: VerifySessionRitualRunDeps): number;
|
|
22
|
-
export {};
|
|
23
|
-
//# sourceMappingURL=verify-session-ritual.d.ts.map
|