Repository navigation
fix(crush): type into panes of agents Herdr does not drive - #47
galichandrey wants to merge 1 commit into
Conversation
Herdr refuses agent.prompt and agent.send_keys for an agent it does not drive itself, one that reports its own state instead of going through an official integration: agent_not_ready, "agent w1:p1 is not an active named agent" on 0.9.3. Crush is such an agent, so from a topic every plain message answered "⚠️ herdr agent.prompt: herdr api agent_not_ready" and no key reached the pane. Reads and waits work there, so the topic itself is fine: status, screens and done posts all worked, only input was dead. The refusal arrives before anything reaches the pane, so the input is sent the way the agent would have received it: - a prompt is typed with pane.send_text and submitted with enter through pane.send_keys; - every key the plugin sends (/keys, /stop, /interrupt, the buttons) goes to the pane as well; - line breaks are joined with spaces, since typed input submits nothing by itself and an enter inside the text would send the message in pieces; - one INFO line per fallback with the pane and the lengths, never the text. Only agent_not_ready takes this path. agent_blocked still reaches the application, which types into the dialog's own free-text entry, and an agent gone from Herdr still answers as before. A target that names an agent rather than a pane has no pane to address, so its refusal reaches the caller unchanged. Verified live on Herdr 0.9.3 with Crush 0.98.0 in a Herdr pane: the same pane answers agent.read and agent.wait, refuses both agent input methods, and takes the text through pane.send_text plus enter.
|
Thanks for tracking this down — input into Crush and other self-reporting agents being dead is a real gap, and the diagnosis (refusal arrives before anything reaches the pane) is clear and well tested. One thing blocks the merge as it stands: the fallback runs regardless of the agent's status. The whole app relies on Herdr answering Could you move the decision up into the app layer?
Smaller points:
Happy to merge once the status check is in. |
|
Thank you, this was a real gap: every message into a Crush topic failed with Your commit landed in On top of it, 7fedd39 adds one guard. Herdr cannot answer
Keys and buttons still go to the pane unchecked, since that is how the dialog gets answered. Both commits ship in v0.17.2. |
Herdr refuses agent.prompt and agent.send_keys for an agent it does not drive itself, one that reports its own state instead of going through an official integration: agent_not_ready, "agent w1:p1 is not an active named agent" on 0.9.3. Crush is such an agent, so from a topic every plain message answered "⚠️ herdr agent.prompt: herdr api agent_not_ready" and no key reached the pane. Reads and waits work there, so the topic itself is fine: status, screens and done posts all worked, only input was dead.
The refusal arrives before anything reaches the pane, so the input is sent the way the agent would have received it:
Only agent_not_ready takes this path. agent_blocked still reaches the application, which types into the dialog's own free-text entry, and an agent gone from Herdr still answers as before. A target that names an agent rather than a pane has no pane to address, so its refusal reaches the caller unchanged.
Verified live on Herdr 0.9.3 with Crush 0.98.0 in a Herdr pane: the same pane answers agent.read and agent.wait, refuses both agent input methods, and takes the text through pane.send_text plus enter.