/** * TUI plan store helper for resolving plan keys with loop-session awareness. * * This module provides plan key resolution that mirrors the tool-side * convention in src/tools/plan-kv.ts:9-15, ensuring TUI plan access * honors loop worktree-scoped plan keys. */ /** * Gets the database path used by the memory plugin. * Exported for testing purposes. */ export declare function getDbPath(): string; /** * Resolves the plan key for a session, checking for loop-session mapping first. * * Loop sessions store their plan under plan:{loopName}, while normal * sessions use plan:{sessionId}. This function checks for a loop-session * mapping and returns the appropriate plan key. * * @param projectId - The project ID (git commit hash) * @param sessionID - The session ID to resolve * @param dbPathOverride - Optional database path override (for testing) * @returns The resolved plan key (either plan:{loopName} or plan:{sessionID}) */ export declare function resolvePlanKey(projectId: string, sessionID: string, dbPathOverride?: string): string; /** * Reads plan content from the KV store for a session. * * @param projectId - The project ID (git commit hash) * @param sessionID - The session ID to read plan for * @param dbPathOverride - Optional database path override (for testing) * @returns The plan content or null if not found */ export declare function readPlan(projectId: string, sessionID: string, dbPathOverride?: string): string | null; /** * Writes plan content to the KV store for a session. * * @param projectId - The project ID (git commit hash) * @param sessionID - The session ID to write plan for * @param content - The plan content to write * @param dbPathOverride - Optional database path override (for testing) * @returns true if successful, false otherwise */ export declare function writePlan(projectId: string, sessionID: string, content: string, dbPathOverride?: string): boolean; /** * Deletes plan content from the KV store for a session. * * @param projectId - The project ID (git commit hash) * @param sessionID - The session ID to delete plan for * @param dbPathOverride - Optional database path override (for testing) * @returns true if a row was deleted, false otherwise */ export declare function deletePlan(projectId: string, sessionID: string, dbPathOverride?: string): boolean; //# sourceMappingURL=tui-plan-store.d.ts.map