import type { AgentConfig } from "@opencode-ai/sdk"; import type { WeaveConfig } from "../config/schema"; /** Input to the config pipeline */ export interface ConfigPipelineInput { pluginConfig: WeaveConfig; /** Available agents from createBuiltinAgents (or empty for testing) */ agents?: Record; /** Available tool names */ availableTools?: string[]; } /** Output from config pipeline */ export interface ConfigPipelineOutput { agents: Record; /** Default agent display name (set on config.default_agent) */ defaultAgent?: string; tools: string[]; mcps: Record; commands: Record; } /** * Runs the 6-phase config pipeline for the OpenCode config hook. * Phases 1, 4, 5, 6 are pass-through for v1. * Phase 2 merges agent overrides, filters disabled, and remaps keys to display names. * Phase 3 filters disabled tools. */ export declare class ConfigHandler { private readonly pluginConfig; constructor(options: { pluginConfig: WeaveConfig; }); /** Run the 6-phase pipeline and return accumulated config output */ handle(input: ConfigPipelineInput): Promise; /** Phase 1: Provider detection happens elsewhere — pass through */ private applyProviderConfig; /** * Phase 2: Merge agent overrides from pluginConfig.agents. * Exclude agents listed in pluginConfig.disabled_agents. * Remap keys from config keys (e.g., "loom") to display names (e.g., "Loom (Main Orchestrator)"). */ private applyAgentConfig; /** * Resolve the default agent display name. * Returns the display name of "loom" if present in resolved agents, otherwise first primary agent. */ private resolveDefaultAgent; /** Phase 3: Filter tools by disabled_tools */ private applyToolConfig; /** Phase 4: MCP loading is done elsewhere — return empty for v1 */ private applyMcpConfig; /** Phase 5: Return builtin commands with agent fields remapped to display names */ private applyCommandConfig; /** Phase 6: Skill injection happens in agent builder — no-op for v1 */ private applySkillConfig; }