Make workspace authoring converge through immutable Nix candidates
Coordinate registered resource edits bottom-up into retained exact remote sources. Use one Nix-owned source graph for provisional checking, template publication, explicit baseline upgrades and host activation; retain independent runtime pins. Add scoped contract inspection, historical recovery, derived worklists, crash-safe locks, named dependency adoption and plain-QX structural editing. Repair TODO ownership and template instantiation, and document the supported agent workflow. Validated with protocol and command suites, real jj/Nix convergence and cache checks, TS/React installed-command acceptance, and fresh TODO first-edit acceptance. No live deployment or public publication performed. Props projection generation and a one-command rich feature generator remain explicitly outside this delivery.
This commit is contained in:
@@ -2,12 +2,19 @@
|
||||
// Data only: never load files, resolve repositories, or evaluate code.
|
||||
import { parseQx } from "./source.js";
|
||||
import { parseQuixosLockDocument } from "../resource-lock/parser.js";
|
||||
import { instantiateWorkspaceIdentity } from "./structural-edits.js";
|
||||
let input = "";
|
||||
for await (const chunk of process.stdin) {
|
||||
input += chunk;
|
||||
if (Buffer.byteLength(input) > 6 * 1024 * 1024) throw new Error("Inspection input exceeds limit");
|
||||
}
|
||||
const files: { path: string; source: string }[] = JSON.parse(input);
|
||||
const document = JSON.parse(input);
|
||||
if (!Array.isArray(document) && document?.operation === "instantiate-workspace") {
|
||||
if (typeof document.source !== "string" || document.source.length > 262144 || typeof document.workspaceId !== "string") throw new Error("Invalid template identity request");
|
||||
process.stdout.write(JSON.stringify({ source: instantiateWorkspaceIdentity(document.source, document.workspaceId) }));
|
||||
process.exit(0);
|
||||
}
|
||||
const files: { path: string; source: string }[] = document;
|
||||
if (!Array.isArray(files) || files.length > 128) throw new Error("Too many source files");
|
||||
const result = files.map(({ path, source }) => {
|
||||
if (typeof path !== "string" || typeof source !== "string" || source.length > 262144)
|
||||
|
||||
Reference in New Issue
Block a user