@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,137 +0,0 @@
|
|
|
1
|
-
/** Test fixtures extracted from legacy parity harness (#2083). */
|
|
2
|
-
import { execFileSync } from "node:child_process";
|
|
3
|
-
import { mkdirSync, mkdtempSync, writeFileSync } from "node:fs";
|
|
4
|
-
import { tmpdir } from "node:os";
|
|
5
|
-
import { dirname, join } from "node:path";
|
|
6
|
-
function writeVbrief(root, rel, status = "running", folder = "active") {
|
|
7
|
-
const full = join(root, "xbrief", folder, rel);
|
|
8
|
-
mkdirSync(dirname(full), { recursive: true });
|
|
9
|
-
const payload = {
|
|
10
|
-
plan: { status, title: "T", items: [] },
|
|
11
|
-
xBRIEFInfo: { version: "0.8" },
|
|
12
|
-
};
|
|
13
|
-
writeFileSync(full, `${JSON.stringify(payload)}\n`, "utf8");
|
|
14
|
-
}
|
|
15
|
-
function renderAllocation(fields) {
|
|
16
|
-
const lines = ["Dispatch envelope.", "", "## Allocation context", ""];
|
|
17
|
-
for (const [key, value] of Object.entries(fields)) {
|
|
18
|
-
lines.push(`- ${key}: ${value === null ? "null" : value}`);
|
|
19
|
-
}
|
|
20
|
-
lines.push("", "## Next section", "- trailing: ignored");
|
|
21
|
-
return lines.join("\n");
|
|
22
|
-
}
|
|
23
|
-
const VALID_COHORT = {
|
|
24
|
-
allocation_plan_id: "orchestrator-run-019e80bd",
|
|
25
|
-
batching_rationale: "Three disjoint-file-scope stories from #1378.",
|
|
26
|
-
cohort_vbriefs: "[xbrief/active/a.json, xbrief/active/b.json]",
|
|
27
|
-
dispatch_kind: "swarm-cohort",
|
|
28
|
-
operator_approval_evidence: "user directive 2026-06-01T02:26Z",
|
|
29
|
-
};
|
|
30
|
-
/** Scenarios exercised by the parity harness (mirrors Python contract cases). */
|
|
31
|
-
export const PARITY_SCENARIOS = [
|
|
32
|
-
{
|
|
33
|
-
name: "clean-active-running-solo",
|
|
34
|
-
vbriefRel: "2026-06-01-story.xbrief.json",
|
|
35
|
-
envelopeRel: null,
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
name: "dirty-tree",
|
|
39
|
-
vbriefRel: "2026-06-01-story.xbrief.json",
|
|
40
|
-
envelopeRel: null,
|
|
41
|
-
dirty: true,
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
name: "non-running-vbrief",
|
|
45
|
-
vbriefRel: "2026-06-01-pending.xbrief.json",
|
|
46
|
-
vbriefStatus: "approved",
|
|
47
|
-
envelopeRel: null,
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
name: "satisfied-swarm-cohort",
|
|
51
|
-
vbriefRel: "2026-06-01-story.xbrief.json",
|
|
52
|
-
envelopeRel: "envelope-cohort.md",
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
name: "malformed-allocation",
|
|
56
|
-
vbriefRel: "2026-06-01-story.xbrief.json",
|
|
57
|
-
envelopeRel: "envelope-bad.md",
|
|
58
|
-
},
|
|
59
|
-
];
|
|
60
|
-
function gitCommit(cwd, message) {
|
|
61
|
-
execFileSync("git", ["commit", "-q", "-m", message], {
|
|
62
|
-
cwd,
|
|
63
|
-
env: {
|
|
64
|
-
...process.env,
|
|
65
|
-
GIT_AUTHOR_NAME: "deft-parity",
|
|
66
|
-
GIT_AUTHOR_EMAIL: "parity@test.local",
|
|
67
|
-
GIT_COMMITTER_NAME: "deft-parity",
|
|
68
|
-
GIT_COMMITTER_EMAIL: "parity@test.local",
|
|
69
|
-
},
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
/** Normalise gate message for comparison (trim, collapse whitespace). */
|
|
73
|
-
export function normaliseMessage(stdout, stderr, exitCode) {
|
|
74
|
-
const raw = exitCode === 0 ? stdout : stderr;
|
|
75
|
-
return raw.trim().replace(/\s+/g, " ");
|
|
76
|
-
}
|
|
77
|
-
/** Build a fixture repo for one scenario; return repo root + vbrief absolute path. */
|
|
78
|
-
export function buildScenarioRepo(scenario) {
|
|
79
|
-
const root = mkdtempSync(join(tmpdir(), "deft-story-ready-parity-"));
|
|
80
|
-
const vbriefName = scenario.vbriefRel;
|
|
81
|
-
const status = scenario.vbriefStatus ?? "running";
|
|
82
|
-
writeVbrief(root, vbriefName, status);
|
|
83
|
-
if (scenario.dirty) {
|
|
84
|
-
writeFileSync(join(root, "scratch.txt"), "dirty\n", "utf8");
|
|
85
|
-
}
|
|
86
|
-
let envelopePath = null;
|
|
87
|
-
if (scenario.envelopeRel === "envelope-cohort.md") {
|
|
88
|
-
envelopePath = join(root, scenario.envelopeRel);
|
|
89
|
-
writeFileSync(envelopePath, renderAllocation(VALID_COHORT), "utf8");
|
|
90
|
-
}
|
|
91
|
-
else if (scenario.envelopeRel === "envelope-bad.md") {
|
|
92
|
-
envelopePath = join(root, scenario.envelopeRel);
|
|
93
|
-
const bad = { ...VALID_COHORT };
|
|
94
|
-
delete bad.dispatch_kind;
|
|
95
|
-
writeFileSync(envelopePath, renderAllocation(bad), "utf8");
|
|
96
|
-
}
|
|
97
|
-
execFileSync("git", ["init", "-q"], { cwd: root });
|
|
98
|
-
execFileSync("git", ["add", "-A"], { cwd: root });
|
|
99
|
-
if (!scenario.dirty) {
|
|
100
|
-
gitCommit(root, "init");
|
|
101
|
-
}
|
|
102
|
-
const vbriefPath = join(root, "xbrief", "active", vbriefName);
|
|
103
|
-
return { root, vbriefPath, envelopePath };
|
|
104
|
-
}
|
|
105
|
-
/** Diff python vs TS gate outputs across all parity scenarios. */
|
|
106
|
-
export function diffParity(python, ts) {
|
|
107
|
-
const pythonMessage = normaliseMessage(python.stdout, python.stderr, python.exitCode);
|
|
108
|
-
const tsMessage = normaliseMessage(ts.stdout, ts.stderr, ts.exitCode);
|
|
109
|
-
return {
|
|
110
|
-
exitMismatch: python.exitCode !== ts.exitCode,
|
|
111
|
-
messageMismatch: pythonMessage !== tsMessage,
|
|
112
|
-
pythonMessage,
|
|
113
|
-
tsMessage,
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
/** Run all parity scenarios and return a structured result. */
|
|
117
|
-
/** Render a human-readable parity report (exported for unit tests). */
|
|
118
|
-
export function renderReport(result) {
|
|
119
|
-
if (result.ok) {
|
|
120
|
-
return `verify_story_ready parity: CLEAN -- Python and TS agree on ${result.scenarios.length} scenario(s).`;
|
|
121
|
-
}
|
|
122
|
-
const lines = ["verify_story_ready parity: DIVERGENCE"];
|
|
123
|
-
for (const s of result.scenarios) {
|
|
124
|
-
if (s.exitMismatch || s.messageMismatch) {
|
|
125
|
-
lines.push(` scenario: ${s.name}`);
|
|
126
|
-
if (s.exitMismatch) {
|
|
127
|
-
lines.push(` exit mismatch: python=${s.pythonExit} ts=${s.tsExit}`);
|
|
128
|
-
}
|
|
129
|
-
if (s.messageMismatch) {
|
|
130
|
-
lines.push(` python: ${s.pythonMessage}`);
|
|
131
|
-
lines.push(` ts: ${s.tsMessage}`);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
return lines.join("\n");
|
|
136
|
-
}
|
|
137
|
-
//# sourceMappingURL=story-ready-fixtures.js.map
|
package/dist/subagent-monitor.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { fileURLToPath } from "node:url";
|
|
3
|
-
import { cmdSubagentMonitor } from "@deftai/directive-core/orchestration";
|
|
4
|
-
export function run(argv) {
|
|
5
|
-
return cmdSubagentMonitor(argv);
|
|
6
|
-
}
|
|
7
|
-
if (process.argv[1] !== undefined && fileURLToPath(import.meta.url) === process.argv[1]) {
|
|
8
|
-
process.exit(run(process.argv.slice(2)));
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=subagent-monitor.js.map
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
export declare const SUBAGENT_PRE_CANCEL_HELP = "subagent:pre-cancel \u2014 query-before-cancel gate (#5278)\n\nUsage:\n task subagent:pre-cancel -- --agent <id> --canceller-id <id> [options]\n\nExit 0 only when one ordered branch clears:\n (a) canceller-authored status steer (kind note|correction) + matching ack\n OR observed first-seen window (default 3 minutes; PA-18 forward skew only)\n (b) heartbeat STALE/missing under startup grace from --dispatch-started-at\n (c) --force --reason <text>\n\nOptions:\n --agent ID Target child agent_id (required)\n --canceller-id ID Canceller identity; must match steer writer_id for (a)\n --target-id PATH Worktree root (resolves steer/scratch/first-seen under it)\n --steer-dir PATH Steer inbox dir (default: <cwd|target>/.deft-scratch/subagent-steer)\n --scratch-dir PATH Heartbeat dir (default: <cwd|target>/.deft-scratch/subagent-status)\n --first-seen-dir PATH First-seen stamps (default: .../subagent-steer-firstseen)\n --dispatch-started-at ISO DeliveryAttemptRecord.startedAt for grace path (b)\n --expected-worker-id ID Refuse when agent does not match current attempt worker\n --observed-window-seconds N Default 180\n --force Explicit force clear (requires --reason)\n --reason TEXT Printed force reason\n --json Machine-readable verdict\n\nExit codes:\n 0 Pre-cancel green\n 1 Refused (gate red)\n 2 Config / usage error\n";
|
|
3
|
-
export interface SubagentPreCancelArgs {
|
|
4
|
-
agentId: string | null;
|
|
5
|
-
cancellerId: string | null;
|
|
6
|
-
targetId: string | null;
|
|
7
|
-
steerDir: string | null;
|
|
8
|
-
scratchDir: string | null;
|
|
9
|
-
firstSeenDir: string | null;
|
|
10
|
-
dispatchStartedAt: string | null;
|
|
11
|
-
expectedWorkerId: string | null;
|
|
12
|
-
observedWindowSeconds: number | null;
|
|
13
|
-
force: boolean;
|
|
14
|
-
forceReason: string | null;
|
|
15
|
-
emitJson: boolean;
|
|
16
|
-
help: boolean;
|
|
17
|
-
error?: string;
|
|
18
|
-
}
|
|
19
|
-
export declare function parseSubagentPreCancelArgs(argv: readonly string[]): SubagentPreCancelArgs;
|
|
20
|
-
export declare function run(argv: readonly string[], cwd?: string): number;
|
|
21
|
-
//# sourceMappingURL=subagent-pre-cancel.d.ts.map
|
|
@@ -1,240 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Fail-closed query-before-cancel gate (#5278 Prefer-A).
|
|
4
|
-
* Dest-capable args required for linked-worktree children (#4066).
|
|
5
|
-
*/
|
|
6
|
-
import { resolve } from "node:path";
|
|
7
|
-
import { fileURLToPath } from "node:url";
|
|
8
|
-
import { defaultFirstSeenDir, defaultScratchDir, defaultSteerDir, EXIT_PRE_CANCEL_CONFIG, EXIT_PRE_CANCEL_OK, evaluatePreCancel, } from "@deftai/directive-core/orchestration";
|
|
9
|
-
export const SUBAGENT_PRE_CANCEL_HELP = `subagent:pre-cancel — query-before-cancel gate (#5278)
|
|
10
|
-
|
|
11
|
-
Usage:
|
|
12
|
-
task subagent:pre-cancel -- --agent <id> --canceller-id <id> [options]
|
|
13
|
-
|
|
14
|
-
Exit 0 only when one ordered branch clears:
|
|
15
|
-
(a) canceller-authored status steer (kind note|correction) + matching ack
|
|
16
|
-
OR observed first-seen window (default 3 minutes; PA-18 forward skew only)
|
|
17
|
-
(b) heartbeat STALE/missing under startup grace from --dispatch-started-at
|
|
18
|
-
(c) --force --reason <text>
|
|
19
|
-
|
|
20
|
-
Options:
|
|
21
|
-
--agent ID Target child agent_id (required)
|
|
22
|
-
--canceller-id ID Canceller identity; must match steer writer_id for (a)
|
|
23
|
-
--target-id PATH Worktree root (resolves steer/scratch/first-seen under it)
|
|
24
|
-
--steer-dir PATH Steer inbox dir (default: <cwd|target>/.deft-scratch/subagent-steer)
|
|
25
|
-
--scratch-dir PATH Heartbeat dir (default: <cwd|target>/.deft-scratch/subagent-status)
|
|
26
|
-
--first-seen-dir PATH First-seen stamps (default: .../subagent-steer-firstseen)
|
|
27
|
-
--dispatch-started-at ISO DeliveryAttemptRecord.startedAt for grace path (b)
|
|
28
|
-
--expected-worker-id ID Refuse when agent does not match current attempt worker
|
|
29
|
-
--observed-window-seconds N Default 180
|
|
30
|
-
--force Explicit force clear (requires --reason)
|
|
31
|
-
--reason TEXT Printed force reason
|
|
32
|
-
--json Machine-readable verdict
|
|
33
|
-
|
|
34
|
-
Exit codes:
|
|
35
|
-
0 Pre-cancel green
|
|
36
|
-
1 Refused (gate red)
|
|
37
|
-
2 Config / usage error
|
|
38
|
-
`;
|
|
39
|
-
export function parseSubagentPreCancelArgs(argv) {
|
|
40
|
-
const acc = {
|
|
41
|
-
agentId: null,
|
|
42
|
-
cancellerId: null,
|
|
43
|
-
targetId: null,
|
|
44
|
-
steerDir: null,
|
|
45
|
-
scratchDir: null,
|
|
46
|
-
firstSeenDir: null,
|
|
47
|
-
dispatchStartedAt: null,
|
|
48
|
-
expectedWorkerId: null,
|
|
49
|
-
observedWindowSeconds: null,
|
|
50
|
-
force: false,
|
|
51
|
-
forceReason: null,
|
|
52
|
-
emitJson: false,
|
|
53
|
-
help: false,
|
|
54
|
-
};
|
|
55
|
-
for (let i = 0; i < argv.length; i += 1) {
|
|
56
|
-
const arg = argv[i];
|
|
57
|
-
if (arg === "--help" || arg === "-h") {
|
|
58
|
-
return { ...acc, help: true };
|
|
59
|
-
}
|
|
60
|
-
if (arg === "--json") {
|
|
61
|
-
acc.emitJson = true;
|
|
62
|
-
}
|
|
63
|
-
else if (arg === "--force") {
|
|
64
|
-
acc.force = true;
|
|
65
|
-
}
|
|
66
|
-
else if (arg === "--agent" || arg === "--agent-id") {
|
|
67
|
-
const value = argv[i + 1];
|
|
68
|
-
if (value === undefined)
|
|
69
|
-
return { ...acc, error: `argument ${arg}: expected one argument` };
|
|
70
|
-
acc.agentId = value;
|
|
71
|
-
i += 1;
|
|
72
|
-
}
|
|
73
|
-
else if (arg?.startsWith("--agent=") || arg?.startsWith("--agent-id=")) {
|
|
74
|
-
acc.agentId = arg.slice(arg.indexOf("=") + 1);
|
|
75
|
-
}
|
|
76
|
-
else if (arg === "--canceller-id" || arg === "--canceller") {
|
|
77
|
-
const value = argv[i + 1];
|
|
78
|
-
if (value === undefined)
|
|
79
|
-
return { ...acc, error: `argument ${arg}: expected one argument` };
|
|
80
|
-
acc.cancellerId = value;
|
|
81
|
-
i += 1;
|
|
82
|
-
}
|
|
83
|
-
else if (arg?.startsWith("--canceller-id=") || arg?.startsWith("--canceller=")) {
|
|
84
|
-
acc.cancellerId = arg.slice(arg.indexOf("=") + 1);
|
|
85
|
-
}
|
|
86
|
-
else if (arg === "--target-id" || arg === "--target") {
|
|
87
|
-
const value = argv[i + 1];
|
|
88
|
-
if (value === undefined)
|
|
89
|
-
return { ...acc, error: `argument ${arg}: expected one argument` };
|
|
90
|
-
acc.targetId = value;
|
|
91
|
-
i += 1;
|
|
92
|
-
}
|
|
93
|
-
else if (arg?.startsWith("--target-id=") || arg?.startsWith("--target=")) {
|
|
94
|
-
acc.targetId = arg.slice(arg.indexOf("=") + 1);
|
|
95
|
-
}
|
|
96
|
-
else if (arg === "--steer-dir") {
|
|
97
|
-
const value = argv[i + 1];
|
|
98
|
-
if (value === undefined)
|
|
99
|
-
return { ...acc, error: "argument --steer-dir: expected one argument" };
|
|
100
|
-
acc.steerDir = value;
|
|
101
|
-
i += 1;
|
|
102
|
-
}
|
|
103
|
-
else if (arg?.startsWith("--steer-dir=")) {
|
|
104
|
-
acc.steerDir = arg.slice("--steer-dir=".length);
|
|
105
|
-
}
|
|
106
|
-
else if (arg === "--scratch-dir") {
|
|
107
|
-
const value = argv[i + 1];
|
|
108
|
-
if (value === undefined)
|
|
109
|
-
return { ...acc, error: "argument --scratch-dir: expected one argument" };
|
|
110
|
-
acc.scratchDir = value;
|
|
111
|
-
i += 1;
|
|
112
|
-
}
|
|
113
|
-
else if (arg?.startsWith("--scratch-dir=")) {
|
|
114
|
-
acc.scratchDir = arg.slice("--scratch-dir=".length);
|
|
115
|
-
}
|
|
116
|
-
else if (arg === "--first-seen-dir") {
|
|
117
|
-
const value = argv[i + 1];
|
|
118
|
-
if (value === undefined) {
|
|
119
|
-
return { ...acc, error: "argument --first-seen-dir: expected one argument" };
|
|
120
|
-
}
|
|
121
|
-
acc.firstSeenDir = value;
|
|
122
|
-
i += 1;
|
|
123
|
-
}
|
|
124
|
-
else if (arg?.startsWith("--first-seen-dir=")) {
|
|
125
|
-
acc.firstSeenDir = arg.slice("--first-seen-dir=".length);
|
|
126
|
-
}
|
|
127
|
-
else if (arg === "--dispatch-started-at") {
|
|
128
|
-
const value = argv[i + 1];
|
|
129
|
-
if (value === undefined) {
|
|
130
|
-
return { ...acc, error: "argument --dispatch-started-at: expected one argument" };
|
|
131
|
-
}
|
|
132
|
-
acc.dispatchStartedAt = value;
|
|
133
|
-
i += 1;
|
|
134
|
-
}
|
|
135
|
-
else if (arg?.startsWith("--dispatch-started-at=")) {
|
|
136
|
-
acc.dispatchStartedAt = arg.slice("--dispatch-started-at=".length);
|
|
137
|
-
}
|
|
138
|
-
else if (arg === "--expected-worker-id") {
|
|
139
|
-
const value = argv[i + 1];
|
|
140
|
-
if (value === undefined) {
|
|
141
|
-
return { ...acc, error: "argument --expected-worker-id: expected one argument" };
|
|
142
|
-
}
|
|
143
|
-
acc.expectedWorkerId = value;
|
|
144
|
-
i += 1;
|
|
145
|
-
}
|
|
146
|
-
else if (arg?.startsWith("--expected-worker-id=")) {
|
|
147
|
-
acc.expectedWorkerId = arg.slice("--expected-worker-id=".length);
|
|
148
|
-
}
|
|
149
|
-
else if (arg === "--observed-window-seconds") {
|
|
150
|
-
const value = argv[i + 1];
|
|
151
|
-
if (value === undefined) {
|
|
152
|
-
return { ...acc, error: "argument --observed-window-seconds: expected one argument" };
|
|
153
|
-
}
|
|
154
|
-
acc.observedWindowSeconds = Number(value);
|
|
155
|
-
i += 1;
|
|
156
|
-
}
|
|
157
|
-
else if (arg?.startsWith("--observed-window-seconds=")) {
|
|
158
|
-
acc.observedWindowSeconds = Number(arg.slice("--observed-window-seconds=".length));
|
|
159
|
-
}
|
|
160
|
-
else if (arg === "--reason") {
|
|
161
|
-
const value = argv[i + 1];
|
|
162
|
-
if (value === undefined)
|
|
163
|
-
return { ...acc, error: "argument --reason: expected one argument" };
|
|
164
|
-
acc.forceReason = value;
|
|
165
|
-
i += 1;
|
|
166
|
-
}
|
|
167
|
-
else if (arg?.startsWith("--reason=")) {
|
|
168
|
-
acc.forceReason = arg.slice("--reason=".length);
|
|
169
|
-
}
|
|
170
|
-
else if (arg?.startsWith("-")) {
|
|
171
|
-
return { ...acc, error: `unrecognized argument: ${arg}` };
|
|
172
|
-
}
|
|
173
|
-
else {
|
|
174
|
-
return { ...acc, error: `unrecognized argument: ${arg}` };
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
return acc;
|
|
178
|
-
}
|
|
179
|
-
export function run(argv, cwd = process.cwd()) {
|
|
180
|
-
const args = parseSubagentPreCancelArgs(argv);
|
|
181
|
-
if (args.help) {
|
|
182
|
-
process.stdout.write(SUBAGENT_PRE_CANCEL_HELP);
|
|
183
|
-
return EXIT_PRE_CANCEL_OK;
|
|
184
|
-
}
|
|
185
|
-
if (args.error !== undefined) {
|
|
186
|
-
process.stderr.write(`subagent:pre-cancel: ${args.error}\n`);
|
|
187
|
-
return EXIT_PRE_CANCEL_CONFIG;
|
|
188
|
-
}
|
|
189
|
-
const root = args.targetId !== null && args.targetId.trim().length > 0 ? resolve(cwd, args.targetId) : cwd;
|
|
190
|
-
const steerDir = resolve(root, args.steerDir ?? defaultSteerDir(root));
|
|
191
|
-
const scratchDir = resolve(root, args.scratchDir ?? defaultScratchDir(root));
|
|
192
|
-
const firstSeenDir = resolve(root, args.firstSeenDir ?? defaultFirstSeenDir(root));
|
|
193
|
-
// Linked-worktree children: refuse default-to-parent-cwd alone without dest args (#4066 / #5278).
|
|
194
|
-
// Partial dest (only --steer-dir or only --scratch-dir) mixes worktrees — require a pair or --target-id.
|
|
195
|
-
const hasTarget = args.targetId !== null && args.targetId.trim().length > 0;
|
|
196
|
-
const hasSteer = args.steerDir !== null;
|
|
197
|
-
const hasScratch = args.scratchDir !== null;
|
|
198
|
-
if (!hasTarget && hasSteer !== hasScratch) {
|
|
199
|
-
process.stderr.write("subagent:pre-cancel: --steer-dir and --scratch-dir must be paired when --target-id is omitted (partial dest mixes worktrees)\n");
|
|
200
|
-
return EXIT_PRE_CANCEL_CONFIG;
|
|
201
|
-
}
|
|
202
|
-
const hasDest = hasTarget || (hasSteer && hasScratch);
|
|
203
|
-
if (!hasDest) {
|
|
204
|
-
process.stderr.write("subagent:pre-cancel: dest-capable --target-id and/or paired --steer-dir/--scratch-dir required (default-to-cwd alone is refuse-closed for linked-worktree children)\n");
|
|
205
|
-
return EXIT_PRE_CANCEL_CONFIG;
|
|
206
|
-
}
|
|
207
|
-
if (args.observedWindowSeconds !== null &&
|
|
208
|
-
(!Number.isFinite(args.observedWindowSeconds) || args.observedWindowSeconds <= 0)) {
|
|
209
|
-
process.stderr.write("subagent:pre-cancel: --observed-window-seconds must be positive\n");
|
|
210
|
-
return EXIT_PRE_CANCEL_CONFIG;
|
|
211
|
-
}
|
|
212
|
-
const verdict = evaluatePreCancel({
|
|
213
|
-
agentId: args.agentId ?? "",
|
|
214
|
-
cancellerId: args.cancellerId ?? "",
|
|
215
|
-
steerDir,
|
|
216
|
-
firstSeenDir,
|
|
217
|
-
scratchDir,
|
|
218
|
-
force: args.force,
|
|
219
|
-
forceReason: args.forceReason ?? undefined,
|
|
220
|
-
dispatchStartedAt: args.dispatchStartedAt,
|
|
221
|
-
expectedWorkerId: args.expectedWorkerId,
|
|
222
|
-
observedWindowSeconds: args.observedWindowSeconds ?? undefined,
|
|
223
|
-
});
|
|
224
|
-
if (args.emitJson) {
|
|
225
|
-
process.stdout.write(`${JSON.stringify(verdict.json, null, 2)}\n`);
|
|
226
|
-
}
|
|
227
|
-
else if (verdict.message.length > 0) {
|
|
228
|
-
if (verdict.ok) {
|
|
229
|
-
process.stdout.write(`${verdict.message}\n`);
|
|
230
|
-
}
|
|
231
|
-
else {
|
|
232
|
-
process.stderr.write(`${verdict.message}\n`);
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
return verdict.exitCode;
|
|
236
|
-
}
|
|
237
|
-
if (process.argv[1] !== undefined && fileURLToPath(import.meta.url) === process.argv[1]) {
|
|
238
|
-
process.exit(run(process.argv.slice(2)));
|
|
239
|
-
}
|
|
240
|
-
//# sourceMappingURL=subagent-pre-cancel.js.map
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { type SteerKind, type SteerWriterKind } from "@deftai/directive-core/orchestration";
|
|
3
|
-
export declare const EXIT_STEER_WRITE_OK: number;
|
|
4
|
-
export declare const EXIT_STEER_WRITE_CONFIG: number;
|
|
5
|
-
export declare const SUBAGENT_STEER_WRITE_HELP = "subagent:steer \u2014 write a closed parent-steer inbox (#5278 / #4286)\n\nUsage:\n task subagent:steer -- --agent <id> --writer-id <id> --kind <kind> --text <text> [options]\n\nOptions:\n --agent ID Child agent_id (inbox file stem)\n --writer-id ID Writer identity (must match independent parent/owner record)\n --writer-kind KIND occupancy-owner | dispatching-parent (default: dispatching-parent)\n --kind KIND constraint | correction | halt | note\n --text TEXT Steer body (\u22642000 chars)\n --steer-id ID Optional stable steer id (default: uuid)\n --ttl-seconds N Expiry TTL (default: 1800)\n --target-id PATH Worktree root for dest inbox\n --steer-dir PATH Inbox directory override\n --scratch-dir PATH Heartbeat dir (not used for writer authority)\n --parent-id ID Must match child occupancy lease parentId\n --occupancy-owner-id ID Must match live occupancy session under --target-id\n --json Emit written record\n\nExit codes:\n 0 Wrote inbox\n 2 Config / validation error\n";
|
|
6
|
-
export interface SubagentSteerWriteArgs {
|
|
7
|
-
agentId: string | null;
|
|
8
|
-
writerId: string | null;
|
|
9
|
-
writerKind: SteerWriterKind;
|
|
10
|
-
kind: SteerKind | null;
|
|
11
|
-
text: string | null;
|
|
12
|
-
steerId: string | null;
|
|
13
|
-
ttlSeconds: number | null;
|
|
14
|
-
targetId: string | null;
|
|
15
|
-
steerDir: string | null;
|
|
16
|
-
scratchDir: string | null;
|
|
17
|
-
parentId: string | null;
|
|
18
|
-
occupancyOwnerId: string | null;
|
|
19
|
-
emitJson: boolean;
|
|
20
|
-
help: boolean;
|
|
21
|
-
error?: string;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Resolve parent/owner from dispatcher-recorded child occupancy + live occupancy.
|
|
25
|
-
* Heartbeat alone is never authority (caller-selected --scratch-dir cannot mint parent_id).
|
|
26
|
-
*/
|
|
27
|
-
export declare function resolveIndependentSteerAuthority(input: {
|
|
28
|
-
root: string;
|
|
29
|
-
agentId: string;
|
|
30
|
-
writerKind: SteerWriterKind;
|
|
31
|
-
writerId: string;
|
|
32
|
-
claimedParentId?: string | null;
|
|
33
|
-
claimedOccupancyOwnerId?: string | null;
|
|
34
|
-
}): {
|
|
35
|
-
parentId?: string;
|
|
36
|
-
occupancyOwnerId?: string;
|
|
37
|
-
error?: string;
|
|
38
|
-
};
|
|
39
|
-
export declare function parseSubagentSteerWriteArgs(argv: readonly string[]): SubagentSteerWriteArgs;
|
|
40
|
-
export declare function run(argv: readonly string[], cwd?: string): number;
|
|
41
|
-
//# sourceMappingURL=subagent-steer-write.d.ts.map
|