import type { GoalBudget, GoalState, GoalUsage } from "../domain/types.js"; export interface AssistantUsageSample { messageID: string; inputTokens?: number; outputTokens?: number; reasoningTokens?: number; cost?: number; createdAt?: number; completedAt?: number; } export type BudgetLimitKind = "turns" | "tokens" | "cost" | "runtime"; export interface BudgetLimitHit { kind: BudgetLimitKind; used: number; limit: number; } export declare function budgetLimitHits(usage: GoalUsage, budget: GoalBudget): BudgetLimitHit[]; export declare function budgetStopReason(usage: GoalUsage, budget: GoalBudget): string | undefined; export declare function formatGoalBudget(goal: Pick): string; export declare function applyGoalBudget(goal: GoalState, patch: Partial, now?: number): GoalState; /** * Apply a reached cumulative Goal budget only at a host-observed Goal-turn * boundary. Usage is accounted as assistant messages finish, but changing the * Goal to budget_limited in the middle of one OpenCode prompt can otherwise * disable cadence/completion guards while that same prompt is still executing. */ export declare function settleReachedGoalBudget(goal: GoalState, now?: number): GoalState; export declare function accountAssistantUsage(goal: GoalState, sample: AssistantUsageSample, now?: number, options?: { countTurn?: boolean; }): GoalState; //# sourceMappingURL=accounting.d.ts.map