@av-pi-studio/server 0.0.11 → 0.0.13

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
@@ -182,6 +182,7 @@ All optional.
182
182
  | `PI_STUDIO_SERVICE_PROXY_LISTEN` | _(unset)_ | Service-proxy listen address |
183
183
  | `PI_STUDIO_SERVICE_PROXY_PUBLIC_BASE_URL` | _(unset)_ | Public base URL advertised for proxied services |
184
184
  | `PI_STUDIO_SERVICE_PROXY_ENABLED` | _(unset)_ | Enable the service proxy (`1`/`true`/`yes`/`on`) |
185
+ | `PI_STUDIO_APP_BASE_URL` | `https://app.pi-studio.sh` | Pairing link origin (`daemon pair`) — set to your own web-client URL for self-hosted/local pairing |
185
186
 
186
187
  > Literal IP addresses always pass the Host allowlist, so binding `0.0.0.0` and connecting via the
187
188
  > server's IP needs no extra config. To reach the daemon by **hostname**, add it to
@@ -229,11 +230,24 @@ extend the `pi` provider via `"extends": "pi"` (a custom provider must also set
229
230
 
230
231
  **Relay (opt-in, off by default):** with `daemon.relay.enabled: true`, the daemon dials outbound
231
232
  to the `endpoint` (a self-hosted `@av-pi-studio/relay` server or Cloudflare Workers deployment)
232
- after the WS server is up, so remote clients can reach it without an inbound port. See
233
+ after the WS server is up, so remote clients can reach it without an inbound port. It registers
234
+ under a **deterministic** rendezvous session id derived from its own persistent public key
235
+ (`deriveRelaySessionId`, `@av-pi-studio/relay`) — the same id on every (re)connect, so a pairing
236
+ link printed once (`pi-studio daemon pair`) keeps working across relay drops/restarts. See
233
237
  `@av-pi-studio/relay`'s README for running a relay (`pi-studio-relay` bin / `pi-studio relay
234
238
  start`). Direct WebSocket connections are completely unaffected either way — the relay only adds
235
239
  an additional connection path.
236
240
 
241
+ The same pairing link can be opened by any number of clients over the daemon's lifetime — each
242
+ one gets its own fresh E2EE handshake and its own daemon-side `Session` (see `relay-transport.ts`'s
243
+ `onHandshake` → `bootstrap.ts`'s `resetRelaySession()`); connecting a second client after a first
244
+ one disconnected is a normal, supported reconnection, not a re-pairing.
245
+
246
+ Terminal I/O and file-transfer chunks work over a relay connection too — the daemon and client
247
+ encrypt binary application data as the relay channel's `e2ee_bin` frame (a base64-wrapped JSON
248
+ text frame, not a raw binary WebSocket frame; see `@av-pi-studio/relay`'s README § Wire protocol),
249
+ so no daemon or web-client feature is direct-connection-only.
250
+
237
251
  ---
238
252
 
239
253
  ## The wire API