/**
 * Agent registry for managing AI agent implementations
 * Singleton registry that maps agent names to implementations
 */
import type { Config } from "../../cli/config.js";
import type { Skillset } from "../../norijson/skillset.js";
/**
 * Canonical agent names used as UIDs in the registry.
 * Each AgentConfig.name must match one of these values.
 */
export type AgentName = "claude-code" | "cline" | "codex" | "cursor-agent" | "droid" | "gemini-cli" | "github-copilot" | "goose" | "kilo" | "kimi-cli" | "opencode" | "openclaw" | "pi";
/**
 * Unified loader interface for AgentConfig
 * Each loader handles installing a specific feature.
 * Receives agent config and optional skillset for path resolution.
 * Declares which files/dirs it manages for manifest tracking.
 */
export type AgentLoader = {
    name: string;
    description: string;
    managedFiles?: ReadonlyArray<string> | null;
    managedDirs?: ReadonlyArray<string> | null;
    run: (args: {
        agent: AgentConfig;
        config: Config;
        skillset?: Skillset | null;
    }) => Promise<string | void>;
    uninstall?: (args: {
        agent: AgentConfig;
        installDir: string;
    }) => Promise<void>;
};
/**
 * Represents a discovered configuration artifact for an agent.
 * Used by factory reset to show what will be deleted.
 */
export type AgentArtifact = {
    path: string;
    type: "directory" | "file";
};
/**
 * Represents detected existing (unmanaged) configuration for an agent.
 * Used during init to show the user what was found before capturing.
 */
export type ExistingConfig = {
    configFileName: string;
    hasConfigFile: boolean;
    hasManagedBlock: boolean;
    hasSkills: boolean;
    skillCount: number;
    hasAgents: boolean;
    agentCount: number;
    hasCommands: boolean;
    commandCount: number;
};
/**
 * Data-oriented agent configuration
 * Replaces the monolithic Agent type with a minimal config object.
 * All operations are shared functions in agentOperations.ts.
 */
export type AgentConfig = {
    name: AgentName;
    displayName: string;
    description: string;
    getAgentDir: (args: {
        installDir: string;
    }) => string;
    getSkillsDir: (args: {
        installDir: string;
    }) => string;
    getSubagentsDir: (args: {
        installDir: string;
    }) => string;
    getSlashcommandsDir: (args: {
        installDir: string;
    }) => string;
    getInstructionsFilePath: (args: {
        installDir: string;
    }) => string;
    getLoaders: () => Array<AgentLoader>;
    getExternalSettingsFiles?: (() => ReadonlyArray<string>) | null;
    getTranscriptDirectory?: (() => string) | null;
    getArtifactPatterns?: (() => {
        dirs: ReadonlyArray<string>;
        files: ReadonlyArray<string>;
    }) | null;
};
/**
 * Registry singleton for managing agent implementations
 */
export declare class AgentRegistry {
    private static instance;
    private agents;
    private constructor();
    /**
     * Get the singleton instance
     * @returns The AgentRegistry singleton instance
     */
    static getInstance(): AgentRegistry;
    /**
     * Reset the singleton instance (for testing)
     */
    static resetInstance(): void;
    /**
     * Get an agent by name
     * @param args - Configuration arguments
     * @param args.name - The agent name to look up (validated at runtime)
     *
     * @throws Error if agent not found
     *
     * @returns The agent implementation
     */
    get(args: {
        name: string;
    }): AgentConfig;
    /**
     * Get all registered agents
     * @returns Array of all agent implementations
     */
    getAll(): Array<AgentConfig>;
    /**
     * List all registered agent names
     * @returns Array of valid agent names
     */
    list(): Array<AgentName>;
    /**
     * Get the default agent name (first registered agent)
     * Used as a fallback when no agent is explicitly specified.
     * @returns The default agent name
     */
    getDefaultAgentName(): AgentName;
    /**
     * Get the basenames of all agent config directories.
     * Used by normalizeInstallDir to strip known agent dir suffixes from paths.
     * @returns Array of agent directory basenames (e.g., [".claude"])
     */
    getAgentDirNames(): Array<string>;
}
//# sourceMappingURL=agentRegistry.d.ts.map