UNPKG

@toolprint/hypertool-mcp

Version:

HyperTool MCP proxy server for routing requests between clients and multiple underlying MCP servers

65 lines • 1.99 kB
/** * Persona Archive Handler * * This module handles the creation and extraction of .htp archive files. * Archives use tar.gz format internally and contain the complete persona structure * including configuration, assets, and metadata. * * @fileoverview Persona archive pack/unpack functionality */ /** * Archive operation options */ export interface ArchiveOptions { /** Whether to overwrite existing files */ force?: boolean; /** Compression level (0-9) */ compressionLevel?: number; /** Whether to preserve permissions */ preservePermissions?: boolean; } /** * Archive metadata embedded in the tar header */ export interface ArchiveMetadata { /** Archive format version */ version: string; /** When archive was created */ createdAt: string; /** Persona name from config */ personaName: string; /** Optional description */ description?: string; } /** * Result of archive operations */ export interface ArchiveResult { /** Operation success status */ success: boolean; /** Path to created archive or extracted directory */ path: string; /** Any warnings encountered */ warnings?: string[]; /** Errors encountered */ errors?: string[]; /** Archive metadata if available */ metadata?: ArchiveMetadata; } /** * Check if a file path has the correct .htp extension */ export declare function isHtpArchive(filePath: string): boolean; /** * Create a .htp archive from a persona directory */ export declare function packPersona(sourcePath: string, archivePath: string, options?: ArchiveOptions): Promise<ArchiveResult>; /** * Extract a .htp archive to a directory */ export declare function unpackPersona(archivePath: string, extractPath: string, options?: ArchiveOptions): Promise<ArchiveResult>; /** * List contents of a .htp archive without extracting */ export declare function listArchiveContents(archivePath: string): Promise<string[]>; //# sourceMappingURL=archive.d.ts.map