/** * Pre-flight cost estimation helpers for the generate-adrs feature. * * Per v0.7 Step 2.2.a.2 Lock 3 (two-phase cost reporting): the CLI * prints a pre-flight estimate (input + output tokens + USD cost * range) and prompts the user for [y/N] confirmation before the * Anthropic API call. Post-flight actual costs (from the API * response's usage data) print after the call completes. * * Token counting uses a rough `Math.ceil(chars / 4)` approximation * per public guidance for Claude / GPT tokenization on English-and- * code prose. Accurate enough for cost-estimate framing; the * post-flight actual numbers come straight from the API. */ /** * Approximate token count for arbitrary text. Public guidance for * Claude / GPT tokenizers puts English-and-code prose at roughly * 4 characters per token; this rounds up. */ export declare function estimateTokens(text: string): number; export interface CostEstimateInputs { promptTokens: number; codebaseInventoryTokens: number; referenceContextTokens: number; } export interface CostEstimate { inputTokens: number; outputTokensLow: number; outputTokensHigh: number; costUsdLow: number; costUsdHigh: number; } /** * Build a pre-flight cost estimate from the assembled prompt-input * token counts. Returns a range — output cost depends on how many * ADRs the LLM ends up generating, which is a function of codebase * scale (the prompt's calibration section sets expectations). */ export declare function buildCostEstimate(inputs: CostEstimateInputs): CostEstimate; /** * Format the pre-flight estimate as a human-readable multi-line * string for stderr printing before the confirmation prompt. */ export declare function formatCostEstimateMessage(estimate: CostEstimate, inputs: CostEstimateInputs, referenceContextPath?: string): string; //# sourceMappingURL=cost-estimator.d.ts.map