import { type GoalCustomEntry, type GoalEntrySource, type GoalResult, type GoalSnapshot, type GoalStatus, type GoalUsage, type RuntimeUsageGoalStatus, type SessionEntryLike, type ThreadGoal } from "./types.js"; export declare const MIN_TOKEN_BUDGET = 500000; export interface ApplyUsageOptions { expectedGoalId?: string | null; accountBudgetLimited?: boolean; } export declare function unixSeconds(): number; export declare function cloneUsage(usage: GoalUsage): GoalUsage; export declare function cloneGoal(goal: ThreadGoal): ThreadGoal; export declare function goalsEquivalent(left: ThreadGoal, right: ThreadGoal): boolean; export declare function validateObjective(objective: string): string | null; export declare function validateTokenBudget(tokenBudget: number | null | undefined): string | null; export declare function statusAfterBudgetLimit(status: GoalStatus, tokensUsed: number, tokenBudget: number | null): GoalStatus; export declare function createThreadGoal(objective: string, tokenBudget?: number | null, now?: number): ThreadGoal; export declare function setEntry(goal: ThreadGoal, source: GoalEntrySource, at?: number): GoalCustomEntry; export declare function runtimeUsageEntry(goal: ThreadGoal, at?: number, receiptId?: string): GoalCustomEntry; export declare function clearEntry(clearedGoalId: string | null, source: GoalEntrySource, at?: number): GoalCustomEntry; export declare function hostOverflowCapResetEntry(active: boolean, at?: number): GoalCustomEntry; export declare function isGoalCustomEntry(data: unknown): data is GoalCustomEntry; export declare function isGoalUsage(usage: unknown): usage is GoalUsage; export declare function isRuntimeUsageGoalStatus(status: unknown): status is RuntimeUsageGoalStatus; export declare function isThreadGoal(goal: unknown): goal is ThreadGoal; export declare function isGoalStatus(status: unknown): status is GoalStatus; export declare function reconstructGoal(entries: Iterable): GoalSnapshot; export declare function reconstructHostOverflowCapNeedsUserReset(entries: Iterable): boolean; export declare function createGoal(current: ThreadGoal | null, objective: string, tokenBudget?: number | null): GoalResult; export declare function replaceGoal(objective: string, tokenBudget?: number | null): GoalResult; export declare function updateGoalStatus(current: ThreadGoal | null, status: GoalStatus): GoalResult; export declare function applyUsage(current: ThreadGoal | null, tokensDelta: number, activeSecondsDelta: number, options?: ApplyUsageOptions): { goal: ThreadGoal | null; changed: boolean; crossedBudget: boolean; }; export declare function goalWithLiveUsage(current: ThreadGoal | null, activeGoalId: string | null, lastAccountedAt: number | null, now?: number): ThreadGoal | null; //# sourceMappingURL=state.d.ts.map