Add activated workspace reflection and Studio definition watches

Expose bounded snapshot-bound definition reads and latest-only watches from the serving checked bundle. Add checked reflection dependency ports, generated SDK bindings and selector-scoped invocation authority.

Move Studio factory, contract and query discovery to public reflection inventories. Share an active-definition watch across canvas and standalone routes and invalidate/reload on epoch changes instead of polling GetWorkspace.

Document the API and deferred scope; cover compiler/codegen, SDK injection, transport authorization, activation publication, pagination and reconnect behavior. Keep all work local; no deployment or publication.
This commit is contained in:
Timothy J. Aveni
2026-09-19 10:18:47 -07:00
parent 696009f6fd
commit d0f9454532
21 changed files with 1143 additions and 74 deletions
+35
View File
@@ -0,0 +1,35 @@
import type { DefinitionPage } from "./quixos/orch_pb.js";
export type { DefinitionPage, DefinitionIdentity, DefinitionRecord, ReflectedAtom, ReflectedInterface, ReflectedConformance, ReflectedQuery, ReflectedIndex, } from "./quixos/orch_pb.js";
export type ReflectionKind = "active" | "atoms" | "interfaces" | "conformances" | "queries" | "indexes";
export type ReflectionSelector<K extends string = ReflectionKind> = K extends "active" ? {
kind: K;
} : K extends "atoms" ? {
kind: K;
ids?: string[];
interfaceRevisionId?: string;
} : K extends "conformances" ? {
kind: K;
ids?: string[];
atomId?: string;
interfaceRevisionId?: string;
} : K extends "queries" ? {
kind: K;
ids?: string[];
packageRevisionId?: string;
interfaceRevisionId?: string;
} : {
kind: K;
ids?: string[];
};
export type ReflectionRequest<K extends string = ReflectionKind> = {
selector: ReflectionSelector<K>;
first?: number;
after?: string;
snapshot?: string;
};
/** Read-only metadata. Returned capability IDs confer no invocation authority. */
export type QxReflectionPort<K extends string = ReflectionKind> = {
read(request: ReflectionRequest<K>): Promise<DefinitionPage>;
watch(request: Omit<ReflectionRequest<K>, "after" | "snapshot">, signal: AbortSignal): AsyncIterable<DefinitionPage>;
};
//# sourceMappingURL=reflection.d.ts.map