How sylva1027/waifu-agent-usage works
Waifu Agent Usage is a local dashboard for aggregating AI-coding usage, exploring token trends and quotas, estimating costs, and personalizing or sharing results. The main workflow is: a local user starts the service, scans or imports harness logs, the service exposes usage for the dashboard, and the user reviews and manages the resulting history. The graph also preserves documented pricing, achievements, sharing, themes, and Lite capabilities. Some internal modules were not sampled; those subsystems are represented only where the README or source index supports them.
Main entry points: server.js HTTP service · public/app.js Dashboard app · usage-reader.js Usage reader · lite/app.js Lite dashboard
Components 22
Service and ingestion
- CLI launch
src/cli.js - HTTP service
src/server.js - Usage executor
src/usage-executor-waifu.js - Harness sources
src/usage-sources.js - Windows source proof
native/windows-source-proof/src/main.rs
Usage analytics
- Usage reader
src/waifu/usage-reader.js - Usage queries
src/usage-query.js - Usage rollups
src/usage-rollups.js - Usage field rules
public/usage-fields.js - Pricing estimates
src/pricing.js - Quota usage
src/quota-usage-source.js
Dashboard experience
- Dashboard app
public/app.js - Lite dashboard
public/lite/app.js - Dashboard rendering
public/dashboard-render.js - Date and ranges
public/calendar.js - Localization
public/locale.js
Personal features
- Character themes
public/skins.js - Share cards
public/share-dialog.js - Achievements
src/achievement-runtime.js
History management
- History archive
src/history-archive.js - History backup
src/history-backup.js
Other components
- Local user
Connections 24
- Local user → CLI launch: starts service
README.md - CLI launch → HTTP service: launches
- Local user → Harness sources: scans or imports
README.md - HTTP service → Usage executor: creates
src/server.js - HTTP service → Usage reader: serves usage
- HTTP service → Pricing estimates: configures pricing
src/server.js - HTTP service → History archive: loads archive imports
src/server.js - Harness sources → Windows source proof: uses native proof
- Usage reader → Usage queries: resolves ranges
src/waifu/usage-reader.js - Usage reader → Usage rollups: uses aggregates
src/waifu/usage-reader.js - Usage queries → Usage field rules: uses field rules
src/usage-query.js - Usage reader → Pricing estimates: prices usage
src/waifu/usage-reader.js - Local user → Dashboard app: opens dashboard
README.md - HTTP service → Dashboard app: provides dashboard
- Dashboard app → Dashboard rendering: renders views
public/app.js - Dashboard app → Date and ranges: uses date picker
public/app.js - Dashboard app → Localization: translates page
public/app.js - Lite dashboard → Dashboard rendering: renders views
public/lite/app.js - Lite dashboard → Date and ranges: uses date picker
public/lite/app.js - Local user → Character themes: chooses themes
README.md - Local user → Share cards: creates share cards
README.md - Local user → Achievements: reviews achievements
README.md - Local user → History backup: backs up history
README.md - Local user → History archive: imports or restores
README.md