Repository navigation
Conversation
plannotator-tui hc open|last starts a review in a terminal of its own for an agent running in herdr-core, shows it in herdr-app, and sends the feedback to the agent with hc send. - The review runs as `hc run --bg --rm --no-notify`, so it is removed when it ends and hc does not type a note about it into the agent's prompt. - herdr-app shows it with terminal.peek (overlay, popup) or terminal.keep (split). It takes about 0.4 s to know a new terminal and refuses until then, so showing is retried for up to 3 s, and not at all without herdr-app. - A new terminal answers a colour query with the core's dark default until herdr-app tells it its colours, so the review waits for Enter (`hc pane --held`) that the launcher presses after it is shown and has settled. Without this a light window got the dark palette. - A send needs the agent to still be the terminal's foreground program and to have reported its state. hc's refusal of a blocked agent maps to the existing Blocked outcome; a gone terminal to Unavailable. - `hc last --session <transcript>` names the transcript; without it the newest one in the agent's folder is read. An empty or missing path is refused by the launcher. The pane helpers in cli.rs become pub(crate) and herdr::launch::known_host is shared, so the hc module reuses them; Herdr behavior does not change.
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.
Summary
Add
plannotator-tui hc open|lastfor herdr-core (hc) and herdr-app. Neither has Herdr's plugins, so the review is started by a command. It opens in a terminal of its own beside the agent, and a send pastes the feedback into the agent's terminal withhc send.sequenceDiagram participant L as plannotator-tui hc open|last participant HC as hc participant App as herdr-app participant R as review terminal participant A as agent terminal L->>HC: get <terminal> (foreground pid, name, reported) L->>HC: run --bg --rm --no-notify … hc pane --held L->>App: do terminal.peek | terminal.keep (retried) L->>R: keys enter (once shown, +0.25 s) R->>HC: send <terminal> <feedback> HC->>A: paste + Enterhc sendrefuses a blocked agent (kind: blocked); that maps to the existingBlockedoutcome. A gone terminal maps toUnavailable, so the review copies instead.terminal.peek/terminal.keepuntil then ("no running terminal"), so showing is retried for up to 3 s, and not at all when there is no herdr-app.hc pane --held) that the launcher presses after the terminal is shown and has settled, so a light window gets the light palette.hc last --session <transcript>names the transcript. hc reports no session for an agent, so without it the newest transcript in the agent's folder is read, which another agent there may have written. An empty or missing path is refused by the launcher.terminalreview (a terminal's recent output). The latter shares code that feat(rex): open reviews in rex and send feedback back #127 is moving.This touches the same
cli.rshunks as #127 (Rex). The shared helpers keep the names and bodies used there (USAGE,last_command,gated_pane,interactive,wait_on_error,known_host), so whichever lands second needs only a small rebase.Evidence
Before:
plannotator-tui hc open plan.mdis not a command;hcis taken for a file.After: with herdr-app and an agent that reports state, run in an isolated core and window. Real key events go through the peek:
Degradations (nothing is typed into the agent; the review copies):
Also checked live:
--placement splitputs the review in a pane beside the agent;open --gate --result-filedeliversApproved with Notesand writes{"decision":"approved",…}; with noherdr-appthe launcher falls back at once to printing thehc attachcommand;--session ""is refused before anything starts.Tests (one per invariant):
cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warnings,cargo test --workspace(476 tests) andpython3 herdr/test-manifest.pypass locally on Linux. The Windows and musl jobs were not run.Merge Danger
Door: two-way
The hc code is new and runs only through
plannotator-tui hc. A revert removes it.Blast Radius: cli dispatch
cli.rsgains anhcarm, and the delivery target is chosen fromPLANNOTATOR_TUI_HC_TERMINALbefore the Herdr environment; only the new launcher sets that variable.herdr/launch.rschanges one visibility (known_host) andherdr_panecalls the extractedwait_on_error. Herdr behavior does not change. The feedback travels as one argument tohc send, so the OS caps its size (128 KiB on Linux); a longer review fails with that reason and is copied.Written by an AI agent using Claude Sonnet 5.5.