feat(sessions): pass relaygate group labels through to the dashboard
Merged
KH
5d ago+70+70+01234567890123456789-0-0-0123456789
What
relaygate's new groupLabels policy (AgentWorkforce/relaygate#39) adds relaygate: {"gid": 22, "label": "pit"} to each readable session a labeled group owns, on the session list and on one session's metadata/catalog.
GET .../sessions(list):sessionItemalready spreads upstream items, so the field reaches the dashboard unchanged. Now covered by a test.GET .../sessions/:id/catalog: the route rebuilds its body and dropped the field. It now passesrelaygatethrough, keeping onlygid(non-negative safe integer) andlabel(relaygate's charset, <=24 chars); anything else, or a malformed value, is dropped.- openapi:
RelaygateGroupLabelschema onDashboardSessionCatalog. CHANGELOG entry.
No behaviour change when the read API is not relaygate or no label is configured.
Tests
npm run typecheck; node --import tsx --test test/sessions.test.ts (45 pass, incl. new "relaygate group labels reach the dashboard..."); openapi doc tests.
Consumer: relay-web badge PR (follows).
🤖 Generated with Claude Code
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Passes relaygate's owning-group labels through to the dashboard so the session catalog now shows them alongside the session list.
- The catalog route previously rebuilt its response body and dropped the
relaygatefield; it now passes it through, keeping onlygid(non-negative safe integer) andlabel(relaygate's charset, up to 24 chars). Malformed values are dropped. - Adds the
RelaygateGroupLabelschema to the OpenAPI spec, a CHANGELOG entry, and test coverage for both routes. - No behavior change when the read API is not relaygate or no label is configured.