codeburn/docs/providers
Rick Culpepper (claude) 448d470049 feat(providers): add cline-cli provider for Cline CLI sessions
The Cline CLI (npm `cline`, 3.x) stores sessions as
<sessions>/<id>/<id>.json + <id>.messages.json. The existing `cline`
provider only discovers tasks/<id>/ui_messages.json, so every CLI session
was silently reported as $0.00 — no warning, not even under --verbose.

Adds `cline-cli` as its own provider rather than a third root on `cline`,
leaving the shared Cline-family parser (Roo Code, KiloCode, IBM Bob)
untouched. It mirrors the CLI's own root resolution
(CLINE_SESSION_DATA_DIR -> CLINE_DATA_DIR -> CLINE_DIR -> ~/.cline),
implements probeRoots() so `doctor` can tell "not installed" from "wrong
override", emits one call per assistant message's `metrics` block, and
falls back to the session rollup when a session carries none. The
fallback reads `usage`, not `aggregateUsage`, which folds in spawned
subagents that are themselves separate session directories.

Two supporting changes, both required for CLI costs to report correctly:

- parser.ts re-priced cline-cli calls from tokens because the provider
  was not on the reported-cost allowlist, inflating a real 12-session
  local sample from $1.11 to $3.92.
- session-cache.ts gains the matching PROVIDER_ENV_VARS entry (so a
  changed override invalidates) and a `reported-cost-v1` parse version
  (so sessions cached before the allowlist fix re-parse once instead of
  being re-priced forever).

Cost is treated as metered only when actually present and non-negative,
so a metered $0 stays reported while a missing or negative cost falls
back to token pricing — applied identically on the per-message and
rollup paths. Timestamps promote a seconds-resolution value rather than
silently landing in 1970, matching the guard kiro.ts uses.

CLINE_DIR / CLINE_DATA_DIR / CLINE_SESSION_DATA_DIR are added to the test
env-isolation list so a developer's real sessions cannot bleed into
fixtures.

The VS Code variant discovery bug reported alongside this in #874 is
deliberately NOT fixed here — it shipped in #882.

Verified against 18 real local sessions: 142 calls, 4,934,762 input /
224,561 output tokens, and a cost matching the CLI's own metered total to
the cent. `codeburn doctor` reports "Cline CLI  OK".

Refs: #874
2026-08-04 02:45:16 +03:00
..
antigravity.md fix(antigravity): stamp mtime fallback at emission, tighten path classification (#612) 2026-07-16 07:49:54 -07:00
claude.md fix(claude): discover Claude Desktop/Cowork sessions in Windows MSIX installs 2026-07-24 00:30:30 +03:00
cline-cli.md feat(providers): add cline-cli provider for Cline CLI sessions 2026-08-04 02:45:16 +03:00
cline.md feat(providers): add cline-cli provider for Cline CLI sessions 2026-08-04 02:45:16 +03:00
codewhale.md feat: add CodeWhale provider support (#674) 2026-07-16 03:12:28 -07:00
codex.md fix(codex): validate rollouts structurally instead of by originator 2026-08-04 00:15:24 +03:00
copilot.md fix(copilot): parse JetBrains agent sessions from old plugin format (≤1.5.x) 2026-07-03 18:21:08 +05:30
crush.md Add Crush provider plus per-provider icon column in README (#286) 2026-05-09 20:47:56 -07:00
cursor-agent.md Add CONTRIBUTING.md, docs/architecture.md, and per-provider docs (#284) 2026-05-09 18:39:41 -07:00
cursor.md Add CONTRIBUTING.md, docs/architecture.md, and per-provider docs (#284) 2026-05-09 18:39:41 -07:00
devin.md fix(devin): add missing support for ATIF v1.7 (#570) 2026-06-28 19:00:51 +02:00
droid.md Add CONTRIBUTING.md, docs/architecture.md, and per-provider docs (#284) 2026-05-09 18:39:41 -07:00
forge.md feat(providers): add forge provider support (#401) 2026-05-26 03:36:57 -07:00
gemini.md Add CONTRIBUTING.md, docs/architecture.md, and per-provider docs (#284) 2026-05-09 18:39:41 -07:00
goose.md Add CONTRIBUTING.md, docs/architecture.md, and per-provider docs (#284) 2026-05-09 18:39:41 -07:00
grok.md feat(providers): add Grok Build provider (#521) 2026-06-19 17:21:41 +02:00
hermes.md feat: add Hermes Agent provider 2026-06-21 23:29:22 +02:00
ibm-bob.md Add IBM Bob provider with workspace extraction (#316) 2026-05-11 20:54:13 -07:00
kilo-code.md Add Cline provider 2026-05-12 00:31:41 +03:00
kimi.md Add Kimi provider 2026-05-11 19:02:28 +03:00
kimicode.md kimicode: discover desktop-runtime sessions and fix menubar visibility 2026-07-23 21:31:25 +02:00
kiro.md kiro: price v1 executions from credits; unify fallback across parsers 2026-07-14 22:36:08 +00:00
lingtai-tui.md Add LingTai TUI provider support 2026-07-09 23:47:59 +02:00
mistral-vibe.md Fix one-shot rate detection for all non-Claude providers (#355) 2026-05-18 15:56:14 -07:00
mux.md feat(providers): add coder/mux as a datasource (#438) 2026-06-06 03:04:24 +02:00
omp.md Add CONTRIBUTING.md, docs/architecture.md, and per-provider docs (#284) 2026-05-09 18:39:41 -07:00
openclaw.md Add CONTRIBUTING.md, docs/architecture.md, and per-provider docs (#284) 2026-05-09 18:39:41 -07:00
opencode.md fix(opencode): support custom data dir and db prefix (#620) 2026-07-16 02:18:19 -07:00
pi.md fix(pi): classify native skill loads as Skill, not Read (#588) (#590) 2026-07-01 15:57:31 +02:00
quickdesk.md feat(quickdesk): Amazon Quick Desktop provider, parse ~/.quickwork sessions and metrics (#707) 2026-07-18 00:02:01 +03:00
qwen.md Add CONTRIBUTING.md, docs/architecture.md, and per-provider docs (#284) 2026-05-09 18:39:41 -07:00
README.md feat(providers): add cline-cli provider for Cline CLI sessions 2026-08-04 02:45:16 +03:00
roo-code.md Add Cline provider 2026-05-12 00:31:41 +03:00
vercel-gateway.md fix(cursor): period-aligned lookback; add Vercel AI Gateway provider (#432) 2026-06-09 23:01:43 +02:00
vscode-cline-parser.md Merge main into feat/cline-provider to resolve conflicts 2026-05-16 05:58:10 -07:00
warp.md feat: add Warp provider adapter (#350) 2026-05-21 00:19:53 -07:00
zcode.md feat(providers): add ZCode (z.ai GLM-5.2) usage provider (#537) 2026-06-20 21:37:32 +02:00
zed.md release: 0.9.15 2026-07-02 06:19:14 +02:00
zerostack.md Add zerostack provider (#519) 2026-06-19 14:44:45 +02:00

Provider Docs

One file per provider integration. If you are fixing a bug or adding a feature scoped to a single provider, read the file for that provider first; it tells you which file to edit, where on disk the source data lives, and what edge cases the test suite already covers.

For the architectural picture, see ../architecture.md.

Provider Index

Eager (always loaded)

Provider Storage Source Test
Claude JSONL (no parser) src/providers/claude.ts none (covered indirectly)
Cline JSON src/providers/cline.ts tests/providers/cline.test.ts
Cline CLI JSON src/providers/cline-cli.ts tests/providers/cline-cli.test.ts
CodeWhale JSON src/providers/codewhale.ts tests/providers/codewhale.test.ts
Codex JSONL src/providers/codex.ts tests/providers/codex.test.ts
Copilot JSONL + SQLite (OTel) + Nitrite .db (JetBrains) src/providers/copilot.ts tests/providers/copilot.test.ts
Devin JSON + SQLite enrichment src/providers/devin.ts tests/providers/devin.test.ts
Droid JSONL src/providers/droid.ts tests/providers/droid.test.ts
Gemini JSON / JSONL src/providers/gemini.ts none
Hermes Agent SQLite src/providers/hermes.ts tests/providers/hermes.test.ts
IBM Bob JSON src/providers/ibm-bob.ts tests/providers/ibm-bob.test.ts
KiloCode JSON src/providers/kilo-code.ts tests/providers/kilo-code.test.ts
Kiro JSON src/providers/kiro.ts tests/providers/kiro.test.ts
Kimi JSONL src/providers/kimi.ts tests/providers/kimi.test.ts
Kimi Code JSONL src/providers/kimicode.ts tests/providers/kimicode.test.ts
LingTai TUI JSONL src/providers/lingtai-tui.ts tests/providers/lingtai-tui.test.ts
Mistral Vibe JSON / JSONL src/providers/mistral-vibe.ts tests/providers/mistral-vibe.test.ts
OpenClaw JSONL src/providers/openclaw.ts tests/providers/openclaw.test.ts
Pi JSONL src/providers/pi.ts tests/providers/pi.test.ts
OMP JSONL src/providers/pi.ts tests/providers/omp.test.ts
Qwen JSONL src/providers/qwen.ts none
Quick Desktop EMF JSONL + SQLite src/providers/quickdesk.ts tests/providers/quickdesk.test.ts
Roo Code JSON src/providers/roo-code.ts tests/providers/roo-code.test.ts
Zerostack JSON src/providers/zerostack.ts tests/providers/zerostack.test.ts
Grok Build JSON/JSONL src/providers/grok.ts tests/providers/grok.test.ts

Lazy (loaded on first call)

Provider Storage Source Test
Antigravity protobuf over RPC src/providers/antigravity.ts none
Crush SQLite (per-project) src/providers/crush.ts tests/providers/crush.test.ts
Forge SQLite src/providers/forge.ts tests/providers/forge.test.ts
Cursor SQLite src/providers/cursor.ts tests/providers/cursor.test.ts
Cursor Agent text / JSONL src/providers/cursor-agent.ts tests/providers/cursor-agent.test.ts
Goose SQLite src/providers/goose.ts none
OpenCode SQLite src/providers/opencode.ts tests/providers/opencode.test.ts
Warp SQLite src/providers/warp.ts tests/providers/warp.test.ts
Vercel AI Gateway REST API src/providers/vercel-gateway.ts tests/providers/vercel-gateway.test.ts
ZCode SQLite src/providers/zcode.ts tests/providers/zcode.test.ts

Shared

Helper Used by Source
vscode-cline-parser cline, ibm-bob, kilo-code, roo-code src/providers/vscode-cline-parser.ts

File Format

Each provider doc has the same structure:

  1. One-line summary of what the provider integrates.
  2. Where it reads from on disk (or over RPC).
  3. Storage format and validation rules.
  4. Caching (which cache layer, if any).
  5. Deduplication key so you understand cross-provider dedup.
  6. Quirks that have bitten us before.
  7. When fixing a bug here as a checklist.

If you add a new provider, copy claude.md as a template and fill in your provider's specifics. Update this index, and prefer adding a real test fixture under tests/providers/.