Add Kiro plugin-tier adapter (hooks + mode switching) - #829
Open
santu47 wants to merge 2 commits into
Open
Conversation
Kiro was instruction-tier only (always-on steering rule). Add a plugin-tier adapter mirroring the Qoder precedent so Kiro gets /ponytail level switching and subagent injection via its native hook system. - ponytail-runtime.js: detect Kiro via --host=kiro argv flag (or PONYTAIL_HOST=kiro); Kiro exposes no distinctive env var to hook subprocesses, so the adapter declares its identity. State dir under ~/.kiro; writeHookOutput emits raw stdout for all events (Kiro forwards a command hook's stdout as context for SessionStart/UserPromptSubmit/PreToolUse). - ponytail-activate.js: suppress the Claude-only statusline nudge for Kiro (no settings.json/statusLine concept), mirroring the isCopilot/isCodex handling. - hooks/kiro-hooks.json: Kiro v1 hook template (SessionStart -> activate, UserPromptSubmit -> mode-tracker, PreToolUse matched to the sub-agent tool -> subagent). - tests: Kiro runtime coverage in hooks.test.js + kiro-plugin.test.js smoke test. - docs/agent-portability.md + README.md: document Kiro plugin-tier.
Kiro has no SubagentStart event, and per Kiro's docs a PreToolUse command hook's stdout is ignored on exit 0 (it can only block via stderr+exit 2). So the subagent-injection hook could never inject the ruleset — and the tool name was wrong anyway (invoke_subagent, not invoke_sub_agent). Remove it; SessionStart activation and UserPromptSubmit /ponytail switching are the supported plugin-tier hooks, and the always-on steering rule covers agents.
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.
Kiro was instruction-tier only (always-on steering rule). Add a plugin-tier adapter mirroring the Qoder precedent so Kiro gets /ponytail level switching and subagent injection via its native hook system.
ponytail-runtime.js: detect Kiro via --host=kiro argv flag (or PONYTAIL_HOST=kiro); Kiro exposes no distinctive env var to hook subprocesses, so the adapter declares its identity. State dir under ~/.kiro; writeHookOutput emits raw stdout for all events (Kiro forwards a command hook's stdout as context for SessionStart/UserPromptSubmit/PreToolUse).
ponytail-activate.js: suppress the Claude-only statusline nudge for Kiro (no settings.json/statusLine concept), mirroring the isCopilot/isCodex handling.
hooks/kiro-hooks.json: Kiro v1 hook template (SessionStart -> activate, UserPromptSubmit -> mode-tracker, PreToolUse matched to the sub-agent tool -> subagent).
tests: Kiro runtime coverage in hooks.test.js + kiro-plugin.test.js smoke test.
docs/agent-portability.md + README.md: document Kiro plugin-tier.