import type { AgentConfig } from "@opencode-ai/sdk"; import type { AgentSource } from "./types"; import type { CategoriesConfig } from "../config/schema"; export type ResolveSkillsFn = (skillNames: string[], disabledSkills?: Set) => string; export type BuildAgentOptions = { categories?: CategoriesConfig; disabledSkills?: Set; resolveSkills?: ResolveSkillsFn; disabledAgents?: Set; }; /** * Map from agent config key (lowercase) to display name variants that * might appear in prompt text. Used by stripDisabledAgentReferences to * remove lines that mention disabled agents. * * Exported for test cleanup — tests that call addBuiltinNameVariant * must restore original arrays in afterEach to avoid state pollution. */ export declare const AGENT_NAME_VARIANTS: Record; /** * Reset the mutable name variants map to its initial state. * Used by tests to prevent cross-test state pollution. */ export declare function resetNameVariants(): void; /** * Register name variants for a custom agent so that * `stripDisabledAgentReferences` can strip its references from prompts. * Does not override existing (builtin) entries. */ export declare function registerAgentNameVariants(name: string, variants?: string[]): void; /** * Add additional name variants for a builtin agent. * Used when a user sets a custom display_name — the custom name * must be included in variants so stripDisabledAgentReferences * can match it when the agent is disabled. * No-op if the config key has no existing variant entry or the variant is already present. */ export declare function addBuiltinNameVariant(configKey: string, variant: string): void; /** * Remove lines from a prompt that reference disabled agents. * Only strips lines where an agent name appears as a standalone concept * (e.g. "Use thread (codebase explorer)"), not incidental word matches. * Uses word-boundary matching to avoid false positives. */ export declare function stripDisabledAgentReferences(prompt: string, disabled: Set): string; export declare function buildAgent(source: AgentSource, model: string, options?: BuildAgentOptions): AgentConfig;