Replies: 1 comment
|
cookbook, and your read on the hook route matches mine. Send the PR against one thing worth knowing before you write it. The hooks package already installs a generic shell integration, that gets active/idle with no code, and it already handles the bash-preexec vs DEBUG-trap collision your poller would otherwise solve again. So the recipe's real delta is blocked and completed. Say that in How it works, a reader who only wants "is it running" needs one env var, not a poller. for the PR:
on the trigger itself: a |
Uh oh!
There was an error while loading. Please reload this page.
Following up on #332, same question for a different agent:
kiro-clireports nothing to the sidebar right now, and I don't think it can be wired up the way Claude Code, Codex, Pi, and OpenCode are.Two things stop a hook-based integration, both checked against the actual binary (kiro-cli 2.16.1) rather than its docs, which describe a format this version doesn't implement:
~/.kiro/agents/<name>.json. There's no global file. A merge would cover one agent and get overwritten by whatever else manages the rest - I have 66 of them on this machine, most rewritten by other tooling.kiro-cli agent validaterejects unknown event names, which makes it a decent oracle: only five events exist (agentSpawn,userPromptSubmit,preToolUse,postToolUse,stop), nothing permission-shaped.preToolUsefires with the same payload whether the tool was auto-approved or is actually waiting on you. Wiring it toblockedwould light up amber on every trusted tool call.So instead of a hook I wrote a cookbook recipe that reads the pane. It starts a small poller from the shell (preexec/precmd, zsh/bash/fish all covered) when a
kiro/kiro-clicommand runs, and the poller calls the stockagterm-agent-status.sh- same script Kimi's recipe points at - withactivewhile kiro's footer says it's working,blockedwhile its approval dialog is actually on screen,completedwhen the turn ends. The approval-detection strings are a transcript of a real dialog, not a guess:blockedrequires the anchor line plus one of the option rows together - the anchor alone is just English and turns up in a grep hit or a policy doc.I went cookbook rather than the installer on purpose. Kimi's recipe is a config snippet because kimi's own hooks already do the disambiguation; this one is closer to what the Codex adapter does (reading the pane as the actual signal, not a correction to one), and that felt like more machinery than I wanted to hand you unasked. Happy to be told otherwise if you'd rather this land in the installer - I don't have strong feelings on which, just wanted to check before opening a PR either way.
Tested it live:
kiro-cli chatreports active/blocked/completed correctly. One real gap the pane-reading has, worth flagging up front - it's only as good as your shell's preexec hook actually seeing the literal command you typed. An alias with a different name (I have one) needs its name added to the regex, or it's silently never detected. Documented in the recipe's Limits section, but it's the kind of thing that bites quietly.If this approach makes sense to you, I'd like to move forward and open a PR against
cookbook/.All reactions