@oalo-ai/cli 0.2.0 → 0.3.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/man/oalo.1 +88 -1
- package/package.json +5 -3
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/skills/oalo/SKILL.md +16 -1
- package/src/commands/coord-bin.js +103 -0
- package/src/commands/migrate.js +5 -2
- package/src/coord-release.json +25 -0
- package/src/help.js +32 -16
- package/src/index.js +14 -6
package/man/oalo.1
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.TH OALO 1 "" "oalo 0.
|
|
1
|
+
.TH OALO 1 "" "oalo 0.3.0" "OALO CLI"
|
|
2
2
|
.SH NAME
|
|
3
3
|
oalo \- wire a local app into your Oalo workspace
|
|
4
4
|
.SH SYNOPSIS
|
|
@@ -1359,6 +1359,93 @@ Reads OALO_URL and OALO_CLI_TOKEN, or falls back to what \fBoalo link \-\-cli\-t
|
|
|
1359
1359
|
Needs a CLI token.
|
|
1360
1360
|
.PP
|
|
1361
1361
|
Exit codes: 0 stopped cleanly; 1 no workspace or CLI token.
|
|
1362
|
+
.SS coord
|
|
1363
|
+
Several agents on one codebase: a shared task board, a worktree per task, a merge queue. First run: \fBoalo coord install\fR.
|
|
1364
|
+
.PP
|
|
1365
|
+
\fBoalo coord install [\-\-force] [\-\-json]\fR
|
|
1366
|
+
.br
|
|
1367
|
+
\fBoalo coord init [\-\-main <branch>] [\-\-test\-cmd <cmd>] [\-\-merge auto|manual] [\-\-signal\-review]\fR
|
|
1368
|
+
.br
|
|
1369
|
+
\fBoalo coord hooks install [\-\-claude] [\-\-opencode]\fR
|
|
1370
|
+
.br
|
|
1371
|
+
\fBoalo coord mcp\fR
|
|
1372
|
+
.br
|
|
1373
|
+
\fBoalo coord board [\-\-json]\fR
|
|
1374
|
+
.br
|
|
1375
|
+
\fBoalo coord events [\-\-follow] [\-\-since <id>] [\-\-json]\fR
|
|
1376
|
+
.br
|
|
1377
|
+
\fBoalo coord files [\-\-json] [\-\-main <branch>]\fR
|
|
1378
|
+
.br
|
|
1379
|
+
\fBoalo coord view [\-\-port <n>] [\-\-main <branch>] [\-\-no\-open]\fR
|
|
1380
|
+
.br
|
|
1381
|
+
\fBoalo coord claim <task>\fR
|
|
1382
|
+
.br
|
|
1383
|
+
\fBoalo coord merge [\-\-all]\fR
|
|
1384
|
+
.br
|
|
1385
|
+
\fBoalo coord approve plan [\-\-yes] | merge <task> | signal <task> <milestone> | proposal <id> [\-\-note <text>]\fR
|
|
1386
|
+
.br
|
|
1387
|
+
\fBoalo coord reject proposal <id> [\-\-note <text>]\fR
|
|
1388
|
+
.br
|
|
1389
|
+
\fBoalo coord hook <pre\-tool|stop|subagent\-stop|check\-write|check\-stop|check\-command>\fR
|
|
1390
|
+
.br
|
|
1391
|
+
.TP
|
|
1392
|
+
\fB\-\-force\fR
|
|
1393
|
+
install: download again even if this version is installed.
|
|
1394
|
+
.TP
|
|
1395
|
+
\fB\-\-main <branch>\fR
|
|
1396
|
+
init: branch the merge queue integrates into. Default: current branch.
|
|
1397
|
+
.TP
|
|
1398
|
+
\fB\-\-test\-cmd <cmd>\fR
|
|
1399
|
+
init: merge\-gate test command. Default: detected (mix test, npm test, ...).
|
|
1400
|
+
.TP
|
|
1401
|
+
\fB\-\-merge auto|manual\fR
|
|
1402
|
+
init: manual holds each merge for \fBapprove merge\fR.
|
|
1403
|
+
.TP
|
|
1404
|
+
\fB\-\-signal\-review\fR
|
|
1405
|
+
init: milestones unblock dependents only after \fBapprove signal\fR.
|
|
1406
|
+
.TP
|
|
1407
|
+
\fB\-\-yes\fR
|
|
1408
|
+
approve plan: skip the confirmation after the plan is shown.
|
|
1409
|
+
.TP
|
|
1410
|
+
\fB\-\-note <text>\fR
|
|
1411
|
+
approve/reject proposal: a note the worker sees with the decision.
|
|
1412
|
+
.TP
|
|
1413
|
+
\fB\-\-json\fR
|
|
1414
|
+
install/board/events/files: machine\-readable output.
|
|
1415
|
+
.TP
|
|
1416
|
+
\fB\-\-follow\fR
|
|
1417
|
+
events: keep streaming.
|
|
1418
|
+
.TP
|
|
1419
|
+
\fB\-\-all\fR
|
|
1420
|
+
merge: keep merging until the queue is idle or blocked.
|
|
1421
|
+
.IP \(bu 2
|
|
1422
|
+
Coord lets several coding agent sessions (Claude Code, OpenCode, Codex, any MCP client) work on one git repo at once. It runs on your machine; the board is .oalo/coord.db in the repo. No Oalo workspace or sign\-in is needed. Full guide: https://oalo.ai/docs/several\-agents\-one\-repo (or \fBoalo docs several\-agents\-one\-repo\fR when signed in).
|
|
1423
|
+
.IP \(bu 2
|
|
1424
|
+
Setup, once per machine: \fBoalo coord install\fR downloads coord for it (about 25 MB on macOS, 37 MB on Linux, checked against this package's checksum). Once per repo: \fBoalo coord init\fR, then \fBoalo coord hooks install\fR, then commit .oalo/coord.json, .gitignore, .claude/settings.json, .mcp.json, opencode.json and .opencode/. .claude/settings.local.json holds this machine's worktree folder and stays out of git.
|
|
1425
|
+
.IP \(bu 2
|
|
1426
|
+
Coord never starts agents. The person opens the sessions, or a manager starts workers as its harness's own subagents. Every session opened in the repo, or in a task's worktree, gets the board's tools through the \fBoalo\-coord\fR MCP server that hooks install registers; the server finds the one board from any worktree. The board also gives each session a short orientation; the person tells it its role. Manager: "You're the oalo coord manager for this repo. Call manager_guide, then plan: <goal>". Worker: "You're an oalo coord worker. Call task_next and follow the brief."
|
|
1427
|
+
.IP \(bu 2
|
|
1428
|
+
Manager: reads manager_guide (the full playbook), then drafts tasks with task_create (title, spec, acceptance criteria, writes: the globs it may change, provides: milestones it will signal, depends_on), then calls plan_submit. Nothing runs until the person approves. Then it handles the inbox (inbox, ack, answer, decide), reviews reports (task_detail, task_reopen) and merges (merge_next). Other tools: task_update, task_cancel, board, wait.
|
|
1429
|
+
.IP \(bu 2
|
|
1430
|
+
Worker: calls task_next, which returns a claim token, its own git worktree and a brief with the spec and how to finish. It works only inside that worktree and its write set, commits, calls signal as soon as a milestone others wait on is committed, and ends with task_done or task_fail and a report. Other tools: release (paths it is finished with), signal_amend, lease_acquire / lease_release (a port, the dev database, migrations), ask, propose_change, report_blocked, notify, wait. Every worker call passes its claim.
|
|
1431
|
+
.IP \(bu 2
|
|
1432
|
+
Messages need no polling: each worker reply carries its notices (answers, decisions, changed dependencies) and who is waiting on it. In Claude Code and OpenCode, a worker that stops while holding a task is sent back to finish it (up to three times) and gets answers to its questions. In Claude Code the manager's stop also waits for its inbox while tasks are running; in other harnesses the manager calls wait.
|
|
1433
|
+
.IP \(bu 2
|
|
1434
|
+
Only a person approves, in their own terminal: \fBapprove plan\fR (shows the design, the tasks and their files, then asks to type yes; it covers only the drafts sent with plan_submit, unchanged since), \fBapprove merge\fR, \fBapprove signal\fR, \fBapprove proposal\fR, \fBreject proposal\fR. They refuse from an agent's shell. An agent tells the person what is waiting and the command to run.
|
|
1435
|
+
.IP \(bu 2
|
|
1436
|
+
Scheduling: a task starts when every milestone it depends on is signalled and no running task's write set overlaps its own. A worker that signals a milestone mid\-task lets its dependents start from that commit right away.
|
|
1437
|
+
.IP \(bu 2
|
|
1438
|
+
Merge queue (merge_next, \fBoalo coord merge\fR): one run at a time. A task merges with a merge commit after every task it builds on has merged, and only if the project's test command passes, then the task's own test_cmd if it has one. A conflict or failing test sends it back to a worker with the output. A branch that changes .oalo/coord.json, .oalo/setup or the hook and MCP config waits for \fBapprove merge\fR.
|
|
1439
|
+
.IP \(bu 2
|
|
1440
|
+
Rework: task_reopen, a merge conflict or a failing merge test sends a task back, and they count together: first held for the same worker for claim_ttl_s, then any worker; the third time it stops as needs_human until the manager sets it back to ready. A worker silent for claim_ttl_s (15 minutes) loses its claim, the manager gets its commits in a report, and the next worker resumes the same worktree.
|
|
1441
|
+
.IP \(bu 2
|
|
1442
|
+
Settings in .oalo/coord.json (a person edits them): main_branch, test_cmd, merge (auto or manual), signal_review, claim_ttl_s, port_base, port_span. Task worktrees live in ~/.oalo/worktrees/<repo>\-<hash>/<task> (OALO_HOME moves them). An executable .oalo/setup runs in each new worktree with OALO_TASK_ID, OALO_WORKTREE, OALO_PROJECT_ROOT, OALO_PORT_BASE, OALO_PORT_SPAN and OALO_DB_NAME set.
|
|
1443
|
+
.IP \(bu 2
|
|
1444
|
+
The hooks block edits outside a worker's worktree and write set, and edits to coord's own files. Shell writes (sed \-i, redirects) aren't intercepted; the merge queue still catches their damage. Harnesses without hooks rely on the merge queue alone.
|
|
1445
|
+
.IP \(bu 2
|
|
1446
|
+
macOS and Linux only.
|
|
1447
|
+
.PP
|
|
1448
|
+
Exit codes: 0 ok; 1 operation refused or failed (message on stderr); 2 bad arguments; 3 no board here; run `oalo coord init`; 4 coord isn't installed on this machine; run `oalo coord install`.
|
|
1362
1449
|
.SH BOT SETTINGS
|
|
1363
1450
|
Read with \fBoalo bots settings <bot>\fR, changed with \fBoalo bots settings <bot> set key=value\fR, explained with \fBoalo bots settings \-\-explain <key>\fR. A change to a published bot needs \-\-yes.
|
|
1364
1451
|
.SS knowledge
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oalo-ai/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Wire a local app into your OALO workspace: link a token, generate typed bindings, and serve the build surface over MCP.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -24,9 +24,11 @@
|
|
|
24
24
|
"scripts": {
|
|
25
25
|
"smoke": "node test/smoke.mjs",
|
|
26
26
|
"smoke:mcp": "node test/mcp-smoke.mjs",
|
|
27
|
-
"test:coord": "bun test test/coord.test.ts",
|
|
27
|
+
"test:coord": "bun test test/coord.test.ts test/coord-files.test.ts test/coord-hooks.test.ts test/coord-fixes.test.ts",
|
|
28
28
|
"test:unit": "node --test test/*.test.mjs",
|
|
29
|
-
"man": "node scripts/man.mjs"
|
|
29
|
+
"man": "node scripts/man.mjs",
|
|
30
|
+
"coord:build": "node scripts/coord_build.mjs",
|
|
31
|
+
"prepublishOnly": "node scripts/coord_check.mjs"
|
|
30
32
|
},
|
|
31
33
|
"publishConfig": {
|
|
32
34
|
"access": "public"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oalo",
|
|
3
3
|
"description": "Work on an Oalo workspace from Claude Code: edit chat flows, loops and code tools, lint and push them safely, and run test conversations with a bot.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.3.0",
|
|
5
5
|
"author": { "name": "Oalo" },
|
|
6
6
|
"mcpServers": {
|
|
7
7
|
"oalo": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oalo
|
|
3
|
-
description: Build and change an Oalo workspace (the person's Oalo Base) from the terminal with the oalo CLI or its MCP server: chat flows, loops (automations), code tools, bots and what they know, data models and rows, hosting a repo and its environment variables, and what an app gets from Oalo (its own token, events into workflows, workflows as functions, its endpoints as bot tools, a chat widget, member sign-in and sync). Use when editing a flow, loop or tool, testing how a bot answers, moving data in or out of Oalo, bringing or deploying an app,
|
|
3
|
+
description: Build and change an Oalo workspace (the person's Oalo Base) from the terminal with the oalo CLI or its MCP server: chat flows, loops (automations), code tools, bots and what they know, data models and rows, hosting a repo and its environment variables, and what an app gets from Oalo (its own token, events into workflows, workflows as functions, its endpoints as bot tools, a chat widget, member sign-in and sync). Use when editing a flow, loop or tool, testing how a bot answers, moving data in or out of Oalo, bringing or deploying an app, wiring an app's own code to Oalo, or splitting work across several agent sessions on one repo.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Working on an Oalo workspace
|
|
@@ -415,6 +415,21 @@ oalo channels # WhatsApp, Instagram, emai
|
|
|
415
415
|
but the bot's data tools leave it out, and it can't be embedded. Don't
|
|
416
416
|
vectorize it.
|
|
417
417
|
|
|
418
|
+
## Several agents on one repo
|
|
419
|
+
|
|
420
|
+
When the person wants work split across several agent sessions on one repo at
|
|
421
|
+
once, use `oalo coord`: a shared task board, a git worktree per task and a
|
|
422
|
+
merge queue that runs the tests. It needs no Oalo workspace.
|
|
423
|
+
|
|
424
|
+
1. **Set it up once:** `oalo coord install` (once per machine), then in the
|
|
425
|
+
repo `oalo coord init` and `oalo coord hooks install`, and commit what they
|
|
426
|
+
write. Each session then has the board's tools (MCP server `oalo-coord`).
|
|
427
|
+
2. **The person approves, never you.** The manager drafts tasks and calls
|
|
428
|
+
`plan_submit`; the person runs `oalo coord approve plan` in their own
|
|
429
|
+
terminal. Never run `oalo coord approve` or `reject` yourself: say what is
|
|
430
|
+
waiting and give them the command.
|
|
431
|
+
3. `oalo help coord` has every command.
|
|
432
|
+
|
|
418
433
|
## Reading the docs
|
|
419
434
|
|
|
420
435
|
Before building on a feature you don't know, read Oalo's own docs. They come
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `oalo coord` from the npm package. Coord itself is a Bun-compiled binary
|
|
3
|
+
* (it needs bun:sqlite); `oalo coord install` downloads the build for this
|
|
4
|
+
* machine, checks it against the SHA-256 shipped in this package, and every
|
|
5
|
+
* other `oalo coord ...` runs it.
|
|
6
|
+
*/
|
|
7
|
+
import { spawn, spawnSync } from "node:child_process";
|
|
8
|
+
import { createHash } from "node:crypto";
|
|
9
|
+
import { chmodSync, existsSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
10
|
+
import { homedir } from "node:os";
|
|
11
|
+
import { join } from "node:path";
|
|
12
|
+
import { gunzipSync } from "node:zlib";
|
|
13
|
+
|
|
14
|
+
/** Where the builds are published; OALO_COORD_DOWNLOAD_URL overrides it. */
|
|
15
|
+
const DOWNLOAD_BASE = "https://oalo.ai/dl/coord";
|
|
16
|
+
/** Exit code when the binary isn't installed; `oalo help coord --json` lists it. */
|
|
17
|
+
export const NOT_INSTALLED = 4;
|
|
18
|
+
|
|
19
|
+
function release() {
|
|
20
|
+
try {
|
|
21
|
+
return JSON.parse(readFileSync(new URL("../coord-release.json", import.meta.url), "utf8"));
|
|
22
|
+
} catch {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function platform() {
|
|
28
|
+
const os = { darwin: "darwin", linux: "linux" }[process.platform];
|
|
29
|
+
const arch = { arm64: "arm64", x64: "x64" }[process.arch];
|
|
30
|
+
return os && arch ? `${os}-${arch}` : null;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function coordBinary(version) {
|
|
34
|
+
return join(process.env.OALO_HOME || homedir(), ".oalo", "bin", `oalo-coord-${version}`);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export async function coordInstall(flags) {
|
|
38
|
+
const rel = release();
|
|
39
|
+
const target = platform();
|
|
40
|
+
const say = (obj, text) => (flags.json ? console.log(JSON.stringify(obj)) : console.log(text));
|
|
41
|
+
if (!rel) {
|
|
42
|
+
console.error("oalo coord install: this oalo has no coord build listed; upgrade with `npm install -g @oalo-ai/cli`");
|
|
43
|
+
process.exit(1);
|
|
44
|
+
}
|
|
45
|
+
const entry = target && rel.targets[target];
|
|
46
|
+
if (!entry) {
|
|
47
|
+
console.error(`oalo coord install: no build for ${process.platform}-${process.arch} (macOS and Linux, arm64 and x64, are supported)`);
|
|
48
|
+
process.exit(1);
|
|
49
|
+
}
|
|
50
|
+
const bin = coordBinary(rel.version);
|
|
51
|
+
if (existsSync(bin) && !flags.force) {
|
|
52
|
+
return say({ installed: true, version: rel.version, path: bin, already: true }, `oalo coord ${rel.version} is already installed (${bin})`);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const url = `${process.env.OALO_COORD_DOWNLOAD_URL || DOWNLOAD_BASE}/${rel.version}/${entry.file}`;
|
|
56
|
+
if (!flags.json) console.error(`downloading ${url} (${(entry.bytes / 1e6).toFixed(0)} MB)`);
|
|
57
|
+
let res;
|
|
58
|
+
try {
|
|
59
|
+
res = await fetch(url);
|
|
60
|
+
} catch (err) {
|
|
61
|
+
console.error(`oalo coord install: download failed: ${err.message}`);
|
|
62
|
+
process.exit(1);
|
|
63
|
+
}
|
|
64
|
+
if (!res.ok) {
|
|
65
|
+
console.error(`oalo coord install: download failed: HTTP ${res.status} for ${url}`);
|
|
66
|
+
process.exit(1);
|
|
67
|
+
}
|
|
68
|
+
const gz = Buffer.from(await res.arrayBuffer());
|
|
69
|
+
const sha = createHash("sha256").update(gz).digest("hex");
|
|
70
|
+
if (sha !== entry.sha256) {
|
|
71
|
+
console.error(`oalo coord install: the download doesn't match this package's checksum (got ${sha}, want ${entry.sha256}); nothing was installed`);
|
|
72
|
+
process.exit(1);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
mkdirSync(join(bin, ".."), { recursive: true });
|
|
76
|
+
const tmp = `${bin}.part`;
|
|
77
|
+
writeFileSync(tmp, gunzipSync(gz));
|
|
78
|
+
chmodSync(tmp, 0o755);
|
|
79
|
+
// Apple Silicon runs only signed code; Bun signs its builds ad hoc, and this
|
|
80
|
+
// re-applies that in case a build came from elsewhere.
|
|
81
|
+
if (process.platform === "darwin") spawnSync("codesign", ["--force", "--sign", "-", tmp], { stdio: "ignore" });
|
|
82
|
+
const check = spawnSync(tmp, ["--version"], { encoding: "utf8" });
|
|
83
|
+
if (check.status !== 0 || check.stdout.trim() !== rel.version) {
|
|
84
|
+
rmSync(tmp, { force: true });
|
|
85
|
+
console.error(`oalo coord install: the downloaded build didn't start (${(check.stderr || check.error?.message || "").trim()}); nothing was installed`);
|
|
86
|
+
process.exit(1);
|
|
87
|
+
}
|
|
88
|
+
renameSync(tmp, bin);
|
|
89
|
+
say({ installed: true, version: rel.version, path: bin }, `installed oalo coord ${rel.version} (${bin})\nNext, in your project: oalo coord init`);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/** Run an installed coord with these arguments; exits with its exit code. */
|
|
93
|
+
export function coordRun(argv) {
|
|
94
|
+
const rel = release();
|
|
95
|
+
const bin = rel && coordBinary(rel.version);
|
|
96
|
+
if (!bin || !existsSync(bin)) {
|
|
97
|
+
console.error("oalo coord isn't installed on this machine yet. Run `oalo coord install` (a one-time download, 25 to 37 MB), then try again.");
|
|
98
|
+
process.exit(NOT_INSTALLED);
|
|
99
|
+
}
|
|
100
|
+
const child = spawn(bin, argv, { stdio: "inherit" });
|
|
101
|
+
for (const sig of ["SIGINT", "SIGTERM", "SIGHUP"]) process.on(sig, () => child.kill(sig));
|
|
102
|
+
child.on("exit", (code, signal) => process.exit(code ?? (signal ? 1 : 0)));
|
|
103
|
+
}
|
package/src/commands/migrate.js
CHANGED
|
@@ -285,10 +285,13 @@ function printNeeds(plan) {
|
|
|
285
285
|
function printNext(plan, app, platform, applied) {
|
|
286
286
|
console.log("\nNext");
|
|
287
287
|
const steps = [];
|
|
288
|
-
const files =
|
|
288
|
+
const files = [
|
|
289
|
+
...(plan.procfile.action === "write" ? ["Procfile"] : []),
|
|
290
|
+
...(["write", "merge"].includes(plan.manifest.action) ? [".oalo/app.json"] : []),
|
|
291
|
+
];
|
|
289
292
|
const later = !app && plan.vars.set.length;
|
|
290
293
|
if (!applied) steps.push(`oalo migrate ${platform} --apply${later ? " (writes the files; the variables wait until the app exists)" : ""}`);
|
|
291
|
-
if (files) steps.push(
|
|
294
|
+
if (files.length) steps.push(`git add ${files.join(" ")} && git commit -m "Move to Oalo"`);
|
|
292
295
|
if (!app) steps.push("oalo deploy --new");
|
|
293
296
|
if (later) steps.push(`oalo migrate ${platform} --apply (now it sets the variables)`);
|
|
294
297
|
if (plan.vars.missing.length) steps.push("oalo env set NAME --secret --env prod (for each one still needed)");
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.3.0",
|
|
3
|
+
"targets": {
|
|
4
|
+
"darwin-arm64": {
|
|
5
|
+
"file": "oalo-coord-darwin-arm64.gz",
|
|
6
|
+
"sha256": "28713e014cec77f4cadbd76a3cad033a8263d51b7cd20b1f063f8b70cf32a8e6",
|
|
7
|
+
"bytes": 24850777
|
|
8
|
+
},
|
|
9
|
+
"darwin-x64": {
|
|
10
|
+
"file": "oalo-coord-darwin-x64.gz",
|
|
11
|
+
"sha256": "9139ca0b2733e1a560f244732846d9d4e9bc1035c76a03096c4f5b906206b796",
|
|
12
|
+
"bytes": 26989487
|
|
13
|
+
},
|
|
14
|
+
"linux-x64": {
|
|
15
|
+
"file": "oalo-coord-linux-x64.gz",
|
|
16
|
+
"sha256": "dca7ea4f4ea550cb25022d69dd4917268184731a8325d92d234c960ae3f048e5",
|
|
17
|
+
"bytes": 36881871
|
|
18
|
+
},
|
|
19
|
+
"linux-arm64": {
|
|
20
|
+
"file": "oalo-coord-linux-arm64.gz",
|
|
21
|
+
"sha256": "2cd721a2c1a987aedf18a99cbe62fe9379173a887ea72f5763a284353b5013c0",
|
|
22
|
+
"bytes": 37122672
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
package/src/help.js
CHANGED
|
@@ -858,40 +858,56 @@ export const COMMANDS = [
|
|
|
858
858
|
},
|
|
859
859
|
{
|
|
860
860
|
name: "coord",
|
|
861
|
-
|
|
862
|
-
// it's left out of help, the man page and help --json until it ships as a
|
|
863
|
-
// binary. `bun src/index.js coord` still runs it in development.
|
|
864
|
-
hidden: true,
|
|
865
|
-
summary: "Coordinate several agents on one codebase: task board, worktrees, merge queue.",
|
|
861
|
+
summary: "Several agents on one codebase: a shared task board, a worktree per task, a merge queue. First run: `oalo coord install`.",
|
|
866
862
|
usage: [
|
|
863
|
+
"oalo coord install [--force] [--json]",
|
|
867
864
|
"oalo coord init [--main <branch>] [--test-cmd <cmd>] [--merge auto|manual] [--signal-review]",
|
|
865
|
+
"oalo coord hooks install [--claude] [--opencode]",
|
|
868
866
|
"oalo coord mcp",
|
|
869
867
|
"oalo coord board [--json]",
|
|
870
868
|
"oalo coord events [--follow] [--since <id>] [--json]",
|
|
869
|
+
"oalo coord files [--json] [--main <branch>]",
|
|
870
|
+
"oalo coord view [--port <n>] [--main <branch>] [--no-open]",
|
|
871
871
|
"oalo coord claim <task>",
|
|
872
872
|
"oalo coord merge [--all]",
|
|
873
|
-
"oalo coord approve plan | merge <task> | signal <task> <milestone> | proposal <id>",
|
|
874
|
-
"oalo coord reject proposal <id>",
|
|
875
|
-
"oalo coord
|
|
876
|
-
"oalo coord hook <pre-tool|stop|subagent-stop|check-write|check-stop>",
|
|
873
|
+
"oalo coord approve plan [--yes] | merge <task> | signal <task> <milestone> | proposal <id> [--note <text>]",
|
|
874
|
+
"oalo coord reject proposal <id> [--note <text>]",
|
|
875
|
+
"oalo coord hook <pre-tool|stop|subagent-stop|check-write|check-stop|check-command>",
|
|
877
876
|
],
|
|
878
877
|
flags: [
|
|
878
|
+
{ flag: "--force", desc: "install: download again even if this version is installed." },
|
|
879
879
|
{ flag: "--main <branch>", desc: "init: branch the merge queue integrates into. Default: current branch." },
|
|
880
880
|
{ flag: "--test-cmd <cmd>", desc: "init: merge-gate test command. Default: detected (mix test, npm test, ...)." },
|
|
881
881
|
{ flag: "--merge auto|manual", desc: "init: manual holds each merge for `approve merge`." },
|
|
882
882
|
{ flag: "--signal-review", desc: "init: milestones unblock dependents only after `approve signal`." },
|
|
883
|
-
{ flag: "--
|
|
883
|
+
{ flag: "--yes", desc: "approve plan: skip the confirmation after the plan is shown." },
|
|
884
|
+
{ flag: "--note <text>", desc: "approve/reject proposal: a note the worker sees with the decision." },
|
|
885
|
+
{ flag: "--json", desc: "install/board/events/files: machine-readable output." },
|
|
884
886
|
{ flag: "--follow", desc: "events: keep streaming." },
|
|
885
887
|
{ flag: "--all", desc: "merge: keep merging until the queue is idle or blocked." },
|
|
886
888
|
],
|
|
887
889
|
notes: [
|
|
888
|
-
"
|
|
889
|
-
"
|
|
890
|
-
"
|
|
891
|
-
"
|
|
892
|
-
"
|
|
890
|
+
"Coord lets several coding agent sessions (Claude Code, OpenCode, Codex, any MCP client) work on one git repo at once. It runs on your machine; the board is .oalo/coord.db in the repo. No Oalo workspace or sign-in is needed. Full guide: https://oalo.ai/docs/several-agents-one-repo (or `oalo docs several-agents-one-repo` when signed in).",
|
|
891
|
+
"Setup, once per machine: `oalo coord install` downloads coord for it (about 25 MB on macOS, 37 MB on Linux, checked against this package's checksum). Once per repo: `oalo coord init`, then `oalo coord hooks install`, then commit .oalo/coord.json, .gitignore, .claude/settings.json, .mcp.json, opencode.json and .opencode/. .claude/settings.local.json holds this machine's worktree folder and stays out of git.",
|
|
892
|
+
"Coord never starts agents. The person opens the sessions, or a manager starts workers as its harness's own subagents. Every session opened in the repo, or in a task's worktree, gets the board's tools through the `oalo-coord` MCP server that hooks install registers; the server finds the one board from any worktree. The board also gives each session a short orientation; the person tells it its role. Manager: \"You're the oalo coord manager for this repo. Call manager_guide, then plan: <goal>\". Worker: \"You're an oalo coord worker. Call task_next and follow the brief.\"",
|
|
893
|
+
"Manager: reads manager_guide (the full playbook), then drafts tasks with task_create (title, spec, acceptance criteria, writes: the globs it may change, provides: milestones it will signal, depends_on), then calls plan_submit. Nothing runs until the person approves. Then it handles the inbox (inbox, ack, answer, decide), reviews reports (task_detail, task_reopen) and merges (merge_next). Other tools: task_update, task_cancel, board, wait.",
|
|
894
|
+
"Worker: calls task_next, which returns a claim token, its own git worktree and a brief with the spec and how to finish. It works only inside that worktree and its write set, commits, calls signal as soon as a milestone others wait on is committed, and ends with task_done or task_fail and a report. Other tools: release (paths it is finished with), signal_amend, lease_acquire / lease_release (a port, the dev database, migrations), ask, propose_change, report_blocked, notify, wait. Every worker call passes its claim.",
|
|
895
|
+
"Messages need no polling: each worker reply carries its notices (answers, decisions, changed dependencies) and who is waiting on it. In Claude Code and OpenCode, a worker that stops while holding a task is sent back to finish it (up to three times) and gets answers to its questions. In Claude Code the manager's stop also waits for its inbox while tasks are running; in other harnesses the manager calls wait.",
|
|
896
|
+
"Only a person approves, in their own terminal: `approve plan` (shows the design, the tasks and their files, then asks to type yes; it covers only the drafts sent with plan_submit, unchanged since), `approve merge`, `approve signal`, `approve proposal`, `reject proposal`. They refuse from an agent's shell. An agent tells the person what is waiting and the command to run.",
|
|
897
|
+
"Scheduling: a task starts when every milestone it depends on is signalled and no running task's write set overlaps its own. A worker that signals a milestone mid-task lets its dependents start from that commit right away.",
|
|
898
|
+
"Merge queue (merge_next, `oalo coord merge`): one run at a time. A task merges with a merge commit after every task it builds on has merged, and only if the project's test command passes, then the task's own test_cmd if it has one. A conflict or failing test sends it back to a worker with the output. A branch that changes .oalo/coord.json, .oalo/setup or the hook and MCP config waits for `approve merge`.",
|
|
899
|
+
"Rework: task_reopen, a merge conflict or a failing merge test sends a task back, and they count together: first held for the same worker for claim_ttl_s, then any worker; the third time it stops as needs_human until the manager sets it back to ready. A worker silent for claim_ttl_s (15 minutes) loses its claim, the manager gets its commits in a report, and the next worker resumes the same worktree.",
|
|
900
|
+
"Settings in .oalo/coord.json (a person edits them): main_branch, test_cmd, merge (auto or manual), signal_review, claim_ttl_s, port_base, port_span. Task worktrees live in ~/.oalo/worktrees/<repo>-<hash>/<task> (OALO_HOME moves them). An executable .oalo/setup runs in each new worktree with OALO_TASK_ID, OALO_WORKTREE, OALO_PROJECT_ROOT, OALO_PORT_BASE, OALO_PORT_SPAN and OALO_DB_NAME set.",
|
|
901
|
+
"The hooks block edits outside a worker's worktree and write set, and edits to coord's own files. Shell writes (sed -i, redirects) aren't intercepted; the merge queue still catches their damage. Harnesses without hooks rely on the merge queue alone.",
|
|
902
|
+
"macOS and Linux only.",
|
|
893
903
|
],
|
|
894
|
-
exits: {
|
|
904
|
+
exits: {
|
|
905
|
+
0: "ok",
|
|
906
|
+
1: "operation refused or failed (message on stderr)",
|
|
907
|
+
2: "bad arguments",
|
|
908
|
+
3: "no board here; run `oalo coord init`",
|
|
909
|
+
4: "coord isn't installed on this machine; run `oalo coord install`",
|
|
910
|
+
},
|
|
895
911
|
},
|
|
896
912
|
];
|
|
897
913
|
|
package/src/index.js
CHANGED
|
@@ -33,6 +33,8 @@ import { products } from "./commands/products.js";
|
|
|
33
33
|
import { metrics, dashboards } from "./commands/metrics.js";
|
|
34
34
|
import { db } from "./commands/db.js";
|
|
35
35
|
import { migrate } from "./commands/migrate.js";
|
|
36
|
+
import { coordInstall, coordRun } from "./commands/coord-bin.js";
|
|
37
|
+
import { existsSync } from "node:fs";
|
|
36
38
|
import { overview, commandHelp, helpJson, COMMANDS } from "./help.js";
|
|
37
39
|
import { parse } from "./args.js";
|
|
38
40
|
|
|
@@ -207,13 +209,19 @@ async function dispatch(cmd) {
|
|
|
207
209
|
await mcp(flags);
|
|
208
210
|
break;
|
|
209
211
|
case "coord": {
|
|
210
|
-
//
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
212
|
+
// Coord needs bun:sqlite, so it ships as its own compiled binary that
|
|
213
|
+
// `oalo coord install` downloads. Under Bun with the sources present
|
|
214
|
+
// (development), it runs from source instead.
|
|
215
|
+
if (rest[1] === "install") {
|
|
216
|
+
await coordInstall(flags);
|
|
217
|
+
break;
|
|
214
218
|
}
|
|
215
|
-
|
|
216
|
-
|
|
219
|
+
if (typeof Bun !== "undefined" && existsSync(new URL("./commands/coord.ts", import.meta.url))) {
|
|
220
|
+
const { coord } = await import("./commands/coord.ts");
|
|
221
|
+
await coord(flags, rest);
|
|
222
|
+
break;
|
|
223
|
+
}
|
|
224
|
+
coordRun(process.argv.slice(process.argv.indexOf("coord")));
|
|
217
225
|
break;
|
|
218
226
|
}
|
|
219
227
|
}
|