Implement Studio root and placement capabilities on the replica graph (WI-10)

This commit is contained in:
Timothy J. Aveni
2026-09-21 16:37:00 -07:00
parent 2cf53280e4
commit e1ad15c620
9 changed files with 103 additions and 19 deletions
+4 -1
View File
@@ -2,6 +2,7 @@
* operation/port schema by the coordinator, not trusted because this header parsed. */
export const transactionPortAbi = "quixos-transaction-ports-v1";
export type PortAction =
| { kind: "reflection"; selector: string }
| { kind: "state"; primitive: "read" | "write" | "edit" }
| { kind: "edge"; primitive: "resolve" | "disconnect" }
| { kind: "edge"; primitive: "connect"; key: string }
@@ -75,7 +76,9 @@ export function checkPortInvocation(value: unknown): PortInvocation {
identifier(action.operationId)
: action.kind === "creation"
? exact(["kind", "key"]) && identifier(action.key)
: action.kind === "query" && exact(["kind"]);
: action.kind === "reflection"
? exact(["kind", "selector"]) && identifier(action.selector)
: action.kind === "query" && exact(["kind"]);
if (!valid) throw new Error("Invalid port action");
return { ...fields, action: { ...action } } as unknown as PortInvocation;
}