@smartergpt/lexrunner 1.4.0 → 1.4.1
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/CHANGELOG.md +18 -0
- package/README.md +28 -23
- package/dist/{audit-5ZUBPZZX.js → audit-SKMMC2U4.js} +1 -1
- package/dist/{autopilot-JXO4MZ6H.js → autopilot-EBZ44LYS.js} +1 -1
- package/dist/{chunk-WSJEPY7T.js → chunk-4R52WTFO.js} +1 -1
- package/dist/{chunk-R4DWK6FE.js → chunk-6PZDSWCG.js} +13 -10
- package/dist/{chunk-WFN4JTZI.js → chunk-LQSRQ6Z3.js} +5 -5
- package/dist/cli.cjs +131 -127
- package/dist/cli.d.ts +4 -4
- package/dist/cli.js +121 -120
- package/dist/{constraints-V4VWCWR5.js → constraints-2ZK5FJFA.js} +1 -1
- package/dist/sdk/index.d.ts +6 -6
- package/package.json +3 -2
package/dist/cli.d.ts
CHANGED
|
@@ -1248,8 +1248,8 @@ type ArtifactType = keyof typeof ARTIFACT_TYPES;
|
|
|
1248
1248
|
declare const ListArtifactsInputSchema: z.ZodObject<{
|
|
1249
1249
|
runId: z.ZodString;
|
|
1250
1250
|
type: z.ZodOptional<z.ZodEnum<{
|
|
1251
|
-
failure: "failure";
|
|
1252
1251
|
gate: "gate";
|
|
1252
|
+
failure: "failure";
|
|
1253
1253
|
log: "log";
|
|
1254
1254
|
decision: "decision";
|
|
1255
1255
|
report: "report";
|
|
@@ -1267,8 +1267,8 @@ declare const ListArtifactsOutputSchema: z.ZodObject<{
|
|
|
1267
1267
|
artifacts: z.ZodArray<z.ZodObject<{
|
|
1268
1268
|
path: z.ZodString;
|
|
1269
1269
|
type: z.ZodEnum<{
|
|
1270
|
-
failure: "failure";
|
|
1271
1270
|
gate: "gate";
|
|
1271
|
+
failure: "failure";
|
|
1272
1272
|
log: "log";
|
|
1273
1273
|
decision: "decision";
|
|
1274
1274
|
report: "report";
|
|
@@ -1970,6 +1970,7 @@ declare const WorkItem_v1: z.ZodObject<{
|
|
|
1970
1970
|
}, z.core.$strict>;
|
|
1971
1971
|
type WorkItem_v1 = z.infer<typeof WorkItem_v1>;
|
|
1972
1972
|
declare const RunStatus: z.ZodEnum<{
|
|
1973
|
+
created: "created";
|
|
1973
1974
|
blocked: "blocked";
|
|
1974
1975
|
completed: "completed";
|
|
1975
1976
|
planning: "planning";
|
|
@@ -1978,7 +1979,6 @@ declare const RunStatus: z.ZodEnum<{
|
|
|
1978
1979
|
failed: "failed";
|
|
1979
1980
|
paused: "paused";
|
|
1980
1981
|
cancelled: "cancelled";
|
|
1981
|
-
created: "created";
|
|
1982
1982
|
executing: "executing";
|
|
1983
1983
|
delivering: "delivering";
|
|
1984
1984
|
awaiting_human: "awaiting_human";
|
|
@@ -2005,6 +2005,7 @@ declare const Run_v1: z.ZodObject<{
|
|
|
2005
2005
|
release: z.ZodBoolean;
|
|
2006
2006
|
}, z.core.$strict>;
|
|
2007
2007
|
status: z.ZodEnum<{
|
|
2008
|
+
created: "created";
|
|
2008
2009
|
blocked: "blocked";
|
|
2009
2010
|
completed: "completed";
|
|
2010
2011
|
planning: "planning";
|
|
@@ -2013,7 +2014,6 @@ declare const Run_v1: z.ZodObject<{
|
|
|
2013
2014
|
failed: "failed";
|
|
2014
2015
|
paused: "paused";
|
|
2015
2016
|
cancelled: "cancelled";
|
|
2016
|
-
created: "created";
|
|
2017
2017
|
executing: "executing";
|
|
2018
2018
|
delivering: "delivering";
|
|
2019
2019
|
awaiting_human: "awaiting_human";
|
package/dist/cli.js
CHANGED
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
previewConstraints,
|
|
17
17
|
readGovernanceLogs,
|
|
18
18
|
readGovernanceLogsWithLegacy
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-LQSRQ6Z3.js";
|
|
20
20
|
import {
|
|
21
21
|
DEFAULT_REDACT_REGEX,
|
|
22
22
|
EVENT_TYPES,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
finalizeAudit,
|
|
25
25
|
initAuditEmitter,
|
|
26
26
|
redactSecrets
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-6PZDSWCG.js";
|
|
28
28
|
import "./chunk-6KK5JFFE.js";
|
|
29
29
|
import {
|
|
30
30
|
simulateBatchMerges
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
validateWriteOperation,
|
|
68
68
|
verifyToolchainPins,
|
|
69
69
|
writeRunState
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-4R52WTFO.js";
|
|
71
71
|
import {
|
|
72
72
|
ExecutionState,
|
|
73
73
|
generateMarkdownSummary,
|
|
@@ -455,7 +455,7 @@ import "dotenv/config";
|
|
|
455
455
|
// package.json
|
|
456
456
|
var package_default = {
|
|
457
457
|
name: "@smartergpt/lexrunner",
|
|
458
|
-
version: "1.4.
|
|
458
|
+
version: "1.4.1",
|
|
459
459
|
type: "module",
|
|
460
460
|
engines: {
|
|
461
461
|
node: ">=24"
|
|
@@ -483,6 +483,7 @@ var package_default = {
|
|
|
483
483
|
"LICENSE.md"
|
|
484
484
|
],
|
|
485
485
|
bin: {
|
|
486
|
+
lexrunner: "dist/cli.js",
|
|
486
487
|
"lex-pr": "dist/cli.js",
|
|
487
488
|
"lexrunner-mcp": "mcp-server.mjs"
|
|
488
489
|
},
|
|
@@ -532,7 +533,7 @@ var package_default = {
|
|
|
532
533
|
}
|
|
533
534
|
},
|
|
534
535
|
scripts: {
|
|
535
|
-
postinstall: `node -e "console.log('\\n\u{1F4E6} lexrunner installed! Run \\"npx
|
|
536
|
+
postinstall: `node -e "console.log('\\n\u{1F4E6} lexrunner installed! Run \\"npx lexrunner init\\" to set up your workspace. The \\"lex-pr\\" compatibility alias remains supported.\\n')"`,
|
|
536
537
|
dev: "tsx watch src/cli.ts",
|
|
537
538
|
cli: "tsx src/cli.ts",
|
|
538
539
|
"cli:built": "node dist/cli.js",
|
|
@@ -3466,18 +3467,18 @@ function boundedResult(value) {
|
|
|
3466
3467
|
import * as fs8 from "fs";
|
|
3467
3468
|
function registerStatusCommand(program2, jsonModeActive2) {
|
|
3468
3469
|
program2.command("status").description(
|
|
3469
|
-
"Show current execution status and merge eligibility (canonical:
|
|
3470
|
+
"Show current execution status and merge eligibility (canonical: lexrunner weave status)"
|
|
3470
3471
|
).option("--plan <file>", "Path to plan.json file", "plan.json").argument("[file]", "Path to plan.json file (alternative to --plan)").option("--json", "Output JSON format").addHelpText(
|
|
3471
3472
|
"after",
|
|
3472
3473
|
`
|
|
3473
3474
|
Examples:
|
|
3474
|
-
$
|
|
3475
|
-
$
|
|
3476
|
-
$
|
|
3475
|
+
$ lexrunner status plan.json # Show plan status
|
|
3476
|
+
$ lexrunner status --json # JSON output for dashboards
|
|
3477
|
+
$ lexrunner status --json | jq '.mergeSummary' # Extract merge summary
|
|
3477
3478
|
|
|
3478
3479
|
Common Issues:
|
|
3479
3480
|
\u2022 "Plan file not found": Verify path to plan.json
|
|
3480
|
-
\u2022 Missing execution state: Run '
|
|
3481
|
+
\u2022 Missing execution state: Run 'lexrunner execute' first to populate status`
|
|
3481
3482
|
).action((file, opts) => {
|
|
3482
3483
|
const planFile = opts.plan || file || "plan.json";
|
|
3483
3484
|
try {
|
|
@@ -3538,7 +3539,7 @@ function writeJsonOutput(data) {
|
|
|
3538
3539
|
|
|
3539
3540
|
// src/commands/report.ts
|
|
3540
3541
|
function registerReportCommand(program2, deps) {
|
|
3541
|
-
program2.command("report").description("Aggregate gate reports from directory (canonical:
|
|
3542
|
+
program2.command("report").description("Aggregate gate reports from directory (canonical: lexrunner weave report)").argument("<dir>", "Directory containing *.json gate result files").option("--json", "Output JSON format (alias for --out json)").option("--out <format>", "Output format: 'json' or 'md'", "json").action((dir, opts) => {
|
|
3542
3543
|
try {
|
|
3543
3544
|
const report = readGateDir(dir);
|
|
3544
3545
|
const outputFormat = opts.json || deps.jsonModeActive() ? "json" : opts.out;
|
|
@@ -6656,7 +6657,7 @@ async function registerAuditCommands(program2) {
|
|
|
6656
6657
|
|
|
6657
6658
|
// src/commands/completion.ts
|
|
6658
6659
|
var CompletionGenerator = class {
|
|
6659
|
-
constructor(programName = "
|
|
6660
|
+
constructor(programName = "lexrunner") {
|
|
6660
6661
|
this.programName = programName;
|
|
6661
6662
|
this.commands = [
|
|
6662
6663
|
"init",
|
|
@@ -10818,7 +10819,7 @@ async function runWeaveApply(opts, deps) {
|
|
|
10818
10819
|
if (json2) {
|
|
10819
10820
|
const output = { ...preview.summary };
|
|
10820
10821
|
if (showConstraints) {
|
|
10821
|
-
const { previewConstraints: previewConstraints2 } = await import("./constraints-
|
|
10822
|
+
const { previewConstraints: previewConstraints2 } = await import("./constraints-2ZK5FJFA.js");
|
|
10822
10823
|
output.constraints = await previewConstraints2(plan);
|
|
10823
10824
|
}
|
|
10824
10825
|
console.log(canonicalJSONStringify(output));
|
|
@@ -10828,7 +10829,7 @@ async function runWeaveApply(opts, deps) {
|
|
|
10828
10829
|
\u{1F50D} Merge-Weave Dry Run
|
|
10829
10830
|
`);
|
|
10830
10831
|
if (showConstraints) {
|
|
10831
|
-
const { previewConstraints: previewConstraints2, formatConstraintPreview: formatConstraintPreview2 } = await import("./constraints-
|
|
10832
|
+
const { previewConstraints: previewConstraints2, formatConstraintPreview: formatConstraintPreview2 } = await import("./constraints-2ZK5FJFA.js");
|
|
10832
10833
|
console.log(formatConstraintPreview2(await previewConstraints2(plan)));
|
|
10833
10834
|
}
|
|
10834
10835
|
console.log(`Plan: ${opts.plan}`);
|
|
@@ -10932,13 +10933,13 @@ function registerMergeCommand(program2, jsonModeActive2, _getProgramOpts, deps =
|
|
|
10932
10933
|
`
|
|
10933
10934
|
Compatibility:
|
|
10934
10935
|
"merge" is supported through the LexRunner 1.x line and reviewed at 2.0.0.
|
|
10935
|
-
Use "
|
|
10936
|
+
Use "lexrunner weave apply" for new automation.
|
|
10936
10937
|
|
|
10937
10938
|
Examples:
|
|
10938
|
-
$
|
|
10939
|
-
$
|
|
10940
|
-
$
|
|
10941
|
-
$
|
|
10939
|
+
$ lexrunner merge --plan plan.json
|
|
10940
|
+
$ lexrunner merge --plan plan.json --execute
|
|
10941
|
+
$ lexrunner weave apply --plan plan.json --dry-run
|
|
10942
|
+
$ lexrunner weave apply --plan plan.json --execute
|
|
10942
10943
|
`
|
|
10943
10944
|
).action(async (opts) => {
|
|
10944
10945
|
await runApply(
|
|
@@ -11268,7 +11269,7 @@ import * as fs24 from "fs";
|
|
|
11268
11269
|
import * as path15 from "path";
|
|
11269
11270
|
function registerPlanCommand(program2, deps) {
|
|
11270
11271
|
program2.command("plan").description(
|
|
11271
|
-
"Generate plan from configuration sources or GitHub PRs (canonical:
|
|
11272
|
+
"Generate plan from configuration sources or GitHub PRs (canonical: lexrunner weave plan)"
|
|
11272
11273
|
).option("--out <dir>", "Output directory for artifacts (default: <profile>/runner)").option("--json", "Output canonical plan JSON to stdout only").option("--dry-run", "Validate inputs and show what would be written").option("--from-github", "Auto-discover PRs from GitHub API").option("--query <query>", "GitHub search query (e.g., 'is:open label:stack:*')").option("--labels <labels>", "Filter PRs by comma-separated labels").option("--include-drafts", "Include draft PRs in the plan").option("--exclude-prs <numbers>", "Exclude specific PRs by comma-separated PR numbers").option("--github-token <token>", "GitHub API token (or use GITHUB_TOKEN env var)").option("--owner <owner>", "GitHub repository owner (auto-detected from git remote)").option("--repo <repo>", "GitHub repository name (auto-detected from git remote)").option(
|
|
11273
11274
|
"--required-gates <gates>",
|
|
11274
11275
|
"Comma-separated list of required gates (default: lint,typecheck,test)"
|
|
@@ -11286,20 +11287,20 @@ function registerPlanCommand(program2, deps) {
|
|
|
11286
11287
|
"after",
|
|
11287
11288
|
`
|
|
11288
11289
|
Examples:
|
|
11289
|
-
$
|
|
11290
|
-
$
|
|
11291
|
-
$
|
|
11292
|
-
$
|
|
11293
|
-
$
|
|
11294
|
-
$
|
|
11295
|
-
$
|
|
11296
|
-
$
|
|
11297
|
-
$
|
|
11290
|
+
$ lexrunner plan --from-github --json > plan.json # Generate plan from GitHub PRs
|
|
11291
|
+
$ lexrunner plan --dry-run # Preview plan without writing
|
|
11292
|
+
$ lexrunner plan --labels "feature,bugfix" # Filter by labels
|
|
11293
|
+
$ lexrunner plan --exclude-prs 123,456 # Exclude specific PRs
|
|
11294
|
+
$ lexrunner plan --target staging # Target different branch
|
|
11295
|
+
$ lexrunner plan --required-gates lint,test,e2e # Custom gate requirements
|
|
11296
|
+
$ lexrunner plan --from-github --suggest-deps # Review dependency suggestions
|
|
11297
|
+
$ lexrunner plan --from-github --suggest-deps --format=json # JSON suggestions for tooling
|
|
11298
|
+
$ lexrunner plan --from-github --suggest-deps --threshold=0.7 # High-confidence only
|
|
11298
11299
|
|
|
11299
11300
|
Common Issues:
|
|
11300
11301
|
\u2022 GitHub API errors: Set GITHUB_TOKEN environment variable
|
|
11301
11302
|
\u2022 Cycle detection failures: Review dependencies in scope.yml or PR descriptions
|
|
11302
|
-
\u2022 Missing configuration: Run '
|
|
11303
|
+
\u2022 Missing configuration: Run 'lexrunner init' to set up workspace`
|
|
11303
11304
|
).action(async (opts) => {
|
|
11304
11305
|
const previousJsonMode = deps.jsonModeActive();
|
|
11305
11306
|
if (opts.json) {
|
|
@@ -11443,12 +11444,12 @@ async function executePlan(opts, deps) {
|
|
|
11443
11444
|
}
|
|
11444
11445
|
} catch (error) {
|
|
11445
11446
|
if (error instanceof CycleError) {
|
|
11446
|
-
const prefix = deps.jsonModeActive() ? "[
|
|
11447
|
+
const prefix = deps.jsonModeActive() ? "[lexrunner]" : "\u274C";
|
|
11447
11448
|
console.error(`
|
|
11448
11449
|
${prefix} Plan validation failed: ${error.message}`);
|
|
11449
11450
|
throwExit(1);
|
|
11450
11451
|
} else if (error instanceof UnknownDependencyError) {
|
|
11451
|
-
const prefix = deps.jsonModeActive() ? "[
|
|
11452
|
+
const prefix = deps.jsonModeActive() ? "[lexrunner]" : "\u274C";
|
|
11452
11453
|
console.error(`
|
|
11453
11454
|
${prefix} Plan validation failed: ${error.message}`);
|
|
11454
11455
|
throwExit(1);
|
|
@@ -11654,7 +11655,7 @@ function registerAutopilotCommand(program2, deps) {
|
|
|
11654
11655
|
argv: process.argv.slice(2)
|
|
11655
11656
|
});
|
|
11656
11657
|
}
|
|
11657
|
-
const { AutopilotLevel0, AutopilotLevel1, AutopilotLevel2: AutopilotLevel22 } = await import("./autopilot-
|
|
11658
|
+
const { AutopilotLevel0, AutopilotLevel1, AutopilotLevel2: AutopilotLevel22 } = await import("./autopilot-EBZ44LYS.js");
|
|
11658
11659
|
const context = {
|
|
11659
11660
|
plan,
|
|
11660
11661
|
profilePath: profile.path,
|
|
@@ -12641,13 +12642,13 @@ import * as fs27 from "fs";
|
|
|
12641
12642
|
import * as path17 from "path";
|
|
12642
12643
|
async function finalizeAuditGuard(emitter, status) {
|
|
12643
12644
|
try {
|
|
12644
|
-
const { finalizeAudit: finalizeAudit2 } = await import("./audit-
|
|
12645
|
+
const { finalizeAudit: finalizeAudit2 } = await import("./audit-SKMMC2U4.js");
|
|
12645
12646
|
await finalizeAudit2(emitter, status);
|
|
12646
12647
|
} catch (e) {
|
|
12647
12648
|
if (e instanceof Error && typeof e.message === "string" && e.message.startsWith("HIPAA:")) {
|
|
12648
12649
|
throw e;
|
|
12649
12650
|
}
|
|
12650
|
-
console.warn("[
|
|
12651
|
+
console.warn("[lexrunner] audit: finalize failed (ignored)", String(e));
|
|
12651
12652
|
}
|
|
12652
12653
|
}
|
|
12653
12654
|
function registerExecuteCommand(program2, deps, registration = {}) {
|
|
@@ -12658,16 +12659,16 @@ function registerExecuteCommand(program2, deps, registration = {}) {
|
|
|
12658
12659
|
"after",
|
|
12659
12660
|
`
|
|
12660
12661
|
Examples:
|
|
12661
|
-
$
|
|
12662
|
-
$
|
|
12663
|
-
$
|
|
12664
|
-
$
|
|
12665
|
-
$
|
|
12666
|
-
$
|
|
12662
|
+
$ lexrunner execute plan.json # Run all gates in plan
|
|
12663
|
+
$ lexrunner execute --dry-run # Validate plan without running gates
|
|
12664
|
+
$ lexrunner execute --json > results.json # JSON output for CI/CD integration
|
|
12665
|
+
$ lexrunner execute --status-table # Generate PR comment-ready status table
|
|
12666
|
+
$ lexrunner execute --timeout 60000 # Increase timeout to 60 seconds
|
|
12667
|
+
$ lexrunner execute --artifact-dir ./build # Custom artifact location
|
|
12667
12668
|
|
|
12668
12669
|
Common Issues:
|
|
12669
12670
|
\u2022 Gates timing out: Increase --timeout or check gate commands
|
|
12670
|
-
\u2022 Missing dependencies: Run '
|
|
12671
|
+
\u2022 Missing dependencies: Run 'lexrunner merge-order' to verify plan structure
|
|
12671
12672
|
\u2022 Permission errors: Ensure artifact directory is writable`
|
|
12672
12673
|
).action(async (file, opts) => {
|
|
12673
12674
|
const planFile = opts.plan ?? file ?? "plan.json";
|
|
@@ -12875,7 +12876,7 @@ Common Issues:
|
|
|
12875
12876
|
if (e instanceof Error && typeof e.message === "string" && e.message.startsWith("HIPAA:")) {
|
|
12876
12877
|
deps.exitWith(e);
|
|
12877
12878
|
}
|
|
12878
|
-
console.warn("[
|
|
12879
|
+
console.warn("[lexrunner] audit: finalize on dry-run failed (ignored)", String(e));
|
|
12879
12880
|
}
|
|
12880
12881
|
}
|
|
12881
12882
|
return;
|
|
@@ -13057,15 +13058,15 @@ Common Issues:
|
|
|
13057
13058
|
|
|
13058
13059
|
// src/commands/discover.ts
|
|
13059
13060
|
function registerDiscoverCommand(program2, deps) {
|
|
13060
|
-
program2.command("discover").description("Discover open pull requests from GitHub (canonical:
|
|
13061
|
+
program2.command("discover").description("Discover open pull requests from GitHub (canonical: lexrunner weave discover)").option("--owner <owner>", "GitHub repository owner").option("--repo <repo>", "GitHub repository name").option("--state <state>", "PR state filter", "open").option("--suggest", "Generate dependency/grouping suggestions using heuristics").option("--json", "Output JSON format").addHelpText(
|
|
13061
13062
|
"after",
|
|
13062
13063
|
`
|
|
13063
13064
|
Examples:
|
|
13064
|
-
$
|
|
13065
|
-
$
|
|
13066
|
-
$
|
|
13067
|
-
$
|
|
13068
|
-
$
|
|
13065
|
+
$ lexrunner discover # Discover PRs from current repo
|
|
13066
|
+
$ lexrunner discover --suggest # Discover with dependency suggestions
|
|
13067
|
+
$ lexrunner discover --json > prs.json # JSON output for processing
|
|
13068
|
+
$ lexrunner discover --owner org --repo project # Specify repository explicitly
|
|
13069
|
+
$ lexrunner discover --state all # Include closed PRs
|
|
13069
13070
|
|
|
13070
13071
|
Common Issues:
|
|
13071
13072
|
\u2022 "Could not detect repository": Set GITHUB_TOKEN or run from git repository
|
|
@@ -13087,9 +13088,9 @@ Common Issues:
|
|
|
13087
13088
|
console.error(" 1. Run from a Git repository with GitHub remote:");
|
|
13088
13089
|
console.error(" git remote -v");
|
|
13089
13090
|
console.error("\n 2. Specify repository explicitly:");
|
|
13090
|
-
console.error("
|
|
13091
|
+
console.error(" lexrunner discover --owner <owner> --repo <repo>\n");
|
|
13091
13092
|
console.error("\u{1F4A1} Tip: Initialize your workspace first:");
|
|
13092
|
-
console.error("
|
|
13093
|
+
console.error(" lexrunner init\n");
|
|
13093
13094
|
throwExit(1);
|
|
13094
13095
|
}
|
|
13095
13096
|
const resolvedAPI = githubAPI;
|
|
@@ -13445,7 +13446,7 @@ function computeBatches(nodes) {
|
|
|
13445
13446
|
import chalk3 from "chalk";
|
|
13446
13447
|
import * as fs29 from "fs";
|
|
13447
13448
|
function registerPlanBatchCommand(program2, jsonModeActive2) {
|
|
13448
|
-
program2.command("orchestrate:plan-batch").description("Generate batch plan using Kahn's algorithm (canonical:
|
|
13449
|
+
program2.command("orchestrate:plan-batch").description("Generate batch plan using Kahn's algorithm (canonical: lexrunner weave plan)").option("--issues <numbers>", "Comma-separated issue/PR numbers (e.g., 156,157,160)").option("--input <file>", "Input JSON file with analyzed issues").option("--json", "Output JSON format instead of human-readable").action(async (options) => {
|
|
13449
13450
|
try {
|
|
13450
13451
|
let nodes = [];
|
|
13451
13452
|
if (options.input) {
|
|
@@ -13531,7 +13532,7 @@ function formatToolVersion(tool, useColor = true) {
|
|
|
13531
13532
|
function registerPinToolchainCommand(program2) {
|
|
13532
13533
|
const orchestrateCmd = program2.command("orchestrate").description("Orchestration commands for merge-weave operations");
|
|
13533
13534
|
orchestrateCmd.command("pin-toolchain").description(
|
|
13534
|
-
"Verify toolchain versions match pinned versions (canonical:
|
|
13535
|
+
"Verify toolchain versions match pinned versions (canonical: lexrunner workspace doctor)"
|
|
13535
13536
|
).option("--verify", "Check if current versions match pinned versions (default: true)", true).action(async (opts, command) => {
|
|
13536
13537
|
const globalOpts = command.optsWithGlobals();
|
|
13537
13538
|
const jsonMode = globalOpts.json || opts.json || false;
|
|
@@ -14098,7 +14099,7 @@ function formatAssignmentLog(log, repo) {
|
|
|
14098
14099
|
import chalk4 from "chalk";
|
|
14099
14100
|
function registerPredictConflictsCommand(program2, jsonModeActive2) {
|
|
14100
14101
|
program2.command("orchestrate:predict-conflicts").description(
|
|
14101
|
-
"Predict merge conflicts using conflict graphs and MIS computation (canonical:
|
|
14102
|
+
"Predict merge conflicts using conflict graphs and MIS computation (canonical: lexrunner weave analyze)"
|
|
14102
14103
|
).option("--prs <numbers>", "Comma-separated list of PR numbers (e.g., 166,167,168)").option("--base <branch>", "Base branch for conflict analysis", "main").option("--skip-merge-tree", "Skip git merge-tree simulation").option("--enable-clustering", "Enable conflict clustering by file and symbol").option("--write-weave-conflicts", "Write clustered conflicts to .weave/conflicts.json").option("--json", "Output JSON format").action(async (options) => {
|
|
14103
14104
|
try {
|
|
14104
14105
|
const useJson = options.json || jsonModeActive2();
|
|
@@ -14573,13 +14574,13 @@ async function generateDeliverables(options) {
|
|
|
14573
14574
|
// src/commands/orchestrate/generate-deliverables.ts
|
|
14574
14575
|
function registerGenerateDeliverablesCommand(program2) {
|
|
14575
14576
|
program2.command("orchestrate:generate-deliverables").description(
|
|
14576
|
-
"Generate merge-weave deliverables with plan hash and toolchain manifest (canonical:
|
|
14577
|
+
"Generate merge-weave deliverables with plan hash and toolchain manifest (canonical: lexrunner weave report)"
|
|
14577
14578
|
).option("--batch <batchId>", "Batch identifier (e.g., batch3)").option("--plan <path>", "Path to plan.json file", "plan.json").option("--output-dir <path>", "Output directory for deliverables").action(async (options) => {
|
|
14578
14579
|
try {
|
|
14579
14580
|
if (!options.batch) {
|
|
14580
14581
|
console.error("\u274C Error: --batch is required");
|
|
14581
14582
|
console.error(
|
|
14582
|
-
"Example:
|
|
14583
|
+
"Example: lexrunner orchestrate:generate-deliverables --batch batch3 --plan plan.json"
|
|
14583
14584
|
);
|
|
14584
14585
|
process.exit(1);
|
|
14585
14586
|
}
|
|
@@ -14657,7 +14658,7 @@ async function getRepository() {
|
|
|
14657
14658
|
}
|
|
14658
14659
|
function registerAssignBatchCommand(program2) {
|
|
14659
14660
|
const assignBatch = program2.command("orchestrate:assign-batch").description(
|
|
14660
|
-
"Bulk-assign GitHub Copilot agents to batched issues [DEPRECATED: Use '
|
|
14661
|
+
"Bulk-assign GitHub Copilot agents to batched issues [DEPRECATED: Use 'lexrunner fanout assign']"
|
|
14661
14662
|
).option("--batch <file>", "Batch plan JSON file").option("--issues <numbers>", "Comma-separated issue numbers (e.g., 156,157,160)").option("--repo <owner/repo>", "GitHub repository (default: auto-detect)").option("--dry-run", "Show what would be assigned without actually doing it").option("--stagger <seconds>", "Wait N seconds between assignments (default: 5)", "5").action(async (options, command) => {
|
|
14662
14663
|
const globalOpts = command.optsWithGlobals();
|
|
14663
14664
|
const isJsonMode = globalOpts.json || false;
|
|
@@ -15113,7 +15114,7 @@ function formatTable2(result) {
|
|
|
15113
15114
|
return lines.join("\n");
|
|
15114
15115
|
}
|
|
15115
15116
|
function registerAnalyzeIssuesCommand(program2, jsonModeActive2) {
|
|
15116
|
-
program2.command("orchestrate:analyze-issues").description("Analyze GitHub issues for fanout [DEPRECATED: Use '
|
|
15117
|
+
program2.command("orchestrate:analyze-issues").description("Analyze GitHub issues for fanout [DEPRECATED: Use 'lexrunner fanout analyze']").option("--repo <owner/repo>", "Repository (format: owner/repo)").option("--labels <labels>", "Filter by labels (comma-separated)").option("--json", "Output JSON format").action(async (opts) => {
|
|
15117
15118
|
try {
|
|
15118
15119
|
let owner;
|
|
15119
15120
|
let repo;
|
|
@@ -15815,7 +15816,7 @@ function boundedResult3(value) {
|
|
|
15815
15816
|
|
|
15816
15817
|
// src/commands/doctor.ts
|
|
15817
15818
|
function registerDoctorCommand(program2, jsonModeActive2) {
|
|
15818
|
-
program2.command("doctor").description("Environment and config sanity checks (canonical:
|
|
15819
|
+
program2.command("doctor").description("Environment and config sanity checks (canonical: lexrunner workspace doctor)").option("--bootstrap", "Create minimal workspace configuration if missing").option("--json", "Output JSON format").option("--environment-quality", "Run environmental hostility scoring").action(async (options) => {
|
|
15819
15820
|
const json2 = options.json || (jsonModeActive2?.() ?? false);
|
|
15820
15821
|
if (json2) initColorControl({ jsonMode: true });
|
|
15821
15822
|
let result = await new WorkspaceDiagnosticsService().run({
|
|
@@ -35663,7 +35664,7 @@ function commandPath(command) {
|
|
|
35663
35664
|
function aliasWarning(path50) {
|
|
35664
35665
|
const policy = POLICY_BY_PATH.get(path50);
|
|
35665
35666
|
if (!policy) return null;
|
|
35666
|
-
return policy.disposition === "deprecated" ? `[
|
|
35667
|
+
return policy.disposition === "deprecated" ? `[lexrunner] deprecated alias "${path50}"; use "${policy.replacement}"; removal: ${policy.removeIn}.` : `[lexrunner] compatibility alias "${path50}"; use "${policy.replacement}"; supported through 1.x and reviewed at 2.0.0.`;
|
|
35667
35668
|
}
|
|
35668
35669
|
function emitAliasWarning(command, write = (message) => process.stderr.write(message)) {
|
|
35669
35670
|
const warning = aliasWarning(commandPath(command));
|
|
@@ -37696,7 +37697,7 @@ async function finalizeAuditGuard2(emitter, status) {
|
|
|
37696
37697
|
if (e instanceof Error && typeof e.message === "string" && e.message.startsWith("HIPAA:")) {
|
|
37697
37698
|
throw e;
|
|
37698
37699
|
}
|
|
37699
|
-
console.warn("[
|
|
37700
|
+
console.warn("[lexrunner] audit: finalize failed (ignored)", String(e));
|
|
37700
37701
|
}
|
|
37701
37702
|
}
|
|
37702
37703
|
function exitWith(e, schemaCode = "ESCHEMA") {
|
|
@@ -37713,7 +37714,7 @@ function exitWith(e, schemaCode = "ESCHEMA") {
|
|
|
37713
37714
|
throwExit(2);
|
|
37714
37715
|
}
|
|
37715
37716
|
if (e instanceof SchemaValidationError || e instanceof CycleError || e instanceof UnknownDependencyError || e instanceof WriteProtectionError || e instanceof AutopilotConfigError) {
|
|
37716
|
-
const prefix2 = jsonModeActive ? "[
|
|
37717
|
+
const prefix2 = jsonModeActive ? "[lexrunner]" : "\u274C";
|
|
37717
37718
|
if (e instanceof SchemaValidationError && !jsonModeActive) {
|
|
37718
37719
|
console.error(
|
|
37719
37720
|
`
|
|
@@ -37729,35 +37730,35 @@ ${prefix2} Error: ${String(err?.message ?? e)}
|
|
|
37729
37730
|
if (!jsonModeActive) {
|
|
37730
37731
|
if (e instanceof WriteProtectionError) {
|
|
37731
37732
|
console.error("\u{1F4A1} Tip: Use a local profile directory for development:");
|
|
37732
|
-
console.error("
|
|
37733
|
+
console.error(" lexrunner init --profile-dir .smartergpt.local\n");
|
|
37733
37734
|
} else if (e instanceof CycleError) {
|
|
37734
37735
|
console.error("\u{1F4A1} Tip: Check your dependency declarations in PR descriptions");
|
|
37735
37736
|
console.error(" Look for circular dependencies like: A\u2192B\u2192C\u2192A\n");
|
|
37736
37737
|
} else if (e instanceof UnknownDependencyError) {
|
|
37737
37738
|
console.error("\u{1F4A1} Tip: Ensure all referenced PRs exist and are included in your plan");
|
|
37738
|
-
console.error(" Run '
|
|
37739
|
+
console.error(" Run 'lexrunner discover' to find available PRs\n");
|
|
37739
37740
|
} else if (e instanceof SchemaValidationError) {
|
|
37740
37741
|
console.error("\u{1F4A1} Tip: Validate your configuration files:");
|
|
37741
|
-
console.error("
|
|
37742
|
+
console.error(" lexrunner schema validate plan.json\n");
|
|
37742
37743
|
}
|
|
37743
37744
|
}
|
|
37744
37745
|
process.exitCode = 2;
|
|
37745
37746
|
throwExit(2);
|
|
37746
37747
|
}
|
|
37747
37748
|
if (e instanceof Error && typeof e.message === "string" && e.message.startsWith("HIPAA:")) {
|
|
37748
|
-
const prefix2 = jsonModeActive ? "[
|
|
37749
|
+
const prefix2 = jsonModeActive ? "[lexrunner]" : "\u274C";
|
|
37749
37750
|
console.error(`
|
|
37750
37751
|
${prefix2} ${e.message.replace(/^HIPAA:\s*/, "")}
|
|
37751
37752
|
`);
|
|
37752
37753
|
process.exitCode = 2;
|
|
37753
37754
|
throwExit(2);
|
|
37754
37755
|
}
|
|
37755
|
-
const prefix = jsonModeActive ? "[
|
|
37756
|
+
const prefix = jsonModeActive ? "[lexrunner]" : "\u274C";
|
|
37756
37757
|
console.error(`
|
|
37757
37758
|
${prefix} Unexpected error: ${String(err?.message ?? e)}
|
|
37758
37759
|
`);
|
|
37759
37760
|
if (!jsonModeActive) {
|
|
37760
|
-
console.error("\u{1F4A1} Tip: Run '
|
|
37761
|
+
console.error("\u{1F4A1} Tip: Run 'lexrunner doctor' to check your environment\n");
|
|
37761
37762
|
}
|
|
37762
37763
|
throwExit(1);
|
|
37763
37764
|
}
|
|
@@ -37769,9 +37770,9 @@ program.configureOutput({
|
|
|
37769
37770
|
writeOut: (str) => process.stdout.write(str),
|
|
37770
37771
|
writeErr: (str) => process.stderr.write(str)
|
|
37771
37772
|
});
|
|
37772
|
-
program.name("
|
|
37773
|
-
"
|
|
37774
|
-
).version(`LexRunner ${package_default.version} (
|
|
37773
|
+
program.name("lexrunner").description(
|
|
37774
|
+
"LexRunner - Fan-out PRs, compute merge pyramid, run gates, and weave merges cleanly"
|
|
37775
|
+
).version(`LexRunner ${package_default.version} (lexrunner)`).option("--no-color", "Disable ANSI color codes in output").option("--audit-profile <profile>", "Audit logging profile: off|basic|soc2|hipaa-strict", "off").option("--audit-key <hex>", "Audit encryption key (64 hex chars) - overrides LEX_AUDIT_KEY_HEX").option("--json", "Enable JSON output mode (implies --no-color)").option(
|
|
37775
37776
|
"--log-format <format>",
|
|
37776
37777
|
"Log output format: 'json' or 'human'",
|
|
37777
37778
|
process.env.LOG_FORMAT || "human"
|
|
@@ -37793,57 +37794,57 @@ program.name("lex-pr").description(
|
|
|
37793
37794
|
"after",
|
|
37794
37795
|
`
|
|
37795
37796
|
Examples (Canonical Category-Action Pattern):
|
|
37796
|
-
$
|
|
37797
|
-
$
|
|
37798
|
-
$
|
|
37799
|
-
$
|
|
37800
|
-
$
|
|
37801
|
-
$
|
|
37802
|
-
$
|
|
37803
|
-
$
|
|
37804
|
-
$
|
|
37805
|
-
$
|
|
37806
|
-
$
|
|
37807
|
-
$
|
|
37808
|
-
$
|
|
37809
|
-
$
|
|
37810
|
-
$
|
|
37811
|
-
$
|
|
37812
|
-
$
|
|
37813
|
-
$
|
|
37814
|
-
$
|
|
37797
|
+
$ lexrunner workspace init Initialize workspace with interactive setup
|
|
37798
|
+
$ lexrunner workspace doctor Validate environment and configuration
|
|
37799
|
+
$ lexrunner idea Capture feature idea interactively
|
|
37800
|
+
$ lexrunner idea --title "..." --description "..." --dry-run
|
|
37801
|
+
$ lexrunner config show Display configuration with precedence chain
|
|
37802
|
+
$ lexrunner config show --key scope.target Show specific configuration value
|
|
37803
|
+
$ lexrunner config show --json Output configuration in JSON format
|
|
37804
|
+
$ lexrunner config:inspect Display merged configuration with provenance map
|
|
37805
|
+
$ lexrunner weave discover Find open PRs matching scope
|
|
37806
|
+
$ lexrunner weave discover --suggest Generate dependency suggestions with heuristics
|
|
37807
|
+
$ lexrunner weave plan --from-github Generate merge plan from GitHub PRs
|
|
37808
|
+
$ lexrunner plan-review plan.json Interactively review and edit plan
|
|
37809
|
+
$ lexrunner plan-diff plan1.json plan2.json Compare two plans
|
|
37810
|
+
$ lexrunner gate run plan.json Run quality gates on plan
|
|
37811
|
+
$ lexrunner orchestrate:analyze-issues Analyze issues for parallel work planning (fanout commands coming soon)
|
|
37812
|
+
$ lexrunner orchestrate:analyze-issues --labels priority:P1 --json
|
|
37813
|
+
$ lexrunner security check-rotation Check token rotation status
|
|
37814
|
+
$ lexrunner security scan-plan Scan a plan file for secrets
|
|
37815
|
+
$ lexrunner security validate-secrets GITHUB_TOKEN OTHER_SECRET
|
|
37815
37816
|
|
|
37816
37817
|
Governance (LexSona Shadow Mode):
|
|
37817
|
-
$
|
|
37818
|
-
$
|
|
37819
|
-
$
|
|
37820
|
-
$
|
|
37818
|
+
$ lexrunner governance:report Analyze shadow governance logs
|
|
37819
|
+
$ lexrunner governance:report --format markdown --disagreements-only
|
|
37820
|
+
$ lexrunner governance:report --since 2025-12-01 --persona quality-first_engineering
|
|
37821
|
+
$ lexrunner governance:cleanup Clean up old governance logs
|
|
37821
37822
|
|
|
37822
37823
|
Power User Commands:
|
|
37823
|
-
$
|
|
37824
|
-
$
|
|
37825
|
-
$
|
|
37826
|
-
$
|
|
37827
|
-
$
|
|
37824
|
+
$ lexrunner view plan.json Interactive plan viewer
|
|
37825
|
+
$ lexrunner query plan.json --stats Plan statistics and analysis
|
|
37826
|
+
$ lexrunner query plan.json "level eq 1" Query items by criteria
|
|
37827
|
+
$ lexrunner retry --filter failed Retry failed gates
|
|
37828
|
+
$ lexrunner completion bash Generate bash completion script
|
|
37828
37829
|
|
|
37829
37830
|
Canonical Workflow:
|
|
37830
|
-
1. Ideate:
|
|
37831
|
-
2. Discover:
|
|
37832
|
-
3. Plan:
|
|
37833
|
-
4. Review:
|
|
37834
|
-
5. Execute:
|
|
37835
|
-
6. Report:
|
|
37831
|
+
1. Ideate: lexrunner idea (capture feature ideas as GitHub Issues)
|
|
37832
|
+
2. Discover: lexrunner weave discover (optionally add --suggest for dependencies)
|
|
37833
|
+
3. Plan: lexrunner weave plan --from-github --json > plan.json
|
|
37834
|
+
4. Review: lexrunner plan-review plan.json
|
|
37835
|
+
5. Execute: lexrunner gate run plan.json
|
|
37836
|
+
6. Report: lexrunner weave report artifacts --out md
|
|
37836
37837
|
|
|
37837
37838
|
Legacy Commands (Deprecated, use canonical forms above):
|
|
37838
|
-
$
|
|
37839
|
-
$
|
|
37840
|
-
$
|
|
37841
|
-
$
|
|
37842
|
-
$
|
|
37843
|
-
$
|
|
37844
|
-
$
|
|
37845
|
-
$
|
|
37846
|
-
$
|
|
37839
|
+
$ lexrunner init \u2192 lexrunner workspace init
|
|
37840
|
+
$ lexrunner doctor \u2192 lexrunner workspace doctor
|
|
37841
|
+
$ lexrunner discover \u2192 lexrunner weave discover
|
|
37842
|
+
$ lexrunner plan \u2192 lexrunner weave plan
|
|
37843
|
+
$ lexrunner status \u2192 lexrunner weave status
|
|
37844
|
+
$ lexrunner report \u2192 lexrunner weave report
|
|
37845
|
+
$ lexrunner execute \u2192 lexrunner gate run
|
|
37846
|
+
$ lexrunner orchestrate:analyze-issues \u2192 lexrunner fanout analyze
|
|
37847
|
+
$ lexrunner orchestrate:assign-batch \u2192 lexrunner fanout assign
|
|
37847
37848
|
`
|
|
37848
37849
|
);
|
|
37849
37850
|
registerGateReportCommand(program);
|
|
@@ -38179,7 +38180,7 @@ program.command("bootstrap").description("Create minimal workspace configuration
|
|
|
38179
38180
|
console.log("1. Edit .smartergpt/intent.md to describe your project goals");
|
|
38180
38181
|
console.log("2. Update .smartergpt/scope.yml for PR discovery rules");
|
|
38181
38182
|
console.log("3. Configure .smartergpt/gates.yml for quality gates");
|
|
38182
|
-
console.log("4. Run '
|
|
38183
|
+
console.log("4. Run 'lexrunner doctor' to verify configuration");
|
|
38183
38184
|
}
|
|
38184
38185
|
}
|
|
38185
38186
|
} catch (error) {
|
|
@@ -38241,7 +38242,7 @@ program.command("init-local").description("Initialize local overlay directory wi
|
|
|
38241
38242
|
throwExit(1);
|
|
38242
38243
|
}
|
|
38243
38244
|
});
|
|
38244
|
-
program.command("migrate-profile").description("Migrate profile configuration structure (canonical:
|
|
38245
|
+
program.command("migrate-profile").description("Migrate profile configuration structure (canonical: lexrunner workspace migrate)").option("--from-flat", "Migrate from flat structure to runner/ subdirectory").option("--dry-run", "Show what would be migrated without making changes").option("--profile-dir <path>", "Profile directory to migrate (default: auto-detect)").action(async (opts) => {
|
|
38245
38246
|
try {
|
|
38246
38247
|
const result = await runMigrateProfile({
|
|
38247
38248
|
fromFlat: opts.fromFlat,
|
|
@@ -38321,7 +38322,7 @@ program.command("view").description("Interactive plan viewer with navigation and
|
|
|
38321
38322
|
program.command("deliverables:list").description("List all autopilot deliverables with metadata").option("--profile-dir <dir>", "Profile directory (default: .smartergpt)").option("--json", "Output JSON format").action(async (opts) => {
|
|
38322
38323
|
try {
|
|
38323
38324
|
const profile = resolveProfile(opts.profileDir);
|
|
38324
|
-
const { DeliverablesManager } = await import("./autopilot-
|
|
38325
|
+
const { DeliverablesManager } = await import("./autopilot-EBZ44LYS.js");
|
|
38325
38326
|
const manager = new DeliverablesManager(profile.path);
|
|
38326
38327
|
const deliverables = await manager.listDeliverables();
|
|
38327
38328
|
if (opts.json) {
|
|
@@ -38360,7 +38361,7 @@ program.command("deliverables:list").description("List all autopilot deliverable
|
|
|
38360
38361
|
program.command("deliverables:cleanup").description("Clean up old deliverables based on retention policy").option("--profile-dir <dir>", "Profile directory (default: .smartergpt)").option("--max-age <days>", "Maximum age in days (deletes older deliverables)").option("--max-count <count>", "Maximum number of deliverables to keep").option("--keep-latest", "Always keep the latest deliverables (default: true)", true).option("--dry-run", "Preview cleanup without deleting").option("--json", "Output JSON format").action(async (opts) => {
|
|
38361
38362
|
try {
|
|
38362
38363
|
const profile = resolveProfile(opts.profileDir);
|
|
38363
|
-
const { DeliverablesManager } = await import("./autopilot-
|
|
38364
|
+
const { DeliverablesManager } = await import("./autopilot-EBZ44LYS.js");
|
|
38364
38365
|
const manager = new DeliverablesManager(profile.path);
|
|
38365
38366
|
const policy = {
|
|
38366
38367
|
maxAge: opts.maxAge ? parseInt(opts.maxAge) : void 0,
|
|
@@ -38483,7 +38484,7 @@ async function main(argv = process.argv) {
|
|
|
38483
38484
|
return;
|
|
38484
38485
|
}
|
|
38485
38486
|
const message = error instanceof Error ? error.message : String(error);
|
|
38486
|
-
const prefix = jsonModeActive ? "[
|
|
38487
|
+
const prefix = jsonModeActive ? "[lexrunner]" : "\u274C";
|
|
38487
38488
|
process.stderr.write(`${prefix} ${message}
|
|
38488
38489
|
`);
|
|
38489
38490
|
process.exitCode = 1;
|
|
@@ -38505,7 +38506,7 @@ if (isDirectExec) {
|
|
|
38505
38506
|
installUnhandledRejectionHandler();
|
|
38506
38507
|
void main().catch((error) => {
|
|
38507
38508
|
const message = error instanceof Error ? error.message : String(error);
|
|
38508
|
-
process.stderr.write(`[
|
|
38509
|
+
process.stderr.write(`[lexrunner] fatal: ${message}
|
|
38509
38510
|
`);
|
|
38510
38511
|
process.exitCode = process.exitCode ?? 1;
|
|
38511
38512
|
});
|