UNPKG

knowledgegraph-mcp

Version:

MCP server for enabling persistent knowledge storage for Claude through a knowledge graph with multiple storage backends

58 lines 1.77 kB
/** * File attachment manager for the knowledge graph system */ import { FileAttachment } from '../core.js'; import { FileUpload, FileMetadata, ValidationResult, FileStorageConfig } from '../types/file-attachments.js'; /** * File validator for security and type checking */ export declare class FileValidator { private allowedMimeTypes; private maxFileSize; constructor(config?: FileStorageConfig); /** * Validate a file buffer and metadata */ validateFile(file: Buffer, originalFilename: string, providedMimeType?: string): Promise<ValidationResult>; /** * Simple MIME type detection based on file extension and content */ private detectMimeType; /** * Perform basic security checks on the file */ private performSecurityChecks; } /** * File attachment manager */ export declare class FileAttachmentManager { private validator; private config; constructor(config?: FileStorageConfig); /** * Process and validate a file upload */ processFileUpload(file: FileUpload, entityName: string, project: string): Promise<{ fileAttachment: FileAttachment; fileBuffer: Buffer; } | { error: string; }>; /** * Validate file count limits for an entity */ validateFileCount(currentAttachments: FileAttachment[]): { isValid: boolean; error?: string; }; /** * Calculate total storage used by an entity */ calculateEntityStorageUsage(attachments: FileAttachment[]): number; /** * Generate file metadata for storage */ createFileMetadata(entityName: string, project: string, originalFilename: string, mimeType: string): FileMetadata; } //# sourceMappingURL=file-manager.d.ts.map