import type { NativeHistoryConfig, NativeHistoryJsonlSource } from './types.js';
export interface NativeHistoryInput {
    agentType?: string;
    sessionId?: string;
    providerSessionId?: string;
    historySessionId?: string;
    workspace?: string;
    /** Daemon-side wall clock at the moment the session was registered.
     *  Native-history file lookups use this as the lower bound: any file
     *  whose mtime is before the current session started can't be from
     *  this session, so it's excluded from newest-recent matching. The
     *  caller (chat-history pipeline) populates this from the session
     *  registry; specs/executor never need to know how it's sourced. */
    sessionStartedAtMs?: number;
    /** Env overrides the daemon set on the spawned CLI. The mesh
     *  coordinator points hermes at a per-coordinator HERMES_HOME so
     *  the hermes process writes its state.db into a tmp directory
     *  instead of ~/.hermes. expandPath consults this map before
     *  process.env so the native-history reader follows the spawned
     *  child's view of HERMES_HOME / similar overrides; without it
     *  the reader would always look at ~/.hermes and miss every
     *  coordinator-session transcript. */
    envOverrides?: Record<string, string>;
    args?: Record<string, unknown>;
}
export interface NativeHistoryMessage {
    role: 'user' | 'assistant' | 'system';
    content: string;
    receivedAt: number;
    kind?: string;
    workspace?: string;
}
export interface NativeHistoryResult {
    messages: NativeHistoryMessage[];
    providerSessionId?: string;
    sourcePath: string;
    sourceMtimeMs: number;
    nativeHistoryCoverage?: 'full' | 'partial' | 'best-effort';
    workspace?: string;
}
export declare function executeNativeHistory(cfg: NativeHistoryConfig, input: NativeHistoryInput): NativeHistoryResult | null;
/**
 * Resolve the concrete on-disk transcript file a jsonl native-history source
 * points at, applying the same slug/date/session-bound/scan fallbacks the
 * message reader uses. Returns null when no file can be located.
 *
 * Extracted so status-only readers (background-task detection) can locate the
 * live transcript without re-parsing every message on each status poll.
 */
export declare function resolveJsonlSourcePath(src: NativeHistoryJsonlSource, input: NativeHistoryInput): string | null;
