@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
package/dist/setup-wiring.js
CHANGED
|
@@ -9,6 +9,7 @@ import { fileURLToPath } from "node:url";
|
|
|
9
9
|
import { containedChmod, containedRemove, containedWrite, } from "../vendor/directive-core/dist/fs/contained-write.js";
|
|
10
10
|
import { DIRECT_WRITE_HOOK_MATCHER, KILL_HOOK_MATCHER, MCP_HOOK_MATCHER, SHELL_HOOK_MATCHER, SPAWN_HOOK_MATCHER, } from "../vendor/directive-core/dist/hooks/tools.js";
|
|
11
11
|
import { GROK_PRETOOLUSE_WRAPPER_REL_PATH, HOST_HOOK_MISSING_PIN_PROJECT_PM_GUIDANCE, hostHookOuterCommand, hostHookOuterRelPath, hostHookOuterSha8, hostHookOuterSource, isGrokWrapperCommand, isHostHookOuterCommand, } from "../vendor/directive-core/dist/init-deposit/agent-hooks.js";
|
|
12
|
+
import { DESIRED_GITATTRIBUTES_LINES, ensureGitattributes, LEGACY_CORE_TEXT_EOL_LF, } from "../vendor/directive-core/dist/init-deposit/scaffold.js";
|
|
12
13
|
import { INSTALLATION_RECOVERY_GUIDANCE, RUNTIME_PACKAGE_PATH_PREFIX, } from "../vendor/directive-core/dist/install-health/constants.js";
|
|
13
14
|
import { MANAGED_SECTION_CLOSE, MANAGED_SECTION_OPEN_PREFIX, } from "../vendor/directive-core/dist/install-health/index.js";
|
|
14
15
|
import { applyAgentsRefresh } from "../vendor/directive-core/dist/platform/agents-md.js";
|
|
@@ -31,6 +32,25 @@ function readText(path) {
|
|
|
31
32
|
return null;
|
|
32
33
|
}
|
|
33
34
|
}
|
|
35
|
+
/** Normalize CRLF/CR to LF for ownership/wrapper equality (#5995). */
|
|
36
|
+
export function normalizeEol(text) {
|
|
37
|
+
return text.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
|
|
38
|
+
}
|
|
39
|
+
/** True when two texts differ only by end-of-line convention (#5995). */
|
|
40
|
+
export function contentsEqualIgnoringEol(a, b) {
|
|
41
|
+
return normalizeEol(a) === normalizeEol(b);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* `.githooks` shell entrypoints must be LF on disk for `sh` (#5995 / PR #6151 P1).
|
|
45
|
+
* Ownership stays EOL-insensitive; these paths still rewrite CRLF-only drift.
|
|
46
|
+
*/
|
|
47
|
+
export function isShellHookEntrypoint(rel) {
|
|
48
|
+
const posix = rel.replace(/\\/g, "/");
|
|
49
|
+
if (!posix.startsWith(".githooks/"))
|
|
50
|
+
return false;
|
|
51
|
+
const base = posix.slice(posix.lastIndexOf("/") + 1);
|
|
52
|
+
return base.endsWith(".sh") || !base.includes(".");
|
|
53
|
+
}
|
|
34
54
|
function writeContained(projectRoot, relPath, body) {
|
|
35
55
|
containedWrite({
|
|
36
56
|
root: projectRoot,
|
|
@@ -47,6 +67,11 @@ function trackChange(projectRoot, rel, next) {
|
|
|
47
67
|
const prior = readText(join(projectRoot, rel));
|
|
48
68
|
if (prior === next)
|
|
49
69
|
return { created: false, modified: false };
|
|
70
|
+
// CRLF-vs-LF-only diffs are still Directive-managed; skip rewrite for non-shell
|
|
71
|
+
// paths (#5995). Shell hooks still need LF bytes so `sh` can exec them (#6151 P1).
|
|
72
|
+
if (prior !== null && contentsEqualIgnoringEol(prior, next) && !isShellHookEntrypoint(rel)) {
|
|
73
|
+
return { created: false, modified: false };
|
|
74
|
+
}
|
|
50
75
|
writeContained(projectRoot, rel, next);
|
|
51
76
|
return { created: prior === null, modified: prior !== null };
|
|
52
77
|
}
|
|
@@ -227,16 +252,126 @@ function ovprSlashWrapperContents(file) {
|
|
|
227
252
|
* (legacy .deft/core teaching or package-relative OVPR form).
|
|
228
253
|
*/
|
|
229
254
|
function isManagedSlashWrapper(raw, file, next) {
|
|
230
|
-
|
|
255
|
+
const rawN = normalizeEol(raw);
|
|
256
|
+
const nextN = normalizeEol(next);
|
|
257
|
+
if (rawN === nextN)
|
|
231
258
|
return true;
|
|
232
|
-
if (isThinWrapperMarkdown(
|
|
259
|
+
if (isThinWrapperMarkdown(rawN, file.dispatchPath))
|
|
233
260
|
return true;
|
|
234
261
|
// Already-rewritten OVPR wrapper: still thin + points at this dispatch path.
|
|
235
|
-
return (
|
|
236
|
-
|
|
237
|
-
(
|
|
238
|
-
|
|
239
|
-
|
|
262
|
+
return (rawN.startsWith("---\n") &&
|
|
263
|
+
rawN.includes(file.dispatchPath) &&
|
|
264
|
+
(rawN.includes(RUNTIME_PREFIX) || rawN.includes(".deft/core/")) &&
|
|
265
|
+
rawN.includes("Read and follow") &&
|
|
266
|
+
rawN.includes("Do not inline"));
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* True when `rel` has unstaged worktree edits vs the index (#6151 P1).
|
|
270
|
+
* No repo / no git / clean path → false (safe to report modified for staging).
|
|
271
|
+
*/
|
|
272
|
+
export function pathHasUnstagedChanges(projectRoot, rel) {
|
|
273
|
+
try {
|
|
274
|
+
const out = execFileSync("git", ["-C", projectRoot, "diff", "--name-only", "--", rel], {
|
|
275
|
+
encoding: "utf8",
|
|
276
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
277
|
+
});
|
|
278
|
+
return out.trim().length > 0;
|
|
279
|
+
}
|
|
280
|
+
catch {
|
|
281
|
+
return false;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
/** Left-unstaged disclosure when LF pins land on a dirty `.gitattributes` (#6151 P1). */
|
|
285
|
+
export const GITATTRIBUTES_STAGING_SKIPPED_DIRTY = ".gitattributes had unstaged local edits; LF pins were written but left unstaged so install/upgrade does not git add unrelated user changes (#6151 P1)";
|
|
286
|
+
const DESIRED_GITATTRIBUTES_LINE_SET = new Set([
|
|
287
|
+
...DESIRED_GITATTRIBUTES_LINES,
|
|
288
|
+
LEGACY_CORE_TEXT_EOL_LF,
|
|
289
|
+
]);
|
|
290
|
+
/**
|
|
291
|
+
* True when every attribute line is a known Directive core/managed marker (or
|
|
292
|
+
* Deft deposit comment). Foreign rules mean the file is not pure Directive-owned
|
|
293
|
+
* (#6151 P1 dirty-skip heuristic).
|
|
294
|
+
*/
|
|
295
|
+
export function isDirectiveManagedGitattributes(content) {
|
|
296
|
+
for (const raw of normalizeEol(content).split("\n")) {
|
|
297
|
+
const line = raw.trim();
|
|
298
|
+
if (line.length === 0)
|
|
299
|
+
continue;
|
|
300
|
+
if (line.startsWith("#")) {
|
|
301
|
+
if (line.startsWith("# Deft framework:") ||
|
|
302
|
+
line.startsWith("# Deft managed wiring:") ||
|
|
303
|
+
line.startsWith("# consumer source.") ||
|
|
304
|
+
line.startsWith("# byte identity") ||
|
|
305
|
+
line.startsWith("# to LF so Windows")) {
|
|
306
|
+
continue;
|
|
307
|
+
}
|
|
308
|
+
return false;
|
|
309
|
+
}
|
|
310
|
+
if (!DESIRED_GITATTRIBUTES_LINE_SET.has(line))
|
|
311
|
+
return false;
|
|
312
|
+
}
|
|
313
|
+
return true;
|
|
314
|
+
}
|
|
315
|
+
/** True when `rel` exists in the worktree but is not tracked (git repo only). */
|
|
316
|
+
function pathIsUntrackedInRepo(projectRoot, rel) {
|
|
317
|
+
try {
|
|
318
|
+
execFileSync("git", ["-C", projectRoot, "rev-parse", "--is-inside-work-tree"], {
|
|
319
|
+
encoding: "utf8",
|
|
320
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
catch {
|
|
324
|
+
return false;
|
|
325
|
+
}
|
|
326
|
+
try {
|
|
327
|
+
execFileSync("git", ["-C", projectRoot, "ls-files", "--error-unmatch", "--", rel], {
|
|
328
|
+
encoding: "utf8",
|
|
329
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
330
|
+
});
|
|
331
|
+
return false;
|
|
332
|
+
}
|
|
333
|
+
catch {
|
|
334
|
+
return existsSync(join(projectRoot, rel));
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Deposit narrow LF .gitattributes for managed wiring paths (#5995).
|
|
339
|
+
* Reuses scaffold ensureGitattributes (core markers + managed wiring lines).
|
|
340
|
+
* Reports created/modified so install/upgrade staging commits the pins (#6151 P1).
|
|
341
|
+
* When the path already has unstaged user edits (or an untracked foreign file),
|
|
342
|
+
* still appends missing pins but does not report modified (avoids staging WIP).
|
|
343
|
+
*/
|
|
344
|
+
export function ensureManagedPathGitattributes(projectRoot) {
|
|
345
|
+
const attrsRel = ".gitattributes";
|
|
346
|
+
const prior = readText(join(projectRoot, attrsRel));
|
|
347
|
+
// Compute dirty signal before write — post-write `git diff` is true for clean
|
|
348
|
+
// pin appends too, so it cannot alone decide staging (#6151 P1).
|
|
349
|
+
const hadUnstagedEdits = prior !== null && pathHasUnstagedChanges(projectRoot, attrsRel);
|
|
350
|
+
const untrackedForeign = prior !== null &&
|
|
351
|
+
!isDirectiveManagedGitattributes(prior) &&
|
|
352
|
+
pathIsUntrackedInRepo(projectRoot, attrsRel);
|
|
353
|
+
const wrote = ensureGitattributes(projectRoot, { printf: () => undefined });
|
|
354
|
+
if (!wrote)
|
|
355
|
+
return { created: false, modified: false, wrote: false };
|
|
356
|
+
if (prior === null)
|
|
357
|
+
return { created: true, modified: false, wrote: true };
|
|
358
|
+
const next = readText(join(projectRoot, attrsRel)) ?? "";
|
|
359
|
+
// After write: confirm unstaged still, or foreign prior that changed and was
|
|
360
|
+
// already dirty/untracked — never stage unfinished user WIP with the pins.
|
|
361
|
+
const stillUnstaged = pathHasUnstagedChanges(projectRoot, attrsRel);
|
|
362
|
+
const priorForeignChanged = !isDirectiveManagedGitattributes(prior) && !contentsEqualIgnoringEol(prior, next);
|
|
363
|
+
const treatAsDirty = hadUnstagedEdits ||
|
|
364
|
+
untrackedForeign ||
|
|
365
|
+
(stillUnstaged && priorForeignChanged && (hadUnstagedEdits || untrackedForeign));
|
|
366
|
+
if (treatAsDirty) {
|
|
367
|
+
return {
|
|
368
|
+
created: false,
|
|
369
|
+
modified: false,
|
|
370
|
+
wrote: true,
|
|
371
|
+
stagingSkippedNotice: GITATTRIBUTES_STAGING_SKIPPED_DIRTY,
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
return { created: false, modified: true, wrote: true };
|
|
240
375
|
}
|
|
241
376
|
/**
|
|
242
377
|
* Deposit host slash/prompt thin wrappers with package-relative targets (AC8.1 / AC8.10).
|
|
@@ -244,9 +379,22 @@ function isManagedSlashWrapper(raw, file, next) {
|
|
|
244
379
|
* Preserves consumer-custom command files and reports conflicts instead of clobbering.
|
|
245
380
|
*/
|
|
246
381
|
export function ensureSlashCommands(projectRoot) {
|
|
382
|
+
// Pin managed wiring paths to LF before compare/deposit (#5995).
|
|
383
|
+
const attrs = ensureManagedPathGitattributes(projectRoot);
|
|
247
384
|
const created = [];
|
|
248
385
|
const modified = [];
|
|
249
386
|
const conflicts = [];
|
|
387
|
+
const notices = [];
|
|
388
|
+
if (attrs.created) {
|
|
389
|
+
created.push(".gitattributes");
|
|
390
|
+
}
|
|
391
|
+
else if (attrs.stagingSkippedNotice) {
|
|
392
|
+
notices.push(attrs.stagingSkippedNotice);
|
|
393
|
+
// deliberately omit from modified — dirty user WIP must not be git-added
|
|
394
|
+
}
|
|
395
|
+
else if (attrs.modified && attrs.wrote) {
|
|
396
|
+
modified.push(".gitattributes");
|
|
397
|
+
}
|
|
250
398
|
const policy = loadHostSlashCommandsPolicyFromProject(projectRoot);
|
|
251
399
|
for (const hostId of listSlashEmitterHosts()) {
|
|
252
400
|
if (!isHostSlashCommandDepositEnabled(hostId, policy))
|
|
@@ -255,7 +403,9 @@ export function ensureSlashCommands(projectRoot) {
|
|
|
255
403
|
const body = ovprSlashWrapperContents(file);
|
|
256
404
|
const next = body.endsWith("\n") ? body : `${body}\n`;
|
|
257
405
|
const prior = readText(join(projectRoot, file.relativePath));
|
|
258
|
-
if (prior !== null &&
|
|
406
|
+
if (prior !== null &&
|
|
407
|
+
!contentsEqualIgnoringEol(prior, next) &&
|
|
408
|
+
!isManagedSlashWrapper(prior, file, next)) {
|
|
259
409
|
conflicts.push(`${file.relativePath}: existing command is not a Directive-managed wrapper; refusing to overwrite`);
|
|
260
410
|
continue;
|
|
261
411
|
}
|
|
@@ -266,7 +416,7 @@ export function ensureSlashCommands(projectRoot) {
|
|
|
266
416
|
modified.push(file.relativePath);
|
|
267
417
|
}
|
|
268
418
|
}
|
|
269
|
-
return { created, modified, conflicts };
|
|
419
|
+
return { created, modified, conflicts, notices };
|
|
270
420
|
}
|
|
271
421
|
/**
|
|
272
422
|
* Verified managed slash/prompt paths from the emitter inventory (AC8.1 / AC11.10).
|
|
@@ -692,7 +842,7 @@ export function ensureHostHooks(projectRoot, hostHooksPolicy = loadHostHooksPoli
|
|
|
692
842
|
continue;
|
|
693
843
|
const stripped = spec.strip(readJsonObject(abs));
|
|
694
844
|
const next = `${JSON.stringify(stripped, null, 2)}\n`;
|
|
695
|
-
if (prior === next)
|
|
845
|
+
if (prior === next || contentsEqualIgnoringEol(prior, next))
|
|
696
846
|
continue;
|
|
697
847
|
writeContained(projectRoot, spec.rel, next);
|
|
698
848
|
modified.push(spec.rel);
|
|
@@ -701,7 +851,7 @@ export function ensureHostHooks(projectRoot, hostHooksPolicy = loadHostHooksPoli
|
|
|
701
851
|
const base = prior === null ? {} : readJsonObject(abs);
|
|
702
852
|
const merged = spec.merge(base);
|
|
703
853
|
const next = `${JSON.stringify(merged, null, 2)}\n`;
|
|
704
|
-
if (prior === next)
|
|
854
|
+
if (prior === next || (prior !== null && contentsEqualIgnoringEol(prior, next)))
|
|
705
855
|
continue;
|
|
706
856
|
writeContained(projectRoot, spec.rel, next);
|
|
707
857
|
if (prior === null)
|
|
@@ -717,7 +867,7 @@ export function ensureHostHooks(projectRoot, hostHooksPolicy = loadHostHooksPoli
|
|
|
717
867
|
const enabled = isHostHookDepositEnabled(host, hostHooksPolicy);
|
|
718
868
|
if (enabled) {
|
|
719
869
|
const prior = readText(join(projectRoot, rel));
|
|
720
|
-
if (prior
|
|
870
|
+
if (prior === null || !contentsEqualIgnoringEol(prior, outerSource)) {
|
|
721
871
|
writeContained(projectRoot, rel, outerSource);
|
|
722
872
|
if (prior === null)
|
|
723
873
|
created.push(rel);
|
|
@@ -855,13 +1005,18 @@ export function ensureGitHooks(projectRoot, options = {}) {
|
|
|
855
1005
|
const rawNext = override ?? file.body;
|
|
856
1006
|
const next = rawNext.endsWith("\n") ? rawNext : `${rawNext}\n`;
|
|
857
1007
|
const prior = readText(join(projectRoot, file.rel));
|
|
858
|
-
if (prior !== null &&
|
|
1008
|
+
if (prior !== null &&
|
|
1009
|
+
!contentsEqualIgnoringEol(prior, next) &&
|
|
1010
|
+
!isOurGitHookBody(file.rel, prior)) {
|
|
859
1011
|
conflicts.push(`${file.rel}: existing hook is not Directive-managed; refusing to overwrite (chain or remove manually)`);
|
|
860
1012
|
continue;
|
|
861
1013
|
}
|
|
862
1014
|
// Tracked divergent preserve (#5837): never overwrite a committed hook body,
|
|
863
1015
|
// even a Directive-managed one, unless the operator forced the replace.
|
|
864
|
-
if (prior !== null &&
|
|
1016
|
+
if (prior !== null &&
|
|
1017
|
+
!contentsEqualIgnoringEol(prior, next) &&
|
|
1018
|
+
!force &&
|
|
1019
|
+
isGitTrackedPath(projectRoot, file.rel)) {
|
|
865
1020
|
preserved.push(formatTrackedHookPreserved(file.rel));
|
|
866
1021
|
continue;
|
|
867
1022
|
}
|
package/dist/verify-ac.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { VERIFY_AC_NO_OBLIGATION_EXIT } from "@deftai/directive-core/product-first-done-gate";
|
|
3
|
+
export { VERIFY_AC_NO_OBLIGATION_EXIT };
|
|
2
4
|
interface ParsedArgs {
|
|
3
5
|
projectRoot: string;
|
|
4
6
|
xbriefPath: string | null;
|
|
@@ -20,9 +22,12 @@ export type FindActiveXbriefResult = {
|
|
|
20
22
|
readonly paths: readonly string[];
|
|
21
23
|
readonly dir: string;
|
|
22
24
|
};
|
|
23
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Three-state exit: pass=0, fail=1, config=2, plus deliberate no-obligation=6.
|
|
27
|
+
* A printed pass must not leak 201. No-obligation is a named clamp exception so
|
|
28
|
+
* both check dispatch paths keep the distinct exit (#5855 Recut-8).
|
|
29
|
+
*/
|
|
24
30
|
export declare function clampVerifyAcExit(ok: boolean, code: number): number;
|
|
25
31
|
/** Run the gate and return the process exit code. */
|
|
26
32
|
export declare function run(argv: string[]): number;
|
|
27
|
-
export {};
|
|
28
33
|
//# sourceMappingURL=verify-ac.d.ts.map
|
package/dist/verify-ac.js
CHANGED
|
@@ -12,7 +12,8 @@ import { join, resolve } from "node:path";
|
|
|
12
12
|
import { fileURLToPath } from "node:url";
|
|
13
13
|
import { resolveSessionCompletedVerifyAcTarget } from "../vendor/directive-core/dist/check/index.js";
|
|
14
14
|
import { formatRejectedLedger, resolveLiteralAcceptanceDetailed, } from "../vendor/directive-core/dist/literal-acceptance/index.js";
|
|
15
|
-
import { emitVerifyAcTerminalOutcome, evaluateVerifyAcFromPath, readAdmittedSourceDigest, readAdmittedSourceSentences, readBranchBindContext, readPlanAcceptance, resolveAcceptanceGateProfile, resolveSoftMissingAcTargets, } from "../vendor/directive-core/dist/product-first-done-gate/index.js";
|
|
15
|
+
import { emitVerifyAcTerminalOutcome, evaluateVerifyAcFromPath, readAdmittedSourceDigest, readAdmittedSourceSentences, readBranchBindContext, readPlanAcceptance, resolveAcceptanceGateProfile, resolveSoftMissingAcTargets, VERIFY_AC_NO_OBLIGATION_EXIT, } from "../vendor/directive-core/dist/product-first-done-gate/index.js";
|
|
16
|
+
export { VERIFY_AC_NO_OBLIGATION_EXIT };
|
|
16
17
|
/** Parse verify:ac CLI args. */
|
|
17
18
|
export function parseArgs(argv) {
|
|
18
19
|
const parsed = {
|
|
@@ -104,10 +105,16 @@ function listActiveXbriefs(projectRoot) {
|
|
|
104
105
|
dir: dirs.join(" + "),
|
|
105
106
|
};
|
|
106
107
|
}
|
|
107
|
-
/**
|
|
108
|
+
/**
|
|
109
|
+
* Three-state exit: pass=0, fail=1, config=2, plus deliberate no-obligation=6.
|
|
110
|
+
* A printed pass must not leak 201. No-obligation is a named clamp exception so
|
|
111
|
+
* both check dispatch paths keep the distinct exit (#5855 Recut-8).
|
|
112
|
+
*/
|
|
108
113
|
export function clampVerifyAcExit(ok, code) {
|
|
109
114
|
if (ok)
|
|
110
115
|
return 0;
|
|
116
|
+
if (code === VERIFY_AC_NO_OBLIGATION_EXIT)
|
|
117
|
+
return VERIFY_AC_NO_OBLIGATION_EXIT;
|
|
111
118
|
if (code === 2)
|
|
112
119
|
return 2;
|
|
113
120
|
return 1;
|
|
@@ -291,10 +298,10 @@ export function run(argv) {
|
|
|
291
298
|
const selected = resolveSoftMissingAcTargets(projectRoot, {
|
|
292
299
|
env: process.env,
|
|
293
300
|
scannedPaths: found.paths,
|
|
294
|
-
branchBind: { ...bindContext, env: process.env },
|
|
301
|
+
branchBind: { ...bindContext, env: process.env, projectRoot },
|
|
295
302
|
});
|
|
296
303
|
if (selected.kind === "untied") {
|
|
297
|
-
// #5855 P3: completed-target precedence, then soft-missing
|
|
304
|
+
// #5855 P3: completed-target precedence, then soft-missing no-obligation.
|
|
298
305
|
const completed = resolveSessionCompletedVerifyAcTarget({
|
|
299
306
|
projectRoot,
|
|
300
307
|
env: process.env,
|
|
@@ -315,7 +322,8 @@ export function run(argv) {
|
|
|
315
322
|
process.stdout.write(`${selected.message}\n`);
|
|
316
323
|
}
|
|
317
324
|
emitVerifyAcTerminalOutcome({ projectRoot, env: process.env, outcome: "soft-missing" });
|
|
318
|
-
|
|
325
|
+
// Distinct non-zero: exit 0 keeps meaning executed AC only (#5855 Recut-8).
|
|
326
|
+
return VERIFY_AC_NO_OBLIGATION_EXIT;
|
|
319
327
|
}
|
|
320
328
|
}
|
|
321
329
|
else if (selected.kind === "one") {
|
|
@@ -10,7 +10,7 @@ export function parseArgs(argv) {
|
|
|
10
10
|
if (arg === "--project-root" || arg === "--pack-root") {
|
|
11
11
|
const value = argv[i + 1];
|
|
12
12
|
if (value === undefined) {
|
|
13
|
-
return { ...parsed, error:
|
|
13
|
+
return { ...parsed, error: `argument ${arg}: expected one argument` };
|
|
14
14
|
}
|
|
15
15
|
parsed.projectRoot = value;
|
|
16
16
|
parsed.packRootExplicit = arg === "--pack-root";
|
|
@@ -24,7 +24,7 @@ export function parseArgs(argv) {
|
|
|
24
24
|
parsed.packRootExplicit = true;
|
|
25
25
|
}
|
|
26
26
|
else {
|
|
27
|
-
return { ...parsed, error:
|
|
27
|
+
return { ...parsed, error: `unrecognized argument: ${String(arg)}` };
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
return parsed;
|
|
@@ -33,16 +33,16 @@ export function parseArgs(argv) {
|
|
|
33
33
|
export function run(argv) {
|
|
34
34
|
const args = parseArgs(argv);
|
|
35
35
|
if (args.error !== undefined) {
|
|
36
|
-
process.stderr.write(
|
|
36
|
+
process.stderr.write(`verify_deposit_closure: ${args.error}\n`);
|
|
37
37
|
return 2;
|
|
38
38
|
}
|
|
39
39
|
const root = resolve(args.projectRoot);
|
|
40
40
|
const result = evaluateDepositClosureAtRoot(root, args.packRootExplicit);
|
|
41
41
|
if (result.stream === "stdout") {
|
|
42
|
-
process.stdout.write(result.message
|
|
42
|
+
process.stdout.write(`${result.message}\n`);
|
|
43
43
|
}
|
|
44
44
|
else {
|
|
45
|
-
process.stderr.write(result.message
|
|
45
|
+
process.stderr.write(`${result.message}\n`);
|
|
46
46
|
}
|
|
47
47
|
return result.code;
|
|
48
48
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/** Fallback when package.json cannot be read. Keep aligned with
|
|
2
|
-
export declare const PACKAGE_BIN_NAMES: readonly ["directive", "deft", "deft-
|
|
1
|
+
/** Fallback when package.json cannot be read. Keep aligned with launcher bin map (#5997). */
|
|
2
|
+
export declare const PACKAGE_BIN_NAMES: readonly ["directive", "deft", "deft-hook"];
|
|
3
3
|
/** Node owns these shims. This package must not delete them. */
|
|
4
4
|
export declare const NODE_OWNED_SHIM_NAMES: readonly ["npx", "npm"];
|
|
5
5
|
export interface Ps1ShimRemoval {
|
package/dist/windows-bin-ps1.js
CHANGED
|
@@ -1,24 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* npm's Windows bin linker (cmd-shim) always writes a .ps1 beside the .cmd.
|
|
3
3
|
* PowerShell selects that .ps1 and stops when script execution is refused, so
|
|
4
|
-
* the bare name never reaches the .cmd.
|
|
4
|
+
* the bare name never reaches the .cmd. Launcher postinstall runs this after
|
|
5
5
|
* that link, and removes only this package's generated .ps1 files.
|
|
6
6
|
* A .ps1 is removed only when its sibling .cmd records a target inside this
|
|
7
7
|
* install, so an ambient PNPM_HOME from another install is left alone.
|
|
8
8
|
* It does not change npx.ps1, npm.ps1, or the operator's execution policy.
|
|
9
|
-
* Codex deposits bare deft-hook (#4659)
|
|
10
|
-
* Get-Command
|
|
9
|
+
* Codex deposits bare deft-hook (#4659). Launcher postinstall (#5997) runs this
|
|
10
|
+
* cleanup so Restricted Get-Command selects deft-hook.cmd without Bypass.
|
|
11
11
|
*/
|
|
12
12
|
import { existsSync, readFileSync, realpathSync, unlinkSync } from "node:fs";
|
|
13
13
|
import { basename, dirname, join, win32 } from "node:path";
|
|
14
|
-
/** Fallback when package.json cannot be read. Keep aligned with
|
|
15
|
-
export const PACKAGE_BIN_NAMES = [
|
|
16
|
-
"directive",
|
|
17
|
-
"deft",
|
|
18
|
-
"deft-ts",
|
|
19
|
-
"deft-hook",
|
|
20
|
-
"deft-verify-encoding",
|
|
21
|
-
];
|
|
14
|
+
/** Fallback when package.json cannot be read. Keep aligned with launcher bin map (#5997). */
|
|
15
|
+
export const PACKAGE_BIN_NAMES = ["directive", "deft", "deft-hook"];
|
|
22
16
|
/** Node owns these shims. This package must not delete them. */
|
|
23
17
|
export const NODE_OWNED_SHIM_NAMES = ["npx", "npm"];
|
|
24
18
|
export function packageIsUnderNodeModules(pkgDir) {
|
|
@@ -82,11 +82,11 @@ rm .deft-directive-disable
|
|
|
82
82
|
# Start a NEW agent session
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
-
## Agent self-serve ban
|
|
85
|
+
## Agent self-serve ban (always-on, grant-gated) (#3186 / #6136)
|
|
86
86
|
|
|
87
|
-
Operators plant and remove this flag **outside** an agent session (or with a prior human-origin grant).
|
|
87
|
+
Operators plant and remove this flag **outside** an agent session (or with a prior human-origin grant covering **settings**). PreToolUse **always** denies agent Write / Edit / Shell that creates or renames-to `.deft-directive-disable` (and permanent opt-out `.no-deft-directive`) without that grant — not only under active UAT. Shell write reissue checks the protected basename **before** skipping out-of-tree dests, so a plant outside the repo tree cannot fail-open. Agents must not self-serve the kill-switch to bypass Write / push / PR / merge gates.
|
|
88
88
|
|
|
89
|
-
Related: `policy:allow-bot-merge`, `policy:allow-direct-commits`, and `policy:disable-directive` (peers) are
|
|
89
|
+
Related: `policy:allow-bot-merge`, `policy:allow-direct-commits`, and `policy:disable-directive` (peers) are settings under UAT and require a human grant.
|
|
90
90
|
|
|
91
91
|
## Non-goals (v1)
|
|
92
92
|
|
package/docs/scope-provenance.md
CHANGED
|
@@ -73,6 +73,10 @@ When an active implementation brief is **outside** the change set, membership is
|
|
|
73
73
|
|
|
74
74
|
Membership-land (Path B activation) PRs that only touch nonterminal `xbrief|vbrief` under `proposed|pending|active` plus optional root `CHANGELOG.md` leave `metadata.productPullRequest` **unset**. Closing-keywords admits that brief-land shape when body has `deft-story: N` covering each changed nonterminal (`isBriefLandShapedDiff` + early return in `evaluateFullStoryMarkAdmission`). Optional `metadata.activationPullRequest` is provenance only — delivery readers ignore it. The stacked product PR stamps virgin `productPullRequest` on the existing null path; leftover keeps the original product stamp. ⊗ Write the activation PR number into `productPullRequest`. Legacy stamped activations unstamp once, then product stamps. Depth: `packages/core/src/pr-closing-keywords/main.ts`.
|
|
75
75
|
|
|
76
|
+
### Path B activation vs product `verify:ac` (#5792)
|
|
77
|
+
|
|
78
|
+
Scope-only Path B activation must be able to clear `deft check` before merge-base write authority exists. Check inventories the complete local change set (merge-base..HEAD ∪ dirty ∪ cached ∪ untracked, with rename origins) into `PrDiffPath`, then reuses the Path B witness (`evaluatePathBActivationAdmit`). Inventory base prefers typed `plan.policy.deliveryBranch` / remote default before `master`|`main`, and git-toplevel paths are remapped to `projectRoot` so nested consumers keep brief-land shape. When the inventory is brief-land shaped and the witness admits, check records one named disposition `path_b_activation_deferred` and **defers** product acceptance commands and artifact-clause execution — it does not selectively forgive opaque npm failures and does not bank as a later product verified-pass. Local check without a PR body uses inventory brief issue-ref identity instead of `deft-story` marks; when a PR body is present, mark coverage still applies. Any product path in the inventory, or `productPullRequest` set, restores full `verify:ac`. Write authority stays merge-base-only (`loadStoryWriteFenceFromMergeBase` unchanged). Depth: `packages/core/src/verify-ac/evaluate.ts`, `packages/core/src/check/cached-orchestrator.ts`.
|
|
79
|
+
|
|
76
80
|
|
|
77
81
|
## Historical ship-closeout for stale merged actives (#5403)
|
|
78
82
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deftai/directive-runtime",
|
|
3
|
-
"version": "0.129.
|
|
3
|
+
"version": "0.129.6",
|
|
4
4
|
"description": "Directive runtime — pinned product commands, hooks, content, and engine.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://deftai.github.io/directive/",
|
|
@@ -82,7 +82,6 @@
|
|
|
82
82
|
"typescript": "^5.9.3"
|
|
83
83
|
},
|
|
84
84
|
"scripts": {
|
|
85
|
-
"build": "tsc -b"
|
|
86
|
-
"postinstall": "node ./scripts/remove-windows-ps1-shims.mjs"
|
|
85
|
+
"build": "tsc -b"
|
|
87
86
|
}
|
|
88
87
|
}
|
|
@@ -711,6 +711,21 @@
|
|
|
711
711
|
],
|
|
712
712
|
"source": "Issue #4888 Prefer-A Bound 6050812821 (parent #964). conflict_group mergeable-state-semantic-policy-invisibility.",
|
|
713
713
|
"body": "**Source:** Issue #4888 Prefer-A Bound 6050812821 (split from parent #964).\n\n**Failure mode:** GitHub `mergeable_state` / `mergeable` report only textual (axis-1) conflicts. After a PR opens, behavioral (CI/test) and policy (`task check` / required contexts) gates can land on the base without a textual conflict. Agents read dirty/clean as readiness or gap-size and miss the invisible policy miss until `task check` runs on the merge result.\n\n**Rule:** Use the three-axis model (textual / behavioral / policy). On conflict-resolve and behind-rebase (PR open; local HEAD matches live remote PR head), require machine-checkable candidate validation keyed to `(pr_head_sha, target_head_sha)` via `evaluateNonCascadeCandidateGreen` / `evaluateSemanticGreen({ requireCandidateValidation: true })`. Attestation is a named allowlisted probe exit 0 (typically pre-pr `task check` / `deft check`); prose stamps are not success. On pre-push, run that local merge-chokepoint gate before push; require the SHA-pair attestation only after push when local HEAD matches the live remote PR head. Do not weaken `--cascade` absolute stale-base refusal. Keep #4889 out; do not satisfy with a withdrawn Python semantic-drift script SoT. Forge supersession is #633/#1517 required Merge gate aggregator + up-to-date-required; local probe is interim.\n\n**Canonical encoding (strongest-applicable layer):** probe in `packages/core/src/pr-wait-mergeable/semantic-green.ts` (`requireCandidateValidation` / `validateCandidateAttestation`); operative MUST in `content/scm/github.md` § Cascade / Three-axis (#4888) and `skills/deft-directive-pre-pr/SKILL.md` merge-chokepoint attach; forge supersession in `content/scm/github.md` § Merge-gate aggregator (#633). AGENTS/agents-entry pointer only.\n\n**Cross-references:** #4888, #964, #2385, #1369, #633, #1517, #4883 (CLEAN = axis-1 necessity), #4889 (kept out)."
|
|
714
|
+
},
|
|
715
|
+
{
|
|
716
|
+
"id": "edit-files-search-strings-must-capture-full-units-not-substrings-2026-05",
|
|
717
|
+
"title": "edit_files search strings MUST capture full units, not substrings (2026-05)",
|
|
718
|
+
"date": "2026-05",
|
|
719
|
+
"issue_refs": [
|
|
720
|
+
"#1037"
|
|
721
|
+
],
|
|
722
|
+
"tags": [
|
|
723
|
+
"debugging",
|
|
724
|
+
"agent-orchestration",
|
|
725
|
+
"github"
|
|
726
|
+
],
|
|
727
|
+
"source": "Issue #1037 Prefer-A Bound 6689115138. Recurrence: PR #1034 (2026-05-11); #911 cascade (2026-05-04).",
|
|
728
|
+
"body": "**Source:** Issue #1037 Prefer-A Bound 6689115138. Recurrence: PR #1034 (2026-05-11) Greptile P1 on truncated CHANGELOG #441 close-out bullet; sibling outcome class in the #911 cascade (2026-05-04).\n\n**Failure mode:** Exact-string replace tools (`edit_files` / StrReplace-class) replace only the matched `search` bytes. When the agent anchors on a substring of a longer single-line or multi-line entry (CHANGELOG bullet, ROADMAP list item, section body), the unmatched overflow past the search anchor is deleted with the match. The tool did what it was asked; the agent chose too short a search.\n\n**Rule:** When using exact-string-match replacement to modify a single-line or multi-line entry, the `search` value MUST match the FULL line / FULL entry being targeted, including any trailing prose / continuation the agent intends to preserve.\n\n**Anti-pattern:** Pick the first N words of a long bullet as the search anchor; the replacement silently truncates the bullet at the end of the matched substring.\n\n**Mitigation:**\n- ! When targeting a markdown bullet, the `search` value MUST extend to the next blank line or the next top-level list marker, whichever comes first. Re-read the file and capture ALL bytes that belong to the targeted entry.\n- ! When adding a new bullet ABOVE an existing one, an even safer pattern is to anchor `search` on the section heading (e.g. `### Refinement`) and re-emit the heading in `replace` followed by the new bullet and the existing first bullet -- but you MUST still capture every byte of that existing first bullet.\n- ! After every exact-string replace that touches CHANGELOG.md, ROADMAP.md, or any other append-only narrative file, re-read the surrounding 20 lines of the edited region and verify nothing was truncated. This is part of the standard pre-commit file review.\n\n**Recurrence record:**\n- PR #1034 (2026-05-11) -- CHANGELOG.md `### Refinement` first bullet truncated when adding a new bullet above it; Greptile caught it as a P1 in review-cycle.\n- PR #911 cascade (2026-05-04) -- different mechanism (HEAD-only slice resolution), same outcome class: CHANGELOG `[Unreleased]` branch entries dropped on conflict resolution.\n\n**Canonical encoding:** lessons-pack-0.1 entry (this body); projected via `task packs:render` into `meta/lessons.md`. Lesson-tier only -- no new AGENTS.md always-pin; optional `verify:changelog-bullets` stays out of Bound (#1037 Prefer-A Reject).\n\n**Cross-references:** Issue #1037, Prefer-A Bound 6689115138, PR #1034, PR #911 cascade, `skills/deft-directive-build/SKILL.md` / `skills/deft-directive-refinement/SKILL.md` pre-commit file review."
|
|
714
729
|
}
|
|
715
730
|
]
|
|
716
731
|
}
|