@cabane/companion 0.6.155 → 0.6.156

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # cabane-companion
1
+ # cabane
2
2
 
3
- Connect a **coding agent on your machine** to your [Cabane](https://cabane.ai) workspaces as a **responder** — it replies to messages inside Cabane while running as a full local AI client, so you can drive work against your own codebase, files, and MCP servers without putting any of it in Cabane. The model and tools run on your box; only the reply crosses back.
3
+ Connect a **agent on your machine** to your [Cabane](https://cabane.ai) workspaces as a **responder** — it replies to messages inside Cabane while running as a full local AI client, so you can drive work against your own codebase, files, and MCP servers without putting any of it in Cabane. The model and tools run on your box; only the reply crosses back.
4
4
 
5
5
  The Companion runs your agents through a **harness** on your machine — **[Claude Code](https://www.npmjs.com/package/@anthropic-ai/claude-code)**, **[Codex](https://developers.openai.com/codex/cli)**, or **[opencode](https://opencode.ai)** — and you expose the ones you have. Install and sign in to a harness yourself; the Companion drives it. See [Harnesses](#harnesses).
6
6
 
@@ -10,102 +10,108 @@ This is **v0**. It's a small CLI — install it from npm with one command, pair
10
10
 
11
11
  ## The model in one paragraph
12
12
 
13
- The Companion runs on a **device you pair**, running **agents you assign to it**. `cabane-companion start` pairs the device with a short code the first time, then runs. From then on it **pulls its assignments from Cabane at runtime** — every agent you've pointed at this device, across all your workspaces — and runs each one locally. Which agents to run, and how they're configured (host access, MCP servers, model), is owned by Cabane and delivered per turn. The machine only holds the bits that _must_ be local: the device token, your secrets, and any overrides you set for this machine.
13
+ The Companion runs on a **device you pair**, running **agents you assign to it**. `cabane start` pairs the device with a short code the first time, then runs. From then on it **pulls its assignments from Cabane at runtime** — every agent you've pointed at this device, across all your workspaces — and runs each one locally. Which agents to run, and how they're configured (host access, MCP servers, model), is owned by Cabane and delivered per turn. The machine only holds the bits that _must_ be local: the device token, your secrets, and any overrides you set for this machine.
14
14
 
15
15
  > **No account password or full-account token ever touches your machine.** The short-code pairing flow delivers a **device token** (`cabdev_…`) directly to the waiting CLI — good only for pulling this device's assignments and reporting liveness. Each agent the Companion runs gets its own **workspace-bound agent token**, delivered once when the agent is assigned and scoped to that one agent in that one workspace. Renaming, deactivating and removing a device, rotating its token, and assigning agents to it all live in Cabane; the CLI only pairs the machine and runs the agents locally.
16
16
 
17
17
  ## Prerequisites
18
18
 
19
- You need **Node 22+** (the Companion itself runs on Node — check with `node --version`) and **at least one harness installed and signed in**. The Companion installs no harness and drives no login for you — bring your own, and set it up **before** starting the Companion. It will still `start` with nothing connected — that is the ordinary first-run state, and `start` is what offers you the harnesses it found — but no turn can be routed to it until you connect one.
19
+ **Sign in to an agent first.** The Companion runs turns with its own bundled copies of Claude Code and Codex, so it never needs them on your PATH, only signed in. `cabane start` checks with those bundled copies and refuses to pair until one is signed in, or has an API key, printing the lines to run. The Companion never runs a sign-in itself. One agent is enough; a machine can offer several. [Harnesses](#harnesses) has the full wiring.
20
20
 
21
- Set up whichever you already use — one is enough, and a machine can expose several. [Harnesses](#harnesses) has the full per-harness wiring; the short version:
22
-
23
- **Claude Code** — install it globally _and_ log in:
21
+ **Claude Code** (needs a Claude Pro or Max plan):
24
22
 
25
23
  ```sh
26
- npm i -g @anthropic-ai/claude-code
27
- claude # complete the login, then quit
24
+ curl -fsSL https://claude.ai/install.sh | bash
25
+ ~/.local/bin/claude auth login
28
26
  ```
29
27
 
30
- Both halves are load-bearing, for different reasons:
31
-
32
- - **The install** puts `claude` on your PATH (`which claude` should resolve). That is what makes the Companion _offer_ to connect Claude Code, and what `cabane-companion status` reports a version from. It is not what runs your turns, and on its own it exposes nothing — that takes connecting it _and_ the bundled binary (below).
33
- - **The login** writes the credential the turn actually uses. The Companion does _not_ run your global `claude` to answer a turn — inference goes through the bundled Claude Agent SDK, which spawns its own native binary — but the SDK reads the credential your Claude Code login left on disk. So a machine with `claude` installed and never logged in looks fine and then fails every turn with **"Sign-in needed"**.
34
-
35
- **Connect it.** Claude Code is an opt-in like the others: accept the offer from `cabane-companion start`, run `cabane-companion connect claude-code`, or add a `claudeCode` block to `~/.cabane/config.json`. A device exposes it only when you have connected it **and** the Agent SDK's bundled binary is installed — that binary arrives as an optional npm dependency, so a companion installed with optional dependencies omitted has none, and will tell you so with the command that fixes it.
28
+ The full path works in the same window even when Claude's installer leaves `~/.local/bin` off your PATH. With an Anthropic API key instead, `export ANTHROPIC_API_KEY=…` in the window that runs `cabane start`: the Companion reports it as **API key configured**. A key lives in that window's environment, so one exported later in another window isn't seen by a running Companion; `cabane connect` says so. A plan sign-in is stored on disk and never needs a restart.
36
29
 
37
- **Codex** — log in (`codex login`, or set `CODEX_API_KEY` in Codex's own environment — Cabane never sees the key), then opt in the same way: accept the offer from `cabane-companion start`, run `cabane-companion connect codex`, or add a one-line `codex` block in `~/.cabane/config.json`. As with Claude Code, the turn runs the SDK's own vendored `codex` binary rather than the CLI on your PATH.
30
+ **Codex** — `codex login`, or `export CODEX_API_KEY=…` in the window that runs `cabane start` (Cabane never sees the key).
38
31
 
39
- **opencode** — install it, authenticate a provider through its own flow, and start its server and leave it running (`opencode serve --port 4096`). The Companion finds a server on that port by itself; for one anywhere else, connect it with `cabane-companion connect opencode --url <url>`.
32
+ **opencode** — authenticate a provider through its own flow and leave its server running (`opencode serve --port 4096`). A reachable server counts as usable; for one anywhere else, connect it with `cabane connect opencode --url <url>`.
40
33
 
41
34
  You also need **a Cabane account.** A device belongs to your account, not to one workspace: once paired, it is available in every workspace the account is in.
42
35
 
43
36
  ## Install
44
37
 
38
+ Two ways, identical from `cabane start` on.
39
+
40
+ **The install script** brings its own Node (22, checksum-checked, into `~/.cabane`), needs no sudo, and runs `cabane start` in the same window:
41
+
42
+ ```sh
43
+ curl -fsSL https://cabane.ai/install.sh | bash
44
+ ```
45
+
46
+ **npm**, with Node 22 or newer:
47
+
45
48
  ```sh
46
49
  npm i -g @cabane/companion
50
+ cabane start
47
51
  ```
48
52
 
49
- That puts `cabane-companion` on your PATH. Confirm it with `cabane-companion --version`. To **update** later: `npm i -g @cabane/companion@latest`.
53
+ Either puts `cabane` on your PATH, with `cabane-companion` kept as an alias. If `cabane` isn't found right after an npm install, npm's global bin isn't on your PATH: run `"$(npm prefix -g)/bin/cabane" start`, and the Companion prints full paths from then on. If npm reports `EEXIST … cabane`, an older self-host CLI owns the name: `npm i -g @cabane/cli@latest` (its command is `cabane-server` now), then install again.
50
54
 
51
- ## First run
55
+ To **update**, stop first, because a stop ends any turn in progress: `cabane stop`, then re-run the install script (it starts the new version), or `npm i -g @cabane/companion@latest` and `cabane start`. The install script changes nothing while a Companion is running.
52
56
 
53
- One command sets the machine up:
57
+ ## First run
54
58
 
55
59
  ```sh
56
- cabane-companion start
60
+ cabane start
57
61
  ```
58
62
 
59
- It names each coding agent it finds and asks whether to make it available in Cabane. Press Enter for yes, or type `n` to leave one out. Then it prints a pairing code and a link, and waits. The code is good for 15 minutes.
63
+ It names each agent that's signed in and asks whether to use it in Cabane. Press Enter for yes, or type `n` to leave one out. Then it prints a pairing code and a link, and waits. The code is good for 15 minutes; press Return to open the link with the code filled in.
60
64
 
61
65
  ```
62
- We found Claude Code on this machine (2.1.287). Make it available in Cabane? [Y/n]
63
- ✓ Claude Code — available once this device is paired.
66
+ Claude Code is signed in on this computer (2.1.289).
67
+ Use it in Cabane? [Y/n]
68
+ ✓ Claude Code — available once this computer is paired.
64
69
 
65
- Now let's pair this machine. Enter this code in Cabane:
70
+ Now pair this computer. Enter this code on the Cabane page:
66
71
 
67
72
  4HSP-FPWB
68
73
 
69
- or, if Cabane isn’t open:
74
+ or press Return to open this link in your browser:
70
75
 
71
76
  https://app.cabane.ai/pair/enter-code?code=4HSP-FPWB
72
77
 
73
78
  Waiting for you to confirm in Cabane… (the code is good for 15 minutes)
74
79
  ```
75
80
 
81
+ With nothing signed in, it pairs nothing, starts nothing, prints the sign-in lines above and exits non-zero.
82
+
76
83
  In Cabane, open the **Account menu** at the bottom left and choose **Settings**, then **Devices**, then **Pair a device** and **Enter pairing code**. Type the eight characters and choose **Pair device**. Or open the link from the terminal, which fills the code in. Any browser signed in to the account will do, so a headless machine needs no browser of its own. The device token is delivered straight to the waiting CLI. Nothing is copied or pasted.
77
84
 
78
85
  The terminal finishes by itself:
79
86
 
80
87
  ```
81
- ✓ Paired to Maya Finch's account.
88
+ ✓ Paired with Maya Finch's Cabane account as maya-mbp.
82
89
  ✓ Claude Code connected.
83
- ✓ Cabane companion is running in the background.
84
- Stop: cabane-companion stop Logs: cabane-companion logs (~/.cabane/companion.log)
90
+ ✓ Cabane is running in the background. You can close this window.
91
+ Stop: cabane stop Logs: cabane logs
85
92
 
86
- ! It won't restart on its own — after a reboot, or if it ever stops,
87
- just run cabane-companion start again.
93
+ ! It won't restart on its own after a reboot — run cabane start again.
88
94
 
89
95
  All set on this side. Finish up in Cabane.
90
96
  ```
91
97
 
92
- Back in Cabane, **Name this device** asks for a **Device name**, which starts as the machine's hostname and can change later. Choose **Save and continue**. **What Runs on This Device** lists each coding agent on the device as a connector; choose **Continue**. The device is then listed under **Settings → Devices** as **Online**.
98
+ Back in Cabane, **Name this device** asks for a **Device name**, which starts as the machine's hostname and can change later. Choose **Save and continue**. **What Runs on This Device** lists each agent on the device as a connector; choose **Continue**. The device is then listed under **Settings → Devices** as **Online**.
93
99
 
94
100
  A freshly paired device runs nothing yet: pairing doesn't put any agent on it. In a workspace, open **Settings**, then **Agents**, choose an agent, and under **Assignment** choose **Assign a device**, pick this device, and choose **Assign device**. Then, under **Execution**, choose its **Connector** and model and choose **Save execution settings**. Until those are saved, the agent's row in the list still says "Not configured". Only the device's own owner can assign an agent to it. The Create an agent guide in Cabane's docs walks these screens. Assign agents in as many workspaces as the account is in: one running Companion serves them all.
95
101
 
96
102
  ## Commands
97
103
 
98
- | Command | What it does |
99
- | ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
100
- | `pair [--server <url>]` | Pair this device with a short code entered in Cabane, without starting the Companion. `start` does this by itself when the device isn't paired, so `pair` is rarely needed. |
101
- | `start [--foreground] [--daemon]` | Pair if needed, offer detected coding harnesses, and run in the background. `--daemon` is an accepted compatibility alias for the default. `--foreground` stays attached for a terminal or external supervisor. A non-interactive `start` also stays attached. |
102
- | `connect <claude-code\|codex\|opencode>` | Connect a detected coding harness now or update the running Companion over its control socket. |
103
- | `stop` | Stop a foreground or detached Companion cleanly. Idempotent — "nothing running" is a success. |
104
- | `status` | Print the paired device, log/transcript paths, process mode, pid and uptime, declared secret names, and local overrides. |
105
- | `logs [-n N] [-f]` | Show recent log lines or follow new ones. |
106
- | `transcript [file] [--last] [-f]` | Show a recent full agent transcript. No args lists recent turns; `--last` renders the newest; `--follow` live-watches new turns. |
107
- | `logout [-y] [--purge]` | Remove the device token and cached agent credentials. `--purge` removes the whole local config. Neither removes the device from Cabane. |
108
- | `--version` / `-V` | Print the Companion version. |
104
+ | Command | What it does |
105
+ | ---------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
106
+ | `pair [--server <url>]` | Pair this device with a short code entered in Cabane, without starting the Companion. Refuses, like `start`, until an agent is signed in. `start` pairs by itself, so `pair` is rarely needed. |
107
+ | `start [--foreground] [--daemon]` | Offer the signed-in agents, pair if needed, and run in the background; refuse, pairing nothing, when none is usable. `--daemon` is an accepted compatibility alias for the default. `--foreground` stays attached for a terminal or supervisor and never refuses. A non-interactive `start` on a paired device also stays attached. |
108
+ | `connect <claude-code\|codex\|opencode>` | Connect a signed-in agent; with the Companion running, it checks and connects over its control socket, no restart. Refuses a signed-out agent and changes nothing. |
109
+ | `stop` | Stop a foreground or detached Companion cleanly. Idempotent — "nothing running" is a success. |
110
+ | `status` | Print the version and install, the paired device, whether it's running, each agent's sign-in, log and transcript paths, declared secret names, and local overrides. Works unpaired. |
111
+ | `logs [-n N] [-f]` | Show recent log lines or follow new ones. |
112
+ | `transcript [file] [--last] [-f]` | Show a recent full agent transcript. No args lists recent turns; `--last` renders the newest; `--follow` live-watches new turns. |
113
+ | `logout [-y] [--purge]` | Remove the device token and cached agent credentials. `--purge` removes the whole local config. Neither removes the device from Cabane. |
114
+ | `--version` / `-V` | Print the Companion version. |
109
115
 
110
116
  Everything else about a device is done in Cabane, not the CLI: **rename**, **deactivate**, **rotate token** and **remove** are on the device's page under the account's **Settings → Devices**, and agents are assigned on each workspace's **Settings → Agents**.
111
117
 
@@ -113,26 +119,26 @@ Everything else about a device is done in Cabane, not the CLI: **rename**, **dea
113
119
 
114
120
  Each of these starts in Cabane, on the device's page, and three of them need a command on the device afterwards.
115
121
 
116
- - **After a reboot, or whenever the Companion has stopped**, run `cabane-companion start`. Running it while the Companion is already running changes nothing. In Cabane, a device whose Companion has stopped turns to **Offline** about two minutes later, and back to **Online** once it is up.
117
- - **Deactivate** turns the device off without removing it. The Companion on the device exits. To bring it back, choose **Reactivate** in Cabane, then run `cabane-companion start` on the device. The Companion's log says to log out and pair again; that isn't needed.
118
- - **Rotate token** shows a new device token (`cabdev_…`) once, and the old one stops working at once. On the device, run `cabane-companion stop`, replace the value of `deviceToken` in `~/.cabane/config.json` with the new token, then run `cabane-companion start`. Stop first: a Companion that is still running keeps the old token, and `start` does nothing while one is running.
119
- - **Remove device** can't be undone. The Companion on the device exits. To pair the same machine again, run `cabane-companion logout`, then `cabane-companion start`.
122
+ - **After a reboot, or whenever the Companion has stopped**, run `cabane start`. Running it while the Companion is already running changes nothing. In Cabane, a device whose Companion has stopped turns to **Offline** about two minutes later, and back to **Online** once it is up.
123
+ - **Deactivate** turns the device off without removing it. The Companion on the device exits. To bring it back, choose **Reactivate** in Cabane, then run `cabane start` on the device. The Companion's log says to log out and pair again; that isn't needed.
124
+ - **Rotate token** shows a new device token (`cabdev_…`) once, and the old one stops working at once. On the device, run `cabane stop`, replace the value of `deviceToken` in `~/.cabane/config.json` with the new token, then run `cabane start`. Stop first: a Companion that is still running keeps the old token, and `start` does nothing while one is running.
125
+ - **Remove device** can't be undone. The Companion on the device exits. To pair the same machine again, run `cabane logout`, then `cabane start`.
120
126
 
121
- If `cabane-companion start` says the Companion is running but the device stays **Offline**, the Companion may have exited straight after starting, which happens when Cabane no longer accepts the device. `cabane-companion status` and `cabane-companion logs` show which.
127
+ If `cabane start` says the Companion is running but the device stays **Offline**, the Companion may have exited straight after starting, which happens when Cabane no longer accepts the device. `cabane status` and `cabane logs` show which.
122
128
 
123
129
  ## Background and supervised operation
124
130
 
125
- In an interactive terminal, `cabane-companion start` backgrounds itself, returns the prompt, and keeps running after the terminal closes:
131
+ In an interactive terminal, `cabane start` backgrounds itself, returns the prompt, and keeps running after the terminal closes:
126
132
 
127
133
  ```sh
128
- cabane-companion start
129
- # ✓ Cabane companion is running in the background.
130
- # Stop: cabane-companion stop Logs: cabane-companion logs (~/.cabane/companion.log)
134
+ cabane start
135
+ # ✓ Cabane is running in the background.
136
+ # Stop: cabane stop Logs: cabane logs
131
137
  ```
132
138
 
133
- `start --daemon` takes the same path for compatibility. This detached process does not survive logout or reboot and Cabane does not install, enable, or update a login service. Use `cabane-companion status` to check it and `cabane-companion stop` to stop it.
139
+ `start --daemon` takes the same path for compatibility. This detached process does not survive logout or reboot and Cabane does not install, enable, or update a login service. Use `cabane status` to check it and `cabane stop` to stop it.
134
140
 
135
- If you want restart or login persistence, configure your own supervisor to run `cabane-companion start --foreground`. The supervisor owns when the process starts and restarts; the Companion never writes these files for you.
141
+ If you want restart or login persistence, configure your own supervisor to run `cabane start --foreground`. The supervisor owns when the process starts and restarts; the Companion never writes these files for you.
136
142
 
137
143
  ### Find the executable paths
138
144
 
@@ -234,7 +240,7 @@ If you enabled lingering only for this Companion, undo it separately with `sudo
234
240
 
235
241
  ### Other supervisors
236
242
 
237
- Run `cabane-companion start --foreground`. Configure the supervisor itself for restart and login/boot behavior, and use absolute executable paths when it does not load your interactive shell. Removing the supervisor configuration removes the persistence; no Cabane-managed service remains.
243
+ Run `cabane start --foreground`. Configure the supervisor itself for restart and login/boot behavior, and use absolute executable paths when it does not load your interactive shell. Removing the supervisor configuration removes the persistence; no Cabane-managed service remains.
238
244
 
239
245
  ## Configuring an agent: what's in Cabane vs. on this machine
240
246
 
@@ -259,7 +265,7 @@ MCP servers in the agent's Environment don't depend on host access: a stdio serv
259
265
 
260
266
  An agent with host access starts in its **Working directory**, set in Cabane in the same **Environment** dialog as host access. Left empty, or naming a folder that isn't on the device, the agent starts in the folder the Companion was started from; a missing folder is reported only in the Companion's log.
261
267
 
262
- The machine can override it. A `cwd` in `~/.cabane/config.json` wins over the directory set in Cabane, and a prepare-hook wins over both. Add an `agents` map keyed by the agent's id, its `@username`, or `workspace-slug/username` (all three show up in `cabane-companion status`, copy-pasteable):
268
+ The machine can override it. A `cwd` in `~/.cabane/config.json` wins over the directory set in Cabane, and a prepare-hook wins over both. Add an `agents` map keyed by the agent's id, its `@username`, or `workspace-slug/username` (all three show up in `cabane status`, copy-pasteable):
263
269
 
264
270
  ```jsonc
265
271
  {
@@ -278,7 +284,7 @@ The machine can override it. A `cwd` in `~/.cabane/config.json` wins over the di
278
284
  }
279
285
  ```
280
286
 
281
- A malformed `agents` block fails `cabane-companion start` immediately with a message pointing at the exact field — it won't silently fall back.
287
+ A malformed `agents` block fails `cabane start` immediately with a message pointing at the exact field — it won't silently fall back.
282
288
 
283
289
  **A hook that is the same for every agent goes at the top level instead.** If your hook works out the directory itself — from the conversation and agent ids the Companion hands it — then listing every agent by name is a roster you have to remember to update, and an agent you forget gets no hook at all and starts its turn wherever the Companion happens to be. So `prepareHook` can sit beside `agents` rather than inside it:
284
290
 
@@ -291,7 +297,7 @@ A malformed `agents` block fails `cabane-companion start` immediately with a mes
291
297
  }
292
298
  ```
293
299
 
294
- The agent's own entry wins when it names a hook; otherwise the device-level one applies. It survives a re-pair along with the rest of your local settings, and `cabane-companion status` prints it. A hook that fails still fails the turn loudly either way.
300
+ The agent's own entry wins when it names a hook; otherwise the device-level one applies. It survives a re-pair along with the rest of your local settings, and `cabane status` prints it. A hook that fails still fails the turn loudly either way.
295
301
 
296
302
  ### Auto-memory (off by default)
297
303
 
@@ -390,7 +396,7 @@ Paths may start with `~/` and may be globs. An invalid `policy` doesn't stop the
390
396
 
391
397
  A `gh auth login` session on the machine isn't used: `~/.config/gh` is unreadable in the sandbox. Only the token in `secrets.json` is.
392
398
 
393
- `cabane-companion status` prints the effective posture: the filesystem mode, extra hosts, denied hosts and reads, the **names** of masked credentials, never their values, and each agent excepted on its row. The Companion also logs it once at start.
399
+ `cabane status` prints the effective posture: the filesystem mode, extra hosts, denied hosts and reads, the **names** of masked credentials, never their values, and each agent excepted on its row. The Companion also logs it once at start.
394
400
 
395
401
  ## Harnesses
396
402
 
@@ -408,7 +414,7 @@ What "exposed" means differs per harness, because each is discoverable in a diff
408
414
 
409
415
  Claude Code and Codex each run a native binary their SDK ships, installed alongside the Companion as an optional npm dependency. Those are what a turn launches — not the `claude` / `codex` CLIs on your PATH, which are for setup and login. If one didn't install, the Companion says so on startup and on the device's page in Cabane, with the command that repairs it: `npm i -g @cabane/companion --include=optional`.
410
416
 
411
- **You usually don't hand-edit the config.** Interactive `cabane-companion start` offers each detected harness, and `cabane-companion connect codex` (or `claude-code` / `opencode`) can connect one later. Editing `~/.cabane/config.json` yourself is the fallback and what a headless device wants:
417
+ **You usually don't hand-edit the config.** Interactive `cabane start` offers each signed-in agent, and `cabane connect codex` (or `claude-code` / `opencode`) can connect one later. Editing `~/.cabane/config.json` yourself is the fallback and what a headless device wants:
412
418
 
413
419
  ```jsonc
414
420
  {
@@ -419,7 +425,7 @@ Claude Code and Codex each run a native binary their SDK ships, installed alongs
419
425
  }
420
426
  ```
421
427
 
422
- Every block is optional and independent — set only the harnesses you have. Claude Code and Codex each take a flag and no URL, because the SDK bundled with the Companion spawns its own native binary per turn; opencode is a long-lived server addressed by URL, so run one `opencode serve` per Companion process. A hand-edit needs a restart (`cabane-companion stop && cabane-companion start`); the `connect` command updates a running Companion over its control socket.
428
+ Every block is optional and independent — set only the harnesses you have. Claude Code and Codex each take a flag and no URL, because the SDK bundled with the Companion spawns its own native binary per turn; opencode is a long-lived server addressed by URL, so run one `opencode serve` per Companion process. A hand-edit needs a restart (`cabane stop && cabane start`); the `connect` command updates a running Companion over its control socket.
423
429
 
424
430
  Everything else about a Companion-run agent is the same whichever harness runs it — same assignment, same working directory, same secrets. A harness is a way to execute a turn, not a different way to run the Companion.
425
431
 
@@ -447,7 +453,7 @@ No SQLite, no embedded DB. Cabane is the source of truth for which agents to run
447
453
 
448
454
  ## Logs
449
455
 
450
- `cabane-companion logs` shows the last 50 lines. Use `-n 20` for twenty lines or
456
+ `cabane logs` shows the last 50 lines. Use `-n 20` for twenty lines or
451
457
  `-f` to follow new lines until Ctrl-C. The initial read is capped at 1 MiB.
452
458
  The file is `~/.cabane/companion.log` and is human-readable by default: local
453
459
  `HH:MM:SS`, a level word for warnings and errors, then a sentence. Turns include
@@ -458,7 +464,7 @@ a reason, the next step and the transcript path.
458
464
  - `warn`: degraded operation, such as reconnecting or updates waiting to arrive.
459
465
  - `debug`: internal diagnostics for investigating a problem. Errors are always shown.
460
466
 
461
- Choose with `cabane-companion start --log-level debug` or `"logLevel": "debug"`
467
+ Choose with `cabane start --log-level debug` or `"logLevel": "debug"`
462
468
  in `~/.cabane/config.json`. Config changes apply on reload; a start flag wins.
463
469
  Use `--log-format json` or `"logFormat": "json"` for machine-readable JSON with
464
470
  full ids. The default is `human`; the terminal always stays human-readable.
@@ -471,10 +477,10 @@ Cabane shows the agent's final reply, but not _how_ it got there. When a turn mi
471
477
  Read one back in a readable form:
472
478
 
473
479
  ```sh
474
- cabane-companion transcript --last # render the most recent turn
475
- cabane-companion transcript # list recent turns (newest first)
476
- cabane-companion transcript <file> # render a specific one (filename or a substring)
477
- cabane-companion transcript --follow # live-watch turns as they land (-f; Ctrl-C to stop)
480
+ cabane transcript --last # render the most recent turn
481
+ cabane transcript # list recent turns (newest first)
482
+ cabane transcript <file> # render a specific one (filename or a substring)
483
+ cabane transcript --follow # live-watch turns as they land (-f; Ctrl-C to stop)
478
484
  ```
479
485
 
480
486
  `--follow` (`-f`) is a built-in live watch: it renders the current turn as its lines append and rolls to the next turn when a new dispatch starts — handy for demos or watching the agent work in real time.
package/dist/bin.js ADDED
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/bin.ts
4
+ var MIN_NODE_MAJOR = 22;
5
+ var major = Number(process.versions.node.split(".")[0]);
6
+ if (!(major >= MIN_NODE_MAJOR)) {
7
+ process.stderr.write(
8
+ `Cabane needs Node ${MIN_NODE_MAJOR} or newer, and this is Node ${process.versions.node}. Install Node 22 or newer, or use the install script, which brings its own: curl -fsSL https://cabane.ai/install.sh | bash
9
+ `
10
+ );
11
+ process.exit(1);
12
+ }
13
+ await import("./cli.js");