Skip to content

feat(kiro): add native hook integration - #215

Open
hxy91819 wants to merge 6 commits into
vincentkoc:mainfrom
hxy91819:feature/kiro-native-hook
Open

feat(kiro): add native hook integration#215
hxy91819 wants to merge 6 commits into
vincentkoc:mainfrom
hxy91819:feature/kiro-native-hook

Conversation

@hxy91819

Copy link
Copy Markdown
Contributor

Summary

  • add a Kiro CLI 2.x workspace custom agent with a native preToolUse shell guard
  • install companion steering that guides shell calls through tokenjuice wrap
  • add Kiro install, doctor, uninstall, validation, and user documentation
  • fail closed for malformed payloads and wrapper-external shell operators

Why

Kiro CLI 2.x hooks can block shell calls but cannot rewrite tool input or replace
post-tool output. The integration therefore combines first-attempt steering with
a native guard that blocks unwrapped commands and returns an exact wrapped retry.

Test plan

env -u TOKENJUICE_NO_OMISSION pnpm exec vitest run test/hosts/kiro.test.ts
env -u TOKENJUICE_NO_OMISSION pnpm verify
.agents/skills/autoreview/scripts/autoreview --mode branch --base upstream/main

Final focused result: 17 tests passed. Final full result: 131 test files and
2,292 tests passed.

Compatibility and docs

This targets Kiro CLI 2.x and requires starting Kiro with
kiro-cli chat --agent tokenjuice. The native guard covers the custom agent's
built-in shell tool; it is not an operating-system sandbox.

This PR intentionally does not emit Kiro CLI 3's incompatible standalone
.kiro/hooks/*.json schema. README quickstart and detailed integration notes
document setup, validation, the raw escape hatch, and
TOKENJUICE_NO_OMISSION behavior.

@hxy91819
hxy91819 marked this pull request as ready for review July 29, 2026 15:38
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants