You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 48b2051
Browse filesBrowse the repository at this point in the historyBrowse files
feat(desktop): device registry, inbox and leased claims for a background executor
Adds the server half of the desktop background executor's device protocol,
behind the mothership-desktop-background-executor flag (off by default),
built on the existing tool-execution primitives rather than new ones:
- desktop_devices binds an install id to a user and the Better Auth session
that registered it; copilot_runs.desktop_device_id records which device a
turn's desktop tools run on (nothing sets it yet).
- Claims, renewals and results reuse claimToolExecution,
renewSimToolExecutionLease and the execution-owner fence. A background
executor's claim is the desktop claim plus an execution lease, only on a
run bound to that device; a result is accepted after its lease lapsed
until something else settles the call.
- /api/copilot/confirm and the device's complete share one sealing and
settlement function, so a device result is sealed, settled and published
exactly like a chat view's.
- POST /api/desktop/devices registers; GET /api/desktop/inbox lists calls,
approval_needed items (from permission_requested_at) and cancel items;
GET /api/desktop/inbox/stream is an SSE doorbell over Redis pub/sub.
- Presence is driven by the device: every pull, lease renewal and stream
open refreshes a 45 s key, and only its TTL removes it.
0 commit comments