@cabane/companion 0.6.101 → 0.6.102
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 +23 -3
- package/dist/cli.js +739 -452
- package/dist/pairing-config.js +4 -1
- package/dist/runtime.js +597 -418
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -69,7 +69,7 @@ Open the printed URL, enter the code in **Settings → Connectors**, give the de
|
|
|
69
69
|
|
|
70
70
|
cabane-companion start
|
|
71
71
|
# ✓ Cabane companion is running in the background.
|
|
72
|
-
# Stop: cabane-companion stop Logs: ~/.cabane/companion.log
|
|
72
|
+
# Stop: cabane-companion stop Logs: cabane-companion logs (~/.cabane/companion.log)
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
A headless machine needs no browser of its own: run `cabane-companion pair` on it, then open **Settings → Connectors** in any browser you're signed in to and enter the short code it printed. The device token is delivered straight to the waiting CLI over the pairing channel — nothing is ever copied or pasted.
|
|
@@ -85,6 +85,7 @@ A freshly paired device runs nothing yet — it has no agents. In **Workspace se
|
|
|
85
85
|
| `connect <claude-code\|codex\|opencode>` | Connect a detected coding harness now or update the running Companion over its control socket. |
|
|
86
86
|
| `stop` | Stop a foreground or detached Companion cleanly. Idempotent — "nothing running" is a success. |
|
|
87
87
|
| `status` | Print the paired device, log/transcript paths, process mode, pid and uptime, declared secret names, and local overrides. |
|
|
88
|
+
| `logs [-n N] [-f]` | Show recent log lines or follow new ones. |
|
|
88
89
|
| `transcript [file] [--last] [-f]` | Show a recent full agent transcript. No args lists recent turns; `--last` renders the newest; `--follow` live-watches new turns. |
|
|
89
90
|
| `logout [-y] [--purge]` | Remove the device token and cached agent credentials. `--purge` removes the whole local config. Neither removes the device from Cabane. |
|
|
90
91
|
| `--version` / `-V` | Print the Companion version. |
|
|
@@ -98,7 +99,7 @@ In an interactive terminal, `cabane-companion start` backgrounds itself, returns
|
|
|
98
99
|
```sh
|
|
99
100
|
cabane-companion start
|
|
100
101
|
# ✓ Cabane companion is running in the background.
|
|
101
|
-
# Stop: cabane-companion stop Logs: ~/.cabane/companion.log
|
|
102
|
+
# Stop: cabane-companion stop Logs: cabane-companion logs (~/.cabane/companion.log)
|
|
102
103
|
```
|
|
103
104
|
|
|
104
105
|
`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.
|
|
@@ -336,11 +337,30 @@ Everything else about a Companion-run agent is the same whichever harness runs i
|
|
|
336
337
|
├── outbox/<workspace_id>/ # durable per-agent commit queue — a reply survives a transient API outage
|
|
337
338
|
├── runtime.json # written while `start` runs: control socket + pid (swept on exit)
|
|
338
339
|
├── transcripts/ # one JSONL file per dispatch — the full agent turn (see below)
|
|
339
|
-
└── companion.log #
|
|
340
|
+
└── companion.log # readable event log (JSON opt-in)
|
|
340
341
|
```
|
|
341
342
|
|
|
342
343
|
No SQLite, no embedded DB. Cabane is the source of truth for which agents to run and how they're configured.
|
|
343
344
|
|
|
345
|
+
## Logs
|
|
346
|
+
|
|
347
|
+
`cabane-companion logs` shows the last 50 lines. Use `-n 20` for twenty lines or
|
|
348
|
+
`-f` to follow new lines until Ctrl-C. The initial read is capped at 1 MiB.
|
|
349
|
+
The file is `~/.cabane/companion.log` and is human-readable by default: local
|
|
350
|
+
`HH:MM:SS`, a level word for warnings and errors, then a sentence. Turns include
|
|
351
|
+
the agent's name and an eight-character conversation id. Failed turns include
|
|
352
|
+
a reason, the next step and the transcript path.
|
|
353
|
+
|
|
354
|
+
- `info` (default): startup, connection, assigned agents, and turn outcomes.
|
|
355
|
+
- `warn`: degraded operation, such as reconnecting or updates waiting to arrive.
|
|
356
|
+
- `debug`: internal diagnostics for investigating a problem. Errors are always shown.
|
|
357
|
+
|
|
358
|
+
Choose with `cabane-companion start --log-level debug` or `"logLevel": "debug"`
|
|
359
|
+
in `~/.cabane/config.json`. Config changes apply on reload; a start flag wins.
|
|
360
|
+
Use `--log-format json` or `"logFormat": "json"` for machine-readable JSON with
|
|
361
|
+
full ids. The default is `human`; the terminal always stays human-readable.
|
|
362
|
+
Log files append across starts. Transcripts remain JSONL in either mode.
|
|
363
|
+
|
|
344
364
|
## Debugging a turn: transcripts
|
|
345
365
|
|
|
346
366
|
Cabane shows the agent's final reply, but not _how_ it got there. When a turn misbehaves — an agent that "couldn't read the file", a tool that errored, MCP tools that didn't load, a missing secret — the full picture is on disk. Every dispatch — on whichever harness ran it — writes the complete turn stream (the system init with its tool list, every tool call **and its result**, the assistant text, the outcome) to a JSONL file under `~/.cabane/transcripts/`. On a failed turn, the Companion log also prints the exact path.
|