Simplify workspace authoring and isolate managed component styles
Use imperative scaffolds without a registry/refresh lifecycle; preserve authored runtime wiring and generate checked descriptors. Consolidate binding options, embed checked TSX/CSS source, queue mutable convergence while allowing parallel immutable checks, and preload real CLI observations. Add Shadow DOM boundaries with scoped overlays and composed-event handling. Update template/toolchain pins and document VM-free authoring, browser, and stateful acceptance; no deployment or default-template selection.
This commit is contained in:
@@ -18,6 +18,12 @@ export type TypeScriptBindingOptions = {
|
||||
/** Each export must implement MessageBinding<T>, providing both TS type and wire codec. */
|
||||
messages?: Record<string, { module: string; export: string }>;
|
||||
};
|
||||
export function generatePackageDescriptor(schema: BindingSchema, revisionId: string): string {
|
||||
const pkg = schema.packages.find(entry => entry.revisionId === revisionId);
|
||||
if (!pkg) throw new Error(`Unknown package revision ${revisionId}`);
|
||||
return `# Generated from the checked package contract\npackage_id: ${JSON.stringify(pkg.packageId)}\npackage_revision_id: ${JSON.stringify(pkg.revisionId)}\nruntime_protocol_version: "quixos-capabilities-v1"\n` +
|
||||
pkg.exports.map(entry => `exports: { export_id: ${JSON.stringify(entry.id)} runtime_symbol: ${JSON.stringify(entry.displayName)} }\n`).join("");
|
||||
}
|
||||
const q = JSON.stringify;
|
||||
const object = (entries: [string, string][]) => `{ ${entries.map(([key, value]) => `${q(key)}: ${value}`).join("; ")} }`;
|
||||
const unit = (type: ValueType) => type.kind === "builtin" && type.name === "unit";
|
||||
|
||||
Reference in New Issue
Block a user