/**
 * Owner notifier — the one seam for "ping the human" messages.
 *
 * Every human-facing owner notification (feed urgent-block dispatch, monitor
 * `notify` action, `agents notify`) funnels through the single channel seam:
 * `lookupTransport(channel, meta).provider.send(text, opts)`. The recipient comes
 * from `humans.yaml` — never a hardcoded chat id — so changing the
 * owner is honoured by every path at once. `notify.transports` picks the actual
 * provider per host (rush telegram on zion, openclaw-telegram on mac-mini).
 * Best-effort: a delivery failure is returned to the caller, never thrown, so a
 * notification hiccup never blocks the agent. That is why this module resolves
 * with `lookupTransport` and not the `die()`-capable `resolveTransport` — the
 * monitor daemon and the feed-dispatch loop call in here, and `process.exit()`
 * would take them down on a typo'd channel name, bypassing their try/catch.
 */
import type { OpenBlock } from './feed/feed.js';
import type { Meta } from './types.js';
import type { SendResult } from './channels/registry.js';
import { type SinkMessageFormat } from './sink-format.js';
export interface OwnerNotifyOptions {
    /** Config source (defaults to `readMeta()`); lets callers/tests inject it. */
    meta?: Meta;
    /** Override the owner channel resolved from humans.yaml. */
    channel?: string;
    /** Override the owner target resolved from humans.yaml. */
    target?: string;
    /** Resolve + build the delivery but do not actually send. */
    dryRun?: boolean;
    thread?: string;
    attachments?: string[];
    from?: string;
    /**
     * Per-destination body composer (PHNX-3698). The owner policy fans one alert
     * out to several channels (imessage + slack, …), and only Slack can render a
     * labeled link — so when set, each destination gets the body shaped for its
     * OWN resolved provider (Slack → `mrkdwn` `<url|label>` links, everything else
     * → `plain` the human sentence, no URLs) instead of the single `text` going to
     * every channel. Absent for callers whose body is already final (urgent
     * blocks, monitor summaries): `text` is delivered verbatim to every channel.
     */
    composeForFormat?: (format: SinkMessageFormat) => string;
}
export interface NotifyResult {
    ok: boolean;
    skipped?: boolean;
    error?: string;
}
export declare function formatUrgentBlockMessage(block: OpenBlock): string;
/**
 * Build openclaw argv for a Telegram send (used by the openclaw-telegram
 * provider and its tests). `target` is required — the recipient is always
 * resolved by the caller, never defaulted to a hardcoded number here.
 */
export declare function buildOpenClawNotifyArgs(text: string, opts: {
    target: string;
    channel?: string;
    account?: string;
}): string[];
/**
 * Deliver a message to the configured owner through the one channel seam.
 * `channel`/`target` default to the normal owner channel in humans.yaml; `notify.transports`
 * selects the provider per host. A missing owner config or a delivery failure
 * (e.g. openclaw not on PATH) returns a clean `SendResult` error — never a raw
 * ENOENT — so callers surface a consistent, best-effort failure.
 *
 * When local delivery fails because THIS box structurally cannot reach the owner
 * — the rush-backed owner channel is macOS-only, so a headless Linux worker can
 * never ring the phone (PHNX-3303) — the notify is forwarded over SSH to a
 * capable fleet peer that DOES have the provider, mirroring the reroute
 * `agents message` already uses. A successful forward is returned as the result;
 * if no capable peer is reachable, the original clean local error stands.
 */
export declare function sendToOwner(text: string, options?: OwnerNotifyOptions): Promise<SendResult>;
export declare function notifyUrgentBlock(block: OpenBlock, options?: OwnerNotifyOptions): Promise<NotifyResult>;
