baro-ai 0.47.4 → 0.47.6
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/cli.mjs +50 -6
- package/dist/cli.mjs.map +1 -1
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -39860,10 +39860,16 @@ var Conductor = class extends BaseObserver {
|
|
|
39860
39860
|
async handleLevelCompute() {
|
|
39861
39861
|
if (this.phase !== "computing") return;
|
|
39862
39862
|
if (!this.prd) return;
|
|
39863
|
-
const
|
|
39863
|
+
const blockedStoryIds = this.computeBlockedStoryIds();
|
|
39864
|
+
const failedIds = new Set(this.globalFailed);
|
|
39865
|
+
const runnableStories = this.prd.userStories.filter(
|
|
39866
|
+
(s2) => !s2.passes && !failedIds.has(s2.id) && !blockedStoryIds.has(s2.id)
|
|
39867
|
+
);
|
|
39868
|
+
const levels = buildDag(runnableStories);
|
|
39864
39869
|
if (levels.length === 0) {
|
|
39865
39870
|
const allPassed = this.prd.userStories.every((s2) => s2.passes) && this.globalDropped.length === 0;
|
|
39866
|
-
this.
|
|
39871
|
+
const abortReason = allPassed ? null : this.globalFailed.length > 0 ? blockedStoryIds.size > 0 ? `blocked by failed dependencies: failed ${this.globalFailed.join(", ")}; blocked ${[...blockedStoryIds].join(", ")}` : `stories failed: ${this.globalFailed.join(", ")}` : null;
|
|
39872
|
+
this.terminateRun(allPassed, abortReason);
|
|
39867
39873
|
return;
|
|
39868
39874
|
}
|
|
39869
39875
|
const level = levels[0];
|
|
@@ -40094,6 +40100,34 @@ ${prompt}`;
|
|
|
40094
40100
|
}
|
|
40095
40101
|
this.resolveDone(summary);
|
|
40096
40102
|
}
|
|
40103
|
+
/**
|
|
40104
|
+
* Stories whose dependency chain includes a terminally failed story cannot
|
|
40105
|
+
* become runnable in this run. Keep them out of the remaining DAG so
|
|
40106
|
+
* `buildDag` cannot silently promote them after the failed dependency is
|
|
40107
|
+
* filtered out. Do NOT mark them passed/dropped here: this is a checkpoint,
|
|
40108
|
+
* and the user may choose to rerun the failed prerequisite on resume.
|
|
40109
|
+
*/
|
|
40110
|
+
computeBlockedStoryIds() {
|
|
40111
|
+
if (!this.prd || this.globalFailed.length === 0) {
|
|
40112
|
+
return /* @__PURE__ */ new Set();
|
|
40113
|
+
}
|
|
40114
|
+
const failed = new Set(this.globalFailed);
|
|
40115
|
+
const blocked = /* @__PURE__ */ new Set();
|
|
40116
|
+
let changed = true;
|
|
40117
|
+
while (changed) {
|
|
40118
|
+
changed = false;
|
|
40119
|
+
for (const story of this.prd.userStories) {
|
|
40120
|
+
if (story.passes || failed.has(story.id) || blocked.has(story.id)) {
|
|
40121
|
+
continue;
|
|
40122
|
+
}
|
|
40123
|
+
if ((story.dependsOn ?? []).some((id) => failed.has(id) || blocked.has(id))) {
|
|
40124
|
+
blocked.add(story.id);
|
|
40125
|
+
changed = true;
|
|
40126
|
+
}
|
|
40127
|
+
}
|
|
40128
|
+
}
|
|
40129
|
+
return blocked;
|
|
40130
|
+
}
|
|
40097
40131
|
resolvePrompt(story) {
|
|
40098
40132
|
const candidatePath = this.opts.promptTemplatePath ?? join(this.opts.cwd, "prompt.md");
|
|
40099
40133
|
let prompt;
|
|
@@ -44324,8 +44358,17 @@ var SurgeonOpenAI = class extends BaseObserver {
|
|
|
44324
44358
|
|
|
44325
44359
|
// ../baro-orchestrator/src/orchestrate.ts
|
|
44326
44360
|
function storyTimeoutSecs(configured, effort) {
|
|
44327
|
-
|
|
44328
|
-
|
|
44361
|
+
if (typeof configured === "number" && configured > 0) return configured;
|
|
44362
|
+
switch (effort) {
|
|
44363
|
+
case "max":
|
|
44364
|
+
return 1500;
|
|
44365
|
+
case "xhigh":
|
|
44366
|
+
return 1200;
|
|
44367
|
+
case "high":
|
|
44368
|
+
return 900;
|
|
44369
|
+
default:
|
|
44370
|
+
return 600;
|
|
44371
|
+
}
|
|
44329
44372
|
}
|
|
44330
44373
|
async function orchestrate(config) {
|
|
44331
44374
|
const env = new AgenticEnvironment();
|
|
@@ -44581,7 +44624,8 @@ function parseArgs(argv) {
|
|
|
44581
44624
|
prd: "prd.json",
|
|
44582
44625
|
cwd: ".",
|
|
44583
44626
|
parallel: 0,
|
|
44584
|
-
timeout:
|
|
44627
|
+
timeout: 0,
|
|
44628
|
+
// 0 = auto (effort-scaled in storyTimeoutSecs); --timeout N overrides absolutely
|
|
44585
44629
|
noGit: false,
|
|
44586
44630
|
noTuiEvents: false,
|
|
44587
44631
|
withCritic: false,
|
|
@@ -44713,7 +44757,7 @@ function printHelp() {
|
|
|
44713
44757
|
" --prd <path> Path to prd.json (default: ./prd.json)",
|
|
44714
44758
|
" --cwd <path> Working directory (default: .)",
|
|
44715
44759
|
" --parallel <N> Max parallel stories per level (0 = unlimited)",
|
|
44716
|
-
" --timeout <secs> Per-story timeout (default:
|
|
44760
|
+
" --timeout <secs> Per-story timeout (default: auto \u2014 effort-scaled; any value overrides)",
|
|
44717
44761
|
" --model <name> Override model (opus, sonnet, haiku)",
|
|
44718
44762
|
" --no-git Skip git lifecycle (branch / push)",
|
|
44719
44763
|
" --no-tui-events Skip BaroEvent JSON emission",
|