import type { InputSource, SourceCredentials, SourceOptions, SourceResult } from './types.js'; /** * Abstract base class for input sources * Provides common functionality for all source implementations */ export declare abstract class BaseSource implements InputSource { abstract name: string; abstract description: string; abstract type: 'builtin' | 'integration'; /** * Check if this source is available * Override in subclasses for custom availability checks */ isAvailable(): Promise; /** * Whether this source requires authentication * Override in subclasses that need auth */ requiresAuth(): boolean; /** * Fetch content from this source * Must be implemented by subclasses */ abstract fetch(identifier: string, options?: SourceOptions): Promise; /** * Get help text for using this source * Override in subclasses for custom help */ getHelp(): string; /** * Get credentials for this source from config */ protected getCredentials(): Promise; /** * Validate that credentials work * Override in subclasses that need auth */ validateCredentials(): Promise; /** * Convert content to markdown if needed * Helper for sources that fetch non-markdown content */ protected toMarkdown(content: string, format?: 'text' | 'html' | 'json'): string; /** * Create a standardized error message */ protected error(message: string): never; } /** * Base class for builtin sources (file, url, pdf) */ export declare abstract class BuiltinSource extends BaseSource { type: 'builtin'; requiresAuth(): boolean; } /** * Base class for integration sources (linear, notion, github, figma) */ export declare abstract class IntegrationSource extends BaseSource { type: 'integration'; requiresAuth(): boolean; /** * Get the required credential key name * Override in subclasses */ protected getRequiredCredentialKey(): string; /** * Get the API key for this integration */ protected getApiKey(): Promise; } //# sourceMappingURL=base.d.ts.map