Implement capability generics, checked package specializations and CRUD scaffolding
Add kinded parameters, capability bounds, Self, aliases and closed application identities. Check generic implementations universally and build candidate-specific codecs and descriptors from immutable schemas. Preserve lexical aliases and exact dispatch identities in package and host bindings. Add an imperative CRUD+index domain scaffold with explicit soft-deletion semantics, source/codegen regression coverage, installed CLI tests and an authoring guide. Existing Web Studio opaque props and class-level create-menu migration are separate from the implemented language core.
This commit is contained in:
@@ -4,6 +4,7 @@ import { readFile, writeFile } from "node:fs/promises";
|
||||
import process from "node:process";
|
||||
import { compileWorkspaceRepository } from "./assembly.js";
|
||||
import { createGitCapabilityResolver } from "./git-resolver.js";
|
||||
import { bindingSchema, specializeBindingSchema } from "../bindings/index.js";
|
||||
import {
|
||||
planEvolution,
|
||||
runtimeContracts,
|
||||
@@ -14,7 +15,7 @@ import {
|
||||
const usage = `usage: quixos-workspace-compile --root DIRECTORY --checkout-root DIRECTORY
|
||||
[--snapshot-map PATH] [--graph-out PATH] [--workspace-id ID] [--workspace-revision-id ID]
|
||||
[--source-root-commit GIT_REV] [--baseline PLAN_JSON] [--evolution-out PATH]
|
||||
[--reviews REVIEW_JSON]
|
||||
[--reviews REVIEW_JSON] [--schemas-out PATH]
|
||||
|
||||
Resolves a workspace's recursive resource-lock graph, clones every exact
|
||||
resource revision, validates standalone interface/package manifests, and emits
|
||||
@@ -35,6 +36,7 @@ const parseArgs = (args: string[]) => {
|
||||
rootDirectory,
|
||||
checkoutRoot,
|
||||
graphOut: values.get("--graph-out"),
|
||||
schemasOut: values.get("--schemas-out"),
|
||||
snapshotMap: values.get("--snapshot-map"),
|
||||
workspaceId: values.get("--workspace-id"),
|
||||
workspaceRevisionId: values.get("--workspace-revision-id"),
|
||||
@@ -96,6 +98,24 @@ const main = async () => {
|
||||
);
|
||||
}
|
||||
const candidate = { ...assembled.workspace, executionContracts: runtimeContracts(assembled.workspace) };
|
||||
if (options.schemasOut) {
|
||||
const schemas: Record<string, unknown> = {};
|
||||
for (const node of assembled.resources.filter((entry) => entry.kind === "package")) {
|
||||
const closure = new Map<string, typeof node>();
|
||||
const visit = (entry: typeof node) => {
|
||||
if (closure.has(entry.key)) return;
|
||||
closure.set(entry.key, entry);
|
||||
entry.dependencies.forEach(visit);
|
||||
};
|
||||
visit(node);
|
||||
schemas[node.resource.revision.revisionId] = specializeBindingSchema(
|
||||
bindingSchema({ resources: [...closure.values()] }),
|
||||
candidate,
|
||||
node.resource.revision.revisionId,
|
||||
);
|
||||
}
|
||||
await writeFile(options.schemasOut, JSON.stringify(schemas));
|
||||
}
|
||||
if (options.evolutionOut) {
|
||||
const baseline = options.baseline
|
||||
? (JSON.parse(await readFile(options.baseline, "utf8")) as WorkspaceRevision)
|
||||
|
||||
Reference in New Issue
Block a user