Skip to content

feat(agents): add Kiro support#101

Merged
RealZST merged 6 commits into
RealZST:mainfrom
Orchardxyz:feat/kiro-agent-support
Jul 11, 2026
Merged

feat(agents): add Kiro support#101
RealZST merged 6 commits into
RealZST:mainfrom
Orchardxyz:feat/kiro-agent-support

Conversation

@Orchardxyz

Copy link
Copy Markdown
Contributor

Summary

  • Add Kiro as a supported HarnessKit agent.
  • Discover Kiro skills, MCP servers, steering rules, custom agents, and IDE hooks.
  • Support Kiro hook files under .kiro/hooks/*.json and ~/.kiro/hooks/*.json.
  • Add Kiro to frontend agent ordering, display names, colors, filters, onboarding, and mascot UI.
  • Update README support tables and agent counts.

Motivation

Closes #96.

Verification

  • cargo test -p hk-core
  • pnpm exec tsc --noEmit
  • pnpm test
  • pnpm build

Snapshots

The Kiro brand animation:

PixPin_2026-07-08_11-23-06

Orchardxyz and others added 6 commits July 8, 2026 11:17
Kiro's hook docs only sanction "v1" as the top-level version value
(https://kiro.dev/docs/hooks/); validation behavior for other values is
undocumented, so writing "1" risks Kiro silently skipping the file.
Pin the contract with an assertion in the roundtrip test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
deploy_hook already guards against duplicates via kiro_hook_matches, but
restore_hook pushed unconditionally, so a double-restore (e.g. repeated
enable) duplicated the entry. Use the same (event, matcher, command)
identity on restore.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Kiro hooks carry an on-disk `enabled` field (default true, "set false to
skip without deleting" — https://kiro.dev/docs/hooks/), and Kiro's own
panel toggles it in place. Previously HK ignored the field when scanning
(natively disabled hooks showed as enabled) and toggled by remove+DB
snapshot, fighting Kiro's own mechanism.

- HookEntry gains an `enabled` flag (always true for formats without a
  native per-hook flag), threaded through both hook scan paths
- toggle_hook flips `enabled` in place for KiroIde configs and takes no
  DB snapshot — on-disk state is read back on rescan via the existing
  disabled_config-IS-NULL upsert CASE, mirroring the native MCP toggle
- covered by an end-to-end disable → rescan → enable manager test

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
~/.kiro/agents and .kiro/agents hold two coexisting formats: Kiro CLI
custom agents (*.json) and IDE custom subagents (*.md with YAML front
matter, https://kiro.dev/docs/chat/subagents/). Globbing only *.json
silently dropped every IDE-authored subagent — the more common format
in public repos.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…hooks

Kiro's docs describe `~/.kiro/hooks/` (user-level), but no released
version loads it — verified on-device with 1.0.89 (macOS): the IDE only
counts workspace `.kiro/hooks/` entries. Upstream: kirodotdev/Kiro#5440
(open feature request) and #9857 (open bug, 1.0.52). Deploying there
produced a hook that HK reported installed but Kiro silently never ran.

- new adapter capability supports_global_hook_install() (default true);
  Kiro returns false with the upstream references
- install_to_agent (global-only in v1) refuses with a clear Validation
  error instead of writing a dead config
- the detail panel's Install-to-Agent button for hooks greys out for
  Kiro with a dedicated bilingual tooltip (en/zh)
- scanning and toggling of hook files already on disk is unaffected

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@RealZST RealZST merged commit ea86071 into RealZST:main Jul 11, 2026
3 checks passed
@RealZST

RealZST commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Thanks for adding Kiro! Really solid and thorough work! I tested everything on a real Kiro IDE 1.0.89 install and pushed five fixes on top of your commit:

Also tested end-to-end on a real machine: HK correctly scans hooks and MCP servers configured in Kiro, enable/disable stays in sync between HK and Kiro's panel, and both subagent formats show up in the scan.

Thanks again! Merged.

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.

许愿支持亚马逊的Kiro

2 participants