bc-symbols-mcp
Version:
MCP server for analyzing Business Central .app files and BC object structures
87 lines • 2.51 kB
TypeScript
import { EventEmitter } from 'events';
import { BCApp } from '../types/bc-types.js';
import { OptimizedAppExtractor } from './app-extractor-optimized.js';
interface LoadingProgress {
phase: 'metadata' | 'manifest' | 'symbols' | 'objects' | 'complete';
percentage: number;
message: string;
objectsLoaded: number;
totalObjects: number;
currentObjectType?: string;
estimatedTimeRemaining?: number;
}
interface ProgressiveLoadingOptions {
batchSize: number;
delayBetweenBatches: number;
priorityObjectTypes: string[];
backgroundLoadingEnabled: boolean;
progressCallback?: (progress: LoadingProgress) => void;
}
export declare class ProgressiveAppLoader extends EventEmitter {
private extractor;
private loadingTasks;
private loadingProgress;
constructor(extractor?: OptimizedAppExtractor);
/**
* Load app with progressive loading and progress reporting
*/
loadAppProgressive(filePath: string, options?: Partial<ProgressiveLoadingOptions>): Promise<BCApp>;
/**
* Start background loading of objects
*/
private startBackgroundLoading;
/**
* Load objects in the background with progress updates
*/
private loadObjectsInBackground;
/**
* Load objects in batches with delays
*/
private loadObjectBatches;
/**
* Load all objects synchronously (for non-background mode)
*/
private loadAllObjectsSync;
/**
* Get all object metadata for progressive loading
*/
private getAllObjectMetadata;
/**
* Update loading progress
*/
private updateProgress;
/**
* Get current loading progress
*/
getLoadingProgress(loadingId: string): LoadingProgress | null;
/**
* Get all active loading tasks
*/
getActiveLoadingTasks(): string[];
/**
* Cancel background loading task
*/
cancelBackgroundLoading(taskId: string): boolean;
/**
* Wait for specific loading task to complete
*/
waitForLoadingTask(taskId: string): Promise<any>;
/**
* Preload specific object types
*/
preloadObjectTypes(filePath: string, objectTypes: string[], progressCallback?: (progress: LoadingProgress) => void): Promise<void>;
/**
* Utility delay function
*/
private delay;
/**
* Get cache statistics
*/
getCacheStats(): any;
/**
* Cleanup resources
*/
cleanup(): void;
}
export {};
//# sourceMappingURL=progressive-loader.d.ts.map