@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/doctor.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
export interface DepositFileSetHygieneResult {
|
|
3
|
-
readonly absent: readonly string[];
|
|
4
|
-
readonly contentRoot: string | null;
|
|
5
|
-
readonly walkRoot: string | null;
|
|
6
|
-
readonly installedRoot: string | null;
|
|
7
|
-
readonly skipped: boolean;
|
|
8
|
-
}
|
|
9
|
-
export interface EvaluateDepositFileSetOptions {
|
|
10
|
-
readonly contentRoot?: string;
|
|
11
|
-
readonly walkRoot?: string | null;
|
|
12
|
-
readonly installedRoot?: string | null;
|
|
13
|
-
}
|
|
14
|
-
export declare function sameResolvedPath(left: string, right: string): boolean;
|
|
15
|
-
/** Compare `.deft/core/` against `@deftai/directive-content` (#2804 / #4706). */
|
|
16
|
-
export declare function evaluateDepositFileSetHygiene(projectRoot: string, options?: EvaluateDepositFileSetOptions): DepositFileSetHygieneResult;
|
|
17
|
-
export declare function renderDepositFileSetHygieneLine(projectRoot: string, result?: DepositFileSetHygieneResult): string;
|
|
18
|
-
export declare function run(argv: string[]): Promise<number>;
|
|
19
|
-
//# sourceMappingURL=doctor.d.ts.map
|
package/dist/doctor.js
DELETED
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { existsSync, realpathSync } from "node:fs";
|
|
3
|
-
import { join, resolve } from "node:path";
|
|
4
|
-
import { fileURLToPath } from "node:url";
|
|
5
|
-
import { resolveContentPackageRoot } from "@deftai/directive-core/dist/content-root.js";
|
|
6
|
-
import { resolveInstalledContentRoot } from "@deftai/directive-core/dist/deposit/resolve-content.js";
|
|
7
|
-
import { setDoctorAgentsTemplateRoot } from "@deftai/directive-core/dist/doctor/agents-md.js";
|
|
8
|
-
import { parseDoctorFlags } from "@deftai/directive-core/dist/doctor/flags.js";
|
|
9
|
-
import { cmdDoctor } from "@deftai/directive-core/dist/doctor/main.js";
|
|
10
|
-
import { findPackageAbsentDepositPathsSync } from "@deftai/directive-core/dist/init-deposit/hygiene.js";
|
|
11
|
-
import { evaluateInstalledDepositClosure, renderDeclaredDepositClosureLine, } from "@deftai/directive-core/dist/validate-content/deposit-required.js";
|
|
12
|
-
import { renderPrecutoverLine } from "@deftai/directive-core/dist/vbrief-validate/precutover.js";
|
|
13
|
-
import { renderStaleHeaderLine, renderXbriefMigrationLine, } from "@deftai/directive-core/xbrief-migrate";
|
|
14
|
-
export function sameResolvedPath(left, right) {
|
|
15
|
-
return canonicalizeExistingPath(left) === canonicalizeExistingPath(right);
|
|
16
|
-
}
|
|
17
|
-
function canonicalizeExistingPath(path) {
|
|
18
|
-
let canonical = resolve(path);
|
|
19
|
-
try {
|
|
20
|
-
if (existsSync(canonical))
|
|
21
|
-
canonical = realpathSync(canonical);
|
|
22
|
-
}
|
|
23
|
-
catch {
|
|
24
|
-
// keep resolve() fallback
|
|
25
|
-
}
|
|
26
|
-
return process.platform === "win32" ? canonical.toLowerCase() : canonical;
|
|
27
|
-
}
|
|
28
|
-
function rootsDiverge(walkRoot, installedRoot) {
|
|
29
|
-
return walkRoot !== null && installedRoot !== null && !sameResolvedPath(walkRoot, installedRoot);
|
|
30
|
-
}
|
|
31
|
-
/** Compare `.deft/core/` against `@deftai/directive-content` (#2804 / #4706). */
|
|
32
|
-
export function evaluateDepositFileSetHygiene(projectRoot, options = {}) {
|
|
33
|
-
const deftDir = join(projectRoot, ".deft", "core");
|
|
34
|
-
const walkRoot = options.walkRoot !== undefined ? options.walkRoot : resolveContentPackageRoot(projectRoot);
|
|
35
|
-
const installedRoot = options.installedRoot ?? null;
|
|
36
|
-
if (!existsSync(deftDir)) {
|
|
37
|
-
return { absent: [], contentRoot: null, walkRoot, installedRoot, skipped: true };
|
|
38
|
-
}
|
|
39
|
-
const contentRoot = options.contentRoot ?? installedRoot ?? walkRoot;
|
|
40
|
-
if (contentRoot === null || !existsSync(contentRoot)) {
|
|
41
|
-
return { absent: [], contentRoot: null, walkRoot, installedRoot, skipped: true };
|
|
42
|
-
}
|
|
43
|
-
return {
|
|
44
|
-
absent: findPackageAbsentDepositPathsSync(deftDir, contentRoot),
|
|
45
|
-
contentRoot,
|
|
46
|
-
walkRoot,
|
|
47
|
-
installedRoot,
|
|
48
|
-
skipped: false,
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
function hygieneRootDivergenceNote(result) {
|
|
52
|
-
if (!rootsDiverge(result.walkRoot, result.installedRoot ?? result.contentRoot)) {
|
|
53
|
-
return "";
|
|
54
|
-
}
|
|
55
|
-
const compared = result.contentRoot ?? "";
|
|
56
|
-
const walk = result.walkRoot ?? "";
|
|
57
|
-
const installed = result.installedRoot ?? compared;
|
|
58
|
-
return ` Compared content root: ${compared}. Project walk-root: ${walk}. Engine content root: ${installed}.`;
|
|
59
|
-
}
|
|
60
|
-
function namesUpdatePruneRecovery(result) {
|
|
61
|
-
const compared = result.contentRoot;
|
|
62
|
-
const walkRoot = result.walkRoot;
|
|
63
|
-
if (compared === null || walkRoot === null) {
|
|
64
|
-
return true;
|
|
65
|
-
}
|
|
66
|
-
if (!rootsDiverge(walkRoot, result.installedRoot)) {
|
|
67
|
-
return true;
|
|
68
|
-
}
|
|
69
|
-
return !sameResolvedPath(compared, walkRoot);
|
|
70
|
-
}
|
|
71
|
-
export function renderDepositFileSetHygieneLine(projectRoot, result = evaluateDepositFileSetHygiene(projectRoot)) {
|
|
72
|
-
const deftDir = join(projectRoot, ".deft", "core");
|
|
73
|
-
if (!existsSync(deftDir)) {
|
|
74
|
-
return "Deposit hygiene: none -- no .deft/core deposit.";
|
|
75
|
-
}
|
|
76
|
-
if (result.skipped) {
|
|
77
|
-
return ("Deposit hygiene: skip -- @deftai/directive-content is not installed " +
|
|
78
|
-
"(cannot compare deposit file-set).");
|
|
79
|
-
}
|
|
80
|
-
if (result.absent.length === 0) {
|
|
81
|
-
return "Deposit hygiene: none -- .deft/core file-set matches @deftai/directive-content.";
|
|
82
|
-
}
|
|
83
|
-
const sample = result.absent.slice(0, 5).join(", ");
|
|
84
|
-
const suffix = result.absent.length > 5 ? ` (+${result.absent.length - 5} more)` : "";
|
|
85
|
-
const divergence = hygieneRootDivergenceNote(result);
|
|
86
|
-
const recovery = namesUpdatePruneRecovery(result)
|
|
87
|
-
? "Run `directive update` to auto-prune these stale deposit files (#2804)."
|
|
88
|
-
: "Do not run `directive update` to prune extras versus the project walk-root; that tree is not the engine content update reconciled (#4706). Leftover pin reconstitution is #4710.";
|
|
89
|
-
return (`Deposit hygiene: fail -- ${result.absent.length} package-absent file(s) in .deft/core ` +
|
|
90
|
-
`(not shipped by @deftai/directive-content). Examples: ${sample}${suffix}.${divergence} ` +
|
|
91
|
-
recovery);
|
|
92
|
-
}
|
|
93
|
-
async function resolveEngineContentRoot() {
|
|
94
|
-
try {
|
|
95
|
-
const installed = await resolveInstalledContentRoot();
|
|
96
|
-
return typeof installed === "string" && installed.length > 0 ? installed : null;
|
|
97
|
-
}
|
|
98
|
-
catch {
|
|
99
|
-
return null;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
export async function run(argv) {
|
|
103
|
-
// Human advisory lines stay off --json so the machine report stays one object.
|
|
104
|
-
// Deposit hygiene is still passed into cmdDoctor, including --json (#4812).
|
|
105
|
-
const flags = parseDoctorFlags(argv);
|
|
106
|
-
const installedRoot = await resolveEngineContentRoot();
|
|
107
|
-
if (installedRoot !== null) {
|
|
108
|
-
setDoctorAgentsTemplateRoot(installedRoot);
|
|
109
|
-
}
|
|
110
|
-
try {
|
|
111
|
-
if (flags.help || flags.unknown.length > 0) {
|
|
112
|
-
return cmdDoctor(argv);
|
|
113
|
-
}
|
|
114
|
-
const projectRoot = flags.projectRoot ?? process.cwd();
|
|
115
|
-
const walkRoot = resolveContentPackageRoot(projectRoot);
|
|
116
|
-
const depositResult = evaluateDepositFileSetHygiene(projectRoot, {
|
|
117
|
-
contentRoot: installedRoot ?? undefined,
|
|
118
|
-
walkRoot,
|
|
119
|
-
installedRoot,
|
|
120
|
-
});
|
|
121
|
-
const closure = evaluateInstalledDepositClosure(projectRoot);
|
|
122
|
-
// Package-absent files stay diagnostic unless --full. A real hygiene failure
|
|
123
|
-
// (full file-set or declared closure) is the one status cmdDoctor shares.
|
|
124
|
-
const fileSetFailed = flags.full && !depositResult.skipped && depositResult.absent.length > 0;
|
|
125
|
-
const closureFailed = flags.full && !closure.skipped && (closure.missing.length > 0 || closure.error !== null);
|
|
126
|
-
const line = renderDepositFileSetHygieneLine(projectRoot, depositResult);
|
|
127
|
-
if (!flags.json) {
|
|
128
|
-
process.stdout.write(`${renderPrecutoverLine(projectRoot)}\n`);
|
|
129
|
-
process.stdout.write(`${renderXbriefMigrationLine(projectRoot)}\n`);
|
|
130
|
-
process.stdout.write(`${renderStaleHeaderLine(projectRoot)}\n`);
|
|
131
|
-
process.stdout.write(`${line}\n`);
|
|
132
|
-
process.stdout.write(`${renderDeclaredDepositClosureLine(closure)}\n`);
|
|
133
|
-
}
|
|
134
|
-
const closureLine = renderDeclaredDepositClosureLine(closure);
|
|
135
|
-
return cmdDoctor(argv, {
|
|
136
|
-
depositHygiene: {
|
|
137
|
-
failed: fileSetFailed || closureFailed,
|
|
138
|
-
absent: depositResult.absent,
|
|
139
|
-
line: fileSetFailed ? line : closureFailed ? closureLine : line,
|
|
140
|
-
},
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
finally {
|
|
144
|
-
setDoctorAgentsTemplateRoot(undefined);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
if (process.argv[1] !== undefined && fileURLToPath(import.meta.url) === process.argv[1]) {
|
|
148
|
-
void run(process.argv.slice(2)).then((code) => {
|
|
149
|
-
process.exit(code);
|
|
150
|
-
}, (err) => {
|
|
151
|
-
process.stderr.write(`${err instanceof Error ? (err.stack ?? err.message) : String(err)}\n`);
|
|
152
|
-
process.exit(1);
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
//# sourceMappingURL=doctor.js.map
|
package/dist/entrypoint.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* True when this module is the process entrypoint, including npm bin symlinks.
|
|
3
|
-
* Node passes the symlink path in argv[1]; compare via realpath on both sides.
|
|
4
|
-
*/
|
|
5
|
-
export declare function isDirectEntrypoint(moduleUrl: string | URL): boolean;
|
|
6
|
-
//# sourceMappingURL=entrypoint.d.ts.map
|
package/dist/entrypoint.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { realpathSync } from "node:fs";
|
|
2
|
-
import { fileURLToPath } from "node:url";
|
|
3
|
-
/**
|
|
4
|
-
* True when this module is the process entrypoint, including npm bin symlinks.
|
|
5
|
-
* Node passes the symlink path in argv[1]; compare via realpath on both sides.
|
|
6
|
-
*/
|
|
7
|
-
export function isDirectEntrypoint(moduleUrl) {
|
|
8
|
-
const argv1 = process.argv[1];
|
|
9
|
-
if (argv1 === undefined)
|
|
10
|
-
return false;
|
|
11
|
-
try {
|
|
12
|
-
const modulePath = fileURLToPath(moduleUrl);
|
|
13
|
-
return realpathSync(argv1) === realpathSync(modulePath);
|
|
14
|
-
}
|
|
15
|
-
catch {
|
|
16
|
-
return false;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=entrypoint.js.map
|
package/dist/escalation-cli.d.ts
DELETED
package/dist/escalation-cli.js
DELETED
|
@@ -1,301 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Escalation CLI (#518 slim / #2948 Wave 5): typed queue under .deft/escalations/.
|
|
4
|
-
*
|
|
5
|
-
* deft escalation:file -- --type cmd_approval --title "…"
|
|
6
|
-
* deft escalation:list [--open] [--type <type>] [--format json]
|
|
7
|
-
* deft escalation:resolve -- <id> --decision approved|denied|answered|dismissed
|
|
8
|
-
* deft escalation:batch-approve [--ids a,b] [--include-dangerous]
|
|
9
|
-
*/
|
|
10
|
-
import { batchApproveEscalations, ESCALATION_TYPES, fileEscalation, isEscalationType, listEscalationsFiltered, resolveEscalation, } from "@deftai/directive-core/escalation";
|
|
11
|
-
function parseArgv(argv) {
|
|
12
|
-
const base = {
|
|
13
|
-
cmd: "list",
|
|
14
|
-
projectRoot: process.cwd(),
|
|
15
|
-
type: null,
|
|
16
|
-
title: null,
|
|
17
|
-
body: null,
|
|
18
|
-
agentId: "agent",
|
|
19
|
-
contextRefs: [],
|
|
20
|
-
slaHours: null,
|
|
21
|
-
dangerous: false,
|
|
22
|
-
id: null,
|
|
23
|
-
ids: [],
|
|
24
|
-
decision: null,
|
|
25
|
-
actor: "operator",
|
|
26
|
-
note: null,
|
|
27
|
-
answer: null,
|
|
28
|
-
openOnly: false,
|
|
29
|
-
includeDangerous: false,
|
|
30
|
-
format: "text",
|
|
31
|
-
};
|
|
32
|
-
const args = [...argv];
|
|
33
|
-
while (args[0] === "--")
|
|
34
|
-
args.shift();
|
|
35
|
-
if (args.length > 0 && !args[0]?.startsWith("-")) {
|
|
36
|
-
const cmd = args.shift();
|
|
37
|
-
if (cmd === "file" || cmd === "list" || cmd === "resolve" || cmd === "batch-approve") {
|
|
38
|
-
base.cmd = cmd;
|
|
39
|
-
}
|
|
40
|
-
else if (cmd.startsWith("esc-")) {
|
|
41
|
-
base.cmd = "resolve";
|
|
42
|
-
base.id = cmd;
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
return { ...base, error: `unknown escalation subcommand: ${cmd}` };
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
while (args[0] === "--")
|
|
49
|
-
args.shift();
|
|
50
|
-
for (let i = 0; i < args.length; i++) {
|
|
51
|
-
const a = args[i];
|
|
52
|
-
if (a === undefined)
|
|
53
|
-
break;
|
|
54
|
-
if (a === "--project-root" || a === "--projectRoot") {
|
|
55
|
-
base.projectRoot = args[++i] ?? base.projectRoot;
|
|
56
|
-
continue;
|
|
57
|
-
}
|
|
58
|
-
if (a === "--type") {
|
|
59
|
-
base.type = args[++i] ?? null;
|
|
60
|
-
continue;
|
|
61
|
-
}
|
|
62
|
-
if (a === "--title") {
|
|
63
|
-
base.title = args[++i] ?? null;
|
|
64
|
-
continue;
|
|
65
|
-
}
|
|
66
|
-
if (a === "--body") {
|
|
67
|
-
base.body = args[++i] ?? null;
|
|
68
|
-
continue;
|
|
69
|
-
}
|
|
70
|
-
if (a === "--agent" || a === "--agent-id" || a === "--agentId") {
|
|
71
|
-
base.agentId = args[++i] ?? base.agentId;
|
|
72
|
-
continue;
|
|
73
|
-
}
|
|
74
|
-
if (a === "--context" || a === "--context-refs" || a === "--contextRefs") {
|
|
75
|
-
const raw = args[++i] ?? "";
|
|
76
|
-
base.contextRefs = raw
|
|
77
|
-
.split(/[,\s]+/)
|
|
78
|
-
.map((s) => s.trim())
|
|
79
|
-
.filter((s) => s.length > 0);
|
|
80
|
-
continue;
|
|
81
|
-
}
|
|
82
|
-
if (a === "--sla-hours" || a === "--slaHours") {
|
|
83
|
-
const n = Number(args[++i] ?? "");
|
|
84
|
-
base.slaHours = Number.isFinite(n) ? n : null;
|
|
85
|
-
continue;
|
|
86
|
-
}
|
|
87
|
-
if (a === "--dangerous") {
|
|
88
|
-
base.dangerous = true;
|
|
89
|
-
continue;
|
|
90
|
-
}
|
|
91
|
-
if (a === "--id") {
|
|
92
|
-
base.id = args[++i] ?? null;
|
|
93
|
-
continue;
|
|
94
|
-
}
|
|
95
|
-
if (a === "--ids") {
|
|
96
|
-
const raw = args[++i] ?? "";
|
|
97
|
-
base.ids = raw
|
|
98
|
-
.split(/[,\s]+/)
|
|
99
|
-
.map((s) => s.trim())
|
|
100
|
-
.filter((s) => s.length > 0);
|
|
101
|
-
continue;
|
|
102
|
-
}
|
|
103
|
-
if (a === "--decision") {
|
|
104
|
-
base.decision = args[++i] ?? null;
|
|
105
|
-
continue;
|
|
106
|
-
}
|
|
107
|
-
if (a === "--actor") {
|
|
108
|
-
base.actor = args[++i] ?? base.actor;
|
|
109
|
-
continue;
|
|
110
|
-
}
|
|
111
|
-
if (a === "--note") {
|
|
112
|
-
base.note = args[++i] ?? null;
|
|
113
|
-
continue;
|
|
114
|
-
}
|
|
115
|
-
if (a === "--answer") {
|
|
116
|
-
base.answer = args[++i] ?? null;
|
|
117
|
-
continue;
|
|
118
|
-
}
|
|
119
|
-
if (a === "--open") {
|
|
120
|
-
base.openOnly = true;
|
|
121
|
-
continue;
|
|
122
|
-
}
|
|
123
|
-
if (a === "--include-dangerous") {
|
|
124
|
-
base.includeDangerous = true;
|
|
125
|
-
continue;
|
|
126
|
-
}
|
|
127
|
-
if (a === "--format") {
|
|
128
|
-
const fmt = (args[++i] ?? "text").toLowerCase();
|
|
129
|
-
base.format = fmt === "json" ? "json" : "text";
|
|
130
|
-
continue;
|
|
131
|
-
}
|
|
132
|
-
if (!a.startsWith("-") && base.cmd === "resolve" && base.id === null) {
|
|
133
|
-
base.id = a;
|
|
134
|
-
continue;
|
|
135
|
-
}
|
|
136
|
-
if (a === "--help" || a === "-h") {
|
|
137
|
-
return { ...base, error: "help" };
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
return base;
|
|
141
|
-
}
|
|
142
|
-
function helpText() {
|
|
143
|
-
return [
|
|
144
|
-
"Usage:",
|
|
145
|
-
" deft escalation:file -- --type <type> --title <text> [--body <text>] [--agent <id>]",
|
|
146
|
-
" [--context refs…] [--sla-hours N] [--dangerous] [--format json]",
|
|
147
|
-
" deft escalation:list [--open] [--type <type>] [--format json]",
|
|
148
|
-
" deft escalation:resolve -- <id> --decision approved|denied|answered|dismissed",
|
|
149
|
-
" [--note <text>] [--answer <text>] [--actor <name>]",
|
|
150
|
-
" deft escalation:batch-approve [--ids a,b] [--include-dangerous] [--note <text>]",
|
|
151
|
-
"",
|
|
152
|
-
`Types: ${ESCALATION_TYPES.join(", ")}`,
|
|
153
|
-
"Bulk batch-approve is limited to cmd_approval + question (non-dangerous by default).",
|
|
154
|
-
"design_decision / approval / resource / external require individual resolve.",
|
|
155
|
-
"Store: .deft/escalations/<id>.json Contract: content/contracts/escalation.md",
|
|
156
|
-
"Compose gated actions with deft authz:grant after approval (Wave 1 grants).",
|
|
157
|
-
].join("\n");
|
|
158
|
-
}
|
|
159
|
-
export function main(argv = process.argv.slice(2)) {
|
|
160
|
-
const args = parseArgv(argv);
|
|
161
|
-
if (args.error === "help") {
|
|
162
|
-
process.stdout.write(`${helpText()}\n`);
|
|
163
|
-
return 0;
|
|
164
|
-
}
|
|
165
|
-
if (args.error !== undefined) {
|
|
166
|
-
process.stderr.write(`escalation: ${args.error}\n`);
|
|
167
|
-
process.stderr.write(`${helpText()}\n`);
|
|
168
|
-
return 2;
|
|
169
|
-
}
|
|
170
|
-
try {
|
|
171
|
-
switch (args.cmd) {
|
|
172
|
-
case "file": {
|
|
173
|
-
if (args.type === null || args.type.trim().length === 0) {
|
|
174
|
-
process.stderr.write("escalation:file requires --type <type>\n");
|
|
175
|
-
return 2;
|
|
176
|
-
}
|
|
177
|
-
if (args.title === null || args.title.trim().length === 0) {
|
|
178
|
-
process.stderr.write("escalation:file requires --title <text>\n");
|
|
179
|
-
return 2;
|
|
180
|
-
}
|
|
181
|
-
const event = fileEscalation({
|
|
182
|
-
projectRoot: args.projectRoot,
|
|
183
|
-
type: args.type,
|
|
184
|
-
title: args.title,
|
|
185
|
-
body: args.body ?? undefined,
|
|
186
|
-
agentId: args.agentId,
|
|
187
|
-
contextRefs: args.contextRefs,
|
|
188
|
-
slaHours: args.slaHours ?? undefined,
|
|
189
|
-
dangerous: args.dangerous,
|
|
190
|
-
id: args.id ?? undefined,
|
|
191
|
-
});
|
|
192
|
-
if (args.format === "json") {
|
|
193
|
-
process.stdout.write(`${JSON.stringify(event, null, 2)}\n`);
|
|
194
|
-
}
|
|
195
|
-
else {
|
|
196
|
-
process.stdout.write(`✓ escalation filed id=${event.id} type=${event.type} status=${event.status}` +
|
|
197
|
-
`${event.dangerous ? " dangerous=true" : ""}\n`);
|
|
198
|
-
process.stdout.write(` title=${event.title}\n`);
|
|
199
|
-
process.stdout.write(` store=.deft/escalations/${event.id}.json\n`);
|
|
200
|
-
}
|
|
201
|
-
return 0;
|
|
202
|
-
}
|
|
203
|
-
case "list": {
|
|
204
|
-
let typeFilter;
|
|
205
|
-
if (args.type !== null && args.type.trim().length > 0) {
|
|
206
|
-
if (!isEscalationType(args.type.trim().toLowerCase())) {
|
|
207
|
-
process.stderr.write(`escalation:list unknown --type '${args.type}'; expected: ${ESCALATION_TYPES.join(", ")}\n`);
|
|
208
|
-
return 2;
|
|
209
|
-
}
|
|
210
|
-
typeFilter = args.type.trim().toLowerCase();
|
|
211
|
-
}
|
|
212
|
-
const items = listEscalationsFiltered(args.projectRoot, {
|
|
213
|
-
openOnly: args.openOnly,
|
|
214
|
-
type: typeFilter,
|
|
215
|
-
});
|
|
216
|
-
if (args.format === "json") {
|
|
217
|
-
process.stdout.write(`${JSON.stringify(items, null, 2)}\n`);
|
|
218
|
-
return 0;
|
|
219
|
-
}
|
|
220
|
-
if (items.length === 0) {
|
|
221
|
-
process.stdout.write(args.openOnly ? "No open escalations.\n" : "No escalations on disk.\n");
|
|
222
|
-
return 0;
|
|
223
|
-
}
|
|
224
|
-
process.stdout.write(`Escalations (${items.length}):\n`);
|
|
225
|
-
for (const e of items) {
|
|
226
|
-
const dang = e.dangerous ? " !dangerous" : "";
|
|
227
|
-
process.stdout.write(` - ${e.id} [${e.status}] type=${e.type}${dang} agent=${e.agentId} sla=${e.slaHours}h\n`);
|
|
228
|
-
process.stdout.write(` ${e.title}\n`);
|
|
229
|
-
if (e.resolution) {
|
|
230
|
-
process.stdout.write(` → ${e.resolution.decision} by ${e.resolution.resolvedBy} @ ${e.resolution.resolvedAt}\n`);
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
return 0;
|
|
234
|
-
}
|
|
235
|
-
case "resolve": {
|
|
236
|
-
if (args.id === null || args.id.trim().length === 0) {
|
|
237
|
-
process.stderr.write("escalation:resolve requires <id>\n");
|
|
238
|
-
return 2;
|
|
239
|
-
}
|
|
240
|
-
if (args.decision === null || args.decision.trim().length === 0) {
|
|
241
|
-
process.stderr.write("escalation:resolve requires --decision approved|denied|answered|dismissed\n");
|
|
242
|
-
return 2;
|
|
243
|
-
}
|
|
244
|
-
const result = resolveEscalation({
|
|
245
|
-
projectRoot: args.projectRoot,
|
|
246
|
-
id: args.id,
|
|
247
|
-
decision: args.decision,
|
|
248
|
-
actor: args.actor,
|
|
249
|
-
note: args.note,
|
|
250
|
-
answer: args.answer,
|
|
251
|
-
});
|
|
252
|
-
if (!result.ok) {
|
|
253
|
-
process.stderr.write(`escalation: ${result.message}\n`);
|
|
254
|
-
return result.code === "not-found" ? 1 : 2;
|
|
255
|
-
}
|
|
256
|
-
if (args.format === "json") {
|
|
257
|
-
process.stdout.write(`${JSON.stringify(result.event, null, 2)}\n`);
|
|
258
|
-
}
|
|
259
|
-
else {
|
|
260
|
-
process.stdout.write(`✓ resolved id=${result.event.id} decision=${result.event.resolution?.decision}\n`);
|
|
261
|
-
process.stdout.write(" For gated product actions, mint a Wave 1 grant: deft authz:grant …\n");
|
|
262
|
-
}
|
|
263
|
-
return 0;
|
|
264
|
-
}
|
|
265
|
-
case "batch-approve": {
|
|
266
|
-
const batch = batchApproveEscalations({
|
|
267
|
-
projectRoot: args.projectRoot,
|
|
268
|
-
ids: args.ids.length > 0 ? args.ids : undefined,
|
|
269
|
-
actor: args.actor,
|
|
270
|
-
note: args.note,
|
|
271
|
-
includeDangerous: args.includeDangerous,
|
|
272
|
-
});
|
|
273
|
-
if (args.format === "json") {
|
|
274
|
-
process.stdout.write(`${JSON.stringify(batch, null, 2)}\n`);
|
|
275
|
-
}
|
|
276
|
-
else {
|
|
277
|
-
process.stdout.write(`✓ batch-approve approved=${batch.approved.length} skipped=${batch.skipped.length}\n`);
|
|
278
|
-
for (const e of batch.approved) {
|
|
279
|
-
process.stdout.write(` + ${e.id} type=${e.type}\n`);
|
|
280
|
-
}
|
|
281
|
-
for (const s of batch.skipped) {
|
|
282
|
-
process.stdout.write(` - skip ${s.id}: ${s.reason}\n`);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
return 0;
|
|
286
|
-
}
|
|
287
|
-
default:
|
|
288
|
-
process.stderr.write(`${helpText()}\n`);
|
|
289
|
-
return 2;
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
catch (err) {
|
|
293
|
-
process.stderr.write(`escalation: ${String(err)}\n`);
|
|
294
|
-
return 1;
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
export default main;
|
|
298
|
-
if (import.meta.url === `file://${process.argv[1]?.replace(/\\/g, "/")}`) {
|
|
299
|
-
process.exitCode = main();
|
|
300
|
-
}
|
|
301
|
-
//# sourceMappingURL=escalation-cli.js.map
|
package/dist/eval-health.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
interface ParsedArgs {
|
|
3
|
-
projectRoot: string;
|
|
4
|
-
json: boolean;
|
|
5
|
-
noPersist: boolean;
|
|
6
|
-
error?: string;
|
|
7
|
-
}
|
|
8
|
-
/** Parse eval-health CLI args. */
|
|
9
|
-
export declare function parseArgs(argv: string[]): ParsedArgs;
|
|
10
|
-
/** Run eval:health and return the process exit code. */
|
|
11
|
-
export declare function run(argv: string[]): number;
|
|
12
|
-
export {};
|
|
13
|
-
//# sourceMappingURL=eval-health.d.ts.map
|
package/dist/eval-health.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { resolve } from "node:path";
|
|
3
|
-
import { fileURLToPath } from "node:url";
|
|
4
|
-
import { evaluateHealth } from "@deftai/directive-core/eval";
|
|
5
|
-
/** Parse eval-health CLI args. */
|
|
6
|
-
export function parseArgs(argv) {
|
|
7
|
-
const parsed = {
|
|
8
|
-
projectRoot: ".",
|
|
9
|
-
json: false,
|
|
10
|
-
noPersist: false,
|
|
11
|
-
};
|
|
12
|
-
for (let i = 0; i < argv.length; i += 1) {
|
|
13
|
-
const arg = argv[i];
|
|
14
|
-
if (arg === "--json") {
|
|
15
|
-
parsed.json = true;
|
|
16
|
-
}
|
|
17
|
-
else if (arg === "--no-persist") {
|
|
18
|
-
parsed.noPersist = true;
|
|
19
|
-
}
|
|
20
|
-
else if (arg === "--project-root") {
|
|
21
|
-
const value = argv[i + 1];
|
|
22
|
-
if (value === undefined) {
|
|
23
|
-
return { ...parsed, error: "argument --project-root: expected one argument" };
|
|
24
|
-
}
|
|
25
|
-
parsed.projectRoot = value;
|
|
26
|
-
i += 1;
|
|
27
|
-
}
|
|
28
|
-
else if (arg?.startsWith("--project-root=")) {
|
|
29
|
-
parsed.projectRoot = arg.slice("--project-root=".length);
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
return { ...parsed, error: `unrecognized argument: ${arg}` };
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return parsed;
|
|
36
|
-
}
|
|
37
|
-
/** Run eval:health and return the process exit code. */
|
|
38
|
-
export function run(argv) {
|
|
39
|
-
const args = parseArgs(argv);
|
|
40
|
-
if (args.error !== undefined) {
|
|
41
|
-
process.stderr.write(`eval:health: ${args.error}\n`);
|
|
42
|
-
return 2;
|
|
43
|
-
}
|
|
44
|
-
const result = evaluateHealth({
|
|
45
|
-
projectRoot: resolve(args.projectRoot),
|
|
46
|
-
persist: !args.noPersist,
|
|
47
|
-
});
|
|
48
|
-
if (result.report === null) {
|
|
49
|
-
process.stderr.write(`${result.message}\n`);
|
|
50
|
-
return result.code;
|
|
51
|
-
}
|
|
52
|
-
if (args.json) {
|
|
53
|
-
process.stdout.write(`${JSON.stringify(result.report, null, 2)}\n`);
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
process.stdout.write(`${result.message}\n`);
|
|
57
|
-
}
|
|
58
|
-
return result.code;
|
|
59
|
-
}
|
|
60
|
-
if (process.argv[1] !== undefined && fileURLToPath(import.meta.url) === process.argv[1]) {
|
|
61
|
-
process.exit(run(process.argv.slice(2)));
|
|
62
|
-
}
|
|
63
|
-
//# sourceMappingURL=eval-health.js.map
|
package/dist/eval-report.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
interface ParsedArgs {
|
|
3
|
-
projectRoot: string;
|
|
4
|
-
championVersion: string;
|
|
5
|
-
challengerVersion: string;
|
|
6
|
-
model: string;
|
|
7
|
-
json: boolean;
|
|
8
|
-
error?: string;
|
|
9
|
-
}
|
|
10
|
-
/** Parse eval-report CLI args. */
|
|
11
|
-
export declare function parseArgs(argv: string[]): ParsedArgs;
|
|
12
|
-
/** Run eval:report and return the process exit code. */
|
|
13
|
-
export declare function run(argv: string[]): number;
|
|
14
|
-
export {};
|
|
15
|
-
//# sourceMappingURL=eval-report.d.ts.map
|