codeburn/docs/providers/kiro.md
Resham Joshi 6746ecc22f
Add CONTRIBUTING.md, docs/architecture.md, and per-provider docs (#284)
Document the contributor onboarding path:
- CONTRIBUTING.md: setup, npm scripts, coding conventions, PR process,
  the block-claude-coauthor enforcement, and the five providers without
  test coverage today (claude, gemini, goose, qwen, antigravity).
- docs/architecture.md: 12-command CLI surface, parser pipeline, three
  cache layers, 14 optimize detectors, and the mac / gnome / build
  layouts with cited line numbers.
- docs/providers/: one file per provider (17 providers plus the shared
  vscode-cline-parser helper). Each covers data path, storage format,
  caching, dedup key, quirks, and a "when fixing a bug here" checklist.

Also fix two pre-existing documentation issues surfaced while writing
the new docs:
- RELEASING.md claimed GitHub Actions auto-publishes the CLI when a
  v* tag is pushed. There is no such workflow; CLI publishing is
  manual via npm publish. Updated the CLI section to reflect reality
  and kept the menubar (mac-v* tag) automation accurate.
- .gitignore had CLAUDE.md unanchored, which on case-insensitive
  filesystems also matched docs/providers/claude.md. Anchored to
  /CLAUDE.md so the root-level memory file stays ignored without
  affecting subdirectory docs.

All cited file paths, line numbers, function names, and test counts
were verified against current code (41 test files, 558 tests passing).
2026-05-09 18:39:41 -07:00

1.9 KiB

Kiro

Kiro IDE chat history.

  • Source: src/providers/kiro.ts
  • Loading: eager (src/providers/index.ts:7)
  • Test: tests/providers/kiro.test.ts (328 lines)

Where it reads from

VS Code-style globalStorage at kiro.kiroagent:

Platform Path
macOS ~/Library/Application Support/Kiro/User/globalStorage/kiro.kiroagent
Windows %APPDATA%/Kiro/User/globalStorage/kiro.kiroagent
Linux ~/.config/Kiro/User/globalStorage/kiro.kiroagent

Sessions are .chat files under hash-named subdirectories. Discovery is in kiro.ts:215-247; the path-resolution helpers it uses start at kiro.ts:164.

Storage format

JSON .chat files (kiro.ts:153).

Caching

None.

Deduplication

Per executionId (kiro.ts:104).

Quirks

  • Workspace hash resolution is non-trivial. The parser tries workspace.json first; if that fails, it base64-decodes the directory name to recover the workspace path (kiro.ts:198-213).
  • Model ID normalization. Kiro stores models like claude-1.2; the parser rewrites the dot to a hyphen so they match claude-1-2 in the pricing snapshot (kiro.ts:65-67). Add new versions here when Kiro ships them.
  • Tool name extraction is regex-driven. Kiro embeds tool calls inside the message text as <tool_use><name>...</name> (kiro.ts:69-78). Brittle but unavoidable until Kiro emits structured tool data.
  • Token counts are estimated via char count (CHARS_PER_TOKEN = 4, kiro.ts:9, :108-109).

When fixing a bug here

  1. If the bug is "wrong workspace", check the base64 fallback path. Some users name their workspaces with characters that are not valid base64.
  2. If the bug is "missing model in pricing", add the model to the normalization map at kiro.ts:65-67 and verify against tests/providers/kiro.test.ts.
  3. If the bug is "tools missing", look at the regex at kiro.ts:69-78. Kiro changes its envelope occasionally.