import { type AppId, type RunContext } from "@vendoai/core"; import { type AppDocument, type ComponentPaintResult, type PendingSurface } from "../../contract/index.js"; import { type SeedBaseline } from "../../contract/index.js"; import type { OpenSurface } from "../runtime/runtime.js"; /** 06-apps §§1–2 — the open surface of a document that is DONE building. * `createAppOpener` below is what callers get; this is its servable half. */ declare const serveOpenApp: (seedBaselines: readonly SeedBaseline[] | undefined, /** * The COMPONENT screen half of an open: the app's own `app.tsx`, RUN. * * `AppFloor.component` — the same gauntlet a save paints through — bound by * composition to this caller's ctx, because it runs the screen's queries * through the guard-bound caller (one guard decision per query, this person's * authority, the app venue) and boots the screen on their answers. */ screen: (input: { appId: AppId; source: string; }, ctx: RunContext) => Promise, /** * Build contract §9.9 — the ADDITIVE venue-state slot, ctx-aware because the * states that ride it are per-caller (lane H's adoption card is served only * to `can(editor)`). Its keys spread onto the payload; the * server-authoritative strip has already run, so nothing here can be forged * by a document. Composable by construction: a second additive state is * another key, not another parameter. */ venueState?: (app: AppDocument, ctx: RunContext) => Promise | undefined>) => ((app: AppDocument, ctx: RunContext) => Promise); /** * 06-apps §§1–2 — the one read path a client opens an app through. * * A build that is still WRITING this app has nothing terminal to serve. Its row * lands at the first painting save, tens of seconds before the reviewer pass and * its repair round finish, and mounting on the row alone put people in front of a * draft — a wrong NUMBER included — that the build then corrected where nobody was * looking. So the answer stays the not-found the app gave a moment earlier with no * row at all, which the wire's build window turns into the `{kind:"pending"}` * every embed already waits on. * * `pending` names that refusal instead of hiding it behind a not-found, so a * caller who may see the app can wait on the build. It is the caller opting into * an answer it must not mount — never a second way to open an app — so it is a * flag on this door rather than a kind `open()` can return on its own, and it * costs a document read: nothing here renders the app. * * The geometry it rides is the build's OWN paint, read out of memory * (`forming.ts`) so that stays true: a poll costs a document read, never a * render. */ export declare const createAppOpener: (...args: Parameters) => ((app: AppDocument, ctx: RunContext, options?: { pending?: boolean; }) => Promise); export {}; //# sourceMappingURL=open.d.ts.map