@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
29 lines • 2.13 kB
TypeScript
import { goalFilePath } from "./persistence.ts";
import type { Goal, GoalAccountingMode, GoalContinuationStoppedDetail, GoalStoreRef, GoalUpdate, GoalUpdateSource, TokenUsageSnapshot } from "./types.ts";
export { goalFilePath };
export declare function goalHistoryFilePath(ref: GoalStoreRef): string;
export declare function objectiveFullTextFileName(ref: GoalStoreRef): string;
export declare function objectiveFullTextFilePath(ref: GoalStoreRef): string;
export declare function readGoal(ref: GoalStoreRef): Promise<Goal | null>;
/** Imports a legacy pi-goal store under the goal lock, so a concurrent mutation cannot overwrite the import. */
export declare function migrateLegacyGoal(ref: GoalStoreRef): Promise<Goal | null>;
export declare function writeGoal(ref: GoalStoreRef, goal: Goal | null): Promise<void>;
export declare function createGoal(ref: GoalStoreRef, objective: string, tokenBudget?: number): Promise<Goal>;
export declare function updateGoal(ref: GoalStoreRef, update: GoalUpdate, source?: GoalUpdateSource): Promise<Goal>;
export declare function archiveGoal(ref: GoalStoreRef, goal: Goal): Promise<void>;
export declare function clearGoal(ref: GoalStoreRef): Promise<boolean>;
export declare function accountGoalUsage(ref: GoalStoreRef, usage: TokenUsageSnapshot, elapsedSeconds: number, mode?: GoalAccountingMode, expectedGoalId?: string): Promise<Goal | null>;
export declare function recordContinuationDelivered(ref: GoalStoreRef, signature: string, expectedGoalId?: string, options?: {
countUnattended?: boolean;
countStreak?: boolean;
}): Promise<Goal | null>;
export declare function resetContinuationStreak(ref: GoalStoreRef, options?: {
unattended?: boolean;
progress?: boolean;
}): Promise<Goal | null>;
/** Claims one denial under the same lock as input/reset, so evaluation retries cannot append another stop. */
export declare function recordGoalContinuationStopped(ref: GoalStoreRef, expected: Goal, at: number, blockedReason: string | undefined, detail: GoalContinuationStoppedDetail): Promise<{
goal: Goal | null;
recorded: boolean;
}>;
//# sourceMappingURL=store.d.ts.map