@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
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/** Canonical headless install argv (#1339 / #1409 / getting-started.md). */
|
|
2
|
-
export const CANONICAL_INIT_ARGV = ["--yes", "--repo-root", ".", "--json"];
|
|
3
|
-
/** Canonical headless upgrade argv (#1339 / #1409). */
|
|
4
|
-
export const CANONICAL_UPDATE_ARGV = ["--yes", "--upgrade", "--repo-root", ".", "--json"];
|
|
5
|
-
/**
|
|
6
|
-
* Flags that make `directive update` classify + print its plan without executing
|
|
7
|
-
* the refresh (#2266). Recognised in the USER argv (never part of the canonical
|
|
8
|
-
* always-applied argv above, which must stay a real refresh).
|
|
9
|
-
*/
|
|
10
|
-
export const UPDATE_DRY_RUN_FLAGS = ["--dry-run", "--plan"];
|
|
11
|
-
/**
|
|
12
|
-
* Flags that make `directive init` classify + print the dispatch plan without
|
|
13
|
-
* executing any deposit/refresh/migrate (#2265). Mirrors {@link UPDATE_DRY_RUN_FLAGS};
|
|
14
|
-
* recognised in the USER argv, never part of the canonical always-applied argv
|
|
15
|
-
* above (which must stay a real adoption dispatch).
|
|
16
|
-
*/
|
|
17
|
-
export const INIT_DRY_RUN_FLAGS = ["--dry-run", "--plan"];
|
|
18
|
-
/**
|
|
19
|
-
* Flags that switch `directive init` into headless manifest-emit mode (#2268):
|
|
20
|
-
* serialise the merged keystone `plan()` into a `{ version, files }` manifest
|
|
21
|
-
* with ALL execution side effects suppressed. Recognised in the USER argv; NOT
|
|
22
|
-
* part of the canonical always-applied argv above (which must stay a real,
|
|
23
|
-
* executing adoption dispatch — a headless flag there would silently suppress
|
|
24
|
-
* every install's side effects).
|
|
25
|
-
*/
|
|
26
|
-
export const INIT_HEADLESS_FLAGS = ["--headless", "/headless"];
|
|
27
|
-
/**
|
|
28
|
-
* Flag naming the manifest output target for `--headless` (#2268). Accepts the
|
|
29
|
-
* `--output=<path>` and `--output <path>` forms; when absent the manifest is
|
|
30
|
-
* written to stdout. Writing this file is the ONLY filesystem side effect the
|
|
31
|
-
* headless path is permitted to perform.
|
|
32
|
-
*/
|
|
33
|
-
export const INIT_OUTPUT_FLAGS = ["--output", "/output"];
|
|
34
|
-
/** Canonical migrate argv: defaults to cwd, human-readable unless --json (#1941). */
|
|
35
|
-
export const CANONICAL_MIGRATE_ARGV = ["--repo-root", "."];
|
|
36
|
-
/**
|
|
37
|
-
* Subcommand flag selecting the vendored→hybrid `.deft/core` un-commit (#2269).
|
|
38
|
-
* `migrate --untrack-core` dispatches to the destructive un-track path; bare
|
|
39
|
-
* `migrate` keeps its non-destructive provenance-stamp behavior.
|
|
40
|
-
*/
|
|
41
|
-
export const MIGRATE_UNTRACK_CORE_FLAG = "--untrack-core";
|
|
42
|
-
//# sourceMappingURL=constants.js.map
|
package/dist/init-cli/help.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { DispatchIo } from "../dispatch.js";
|
|
2
|
-
/** Flags that request usage text without executing a mutating install path (#2828). */
|
|
3
|
-
export declare const INIT_CLI_HELP_FLAGS: readonly ["--help", "-h", "/help", "/h"];
|
|
4
|
-
/** True when argv includes a help flag anywhere in the token list. */
|
|
5
|
-
export declare function argvWantsHelp(argv: readonly string[]): boolean;
|
|
6
|
-
export declare function printUpdateHelp(io: DispatchIo): void;
|
|
7
|
-
export declare function printInitHelp(io: DispatchIo): void;
|
|
8
|
-
export declare function printMigrateHelp(io: DispatchIo): void;
|
|
9
|
-
//# sourceMappingURL=help.d.ts.map
|
package/dist/init-cli/help.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/** Flags that request usage text without executing a mutating install path (#2828). */
|
|
2
|
-
export const INIT_CLI_HELP_FLAGS = ["--help", "-h", "/help", "/h"];
|
|
3
|
-
/** True when argv includes a help flag anywhere in the token list. */
|
|
4
|
-
export function argvWantsHelp(argv) {
|
|
5
|
-
const flags = INIT_CLI_HELP_FLAGS;
|
|
6
|
-
return argv.some((arg) => flags.includes(arg));
|
|
7
|
-
}
|
|
8
|
-
export function printUpdateHelp(io) {
|
|
9
|
-
io.writeOut("Usage: directive update [options]\n" +
|
|
10
|
-
" deft update [options]\n\n" +
|
|
11
|
-
"Refresh the framework deposit in an existing Directive project and self-heal the engine.\n\n" +
|
|
12
|
-
"Options:\n" +
|
|
13
|
-
" --repo-root <path> Project root (default: current directory)\n" +
|
|
14
|
-
" --json Machine-readable summary on stdout\n" +
|
|
15
|
-
" --yes, --non-interactive Run without prompts\n" +
|
|
16
|
-
" --dry-run, --plan Classify and print the refresh plan without writing\n" +
|
|
17
|
-
" --allow-dirty-no-stage Apply on a dirty tree without automatic git add\n" +
|
|
18
|
-
" -h, --help Show this help\n");
|
|
19
|
-
}
|
|
20
|
-
export function printInitHelp(io) {
|
|
21
|
-
io.writeOut("Usage: directive init [options]\n" +
|
|
22
|
-
" deft init [options]\n\n" +
|
|
23
|
-
"Set up Directive in the current project (greenfield scaffold or brownfield adoption).\n\n" +
|
|
24
|
-
"Options:\n" +
|
|
25
|
-
" --repo-root <path> Project root (default: current directory)\n" +
|
|
26
|
-
" --json Machine-readable summary on stdout\n" +
|
|
27
|
-
" --yes, --non-interactive Run without prompts\n" +
|
|
28
|
-
" --dry-run, --plan Classify and print the dispatch plan without writing\n" +
|
|
29
|
-
" --headless Emit a { version, files } manifest with no side effects\n" +
|
|
30
|
-
" --output <path> Manifest output path for --headless (default: stdout)\n" +
|
|
31
|
-
" -h, --help Show this help\n");
|
|
32
|
-
}
|
|
33
|
-
export function printMigrateHelp(io) {
|
|
34
|
-
io.writeOut("Usage: directive migrate [options]\n" +
|
|
35
|
-
" deft migrate [options]\n\n" +
|
|
36
|
-
"Stamp a canonical-vendored .deft/core deposit as npm-managed (provenance only).\n\n" +
|
|
37
|
-
"Options:\n" +
|
|
38
|
-
" --repo-root <path> Project root (default: current directory)\n" +
|
|
39
|
-
" --json Machine-readable summary on stdout\n" +
|
|
40
|
-
" --untrack-core Un-commit .deft/core from git (destructive index mutation)\n" +
|
|
41
|
-
" -h, --help Show this help\n");
|
|
42
|
-
}
|
|
43
|
-
//# sourceMappingURL=help.js.map
|
package/dist/init-cli/init.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { type HeadlessManifestSeams, type InitDispatchSeams } from "@deftai/directive-core/init-deposit";
|
|
2
|
-
import type { DispatchIo } from "../dispatch.js";
|
|
3
|
-
/** True when the user argv asked for a classify-only dispatch plan (`--dry-run`/`--plan`). */
|
|
4
|
-
export declare function isInitDryRun(argv: readonly string[]): boolean;
|
|
5
|
-
/** True when the user argv asked for headless manifest-emit mode (`--headless`). */
|
|
6
|
-
export declare function isInitHeadless(argv: readonly string[]): boolean;
|
|
7
|
-
/**
|
|
8
|
-
* Resolve the `--output=<path>` / `--output <path>` target for headless mode.
|
|
9
|
-
* Returns null when no output flag is present (manifest goes to stdout).
|
|
10
|
-
*/
|
|
11
|
-
export declare function parseInitOutputPath(argv: readonly string[]): string | null;
|
|
12
|
-
/**
|
|
13
|
-
* `directive init` — the universal adoption dispatcher (#2265). Classifies the
|
|
14
|
-
* directory via the shared keystone plan() fact-set and dispatches to
|
|
15
|
-
* scaffold / brownfield-install / delegate-to-update / route-to-migrate.
|
|
16
|
-
*
|
|
17
|
-
* When `--headless` is present (#2268), init short-circuits the executing
|
|
18
|
-
* dispatch and instead serialises the merged `plan()` schema into a
|
|
19
|
-
* `{ version, files }` manifest with ALL execution side effects suppressed
|
|
20
|
-
* (no prompts, no git, no hook install, no writes outside `--output`).
|
|
21
|
-
*
|
|
22
|
-
* The optional `seams` argument is test-only injection for the dispatch path;
|
|
23
|
-
* `headlessSeams` injects the content-resolution seam for the headless path.
|
|
24
|
-
*/
|
|
25
|
-
export declare function runInit(argv: readonly string[], io: DispatchIo, seams?: InitDispatchSeams, headlessSeams?: HeadlessManifestSeams): Promise<number>;
|
|
26
|
-
//# sourceMappingURL=init.d.ts.map
|
package/dist/init-cli/init.js
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { parseInitArgv, runInitDispatchCli, runInitHeadlessCli, } from "@deftai/directive-core/init-deposit";
|
|
2
|
-
import { CANONICAL_INIT_ARGV, INIT_DRY_RUN_FLAGS, INIT_HEADLESS_FLAGS, INIT_OUTPUT_FLAGS, } from "./constants.js";
|
|
3
|
-
import { argvWantsHelp, printInitHelp } from "./help.js";
|
|
4
|
-
/** True when the user argv asked for a classify-only dispatch plan (`--dry-run`/`--plan`). */
|
|
5
|
-
export function isInitDryRun(argv) {
|
|
6
|
-
const flags = INIT_DRY_RUN_FLAGS;
|
|
7
|
-
return argv.some((arg) => flags.includes(arg));
|
|
8
|
-
}
|
|
9
|
-
/** True when the user argv asked for headless manifest-emit mode (`--headless`). */
|
|
10
|
-
export function isInitHeadless(argv) {
|
|
11
|
-
const flags = INIT_HEADLESS_FLAGS;
|
|
12
|
-
return argv.some((arg) => flags.includes(arg));
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Resolve the `--output=<path>` / `--output <path>` target for headless mode.
|
|
16
|
-
* Returns null when no output flag is present (manifest goes to stdout).
|
|
17
|
-
*/
|
|
18
|
-
export function parseInitOutputPath(argv) {
|
|
19
|
-
const flags = INIT_OUTPUT_FLAGS;
|
|
20
|
-
for (let i = 0; i < argv.length; i += 1) {
|
|
21
|
-
const arg = argv[i];
|
|
22
|
-
if (arg === undefined)
|
|
23
|
-
continue;
|
|
24
|
-
for (const flag of flags) {
|
|
25
|
-
if (arg === flag) {
|
|
26
|
-
const next = argv[i + 1];
|
|
27
|
-
// A next token that is itself a flag (leading `-`) is NOT a path — treat
|
|
28
|
-
// `--output --headless` as a missing value rather than writing a file
|
|
29
|
-
// literally named `--headless`. Absolute POSIX paths (`/foo`) are kept.
|
|
30
|
-
if (next === undefined || next.length === 0 || next.startsWith("-"))
|
|
31
|
-
return null;
|
|
32
|
-
return next;
|
|
33
|
-
}
|
|
34
|
-
const prefix = `${flag}=`;
|
|
35
|
-
if (arg.startsWith(prefix)) {
|
|
36
|
-
const value = arg.slice(prefix.length);
|
|
37
|
-
return value.length > 0 ? value : null;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
return null;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* `directive init` — the universal adoption dispatcher (#2265). Classifies the
|
|
45
|
-
* directory via the shared keystone plan() fact-set and dispatches to
|
|
46
|
-
* scaffold / brownfield-install / delegate-to-update / route-to-migrate.
|
|
47
|
-
*
|
|
48
|
-
* When `--headless` is present (#2268), init short-circuits the executing
|
|
49
|
-
* dispatch and instead serialises the merged `plan()` schema into a
|
|
50
|
-
* `{ version, files }` manifest with ALL execution side effects suppressed
|
|
51
|
-
* (no prompts, no git, no hook install, no writes outside `--output`).
|
|
52
|
-
*
|
|
53
|
-
* The optional `seams` argument is test-only injection for the dispatch path;
|
|
54
|
-
* `headlessSeams` injects the content-resolution seam for the headless path.
|
|
55
|
-
*/
|
|
56
|
-
export function runInit(argv, io, seams, headlessSeams) {
|
|
57
|
-
if (argvWantsHelp(argv)) {
|
|
58
|
-
printInitHelp(io);
|
|
59
|
-
return Promise.resolve(0);
|
|
60
|
-
}
|
|
61
|
-
if (isInitHeadless(argv)) {
|
|
62
|
-
return runInitHeadlessCli({
|
|
63
|
-
outputPath: parseInitOutputPath(argv),
|
|
64
|
-
writeOut: io.writeOut,
|
|
65
|
-
writeErr: io.writeErr,
|
|
66
|
-
seams: headlessSeams,
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
const args = parseInitArgv(CANONICAL_INIT_ARGV, argv);
|
|
70
|
-
return runInitDispatchCli({
|
|
71
|
-
projectDir: args.projectDir,
|
|
72
|
-
jsonOut: args.jsonOut,
|
|
73
|
-
nonInteractive: args.nonInteractive,
|
|
74
|
-
dryRun: isInitDryRun(argv),
|
|
75
|
-
writeOut: io.writeOut,
|
|
76
|
-
writeErr: io.writeErr,
|
|
77
|
-
seams,
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
//# sourceMappingURL=init.js.map
|
package/dist/init-cli/migrate.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { parseInitArgv, runMigrateCli, runUntrackCoreCli, } from "@deftai/directive-core/init-deposit";
|
|
2
|
-
import { CANONICAL_MIGRATE_ARGV, MIGRATE_UNTRACK_CORE_FLAG } from "./constants.js";
|
|
3
|
-
import { argvWantsHelp, printMigrateHelp } from "./help.js";
|
|
4
|
-
/**
|
|
5
|
-
* `directive migrate` (alias `deft migrate`) -- stage-2 provenance verb (#1941):
|
|
6
|
-
* stamp a canonical-vendored `.deft/core` deposit as npm-managed. Thin wrapper
|
|
7
|
-
* over the core orchestrator; maps the three-state result to a 0/1/2 exit code.
|
|
8
|
-
*
|
|
9
|
-
* `directive migrate --untrack-core` (#2269) branches to the vendored→hybrid
|
|
10
|
-
* un-commit path: `git rm --cached -r .deft/core` gated on a committed pin, plus
|
|
11
|
-
* `.gitignore` reconciliation. The destructive index mutation lives ONLY there.
|
|
12
|
-
*/
|
|
13
|
-
const NO_EFFECT_CONFIRMATION_FLAGS = new Set([
|
|
14
|
-
"--yes",
|
|
15
|
-
"--non-interactive",
|
|
16
|
-
"/yes",
|
|
17
|
-
"/non-interactive",
|
|
18
|
-
]);
|
|
19
|
-
function hasUntrackCoreFlag(argv) {
|
|
20
|
-
return argv.some((arg) => arg === MIGRATE_UNTRACK_CORE_FLAG || arg === `/${MIGRATE_UNTRACK_CORE_FLAG.slice(2)}`);
|
|
21
|
-
}
|
|
22
|
-
export function runMigrate(argv, io) {
|
|
23
|
-
if (argvWantsHelp(argv)) {
|
|
24
|
-
printMigrateHelp(io);
|
|
25
|
-
return 0;
|
|
26
|
-
}
|
|
27
|
-
const args = parseInitArgv(CANONICAL_MIGRATE_ARGV, argv);
|
|
28
|
-
// `migrate --untrack-core` selects the destructive un-track subcommand;
|
|
29
|
-
// bare `migrate` keeps the provenance-stamp behavior below.
|
|
30
|
-
if (hasUntrackCoreFlag(argv)) {
|
|
31
|
-
return runUntrackCoreCli({
|
|
32
|
-
projectDir: args.projectDir,
|
|
33
|
-
jsonOut: args.jsonOut,
|
|
34
|
-
writeOut: io.writeOut,
|
|
35
|
-
writeErr: io.writeErr,
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
// `migrate` reuses `parseInitArgv`, which understands the init/update headless
|
|
39
|
-
// confirmation flags. migrate has no interactive prompts, so acknowledge the
|
|
40
|
-
// flag rather than silently swallowing it (a natural reflex from init/update).
|
|
41
|
-
if (argv.some((arg) => NO_EFFECT_CONFIRMATION_FLAGS.has(arg))) {
|
|
42
|
-
io.writeErr("directive migrate: --yes/--non-interactive has no effect (migrate runs non-interactively and never prompts).\n");
|
|
43
|
-
}
|
|
44
|
-
return runMigrateCli({
|
|
45
|
-
projectDir: args.projectDir,
|
|
46
|
-
jsonOut: args.jsonOut,
|
|
47
|
-
writeOut: io.writeOut,
|
|
48
|
-
writeErr: io.writeErr,
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
//# sourceMappingURL=migrate.js.map
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/** Resolve @deftai/directive package root from a compiled init-cli module URL. */
|
|
2
|
-
export declare function cliPackageRoot(fromModuleUrl?: string): string;
|
|
3
|
-
/** Release artifact basename for the current platform (#11 bundled layout). */
|
|
4
|
-
export declare function releaseArtifactName(platform: NodeJS.Platform, arch: string): string;
|
|
5
|
-
/** Ordered search paths for the bundled deft-install binary. */
|
|
6
|
-
export declare function bundledBinaryCandidates(packageRoot: string, platform: NodeJS.Platform, arch: string): readonly string[];
|
|
7
|
-
export interface ResolveBinaryOptions {
|
|
8
|
-
env?: NodeJS.ProcessEnv;
|
|
9
|
-
platform?: NodeJS.Platform;
|
|
10
|
-
arch?: string;
|
|
11
|
-
packageRoot?: string;
|
|
12
|
-
moduleUrl?: string;
|
|
13
|
-
}
|
|
14
|
-
export type ResolveBinaryResult = {
|
|
15
|
-
ok: true;
|
|
16
|
-
path: string;
|
|
17
|
-
} | {
|
|
18
|
-
ok: false;
|
|
19
|
-
reason: "not-found";
|
|
20
|
-
packageRoot: string;
|
|
21
|
-
platform: NodeJS.Platform;
|
|
22
|
-
arch: string;
|
|
23
|
-
} | {
|
|
24
|
-
ok: false;
|
|
25
|
-
reason: "override-unreadable";
|
|
26
|
-
path: string;
|
|
27
|
-
};
|
|
28
|
-
/** Locate the bundled deft-install binary or an explicit DEFT_INSTALL_BINARY override. */
|
|
29
|
-
export declare function resolveBundledDeftInstallBinaryDetailed(options?: ResolveBinaryOptions): ResolveBinaryResult;
|
|
30
|
-
/** Back-compat helper returning only the resolved path. */
|
|
31
|
-
export declare function resolveBundledDeftInstallBinary(options?: ResolveBinaryOptions): string | null;
|
|
32
|
-
export declare function missingBinaryMessage(verb: "init" | "update", packageRoot: string, platform: NodeJS.Platform, arch: string): string;
|
|
33
|
-
export declare function overrideUnreadableMessage(verb: "init" | "update", path: string): string;
|
|
34
|
-
//# sourceMappingURL=resolve-binary.d.ts.map
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { accessSync, constants as fsConstants } from "node:fs";
|
|
2
|
-
import { dirname, join } from "node:path";
|
|
3
|
-
import { fileURLToPath } from "node:url";
|
|
4
|
-
/** Resolve @deftai/directive package root from a compiled init-cli module URL. */
|
|
5
|
-
export function cliPackageRoot(fromModuleUrl = import.meta.url) {
|
|
6
|
-
return join(dirname(fileURLToPath(fromModuleUrl)), "..", "..");
|
|
7
|
-
}
|
|
8
|
-
/** Release artifact basename for the current platform (#11 bundled layout). */
|
|
9
|
-
export function releaseArtifactName(platform, arch) {
|
|
10
|
-
const normalizedArch = arch === "x64" ? "amd64" : arch === "arm64" ? "arm64" : arch;
|
|
11
|
-
switch (platform) {
|
|
12
|
-
case "win32":
|
|
13
|
-
return `install-windows-${normalizedArch}.exe`;
|
|
14
|
-
case "darwin":
|
|
15
|
-
return `install-macos-${normalizedArch}`;
|
|
16
|
-
case "linux":
|
|
17
|
-
return `install-linux-${normalizedArch}`;
|
|
18
|
-
default:
|
|
19
|
-
return `install-${platform}-${normalizedArch}`;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
/** Ordered search paths for the bundled deft-install binary. */
|
|
23
|
-
export function bundledBinaryCandidates(packageRoot, platform, arch) {
|
|
24
|
-
const artifact = releaseArtifactName(platform, arch);
|
|
25
|
-
const genericName = platform === "win32" ? "deft-install.exe" : "deft-install";
|
|
26
|
-
return [
|
|
27
|
-
join(packageRoot, "vendor", "deft-install", artifact),
|
|
28
|
-
join(packageRoot, "vendor", "deft-install", genericName),
|
|
29
|
-
];
|
|
30
|
-
}
|
|
31
|
-
function accessMode(platform) {
|
|
32
|
-
return platform === "win32" ? fsConstants.R_OK : fsConstants.R_OK | fsConstants.X_OK;
|
|
33
|
-
}
|
|
34
|
-
function isRunnableBinary(path, platform) {
|
|
35
|
-
try {
|
|
36
|
-
accessSync(path, accessMode(platform));
|
|
37
|
-
return true;
|
|
38
|
-
}
|
|
39
|
-
catch {
|
|
40
|
-
return false;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
/** Locate the bundled deft-install binary or an explicit DEFT_INSTALL_BINARY override. */
|
|
44
|
-
export function resolveBundledDeftInstallBinaryDetailed(options = {}) {
|
|
45
|
-
const env = options.env ?? process.env;
|
|
46
|
-
const platform = options.platform ?? process.platform;
|
|
47
|
-
const arch = options.arch ?? process.arch;
|
|
48
|
-
const packageRoot = options.packageRoot ?? cliPackageRoot(options.moduleUrl ?? import.meta.url);
|
|
49
|
-
const override = env.DEFT_INSTALL_BINARY?.trim();
|
|
50
|
-
if (override !== undefined && override.length > 0) {
|
|
51
|
-
if (isRunnableBinary(override, platform)) {
|
|
52
|
-
return { ok: true, path: override };
|
|
53
|
-
}
|
|
54
|
-
return { ok: false, reason: "override-unreadable", path: override };
|
|
55
|
-
}
|
|
56
|
-
for (const candidate of bundledBinaryCandidates(packageRoot, platform, arch)) {
|
|
57
|
-
if (isRunnableBinary(candidate, platform)) {
|
|
58
|
-
return { ok: true, path: candidate };
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
return { ok: false, reason: "not-found", packageRoot, platform, arch };
|
|
62
|
-
}
|
|
63
|
-
/** Back-compat helper returning only the resolved path. */
|
|
64
|
-
export function resolveBundledDeftInstallBinary(options = {}) {
|
|
65
|
-
const resolved = resolveBundledDeftInstallBinaryDetailed(options);
|
|
66
|
-
return resolved.ok ? resolved.path : null;
|
|
67
|
-
}
|
|
68
|
-
export function missingBinaryMessage(verb, packageRoot, platform, arch) {
|
|
69
|
-
const expected = bundledBinaryCandidates(packageRoot, platform, arch)[0];
|
|
70
|
-
return (`directive ${verb}: bundled deft-install binary not found (expected ${expected}).\n` +
|
|
71
|
-
"Download a platform installer from https://github.com/deftai/directive/releases " +
|
|
72
|
-
"or set DEFT_INSTALL_BINARY to the absolute path of deft-install.");
|
|
73
|
-
}
|
|
74
|
-
export function overrideUnreadableMessage(verb, path) {
|
|
75
|
-
return (`directive ${verb}: DEFT_INSTALL_BINARY is set to ${path} but the path is missing or not executable.\n` +
|
|
76
|
-
"Fix the path or download a platform installer from https://github.com/deftai/directive/releases.");
|
|
77
|
-
}
|
|
78
|
-
//# sourceMappingURL=resolve-binary.js.map
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { DispatchIo } from "../dispatch.js";
|
|
2
|
-
import { type ResolveBinaryOptions, resolveBundledDeftInstallBinaryDetailed } from "./resolve-binary.js";
|
|
3
|
-
export interface BinaryRunResult {
|
|
4
|
-
status: number;
|
|
5
|
-
stdout: string;
|
|
6
|
-
stderr: string;
|
|
7
|
-
}
|
|
8
|
-
export type RunBinaryFn = (binary: string, args: readonly string[], cwd: string) => BinaryRunResult;
|
|
9
|
-
/** Safe subprocess capture (#1366): utf-8 text mode with replace semantics. */
|
|
10
|
-
export declare function defaultRunBinary(binary: string, args: readonly string[], cwd: string): BinaryRunResult;
|
|
11
|
-
export interface RunDeftInstallOptions {
|
|
12
|
-
verb: "init" | "update";
|
|
13
|
-
canonicalArgv: readonly string[];
|
|
14
|
-
userArgv?: readonly string[];
|
|
15
|
-
io: DispatchIo;
|
|
16
|
-
cwd?: string;
|
|
17
|
-
resolveBinaryDetailed?: (options?: ResolveBinaryOptions) => ReturnType<typeof resolveBundledDeftInstallBinaryDetailed>;
|
|
18
|
-
resolveBinaryOptions?: ResolveBinaryOptions;
|
|
19
|
-
runBinary?: RunBinaryFn;
|
|
20
|
-
}
|
|
21
|
-
/** Shell out to bundled deft-install with canonical argv and map exit codes. */
|
|
22
|
-
export declare function runDeftInstall(options: RunDeftInstallOptions): number;
|
|
23
|
-
//# sourceMappingURL=run-deft-install.d.ts.map
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { spawnSync } from "node:child_process";
|
|
2
|
-
import { constants as osConstants } from "node:os";
|
|
3
|
-
import { cliPackageRoot, missingBinaryMessage, overrideUnreadableMessage, resolveBundledDeftInstallBinaryDetailed, } from "./resolve-binary.js";
|
|
4
|
-
const SUBPROCESS_MAX_BUFFER = 64 * 1024 * 1024;
|
|
5
|
-
function signalExitCode(signal) {
|
|
6
|
-
const signum = osConstants.signals[signal];
|
|
7
|
-
return 128 + (typeof signum === "number" ? signum : 0);
|
|
8
|
-
}
|
|
9
|
-
/** Safe subprocess capture (#1366): utf-8 text mode with replace semantics. */
|
|
10
|
-
export function defaultRunBinary(binary, args, cwd) {
|
|
11
|
-
const result = spawnSync(binary, [...args], {
|
|
12
|
-
cwd,
|
|
13
|
-
env: process.env,
|
|
14
|
-
encoding: "utf8",
|
|
15
|
-
maxBuffer: SUBPROCESS_MAX_BUFFER,
|
|
16
|
-
stdio: ["ignore", "pipe", "pipe"],
|
|
17
|
-
});
|
|
18
|
-
let status = result.status;
|
|
19
|
-
let stderr = typeof result.stderr === "string" ? result.stderr : "";
|
|
20
|
-
if (status === null) {
|
|
21
|
-
if (result.signal !== null && result.signal !== undefined) {
|
|
22
|
-
status = signalExitCode(result.signal);
|
|
23
|
-
}
|
|
24
|
-
else if (result.error) {
|
|
25
|
-
status = 2;
|
|
26
|
-
if (stderr.trim().length === 0) {
|
|
27
|
-
stderr = result.error.message;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
status = 0;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
return {
|
|
35
|
-
status,
|
|
36
|
-
stdout: typeof result.stdout === "string" ? result.stdout : "",
|
|
37
|
-
stderr,
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
function writeCaptured(text, write) {
|
|
41
|
-
if (text.length === 0)
|
|
42
|
-
return;
|
|
43
|
-
write(text.endsWith("\n") ? text : `${text}\n`);
|
|
44
|
-
}
|
|
45
|
-
/** Shell out to bundled deft-install with canonical argv and map exit codes. */
|
|
46
|
-
export function runDeftInstall(options) {
|
|
47
|
-
const resolveDetailed = options.resolveBinaryDetailed ?? resolveBundledDeftInstallBinaryDetailed;
|
|
48
|
-
const resolveOptions = options.resolveBinaryOptions ?? {};
|
|
49
|
-
const resolved = resolveDetailed(resolveOptions);
|
|
50
|
-
if (!resolved.ok) {
|
|
51
|
-
if (resolved.reason === "override-unreadable") {
|
|
52
|
-
options.io.writeErr(`${overrideUnreadableMessage(options.verb, resolved.path)}\n`);
|
|
53
|
-
return 2;
|
|
54
|
-
}
|
|
55
|
-
const packageRoot = resolved.packageRoot ??
|
|
56
|
-
resolveOptions.packageRoot ??
|
|
57
|
-
cliPackageRoot(resolveOptions.moduleUrl ?? import.meta.url);
|
|
58
|
-
const platform = resolved.platform ?? resolveOptions.platform ?? process.platform;
|
|
59
|
-
const arch = resolved.arch ?? resolveOptions.arch ?? process.arch;
|
|
60
|
-
options.io.writeErr(`${missingBinaryMessage(options.verb, packageRoot, platform, arch)}\n`);
|
|
61
|
-
return 2;
|
|
62
|
-
}
|
|
63
|
-
const args = [...options.canonicalArgv, ...(options.userArgv ?? [])];
|
|
64
|
-
const cwd = options.cwd ?? process.cwd();
|
|
65
|
-
const runBinary = options.runBinary ?? defaultRunBinary;
|
|
66
|
-
const result = runBinary(resolved.path, args, cwd);
|
|
67
|
-
writeCaptured(result.stdout, options.io.writeOut);
|
|
68
|
-
writeCaptured(result.stderr, options.io.writeErr);
|
|
69
|
-
return result.status === 0 ? 0 : result.status;
|
|
70
|
-
}
|
|
71
|
-
//# sourceMappingURL=run-deft-install.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { DispatchIo } from "../dispatch.js";
|
|
2
|
-
/** True when the user argv asked for a classify-only dry-run (`--dry-run`/`--plan`). */
|
|
3
|
-
export declare function isUpdateDryRun(argv: readonly string[]): boolean;
|
|
4
|
-
export declare function runUpdate(argv: readonly string[], io: DispatchIo): Promise<number>;
|
|
5
|
-
//# sourceMappingURL=update.d.ts.map
|
package/dist/init-cli/update.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { parseUpdateArgv, runRefreshDepositCli, UnknownUpdateFlagError, } from "@deftai/directive-core/init-deposit";
|
|
2
|
-
import { refuseIfWslOwnershipBlocked } from "../wsl-ownership-guard.js";
|
|
3
|
-
import { CANONICAL_UPDATE_ARGV, UPDATE_DRY_RUN_FLAGS } from "./constants.js";
|
|
4
|
-
import { argvWantsHelp, printUpdateHelp } from "./help.js";
|
|
5
|
-
/** True when the user argv asked for a classify-only dry-run (`--dry-run`/`--plan`). */
|
|
6
|
-
export function isUpdateDryRun(argv) {
|
|
7
|
-
const flags = UPDATE_DRY_RUN_FLAGS;
|
|
8
|
-
return argv.some((arg) => flags.includes(arg) || arg === "/dry-run" || arg === "/plan");
|
|
9
|
-
}
|
|
10
|
-
export function runUpdate(argv, io) {
|
|
11
|
-
if (argvWantsHelp(argv)) {
|
|
12
|
-
printUpdateHelp(io);
|
|
13
|
-
return Promise.resolve(0);
|
|
14
|
-
}
|
|
15
|
-
try {
|
|
16
|
-
const args = parseUpdateArgv(CANONICAL_UPDATE_ARGV, argv);
|
|
17
|
-
// #1617: live ownership gate before deposit mutation (dry-run exempt).
|
|
18
|
-
if (!isUpdateDryRun(argv)) {
|
|
19
|
-
const blocked = refuseIfWslOwnershipBlocked(args.projectDir, io.writeErr);
|
|
20
|
-
if (blocked !== null)
|
|
21
|
-
return Promise.resolve(blocked);
|
|
22
|
-
}
|
|
23
|
-
return runRefreshDepositCli({
|
|
24
|
-
...args,
|
|
25
|
-
dryRun: isUpdateDryRun(argv),
|
|
26
|
-
writeOut: io.writeOut,
|
|
27
|
-
writeErr: io.writeErr,
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
catch (cause) {
|
|
31
|
-
if (cause instanceof UnknownUpdateFlagError) {
|
|
32
|
-
io.writeErr(`directive update: ${cause.message}\n`);
|
|
33
|
-
return Promise.resolve(2);
|
|
34
|
-
}
|
|
35
|
-
throw cause;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=update.js.map
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Wave 8.5 s7 install/migrate CLI tail — retire-vs-retarget coverage map (#1838).
|
|
3
|
-
* Primary deliverable is duplicated in the PR body for Wave 9 mechanical teardown.
|
|
4
|
-
*/
|
|
5
|
-
export type InstallCliTailClassification = "retire-at-Wave-9" | "retarget";
|
|
6
|
-
export interface InstallCliTailEntry {
|
|
7
|
-
readonly pythonTest: string;
|
|
8
|
-
readonly classification: InstallCliTailClassification;
|
|
9
|
-
readonly rationale: string;
|
|
10
|
-
readonly vitestSpec?: string;
|
|
11
|
-
}
|
|
12
|
-
/** One-line rationale per in-scope tests/cli file (Bucket C audit). */
|
|
13
|
-
export declare const INSTALL_CLI_TAIL_COVERAGE_MAP: readonly InstallCliTailEntry[];
|
|
14
|
-
//# sourceMappingURL=coverage-map.d.ts.map
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
/** One-line rationale per in-scope tests/cli file (Bucket C audit). */
|
|
2
|
-
export const INSTALL_CLI_TAIL_COVERAGE_MAP = [
|
|
3
|
-
{
|
|
4
|
-
pythonTest: "tests/cli/test_migrate_vbrief.py",
|
|
5
|
-
classification: "retire-at-Wave-9",
|
|
6
|
-
rationale: "Exercises scripts/migrate_vbrief.py pre-v0.20 migrator — accepted non-port deleted in #1731.",
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
pythonTest: "tests/cli/test_migrate_vbrief_canonical_refs.py",
|
|
10
|
-
classification: "retire-at-Wave-9",
|
|
11
|
-
rationale: "End-to-end migrate_vbrief references/narrative clamp regressions — accepted non-port migrator.",
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
pythonTest: "tests/cli/test_migrate_vbrief_fixtures.py",
|
|
15
|
-
classification: "retire-at-Wave-9",
|
|
16
|
-
rationale: "Fixture-driven migrate() routing matrix — accepted non-port pre-cutover migrator tooling.",
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
pythonTest: "tests/cli/test_migrate_vbrief_rc4.py",
|
|
20
|
-
classification: "retire-at-Wave-9",
|
|
21
|
-
rationale: "RC4 migrator rollback/reconciliation — accepted non-port migrate_* family (#1731).",
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
pythonTest: "tests/cli/test_migrate_preflight.py",
|
|
25
|
-
classification: "retarget",
|
|
26
|
-
rationale: "scripts/migrate_preflight.py agent-side migrate:vbrief gate — retargeted to deft-ts migrate-preflight on consumer task path (#2022 Phase 2).",
|
|
27
|
-
vitestSpec: "packages/cli/src/migrate-task-surface.test.ts",
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
pythonTest: "tests/cli/test_precutover_guard.py",
|
|
31
|
-
classification: "retire-at-Wave-9",
|
|
32
|
-
rationale: "Pre-cutover detection and legacy placeholder checks via _precutover — accepted non-port.",
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
pythonTest: "tests/cli/test_cmd_agents_refresh.py",
|
|
36
|
-
classification: "retire-at-Wave-9",
|
|
37
|
-
rationale: "Python run cmd_agents_refresh upgrade-gate companion — no deft-ts verb; retires with legacy run.",
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
pythonTest: "tests/cli/test_cmd_check_updates.py",
|
|
41
|
-
classification: "retarget",
|
|
42
|
-
rationale: "Python run cmd_check_updates remote version probe — retargeted to deft-ts framework-check-updates on consumer task path (#2069).",
|
|
43
|
-
vitestSpec: "packages/core/src/check-updates/index.test.ts, packages/cli/src/framework-check-updates-task-surface.test.ts",
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
pythonTest: "tests/cli/test_cmd_doctor.py",
|
|
47
|
-
classification: "retarget",
|
|
48
|
-
rationale: "cmd_doctor survives as deft-ts doctor verb (packages/cli/src/doctor.ts); exit-code parity via dispatch.",
|
|
49
|
-
vitestSpec: "packages/cli/src/install-cli/retarget-dispatch.test.ts",
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
pythonTest: "tests/cli/test_cmd_gate.py",
|
|
53
|
-
classification: "retire-at-Wave-9",
|
|
54
|
-
rationale: "Python run cmd_gate universal upgrade gate — no deft-ts verb; retires with legacy run module.",
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
pythonTest: "tests/cli/test_cmd_spec.py",
|
|
58
|
-
classification: "retire-at-Wave-9",
|
|
59
|
-
rationale: "Python run cmd_spec interactive spec generator — no deft-ts verb; retires with legacy run.",
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
pythonTest: "tests/cli/test_upgrade_gate.py",
|
|
63
|
-
classification: "retire-at-Wave-9",
|
|
64
|
-
rationale: "Python run upgrade gate and cmd_project lifecycle scaffolding — legacy run; no TS equivalent.",
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
pythonTest: "tests/cli/test_upgrade_gate_remote_drift.py",
|
|
68
|
-
classification: "retire-at-Wave-9",
|
|
69
|
-
rationale: "Python run _check_upgrade_gate remote-drift integration — legacy run upgrade path.",
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
pythonTest: "tests/cli/test_run_bat_path.py",
|
|
73
|
-
classification: "retire-at-Wave-9",
|
|
74
|
-
rationale: "Windows run.bat packaging shim self-relative resolution — build/packaging accepted non-port.",
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
pythonTest: "tests/cli/test_run_version.py",
|
|
78
|
-
classification: "retire-at-Wave-9",
|
|
79
|
-
rationale: "Python run VERSION resolution chain — legacy run entrypoint retires with scripts/*.py in #1731.",
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
pythonTest: "tests/cli/test_setup_ghx.py",
|
|
83
|
-
classification: "retire-at-Wave-9",
|
|
84
|
-
rationale: "scripts/setup_ghx.py consent-gated installer helper — build/packaging accepted non-port (#1731).",
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
pythonTest: "tests/cli/test_safe_subprocess.py",
|
|
88
|
-
classification: "retire-at-Wave-9",
|
|
89
|
-
rationale: "scripts/_safe_subprocess.py UTF-8 capture shim — Python runtime accepted non-port (#1731).",
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
pythonTest: "tests/cli/test_task_scripts.py",
|
|
93
|
-
classification: "retarget",
|
|
94
|
-
rationale: "TestToolchainCheck maps to deft-ts toolchain-check; remainder covers legacy Python task scripts without TS verbs.",
|
|
95
|
-
vitestSpec: "packages/cli/src/install-cli/retarget-dispatch.test.ts",
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
pythonTest: "tests/cli/test_ts_check_lane.py",
|
|
99
|
-
classification: "retire-at-Wave-9",
|
|
100
|
-
rationale: "scripts/ts_check_lane.py Python meta-guard for pnpm lane — retires once Python CI lane is removed.",
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
pythonTest: "tests/cli/test_vendored_install_metadata.py",
|
|
104
|
-
classification: "retire-at-Wave-9",
|
|
105
|
-
rationale: "Vendored Go-install metadata via Python run/doctor/resolve_version — installer deposit accepted non-port.",
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
pythonTest: "tests/cli/test_remote_probe_throttle.py",
|
|
109
|
-
classification: "retire-at-Wave-9",
|
|
110
|
-
rationale: "Python run remote-probe throttle state for #801 — legacy run module; no deft-ts verb.",
|
|
111
|
-
},
|
|
112
|
-
];
|
|
113
|
-
//# sourceMappingURL=coverage-map.js.map
|