Skip to content

[1/5] Add the background window driver v2 foundation - #1

Draft
cm2435-hcomp wants to merge 1 commit into
agent/background-driver-v2-pinned-basefrom
agent/background-driver-v2-foundation
Draft

[1/5] Add the background window driver v2 foundation#1
cm2435-hcomp wants to merge 1 commit into
agent/background-driver-v2-pinned-basefrom
agent/background-driver-v2-foundation

Conversation

@cm2435-hcomp

Copy link
Copy Markdown
Owner

Why

This is the first checkpoint in the native background-driver v2 stack. It establishes a typed, background-only contract before publishing app-specific behavior.

The work started from the CUA 0.7.1 codebase, which is also the version used by the outer cua-drivers experiment. Current upstream CUA has moved to 0.12.2, so this draft targets a pinned review base. It is intended for architecture and implementation review before a separate forward port.

What changed

  • Adds the portable v2 contracts, capability decisions, errors, observations, settlements, menus, interaction scopes, and per-target controller.
  • Adds observation consumption, revisioning, invalidation, dirty-state recovery, and cancellation-safe native side-effect boundaries.
  • Adds the initial macOS lifecycle, window registry, capture, AX observation, posture witness, semantic actions, and interaction-scope implementation.
  • Keeps every unproven background route as an explicit typed refusal.

Stack

  • Base: pinned CUA 0.7.1 review branch.
  • This PR: native foundation and macOS lifecycle/observation, corresponding approximately to implementation plans 1 through 5.
  • Next: complete action and protocol surface.
  • Final: align the macOS route with the signed Swift Codex helper and attach live-host evidence.

Validation

Validated at the final stack head:

  • cargo test -p cua-driver-core: 148 tests passed, 0 failed.
  • cargo test -p platform-macos: 197 tests passed, 0 failed, 1 doc test ignored.
  • git diff --check: passed.

Repository-wide cargo fmt --all -- --check is already red on unrelated 0.7.1 files. This stack does not apply a bulk formatting rewrite.

Known limits

This PR does not claim a complete background action surface or current-upstream compatibility. Those are handled by the following drafts in the stack.

@cm2435-hcomp cm2435-hcomp changed the title [1/3] Add the background window driver v2 foundation [1/5] Add the background window driver v2 foundation Jul 23, 2026
@github-actions

Copy link
Copy Markdown

Linux visual regression artifacts

Matrix jobs now run independently. Download visual artifacts from this workflow run.
Each background-GUI job uploads a .gif of the interaction plus two annotated PNGs (<app>.png raw, <app>-atspi.png with AT-SPI element boxes); the cua-driver-linux-som-overlays artifact adds <app>-som.png cua Set-of-Marks overlays:

  • cua-driver-linux-cursor-click-gif
  • cua-driver-linux-background-terminal-gif
  • cua-driver-linux-parallel-drag-xserver
  • cua-driver-linux-background-gui-chromium
  • cua-driver-linux-background-gui-tk
  • cua-driver-linux-background-gui-gtk3-gedit
  • cua-driver-linux-background-gui-gtk3-mousepad
  • cua-driver-linux-background-gui-gtk3-scite
  • cua-driver-linux-background-gui-gtk4-characters
  • cua-driver-linux-background-gui-qt5-manuskript
  • cua-driver-linux-background-gui-qt5-klog
  • cua-driver-linux-background-gui-qt5-openambit
  • cua-driver-linux-background-gui-qt6-kate
  • cua-driver-linux-background-gui-qt6-kcalc
  • cua-driver-linux-background-gui-qt6-okular
  • cua-driver-linux-background-gui-qt6-qownnotes
  • cua-driver-linux-background-gui-electron-zettlr
  • cua-driver-linux-background-gui-electron-joplin
  • cua-driver-linux-background-gui-electron-logseq
  • cua-driver-linux-som-overlays

Open workflow run and download artifacts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant