Packages
@relayburn/reader@1.9.0(tag:reader-v1.9.0)@relayburn/ledger@1.9.0(tag:ledger-v1.9.0)@relayburn/analyze@1.9.0(tag:analyze-v1.9.0)@relayburn/ingest@1.9.0(tag:ingest-v1.9.0)@relayburn/sdk@1.9.0(tag:sdk-v1.9.0)@relayburn/mcp@1.9.0(tag:mcp-v1.9.0)@relayburn/cli@1.9.0(tag:cli-v1.9.0)relayburn@1.9.0(tag:relayburn-v1.9.0)
Release Notes
Changed
- Architecture:
@relayburn/sdkis now the canonical in-process query surface. Dependency order moves from… → mcp → cli → sdk → relayburnto… → sdk → mcp → cli → relayburn;@relayburn/mcpnow depends on@relayburn/sdkand rewritesburn__sessionCostas a thin wrapper over the SDK's newsessionCost()function. New read verbs should land in the SDK first; MCP and CLI become presenters (tool definitions / table rendering) over the same SDK calls so query logic stops drifting between them. burn comparejoinssummary/sessionCost/overhead/overheadTrimas a thin presenter over@relayburn/sdk's newcompare()function. The archive-vs-ledger branching and fidelity-gate logic move into the SDK so a futureburn__compareMCP tool (and embedders) can wrap the same call without re-implementing them.
Package Changelogs
@relayburn/analyze
Changed
- Extract ingest orchestration into @relayburn/ingest (#230)
@relayburn/ingest
Added
- New package extracted from
@relayburn/cli. Owns Claude/Codex/OpenCode session-store discovery, incremental parse-and-append orchestration, pending-stamp resolution, content-gap warning state, and the polling watch-loop primitive. CLI and SDK now consume these operations from@relayburn/ingestinstead of the CLI internals.
@relayburn/sdk
Added
compare({ models, … })returns the per-(model, activity)CompareResultshape (analyzedTurns,models,categories,totals, flatcells[],fidelity { minimum, excluded, summary }) — the JSON objectburn compare --jsonnow emits. Mirrors the CLI's archive-vs-ledger branching: archive whenminFidelity === 'partial'and no provider filter, ledger walk otherwise. Falls back transparently to the ledger walk when the archive read fails.sessionCost({ session })returns the compact per-session cost shape (totalUSD,totalTokens,turnCount,models) the MCPburn__sessionCosttool now wraps directly.summary()result now includesturnCount.summary()andsessionCost()read through the SQLite archive by default with transparent fallback to the JSONL ledger walk on archive failure. PassonLogto capture the fallback reason.overhead({ project, since?, kind? })returns per-file + per-section overhead cost attribution (the JSON shapeburn overhead --jsonnow consumes).overheadTrim({ project, since?, kind?, top?, includeDiff? })returns trim recommendations with projected savings and (by default) embedded unified diffs (the JSON shapeburn overhead trim --jsonnow consumes). PassincludeDiff: falseto skip the per-file disk reads.summary({ since })andoverhead({ since })/overheadTrim({ since })now accept either an ISO timestamp or a relative range (24h,7d,4w,2m); the SDK normalizes both forms before querying the ledger so direct SDK callers get the same forgiving input shape CLI users have. Previously a raw relative string would silently filter out every turn.
@relayburn/mcp
Changed
burn__sessionCostis now a thin wrapper over@relayburn/sdk's newsessionCost()function. The wire shape is unchanged (sessionId,totalUSD,totalTokens,turnCount,models,note?); the cost computation, archive-with-fallback strategy, and pricing snapshot all live in the SDK now, eliminating the duplicate query path that previously lived inside the MCP tool.@relayburn/mcpnow depends on@relayburn/sdk. The package's role going forward is "MCP-shaped wrapper over the SDK's query surface" — new tools should call SDK functions rather than re-implementing computation against@relayburn/analyze/@relayburn/ledger.
@relayburn/cli
Changed
burn compareis now a thin presenter over@relayburn/sdk's newcompare()function. Flag parsing, ingest, and TTY/JSON/CSV rendering stay in the CLI; the archive-vs-ledger branching, fidelity gate, and result shaping live in the SDK. Wire shape (TTY +--json+--csv) is unchanged.burn overheadandburn overhead trimare now thin presenters over@relayburn/sdk's newoverhead()/overheadTrim()functions. Wire shape (TTY +--json) is unchanged; the discovery + ingest + attribution pipeline now lives in one place so future MCP tools can call it directly.