Host checked adapter-object controllers through bounded registries (WI-13)

This commit is contained in:
Timothy J. Aveni
2026-09-21 18:00:27 -07:00
parent 1e08ccd937
commit d824634859
14 changed files with 235 additions and 7 deletions
@@ -10,7 +10,8 @@ export async function scaffoldController(
const entry = { id: spec.id, ...spec.controller };
const fields = ["id", "subject", "snapshot", "remote", "input"];
if (
Object.keys(entry).length !== fields.length ||
Object.keys(entry).some((key) => ![...fields, "registry"].includes(key)) ||
(entry.registry !== undefined && typeof entry.registry !== "string") ||
fields.some((key) => typeof (entry as Record<string, unknown>)[key] !== "string") ||
!["unit", "value"].includes(entry.input ?? "")
)