/** * Configuration loading and always-include file management. * * Handles global and per-thread configuration, including reading * files that should always be included in the context window. */ import type { IsolatedVisitor } from './restricted-codex.js'; /** Override the cumulus root directory (used by tests to isolate from production). */ export declare function setConfigCumulusDir(dir: string): void; /** Resolve the config file path for a thread */ export declare function resolveConfigPath(threadName: string): string; /** Same effective profile-presence check as runtime dispatch, for synchronous lists. */ export declare function hasIsolatedVisitorConfig(threadName: string): boolean; /** * Resolve the master whose content store `threadName` shares, or undefined if * it has none (task 143). * * Walks the same trailing-`-segment` prefix chain as `resolveConfigPathForRead`, * but reads each candidate's EXACT config and requires the thread to be listed * in its `coThreads`. The prefix chain only narrows which configs to consult — * membership is what decides, so a name that merely looks like a co-thread * (every `pursuit-` visitor) resolves to undefined. * * A master is never its own co-thread: it already owns the store. */ export declare function resolveCoThreadMaster(threadName: string): string | undefined; /** * Does this thread's OWN config list any co-threads (task 185)? * * The other half of "is this store shared": `resolveCoThreadMaster` answers it * for a co-thread, this answers it for the master. Reads the EXACT config, not * the inherited one — through the fallback a co-thread would read its master's * list and claim to be a master itself. */ export declare function hasCoThreads(threadName: string): boolean; /** Override the threads directory (used by tests to isolate from production). */ export declare function setConfigThreadsDir(dir: string): void; export interface CumulusConfig { /** Explicit host-bound visitor profile; bypasses inherited context (ADR 0022). */ isolatedVisitor?: IsolatedVisitor; /** File paths to always include in context */ alwaysInclude?: string[]; /** * Per-thread opt-out from the merged always-include list (task 163). * * Subtractive only — entries here REMOVE a path from the effective prompt, * they cannot widen what arrives. If an entry isn't currently in the merged * result, excluding it is a no-op; if a future operator re-adds the path to * the global config, the exclude survives and takes effect again. * * Stored on the thread config only. Never inherited from global. */ alwaysIncludeExcludes?: string[]; /** Project directory for this thread (used by callers like Janus to set cwd) */ projectDir?: string; /** Scaffold template to use on lazy creation of the project folder */ template?: string; /** LLM model for this thread: "claude" (default, CLI subprocess) or a HuggingFace model ID */ model?: string; /** * How hard the model should think before answering: "low" | "medium" | "high" | "xhigh" | "max". * Claude CLI threads spend it on --effort; direct-provider threads fold it onto the * endpoint's 3-level scale via `resolveReasoningEffort` (task 155). */ effort?: 'low' | 'medium' | 'high' | 'xhigh' | 'max'; /** Claude CLI model id (only applied when model is "claude"), passed as --model. e.g. "claude-opus-5[1m]" | "claude-sonnet-5[1m]" */ claudeModel?: string; /** Exact tool names denied on both Claude CLI and direct-provider paths. */ disallowedTools?: string[]; /** * Allowlist (task 137): the ONLY tools this thread may use. Compiled into * `--disallowedTools` as (full inventory − this list), because the CLI's * `--allowedTools` is an auto-approve list and does not restrict. * * Absent = unrestricted (today's behaviour). Present = deny-by-default, so a tool * added by a future cumulus or Claude CLI release is denied without editing this list. * Entries match a bare name (`read_file`) or a full one * (`mcp__cumulus-history__read_file`). `disallowedTools` still applies on top. */ allowedTools?: string[]; /** Prompt capture (task 088): serialize each constructed prompt to the .prompts/ sidecar. Default ON; set false to disable */ promptCapture?: boolean; /** * Pin this thread's context limit in tokens (task 105), disabling the adaptive * TTFT feedback loop for this thread. Must be >= 10,000; anything else is ignored * and the thread stays adaptive. Packed RAG budget is 2/3 of this value. */ contextLimit?: number; /** * Co-threads (task 143): threads that share THIS thread's content store while * keeping their own conversation history. Written on the master only, by the * co-thread creation endpoint. * * Membership is EXPLICIT and never inferred from the name. Deriving it from * the `-