export interface ArcsConfig { version: "1"; ides: string[]; opencodeModelVariants?: ModelVariants; } export declare function defaultConfig(): ArcsConfig; /** * Returns true if ~/.arcs/config.json exists. */ export declare function configExists(): boolean; /** * Reads config from disk. Returns default config if file missing. */ export declare function readConfig(): ArcsConfig; /** * Reads config for setup flows. Invalid persisted config is discarded so init/config can * recover by writing a fresh valid config after the user completes setup. */ export declare function readConfigOrDefault(): ArcsConfig; /** * Writes config to disk. Ensures data dir exists first. */ export declare function writeConfig(config: ArcsConfig): void; export type ModelTierConfig = { heavy: string; standard: string; light: string; /** OpenCode model-scoped variants applied to every agent in the tier. */ variants?: ModelVariants; perAgent?: Record; }; export declare const PI_THINKING_LEVELS: readonly ["off", "minimal", "low", "medium", "high", "xhigh", "max"]; export type PiThinkingLevel = (typeof PI_THINKING_LEVELS)[number]; export type PiThinkingConfig = Record; type AgentTierName = "heavy" | "standard" | "light"; export type ModelVariants = { heavy: string; standard: string; light: string; }; /** Default OpenCode variant: no additional thinking. */ export declare const DEFAULT_MODEL_VARIANT = "none"; /** * Reads ~/.config/opencode/opencode.json. Returns parsed JSON or null on failure. */ export declare function readOpenCodeConfig(): Promise; /** * Diagnoses the opencode config file state, distinguishing a genuinely absent * config (where manual model entry is the right fallback) from one that exists * on disk but fails to parse (corruption — which must be surfaced, not silently * treated as "no config"). The plain {@link readOpenCodeConfig} collapses both * cases to `null`, which previously let a corrupt config masquerade as missing. */ export declare function diagnoseOpenCodeConfig(): Promise<{ status: "missing"; path: string; } | { status: "ok"; path: string; config: unknown; } | { status: "corrupt"; path: string; error: string; }>; /** * Diagnoses the installed Claude Code bundle manifest (~/.claude/.arcs-bundle.json), * written by scripts/deploy-claudecode-bundle.mjs on every deploy, and reads back the * `tierModels` it persisted so a later `arcs init` can reuse the previous selection * instead of re-prompting. * * Mirrors {@link diagnoseOpenCodeConfig}'s three-state shape, with two deliberate * distinctions: * - A parseable file that is not an ARCS Claude Code bundle manifest (wrong `bundleId` * or no installed agents) is "missing", not "corrupt" — it is a foreign/unrelated * file, not damage. * - A valid manifest whose heavy/standard/light `tierModels` are absent or incomplete is * "ok" WITHOUT `tierModels` (e.g. a bundle deployed before this field existed). Only * the three Claude Code model tiers are persisted. */ export declare function diagnoseClaudeCodeBundle(): Promise<{ status: "missing"; path: string; } | { status: "ok"; path: string; tierModels?: ModelTierConfig; } | { status: "corrupt"; path: string; error: string; }>; /** * Diagnosis for the pi deploy bundle manifest (~/.pi/.arcs-bundle.json), * mirroring {@link diagnoseClaudeCodeBundle} for the pi host. Reads the * `tierModels` the pi deploy script persisted so a later `arcs init` can * reuse the previous selection instead of re-prompting. */ export declare function diagnosePiBundle(): Promise<{ status: "missing"; path: string; } | { status: "ok"; path: string; tierModels?: ModelTierConfig; tierThinking?: PiThinkingConfig; } | { status: "corrupt"; path: string; error: string; }>; /** * Extracts model tier pre-fills from parsed opencode config. */ export declare function extractModelPreFills(config: unknown): ModelTierConfig; export interface ProviderModels { provider: string; models: string[]; } /** * Reads the model table printed by pi and returns selectable provider/model IDs. * The command is best-effort: pi may be installed without any configured * providers, or its output may change between versions. */ export declare function getPiAvailableModels(): ProviderModels[]; /** * Reads ~/.claude/settings.json and returns the currently configured model * (or empty string if unset / file missing). */ export declare function readClaudeCodeCurrentModel(): Promise; /** * Reads ~/.claude/settings.json and returns the registry id of the primary * agent the last deploy made the default (or empty string if unset / file * missing). scripts/deploy-claudecode-bundle.mjs writes this key on every * deploy, so a re-run of the wizard can pre-select what is actually installed * instead of silently resetting the default back to the built-in fallback. */ export declare function readClaudeCodeCurrentPrimaryAgent(): Promise; /** * Returns the curated Claude Code model list. * * The list is a single alias group, so there is nothing to order by the * currently configured model — the "current" model only drives the per-tier * pre-fill at the prompt, not the shape of this list. */ export declare function getClaudeCodeModels(): ProviderModels[]; /** * Reads ~/.local/share/opencode/auth.json to get authenticated provider names, * then runs `opencode models ` for each to get available models. * Returns array sorted with providers matching currentModel first. */ export declare function getAvailableModels(currentModel: string): Promise; export {}; //# sourceMappingURL=config.d.ts.map