Repository navigation
feat(parsing): add Kiro source support - #253
Merged
richardopenrefinery merged 1 commit intoNov 17, 2026
Merged
richardopenrefinery merged 1 commit into
richardopenrefinery merged 1 commit into
Conversation
Read Kiro (https://kiro.dev) sessions from the four stores a Kiro CLI or Kiro IDE install can hold: - the current event log under ~/.kiro/sessions/<workspace>/sess_<id>/ - the Kiro CLI SQLite database (conversations_v2 and the 1.x conversations table) - Kiro CLI 2.x JSONL transcripts under ~/.kiro/sessions/cli/ - earlier Kiro IDE workspace-sessions files, with the execution logs that hold what the agent said and edited in each turn Sessions are grouped by working directory as `kiro:<dir>`. A conversation present in more than one store is read once, from the newest format. Separate text, reasoning, tool-call and tool-result records are folded into one assistant message per model response, with each tool result attached to its call. `kiro` is wired into the CLI source choices, the workbench scanner, the doctor's on-disk client probe, excluded-project prefixes, and the workbench labels (Kiro CLI / Kiro IDE / Kiro). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.
What this adds
ClawJournal now discovers and parses sessions from Kiro, both the Kiro CLI and the Kiro IDE, as a new
kirosource. Kiro sessions show up inscan,list,inbox,export, and the workbench alongside the other agents, grouped by working directory askiro:<dir>.Kiro has changed its on-disk format several times, and one install can hold sessions in more than one of them. This reads four stores:
~/.kiro/sessions/[<workspace-hash>/]sess_<id>/messages.jsonl+session.json<Kiro CLI data dir>/data.sqlite3, tablesconversations_v2andconversations~/.kiro/sessions/cli/<id>.jsonl+<id>.json<IDE storage>/workspace-sessions/<base64url(cwd)>/<id>.json, plus the execution logs it referencesThe CLI data dir is
~/Library/Application Support/kiro-clion macOS and~/.local/share/kiro-clion Linux. IDE storage isglobalStorage/kiro.kiroagentunder the Kiro user-data dir.Main implementation decisions
kirosource for CLI and IDE. The current event-log store is shared by both, so they cannot be cleanly split into two sources. Where the store does identify the client, the session carriesclient_origin(cli/desktop) and the workbench labels it "Kiro CLI" or "Kiro IDE"; otherwise plain "Kiro". This mirrors how Claude Code and Claude Desktop share theclaudesource._KiroTranscriptaccumulator, shared by all four formats, folds them into the existing message shape and attaches each tool result to the call it answers._parse_tool_inputleaves nested containers alone, and Kiro'sfs_readputs paths inside a list of operations, so Kiro tool inputs get a recursive pass.Wiring outside the parser: CLI
--sourcechoices and labels, the workbench scanner's source set, the doctor's on-disk client probe, the excluded-project prefix list (withoutkiro:there, an excludedkiro:projwould be rewritten toclaude:kiro:proj), the analytics by-agent breakdown, and the frontend source badges.How it was checked
tests/parsing/test_kiro.py: 33 tests covering discovery, each store, cross-store de-duplication, tool-result pairing, anonymization, malformed input, and timestamp normalization. All fixtures are synthetic.main: 5894 passed, 1 skipped).clawjournal scan --source kiro(4 sessions indexed), ran it again (no new or updated sessions), and opened the workbench to confirm the list, the Kiro CLI / Kiro IDE / Kiro badges, and the session detail view with thinking and tool calls.npm run build(type check and bundle) passes. I could not get a useful local signal fromnpm test: all 185 frontend tests fail on my machine on unmodifiedmainas well (Node 26 locally, CI uses Node 20), so the frontend unit tests are only verified by CI here.Known limitations
ToolUseResults/CancelledToolUsesturns in the CLI database, and the 1.xconversationstable. These follow the conversation schema of the open-source Amazon Q Developer CLI (Kiro CLI's predecessor) as I understand it; the reference fixtures only coverPrompt,ResponseandToolUse.%APPDATA%\kiro-cli,%APPDATA%\Kiro).sha256(workspace)[:32]and onlysayactions and actions with aninputare replayed. If a log cannot be found or read, the parser falls back to the reply text in the session file..chatfiles are not imported. Each one is a per-execution snapshot of the whole conversation, so importing them directly would create many overlapping sessions. Grouping them is follow-up work.invoke_subagenttool call on the parent; the subagent's ownsub-executions/*.jsonltranscript is not read.kirois not added toFAILURE_VALUE_SOURCE_SCOPE, and recurring uploads stay limited to the audited Claude Code and Codex sources.clawjournal score --source kiroworks when asked for explicitly.KIRO_HOMEoverride and the remote dev-server storage path (~/.kiro-server/...) are not handled.🤖 Generated with Claude Code