/** * The primitives `createAutomationsEngine`'s closure holds, and the wiring that * builds its modules over them. * * `createAutomationsEngine` is an ASSEMBLER: every door it returns, and every * helper those doors lean on, lives in a module beside its contract. Each module * declares what it offers as its OWN interface, in its own file, and is handed * the other modules BY NAME — so a call site says where the function it calls * lives. `EngineBase` below is the only thing they all share. * * Internal — not exported from the package root. */ import { type AgentRunners } from "@vendoai/core"; import { type AutomationRowsAccess } from "./automation-rows.js"; import { type ConsentAccess } from "./consent.js"; import { type CreateSurfaceAccess } from "./create-surface.js"; import { type GrantsAccess } from "./grants.js"; import { type RunExecutionAccess } from "./run-execution.js"; import type { EngineOps } from "./rows.js"; import { type RunRowsAccess } from "./run-rows.js"; import { type SponsorshipGateAccess } from "./sponsorship-gate.js"; import type { AutomationsConfig } from "./index.js"; /** The closure primitives every module reads. */ export interface EngineBase { config: AutomationsConfig; /** Vendo's OWN drawers, through the named `engine` family — the allowlist gate * sits on every verb, so nothing outside it can be reached from here. Host and * generated-app data is not this door's business. */ engine: EngineOps; /** The clock, through the testability seam. */ now(): Date; /** The same clock, as the ISO string every row and event is stamped with. */ iso(): string; /** Run ids `runs.stop` has claimed, so an in-flight copy lands as stopped. */ stopped: Set; /** Run ids currently executing in THIS process. */ active: Set; /** The goal runs `runs.stop` can still cancel in this process. */ abortControllers: Map; } /** The engine's modules, by name — what every surface is handed a slice of. */ export interface EngineModules { base: EngineBase; automations: AutomationRowsAccess; grants: GrantsAccess; runRows: RunRowsAccess; sponsorship: SponsorshipGateAccess; consent: ConsentAccess; execution: RunExecutionAccess; writes: CreateSurfaceAccess; runners: AgentRunners; } /** 07 §1 — `createAutomationsEngine`'s closure, wired in dependency order. */ export declare const createEngineModules: (config: AutomationsConfig) => EngineModules; //# sourceMappingURL=engine-context.d.ts.map