@deftai/directive-runtime 0.129.6 → 0.129.8
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 +103 -16
- package/commands.md +8 -3
- package/dist/session-start.d.ts +8 -2
- package/dist/session-start.js +33 -12
- package/dist/vbrief-preflight.d.ts +4 -0
- package/dist/vbrief-preflight.js +34 -0
- package/dist/verify-scope-provenance.d.ts +13 -1
- package/dist/verify-scope-provenance.js +44 -1
- package/docs/getting-started.md +2 -0
- package/docs/scope-provenance.md +15 -1
- package/package.json +1 -1
- package/packs/skills/skills-pack-0.1.json +1 -1
- package/scm/github.md +5 -0
- package/skills/deft-directive-review-cycle/SKILL.md +15 -6
- package/skills/deft-directive-swarm/references/host-claude-code.md +11 -1
- package/skills/deft-directive-swarm/references/host-grok-build.md +3 -2
- package/vendor/directive-content/Taskfile.yml +103 -16
- package/vendor/directive-content/commands.md +8 -3
- package/vendor/directive-content/docs/getting-started.md +2 -0
- package/vendor/directive-content/docs/scope-provenance.md +15 -1
- package/vendor/directive-content/packs/skills/skills-pack-0.1.json +1 -1
- package/vendor/directive-content/scm/github.md +5 -0
- package/vendor/directive-content/skills/deft-directive-review-cycle/SKILL.md +15 -6
- package/vendor/directive-content/skills/deft-directive-swarm/references/host-claude-code.md +11 -1
- package/vendor/directive-content/skills/deft-directive-swarm/references/host-grok-build.md +3 -2
- package/vendor/directive-core/dist/.tsbuildinfo +1 -1
- package/vendor/directive-core/dist/check/context.d.ts.map +1 -1
- package/vendor/directive-core/dist/check/context.js +3 -31
- package/vendor/directive-core/dist/check/context.js.map +1 -1
- package/vendor/directive-core/dist/check/gate-lists.d.ts.map +1 -1
- package/vendor/directive-core/dist/check/gate-lists.js +4 -32
- package/vendor/directive-core/dist/check/gate-lists.js.map +1 -1
- package/vendor/directive-core/dist/check/walk-test-files.d.ts +3 -0
- package/vendor/directive-core/dist/check/walk-test-files.d.ts.map +1 -0
- package/vendor/directive-core/dist/check/walk-test-files.js +67 -0
- package/vendor/directive-core/dist/check/walk-test-files.js.map +1 -0
- package/vendor/directive-core/dist/fs/contained-write.d.ts +8 -2
- package/vendor/directive-core/dist/fs/contained-write.d.ts.map +1 -1
- package/vendor/directive-core/dist/fs/contained-write.js +22 -6
- package/vendor/directive-core/dist/fs/contained-write.js.map +1 -1
- package/vendor/directive-core/dist/hooks/dispatcher.d.ts +7 -1
- package/vendor/directive-core/dist/hooks/dispatcher.d.ts.map +1 -1
- package/vendor/directive-core/dist/hooks/dispatcher.js +180 -10
- package/vendor/directive-core/dist/hooks/dispatcher.js.map +1 -1
- package/vendor/directive-core/dist/hooks/scope.d.ts +54 -0
- package/vendor/directive-core/dist/hooks/scope.d.ts.map +1 -1
- package/vendor/directive-core/dist/hooks/scope.js +83 -2
- package/vendor/directive-core/dist/hooks/scope.js.map +1 -1
- package/vendor/directive-core/dist/init-deposit/agent-hooks.d.ts +26 -1
- package/vendor/directive-core/dist/init-deposit/agent-hooks.d.ts.map +1 -1
- package/vendor/directive-core/dist/init-deposit/agent-hooks.js +52 -3
- package/vendor/directive-core/dist/init-deposit/agent-hooks.js.map +1 -1
- package/vendor/directive-core/dist/init-deposit/host-hook-outer.d.ts +43 -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 +148 -0
- package/vendor/directive-core/dist/init-deposit/host-hook-outer.js.map +1 -1
- package/vendor/directive-core/dist/intake/reconcile-issues.d.ts +33 -1
- package/vendor/directive-core/dist/intake/reconcile-issues.d.ts.map +1 -1
- package/vendor/directive-core/dist/intake/reconcile-issues.js +288 -12
- package/vendor/directive-core/dist/intake/reconcile-issues.js.map +1 -1
- package/vendor/directive-core/dist/intake/thin-brief.d.ts +78 -0
- package/vendor/directive-core/dist/intake/thin-brief.d.ts.map +1 -0
- package/vendor/directive-core/dist/intake/thin-brief.js +224 -0
- package/vendor/directive-core/dist/intake/thin-brief.js.map +1 -0
- package/vendor/directive-core/dist/policy/ceremony-dial.d.ts.map +1 -1
- package/vendor/directive-core/dist/policy/ceremony-dial.js +2 -1
- package/vendor/directive-core/dist/policy/ceremony-dial.js.map +1 -1
- package/vendor/directive-core/dist/policy/small-change-lane.d.ts +193 -0
- package/vendor/directive-core/dist/policy/small-change-lane.d.ts.map +1 -0
- package/vendor/directive-core/dist/policy/small-change-lane.js +690 -0
- package/vendor/directive-core/dist/policy/small-change-lane.js.map +1 -0
- package/vendor/directive-core/dist/pr-merge-readiness/slizard-gate.d.ts +10 -5
- package/vendor/directive-core/dist/pr-merge-readiness/slizard-gate.d.ts.map +1 -1
- package/vendor/directive-core/dist/pr-merge-readiness/slizard-gate.js +41 -18
- package/vendor/directive-core/dist/pr-merge-readiness/slizard-gate.js.map +1 -1
- package/vendor/directive-core/dist/preflight/evaluate.d.ts +3 -0
- package/vendor/directive-core/dist/preflight/evaluate.d.ts.map +1 -1
- package/vendor/directive-core/dist/preflight/evaluate.js +15 -0
- package/vendor/directive-core/dist/preflight/evaluate.js.map +1 -1
- package/vendor/directive-core/dist/preflight-gh/pre-push.d.ts +3 -2
- package/vendor/directive-core/dist/preflight-gh/pre-push.d.ts.map +1 -1
- package/vendor/directive-core/dist/preflight-gh/pre-push.js +19 -18
- package/vendor/directive-core/dist/preflight-gh/pre-push.js.map +1 -1
- package/vendor/directive-core/dist/product-first-done-gate/evaluate.d.ts +6 -0
- package/vendor/directive-core/dist/product-first-done-gate/evaluate.d.ts.map +1 -1
- package/vendor/directive-core/dist/product-first-done-gate/evaluate.js +26 -0
- package/vendor/directive-core/dist/product-first-done-gate/evaluate.js.map +1 -1
- package/vendor/directive-core/dist/scope/decomposed-refs.d.ts +7 -0
- package/vendor/directive-core/dist/scope/decomposed-refs.d.ts.map +1 -1
- package/vendor/directive-core/dist/scope/decomposed-refs.js +27 -10
- package/vendor/directive-core/dist/scope/decomposed-refs.js.map +1 -1
- package/vendor/directive-core/dist/scope/delivery-evidence.d.ts +218 -19
- package/vendor/directive-core/dist/scope/delivery-evidence.d.ts.map +1 -1
- package/vendor/directive-core/dist/scope/delivery-evidence.js +973 -107
- package/vendor/directive-core/dist/scope/delivery-evidence.js.map +1 -1
- package/vendor/directive-core/dist/scope/transition.d.ts +7 -1
- package/vendor/directive-core/dist/scope/transition.d.ts.map +1 -1
- package/vendor/directive-core/dist/scope/transition.js +45 -5
- package/vendor/directive-core/dist/scope/transition.js.map +1 -1
- package/vendor/directive-core/dist/scope-provenance/base-fence.d.ts +13 -3
- package/vendor/directive-core/dist/scope-provenance/base-fence.d.ts.map +1 -1
- package/vendor/directive-core/dist/scope-provenance/base-fence.js +25 -2
- package/vendor/directive-core/dist/scope-provenance/base-fence.js.map +1 -1
- package/vendor/directive-core/dist/scope-provenance/evaluate.d.ts +12 -0
- package/vendor/directive-core/dist/scope-provenance/evaluate.d.ts.map +1 -1
- package/vendor/directive-core/dist/scope-provenance/evaluate.js +41 -5
- package/vendor/directive-core/dist/scope-provenance/evaluate.js.map +1 -1
- package/vendor/directive-core/dist/scope-provenance/forge-approval.d.ts +106 -0
- package/vendor/directive-core/dist/scope-provenance/forge-approval.d.ts.map +1 -0
- package/vendor/directive-core/dist/scope-provenance/forge-approval.js +382 -0
- package/vendor/directive-core/dist/scope-provenance/forge-approval.js.map +1 -0
- package/vendor/directive-core/dist/session/orientation-compression.d.ts +18 -2
- package/vendor/directive-core/dist/session/orientation-compression.d.ts.map +1 -1
- package/vendor/directive-core/dist/session/orientation-compression.js +38 -5
- package/vendor/directive-core/dist/session/orientation-compression.js.map +1 -1
- package/vendor/directive-core/dist/session/session-start.d.ts +47 -2
- package/vendor/directive-core/dist/session/session-start.d.ts.map +1 -1
- package/vendor/directive-core/dist/session/session-start.js +149 -1
- package/vendor/directive-core/dist/session/session-start.js.map +1 -1
- package/vendor/directive-core/dist/swarm/approach1-babysitter.d.ts +18 -4
- package/vendor/directive-core/dist/swarm/approach1-babysitter.d.ts.map +1 -1
- package/vendor/directive-core/dist/swarm/approach1-babysitter.js +28 -4
- package/vendor/directive-core/dist/swarm/approach1-babysitter.js.map +1 -1
- package/vendor/directive-core/dist/swarm/finalize-cohort.d.ts +48 -0
- package/vendor/directive-core/dist/swarm/finalize-cohort.d.ts.map +1 -1
- package/vendor/directive-core/dist/swarm/finalize-cohort.js +175 -19
- package/vendor/directive-core/dist/swarm/finalize-cohort.js.map +1 -1
- package/vendor/directive-core/dist/swarm/finalize-owed.d.ts +18 -3
- package/vendor/directive-core/dist/swarm/finalize-owed.d.ts.map +1 -1
- package/vendor/directive-core/dist/swarm/finalize-owed.js +139 -32
- 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 +4 -8
- package/vendor/directive-core/dist/swarm/launch.js.map +1 -1
- package/vendor/directive-core/dist/swarm/worker-auth-assignment.d.ts +7 -0
- package/vendor/directive-core/dist/swarm/worker-auth-assignment.d.ts.map +1 -1
- package/vendor/directive-core/dist/swarm/worker-auth-assignment.js +16 -1
- package/vendor/directive-core/dist/swarm/worker-auth-assignment.js.map +1 -1
- package/vendor/directive-core/dist/task-surface/index.d.ts.map +1 -1
- package/vendor/directive-core/dist/task-surface/index.js +41 -0
- package/vendor/directive-core/dist/task-surface/index.js.map +1 -1
- package/vendor/directive-core/dist/triage/evaluate/worktrees.d.ts.map +1 -1
- package/vendor/directive-core/dist/triage/evaluate/worktrees.js +219 -60
- package/vendor/directive-core/dist/triage/evaluate/worktrees.js.map +1 -1
- package/vendor/directive-core/dist/vbrief-reconcile/types.d.ts +5 -1
- package/vendor/directive-core/dist/vbrief-reconcile/types.d.ts.map +1 -1
- package/vendor/directive-core/dist/vbrief-reconcile/umbrellas.d.ts.map +1 -1
- package/vendor/directive-core/dist/vbrief-reconcile/umbrellas.js +19 -7
- package/vendor/directive-core/dist/vbrief-reconcile/umbrellas.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,EAQtB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAK1E,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,+CAA+C,CAAC;AACvD,OAAO,EACL,0BAA0B,EAG3B,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EACL,qBAAqB,EAGtB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAQL,KAAK,sBAAsB,EAE5B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAML,KAAK,mBAAmB,EACzB,MAAM,0BAA0B,CAAC;AAOlC,OAAO,EAIL,KAAK,SAAS,EAIf,MAAM,mBAAmB,CAAC;AAqC3B,OAAO,EACL,KAAK,mBAAmB,EAExB,KAAK,YAAY,EACjB,KAAK,YAAY,EAIlB,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"dispatcher.d.ts","sourceRoot":"","sources":["../../src/hooks/dispatcher.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,UAAU,EAKf,KAAK,gBAAgB,EAQtB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAK1E,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,+CAA+C,CAAC;AACvD,OAAO,EACL,0BAA0B,EAG3B,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EACL,qBAAqB,EAGtB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAQL,KAAK,sBAAsB,EAE5B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAML,KAAK,mBAAmB,EACzB,MAAM,0BAA0B,CAAC;AAOlC,OAAO,EAIL,KAAK,SAAS,EAIf,MAAM,mBAAmB,CAAC;AAqC3B,OAAO,EACL,KAAK,mBAAmB,EA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ingHonor, extractModelFromLauncherArgv, extractRequestedModelFromPayload, extractStructuralWorkerRole, } from "../swarm/routing-honor.js";
|
|
30
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
|
+
import { GROK_SPAWN_WRITING_SKIP_CLASS_FIELD, PROCESS_ONLY_FLAG_KEYS } from "./classify/payload.js";
|
|
32
33
|
import { defaultCursorPlanChoiceDeps, isCursorPlanChoiceManagedPath, storeDenyMessage, } from "./cursor-plan-choice/index.js";
|
|
33
34
|
import { classifyGitDestructive, classifyProductDestForms, payloadWithInjectedWriteTarget, } from "./dest-form.js";
|
|
34
35
|
import { decidePlanChoiceWithHatch, decideQuestionHatchGate, decideQuestionHatchPauseGate, decideSpendRecommendGate, } from "./dispatcher-plan-choice.js";
|
|
@@ -37,7 +38,7 @@ import { classifyLauncherFamilyArgv } from "./launcher-argv.js";
|
|
|
37
38
|
import { isLexicalOutsideProjectRoot, isOutsideProjectRootWrite } from "./outside-project-root.js";
|
|
38
39
|
import { restampOwnerLivenessOnHookEvent, } from "./owner-liveness.js";
|
|
39
40
|
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, } from "./scope.js";
|
|
41
|
+
import { inspectActiveScope, POSITIVE_GOVERNING_ALLOW_REQUIRED, resolveWorktreeStoryBinding, } from "./scope.js";
|
|
41
42
|
import { classifyShellWriteTargets, isInRepoShellWritePath, isKillSwitchShellWriteBasename, } from "./shell-write-targets.js";
|
|
42
43
|
import { effectiveHookArgumentView, effectiveHookToolName, expectsLocalMutationDest, isApplyPatchTool, isDirectWriteTool, isKillTool, isMcpProxyWrapper, isMcpTool, isMcpWriteShaped, isShellTool, isSpawnTool, } from "./tools.js";
|
|
43
44
|
// Pure parse/classify helpers are defined in ./classify/ and re-exported from
|
|
@@ -100,7 +101,117 @@ function isLauncherFamilySpawnNotReady(input, toolName) {
|
|
|
100
101
|
});
|
|
101
102
|
return launcher.kind === "launcher" || launcher.kind === "compound";
|
|
102
103
|
}
|
|
104
|
+
function recordPayload4781(value) {
|
|
105
|
+
return value !== null && typeof value === "object" && !Array.isArray(value)
|
|
106
|
+
? value
|
|
107
|
+
: null;
|
|
108
|
+
}
|
|
109
|
+
function fieldString4781(input, key) {
|
|
110
|
+
const value = input[key];
|
|
111
|
+
if (typeof value === "string" && value.trim().length > 0)
|
|
112
|
+
return value.trim();
|
|
113
|
+
return null;
|
|
114
|
+
}
|
|
115
|
+
function toolInput4781(payload) {
|
|
116
|
+
return (recordPayload4781(payload.tool_input) ??
|
|
117
|
+
recordPayload4781(payload.toolInput) ??
|
|
118
|
+
recordPayload4781(payload.input) ??
|
|
119
|
+
recordPayload4781(payload.arguments) ??
|
|
120
|
+
payload);
|
|
121
|
+
}
|
|
122
|
+
function fieldTruthy4781(input, key) {
|
|
123
|
+
const value = input[key];
|
|
124
|
+
if (value === true)
|
|
125
|
+
return true;
|
|
126
|
+
if (typeof value === "number")
|
|
127
|
+
return value === 1;
|
|
128
|
+
if (typeof value === "string") {
|
|
129
|
+
const t = value.trim().toLowerCase();
|
|
130
|
+
return t === "1" || t === "true" || t === "yes" || t === "on";
|
|
131
|
+
}
|
|
132
|
+
return false;
|
|
133
|
+
}
|
|
134
|
+
/** Prefer-A #4781: process_only/plan marker present before implement-conflict gate. */
|
|
135
|
+
function hasProcessOnlySkipMarker4781(payload) {
|
|
136
|
+
const input = recordPayload4781(payload);
|
|
137
|
+
if (input === null)
|
|
138
|
+
return false;
|
|
139
|
+
const toolInput = toolInput4781(input);
|
|
140
|
+
const subagentType = fieldString4781(toolInput, "subagent_type") ??
|
|
141
|
+
fieldString4781(toolInput, "subagentType") ??
|
|
142
|
+
fieldString4781(input, "subagent_type") ??
|
|
143
|
+
fieldString4781(input, "subagentType");
|
|
144
|
+
if (subagentType?.toLowerCase() === "plan")
|
|
145
|
+
return true;
|
|
146
|
+
if (GROK_SPAWN_WRITING_SKIP_CLASS_FIELD !== "process_only")
|
|
147
|
+
return false;
|
|
148
|
+
return PROCESS_ONLY_FLAG_KEYS.some((key) => fieldTruthy4781(toolInput, key) || fieldTruthy4781(input, key));
|
|
149
|
+
}
|
|
150
|
+
/** Prefer-A #4781: name suppressing implement field when present. */
|
|
151
|
+
function namedImplementConflictSuppressor4781(payload) {
|
|
152
|
+
const input = recordPayload4781(payload);
|
|
153
|
+
if (input === null)
|
|
154
|
+
return null;
|
|
155
|
+
const toolInput = toolInput4781(input);
|
|
156
|
+
const driveTo = fieldString4781(toolInput, "drive_to") ??
|
|
157
|
+
fieldString4781(toolInput, "driveTo") ??
|
|
158
|
+
fieldString4781(toolInput, "drive-to") ??
|
|
159
|
+
fieldString4781(input, "drive_to") ??
|
|
160
|
+
fieldString4781(input, "driveTo") ??
|
|
161
|
+
fieldString4781(input, "drive-to");
|
|
162
|
+
if (driveTo !== null) {
|
|
163
|
+
const normalized = driveTo.toLowerCase().replace(/[_\s]/g, "-");
|
|
164
|
+
if (normalized === "merge-ready" ||
|
|
165
|
+
normalized === "merge" ||
|
|
166
|
+
normalized.startsWith("merge-") ||
|
|
167
|
+
normalized.includes("implement")) {
|
|
168
|
+
return "drive_to";
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
const workerRole = fieldString4781(toolInput, "worker_role") ??
|
|
172
|
+
fieldString4781(toolInput, "workerRole") ??
|
|
173
|
+
fieldString4781(input, "worker_role") ??
|
|
174
|
+
fieldString4781(input, "workerRole");
|
|
175
|
+
if (workerRole !== null) {
|
|
176
|
+
const role = workerRole.toLowerCase().replace(/[_\s]/g, "-");
|
|
177
|
+
if (role === "leaf-implementation" ||
|
|
178
|
+
role === "implementation" ||
|
|
179
|
+
role === "implement" ||
|
|
180
|
+
role.includes("implement")) {
|
|
181
|
+
return "worker_role";
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
const dispatchKind = fieldString4781(toolInput, "dispatch_kind") ??
|
|
185
|
+
fieldString4781(toolInput, "dispatchKind") ??
|
|
186
|
+
fieldString4781(input, "dispatch_kind") ??
|
|
187
|
+
fieldString4781(input, "dispatchKind");
|
|
188
|
+
if (dispatchKind !== null) {
|
|
189
|
+
const kind = dispatchKind.toLowerCase().replace(/[_\s]/g, "-");
|
|
190
|
+
if (kind === "swarm-cohort" || kind === "swarm-leaf" || kind.includes("implement")) {
|
|
191
|
+
return "dispatch_kind";
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
return null;
|
|
195
|
+
}
|
|
196
|
+
function processOnlyImplementConflictSuppressor4781(payload) {
|
|
197
|
+
if (!hasProcessOnlySkipMarker4781(payload))
|
|
198
|
+
return null;
|
|
199
|
+
return namedImplementConflictSuppressor4781(payload);
|
|
200
|
+
}
|
|
201
|
+
/** Prefer-A #4781: name implement-conflict suppressor when process_only is present but blocked. */
|
|
202
|
+
function overlayProcessOnlyImplementConflictSuppressor(input, decision) {
|
|
203
|
+
if (decision.verdict !== "deny")
|
|
204
|
+
return decision;
|
|
205
|
+
const field = processOnlyImplementConflictSuppressor4781(input.payload);
|
|
206
|
+
if (field === null)
|
|
207
|
+
return decision;
|
|
208
|
+
const note = `process_only was suppressed by ${field} (implement conflict wins; not bare #2885).`;
|
|
209
|
+
if (decision.message.includes(note))
|
|
210
|
+
return decision;
|
|
211
|
+
return { ...decision, message: `${note} ${decision.message}` };
|
|
212
|
+
}
|
|
103
213
|
function overlayGrokCriticSpawnNotReadyRecovery(input, toolName, decision) {
|
|
214
|
+
decision = overlayProcessOnlyImplementConflictSuppressor(input, decision);
|
|
104
215
|
if (decision.verdict !== "deny" || decision.code !== "spawn-not-ready")
|
|
105
216
|
return decision;
|
|
106
217
|
if (!appliesGrokSpawnDestContract({
|
|
@@ -191,6 +302,20 @@ function applyPatchBodyUnclassified(payload) {
|
|
|
191
302
|
const text = hookApplyPatchBodyText(payload);
|
|
192
303
|
return text !== null && hookApplyPatchBodyPaths(payload).length === 0;
|
|
193
304
|
}
|
|
305
|
+
/**
|
|
306
|
+
* True only when the harvest is non-empty, fully classified, and every target
|
|
307
|
+
* is outside fenceRoot (#6189 limb 5). Empty, unclassified, or unsupported-URI
|
|
308
|
+
* harvests return false so the #5656 positive-allow check stays fail-closed.
|
|
309
|
+
*/
|
|
310
|
+
function allMutationTargetsOutsideFenceRoot(payload, effectiveRoot) {
|
|
311
|
+
if (applyPatchBodyUnclassified(payload))
|
|
312
|
+
return false;
|
|
313
|
+
const normalized = normalizeMutationTargetPaths(hookMutationTargetPaths(payload));
|
|
314
|
+
if (!normalized.ok || normalized.paths.length === 0)
|
|
315
|
+
return false;
|
|
316
|
+
const fenceRoot = resolve(effectiveRoot);
|
|
317
|
+
return normalized.paths.every((target) => isOutsideProjectRootWrite(fenceRoot, target));
|
|
318
|
+
}
|
|
194
319
|
const APPLY_PATCH_UNCLASSIFIED_BODY_MESSAGE = "Directive denied this direct write: apply_patch body named no classifiable mutation target, so the write fence cannot authorize it.";
|
|
195
320
|
/** Write-shaped empty dest harvest — parallel ApplyPatch unclassified-body deny (#5366). */
|
|
196
321
|
const WRITE_SHAPED_EMPTY_HARVEST_MESSAGE = "Directive denied this direct write: write-shaped tool named no classifiable mutation target, so the write fence cannot authorize it.";
|
|
@@ -759,7 +884,15 @@ function runtimeAuthorityForDirectWrite(input, toolName, seams, scopePath, effec
|
|
|
759
884
|
return deny(input, "runtime-policy-deny-path", toolName, ACTIVE_FENCE_UNCLASSIFIED_TARGET_MESSAGE + fenceRootNote, scopePath);
|
|
760
885
|
}
|
|
761
886
|
for (const target of normalized.paths) {
|
|
762
|
-
|
|
887
|
+
// #6189 Prefer-A Bound limbs 1 + 4: the story fence and project path globs
|
|
888
|
+
// govern the repository, not host memory or temp scratch. A target outside
|
|
889
|
+
// fenceRoot (the same root this loop relativises against; the #2885
|
|
890
|
+
// carve-out stays on payloadRoot) skips the path layer only. A null relPath
|
|
891
|
+
// still runs the non-path checks, so project scopes.edits=false keeps
|
|
892
|
+
// denying. The unclassified-target deny above stays ahead of this skip.
|
|
893
|
+
const relPath = isOutsideProjectRootWrite(fenceRoot, target)
|
|
894
|
+
? null
|
|
895
|
+
: toProjectRelativePosix(fenceRoot, target);
|
|
763
896
|
const verdict = evaluateRuntimeAuthorityDirectWrite({
|
|
764
897
|
policy: fence.policy,
|
|
765
898
|
relPathPosix: relPath,
|
|
@@ -1523,6 +1656,7 @@ function inspectMutationGates(input, toolName, seams, options) {
|
|
|
1523
1656
|
return completedAllow;
|
|
1524
1657
|
}
|
|
1525
1658
|
let scope;
|
|
1659
|
+
let worktreeBindingRefused = false;
|
|
1526
1660
|
try {
|
|
1527
1661
|
// #3794 commit 2: a write is governed by the active scope of the worktree it
|
|
1528
1662
|
// lands in, not the primary checkout's. Admission has already proved
|
|
@@ -1534,10 +1668,32 @@ function inspectMutationGates(input, toolName, seams, options) {
|
|
|
1534
1668
|
const spawnBoundPath = isSpawnTool(toolName)
|
|
1535
1669
|
? uniqueActiveBasenameFromDestPath(spawnConsult?.destPath ?? null)
|
|
1536
1670
|
: null;
|
|
1537
|
-
|
|
1671
|
+
// #6233: a dispatch-registered linked worktree binds its story from the
|
|
1672
|
+
// worker-auth assignment record. The main worktree never reads the registry
|
|
1673
|
+
// (the resolver returns `none` there); a clean absence keeps today's path.
|
|
1674
|
+
const worktreeBinding = resolveWorktreeStoryBinding(effectiveRoot, {
|
|
1538
1675
|
env: environ,
|
|
1539
|
-
|
|
1676
|
+
boundPath: spawnBoundPath,
|
|
1677
|
+
...(seams.readWorkerAuthAssignment !== undefined
|
|
1678
|
+
? { readWorkerAuthAssignment: seams.readWorkerAuthAssignment }
|
|
1679
|
+
: {}),
|
|
1540
1680
|
});
|
|
1681
|
+
if (worktreeBinding.kind === "refuse") {
|
|
1682
|
+
worktreeBindingRefused = true;
|
|
1683
|
+
scope = {
|
|
1684
|
+
ready: false,
|
|
1685
|
+
path: null,
|
|
1686
|
+
message: worktreeBinding.message,
|
|
1687
|
+
denyKind: "pin-miss",
|
|
1688
|
+
};
|
|
1689
|
+
}
|
|
1690
|
+
else {
|
|
1691
|
+
const boundPath = worktreeBinding.kind === "bound" ? worktreeBinding.path : spawnBoundPath;
|
|
1692
|
+
scope = (seams.inspectScope ?? inspectActiveScope)(effectiveRoot, {
|
|
1693
|
+
env: environ,
|
|
1694
|
+
...(boundPath !== null ? { boundPath } : {}),
|
|
1695
|
+
});
|
|
1696
|
+
}
|
|
1541
1697
|
}
|
|
1542
1698
|
catch (cause) {
|
|
1543
1699
|
scope = { ready: false, path: null, message: String(cause) };
|
|
@@ -1556,7 +1712,12 @@ function inspectMutationGates(input, toolName, seams, options) {
|
|
|
1556
1712
|
const mutationTargets = hookMutationTargetPaths(input.payload);
|
|
1557
1713
|
const outsideRoot = mutationTargets.length > 0 &&
|
|
1558
1714
|
mutationTargets.every((target) => isOutsideProjectRootWrite(projectRoot, target));
|
|
1559
|
-
|
|
1715
|
+
// #6233: a worktree binding refusal governs writes into the bound worktree
|
|
1716
|
+
// even when that worktree lives outside the payload root; the #2885 skip
|
|
1717
|
+
// stays for targets outside both roots.
|
|
1718
|
+
const bindingRefusalGoverns = worktreeBindingRefused &&
|
|
1719
|
+
mutationTargets.some((target) => !isOutsideProjectRootWrite(effectiveRoot, target));
|
|
1720
|
+
if (!outsideRoot || isSpawnTool(toolName) || bindingRefusalGoverns) {
|
|
1560
1721
|
let proposedPathHint;
|
|
1561
1722
|
if (isSpawnTool(toolName) && scope.denyKind === "multiple-eligible") {
|
|
1562
1723
|
// #4880 Prefer-A B': do not emit promote-then-activate on multiple-eligible.
|
|
@@ -1574,10 +1735,11 @@ function inspectMutationGates(input, toolName, seams, options) {
|
|
|
1574
1735
|
"`worker_role`/`subagent_type` ∈ {ephemeral, docs, assist} (hosts that support them), " +
|
|
1575
1736
|
"or set session assist (`DEFT_SESSION_POSTURE=assist` or `DEFT_HOOK_ASSIST=1`), " +
|
|
1576
1737
|
"or run local-dev Shell (`docker compose` / `pnpm dev`) in the parent without a " +
|
|
1577
|
-
"lifecycle story. (4) Process-only critic — spawn with
|
|
1578
|
-
"plan or `process_only` (Grok PreToolUse stdin)
|
|
1579
|
-
"
|
|
1580
|
-
"
|
|
1738
|
+
"lifecycle story. (4) Process-only critic / review-monitor / validation seat — spawn with " +
|
|
1739
|
+
"structural `subagent_type` plan or `process_only` (Grok PreToolUse stdin) plus dest cwd " +
|
|
1740
|
+
"for watch/report seats. Dest-path is not that class. Free-text markers such as " +
|
|
1741
|
+
"`[worker_role: ephemeral]` or naming critic in the prompt are NOT sufficient. Do not " +
|
|
1742
|
+
"invent a fake scope only to satisfy this gate.";
|
|
1581
1743
|
}
|
|
1582
1744
|
else if (options.proposedLifecycleExempt &&
|
|
1583
1745
|
relTarget !== null &&
|
|
@@ -1671,7 +1833,15 @@ function inspectMutationGates(input, toolName, seams, options) {
|
|
|
1671
1833
|
});
|
|
1672
1834
|
if (authzDeny !== null)
|
|
1673
1835
|
return authzDeny;
|
|
1674
|
-
|
|
1836
|
+
// #6189 Prefer-A Bound limb 5: a Write whose every harvested target is
|
|
1837
|
+
// outside fenceRoot (limb 1's anchor) does not need positive story allow,
|
|
1838
|
+
// so the activation-PR window (empty merge-base file_scope) can still
|
|
1839
|
+
// write scratch. Any in-repo target, an empty or unclassified harvest, and
|
|
1840
|
+
// implement-class spawn keep the #5656 requirement. runtimeAuthority below
|
|
1841
|
+
// still applies project scopes.edits=false (limb 4).
|
|
1842
|
+
const positiveDeny = allMutationTargetsOutsideFenceRoot(input.payload, effectiveRoot)
|
|
1843
|
+
? null
|
|
1844
|
+
: requirePositiveGoverningAllow();
|
|
1675
1845
|
if (positiveDeny !== null)
|
|
1676
1846
|
return positiveDeny;
|
|
1677
1847
|
const runtimeDeny = runtimeAuthorityForDirectWrite(input, toolName, seams, scope.path, effectiveRoot);
|