type RunRoute = {
    runId: string;
    deviceId: string;
    sessionKey: string;
};
export type RunMetadata = {
    modelName?: string;
    totalTokens?: number;
    /** Tokens counted toward the model context window (prompt-side: input + cache read + cache write when present). */
    contextTokensUsed?: number;
    /** Resolved model context window limit when the runtime exposes it. */
    contextWindowMax?: number;
};
/** Vitest / harness: clears per-run metadata and final-delivered flags (not routes). */
export declare function resetRunMetadataForTest(): void;
export declare function registerRunRoute(route: RunRoute): void;
export declare function getRunRoute(runId: string): RunRoute | undefined;
export declare function setRunMetadata(runId: string, metadata: RunMetadata): void;
export declare function getRunMetadata(runId: string): RunMetadata | undefined;
export declare function markRunFinalDelivered(runId: string): void;
export declare function hasRunFinalDelivered(runId: string): boolean;
/** Best-effort prompt-side context footprint from a provider usage object. */
export declare function contextTokensFromUsageRecord(u: Record<string, unknown>): number | undefined;
export declare function ingestAgentEventMetadata(runId: string, data: Record<string, unknown>): void;
export {};
