@deftai/directive-runtime 0.129.4 → 0.129.6
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/Taskfile.yml +235 -0
- package/UPGRADING.md +1 -0
- package/contracts/design-critique.md +1 -1
- package/contracts/path-write-fence.md +6 -0
- package/dist/applying-host-release.d.ts +16 -0
- package/dist/applying-host-release.js +98 -0
- package/dist/authz.d.ts +1 -1
- package/dist/authz.js +1 -1
- package/dist/check.d.ts +1 -0
- package/dist/check.js +27 -4
- package/dist/design-critique-ensure-arc-dest.d.ts +16 -0
- package/dist/design-critique-ensure-arc-dest.js +168 -0
- package/dist/dispatch.d.ts +1 -1
- package/dist/dispatch.js +8 -0
- package/dist/hook-dispatch.js +11 -5
- package/dist/human-presence-mint.d.ts +6 -1
- package/dist/human-presence-mint.js +20 -6
- package/dist/pre-pr-run.d.ts +7 -1
- package/dist/pre-pr-run.js +25 -1
- package/dist/session-start.js +40 -6
- package/dist/setup-wiring.d.ts +36 -0
- package/dist/setup-wiring.js +169 -14
- package/dist/verify-ac.d.ts +7 -2
- package/dist/verify-ac.js +13 -5
- package/dist/verify-source-cli/verify-deposit-closure.js +5 -5
- package/dist/windows-bin-ps1.d.ts +2 -2
- package/dist/windows-bin-ps1.js +5 -11
- package/docs/deft-directive-disable.md +3 -3
- package/docs/scope-provenance.md +4 -0
- package/package.json +2 -3
- package/packs/lessons/lessons-pack-0.1.json +15 -0
- package/packs/skills/skills-pack-0.1.json +2 -2
- package/skills/deft-directive-design-critique/SKILL.md +1 -1
- package/skills/deft-directive-release/SKILL.md +54 -1
- package/tasks/materialize.cjs +106 -5
- package/tasks/materialize.test.cjs +108 -0
- package/tasks/materialize.yml +14 -2
- package/vendor/directive-content/Taskfile.yml +235 -0
- package/vendor/directive-content/UPGRADING.md +1 -0
- package/vendor/directive-content/contracts/design-critique.md +1 -1
- package/vendor/directive-content/contracts/path-write-fence.md +6 -0
- package/vendor/directive-content/docs/deft-directive-disable.md +3 -3
- package/vendor/directive-content/docs/scope-provenance.md +4 -0
- package/vendor/directive-content/packs/lessons/lessons-pack-0.1.json +15 -0
- package/vendor/directive-content/packs/skills/skills-pack-0.1.json +2 -2
- package/vendor/directive-content/skills/deft-directive-design-critique/SKILL.md +1 -1
- package/vendor/directive-content/skills/deft-directive-release/SKILL.md +54 -1
- package/vendor/directive-content/tasks/materialize.cjs +106 -5
- package/vendor/directive-content/tasks/materialize.test.cjs +108 -0
- package/vendor/directive-content/tasks/materialize.yml +14 -2
- package/vendor/directive-core/dist/.tsbuildinfo +1 -1
- package/vendor/directive-core/dist/authz/classify.d.ts +18 -0
- package/vendor/directive-core/dist/authz/classify.d.ts.map +1 -1
- package/vendor/directive-core/dist/authz/classify.js +196 -14
- package/vendor/directive-core/dist/authz/classify.js.map +1 -1
- package/vendor/directive-core/dist/authz/evaluate.d.ts +5 -0
- package/vendor/directive-core/dist/authz/evaluate.d.ts.map +1 -1
- package/vendor/directive-core/dist/authz/evaluate.js +15 -5
- package/vendor/directive-core/dist/authz/evaluate.js.map +1 -1
- package/vendor/directive-core/dist/authz/templates.d.ts +2 -2
- package/vendor/directive-core/dist/authz/templates.d.ts.map +1 -1
- package/vendor/directive-core/dist/authz/templates.js +1 -0
- package/vendor/directive-core/dist/authz/templates.js.map +1 -1
- package/vendor/directive-core/dist/authz/types.d.ts +1 -1
- package/vendor/directive-core/dist/authz/types.d.ts.map +1 -1
- package/vendor/directive-core/dist/authz/types.js +2 -0
- package/vendor/directive-core/dist/authz/types.js.map +1 -1
- package/vendor/directive-core/dist/authz/verb-classification.d.ts.map +1 -1
- package/vendor/directive-core/dist/authz/verb-classification.js +30 -3
- package/vendor/directive-core/dist/authz/verb-classification.js.map +1 -1
- package/vendor/directive-core/dist/cache/fetch.d.ts.map +1 -1
- package/vendor/directive-core/dist/cache/fetch.js +50 -4
- package/vendor/directive-core/dist/cache/fetch.js.map +1 -1
- package/vendor/directive-core/dist/check/cached-orchestrator.d.ts.map +1 -1
- package/vendor/directive-core/dist/check/cached-orchestrator.js +101 -2
- package/vendor/directive-core/dist/check/cached-orchestrator.js.map +1 -1
- package/vendor/directive-core/dist/check/context.d.ts +199 -0
- package/vendor/directive-core/dist/check/context.d.ts.map +1 -1
- package/vendor/directive-core/dist/check/context.js +417 -2
- package/vendor/directive-core/dist/check/context.js.map +1 -1
- package/vendor/directive-core/dist/check/gate-lists.d.ts +42 -0
- package/vendor/directive-core/dist/check/gate-lists.d.ts.map +1 -1
- package/vendor/directive-core/dist/check/gate-lists.js +226 -0
- package/vendor/directive-core/dist/check/gate-lists.js.map +1 -1
- package/vendor/directive-core/dist/check/index.d.ts +1 -0
- package/vendor/directive-core/dist/check/index.d.ts.map +1 -1
- package/vendor/directive-core/dist/check/index.js +1 -0
- package/vendor/directive-core/dist/check/index.js.map +1 -1
- package/vendor/directive-core/dist/check/named-cause.d.ts.map +1 -1
- package/vendor/directive-core/dist/check/named-cause.js +1 -0
- package/vendor/directive-core/dist/check/named-cause.js.map +1 -1
- package/vendor/directive-core/dist/check/orchestrator.d.ts +1 -0
- package/vendor/directive-core/dist/check/orchestrator.d.ts.map +1 -1
- package/vendor/directive-core/dist/check/orchestrator.js +69 -4
- package/vendor/directive-core/dist/check/orchestrator.js.map +1 -1
- package/vendor/directive-core/dist/design-critique/arc-dest.d.ts +22 -5
- package/vendor/directive-core/dist/design-critique/arc-dest.d.ts.map +1 -1
- package/vendor/directive-core/dist/design-critique/arc-dest.js +61 -0
- package/vendor/directive-core/dist/design-critique/arc-dest.js.map +1 -1
- package/vendor/directive-core/dist/design-critique/run-posture.d.ts +7 -2
- package/vendor/directive-core/dist/design-critique/run-posture.d.ts.map +1 -1
- package/vendor/directive-core/dist/design-critique/run-posture.js +6 -1
- package/vendor/directive-core/dist/design-critique/run-posture.js.map +1 -1
- package/vendor/directive-core/dist/finish-loop/pr-finish-loop.d.ts +7 -0
- package/vendor/directive-core/dist/finish-loop/pr-finish-loop.d.ts.map +1 -1
- package/vendor/directive-core/dist/finish-loop/pr-finish-loop.js +42 -0
- package/vendor/directive-core/dist/finish-loop/pr-finish-loop.js.map +1 -1
- package/vendor/directive-core/dist/hooks/classify/host-session-identity.d.ts +15 -2
- package/vendor/directive-core/dist/hooks/classify/host-session-identity.d.ts.map +1 -1
- package/vendor/directive-core/dist/hooks/classify/host-session-identity.js +46 -5
- package/vendor/directive-core/dist/hooks/classify/host-session-identity.js.map +1 -1
- package/vendor/directive-core/dist/hooks/dispatcher.d.ts.map +1 -1
- package/vendor/directive-core/dist/hooks/dispatcher.js +235 -22
- package/vendor/directive-core/dist/hooks/dispatcher.js.map +1 -1
- package/vendor/directive-core/dist/hooks/scope.d.ts +38 -9
- package/vendor/directive-core/dist/hooks/scope.d.ts.map +1 -1
- package/vendor/directive-core/dist/hooks/scope.js +102 -16
- package/vendor/directive-core/dist/hooks/scope.js.map +1 -1
- package/vendor/directive-core/dist/hooks/shell-write-targets.d.ts +5 -0
- package/vendor/directive-core/dist/hooks/shell-write-targets.d.ts.map +1 -1
- package/vendor/directive-core/dist/hooks/shell-write-targets.js +18 -1
- package/vendor/directive-core/dist/hooks/shell-write-targets.js.map +1 -1
- package/vendor/directive-core/dist/init-deposit/host-hook-outer.d.ts +5 -0
- package/vendor/directive-core/dist/init-deposit/host-hook-outer.d.ts.map +1 -1
- package/vendor/directive-core/dist/init-deposit/host-hook-outer.js +22 -9
- package/vendor/directive-core/dist/init-deposit/host-hook-outer.js.map +1 -1
- package/vendor/directive-core/dist/init-deposit/scaffold.d.ts +8 -1
- package/vendor/directive-core/dist/init-deposit/scaffold.d.ts.map +1 -1
- package/vendor/directive-core/dist/init-deposit/scaffold.js +38 -4
- package/vendor/directive-core/dist/init-deposit/scaffold.js.map +1 -1
- package/vendor/directive-core/dist/install-health/cheap.d.ts +13 -1
- package/vendor/directive-core/dist/install-health/cheap.d.ts.map +1 -1
- package/vendor/directive-core/dist/install-health/cheap.js +39 -4
- package/vendor/directive-core/dist/install-health/cheap.js.map +1 -1
- package/vendor/directive-core/dist/install-health/constants.d.ts +18 -2
- package/vendor/directive-core/dist/install-health/constants.d.ts.map +1 -1
- package/vendor/directive-core/dist/install-health/constants.js +18 -2
- package/vendor/directive-core/dist/install-health/constants.js.map +1 -1
- package/vendor/directive-core/dist/install-health/index.d.ts +1 -1
- package/vendor/directive-core/dist/install-health/index.d.ts.map +1 -1
- package/vendor/directive-core/dist/install-health/index.js +1 -1
- package/vendor/directive-core/dist/install-health/index.js.map +1 -1
- package/vendor/directive-core/dist/policy/deft-directive-disable.d.ts +42 -5
- package/vendor/directive-core/dist/policy/deft-directive-disable.d.ts.map +1 -1
- package/vendor/directive-core/dist/policy/deft-directive-disable.js +71 -41
- package/vendor/directive-core/dist/policy/deft-directive-disable.js.map +1 -1
- package/vendor/directive-core/dist/policy/write-fence.d.ts +7 -0
- package/vendor/directive-core/dist/policy/write-fence.d.ts.map +1 -1
- package/vendor/directive-core/dist/policy/write-fence.js +81 -14
- package/vendor/directive-core/dist/policy/write-fence.js.map +1 -1
- package/vendor/directive-core/dist/pr-closeout-attestable/evaluate.d.ts +6 -1
- package/vendor/directive-core/dist/pr-closeout-attestable/evaluate.d.ts.map +1 -1
- package/vendor/directive-core/dist/pr-closeout-attestable/evaluate.js +24 -12
- package/vendor/directive-core/dist/pr-closeout-attestable/evaluate.js.map +1 -1
- package/vendor/directive-core/dist/pr-closeout-attestable/pr-head-assert.d.ts +68 -14
- package/vendor/directive-core/dist/pr-closeout-attestable/pr-head-assert.d.ts.map +1 -1
- package/vendor/directive-core/dist/pr-closeout-attestable/pr-head-assert.js +278 -47
- package/vendor/directive-core/dist/pr-closeout-attestable/pr-head-assert.js.map +1 -1
- package/vendor/directive-core/dist/pr-closing-keywords/main.d.ts +19 -0
- package/vendor/directive-core/dist/pr-closing-keywords/main.d.ts.map +1 -1
- package/vendor/directive-core/dist/pr-closing-keywords/main.js +31 -16
- package/vendor/directive-core/dist/pr-closing-keywords/main.js.map +1 -1
- package/vendor/directive-core/dist/pr-merge-readiness/compute.d.ts +8 -0
- package/vendor/directive-core/dist/pr-merge-readiness/compute.d.ts.map +1 -1
- package/vendor/directive-core/dist/pr-merge-readiness/compute.js +54 -2
- package/vendor/directive-core/dist/pr-merge-readiness/compute.js.map +1 -1
- package/vendor/directive-core/dist/pr-merge-readiness/gh.d.ts +7 -0
- package/vendor/directive-core/dist/pr-merge-readiness/gh.d.ts.map +1 -1
- package/vendor/directive-core/dist/pr-merge-readiness/gh.js +180 -49
- package/vendor/directive-core/dist/pr-merge-readiness/gh.js.map +1 -1
- package/vendor/directive-core/dist/pr-merge-readiness/main.d.ts +2 -0
- package/vendor/directive-core/dist/pr-merge-readiness/main.d.ts.map +1 -1
- package/vendor/directive-core/dist/pr-merge-readiness/main.js +1 -0
- package/vendor/directive-core/dist/pr-merge-readiness/main.js.map +1 -1
- package/vendor/directive-core/dist/pr-monitor/monitor.d.ts.map +1 -1
- package/vendor/directive-core/dist/pr-monitor/monitor.js +1 -0
- package/vendor/directive-core/dist/pr-monitor/monitor.js.map +1 -1
- package/vendor/directive-core/dist/pr-monitor/readiness.d.ts.map +1 -1
- package/vendor/directive-core/dist/pr-monitor/readiness.js +1 -0
- package/vendor/directive-core/dist/pr-monitor/readiness.js.map +1 -1
- package/vendor/directive-core/dist/pr-monitor/types.d.ts +2 -0
- package/vendor/directive-core/dist/pr-monitor/types.d.ts.map +1 -1
- package/vendor/directive-core/dist/pr-wait-mergeable/cascade.d.ts +6 -0
- package/vendor/directive-core/dist/pr-wait-mergeable/cascade.d.ts.map +1 -1
- package/vendor/directive-core/dist/pr-wait-mergeable/cascade.js +27 -0
- package/vendor/directive-core/dist/pr-wait-mergeable/cascade.js.map +1 -1
- package/vendor/directive-core/dist/pr-wait-mergeable/constants.d.ts +15 -0
- package/vendor/directive-core/dist/pr-wait-mergeable/constants.d.ts.map +1 -1
- package/vendor/directive-core/dist/pr-wait-mergeable/constants.js +18 -0
- package/vendor/directive-core/dist/pr-wait-mergeable/constants.js.map +1 -1
- package/vendor/directive-core/dist/pr-wait-mergeable/index.d.ts +2 -1
- package/vendor/directive-core/dist/pr-wait-mergeable/index.d.ts.map +1 -1
- package/vendor/directive-core/dist/pr-wait-mergeable/index.js +2 -1
- package/vendor/directive-core/dist/pr-wait-mergeable/index.js.map +1 -1
- package/vendor/directive-core/dist/pr-wait-mergeable/semantic-green.d.ts +81 -0
- package/vendor/directive-core/dist/pr-wait-mergeable/semantic-green.d.ts.map +1 -1
- package/vendor/directive-core/dist/pr-wait-mergeable/semantic-green.js +687 -3
- package/vendor/directive-core/dist/pr-wait-mergeable/semantic-green.js.map +1 -1
- package/vendor/directive-core/dist/pre-pr-controller/controller.d.ts +59 -1
- package/vendor/directive-core/dist/pre-pr-controller/controller.d.ts.map +1 -1
- package/vendor/directive-core/dist/pre-pr-controller/controller.js +155 -2
- package/vendor/directive-core/dist/pre-pr-controller/controller.js.map +1 -1
- package/vendor/directive-core/dist/pre-pr-controller/index.d.ts +1 -1
- package/vendor/directive-core/dist/pre-pr-controller/index.d.ts.map +1 -1
- package/vendor/directive-core/dist/pre-pr-controller/index.js +1 -1
- package/vendor/directive-core/dist/pre-pr-controller/index.js.map +1 -1
- package/vendor/directive-core/dist/pre-pr-controller/phases.d.ts +7 -0
- package/vendor/directive-core/dist/pre-pr-controller/phases.d.ts.map +1 -1
- package/vendor/directive-core/dist/pre-pr-controller/phases.js +11 -0
- package/vendor/directive-core/dist/pre-pr-controller/phases.js.map +1 -1
- package/vendor/directive-core/dist/pre-pr-controller/types.d.ts +1 -1
- package/vendor/directive-core/dist/pre-pr-controller/types.d.ts.map +1 -1
- package/vendor/directive-core/dist/pre-pr-controller/types.js.map +1 -1
- package/vendor/directive-core/dist/preflight-gh/pre-push.d.ts.map +1 -1
- package/vendor/directive-core/dist/preflight-gh/pre-push.js +58 -2
- package/vendor/directive-core/dist/preflight-gh/pre-push.js.map +1 -1
- package/vendor/directive-core/dist/product-first-done-gate/acceptance-resolver.d.ts +1 -1
- package/vendor/directive-core/dist/product-first-done-gate/acceptance-resolver.d.ts.map +1 -1
- package/vendor/directive-core/dist/product-first-done-gate/acceptance-resolver.js +1 -1
- package/vendor/directive-core/dist/product-first-done-gate/acceptance-resolver.js.map +1 -1
- package/vendor/directive-core/dist/product-first-done-gate/index.d.ts +1 -1
- package/vendor/directive-core/dist/product-first-done-gate/index.d.ts.map +1 -1
- package/vendor/directive-core/dist/product-first-done-gate/index.js +1 -1
- package/vendor/directive-core/dist/product-first-done-gate/index.js.map +1 -1
- package/vendor/directive-core/dist/release/gh.d.ts.map +1 -1
- package/vendor/directive-core/dist/release/gh.js +2 -1
- package/vendor/directive-core/dist/release/gh.js.map +1 -1
- package/vendor/directive-core/dist/release/pipeline.d.ts.map +1 -1
- package/vendor/directive-core/dist/release/pipeline.js +13 -1
- package/vendor/directive-core/dist/release/pipeline.js.map +1 -1
- package/vendor/directive-core/dist/release/preflight.d.ts +11 -0
- package/vendor/directive-core/dist/release/preflight.d.ts.map +1 -1
- package/vendor/directive-core/dist/release/preflight.js +65 -0
- package/vendor/directive-core/dist/release/preflight.js.map +1 -1
- package/vendor/directive-core/dist/release/types.d.ts +4 -0
- package/vendor/directive-core/dist/release/types.d.ts.map +1 -1
- package/vendor/directive-core/dist/release/version.d.ts +4 -2
- package/vendor/directive-core/dist/release/version.d.ts.map +1 -1
- package/vendor/directive-core/dist/release/version.js +4 -2
- package/vendor/directive-core/dist/release/version.js.map +1 -1
- package/vendor/directive-core/dist/release-publish/gh-api.d.ts.map +1 -1
- package/vendor/directive-core/dist/release-publish/gh-api.js +4 -2
- package/vendor/directive-core/dist/release-publish/gh-api.js.map +1 -1
- package/vendor/directive-core/dist/release-publish/main.d.ts.map +1 -1
- package/vendor/directive-core/dist/release-publish/main.js +15 -4
- package/vendor/directive-core/dist/release-publish/main.js.map +1 -1
- package/vendor/directive-core/dist/release-publish/pipeline.d.ts +11 -0
- package/vendor/directive-core/dist/release-publish/pipeline.d.ts.map +1 -1
- package/vendor/directive-core/dist/release-publish/pipeline.js +143 -2
- package/vendor/directive-core/dist/release-publish/pipeline.js.map +1 -1
- package/vendor/directive-core/dist/release-rollback/gh.d.ts.map +1 -1
- package/vendor/directive-core/dist/release-rollback/gh.js +2 -1
- package/vendor/directive-core/dist/release-rollback/gh.js.map +1 -1
- package/vendor/directive-core/dist/scope/delivery-evidence.d.ts +37 -0
- package/vendor/directive-core/dist/scope/delivery-evidence.d.ts.map +1 -1
- package/vendor/directive-core/dist/scope/delivery-evidence.js +106 -6
- package/vendor/directive-core/dist/scope/delivery-evidence.js.map +1 -1
- package/vendor/directive-core/dist/scope/transition.d.ts +3 -1
- package/vendor/directive-core/dist/scope/transition.d.ts.map +1 -1
- package/vendor/directive-core/dist/scope/transition.js +4 -0
- package/vendor/directive-core/dist/scope/transition.js.map +1 -1
- package/vendor/directive-core/dist/session/git.d.ts +21 -2
- package/vendor/directive-core/dist/session/git.d.ts.map +1 -1
- package/vendor/directive-core/dist/session/git.js +21 -4
- package/vendor/directive-core/dist/session/git.js.map +1 -1
- package/vendor/directive-core/dist/session/occupancy.d.ts +93 -6
- package/vendor/directive-core/dist/session/occupancy.d.ts.map +1 -1
- package/vendor/directive-core/dist/session/occupancy.js +215 -52
- package/vendor/directive-core/dist/session/occupancy.js.map +1 -1
- package/vendor/directive-core/dist/session/session-start.d.ts.map +1 -1
- package/vendor/directive-core/dist/session/session-start.js +5 -2
- package/vendor/directive-core/dist/session/session-start.js.map +1 -1
- package/vendor/directive-core/dist/swarm/dest-place.d.ts +1 -1
- package/vendor/directive-core/dist/swarm/dest-place.d.ts.map +1 -1
- package/vendor/directive-core/dist/swarm/dest-place.js +36 -41
- package/vendor/directive-core/dist/swarm/dest-place.js.map +1 -1
- package/vendor/directive-core/dist/swarm/finalize-owed.d.ts +14 -0
- package/vendor/directive-core/dist/swarm/finalize-owed.d.ts.map +1 -1
- package/vendor/directive-core/dist/swarm/finalize-owed.js +214 -48
- package/vendor/directive-core/dist/swarm/finalize-owed.js.map +1 -1
- package/vendor/directive-core/dist/swarm/launch.d.ts.map +1 -1
- package/vendor/directive-core/dist/swarm/launch.js +15 -4
- package/vendor/directive-core/dist/swarm/launch.js.map +1 -1
- package/vendor/directive-core/dist/swarm/worktree-pm-install.d.ts +49 -2
- package/vendor/directive-core/dist/swarm/worktree-pm-install.d.ts.map +1 -1
- package/vendor/directive-core/dist/swarm/worktree-pm-install.js +207 -12
- package/vendor/directive-core/dist/swarm/worktree-pm-install.js.map +1 -1
- package/vendor/directive-core/dist/swarm/worktrees-cli.d.ts +6 -0
- package/vendor/directive-core/dist/swarm/worktrees-cli.d.ts.map +1 -1
- package/vendor/directive-core/dist/swarm/worktrees-cli.js +79 -2
- package/vendor/directive-core/dist/swarm/worktrees-cli.js.map +1 -1
- package/vendor/directive-core/dist/swarm/worktrees.d.ts +12 -1
- package/vendor/directive-core/dist/swarm/worktrees.d.ts.map +1 -1
- package/vendor/directive-core/dist/swarm/worktrees.js +34 -26
- package/vendor/directive-core/dist/swarm/worktrees.js.map +1 -1
- package/vendor/directive-core/dist/verify-ac/evaluate.d.ts +52 -0
- package/vendor/directive-core/dist/verify-ac/evaluate.d.ts.map +1 -1
- package/vendor/directive-core/dist/verify-ac/evaluate.js +361 -1
- package/vendor/directive-core/dist/verify-ac/evaluate.js.map +1 -1
- package/vendor/directive-core/dist/verify-ac/index.d.ts +1 -1
- package/vendor/directive-core/dist/verify-ac/index.d.ts.map +1 -1
- package/vendor/directive-core/dist/verify-ac/index.js +1 -1
- package/vendor/directive-core/dist/verify-ac/index.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispatcher.d.ts","sourceRoot":"","sources":["../../src/hooks/dispatcher.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,UAAU,EAKf,KAAK,gBAAgB,
|
|
1
|
+
{"version":3,"file":"dispatcher.d.ts","sourceRoot":"","sources":["../../src/hooks/dispatcher.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,UAAU,EAKf,KAAK,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OAAO,CAQ3E;AAED,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,0BAA0B,GAChC,2BAA2B,CA4E7B;AA8BD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,GAAG,MAAM,CAyIjF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { execFileSync } from "node:child_process";
|
|
2
|
-
import { existsSync, readdirSync, realpathSync } from "node:fs";
|
|
3
|
-
import { basename, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
4
|
-
import { appendAuthzAudit, classifyHookAuthzOps, evaluateAuthzMutation, evidenceSatisfiesImplementationApproval, listActiveHumanGrants, loadAuthzStateResult, markGrantUsed, shouldConsumeSingleUseGrant, utcIso, } from "../authz/index.js";
|
|
2
|
+
import { existsSync, lstatSync, readdirSync, readlinkSync, realpathSync } from "node:fs";
|
|
3
|
+
import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
4
|
+
import { appendAuthzAudit, classifyHookAuthzOps, evaluateAuthzMutation, evidenceSatisfiesImplementationApproval, hasKillSwitchShellWrite, isKillSwitchPlantPath, listActiveHumanGrants, loadAuthzStateResult, markGrantUsed, shouldConsumeSingleUseGrant, utcIso, } from "../authz/index.js";
|
|
5
5
|
import { shellCommandHasPayloadRootProtectedDestAfterRealpath } from "../authz/protected-dest-realpath.js";
|
|
6
6
|
import { prepareGithubOnlyDest } from "../design-critique/run-posture.js";
|
|
7
7
|
import { runningInsideDeftRepo } from "../doctor/paths.js";
|
|
@@ -13,7 +13,7 @@ import { detectDeftDirectiveDisable, formatDeftDirectiveDisableMessage, isDeftDi
|
|
|
13
13
|
import { evaluateIntentCeilingFromEnv } from "../policy/intent-ceiling.js";
|
|
14
14
|
import { detectNoDeftDirective, NO_DEFT_DIRECTIVE_DISABLED_MESSAGE, NO_DEFT_DIRECTIVE_INCONSISTENT_MESSAGE, } from "../policy/no-deft-directive.js";
|
|
15
15
|
import { classifyMcpTool, DEFAULT_RUNTIME_AUTHORITY_POLICY, evaluateRuntimeAuthorityDirectWrite, evaluateRuntimeAuthorityPath, evaluateRuntimeAuthorityShellOp, listShellOps, loadRuntimeAuthorityFromProject, } from "../policy/runtime-authority.js";
|
|
16
|
-
import { hasPositiveGoverningStoryAllow, isStoryWriteFenceUnreadable, loadStoryWriteFenceFromMergeBase, resolveWriteFence, } from "../policy/write-fence.js";
|
|
16
|
+
import { formatStoryWriteFenceBaseNote, hasPositiveGoverningStoryAllow, isStoryWriteFenceUnreadable, loadStoryWriteFenceFromMergeBase, resolveWriteFence, } from "../policy/write-fence.js";
|
|
17
17
|
import { SCOPE_NOT_READY_PROMOTE_THEN_ACTIVATE } from "../scope/transition-hint.js";
|
|
18
18
|
import { appendSoftAgentsRebindToMessage, decisionCarriesSoftAgentsRebind, formatSoftAgentsRebindChecklist, } from "../session/compact-ritual.js";
|
|
19
19
|
import { defaultGitRunner, detectBranch, existingAncestorDir, gitCommonDir, memoizeGitRunner, worktreePathOrNull, } from "../session/git.js";
|
|
@@ -27,7 +27,7 @@ import { runSessionStartHookWrite } from "../session/session-start-hook.js";
|
|
|
27
27
|
import { allocatedWorktreeMatches, applyCursorNurseryOccupancy, consultImplementSpawnOccupancy, GROK_CRITIC_SPAWN_NOT_READY_RECOVERY, mintImplementSpawnReservation, persistSpawnReservation, releaseLeftoverSpawnReservation, rerootMissingDestImperative, } from "../session/spawn-occupancy.js";
|
|
28
28
|
import { inspectSessionRitual, verifySessionRitual, WRITE_GATED_REQUIRED_STEPS, writeGateRitualOptions, } from "../session/verify-session-ritual.js";
|
|
29
29
|
import { countModelFlagsInLauncherArgv, evaluateSpawnRoutingHonor, extractModelFromLauncherArgv, extractRequestedModelFromPayload, extractStructuralWorkerRole, } from "../swarm/routing-honor.js";
|
|
30
|
-
import { uninspectableLifecycleDenyMessage } from "./classify/host-session-identity.js";
|
|
30
|
+
import { formatLauncherCorrectLifecycleRecovery, UNRESOLVED_HOST_OWNER, uninspectableLifecycleDenyMessage, } from "./classify/host-session-identity.js";
|
|
31
31
|
import { applyPatchHarvestedInputUnclassified, fieldString, firstString, hintUninspectableLifecycleCommand, hookApplyPatchBodyPaths, hookApplyPatchBodyText, hookMcpArgsText, hookMutationTargetPaths, hookShellCommand, hookToolName, hookWriteTargetPath, hostIdentityFallsBackToExplicitOwner, inspectExactLifecycleCommand, inspectHintedLifecycleSessionId, landProcessOnlyFlagOnToolInput, missingToolNameMessage, normalizeMutationTargetPaths, record, resolveHookHostIdentity, rewriteExactLifecycleCommand, toolInputRecord, } from "./classify/index.js";
|
|
32
32
|
import { defaultCursorPlanChoiceDeps, isCursorPlanChoiceManagedPath, storeDenyMessage, } from "./cursor-plan-choice/index.js";
|
|
33
33
|
import { classifyGitDestructive, classifyProductDestForms, payloadWithInjectedWriteTarget, } from "./dest-form.js";
|
|
@@ -37,8 +37,8 @@ import { classifyLauncherFamilyArgv } from "./launcher-argv.js";
|
|
|
37
37
|
import { isLexicalOutsideProjectRoot, isOutsideProjectRootWrite } from "./outside-project-root.js";
|
|
38
38
|
import { restampOwnerLivenessOnHookEvent, } from "./owner-liveness.js";
|
|
39
39
|
import { appliesGrokSpawnDestContract, isAssistPosture, isEphemeralSpawn, isExploreSpawn, isProcessOnlyCriticSpawn, isReadOnlyHookContext, processOnlyCriticRequiresDest, SPAWN_CLASS_RECOVERY, SPAWN_READ_ONLY_RECOVERY, } from "./readonly.js";
|
|
40
|
-
import { inspectActiveScope, POSITIVE_GOVERNING_ALLOW_REQUIRED,
|
|
41
|
-
import { classifyShellWriteTargets, isInRepoShellWritePath } from "./shell-write-targets.js";
|
|
40
|
+
import { inspectActiveScope, POSITIVE_GOVERNING_ALLOW_REQUIRED, } from "./scope.js";
|
|
41
|
+
import { classifyShellWriteTargets, isInRepoShellWritePath, isKillSwitchShellWriteBasename, } from "./shell-write-targets.js";
|
|
42
42
|
import { effectiveHookArgumentView, effectiveHookToolName, expectsLocalMutationDest, isApplyPatchTool, isDirectWriteTool, isKillTool, isMcpProxyWrapper, isMcpTool, isMcpWriteShaped, isShellTool, isSpawnTool, } from "./tools.js";
|
|
43
43
|
// Pure parse/classify helpers are defined in ./classify/ and re-exported from
|
|
44
44
|
// ./index.ts (#2950). Dispatcher is orchestration: classify → policy → decision.
|
|
@@ -215,6 +215,49 @@ function allMutationTargetsAreProposedLifecycleWrites(projectRoot, payload) {
|
|
|
215
215
|
function allMutationTargetsAreCompletedLifecycleWrites(projectRoot, payload) {
|
|
216
216
|
return allMutationTargetsMatch(projectRoot, payload, isCompletedLifecycleWrite);
|
|
217
217
|
}
|
|
218
|
+
/** Exact CHANGELOG.md relative path for Prefer-A #5890 retirement-shaped harvest. */
|
|
219
|
+
const CHANGELOG_REL = "CHANGELOG.md";
|
|
220
|
+
function isChangelogRelPath(relPosix) {
|
|
221
|
+
const p = relPosix.replace(/\\/g, "/").replace(/^\.\//, "");
|
|
222
|
+
return p === CHANGELOG_REL;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Prefer-A #5890 retirement-shaped harvest: every target is completed/ lifecycle
|
|
226
|
+
* or CHANGELOG.md, and at least one is CHANGELOG.md. Pure completed/ is exempt
|
|
227
|
+
* upstream (#4422) before inspectActiveScope; cancelled/ and product paths stay
|
|
228
|
+
* on the ungated zero-eligible arm.
|
|
229
|
+
*/
|
|
230
|
+
function isRetirementShapedMutationTargets(projectRoot, payload) {
|
|
231
|
+
if (applyPatchBodyUnclassified(payload))
|
|
232
|
+
return false;
|
|
233
|
+
const harvested = hookMutationTargetPaths(payload);
|
|
234
|
+
const normalized = normalizeMutationTargetPaths(harvested);
|
|
235
|
+
if (!normalized.ok || normalized.paths.length === 0)
|
|
236
|
+
return false;
|
|
237
|
+
let sawChangelog = false;
|
|
238
|
+
for (const target of normalized.paths) {
|
|
239
|
+
const rel = toProjectRelativePosix(projectRoot, target);
|
|
240
|
+
if (rel.startsWith(".."))
|
|
241
|
+
return false;
|
|
242
|
+
if (isChangelogRelPath(rel)) {
|
|
243
|
+
sawChangelog = true;
|
|
244
|
+
continue;
|
|
245
|
+
}
|
|
246
|
+
if (!isCompletedLifecycleWrite(projectRoot, target))
|
|
247
|
+
return false;
|
|
248
|
+
}
|
|
249
|
+
return sawChangelog;
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Prefer-A #5890 P3 gated zero-eligible lead. Names leftover-land / scope:complete
|
|
253
|
+
* for brief-only completed/; CHANGELOG staging stays a ready-scope residual.
|
|
254
|
+
* Do not emit LEFTOVER_LAND_PR_REMEDIATION (lifecycle-write.ts) verbatim here —
|
|
255
|
+
* that constant still claims optional CHANGELOG as lifecycle-only (#6061).
|
|
256
|
+
*/
|
|
257
|
+
const ZERO_ELIGIBLE_RETIREMENT_SHAPED_RECOVERY = " Recovery: leftover-land / `deft scope:complete` owns the reachable brief-only " +
|
|
258
|
+
"completed/ sequence (active→completed retirement and already-completed restamp). " +
|
|
259
|
+
"Staging CHANGELOG.md alongside still requires a ready scope and remains a named residual. " +
|
|
260
|
+
"Do not select an unrelated active brief for this work.";
|
|
218
261
|
function authzForMutationTargets(input, toolName, seams, options) {
|
|
219
262
|
// Decode file: URIs before approval / protected-store checks (#5366 Greptile P1).
|
|
220
263
|
// Admission already normalized; authz must not re-check raw percent-encoded text.
|
|
@@ -784,6 +827,65 @@ function recordAuthzAudit(projectRoot, decision, state, seams) {
|
|
|
784
827
|
// Audit write must not crash the host tool gate.
|
|
785
828
|
}
|
|
786
829
|
}
|
|
830
|
+
/**
|
|
831
|
+
* Resolve as far as the filesystem allows: realpath existing prefixes even when
|
|
832
|
+
* the leaf is missing (dangling multi-hop symlink parents).
|
|
833
|
+
*/
|
|
834
|
+
function realpathExistingParents(absPath) {
|
|
835
|
+
try {
|
|
836
|
+
return realpathSync(absPath);
|
|
837
|
+
}
|
|
838
|
+
catch {
|
|
839
|
+
const parent = dirname(absPath);
|
|
840
|
+
if (parent === absPath)
|
|
841
|
+
return absPath;
|
|
842
|
+
return join(realpathExistingParents(parent), basename(absPath));
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
/**
|
|
846
|
+
* True when a kill-switch plant path realpath-resolves under `.deft/authz/` or
|
|
847
|
+
* `.deft/approved-scope/` (symlink alias). Does not treat the flag basename
|
|
848
|
+
* itself as an inventoried-store hit (#6136 Greptile).
|
|
849
|
+
* Dangling symlinks: resolve link text, then realpath existing parent dirs so a
|
|
850
|
+
* directory alias into the store is not missed (#6158 Greptile P1).
|
|
851
|
+
*/
|
|
852
|
+
function killSwitchPlantResolvesToInventoriedAuthzStore(projectRoot, relOrAbsPath) {
|
|
853
|
+
const root = resolve(projectRoot);
|
|
854
|
+
const target = isAbsolute(relOrAbsPath)
|
|
855
|
+
? resolve(relOrAbsPath)
|
|
856
|
+
: resolve(root, relOrAbsPath.replace(/\\/g, "/"));
|
|
857
|
+
let resolved;
|
|
858
|
+
try {
|
|
859
|
+
resolved = realpathSync(target);
|
|
860
|
+
}
|
|
861
|
+
catch {
|
|
862
|
+
try {
|
|
863
|
+
const st = lstatSync(target);
|
|
864
|
+
if (!st.isSymbolicLink())
|
|
865
|
+
return false;
|
|
866
|
+
const link = readlinkSync(target);
|
|
867
|
+
const candidate = isAbsolute(link) ? resolve(link) : resolve(dirname(target), link);
|
|
868
|
+
resolved = realpathExistingParents(candidate);
|
|
869
|
+
}
|
|
870
|
+
catch {
|
|
871
|
+
return false;
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
let rootReal;
|
|
875
|
+
try {
|
|
876
|
+
rootReal = realpathSync(root);
|
|
877
|
+
}
|
|
878
|
+
catch {
|
|
879
|
+
return false;
|
|
880
|
+
}
|
|
881
|
+
const rel = relative(rootReal, resolved).split(sep).join("/").replace(/\\/g, "/").toLowerCase();
|
|
882
|
+
if (rel.length === 0 || rel.startsWith(".."))
|
|
883
|
+
return false;
|
|
884
|
+
return (rel === ".deft/authz" ||
|
|
885
|
+
rel.startsWith(".deft/authz/") ||
|
|
886
|
+
rel === ".deft/approved-scope" ||
|
|
887
|
+
rel.startsWith(".deft/approved-scope/"));
|
|
888
|
+
}
|
|
787
889
|
/**
|
|
788
890
|
* UAT lease + human-origin grant gate (#2944). Returns deny decision or null when allowed.
|
|
789
891
|
* Composes before runtimeAuthority path/scope checks for direct writes and shell/MCP.
|
|
@@ -810,6 +912,7 @@ function authzForMutation(input, toolName, seams, options) {
|
|
|
810
912
|
shellCommand,
|
|
811
913
|
isDirectWrite: options.isDirectWrite,
|
|
812
914
|
mcpArgsText: options.isDirectWrite ? null : hookMcpArgsText(input.payload),
|
|
915
|
+
writePath: options.isDirectWrite ? options.relPath : null,
|
|
813
916
|
});
|
|
814
917
|
// #4188: realpath recovered dest-of-write against payload root. Lexical
|
|
815
918
|
// classify stays I/O-free; a non-shell symlink dest is grant-immune unknown.
|
|
@@ -838,9 +941,24 @@ function authzForMutation(input, toolName, seams, options) {
|
|
|
838
941
|
branch = null;
|
|
839
942
|
}
|
|
840
943
|
const repo = (process.env.DEFT_AUTHZ_REPO ?? process.env.GITHUB_REPOSITORY ?? "").trim() || null;
|
|
944
|
+
// #6136: kill-switch / permanent opt-out plant is always-on grant-gated (not UAT-only).
|
|
945
|
+
const killSwitchPlant = (shellCommand !== null && hasKillSwitchShellWrite(shellCommand)) ||
|
|
946
|
+
(options.isDirectWrite && options.relPath !== null && isKillSwitchPlantPath(options.relPath));
|
|
947
|
+
// Symlink plant of a kill-switch basename into `.deft/authz/` / approved-scope
|
|
948
|
+
// must not ride a settings grant (settings op skips isProtectedStoreEditDest).
|
|
949
|
+
// Plain flag basenames are themselves "protected" in relIsProtectedDirectiveDest;
|
|
950
|
+
// only deny when realpath lands under the inventoried store dirs (#6136 Greptile).
|
|
951
|
+
if (killSwitchPlant &&
|
|
952
|
+
options.isDirectWrite &&
|
|
953
|
+
options.relPath !== null &&
|
|
954
|
+
killSwitchPlantResolvesToInventoriedAuthzStore(projectRoot, options.relPath)) {
|
|
955
|
+
return deny(input, "authz-uat-deny", toolName, "Directive denied kill-switch plant: path resolves into the inventoried authz " +
|
|
956
|
+
"store (`.deft/authz/` or `.deft/approved-scope/`). A settings grant does not " +
|
|
957
|
+
"authorize rewriting approval state through a flag symlink (#6136).", options.scopePath);
|
|
958
|
+
}
|
|
841
959
|
// Evaluate each op; first deny wins (compound shell must not short-circuit).
|
|
842
960
|
for (const op of ops) {
|
|
843
|
-
|
|
961
|
+
let decision = evaluateAuthzMutation({
|
|
844
962
|
state,
|
|
845
963
|
grants,
|
|
846
964
|
op,
|
|
@@ -849,6 +967,48 @@ function authzForMutation(input, toolName, seams, options) {
|
|
|
849
967
|
repo,
|
|
850
968
|
worktree: projectRoot,
|
|
851
969
|
});
|
|
970
|
+
// Outside UAT, settings (and kill-switch Write classified as settings) would
|
|
971
|
+
// authz-inactive allow. Re-evaluate under a synthetic human-origin UAT so the
|
|
972
|
+
// existing grant gate applies without widening evaluate.ts (#6136).
|
|
973
|
+
if (killSwitchPlant &&
|
|
974
|
+
decision.allowed &&
|
|
975
|
+
decision.code === "authz-inactive" &&
|
|
976
|
+
(op === "settings" || op === "edit")) {
|
|
977
|
+
decision = evaluateAuthzMutation({
|
|
978
|
+
state: {
|
|
979
|
+
...state,
|
|
980
|
+
uat: {
|
|
981
|
+
active: true,
|
|
982
|
+
campaignId: "always-on-kill-switch-plant",
|
|
983
|
+
startedAt: "1970-01-01T00:00:00.000Z",
|
|
984
|
+
startedBy: {
|
|
985
|
+
kind: "operator-cli",
|
|
986
|
+
actor: "directive-always-on-kill-switch",
|
|
987
|
+
mintedAt: "1970-01-01T00:00:00.000Z",
|
|
988
|
+
mintedVia: "cli",
|
|
989
|
+
eventRef: null,
|
|
990
|
+
},
|
|
991
|
+
suspendedAt: null,
|
|
992
|
+
note: "synthetic lease for always-on kill-switch plant grant gate (#6136)",
|
|
993
|
+
},
|
|
994
|
+
},
|
|
995
|
+
grants,
|
|
996
|
+
op: "settings",
|
|
997
|
+
path: options.relPath,
|
|
998
|
+
branch,
|
|
999
|
+
repo,
|
|
1000
|
+
worktree: projectRoot,
|
|
1001
|
+
});
|
|
1002
|
+
if (!decision.allowed) {
|
|
1003
|
+
decision = {
|
|
1004
|
+
...decision,
|
|
1005
|
+
reason: "Directive denied kill-switch / permanent opt-out plant without a human-origin " +
|
|
1006
|
+
"settings grant (#6136). Agents must not self-serve `.deft-directive-disable` or " +
|
|
1007
|
+
"`.no-deft-directive`. Human action required: plant outside an agent session, or " +
|
|
1008
|
+
"run `deft authz:grant` covering settings for this cohort.",
|
|
1009
|
+
};
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
852
1012
|
recordAuthzAudit(projectRoot, decision, state, seams);
|
|
853
1013
|
if (!decision.allowed) {
|
|
854
1014
|
return deny(input, authzCodeToHook(decision.code), toolName, decision.reason, options.scopePath);
|
|
@@ -1040,6 +1200,8 @@ function inspectMutationGates(input, toolName, seams, options) {
|
|
|
1040
1200
|
scopePath: null,
|
|
1041
1201
|
runGit: dispatchGit,
|
|
1042
1202
|
projectRoot,
|
|
1203
|
+
deferGrantConsume: options.deferGrantConsume === true,
|
|
1204
|
+
pendingConsumeOut: options.pendingConsumeOut,
|
|
1043
1205
|
});
|
|
1044
1206
|
if (authzDeny !== null)
|
|
1045
1207
|
return authzDeny;
|
|
@@ -1151,6 +1313,8 @@ function inspectMutationGates(input, toolName, seams, options) {
|
|
|
1151
1313
|
scopePath: null,
|
|
1152
1314
|
runGit: dispatchGit,
|
|
1153
1315
|
projectRoot,
|
|
1316
|
+
deferGrantConsume: options.deferGrantConsume === true,
|
|
1317
|
+
pendingConsumeOut: options.pendingConsumeOut,
|
|
1154
1318
|
});
|
|
1155
1319
|
if (authzDeny !== null)
|
|
1156
1320
|
return authzDeny;
|
|
@@ -1435,6 +1599,12 @@ function inspectMutationGates(input, toolName, seams, options) {
|
|
|
1435
1599
|
// S1 — do not string-sniff evaluator prose here). Suppress promote/activate.
|
|
1436
1600
|
proposedPathHint = "";
|
|
1437
1601
|
}
|
|
1602
|
+
else if (scope.denyKind === "zero-eligible" &&
|
|
1603
|
+
isRetirementShapedMutationTargets(effectiveRoot, input.payload)) {
|
|
1604
|
+
// Prefer-A #5890 P3: gated lead for completed/+CHANGELOG or CHANGELOG-only.
|
|
1605
|
+
// Suppress promote/activate and invent-scope/proposal tails on this arm.
|
|
1606
|
+
proposedPathHint = ZERO_ELIGIBLE_RETIREMENT_SHAPED_RECOVERY;
|
|
1607
|
+
}
|
|
1438
1608
|
else {
|
|
1439
1609
|
proposedPathHint = options.proposedLifecycleExempt
|
|
1440
1610
|
? " Recovery: no approved xBRIEF is available to activate " +
|
|
@@ -1481,15 +1651,16 @@ function inspectMutationGates(input, toolName, seams, options) {
|
|
|
1481
1651
|
if (!(scope.ready && scope.path !== null))
|
|
1482
1652
|
return null;
|
|
1483
1653
|
const loadFence = seams.loadStoryWriteFence ?? loadStoryWriteFenceFromMergeBase;
|
|
1484
|
-
|
|
1654
|
+
const fence = loadFence(effectiveRoot, scope.path);
|
|
1655
|
+
if (hasPositiveGoverningStoryAllow(fence)) {
|
|
1485
1656
|
return null;
|
|
1486
1657
|
}
|
|
1487
1658
|
const denyCode = isSpawnTool(toolName) ? "spawn-not-ready" : "scope-not-ready";
|
|
1488
|
-
return deny(input, denyCode, toolName, `${POSITIVE_GOVERNING_ALLOW_REQUIRED}${rootsNote}`, scope.path);
|
|
1659
|
+
return deny(input, denyCode, toolName, `${POSITIVE_GOVERNING_ALLOW_REQUIRED}${formatStoryWriteFenceBaseNote(fence)}${rootsNote}`, scope.path);
|
|
1489
1660
|
};
|
|
1490
1661
|
if (!isSpawnTool(toolName)) {
|
|
1491
1662
|
// Wave 1 authz (UAT lease + human-origin grant) before runtimeAuthority (#2944 / #2948 L1–L2).
|
|
1492
|
-
const pendingGrantConsume = [];
|
|
1663
|
+
const pendingGrantConsume = options.pendingConsumeOut ?? [];
|
|
1493
1664
|
const authzDeny = authzForMutationTargets(input, toolName, seams, {
|
|
1494
1665
|
isDirectWrite: true,
|
|
1495
1666
|
scopePath: scope.path,
|
|
@@ -1506,7 +1677,12 @@ function inspectMutationGates(input, toolName, seams, options) {
|
|
|
1506
1677
|
const runtimeDeny = runtimeAuthorityForDirectWrite(input, toolName, seams, scope.path, effectiveRoot);
|
|
1507
1678
|
if (runtimeDeny !== null)
|
|
1508
1679
|
return runtimeDeny;
|
|
1509
|
-
|
|
1680
|
+
// Shell write-reissue may defer spend so decideShellOrMcpRuntimeAuthority can
|
|
1681
|
+
// reuse the same single-use grant (#6136 Greptile P1). When pendingConsumeOut
|
|
1682
|
+
// is the same bag, authz already recorded refs — do not push twice.
|
|
1683
|
+
if (options.deferGrantConsume !== true) {
|
|
1684
|
+
consumePendingSingleUseGrants(projectRoot, pendingGrantConsume);
|
|
1685
|
+
}
|
|
1510
1686
|
// Intentional product-write allow: Prefer-A durable marker (#5176 / #4544).
|
|
1511
1687
|
const occupancyDeny = recheckOccupancyBeforeWriteAllow(true);
|
|
1512
1688
|
if (occupancyDeny !== null)
|
|
@@ -1762,29 +1938,37 @@ function decideGitDestructive(input, toolName) {
|
|
|
1762
1938
|
/**
|
|
1763
1939
|
* Authorize recognized in-repo Shell file-write dests through inspectMutationGates (#3983 / #3987).
|
|
1764
1940
|
* Deny is returned; allow falls through so dest-forms and push/merge still run.
|
|
1941
|
+
* Kill-switch basenames are checked before the in-repo skip so out-of-tree plants
|
|
1942
|
+
* cannot fail-open (#6136 Prefer-A Bound limb 2).
|
|
1765
1943
|
*/
|
|
1766
|
-
function decideShellWriteReissue(input, toolName, seams, observation) {
|
|
1944
|
+
function decideShellWriteReissue(input, toolName, seams, observation, pendingConsumeOut) {
|
|
1767
1945
|
const command = hookShellCommand(input.payload);
|
|
1768
1946
|
if (command === null)
|
|
1769
1947
|
return null;
|
|
1770
1948
|
const projectRoot = resolve(input.projectRoot);
|
|
1771
1949
|
for (const dest of classifyShellWriteTargets(command)) {
|
|
1950
|
+
const killSwitchDest = isKillSwitchShellWriteBasename(dest.path);
|
|
1772
1951
|
if (dest.unprovable === true) {
|
|
1773
|
-
if (!isInRepoShellWritePath(projectRoot, dest.path))
|
|
1952
|
+
if (!killSwitchDest && !isInRepoShellWritePath(projectRoot, dest.path))
|
|
1774
1953
|
continue;
|
|
1775
1954
|
return deny(input, "scope-not-ready", toolName, "Directive denied " +
|
|
1776
1955
|
toolName +
|
|
1777
1956
|
": Shell write dest is not reconstructable (compound command). Use one simple command or Edit/Write.");
|
|
1778
1957
|
}
|
|
1779
|
-
|
|
1958
|
+
// #6136: protected basename before isInRepoShellWritePath skip.
|
|
1959
|
+
if (!killSwitchDest && !isInRepoShellWritePath(projectRoot, dest.path))
|
|
1780
1960
|
continue;
|
|
1781
1961
|
const destInput = {
|
|
1782
1962
|
...input,
|
|
1783
1963
|
payload: payloadWithInjectedWriteTarget(input.payload, dest.path),
|
|
1784
1964
|
};
|
|
1965
|
+
// Defer single-use spend into pendingConsumeOut; caller spends after the whole
|
|
1966
|
+
// shell call allows so ordinary edit grants are not reusable (#6136 Greptile).
|
|
1785
1967
|
const destDecision = inspectMutationGates(destInput, toolName, seams, {
|
|
1786
1968
|
proposedLifecycleExempt: true,
|
|
1787
1969
|
observation,
|
|
1970
|
+
deferGrantConsume: true,
|
|
1971
|
+
pendingConsumeOut,
|
|
1788
1972
|
});
|
|
1789
1973
|
if (destDecision.verdict === "deny")
|
|
1790
1974
|
return destDecision;
|
|
@@ -2237,12 +2421,15 @@ function tryPublishApplyingHostFromSessionStart(input, projectRoot) {
|
|
|
2237
2421
|
const transport = identity.provider === "grok" && environ.GROK_HOOK_EVENT?.trim()
|
|
2238
2422
|
? "grok-hook-event"
|
|
2239
2423
|
: "native";
|
|
2424
|
+
// SessionStart soft claim may take over a no-lease different-provider record
|
|
2425
|
+
// (#6143 P1/P4); RO CLI path must omit allowForeignTakeover.
|
|
2240
2426
|
// Native Cursor SessionStart must stay cursor even when GROK_SESSION_ID lingers.
|
|
2241
2427
|
if (input.host === "cursor" && transport === "native") {
|
|
2242
2428
|
publishApplyingHost(projectRoot, {
|
|
2243
2429
|
provider: "cursor",
|
|
2244
2430
|
rawSessionId: identity.rawSessionId,
|
|
2245
2431
|
transport: "native",
|
|
2432
|
+
allowForeignTakeover: true,
|
|
2246
2433
|
});
|
|
2247
2434
|
return;
|
|
2248
2435
|
}
|
|
@@ -2250,6 +2437,7 @@ function tryPublishApplyingHostFromSessionStart(input, projectRoot) {
|
|
|
2250
2437
|
provider: identity.provider,
|
|
2251
2438
|
rawSessionId: identity.rawSessionId,
|
|
2252
2439
|
transport,
|
|
2440
|
+
allowForeignTakeover: true,
|
|
2253
2441
|
});
|
|
2254
2442
|
}
|
|
2255
2443
|
catch {
|
|
@@ -2277,7 +2465,7 @@ function attachLifecycleIdentityRewrite(input, toolName, decision, seams) {
|
|
|
2277
2465
|
const identity = resolveHookHostIdentity(input.host, input.payload, input.environ ?? process.env);
|
|
2278
2466
|
const named = identity.status === "ok" && identity.sessionId !== null
|
|
2279
2467
|
? identity.sessionId
|
|
2280
|
-
:
|
|
2468
|
+
: UNRESOLVED_HOST_OWNER;
|
|
2281
2469
|
const hintedSession = inspectHintedLifecycleSessionId(input.payload);
|
|
2282
2470
|
if (hintedSession.status === "present" &&
|
|
2283
2471
|
identity.status === "ok" &&
|
|
@@ -2304,10 +2492,11 @@ function attachLifecycleIdentityRewrite(input, toolName, decision, seams) {
|
|
|
2304
2492
|
if (admission.kind === "foreign-owner") {
|
|
2305
2493
|
return deny(input, "occupancy-identity-conflict", toolName, withHookHostArgv(input.host, admission.message));
|
|
2306
2494
|
}
|
|
2495
|
+
const mismatchCommand = hookShellCommand(input.payload) ?? "";
|
|
2496
|
+
const mismatchExample = formatLauncherCorrectLifecycleRecovery(hinted, identity.sessionId, mismatchCommand);
|
|
2307
2497
|
return deny(input, "occupancy-identity-conflict", toolName, `Directive denied ${toolName}: lifecycle command ${hinted} names ` +
|
|
2308
2498
|
`${hintedSession.sessionId ?? "<missing>"}, but the host owner is ` +
|
|
2309
|
-
`${identity.sessionId}. Re-run as a simple command
|
|
2310
|
-
`--session-id=${identity.sessionId}.`);
|
|
2499
|
+
`${identity.sessionId}. Re-run as a simple command. Example: ${mismatchExample}.`);
|
|
2311
2500
|
}
|
|
2312
2501
|
if (hintedSession.status === "invalid") {
|
|
2313
2502
|
return deny(input, "occupancy-identity-conflict", toolName, `Directive denied lifecycle command ${hinted}: --session-id is empty, ` +
|
|
@@ -2335,6 +2524,8 @@ function attachLifecycleIdentityRewrite(input, toolName, decision, seams) {
|
|
|
2335
2524
|
: "native";
|
|
2336
2525
|
// Prefer deposit identity when it matches the named canonical owner.
|
|
2337
2526
|
const identity = resolveHookHostIdentity(input.host, input.payload, environ);
|
|
2527
|
+
// #6143 P4: RO SessionStart must not displace a different-provider fresh
|
|
2528
|
+
// record (omit allowForeignTakeover; publish defers foreign-fresh-claim).
|
|
2338
2529
|
if (identity.status === "ok" &&
|
|
2339
2530
|
identity.sessionId === lifecycle.sessionId &&
|
|
2340
2531
|
// Leftover GROK_SESSION_ID alone must not publish Cursor as Claude/grok.
|
|
@@ -2396,7 +2587,17 @@ function attachLifecycleIdentityRewrite(input, toolName, decision, seams) {
|
|
|
2396
2587
|
return denyIdentity("occupancy-identity-conflict", applyingAdmission.message);
|
|
2397
2588
|
}
|
|
2398
2589
|
let liveOwnerBypass = false;
|
|
2399
|
-
if (applyingAdmission.kind === "
|
|
2590
|
+
if (applyingAdmission.kind === "live-owner-cleanup") {
|
|
2591
|
+
// Deposit equals live lease holder (#6101 Prefer-A): effectiveOwner is the
|
|
2592
|
+
// live deposit identity; bare stays on the rewrite path (not soft-pass).
|
|
2593
|
+
liveOwnerBypass = true;
|
|
2594
|
+
}
|
|
2595
|
+
else if (applyingAdmission.kind === "advisory-takeover") {
|
|
2596
|
+
// #6143 P1: no-lease fresh applying-host is advisory; caller keeps identity
|
|
2597
|
+
// and may republish after lifecycle succeeds.
|
|
2598
|
+
liveOwnerBypass = true;
|
|
2599
|
+
}
|
|
2600
|
+
else if (applyingAdmission.kind === "foreign-owner") {
|
|
2400
2601
|
const live = liveOccupant(resolve(input.projectRoot));
|
|
2401
2602
|
if (live !== null && live.sessionId === identity.sessionId) {
|
|
2402
2603
|
// Applying-host was replaced by another SessionStart; keep live lease owner
|
|
@@ -2517,6 +2718,14 @@ function prepareProcessOnlyDestPath(destPath, projectRoot, seams, payload) {
|
|
|
2517
2718
|
destPath,
|
|
2518
2719
|
againstImplementationSha: against,
|
|
2519
2720
|
});
|
|
2721
|
+
// Strict false only: legacy success mocks may omit `ok` and still carry `record` (#6100).
|
|
2722
|
+
if (prepared.ok === false) {
|
|
2723
|
+
return {
|
|
2724
|
+
ok: false,
|
|
2725
|
+
message: `Directive denied process-only critic spawn: dest prepare failed: ${prepared.code}: ${prepared.message}. ` +
|
|
2726
|
+
"Parent must fetch origin and create or verify the dest at origin/<default> before spawn.",
|
|
2727
|
+
};
|
|
2728
|
+
}
|
|
2520
2729
|
return { ok: true, record: prepared.record };
|
|
2521
2730
|
}
|
|
2522
2731
|
catch (cause) {
|
|
@@ -2957,11 +3166,15 @@ function routeHookDecision(input, seams, observation) {
|
|
|
2957
3166
|
if (prospective !== null) {
|
|
2958
3167
|
return remapProxyShellUpdatedInput(input.payload, toolName, shellProxyUnwrap, attachLifecycleIdentityRewrite(shellInput, shellToolName, prospective, seams));
|
|
2959
3168
|
}
|
|
2960
|
-
const
|
|
3169
|
+
const pendingShellGrantConsume = [];
|
|
3170
|
+
const writeReissue = decideShellWriteReissue(shellInput, shellToolName, seams, observation, pendingShellGrantConsume);
|
|
2961
3171
|
if (writeReissue !== null) {
|
|
2962
3172
|
return remapProxyShellUpdatedInput(input.payload, toolName, shellProxyUnwrap, attachLifecycleIdentityRewrite(shellInput, shellToolName, writeReissue, seams));
|
|
2963
3173
|
}
|
|
2964
3174
|
const decision = decideShellDestFormsThenRuntimeAuthority(shellInput, shellToolName, seams, observation);
|
|
3175
|
+
if (decision.verdict === "allow") {
|
|
3176
|
+
consumePendingSingleUseGrants(resolve(shellInput.projectRoot), pendingShellGrantConsume);
|
|
3177
|
+
}
|
|
2965
3178
|
return remapProxyShellUpdatedInput(input.payload, toolName, shellProxyUnwrap, attachLifecycleIdentityRewrite(shellInput, shellToolName, decision, seams));
|
|
2966
3179
|
}
|
|
2967
3180
|
// Host kill deny-class / attestation gate (#5281 Prefer-A Bound).
|
|
@@ -3467,7 +3680,7 @@ export function evaluateProspectiveScopeCover(input) {
|
|
|
3467
3680
|
return {
|
|
3468
3681
|
ok: false,
|
|
3469
3682
|
message: `Prospective scope-cover denied: story write fence unreadable (#5656). ` +
|
|
3470
|
-
`${fence.unreadableDetail}`,
|
|
3683
|
+
`${fence.unreadableDetail}${formatStoryWriteFenceBaseNote(fence)}`,
|
|
3471
3684
|
uncovered: productStaged,
|
|
3472
3685
|
scopePath: scope.path,
|
|
3473
3686
|
};
|
|
@@ -3476,7 +3689,7 @@ export function evaluateProspectiveScopeCover(input) {
|
|
|
3476
3689
|
return {
|
|
3477
3690
|
ok: false,
|
|
3478
3691
|
message: `Prospective scope-cover denied: selected scope lacks positive governing ` +
|
|
3479
|
-
`allow file_scope (#5656)
|
|
3692
|
+
`allow file_scope (#5656).${formatStoryWriteFenceBaseNote(fence)} ${POSITIVE_GOVERNING_ALLOW_REQUIRED}`,
|
|
3480
3693
|
uncovered: productStaged,
|
|
3481
3694
|
scopePath: scope.path,
|
|
3482
3695
|
};
|