Skip to content

feat(desktop): write ordered clipboard file references - #147

Merged
iamnbutler merged 2 commits into
mainfrom
codex/clipboard-files-write
Oct 6, 2026
Merged

iamnbutler merged 2 commits into
mainfrom
codex/clipboard-files-write

Conversation

@iamnbutler

@iamnbutler iamnbutler commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Add desktop_clipboard_write({format: "files", paths: [...]}) for 1–32 absolute execution-host paths. The host checks metadata for existing files, directories, or symbolic links without reading contents or resolving links. Ace's GUI prepares one real public.file-url item per literal path, preserves order and duplicates, and publishes the complete bounded list through the existing pending-paste gate.

The focused multi-item writer uses the existing mutation owner, performs one publication, and verifies ordered item URLs when silent readback is available. Failures after publication remain uncertain and never trigger fallback, retry, or restoration. Results contain native outcome metadata and the requested reference count. Receiving apps decide how they use those references; this adds no temporary paste, file promises, or storage.

Part of #72 and #8.

Validated on exact head 7c2262d330ca87327bdd5ec63b6eeca59f75cf11, with merged menu/open support:

  • Type checks, formatting/lint, CI, signed dev build, strict deep signatures, and exact assembly of all 14 declared native patches passed. The shared app identity remains dev.ace.desktop.dev.
  • Four real native write/read cases passed: file/folder/symlink/duplicate references, 32 ordered items, a complete 23,277-byte read result, and literal dot/repeated-slash/Unicode/reserved-character paths. All publications reported confirmed change. Nine refusals preserved clipboard generation, including missing/FIFO paths, encoded overflow, and pre-cancellation.
  • Real Anthropic Opus 5.5 performed exactly one file-reference write and explicit read. A distinct worker reopened the exact durable results with unchanged usage and no replay; the owned channel/project were removed.
  • An actual delayed paste retained its reservation: reads remained admitted, file-reference writes refused before mutation, and normal write admission resumed after the exact receiver exited.
  • Finder received one explicit Paste into a fresh owned destination and copied the intended public file and directory with matching contents. The original phase then failed its close assertion on an unknown result; no input was repeated. Fresh reconciliation found that exact window absent. The owned native runtime was stopped before the GUI vault privately restored the clipboard through the existing empty gate and exact-generation checks. The close outcome remains unknown and is tracked separately in #73.

All owned fixtures and runtimes are stopped; no private clipboard backup remains. Original clipboard contents stayed in GUI memory and were never saved, logged, or sent to a provider. The existing image-write proof from #142 is retained without repeating its passed cases.

Built in Ace

Direct Codex file, terminal, GitHub, and computer-use tools were used under Nate's temporary authorization to complete #8 faster. Source editing outside Ace is tracked by #22, and Codex orchestration in Ace by #9. Validation exercised Ace's actual signed GUI bridge, host adapter, and channel tools; Codex coordinated isolated public fixtures and used the fixture's GUI for guarded clipboard recovery. The remaining Finder-close behavior is linked above.

@iamnbutler
iamnbutler marked this pull request as ready for review October 6, 2026 20:24
@iamnbutler
iamnbutler merged commit f24257b into main Oct 6, 2026
1 check passed
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