Skip to content

Add GUI-owned clipboard tools and targeted paste - #75

Closed
iamnbutler wants to merge 1 commit into
codex/desktop-keyboardfrom
codex/desktop-clipboard
Closed

iamnbutler wants to merge 1 commit into
codex/desktop-keyboardfrom
codex/desktop-clipboard

Conversation

@iamnbutler

Copy link
Copy Markdown
Contributor

Add clipboard read/write and temporary, target-bound paste to Ace's existing desktop tools for githubnext/desktop-tools#3 and githubnext/ace2#8. Values support text, one PNG/JPEG/TIFF image, and multiple ordinary file/folder URLs on the channel's execution host.

The embedded GUI owns temporary paste from complete bounded preservation through generation-checked restoration. It leases the observed focused window, uses claim-guarded Cmd+V, preserves newer clipboard updates, and reports delivery, cleanup, and unverified app consumption separately. Mutation replies never echo prior contents or image/file payloads. The host handles file staging and image previews, and Settings reports the native clipboard read policy. Mutations retain pi's existing unsafe/no-replay path and the current collaborator-agent switch.

Draft — real native clipboard/paste, restoration/newer-generation, Stop/disconnect, local/hosted model and replay, and Settings permission validation have not run because the desktop is locked. A disposable real AppKit receiver has been compiled and signed but not launched. A GUI crash or force-kill cannot guarantee restoration; there is no restore journal.

Validation

  • Passed all package type checks and formatting/lint checks.
  • Passed Swift release compilation, the complete signed desktop build, and deep/strict codesign verification.
  • Verified the pinned clipboard patch applies forward to its saved base and passes reverse/idempotence checks in repeated desktop builds; existing click and typing patches remain intact.
  • Real host FIFO input with no writer refused before native dispatch in 3 ms.
  • Reviewed all 13 changed files through Ace's changes/patch surface. Coordinating and independent native source reviews found no remaining blocker after correcting unreadable clipboard representations and confining payload filesystem access to the host/client.
  • React Doctor reported no findings in this PR's changed files; its five warnings concern existing files elsewhere.

Built in Ace

Dependency installation, builds, checks, the real host FIFO check, Git, and GitHub commands ran through dedicated Ace terminals. Final diffs were read through Ace's changes/patch API.

Codex coordinated agents and used external filesystem tools for source edits, reads, and temporary validation helpers because Ace cannot yet host/resume Codex as a harness (#9) and lacks its File tab for direct editing (#22). No desktop interaction or native clipboard calls were performed while the Mac was locked.

@iamnbutler

Copy link
Copy Markdown
Contributor Author

Extracted the first focused slice into draft #122 at 3aff2bf: explicit plain-text read/write, with complete bounded reads and persistent writes admitted by the existing pending-paste gate. It does not add temporary paste, image data or file references. Existing literal-insertion ownership code remains unchanged.

The old #75 branch is preserved for reference; its timed 150 ms restoration must not ship because it can expose private prior contents to a delayed paste. Image/file access and temporary paste will be separate follow-ups using meaningful consumption and ownership.

Types/lint, Swift parsing, independent source reviews, signed build/signature checks and real patch-stack application/repeat-build/drift checks pass. #122 remains draft while runtime permission, clipboard preservation, reservation, model and replay checks are completed. No live clipboard write has been performed for this candidate yet.

@iamnbutler

Copy link
Copy Markdown
Contributor Author

Closing as superseded (not merged; branch codex/desktop-clipboard kept for reference). Its scope shipped in focused PRs: #122 (plain-text clipboard read/write), #135 (bounded image previews), #139 (file-reference reads), #142 (bounded image writes) and #147 (ordered file-reference writes).

Remaining safe temporary paste / image-export work stays tracked in githubnext/desktop-tools#3. Per #75 (comment), this branch's timed 150 ms restoration must not ship: it can expose private prior clipboard contents to a delayed paste. Follow-ups must use meaningful consumption and ownership instead.

@iamnbutler iamnbutler closed this Oct 6, 2026
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