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

Function readSessionCosts

scripts/telemetry-stats.js:138–140  ·  view source on GitHub ↗

* Read per-session cost events from session-costs.jsonl. * Each event is written by the session-end hook. * * @returns {Array<{timestamp:string, campaign_slug:string|null, session_id:string|null, * agent_count:number, duration_minutes:number, estimated_cost:number, override_cost:number|null}>}

()

Source from the content-addressed store, hash-verified

136 * agent_count:number, duration_minutes:number, estimated_cost:number, override_cost:number|null}>}
137 */
138function readSessionCosts() {
139 return readJsonl(path.join(TELEMETRY_DIR, SESSION_COST_FILE));
140}
141
142/**
143 * Get the best cost for a session-cost event.

Callers 1

readCostByCampaignFunction · 0.85

Calls 1

readJsonlFunction · 0.70

Tested by

no test coverage detected