Repository navigation
Captures for agents on another machine - #65
Draft
kitlangton wants to merge 1 commit into
Draft
kitlangton wants to merge 1 commit into
kitlangton wants to merge 1 commit into
Conversation
|
gm, text below generated by ma ai agent, but i think it is fine.. can we brianstorm some cool solution for this? Thanks for this, it's exactly my setup. I work across several VPSs over SSH (Claude Code and Codex in tmux/tern/iterm2/superllgical's rexy), so per-host Could Scrawl optionally paste the contact sheet as an image instead of a path? Terminals like Tern already upload pasted clipboard images to the remote host and rewrite the path, so it would just work over SSH on any machine with no setup per server. Right now Tern has nothing to upload, because Scrawl pastes the path as text. Maybe a paste mode setting, like |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Captures for Agents on Another Machine
Problem
Scrawl records on your Mac and writes each capture to
~/Library/Application Support/scrawl/captures/<id>.scrawl/. When you press⌘Vor⌥⇧Vinto Ghostty while running Claude Code, Codex, or OpenCode overssh kitbox.exe.xyz, Scrawl pastes/Users/kit/Library/Application Support/scrawl/captures/<id>.scrawl/contact-sheet.pngand asummary.mdheader pointing to/Users/kit/Library/.... The agent runs on the remote Linux VM, where/Users/kit/Library/...does not exist, so its file tool fails withENOENT.Scrawl already has an
"agentHost"setting insrc/handoff.rsthat streams a bundle overtar | ssh, but it only runs when queuing an OpenCode API prompt (send_bundle_to_session), never on clipboard copy (⌘V) or paste (⌥⇧V), and it unpacks into the Mac's/Users/<you>/Library/...path, which fails on Linux remotes where$HOMEis/home/<you>.Options
"agentHost": "kitbox.exe.xyz"in~/.config/scrawl/config.json(uses existing~/.ssh/configand keys; needs onlyshandtaron the remote).ControlMastersocket (~1.2 s cold) forcontact-sheet.png,frames/,summary.md, andscrawl.json; video streams in the background.opencode serve) and configure its URL and session.frames/frame-XX.pngorscrawl.jsonunless the bundle is on the remote disk.https://linkshttps://URLs are read as plain text unless the agent fetches them with a tool.NSPasteboardTypePNG, and remotexclip/wl-pastechecks the remote display rather than the Mac clipboard.Recommendation
Extend Scrawl's existing
"agentHost"SSH sync so it works for every capture handoff (⌘V,⌥⇧V, the Paste chip, andscrawl send) and unpacks into~/.scrawl/captures/<id>.scrawlon the remote machine instead of the Mac's/Users/.../Library/...path. In the sametar | sshcall, the remote shell prints its resolved directory (/home/exedev/.scrawl/captures), so Scrawl rewritessummary.md, the clipboard, the⌥⇧Vimage path, and OpenCodefile://attachments with the exact path on the remote filesystem while streaming heavy video in the background.What You Configure and See
Add
"agentHost"(and an optional"agentPath", which defaults to"~/.scrawl/captures") to~/.config/scrawl/config.json, or setSCRAWL_AGENT_HOST:{ "agentHost": "kitbox.exe.xyz" }When a capture finishes, Scrawl copies
contact-sheet.png,frames/*.png,scrawl.json, andsummary.mdtokitbox.exe.xyz:~/.scrawl/captures/<id>.scrawl/over a multiplexed SSH connection and puts the remote path on your clipboard:Pressing
⌥⇧Vin Ghostty pastes/home/exedev/.scrawl/captures/<id>.scrawl/contact-sheet.pngfirst (attaching[Image #1]in Claude Code, Codex, or OpenCode TUI) and the summary second. If the SSH host is unreachable, Scrawl logs the error and falls back to the local Mac path so the capture is still usable locally.