@deftai/directive-core 0.107.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/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/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/dispatcher.d.ts +52 -1
- package/dist/hooks/dispatcher.js +538 -45
- package/dist/hooks/fixtures/cases.d.ts +16 -2
- package/dist/hooks/fixtures/cases.js +175 -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/issue-ingest.js +62 -2
- package/dist/intake/platform-capabilities.d.ts +9 -2
- package/dist/intake/platform-capabilities.js +38 -9
- 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/value-feedback.js +9 -18
- 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/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 +17 -7
- 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 +1 -0
- package/dist/scm/design-critique-chip.js +22 -6
- package/dist/scm/gh-rest.d.ts +9 -1
- package/dist/scm/gh-rest.js +103 -0
- package/dist/scm/readiness.d.ts +2 -0
- package/dist/scm/readiness.js +28 -4
- package/dist/scope/project-definition-sync.js +14 -7
- package/dist/session/git.d.ts +24 -0
- package/dist/session/git.js +138 -2
- package/dist/session/occupancy.d.ts +238 -12
- package/dist/session/occupancy.js +815 -29
- 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 +5 -1
- package/dist/session/session-start.js +32 -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 +11 -0
- package/dist/session/verify-session-ritual.js +60 -15
- 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 +8 -0
- package/dist/swarm/launch.js +63 -43
- 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/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/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-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/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/package.json +7 -3
|
@@ -24,7 +24,15 @@ export type HookDecisionCode = "session-start" | "session-start-disabled" | "ses
|
|
|
24
24
|
/** Host closed stdin with zero bytes — integration failure, not a policy gate (#2864). */
|
|
25
25
|
| "stdin-empty" | "ritual-not-ready"
|
|
26
26
|
/** Product-path write while another live session occupies this worktree (#3433). */
|
|
27
|
-
| "occupancy-occupied"
|
|
27
|
+
| "occupancy-occupied"
|
|
28
|
+
/** A supported host omitted or malformed its cooperative payload owner (#3611). */
|
|
29
|
+
| "occupancy-identity-unavailable"
|
|
30
|
+
/** Host payload identity conflicts with explicit/environment identity (#3611). */
|
|
31
|
+
| "occupancy-identity-conflict"
|
|
32
|
+
/** Live lease and exact verified ritual state name different owners (#3611). */
|
|
33
|
+
| "occupancy-ritual-mismatch"
|
|
34
|
+
/** Write target resolved to a Git repository that does not share git-common-dir (#3794). */
|
|
35
|
+
| "foreign-repository-deny" | "scope-not-ready" | "write-propose-ready"
|
|
28
36
|
/** Allowlisted assist/scratch write without active xBRIEF (#1802). */
|
|
29
37
|
| "write-assist-scratch-ready" | "write-ready" | "read-only-deny" | "spawn-explore-ready"
|
|
30
38
|
/** Non-lifecycle assist/docs spawn allowed without active xBRIEF (#3080). */
|
|
@@ -46,6 +54,8 @@ export interface HookDecision {
|
|
|
46
54
|
readonly projectRoot: string;
|
|
47
55
|
readonly message: string;
|
|
48
56
|
readonly scopePath: string | null;
|
|
57
|
+
/** Complete host tool input replacement for an exact lifecycle command (#3611). */
|
|
58
|
+
readonly updatedInput?: Readonly<Record<string, unknown>>;
|
|
49
59
|
}
|
|
50
60
|
export interface HookDispatchInput {
|
|
51
61
|
readonly host: HookHost;
|
|
@@ -106,6 +116,12 @@ export interface HookPolicySeams {
|
|
|
106
116
|
readonly loadAuthzGrants?: (projectRoot: string, state: AuthzState) => readonly HumanOriginGrant[];
|
|
107
117
|
/** When false, skip writing `.deft/authz/audit.jsonl` (tests). Default true. */
|
|
108
118
|
readonly authzAudit?: boolean;
|
|
119
|
+
/** Test seam for restricting Task lifecycle rewrites to the Directive source repo. */
|
|
120
|
+
readonly runningInsideDeftRepo?: (projectRoot: string) => boolean;
|
|
121
|
+
/** Test seam for execution-root realpath binding in lifecycle rewrites. */
|
|
122
|
+
readonly realpathLifecycleExecutionRoot?: (path: string) => string;
|
|
123
|
+
/** Test seam for Windows drive-only execution-root payloads (#2787). */
|
|
124
|
+
readonly lifecycleExecutionPlatform?: NodeJS.Platform;
|
|
109
125
|
}
|
|
110
126
|
/** POSIX-ish project-relative path for lifecycle matching. */
|
|
111
127
|
export declare function toProjectRelativePosix(projectRoot: string, targetPath: string): string;
|
|
@@ -153,6 +169,41 @@ export declare function isAssistScratchWrite(projectRoot: string, targetPath: st
|
|
|
153
169
|
/** Normalize hook project-root resolution on Windows (doubled drive + MSYS `/c/...`). */
|
|
154
170
|
export declare function normalizeHookProjectRoot(path: string): string;
|
|
155
171
|
export declare function projectRootFromHookPayload(payload: unknown, fallback: string): string;
|
|
172
|
+
/** Interpolate both roots so a deny names the tree that was judged (#3794). */
|
|
173
|
+
export declare function formatHookRootNote(payloadRoot: string, effectiveRoot: string): string;
|
|
174
|
+
/** Why a mutation target was refused, so the deny message can be specific (#3794). */
|
|
175
|
+
export type EffectiveHookRootRefusal =
|
|
176
|
+
/** Both common-dirs resolved and differ: a proven separate repository. */
|
|
177
|
+
"foreign-repository"
|
|
178
|
+
/** `payloadRoot` is a repository but the target's identity could not be read. */
|
|
179
|
+
| "unproven-identity"
|
|
180
|
+
/** Members of one mutation resolved to two admitted worktrees. */
|
|
181
|
+
| "worktree-span";
|
|
182
|
+
export interface EffectiveHookRootAdmission {
|
|
183
|
+
readonly root: string;
|
|
184
|
+
/** True when the target was refused and the dispatcher must deny (#3794). */
|
|
185
|
+
readonly foreign: boolean;
|
|
186
|
+
readonly candidate: string | null;
|
|
187
|
+
readonly refusal: EffectiveHookRootRefusal | null;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Admit the Git toplevel of the write target only when it shares
|
|
191
|
+
* `--git-common-dir` with `payloadRoot`.
|
|
192
|
+
*
|
|
193
|
+
* Identity resolves to one of three outcomes, not two. A `payloadRoot` that is
|
|
194
|
+
* not a Git repository never posed a containment question, so it keeps today's
|
|
195
|
+
* payloadRoot gating. A `payloadRoot` that *is* a repository, paired with a
|
|
196
|
+
* target that resolved to some other toplevel whose identity cannot be read, is
|
|
197
|
+
* a question asked and left unanswered — that fails closed rather than
|
|
198
|
+
* inheriting payloadRoot's occupancy and ritual state (#3794).
|
|
199
|
+
*/
|
|
200
|
+
export declare function admitEffectiveHookRoot(payloadRoot: string, writeTarget: string | null, runGit: GitRunner): EffectiveHookRootAdmission;
|
|
201
|
+
/**
|
|
202
|
+
* Admit every mutation target and require one effectiveRoot. A refused member
|
|
203
|
+
* short-circuits; a span of two admitted worktrees is also refused so
|
|
204
|
+
* occupancy/ritual cannot follow only the declared ApplyPatch path (#3794).
|
|
205
|
+
*/
|
|
206
|
+
export declare function admitMutationTargetSet(payloadRoot: string, targets: readonly string[], runGit: GitRunner): EffectiveHookRootAdmission;
|
|
156
207
|
export declare function isHookHost(value: string): value is HookHost;
|
|
157
208
|
export declare function isHookEvent(value: string): value is HookEvent;
|
|
158
209
|
/** Decide a normalized event using only the P0 direct-write policy. */
|