githubnext/ace2Public

Ace: a collaborative coding environment on the team's own machines

feat(desktop): write bounded clipboard images #142

Mergediamnbutlermerged 1 commit intomainfromrefs/pull/142/head
  1. IA

    Add `desktop_clipboard_write({format: "image", path: "/absolute/image"})` alongside the existing `{text}` call. The host reads one bounded regular file into memory; Ace's GUI decodes one complete PNG/JPEG/TIFF frame before writing the original bytes and image type through the existing clipboard reservation gate. Input is limited to 10 MiB and 64 million pixels. Results contain native outcomes and source metadata; a preview requires an explicit image read.

    Part of #72 and #8. This adds persistent image writes without pasting, preserving prior contents, or creating another store. Interrupted writes retain the existing unsafe replay behavior. File-reference writes, broader temporary paste, and hosted/lifecycle validation remain in #72.

    Validation at `86e0c1e`:

    - CI, type checks, formatting/lint, signed development build, strict app/client/dylib/launcher signatures, and independent source review passed. - Four real native writes preserved exact original bytes and image type: transparent PNG, oriented JPEG, TIFF, and a complete PNG padded to exactly 10 MiB. Explicit image reads verified transparency, rotation direction, and the TIFF preview's white JPEG conversion. Nine refusals preserved the clipboard generation: multiple frames, malformed/unsupported images, over 10 MiB, over 64 million pixels, empty source, directory, FIFO, and pre-cancelled input. - A real Claude Opus 5.5 channel called image write once and image read once. Closing the worker and reopening on a distinct PID preserved the exact result/image, provider usage, and tool counts without new execution. - During one actual delayed paste, a read left the pending reservation intact and the image write refused before mutation. The receiver consumed the public payload; after its exact process exited, the next explicit image write succeeded normally. Each phase restored the original clipboard privately, and all 21 owned processes, validation channel/project, ports, socket, preferences, and pending reservation were cleaned up.

    ### Built in Ace

    Direct Codex file, terminal, and GitHub 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. The native checks used Ace's actual signed GUI bridge, host adapter, and real channel tools with a saved provider credential, while Codex coordinated the isolated public fixtures and recovery evidence for the clipboard capability being added in #72. Original clipboard contents stayed only in the fixture GUI's memory and were never logged, saved, or sent to a provider.

  2. iamnbutlerreferenced this in [Meta] Complete native computer use in Ace #8last month on GitHub

  3. iamnbutlerreferenced this in Add temporary clipboard paste and lifecycle validation #72last month on GitHub

  4. iamnbutlerready-for-reviewlast month on GitHub

  5. iamnbutlermerged a8417c9f5a72last month on GitHub

  6. iamnbutlerclosedlast month on GitHub

  7. iamnbutlerreferenced this in feat(desktop): invoke exact external-app menu commands once #140last month on GitHub

  8. iamnbutlerreferenced this in feat(desktop): write ordered clipboard file references #147last month on GitHub

  9. iamnbutlerreferenced this in Finish native window, menu, and dialog workflows #73last month on GitHub

  10. iamnbutlerreferenced this in Add GUI-owned clipboard tools and targeted paste #75last month on GitHub

  11. iamnbutlerreferenced this in Keep clipboard ownership while a native paste is unresolved #78last month on GitHub