import type { OrgDaemon, RunningOrg } from './daemon.js'; /** * Resolves an org_send `to` address ("role" for same-org, "org:role" for * cross-org) into its parts. Centralizes the one addressing rule that * matters (an "own-org:role" self-prefix is intra-org, not cross-org) so * deliver()/deliverRemote() don't each re-derive it — the qualified `to` * string returned is always the canonical display form for that address. */ export declare function resolveAddress(fromOrg: string, to: string): { cross: boolean; orgName: string; role: string; qualified: string; }; /** Mailbox bodies are unbounded — a pasted 20KB file would persist in the * recipient's context for the whole run. Bodies over MAIL_BODY_MAX are * written to /.mail/.md and replaced with a ~1KB * digest plus a pointer; smaller messages stay byte-identical. */ export declare function mailBody(root: string, orgName: string, org: RunningOrg | undefined, header: string, body: string, id: string, toRole?: string): string; /** SEC: the ONE place an inter-agent message enters a role's mailbox. Every * inbound path — live deliver(), inbound cross-process receiveRemote(), and * the queued-inbox drains (startOrg, deferred spawns) — must go through here * so a role with `scanMessages` on is fenced on all of them, not just the * first. Returns false when the fence blocked the body (scanMessage already * emitted the audit event) or the recipient can't take mail. */ export declare function pushMessage(daemon: OrgDaemon, orgName: string, org: RunningOrg, toRole: string, from: string, subject: string, body: string, id: string): Promise; //# sourceMappingURL=cross-org-mail.d.ts.map