Build checked portable package artifacts and shared runtime assets

This commit is contained in:
Timothy J. Aveni
2026-09-20 00:42:19 -07:00
parent 60b1bdb39f
commit ab41e67dc5
8 changed files with 216 additions and 2 deletions
+5 -2
View File
@@ -3,7 +3,8 @@
export const transactionPortAbi = "quixos-transaction-ports-v1";
export type PortAction =
| { kind: "state"; primitive: "read" | "write" | "edit" }
| { kind: "edge"; primitive: "resolve" | "connect" | "disconnect" }
| { kind: "edge"; primitive: "resolve" | "disconnect" }
| { kind: "edge"; primitive: "connect"; key: string }
| { kind: "interface"; operationId: string; key?: string }
| { kind: "query" }
| { kind: "creation"; key: string };
@@ -19,6 +20,7 @@ export interface PortInvocation {
}
export interface PackageInvocation {
abi: typeof transactionPortAbi;
workspace: string;
frame: string;
invocation: string;
exportId: string;
@@ -66,7 +68,8 @@ export function checkPortInvocation(value: unknown): PortInvocation {
action.kind === "state"
? exact(["kind", "primitive"]) && ["read", "write", "edit"].includes(action.primitive as string)
: action.kind === "edge"
? exact(["kind", "primitive"]) && ["resolve", "connect", "disconnect"].includes(action.primitive as string)
? (exact(["kind", "primitive"]) && ["resolve", "disconnect"].includes(action.primitive as string)) ||
(exact(["kind", "primitive", "key"]) && action.primitive === "connect" && identifier(action.key))
: action.kind === "interface"
? (exact(["kind", "operationId"]) || (exact(["kind", "operationId", "key"]) && identifier(action.key))) &&
identifier(action.operationId)