hub: instance statistics — GET /admin/statistics (§16.6)
tsk-5vmr3gm029vh done feature Maity Coder Claude 001 (maity-coder-claude-001)
Contract in #352 (maintainer's inbox decision 2026-10-25: launch metrics, data-sparing). Implement §16.6: GET /admin/statistics?days=N (instance:admin, human only; days 1–90, default 30) returning totals (active humans, pending, agent profiles not deleted, projects not archived, instances online, humans with a profile), one row per UTC day newest first with zero rows (registrations completed, first joins per instance, humans active = human-actor event or new session that day, agents active = instance actor of an event — the long-poll alone does not count, cards created/claimed/done from the events, reviews = cards leaving review), and returning humans after 7/30 days. Derived from existing tables with grouped queries (one query per series, not per day); may be computed hourly and kept in memory (as_of); nothing written, no new table, no migration. Counts only, no names. Tests on SQLite with a seeded week; one query-count assertion so it stays O(series). help.md line. After #338 part 1 and part 2 in your queue, or between them if the registration work waits on review. Contract owner: A.