import type { SessionEntry } from "./session-entries.js"; export interface RuntimeIdentity { /** omp package version. */ version: string; /** Source checkout commit; absent for installed builds. */ commit?: string; /** Source checkout branch; absent on a detached HEAD. */ branch?: string; /** Historical uncommitted-diff hash from older session entries; new entries omit it. */ diff?: string; /** Free-form name from `OMP_BUILD_LABEL`. */ label?: string; } /** Adopt the main thread's build stamp for subagent workers. */ export declare function adoptRuntimeIdentity(identity: RuntimeIdentity): void; /** Build identity of this process, resolved when first needed. */ export declare function currentRuntimeIdentity(): RuntimeIdentity; /** * Whether two stamps can name the same build. An `unknown` diff matches any diff of the same commit: * entries written before the diff was read carry it, and it carries no information to tell builds apart. */ export declare function sameRuntimeIdentity(a: RuntimeIdentity | null | undefined, b: RuntimeIdentity | null | undefined): boolean; /** * Builds that wrote the entries, in file order, collapsing consecutive repeats. `null` stands * for entries without a stamp (written before builds were recorded, or replicated without one). */ export declare function runtimeIdentityHistory(entries: readonly SessionEntry[]): Array; /** One-line label, e.g. `18.10.4`, `18.10.4 will/topic@a1b2c3d4e5 +diff 3f2a9c01 "variant-a"`. */ export declare function formatRuntimeIdentity(identity: RuntimeIdentity | null | undefined): string;