/**
 * IRC tool — agent-to-agent messaging over the process-global IrcBus.
 *
 * `send` is fire-and-forget: the bus routes the message to the recipient
 * (waking idle agents with a real turn, reviving parked ones via the
 * lifecycle manager, injecting a non-interrupting aside into busy ones) and
 * returns delivery receipts immediately. Replies are real turns by the
 * recipient, observed with `wait` (or the `await: true` send sugar). `inbox`
 * drains pending messages; `list` shows every addressable peer.
 */
import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
import type { ToolExample } from "@oh-my-pi/pi-ai";
import { type Component } from "@oh-my-pi/pi-tui";
import type { Settings } from "../config/settings.js";
import type { RenderResultOptions } from "../extensibility/custom-tools/types.js";
import { type IrcDeliveryReceipt, type IrcMessage } from "../irc/bus.js";
import type { Theme } from "../modes/theme/theme.js";
import type { ToolSession } from "./index.js";
/**
 * IRC availability: there must be someone to chat with. True for every
 * subagent (it always has a parent, and possibly siblings) and for any
 * session that can still spawn subagents through the task tool. Only a
 * top-level session with task spawning unavailable has no peers — no irc.
 */
export declare function isIrcEnabled(settings: Settings, taskDepth: number): boolean;
declare const ircSchema: import("arktype/internal/variants/object.ts").ObjectType<{
    op: "inbox" | "list" | "send" | "wait";
    to?: string | undefined;
    message?: string | undefined;
    replyTo?: string | undefined;
    await?: boolean | undefined;
    from?: string | undefined;
    timeoutMs?: number | undefined;
    peek?: boolean | undefined;
}, {}>;
type IrcParams = typeof ircSchema.infer;
interface IrcPeerInfo {
    id: string;
    displayName: string;
    kind: string;
    status: string;
    parentId?: string;
    unread: number;
    lastActivity: number;
    activity?: string;
}
export interface IrcDetails {
    op: "send" | "wait" | "inbox" | "list";
    from?: string;
    to?: string;
    receipts?: IrcDeliveryReceipt[];
    /** Message consumed by `wait` / `send await:true`; null when the wait timed out. */
    waited?: IrcMessage | null;
    inbox?: IrcMessage[];
    peers?: IrcPeerInfo[];
}
export declare class IrcTool implements AgentTool<typeof ircSchema, IrcDetails> {
    #private;
    private readonly session;
    readonly name = "irc";
    readonly approval: "read";
    readonly label = "IRC";
    readonly summary = "Send and receive messages between agents";
    readonly description: string;
    readonly parameters: import("arktype/internal/variants/object.ts").ObjectType<{
        op: "inbox" | "list" | "send" | "wait";
        to?: string | undefined;
        message?: string | undefined;
        replyTo?: string | undefined;
        await?: boolean | undefined;
        from?: string | undefined;
        timeoutMs?: number | undefined;
        peek?: boolean | undefined;
    }, {}>;
    readonly strict = true;
    readonly interruptible = true;
    readonly examples: readonly ToolExample<typeof ircSchema.infer>[];
    readonly loadMode = "discoverable";
    constructor(session: ToolSession);
    static createIf(session: ToolSession): IrcTool | null;
    execute(_toolCallId: string, params: IrcParams, signal?: AbortSignal, _onUpdate?: AgentToolUpdateCallback<IrcDetails>, _context?: AgentToolContext): Promise<AgentToolResult<IrcDetails>>;
}
type IrcRenderArgs = Partial<IrcParams>;
/**
 * Display-only transcript card for live IRC traffic: `irc:incoming` DMs
 * delivered to this session, `irc:autoreply` side-channel replies sent on
 * this session's behalf, and `irc:relay` observations of agent↔agent
 * traffic. Shares the tool renderer's glyph + quote-border conventions so
 * cards and `irc` tool output look identical in the transcript.
 */
export declare function createIrcMessageCard(card: {
    kind: "incoming" | "autoreply" | "relay";
    from?: string;
    to?: string;
    body?: string;
    replyTo?: string;
    timestamp?: number;
}, getExpanded: () => boolean, uiTheme: Theme): Component;
export declare const ircToolRenderer: {
    inline: boolean;
    mergeCallAndResult: boolean;
    renderCall(args: IrcRenderArgs, _options: RenderResultOptions, uiTheme: Theme): Component;
    renderResult(result: {
        content: Array<{
            type: string;
            text?: string;
        }>;
        details?: IrcDetails;
        isError?: boolean;
    }, options: RenderResultOptions, uiTheme: Theme, args?: IrcRenderArgs): Component;
};
export {};
