/**
 * Pi Ant Colony Integration for Bolloon
 *
 * Multi-agent collaboration system with white-box signal protocol.
 * Based on oh-pi's ant colony system: COLONY_SIGNAL protocol for agent coordination.
 *
 * Signal Protocol:
 * COLONY_SIGNAL:LAUNCHED → SCOUTING → WORKING → REVIEWING → COMPLETE
 *
 * Key features:
 * - Fully visible signal protocol (no black boxes)
 * - Per-ant turn limits, cost tracking, concurrent scheduling
 * - White-box design: no "what is it doing in the background" anxiety
 */
export type ColonySignal = 'LAUNCHED' | 'SCOUTING' | 'WORKING' | 'REVIEWING' | 'COMPLETE' | 'FAILED' | 'ABORTED';
export type AntRole = 'scout' | 'worker' | 'reviewer' | 'coordinator';
export interface Ant {
    id: string;
    name: string;
    role: AntRole;
    signal: ColonySignal;
    turnCount: number;
    maxTurns: number;
    tokenBudget: number;
    tokensUsed: number;
    task?: string;
    result?: string;
    createdAt: string;
    updatedAt: string;
}
export interface ColonyTask {
    id: string;
    description: string;
    status: 'pending' | 'dispatched' | 'in_progress' | 'completed' | 'failed';
    assignedAnts: string[];
    results: Map<string, string>;
    createdAt: string;
    completedAt?: string;
}
export interface ColonySignalEvent {
    antId: string;
    antName: string;
    fromSignal: ColonySignal;
    toSignal: ColonySignal;
    timestamp: string;
    details?: string;
}
/**
 * Register a new ant in the colony
 */
export declare function registerAnt(name: string, role: AntRole, maxTurns?: number, tokenBudget?: number): Ant;
/**
 * Transition ant to SCOUTING
 */
export declare function antScouting(antId: string, task: string): void;
/**
 * Transition ant to WORKING
 */
export declare function antWorking(antId: string): void;
/**
 * Transition ant to REVIEWING
 */
export declare function antReviewing(antId: string): void;
/**
 * Complete ant work
 */
export declare function antComplete(antId: string, result: string): void;
/**
 * Fail ant work
 */
export declare function antFail(antId: string, error: string): void;
/**
 * Abort ant work
 */
export declare function antAbort(antId: string, reason: string): void;
/**
 * Increment turn count
 */
export declare function antTick(antId: string, tokensUsed?: number): void;
/**
 * Create a colony task
 */
export declare function createTask(description: string): ColonyTask;
/**
 * Dispatch task to ants
 */
export declare function dispatchTask(taskId: string, antIds: string[]): void;
/**
 * Record ant result for a task
 */
export declare function recordResult(taskId: string, antId: string, result: string): void;
/**
 * Get ant by ID
 */
export declare function getAnt(antId: string): Ant | undefined;
/**
 * List all ants
 */
export declare function listAnts(): Ant[];
/**
 * List ants by role
 */
export declare function listAntsByRole(role: AntRole): Ant[];
/**
 * Get ants by signal state
 */
export declare function listAntsBySignal(signal: ColonySignal): Ant[];
/**
 * Get active ants (not complete/failed/aborted)
 */
export declare function getActiveAnts(): Ant[];
/**
 * Get task by ID
 */
export declare function getTask(taskId: string): ColonyTask | undefined;
/**
 * List all tasks
 */
export declare function listTasks(): ColonyTask[];
/**
 * Get signal history
 */
export declare function getSignalHistory(): ColonySignalEvent[];
/**
 * Get colony status
 */
export declare function getColonyStatus(): {
    antCount: number;
    activeAnts: number;
    taskCount: number;
    activeTasks: number;
    signalDistribution: Record<ColonySignal, number>;
};
/**
 * Subscribe to colony events
 */
export declare function onColonyEvent(event: 'signal' | 'antRegistered' | 'taskCreated', callback: (...args: unknown[]) => void): void;
/**
 * Unsubscribe from colony events
 */
export declare function offColonyEvent(event: 'signal' | 'antRegistered' | 'taskCreated', callback: (...args: unknown[]) => void): void;
/**
 * Get formatted colony dump for debugging
 */
export declare function getColonyDump(): string;
/**
 * Persist colony state
 */
export declare function persistColony(): Promise<void>;
/**
 * Load colony state
 */
export declare function loadColony(): Promise<void>;
