baro-ai 0.74.6 → 0.74.8
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/bin/baro +27 -9
- package/dist/runner.mjs +9 -2
- package/dist/runner.mjs.map +1 -1
- package/package.json +1 -1
- package/bin/baro.cmd +0 -8
package/bin/baro
CHANGED
|
@@ -1,9 +1,27 @@
|
|
|
1
|
-
#!/usr/bin/env
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Node launcher, not a shell script: npm generates its shims from this bin's
|
|
3
|
+
// shebang, and a #!/bin/sh bin makes the Windows shim invoke sh.exe (absent on
|
|
4
|
+
// Windows). A node shebang yields correct cmd/ps1/sh shims on every platform.
|
|
5
|
+
import { spawnSync } from "node:child_process"
|
|
6
|
+
import { existsSync } from "node:fs"
|
|
7
|
+
import { homedir } from "node:os"
|
|
8
|
+
import path from "node:path"
|
|
9
|
+
|
|
10
|
+
const bin = path.join(
|
|
11
|
+
homedir(),
|
|
12
|
+
".baro",
|
|
13
|
+
"bin",
|
|
14
|
+
process.platform === "win32" ? "baro.exe" : "baro",
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
if (!existsSync(bin)) {
|
|
18
|
+
console.error("baro: binary not installed. Run: npm rebuild baro-ai")
|
|
19
|
+
process.exit(1)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const result = spawnSync(bin, process.argv.slice(2), { stdio: "inherit" })
|
|
23
|
+
if (result.error) {
|
|
24
|
+
console.error(`baro: failed to launch binary: ${result.error.message}`)
|
|
25
|
+
process.exit(1)
|
|
26
|
+
}
|
|
27
|
+
process.exit(result.signal ? 1 : (result.status ?? 0))
|
package/dist/runner.mjs
CHANGED
|
@@ -3755,7 +3755,7 @@ var url = process.env.CONTROL_URL ?? "wss://api.baro.jigjoy.ai";
|
|
|
3755
3755
|
var token = process.env.RUNNER_TOKEN;
|
|
3756
3756
|
var httpBase = url.replace(/^ws/, "http").replace(/\/+$/, "");
|
|
3757
3757
|
var credsPath = join(homedir(), ".baro", "credentials.json");
|
|
3758
|
-
var VERSION = "0.74.
|
|
3758
|
+
var VERSION = "0.74.8";
|
|
3759
3759
|
var updateCachePath = join(homedir(), ".baro", "update-check.json");
|
|
3760
3760
|
async function getLatest(force = false) {
|
|
3761
3761
|
if (!force) {
|
|
@@ -4053,7 +4053,7 @@ async function runGoal(d, emit, signal) {
|
|
|
4053
4053
|
const outcome = await new Promise((resolve) => {
|
|
4054
4054
|
const child = spawn(
|
|
4055
4055
|
baroBin,
|
|
4056
|
-
["--headless", d.goal, "--cwd", cwd, "--llm", d.route?.backend ?? "claude", "--parallel", String(d.parallel), "--timeout", String(d.timeoutSecs), ...d.quick ? ["--quick"] : [], ...d.followUp ? ["--continue"] : []],
|
|
4056
|
+
["--headless", d.goal, "--cwd", cwd, "--llm", d.route?.backend ?? "claude", "--parallel", String(d.parallel), "--timeout", String(d.timeoutSecs), ...d.quick ? ["--quick"] : [], ...d.confirmMode ? ["--confirm-mode"] : [], ...d.followUp ? ["--continue"] : []],
|
|
4057
4057
|
// stdin is piped: baro --headless forwards JSON command lines
|
|
4058
4058
|
// (agent_message) into the orchestrator's stdin lane.
|
|
4059
4059
|
{ cwd, env, stdio: ["pipe", "pipe", "pipe"] }
|
|
@@ -4189,6 +4189,13 @@ function handleMessage(m) {
|
|
|
4189
4189
|
const stdin = activeChild?.stdin;
|
|
4190
4190
|
if (stdin && stdin.writable && !stdin.destroyed) {
|
|
4191
4191
|
stdin.write(`${JSON.stringify({ type: "agent_message", id: storyId, text })}
|
|
4192
|
+
`);
|
|
4193
|
+
}
|
|
4194
|
+
} else if (m.t === "confirm_mode") {
|
|
4195
|
+
const { mode } = m;
|
|
4196
|
+
const stdin = activeChild?.stdin;
|
|
4197
|
+
if (stdin && stdin.writable && !stdin.destroyed) {
|
|
4198
|
+
stdin.write(`${JSON.stringify({ kind: "confirm_mode", mode })}
|
|
4192
4199
|
`);
|
|
4193
4200
|
}
|
|
4194
4201
|
} else if (m.t === "dispatch_run") {
|