import { type Message, type MessageCallback } from '../types.js';
type ToolResult = {
    content: Array<{
        type: 'text';
        text: string;
    }>;
    details: Record<string, unknown>;
};
type RelayTool = {
    name: string;
    label: string;
    description: string;
    parameters: unknown;
    execute: (toolCallId: string, params: any, signal?: AbortSignal, onUpdate?: unknown) => Promise<ToolResult>;
};
type PiSessionLike = {
    isStreaming: boolean;
    steer(text: string): Promise<void>;
    followUp(text: string): Promise<void>;
};
type PiConfigLike = {
    customTools?: RelayTool[];
    onSessionCreated?: (session: PiSessionLike) => void | Promise<void>;
};
type RelayLike = {
    send(to: string, text: string): Promise<void>;
    post(channel: string, text: string): Promise<void>;
    inbox(): Promise<Message[]>;
    agents(): Promise<string[]>;
    onMessage(callback: MessageCallback): () => void;
};
/**
 * Attach relay communication tools and message routing to a Pi agent config.
 * @param name - Agent name for relay registration.
 * @param config - Pi agent session config to augment.
 * @param relay - Optional pre-configured Relay instance.
 * @returns Augmented config with relay tools and session hook.
 */
export declare function onRelay<TConfig extends PiConfigLike>(name: string, config: TConfig, relay?: RelayLike): TConfig & {
    customTools: RelayTool[];
    onSessionCreated: (session: PiSessionLike) => Promise<void>;
    cleanup: () => void;
};
export {};
//# sourceMappingURL=pi.d.ts.map