import type { OutcomeVocabulary } from './outcome.js'; import type { LadderPolicy } from './ladder.js'; import type { OwnersConfig } from './owners.js'; import type { PricingCatalogue } from './pricing.js'; import type { Locale } from './i18n/index.js'; import type { RuleId, RuleLevel, UsageProfile } from './types.js'; /** * The shape and validation of `trazum.config.json`. No filesystem access — the * loader that reads the file lives in `config.ts`, which is only reachable via * `@trazum/core/node`. Keeping the schema pure is what lets the browser bundle * import the types and key lists without dragging `node:fs` into its graph. * * The problem this solves is small and real: every command in a repository's CI * repeats the same four flags, and the one place they get out of step is the * place the numbers stop meaning anything. * * **Every validation failure here throws.** That is the whole design. A config * file is trusted to carry a budget, and the failure mode of a lenient parser * is a typo'd key silently ignored, defaults quietly restored, and a green * build for a prompt nobody measured. An unreadable config is a loud error; a * config that half-applies is a lie. */ export declare const CONFIG_FILENAME = "trazum.config.json"; /** * Largest config file this will read. * * A config is a couple of dozen lines. This exists so a hostile or accidental * multi-megabyte file is refused before `JSON.parse` is handed the whole thing. */ export declare const MAX_CONFIG_BYTES: number; /** How far up the tree the search for a config file will walk. */ export declare const MAX_CONFIG_SEARCH_DEPTH = 32; export interface BaselineConfig { /** Path to the baseline file, relative to the config. */ path: string; /** * Thresholds. At least one is required — see `parseBaselineConfig` for why a * baseline with no threshold is a configuration error rather than a default. */ maxGrowthTokens?: number; maxGrowthPct?: number; } /** * Money budgets, in dollars, for the log-reading side of the tool. * * A budget for a workload that made no calls is **not** a pass and not a * failure: it is a measurement that did not happen, and the report says so * rather than reporting green over an absence. That is the same three-state * rule the counts, the timestamps and the stop reasons all follow. */ export interface WaiveEntry { /** One of `WAIVABLE_GATES`, or `byLabel: