import { type AppId, type ApprovalId, type RunContext } from "@vendoai/core"; import type { EngineOps } from "./engine.js"; /** * S3 — the offered-but-unanswered build (the propose→resume seam). * * `parked-action.ts`'s sibling, with one difference that is the whole point of * the slice: nothing has been called. A parked ACTION records a call the guard * already intercepted; a parked BUILD records a build that has not started and * will not start until someone says yes. So a record here is the only place the * ask survives — the turn that raised the card ends immediately (receipt status * "awaiting-consent"), and the yes may land long after it is gone. * * Keyed by the approval that gates it, so the runtime's `onApprovalDecision` * subscriber — the SAME seam egress and parked actions ride — can hand the * build to the builder the instant the owner approves. A record exists exactly * while its approval is undecided; both decisions clear it (approve builds then * clears; deny just clears — no box, ever). * * Hygiene mirrors the stores beside it: app-keyed, cleared with the app. */ export interface ParkedBuild { /** The guard approval that gates this build. */ approvalId: ApprovalId; appId: AppId; /** The proposing principal's subject — the only principal who may approve. */ owner: string; /** The person's ask, verbatim. The build brief is replayed from it, so a * paraphrase (the app's capped name) is too lossy to keep instead. */ prompt: string; /** The screen agent's own line for why a screen was not enough. */ why: string; /** The venue the ask arrived in — the build runs with it, not with whatever * context the DECISION happened to arrive on. */ ctx: RunContext; } export interface ParkedBuilds { /** Park one offered build on its guard approval (re-proposing overwrites). */ put(build: ParkedBuild): Promise; /** The build riding a specific guard approval id, or null if none. */ byApproval(approvalId: ApprovalId): Promise; /** Clear the parked build for one approval (its approval was decided, either way). */ remove(approvalId: ApprovalId): Promise; /** Delete every parked build for one app (app deletion cleanup). */ clearForApp(appId: AppId): Promise; } export declare const createParkedBuilds: (engine: EngineOps) => ParkedBuilds; //# sourceMappingURL=parked-build.d.ts.map