@boundless-oss/atlas
Version:
Atlas - MCP Server for comprehensive startup project management
112 lines • 2.92 kB
TypeScript
export interface StorageConfig {
mode: 'project-local' | 'user-home' | 'custom';
customPath?: string;
projectId?: string;
autoSync?: boolean;
syncInterval?: number;
}
export interface ProjectMarker {
projectId: string;
projectName: string;
createdAt: string;
atlasVersion: string;
projectRoot: string;
}
export interface StorageLocation {
base: string;
data: string;
config: string;
exports: string;
}
export declare class StorageManager {
private config;
private projectRoot;
private atlasRoot;
private static readonly MARKER_FILE;
constructor(config?: Partial<StorageConfig>);
/**
* Get the base storage path based on current configuration
*/
getStorageLocation(): Promise<StorageLocation>;
/**
* Get the user's project directory (where their code is)
*/
getProjectRoot(): string;
/**
* Get path for storing module data
*/
getModuleDataPath(moduleName: string, filename: string): Promise<string>;
/**
* Get path for user-facing files (docs, configs that user should see)
*/
getProjectFilePath(...pathSegments: string[]): string;
/**
* Ensure storage directories exist
*/
ensureStorageDirectories(): Promise<void>;
/**
* Save data to storage
*/
saveData(moduleName: string, filename: string, data: any): Promise<void>;
/**
* Load data from storage
*/
loadData(moduleName: string, filename: string): Promise<any>;
/**
* Export all data to a portable format
*/
exportAllData(): Promise<string>;
/**
* Import data from an export
*/
importData(exportPath: string): Promise<void>;
/**
* Sync specific data to project directory
*/
syncToProject(items: Array<{
module: string;
file: string;
destination: string;
}>): Promise<void>;
/**
* Initialize a project with a marker file
*/
initializeProject(projectName?: string): Promise<ProjectMarker>;
/**
* Load project marker from current or parent directories
*/
loadProjectMarker(): Promise<ProjectMarker | null>;
/**
* Find the project root by looking for marker file
*/
private findProjectRoot;
/**
* Get a unique project ID
*/
private getProjectId;
/**
* Generate a new project ID
*/
private generateProjectId;
/**
* Simple string hash function
*/
private hashString;
/**
* Copy directory recursively
*/
private copyDirectory;
/**
* Check if we're running inside the Atlas MCP repository
*/
isRunningInAtlasRepo(): boolean;
/**
* Ensure we're not saving user data in Atlas repo
*/
validateNotInAtlasRepo(): void;
/**
* Check if a file exists
*/
private fileExists;
}
//# sourceMappingURL=storage-manager.d.ts.map