@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
22 lines • 1.28 kB
TypeScript
import type { Goal, GoalStoreRef } from "./types.ts";
export declare function encodedThreadId(ref: GoalStoreRef): string;
export declare function goalFilePath(ref: GoalStoreRef): string;
export declare function readGoalFile(ref: GoalStoreRef): Promise<Goal | null>;
/**
* Imports legacy standalone `pi-goal` state into the current budget-free store.
*
* The current store always wins and legacy normalization is confined to this path.
* Invalid, unsupported, or malformed legacy files are best-effort dead-data imports:
* they remain untouched and do not block the live current store. Unexpected filesystem
* failures still propagate.
*
* Session-backed stores use their stable thread id. No-session stores enumerate the
* cwd-keyed legacy bucket because each ephemeral run receives a new thread id, and they
* inspect both the redirected Senpi-root sibling and the standalone pi agent root.
* Multiple valid live candidates are reported as a conflict rather than guessed.
*
* Returns the imported goal, or null when nothing was migrated.
*/
export declare function migrateLegacyGoalFile(ref: GoalStoreRef): Promise<Goal | null>;
export declare function writeGoalFile(ref: GoalStoreRef, goal: Goal | null): Promise<void>;
//# sourceMappingURL=persistence.d.ts.map