Repository navigation
Description
Why
Users want to see where the agent moved, clicked, dragged or tapped. Today that is only visible when maim happens to be the screenshot tool (it blends the X cursor into Xvfb captures); the import, xwd and scrot fallbacks drop the cursor, browser sessions never have one because CDP input moves no pointer, and Android "Show taps" ignores adb shell input tap (Google issue 247152539, still open).
Managed sessions no longer touch the real pointer since #16 (Wayland env poisoned, owned Xvfb only). This issue does not change input at all.
Design
Draw the marker at view time from the recorded action, never into the captured PNGs. Screenshots the model receives and the MCP tool results stay byte-for-byte unchanged, so the feature costs the agent zero tokens. Captures stay untouched for hashes, redaction and re-inspection.
v1 is desktop only. Browser and Android markers need coordinate contracts that do not exist yet (see non-goals). Polish is tracked in #200.
Revised 2026-09-25 after an independent Astra review of the plan. Cuts: cursor theming (would change the pixels maim captures, breaking the unchanged-model-frames promise), a DISPLAY string test (wrong invariant), and a new status field (session status already prints the display).
Checklist
- Action producers record what a marker needs: both drag endpoints (today
packages/mcp-server/src/tools/desktop.tsstores only the destination), an explicit action-to-image association for the before/after captures, capture phase, and per-image dimensions. The CLI click and drag paths append action records too. Never infer that the next screenshot belongs to an action. -
SanitizedActionTargetinpackages/core/src/evidence-sanitize.tsgains a coordinate space (xvfb-rootfor v1); malformed or missing values are dropped, never guessed. New fields stay out of MCP tool responses. - Evidence viewer (
packages/core/src/evidence-render.ts) overlays a hollow ring at the recorded point and a start-to-end line for drags on the explicitly associated screenshots, rendered against the displayed image rectangle (letterboxing and actual-size mode). Static SVG/CSS inside the existing report, offline CSP preserved, overlay toggle, older or incomplete records stay unmarked. Attempted and completed input are distinguished. - Isolation regression test compares the input target against the session's owned Xvfb process and socket identity (see
packages/desktop-linux/src/display.tsownership tracking andinput.tsexplicit display), covering mismatched ownership, dead or recycled servers, and inherited host endpoints, with mocked commands or throwaway displays. - Tests for sanitization and viewer geometry;
bun run typecheck,bun run test,bun run test:coveragegreen. - Ship behind an
@pickforge/flagsdefault-off flag only if it merges before its enabling release; labelflaggedand remove the flag as part of the feature. Not needed: the feature was complete at merge in feat(evidence): show the agent pointer as a view-time overlay #218 and ships enabled in the next release. -
docs/releases/UNRELEASED.mdentry.
Non-goals
- Any model-visible cursor. Do not paint markers into frames sent to the agent. Revisit only with a concrete failure case.
- Cursor theming or size changes in the session (moved to evidence: agent cursor polish (glyphs, exports, browser overlay) #200 as a separate, validated capture policy).
- Browser markers: CDP captures can be viewport, full page, element crop or downscaled, and actions may carry an element UID without a point. Needs capture rectangle, output size and scroll state first (evidence: agent cursor polish (glyphs, exports, browser overlay) #200).
- Android markers: needs a verified input-to-capture orientation mapping without density guessing (evidence: agent cursor polish (glyphs, exports, browser overlay) #200).
- Browser DOM overlay, per-action glyphs, video export: evidence: agent cursor polish (glyphs, exports, browser overlay) #200.
- Wayland native input (investigate: Wayland capture and input for desktop computer use #155) and anything touching the real desktop pointer.
Evidence
Verified locally on a throwaway Xvfb (XFIXES present): maim blends the cursor, maim --hidecursor and import -window root do not, ffmpeg x11grab -draw_mouse 1 does. x11vnc sends cursor shape and position to viewers by default.
Activity
fix(evidence): mark only captures whose PNG matches the link
fix(cli): dispatch pointer input before claiming the evidence run
docs: mention pointer markers in the evidence report
fix(evidence): size markers only from fully valid PNGs