Skip to content

v2.8.0 — Measured token usage from local JSONL

Choose a tag to compare

@pitimon pitimon released this 28 May 22:02
· 15 commits to main since this release
61447b4

What's new

Measured token-usage push (companion to MemForge server v1.16.0 / ADR-003).

c-memforge now reads your Claude Code session transcripts (~/.claude/projects/*.jsonl) directly and pushes real per-(date, model) token usage to the MemForge server, powering the Activity page's "Measured (actual API spend)" card.

  • No ccusage install required — the JSONL parser is pure TypeScript with zero runtime dependencies (logic ported from ryoppippi/ccusage, MIT).
  • Idempotent — the sync-poller pushes on a throttled 10-minute cadence; the server UPSERTs by (date, model), so a full re-scan never inflates totals.
  • Safe — usage parsing/push errors are self-contained: they never crash the sync loop or affect observation sync.

Requires

MemForge server v1.16.0+ (provides usage_daily + POST /api/usage/tokens).

Verification

Parser output verified byte-exact vs ccusage --timezone UTC for opus/sonnet/haiku on real transcripts; full client suite 120/120.

Update: /plugin → memforge-client → Update now.