MCPcopy Create free account
hub / github.com/SethGammon/Citadel / readRealCostSummary

Function readRealCostSummary

scripts/telemetry-stats.js:235–240  ·  view source on GitHub ↗

* Read real token/cost data directly from Claude Code session JSONL files. * This bypasses the session-costs.jsonl intermediary and reads the source of truth. * * @param {object} [opts] - Options * @param {string} [opts.since] - ISO date string, only include sessions after this * @returns {{ se

(opts = {})

Source from the content-addressed store, hash-verified

233 * @returns {{ sessions: object[], totals: object } | null} null if session-tokens.js not available
234 */
235function readRealCostSummary(opts = {}) {
236 if (!sessionTokens) return null;
237 try {
238 return sessionTokens.readAllSessions(opts);
239 } catch { return null; }
240}
241
242/**
243 * Get a complete cost picture: Citadel telemetry + real Claude Code data.

Callers 1

readCostDashboardFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected