@deftai/directive 0.126.2 → 0.128.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/deft-hook +14 -0
- package/bin/deft-hook.cmd +14 -0
- package/dist/bin.js +4319 -3
- package/package.json +11 -21
- 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 -21
- package/dist/coverage-hotspots.js +0 -198
- 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 -3091
- 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 -23
- package/dist/occupancy-release.js +0 -102
- 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 -14
- package/dist/plan-sequence.js +0 -258
- package/dist/policy-fixtures.d.ts +0 -33
- package/dist/policy-fixtures.js +0 -118
- package/dist/policy.d.ts +0 -37
- package/dist/policy.js +0 -744
- 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 -581
- 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 -233
- 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 -391
- 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 -17
- package/dist/verify-intent-constraint.js +0 -110
- 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 -17
- package/dist/verify-observable-scope.js +0 -110
- 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 -32
- package/dist/verify-review-monitor.js +0 -362
- package/dist/verify-scope-provenance.d.ts +0 -16
- package/dist/verify-scope-provenance.js +0 -91
- 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
package/dist/verify-branch.js
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { resolve } from "node:path";
|
|
3
|
-
import { fileURLToPath } from "node:url";
|
|
4
|
-
import { evaluate } from "@deftai/directive-core/branch";
|
|
5
|
-
/** Parse verify-branch CLI args, mirroring the Python argparse surface. */
|
|
6
|
-
export function parseArgs(argv) {
|
|
7
|
-
const parsed = {
|
|
8
|
-
projectRoot: ".",
|
|
9
|
-
allowMissingProjectDefinition: false,
|
|
10
|
-
defaultBranches: null,
|
|
11
|
-
quiet: false,
|
|
12
|
-
};
|
|
13
|
-
for (let i = 0; i < argv.length; i += 1) {
|
|
14
|
-
const arg = argv[i];
|
|
15
|
-
if (arg === "--allow-missing-project-definition") {
|
|
16
|
-
parsed.allowMissingProjectDefinition = true;
|
|
17
|
-
}
|
|
18
|
-
else if (arg === "--quiet") {
|
|
19
|
-
parsed.quiet = true;
|
|
20
|
-
}
|
|
21
|
-
else if (arg === "--project-root") {
|
|
22
|
-
const value = argv[i + 1];
|
|
23
|
-
if (value === undefined) {
|
|
24
|
-
return { ...parsed, error: "argument --project-root: expected one argument" };
|
|
25
|
-
}
|
|
26
|
-
parsed.projectRoot = value;
|
|
27
|
-
i += 1;
|
|
28
|
-
}
|
|
29
|
-
else if (arg?.startsWith("--project-root=")) {
|
|
30
|
-
parsed.projectRoot = arg.slice("--project-root=".length);
|
|
31
|
-
}
|
|
32
|
-
else if (arg === "--default-branch") {
|
|
33
|
-
const value = argv[i + 1];
|
|
34
|
-
if (value === undefined) {
|
|
35
|
-
return { ...parsed, error: "argument --default-branch: expected one argument" };
|
|
36
|
-
}
|
|
37
|
-
if (parsed.defaultBranches === null) {
|
|
38
|
-
parsed.defaultBranches = [];
|
|
39
|
-
}
|
|
40
|
-
parsed.defaultBranches.push(value);
|
|
41
|
-
i += 1;
|
|
42
|
-
}
|
|
43
|
-
else if (arg?.startsWith("--default-branch=")) {
|
|
44
|
-
if (parsed.defaultBranches === null) {
|
|
45
|
-
parsed.defaultBranches = [];
|
|
46
|
-
}
|
|
47
|
-
parsed.defaultBranches.push(arg.slice("--default-branch=".length));
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
return { ...parsed, error: `unrecognized argument: ${arg}` };
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return parsed;
|
|
54
|
-
}
|
|
55
|
-
/** Run the gate and return the process exit code. */
|
|
56
|
-
export function run(argv) {
|
|
57
|
-
const args = parseArgs(argv);
|
|
58
|
-
if (args.error !== undefined) {
|
|
59
|
-
process.stderr.write(`preflight_branch: ${args.error}\n`);
|
|
60
|
-
return 2;
|
|
61
|
-
}
|
|
62
|
-
const projectRoot = resolve(args.projectRoot);
|
|
63
|
-
const defaultBranches = args.defaultBranches !== null ? new Set(args.defaultBranches) : undefined;
|
|
64
|
-
const result = evaluate(projectRoot, {
|
|
65
|
-
allowMissingProjectDefinition: args.allowMissingProjectDefinition,
|
|
66
|
-
defaultBranches,
|
|
67
|
-
});
|
|
68
|
-
if (result.exitCode === 0) {
|
|
69
|
-
if (!args.quiet) {
|
|
70
|
-
process.stdout.write(`${result.message}\n`);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
process.stderr.write(`${result.message}\n`);
|
|
75
|
-
}
|
|
76
|
-
return result.exitCode;
|
|
77
|
-
}
|
|
78
|
-
if (process.argv[1] !== undefined && fileURLToPath(import.meta.url) === process.argv[1]) {
|
|
79
|
-
process.exit(run(process.argv.slice(2)));
|
|
80
|
-
}
|
|
81
|
-
//# sourceMappingURL=verify-branch.js.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
interface ParsedArgs {
|
|
3
|
-
projectRoot: string;
|
|
4
|
-
baseRef: string | null;
|
|
5
|
-
quiet: boolean;
|
|
6
|
-
error?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare function parseArgs(argv: string[]): ParsedArgs;
|
|
9
|
-
export declare function run(argv: string[]): number;
|
|
10
|
-
export {};
|
|
11
|
-
//# sourceMappingURL=verify-class-checks.d.ts.map
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* CLI for verify:class-checks (#4980 / #3145 class).
|
|
4
|
-
*/
|
|
5
|
-
import { resolve } from "node:path";
|
|
6
|
-
import { classChecks } 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_class_checks: ${args.error}\n`);
|
|
51
|
-
return 2;
|
|
52
|
-
}
|
|
53
|
-
const projectRoot = resolve(args.projectRoot);
|
|
54
|
-
const result = classChecks.evaluateClassChecks(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-class-checks.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { parseCohortReviewMonitorsArgv, verifyCohortReviewMonitorsMain } from "@deftai/directive-core/swarm";
|
|
3
|
-
export { parseCohortReviewMonitorsArgv, verifyCohortReviewMonitorsMain };
|
|
4
|
-
export declare function run(argv?: readonly string[]): number;
|
|
5
|
-
//# sourceMappingURL=verify-cohort-review-monitors.d.ts.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { fileURLToPath } from "node:url";
|
|
3
|
-
import { parseCohortReviewMonitorsArgv, verifyCohortReviewMonitorsMain, } from "@deftai/directive-core/swarm";
|
|
4
|
-
export { parseCohortReviewMonitorsArgv, verifyCohortReviewMonitorsMain };
|
|
5
|
-
export function run(argv = process.argv.slice(2)) {
|
|
6
|
-
return verifyCohortReviewMonitorsMain([...argv]);
|
|
7
|
-
}
|
|
8
|
-
if (process.argv[1] !== undefined && fileURLToPath(import.meta.url) === process.argv[1]) {
|
|
9
|
-
process.exit(run(process.argv.slice(2)));
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=verify-cohort-review-monitors.js.map
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
interface ParsedArgs {
|
|
3
|
-
projectRoot: string;
|
|
4
|
-
repo: string | null;
|
|
5
|
-
tip: string | null;
|
|
6
|
-
issue: number | null;
|
|
7
|
-
quiet: boolean;
|
|
8
|
-
skipGh: boolean;
|
|
9
|
-
/** Opt-in discovery when --issue is set; unscoped defaults to on (#3495). */
|
|
10
|
-
discover: boolean | null;
|
|
11
|
-
enforce: boolean;
|
|
12
|
-
error?: string;
|
|
13
|
-
}
|
|
14
|
-
/** Parse verify-completed-tracked CLI args (#3264 / #3476 / #3495). */
|
|
15
|
-
export declare function parseArgs(argv: string[]): ParsedArgs;
|
|
16
|
-
/** Run the gate and return the process exit code. */
|
|
17
|
-
export declare function run(argv: string[]): number;
|
|
18
|
-
export {};
|
|
19
|
-
//# sourceMappingURL=verify-completed-tracked.d.ts.map
|
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { resolve } from "node:path";
|
|
3
|
-
import { fileURLToPath } from "node:url";
|
|
4
|
-
import { COMPLETED_TRACKED_PROGRESS_MIN_BLOBS, COMPLETED_TRACKED_PROGRESS_THRESHOLD_MS, evaluateCompletedTracked, evaluateShippedClosedDiscovery, shouldAnnounceProgress, shouldAnnounceUpFrontCount, } from "@deftai/directive-core/lifecycle";
|
|
5
|
-
function parseIssueNumber(raw) {
|
|
6
|
-
const trimmed = raw.startsWith("#") ? raw.slice(1) : raw;
|
|
7
|
-
if (!/^\d+$/.test(trimmed)) {
|
|
8
|
-
return null;
|
|
9
|
-
}
|
|
10
|
-
const value = Number(trimmed);
|
|
11
|
-
return Number.isInteger(value) && value > 0 ? value : null;
|
|
12
|
-
}
|
|
13
|
-
/** Parse verify-completed-tracked CLI args (#3264 / #3476 / #3495). */
|
|
14
|
-
export function parseArgs(argv) {
|
|
15
|
-
const parsed = {
|
|
16
|
-
projectRoot: ".",
|
|
17
|
-
repo: null,
|
|
18
|
-
tip: null,
|
|
19
|
-
issue: null,
|
|
20
|
-
quiet: false,
|
|
21
|
-
skipGh: false,
|
|
22
|
-
discover: null,
|
|
23
|
-
enforce: false,
|
|
24
|
-
};
|
|
25
|
-
for (let i = 0; i < argv.length; i += 1) {
|
|
26
|
-
const arg = argv[i];
|
|
27
|
-
if (arg === "--quiet") {
|
|
28
|
-
parsed.quiet = true;
|
|
29
|
-
}
|
|
30
|
-
else if (arg === "--skip-gh") {
|
|
31
|
-
parsed.skipGh = true;
|
|
32
|
-
}
|
|
33
|
-
else if (arg === "--discover") {
|
|
34
|
-
parsed.discover = true;
|
|
35
|
-
}
|
|
36
|
-
else if (arg === "--no-discover") {
|
|
37
|
-
parsed.discover = false;
|
|
38
|
-
}
|
|
39
|
-
else if (arg === "--enforce") {
|
|
40
|
-
parsed.enforce = true;
|
|
41
|
-
}
|
|
42
|
-
else if (arg === "--project-root") {
|
|
43
|
-
const value = argv[i + 1];
|
|
44
|
-
if (value === undefined) {
|
|
45
|
-
return { ...parsed, error: "argument --project-root: expected one argument" };
|
|
46
|
-
}
|
|
47
|
-
parsed.projectRoot = value;
|
|
48
|
-
i += 1;
|
|
49
|
-
}
|
|
50
|
-
else if (arg?.startsWith("--project-root=")) {
|
|
51
|
-
parsed.projectRoot = arg.slice("--project-root=".length);
|
|
52
|
-
}
|
|
53
|
-
else if (arg === "--repo") {
|
|
54
|
-
const value = argv[i + 1];
|
|
55
|
-
if (value === undefined) {
|
|
56
|
-
return { ...parsed, error: "argument --repo: expected one argument" };
|
|
57
|
-
}
|
|
58
|
-
parsed.repo = value;
|
|
59
|
-
i += 1;
|
|
60
|
-
}
|
|
61
|
-
else if (arg?.startsWith("--repo=")) {
|
|
62
|
-
parsed.repo = arg.slice("--repo=".length);
|
|
63
|
-
}
|
|
64
|
-
else if (arg === "--tip") {
|
|
65
|
-
const value = argv[i + 1];
|
|
66
|
-
if (value === undefined) {
|
|
67
|
-
return { ...parsed, error: "argument --tip: expected one argument" };
|
|
68
|
-
}
|
|
69
|
-
parsed.tip = value;
|
|
70
|
-
i += 1;
|
|
71
|
-
}
|
|
72
|
-
else if (arg?.startsWith("--tip=")) {
|
|
73
|
-
parsed.tip = arg.slice("--tip=".length);
|
|
74
|
-
}
|
|
75
|
-
else if (arg === "--issue") {
|
|
76
|
-
const value = argv[i + 1];
|
|
77
|
-
if (value === undefined) {
|
|
78
|
-
return { ...parsed, error: "argument --issue: expected one argument" };
|
|
79
|
-
}
|
|
80
|
-
const issue = parseIssueNumber(value);
|
|
81
|
-
if (issue === null) {
|
|
82
|
-
return { ...parsed, error: `argument --issue: expected a positive integer, got ${value}` };
|
|
83
|
-
}
|
|
84
|
-
parsed.issue = issue;
|
|
85
|
-
i += 1;
|
|
86
|
-
}
|
|
87
|
-
else if (arg?.startsWith("--issue=")) {
|
|
88
|
-
const value = arg.slice("--issue=".length);
|
|
89
|
-
const issue = parseIssueNumber(value);
|
|
90
|
-
if (issue === null) {
|
|
91
|
-
return { ...parsed, error: `argument --issue: expected a positive integer, got ${value}` };
|
|
92
|
-
}
|
|
93
|
-
parsed.issue = issue;
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
return { ...parsed, error: `unrecognized argument: ${arg}` };
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
return parsed;
|
|
100
|
-
}
|
|
101
|
-
function shouldRunDiscovery(args) {
|
|
102
|
-
if (args.discover === false) {
|
|
103
|
-
return false;
|
|
104
|
-
}
|
|
105
|
-
if (args.discover === true || args.enforce) {
|
|
106
|
-
return true;
|
|
107
|
-
}
|
|
108
|
-
// Warn-first default: unscoped corpus scans discover; --issue N stays land-only.
|
|
109
|
-
return args.issue === null;
|
|
110
|
-
}
|
|
111
|
-
/** Run the gate and return the process exit code. */
|
|
112
|
-
export function run(argv) {
|
|
113
|
-
const args = parseArgs(argv);
|
|
114
|
-
if (args.error !== undefined) {
|
|
115
|
-
process.stderr.write(`verify_completed_tracked: ${args.error}\n`);
|
|
116
|
-
return 2;
|
|
117
|
-
}
|
|
118
|
-
const projectRoot = resolve(args.projectRoot);
|
|
119
|
-
const thresholdMs = resolveProgressThresholdMs();
|
|
120
|
-
let announced = false;
|
|
121
|
-
const land = evaluateCompletedTracked(projectRoot, {
|
|
122
|
-
quiet: args.quiet,
|
|
123
|
-
repo: args.repo,
|
|
124
|
-
tip: args.tip,
|
|
125
|
-
issue: args.issue,
|
|
126
|
-
skipGh: args.skipGh,
|
|
127
|
-
onProgress: (event) => {
|
|
128
|
-
if (args.quiet || announced) {
|
|
129
|
-
return;
|
|
130
|
-
}
|
|
131
|
-
const minBlobs = resolveProgressMinBlobs();
|
|
132
|
-
const upFront = event.phase === "listed" &&
|
|
133
|
-
shouldAnnounceUpFrontCount(event.terminalCount, event.nonterminalCount, minBlobs);
|
|
134
|
-
if (!upFront && !shouldAnnounceProgress(event.elapsedMs, thresholdMs)) {
|
|
135
|
-
return;
|
|
136
|
-
}
|
|
137
|
-
announced = true;
|
|
138
|
-
writeProgress(event);
|
|
139
|
-
},
|
|
140
|
-
});
|
|
141
|
-
let discoveryCode = 0;
|
|
142
|
-
let discoveryMessage = "";
|
|
143
|
-
let discoveryStream = "none";
|
|
144
|
-
if (shouldRunDiscovery(args)) {
|
|
145
|
-
const discovery = evaluateShippedClosedDiscovery(projectRoot, {
|
|
146
|
-
quiet: args.quiet,
|
|
147
|
-
repo: args.repo,
|
|
148
|
-
tip: args.tip,
|
|
149
|
-
skipGh: args.skipGh,
|
|
150
|
-
enforce: args.enforce,
|
|
151
|
-
});
|
|
152
|
-
discoveryCode = discovery.code;
|
|
153
|
-
discoveryMessage = discovery.message;
|
|
154
|
-
discoveryStream = discovery.stream;
|
|
155
|
-
}
|
|
156
|
-
// Scoped land fail-closed must not be softened by discovery warn (#3495 Reject).
|
|
157
|
-
if (land.message.length > 0) {
|
|
158
|
-
if (land.stream === "stdout") {
|
|
159
|
-
process.stdout.write(`${land.message}\n`);
|
|
160
|
-
}
|
|
161
|
-
else if (land.stream === "stderr") {
|
|
162
|
-
process.stderr.write(`${land.message}\n`);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
if (discoveryMessage.length > 0) {
|
|
166
|
-
if (discoveryStream === "stdout") {
|
|
167
|
-
process.stdout.write(`${discoveryMessage}\n`);
|
|
168
|
-
}
|
|
169
|
-
else if (discoveryStream === "stderr") {
|
|
170
|
-
process.stderr.write(`${discoveryMessage}\n`);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
if (land.code === 2 || discoveryCode === 2) {
|
|
174
|
-
return 2;
|
|
175
|
-
}
|
|
176
|
-
if (land.code === 1 || discoveryCode === 1) {
|
|
177
|
-
return 1;
|
|
178
|
-
}
|
|
179
|
-
return 0;
|
|
180
|
-
}
|
|
181
|
-
function resolveProgressThresholdMs() {
|
|
182
|
-
const raw = process.env.DEFT_COMPLETED_TRACKED_PROGRESS_MS;
|
|
183
|
-
if (raw !== undefined && /^\d+$/.test(raw)) {
|
|
184
|
-
return Number(raw);
|
|
185
|
-
}
|
|
186
|
-
return COMPLETED_TRACKED_PROGRESS_THRESHOLD_MS;
|
|
187
|
-
}
|
|
188
|
-
function resolveProgressMinBlobs() {
|
|
189
|
-
const raw = process.env.DEFT_COMPLETED_TRACKED_PROGRESS_MIN_BLOBS;
|
|
190
|
-
if (raw !== undefined && /^\d+$/.test(raw)) {
|
|
191
|
-
return Number(raw);
|
|
192
|
-
}
|
|
193
|
-
return COMPLETED_TRACKED_PROGRESS_MIN_BLOBS;
|
|
194
|
-
}
|
|
195
|
-
function writeProgress(event) {
|
|
196
|
-
process.stderr.write(`verify:completed-tracked: still running (${event.elapsedMs}ms); ` +
|
|
197
|
-
`reading ${event.terminalCount} terminal and ${event.nonterminalCount} nonterminal blobs.\n`);
|
|
198
|
-
}
|
|
199
|
-
if (process.argv[1] !== undefined && fileURLToPath(import.meta.url) === process.argv[1]) {
|
|
200
|
-
process.exit(run(process.argv.slice(2)));
|
|
201
|
-
}
|
|
202
|
-
//# sourceMappingURL=verify-completed-tracked.js.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
interface ParsedArgs {
|
|
3
|
-
projectRoot: string;
|
|
4
|
-
baseRef: string;
|
|
5
|
-
quiet: boolean;
|
|
6
|
-
error?: string;
|
|
7
|
-
}
|
|
8
|
-
/** Parse verify-completed-write-guard CLI args (#3679). */
|
|
9
|
-
export declare function parseArgs(argv: string[]): ParsedArgs;
|
|
10
|
-
/** Run the gate and return the process exit code. */
|
|
11
|
-
export declare function run(argv: string[]): number;
|
|
12
|
-
export {};
|
|
13
|
-
//# sourceMappingURL=verify-completed-write-guard.d.ts.map
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { spawnSync } from "node:child_process";
|
|
3
|
-
/**
|
|
4
|
-
* CLI for verify:completed-write-guard (#3679).
|
|
5
|
-
*/
|
|
6
|
-
import { resolve } from "node:path";
|
|
7
|
-
import { fileURLToPath } from "node:url";
|
|
8
|
-
import { evaluateCompletedWriteGuard } from "@deftai/directive-core/lifecycle";
|
|
9
|
-
/** Parse verify-completed-write-guard CLI args (#3679). */
|
|
10
|
-
export function parseArgs(argv) {
|
|
11
|
-
const parsed = {
|
|
12
|
-
projectRoot: ".",
|
|
13
|
-
baseRef: "",
|
|
14
|
-
quiet: false,
|
|
15
|
-
};
|
|
16
|
-
for (let i = 0; i < argv.length; i += 1) {
|
|
17
|
-
const arg = argv[i];
|
|
18
|
-
if (arg === "--quiet") {
|
|
19
|
-
parsed.quiet = true;
|
|
20
|
-
}
|
|
21
|
-
else if (arg === "--project-root") {
|
|
22
|
-
const value = argv[i + 1];
|
|
23
|
-
if (value === undefined) {
|
|
24
|
-
return { ...parsed, error: "argument --project-root: expected one argument" };
|
|
25
|
-
}
|
|
26
|
-
parsed.projectRoot = value;
|
|
27
|
-
i += 1;
|
|
28
|
-
}
|
|
29
|
-
else if (arg?.startsWith("--project-root=")) {
|
|
30
|
-
parsed.projectRoot = arg.slice("--project-root=".length);
|
|
31
|
-
}
|
|
32
|
-
else if (arg === "--base-ref") {
|
|
33
|
-
const value = argv[i + 1];
|
|
34
|
-
if (value === undefined) {
|
|
35
|
-
return { ...parsed, error: "argument --base-ref: expected one argument" };
|
|
36
|
-
}
|
|
37
|
-
parsed.baseRef = value;
|
|
38
|
-
i += 1;
|
|
39
|
-
}
|
|
40
|
-
else if (arg?.startsWith("--base-ref=")) {
|
|
41
|
-
parsed.baseRef = arg.slice("--base-ref=".length);
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
return { ...parsed, error: `unrecognized argument: ${arg}` };
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return parsed;
|
|
48
|
-
}
|
|
49
|
-
/** Run the gate and return the process exit code. */
|
|
50
|
-
export function run(argv) {
|
|
51
|
-
const args = parseArgs(argv);
|
|
52
|
-
if (args.error !== undefined) {
|
|
53
|
-
process.stderr.write(`verify_completed_write_guard: ${args.error}\n`);
|
|
54
|
-
return 2;
|
|
55
|
-
}
|
|
56
|
-
const projectRoot = resolve(args.projectRoot);
|
|
57
|
-
const result = evaluateCompletedWriteGuard(projectRoot, {
|
|
58
|
-
...(args.baseRef.length > 0 ? { baseRef: args.baseRef } : {}),
|
|
59
|
-
runGh: (command) => {
|
|
60
|
-
const proc = spawnSync(command[0] ?? "gh", command.slice(1), {
|
|
61
|
-
cwd: projectRoot,
|
|
62
|
-
encoding: "utf8",
|
|
63
|
-
timeout: 15_000,
|
|
64
|
-
});
|
|
65
|
-
return {
|
|
66
|
-
returncode: proc.status ?? 1,
|
|
67
|
-
stdout: proc.stdout ?? "",
|
|
68
|
-
};
|
|
69
|
-
},
|
|
70
|
-
});
|
|
71
|
-
if (result.message.length > 0 && !args.quiet) {
|
|
72
|
-
if (result.code === 0) {
|
|
73
|
-
process.stdout.write(`${result.message}\n`);
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
process.stderr.write(`${result.message}\n`);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
return result.code;
|
|
80
|
-
}
|
|
81
|
-
if (process.argv[1] !== undefined && fileURLToPath(import.meta.url) === process.argv[1]) {
|
|
82
|
-
process.exit(run(process.argv.slice(2)));
|
|
83
|
-
}
|
|
84
|
-
//# sourceMappingURL=verify-completed-write-guard.js.map
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
interface ParsedArgs {
|
|
3
|
-
projectRoot: string;
|
|
4
|
-
frameworkSource: boolean;
|
|
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-consumer-check-contract.d.ts.map
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* CLI for verify:consumer-check-contract (#3145).
|
|
4
|
-
*/
|
|
5
|
-
import { resolve } from "node:path";
|
|
6
|
-
import { consumerCheckContract } from "@deftai/directive-core";
|
|
7
|
-
import { isDirectEntrypoint } from "./entrypoint.js";
|
|
8
|
-
export function parseArgs(argv) {
|
|
9
|
-
const parsed = {
|
|
10
|
-
projectRoot: ".",
|
|
11
|
-
frameworkSource: false,
|
|
12
|
-
enforce: true,
|
|
13
|
-
quiet: false,
|
|
14
|
-
};
|
|
15
|
-
for (let i = 0; i < argv.length; i += 1) {
|
|
16
|
-
const arg = argv[i];
|
|
17
|
-
if (arg === "--quiet") {
|
|
18
|
-
parsed.quiet = true;
|
|
19
|
-
}
|
|
20
|
-
else if (arg === "--enforce") {
|
|
21
|
-
parsed.enforce = true;
|
|
22
|
-
}
|
|
23
|
-
else if (arg === "--warn") {
|
|
24
|
-
parsed.enforce = false;
|
|
25
|
-
}
|
|
26
|
-
else if (arg === "--framework-source") {
|
|
27
|
-
parsed.frameworkSource = true;
|
|
28
|
-
}
|
|
29
|
-
else if (arg === "--project-root") {
|
|
30
|
-
const value = argv[i + 1];
|
|
31
|
-
if (value === undefined) {
|
|
32
|
-
return { ...parsed, error: "argument --project-root: expected one argument" };
|
|
33
|
-
}
|
|
34
|
-
parsed.projectRoot = value;
|
|
35
|
-
i += 1;
|
|
36
|
-
}
|
|
37
|
-
else if (arg?.startsWith("--project-root=")) {
|
|
38
|
-
parsed.projectRoot = arg.slice("--project-root=".length);
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
return { ...parsed, error: `unrecognized argument: ${arg}` };
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return parsed;
|
|
45
|
-
}
|
|
46
|
-
export function run(argv) {
|
|
47
|
-
const args = parseArgs(argv);
|
|
48
|
-
if (args.error !== undefined) {
|
|
49
|
-
process.stderr.write(`verify_consumer_check_contract: ${args.error}\n`);
|
|
50
|
-
return 2;
|
|
51
|
-
}
|
|
52
|
-
const projectRoot = resolve(args.projectRoot);
|
|
53
|
-
const result = consumerCheckContract.evaluateConsumerCheckContract(projectRoot, {
|
|
54
|
-
frameworkSource: args.frameworkSource,
|
|
55
|
-
enforce: args.enforce,
|
|
56
|
-
});
|
|
57
|
-
if (result.exitCode === 0) {
|
|
58
|
-
if (!args.quiet) {
|
|
59
|
-
process.stdout.write(`${result.message}\n`);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
process.stderr.write(`${result.message}\n`);
|
|
64
|
-
}
|
|
65
|
-
return result.exitCode;
|
|
66
|
-
}
|
|
67
|
-
if (isDirectEntrypoint(import.meta.url)) {
|
|
68
|
-
process.exit(run(process.argv.slice(2)));
|
|
69
|
-
}
|
|
70
|
-
//# sourceMappingURL=verify-consumer-check-contract.js.map
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
interface ParsedArgs {
|
|
3
|
-
projectRoot: string;
|
|
4
|
-
quiet: boolean;
|
|
5
|
-
error?: string;
|
|
6
|
-
}
|
|
7
|
-
/** Parse verify-consumer-header-placeholder CLI args. */
|
|
8
|
-
export declare function parseArgs(argv: string[]): ParsedArgs;
|
|
9
|
-
/** Run the gate and return the process exit code. */
|
|
10
|
-
export declare function run(argv: string[]): number;
|
|
11
|
-
export {};
|
|
12
|
-
//# sourceMappingURL=verify-consumer-header-placeholder.d.ts.map
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* CLI for verify:consumer-header-placeholder (#4544 Prefer-A).
|
|
4
|
-
*
|
|
5
|
-
* Fail closed when product-mutation completion still leaves the unmanaged
|
|
6
|
-
* AGENTS.md header on the exact scaffold edit-me placeholder. Process-only
|
|
7
|
-
* and custom headers pass. Returned failure only.
|
|
8
|
-
*/
|
|
9
|
-
import { resolve } from "node:path";
|
|
10
|
-
import { fileURLToPath } from "node:url";
|
|
11
|
-
import { evaluateConsumerHeaderPlaceholderAtRoot } from "@deftai/directive-core/check";
|
|
12
|
-
function takeProjectRootValue(argv, index) {
|
|
13
|
-
const next = argv[index + 1];
|
|
14
|
-
if (next === undefined || next.length === 0 || next.startsWith("-")) {
|
|
15
|
-
return { error: "argument --project-root: expected one argument", next: index };
|
|
16
|
-
}
|
|
17
|
-
return { value: next, next: index + 1 };
|
|
18
|
-
}
|
|
19
|
-
/** Parse verify-consumer-header-placeholder CLI args. */
|
|
20
|
-
export function parseArgs(argv) {
|
|
21
|
-
const parsed = {
|
|
22
|
-
projectRoot: ".",
|
|
23
|
-
quiet: false,
|
|
24
|
-
};
|
|
25
|
-
for (let i = 0; i < argv.length; i += 1) {
|
|
26
|
-
const arg = argv[i];
|
|
27
|
-
if (arg === "--quiet") {
|
|
28
|
-
parsed.quiet = true;
|
|
29
|
-
}
|
|
30
|
-
else if (arg === "--project-root") {
|
|
31
|
-
const taken = takeProjectRootValue(argv, i);
|
|
32
|
-
if (taken.error !== undefined) {
|
|
33
|
-
return { ...parsed, error: taken.error };
|
|
34
|
-
}
|
|
35
|
-
parsed.projectRoot = taken.value ?? parsed.projectRoot;
|
|
36
|
-
i = taken.next;
|
|
37
|
-
}
|
|
38
|
-
else if (arg?.startsWith("--project-root=")) {
|
|
39
|
-
const value = arg.slice("--project-root=".length);
|
|
40
|
-
if (value.length === 0 || value.startsWith("-")) {
|
|
41
|
-
return { ...parsed, error: "argument --project-root: expected one argument" };
|
|
42
|
-
}
|
|
43
|
-
parsed.projectRoot = value;
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
return { ...parsed, error: `unrecognized argument: ${arg}` };
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
return parsed;
|
|
50
|
-
}
|
|
51
|
-
/** Run the gate and return the process exit code. */
|
|
52
|
-
export function run(argv) {
|
|
53
|
-
const args = parseArgs(argv);
|
|
54
|
-
if (args.error !== undefined) {
|
|
55
|
-
process.stderr.write(`verify_consumer_header_placeholder: ${args.error}\n`);
|
|
56
|
-
return 2;
|
|
57
|
-
}
|
|
58
|
-
const projectRoot = resolve(args.projectRoot);
|
|
59
|
-
const result = evaluateConsumerHeaderPlaceholderAtRoot(projectRoot);
|
|
60
|
-
if (result.message.length > 0 && !args.quiet) {
|
|
61
|
-
if (result.ok) {
|
|
62
|
-
process.stdout.write(`${result.message}\n`);
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
process.stderr.write(`${result.message}\n`);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
return result.ok ? 0 : 1;
|
|
69
|
-
}
|
|
70
|
-
if (process.argv[1] !== undefined && fileURLToPath(import.meta.url) === process.argv[1]) {
|
|
71
|
-
process.exit(run(process.argv.slice(2)));
|
|
72
|
-
}
|
|
73
|
-
//# sourceMappingURL=verify-consumer-header-placeholder.js.map
|