70 lines
3.3 KiB
Markdown
70 lines
3.3 KiB
Markdown
# WristCode
|
|
|
|
An Apple Watch app for [T3 Code](https://t3.codes). It shows every T3 Code environment you run on
|
|
your wrist: which agents need you, what each one is doing right now, and what finished. You can
|
|
approve commands, answer questions, reply by dictation and start new threads. It works over the
|
|
watch's own cellular connection, with no phone nearby.
|
|
|
|
<p>
|
|
<img src="watch/screenshots/feed-activity.png" width="200" alt="Working threads with what each agent is doing">
|
|
<img src="watch/screenshots/thread-approval.png" width="200" alt="A command waiting for approval">
|
|
<img src="watch/screenshots/thread-earlier.png" width="200" alt="A finished thread with its messages">
|
|
</p>
|
|
|
|
## What it does
|
|
|
|
- A feed of every thread across your machines. Threads waiting on you come first, with Allow and
|
|
Deny right on the card. Working threads show the step the agent is on, such as the command it is
|
|
running or the file it is editing. Finished threads say how many files and lines they changed.
|
|
- Notifications when a thread needs you, finishes or fails. Approvals and single-choice questions
|
|
can be answered from the notification. You choose which kinds you get.
|
|
- Replies and new threads by dictation. A new thread can use any model the host offers, and can
|
|
start in a mode that asks before every action.
|
|
- Every thread, settled ones too, by host and project, and search across all of them.
|
|
- Subagent requests show up on the card of the thread that started them.
|
|
- Complications and a Smart Stack widget with the request that has waited longest, or what is
|
|
running now.
|
|
- A status screen with each host's connection and route, and a test notification.
|
|
|
|
## How it fits together
|
|
|
|
watchOS only lets audio apps use WebSockets, and T3 Code clients talk to their server over one. So
|
|
the watch talks HTTPS to a small gateway, and the gateway keeps a WebSocket open to each T3 Code
|
|
server.
|
|
|
|
```
|
|
Apple Watch --HTTPS--> gateway --WebSocket--> T3 Code server (one per machine)
|
|
|
|
|
+--APNs--> notifications on the watch
|
|
```
|
|
|
|
- `gateway/` is the gateway, in Bun and TypeScript, shipped as a container image.
|
|
- `watch/` is the watchOS app in SwiftUI. It is watch only, with no iPhone app.
|
|
- `deploy/` has a compose file and an example `.env` for the gateway.
|
|
- `scripts/renew-hosts.sh` renews the gateway's T3 sessions.
|
|
- `docs/` has the [setup guide](docs/setup.md), the [architecture](docs/architecture.md), the
|
|
[gateway API](docs/api.md) and the [T3 Code protocol notes](docs/t3-protocol.md).
|
|
- `mocks/` has the static HTML mocks I drew before building each screen.
|
|
|
|
## Setting it up
|
|
|
|
You need:
|
|
|
|
- One or more machines running T3 Code.
|
|
- A machine to run the gateway container, reachable from the internet over HTTPS so the watch can
|
|
use it on cellular. It needs to reach each T3 Code server, over your LAN, a VPN or a public URL.
|
|
- An Apple developer account, to build the watch app and to send notifications.
|
|
|
|
[docs/setup.md](docs/setup.md) walks through running the gateway, connecting your T3 Code
|
|
machines, building the app and pairing your watch.
|
|
|
|
## Status
|
|
|
|
I use it every day with five machines. It is young, and the gateway API can change between
|
|
versions, so update the gateway and the app together.
|
|
|
|
## License
|
|
|
|
MIT. See [LICENSE](LICENSE). `gateway/src/awareness.ts` is ported from T3 Code, which is also MIT
|
|
licensed. See [NOTICE](NOTICE).
|