Entry point:
AGENTS.md. Usage for humans:tools/p2p-radio/README.md.
Nearby messaging. Huddle on: iOS browses and advertises. Flick the caption up (±60°) to send. Mac CLI sends and receives. No cellular, no server.
| Piece | Behavior |
|---|---|
| Huddle icon, top right | Off by default. On = browse + advertise Multipeer cc-p2p. Stays up if you switch apps or lock the phone until you turn it off, force-quit, or the auto-off timer (Settings → General, default 30 minutes). One local notification per launch, only if Huddle is on and you lock the phone or leave the app for 60s. Allow Notifications on first Huddle-on. |
| Huddle status (left of icon) | Off: Tap to join. On: Huddle, then ↓ B/s and ↑ B/s (rolling 30s average). Detailed counters are in Settings → KPIs. |
| Relay messages | Settings → Preferences → Nearby. On by default. Huddle must be on. Forwards payloads that have an id (TTL 4). v1 / no-id packets are displayed only, not forwarded. No catch-up. |
| Live log strip | Directly above the bottom banner. Transparent. New York serif (AppType.display) like captions / Settings titles. Multi-line until 180 characters. Relative age (1s ago). Height hugs one row, then grows to 50pt + 75% and scrolls. Top of a full window fades to clear; latest row stays at the bottom. |
| Log row | [display name] message… HH:mm:ss — one line, message truncated. Newest at the bottom. Max 200 rows; oldest is dropped. |
| Display name | Settings → General → User info. Defaults to device host name; user can change it. |
| Center caption | Speech / keyboard / poof only. Incoming P2P never replaces it. |
| Mac peer | tools/p2p-radio advertises + browses. Sends only what you type. Prints incoming as [name] text HH:mm:ss. |
Huddle on browses and advertises. Two phones with Huddle on can see each other. Flick the center caption up (or within 60° of up) anywhere on the canvas to send. Wrong direction shows Try again + ↑, then the caption returns. After a successful send, Sent! fades like Poof!!!.
device-deploy.md).cd tools/p2p-radio && swift run p2p-radio (no default message).SpeechService, history, or the center caption.Info.plist / generated keys:
NSLocalNetworkUsageDescriptionNSBonjourServices = _cc-p2p._tcpNSBluetoothAlwaysUsageDescriptionaudio, bluetooth-central, bluetooth-peripheral (Huddle can keep advertising while backgrounded; iOS may still suspend)connecting then notConnected, rebuild the app and restart swift run p2p-radio. Required encryption without a certificate often fails iOS↔Mac ICE.P2PConfig.swift copies in the app and the tool identical.