@cabane/companion 0.6.236 → 0.6.238

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
@@ -10,16 +10,16 @@ Pairing supplies a device token, not your Cabane password or a full-account toke
10
10
 
11
11
  ## Install
12
12
 
13
- On the device, in a terminal. One of:
13
+ On the device, in a terminal. Copy the line from Your settings → Devices → Add a device in your Cabane: it carries your Cabane's address, shown here as `https://cabane.example.com`. One of:
14
14
 
15
15
  ```sh
16
- curl -fsSL https://cabane.ai/install.sh | bash
16
+ curl -fsSL https://cabane.example.com/install.sh | bash
17
17
  ```
18
18
 
19
- The script brings its own Node (checksum-checked, into `~/.cabane`) and needs no sudo. Or, with Node 22 or newer already there (the only route on Windows):
19
+ Your Cabane serves the script, with its own address written in. It brings its own Node (checksum-checked, into `~/.cabane`) and needs no sudo. Or, with Node 22 or newer already there (the only route on Windows):
20
20
 
21
21
  ```sh
22
- npm i -g @cabane/companion && cabane setup
22
+ npm i -g @cabane/companion && cabane setup --server https://cabane.example.com
23
23
  ```
24
24
 
25
25
  `cabane setup` on an unpaired device prints a code and a link:
@@ -29,14 +29,14 @@ Pair this device
29
29
  Enter this code in Cabane, or press Return to open the page:
30
30
 
31
31
  WXYZ-2345
32
- https://app.cabane.ai/pair/enter-code
32
+ https://cabane.example.com/pair/enter-code
33
33
 
34
34
  ⠋ Waiting for you to confirm in Cabane… (the code is good for 15 minutes)
35
35
  ```
36
36
 
37
- Enter the code in Cabane, signed in as yourself: from your own Settings → Devices → Add a device, from a workspace's Settings → Devices → Set up a new device, or on the page the link opens. Cabane shows which device asked; confirming pairs it to your account and nothing else. A workspace's dialog then adds the device to that workspace; from anywhere else, add it to a workspace from that workspace's Settings → Devices. Pairing from a workspace you're setting up places its default agent on the device once a harness there is usable.
37
+ Enter the code in Cabane, signed in as yourself: from Your settings → Devices → Add a device, from a workspace's Settings → Devices → Set up a new device, or on the page the link opens. Cabane shows which device asked; confirming pairs it to your account and nothing else. A workspace's dialog then adds the device to that workspace; from anywhere else, add it to a workspace from that workspace's Settings → Devices. Pairing from a workspace you're setting up places its default agent on the device once a harness there is usable.
38
38
 
39
- Without a terminal, setup prints the same lines once and waits, so a container's logs carry the code. An expired code is replaced by a fresh one, up to three; Ctrl-C stops cleanly. The link is on the server the device pairs with: pass `--server <url>` for your own Cabane.
39
+ Without a terminal, setup prints the same lines once and waits, so a container's logs carry the code. An expired code is replaced by a fresh one, up to three; Ctrl-C stops cleanly. The link is on the Cabane the device pairs with. There is no default: setup pairs with the Cabane named by `--server <url>`, by `CABANE_BASE_URL`, or by the device's config, and stops if none names one. Once a Cabane has issued a code, setup keeps its address, so after a cancelled or expired pairing a bare `cabane setup` pairs with the same one.
40
40
 
41
41
  From an interactive terminal, setup then starts the Companion in the background, waits for its first check-in and reports the device's state. Without an interactive terminal, setup stays attached to the running Companion.
42
42
 
@@ -54,7 +54,7 @@ If no harness is usable, interactive setup asks which one you want to set up. Fo
54
54
  Status cabane status Stop cabane stop Log cabane logs
55
55
  Start at login and keep Cabane updating itself: cabane service install
56
56
 
57
- In Cabane: https://app.cabane.ai/settings/devices
57
+ In Cabane: https://cabane.example.com/settings/devices
58
58
  ```
59
59
 
60
60
  Setup never installs the service. On macOS or Linux, run `cabane service install` when you want the Companion to start at login and keep itself updated; the closing block names it. Native Windows uses the background process and has no service installer.
package/dist/bin.js CHANGED
@@ -4,8 +4,12 @@
4
4
  var MIN_NODE_MAJOR = 22;
5
5
  var major = Number(process.versions.node.split(".")[0]);
6
6
  if (!(major >= MIN_NODE_MAJOR)) {
7
+ const found = `Cabane needs Node ${MIN_NODE_MAJOR} or newer, and this is Node ${process.versions.node}.`;
7
8
  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
+ process.platform === "win32" ? `${found} Install Node 22 or newer.
10
+ ` : `${found}
11
+ Install Node 22 or newer. Or, to install Cabane with its own Node, run the
12
+ installer line from Your settings \u2192 Devices \u2192 Add a device in your Cabane.
9
13
  `
10
14
  );
11
15
  process.exit(1);