Discovery from what answers: grants, the controller announces its seat, JSON lists (hq ADR 0195, 0197) #241

Merged
mesh-admin merged 2 commits from feat/node-and-module-lists-as-json into main 2026-10-03 20:11:29 +00:00
Contributor

hq ADR 0195 and 0197, controller side.

  • node list --json and module list --json; the nodes and modules seat verbs answer JSON, as status and seats do. module list --json carries tools: whether the module answers tools (own list, a served bundle, or a claimed seat's verbs) — the console expects an announcement only from those.
  • Grants: every principal that serves tools (module, node-tools, controller) subscribes $SRV.PING/$SRV.INFO and those questions under each name it serves — its own and no other's; node-tools and people may publish the discovery requests. Replies go to the asker's inbox under allow_responses as every reply does.
  • The controller answers discovery for the mesh-controller seat in NATS's own services format (micro.Info), one endpoint per verb it serves, on the subject and queue it serves it on, with the seat's description, schema and scope. A refused subscription is retried until the new user list reaches the bus.

Tests: verbs map to the JSON commands; the announcement lists exactly the served verbs with subjects, queue and metadata; a person may publish tool calls and discovery only; duplicate grants are counted per list (a runtime both answers and asks $SRV.INFO); golden composition regenerated; the installer's template matches (mesh-host #82). Full suite passes from the worktrees.

hq ADR 0195 and 0197, controller side. - `node list --json` and `module list --json`; the `nodes` and `modules` seat verbs answer JSON, as `status` and `seats` do. `module list --json` carries `tools`: whether the module answers tools (own list, a served bundle, or a claimed seat's verbs) — the console expects an announcement only from those. - Grants: every principal that serves tools (module, node-tools, controller) subscribes `$SRV.PING`/`$SRV.INFO` and those questions under each name it serves — its own and no other's; node-tools and people may publish the discovery requests. Replies go to the asker's inbox under `allow_responses` as every reply does. - The controller answers discovery for the mesh-controller seat in NATS's own services format (`micro.Info`), one endpoint per verb it serves, on the subject and queue it serves it on, with the seat's description, schema and scope. A refused subscription is retried until the new user list reaches the bus. Tests: verbs map to the JSON commands; the announcement lists exactly the served verbs with subjects, queue and metadata; a person may publish tool calls and discovery only; duplicate grants are counted per list (a runtime both answers and asks `$SRV.INFO`); golden composition regenerated; the installer's template matches (mesh-host #82). Full suite passes from the worktrees.
mesh-admin added 2 commits 2026-10-03 20:11:22 +00:00
The console's discovery reads the machines and the modules; parsing a printed column breaks when it
is reworded. Both now answer JSON on --json, as status and seats do, and the seat verbs ask for it.
Grants: a principal that serves tools subscribes $SRV.PING/$SRV.INFO and those questions under
each name it serves — its own and no other's; the tool runtime and people may ask. The controller
answers discovery for the mesh-controller seat in NATS's services format, one endpoint per verb it
serves, with the seat's description and schema. module list --json says which modules declare tools,
so the console expects an announcement only from those.
mesh-admin merged commit 796f6410c1 into main 2026-10-03 20:11:29 +00:00
mesh-admin deleted branch feat/node-and-module-lists-as-json 2026-10-03 20:11:30 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: novox/mesh-controller#241