Build Camino packages from explicit contract inputs
Project source-free capability contracts and keep exact source provenance in package assembly. Reuse compiled groups across unrelated graph and dependency implementation edits. Keep React public inputs separate from workspace query lowering and retain explicit type-companion dependencies. Allow independent execution-package checks, scope resource compilation to declared dependencies, and memoize source closure traversal. Document generic-specialization limits and measured Reader rebuild behavior. Verified protocol, artifact, package, React, and managed activation checks; retained-Git independent/workspace artifact equality and incompatible type dependency rejection; nix fmt -- --check and lint. One-off Reader measurements recompiled 1 of 13 groups for a child edit and 0 for a workspace QX default edit.
This commit is contained in:
@@ -9,6 +9,14 @@ import type { CompiledCapabilityResourceRepository } from "../capability-languag
|
||||
import { genericImplementationType } from "./generics.js";
|
||||
import { capabilityId } from "../capability-model/types.js";
|
||||
|
||||
/** Source-free package compilation inputs. Nominal references do not import
|
||||
* implementations or concrete workspace conformances. */
|
||||
export type BindingContractSchema = {
|
||||
format: "quixos-bindings";
|
||||
version: 1;
|
||||
interfaces: Omit<InterfaceRevision, "source">[];
|
||||
packages: Pick<PackageRevision, "revisionId" | "exports" | "genericExports">[];
|
||||
};
|
||||
/** Portable generator input. New backends consume this instead of the parser or TS runtime. */
|
||||
export type BindingSchema = {
|
||||
format: "quixos-bindings";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { portableReflectionType } from "../execution-world/reflection.js";
|
||||
import type { BindingSchema } from "./index.js";
|
||||
import type { BindingContractSchema } from "./index.js";
|
||||
import type {
|
||||
ValueType,
|
||||
ObjectExpectation,
|
||||
@@ -121,7 +121,7 @@ interface Method {
|
||||
explicitInput?: boolean;
|
||||
}
|
||||
function methods(
|
||||
schema: BindingSchema,
|
||||
schema: BindingContractSchema,
|
||||
entry: PackageExport,
|
||||
port: DependencyPort,
|
||||
target: string,
|
||||
@@ -247,21 +247,21 @@ export interface PortableBindingOptions {
|
||||
}
|
||||
/** Generate one target's handlers. The same source signatures are used in browser/server builds. */
|
||||
export function generatePortableTypeScriptBindings(
|
||||
schema: BindingSchema,
|
||||
schema: BindingContractSchema,
|
||||
revision: string,
|
||||
options: PortableBindingOptions,
|
||||
): string {
|
||||
return generateBindings(schema, revision, options, false);
|
||||
}
|
||||
export function generateRemoteTypeScriptBindings(
|
||||
schema: BindingSchema,
|
||||
schema: BindingContractSchema,
|
||||
revision: string,
|
||||
options: { runtimeModule?: string } = {},
|
||||
): string {
|
||||
return generateBindings(schema, revision, { ...options, target: "server" }, true);
|
||||
}
|
||||
function generateBindings(
|
||||
schema: BindingSchema,
|
||||
schema: BindingContractSchema,
|
||||
revision: string,
|
||||
options: PortableBindingOptions,
|
||||
remote: boolean,
|
||||
|
||||
Reference in New Issue
Block a user