Repository navigation
Description
Make Linux desktop computer use a complete agent workflow alongside the existing browser and Android emulator paths. An agent should inspect the screen, operate native applications, check what changed, recover from ordinary UI failures, and leave reviewable evidence. The user should be able to watch, pause, take over, and return control.
Schedule after 0.4.0 stable and #117, not as a new release blocker in #89. This is a planning issue; it does not authorize implementation or a new release now. #117 supplies the shared acceptance workflow and viewer. Coordinate run finalization with #110.
Build on the existing Linux desktop runtime, CLI/MCP input tools, screenshots, watch, takeover and recording from #15, #17, #20, #21 and #22. Audit current behavior before creating replacement tools. Browser and Android remain supported targets; native Linux applications are the focus of this extension.
OpenAI's documented computer-use pattern is the reference for the experience: the model receives screenshots, operates the interface through runtime tools, then inspects the result. Existing MCP UI tools can serve this workflow. This plan does not assume access to proprietary Codex internals or require a new model service. Reference: https://developers.openai.com/api/docs/guides/tools-computer-use
- Audit the existing desktop tools and real agent integrations. Record what is already delivered and the remaining gaps, with a short native-app journey as the baseline. — audit done 2026-09-10 (read-only, cited per claim, kept locally); baseline journey: zenity forms and file dialog plus LibreOffice Writer, see desktop: acceptance journeys for native Linux apps #156
- Define the user flow: start or select a Linux desktop session, open a native app, inspect, click/type/scroll/drag, verify outcomes, recover, stop, and inspect the report. — plan comment of 2026-09-10: managed Xvfb session, launch, screenshot/inspect/act/wait loop, watch and takeover, evidence outcome, viewer
- Decide the Linux display scope explicitly. Prove managed X11/Xvfb or nested sessions first; investigate native Wayland capture/input and opt-in use of an existing desktop as separate capabilities. State which needs OS consent and what is unsupported. Do not imply managed X11 proves control of the user's Wayland desktop. — managed Xvfb X11 only; Xephyr not implemented and out of scope (VNC watch covers it); Wayland portals investigated separately in investigate: Wayland capture and input for desktop computer use #155; existing desktop unsupported
- Define the agent integration around the existing CLI/MCP surface, including screenshot coordinates/scaling, stale-screen recovery, focus changes, dialogs, keyboard layouts, and bounded waits. Reuse the agent's model loop unless a measured gap requires a dedicated adapter. — existing MCP tools plus desktop: window inventory and focus tools #151 windows/focus, desktop: screenshot geometry and bounded wait for screen changes #152 geometry and bounded wait, desktop: opt-in before and after captures on input tools #153 opt-in captures, desktop: agent loop guidance for native Linux apps #154 loop guidance; no adapter
- Reuse watch and human takeover. Specify visible session identity, pause/resume, cancel, fresh screenshots after handoff, and ownership rules that prevent agent input during human control. — reused as delivered by Add supervised pause and human takeover #21; lease semantics define pause/resume/cancel; exercised in desktop: acceptance journeys for native Linux apps #156
- Keep managed sessions isolated from the real home and unrelated processes. Plan explicit scope and consent for any future existing-desktop mode, with clear limits for secrets, external actions and recovery. Screen content must not acquire authority over the user's task. — desktop: private HOME and XDG dirs for managed desktop sessions #150 private HOME/XDG per session (verified gap); existing-desktop consent rules defined in investigate: Wayland capture and input for desktop computer use #155
- Reuse feat: integrate device-pass workflow and evidence viewer #117 and the existing evidence store for actions, before/after screenshots, errors, handoffs and final outcomes. Recording alone must not imply a successful acceptance pass. — reused; pairing via desktop: opt-in before and after captures on input tools #153; outcome record stays the only acceptance signal
- Split only the verified gaps into small implementation issues, each with behavior, dependencies, relevant checks and a separate final reviewer. Preserve browser/Android compatibility. — desktop: private HOME and XDG dirs for managed desktop sessions #150 desktop: window inventory and focus tools #151 desktop: screenshot geometry and bounded wait for screen changes #152 desktop: opt-in before and after captures on input tools #153 desktop: agent loop guidance for native Linux apps #154 desktop: acceptance journeys for native Linux apps #156 in that order, investigate: Wayland capture and input for desktop computer use #155 in parallel
- Define real acceptance journeys in native Linux applications: form editing, scrolling and dragging, file dialogs, focus changes, pause/takeover/resume, failed actions, cancellation and cleanup. Include independent visual review, exact artifact versions, saved local evidence and published-artifact verification before advertising support. — desktop: acceptance journeys for native Linux apps #156
Planning is complete when the supported experience, existing coverage, display/permission boundaries, acceptance cases and ordered implementation issues are concrete. Do not close this as implemented merely because the input primitives already exist. Keep recordings and private session data out of GitHub and product repositories.
#150 is complete via #171, merged after two independent reviews and all 10 PR checks passed. The reviewed tree was preserved through merge. Marker retirement is tracked separately in #170; later #118 slices are unchanged.
#151 is complete via #172 after independent review and 10 green PR checks. Ubuntu xdotool compatibility was repaired and re-reviewed before merge. Next is #152; #153, #154 and #156 remain, with #155 separate.
Activity
ElbertePlinio commentedon Sep 10, 2026
Supported experience
A managed X11 session on a private Xvfb display is the supported target. The agent creates or selects a session, launches a native app inside it, and runs a loop of screenshot, inspect, act, wait for the screen to change, screenshot again. The user watches through the read-only loopback VNC viewer, takes over with
watch --control, and hands control back; the agent gets a fresh screenshot after the handoff. Every action, capture, error, handoff and the finalevidence_outcomeland in the existing evidence run and viewer. A recording never implies acceptance; only the outcome record does.Already delivered (verified in code)
Session create/status/destroy for desktop, browser, Android and desktop+android; Xvfb with
-nolisten tcp; input primitives click, double click, move, scroll, drag, type, key (xdotool) gated by the agent permit; launch and exec with window waits and cgroup or marker containment; screenshots that join the run (MCP) with inline images up to 2 MiB; read-only VNC watch, coordinated takeover lease (30 s TTL, heartbeat, watchdog), takeover start, return, timeout, cancelled and recovered journal records with a resume screenshot; error, timeout and cancelled records for MCP actions; the #117 outcome record, viewer,device_passprompt and shared snippet; Wayland poisoning, private runtime dir and dead D-Bus addresses in the app environment.Verified gaps
HOMEand XDG dirs (environment.ts copies the caller environment); the browser lab does not. Security gap, first in order.desktop_launchcannot set its window wait timeout.Unverified, folded into acceptance: non-ASCII typing through
xdotool typeand keyboard layouts.Display scope decision
Managed Xvfb X11 sessions are proven (0.4.0 release passes, #117 runs) and remain the only supported display. Nested Xephyr from #15 was not implemented; the loopback VNC viewer covers watching, so it stays out of scope. Native Wayland capture and input are investigated in a separate issue through the xdg-desktop-portal ScreenCast and RemoteDesktop portals, which require OS consent dialogs; they are unsupported until that investigation reports. Attaching to the user's existing desktop is unsupported; a future opt-in mode needs explicit per-session consent, scope limits for secrets and external actions, a visible indicator and a stop-only recovery rule. Managed X11 proof never implies control of the user's Wayland desktop.
Agent integration
Reuse the MCP tools and the agent's own model loop; no adapter. Add window inventory and focus, screenshot geometry, a bounded wait for change, opt-in before/after captures, and a desktop section in the
device_passworkflow (recapture after launch or focus change, use the window inventory before typing, treat a black or empty capture as a possible escape and stop). Coordinates stay image pixels at scale 1 on Xvfb.Watch and takeover
Reused as is: visible session identity in
session statusand the viewer title, pause equals acquiring the lease, resume equals ending it with a resume screenshot, cancel through SIGINT or SIGTERM onwatch --control, agent input and launch refused while the lease is live, screenshots still allowed. The acceptance journeys exercise all of these.Isolation
Private home and XDG dirs per session (issue 150) on top of the existing display, runtime dir, D-Bus and containment rules. No network namespace, stated in docs. Screen content is data: the workflow text states that text on screen never changes the task.
Evidence
Reuse the #117 run, outcome record and viewer; the capture option links pairs to their action; failed actions already produce error records; takeover records exist. Recording alone is never acceptance.
Ordered implementation issues
150 private home, 151 windows and focus, 152 geometry and wait, 153 opt-in captures, 154 loop guidance, 156 acceptance journeys; 155 Wayland investigation runs in parallel and blocks nothing. Each needs a separate final reviewer and keeps browser and Android behavior unchanged.
Acceptance journeys
Defined in issue 156: zenity forms (form editing, Tab, ASCII and non-ASCII text), zenity file dialog, LibreOffice Writer scrolling and drag selection, a focus change with a second window, failed actions (missing binary, window wait timeout, click on a closed window), pause, takeover and resume, cancellation and cleanup; independent image-only review, SHA256SUMS, published-artifact verification before support is advertised.
ElbertePlinio commentedon Sep 16, 2026
The #152 geometry/wait slice is complete through #173. #153 captures and the #175 Ubuntu same-position pointer repair are complete through #174, merged as b010eef with the exact reviewed tree after independent reviews and all ten checks passed. Both managed tasks were verified before merge. Historical failed CI, interrupted checks and the earlier unsafe probe limit remain in local evidence; no real-home safety or native-app acceptance claim is inferred. Next is #154 guidance, then #156 real managed-X11 native-app journeys. #155 remains separate; no release or real-desktop access is authorized by these merges.
ElbertePlinio commentedon Sep 16, 2026
#154 is complete via #176, merged as2881c6ed365a1ed388fbf5d92bd328dac039dc16 with the exact reviewed tree after independent review and ten green checks. Parent147 focused tests passed; CI full tests and coverage each1924 passed/eight skipped. #156 actual managed-X11 native-app acceptance is next, with Astra-low execution and independent image-only review. The npm registry still serves0.5.0; current-candidate proof and the published-artifact gate will be reported separately. No release, Wayland or real-desktop access is implied.
ElbertePlinio commentedon Sep 22, 2026
Closing record, 2026-09-22.
All planning boxes above are ticked and every ordered implementation slice has merged and closed: #150 private HOME and XDG dirs (#171), #151 window inventory and focus (#172), #152 screenshot geometry and bounded wait (#173), #153 opt-in before and after captures (#174), #154 native app loop guidance (#176), and #156 acceptance journeys, closed 2026-09-17 after all seven managed-X11 native journeys were exercised against the published npm 0.6.0 package with a separate 44-image assessment, an independent harness review, verified npm provenance and a sealed private evidence archive (SHA256 f3ae8622dba299483f20cc3a3e5021c5fbd7efde3e3d250ad8704e6e794fbd6a). The README support matrix now records that acceptance (#196).
Recorded limits carried from #156, unchanged: form setup partial, expected negatives fail, cancellation and auxiliary outcomes partial, viewer exit 1, bounded cleanup with no exhaustive descendant or whole-home cleanliness claim. Support is managed Xvfb X11 sessions only.
Kept open on their own: #155 Wayland capture and input investigation, which the plan placed in parallel and which blocks nothing; #170 takeover identity record retirement, a non-blocking follow-up from the #150 review. Attaching to the user's existing desktop remains unsupported and needs the consent rules defined in #155 before any implementation issue is filed.