import type { AgentTool } from "@pk-nerdsaver-ai/pi-agent-core";
import { Container, type TUI } from "@pk-nerdsaver-ai/pi-tui";
import type { KeyId } from "../../config/keybindings";
import type { MessageRenderer } from "../../extensibility/extensions/types";
import { IrcBus } from "../../irc/bus";
import { AgentLifecycleManager } from "../../registry/agent-lifecycle";
import { AgentRegistry } from "../../registry/agent-registry";
import type { SessionObserverRegistry } from "../session-observer-registry";
/** Guest-side proxy for hub actions executed on the collab host. */
export interface AgentHubRemote {
    chat(id: string, text: string): void;
    kill(id: string): void;
    revive(id: string): void;
    /** Mirrors readFileIncremental: text from fromByte (complete JSONL lines), newSize = next fromByte base; null = unavailable. */
    readTranscript(id: string, fromByte: number): Promise<{
        text: string;
        newSize: number;
    } | null>;
}
export interface AgentHubDeps {
    /** Progress/status snapshot source (task lifecycle + progress channels). */
    observers: SessionObserverRegistry;
    /** Keys that toggle the hub closed from inside (app.agents.hub + app.session.observe). */
    hubKeys: KeyId[];
    onDone: () => void;
    requestRender: () => void;
    /** Injectable for tests; defaults to the process-global registry. */
    registry?: AgentRegistry;
    /** Injectable for tests; defaults to the process-global lifecycle manager. */
    lifecycle?: AgentLifecycleManager;
    /** Injectable for tests; defaults to the process-global bus. */
    irc?: IrcBus;
    /** TUI handle for transcript components; tests omit it and get a render-only stub. */
    ui?: TUI;
    /** Tool lookup for transcript renderers (labels, custom render functions). */
    getTool?: (name: string) => AgentTool | undefined;
    /** Extension message renderers for custom messages in the transcript. */
    getMessageRenderer?: (customType: string) => MessageRenderer | undefined;
    /** Cwd used by tool renderers for path shortening; defaults to the project dir. */
    cwd?: string;
    /** Mirrors the main transcript's thinking-block visibility. */
    hideThinkingBlock?: () => boolean;
    /** Keys toggling tool output expansion (app.tools.expand). */
    expandKeys?: KeyId[];
    /** Focus the main view on this agent's live session (ctx.focusAgentSession). When absent (collab guest, tests), Enter opens the in-hub chat view instead. */
    focusAgent?: (id: string) => Promise<void>;
    /** Current main session file; used to seed parked historical subagents after restart. */
    sessionFile?: string | null;
    /** Collab guest: route actions/transcripts to the host instead of local sessions. */
    remote?: AgentHubRemote;
}
export declare class AgentHubOverlayComponent extends Container {
    #private;
    constructor(deps: AgentHubDeps);
    /**
     * Whether the table view has no agents to show (every registered agent except
     * Main, after the persisted-subagent scan in the constructor). The double-←
     * gesture reads this to stay inert when there is nothing to open.
     */
    get isEmpty(): boolean;
    /** Tear down every subscription and timer. Called by the overlay owner on close. */
    dispose(): void;
    render(width: number): readonly string[];
    handleInput(keyData: string): void;
    /** Open the chat view for an agent id (public for table Enter and tests). */
    openChat(id: string): void;
}
