import { type ConciergeConfig } from "./concierge.js"; import { type AgentProfile } from "./profiles.js"; export interface RoostConfig { leftArrowOpensAgents: boolean; defaultToAgentsView: boolean; reapIdleMinutes: number; /** M15: records of sessions ended this many days ago are removed (0: never). */ cleanupDays: number; summaryModel?: string; dispatchModel?: string; dispatchThinking?: string; /** M18: the agent a dispatch runs as when the task names none (Claude Code's --agent). */ dispatchAgent?: string; envAllowList: string[]; /** M20: workers start with the launching shell's environment (false: envAllowList only). */ inheritEnv: boolean; /** M20: names (or `PREFIX*`) never carried. */ envDenyList: string[]; /** M20: the workspace's environment on top: its shell's cd hooks (direnv, mise, fnm), direnv only, or off. */ workspaceEnv: "shell" | "direnv" | "off"; groupBy: "state" | "directory"; /** The agent view covers the whole terminal (false: below the conversation, like the editor). */ fullscreen: boolean; /** M8: each row shows its model and context window use. */ rowDetails: boolean; /** NT-1: how the agent view makes the terminal notify. */ notify: "auto" | "osc9" | "osc777" | "bell" | "off"; /** M12: this session's subagents in a panel below the prompt (↓ selects, Enter opens). */ subagentPanel: boolean; subagentPanelRows: number; /** M13: stop a subagent's worker once it finished and reported (a message starts it again). */ subagentAutoClose: boolean; /** * M38: what the background service restarts by itself: "interrupted" (a run cut short by * a crash, its host going away, or the machine or the service going down), "crash" (a * worker crashing mid-run only), "off". Bounded: a few times in a row, with a pause. */ autoResume: "interrupted" | "crash" | "off"; /** M13: as in Claude Code, subagents a session spawns are not rows of the agent view (inline: they are). */ agentViewSubagents: "hide" | "inline"; /** M10: new sessions in their own git worktree: none, roost_spawn children, or every pi dispatch. */ worktreeIsolation: "off" | "children" | "all"; /** M9: the roost_agents / roost_send / roost_spawn tools in every session. */ agentTools: boolean; /** M9: messages to sessions outside the sender's spawn tree (user config only). */ agentExternalMessages: boolean; /** M9 spawn limits (user config only). */ agentMaxDepth: number; agentMaxChildren: number; agentMaxTree: number; agentMaxTotal: number; /** M27: saved choices for new sessions, by name (the user's and a project's, merged). */ presets?: Record; /** M30: terminal agents roost can run besides pi, by name (user config only). */ agentProfiles?: Record; /** M44: the hub's resident agent (user config only); absent: the defaults, once turned on in the hub. */ concierge?: ConciergeConfig; } /** M27: what a preset sets for new sessions; everything is optional. */ export interface Preset { model?: string; thinking?: string; worktree?: boolean; /** An agent preset (pi-subagents definition) by name. */ agent?: string; /** Relative to the hub's directory, as `@dir` takes it. */ dir?: string; /** Two to six models: the next task runs once per model (M26). */ fanout?: string[]; /** M30: an agent profile by name (or "pi"); the profile itself is the user's. */ profile?: string; } export declare const PRESET_NAME: RegExp; export declare function presetName(name: string): boolean; /** M27: a preset from JSON, or undefined when it is not one. */ export declare function presetFrom(v: unknown): Preset | undefined; export declare const DEFAULTS: RoostConfig; /** * The user's settings file: ROOST_CONFIG_DIR (or PI_ROOST_CONFIG_DIR), else * ~/.config/roost/roost.json when it exists (M29: a home not named after one agent), * else ~/.pi/agent/roost.json, where it has always been. Nothing is moved. */ export declare function userConfigPath(): string; /** M29: a project's settings: .roost/roost.json, else .pi/roost.json. */ export declare function projectConfigPath(cwd: string): string; export declare function loadConfig(cwd: string): RoostConfig; /** Change user settings (AV-K6 persists the grouping); other keys are kept as written. */ export declare function saveUserConfig(patch: Partial): void; /** M27: save a preset to the user's file (null removes it); other presets and keys stay. */ export declare function saveUserPreset(name: string, preset: Preset | null): void; /** Settings that belong to the user, not a project (the daemon has no project). */ export declare function loadUserConfig(): RoostConfig; /** M20: the environment settings, as buildLaunch takes them. */ export declare function envPolicy(config: Pick): { extraEnv: string[]; inheritEnv: boolean; envDenyList: string[]; workspaceEnv: "shell" | "direnv" | "off"; };