Skip to content

Commit f46bc00

Browse files
chore(headless): bump openwrk to 0.1.9 (anomalyco#380)
1 parent b4b731f commit f46bc00

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

‎packages/headless/README.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ openwrk start --workspace /path/to/workspace --approval auto
1414
`openwrk` bundles and validates exact versions of `openwork-server` + `owpenbot` using a
1515
SHA-256 manifest. It will refuse to start if the bundled binaries are missing or tampered with.
1616

17+
Owpenbot is optional. If it exits, `openwrk` continues running unless you pass
18+
`--owpenbot-required` or set `OPENWRK_OWPENBOT_REQUIRED=1`.
19+
1720
For development overrides only, set `OPENWRK_ALLOW_EXTERNAL=1` or pass `--allow-external` to use
1821
locally installed `openwork-server` or `owpenbot` binaries.
1922

‎packages/headless/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openwrk",
3-
"version": "0.1.8",
3+
"version": "0.1.9",
44
"description": "Headless OpenWork host orchestrator for OpenCode + OpenWork server + Owpenbot",
55
"type": "module",
66
"bin": {

‎packages/headless/src/cli.ts‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,6 +801,7 @@ function printHelp(): void {
801801
" --openwork-server-bin <p> Path to openwork-server binary (requires --allow-external)",
802802
" --owpenbot-bin <path> Path to owpenbot binary (requires --allow-external)",
803803
" --no-owpenbot Disable owpenbot sidecar",
804+
" --owpenbot-required Exit if owpenbot stops",
804805
" --allow-external Allow external sidecar binaries (dev only, required for custom bins)",
805806
" --check Run health checks then exit",
806807
" --check-events Verify SSE events during check",
@@ -1857,6 +1858,7 @@ async function runStart(args: ParsedArgs) {
18571858
const explicitOpenworkServerBin = readFlag(args.flags, "openwork-server-bin") ?? process.env.OPENWORK_SERVER_BIN;
18581859
const explicitOwpenbotBin = readFlag(args.flags, "owpenbot-bin") ?? process.env.OWPENBOT_BIN;
18591860
const owpenbotEnabled = readBool(args.flags, "owpenbot", true);
1861+
const owpenbotRequired = readBool(args.flags, "owpenbot-required", false, "OPENWRK_OWPENBOT_REQUIRED");
18601862
const openworkServerBinary = await resolveOpenworkServerBin({
18611863
explicit: explicitOpenworkServerBin,
18621864
manifest,
@@ -1971,7 +1973,14 @@ async function runStart(args: ParsedArgs) {
19711973
opencodePassword,
19721974
});
19731975
children.push({ name: "owpenbot", child: owpenbotChild });
1974-
owpenbotChild.on("exit", (code, signal) => handleExit("owpenbot", code, signal));
1976+
owpenbotChild.on("exit", (code, signal) => {
1977+
if (owpenbotRequired) {
1978+
handleExit("owpenbot", code, signal);
1979+
return;
1980+
}
1981+
const reason = code !== null ? `code ${code}` : signal ? `signal ${signal}` : "unknown";
1982+
console.warn(`[owpenbot] exited (${reason}). Continuing without owpenbot.`);
1983+
});
19751984
owpenbotChild.on("error", (error) => handleSpawnError("owpenbot", error));
19761985
}
19771986

0 commit comments

Comments
 (0)