issue-flow 0.11.1 → 0.13.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/README.md +79 -274
- package/dist/agent-BXRIEKVM.js +238 -0
- package/dist/agent-BXRIEKVM.js.map +1 -0
- package/dist/{analyze-XV3K25K3.js → analyze-WS47UYGN.js} +32 -15
- package/dist/analyze-WS47UYGN.js.map +1 -0
- package/dist/{apply-WUJHDD7A.js → apply-OS62UWRN.js} +15 -5
- package/dist/{apply-WUJHDD7A.js.map → apply-OS62UWRN.js.map} +1 -1
- package/dist/bench-SA3BOME5.js +906 -0
- package/dist/bench-SA3BOME5.js.map +1 -0
- package/dist/chunk-37N2RJW2.js +120 -0
- package/dist/chunk-37N2RJW2.js.map +1 -0
- package/dist/chunk-3XLCNVMD.js +180 -0
- package/dist/chunk-3XLCNVMD.js.map +1 -0
- package/dist/chunk-5TB6KLC2.js +72 -0
- package/dist/chunk-5TB6KLC2.js.map +1 -0
- package/dist/{chunk-OBLVLIUS.js → chunk-664Y3NDX.js} +25 -13
- package/dist/chunk-664Y3NDX.js.map +1 -0
- package/dist/chunk-6FDFRNXZ.js +357 -0
- package/dist/chunk-6FDFRNXZ.js.map +1 -0
- package/dist/chunk-7KD66LIM.js +658 -0
- package/dist/chunk-7KD66LIM.js.map +1 -0
- package/dist/chunk-7Z4Y3VKM.js +26 -0
- package/dist/chunk-7Z4Y3VKM.js.map +1 -0
- package/dist/chunk-ARFVHC2F.js +1111 -0
- package/dist/chunk-ARFVHC2F.js.map +1 -0
- package/dist/{chunk-RKTEV6EG.js → chunk-BHJCGWQX.js} +141 -12
- package/dist/chunk-BHJCGWQX.js.map +1 -0
- package/dist/chunk-BQDQTIM7.js +74 -0
- package/dist/chunk-BQDQTIM7.js.map +1 -0
- package/dist/chunk-CNBYCMSU.js +2709 -0
- package/dist/chunk-CNBYCMSU.js.map +1 -0
- package/dist/chunk-CRGIQFUQ.js +83 -0
- package/dist/chunk-CRGIQFUQ.js.map +1 -0
- package/dist/chunk-DIG5XKQQ.js +298 -0
- package/dist/chunk-DIG5XKQQ.js.map +1 -0
- package/dist/chunk-FZDR7CGH.js +71 -0
- package/dist/chunk-FZDR7CGH.js.map +1 -0
- package/dist/chunk-HEF2RMKN.js +413 -0
- package/dist/chunk-HEF2RMKN.js.map +1 -0
- package/dist/{chunk-IVHZEYAX.js → chunk-HJGGNLWI.js} +25 -19
- package/dist/chunk-HJGGNLWI.js.map +1 -0
- package/dist/chunk-HQAHNIAR.js +283 -0
- package/dist/chunk-HQAHNIAR.js.map +1 -0
- package/dist/{chunk-GANSDJV7.js → chunk-IHIEXUTC.js} +46 -24
- package/dist/chunk-IHIEXUTC.js.map +1 -0
- package/dist/chunk-IV5SS4JN.js +84 -0
- package/dist/chunk-IV5SS4JN.js.map +1 -0
- package/dist/{chunk-HC2MT7BX.js → chunk-IYV6KNVF.js} +158 -592
- package/dist/chunk-IYV6KNVF.js.map +1 -0
- package/dist/{chunk-LVKQ2AKT.js → chunk-J62QSVP6.js} +10 -8
- package/dist/chunk-J62QSVP6.js.map +1 -0
- package/dist/chunk-KMMASOA6.js +134 -0
- package/dist/chunk-KMMASOA6.js.map +1 -0
- package/dist/chunk-KQHB7ZT3.js +559 -0
- package/dist/chunk-KQHB7ZT3.js.map +1 -0
- package/dist/chunk-L6HSKTQE.js +77 -0
- package/dist/chunk-L6HSKTQE.js.map +1 -0
- package/dist/{chunk-6N7LZZ5U.js → chunk-LZ6GFQAG.js} +474 -160
- package/dist/chunk-LZ6GFQAG.js.map +1 -0
- package/dist/{chunk-HQYXVIH6.js → chunk-MIVHK5YI.js} +5 -5
- package/dist/chunk-NEZZ6KDR.js +1217 -0
- package/dist/chunk-NEZZ6KDR.js.map +1 -0
- package/dist/{run-DBF2VWUN.js → chunk-OPNGPUKJ.js} +747 -594
- package/dist/chunk-OPNGPUKJ.js.map +1 -0
- package/dist/chunk-P3LRUNC6.js +16 -0
- package/dist/chunk-P3LRUNC6.js.map +1 -0
- package/dist/{chunk-BXCPXRBR.js → chunk-PIVGJM6K.js} +129 -32
- package/dist/chunk-PIVGJM6K.js.map +1 -0
- package/dist/{chunk-AAY6KM7N.js → chunk-PV4OX5TC.js} +167 -196
- package/dist/chunk-PV4OX5TC.js.map +1 -0
- package/dist/chunk-QCXPNSEL.js +141 -0
- package/dist/chunk-QCXPNSEL.js.map +1 -0
- package/dist/{chunk-34WNTK3K.js → chunk-QXDNBYQF.js} +53 -13
- package/dist/chunk-QXDNBYQF.js.map +1 -0
- package/dist/chunk-SNTTOQAD.js +30 -0
- package/dist/chunk-SNTTOQAD.js.map +1 -0
- package/dist/{chunk-EY6WMHV2.js → chunk-TM67EHSV.js} +67 -23
- package/dist/chunk-TM67EHSV.js.map +1 -0
- package/dist/chunk-TVN2JVOF.js +77 -0
- package/dist/chunk-TVN2JVOF.js.map +1 -0
- package/dist/chunk-TX5WIVYP.js +129 -0
- package/dist/chunk-TX5WIVYP.js.map +1 -0
- package/dist/{chunk-KQ4JQN7T.js → chunk-UJ7XWK7J.js} +83 -21
- package/dist/chunk-UJ7XWK7J.js.map +1 -0
- package/dist/{chunk-47VIN33V.js → chunk-UOCPC2Y2.js} +596 -17
- package/dist/chunk-UOCPC2Y2.js.map +1 -0
- package/dist/chunk-XEYH6ZZI.js +289 -0
- package/dist/chunk-XEYH6ZZI.js.map +1 -0
- package/dist/cli.js +390 -40
- package/dist/cli.js.map +1 -1
- package/dist/config-MEM2IWWN.js +76 -0
- package/dist/contract-JH2WBIO6.js +8 -0
- package/dist/conventions-WV4NDXGH.js +143 -0
- package/dist/conventions-WV4NDXGH.js.map +1 -0
- package/dist/execute-NITIHHCK.js +31 -0
- package/dist/{generate-TBVTLMOP.js → generate-MVQI7A45.js} +39 -19
- package/dist/{generate-TBVTLMOP.js.map → generate-MVQI7A45.js.map} +1 -1
- package/dist/git-YRVRUN3C.js +31 -0
- package/dist/init-OKWEC3EV.js +21 -0
- package/dist/operations-LU6JA3BX.js +374 -0
- package/dist/operations-LU6JA3BX.js.map +1 -0
- package/dist/permissions-7NMDFU27.js +18 -0
- package/dist/plan-LEJJF3DE.js +31 -0
- package/dist/{policy-XQW5NUIE.js → policy-JSYEK5B2.js} +17 -4
- package/dist/policy-JSYEK5B2.js.map +1 -0
- package/dist/pr-HPVUZ7S3.js +36 -0
- package/dist/pr-review-R2QZBT3F.js +29 -0
- package/dist/pr-review-R2QZBT3F.js.map +1 -0
- package/dist/prd-5O6GYCC6.js +30 -0
- package/dist/prd-5O6GYCC6.js.map +1 -0
- package/dist/ps-TNE44R5V.js +90 -0
- package/dist/ps-TNE44R5V.js.map +1 -0
- package/dist/recorder-XGF55WXI.js +31 -0
- package/dist/recorder-XGF55WXI.js.map +1 -0
- package/dist/registry-LGPE53QD.js +15 -0
- package/dist/registry-LGPE53QD.js.map +1 -0
- package/dist/resume-QMEPMSZW.js +238 -0
- package/dist/resume-QMEPMSZW.js.map +1 -0
- package/dist/review-YKWD6SNN.js +32 -0
- package/dist/review-YKWD6SNN.js.map +1 -0
- package/dist/routing-2ZUMZPJB.js +91 -0
- package/dist/routing-2ZUMZPJB.js.map +1 -0
- package/dist/run-YU4TR62R.js +50 -0
- package/dist/run-YU4TR62R.js.map +1 -0
- package/dist/state-manager-X3PT3FGT.js +36 -0
- package/dist/state-manager-X3PT3FGT.js.map +1 -0
- package/dist/usage-VCFLDA5Y.js +174 -0
- package/dist/usage-VCFLDA5Y.js.map +1 -0
- package/dist/{web-ANQQTTRD.js → web-XVHLX62B.js} +43 -27
- package/dist/web-XVHLX62B.js.map +1 -0
- package/package.json +6 -2
- package/prompts/execute.md +7 -8
- package/prompts/plan.md +4 -5
- package/prompts/pr.md +13 -6
- package/web/AGENTS.md +3 -3
- package/web/public/app.css +38 -0
- package/web/public/app.js +132 -10
- package/web/public/index.html +24 -0
- package/dist/analyze-XV3K25K3.js.map +0 -1
- package/dist/chunk-34WNTK3K.js.map +0 -1
- package/dist/chunk-3BOHTH4V.js +0 -58
- package/dist/chunk-3BOHTH4V.js.map +0 -1
- package/dist/chunk-47VIN33V.js.map +0 -1
- package/dist/chunk-6N7LZZ5U.js.map +0 -1
- package/dist/chunk-AAY6KM7N.js.map +0 -1
- package/dist/chunk-BXCPXRBR.js.map +0 -1
- package/dist/chunk-EWDJENFW.js +0 -303
- package/dist/chunk-EWDJENFW.js.map +0 -1
- package/dist/chunk-EY6WMHV2.js.map +0 -1
- package/dist/chunk-GANSDJV7.js.map +0 -1
- package/dist/chunk-HC2MT7BX.js.map +0 -1
- package/dist/chunk-HDV3YDTG.js +0 -52
- package/dist/chunk-HDV3YDTG.js.map +0 -1
- package/dist/chunk-IVHZEYAX.js.map +0 -1
- package/dist/chunk-KQ4JQN7T.js.map +0 -1
- package/dist/chunk-LVKQ2AKT.js.map +0 -1
- package/dist/chunk-OBLVLIUS.js.map +0 -1
- package/dist/chunk-RKTEV6EG.js.map +0 -1
- package/dist/chunk-VQ5VN7DF.js +0 -1018
- package/dist/chunk-VQ5VN7DF.js.map +0 -1
- package/dist/config-4THHOXNN.js +0 -41
- package/dist/execute-5OEKLM5X.js +0 -15
- package/dist/init-PRMOTQ7N.js +0 -9
- package/dist/plan-Y2BYZD24.js +0 -17
- package/dist/policy-XQW5NUIE.js.map +0 -1
- package/dist/pr-H6GLOSXF.js +0 -21
- package/dist/pr-review-CK5FR6WX.js +0 -17
- package/dist/prd-4PWLCGH5.js +0 -17
- package/dist/review-QGVAHEZF.js +0 -15
- package/dist/run-DBF2VWUN.js.map +0 -1
- package/dist/web-ANQQTTRD.js.map +0 -1
- /package/dist/{chunk-HQYXVIH6.js.map → chunk-MIVHK5YI.js.map} +0 -0
- /package/dist/{config-4THHOXNN.js.map → config-MEM2IWWN.js.map} +0 -0
- /package/dist/{execute-5OEKLM5X.js.map → contract-JH2WBIO6.js.map} +0 -0
- /package/dist/{init-PRMOTQ7N.js.map → execute-NITIHHCK.js.map} +0 -0
- /package/dist/{plan-Y2BYZD24.js.map → git-YRVRUN3C.js.map} +0 -0
- /package/dist/{pr-H6GLOSXF.js.map → init-OKWEC3EV.js.map} +0 -0
- /package/dist/{pr-review-CK5FR6WX.js.map → permissions-7NMDFU27.js.map} +0 -0
- /package/dist/{prd-4PWLCGH5.js.map → plan-LEJJF3DE.js.map} +0 -0
- /package/dist/{review-QGVAHEZF.js.map → pr-HPVUZ7S3.js.map} +0 -0
package/dist/cli.js
CHANGED
|
@@ -1,17 +1,36 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
+
DEFAULT_INACTIVITY_TIMEOUT_MS,
|
|
4
|
+
installShutdownHandlers,
|
|
5
|
+
parseAgentPhaseFlag,
|
|
6
|
+
setAgentCliOverrides,
|
|
3
7
|
setIssuesCliOverrides,
|
|
8
|
+
setResilienceCliOverrides,
|
|
9
|
+
setRoutingCliOverrides,
|
|
10
|
+
setVerifyCliOverrides,
|
|
4
11
|
setWebCliOverrides
|
|
5
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-CNBYCMSU.js";
|
|
13
|
+
import "./chunk-HQAHNIAR.js";
|
|
6
14
|
import {
|
|
7
15
|
printError,
|
|
8
16
|
setGlobalTimeout,
|
|
17
|
+
setInactivityTimeout,
|
|
9
18
|
setVerbose
|
|
10
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-IYV6KNVF.js";
|
|
20
|
+
import "./chunk-6FDFRNXZ.js";
|
|
21
|
+
import "./chunk-P3LRUNC6.js";
|
|
22
|
+
import "./chunk-DIG5XKQQ.js";
|
|
23
|
+
import {
|
|
24
|
+
isAgentProviderId
|
|
25
|
+
} from "./chunk-NEZZ6KDR.js";
|
|
26
|
+
import "./chunk-TX5WIVYP.js";
|
|
27
|
+
import "./chunk-KQHB7ZT3.js";
|
|
28
|
+
import "./chunk-7Z4Y3VKM.js";
|
|
29
|
+
import "./chunk-XEYH6ZZI.js";
|
|
11
30
|
|
|
12
31
|
// src/cli.ts
|
|
13
32
|
import { createRequire } from "module";
|
|
14
|
-
import { Command, InvalidArgumentError } from "commander";
|
|
33
|
+
import { Command, InvalidArgumentError, Option } from "commander";
|
|
15
34
|
|
|
16
35
|
// src/cli-options.ts
|
|
17
36
|
function resolveNoBranch(options) {
|
|
@@ -29,9 +48,15 @@ function resolveQueueScopeFlags(options) {
|
|
|
29
48
|
"--yes cannot be combined with --only: --yes runs the whole discovered hierarchy, --only runs just the issues you informed."
|
|
30
49
|
);
|
|
31
50
|
}
|
|
51
|
+
if (options.cascade === true && options.only === true) {
|
|
52
|
+
throw new CliFlagError(
|
|
53
|
+
"--cascade cannot be combined with --only: --cascade runs the container hierarchy, --only runs just the issues you informed."
|
|
54
|
+
);
|
|
55
|
+
}
|
|
32
56
|
return {
|
|
33
57
|
yes: options.yes === true ? true : void 0,
|
|
34
|
-
only: options.only === true ? true : void 0
|
|
58
|
+
only: options.only === true ? true : void 0,
|
|
59
|
+
cascade: options.cascade === true ? true : void 0
|
|
35
60
|
};
|
|
36
61
|
}
|
|
37
62
|
function resolveRunPhaseFlags(options) {
|
|
@@ -107,6 +132,37 @@ function resolveGenerateTarget(opts) {
|
|
|
107
132
|
return selected[0];
|
|
108
133
|
}
|
|
109
134
|
|
|
135
|
+
// src/resilience/cli-flags.ts
|
|
136
|
+
function continuousProfile() {
|
|
137
|
+
return {
|
|
138
|
+
profile: "continuous",
|
|
139
|
+
providers: { failover: true },
|
|
140
|
+
queue: { onIssueFailure: "skip" },
|
|
141
|
+
journal: { enabled: true },
|
|
142
|
+
watchdog: { inactivityTimeoutMs: DEFAULT_INACTIVITY_TIMEOUT_MS }
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
function resolveResilienceOverrides(flags) {
|
|
146
|
+
const continuous = flags.continuous === true || flags.resilient === true;
|
|
147
|
+
const overrides = continuous ? continuousProfile() : {};
|
|
148
|
+
if (flags.failover === false) {
|
|
149
|
+
overrides.providers = { ...overrides.providers, failover: false };
|
|
150
|
+
}
|
|
151
|
+
if (flags.autoDecompose === true) {
|
|
152
|
+
overrides.decompose = { ...overrides.decompose, auto: true };
|
|
153
|
+
}
|
|
154
|
+
if (flags.inactivityTimeout !== void 0) {
|
|
155
|
+
overrides.watchdog = {
|
|
156
|
+
...overrides.watchdog,
|
|
157
|
+
inactivityTimeoutMs: flags.inactivityTimeout * 1e3
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
if (flags.onIssueFailure !== void 0) {
|
|
161
|
+
overrides.queue = { ...overrides.queue, onIssueFailure: flags.onIssueFailure };
|
|
162
|
+
}
|
|
163
|
+
return overrides;
|
|
164
|
+
}
|
|
165
|
+
|
|
110
166
|
// src/cli.ts
|
|
111
167
|
var require2 = createRequire(import.meta.url);
|
|
112
168
|
var { version } = require2("../package.json");
|
|
@@ -117,6 +173,20 @@ function parseInteger(value) {
|
|
|
117
173
|
}
|
|
118
174
|
return parsed;
|
|
119
175
|
}
|
|
176
|
+
function parseUsd(value) {
|
|
177
|
+
const parsed = Number.parseFloat(value);
|
|
178
|
+
if (!Number.isFinite(parsed) || parsed < 0) {
|
|
179
|
+
throw new InvalidArgumentError("Must be a non-negative number.");
|
|
180
|
+
}
|
|
181
|
+
return parsed;
|
|
182
|
+
}
|
|
183
|
+
function collectString(value, previous) {
|
|
184
|
+
return [...previous, value];
|
|
185
|
+
}
|
|
186
|
+
function parseQueueFailureMode(value) {
|
|
187
|
+
if (value === "stop" || value === "skip" || value === "block") return value;
|
|
188
|
+
throw new InvalidArgumentError("Must be one of: stop, skip, block.");
|
|
189
|
+
}
|
|
120
190
|
function parseStartUs(value) {
|
|
121
191
|
const parsed = parseInteger(value);
|
|
122
192
|
if (parsed < 1) {
|
|
@@ -132,11 +202,78 @@ function withUserStoryNumberingOptions(cmd) {
|
|
|
132
202
|
);
|
|
133
203
|
}
|
|
134
204
|
function withGlobalOptions(cmd) {
|
|
135
|
-
return cmd.option("-v, --verbose", "Show
|
|
205
|
+
return cmd.option("-v, --verbose", "Show agent progress output in real time").option(
|
|
136
206
|
"-t, --timeout <seconds>",
|
|
137
207
|
"Override headless timeout in seconds (0 = no limit)",
|
|
138
208
|
parseInteger
|
|
139
|
-
)
|
|
209
|
+
).option(
|
|
210
|
+
"--inactivity-timeout <seconds>",
|
|
211
|
+
"Stop the agent after this many seconds with no output (0 = no watchdog)",
|
|
212
|
+
parseInteger
|
|
213
|
+
).option(
|
|
214
|
+
"--agent <provider>",
|
|
215
|
+
"Run every phase on this agent (claude|codex|cursor|antigravity)"
|
|
216
|
+
).option("--agent-model <model>", "Override the model for every phase").option(
|
|
217
|
+
"--agent-phase <phase>=<provider>[:<model>]",
|
|
218
|
+
"Override one phase (repeatable)",
|
|
219
|
+
collectAgentPhase,
|
|
220
|
+
{}
|
|
221
|
+
).option("--verify-level <level>", "Acceptance-contract level: L0 | L1 | L2 | L3 | L5").option("--no-cross-verify", "Keep L2 off even when a trigger would fire").option("--no-escalation", "Keep routing.escalation.enabled off").option("--max-cost <usd>", "Issue cost ceiling in USD (Issue Flow enforces it)", parseUsd).option("--max-duration <seconds>", "Issue duration ceiling in seconds", parseInteger);
|
|
222
|
+
}
|
|
223
|
+
function collectAgentPhase(value, previous) {
|
|
224
|
+
const parsed = parseAgentPhaseFlag(value);
|
|
225
|
+
return { ...previous, [parsed.phase]: parsed.block };
|
|
226
|
+
}
|
|
227
|
+
function resolveAgentOverrides(opts) {
|
|
228
|
+
const overrides = {};
|
|
229
|
+
if (typeof opts.agent === "string") {
|
|
230
|
+
if (!isAgentProviderId(opts.agent)) {
|
|
231
|
+
throw new InvalidArgumentError("Must be one of: claude, codex, cursor, antigravity.");
|
|
232
|
+
}
|
|
233
|
+
overrides.forceProvider = opts.agent;
|
|
234
|
+
}
|
|
235
|
+
if (typeof opts.agentModel === "string") {
|
|
236
|
+
overrides.forceModel = opts.agentModel;
|
|
237
|
+
}
|
|
238
|
+
if (opts.agentPhase && typeof opts.agentPhase === "object") {
|
|
239
|
+
overrides.phases = opts.agentPhase;
|
|
240
|
+
}
|
|
241
|
+
return overrides;
|
|
242
|
+
}
|
|
243
|
+
var VERIFY_LEVELS = ["L0", "L1", "L2", "L3", "L5"];
|
|
244
|
+
function resolveVerifyOverrides(opts) {
|
|
245
|
+
const overrides = {};
|
|
246
|
+
if (typeof opts.verifyLevel === "string") {
|
|
247
|
+
if (!VERIFY_LEVELS.includes(opts.verifyLevel)) {
|
|
248
|
+
throw new InvalidArgumentError("Must be one of: L0, L1, L2, L3, L5.");
|
|
249
|
+
}
|
|
250
|
+
overrides.level = opts.verifyLevel;
|
|
251
|
+
}
|
|
252
|
+
if (opts.crossVerify === false) overrides.crossVerify = false;
|
|
253
|
+
return overrides;
|
|
254
|
+
}
|
|
255
|
+
function resolveRoutingOverrides(opts) {
|
|
256
|
+
const overrides = {};
|
|
257
|
+
if (opts.escalation === false) {
|
|
258
|
+
overrides.escalation = {
|
|
259
|
+
enabled: false,
|
|
260
|
+
minAttemptsBeforeEscalation: 2,
|
|
261
|
+
maxEscalations: 2,
|
|
262
|
+
maxRungs: ["effort", "model", "harness"]
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
if (typeof opts.maxCost === "number" || typeof opts.maxDuration === "number") {
|
|
266
|
+
overrides.ceilings = {
|
|
267
|
+
maxCostUsdPerIssue: typeof opts.maxCost === "number" ? opts.maxCost : null,
|
|
268
|
+
maxDurationMsPerIssue: typeof opts.maxDuration === "number" ? opts.maxDuration * 1e3 : null,
|
|
269
|
+
maxExecutionsPerIssue: null,
|
|
270
|
+
onCeiling: "block"
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
return overrides;
|
|
274
|
+
}
|
|
275
|
+
function withResilienceOptions(cmd) {
|
|
276
|
+
return cmd.option("--continuous", "Long-running profile: keep going without supervision").option("--resilient", "Alias of --continuous").option("--no-failover", "Never migrate a phase to another agent provider").option("--auto-decompose", "Act on a decomposition report instead of only writing it");
|
|
140
277
|
}
|
|
141
278
|
function withWebOptions(cmd) {
|
|
142
279
|
return cmd.option("--web", "Enable the web monitoring server").option("--serve", "Alias for --web").option("--port <n>", "Web server port (default: 3737)", parseInteger).option("--host <h>", "Web server host (default: 0.0.0.0)").option("--refresh <s>", "Suggested UI polling interval in seconds", parseInteger).option("--web-log-limit <n>", "Max log entries kept in the snapshot", parseInteger).option("--web-no-logs", "Exclude logs from the published snapshot");
|
|
@@ -168,9 +305,10 @@ function resolveWebOverrides(opts) {
|
|
|
168
305
|
}
|
|
169
306
|
var program = new Command();
|
|
170
307
|
program.name("issue-flow").description(
|
|
171
|
-
"Unified CLI for orchestrating the full issue-flow pipeline via Claude Code
|
|
308
|
+
"Unified CLI for orchestrating the full issue-flow pipeline via Claude Code, Codex CLI, Cursor CLI or Antigravity CLI."
|
|
172
309
|
).version(version);
|
|
173
310
|
program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
311
|
+
installShutdownHandlers();
|
|
174
312
|
const opts = actionCommand.opts();
|
|
175
313
|
if (opts.verbose) {
|
|
176
314
|
setVerbose(true);
|
|
@@ -178,7 +316,31 @@ program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
|
178
316
|
if (opts.timeout !== void 0) {
|
|
179
317
|
setGlobalTimeout(opts.timeout * 1e3);
|
|
180
318
|
}
|
|
319
|
+
if (opts.inactivityTimeout !== void 0) {
|
|
320
|
+
setInactivityTimeout(opts.inactivityTimeout * 1e3);
|
|
321
|
+
}
|
|
181
322
|
setWebCliOverrides(resolveWebOverrides(opts));
|
|
323
|
+
try {
|
|
324
|
+
setVerifyCliOverrides(resolveVerifyOverrides(opts));
|
|
325
|
+
setAgentCliOverrides(resolveAgentOverrides(opts));
|
|
326
|
+
setRoutingCliOverrides(resolveRoutingOverrides(opts));
|
|
327
|
+
} catch (error) {
|
|
328
|
+
if (error instanceof InvalidArgumentError) {
|
|
329
|
+
printError(error.message);
|
|
330
|
+
process.exit(1);
|
|
331
|
+
}
|
|
332
|
+
throw error;
|
|
333
|
+
}
|
|
334
|
+
setResilienceCliOverrides(
|
|
335
|
+
resolveResilienceOverrides({
|
|
336
|
+
continuous: opts.continuous,
|
|
337
|
+
resilient: opts.resilient,
|
|
338
|
+
failover: opts.failover,
|
|
339
|
+
autoDecompose: opts.autoDecompose,
|
|
340
|
+
inactivityTimeout: opts.inactivityTimeout,
|
|
341
|
+
onIssueFailure: opts.onIssueFailure
|
|
342
|
+
})
|
|
343
|
+
);
|
|
182
344
|
try {
|
|
183
345
|
setIssuesCliOverrides(resolveIssuesOverrides(opts));
|
|
184
346
|
} catch (error) {
|
|
@@ -193,19 +355,22 @@ withIssueOptions(
|
|
|
193
355
|
withGlobalOptions(
|
|
194
356
|
program.command("init").description(
|
|
195
357
|
"Check prerequisites and report (or create) the conventions this repository is missing"
|
|
196
|
-
).option("--apply", "Create the missing files instead of only reporting them").option("--json", "Emit the plan as JSON").option("--scope <dir>", "Resolve the conventions for a subdirectory (monorepo)").option("--check-only", "Only verify prerequisites, as earlier releases did")
|
|
358
|
+
).option("--apply", "Create the missing files instead of only reporting them").option("--json", "Emit the plan as JSON").option("--scope <dir>", "Resolve the conventions for a subdirectory (monorepo)").option("--check-only", "Only verify prerequisites, as earlier releases did").option("--no-agent-prompt", "Skip the first-run agent choice")
|
|
197
359
|
)
|
|
198
360
|
).action(
|
|
199
361
|
async (options) => {
|
|
200
|
-
const { loadIssuesConfig } = await import("./config-
|
|
201
|
-
const { runInit } = await import("./init-
|
|
362
|
+
const { loadIssuesConfig } = await import("./config-MEM2IWWN.js");
|
|
363
|
+
const { runInit } = await import("./init-OKWEC3EV.js");
|
|
202
364
|
const { preferredProvider } = await loadIssuesConfig();
|
|
203
|
-
const code = await runInit(preferredProvider,
|
|
365
|
+
const code = await runInit(preferredProvider, {
|
|
366
|
+
...options,
|
|
367
|
+
noAgentPrompt: options.agentPrompt === false
|
|
368
|
+
});
|
|
204
369
|
process.exit(code);
|
|
205
370
|
}
|
|
206
371
|
);
|
|
207
372
|
withGlobalOptions(
|
|
208
|
-
program.command("generate").description("Draft an issue
|
|
373
|
+
program.command("generate").description("Draft an issue with the configured agent and create it").requiredOption("--prompt <text>", "Issue description text").option("--github", "Create the issue on GitHub").option("--local", "Create the issue under issues/<n>/ only").option("--both", "Create the issue on GitHub and mirror it locally")
|
|
209
374
|
).action(async (options) => {
|
|
210
375
|
let target;
|
|
211
376
|
try {
|
|
@@ -217,20 +382,30 @@ withGlobalOptions(
|
|
|
217
382
|
}
|
|
218
383
|
throw error;
|
|
219
384
|
}
|
|
220
|
-
const { runGenerate } = await import("./generate-
|
|
385
|
+
const { runGenerate } = await import("./generate-MVQI7A45.js");
|
|
221
386
|
const code = await runGenerate(options.prompt, target);
|
|
222
387
|
process.exit(code);
|
|
223
388
|
});
|
|
224
389
|
withUserStoryNumberingOptions(
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
"
|
|
230
|
-
|
|
231
|
-
"--
|
|
232
|
-
|
|
233
|
-
|
|
390
|
+
withResilienceOptions(
|
|
391
|
+
withWebOptions(
|
|
392
|
+
withIssueOptions(
|
|
393
|
+
withGlobalOptions(
|
|
394
|
+
program.command("run").description(
|
|
395
|
+
"Execute the full pipeline: prd \u2192 plan \u2192 execute \u2192 review \u2192 pr (\u2192 pr-review, optional)"
|
|
396
|
+
).argument("<issues...>", 'Issue number(s): 42, "42,43" or 42 43').option("--mode <mode>", "Execution mode: auto | manual", "auto").option("--from <phase>", "Resume from a specific phase").option(
|
|
397
|
+
"--no-branch",
|
|
398
|
+
"Run pipeline on current branch without creating a new branch or PR"
|
|
399
|
+
).option("--pr-review", "Review the created Pull Request after the pr phase").option("-y, --yes", "Run the whole discovered hierarchy without confirmation").option("--cascade", "Run the children of a container, without implementing it").option("--only", "Run just the issues informed, without their hierarchy").option(
|
|
400
|
+
"--retry-limit <number>",
|
|
401
|
+
"Retry transient Claude failures up to N consecutive times",
|
|
402
|
+
parseInteger
|
|
403
|
+
).option("--retry-forever", "Retry transient Claude failures indefinitely").option(
|
|
404
|
+
"--on-issue-failure <mode>",
|
|
405
|
+
"In a queue, on a failing issue: stop | skip | block",
|
|
406
|
+
parseQueueFailureMode
|
|
407
|
+
).option("-d, --background", "Detach after confirmation and return the terminal").addOption(new Option("--detached-child").hideHelp())
|
|
408
|
+
)
|
|
234
409
|
)
|
|
235
410
|
)
|
|
236
411
|
)
|
|
@@ -250,7 +425,7 @@ withUserStoryNumberingOptions(
|
|
|
250
425
|
}
|
|
251
426
|
throw error;
|
|
252
427
|
}
|
|
253
|
-
const { runPipeline } = await import("./run-
|
|
428
|
+
const { runPipeline } = await import("./run-YU4TR62R.js");
|
|
254
429
|
const code = await runPipeline(
|
|
255
430
|
issues,
|
|
256
431
|
options.mode,
|
|
@@ -260,8 +435,14 @@ withUserStoryNumberingOptions(
|
|
|
260
435
|
{
|
|
261
436
|
yes: scope.yes,
|
|
262
437
|
only: scope.only,
|
|
438
|
+
cascade: scope.cascade,
|
|
263
439
|
continueNumbering: numbering.continueFlag,
|
|
264
|
-
startUs: numbering.startUs
|
|
440
|
+
startUs: numbering.startUs,
|
|
441
|
+
retryLimit: options.retryLimit,
|
|
442
|
+
retryForever: options.retryForever,
|
|
443
|
+
onIssueFailure: options.onIssueFailure,
|
|
444
|
+
background: options.background,
|
|
445
|
+
detachedChild: options.detachedChild
|
|
265
446
|
}
|
|
266
447
|
);
|
|
267
448
|
process.exit(code);
|
|
@@ -269,26 +450,104 @@ withUserStoryNumberingOptions(
|
|
|
269
450
|
);
|
|
270
451
|
withIssueOptions(
|
|
271
452
|
withGlobalOptions(
|
|
272
|
-
program.command("
|
|
453
|
+
program.command("resume").description("Resume an interrupted pipeline from the phase it stopped at").argument("[issue]", "Issue to resume. Omitted: the most recently attempted one").option("--all", "Resume every unfinished issue of this project, in order").option("--mode <mode>", "Execution mode: auto | manual", "auto")
|
|
454
|
+
)
|
|
455
|
+
).action(async (issue, options) => {
|
|
456
|
+
const { runResume } = await import("./resume-QMEPMSZW.js");
|
|
457
|
+
const code = await runResume(issue, {
|
|
458
|
+
...options.all === void 0 ? {} : { all: options.all },
|
|
459
|
+
...options.mode === void 0 ? {} : { mode: options.mode }
|
|
460
|
+
});
|
|
461
|
+
process.exit(code);
|
|
462
|
+
});
|
|
463
|
+
withGlobalOptions(
|
|
464
|
+
program.command("status").description("What is running right now, in which phase, and since when").argument("[issue]", "Restrict the report to one issue").option("--json", "Emit the assembled state as JSON")
|
|
465
|
+
).action(async (issue, options) => {
|
|
466
|
+
const { runStatus } = await import("./operations-LU6JA3BX.js");
|
|
467
|
+
process.exit(
|
|
468
|
+
await runStatus(issue, { ...options.json === void 0 ? {} : { json: options.json } })
|
|
469
|
+
);
|
|
470
|
+
});
|
|
471
|
+
withGlobalOptions(
|
|
472
|
+
program.command("usage").description("Aggregate execution telemetry from tasks.json").argument("[issue]", "Restrict the report to one issue").option("--issue <issue>", "Same as the positional argument").option("--since <date>", "Only executions started on or after this ISO date").option("--by <key>", "Group by harness, provider, model, purpose or status").option("--json", "Emit the assembled totals as JSON")
|
|
473
|
+
).action(
|
|
474
|
+
async (issue, options) => {
|
|
475
|
+
const { runUsage, USAGE_GROUP_KEYS } = await import("./usage-VCFLDA5Y.js");
|
|
476
|
+
const by = options.by;
|
|
477
|
+
if (by !== void 0 && !USAGE_GROUP_KEYS.includes(by)) {
|
|
478
|
+
printError("Must be one of: harness, provider, model, purpose, status.");
|
|
479
|
+
process.exit(1);
|
|
480
|
+
}
|
|
481
|
+
process.exit(
|
|
482
|
+
await runUsage(issue ?? options.issue, {
|
|
483
|
+
...options.since === void 0 ? {} : { since: options.since },
|
|
484
|
+
...by === void 0 ? {} : { by },
|
|
485
|
+
...options.json === void 0 ? {} : { json: options.json }
|
|
486
|
+
})
|
|
487
|
+
);
|
|
488
|
+
}
|
|
489
|
+
);
|
|
490
|
+
withGlobalOptions(
|
|
491
|
+
program.command("ps").description("Every issue-flow run active on this machine").option("--json", "Emit the listing as JSON").option("--watch", "Refresh the listing until interrupted")
|
|
492
|
+
).action(async (options) => {
|
|
493
|
+
const { runPs } = await import("./ps-TNE44R5V.js");
|
|
494
|
+
process.exit(await runPs(options));
|
|
495
|
+
});
|
|
496
|
+
withGlobalOptions(
|
|
497
|
+
program.command("runs").description("History of the runs of this project, with how each ended")
|
|
498
|
+
).action(async () => {
|
|
499
|
+
const { runRuns } = await import("./operations-LU6JA3BX.js");
|
|
500
|
+
process.exit(await runRuns());
|
|
501
|
+
});
|
|
502
|
+
withGlobalOptions(
|
|
503
|
+
program.command("logs").description("Read the execution journal (events.jsonl), filtered and readable").argument("[issue]", "Issue to read. Omitted: the most recently attempted one").option("--issue <issue>", "Same as the positional argument").option("--follow", "Keep reading as the journal grows").option("--tail <n>", "How many entries to show first (default 50)", parseInteger).option("--kind <kinds>", "Only these event types, comma separated (retry, phase:end, \u2026)")
|
|
504
|
+
).action(
|
|
505
|
+
async (issue, options) => {
|
|
506
|
+
const { runLogs } = await import("./operations-LU6JA3BX.js");
|
|
507
|
+
const kinds = options.kind === void 0 ? void 0 : options.kind.split(",").map((kind) => kind.trim()).filter((kind) => kind !== "");
|
|
508
|
+
process.exit(
|
|
509
|
+
await runLogs(issue ?? options.issue, {
|
|
510
|
+
...kinds === void 0 ? {} : { kind: kinds },
|
|
511
|
+
...options.follow === void 0 ? {} : { follow: options.follow },
|
|
512
|
+
...options.tail === void 0 ? {} : { tail: options.tail }
|
|
513
|
+
})
|
|
514
|
+
);
|
|
515
|
+
}
|
|
516
|
+
);
|
|
517
|
+
withGlobalOptions(
|
|
518
|
+
program.command("pause").description("Ask the running pipeline to stop after writing a checkpoint")
|
|
519
|
+
).action(async () => {
|
|
520
|
+
const { runPause } = await import("./operations-LU6JA3BX.js");
|
|
521
|
+
process.exit(await runPause());
|
|
522
|
+
});
|
|
523
|
+
withGlobalOptions(
|
|
524
|
+
program.command("cancel").description("Stop the run and mark the issue so a resume does not pick it up").argument("[issue]", "Issue to cancel. Omitted: the most recently attempted one")
|
|
525
|
+
).action(async (issue) => {
|
|
526
|
+
const { runCancel } = await import("./operations-LU6JA3BX.js");
|
|
527
|
+
process.exit(await runCancel(issue));
|
|
528
|
+
});
|
|
529
|
+
withIssueOptions(
|
|
530
|
+
withGlobalOptions(
|
|
531
|
+
program.command("analyze").description("Analyze an issue with the configured agent").argument("<issue>", "Issue number")
|
|
273
532
|
)
|
|
274
533
|
).action(async (issue) => {
|
|
275
|
-
const { runAnalyze } = await import("./analyze-
|
|
534
|
+
const { runAnalyze } = await import("./analyze-WS47UYGN.js");
|
|
276
535
|
const code = await runAnalyze(issue);
|
|
277
536
|
process.exit(code);
|
|
278
537
|
});
|
|
279
538
|
withIssueOptions(
|
|
280
539
|
withGlobalOptions(
|
|
281
|
-
program.command("prd").description("Generate a PRD from an analyzed issue
|
|
540
|
+
program.command("prd").description("Generate a PRD from an analyzed issue with the configured agent").argument("<issue>", "Issue number")
|
|
282
541
|
)
|
|
283
542
|
).action(async (issue) => {
|
|
284
|
-
const { runPrd } = await import("./prd-
|
|
543
|
+
const { runPrd } = await import("./prd-5O6GYCC6.js");
|
|
285
544
|
const code = await runPrd(issue);
|
|
286
545
|
process.exit(code);
|
|
287
546
|
});
|
|
288
547
|
withUserStoryNumberingOptions(
|
|
289
548
|
withIssueOptions(
|
|
290
549
|
withGlobalOptions(
|
|
291
|
-
program.command("plan").description("Convert a PRD to a tasks.json task plan
|
|
550
|
+
program.command("plan").description("Convert a PRD to a tasks.json task plan with the configured agent").argument("<issue>", "Issue number")
|
|
292
551
|
)
|
|
293
552
|
)
|
|
294
553
|
).action(async (issue, options) => {
|
|
@@ -302,7 +561,7 @@ withUserStoryNumberingOptions(
|
|
|
302
561
|
}
|
|
303
562
|
throw error;
|
|
304
563
|
}
|
|
305
|
-
const { runPlan } = await import("./plan-
|
|
564
|
+
const { runPlan } = await import("./plan-LEJJF3DE.js");
|
|
306
565
|
const code = await runPlan(issue, void 0, numbering);
|
|
307
566
|
process.exit(code);
|
|
308
567
|
});
|
|
@@ -321,7 +580,7 @@ withWebOptions(
|
|
|
321
580
|
).action(
|
|
322
581
|
async (positionalMaxIter, options) => {
|
|
323
582
|
try {
|
|
324
|
-
const { runExecute } = await import("./execute-
|
|
583
|
+
const { runExecute } = await import("./execute-NITIHHCK.js");
|
|
325
584
|
const code = await runExecute(positionalMaxIter, options);
|
|
326
585
|
process.exit(code);
|
|
327
586
|
} catch (error) {
|
|
@@ -332,19 +591,19 @@ withWebOptions(
|
|
|
332
591
|
);
|
|
333
592
|
withIssueOptions(
|
|
334
593
|
withGlobalOptions(
|
|
335
|
-
program.command("review").description("Validate an issue resolution
|
|
594
|
+
program.command("review").description("Validate an issue resolution with the configured agent").argument("<issue>", "Issue number")
|
|
336
595
|
)
|
|
337
596
|
).action(async (issue) => {
|
|
338
|
-
const { runReview } = await import("./review-
|
|
597
|
+
const { runReview } = await import("./review-YKWD6SNN.js");
|
|
339
598
|
const code = await runReview(issue);
|
|
340
599
|
process.exit(code);
|
|
341
600
|
});
|
|
342
601
|
withIssueOptions(
|
|
343
602
|
withGlobalOptions(
|
|
344
|
-
program.command("pr").description("Create a pull request
|
|
603
|
+
program.command("pr").description("Create a pull request with the configured agent").argument("<issue>", "Issue number")
|
|
345
604
|
)
|
|
346
605
|
).action(async (issue) => {
|
|
347
|
-
const { runPr } = await import("./pr-
|
|
606
|
+
const { runPr } = await import("./pr-HPVUZ7S3.js");
|
|
348
607
|
const code = await runPr(issue);
|
|
349
608
|
process.exit(code);
|
|
350
609
|
});
|
|
@@ -352,35 +611,126 @@ var webCommand = program.command("web").description("Manage the web monitoring s
|
|
|
352
611
|
webCommand.command("serve").description(
|
|
353
612
|
"Run the web monitor server in the foreground (internal \u2014 spawned detached by --web)"
|
|
354
613
|
).option("--port <n>", "Web server port (default: 3737)", parseInteger).option("--host <h>", "Web server host (default: 0.0.0.0)").option("--refresh <s>", "Suggested UI polling interval in seconds", parseInteger).action(async (options) => {
|
|
355
|
-
const { runWebServe } = await import("./web-
|
|
614
|
+
const { runWebServe } = await import("./web-XVHLX62B.js");
|
|
356
615
|
const code = await runWebServe(options);
|
|
357
616
|
if (code !== 0) {
|
|
358
617
|
process.exit(code);
|
|
359
618
|
}
|
|
360
619
|
});
|
|
361
620
|
webCommand.command("stop").description("Stop the running web monitor server").action(async () => {
|
|
362
|
-
const { runWebStop } = await import("./web-
|
|
621
|
+
const { runWebStop } = await import("./web-XVHLX62B.js");
|
|
363
622
|
const code = await runWebStop();
|
|
364
623
|
process.exit(code);
|
|
365
624
|
});
|
|
366
625
|
withGlobalOptions(
|
|
367
626
|
program.command("policy").description("Inspect the policies discovered in this repository and their provenance").option("--scope <dir>", "Resolve the policy for a subdirectory (monorepo)").option("--json", "Emit the resolved policy as JSON")
|
|
368
627
|
).action(async (options) => {
|
|
369
|
-
const { runPolicy } = await import("./policy-
|
|
628
|
+
const { runPolicy } = await import("./policy-JSYEK5B2.js");
|
|
370
629
|
const code = await runPolicy(options);
|
|
371
630
|
process.exit(code);
|
|
372
631
|
});
|
|
632
|
+
var routingCommand = withGlobalOptions(
|
|
633
|
+
program.command("routing").description("Inspect the shadow router (records a recommendation, does not act)")
|
|
634
|
+
);
|
|
635
|
+
routingCommand.option("--json", "Emit the resolved routing config as JSON").action(async (options) => {
|
|
636
|
+
const { runRoutingInspect } = await import("./routing-2ZUMZPJB.js");
|
|
637
|
+
process.exit(await runRoutingInspect(options));
|
|
638
|
+
});
|
|
639
|
+
routingCommand.command("report").description("Shadow agreement between selected and actual harness").option("--issue <n>", "Issue number").option("--json", "Emit JSON").action(async (options) => {
|
|
640
|
+
const { runRoutingReport } = await import("./routing-2ZUMZPJB.js");
|
|
641
|
+
process.exit(await runRoutingReport(options));
|
|
642
|
+
});
|
|
643
|
+
var conventionsCommand = withGlobalOptions(
|
|
644
|
+
program.command("conventions").description("Compute the repository Git convention (branch, commit, PR title)")
|
|
645
|
+
);
|
|
646
|
+
conventionsCommand.command("branch").description("Print the deterministic branch name for an issue").option("--issue <n>", "Issue number").option("--title <text>", "Issue title, when the issue cannot be resolved").option("--json", "Emit JSON").action(async (options) => {
|
|
647
|
+
const { runConventionsBranch } = await import("./conventions-WV4NDXGH.js");
|
|
648
|
+
process.exit(await runConventionsBranch(options));
|
|
649
|
+
});
|
|
650
|
+
conventionsCommand.command("commit").description("Print a Conventional Commit message").requiredOption("--type <type>", "Change type (feat, fix, docs, \u2026)").option("--scope <scope>", "Optional scope").requiredOption("--subject <text>", "Commit subject").option("--issue <n>", "Issue number for the Refs trailer").option("--story <id>", "Story id (US-010)").option("--breaking <text>", "Breaking change description").option("--json", "Emit JSON").action(
|
|
651
|
+
async (options) => {
|
|
652
|
+
const { runConventionsCommit } = await import("./conventions-WV4NDXGH.js");
|
|
653
|
+
process.exit(await runConventionsCommit(options));
|
|
654
|
+
}
|
|
655
|
+
);
|
|
656
|
+
conventionsCommand.command("pr-title").description("Print the Conventional Commit Pull Request title").option("--issue <n>", "Issue number").option("--title <text>", "Issue title, when the issue cannot be resolved").option("--json", "Emit JSON").action(async (options) => {
|
|
657
|
+
const { runConventionsPrTitle } = await import("./conventions-WV4NDXGH.js");
|
|
658
|
+
process.exit(await runConventionsPrTitle(options));
|
|
659
|
+
});
|
|
660
|
+
var agentCommand = withGlobalOptions(
|
|
661
|
+
program.command("agent").description("Inspect the resolved agent and model for each phase").option("--json", "Emit the resolved agent configuration as JSON")
|
|
662
|
+
);
|
|
663
|
+
agentCommand.action(async (options) => {
|
|
664
|
+
const { runAgent } = await import("./agent-BXRIEKVM.js");
|
|
665
|
+
const code = await runAgent(options);
|
|
666
|
+
process.exit(code);
|
|
667
|
+
});
|
|
668
|
+
agentCommand.command("use").description("Write an agent preference to config.json or .issue-flow.json").argument("<provider>", "claude, codex, cursor or antigravity").option("--model <model>", "Model identifier for this preference").option("--global", "Write to ~/.issue-flow/config.json (default)").option("--project", "Write to .issue-flow.json in the repository").option("--phase <phase>", "Write only the override for this phase").action(
|
|
669
|
+
async (provider, options) => {
|
|
670
|
+
const { runAgentUse } = await import("./agent-BXRIEKVM.js");
|
|
671
|
+
const code = await runAgentUse(provider, options);
|
|
672
|
+
process.exit(code);
|
|
673
|
+
}
|
|
674
|
+
);
|
|
373
675
|
withGlobalOptions(
|
|
374
|
-
program.command("pr-review").description("Review a Pull Request as a whole
|
|
676
|
+
program.command("pr-review").description("Review a Pull Request as a whole with the configured agent").argument("[pr]", "Pull Request number (discovered from the session when omitted)").option("--issue <n>", "Issue the Pull Request belongs to").option("--round <n>", "Rewrite a specific review round instead of appending a new one").option("--yes", "Skip the confirmation of the discovered Pull Request").option(
|
|
375
677
|
"--fail-on <level>",
|
|
376
678
|
"Verdict that fails the command: request-changes | suggestions | none"
|
|
377
679
|
)
|
|
378
680
|
).action(
|
|
379
681
|
async (pr, options) => {
|
|
380
|
-
const { runPrReview } = await import("./pr-review-
|
|
682
|
+
const { runPrReview } = await import("./pr-review-R2QZBT3F.js");
|
|
381
683
|
const code = await runPrReview(pr, options);
|
|
382
684
|
process.exit(code);
|
|
383
685
|
}
|
|
384
686
|
);
|
|
687
|
+
withGlobalOptions(
|
|
688
|
+
program.command("bench").description("Measure the corpus: synthetic (CI) or real (paid, on demand)").option("--mode <mode>", "synthetic (default, free) or real (fixtures + harness)").option(
|
|
689
|
+
"--task <class>",
|
|
690
|
+
"Corpus class (repeatable): trivial, small, medium, analysis",
|
|
691
|
+
collectString,
|
|
692
|
+
[]
|
|
693
|
+
).option("--arm <name>", "Experiment arm (repeatable). Default: baseline", collectString, []).option("--repeats <n>", "Repetitions per cell (default 5)", parseInteger).option(
|
|
694
|
+
"--campaign-max-cost <usd>",
|
|
695
|
+
"Campaign cost ceiling in USD (evaluateCeilings)",
|
|
696
|
+
parseUsd
|
|
697
|
+
).option(
|
|
698
|
+
"--campaign-max-duration <ms>",
|
|
699
|
+
"Campaign duration ceiling in milliseconds",
|
|
700
|
+
parseInteger
|
|
701
|
+
).option("--out <path>", "Write the markdown report to this path").option("--yes", "Skip the paid-campaign confirmation").option("--repo <path>", "Investigation escape; does not produce a publishable row").option("--json", "Also emit the campaign JSON")
|
|
702
|
+
).action(
|
|
703
|
+
async (options) => {
|
|
704
|
+
if (options.mode !== void 0 && options.mode !== "synthetic" && options.mode !== "real") {
|
|
705
|
+
printError("Unknown bench mode. Use 'synthetic' or 'real'.");
|
|
706
|
+
process.exit(1);
|
|
707
|
+
}
|
|
708
|
+
const { runBench } = await import("./bench-SA3BOME5.js");
|
|
709
|
+
process.exit(
|
|
710
|
+
await runBench({
|
|
711
|
+
...options.mode === void 0 ? {} : { mode: options.mode },
|
|
712
|
+
...options.task === void 0 || options.task.length === 0 ? {} : { task: options.task },
|
|
713
|
+
...options.arm === void 0 || options.arm.length === 0 ? {} : { arm: options.arm },
|
|
714
|
+
...options.repeats === void 0 ? {} : { repeats: options.repeats },
|
|
715
|
+
...options.campaignMaxCost === void 0 ? {} : { maxCost: options.campaignMaxCost },
|
|
716
|
+
...options.campaignMaxDuration === void 0 ? {} : { maxDuration: options.campaignMaxDuration },
|
|
717
|
+
...options.out === void 0 ? {} : { out: options.out },
|
|
718
|
+
...options.yes === void 0 ? {} : { yes: options.yes },
|
|
719
|
+
...options.repo === void 0 ? {} : { repo: options.repo },
|
|
720
|
+
...options.json === void 0 ? {} : { json: options.json }
|
|
721
|
+
})
|
|
722
|
+
);
|
|
723
|
+
}
|
|
724
|
+
);
|
|
725
|
+
program.action(async () => {
|
|
726
|
+
const { listLiveRuns } = await import("./registry-LGPE53QD.js");
|
|
727
|
+
const runs = await listLiveRuns();
|
|
728
|
+
if (runs.length === 0) {
|
|
729
|
+
program.help();
|
|
730
|
+
return;
|
|
731
|
+
}
|
|
732
|
+
const { runPs } = await import("./ps-TNE44R5V.js");
|
|
733
|
+
process.exit(await runPs());
|
|
734
|
+
});
|
|
385
735
|
program.parse();
|
|
386
736
|
//# sourceMappingURL=cli.js.map
|