# Token Usage Monitor for Ace Manglasabang **Linear:** MAN-19 — https://linear.app/manglasabang/issue/MAN-19/token-usage-monitor-for-ace-manglasabang **Status:** Done **Project:** junwonhome ## Description ## Token Usage Monitor for Ace Manglasabang Dashboard and monitoring channel for tracking all Ace session usage. ### Location * Channel: `channels/monitor/` * Dashboard: `channels/monitor/monitor.html` * Data: `channels/monitor/sessions.jsonl` * Schedule: daily at 22:00 PST (launchd) ### How It Works ClaudeBridge auto-logs every session. No per-channel instrumentation needed. When any channel gets a `result` from Claude CLI, bridge.ts parses the usage data and appends to `sessions.jsonl`. Fields tracked per session: date, time, channel, domain, model, duration_ms, duration_min, tokens_in, tokens_out, cost_usd, num_turns. ### Domain Tracking * Email: `ace@palace.fund` -> palacefund, `ace@manglasabang.com` -> junwonhome * Linear: matched from issue labels (junwonhome, junwoncompany, palacefund, palaceapp, palacelab) * Other channels: no domain (heartbeat, briefing, market-report, slack, monitor) ### Dashboard (monitor.html) Mobile-friendly dark theme. Three tabs: Today, 7 Days, All Time. Sections: * Summary cards: sessions, duration, cost, tokens out * By Channel (color-coded bars) * By Model * By Domain (color-coded bars) * Daily Trend (sparkline, 7-day/all-time only) * Recent Sessions (last 15, with channel dot + domain) Regenerated on each `monitor.ts` run with embedded data. ### Channels Instrumented All channels set `bridge.channel` and domain where applicable: * heartbeat (channel only) * email (channel + domain per account) * slack (channel only) * linear (channel + domain per issue labels) * briefing (channel only) * market-report (channel only) ### Status Complete. Service installed and running.