@cabane/companion 0.6.138 → 0.6.140

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
@@ -212,7 +212,7 @@ Run `cabane-companion start --foreground`. Configure the supervisor itself for r
212
212
 
213
213
  There's a deliberate split. **What the agent is** — its mode, MCP servers, model, reasoning, and charter — is configured in **Cabane** (Workspace settings → Agents) and delivered to the Companion per turn, so an edit in Cabane lands on the next turn with **no restart**. The Companion holds only the bits that can't travel from a server: the **working directory** an agent runs in (a path on _this_ machine) and your **secrets**.
214
214
 
215
- An agent can reach MCP servers two ways, and they don't overlap. **The agent's own MCP servers** are part of what the agent is: set on its Agents page, they go with it into every room. **Connections** belong to a person instead: you add one under Workspace settings → Connections (an endpoint and a pasted key, stored encrypted in Cabane), then bring it into a room from the room's menu and pick which agents there may use it. On each turn in that room, Cabane attaches the room's connections for that agent and sends the key with the turn, into the harness's environment and never onto its command line. Nothing is configured on this machine. Replacing, disconnecting or deleting a key takes effect on the agent's next turn, and nothing is revoked at the service itself.
215
+ An agent can reach MCP servers two ways, and they don't overlap. **The agent's own MCP servers** are part of what the agent is: set on its Agents page, they go with it into every room. **Connections** belong to a person instead: you add one under Workspace settings → Connections (an endpoint and a pasted key, stored encrypted in Cabane), then add it to a room from the room's menu and pick which agents there may use it. On each turn in that room, Cabane attaches the room's connections for that agent and sends the key with the turn, into the harness's environment and never onto its command line. Nothing is configured on this machine. Replacing, disconnecting or deleting a key takes effect on the agent's next turn, and nothing is revoked at the service itself.
216
216
 
217
217
  ### Agent modes (set in Cabane)
218
218
 
package/dist/cli.js CHANGED
@@ -12517,9 +12517,18 @@ async function postJson(baseUrl, path, body) {
12517
12517
  }
12518
12518
  function requestEnrollmentCode(baseUrl, opts = {}) {
12519
12519
  return postJson(baseUrl, "/api/device-enrollment/code", {
12520
- ...opts.label ? { label: opts.label } : {}
12520
+ ...opts.label ? { label: opts.label } : {},
12521
+ ...hostFacts()
12521
12522
  });
12522
12523
  }
12524
+ function hostFacts() {
12525
+ const nodeMajor = Number.parseInt(process.versions.node.split(".")[0] ?? "", 10);
12526
+ return {
12527
+ platform: process.platform,
12528
+ arch: process.arch,
12529
+ ...Number.isInteger(nodeMajor) ? { nodeMajor } : {}
12530
+ };
12531
+ }
12523
12532
  function deviceLabelFromHostname(hostname5) {
12524
12533
  const trimmed = hostname5.trim().replace(/\.local$/i, "");
12525
12534
  if (trimmed.length === 0) return void 0;
@@ -453,9 +453,18 @@ async function postJson(baseUrl, path, body) {
453
453
  }
454
454
  function requestEnrollmentCode(baseUrl, opts = {}) {
455
455
  return postJson(baseUrl, "/api/device-enrollment/code", {
456
- ...opts.label ? { label: opts.label } : {}
456
+ ...opts.label ? { label: opts.label } : {},
457
+ ...hostFacts()
457
458
  });
458
459
  }
460
+ function hostFacts() {
461
+ const nodeMajor = Number.parseInt(process.versions.node.split(".")[0] ?? "", 10);
462
+ return {
463
+ platform: process.platform,
464
+ arch: process.arch,
465
+ ...Number.isInteger(nodeMajor) ? { nodeMajor } : {}
466
+ };
467
+ }
459
468
  function pollOnce(baseUrl, deviceCode) {
460
469
  return postJson(baseUrl, "/api/device-enrollment/poll", { deviceCode });
461
470
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cabane/companion",
3
- "version": "0.6.138",
3
+ "version": "0.6.140",
4
4
  "type": "module",
5
5
  "description": "The Cabane Companion (headless): connect a coding agent on your machine to your Cabane workspace as a responder — drive work against your own codebase, files, and MCP servers without putting any of it in Cabane.",
6
6
  "license": "UNLICENSED",