Commit graph

6 commits

Author SHA1 Message Date
Lahfir
d319daa745 fix: close reliability review gaps 2026-06-17 16:10:41 -07:00
Lahfir
c16540b37a docs: capture three round-4 review learnings and grow the concept map
Documents the abort-state contract for multi-step physical input (guard
disarm ordering, origin release, end-state suggestions), the three-layer
repr(C) size-pinning discipline born from the AdAction silent-growth
incident, and the named-arms-plus-exhaustiveness-guard pattern for
policy/dispatch mirrors. CONCEPTS.md gains Action Chain and Protected
Process and refreshes Coordinate Fallback with the window-topmost rule.
2026-06-17 13:43:19 -07:00
Lahfir
9ad0e889b2 feat: add Playwright-style headed/headless interaction mode
Ref actions now run in exactly two modes. Headless is the default: semantic
accessibility operations only, no cursor movement, and a fail-closed
POLICY_DENIED when only a physical gesture would work. The global --headed flag
upgrades every ref action to permit focus stealing and cursor movement, so the
chain's physical click/double-click/scroll/keypress fallbacks can complete. The
AX path is always tried first, so --headed never regresses headless-capable
elements; it only adds fallbacks for elements that need a real gesture.

- CommandContext::request(action, base) builds the per-command request: each
  command declares its headless base (pure-AX headless; type uses focus_fallback
  because typing requires focus but never moves the cursor) and --headed upgrades
  any base to the headed policy.
- The internal/FFI "physical" policy is renamed "headed" throughout, including
  the C ABI enum (AD_POLICY_KIND_HEADED keeps discriminant 2) and bindings.
- Raw-input commands (press, hover, drag, mouse-*, key-down/up) are unchanged:
  always physical, mode-independent low-level escape hatch.
- Unit tests assert every ref command is headless by default and headed under
  --headed; docs (CONCEPTS, CLAUDE, skills) describe the two-mode contract.
2026-06-17 13:43:19 -07:00
Lahfir
6f50b41865 fix: make explicit snapshots session-independent 2026-06-17 13:43:19 -07:00
Lahfir
ba80312a11 docs: compound reliability patterns 2026-06-17 13:43:18 -07:00
Lahfir
0bc04b9b82 fix: harden ref action reliability 2026-06-17 13:43:18 -07:00