import type { Prompts } from "acp-kernel"; import type { AdapterConfig, CompressConfig, DelegateConfig } from "./config.js"; /** User-facing config keys (subset of AdapterConfig). Loaded from * ~/./acp-omp.json (global) and /./acp-omp.json * (project-local overrides project-global). Project wins over global. */ export interface UserAcpConfig { debug?: boolean; autoUpdate?: boolean; modelContextLimit?: number; toolBashDefaultTimeout?: number; toolOutputMaxBytes?: number; delegate?: boolean | DelegateConfig; compress?: CompressConfig; displayUsage?: "merged" | "separate"; prompts?: Partial; /** Acknowledge the risks of user-supplied compression prompts (system-prompt * injection surface). Only honored from the GLOBAL config — a project-local * acp-omp.json under agent control cannot pre-acknowledge its own risk gate. */ acknowledgePromptsRisk?: boolean; /** Model for /compact summaries, as "provider:modelId" (e.g. * "zhipuai:glm-5.2"). Shortcut for compress.compressModel — normalized * into the nested path at load time. */ compressModel?: string; } /** Read global + project acp-omp.json, project overrides global. Returns {} on any * error (missing file, bad JSON) — never throws. * * `prompts` / `acknowledgePromptsRisk` are accepted from the GLOBAL config * only (issue #32): a repo under agent control can ship a project-local * .omp/acp-omp.json, and letting it inject arbitrary system-prompt text * every turn is a prompt-injection surface. Project-local files may tune * everything else (thresholds, models, timeouts) but not the prompts. */ export declare function loadUserConfig(cwd: string): Promise; /** Merge user config onto an adapter config: user config wins for the keys it * sets. Used at session_start to apply runtime-discovered config. */ export declare function applyUserConfig(adapter: AdapterConfig, user: UserAcpConfig): AdapterConfig;