import type { EventBus, TrackedAgentSnapshot } from '../kernel/events.js'; import type { HqPublisher } from './publisher.js'; export interface SessionTelemetryBridgeOptions { publisher: HqPublisher; /** Local bus carrying `session.agents_updated`. When omitted, snapshots * still publish (with empty/last-known agents) and the transcript still * streams from disk. */ events?: EventBus | undefined; sessionId: string; projectRoot: string; projectName?: string | undefined; /** Override the global root used to resolve the session JSONL path. */ globalRoot?: string | undefined; /** Last-known agents to publish immediately before the next bus update. */ initialAgents?: readonly TrackedAgentSnapshot[] | undefined; gitBranch?: string | undefined; startedAt?: string | undefined; /** Snapshot republish interval (also refreshes lastActivity). Default 2500ms. */ snapshotIntervalMs?: number | undefined; /** * Transcript tail poll interval. Default 500ms. Passing this explicitly * pins the poll to a fixed cadence; with the default, the poll relaxes to * {@link transcriptFallbackIntervalMs} while the per-file watcher is live * (the watcher streams changes within milliseconds — the poll is only a * safety net, and a 500ms stat loop per bridged session adds up). */ transcriptIntervalMs?: number | undefined; /** Poll interval while the transcript fs.watch is healthy. Default 5000ms. */ transcriptFallbackIntervalMs?: number | undefined; now?: (() => string) | undefined; } /** * Start streaming this surface's session telemetry to HQ. Returns a disposer * that stops both streams and publishes a final `session.ended`. */ export declare function startSessionTelemetryBridge(opts: SessionTelemetryBridgeOptions): () => void; //# sourceMappingURL=session-bridge.d.ts.map