@sidevoice/uplink 0.4.3 → 0.5.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 CHANGED
@@ -12,11 +12,11 @@ The client side. One bin (`sidevoice`), these entry points:
12
12
  room: it keeps one local connection to the connector for as long as the
13
13
  session lives, and the binding it registered dies with that connection.
14
14
  - `connector` — one per machine, started by the first façade that needs it and
15
- gone fifteen seconds after the last binding leaves. Holds the outbound
16
- WebSocket to the room, re-announces its bindings after a reconnect, keeps a
17
- durable outbox for speech published while offline, answers the room's
18
- heartbeat, and delivers one input event at a time per binding through the
19
- adapter that binding was registered with. A file lock makes it a singleton.
15
+ gone fifteen seconds after the last binding leaves. Holds the outbound link to
16
+ the room, re-announces its bindings on every reconnect, keeps a durable outbox
17
+ for speech published while offline, and delivers one input event at a time per
18
+ binding through the adapter that binding was registered with. A file lock
19
+ makes it a singleton.
20
20
  - `pair` — redeems, by hand, a pairing code from the room UI for this machine's
21
21
  credential (`~/.sidevoice/credentials.json`, mode 0600). The usual path is the
22
22
  conversation's `voice_pair`, with the code the user read from the room; nothing
@@ -29,11 +29,23 @@ or malformed declaration becomes `unknown`, never false. Claude Code, Codex and
29
29
  generic HTTP each have one module. See the repository's
30
30
  [`docs/HARNESS_CONTRACT.md`](../../docs/HARNESS_CONTRACT.md).
31
31
 
32
- Protocol (newline-free JSON over the WebSocket): `connector.hello` ->
33
- `connector.welcome`; `binding.register` (including declared harness capabilities)
34
- -> `binding.registered|rejected`;
35
- `binding.unregister`; `input.deliver` -> `input.ack`; `input.working`;
36
- `speech.publish` ->
37
- `speech.published`; `heartbeat` <-> `heartbeat.ack`. Protocol version 1.
32
+ The link is Socket.IO (`link.mjs`), to `/api/connectors/link` in the
33
+ namespace `/connectors`, WebSocket transport only. Who this connector is travels
34
+ in the connect handshake — `connector_id`, `token`, `protocol`, host and version
35
+ so a credential the room does not know never reaches an event; the room
36
+ refuses it with a message that says to pair again, and a refused credential is
37
+ not retried. Acknowledgements, keepalive and reconnection with backoff are the
38
+ library's. The durable outbox is not: a buffer dies with the process, and speech
39
+ a conversation was told was queued must not.
38
40
 
39
- Node 22+, no dependencies. Tests: `node --test test/test_connector.mjs`.
41
+ Events: `connector.welcome` after connecting; `binding.register` (carrying the
42
+ declared harness capabilities), answered with the binding or `{ error }`;
43
+ `binding.unregister`; `input.deliver`, answered with the acknowledgement;
44
+ `input.working`; `input.read`; `speech.publish`, answered with what the room did
45
+ with it; `binding.close`. Protocol version 2.
46
+
47
+ Node 22+. The published package has **no runtime dependencies**: `npm run build`
48
+ bundles `socket.io-client` and everything else into `dist/cli.mjs` with esbuild,
49
+ so installing it copies files and fetches nothing. Tests run on the source:
50
+ `node --test test/test_connector.mjs`; the room's `test_connector_interop.py`
51
+ runs this connector for real, from the checkout and from the bundle.