/** * `agent.on(...)` — automations authored in code. * * A DECLARATION, never a write: the call validates and stashes, and a lifecycle * is what reaches the store. A trigger is INERT until `serve({ agents })` — or * `createVendo`'s boot, which runs this same reconcile — so a process that * declares and starts neither has no automations, by design and without a word * about it. * * Consent for a code-authored automation IS the code, so a redeploy reconciles: * new → created, edited → a new identity with the old one disarmed, deleted from * the source → disarmed (never deleted, so its run history survives). */ import { type AutomationRecord, type Budget, type DeclaredAutomation, type Principal, type ReconcilePlan, type When } from "../core/index.js"; import type { VendoAgent } from "./agent.js"; export interface OnOptions { /** Stable identity. Unset → hash(when + task + agent), so editing the cron or * the words MINTS A NEW automation and disarms the old one at the next boot. * Name one to keep an automation's identity across an edit. */ id?: string; /** The zone `when` is read in; unset → UTC. */ timezone?: string; budget?: Budget; } /** What `.on()` collected, read the way {@link agentComposition} is — through a * WeakMap, so the public agent object stays exactly what it was. */ export declare const agentAutomations: (agent: VendoAgent) => readonly DeclaredAutomation[]; /** The body of {@link VendoAgent.on}, bound to the agent whose `name` every * declaration carries — that name is the runner-map key the firing looks up. */ export declare function declareAutomation(agent: VendoAgent, when: When, task: string, options?: OnOptions): void; /** * What a lifecycle applies at boot: every declared automation across the agents * it was given, diffed against what is stored, through core's one reconcile. * * Names ride through VERBATIM. Two agents called "support" produce two sets of * declarations both claiming that runner name; collapsing them here would hide * a collision the runner map has to throw on. */ export declare const agentAutomationPlan: (agents: readonly VendoAgent[], stored: readonly AutomationRecord[], owner: Principal) => ReconcilePlan;