@deftai/directive-core 0.106.0 → 0.108.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/architecture/sor-preflight.js +2 -0
- package/dist/check/cached-orchestrator.js +28 -3
- package/dist/check/gate-lists.js +2 -0
- package/dist/check/named-cause.js +18 -3
- package/dist/codebase/provider.js +7 -1
- package/dist/delivery-attempt/handoff.js +1 -1
- package/dist/design-critique/citation-grammar.d.ts +53 -0
- package/dist/design-critique/citation-grammar.js +303 -0
- package/dist/design-critique/completed-arc-record.d.ts +62 -0
- package/dist/design-critique/completed-arc-record.js +232 -0
- package/dist/design-critique/exclusive-chip.d.ts +33 -0
- package/dist/design-critique/exclusive-chip.js +68 -0
- package/dist/design-critique/parent-audit.d.ts +59 -0
- package/dist/design-critique/parent-audit.js +121 -0
- package/dist/doctor/checks.d.ts +6 -0
- package/dist/doctor/checks.js +35 -0
- package/dist/freshness/bind.d.ts +32 -3
- package/dist/freshness/bind.js +58 -12
- package/dist/hooks/classify/host-session-identity.d.ts +76 -0
- package/dist/hooks/classify/host-session-identity.js +470 -0
- package/dist/hooks/classify/index.d.ts +3 -2
- package/dist/hooks/classify/index.js +3 -2
- package/dist/hooks/classify/paths.d.ts +7 -0
- package/dist/hooks/classify/paths.js +35 -0
- package/dist/hooks/classify/stdin.d.ts +5 -0
- package/dist/hooks/classify/stdin.js +27 -0
- package/dist/hooks/dest-form.d.ts +46 -0
- package/dist/hooks/dest-form.js +575 -0
- package/dist/hooks/dispatcher.d.ts +69 -2
- package/dist/hooks/dispatcher.js +609 -45
- package/dist/hooks/fixtures/cases.d.ts +16 -2
- package/dist/hooks/fixtures/cases.js +175 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/scope.js +3 -1
- package/dist/init-deposit/agent-hooks.d.ts +2 -1
- package/dist/init-deposit/agent-hooks.js +8 -1
- package/dist/init-deposit/hook-runtime-travel.d.ts +77 -0
- package/dist/init-deposit/hook-runtime-travel.js +269 -0
- package/dist/intake/clause-derivation.js +9 -3
- package/dist/intake/github-auth-modes-cli.js +14 -2
- package/dist/intake/github-auth-modes.d.ts +54 -9
- package/dist/intake/github-auth-modes.js +326 -123
- package/dist/intake/issue-ingest.js +62 -2
- package/dist/intake/platform-capabilities.d.ts +9 -2
- package/dist/intake/platform-capabilities.js +38 -9
- package/dist/lifecycle/completed-tracked-on-delivery.d.ts +26 -0
- package/dist/lifecycle/completed-tracked-on-delivery.js +37 -14
- package/dist/lifecycle/completed-write-guard.d.ts +48 -0
- package/dist/lifecycle/completed-write-guard.js +373 -0
- package/dist/lifecycle/index.d.ts +1 -0
- package/dist/lifecycle/index.js +1 -0
- package/dist/literal-acceptance/capture.d.ts +16 -0
- package/dist/literal-acceptance/capture.js +75 -7
- package/dist/literal-acceptance/evaluate.js +25 -3
- package/dist/literal-acceptance/index.d.ts +2 -2
- package/dist/literal-acceptance/index.js +2 -2
- package/dist/literal-acceptance/run.js +9 -3
- package/dist/literal-acceptance/types.d.ts +6 -0
- package/dist/literal-acceptance/types.js +6 -0
- package/dist/orphan-active/evaluate.d.ts +25 -0
- package/dist/orphan-active/evaluate.js +193 -128
- package/dist/orphan-active/index.d.ts +1 -0
- package/dist/orphan-active/index.js +1 -0
- package/dist/orphan-active/issue-state.d.ts +121 -0
- package/dist/orphan-active/issue-state.js +278 -0
- package/dist/platform/cursor-managed-runtime.d.ts +95 -0
- package/dist/platform/cursor-managed-runtime.js +241 -0
- package/dist/platform/index.d.ts +1 -0
- package/dist/platform/index.js +1 -0
- package/dist/platform/platform-capabilities.d.ts +23 -1
- package/dist/platform/platform-capabilities.js +55 -15
- package/dist/policy/ceremony-dial.js +5 -9
- package/dist/policy/host-hooks.js +4 -9
- package/dist/policy/org-force-on-migration.js +5 -10
- package/dist/policy/plan-extensions.d.ts +14 -2
- package/dist/policy/plan-extensions.js +24 -3
- package/dist/policy/product-signal.js +5 -10
- package/dist/policy/require-human-merge.js +5 -9
- package/dist/policy/resolve.js +77 -16
- package/dist/policy/runtime-authority.d.ts +18 -0
- package/dist/policy/runtime-authority.js +11 -0
- package/dist/policy/value-feedback.js +9 -18
- package/dist/policy/write-fence.js +3 -0
- package/dist/pr-closeout-attestable/evaluate.d.ts +80 -0
- package/dist/pr-closeout-attestable/evaluate.js +306 -0
- package/dist/pr-closeout-attestable/index.d.ts +2 -0
- package/dist/pr-closeout-attestable/index.js +2 -0
- package/dist/pr-protected-issues/gh.d.ts +6 -2
- package/dist/pr-protected-issues/gh.js +7 -3
- package/dist/pr-wait-mergeable/cascade.d.ts +9 -1
- package/dist/pr-wait-mergeable/cascade.js +21 -1
- package/dist/pr-wait-mergeable/types.d.ts +2 -0
- package/dist/pr-wait-mergeable/wrappers.d.ts +6 -0
- package/dist/pr-wait-mergeable/wrappers.js +11 -0
- package/dist/preflight/evaluate.d.ts +15 -0
- package/dist/preflight/evaluate.js +29 -3
- package/dist/preflight-cache/evaluate.js +9 -3
- package/dist/product-first-done-gate/acceptance-resolver.d.ts +14 -2
- package/dist/product-first-done-gate/acceptance-resolver.js +13 -2
- package/dist/product-first-done-gate/evaluate.js +53 -12
- package/dist/release/cli-drift-report.d.ts +68 -0
- package/dist/release/cli-drift-report.js +189 -0
- package/dist/release/index.d.ts +1 -0
- package/dist/release/index.js +1 -0
- package/dist/release/issue-state-fetch.d.ts +5 -3
- package/dist/release/issue-state-fetch.js +86 -21
- package/dist/release/native-steps.js +1 -0
- package/dist/release/pipeline.js +19 -0
- package/dist/release/types.d.ts +14 -0
- package/dist/render/constants.d.ts +4 -0
- package/dist/render/constants.js +11 -8
- package/dist/render/export-spec.js +31 -5
- package/dist/render/index.d.ts +1 -1
- package/dist/render/index.js +1 -1
- package/dist/render/prd-render.d.ts +4 -1
- package/dist/render/prd-render.js +82 -23
- package/dist/render/project-render.js +14 -7
- package/dist/render/scope-outlook.d.ts +2 -0
- package/dist/render/scope-outlook.js +3 -0
- package/dist/render/spec-render.js +2 -2
- package/dist/resolution/package-manager.d.ts +33 -4
- package/dist/resolution/package-manager.js +210 -9
- package/dist/review-monitor/constants.d.ts +7 -0
- package/dist/review-monitor/constants.js +7 -0
- package/dist/review-monitor/github-lease.d.ts +98 -1
- package/dist/review-monitor/github-lease.js +182 -1
- package/dist/review-monitor/lease-comment.d.ts +36 -0
- package/dist/review-monitor/lease-comment.js +103 -2
- package/dist/scm/call.js +12 -3
- package/dist/scm/design-critique-chip.d.ts +38 -0
- package/dist/scm/design-critique-chip.js +187 -0
- package/dist/scm/gh-rest.d.ts +9 -1
- package/dist/scm/gh-rest.js +103 -0
- package/dist/scm/index.d.ts +1 -0
- package/dist/scm/index.js +1 -0
- package/dist/scm/main.d.ts +3 -0
- package/dist/scm/main.js +15 -1
- package/dist/scm/readiness-cli.d.ts +2 -0
- package/dist/scm/readiness-cli.js +42 -1
- package/dist/scm/readiness.d.ts +4 -1
- package/dist/scm/readiness.js +35 -5
- package/dist/scope/decompose.js +2 -1
- package/dist/scope/delivery-evidence.d.ts +27 -1
- package/dist/scope/index.d.ts +1 -0
- package/dist/scope/index.js +1 -0
- package/dist/scope/lifecycle-write.d.ts +24 -0
- package/dist/scope/lifecycle-write.js +64 -0
- package/dist/scope/main.js +3 -1
- package/dist/scope/project-definition-sync.js +14 -7
- package/dist/scope/transition.js +90 -11
- package/dist/scope-provenance/evaluate.js +5 -1
- package/dist/session/git.d.ts +42 -0
- package/dist/session/git.js +219 -3
- package/dist/session/occupancy.d.ts +239 -12
- package/dist/session/occupancy.js +820 -27
- package/dist/session/ritual-sentinel.d.ts +5 -0
- package/dist/session/ritual-sentinel.js +5 -0
- package/dist/session/session-ready.d.ts +5 -1
- package/dist/session/session-ready.js +98 -8
- package/dist/session/session-start.d.ts +17 -1
- package/dist/session/session-start.js +49 -17
- package/dist/session/toolchain-preflight.d.ts +13 -3
- package/dist/session/toolchain-preflight.js +93 -18
- package/dist/session/verify-session-ritual.d.ts +33 -3
- package/dist/session/verify-session-ritual.js +89 -19
- package/dist/slice/constants.d.ts +1 -1
- package/dist/spec-authority/constants.d.ts +10 -2
- package/dist/spec-authority/constants.js +53 -8
- package/dist/spec-authority/resolver.d.ts +3 -0
- package/dist/spec-authority/resolver.js +55 -7
- package/dist/subprocess/max-buffer.d.ts +14 -0
- package/dist/subprocess/max-buffer.js +15 -0
- package/dist/swarm/complete-cohort.d.ts +2 -0
- package/dist/swarm/complete-cohort.js +21 -13
- package/dist/swarm/index.d.ts +1 -0
- package/dist/swarm/index.js +1 -0
- package/dist/swarm/launch-cli.js +53 -33
- package/dist/swarm/launch.d.ts +77 -0
- package/dist/swarm/launch.js +248 -38
- package/dist/swarm/pre-dispatch-cli.js +2 -1
- package/dist/swarm/pre-dispatch.js +10 -1
- package/dist/swarm/subagent-status-dir.d.ts +27 -0
- package/dist/swarm/subagent-status-dir.js +42 -0
- package/dist/swarm/worktrees.d.ts +17 -3
- package/dist/swarm/worktrees.js +48 -4
- package/dist/triage/actions/index.d.ts +4 -0
- package/dist/triage/actions/index.js +6 -0
- package/dist/triage/evaluate/evaluate.d.ts +11 -0
- package/dist/triage/evaluate/evaluate.js +169 -0
- package/dist/triage/evaluate/github.d.ts +16 -0
- package/dist/triage/evaluate/github.js +153 -0
- package/dist/triage/evaluate/index.d.ts +9 -0
- package/dist/triage/evaluate/index.js +8 -0
- package/dist/triage/evaluate/paths.d.ts +7 -0
- package/dist/triage/evaluate/paths.js +25 -0
- package/dist/triage/evaluate/sink.d.ts +5 -0
- package/dist/triage/evaluate/sink.js +52 -0
- package/dist/triage/evaluate/types.d.ts +93 -0
- package/dist/triage/evaluate/types.js +13 -0
- package/dist/triage/evaluate/validity.d.ts +8 -0
- package/dist/triage/evaluate/validity.js +87 -0
- package/dist/triage/evaluate/value.d.ts +12 -0
- package/dist/triage/evaluate/value.js +33 -0
- package/dist/triage/evaluate/wip-census.d.ts +5 -0
- package/dist/triage/evaluate/wip-census.js +39 -0
- package/dist/triage/evaluate/worktrees.d.ts +8 -0
- package/dist/triage/evaluate/worktrees.js +68 -0
- package/dist/triage/evaluate/xbrief-refs.d.ts +8 -0
- package/dist/triage/evaluate/xbrief-refs.js +60 -0
- package/dist/triage/help/registry-data.d.ts +21 -7
- package/dist/triage/help/registry-data.js +53 -5
- package/dist/triage/index.d.ts +1 -0
- package/dist/triage/index.js +1 -0
- package/dist/triage/scope/mutations-core.d.ts +2 -6
- package/dist/triage/scope/mutations-core.js +23 -55
- package/dist/triage/scope-drift/add-ignore.js +5 -39
- package/dist/triage/subscribe/index.d.ts +2 -6
- package/dist/triage/subscribe/index.js +15 -65
- package/dist/triage/welcome/writers.js +15 -74
- package/dist/value/feedback-file.d.ts +17 -2
- package/dist/value/feedback-file.js +80 -6
- package/dist/vbrief-build/index.d.ts +2 -1
- package/dist/vbrief-build/index.js +2 -1
- package/dist/vbrief-build/parity-scenarios.js +5 -5
- package/dist/vbrief-build/project-definition-io.d.ts +63 -3
- package/dist/vbrief-build/project-definition-io.js +357 -31
- package/dist/vbrief-build/project-definition-mutation.d.ts +32 -0
- package/dist/vbrief-build/project-definition-mutation.js +43 -0
- package/dist/vbrief-reconcile/labels.d.ts +1 -0
- package/dist/vbrief-reconcile/labels.js +30 -0
- package/dist/vbrief-validate/conformance.d.ts +1 -0
- package/dist/vbrief-validate/conformance.js +85 -8
- package/dist/vbrief-validate/main.js +2 -0
- package/dist/vbrief-validate/precutover.js +5 -10
- package/dist/vbrief-validation/story-quality.d.ts +7 -0
- package/dist/vbrief-validation/story-quality.js +8 -1
- package/dist/verify-ac/clauses.d.ts +62 -2
- package/dist/verify-ac/clauses.js +183 -111
- package/dist/verify-ac/index.d.ts +1 -1
- package/dist/verify-ac/index.js +1 -1
- package/dist/verify-env/node-runtime.d.ts +8 -4
- package/dist/verify-env/node-runtime.js +9 -6
- package/dist/verify-env/toolchain-check.d.ts +35 -3
- package/dist/verify-env/toolchain-check.js +155 -36
- package/dist/verify-source/project-definition-mutation-boundary.d.ts +104 -0
- package/dist/verify-source/project-definition-mutation-boundary.js +326 -0
- package/dist/xbrief-migrate/agents-header.js +69 -7
- package/package.json +7 -3
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
* Policy / ritual / scope / permission emission stay in dispatcher + CLI adapter.
|
|
6
6
|
*/
|
|
7
7
|
export { classifyHookPayload } from "./classify.js";
|
|
8
|
-
export {
|
|
8
|
+
export { EXACT_LIFECYCLE_VERBS, exactLifecycleCommandVerb, HOST_IDENTITY_PROVIDERS, inspectExactLifecycleCommand, MAX_HOOK_HOST_IDENTITY_UTF8_BYTES, resolveHookHostIdentity, rewriteExactLifecycleCommand, } from "./host-session-identity.js";
|
|
9
|
+
export { hookApplyPatchBodyPaths, hookMcpArgsText, hookMutationTargetPaths, hookPathSet, hookShellCommand, hookWriteTargetPath, } from "./paths.js";
|
|
9
10
|
export { fieldPresent, fieldString, firstString, hookPayloadTopLevelKeys, record, toolInputRecord, } from "./payload.js";
|
|
10
|
-
export { parseHookStdin, stripUtf8Bom } from "./stdin.js";
|
|
11
|
+
export { applyPatchMutationPaths, parseHookStdin, stripUtf8Bom } from "./stdin.js";
|
|
11
12
|
export { hookToolName, inferCursorDirectWriteToolName, missingToolNameMessage, } from "./tool-name.js";
|
|
12
13
|
export { CLASSIFY_HOOK_HOSTS } from "./types.js";
|
|
13
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -7,6 +7,13 @@
|
|
|
7
7
|
* Hosts disagree on nesting (`tool_input.file_path` vs top-level `path`).
|
|
8
8
|
*/
|
|
9
9
|
export declare function hookWriteTargetPath(payload: unknown): string | null;
|
|
10
|
+
/** ApplyPatch body paths from patch / unified_diff / diff fields. */
|
|
11
|
+
export declare function hookApplyPatchBodyPaths(payload: unknown): string[];
|
|
12
|
+
/**
|
|
13
|
+
* Declared write target plus ApplyPatch body members. Used to admit one
|
|
14
|
+
* effectiveRoot; a span across two Git toplevels is refused (#3794).
|
|
15
|
+
*/
|
|
16
|
+
export declare function hookMutationTargetPaths(payload: unknown): string[];
|
|
10
17
|
/**
|
|
11
18
|
* Best-effort shell command string from host PreToolUse payloads (#2711).
|
|
12
19
|
* Hosts disagree on nesting (`tool_input.command` vs top-level `command`).
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* No process I/O — does not resolve against projectRoot or realpath.
|
|
4
4
|
*/
|
|
5
5
|
import { firstString, record, toolInputRecord } from "./payload.js";
|
|
6
|
+
import { applyPatchMutationPaths } from "./stdin.js";
|
|
6
7
|
/**
|
|
7
8
|
* Best-effort write-target path from host PreToolUse payloads (#2625).
|
|
8
9
|
* Hosts disagree on nesting (`tool_input.file_path` vs top-level `path`).
|
|
@@ -21,6 +22,40 @@ export function hookWriteTargetPath(payload) {
|
|
|
21
22
|
input.path,
|
|
22
23
|
]);
|
|
23
24
|
}
|
|
25
|
+
/** ApplyPatch body paths from patch / unified_diff / diff fields. */
|
|
26
|
+
export function hookApplyPatchBodyPaths(payload) {
|
|
27
|
+
const input = record(payload);
|
|
28
|
+
if (input === null)
|
|
29
|
+
return [];
|
|
30
|
+
const toolInput = toolInputRecord(input);
|
|
31
|
+
const patch = firstString([
|
|
32
|
+
toolInput?.patch,
|
|
33
|
+
toolInput?.unified_diff,
|
|
34
|
+
toolInput?.diff,
|
|
35
|
+
input.patch,
|
|
36
|
+
input.unified_diff,
|
|
37
|
+
input.diff,
|
|
38
|
+
]);
|
|
39
|
+
return patch === null ? [] : applyPatchMutationPaths(patch);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Declared write target plus ApplyPatch body members. Used to admit one
|
|
43
|
+
* effectiveRoot; a span across two Git toplevels is refused (#3794).
|
|
44
|
+
*/
|
|
45
|
+
export function hookMutationTargetPaths(payload) {
|
|
46
|
+
const seen = new Set();
|
|
47
|
+
const out = [];
|
|
48
|
+
const push = (value) => {
|
|
49
|
+
if (value === null || value.length === 0 || seen.has(value))
|
|
50
|
+
return;
|
|
51
|
+
seen.add(value);
|
|
52
|
+
out.push(value);
|
|
53
|
+
};
|
|
54
|
+
push(hookWriteTargetPath(payload));
|
|
55
|
+
for (const path of hookApplyPatchBodyPaths(payload))
|
|
56
|
+
push(path);
|
|
57
|
+
return out;
|
|
58
|
+
}
|
|
24
59
|
/**
|
|
25
60
|
* Best-effort shell command string from host PreToolUse payloads (#2711).
|
|
26
61
|
* Hosts disagree on nesting (`tool_input.command` vs top-level `command`).
|
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { ParsedHookPayload } from "./types.js";
|
|
6
6
|
export declare function stripUtf8Bom(raw: string): string;
|
|
7
|
+
/**
|
|
8
|
+
* Paths named by ApplyPatch mutation headers, plus `*** Move to:` rename
|
|
9
|
+
* destinations. Order preserved, duplicates dropped.
|
|
10
|
+
*/
|
|
11
|
+
export declare function applyPatchMutationPaths(text: string): string[];
|
|
7
12
|
/**
|
|
8
13
|
* Parse host hook stdin text into a payload + parse context.
|
|
9
14
|
* Empty → stdinEmpty; invalid JSON without free-form ApplyPatch → parseFailed.
|
|
@@ -6,9 +6,36 @@ const UTF8_BOM = "\uFEFF";
|
|
|
6
6
|
const APPLY_PATCH_BEGIN_MARKER = "*** Begin Patch";
|
|
7
7
|
/** Single-file Add/Update only — other *** … File: ops must fail closed (#2738 Greptile). */
|
|
8
8
|
const APPLY_PATCH_MUTATION_LINE_RE = /^\*\*\* (Add File|Update File|Delete File|Move File|Rename File): (.+)$/gm;
|
|
9
|
+
/**
|
|
10
|
+
* Canonical apply_patch spells a rename as `*** Update File:` followed by
|
|
11
|
+
* `*** Move to:`. The destination is a mutation target in its own right, so it
|
|
12
|
+
* must reach root admission; kept separate from the header regex above so the
|
|
13
|
+
* single-mutation #2738 synthesis contract is unchanged (#3794).
|
|
14
|
+
*/
|
|
15
|
+
const APPLY_PATCH_MOVE_DESTINATION_RE = /^\*\*\* Move to: (.+)$/gm;
|
|
9
16
|
export function stripUtf8Bom(raw) {
|
|
10
17
|
return raw.startsWith(UTF8_BOM) ? raw.slice(UTF8_BOM.length) : raw;
|
|
11
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Paths named by ApplyPatch mutation headers, plus `*** Move to:` rename
|
|
21
|
+
* destinations. Order preserved, duplicates dropped.
|
|
22
|
+
*/
|
|
23
|
+
export function applyPatchMutationPaths(text) {
|
|
24
|
+
const paths = [];
|
|
25
|
+
const seen = new Set();
|
|
26
|
+
const push = (raw) => {
|
|
27
|
+
const path = raw?.trim();
|
|
28
|
+
if (!path || seen.has(path))
|
|
29
|
+
return;
|
|
30
|
+
seen.add(path);
|
|
31
|
+
paths.push(path);
|
|
32
|
+
};
|
|
33
|
+
for (const match of text.matchAll(APPLY_PATCH_MUTATION_LINE_RE))
|
|
34
|
+
push(match[2]);
|
|
35
|
+
for (const match of text.matchAll(APPLY_PATCH_MOVE_DESTINATION_RE))
|
|
36
|
+
push(match[1]);
|
|
37
|
+
return paths;
|
|
38
|
+
}
|
|
12
39
|
function trySynthesizeFreeFormApplyPatch(normalized) {
|
|
13
40
|
if (!normalized.includes(APPLY_PATCH_BEGIN_MARKER))
|
|
14
41
|
return null;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Product dest-form classifier for in-repo Shell mutations (#3438).
|
|
3
|
+
*
|
|
4
|
+
* NEW harvest — do not reuse `classifyShellAuthzOps` / `listShellOps` as-is.
|
|
5
|
+
* Those return [] for `git checkout --` / `rm` of ordinary product paths.
|
|
6
|
+
*
|
|
7
|
+
* ! Resolves a target for ONE shape only: a single simple command. Everything
|
|
8
|
+
* else is recognized and fail-closed. Reconstructing a target from shell state
|
|
9
|
+
* was implemented and withdrawn — cwd depends on operator precedence, on exit
|
|
10
|
+
* status, on subshell boundaries, and on git config, and every resolution rule
|
|
11
|
+
* added produced its own fence bypass. Do not add it back; widen the recognized
|
|
12
|
+
* *forms* instead, and see `content/contracts/path-write-fence.md`.
|
|
13
|
+
*
|
|
14
|
+
* Residual known-open (recognition, not resolution): `python -c`,
|
|
15
|
+
* `cmd /c copy`, obfuscated `bash -c`.
|
|
16
|
+
*
|
|
17
|
+
* Commit-time active-scope is out of this slice (#3438), and ⊗ do not weaken
|
|
18
|
+
* Edit to match Shell. Keep this sentence on ONE line: acceptance clause 4 is
|
|
19
|
+
* verified by a literal token search, so wrapping it silently fails the gate.
|
|
20
|
+
*/
|
|
21
|
+
export type ProductDestFormKind = "git-checkout" | "git-restore" | "rm" | "rmdir";
|
|
22
|
+
export interface ProductDestForm {
|
|
23
|
+
readonly kind: ProductDestFormKind;
|
|
24
|
+
readonly path: string;
|
|
25
|
+
/**
|
|
26
|
+
* True when the target is not provable — a glob/variable or leading `~` dest,
|
|
27
|
+
* a git context option, or any command that is not a single simple one. The
|
|
28
|
+
* dispatcher denies these outright; `path` is then only for the message, and
|
|
29
|
+
* is `SHELL_DEST_EXPANSION_SENTINEL` when no token can be named.
|
|
30
|
+
*/
|
|
31
|
+
readonly expansion?: boolean;
|
|
32
|
+
}
|
|
33
|
+
/** Injected write target for expansion dests so the fence cannot match a literal glob. */
|
|
34
|
+
export declare const SHELL_DEST_EXPANSION_SENTINEL = "__shell_dest_expansion__";
|
|
35
|
+
/**
|
|
36
|
+
* Inject a dest path so `inspectMutationGates` sees the same write target as Edit/Write.
|
|
37
|
+
* Preserves original payload fields (command, posture markers).
|
|
38
|
+
*/
|
|
39
|
+
export declare function payloadWithInjectedWriteTarget(payload: unknown, destPath: string): Record<string, unknown>;
|
|
40
|
+
/**
|
|
41
|
+
* Classify recognized product dest-forms in a shell command (#3438 v1 list).
|
|
42
|
+
* Empty when the command is not `git checkout -- <paths>`, `git restore`, or `rm`/`rmdir`.
|
|
43
|
+
*/
|
|
44
|
+
export declare function destFormHasExpansion(path: string): boolean;
|
|
45
|
+
export declare function classifyProductDestForms(command: string): ProductDestForm[];
|
|
46
|
+
//# sourceMappingURL=dest-form.d.ts.map
|