You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(api): GraphQL subnet_health field mirroring GET /api/v1/subnets/{netuid}/health (#7640) (#7653)
Adds the base per-subnet live operational-health card to GraphQL, completing
the health-field family whose windowed views (subnet_health_trends /
subnet_health_incidents / subnet_health_percentiles) already exist. The
resolver reuses the exact live composition the REST subnet-health route and the
get_subnet_health MCP tool share (resolveLiveHealth + overlaySubnetHealth +
loadSubnetReliability) -- no health logic is re-derived. A cold health store
resolves to the same schema-stable unknown card the MCP tool returns; a negative
netuid is a BAD_USER_INPUT error. Returned as opaque JSON (the existing typed
SubnetHealth is the flat health-list item, a different shape).
Closes#7640
"One subnet's per-surface latency percentiles (p50/p90/p95/p99) over a 7d/30d window (default 7d), computed live from the success-only health-probe history. The latency-distribution companion of subnet_health_incidents' availability view. A subnet with no probe history resolves to a schema-stable empty surfaces list, never null. Mirrors GET /api/v1/subnets/{netuid}/health/percentiles."
"One subnet's current live operational-health card: the per-surface status/latency/last-ok rows from the latest ~15-minute cron probe (summarized into ok/degraded/failed/unknown counts) plus the cross-window reliability score. The at-a-glance base card completing the health family whose windowed views are subnet_health_trends/subnet_health_incidents/subnet_health_percentiles. A subnet with no live health data resolves to the same schema-stable unknown card (summary.status of unknown, empty surfaces), never null. Opaque JSON passed through verbatim, matching the get_subnet_health MCP/REST shape (the existing typed SubnetHealth is the flat health-list item, a different shape, so this base card is JSON like the sibling surfaces payloads). Mirrors GET /api/v1/subnets/{netuid}/health."
505
+
subnet_health(netuid: Int!): JSON
502
506
"One subnet's rolling 24h alpha trading volume from the StakeAdded/StakeRemoved trade stream: buy/sell volume in alpha and TAO, trade counts, net flow, a buy-vs-sell sentiment ratio, and volume-to-market-cap ratio. A subnet with no trades resolves to a schema-stable zeroed card, never null. Mirrors GET /api/v1/subnets/{netuid}/volume."
503
507
subnet_volume(netuid: Int!): SubnetVolume!
504
508
"The machine-readable AI-resources index: the copyable agent prompt (/agent.md), MCP server install metadata and tool listing, the Bittensor skill, llms.txt, OpenAPI, and links to the agent-facing APIs. Use it to bootstrap an agent integration before calling the catalog/search fields. Null when the index has not been baked in this environment (rather than a GraphQL error). Opaque JSON passed through verbatim, matching the get_agent_resources MCP/REST shape. Mirrors GET /api/v1/agent-resources."
0 commit comments