Add exact runtime conformance lookup and agent-visible language limits

This commit is contained in:
Timothy J. Aveni
2026-09-17 11:29:56 -07:00
parent 47efd9659d
commit 169c0cdc37
19 changed files with 504 additions and 190 deletions
+12
View File
@@ -25,6 +25,17 @@ export type QxContextLifecycle<C> = {
signal?: AbortSignal;
openSession?: () => Promise<QxSession<C>>;
};
declare const contractView: unique symbol;
/** Generated exact closed contract. A descriptor is type evidence, never authority. */
export type QxInterfaceContract<View> = {
readonly interfaceRevisionId: string;
readonly operations: Record<string, QxOperationSpec>;
readonly [contractView]: (value: View) => View;
};
export declare const defineQxInterfaceContract: <View>(interfaceRevisionId: string, operations: Record<string, QxOperationSpec>) => QxInterfaceContract<View>;
export type QxConformer = {
tryConform<View>(object: import("./references.js").QxObjectRef, contract: QxInterfaceContract<View>): Promise<View | undefined>;
};
export declare const qxDerived: <C, O>(get: QxHandler<C, O>) => QxDerived<C, O>;
/** Versioned binding ABI. This mirrors the language-neutral value IR. */
export type QxValueType = {
@@ -63,6 +74,7 @@ export type QxPortSpec = {
} | {
kind: "interface";
id: string;
interfaceRevisionId: string;
operations: Record<string, QxOperationSpec>;
} | {
kind: "constructor";