Implement query execution, scoped RPC enrichment, live collections, and scaffold integration

This commit is contained in:
Timothy J. Aveni
2026-09-17 14:34:16 -07:00
parent 7e69e675ba
commit c1330ae8e3
29 changed files with 2217 additions and 77 deletions
+9 -2
View File
@@ -1,10 +1,11 @@
import http from "node:http";
import { type QxObjectRef } from "./references.js";
export * from "./bindings.js";
export * from "./queries.js";
export { relationshipMap, relationshipList, relationshipSet } from "./relationships.js";
export { createMigrationContext, migrationObjectId, serveMigration, type MigrationContext, type MigrationInput, type MigrationOutput, type MigrationEdge, } from "./migration.js";
import { type Client, type ConnectRouter } from "@connectrpc/connect";
import { CaminoService, type Value } from "./camino/api_pb.js";
import { CaminoService, type Value, type QueryResponse } from "./camino/api_pb.js";
import { OrchestratorRuntime } from "./quixos/orch_pb.js";
export type CaminoClient = Client<typeof CaminoService>;
export type OrchClient = Client<typeof OrchestratorRuntime>;
@@ -61,7 +62,12 @@ export type ConstructorPort = {
atomId: string;
construct(input?: Record<string, unknown>): Promise<QxObjectRef>;
};
export type RuntimePort = StatePort | EdgePort | InterfacePort | ConstructorPort;
export type QueryPort = {
queryId: string;
execute(variables: Record<string, Value>, expectedDefinitionDigest?: string): Promise<QueryResponse>;
watch(variables: Record<string, Value>, signal: AbortSignal, expectedDefinitionDigest?: string): AsyncIterable<import("./quixos/orch_pb.js").QueryEvent>;
};
export type RuntimePort = StatePort | EdgePort | InterfacePort | ConstructorPort | QueryPort;
export type RuntimeContext = {
tryConform(object: QxObjectRef, interfaceRevisionId: string): Promise<InterfacePort | undefined>;
/** Cooperative cancellation. Completion is acknowledged only after the handler returns. */
@@ -75,6 +81,7 @@ export type RuntimeContext = {
edge(portId: string): EdgePort;
interface(portId: string): InterfacePort;
constructor(portId: string): ConstructorPort;
query(portId: string): QueryPort;
};
export type RuntimeSession = {
id: string;