@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
|
@@ -2,6 +2,7 @@ import { lstatSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSyn
|
|
|
2
2
|
import { basename, dirname, join, resolve } from "node:path";
|
|
3
3
|
import { cacheGet } from "../cache/operations.js";
|
|
4
4
|
import { scan } from "../cache/scanner.js";
|
|
5
|
+
import { assertCompletedArcAllowsIngest, DesignCritiqueIngestBlockedError, } from "../design-critique/completed-arc-record.js";
|
|
5
6
|
import { assertWriteTargetSafe, ProjectionContainmentError } from "../fs/projection-containment.js";
|
|
6
7
|
import { hasArtifactSuffix, resolveLifecycleRoot } from "../layout/resolve.js";
|
|
7
8
|
import { captureAndAttachLiteralAcceptance } from "../literal-acceptance/index.js";
|
|
@@ -703,6 +704,41 @@ function resolveIngestProjectRoot(vbriefDir, cwd) {
|
|
|
703
704
|
}
|
|
704
705
|
return null;
|
|
705
706
|
}
|
|
707
|
+
function issueLabelNames(issue) {
|
|
708
|
+
const labels = issue.labels;
|
|
709
|
+
if (!Array.isArray(labels))
|
|
710
|
+
return [];
|
|
711
|
+
const names = [];
|
|
712
|
+
for (const lbl of labels) {
|
|
713
|
+
if (typeof lbl === "string") {
|
|
714
|
+
names.push(lbl);
|
|
715
|
+
continue;
|
|
716
|
+
}
|
|
717
|
+
if (lbl !== null && typeof lbl === "object" && !Array.isArray(lbl)) {
|
|
718
|
+
const name = lbl.name;
|
|
719
|
+
if (typeof name === "string")
|
|
720
|
+
names.push(name);
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
return names;
|
|
724
|
+
}
|
|
725
|
+
function threadCommentsFromIssue(issue) {
|
|
726
|
+
const raw = issue[ISSUE_COMMENT_THREAD_KEY];
|
|
727
|
+
if (!Array.isArray(raw))
|
|
728
|
+
return [];
|
|
729
|
+
const out = [];
|
|
730
|
+
for (const entry of raw) {
|
|
731
|
+
if (entry === null || typeof entry !== "object" || Array.isArray(entry))
|
|
732
|
+
continue;
|
|
733
|
+
const rec = entry;
|
|
734
|
+
const id = Number(rec.id);
|
|
735
|
+
if (!Number.isSafeInteger(id) || id <= 0)
|
|
736
|
+
continue;
|
|
737
|
+
const body = typeof rec.body === "string" ? rec.body : "";
|
|
738
|
+
out.push({ id, body });
|
|
739
|
+
}
|
|
740
|
+
return out;
|
|
741
|
+
}
|
|
706
742
|
export function ingestOne(issue, options) {
|
|
707
743
|
const number = Number(issue.number);
|
|
708
744
|
const refs = options.existingRefs ?? scanProvenanceRefs(options.vbriefDir);
|
|
@@ -719,6 +755,11 @@ export function ingestOne(issue, options) {
|
|
|
719
755
|
cwd: options.cwd,
|
|
720
756
|
cacheRoot: options.cacheRoot,
|
|
721
757
|
});
|
|
758
|
+
assertCompletedArcAllowsIngest({
|
|
759
|
+
issueNumber: number,
|
|
760
|
+
labels: issueLabelNames(enriched),
|
|
761
|
+
comments: threadCommentsFromIssue(enriched),
|
|
762
|
+
});
|
|
722
763
|
const emissionLayout = resolveIngestEmissionLayout(options.vbriefDir);
|
|
723
764
|
const [vbrief, folder] = buildIssueVbrief(enriched, options.status, options.repoUrl, {
|
|
724
765
|
infoRootKey: emissionLayout.infoRootKey,
|
|
@@ -774,6 +815,7 @@ export function ingestBulk(issues, options) {
|
|
|
774
815
|
duplicate: [],
|
|
775
816
|
dryrun: [],
|
|
776
817
|
failed: [],
|
|
818
|
+
blocked: [],
|
|
777
819
|
notices: [],
|
|
778
820
|
};
|
|
779
821
|
for (const issue of filtered) {
|
|
@@ -790,6 +832,11 @@ export function ingestBulk(issues, options) {
|
|
|
790
832
|
process.stderr.write(`${exc.message}\n`);
|
|
791
833
|
continue;
|
|
792
834
|
}
|
|
835
|
+
if (exc instanceof DesignCritiqueIngestBlockedError) {
|
|
836
|
+
summary.blocked.push(`#${exc.issueNumber}`);
|
|
837
|
+
process.stderr.write(`${exc.message}\n`);
|
|
838
|
+
continue;
|
|
839
|
+
}
|
|
793
840
|
throw exc;
|
|
794
841
|
}
|
|
795
842
|
const [result, path, msg] = ingested;
|
|
@@ -861,7 +908,8 @@ export function issueIngestMain(args) {
|
|
|
861
908
|
const duplicate = summary.duplicate;
|
|
862
909
|
const dryrun = summary.dryrun;
|
|
863
910
|
const failed = summary.failed ?? [];
|
|
864
|
-
|
|
911
|
+
const blocked = summary.blocked ?? [];
|
|
912
|
+
process.stdout.write(`issue:ingest bulk summary: ${created.length} created, ${duplicate.length} duplicate, ${dryrun.length} dry-run, ${failed.length} refused, ${blocked.length} blocked (total considered: ${summary.total})\n`);
|
|
865
913
|
for (const entry of created) {
|
|
866
914
|
process.stdout.write(` CREATED ${entry}\n`);
|
|
867
915
|
}
|
|
@@ -877,8 +925,16 @@ export function issueIngestMain(args) {
|
|
|
877
925
|
for (const entry of failed) {
|
|
878
926
|
process.stdout.write(` REFUSED ${entry} (quarantine scanner hard-fail; nothing written)\n`);
|
|
879
927
|
}
|
|
928
|
+
for (const entry of blocked) {
|
|
929
|
+
process.stdout.write(` BLOCKED ${entry} (design-critique completed-arc record; nothing written)\n`);
|
|
930
|
+
}
|
|
880
931
|
// #2306: fail closed on any quarantine hard-fail in the batch.
|
|
881
|
-
|
|
932
|
+
// Design-critique protocol holds are exit 1, not the scanner fatal path.
|
|
933
|
+
if (failed.length > 0)
|
|
934
|
+
return 2;
|
|
935
|
+
if (blocked.length > 0)
|
|
936
|
+
return 1;
|
|
937
|
+
return 0;
|
|
882
938
|
}
|
|
883
939
|
const issue = fetchIssue(repo, args.number, { cwd: projectRoot });
|
|
884
940
|
if (issue === null) {
|
|
@@ -901,6 +957,10 @@ export function issueIngestMain(args) {
|
|
|
901
957
|
process.stderr.write(`${exc.message}\n`);
|
|
902
958
|
return 2;
|
|
903
959
|
}
|
|
960
|
+
if (exc instanceof DesignCritiqueIngestBlockedError) {
|
|
961
|
+
process.stderr.write(`${exc.message}\n`);
|
|
962
|
+
return 1;
|
|
963
|
+
}
|
|
904
964
|
throw exc;
|
|
905
965
|
}
|
|
906
966
|
process.stdout.write(`${msg}\n`);
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
/** Minimal runtime capability probe for github_auth_modes (#1557a / #1784). */
|
|
2
|
+
import { type ManagedRuntimeProbe } from "../platform/cursor-managed-runtime.js";
|
|
2
3
|
export declare const RUNTIME_MODE_LOCAL_UNSANDBOXED = "local-unsandboxed";
|
|
3
4
|
export declare const RUNTIME_MODE_CURSOR_NATIVE_SANDBOX = "cursor-native-sandbox";
|
|
4
5
|
export declare const RUNTIME_MODE_CLOUD_HEADLESS = "cloud-headless";
|
|
5
6
|
export declare const KNOWN_RUNTIME_MODES: Set<string>;
|
|
6
7
|
export interface RuntimeCapabilityReport {
|
|
7
8
|
readonly runtimeMode: string;
|
|
9
|
+
/** Stable id naming why `runtimeMode` was chosen; surfaced by scm:status (#3859). */
|
|
10
|
+
readonly runtimeModeReason?: string;
|
|
8
11
|
}
|
|
9
|
-
export
|
|
10
|
-
|
|
12
|
+
export interface ProbeRuntimeCapabilityOptions {
|
|
13
|
+
/** Injectable managed-runtime probe (#3859). Defaults to the metadata read. */
|
|
14
|
+
readonly managedRuntimeProbe?: ManagedRuntimeProbe;
|
|
15
|
+
}
|
|
16
|
+
export declare function probeRuntimeCapabilities(environ?: NodeJS.ProcessEnv, options?: ProbeRuntimeCapabilityOptions): RuntimeCapabilityReport;
|
|
17
|
+
export declare function getPlatformCapabilities(options?: ProbeRuntimeCapabilityOptions): RuntimeCapabilityReport;
|
|
11
18
|
//# sourceMappingURL=platform-capabilities.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** Minimal runtime capability probe for github_auth_modes (#1557a / #1784). */
|
|
2
|
+
import { hasExplicitHostGhSelection, probeManagedRuntime, RUNTIME_REASON_CI_MARKER, RUNTIME_REASON_CURSOR_MARKER_AMBIGUOUS, RUNTIME_REASON_CURSOR_SANDBOX_MARKER, RUNTIME_REASON_EXPLICIT_HOST_GH, RUNTIME_REASON_MANAGED_RUNTIME_PROBE, RUNTIME_REASON_NO_RUNTIME_MARKER, } from "../platform/cursor-managed-runtime.js";
|
|
2
3
|
export const RUNTIME_MODE_LOCAL_UNSANDBOXED = "local-unsandboxed";
|
|
3
4
|
export const RUNTIME_MODE_CURSOR_NATIVE_SANDBOX = "cursor-native-sandbox";
|
|
4
5
|
export const RUNTIME_MODE_CLOUD_HEADLESS = "cloud-headless";
|
|
@@ -11,24 +12,52 @@ const TRUTHY = new Set(["1", "true", "yes", "on"]);
|
|
|
11
12
|
function isTruthy(value) {
|
|
12
13
|
return value !== undefined && TRUTHY.has(value.trim().toLowerCase());
|
|
13
14
|
}
|
|
14
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Classify the execution runtime.
|
|
17
|
+
*
|
|
18
|
+
* Ordering is load-bearing (#3859):
|
|
19
|
+
* 1. CI markers, so a CI runner is never reclassified by a Cursor signal.
|
|
20
|
+
* 2. A positive Cursor managed-runtime read, above every other Cursor signal.
|
|
21
|
+
* 3. Cursor native sandbox.
|
|
22
|
+
* 4. A Cursor marker with no managed read leaves the runtime AMBIGUOUS. Only
|
|
23
|
+
* an explicit operator/dispatcher selection resolves it to local; absent
|
|
24
|
+
* that, the verdict is unchanged from before #3859.
|
|
25
|
+
*/
|
|
26
|
+
function classifyRuntimeMode(environ = process.env, options = {}) {
|
|
15
27
|
for (const key of ["GROK_BUILD", "GITHUB_ACTIONS", "CI", "BUILDKITE", "DEFT_AGENT_RUNTIME"]) {
|
|
16
28
|
if (isTruthy(environ[key])) {
|
|
17
|
-
return RUNTIME_MODE_CLOUD_HEADLESS;
|
|
29
|
+
return { mode: RUNTIME_MODE_CLOUD_HEADLESS, reason: RUNTIME_REASON_CI_MARKER };
|
|
18
30
|
}
|
|
19
31
|
}
|
|
32
|
+
const managedProbe = options.managedRuntimeProbe ?? probeManagedRuntime;
|
|
33
|
+
if (managedProbe(environ).verdict === "managed") {
|
|
34
|
+
return {
|
|
35
|
+
mode: RUNTIME_MODE_CLOUD_HEADLESS,
|
|
36
|
+
reason: RUNTIME_REASON_MANAGED_RUNTIME_PROBE,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
20
39
|
if (isTruthy(environ.CURSOR_SANDBOX) || isTruthy(environ.CURSOR_SANDBOX_LANDLOCK_STATUS)) {
|
|
21
|
-
return
|
|
40
|
+
return {
|
|
41
|
+
mode: RUNTIME_MODE_CURSOR_NATIVE_SANDBOX,
|
|
42
|
+
reason: RUNTIME_REASON_CURSOR_SANDBOX_MARKER,
|
|
43
|
+
};
|
|
22
44
|
}
|
|
23
45
|
if (isTruthy(environ.CURSOR_AGENT) || isTruthy(environ.CURSOR_COMPOSER)) {
|
|
24
|
-
|
|
46
|
+
if (hasExplicitHostGhSelection(environ)) {
|
|
47
|
+
return { mode: RUNTIME_MODE_LOCAL_UNSANDBOXED, reason: RUNTIME_REASON_EXPLICIT_HOST_GH };
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
mode: RUNTIME_MODE_CLOUD_HEADLESS,
|
|
51
|
+
reason: RUNTIME_REASON_CURSOR_MARKER_AMBIGUOUS,
|
|
52
|
+
};
|
|
25
53
|
}
|
|
26
|
-
return RUNTIME_MODE_LOCAL_UNSANDBOXED;
|
|
54
|
+
return { mode: RUNTIME_MODE_LOCAL_UNSANDBOXED, reason: RUNTIME_REASON_NO_RUNTIME_MARKER };
|
|
27
55
|
}
|
|
28
|
-
export function probeRuntimeCapabilities(environ = process.env) {
|
|
29
|
-
|
|
56
|
+
export function probeRuntimeCapabilities(environ = process.env, options = {}) {
|
|
57
|
+
const { mode, reason } = classifyRuntimeMode(environ, options);
|
|
58
|
+
return { runtimeMode: mode, runtimeModeReason: reason };
|
|
30
59
|
}
|
|
31
|
-
export function getPlatformCapabilities() {
|
|
32
|
-
return probeRuntimeCapabilities();
|
|
60
|
+
export function getPlatformCapabilities(options = {}) {
|
|
61
|
+
return probeRuntimeCapabilities(process.env, options);
|
|
33
62
|
}
|
|
34
63
|
//# sourceMappingURL=platform-capabilities.js.map
|
|
@@ -6,11 +6,28 @@ export interface OrphanActiveBrief {
|
|
|
6
6
|
readonly reason: string;
|
|
7
7
|
readonly kind: OrphanKind;
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* How the run's issue-state verdicts were reached (#3767). A pass with
|
|
11
|
+
* `unverified > 0` is not evidence that the tree is clean.
|
|
12
|
+
*/
|
|
13
|
+
export interface OrphanActiveBasis {
|
|
14
|
+
readonly inventory: number;
|
|
15
|
+
readonly live: number;
|
|
16
|
+
readonly cache: number;
|
|
17
|
+
readonly unverified: number;
|
|
18
|
+
/** Oldest cache entry that produced a verdict, in ms. */
|
|
19
|
+
readonly maxCacheAgeMs: number | null;
|
|
20
|
+
/** True when reads resolved through `ghx`, a cached GET proxy. */
|
|
21
|
+
readonly proxied: boolean;
|
|
22
|
+
readonly elapsedMs: number;
|
|
23
|
+
readonly budgetMs: number;
|
|
24
|
+
}
|
|
9
25
|
export interface EvaluateResult {
|
|
10
26
|
readonly code: 0 | 1 | 2;
|
|
11
27
|
readonly message: string;
|
|
12
28
|
readonly stream: OutputStream;
|
|
13
29
|
readonly orphans: readonly OrphanActiveBrief[];
|
|
30
|
+
readonly basis: OrphanActiveBasis;
|
|
14
31
|
}
|
|
15
32
|
export interface EvaluateOptions {
|
|
16
33
|
readonly quiet?: boolean;
|
|
@@ -19,6 +36,8 @@ export interface EvaluateOptions {
|
|
|
19
36
|
readonly skipGh?: boolean;
|
|
20
37
|
/** When set, scan only active/running briefs that reference this issue (#3429). */
|
|
21
38
|
readonly issue?: number | null;
|
|
39
|
+
/** Monotonic clock seam so basis ages and budget checks are testable. */
|
|
40
|
+
readonly nowMs?: () => number;
|
|
22
41
|
}
|
|
23
42
|
/**
|
|
24
43
|
* Pure evaluator for orphaned active/running xBRIEF detection (#2321 / #3429).
|
|
@@ -26,6 +45,12 @@ export interface EvaluateOptions {
|
|
|
26
45
|
* issues and/or a merged PR — the stop-at:pr-open orphan signature.
|
|
27
46
|
* Pass `issue` to scan one origin after merge. Confirmed shipped prints
|
|
28
47
|
* scope:complete; unresolved lookup still exits 1 with a retry remediation.
|
|
48
|
+
*
|
|
49
|
+
* Issue state resolves by query shape (#3767): scoped `--issue N` takes an
|
|
50
|
+
* authoritative read and stays fail-closed on unknown; the unscoped sweep uses
|
|
51
|
+
* one complete, fail-closed open-issue inventory and stays fail-open on
|
|
52
|
+
* unknown so offline work is not network-authorized. A cache hit is honoured
|
|
53
|
+
* only inside `ISSUE_CACHE_MAX_AGE_MS`, and every verdict reports its basis.
|
|
29
54
|
*/
|
|
30
55
|
export declare function evaluate(projectRoot: string, options?: EvaluateOptions): EvaluateResult;
|
|
31
56
|
//# sourceMappingURL=evaluate.d.ts.map
|