feat: a herdr plugin for the sandbox controls (contrib) - #70
Open
TakiTake wants to merge 1 commit into
Open
Conversation
Puts what pall8t knows about a pane's sandbox inside herdr: status, a second shell in the running container, an image rebuild, a stop. Linked from a checkout with `herdr plugin link contrib/herdr-plugin`. It resolves *which* sandbox a pane's is through the `pall8t.herdr.pane` label rather than by parsing container names — which is why this waited for labels. Without a pane in the environment it falls back to a single running sandbox and refuses to choose between several: attaching someone to another agent's container would be worse than an error. Output-producing entrypoints are panes, not actions, so results land in front of the person who asked rather than in the plugin log. Stopping, which has nothing to show, stays an action. Lives in contrib/ rather than its own repository so it versions with the CLI it drives — its only contract is `pall8t ls --json`, and a change to that shape can land in the same commit as the plugin that reads it. Verified live against a real labelled sandbox: `status` resolved the pane's container and printed its image/project/mode; `shell` opened a second shell inside it (`dev@pall8t-…`) while the agent kept running; `rebuild` built in the project directory; `stop` stopped it. Error paths checked too — no sandbox running, and a pane with no labelled container. Not verified: invocation by a live herdr server (no herdr session here), so the manifest's entrypoint shapes are written against herdr 0.8's documented plugin contract rather than observed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YTFLvjR7dWvxFQfSyBY4Zm
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Closes #61 — the last of the batch. Stacked on #69 (→ #68 → #67 → #66 → #65 → #63 → #62); only the last commit belongs to this PR.
What
contrib/herdr-plugin/— link it withherdr plugin link contrib/herdr-plugin:statusshellpall8t execinto the pane's container — a second shell beside the agent, which keeps runningrebuild/rebuild-no-cachepall8t buildin that sandbox's project directorystoppall8t stopfor the pane's containerOutput-producing entrypoints are panes, not actions: an action's stdout lands in the plugin log, a pane lands in front of the person who asked.
stophas nothing to show, so it stays an action.Design notes
pall8t ls --json#55: the container carriespall8t.herdr.pane, so the plugin looks it up inpall8t ls --jsoninstead of parsing container names. With no pane in the environment it falls back to a single running sandbox, and refuses to choose among several — attaching someone to another agent's container is worse than an error.ls --json.contrib/, not its own repo, so it versions with the CLI it drives — a change tols --jsonand the plugin that reads it can land in one commit.Verification
Live, against a real labelled sandbox (
HERDR_PANE_ID=%42):Error paths too: no sandbox running, and a pane whose container isn't labelled.
Not verified: invocation by a live herdr server — there's no herdr session on this machine, so the manifest's entrypoint shapes (
[[panes]]placements, actioncontexts) are written against herdr 0.8's documented plugin contract rather than observed. Everything the script itself does is exercised above.🤖 Generated with Claude Code
https://claude.ai/code/session_01YTFLvjR7dWvxFQfSyBY4Zm