/** * Planner token budgeting: one shared character→token estimate ratio for both * routes plus the remaining-output computation against a model context window. * @module dsh-continual-harness */ import type { RequestMessage } from '@deepseek-ai/dsh-llm'; /** Shared char→token estimate ratio for Route A and Route B (spec §2.2). */ export declare const DEFAULT_TOKEN_PER_CHAR_RATIO = 0.5; /** Tokens reserved inside the context window for safety (prompt framing etc.). */ export declare const DEFAULT_PLANNER_SAFETY_RESERVE_TOKENS = 1024; /** Minimum output tokens a planner call must be able to produce; below this the route is infeasible. */ export declare const MIN_PLANNER_OUTPUT_TOKENS = 4096; /** Estimate tokens for a character count using the shared ratio (rounded up). */ export declare function estimateCharsTokens(chars: number, ratio: number): number; /** Estimate the token weight of a message prefix from its serialized text. */ export declare function estimateMessagesChars(messages: readonly RequestMessage[]): number; /** Compute the output token budget a planner call may use. */ export declare function plannerOutputBudget(params: { contextWindow: number; inputChars: number; tokenPerCharRatio: number; configuredMaxTokens: number; safetyReserveTokens: number; }): number; //# sourceMappingURL=budget.d.ts.map