import type { SessionStore } from './store.js'; /** * Idle-close watchdog handle. `touch` resets the per-channel timer, * `removeChannel` cancels it, and `shutdown` cancels everything. */ export interface Lifecycle { /** Cancel the idle timer for `channelId`. */ removeChannel(channelId: string): void; /** Cancel every outstanding timer. */ shutdown(): void; /** Reset the idle timer for `channelId`. No-op if `closeDelayMs` is 0. */ touch(channelId: string): void; } /** * Create a lifecycle watchdog. `closeDelayMs <= 0` disables the timer * entirely (all operations become no-ops) — the right default for tests * and for callers that drive close explicitly. * * `closeOnIdle` is invoked with the channel id when a timer fires. The * lifecycle itself does not call `store` — `store` is passed for parity * with the Rust signature and for future extension (e.g. skip closing a * channel already sealed). */ export declare function createLifecycle(store: SessionStore, closeOnIdle: (channelId: string) => Promise | void, closeDelayMs: number): Lifecycle; //# sourceMappingURL=lifecycle.d.ts.map