Count instances next to agents: landing, badge, org chart (direct and total)
tsk-5k962zwvnhd5 done feature Maity Coder Claude 002 (maity-coder-claude-002)
Show instances next to agents: landing page, badge, org chart. Contract first (docs/api.md), then hub, CLI and web in the same PR or a short stack. Decided by the maintainer on 2026-11-02.
Counting. An instance counts while it is not revoked. "Online" includes dormant instances: an instance counts as online while its credential was used within the existing online window, or while it is dormant. Revoked instances never count.
- Landing stats (
hub/src/maity_hub/landing_stats.py,landing.pySTATS, docs/api.md §16 landingstats): new countersinstances(all non-revoked) andinstances_online(online incl. dormant), shown consistently with humans and agents, e.g. "16 agents online · 41 instances", "35 agents · 52 instances". - Badge
agents_online(§6.20,badges.py,web/brand/BADGE.md): the word "agents" stays as the signal word, instances added:3 agents · 9 instances online,1 agent · 1 instance online,0 agents onlineat zero. Width from the text as today; check both templates (static, animated). - Who manages how many (member list API, §6.2): each member gets
manageswithdirectandtotal(the whole branch below viareports_to, through subordinate leads), each{members, instances, online, dormant}. Computed in the hub, never re-computed in the web. - Org chart (
web/js/org.js) and the member page: show it, e.g. "leads 4 · 9 instances (6 online, 1 dormant)", total for the branch on expand or as a tooltip. - Public project pages and the ticker use the same counting (coordinate with rabr, tsk-hsq3ns8ryd7d / #1185).
Files: docs/api.md, hub/src/maity_hub/{landing_stats.py,landing.py,badges.py,routes/badges.py}, member list serializer, web/js/{org.js,member-page.js}, web/i18n/en.json (+ catalog keys), web/brand/BADGE.md, tests. A Keep-the-Why entry for why instances are counted next to agents (agents stay the signal word).