import type { Orckit } from '../orchestrator/orchestrator.js'; import { type BuildEvent, type BuildStatus } from './parsers.js'; /** * Live view of where every process's most recent build stands, kept current by * subscribing to `process:build` / `process:restarting`. Both the web server * and the MCP server consume this so the two never drift on how a build outcome * is reduced from the raw event stream. * * The maps are exposed read-only and mutate in place — hold the tracker and read * `builds` / `buildErrors` whenever you need the current picture (e.g. when * building a snapshot), rather than caching their contents. */ export interface BuildTracker { /** Latest reduced build status per process. Absent until the first build event. */ readonly builds: ReadonlyMap; /** Diagnostic lines from the latest *failing* build, accumulated across events. */ readonly buildErrors: ReadonlyMap; /** Detach the event listeners. */ dispose(): void; } /** * Apply one build event to the running `builds` / `buildErrors` maps. Pure over * its inputs (mutates the passed maps) so the wait-loop in the MCP server can * reuse the exact same accumulation rules while it long-polls. */ export declare function applyBuildEvent(name: string, event: BuildEvent, builds: Map, buildErrors: Map): void; export declare function trackBuilds(orckit: Orckit): BuildTracker; //# sourceMappingURL=build-tracker.d.ts.map