feat(daemon): publish room member statistics over RPC and the CLI

The statistics parsed from the JoinRoom reply were reachable only from the
library. They answer the question `room users` already exists to ask -- who
is in here, and are they worth downloading from -- so they belong on its
output rather than behind a second call.

- proto: room.member_stats, with a RoomUserStatsDto carrying status, share
  counts, free slots and country
- SessionApi::room_member_stats, so local and remote sessions stay
  interchangeable; the status word is decoded through one shared helper
  rather than a third copy of the match
- `room users` now emits status, average_speed, shared_files,
  shared_folders, slots_free and country, each null when the server said
  nothing, documented in SKILL.md
- docs/openrpc.json regenerated from the wire types
This commit is contained in:
Michel de Graaf
2026-08-28 13:27:09 +00:00
parent fa49ebd2eb
commit 60f7100e30
12 changed files with 288 additions and 27 deletions
+82
View File
@@ -525,6 +525,21 @@
],
"type": "object"
},
"MemberStats": {
"description": "What the server said about each member of a room when it was joined.",
"properties": {
"members": {
"items": {
"$ref": "#/components/schemas/RoomUserStatsDto"
},
"type": "array"
}
},
"required": [
"members"
],
"type": "object"
},
"Members": {
"properties": {
"users": {
@@ -733,6 +748,53 @@
],
"type": "object"
},
"RoomUserStatsDto": {
"description": "One member of a room, as the JoinRoom reply described them.",
"properties": {
"average_speed": {
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"country": {
"type": [
"string",
"null"
]
},
"shared_files": {
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"shared_folders": {
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"slots_free": {
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"status": {
"description": "`online`, `away`, or `offline`.",
"type": "string"
},
"username": {
"type": "string"
}
},
"required": [
"username",
"status",
"average_speed",
"shared_files",
"shared_folders",
"slots_free"
],
"type": "object"
},
"SayParams": {
"properties": {
"message": {
@@ -1776,6 +1838,26 @@
},
"summary": "Who is currently in a room."
},
{
"name": "room.member_stats",
"paramStructure": "by-name",
"params": [
{
"name": "room",
"required": true,
"schema": {
"type": "string"
}
}
],
"result": {
"name": "result",
"schema": {
"$ref": "#/components/schemas/MemberStats"
}
},
"summary": "What the server said about each member of a joined room."
},
{
"name": "message.send",
"paramStructure": "by-name",