Add temporary clipboard paste and lifecycle validation
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start with the linked architecture doc (docs/architecture.md, the team section) and the earlier clipboard work in githubnext/ace2#122, #135, #139, #142 and #147, which this issue summarizes. The remaining scope is temporary image/file paste, image export, and Stop, disconnect and shutdown cleanup, built on Peekaboo's native clipboard transaction gate. Done means the clipboard is restored only when no paste was dispatched and the generation is still current, and hosted and local validation pass.
由索引模型根据 Issue 内容生成。
描述
Status (Oct 6): persistent text, image and file-reference read/write are complete through githubnext/ace2#122, githubnext/ace2#135, githubnext/ace2#139, githubnext/ace2#142 and githubnext/ace2#147 (merge note). Remaining here: safe temporary image/file paste, image export, and the lifecycle (Stop, client death/disconnect, graceful shutdown) and hosted validation below. Draft githubnext/ace2#75 was closed as superseded; its timed 150 ms restoration must not ship. Unresolved-paste ownership validation is githubnext/ace2#78.
Complete the clipboard part of githubnext/ace2#8's input slice through Ace's embedded native bridge, under the channel owner's desktop-tools setting (see githubnext/ace2#8 and the current architecture).
Progress: Plain-text read/write landed in githubnext/ace2#122 (2c36c49). Bounded image reads landed in githubnext/ace2#135 (9c561ba): generation-consistent PNG/JPEG/TIFF previews, explicit orientation/transparency/size metadata, and the existing tool image result. Both have real native and model/durable-reopen proof. Image validation covered ten native cases (including rotation direction, transparent PNG, resizing, white JPEG fallback, absence and bounded refusals), exact persisted text/image results without new calls or usage, and private clipboard restoration with complete owned-runtime cleanup. Persistent text writes use githubnext/ace2#67’s existing unresolved-paste reservation gate; they do not preserve or restore prior contents. Literal text insertion’s temporary paste already landed in githubnext/ace2#67. Read-only file-list access landed in githubnext/ace2#139 (aa48e892): desktop_clipboard_read({format: "files"}) returns at most 32 ordered advertised local file URLs and decoded paths in a complete 24,000-byte JSON result, without opening files, checking existence, canonicalizing paths, or fetching resources. Nine actual native cases and one real model/durable-reopen check passed with private clipboard restoration and full owned-runtime cleanup. macOS filtered three unsupported URL forms before Ace could see them; these correctly returned absent and do not count as native guard coverage. AppKit rejected the legacy-format fixture before a product read, so that guard has source review only. Persistent image writes landed in githubnext/ace2#142 (a8417c9), validated at exact head 86e0c1e: one bounded execution-host image file, GUI validation, original PNG/JPEG/TIFF bytes and UTI, and the existing unresolved-paste reservation gate. Four exact-byte native cases and nine refusals passed, plus one real Claude Opus 5.5 write/read with distinct-worker durable reopen and one actual delayed-paste reservation refusal followed by admission after the exact receiver exited. All phases restored the original clipboard privately and cleaned every owned runtime. File-reference writes landed in githubnext/ace2#147 (f24257b). Safe temporary paste (including temporary image/file paste), image export, and the remaining lifecycle/hosted validation below stay open.
Expose explicit clipboard read/write and targeted temporary paste for text, images, and real file URL items. The clipboard belongs to the execution host. Keep clipboard access and the full temporary-paste lifecycle in Ace's long-lived GUI process, where OS clipboard permission applies; a short-lived native client cannot own reliable cleanup after Stop or disconnect.
Reuse Peekaboo's native clipboard transaction gate and generation claim. Capture all prior items/representations within a bounded preservation budget before writing, retain the exact focused-target receipt and snapshot lease, dispatch the guarded paste, and clean up even after caller cancellation. Restore prior contents only when both hold: no paste input was dispatched or meaningful consumption was observed, and the temporary generation is still current. Otherwise keep the replacement and its unresolved ownership (#78); a current generation alone is not enough, because a delayed paste may still be pending. Preserve a newer human update. Report delivery uncertainty and cleanup outcome separately, and verify the resulting target rather than claiming that dispatch proves consumption. A crash/force-kill cannot promise restoration; never restore stale persisted clipboard contents on a later launch.
The typed text clipboard extension added in githubnext/ace2#122 uses the existing authenticated Bridge transport and operation coordination. Extend that same boundary for images and files. Do not create another clipboard authority, authentication scheme, agent approval, or parallel message/history store. File-content payloads are not file-reference clipboard support: implement real multi-item file URLs. Return bounded text/image previews and file metadata; keep prior clipboard contents out of history unless explicitly read.
Done when real native and pi workflows read/write/copy/paste text, images, and files; temporary paste preserves previous multi-item contents and newer human changes; Stop, client death/disconnect, and graceful Ace shutdown exercise cleanup; local and hosted workspace behavior is verified. Handle native clipboard access refusal through Ace's existing OS permission experience. Keep unverified routes and inevitable cross-process clipboard races explicit.
- 主要语言
- Swift
- 星标
- 0
- 派生
- 0
- 平均合并
- 19 分钟
- 30 天内合并 PR
- 107
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
githubnext/desktop-tools 的其他 Issue
-
ace documentation
难度 2/5 1-3 小时 新手友好度 79/100
githubnext/desktop-tools#104 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 25/100
githubnext/desktop-tools#136 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 52/100
githubnext/desktop-tools#130 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 42/100
githubnext/desktop-tools#129 ·
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 25/100
githubnext/desktop-tools#117 · 1 条评论 ·
维护者通常 1 天内回复
查看 githubnext/desktop-tools 的全部 Issue
相似的 Issue
-
Review backlog (style): Test helper still reads stdout after waitUntilExit可能已有人在做 @hivecommons-hive 今天认领。 未关闭agent/reviewer help wanted hive/claimed-by-scanner stage/030-pr-in-progress
难度 2/5 1-3 小时 新手友好度 77/100
hivecommons/hotshot#243 · 1 条评论 ·
维护者通常 1 天内回复
-
Ctrl+C while pictures are drawing also kills the image worker (traceback, story ends partial/failed)未关闭low-priority
难度 2/5 1-3 小时 新手友好度 76/100
jessvb/tiny-talk-adventures#92 ·
维护者通常 1 天内回复
-
good first issue
难度 2/5 1-3 小时 新手友好度 78/100
-
bug
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 1 天内回复
-
bug tests
难度 2/5 1-3 小时 新手友好度 82/100
jonathanong/no-mistakes#2261 ·
维护者通常 1 天内回复