/** * Store the session to resume and report the launcher invocation. * @param sessionId - Session id for `dsh-tui --resume` on the next launch. */ export declare function writeResumeTarget(sessionId: string): void; /** Forget the resume marker (`/clear` starts a fresh conversation). */ export declare function clearResumeTarget(): void; /** * The session id requested by `dsh-tui --resume`, if any. The new path * wins; the legacy path is the fallback for pre-rename launchers. * @returns The stored session id, or undefined when none is set. */ export declare function readResumeTarget(): string | undefined; /** * Parse `-r`/`--resume`/`-c`/`--continue` forwarded to the application. * Bare flags request the latest conversation in the launch directory. * @param argv - the app arguments (typically `process.argv.slice(2)`). * @returns An explicit id, a latest-conversation request, or no request. */ export declare function resumeRequestFromArgv(argv: readonly string[]): { kind: 'latest'; } | { kind: 'session'; id: string; } | undefined; /** * Legacy launcher marker lookup; startup uses directory-scoped resolution. * @param argv - Forwarded app arguments. * @returns Explicit id or the legacy exit marker for a bare resume flag. */ export declare function resumeTargetFromArgv(argv: readonly string[]): string | undefined; /** * Session-id → last-used epoch ms map for MRU ordering. * @returns The parsed map; best effort, an unreadable file yields {}. */ export declare function readLastUsed(): Readonly>; /** * Record that a session was just used (resumed or written to) so `/resume` * can sort most-recently-used first. Best effort — never throws. * @param sessionId - Session id to touch. */ export declare function touchSession(sessionId: string): void; /** * Drop a session's last-used entry (`/resume` picker delete) so the MRU map * never accumulates ids whose logs are gone. Best effort — never throws. * @param sessionId - Session id to forget. */ export declare function forgetSession(sessionId: string): void; /** * The agent-view ledger (see {@link AGENT_VIEW_SESSIONS_FILE}): session-id → * epoch-ms. Best effort — an unreadable file yields {}. * @returns The parsed map. */ export declare function readAgentViewSessions(): Readonly>; /** * Record a session as agent-view-managed (dispatched, backgrounded, or * attached from the view). Best effort — never throws. * @param sessionId - Session id to record. */ export declare function touchAgentViewSession(sessionId: string): void; /** * Drop a session from the agent-view ledger (its log was deleted). Best * effort — never throws. * @param sessionId - Session id to forget. */ export declare function forgetAgentViewSession(sessionId: string): void; //# sourceMappingURL=sessionHistory.d.ts.map