import type { UiServiceDeps, Result, ConfigSetArgs, ConfigSetReturn, BudgetValue } from '../types.js'; /** * Validate and atomically write budget.json into `configDir`. Pure over its dir argument * (hermetically testable against a temp dir). Re-validates through the same zod schema the router * uses, so a direct call (bypassing the router) cannot persist an illegal budget — it throws. * * READ-MODIFY-WRITE, not overwrite: budget.json carries the global limits AND a per-project * override map, and each write targets exactly one of them. A global write preserves every * override; a project write preserves the globals and the sibling overrides; an absent/null * `value` (project form only) deletes that one override. * * Project ids are NOT checked for existence here — this function stays hermetic over `configDir` * and has no project registry. The UI picks from a real project list, and the `!budget` command, * where typos are likely, validates against projectStore before calling into the domain. */ export declare function writeBudget(configDir: string, value?: BudgetValue | null, project?: string | null): Promise; /** * Re-point profiles.json `defaultProfile`, PRESERVING every other field. Pure over its dir * argument. The target MUST already exist in the file's `profiles` map — the write can only SELECT * an existing profile, never invent one (a non-existent default would break agent startup). A * missing / malformed profiles.json or an unknown profile throws with `code: 'invalid-args'` so the * handler maps it to BAD_REQUEST rather than an internal error. */ export declare function writeDefaultProfile(configDir: string, defaultProfile: string): Promise; export declare function handleConfigSet(_deps: UiServiceDeps, args: ConfigSetArgs): Promise>;