Files
mksglu__context-mode/tests/session/parse-opencode-usage.test.ts
Mert Koseoglu cc675f06d8 feat(cost): per-turn token+cost capture for 5 in-band adapters
Wave 3b in-band: openclaw, pi, omp, gemini-cli, opencode. Each gets a pure no-regex parse fn (parsePiUsage/parseOpenclawUsage/parseOpencodeUsage/parseGeminiUsage + omp usage.ts) mapping the adapter's native usage shape to buildAgentUsageEvent (native USD cost preferred where shipped: openclaw/pi/omp/opencode). pi/omp/opencode fully wired via the in-process plugin (db.insertEvent → forward). gemini-cli AfterModel hook handler + adapter registration added (settings.json emission + CI bundle remain). openclaw handler done; the diagnostic-bus onDiagnosticEvent subscription is added in plugin.ts at install-runtime (SDK resolvable only in the installed extension). 93 tests green, tsc clean.
2026-06-26 01:40:26 +03:00

6.4 KiB