/**
 * Provider Registry — manages ExternalProvider registrations
 *
 * Provides a central registry for external sync providers (GitHub, Linear, etc.).
 * Supports registration, lookup by name, listing all providers, and querying
 * providers by adapter type.
 *
 * Usage:
 * ```typescript
 * import { createProviderRegistry } from '@stoneforge/quarry';
 *
 * const registry = createProviderRegistry();
 * registry.register(myProvider);
 * const github = registry.get('github');
 * const taskProviders = registry.getAdaptersOfType('task');
 * ```
 */
import type { ExternalProvider, ProviderConfig, SyncAdapterType, TaskSyncAdapter, DocumentSyncAdapter, MessageSyncAdapter } from '@stoneforge/core';
/**
 * Result from getAdaptersOfType — a provider and its adapter for the requested type
 */
export interface ProviderAdapterEntry {
    readonly provider: ExternalProvider;
    readonly adapter: TaskSyncAdapter | DocumentSyncAdapter | MessageSyncAdapter;
}
/**
 * Registry for external sync providers.
 *
 * Manages registration and lookup of ExternalProvider instances.
 * Providers are keyed by their `name` property (e.g., 'github', 'linear').
 */
export declare class ProviderRegistry {
    private readonly providers;
    /**
     * Register a provider.
     *
     * @param provider - The provider to register
     * @throws Error if a provider with the same name is already registered
     */
    register(provider: ExternalProvider): void;
    /**
     * Look up a provider by name.
     *
     * @param name - The provider name (e.g., 'github')
     * @returns The provider, or undefined if not found
     */
    get(name: string): ExternalProvider | undefined;
    /**
     * List all registered providers.
     *
     * @returns Array of all registered providers
     */
    list(): ExternalProvider[];
    /**
     * Find all providers that support a given adapter type, and return
     * the provider paired with its adapter for that type.
     *
     * @param type - The adapter type to filter by ('task', 'document', 'message')
     * @returns Array of { provider, adapter } for all matching providers
     */
    getAdaptersOfType(type: SyncAdapterType): ProviderAdapterEntry[];
    /**
     * Check if a provider is registered.
     *
     * @param name - The provider name
     * @returns true if the provider is registered
     */
    has(name: string): boolean;
    /**
     * Unregister a provider by name.
     *
     * @param name - The provider name to remove
     * @returns true if the provider was removed, false if not found
     */
    unregister(name: string): boolean;
    /**
     * Remove all registered providers.
     */
    clear(): void;
}
/**
 * Create a new ProviderRegistry instance.
 *
 * @returns A new, empty ProviderRegistry
 */
export declare function createProviderRegistry(): ProviderRegistry;
/**
 * Create a ProviderRegistry with default providers registered.
 *
 * Registers placeholder providers for GitHub, Linear, and Notion by default,
 * plus the Folder provider (which needs no authentication and is always ready).
 * The actual provider implementations replace placeholders when configured with API keys.
 *
 * @returns A ProviderRegistry with default providers
 */
export declare function createDefaultProviderRegistry(): ProviderRegistry;
/**
 * Create a ProviderRegistry with real configured providers.
 *
 * Starts with placeholder providers for all known providers (GitHub, Linear, Notion, Folder),
 * then replaces placeholders with real configured providers for any configs
 * that have a token set. This ensures providers without tokens remain as
 * placeholders (which throw descriptive errors), while configured providers
 * are ready for actual sync operations.
 *
 * Note: The Folder provider is always ready (no token needed), so it is
 * never replaced — it remains as-is from the default registry.
 *
 * @param providerConfigs - Array of provider configurations (from settings)
 * @returns A ProviderRegistry with configured providers replacing placeholders
 */
export declare function createConfiguredProviderRegistry(providerConfigs: readonly ProviderConfig[]): ProviderRegistry;
//# sourceMappingURL=provider-registry.d.ts.map