Skip to content
pi-c View Ticket
Login

View Ticket

tether: remote control of pic sessions (phone, browser, other agents)

Closeded086ebc04cb267b674b2584d3e0bfb6370c6cd5Created 9.5 days agoUpdated 1.9 days ago
Description2026-11-21 12:39:52
Plan and survey: https://artifacts.craftdesign.group/v/VIl_NA2YojRMWXH-ARYDV#b58c423bd5c24337074c1cf29492fe0380168665a2e8ac0e632d4033bb51701c Core feature. Recommendation: remote control is a property of the journal, with no server inside pic. Every command from any client is a committed journal row (unique key, sender, expiry) before it acts (builds on pic submit KEY + pic run and pic_queued). Clients are replicas that catch up by pic_entry.seq; in-flight text is one overwritten value (mosh-style), last. pic remote is a stateless sibling of the TUI on the shared store (#77): never takes a lease, dials out, never listens. Wire: Pi's RPC commands and events in an envelope (session, seq, key, sync, fetch); ACP later as an editor adapter. Transports: ssh stdio first (no new crypto), then a blind Cloudflare Worker/DO relay with QR pairing and Noise over P-256/HKDF/AES-GCM (BearSSL and WebCrypto). Phone: installed web page, Web Push sent by pic. Approvals: durable questions from a hook's ask that can wait with no process running. Stage 1: command inbox plus read-only observer over stdio, crash tests, no network. Owner decisions (12 on the page), chiefly: long-lived pic remote vs no daemon; the inbox changing shared-store rule 1; crypto suite and its review; where the relay and phone page live; whether to add durable questions.
2026-11-22 19:30:19

Stage 1 landed in #100: durable command inbox in the journal, pic send (steer/follow_up/abort), pic attach (live view; -i steers or starts a turn), durable abort, /remote-control (/rc) and pic rc with an ssh QR code. Next: live streaming, phone page, relay and pairing (owner decisions pending).

2026-11-22 20:07:42

Owner decisions for stage 2 (2026-11-22): relay + phone page (option A). Crypto: P-256 + HKDF + AES-GCM in a named Noise pattern; BearSSL in pic, WebCrypto in the page, no JS crypto shipped; outside review before ship. Hosting: a new Worker on the owner's Cloudflare account in its own repo (pic-relay), serving relay and page. pic remote: opt-in, stateless, killable, never takes a lease, on every supported platform (macOS and Linux), passphrase asked at every start. Remote permissions: same as local. Notifications: one line of content on the lock screen. Protocol: Pi RPC commands/events in an envelope; transport SSE + POST. Names: /rc and /remote-control, pic remote. Follow-up: durable questions (tool approvals from the phone) as a separate ticket.

2026-11-29 00:48:53
Built: the durable command inbox, pic send/attach, the relay and phone page with pairing, remote control from the phone (docs/manual/remote-control.md). Follow-ups are tracked in #76, #77, #80 and #105.