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
+5 -1
View File
@@ -257,7 +257,11 @@ const createResourceGraphResolver = (quixosCommit: string, resolveResource: Capa
if ((error as NodeJS.ErrnoException).code !== "ENOENT") throw error;
}
if (controllerText !== undefined)
compiled.resource.revision.controllers = parseControllerCatalog(controllerText, queryInterfaces);
compiled.resource.revision.controllers = parseControllerCatalog(
controllerText,
queryInterfaces,
compiled.resource.revision.checkedQueries,
);
let catalogText: string | undefined;
try {
catalogText = await readFile(path.join(snapshot.directory, "quixos.migrations.json"), "utf8");
@@ -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 ?? "")
)
+1 -1
View File
@@ -15,7 +15,7 @@ export type ScaffoldRecipe = {
declaration?: string;
queryDocument?: string;
initialFiles?: Record<string, string>;
controller?: { subject: string; snapshot: string; remote: string; input: "unit" | "value" };
controller?: { registry?: string; subject: string; snapshot: string; remote: string; input: "unit" | "value" };
tools?: { quixos: Source; protocol: Source; helpers: Source; sdk?: Source };
};
const source = (value: Source): GitSource => {