import { ByzantineConsensus, type ConsensusResult } from './byzantine-consensus.js';
export interface PodGroup {
    id: string;
    leadWorkerId: string;
    workerIds: string[];
    progress: number;
}
export interface PodMessage {
    id: string;
    workerId: string;
    type: 'observation' | 'fact' | 'instruction';
    content: string;
    timestamp: number;
    tags: string[];
    confidence: number;
}
export interface PodWorkerSnapshot {
    workerId: string;
    lastMessageTimestamp: number;
    messageCount: number;
    avgConfidence: number;
    state: 'active' | 'idle';
    tags: string[];
}
export interface PodDashboardSnapshot {
    lastMessageTimestamp: number | null;
    messages: PodMessage[];
    tagClusters: Array<{
        tag: string;
        count: number;
    }>;
    activeWorkers: PodWorkerSnapshot[];
    confidenceBands: {
        high: number;
        medium: number;
        low: number;
    };
}
export declare class PODNetwork {
    private messages;
    private subscribers;
    private podGroups;
    consensus: ByzantineConsensus;
    private podPath;
    private pollHandle;
    static instance: PODNetwork;
    constructor();
    private loadMessages;
    private saveMessages;
    /** Publish a finding to the network */
    publish(workerId: string, content: string, confidence?: number, tags?: string[]): PodMessage;
    /** Recall relevant POD context for a specific task */
    recall(tags: string[], minConfidence?: number): PodMessage[];
    getMessages(limit?: number): PodMessage[];
    getWorker(workerId: string, limit?: number): PodWorkerSnapshot & {
        messages: PodMessage[];
    };
    getDashboardSnapshot(limit?: number): PodDashboardSnapshot;
    /** Internal broadcast to active sub-agent listeners */
    private broadcast;
    /** Sub-agents can listen for specific events/topics */
    subscribe(tag: string, callback: (msg: PodMessage) => void): () => void;
    clear(): void;
    /** Create a new POD group containing 5-8 workers with a lead */
    createPodGroup(leadWorkerId: string, workerIds: string[]): string;
    getPodGroup(podId: string): PodGroup | undefined;
    updatePodProgress(podId: string, progress: number): void;
    getPodProgress(podId: string): number;
    /** Resolve inter-pod conflict using byzantine consensus */
    resolveConflict(proposerId: string, layerIndex: number, delta: number[]): ConsensusResult;
    /** Stop the poll timer and release resources */
    destroy(): void;
}
export declare const podNetwork: PODNetwork;
