A seat's protocol lives in the store (migration 0047; seeded additively), a served verb carries its description and schema, holding a mesh seat requires serving its verbs, a node-scoped seat's tool carries the node, and the control plane serves status, nodes, node, modules, seats, builds, plan, assign, unassign, push, build and tools on its seat by running the same commands (novox/hq ADR 0132, ADR 0154, design 33). A grant of * reaches a role's tools; seat:<seat>.<verb> grants one.
13 lines
1012 B
SQL
13 lines
1012 B
SQL
-- A seat's protocol lives in the store, not in the binary (novox/hq ADR 0129, ADR 0132, design 33 §2).
|
|
--
|
|
-- ADR 0122 moved the seat set into this table with name, scope, delivers and decision, and the
|
|
-- protocol — what a role accepts, emits and serves — stayed compiled into the control plane and was
|
|
-- merged in as a row was read. Discovery that reads a binary disagrees with the mesh the moment the
|
|
-- two are on different versions, and a tool without a schema is not something an agent can call. So
|
|
-- the three halves become columns: accepts and emits as lists of verbs, serves as the verbs in full
|
|
-- ({name, description, input, output}). Seeded from the compiled defaults where a row has none,
|
|
-- additively thereafter (a verb a release adds joins the row; nothing is taken away).
|
|
alter table seat add column accepts jsonb not null default '[]'::jsonb;
|
|
alter table seat add column emits jsonb not null default '[]'::jsonb;
|
|
alter table seat add column serves jsonb not null default '[]'::jsonb;
|