feat(17C): operation count metering — searches and index jobs
Replaces the token usage bar with two per-operation usage rows (Searches and Index jobs) across the full billing stack.
Backend: - billing-constants: add MONTHLY_SEARCHES_INCLUDED_BY_TIER and MONTHLY_INDEX_JOBS_INCLUDED_BY_TIER (free/plus/growth/pro allowances; pending calibration from shadow logs before BILLING_ENFORCE=true) - billing-logic: normalizeBillingUser adds monthly_searches_used / monthly_index_jobs_used fields; new effectiveMonthlySearchesIncluded and effectiveMonthlyIndexJobsIncluded helpers; defaultUserRecord adds both fields - billing-store: resetMonthlyTokensIfNeeded resets both counters on period rollover - billing-middleware: increments search/index counters in the same load-modify-save cycle as tryDeduct (zero extra blob round-trips) - billing-http: exposes monthly_searches_used, monthly_searches_included, monthly_index_jobs_used, monthly_index_jobs_included in summary
Frontend: - index.html: replace single token bar with two labelled op rows - hub.js: updateTokenBar → updateUsageBar(fillId, used, inc); loadBillingPanel reads and renders both search and index-job bars; setDash resets both - hub.css: .billing-op-row / .billing-op-label layout helpers
0 comments
muse hub commit comment sha256:2413cf8d0fe722d1ea19d7078d060f06585f680aa4c5c1092ca3bc31378817c6 --body "your comment"
No comments yet. Be the first to start the discussion.