Add explicit CRDT edit contracts and structured query values

This commit is contained in:
Timothy J. Aveni
2026-09-19 22:33:20 -07:00
parent 0555c929b1
commit 4c0c404a39
27 changed files with 3272 additions and 2745 deletions
+2
View File
@@ -28,6 +28,8 @@ export const generateClientContracts = (
return qualified
? `CapabilityReference<${JSON.stringify(value.expectation.kind === "atom" ? `atom:${value.expectation.atomId}` : `interface:${value.expectation.interfaceRevisionId}`)}>`
: `{readonly $quixosRef: string}`;
case "change":
throw new Error("CRDT change values require the prepared-change codec and runtime (LF-19)");
case "optional":
return `(${type(value.value)} | null)`;
case "list":
+2
View File
@@ -60,6 +60,8 @@ export const genericImplementationType = (
return `QxObjectRef<${target(type.expectation, scope)}>`;
case "record":
return object(Object.entries(type.fields).map(([name, field]) => [name, value(field, scope, depth + 1)]));
case "change":
throw new Error("CRDT change values require the prepared-change codec and runtime (LF-19)");
case "optional":
return `(${value(type.value, scope, depth + 1)} | null)`;
case "list":
+2
View File
@@ -122,6 +122,8 @@ export const generateTypeScriptBindings = (
}[value.name];
case "object-ref":
return `QxObjectRef<${q(value.expectation.kind === "atom" ? `atom:${value.expectation.atomId}` : `interface:${value.expectation.interfaceRevisionId}`)}>`;
case "change":
throw new Error("CRDT change values require the prepared-change codec and runtime (LF-19)");
case "optional":
return `(${type(value.value)} | null)`;
case "list":
+2
View File
@@ -30,6 +30,8 @@ export function generateReactBindings(
uint32: "number",
double: "number",
}[value.name];
case "change":
throw new Error("CRDT change values require the prepared-change codec and runtime (LF-19)");
case "optional":
return `(${type(value.value)} | null)`;
case "list":