Install
Install with PiG
pig install npm:@qcts33/pi-herdr-editorInstall with Pi
pi install npm:@qcts33/pi-herdr-editorPackages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.
Pi manifest JSON
The pi field of package.json.
{
"extensions": [
"./extensions"
]
}README
Written by the package's publisher, shown as published in version 0.2.0 (README.md). PiG does not review it.
@qcts33/pi-herdr-editor
A pi package that opens a sibling Herdr pane hosting an external editor for composing a message to the agent — a non-blocking analogue of pi's built-in Ctrl+G, which keeps the agent's output visible while you write.
How it works
Invoking /herdr-editor (or alt+g):
- Reads the calling pane's size with
herdr pane layoutand splits that pane — to the right when it is wider than tall, downwards otherwise — then waits for the new shell to become ready. The pane pi runs in is named explicitly (HERDR_PANE_ID), so another client's focus cannot retarget the split; a geometry that cannot be read keeps the right split. - Runs a probe that prints a start marker through the same printer the sentinel uses, and waits for it with a bounded timeout: if it never arrives — a pane shell that cannot run the command — the cycle fails with an error notification quoting the pane instead of waiting forever.
- Runs
$VISUAL/$EDITORon a temp file seeded with the current input-box content, through the shell's own eval so a malformed editor command cannot suppress the sentinel. - Waits (indefinitely) for a unique sentinel printed after the editor exits.
- Places the edited text back into pi's input box — not submitted; press Enter to send, inheriting pi's normal busy/idle handling.
The pane is closed when the compose cycle ends. Content that trims to empty cancels, leaving the input box unchanged. Outside Herdr it degrades to pi's built-in external-editor dialog.
The compose pane's shell is detected from the pane's own process, so PowerShell (pwsh,
powershell) and POSIX shells (sh, bash, zsh, fish, …) work regardless of platform —
Herdr's terminal.default_shell decides. A pane running a shell the extension cannot print
through (nushell, cmd.exe, …) falls back to the fullscreen dialog instead of hanging.
Install
pi install npm:@qcts33/pi-herdr-editor
Requires HERDR_ENV=1 (running inside Herdr), pi 1.x (floor 1.0.0, tested on
1.2.0), and herdr 0.8.2 or newer (tested on 0.9.4) for the pane flow; otherwise
the fullscreen fallback is used. Inside Herdr but outside the version window, a
session shows one warning at session start and /herdr-editor refuses with the
same message rather than falling back silently.
License
MIT