Skip to content

feat(agent): orchestrate approved self-window CUA actions - #561

Draft
sjungwon03 wants to merge 78 commits into
devfrom
feat/559-approved-self-window-cua
Draft

sjungwon03 wants to merge 78 commits into
devfrom
feat/559-approved-self-window-cua

Conversation

@sjungwon03

@sjungwon03 sjungwon03 commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Self-window CUA now uses an explicit opt-in chat mode. The agent observes its own editor window and proposes one click, bounded drag, allowed key, or separately approved live-editor Save per tool step. Existing approval UI routes each exact proposal to a main-only, one-use permit bound to session/run/project/window/frame/layout/content. Mixed tool steps, replay, stale evidence and direct tool invocation fail closed.

Project-tools remains the default and cannot invoke CUA. Window CUA preserves dirty live edits on first send and approvals, without legacy presave. Saved-project tools are blocked while live edits are dirty until a verified approved Save receipt; provider text cannot forge that receipt. Cancellation waits for pointer release and actual Save settlement, including when one cleanup fails. Save and pointer authorities share a gate but cannot exchange permits.

Closes #559

Draft dependency integration: base fdce65209afe784e92774e8c7d1fdd0daaf88e6c, Backend latest 9182ebbfe5a571642d13747e2800926f860f0f5b, initial Frontend a900bee19e93a97cd4226617209f03935c2f3977. These were normally merged; coordinated Backend/Frontend changes are included in the dev diff. Current HEAD 6c520870218500b3b72503c291a2cef241790085 includes exact-enum Save error normalization and poison-ACK/unknown-publication regressions.

Fresh exact-HEAD root typecheck/build, mobile typecheck and 4 targeted suites / 26 tests pass. Required CI is running. Fresh exact-HEAD full test run: 231 files / 1,515 tests, 1,513 pass and two fail on cuaSurfaceSnapshot expectations because the temporary Frontend compatibility implementation deliberately reports safeSurface=null/content-revision-unavailable. Tests were not weakened. The final Frontend content counter, preparing acknowledgement and Save hooks remain outstanding; this Draft cannot execute the completed product flow yet.

The test-only actual-app harness substitutes only model invoke and preserves real main/renderer/IPC/approval/driver guards. Clean exact-HEAD evidence /tmp/openscene-cua-agent-dirty-6c520/evidence.json (harness SHA256 74b4eeb9332a3611ae12620ea8eafc68e724335e38ca0f8fe7315519e667d7cc) demonstrates MCP fixture creation and dirty self-window first-send with zero legacy Save IPC, while live edits remain dirty and saved disk state unchanged. Focus is false for the actual own OpenScene window/contents in this environment; the product observation refuses with CUA_NOT_FOCUSED and zero product input/held input. This is guard-refusal evidence, not movement or Undo success.

Prepared final scenarios cover deny, stale, duplicate approval, Save denial, approved move→explicit approved Save→model MCP read, native target-window Undo/menu Redo/Undo, and mid-drag cancellation/rollback/release. Final integrated exact-SHA actual-app validation and independent sjungwon03-ai approval are pending. No live-model quality or paid-call evidence is claimed. Desktop window control is platform-bound; mobile compiles the shared contracts without exposing OS control. Keep Draft until coordinator readiness approval and passing exact-HEAD CI/review.

Reproduction and intermediate evidence paths: docs/cua-agent-validation.md.

This branch has not been deployed

No deployments
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.

feat: orchestrate approved self-window CUA agent actions

1 participant