Fix: Add the same get_identities_by_type("companion") block that exists for room_server in each of the three endpoints. Each is a direct copy of the room_server block with "room_server" → "companion".
The three ACL endpoints in `api_endpoints.py` only query `repeater` and `room_server` identities — companion identities are never included.
**Affected endpoints:**
- `acl_info` (line ~2384) — no `get_identities_by_type("companion")` loop
- `acl_clients` (line ~2455) — companions not added to `identity_map`
- `acl_stats` (line ~2644) — `identity_stats` dict missing `"companion"` key, no companion counting loop
**Fix:** Add the same `get_identities_by_type("companion")` block that exists for `room_server` in each of the three endpoints. Each is a direct copy of the room_server block with `"room_server"` → `"companion"`.
<!-- github-sync-id:4062725836 -->
I'm struggling here a little bit, because companions really don't use login_manager at all—there's no OTA auth or ACL. So doing something like this is going to produce an entry but no more useful detail than that.
I'll commit for consistency, but there are going to be a lot of empty values.
I'm struggling here a little bit, because companions really don't use login_manager at all—there's no OTA auth or ACL. So doing something like this is going to produce an entry but no more useful detail than that.
``` # Add companion identities
for name, identity, config in identity_manager.get_identities_by_type("companion"):
hash_byte = identity.get_public_key()[0]
acl = acl_dict.get(hash_byte)
if acl:
acl_info_list.append(
{
"name": name,
"type": "companion",
"hash": f"0x{hash_byte:02X}",
"max_clients": acl.max_clients,
"authenticated_clients": acl.get_num_clients(),
"has_admin_password": bool(acl.admin_password),
"has_guest_password": bool(acl.guest_password),
"allow_read_only": acl.allow_read_only,
}
)
```
I'll commit for consistency, but there are going to be a lot of empty values.
<!-- github-comment-id:4050878337 -->
thanks for looking into it. if we think this is bloat or not useful, I defer to both of your expertise. the intent was to add more detail to the "sessions" section using its existing methods, but there are likely other ways to achieve that goal. What do you think?
thanks for looking into it. if we think this is bloat or not useful, I defer to both of your expertise. the intent was to add more detail to the "sessions" section using its existing methods, but there are likely other ways to achieve that goal. What do you think?
<!-- github-comment-id:4051071608 -->
There's not as much "Access Control" as "Sessions" here. I included whether it was registered (active and receiving packets) and whether a client is connected and the client's IP.
@rightup @dmduran12
Okay, I gave this another look:
<img width="693" height="445" alt="Image" src="https://github.com/user-attachments/assets/09c74c76-2527-43d4-9997-210099b8ef1e" />
There's not as much "Access Control" as "Sessions" here. I included whether it was registered (active and receiving packets) and whether a client is connected and the client's IP.
So a companion entry can look like:
```
{
"name": "my-companion",
"type": "companion",
"hash": "0x42",
"registered": true,
"active": true,
"client_ip": "192.168.1.100"
}
```
or when no client is connected:
```
{
"name": "my-companion",
"type": "companion",
"hash": "0x42",
"registered": true,
"active": false,
"client_ip": null
}
```
<!-- github-comment-id:4052436710 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The three ACL endpoints in
api_endpoints.pyonly queryrepeaterandroom_serveridentities — companion identities are never included.Affected endpoints:
acl_info(line ~2384) — noget_identities_by_type("companion")loopacl_clients(line ~2455) — companions not added toidentity_mapacl_stats(line ~2644) —identity_statsdict missing"companion"key, no companion counting loopFix: Add the same
get_identities_by_type("companion")block that exists forroom_serverin each of the three endpoints. Each is a direct copy of the room_server block with"room_server"→"companion".@agessaman FYI
I'm struggling here a little bit, because companions really don't use login_manager at all—there's no OTA auth or ACL. So doing something like this is going to produce an entry but no more useful detail than that.
I'll commit for consistency, but there are going to be a lot of empty values.
thanks for looking into it. if we think this is bloat or not useful, I defer to both of your expertise. the intent was to add more detail to the "sessions" section using its existing methods, but there are likely other ways to achieve that goal. What do you think?
@rightup @dmduran12
Okay, I gave this another look:
There's not as much "Access Control" as "Sessions" here. I included whether it was registered (active and receiving packets) and whether a client is connected and the client's IP.
So a companion entry can look like:
or when no client is connected:
I think this is handled now and can be closed. Agree @dmduran12?
It's still untested on console, but we can resolve to tidy things up!