import { EventEmitter } from "events";
import { IAgent } from "../agents/interface";
export type LogLevel = "info" | "warn" | "error";
export type EventHandlerFn = (...args: any[]) => any;
export interface EventHandler {
    handler: EventHandlerFn;
}
export interface ManagedListenerSpec {
    key: string;
    event: string;
    once?: boolean;
    blocking?: boolean;
}
export interface AgentLogEvent {
    agentName: string;
    message: string;
    level: "info" | "warn" | "error";
    timestamp: number;
    taskId?: string | null;
}
export declare class EventService extends EventEmitter {
    private blockingHandlers;
    private managedListeners;
    private defaultLoggerActive;
    private boundDefaultLogHandler;
    eventTypes: {
        agentMsg: string;
        agentsRegister: string;
        agentsCall: string;
        pluginLog: string;
    };
    constructor();
    suppressDefaultLogger(): void;
    restoreDefaultLogger(): void;
    onBlocking(event: string, handler: EventHandlerFn): void;
    offBlocking(event: string, handler: EventHandlerFn): void;
    setListener(spec: ManagedListenerSpec, handler: EventHandlerFn): void;
    removeManagedListener(key: string): void;
    removeManagedListenersByPrefix(prefix: string): void;
    clearManagedListeners(): void;
    hasManagedListener(key: string): boolean;
    emitBlocking(event: string, ...args: any[]): Promise<any[]>;
    emitNonBlocking(event: string, ...args: any[]): Promise<any[]>;
    registerAgent(agent: IAgent): void;
    callAgent(name: string, query: string): Promise<string>;
    log(source: string, message: string, level?: LogLevel): void;
}
