@geohar/un-bien 0.9.0 → 0.14.0
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 +99 -130
- package/dist/actions/handlers.js.map +1 -1
- package/dist/actions/registry.js.map +1 -1
- package/dist/bin/launcher.js.map +1 -1
- package/dist/commands/deps.d.ts +156 -0
- package/dist/commands/deps.js +2 -0
- package/dist/commands/deps.js.map +1 -0
- package/dist/commands/fork_link.d.ts +4 -0
- package/dist/commands/fork_link.js +45 -0
- package/dist/commands/fork_link.js.map +1 -0
- package/dist/commands/housekeeping.d.ts +34 -0
- package/dist/commands/housekeeping.js +275 -0
- package/dist/commands/housekeeping.js.map +1 -0
- package/dist/commands/info.d.ts +43 -0
- package/dist/commands/info.js +127 -0
- package/dist/commands/info.js.map +1 -0
- package/dist/commands/lifecycle.d.ts +45 -0
- package/dist/commands/lifecycle.js +708 -0
- package/dist/commands/lifecycle.js.map +1 -0
- package/dist/commands/pairing.d.ts +26 -0
- package/dist/commands/pairing.js +167 -0
- package/dist/commands/pairing.js.map +1 -0
- package/dist/commands/register.d.ts +12 -0
- package/dist/commands/register.js +255 -0
- package/dist/commands/register.js.map +1 -0
- package/dist/commands/relay.d.ts +28 -0
- package/dist/commands/relay.js +81 -0
- package/dist/commands/relay.js.map +1 -0
- package/dist/commands/session_ops.d.ts +52 -0
- package/dist/commands/session_ops.js +75 -0
- package/dist/commands/session_ops.js.map +1 -0
- package/dist/config.d.ts +2 -1
- package/dist/config.js.map +1 -1
- package/dist/daemon/install.d.ts +4 -3
- package/dist/daemon/install.js +7 -1
- package/dist/daemon/install.js.map +1 -1
- package/dist/enrich_tool_args.js.map +1 -1
- package/dist/extension_ui_bridge.js.map +1 -1
- package/dist/image_codec.js.map +1 -1
- package/dist/index.d.ts +32 -101
- package/dist/index.js +818 -2867
- package/dist/index.js.map +1 -1
- package/dist/launch.d.ts +9 -1
- package/dist/launch.js +39 -4
- package/dist/launch.js.map +1 -1
- package/dist/launcher/launcher.js +21 -2
- package/dist/launcher/launcher.js.map +1 -1
- package/dist/mcp/mesh_result.js.map +1 -1
- package/dist/mcp/mesh_server.js.map +1 -1
- package/dist/mesh/canonical.js +1 -1
- package/dist/mesh/canonical.js.map +1 -1
- package/dist/mesh/client.js.map +1 -1
- package/dist/mesh/encoding.js.map +1 -1
- package/dist/mesh/self_revoke.js.map +1 -1
- package/dist/mesh/siblings.js.map +1 -1
- package/dist/mesh/verify.js +1 -1
- package/dist/mesh/verify.js.map +1 -1
- package/dist/pairing/crypto.js +0 -1
- package/dist/pairing/crypto.js.map +1 -1
- package/dist/pairing/peer_trust.js.map +1 -1
- package/dist/pairing/qr.js.map +1 -1
- package/dist/pairing/storage.js +4 -3
- package/dist/pairing/storage.js.map +1 -1
- package/dist/panel_bridge.js +1 -0
- package/dist/panel_bridge.js.map +1 -1
- package/dist/paths.d.ts +22 -8
- package/dist/paths.js +37 -10
- package/dist/paths.js.map +1 -1
- package/dist/protocol/codec.js.map +1 -1
- package/dist/rooms.js +1 -4
- package/dist/rooms.js.map +1 -1
- package/dist/session/bridge.js.map +1 -1
- package/dist/session/broker.js.map +1 -1
- package/dist/session/broker_remote.js.map +1 -1
- package/dist/session/capabilities.d.ts +11 -0
- package/dist/session/capabilities.js +35 -0
- package/dist/session/capabilities.js.map +1 -0
- package/dist/session/cwd_lock.js +3 -3
- package/dist/session/cwd_lock.js.map +1 -1
- package/dist/session/debug_log.js +13 -3
- package/dist/session/debug_log.js.map +1 -1
- package/dist/session/envelope.js.map +1 -1
- package/dist/session/global_config.d.ts +1 -1
- package/dist/session/global_config.js +1 -1
- package/dist/session/global_config.js.map +1 -1
- package/dist/session/ipc.d.ts +2 -2
- package/dist/session/ipc.js.map +1 -1
- package/dist/session/leader_election.js.map +1 -1
- package/dist/session/local_config.d.ts +37 -0
- package/dist/session/local_config.js +45 -1
- package/dist/session/local_config.js.map +1 -1
- package/dist/session/mesh_node.d.ts +1 -1
- package/dist/session/mesh_node.js +1 -1
- package/dist/session/mesh_node.js.map +1 -1
- package/dist/session/peer.js.map +1 -1
- package/dist/session/peer_inventory.js.map +1 -1
- package/dist/session/peer_limits.js.map +1 -1
- package/dist/session/received_images.d.ts +63 -0
- package/dist/session/received_images.js +273 -0
- package/dist/session/received_images.js.map +1 -0
- package/dist/session/relay_lifecycle.d.ts +219 -0
- package/dist/session/relay_lifecycle.js +764 -0
- package/dist/session/relay_lifecycle.js.map +1 -0
- package/dist/session/rpc_envelope.d.ts +10 -0
- package/dist/session/rpc_envelope.js +9 -0
- package/dist/session/rpc_envelope.js.map +1 -1
- package/dist/session/rpc_handlers.d.ts +53 -0
- package/dist/session/rpc_handlers.js +268 -0
- package/dist/session/rpc_handlers.js.map +1 -0
- package/dist/session/rpc_inbound.d.ts +41 -6
- package/dist/session/rpc_inbound.js +55 -0
- package/dist/session/rpc_inbound.js.map +1 -1
- package/dist/session/setup_wizard.js.map +1 -1
- package/dist/session/tools.js.map +1 -1
- package/dist/session/wizard.js.map +1 -1
- package/dist/state_migration.d.ts +45 -0
- package/dist/state_migration.js +104 -0
- package/dist/state_migration.js.map +1 -0
- package/dist/subagent_rooms.d.ts +19 -0
- package/dist/subagent_rooms.js +146 -14
- package/dist/subagent_rooms.js.map +1 -1
- package/dist/test_hooks.d.ts +180 -0
- package/dist/test_hooks.js +98 -0
- package/dist/test_hooks.js.map +1 -0
- package/dist/transport/peer_channel.d.ts +11 -0
- package/dist/transport/peer_channel.js +34 -11
- package/dist/transport/peer_channel.js.map +1 -1
- package/dist/transport/pi_forward_client.js.map +1 -1
- package/dist/transport/relay_client.d.ts +5 -2
- package/dist/transport/relay_client.js +6 -3
- package/dist/transport/relay_client.js.map +1 -1
- package/dist/ui/footer.js.map +1 -1
- package/docs/daemon.md +160 -170
- package/package.json +1 -1
- package/service-templates/launchd.plist.template +5 -4
- package/service-templates/systemd.service.template +3 -2
package/docs/daemon.md
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Remote launch & launcher daemon — troubleshooting
|
|
2
2
|
|
|
3
|
-
Companion to the README's [
|
|
3
|
+
Companion to the README's [Remote launch](../README.md#remote-launch) section.
|
|
4
4
|
Each scenario starts with the symptom you'd actually observe, followed by
|
|
5
|
-
likely causes and how to fix.
|
|
5
|
+
likely causes and how to fix it.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## 1. `unbien install` fails
|
|
10
10
|
|
|
11
|
-
### "
|
|
11
|
+
### "launcher script not found"
|
|
12
12
|
|
|
13
|
-
```
|
|
14
|
-
[un-bien] install failed: Error:
|
|
15
|
-
/Users/x/dist/bin/
|
|
13
|
+
```text
|
|
14
|
+
[un-bien] install failed: Error: launcher script not found at
|
|
15
|
+
/Users/x/dist/bin/launcher.js. Run `pnpm build` (dev) or
|
|
16
16
|
`npm install -g @geohar/un-bien` (prod) first.
|
|
17
17
|
```
|
|
18
18
|
|
|
@@ -24,21 +24,20 @@ exist yet, or from a partial install.
|
|
|
24
24
|
cd extension && pnpm build
|
|
25
25
|
|
|
26
26
|
# Production install:
|
|
27
|
-
npm install -g @geohar/un-bien
|
|
28
|
-
which pi-supervisord # confirm bin is on PATH
|
|
27
|
+
npm install -g @geohar/un-bien
|
|
29
28
|
unbien install
|
|
30
29
|
```
|
|
31
30
|
|
|
32
31
|
### "launchctl: bootstrap … already running"
|
|
33
32
|
|
|
34
33
|
A previous install left a stale entry. The fix is built into `install` —
|
|
35
|
-
re-run it and the
|
|
36
|
-
|
|
34
|
+
re-run it and the launcher unloads the old entry before bootstrapping the
|
|
35
|
+
new one. If it still fails:
|
|
37
36
|
|
|
38
37
|
```bash
|
|
39
|
-
launchctl bootout gui/$(id -u) ~/Library/LaunchAgents/dev.unbien.
|
|
40
|
-
launchctl unload ~/Library/LaunchAgents/dev.unbien.
|
|
41
|
-
rm ~/Library/LaunchAgents/dev.unbien.
|
|
38
|
+
launchctl bootout gui/$(id -u) ~/Library/LaunchAgents/dev.unbien.launcher.plist
|
|
39
|
+
launchctl unload ~/Library/LaunchAgents/dev.unbien.launcher.plist 2>/dev/null
|
|
40
|
+
rm ~/Library/LaunchAgents/dev.unbien.launcher.plist
|
|
42
41
|
unbien install
|
|
43
42
|
```
|
|
44
43
|
|
|
@@ -54,237 +53,228 @@ systemctl --user daemon-reload
|
|
|
54
53
|
unbien install
|
|
55
54
|
```
|
|
56
55
|
|
|
56
|
+
### Windows: the UAC prompt fails or is declined
|
|
57
|
+
|
|
58
|
+
`unbien install` needs elevation **once** — only the `schtasks /Create`
|
|
59
|
+
that registers the task requires admin. Accept the prompt when it appears.
|
|
60
|
+
Stopping/starting the task afterwards (`/End`, `/Run`) works un-elevated.
|
|
61
|
+
|
|
57
62
|
---
|
|
58
63
|
|
|
59
|
-
## 2.
|
|
64
|
+
## 2. The launcher doesn't start at login
|
|
60
65
|
|
|
61
66
|
### Check the service status
|
|
62
67
|
|
|
63
68
|
```bash
|
|
64
69
|
# Linux
|
|
65
|
-
systemctl --user status unbien-
|
|
66
|
-
journalctl --user -u unbien-
|
|
70
|
+
systemctl --user status unbien-launcher
|
|
71
|
+
journalctl --user -u unbien-launcher -n 50
|
|
67
72
|
|
|
68
73
|
# macOS
|
|
69
|
-
launchctl list | grep unbien
|
|
70
|
-
tail -100 ~/.
|
|
74
|
+
launchctl list | grep dev.unbien
|
|
75
|
+
tail -100 ~/.local/state/un-bien/launcher.log
|
|
71
76
|
```
|
|
72
77
|
|
|
73
78
|
### Common failures
|
|
74
79
|
|
|
75
|
-
- **`
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
80
|
+
- **`node: cannot find module …`** or immediate exit — the absolute paths
|
|
81
|
+
baked into the unit/plist no longer match where the package lives. This
|
|
82
|
+
happens when you reinstall Node via a version manager (nvm/fnm) or
|
|
83
|
+
uninstall/reinstall the package to a different location. Fix:
|
|
84
|
+
`unbien uninstall && unbien install` (install snapshots the current
|
|
85
|
+
node binary and paths).
|
|
86
|
+
- **`tmux: command not found`** (at launch time, not startup) — the PATH
|
|
87
|
+
captured at install time didn't include the remote-launch backend.
|
|
88
|
+
Install tmux (or herdr), then re-run `unbien install` to refresh PATH.
|
|
89
|
+
- **First connect race** — the launcher logs `initial connect failed (…)
|
|
90
|
+
— retrying every 3000ms` and retries on its own. This is normal when
|
|
91
|
+
the relay starts in the same breath; it clears once the relay is up.
|
|
86
92
|
|
|
87
|
-
### Run the
|
|
93
|
+
### Run the launcher in the foreground for debugging
|
|
88
94
|
|
|
89
|
-
Bypass systemd/launchd and run it directly so you can see startup
|
|
90
|
-
|
|
95
|
+
Bypass systemd/launchd and run it directly so you can see startup errors
|
|
96
|
+
live:
|
|
91
97
|
|
|
92
98
|
```bash
|
|
93
|
-
|
|
94
|
-
# or
|
|
99
|
+
unbien-launcher # from @geohar/un-bien-launcher
|
|
100
|
+
# or, from the extension package:
|
|
101
|
+
node $(npm root -g)/@geohar/un-bien/dist/bin/launcher.js
|
|
95
102
|
```
|
|
96
103
|
|
|
97
|
-
|
|
98
|
-
|
|
104
|
+
If it prints `[un-bien launcher] listening on control room …` and stays
|
|
105
|
+
up, the daemon itself is fine — the problem is in the unit/plist
|
|
106
|
+
environment (PATH, node path). Re-run `unbien install`.
|
|
99
107
|
|
|
100
108
|
---
|
|
101
109
|
|
|
102
|
-
## 3.
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
110
|
+
## 3. Remotely launched pis can't read the keychain (tmux security sessions)
|
|
111
|
+
|
|
112
|
+
**Symptoms:** a remote launch opens the tmux window but pi dies silently (no
|
|
113
|
+
output, no stderr), or fails with `No identity could be read, but N device(s)
|
|
114
|
+
are already paired — refusing to generate a NEW one` (the
|
|
115
|
+
`PairedIdentityMissingError` guard). An `identity.json.bogus-*` file appears
|
|
116
|
+
in the state root. Everything works when you start pi yourself in Terminal.
|
|
117
|
+
|
|
118
|
+
**Cause — macOS security sessions:** keychain access follows the _security
|
|
119
|
+
session_ a process was spawned into, and every tmux pane inherits the tmux
|
|
120
|
+
**server's** context — not the terminal that opened the window. With
|
|
121
|
+
`launch.backend: "tmux"` the server is created by whichever process first
|
|
122
|
+
needed it: the launcher. If the launcher was started from a detached or
|
|
123
|
+
session-poor context (a daemon, a service manager like `sharedserver`, SSH),
|
|
124
|
+
the tmux server it creates carries that context and **denies keychain access
|
|
125
|
+
to every pane it ever hosts**. Worse, the server **outlives the launcher**:
|
|
126
|
+
killing/restarting the launcher just attaches new windows to the orphaned
|
|
127
|
+
server, so a bad creation context persists across launcher restarts.
|
|
128
|
+
|
|
129
|
+
A second wrinkle: a keychain read can require an **ACL confirmation** when
|
|
130
|
+
the reading binary differs from the one that created the item (e.g. after an
|
|
131
|
+
nvm/npm reinstall swaps the node binary). A background process has no path to
|
|
132
|
+
the Security Agent UI, so it gets `errSecInteractionNotAllowed` instead of a
|
|
133
|
+
prompt — same symptom, same fixes.
|
|
134
|
+
|
|
135
|
+
**Recovery:** kill the orphaned tmux server so the next launch recreates it
|
|
136
|
+
from a healthy context:
|
|
111
137
|
|
|
112
138
|
```bash
|
|
113
|
-
#
|
|
114
|
-
journalctl --user -u unbien-supervisord -f | grep '\[/Users/x/Movies\]'
|
|
115
|
-
|
|
116
|
-
# macOS
|
|
117
|
-
tail -f ~/.pi/un-bien/supervisord.log | grep '\[/Users/x/Movies\]'
|
|
139
|
+
tmux kill-session -t un-bien # or tmux kill-server (kills ALL sessions)
|
|
118
140
|
```
|
|
119
141
|
|
|
120
|
-
|
|
142
|
+
**Lasting fixes (any one of these):**
|
|
121
143
|
|
|
122
|
-
|
|
144
|
+
1. **Pre-seed the tmux session from your own Terminal** — the server then
|
|
145
|
+
lives in your GUI login session for good, and the launcher only ever adds
|
|
146
|
+
windows to it:
|
|
123
147
|
|
|
124
|
-
```bash
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
Common reasons a daemon won't start:
|
|
148
|
+
```bash
|
|
149
|
+
tmux new-session -d -s un-bien
|
|
150
|
+
```
|
|
130
151
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
- **Pi extension config drift.** Pi's own settings (model, API keys)
|
|
136
|
-
reset → daemon fails to authenticate to the provider. Run
|
|
137
|
-
`cd <cwd> && pi` interactively to fix.
|
|
138
|
-
- **Port/UDS collision.** Another Pi process is already running in
|
|
139
|
-
that cwd. The cwd-lock should reject the second one, but stale UDS
|
|
140
|
-
sockets sometimes linger; check `lsof ~/.pi/un-bien/locks/<roomId>.sock`.
|
|
152
|
+
2. **Run the launcher as a login service** (`unbien install` — launchd
|
|
153
|
+
LaunchAgent / systemd `--user`), not from a detached daemon: the launcher
|
|
154
|
+
— and any tmux server it creates — stays inside your login session where
|
|
155
|
+
the keychain just works.
|
|
141
156
|
|
|
142
|
-
|
|
157
|
+
3. **The context-proof option — seed the file identity fallback.** The
|
|
158
|
+
resolver reads `~/.local/state/un-bien/identity.json` automatically
|
|
159
|
+
whenever the keychain throws (no prompt, no re-pairing, any security
|
|
160
|
+
session):
|
|
143
161
|
|
|
144
|
-
|
|
162
|
+
```bash
|
|
163
|
+
security find-generic-password -s dev.unbien.pi -a longterm-ed25519 -w \
|
|
164
|
+
> ~/.local/state/un-bien/identity.json
|
|
165
|
+
chmod 600 ~/.local/state/un-bien/identity.json
|
|
166
|
+
```
|
|
145
167
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
168
|
+
**Related:** the launcher needs your env (`PI_CODING_AGENT_DIR`, and
|
|
169
|
+
`UNBIEN_RELAY`/`UNBIEN_STATE_DIR` if you use them) in its spawn context. If
|
|
170
|
+
you run it under a service manager, pin them explicitly in the server
|
|
171
|
+
definition's env map instead of relying on ambient shell env — a daemon's
|
|
172
|
+
children inherit the _daemon's_ environment, not your shell's.
|
|
149
173
|
|
|
150
174
|
---
|
|
151
175
|
|
|
152
|
-
## 4.
|
|
176
|
+
## 4. The app can't launch a session on this machine
|
|
153
177
|
|
|
154
|
-
The
|
|
155
|
-
|
|
156
|
-
retry budget.
|
|
178
|
+
The launcher is running and the app sees the machine's control room, but
|
|
179
|
+
launch requests do nothing.
|
|
157
180
|
|
|
158
|
-
|
|
159
|
-
unbien daemon status # is state running?
|
|
160
|
-
unbien daemon start # spawn any that aren't running
|
|
161
|
-
# Then retry send.
|
|
162
|
-
```
|
|
181
|
+
### Remote launch is not enabled for that directory
|
|
163
182
|
|
|
164
|
-
|
|
165
|
-
isn't actually spawning. Possible reasons:
|
|
166
|
-
- Registry empty: `unbien daemons` to verify.
|
|
167
|
-
- Child crashes faster than the status check: `daemon status` immediately
|
|
168
|
-
after start may still show `running` for a few seconds before the
|
|
169
|
-
exit event marks it crashed. Re-check 2-3 seconds later.
|
|
170
|
-
|
|
171
|
-
---
|
|
183
|
+
The launcher only honors `session_launch` where it's opted in:
|
|
172
184
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
### Confirm the daemon is paired
|
|
178
|
-
|
|
179
|
-
`pair_request` must have happened **before** the folder became a daemon
|
|
180
|
-
(daemons don't show QRs themselves):
|
|
181
|
-
|
|
182
|
-
```bash
|
|
183
|
-
cd <daemon-cwd>
|
|
184
|
-
pi
|
|
185
|
-
> /unbien devices # confirm the device is listed
|
|
186
|
-
> /unbien stop # stop interactive session — daemon takes over
|
|
187
|
-
unbien daemon restart
|
|
185
|
+
```jsonc
|
|
186
|
+
// <cwd>/.pi/un-bien/config.json — per directory
|
|
187
|
+
{ "allow_remote_launch": true }
|
|
188
188
|
```
|
|
189
189
|
|
|
190
|
-
|
|
190
|
+
or machine-wide, in `~/.pi/extensions/un-bien.json`:
|
|
191
191
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
with:
|
|
195
|
-
|
|
196
|
-
```bash
|
|
197
|
-
cd <daemon-cwd>
|
|
198
|
-
pi
|
|
199
|
-
> /unbien status
|
|
192
|
+
```jsonc
|
|
193
|
+
{ "defaults": { "allow_remote_launch": true } }
|
|
200
194
|
```
|
|
201
195
|
|
|
202
|
-
|
|
203
|
-
not, update the relay URL and bounce the daemon:
|
|
196
|
+
### Turn on the diagnostic log
|
|
204
197
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
198
|
+
The launcher writes its decisions to the envelope debug log. Enable it in
|
|
199
|
+
`~/.pi/extensions/un-bien.json`:
|
|
200
|
+
|
|
201
|
+
```jsonc
|
|
202
|
+
{ "debug": { "envelope": true } }
|
|
208
203
|
```
|
|
209
204
|
|
|
210
|
-
|
|
205
|
+
then reproduce and read
|
|
206
|
+
`~/.local/state/un-bien/envelope-debug.log` — look for
|
|
207
|
+
`remote launch disabled on this machine` (the opt-in above) or
|
|
208
|
+
`session_launch error: …` (the backend failing to spawn).
|
|
211
209
|
|
|
212
|
-
|
|
210
|
+
### The backend is missing or misconfigured
|
|
213
211
|
|
|
214
|
-
|
|
215
|
-
|
|
212
|
+
`launch.backend` in the global config picks the spawn mechanism — `tmux`
|
|
213
|
+
(default) or `herdr`. The chosen binary must be on the PATH the service
|
|
214
|
+
inherited (see §2). Verify what the launcher will use from any Pi
|
|
215
|
+
session: `/unbien config`.
|
|
216
216
|
|
|
217
|
-
|
|
218
|
-
cat ~/.pi/un-bien/daemons.json # inspect
|
|
219
|
-
```
|
|
217
|
+
### "Peer not paired — re-scan QR"
|
|
220
218
|
|
|
221
|
-
The
|
|
219
|
+
The app's device key isn't in this machine's `peers.json` (never paired
|
|
220
|
+
here, or revoked). Pairing is interactive: run `/unbien pair` in any Pi
|
|
221
|
+
session on the machine and scan the QR from the app.
|
|
222
222
|
|
|
223
|
-
|
|
224
|
-
{
|
|
225
|
-
"daemons": [
|
|
226
|
-
{ "cwd": "/Users/x/Movies" },
|
|
227
|
-
{ "cwd": "/Users/x/Projects/backend" }
|
|
228
|
-
]
|
|
229
|
-
}
|
|
230
|
-
```
|
|
223
|
+
---
|
|
231
224
|
|
|
232
|
-
|
|
233
|
-
and re-create:
|
|
225
|
+
## 5. The app can't see the machine at all
|
|
234
226
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
```
|
|
227
|
+
- **Relay mismatch.** The launcher uses the same global relay config as
|
|
228
|
+
the extension — check `/unbien config` and make sure the app is pointed
|
|
229
|
+
at the same URL.
|
|
230
|
+
- **Launcher not running.** Check §2; the control room only exists while
|
|
231
|
+
the launcher is connected.
|
|
241
232
|
|
|
242
233
|
---
|
|
243
234
|
|
|
244
|
-
##
|
|
235
|
+
## 6. Uninstall cleanly + re-install from scratch
|
|
245
236
|
|
|
246
237
|
When you suspect everything is misconfigured:
|
|
247
238
|
|
|
248
239
|
```bash
|
|
249
|
-
unbien uninstall
|
|
250
|
-
rm -rf ~/.
|
|
240
|
+
unbien uninstall # removes the service, keeps config + pairing
|
|
241
|
+
rm -rf ~/.local/state/un-bien # nukes pairing + identity (re-pair after this)
|
|
251
242
|
npm uninstall -g @geohar/un-bien
|
|
252
243
|
npm install -g @geohar/un-bien
|
|
253
244
|
unbien install
|
|
254
|
-
# Then re-pair
|
|
245
|
+
# Then re-pair from scratch: pi → /unbien pair
|
|
255
246
|
```
|
|
256
247
|
|
|
257
|
-
This is the "nuke everything" path. After
|
|
258
|
-
|
|
259
|
-
|
|
248
|
+
This is the "nuke everything" path. After it, the only state left is each
|
|
249
|
+
cwd's `<cwd>/.pi/un-bien/config.json`, which you can keep or delete for a
|
|
250
|
+
full reset.
|
|
260
251
|
|
|
261
252
|
---
|
|
262
253
|
|
|
263
|
-
##
|
|
254
|
+
## 7. Diagnostic commands cheat-sheet
|
|
264
255
|
|
|
265
256
|
```bash
|
|
266
|
-
#
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
echo '{"op":"list"}' | nc -U ~/.pi/un-bien/supervisor.sock
|
|
271
|
-
|
|
272
|
-
# Where are the daemon configs?
|
|
273
|
-
find ~/Projects -name "config.json" -path "*/.pi/un-bien/*" 2>/dev/null
|
|
257
|
+
# Service status
|
|
258
|
+
systemctl --user status unbien-launcher # Linux
|
|
259
|
+
launchctl list | grep dev.unbien # macOS
|
|
260
|
+
schtasks /Query /TN RemotePiLauncher # Windows
|
|
274
261
|
|
|
275
|
-
#
|
|
276
|
-
|
|
262
|
+
# Logs
|
|
263
|
+
journalctl --user -u unbien-launcher -f # Linux
|
|
264
|
+
tail -f ~/.local/state/un-bien/launcher.log # macOS / Windows
|
|
277
265
|
|
|
278
|
-
#
|
|
279
|
-
cat ~/.pi/un-bien
|
|
266
|
+
# Global config the launcher reads (relay, launch backend, defaults)
|
|
267
|
+
cat ~/.pi/extensions/un-bien.json
|
|
280
268
|
|
|
281
|
-
#
|
|
282
|
-
|
|
269
|
+
# Paired devices (per machine)
|
|
270
|
+
cat ~/.local/state/un-bien/peers.json
|
|
283
271
|
|
|
284
|
-
#
|
|
285
|
-
unbien
|
|
272
|
+
# What the extension thinks (from any Pi session, in pi):
|
|
273
|
+
# /unbien config
|
|
274
|
+
# /unbien status
|
|
275
|
+
# /unbien devices
|
|
286
276
|
```
|
|
287
277
|
|
|
288
278
|
If after walking the list you're still stuck, file an issue with the
|
|
289
|
-
output of
|
|
290
|
-
|
|
279
|
+
output of the service status, the launcher log, and the contents of
|
|
280
|
+
`~/.pi/extensions/un-bien.json`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geohar/un-bien",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Mobile remote control and local agent mesh for the Pi coding agent. Pair your phone via QR over a relay, watch tool calls in real time, run multi-Pi sessions over a local Unix Domain Socket broker, and let agents talk to each other through structured request/reply. Derived from remote-pi by Jacob Moura (https://github.com/jacobaraujo7/remote_pi), MIT.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -18,14 +18,15 @@
|
|
|
18
18
|
<true/>
|
|
19
19
|
|
|
20
20
|
<key>StandardOutPath</key>
|
|
21
|
-
<string>{
|
|
21
|
+
<string>{LOG}</string>
|
|
22
22
|
<key>StandardErrorPath</key>
|
|
23
|
-
<string>{
|
|
23
|
+
<string>{LOG}</string>
|
|
24
24
|
|
|
25
25
|
<key>EnvironmentVariables</key>
|
|
26
26
|
<dict>
|
|
27
|
-
<!-- Inherit the user's shell PATH so `
|
|
28
|
-
same
|
|
27
|
+
<!-- Inherit the user's shell PATH so `tmux`/`herdr` (the remote-launch
|
|
28
|
+
backends) and `pi` resolve the same way they would in Terminal.app
|
|
29
|
+
(Homebrew / npm-global / etc.). -->
|
|
29
30
|
<key>PATH</key>
|
|
30
31
|
<string>{PATH}</string>
|
|
31
32
|
<key>HOME</key>
|
|
@@ -10,8 +10,9 @@ Restart=on-failure
|
|
|
10
10
|
RestartSec=5s
|
|
11
11
|
StandardOutput=journal
|
|
12
12
|
StandardError=journal
|
|
13
|
-
# Inherit the user's shell PATH so `
|
|
14
|
-
#
|
|
13
|
+
# Inherit the user's shell PATH so `tmux`/`herdr` (remote-launch backends)
|
|
14
|
+
# and `pi` resolve to the same binaries they would in an interactive shell
|
|
15
|
+
# (npm-global / Homebrew / etc.).
|
|
15
16
|
Environment="PATH={PATH}"
|
|
16
17
|
Environment="HOME={HOME}"
|
|
17
18
|
|