Feature spec for native kiro-cli integration in moshi-hook, matching the existing codex/claude/opencode pattern.
kiro-cli is AWS/Anthropic's AI coding agent CLI. It's growing fast and doesn't have mobile notification support yet — moshi would be the first.
I built a working integration by piggybacking on codex-hook:
- Set
CODEX_HOOK_*env vars → callmoshi-hook codex-hook - Daemon accepts it, API publishes it, push arrives on iOS ✅
- Approval cards with approve/deny buttons work ✅
- Masquerades as codex (source shows "Codex" in the app)
The workaround scripts are attached below.
Currently returns 422 for unknown sources. Adding "kiro" to the allowlist is the only server-side change needed.
Reads env vars and forwards to the daemon socket, same as codex-hook and claude-hook:
KIRO_HOOK_EVENT=Stop|UserPromptSubmit|PermissionRequest
KIRO_HOOK_SESSION_ID=<session-uuid>
KIRO_HOOK_CWD=/path/to/project
KIRO_HOOK_PROMPT=<user message text> # UserPromptSubmit
KIRO_HOOK_TOOL_NAME=<tool name> # PermissionRequest
KIRO_HOOK_TOOL_INPUT=<tool description> # PermissionRequest
Kiro sessions have stable UUIDs (e.g. 430816e8-36b5-44c1-ae15-99952e391199) so sessionId one-row-per-session works naturally.
Kiro supports two hook integration points:
Option A: Global CLI hook (recommended) Write a wrapper/alias that fires lifecycle events:
~/.kiro/hooks/moshi-kiro-hook.sh (or binary equivalent)
Called by a kiro-chat wrapper that sends UserPromptSubmit on start, Stop on exit.
Option B: Kiro's native hook system
Kiro has .kiro/hooks/*.kiro.hook JSON files that trigger on file events:
{
"when": {"type": "fileEdited", "patterns": ["**/*"]},
"then": {"type": "command", "command": "moshi-hook kiro-hook"}
}This only fires on file edits (activity signal), not session lifecycle. Best used as a supplementary "tool_running" signal.
| Kiro behavior | moshi-hook event | Inbox effect |
|---|---|---|
| User sends message | session_started |
Running row |
| Agent finishes response | task_complete |
Completed row |
| Agent needs permission (destructive action) | approval_required |
Approval card |
| Session exits | session_ended |
Clear row |
hooks:
kiro current ~/.kiro/hooks/moshi-kiro-hook.sh
The attached workaround scripts work today by spoofing codex. To verify native support:
KIRO_HOOK_EVENT=Stop KIRO_HOOK_SESSION_ID=test KIRO_HOOK_CWD=$HOME moshi-hook kiro-hook
# Should publish to API without 422, show "Kiro" as source in app- Kiro is new, growing, and has no mobile notification story yet
- First-mover advantage for moshi in the kiro ecosystem
- Minimal implementation cost (one new source string, one subcommand, one install target)
- The wrapper pattern works for kiro-cli today; deeper integration can follow if kiro adds native hook lifecycle events
Built and tested by @dcolinmorgan. Happy to help test/iterate.