import { type H2ASessionNotificationTopic } from "@sentropic/h2a"; import type { LocalStore } from "../local-files/store.js"; import type { SessionRegistry } from "./sessions.js"; /** JSON-RPC notification (no id, no response) emitted on push. */ export interface McpPushNotification { jsonrpc: "2.0"; method: "notifications/h2a"; params: { topic: H2ASessionNotificationTopic; sessionId: string; data: Record; }; } export type NotificationSink = (notification: McpPushNotification) => void; /** * Owns the per-session diff snapshots and the periodic scan that turns * filesystem changes into pushed JSON-RPC notifications. One dispatcher per * `mcp-serve` process; the SessionRegistry tells it which sessions to follow * and the LocalStore provides the read side. */ export declare class NotificationDispatcher { private readonly registry; private readonly store; private readonly root; private sink; private readonly intervalMs; private readonly snapshots; private timer?; constructor(registry: SessionRegistry, store: LocalStore, root: string, sink: NotificationSink | undefined, intervalMs: number); setSink(sink: NotificationSink | undefined): void; /** * EVO-1 wake hook (bug #3): invoked once per tick, per own session that saw * new inbox envelopes. mcp-serve wires this to the inbox-wake handler so an * idle host is woken on arrival. Non-breaking (optional). */ private onInboxArrival?; setOnInboxArrival(cb: ((instance: string) => void) | undefined): void; start(): void; stop(): void; /** * Compute and emit one round of diffs. Pulled into a public method so * tests can drive the dispatch deterministically without a timer. */ tick(): void; private push; } //# sourceMappingURL=notifications.d.ts.map