/** * The engine's INTERNAL write surface: the one create operation, and the one * place a reconcile plan is applied. * * INVARIANT: exactly one create exists, and all four authoring doors go through * it — the `vendo_automate` chat tool, `vendo_make`'s auto-arm sugar, the * `vendo.json` manifest fold-in, and `agent.on`'s boot reconcile. Neither door * here is public API: both hang off `automationsInternals(engine)`, so * `vendo.automations` cannot reach them and a host cannot mint an automation for * somebody else. * * A second create path is the failure this file exists to prevent. Four doors * that each wrote their own record would each decide, differently, what a * webhook secret is, when an id is minted, and whether a redeploy replaces or * conflicts — and the disagreements would only show up in production. */ import { type AutomationId, type AutomationRecord, type CreateAutomation, type ReconcilePlan, type RunContext } from "@vendoai/core"; import type { AutomationRowsAccess } from "./automation-rows.js"; import type { EngineBase } from "./engine-context.js"; export type CreateSurfaceDeps = { base: EngineBase; automations: AutomationRowsAccess; }; /** Applying a {@link ReconcilePlan}: the records it says to create, and the ones * it says to disarm. Returns what it actually touched, so a boot can log it. */ export type ReconcileAutomations = (plan: ReconcilePlan, ctx: RunContext) => Promise<{ created: AutomationRecord[]; disarmed: AutomationId[]; }>; export interface CreateSurfaceAccess { create: CreateAutomation; reconcile: ReconcileAutomations; } export declare const createCreateSurface: ({ base: { engine, iso }, automations }: CreateSurfaceDeps) => CreateSurfaceAccess; //# sourceMappingURL=create-surface.d.ts.map