/** * Completion Engine * * The main entry point for shell completion. Coordinates providers * and manages caching. */ import { CompletionInput, CompletionOptions, CompletionResult, ParamInfo } from "./types.d.ts"; import { SpecDataSource, ApiDataSource, ParamDataSource, ListDataSource } from "./providers.d.ts"; /** * Data source interface for the completion engine * Abstracts access to spec data */ export interface CompletionDataSource extends SpecDataSource, ApiDataSource, ParamDataSource, ListDataSource { } /** * Completion Engine * * Coordinates providers and manages completion requests. */ export declare class CompletionEngine { private options; private cache; private providers; private dataSource; constructor(options: CompletionOptions, dataSource: CompletionDataSource); /** * Wrap data source methods with caching */ private wrapDataSourceWithCache; /** * Initialize providers */ private initProviders; /** * Main entry: generate completion suggestions for input */ complete(input: CompletionInput): Promise; /** * Get available commands */ getCommands(): string[]; /** * Get available specs (with cache) */ getSpecs(): Promise; /** * Get tags for a spec (with cache) */ getTags(specName: string): Promise; /** * Get APIs for a spec/tag (with cache) */ getApis(specName: string, tagName?: string): Promise>; /** * Get parameters for an API (with cache) */ getParams(specName: string, tagName: string, apiName: string): Promise; /** * Invalidate cache */ invalidateCache(pattern?: string): void; } /** * Create a mock data source for testing */ export declare function createMockDataSource(data: { specs?: string[]; tags?: Record; apis?: Record>; params?: Record; }): CompletionDataSource;