/**
 * Minimal in-process event bus for agent-related notifications.
 *
 * Subscribers include:
 *   - the settings UI's SSE endpoint (live updates in the browser tab)
 *   - the tray icon updater (dynamic "Pending: N" item)
 *
 * The bus is deliberately simple: one event type ("grant-changed") carrying
 * a snapshot of the grant record. Consumers decide what to do with it.
 * Decoupling via events means the store doesn't need to know about either
 * the UI or the tray — they subscribe independently.
 */
import { EventEmitter } from "events";
import type { AgentGrant } from "./types.js";
export type NotificationKind = "grant-created" | "grant-approved" | "grant-denied" | "grant-revoked" | "grant-expired";
export interface GrantChangedEvent {
    kind: NotificationKind;
    grant: AgentGrant;
    /** Monotonic sequence so SSE clients can detect gaps. */
    seq: number;
}
declare class NotificationBroker extends EventEmitter {
    private sequence;
    /** Emit a grant-changed event. All subscribers observe synchronously. */
    emitGrantChanged(kind: NotificationKind, grant: AgentGrant): void;
    subscribe(listener: (ev: GrantChangedEvent) => void): () => void;
    /** Current sequence, for health checks and gap detection. */
    get seq(): number;
}
export declare const notifications: NotificationBroker;
export {};
//# sourceMappingURL=notifications.d.ts.map