import type { ParsedMessage } from "shared/types/index.js";
import type { DiscoverResult, ResolvedSession, SessionProvider, SessionSearchFilters, SessionSearchResponse, SubagentFile } from "../../ports/SessionProvider.js";
export declare class OpenRouterSessionProvider implements SessionProvider {
    readonly kind: "openrouter";
    /**
     * Delegate to the shared resolver so the write side
     * (`optionsAdapter` → `OpenRouterAgentRun.logsRoot`) and this read side
     * stay in lockstep. Result may be a path that doesn't exist yet —
     * discovery returns an empty list rather than throwing for that case.
     */
    private resolveLogsRoot;
    /**
     * Resolve `<logsRoot>/<sessionId>` while rejecting any sessionId that
     * would escape the logs root via `..`, absolute paths, or path separators.
     * Returns `null` for unsafe inputs — callers treat that the same as "session
     * does not exist." Closes the path-traversal vector where a corrupted chat
     * metadata `provider: "openrouter"` could pair with a sessionId like `""`
     * or `".."` and turn `deleteSessionFiles()` into an arbitrary-rmSync.
     */
    private safeSessionDir;
    /** Read a session.json safely; returns null on missing / malformed. */
    private readSessionJson;
    discoverSessions(opts: {
        limit: number;
        offset: number;
    }): DiscoverResult;
    resolveSession(sessionId: string): ResolvedSession | null;
    findSubagentFiles(sessionId: string): SubagentFile[];
    parseSessionMessages(sessionIds: string[]): ParsedMessage[];
    getSessionPreview(logPath: string, maxLength?: number): string | null;
    searchSessions(filters: SessionSearchFilters): SessionSearchResponse;
    deleteSessionFiles(sessionId: string): void;
}
//# sourceMappingURL=OpenRouterSessionProvider.d.ts.map