export type SignalSeverity = 'info' | 'low' | 'medium' | 'high' | 'critical';
export type SignalType = 'USER_INTENT' | 'USER_CORRECTION' | 'USER_CONFUSION' | 'USER_CONFIRMATION' | 'USER_ESCALATION' | 'TASK_RISK' | 'IRREVERSIBLE_ACTION' | 'TOOL_ERROR' | 'TOOL_SUCCESS' | 'AGENT_LOOP' | 'AGENT_STALL' | 'CONTEXT_OVERLOAD' | 'TOKEN_PRESSURE' | 'LOW_CONFIDENCE' | 'VERIFIER_FAIL' | 'VERIFIER_PASS' | 'SAFETY_RISK' | 'PRIVACY_RISK' | 'COST_SPIKE' | 'TIMEOUT_RISK' | 'REPEATED_FAILURE' | 'ROUTE_SUCCESS' | 'ROUTE_FAILURE' | 'MEMORY_CONFLICT' | 'FRESHNESS_REQUIRED' | 'EXTERNAL_ACTION_REQUEST' | 'DRY_RUN_REQUIRED' | 'CONFIRMATION_REQUIRED' | 'COMPRESSION_REQUIRED' | 'RECOVERY_REQUIRED' | 'ONGOING_SERVICE_REQUEST' | 'DETERMINISTIC_SHORTCUT_AVAILABLE';
export interface NervousSignal {
    id: string;
    type: SignalType;
    source: string;
    severity: SignalSeverity;
    confidence: number;
    message: string;
    metadata?: Record<string, unknown>;
    relatedEpisodeId?: string;
    relatedRouteId?: string;
    handled: boolean;
    handledBy?: string;
    actionTaken?: string;
    createdAt: string;
}
export type SignalHandler = (signal: NervousSignal) => void;
/**
 * In-memory signal bus. Publishes signals to registered handlers
 * and keeps a rolling log of recent signals for inspection.
 */
export declare class SignalBus {
    private handlers;
    private allHandlers;
    private log;
    private maxLog;
    constructor(maxLog?: number);
    /** Subscribe to a specific signal type. */
    on(type: SignalType, handler: SignalHandler): void;
    /** Subscribe to all signals. */
    onAny(handler: SignalHandler): void;
    /** Publish a signal to all matching handlers. */
    publish(signal: NervousSignal): void;
    /** Publish multiple signals. */
    publishMany(signals: NervousSignal[]): void;
    /** Get recent signals, optionally filtered by type or severity. */
    recent(filter?: {
        type?: SignalType;
        severity?: SignalSeverity;
        limit?: number;
    }): NervousSignal[];
    /** Count signals by type in the current log. */
    counts(): Record<string, number>;
    /** Clear the log. */
    clear(): void;
}
/** Create a signal with auto-generated ID and timestamp. */
export declare function createSignal(type: SignalType, source: string, severity: SignalSeverity, message: string, metadata?: Record<string, unknown>): NervousSignal;
//# sourceMappingURL=signals.d.ts.map