/** * Cold-start timing for one daemon process, reported once in `sandbox.ready`. * * The runtime bootstrap hands its own stage timings over in * `BOTLEARN_BOOTSTRAP_STARTUP_TIMINGS`; the daemon appends its stages so Agent * Service can log one launcher-to-ready timeline. Values are durations and epoch * milliseconds only — never paths, tokens or other payload content. */ export interface BootstrapStartupTimings { process_started_at_ms?: number; bootstrap_started_at_ms?: number; stages_ms: Record; total_ms?: number; } export interface StartupTimingsPayload { bootstrap?: BootstrapStartupTimings; daemon_process_started_at_ms: number; daemon_stages_ms: Record; } /** Parse the bootstrap hand-off; anything malformed is dropped, never thrown. */ export declare function parseBootstrapStartupTimings(raw: string | undefined): BootstrapStartupTimings | undefined; /** Sequential stage timer: each mark records milliseconds since the previous mark. */ export declare class StartupTimer { private readonly bootstrap; private readonly now; private readonly processStartedAt; private last; private readonly stages; private reported; constructor(bootstrap: BootstrapStartupTimings | undefined, now?: () => number, processStartedAt?: number); mark(stage: string): void; /** Return the payload once; later reconnects of the same process report nothing. */ takeReadyPayload(): StartupTimingsPayload | undefined; }