Files
wristcode/README.md
T

43 lines
1.4 KiB
Markdown

# WristCode
An Apple Watch client for [T3 Code](https://t3.codes). Browse threads across every T3 Code
environment you run, reply by dictation, start new threads, and get a notification when an agent
finishes. It works over the watch's own cellular connection, with no phone nearby.
Early work in progress.
## How it fits together
watchOS only allows WebSockets for audio streaming apps, and T3 Code clients talk to their server
over a WebSocket. So the watch talks HTTPS to a small gateway, and the gateway talks to each T3 Code
server.
```
Apple Watch --HTTPS--> gateway --WebSocket--> T3 Code server (one per environment)
|
+--APNs--> notifications on the watch
```
- `gateway/` is the gateway: Bun and TypeScript, shipped as a container image.
- `watch/` is the watchOS app: SwiftUI, watch only, no iPhone companion.
- `docs/` holds the design notes and the T3 Code protocol reference.
- `mocks/` holds static UI mocks of the watch screens.
## Auth
The gateway signs in to each T3 Code server with a scoped bearer session, limited to reading and
driving threads:
```sh
t3 auth session issue \
--scope orchestration:read --scope orchestration:operate \
--ttl 30d --label "WristCode gateway" --token-only
```
The watch pairs with the gateway once by entering a short code, and keeps the device token it gets
back in its Keychain.
## License
MIT