/** * The `/budget` command: per-scope overview with aggregated tokens, cost, * carbon and latency, plus `unblock ` and `models` subcommands. * Output is model-readable and reconstructable from the session log (the * `command/run` + `command/done` events record the invocation; the * `budget/alert`/`budget/block` events record every threshold transition). * * @module dsh-budget/command */ import type { CommandDefinition } from '@deepseek-ai/dsh-commands'; import { sanitizeText } from './estimate/sanitize.js'; import type { BudgetService } from './service.js'; import type { BudgetStatus, BudgetScope } from './wire.js'; /** Command output language. */ export type BudgetCommandLanguage = 'en' | 'zh'; /** Message bundle per language. */ interface Messages { hint: string; unlimited: string; blocked: string; usage: string; unknownScope: (scope: string) => string; unblocked: (scope: string) => string; noModels: string; unpriced: string; } /** Render the overview body for one snapshot. */ export declare function renderBudgetOverview(status: BudgetStatus, messages: Messages): string; /** Parse the raw input after `/budget`. */ export declare function parseBudgetArgs(rawInput: string): { kind: 'overview'; } | { kind: 'unblock'; scope: BudgetScope; } | { kind: 'models'; } | { kind: 'usage'; }; /** Render the per-model breakdown body. */ export declare function renderBudgetModels(status: BudgetStatus, _messages: Messages): string; /** * Build the `/budget` command definition. * * @param service - the budget service (snapshot + unblock). * @param language - output language. * @returns the command definition. */ export declare function budgetCommand(service: BudgetService, language?: BudgetCommandLanguage): CommandDefinition; /** Sanitize helper re-export for display callers. */ export { sanitizeText }; //# sourceMappingURL=command.d.ts.map