@cabane/companion 0.6.203 → 0.6.204
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 +25 -1
- package/dist/cli.js +1544 -1730
- package/dist/launch.js +5 -23
- package/dist/pairing-config.js +29 -45
- package/dist/runtime.js +92 -111
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -111,6 +111,8 @@ All of it in `~/.cabane/`, mode 600, no database. Cabane is the source of truth
|
|
|
111
111
|
|
|
112
112
|
An MCP server configured in Cabane names its credential as `${NAME}`; the value never leaves the device. The Companion resolves it from `secrets.json` at dispatch, never from your shell environment, and a name that isn't declared fails the turn loudly. It reports the declared names (never values) on its heartbeat, so Cabane can warn before a turn runs.
|
|
113
113
|
|
|
114
|
+
A device with no keychain or browser, such as a server or a container, can sign its harness in from `secrets.json` too: `CLAUDE_CODE_OAUTH_TOKEN` or `ANTHROPIC_API_KEY` for Claude Code, `CODEX_API_KEY` for Codex. Only the turn's own harness gets its sign-in. `GH_TOKEN` there reaches every turn, for `gh` and git over HTTPS.
|
|
115
|
+
|
|
114
116
|
### Local overrides
|
|
115
117
|
|
|
116
118
|
`config.json` can carry, per agent (keyed by id, `@username` or `workspace-slug/username`) or for the whole device:
|
|
@@ -121,7 +123,29 @@ An MCP server configured in Cabane names its credential as `${NAME}`; the value
|
|
|
121
123
|
- `harnesses`: an allowlist such as `["claude-code"]`; absent means all three.
|
|
122
124
|
- `claudeCode.autoMemory`: Claude Code's local memory directory is off by default on every Companion, because notes belong in the workspace where others can read them. `true` hands it back.
|
|
123
125
|
|
|
124
|
-
A malformed block fails `cabane start` with the field named. A `runners` block
|
|
126
|
+
A malformed block fails `cabane start` with the field named. A `runners` block, a row's `sandbox`, or a `prepareHook`'s `validateCached` or `failureReporter` from an older Companion is ignored, with one line in the log naming it.
|
|
127
|
+
|
|
128
|
+
Every turn's shell gets `CABANE_CONVERSATION_ID` and `CABANE_AGENT_ID`, so a script an agent runs can tell which conversation and agent it's working for.
|
|
129
|
+
|
|
130
|
+
### Running each turn somewhere else
|
|
131
|
+
|
|
132
|
+
`runner.command` puts a command in front of every turn: `"runner": { "command": ["/usr/local/bin/enter-sandbox", "--fresh"] }` starts each turn as `enter-sandbox --fresh <the Companion's own run-turn command>`. Use it to run each turn in a container or VM of your own while the Companion stays outside. Your command must run the rest of its arguments, with the environment and stdin it was given.
|
|
133
|
+
|
|
134
|
+
A wrapped turn gets the device's secrets on its stdin rather than reading `secrets.json`, inherits no sign-in from the Companion's own environment, and is never signalled by process group from outside: your command ends whatever the turn leaves behind.
|
|
135
|
+
|
|
136
|
+
What your command can rely on, and can set:
|
|
137
|
+
|
|
138
|
+
| Variable | |
|
|
139
|
+
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
140
|
+
| `CABANE_DISPATCH` | Read: the dispatch as JSON, including `conversationId` and `agentId`. |
|
|
141
|
+
| `CABANE_RUNNER_SPEC` | Read: the turn's settings as JSON, including `agentUsername`. |
|
|
142
|
+
| `CABANE_TURN_ID` | Read: the turn's id. |
|
|
143
|
+
| `CABANE_COMPANION_HOME` | Read, when the Companion was started with one: the home its `.cabane` directory is under. |
|
|
144
|
+
| `CABANE_WORK_ROOT` | Set: the root the turn's working directory goes under, in place of `root`. |
|
|
145
|
+
| `CABANE_TRANSCRIPT_DIR` | Set: where the turn writes its transcript. A directory one level under `~/.cabane/transcripts/` lists in `cabane transcript`. |
|
|
146
|
+
| `CABANE_WORK_ROOT_DEDICATED` | Set to `1` when the root is already this one conversation and agent's: the turn stands in it directly, with no per-conversation directory under it. |
|
|
147
|
+
|
|
148
|
+
These names are a contract: a Companion that renamed one would break your command, so none changes without a note in the release.
|
|
125
149
|
|
|
126
150
|
### Isolation
|
|
127
151
|
|