Skip to main content

Module kiro_integration

Module kiro_integration 

Source
Expand description

Kiro (IDE chat and CLI) integration.

Kiro’s PreToolUse hooks are allow/block only — there is no updatedInput-style rewrite mechanism, so the command-rewriting hook sqz used to install never worked (and its when/then JSON wasn’t a valid Kiro hook file either). The integration that actually works in Kiro chat is:

  1. A steering file at .kiro/steering/sqz.md (always included) that teaches the agent to pipe long command output through sqz compress.
  2. The sqz-mcp server registered in .kiro/settings/mcp.json.

Enums§

KiroMcpInstall
KiroMcpRemove
SteeringState
State of a steering file sqz may manage.

Functions§

install_kiro_mcp_config
install_kiro_steering
Write the steering file. Refreshes sqz-managed files in place, leaves a user-authored .kiro/steering/sqz.md alone.
install_kiro_user_mcp_config
Register sqz-mcp in the user-level ~/.kiro/settings/mcp.json, which Kiro merges into every workspace.
install_kiro_user_steering
Write the user-level steering file (~/.kiro/steering/sqz.md), which Kiro applies to every workspace.
kiro_legacy_hook_path
The legacy hook file older sqz versions wrote. It used a schema Kiro never recognized, so it can be deleted safely when we detect it.
kiro_mcp_path
kiro_steering_content
kiro_steering_path
kiro_steering_state
Compare a steering file against what this version would write for the same sqz path. global selects the user-level template.
kiro_user_mcp_path
kiro_user_root
Kiro’s user-level config root: $KIRO_HOME if set, else ~/.kiro. Steering and MCP config placed here apply to every workspace.
kiro_user_steering_content
kiro_user_steering_path
refresh_kiro_steering
Rewrite a stale sqz-managed steering file with this version’s template, keeping the sqz binary path it already points at when that binary still exists (else fallback_sqz_path). Returns Ok(false) for missing, current, or user-authored files.
remove_kiro_legacy_hook
Delete the legacy broken hook file if present and sqz-authored.
remove_kiro_mcp_config
remove_kiro_steering
remove_kiro_user_mcp_config
remove_kiro_user_steering
user_steering_installed
Whether sqz’s user-level steering is installed. Kiro applies ~/.kiro/steering to every workspace, so a project copy next to it is the same guidance sent twice on every request.