@deftai/directive-core 0.66.2 → 0.68.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/agents-md-advisory/evaluate.d.ts +44 -0
- package/dist/agents-md-advisory/evaluate.js +115 -0
- package/dist/agents-md-advisory/index.d.ts +2 -0
- package/dist/agents-md-advisory/index.js +2 -0
- package/dist/agents-md-budget/evaluate.d.ts +38 -0
- package/dist/agents-md-budget/evaluate.js +152 -0
- package/dist/agents-md-budget/index.d.ts +2 -0
- package/dist/agents-md-budget/index.js +2 -0
- package/dist/check/index.d.ts +1 -1
- package/dist/check/index.js +1 -1
- package/dist/check/orchestrator.d.ts +14 -4
- package/dist/check/orchestrator.js +30 -6
- package/dist/codebase/map.d.ts +1 -0
- package/dist/codebase/map.js +5 -2
- package/dist/doctor/checks.js +11 -11
- package/dist/doctor/constants.d.ts +7 -2
- package/dist/doctor/constants.js +17 -1
- package/dist/doctor/flags.js +5 -1
- package/dist/doctor/main.js +99 -8
- package/dist/doctor/payload-staleness.js +15 -6
- package/dist/doctor/types.d.ts +7 -0
- package/dist/forward-coverage/evaluate.d.ts +55 -0
- package/dist/forward-coverage/evaluate.js +254 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/init-deposit/constants.d.ts +14 -0
- package/dist/init-deposit/constants.js +10 -0
- package/dist/init-deposit/hygiene.d.ts +50 -0
- package/dist/init-deposit/hygiene.js +176 -0
- package/dist/init-deposit/init-deposit.d.ts +1 -0
- package/dist/init-deposit/init-deposit.js +7 -1
- package/dist/init-deposit/refresh.d.ts +2 -0
- package/dist/init-deposit/refresh.js +48 -30
- package/dist/init-deposit/scaffold.d.ts +3 -4
- package/dist/init-deposit/scaffold.js +3 -24
- package/dist/intake/github-auth-modes.d.ts +1 -0
- package/dist/intake/github-auth-modes.js +1 -0
- package/dist/intake/issue-ingest.d.ts +6 -2
- package/dist/intake/issue-ingest.js +65 -9
- package/dist/integration-e2e/helpers.d.ts +0 -1
- package/dist/integration-e2e/helpers.js +3 -7
- package/dist/layout/lifecycle-ref.d.ts +15 -0
- package/dist/layout/lifecycle-ref.js +55 -0
- package/dist/platform/agents-consumer-header.d.ts +13 -0
- package/dist/platform/agents-consumer-header.js +57 -0
- package/dist/platform/agents-md.d.ts +28 -0
- package/dist/platform/agents-md.js +38 -1
- package/dist/platform/index.d.ts +1 -0
- package/dist/platform/index.js +1 -0
- package/dist/policy/agents-md-advisory.d.ts +52 -0
- package/dist/policy/agents-md-advisory.js +63 -0
- package/dist/policy/agents-md-budget.d.ts +24 -0
- package/dist/policy/agents-md-budget.js +89 -0
- package/dist/policy/index.d.ts +1 -0
- package/dist/policy/index.js +1 -0
- package/dist/policy/resolve.js +56 -46
- package/dist/pr-merge-readiness/ci-gate.d.ts +28 -0
- package/dist/pr-merge-readiness/ci-gate.js +79 -0
- package/dist/pr-merge-readiness/compute.d.ts +15 -1
- package/dist/pr-merge-readiness/compute.js +129 -9
- package/dist/pr-merge-readiness/gh.d.ts +8 -0
- package/dist/pr-merge-readiness/gh.js +30 -5
- package/dist/pr-merge-readiness/index.d.ts +5 -1
- package/dist/pr-merge-readiness/index.js +3 -0
- package/dist/pr-merge-readiness/main.d.ts +3 -0
- package/dist/pr-merge-readiness/main.js +73 -6
- package/dist/pr-merge-readiness/mergeability.d.ts +43 -0
- package/dist/pr-merge-readiness/mergeability.js +105 -0
- package/dist/pr-merge-readiness/output.js +20 -0
- package/dist/pr-merge-readiness/slizard-gate.d.ts +47 -0
- package/dist/pr-merge-readiness/slizard-gate.js +119 -0
- package/dist/pr-monitor/index.d.ts +1 -1
- package/dist/pr-monitor/index.js +1 -1
- package/dist/pr-monitor/monitor.d.ts +8 -2
- package/dist/pr-monitor/monitor.js +35 -6
- package/dist/pr-wait-mergeable/wrappers.d.ts +12 -1
- package/dist/pr-wait-mergeable/wrappers.js +13 -5
- package/dist/pr-watch/constants.d.ts +33 -0
- package/dist/pr-watch/constants.js +33 -0
- package/dist/pr-watch/index.d.ts +6 -0
- package/dist/pr-watch/index.js +6 -0
- package/dist/pr-watch/main.d.ts +21 -0
- package/dist/pr-watch/main.js +206 -0
- package/dist/pr-watch/probe.d.ts +13 -0
- package/dist/pr-watch/probe.js +100 -0
- package/dist/pr-watch/types.d.ts +47 -0
- package/dist/pr-watch/types.js +2 -0
- package/dist/pr-watch/watch.d.ts +12 -0
- package/dist/pr-watch/watch.js +122 -0
- package/dist/preflight-cache/evaluate.d.ts +1 -0
- package/dist/preflight-cache/evaluate.js +17 -10
- package/dist/render/project-render.d.ts +16 -2
- package/dist/render/project-render.js +155 -97
- package/dist/scope/capacity-stamp.d.ts +24 -2
- package/dist/scope/capacity-stamp.js +80 -28
- package/dist/scope/decomposed-refs.js +2 -2
- package/dist/scope/project-definition-sync.js +3 -3
- package/dist/scope/vbrief-ref.d.ts +2 -1
- package/dist/scope/vbrief-ref.js +3 -2
- package/dist/spec-authority/constants.d.ts +6 -0
- package/dist/spec-authority/constants.js +11 -0
- package/dist/spec-authority/resolver.js +3 -3
- package/dist/swarm/finalize-cohort-cli.d.ts +5 -0
- package/dist/swarm/finalize-cohort-cli.js +100 -0
- package/dist/swarm/finalize-cohort.d.ts +39 -0
- package/dist/swarm/finalize-cohort.js +589 -0
- package/dist/swarm/index.d.ts +2 -0
- package/dist/swarm/index.js +2 -0
- package/dist/swarm/launch.d.ts +13 -0
- package/dist/swarm/launch.js +19 -7
- package/dist/swarm/routing-verify.d.ts +1 -1
- package/dist/swarm/routing-verify.js +11 -10
- package/dist/swarm/routing.d.ts +9 -0
- package/dist/swarm/routing.js +46 -0
- package/dist/swarm/verify-review-clean-cli.js +25 -1
- package/dist/swarm/verify-review-clean.d.ts +9 -1
- package/dist/swarm/verify-review-clean.js +76 -3
- package/dist/triage/queue/index.d.ts +1 -0
- package/dist/triage/queue/index.js +1 -0
- package/dist/triage/queue/project.d.ts +6 -1
- package/dist/triage/queue/project.js +9 -4
- package/dist/triage/queue/reconcile-live-state.d.ts +42 -0
- package/dist/triage/queue/reconcile-live-state.js +54 -0
- package/dist/triage/scope/mutations-core.js +91 -81
- package/dist/triage/scope/resolve.js +4 -3
- package/dist/triage/scope-drift/add-ignore.js +33 -32
- package/dist/triage/scope-drift/scope-rules.js +3 -3
- package/dist/triage/subscribe/index.js +51 -45
- package/dist/triage/welcome/writers.js +79 -64
- package/dist/vbrief-build/project-definition-io.js +8 -3
- package/dist/vbrief-validate/paths.js +8 -4
- package/dist/vbrief-validate/precutover.d.ts +1 -1
- package/dist/vbrief-validate/precutover.js +12 -10
- package/dist/verify-source/biome-config.d.ts +41 -0
- package/dist/verify-source/biome-config.js +97 -0
- package/dist/verify-source/index.d.ts +1 -0
- package/dist/verify-source/index.js +1 -0
- package/dist/xbrief-migrate/agents-header.d.ts +69 -0
- package/dist/xbrief-migrate/agents-header.js +179 -0
- package/dist/xbrief-migrate/fs-helpers.d.ts +3 -0
- package/dist/xbrief-migrate/fs-helpers.js +11 -0
- package/dist/xbrief-migrate/index.d.ts +1 -0
- package/dist/xbrief-migrate/index.js +1 -0
- package/dist/xbrief-migrate/migrate-project.js +29 -10
- package/package.json +15 -7
- package/dist/install-upgrade/index.d.ts +0 -13
- package/dist/install-upgrade/index.js +0 -251
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
import { finalizeCohort } from "./finalize-cohort.js";
|
|
4
|
+
export function parseFinalizeCohortArgv(argv) {
|
|
5
|
+
const prNumbers = [];
|
|
6
|
+
const storyTokens = [];
|
|
7
|
+
let repo = null;
|
|
8
|
+
let projectRoot = ".";
|
|
9
|
+
let baseBranch = "master";
|
|
10
|
+
let label = null;
|
|
11
|
+
let dryRun = false;
|
|
12
|
+
let noCommit = false;
|
|
13
|
+
let noOpenPr = false;
|
|
14
|
+
let emitJson = false;
|
|
15
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
16
|
+
const arg = argv[i];
|
|
17
|
+
const next = argv[i + 1];
|
|
18
|
+
if (arg === "--pr" && next !== undefined) {
|
|
19
|
+
for (const piece of next.split(",")) {
|
|
20
|
+
const trimmed = piece.trim();
|
|
21
|
+
if (/^\d+$/.test(trimmed)) {
|
|
22
|
+
prNumbers.push(Number.parseInt(trimmed, 10));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
i += 1;
|
|
26
|
+
}
|
|
27
|
+
else if (arg?.startsWith("--pr=")) {
|
|
28
|
+
for (const piece of arg.slice("--pr=".length).split(",")) {
|
|
29
|
+
const trimmed = piece.trim();
|
|
30
|
+
if (/^\d+$/.test(trimmed)) {
|
|
31
|
+
prNumbers.push(Number.parseInt(trimmed, 10));
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
else if (arg === "--stories" && next !== undefined) {
|
|
36
|
+
storyTokens.push(next);
|
|
37
|
+
i += 1;
|
|
38
|
+
}
|
|
39
|
+
else if (arg === "--repo" && next !== undefined) {
|
|
40
|
+
repo = next;
|
|
41
|
+
i += 1;
|
|
42
|
+
}
|
|
43
|
+
else if (arg?.startsWith("--repo=")) {
|
|
44
|
+
repo = arg.slice("--repo=".length);
|
|
45
|
+
}
|
|
46
|
+
else if (arg === "--project-root" && next !== undefined) {
|
|
47
|
+
projectRoot = next;
|
|
48
|
+
i += 1;
|
|
49
|
+
}
|
|
50
|
+
else if (arg === "--base-branch" && next !== undefined) {
|
|
51
|
+
baseBranch = next;
|
|
52
|
+
i += 1;
|
|
53
|
+
}
|
|
54
|
+
else if (arg === "--label" && next !== undefined) {
|
|
55
|
+
label = next;
|
|
56
|
+
i += 1;
|
|
57
|
+
}
|
|
58
|
+
else if (arg === "--dry-run") {
|
|
59
|
+
dryRun = true;
|
|
60
|
+
}
|
|
61
|
+
else if (arg === "--no-commit") {
|
|
62
|
+
noCommit = true;
|
|
63
|
+
}
|
|
64
|
+
else if (arg === "--no-open-pr") {
|
|
65
|
+
noOpenPr = true;
|
|
66
|
+
}
|
|
67
|
+
else if (arg === "--json") {
|
|
68
|
+
emitJson = true;
|
|
69
|
+
}
|
|
70
|
+
else if (arg !== undefined && !arg.startsWith("-")) {
|
|
71
|
+
storyTokens.push(arg);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
prNumbers,
|
|
76
|
+
storyTokens,
|
|
77
|
+
repo,
|
|
78
|
+
projectRoot,
|
|
79
|
+
baseBranch,
|
|
80
|
+
label,
|
|
81
|
+
dryRun,
|
|
82
|
+
noCommit,
|
|
83
|
+
noOpenPr,
|
|
84
|
+
emitJson,
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
export function finalizeCohortMain(argv = process.argv.slice(2)) {
|
|
88
|
+
const result = finalizeCohort(parseFinalizeCohortArgv(argv));
|
|
89
|
+
if (result.stdout.length > 0) {
|
|
90
|
+
process.stdout.write(result.stdout);
|
|
91
|
+
}
|
|
92
|
+
if (result.stderr.length > 0) {
|
|
93
|
+
process.stderr.write(result.stderr);
|
|
94
|
+
}
|
|
95
|
+
return result.exitCode;
|
|
96
|
+
}
|
|
97
|
+
if (process.argv[1] !== undefined && fileURLToPath(import.meta.url) === process.argv[1]) {
|
|
98
|
+
process.exit(finalizeCohortMain());
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=finalize-cohort-cli.js.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { RunGhFn } from "../pr-protected-issues/types.js";
|
|
2
|
+
import { type SweepResult } from "./complete-cohort.js";
|
|
3
|
+
import { runText } from "./subprocess.js";
|
|
4
|
+
export interface FinalizeCohortResult {
|
|
5
|
+
readonly project_root: string;
|
|
6
|
+
readonly dry_run: boolean;
|
|
7
|
+
readonly no_commit: boolean;
|
|
8
|
+
readonly pr_numbers: readonly number[];
|
|
9
|
+
readonly story_paths: readonly string[];
|
|
10
|
+
readonly closing_issues: readonly number[];
|
|
11
|
+
readonly sweep: SweepResult | null;
|
|
12
|
+
readonly commit_sha: string | null;
|
|
13
|
+
readonly branch: string | null;
|
|
14
|
+
readonly pr_url: string | null;
|
|
15
|
+
readonly errors: readonly string[];
|
|
16
|
+
readonly warnings: readonly string[];
|
|
17
|
+
readonly ok: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface FinalizeCohortArgs {
|
|
20
|
+
readonly prNumbers?: readonly number[];
|
|
21
|
+
readonly storyTokens?: readonly string[];
|
|
22
|
+
readonly repo?: string | null;
|
|
23
|
+
readonly projectRoot?: string;
|
|
24
|
+
readonly baseBranch?: string;
|
|
25
|
+
readonly label?: string | null;
|
|
26
|
+
readonly dryRun?: boolean;
|
|
27
|
+
readonly noCommit?: boolean;
|
|
28
|
+
readonly noOpenPr?: boolean;
|
|
29
|
+
readonly emitJson?: boolean;
|
|
30
|
+
readonly runGh?: RunGhFn;
|
|
31
|
+
readonly runGit?: typeof runText;
|
|
32
|
+
}
|
|
33
|
+
export declare function finalizeCohort(args: FinalizeCohortArgs): {
|
|
34
|
+
exitCode: number;
|
|
35
|
+
stdout: string;
|
|
36
|
+
stderr: string;
|
|
37
|
+
result: FinalizeCohortResult;
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=finalize-cohort.d.ts.map
|