/** * Session file archive module. * * Provides functions to copy subagent session files to a dedicated archive * store for auditability and crash resilience. The archive store is located at: * /subagent-sessions//// * * Session files are copied at each turn increment so the latest state is * preserved even if the subagent crashes unexpectedly. */ import type { HarnessEnvironment } from "#src/harness/interface"; /** * Get the archive directory path for a subagent's session file. */ export declare function getArchiveDir(parentSessionId: string, harnessId: string, agentId: string): string; /** * Get the archive file path for a subagent's session file. */ export declare function getArchivePath(parentSessionId: string, harnessId: string, agentId: string): string; /** * Archive the session file by copying it to the dedicated store. * * Creates the archive directory if it doesn't exist. * Overwrites any previous copy at that path. * * @param env - The harness environment with sessionFilePath * @param parentSessionId - The parent pi session ID * @param harnessId - The harness ID (e.g., "pi", "cmd") * @param agentId - The unique agent ID * @returns The archive path, or undefined if no session file exists */ export declare function archiveSessionFile(env: HarnessEnvironment, parentSessionId: string, harnessId: string, agentId: string): string | undefined; /** * Check if an archived session file exists for a given agent. */ export declare function archivedSessionExists(parentSessionId: string, harnessId: string, agentId: string): boolean; //# sourceMappingURL=session-archive.d.ts.map