import type { Orckit } from '../orchestrator/orchestrator.js'; import type { ProcessState } from '../orchestrator/lifecycle.js'; import type { OutputLine } from '../process/output.js'; import type { BuildStatus } from '../process/parsers.js'; import type { IdeLink } from './ide.js'; export interface ProcessSnapshot { name: string; state: ProcessState; type: string; command: string; category: string; depends_on: string[]; pid: number | null; startedAt: number | null; retries: number; optional: boolean; /** * Absolute working directory the process is spawned in (`config.cwd` resolved * against orckit's cwd, or orckit's cwd when unset) — mirrors what the Runner * passes to `spawn`. The web UI resolves relative file references in this * process's output against it before building IDE deep links. */ cwd: string; lastError?: string; /** Latest build status, for processes whose `type` has a build parser. */ build?: BuildStatus; /** Diagnostic lines from the latest failing build, if any. Cleared on rebuild/success. */ buildErrors?: string[]; } export interface OrckitSnapshot { project: string; processes: ProcessSnapshot[]; /** IDE deep-link descriptor when a JetBrains project was detected; null otherwise. */ ide: IdeLink | null; } export interface SnapshotContext { /** Last error message keyed by process name; populated by the server from process:failed events. */ lastErrors: ReadonlyMap; /** Latest build status keyed by process name; populated from process:build events. */ builds: ReadonlyMap; /** Accumulated diagnostic lines from the latest failing build, keyed by process name. */ buildErrors: ReadonlyMap; /** Resolved IDE deep-link descriptor, or null when not a JetBrains project / disabled. */ ide: IdeLink | null; } /** * Build a serializable snapshot of the orchestrator's current state. Pure * function over Orckit's public read API — no private access, no caching. */ export declare function buildSnapshot(orckit: Orckit, ctx: SnapshotContext): OrckitSnapshot; export declare function recentOutput(orckit: Orckit, name: string, n?: number): OutputLine[]; //# sourceMappingURL=snapshot.d.ts.map