/** * Org sections spec 6.9 and 13.2 (piece P4.1): the definition-level budget checks. Pure: reads the definition * and returns findings, each with a stable code, the path it is about and a remedy. Codes are never renamed * or reused, only added. Errors fail validate, warnings are reported. Inert like the rest of P4.1: P4.5 maps * these into the checklist, and only while `sectionsSurface(def).enabled`. */ import { type BudgetDef, type BudgetRole } from './section-budget.js'; export declare const BUDGET_FINDING_CODES: readonly ['ORG_BUDGET_MISSING', 'ORG_BUDGET_INVALID', 'SECTION_BUDGET_SHAPE', 'SECTION_BUDGET_MISSING', 'ROLE_CAP_MISSING', 'ROLE_CAP_INVALID', 'ROLE_CAP_CONFLICT', 'SECTION_CAPS_OVER_ALLOCATION', 'ALLOCATIONS_OVER_ORG_BUDGET', 'RESERVE_EMPTY', 'RESERVE_CAPS_OVER', 'UNPRICED_RUNNER', 'BUDGET_MODE_UNSUPPORTED', 'BUDGET_KEY_NOT_YET_SUPPORTED', 'ALLOCATION_UNASSIGNED', 'ROSTER_ROLE_UNKNOWN']; export type BudgetFindingCode = (typeof BUDGET_FINDING_CODES)[number]; export interface BudgetFinding { severity: 'error' | 'warning'; code: BudgetFindingCode; /** Where it was found: `sections.dev.budget.usd`, `roles.coder.budget_usd`, `run_config.budget_usd`. */ path: string; message: string; remedy: string; } export interface BudgetFindings { errors: BudgetFinding[]; warnings: BudgetFinding[]; } /** One line for a checklist: `path: message — remedy`. */ export declare const findingText: (f: BudgetFinding) => string; /** Runners whose reports carry no USD cost (spec 6.9, A27), so a USD cap can never close them. */ export declare const UNPRICED_RUNNERS: readonly string[]; /** Settings of the budget machinery that stays deferred (Appendix D); configured, they fail validate. */ export declare const DEFERRED_KEYS: readonly ['max_turn_usd', 'allow_unbounded_turn', 'slice_cap', 'slice_floor']; export interface BudgetFindingsOptions { /** The runner a role really runs on. Default: the role's own `runtime`, else the org's. Wiring (P4.5) * passes `effectiveRoleRuntime`, which also reads MONOMIND_RUNTIME and the provider kind. */ runtimeOf?: (role: BudgetRole) => string | undefined; } export declare function budgetFindings(def: BudgetDef, opts?: BudgetFindingsOptions): BudgetFindings; //# sourceMappingURL=section-budget-findings.d.ts.map