import http from "node:http"; import { type Client, type ConnectRouter } from "@connectrpc/connect"; import { CaminoService, type Value } from "./camino/api_pb.js"; import { OrchestratorRuntime } from "./quixos/orch_pb.js"; export type CaminoClient = Client; export type OrchClient = Client; export type RuntimeDependency = { kind: "state"; objectId: string; attachmentId: string; } | { kind: "edge"; objectId: string; attachmentId: string; projectionId: string; }; export declare const objectRef: (objectId: string) => { $quixosRef: string; }; export declare const liveValue: (value: Value) => { $quixosValue: Value; }; export declare const jsToProtoValue: (value: unknown) => Value; export declare const protoValueToJs: (value: Value | undefined) => unknown; export declare const protoFieldsToJs: (fields: Record) => { [k: string]: unknown; }; export type StatePort = { slotId: string; get(): Promise; live(): Promise>; set(value: T): Promise; }; export type EdgePort = { edgeTypeId: string; projectionId: string; resolve(): Promise; connect(targetObjectId: string): Promise; }; export type InterfacePort = { objectId: string; interfaceRevisionId: string; invoke(operationId: string, input?: Record): Promise; live(operationId: string, input?: Record): Promise>; }; export type ConstructorPort = { atomId: string; construct(input?: Record): Promise; }; export type RuntimePort = StatePort | EdgePort | InterfacePort | ConstructorPort; export type RuntimeContext = { objectId: string; input: Record; inputProto: Record; ports: ReadonlyMap; state(portId: string): StatePort; edge(portId: string): EdgePort; interface(portId: string): InterfacePort; constructor(portId: string): ConstructorPort; }; export declare const createRuntimeContext: (camino: CaminoClient, orch: OrchClient, request: RuntimeRequest) => RuntimeContext; export type RuntimeHandler = (context: RuntimeContext) => unknown | Promise; export type DerivedHandler = { kind: "derived"; get: RuntimeHandler; }; export declare const derived: (get: RuntimeHandler) => DerivedHandler; export declare const createPackageRuntimeRoutes: (config: { packageRevisionId: string; exports: Record; caminoUrl?: string; orchUrl?: string; }) => (router: ConnectRouter) => ConnectRouter; export declare const servePackageRuntime: (config: { packageRevisionId: string; exports: Record; }) => http.Server; type RuntimeRequest = { objectId: string; input: Record; dependencies: import("./quixos/refs_pb.js").InjectedDependency[]; }; export {}; //# sourceMappingURL=index.d.ts.map