/** * Mutate `agents.list` / bindings when adding or removing agents. */ import type { Config } from '../config/schema.js'; import { listAgentEntries } from '../agent/agent-scope.js'; type AgentEntry = NonNullable['list']>[number]; export { listAgentEntries }; export declare function findAgentEntryIndex(list: AgentEntry[], agentId: string): number; export declare function applyAgentConfig(cfg: Config, params: { agentId: string; /** Used only when creating a previously absent agent entry. */ identity?: AgentEntry['identity']; workspace?: string; model?: string; models?: AgentEntry['models']; extends?: AgentEntry['extends']; skills?: string[]; tools?: AgentEntry['tools']; }): Config; export declare function getAgentDeleteBlocker(cfg: Config, agentId: string): string | null; export declare function setTuiDefaultAgentConfig(cfg: Config, agentIdRaw: string): { ok: true; config: Config; agentId: string; } | { ok: false; message: string; }; export declare function pruneAgentConfig(cfg: Config, agentId: string): { config: Config; removedBindings: number; }; export declare function removeAgentDirsFromDisk(cfg: Config, id: string): Promise;