/**
 * Pi Subagents Integration for Bolloon
 *
 * Lightweight subagent implementation based on tmux multi-session.
 * Based on pi-subagents philosophy: simple task delegation and result collection.
 *
 * Key differences from Claude Code subagents:
 * - tmux-based sessions (not black-box background processes)
 * - Simple task委托 and result回收
 * - Full visibility into what each subagent is doing
 * - No complex scheduling - suitable for single task splitting
 */
export type SubagentStatus = 'created' | 'running' | 'idle' | 'completed' | 'failed' | 'terminated';
export interface Subagent {
    id: string;
    name: string;
    task: string;
    status: SubagentStatus;
    sessionId: string;
    createdAt: string;
    startedAt?: string;
    completedAt?: string;
    result?: string;
    error?: string;
}
export interface SubagentResult {
    subagentId: string;
    success: boolean;
    result?: string;
    error?: string;
    duration?: number;
}
export interface SubagentDelegateOptions {
    name?: string;
    timeoutMs?: number;
    onProgress?: (progress: string) => void;
}
/**
 * Create a new tmux session for a subagent
 */
export declare function createSubagent(task: string, options?: SubagentDelegateOptions): Promise<Subagent>;
/**
 * Start a subagent in a tmux session
 */
export declare function startSubagent(id: string, command: string, options?: SubagentDelegateOptions): Promise<SubagentResult>;
/**
 * Delegate a task to a new subagent and start it
 */
export declare function delegateTask(task: string, command: string, options?: SubagentDelegateOptions): Promise<SubagentResult>;
/**
 * Send input to a running subagent
 */
export declare function sendToSubagent(id: string, input: string): Promise<void>;
/**
 * Get subagent status
 */
export declare function getSubagent(id: string): Subagent | undefined;
/**
 * List all subagents
 */
export declare function listSubagents(): Subagent[];
/**
 * List running subagents
 */
export declare function listRunningSubagents(): Subagent[];
/**
 * Terminate a subagent
 */
export declare function terminateSubagent(id: string): Promise<void>;
/**
 * Load subagents from disk
 */
export declare function loadSubagents(): Promise<void>;
/**
 * Get subagent statistics
 */
export declare function getStats(): {
    total: number;
    running: number;
    completed: number;
    failed: number;
};
/**
 * Clean up terminated subagents
 */
export declare function cleanupSubagents(): Promise<void>;
/**
 * Execute a task in parallel using multiple subagents
 */
export declare function parallelDelegate(tasks: string[], commandFactory: (task: string) => string, options?: SubagentDelegateOptions): Promise<SubagentResult[]>;
/**
 * Split a long-form task across multiple subagents
 * (e.g., writing and researching simultaneously)
 */
export declare function splitTask(mainTask: string, subtasks: string[], commandFactory: (subtask: string) => string, options?: SubagentDelegateOptions): Promise<Map<string, SubagentResult>>;
