/**
 * Monitor action dispatch.
 *
 * On a fire, the monitor feeds the event to an action. Every `run`/`routine`
 * action goes through the *same* detached spawn cron and webhook fires use
 * (executeJobDetached, lib/daemon/runner.ts) — a monitor never duplicates spawn logic,
 * it synthesizes a JobConfig and hands it to the one dispatch seam. `notify`
 * routes the owner through the one channel seam (sendToOwner → lookupTransport,
 * lib/notify.ts) — recipient from notify.owner, no hardcoded chat id, and an
 * unresolvable channel comes back as `ok: false` instead of exiting the daemon;
 * `webhook-out` POSTs the event.
 */
import type { Meta } from '../types.js';
import type { ActionConfig, MonitorConfig, MonitorEvent } from './config.js';
/** Outcome of a dispatched action. */
export interface DispatchResult {
    kind: ActionConfig['type'];
    ok: boolean;
    /** Run id for `run`/`routine` actions dispatched through executeJobDetached. */
    runId?: string;
    error?: string;
}
/** Replace `{event}` in a prompt with the fired event summary. */
export declare function injectEvent(prompt: string, event: MonitorEvent): string;
/**
 * Dispatch a monitor's action for a fired event. `run` synthesizes a JobConfig
 * (event injected into the prompt, action fields mapped onto the routines shape,
 * runOn → host placement) and calls executeJobDetached — the exact path routines
 * use. `routine` fires an existing routine with the event injected. `notify` and
 * `webhook-out` are terminal side-effects.
 */
export declare function dispatchAction(monitor: MonitorConfig, event: MonitorEvent, meta?: Meta): Promise<DispatchResult>;
