starbridge 0.1.0-rc.1 → 0.1.1

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.
Files changed (4) hide show
  1. package/README.md +78 -38
  2. package/dist/starbridge.js +2058 -1008
  3. package/package.json +18 -12
  4. package/LICENSE +0 -21
package/README.md CHANGED
@@ -3,7 +3,8 @@
3
3
  `starbridge` connects a machine that runs agents to your phone and browsers. Agents use it to ask
4
4
  you questions and report runs, and it uploads what each AI plan has left, read from CodexBar. It
5
5
  signs everything with this machine's key and encrypts it for your devices, so the server sees
6
- ciphertext only.
6
+ ciphertext only. CodexBar is optional: setup asks before installing it, `--no-quota` skips it,
7
+ and questions, runs and permission prompts work without it.
7
8
 
8
9
  ## Install
9
10
 
@@ -43,35 +44,48 @@ starbridge setup
43
44
 
44
45
  ### What setup does
45
46
 
46
- Setup asks before each step except pairing and the background service, and a rerun repairs only
47
- what is missing:
48
-
49
- 1. It pairs the machine with your account (see [Pair](#pair)). It asks for the server only when
50
- neither `--server` nor `STARBRIDGE_SERVER` names one.
51
- 2. It finds CodexBar, or installs it (Linux and macOS; CodexBar has no Windows build, so a
52
- Windows machine uploads no quotas): with Homebrew if you have it, else CodexBar's latest
53
- release tarball from GitHub, checked against the `.sha256` that release publishes, into
54
- `~/.local/opt/codexbar`. It installs nothing when the checksum is missing or does not match.
55
- Then it asks which providers' quotas to upload.
56
- 3. It installs the background service, `starbridge agent`, as a systemd user unit, a launchd
57
- agent, or on Windows a Scheduled Task that starts at logon without administrator rights and
58
- logs to `%LOCALAPPDATA%\starbridge\agent.log`.
59
- 4. It installs Starbridge in each agent it finds: the Claude Code plugin at user scope, the
60
- skill in Codex's skills folder, the Starbridge Pi package, and the skill and plugin in
61
- opencode's config folder. A later setup updates the Codex and opencode files when the CLI
62
- carries newer ones. The Claude Code plugin needs Claude Code 2.1.287 or later; setup says
63
- when it is older. Claude Code, Codex and Pi may then run `starbridge ask`, `waiting`,
64
- `working`, `wait` and `settle` without a permission prompt; `starbridge run` still asks, since
65
- the command it wraps can be anything. For Pi, setup adds these rules only when
66
- pi-permission-system is installed; `starbridge config permissions on` offers them later.
67
- 5. It asks whether to send [permission prompts](#permission-prompts) to your devices. The
68
- default is no.
69
- 6. It uploads a first quota snapshot, then offers to send a test question to your phone and
47
+ Setup asks only before installing CodexBar, which providers to send, whether the agent runs
48
+ after you log out, whether to add the CLI to your PATH, and whether to send a test
49
+ question; steps 1 and 3 say when it asks more. A rerun repairs only what is missing:
50
+
51
+ 1. It pairs the machine with your account (see [Pair](#pair)), with the first server named by
52
+ `--server`, `STARBRIDGE_SERVER`, the install script (each server's own names that server),
53
+ or the machine's pairing, else https://starbridge.run. It asks only when the machine is
54
+ already paired with another server, and Enter keeps that one.
55
+ 2. It installs Starbridge in each agent it finds and prints one line per agent: the Claude Code
56
+ plugin at user scope, the skill and sandbox rule in Codex's folders, the Starbridge Pi
57
+ package, and the skill and plugin in opencode's config folder. A failed install prints its
58
+ reason and the command that retries it, and setup goes on. A later setup updates the Codex
59
+ and opencode files when the CLI carries newer ones. The Claude Code plugin needs Claude Code
60
+ 2.1.287 or later; setup says when it is older. Claude Code, Codex and Pi may then run
61
+ `starbridge ask`, `waiting`, `working`, `wait` and `settle` without a permission prompt;
62
+ `starbridge run` still asks, since the command it wraps can be anything. For Pi, setup adds
63
+ these rules only when pi-permission-system is installed.
64
+ 3. When another machine of your account sent quotas in the last day, it says which and asks
65
+ whether to send them from this one too; Enter says no. Otherwise it finds CodexBar, or asks
66
+ to install it (Linux and macOS; CodexBar has no Windows build, so a Windows machine uploads
67
+ no quotas): with Homebrew if you have it, else CodexBar's latest release tarball from
68
+ GitHub, checked against the `.sha256` that release publishes, into `~/.local/opt/codexbar`.
69
+ It installs nothing when the checksum is missing or does not match. Then it asks which
70
+ providers' quotas to upload.
71
+ 4. It installs and starts the background service, `starbridge agent`, as a systemd user unit, a
72
+ launchd agent, or on Windows a Scheduled Task that starts at logon without administrator
73
+ rights and logs to `%LOCALAPPDATA%\starbridge\agent.log`.
74
+ 5. It uploads a first quota snapshot, then offers to send a test question to your phone and
70
75
  prints your answer.
71
76
 
72
- `--yes` takes every default and sends no test question. `--no-quota` skips step 2, CodexBar
73
- included; `--no-service` skips step 3; `--no-plugin` skips step 4, for every agent.
74
- `starbridge status` prints the same checks.
77
+ [Permission prompts](#permission-prompts) stay in the terminal unless you turn them on with
78
+ `starbridge config permissions on`; setup's last lines say so, with the commands that check and
79
+ remove the setup.
80
+
81
+ `--yes`, or running with no terminal, takes every default and sends no test question.
82
+ `--no-quota` skips step 3, CodexBar included; `--no-service` skips step 4; `--no-agents` skips
83
+ step 2. `starbridge status` prints the same checks, and names an agent installed since setup,
84
+ which `starbridge setup --refresh` then sets up.
85
+
86
+ `starbridge uninstall --agent <name>` (`claude`, `codex`, `pi` or `opencode`) removes Starbridge
87
+ from one agent. Setup and `--refresh` then leave that agent alone, until `starbridge setup
88
+ --agent <name>` installs it there again.
75
89
 
76
90
  ### Update and uninstall
77
91
 
@@ -89,8 +103,8 @@ app is left to them (`brew upgrade codexbar`). When a CodexBar release breaks, i
89
103
  a quota error on your devices; `starbridge update --codexbar 0.71.1` installs that release
90
104
  instead, until a later `starbridge update` moves it to the latest again.
91
105
 
92
- `starbridge uninstall` removes the agent service, the plugin and the binary, and asks your
93
- devices to revoke the machine. It deletes the keys only when you say so, or with `--purge`.
106
+ `starbridge uninstall` removes the agent service, Starbridge from every agent and the binary,
107
+ and asks your devices to revoke the machine. It deletes the keys only when you say so, or with `--purge`.
94
108
 
95
109
  ### Check a download
96
110
 
@@ -121,9 +135,19 @@ skill tells them when. `starbridge --help` lists every flag.
121
135
  starbridge pair
122
136
  ```
123
137
 
124
- It prints a code, a link and a QR code. Open the link in a browser where you are signed in, scan
125
- the QR code with your phone, or type the code in Settings → Devices → Add a device, on your phone
126
- or in the web app, which works from a machine with no browser. The code expires in 10 minutes.
138
+ It prints a code, a link and a QR code. Scan the QR code with the Starbridge Android app or your
139
+ phone's camera, open the link in a browser where you are signed in, or type the code in
140
+ Settings → Devices → Add a device, on your phone or in the web app, which works from a machine
141
+ with no browser. The code expires in 10 minutes.
142
+
143
+ The QR code is a `starbridge://` link that only the Android app opens, and it carries a check
144
+ key with which the app confirms the machine's check code by itself. Approved any other way, the machine prints its check
145
+ code and asks whether the Android app shows the same beside it under Devices: press Enter if so, `n` if not.
146
+ Where setup runs with no terminal, run `starbridge pair --confirm`, or `starbridge pair --reject`
147
+ if the codes differ. A code that differs means a server read your pairing code and paired the
148
+ machine into an account it controls ([PROTOCOL.md](../PROTOCOL.md#pairing)); the machine then
149
+ saves nothing.
150
+
127
151
  The machine pairs with
128
152
  https://starbridge.run unless you pass `--server https://starbridge.example` or set
129
153
  `STARBRIDGE_SERVER`.
@@ -207,10 +231,25 @@ To upload without the service:
207
231
  starbridge quota push --provider claude --provider codex
208
232
  ```
209
233
 
234
+ ### Quiet the phone while you're here
235
+
236
+ On a desktop or laptop you work at, turn on presence:
237
+
238
+ ```bash
239
+ starbridge config presence on
240
+ ```
241
+
242
+ While this machine's screen is unlocked and had keyboard or mouse input in the last minute,
243
+ notifications on your other devices wait for the time set in Starbridge's Settings (30 s by
244
+ default) and come only if the question is still open, so one you answer here doesn't buzz your
245
+ phone. The question itself shows everywhere at once. The machine reads its lock and idle time
246
+ itself and tells the server only yes or no. It works on macOS, Windows, and Linux under GNOME
247
+ or X11 with `xprintidle`; a machine with no screen sends nothing.
248
+
210
249
  ### Permission prompts
211
250
 
212
- Permission prompts from Claude Code, opencode and Pi stay at the keyboard until you turn them on,
213
- in setup or with:
251
+ Permission prompts from Claude Code, opencode and Pi stay at the keyboard until you turn them on
252
+ with:
214
253
 
215
254
  ```bash
216
255
  starbridge config permissions on
@@ -250,9 +289,10 @@ Keys and state live in `~/.config/starbridge` (or `$XDG_CONFIG_HOME/starbridge`,
250
289
  `$STARBRIDGE_CONFIG_DIR`), readable only by you. `starbridge config` prints this machine's
251
290
  settings.
252
291
 
253
- The Claude Code plugin's hooks call `starbridge hook …`. One of them turns Claude Code's
254
- `AskUserQuestion` into `starbridge ask`, so the question reaches you away from the terminal; if
255
- the machine is not paired or the server doesn't answer, it lets the question through. The
292
+ The Claude Code plugin's hooks call `starbridge hook …`. When Claude Code opens its
293
+ `AskUserQuestion` picker, `starbridge hook permission` posts the question to your devices too:
294
+ the first answer, in the picker or on a device, wins, and the other closes as answered
295
+ elsewhere. If the machine is not paired or the server can't be reached, only the picker asks. The
256
296
  opencode plugin runs `starbridge hook question --agent opencode` on each call of opencode's
257
297
  `question` tool: it posts each question to your devices and prints the answers for opencode,
258
298
  or nothing if the terminal answers first or the server can't be reached.