Implement main-thread Camino sessions and synchronous CRDT editing

This commit is contained in:
Timothy J. Aveni
2026-09-27 23:57:29 -07:00
parent ad72185a6c
commit 696023b4ba
24 changed files with 3784 additions and 3218 deletions
+17
View File
@@ -154,3 +154,20 @@ await writeFile("dist/portable-reader/compound-crdt/kernel.json", JSON.stringify
const { emitExecutionScaffold } = await import("./execution-scaffold-fixture.js");
const executionScaffold = await emitExecutionScaffold("dist/portable-reader/execution-scaffold/source");
await writeFile("dist/portable-reader/execution-scaffold/plan.json", JSON.stringify(executionScaffold));
// Native variant fixture shared by generated-type and browser editing qualification.
const { readFile } = await import("node:fs/promises");
const { compileCapabilityResourceSource } = await import("../src/capability-language/index.js");
const { portableValueSchema, tsType } = await import("../src/bindings/portable.js");
const variantSource = compileCapabilityResourceSource(await readFile("test/fixtures/canvas-content.qx", "utf8"), {
source: { repository: "https://example.test/canvas-content.git", commit: "a".repeat(40) },
});
if (!variantSource.ok || variantSource.resource.kind !== "interface") throw Error("Invalid variant fixture");
const entries = variantSource.resource.revision.members[0];
if (entries.kind !== "value") throw Error("Expected entries value");
await mkdir("dist/portable-reader/variants", { recursive: true });
await writeFile("dist/portable-reader/variants/schema.json", JSON.stringify(portableValueSchema(entries.valueType)));
await writeFile(
"dist/portable-reader/variants/entries.ts",
"export type Entries = " + tsType(entries.valueType) + ";\n",
);