feat: paste-archive and send-archive actions - #65
Merged
Merged
Conversation
Two pane actions put the saved annotations straight into the focused agent's prompt, formatted as copy-archive copies them, then archive them through the same workflow: deliver first, archive only if delivery landed. send-archive submits through `herdr agent prompt`. paste-archive checks `herdr agent get` (a recognised agent, not blocked) and types one bracketed paste with `herdr pane send-text`, without submitting. ESC is stripped from the text on both paths, because an embedded paste end marker breaks out of the paste, and through `agent prompt` it also loses the submit. Neither action touches the clipboard; copy-archive is unchanged. Suggested bindings: prefix+ctrl+v and prefix+ctrl+s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Herdr before 0.8.2 lets agent prompt type into an approval dialog, and the manifests still accept 0.8.0, so send-archive now asks agent get first, like paste-archive. The readiness check mirrors agent prompt: not blocked, a running agent Herdr recognises (agent is cleared after the process exits), and no pending launch. Nothing is archived unless delivery succeeded.
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.
Two actions that put the saved annotations straight into the focused agent's prompt, then archive them. Today that takes
copy-archiveand then Cmd+V in the agent pane.paste-archivepastes without submitting, like Cmd+V, so you can add a line before sending.send-archivepastes and submits, likeEin the review window.copy-archiveand every other action are unchanged.terminalandlastsend from the review window; these two send whatcapturesaved. They are in all three manifests, so Lite, which has no review window, gets a way to reach the agent without the clipboard.What changed
send-archivecallsherdr agent prompt, the same call as plannotator-tui'sHerdrAgent. Herdr refuses by itself when the pane has no agent or the agent is at a dialog.paste-archivehas no Herdr command to lean on.agent promptalways presses Enter, andpane send-textwrites raw bytes and ignores the pane's bracketed-paste mode. So it wraps the text inESC[200~…ESC[201~itself, and only afterherdr agent getshows an agent that isn't blocked. A bare shell may not enable bracketed paste, and the markers would land as garbage.ESC[201~ends the paste early. I reproduced it withherdr agent prompton Claude Code: the text before the marker was lost, nothing was submitted, and Herdr still exited 0. Without the strip,send-archivewould archive notes the agent never got. That part looks like a Herdr bug worth its own issue.copy_and_archive_annotations, whosewrite_clipboardfield is nowdeliver, so nothing is archived unless delivery succeeded. A refusal leaves the annotations active and says why. A send that lands but fails to archive gets its own message, so nobody sends twice.contexts = ["pane"]andfocused_pane_id, the waycapturereads it.prefix+ctrl+vandprefix+ctrl+s(clear of Herdr's defaults), and a line on refusals. The action lists in the smoke, lite-regression and windows-full checks follow.Needs a release
The pinned herdr-annotate 0.1.0 has no
paste-archiveorsend-archive. Merged alone, a fresh install lists both actions and they exit with the usage error until arust-literelease carries them andherdr-annotate.versionmoves.copy-archiveavoided this by landing before the first release.I left the versions alone, since
rust-lite-release.ymlneeds the tag,rust/Cargo.tomlandherdr-annotate.versionto agree, and cutting that release is yours. The bump also needscheck_distributedintest-windows-full-manifest.pyupdated; it asserts0.1.0.Validation
cargo test: 103 pass, up from 84.cargo fmt --checkandcargo clippy --all-targets -- -D warningsare clean.lite-regression.py,test-windows-full-manifest.pyandtest-fetch-plannotator-tui.shpass.[Pasted text #1 +N lines]with the agent still idle, the send sets the agent working, and both refuse on a plain shell with the pane and store untouched.smoke.sh, which installs and uninstalls the global plugin, and the Windows.ps1scripts, for lack of a Windows machine.windows-full-ciis their first real run.🤖 Generated with Claude Code