baro-ai 0.74.10 → 0.74.12
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 +105 -46
- package/dist/cli.mjs.map +1 -1
- package/dist/runner.mjs +1 -1
- package/dist/runner.mjs.map +1 -1
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -22722,7 +22722,7 @@ var require_cross_spawn = __commonJS({
|
|
|
22722
22722
|
var cp = __require("child_process");
|
|
22723
22723
|
var parse = require_parse2();
|
|
22724
22724
|
var enoent = require_enoent();
|
|
22725
|
-
function
|
|
22725
|
+
function spawn9(command, args, options) {
|
|
22726
22726
|
const parsed = parse(command, args, options);
|
|
22727
22727
|
const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
|
|
22728
22728
|
enoent.hookChildProcess(spawned, parsed);
|
|
@@ -22734,8 +22734,8 @@ var require_cross_spawn = __commonJS({
|
|
|
22734
22734
|
result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
|
|
22735
22735
|
return result;
|
|
22736
22736
|
}
|
|
22737
|
-
module.exports =
|
|
22738
|
-
module.exports.spawn =
|
|
22737
|
+
module.exports = spawn9;
|
|
22738
|
+
module.exports.spawn = spawn9;
|
|
22739
22739
|
module.exports.sync = spawnSync;
|
|
22740
22740
|
module.exports._parse = parse;
|
|
22741
22741
|
module.exports._enoent = enoent;
|
|
@@ -23175,7 +23175,7 @@ import { resolve as resolve3 } from "path";
|
|
|
23175
23175
|
|
|
23176
23176
|
// ../baro-orchestrator/src/orchestrate.ts
|
|
23177
23177
|
import { mkdirSync as mkdirSync7 } from "fs";
|
|
23178
|
-
import { hostname } from "os";
|
|
23178
|
+
import { homedir as homedir3, hostname } from "os";
|
|
23179
23179
|
import { dirname as dirname3, join as join8 } from "path";
|
|
23180
23180
|
|
|
23181
23181
|
// ../../node_modules/openai/internal/tslib.mjs
|
|
@@ -40840,7 +40840,7 @@ var WorktreeManager = class {
|
|
|
40840
40840
|
try {
|
|
40841
40841
|
if (!existsSync(shared)) mkdirSync(shared, { recursive: true });
|
|
40842
40842
|
mkdirSync(join(worktreePath, rel), { recursive: true });
|
|
40843
|
-
symlinkSync(shared, dest, "
|
|
40843
|
+
symlinkSync(shared, dest, "junction");
|
|
40844
40844
|
} catch (e2) {
|
|
40845
40845
|
this.log(`could not symlink ${join(rel, dir)} into worktree (${errMsg(e2)})`);
|
|
40846
40846
|
}
|
|
@@ -42114,10 +42114,71 @@ function applyTemplate(tpl, story) {
|
|
|
42114
42114
|
return tpl.replace(/STORY_ID/g, story.id).replace(/STORY_TITLE/g, story.title).replace(/STORY_DESCRIPTION/g, story.description).replace(/ACCEPTANCE_CRITERIA/g, acceptance);
|
|
42115
42115
|
}
|
|
42116
42116
|
|
|
42117
|
+
// ../baro-orchestrator/src/exec-file-cli.ts
|
|
42118
|
+
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
42119
|
+
function execFileCli(command, args, options = {}) {
|
|
42120
|
+
const maxBuffer = options.maxBuffer ?? 1024 * 1024;
|
|
42121
|
+
return new Promise((resolve4, reject) => {
|
|
42122
|
+
const child = (0, import_cross_spawn.default)(command, args, {
|
|
42123
|
+
cwd: options.cwd,
|
|
42124
|
+
env: options.env,
|
|
42125
|
+
stdio: ["ignore", "pipe", "pipe"]
|
|
42126
|
+
});
|
|
42127
|
+
let stdout = "";
|
|
42128
|
+
let stderr = "";
|
|
42129
|
+
let settled = false;
|
|
42130
|
+
let timer;
|
|
42131
|
+
const finish = (fn) => {
|
|
42132
|
+
if (settled) return;
|
|
42133
|
+
settled = true;
|
|
42134
|
+
if (timer) clearTimeout(timer);
|
|
42135
|
+
fn();
|
|
42136
|
+
};
|
|
42137
|
+
if (options.timeout && options.timeout > 0) {
|
|
42138
|
+
timer = setTimeout(() => {
|
|
42139
|
+
child.kill("SIGTERM");
|
|
42140
|
+
finish(() => {
|
|
42141
|
+
const err = new Error(
|
|
42142
|
+
`${command} timed out after ${options.timeout}ms`
|
|
42143
|
+
);
|
|
42144
|
+
err.killed = true;
|
|
42145
|
+
reject(err);
|
|
42146
|
+
});
|
|
42147
|
+
}, options.timeout);
|
|
42148
|
+
}
|
|
42149
|
+
child.stdout?.on("data", (d) => {
|
|
42150
|
+
stdout += d.toString();
|
|
42151
|
+
if (stdout.length > maxBuffer) {
|
|
42152
|
+
child.kill("SIGTERM");
|
|
42153
|
+
finish(
|
|
42154
|
+
() => reject(new Error(`${command} stdout exceeded maxBuffer`))
|
|
42155
|
+
);
|
|
42156
|
+
}
|
|
42157
|
+
});
|
|
42158
|
+
child.stderr?.on("data", (d) => {
|
|
42159
|
+
stderr += d.toString();
|
|
42160
|
+
});
|
|
42161
|
+
child.on("error", (err) => finish(() => reject(err)));
|
|
42162
|
+
child.on("close", (code) => {
|
|
42163
|
+
finish(() => {
|
|
42164
|
+
if (code === 0) {
|
|
42165
|
+
resolve4({ stdout, stderr });
|
|
42166
|
+
return;
|
|
42167
|
+
}
|
|
42168
|
+
const err = new Error(
|
|
42169
|
+
`${command} exited with code ${code}
|
|
42170
|
+
${stderr}`
|
|
42171
|
+
);
|
|
42172
|
+
err.code = code;
|
|
42173
|
+
err.stdout = stdout;
|
|
42174
|
+
err.stderr = stderr;
|
|
42175
|
+
reject(err);
|
|
42176
|
+
});
|
|
42177
|
+
});
|
|
42178
|
+
});
|
|
42179
|
+
}
|
|
42180
|
+
|
|
42117
42181
|
// ../baro-orchestrator/src/participants/critic.ts
|
|
42118
|
-
import { execFile as execFile3 } from "child_process";
|
|
42119
|
-
import { promisify as promisify4 } from "util";
|
|
42120
|
-
var execFileAsync = promisify4(execFile3);
|
|
42121
42182
|
var VERDICT_SYSTEM_PROMPT = `You are a strict acceptance-criteria evaluator. You will receive:
|
|
42122
42183
|
1. A list of acceptance criteria that must ALL be satisfied.
|
|
42123
42184
|
2. The output text produced by an agent.
|
|
@@ -42213,7 +42274,7 @@ var Critic = class extends BaseObserver {
|
|
|
42213
42274
|
async evaluate(resultText, criteria) {
|
|
42214
42275
|
const prompt = buildEvalPrompt(criteria, resultText);
|
|
42215
42276
|
try {
|
|
42216
|
-
const { stdout } = await
|
|
42277
|
+
const { stdout } = await execFileCli(
|
|
42217
42278
|
this.opts.claudeBin,
|
|
42218
42279
|
[
|
|
42219
42280
|
"--print",
|
|
@@ -42307,7 +42368,7 @@ function extractVerdictJson(text) {
|
|
|
42307
42368
|
}
|
|
42308
42369
|
|
|
42309
42370
|
// ../baro-orchestrator/src/codex-one-shot.ts
|
|
42310
|
-
var
|
|
42371
|
+
var import_cross_spawn2 = __toESM(require_cross_spawn(), 1);
|
|
42311
42372
|
async function runCodexOneShot(opts) {
|
|
42312
42373
|
const label = opts.label ?? "codex";
|
|
42313
42374
|
const args = ["exec", "--json"];
|
|
@@ -42321,7 +42382,7 @@ async function runCodexOneShot(opts) {
|
|
|
42321
42382
|
return await new Promise((resolve4, reject) => {
|
|
42322
42383
|
let proc;
|
|
42323
42384
|
try {
|
|
42324
|
-
proc = (0,
|
|
42385
|
+
proc = (0, import_cross_spawn2.default)(opts.codexBin ?? "codex", args, {
|
|
42325
42386
|
cwd: opts.cwd,
|
|
42326
42387
|
stdio: ["ignore", "pipe", "pipe"]
|
|
42327
42388
|
});
|
|
@@ -42772,7 +42833,7 @@ var CriticOpenAI = class extends BaseObserver {
|
|
|
42772
42833
|
};
|
|
42773
42834
|
|
|
42774
42835
|
// ../baro-orchestrator/src/opencode-one-shot.ts
|
|
42775
|
-
var
|
|
42836
|
+
var import_cross_spawn3 = __toESM(require_cross_spawn(), 1);
|
|
42776
42837
|
async function runOpenCodeOneShot(opts) {
|
|
42777
42838
|
const label = opts.label ?? "opencode";
|
|
42778
42839
|
const args = ["run", "--format", "json", "--dangerously-skip-permissions"];
|
|
@@ -42783,7 +42844,7 @@ async function runOpenCodeOneShot(opts) {
|
|
|
42783
42844
|
return await new Promise((resolve4, reject) => {
|
|
42784
42845
|
let proc;
|
|
42785
42846
|
try {
|
|
42786
|
-
proc = (0,
|
|
42847
|
+
proc = (0, import_cross_spawn3.default)(opts.opencodeBin ?? "opencode", args, {
|
|
42787
42848
|
cwd: opts.cwd,
|
|
42788
42849
|
stdio: ["ignore", "pipe", "pipe"]
|
|
42789
42850
|
});
|
|
@@ -42992,7 +43053,7 @@ ${userPrompt}`;
|
|
|
42992
43053
|
};
|
|
42993
43054
|
|
|
42994
43055
|
// ../baro-orchestrator/src/pi-one-shot.ts
|
|
42995
|
-
var
|
|
43056
|
+
var import_cross_spawn4 = __toESM(require_cross_spawn(), 1);
|
|
42996
43057
|
async function runPiOneShot(opts) {
|
|
42997
43058
|
const label = opts.label ?? "pi";
|
|
42998
43059
|
const args = ["--mode", "json", "-p", "--no-session"];
|
|
@@ -43003,7 +43064,7 @@ async function runPiOneShot(opts) {
|
|
|
43003
43064
|
return await new Promise((resolve4, reject) => {
|
|
43004
43065
|
let proc;
|
|
43005
43066
|
try {
|
|
43006
|
-
proc = (0,
|
|
43067
|
+
proc = (0, import_cross_spawn4.default)(opts.piBin ?? "pi", args, {
|
|
43007
43068
|
cwd: opts.cwd,
|
|
43008
43069
|
stdio: ["ignore", "pipe", "pipe"]
|
|
43009
43070
|
});
|
|
@@ -43260,17 +43321,17 @@ ${userPrompt}`;
|
|
|
43260
43321
|
};
|
|
43261
43322
|
|
|
43262
43323
|
// ../baro-orchestrator/src/participants/finalizer.ts
|
|
43263
|
-
import { execFile as
|
|
43324
|
+
import { execFile as execFile4 } from "child_process";
|
|
43264
43325
|
import { mkdirSync as mkdirSync3, writeFileSync as writeFileSync2 } from "fs";
|
|
43265
43326
|
import { join as join4 } from "path";
|
|
43266
|
-
import { promisify as
|
|
43327
|
+
import { promisify as promisify5 } from "util";
|
|
43267
43328
|
|
|
43268
43329
|
// ../baro-orchestrator/src/verify.ts
|
|
43269
|
-
import { execFile as
|
|
43330
|
+
import { execFile as execFile3 } from "child_process";
|
|
43270
43331
|
import { existsSync as existsSync3, readFileSync as readFileSync3 } from "fs";
|
|
43271
43332
|
import { join as join3 } from "path";
|
|
43272
|
-
import { promisify as
|
|
43273
|
-
var
|
|
43333
|
+
import { promisify as promisify4 } from "util";
|
|
43334
|
+
var execFileAsync = promisify4(execFile3);
|
|
43274
43335
|
var TIMEOUT_MS = 5 * 6e4;
|
|
43275
43336
|
var TAIL_BYTES = 1500;
|
|
43276
43337
|
function detectCommands(cwd) {
|
|
@@ -43299,7 +43360,7 @@ function detectCommands(cwd) {
|
|
|
43299
43360
|
}
|
|
43300
43361
|
async function runCmd(cwd, c) {
|
|
43301
43362
|
try {
|
|
43302
|
-
await
|
|
43363
|
+
await execFileAsync(c.tool, c.args, {
|
|
43303
43364
|
cwd,
|
|
43304
43365
|
timeout: TIMEOUT_MS,
|
|
43305
43366
|
maxBuffer: 8 * 1024 * 1024,
|
|
@@ -43326,7 +43387,7 @@ async function verifyBuild(cwd) {
|
|
|
43326
43387
|
}
|
|
43327
43388
|
|
|
43328
43389
|
// ../baro-orchestrator/src/participants/finalizer.ts
|
|
43329
|
-
var
|
|
43390
|
+
var execFileAsync2 = promisify5(execFile4);
|
|
43330
43391
|
var Finalizer = class extends BaseObserver {
|
|
43331
43392
|
opts;
|
|
43332
43393
|
envRef = null;
|
|
@@ -43569,9 +43630,9 @@ var Finalizer = class extends BaseObserver {
|
|
|
43569
43630
|
${a.body}
|
|
43570
43631
|
`);
|
|
43571
43632
|
}
|
|
43572
|
-
await
|
|
43633
|
+
await execFileAsync2("git", ["add", "adr"], { cwd: this.opts.cwd });
|
|
43573
43634
|
try {
|
|
43574
|
-
await
|
|
43635
|
+
await execFileAsync2(
|
|
43575
43636
|
"git",
|
|
43576
43637
|
["commit", "-m", `docs: architecture decision records (${adrs.length})
|
|
43577
43638
|
|
|
@@ -43632,7 +43693,7 @@ ${BARO_COAUTHOR_TRAILER}`],
|
|
|
43632
43693
|
async collectCommitsSinceBase() {
|
|
43633
43694
|
if (!this.baseSha) return [];
|
|
43634
43695
|
try {
|
|
43635
|
-
const { stdout } = await
|
|
43696
|
+
const { stdout } = await execFileAsync2(
|
|
43636
43697
|
"git",
|
|
43637
43698
|
["log", `${this.baseSha}..HEAD`, "--pretty=format:%H%x09%s"],
|
|
43638
43699
|
{ cwd: this.opts.cwd }
|
|
@@ -43648,7 +43709,7 @@ ${BARO_COAUTHOR_TRAILER}`],
|
|
|
43648
43709
|
async collectFileStats() {
|
|
43649
43710
|
if (!this.baseSha) return { created: 0, modified: 0 };
|
|
43650
43711
|
try {
|
|
43651
|
-
const { stdout } = await
|
|
43712
|
+
const { stdout } = await execFileAsync2(
|
|
43652
43713
|
"git",
|
|
43653
43714
|
["diff", "--name-status", this.baseSha, "HEAD"],
|
|
43654
43715
|
{ cwd: this.opts.cwd }
|
|
@@ -43667,7 +43728,7 @@ ${BARO_COAUTHOR_TRAILER}`],
|
|
|
43667
43728
|
}
|
|
43668
43729
|
async detectBranch() {
|
|
43669
43730
|
try {
|
|
43670
|
-
const { stdout } = await
|
|
43731
|
+
const { stdout } = await execFileAsync2(
|
|
43671
43732
|
"git",
|
|
43672
43733
|
["branch", "--show-current"],
|
|
43673
43734
|
{ cwd: this.opts.cwd }
|
|
@@ -43679,7 +43740,7 @@ ${BARO_COAUTHOR_TRAILER}`],
|
|
|
43679
43740
|
}
|
|
43680
43741
|
async detectDefaultBaseBranch() {
|
|
43681
43742
|
try {
|
|
43682
|
-
const { stdout } = await
|
|
43743
|
+
const { stdout } = await execFileAsync2(
|
|
43683
43744
|
"gh",
|
|
43684
43745
|
["repo", "view", "--json", "defaultBranchRef", "--jq", ".defaultBranchRef.name"],
|
|
43685
43746
|
{ cwd: this.opts.cwd }
|
|
@@ -43689,7 +43750,7 @@ ${BARO_COAUTHOR_TRAILER}`],
|
|
|
43689
43750
|
} catch {
|
|
43690
43751
|
}
|
|
43691
43752
|
try {
|
|
43692
|
-
const { stdout } = await
|
|
43753
|
+
const { stdout } = await execFileAsync2(
|
|
43693
43754
|
"git",
|
|
43694
43755
|
["symbolic-ref", "--short", "refs/remotes/origin/HEAD"],
|
|
43695
43756
|
{ cwd: this.opts.cwd }
|
|
@@ -43796,7 +43857,7 @@ ${BARO_COAUTHOR_TRAILER}`],
|
|
|
43796
43857
|
}
|
|
43797
43858
|
async hasGhBinary() {
|
|
43798
43859
|
try {
|
|
43799
|
-
await
|
|
43860
|
+
await execFileAsync2("gh", ["--version"], { cwd: this.opts.cwd });
|
|
43800
43861
|
return true;
|
|
43801
43862
|
} catch {
|
|
43802
43863
|
return false;
|
|
@@ -43808,7 +43869,7 @@ ${BARO_COAUTHOR_TRAILER}`],
|
|
|
43808
43869
|
// surfaces the real outcome.
|
|
43809
43870
|
async pushBranch(branch) {
|
|
43810
43871
|
try {
|
|
43811
|
-
await
|
|
43872
|
+
await execFileAsync2("git", ["push", "origin", branch], { cwd: this.opts.cwd });
|
|
43812
43873
|
} catch (e2) {
|
|
43813
43874
|
const detail = (e2.stderr ?? e2.message).split("\n")[0]?.trim();
|
|
43814
43875
|
this.log(`[finalizer] pre-PR push: ${detail}`);
|
|
@@ -43816,7 +43877,7 @@ ${BARO_COAUTHOR_TRAILER}`],
|
|
|
43816
43877
|
}
|
|
43817
43878
|
async openPr(args) {
|
|
43818
43879
|
try {
|
|
43819
|
-
const { stdout } = await
|
|
43880
|
+
const { stdout } = await execFileAsync2(
|
|
43820
43881
|
"gh",
|
|
43821
43882
|
[
|
|
43822
43883
|
"pr",
|
|
@@ -44813,9 +44874,10 @@ function tokenizeHints(prompt) {
|
|
|
44813
44874
|
|
|
44814
44875
|
// ../baro-orchestrator/src/participants/memory-librarian.ts
|
|
44815
44876
|
import { appendFileSync as appendFileSync2, mkdirSync as mkdirSync5 } from "fs";
|
|
44877
|
+
import { homedir as homedir2 } from "os";
|
|
44816
44878
|
import { join as join6 } from "path";
|
|
44817
44879
|
var DEBUG = process.env.BARO_DEBUG?.includes("memory") ?? false;
|
|
44818
|
-
var LOG_DIR = join6(
|
|
44880
|
+
var LOG_DIR = join6(homedir2(), ".baro", "runs");
|
|
44819
44881
|
var LOG_FILE = join6(LOG_DIR, `memory-${Date.now()}.log`);
|
|
44820
44882
|
try {
|
|
44821
44883
|
mkdirSync5(LOG_DIR, { recursive: true });
|
|
@@ -45192,7 +45254,7 @@ function extractPath2(item) {
|
|
|
45192
45254
|
import { setTimeout as setTimeoutPromise } from "timers/promises";
|
|
45193
45255
|
|
|
45194
45256
|
// ../baro-orchestrator/src/participants/codex-cli-participant.ts
|
|
45195
|
-
var
|
|
45257
|
+
var import_cross_spawn5 = __toESM(require_cross_spawn(), 1);
|
|
45196
45258
|
|
|
45197
45259
|
// ../baro-orchestrator/src/codex-stream-mapper.ts
|
|
45198
45260
|
function mapCodexEvent(agentId, event) {
|
|
@@ -45409,7 +45471,7 @@ var CodexCliParticipant = class _CodexCliParticipant extends BaseObserver {
|
|
|
45409
45471
|
const args = this.buildArgs();
|
|
45410
45472
|
let proc;
|
|
45411
45473
|
try {
|
|
45412
|
-
proc = (0,
|
|
45474
|
+
proc = (0, import_cross_spawn5.default)(this.options.codexBin, args, {
|
|
45413
45475
|
cwd: this.options.cwd,
|
|
45414
45476
|
stdio: ["ignore", "pipe", "pipe"]
|
|
45415
45477
|
});
|
|
@@ -46546,7 +46608,7 @@ function sleep3(ms) {
|
|
|
46546
46608
|
import { setTimeout as setTimeoutPromise2 } from "timers/promises";
|
|
46547
46609
|
|
|
46548
46610
|
// ../baro-orchestrator/src/participants/opencode-cli-participant.ts
|
|
46549
|
-
var
|
|
46611
|
+
var import_cross_spawn6 = __toESM(require_cross_spawn(), 1);
|
|
46550
46612
|
|
|
46551
46613
|
// ../baro-orchestrator/src/opencode-stream-mapper.ts
|
|
46552
46614
|
function eventTimestamp(event) {
|
|
@@ -46732,7 +46794,7 @@ var OpenCodeCliParticipant = class _OpenCodeCliParticipant extends BaseObserver
|
|
|
46732
46794
|
const args = this.buildArgs();
|
|
46733
46795
|
let proc;
|
|
46734
46796
|
try {
|
|
46735
|
-
proc = (0,
|
|
46797
|
+
proc = (0, import_cross_spawn6.default)(this.options.opencodeBin, args, {
|
|
46736
46798
|
cwd: this.options.cwd,
|
|
46737
46799
|
stdio: ["ignore", "pipe", "pipe"]
|
|
46738
46800
|
});
|
|
@@ -47107,7 +47169,7 @@ function raceWithTimeout2(p, ms, label) {
|
|
|
47107
47169
|
import { setTimeout as setTimeoutPromise3 } from "timers/promises";
|
|
47108
47170
|
|
|
47109
47171
|
// ../baro-orchestrator/src/participants/pi-cli-participant.ts
|
|
47110
|
-
var
|
|
47172
|
+
var import_cross_spawn7 = __toESM(require_cross_spawn(), 1);
|
|
47111
47173
|
|
|
47112
47174
|
// ../baro-orchestrator/src/pi-stream-mapper.ts
|
|
47113
47175
|
function eventTimestamp2(event) {
|
|
@@ -47421,7 +47483,7 @@ var PiCliParticipant = class _PiCliParticipant extends BaseObserver {
|
|
|
47421
47483
|
const args = this.buildArgs();
|
|
47422
47484
|
let proc;
|
|
47423
47485
|
try {
|
|
47424
|
-
proc = (0,
|
|
47486
|
+
proc = (0, import_cross_spawn7.default)(this.options.piBin, args, {
|
|
47425
47487
|
cwd: this.options.cwd,
|
|
47426
47488
|
stdio: ["ignore", "pipe", "pipe"]
|
|
47427
47489
|
});
|
|
@@ -47834,7 +47896,7 @@ function raceWithTimeout3(p, ms, label) {
|
|
|
47834
47896
|
import { setTimeout as setTimeoutPromise4 } from "timers/promises";
|
|
47835
47897
|
|
|
47836
47898
|
// ../baro-orchestrator/src/participants/claude-cli-participant.ts
|
|
47837
|
-
var
|
|
47899
|
+
var import_cross_spawn8 = __toESM(require_cross_spawn(), 1);
|
|
47838
47900
|
|
|
47839
47901
|
// ../baro-orchestrator/src/stream-json-mapper.ts
|
|
47840
47902
|
function mapClaudeEvent(agentId, event) {
|
|
@@ -48002,7 +48064,7 @@ var ClaudeCliParticipant = class _ClaudeCliParticipant extends BaseObserver {
|
|
|
48002
48064
|
const args = this.buildArgs();
|
|
48003
48065
|
let proc;
|
|
48004
48066
|
try {
|
|
48005
|
-
proc = (0,
|
|
48067
|
+
proc = (0, import_cross_spawn8.default)(this.options.claudeBin, args, {
|
|
48006
48068
|
cwd: this.options.cwd,
|
|
48007
48069
|
stdio: ["pipe", "pipe", "pipe"]
|
|
48008
48070
|
});
|
|
@@ -48601,8 +48663,6 @@ var StoryFactory = class extends BaseObserver {
|
|
|
48601
48663
|
};
|
|
48602
48664
|
|
|
48603
48665
|
// ../baro-orchestrator/src/participants/surgeon.ts
|
|
48604
|
-
import { execFile as execFile6 } from "child_process";
|
|
48605
|
-
import { promisify as promisify7 } from "util";
|
|
48606
48666
|
var CritiqueLog = class {
|
|
48607
48667
|
constructor(keep = 3) {
|
|
48608
48668
|
this.keep = keep;
|
|
@@ -48619,7 +48679,6 @@ var CritiqueLog = class {
|
|
|
48619
48679
|
return this.byStory.get(storyId) ?? [];
|
|
48620
48680
|
}
|
|
48621
48681
|
};
|
|
48622
|
-
var execFileAsync4 = promisify7(execFile6);
|
|
48623
48682
|
var SURGEON_SYSTEM_PROMPT = `You are the Surgeon \u2014 an autonomous planner that adapts a software-project
|
|
48624
48683
|
DAG when stories fail. Given:
|
|
48625
48684
|
1. A snapshot of the current PRD (project, story list with dependencies +
|
|
@@ -48751,7 +48810,7 @@ var Surgeon = class extends BaseObserver {
|
|
|
48751
48810
|
this.critiques.forStory(failure.storyId)
|
|
48752
48811
|
);
|
|
48753
48812
|
try {
|
|
48754
|
-
const { stdout } = await
|
|
48813
|
+
const { stdout } = await execFileCli(
|
|
48755
48814
|
this.opts.claudeBin,
|
|
48756
48815
|
[
|
|
48757
48816
|
"--print",
|
|
@@ -49482,7 +49541,7 @@ async function orchestrate(config) {
|
|
|
49482
49541
|
const useLibrarian = config.withLibrarian ?? true;
|
|
49483
49542
|
const useSentry = config.withSentry ?? true;
|
|
49484
49543
|
const useMemory = config.withMemory ?? true;
|
|
49485
|
-
const sessionsDir = join8(
|
|
49544
|
+
const sessionsDir = join8(homedir3(), ".baro", "sessions");
|
|
49486
49545
|
const memorySessionPath = useMemory ? join8(sessionsDir, runId, "memory") : void 0;
|
|
49487
49546
|
if (useMemory) {
|
|
49488
49547
|
try {
|