Add prime-agent (pa) as a first-class herdr agent kind #2840
bangedorrunt
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
Add
prime-agentas a first-class herdr agent kind (pa/prime-agent). It already ships a built-in herdr socket reporter, and herdr already accepts its lifecycle reports as hook authority — but the kind is not in theAgentenum, soherdr agent start --kind pafails (unsupported_agent_kind) andagent prompt/agent send-keys/agent explainreject every prime-agent seat (effective_known_agent()isNone).Evidence (verified 2026-08-15, herdr 0.8.0-preview.2026-08-04-d78e3d3b5126)
packages/coding-agent/src/core/extensions/builtin/herdr-agent-state.ts: onHERDR_ENV=1+HERDR_SOCKET_PATH+HERDR_PANE_IDit reportspane.report_agentwithsource: "herdr:pi",agent: "prime-agent",state: working|blocked|idle, monotonicseq, andagent_session_path/agent_session_id;pane.release_agenton quit. It defers to herdr's file-based pi integration when one is installed.normalize_reported_agent_labelfalls back to the raw label,full_lifecycle_hook_authorityreturns false →route_full_lifecycle_hook_reportreturnsAccept, and the pane becomes a hook-authority agent terminal. Empirically: a prime-agent TUI launched in a herdr pane appears inagent listasagent: "prime-agent",agent_status: "idle", renamable,agent waitworks.agent prompt/agent send-keysrequireterminal.effective_known_agent()(label must parse to the closedAgentenum);agent.start --kind pafails atparse_agent_label.server.agent_manifestsregisters screen-detection rules only and cannot register new kinds (maintainer confirmed in Register prime-agent in the detection registry — reference integration is not promptable (agent prompt/explain fail) #2633).Requested API surface (minimal)
src/detect/mod.rs—Agentenum: addPrimeAgent;agent_label→"prime-agent";lookup_agentaliases"pa" | "prime-agent"; extendAgent::ALL.agent startcanonical executable mapping:interactive_agent_executable(Agent::PrimeAgent)→prime-agent(already on PATH via npm/mise).full_lifecycle_hook_authorityentry for the lifecycle-authority class — the pair herdr actually sees is("herdr:pi", "prime-agent")(the extension hardcodes source"herdr:pi"); once apakind exists the extension should switch tosource: "herdr:pa"and the entry would be("herdr:pa", "prime-agent").SCREEN_MANIFEST_AGENTS+ a detection manifest rule — unnecessary while the socket reporter is active, useful for seats without env.Items 1–2 unblock
agent start --kind pa+agent prompt/send-keys/explain; item 3 opts the pane out of screen/process fallback.Impact
flywheel (swarm orchestrator) can then spawn prime-agent seats through the standard
herdr agent startpath instead of the current pane-run fallback; today the orchestrator must bypassagent.startbecause of the closed enum, and prompt-driven workflows are impossible until the kind exists.All reactions