UNPKG

@utaba/ucm-mcp-server

Version:

Universal Context Manager MCP Server - AI-native artifact management

61 lines 2.17 kB
/** * Utility functions for parsing UCM paths into component parts */ export interface ParsedPath { author?: string | undefined; repository?: string | undefined; category?: string | undefined; subcategory?: string | undefined; filename?: string; version?: string; } /** * Parse a UCM path into its component parts * Supports formats like: * - "utaba/main/commands/user" (namespace only) * - "utaba/main/commands/user/CreateUserCommand.ts" (with filename) * - "utaba/main/commands/user/CreateUserCommand.ts@1.0.0" (with version) */ export declare function parsePath(path: string): ParsedPath; /** * Build a namespace path from components (author/repository/category/subcategory) */ export declare function buildNamespacePath(author: string, repository: string, category: string, subcategory: string): string; /** * Build a full path with filename and optional version */ export declare function buildFullPath(author: string, repository: string, category: string, subcategory: string, filename?: string, version?: string): string; /** * Extract namespace from a full path */ export declare function extractNamespace(path: string): string; /** * Validate if a path follows UCM naming conventions */ export declare function validatePath(path: string): { isValid: boolean; errors: string[]; }; /** * Compare two semantic versions * Returns: -1 if version1 < version2, 0 if equal, 1 if version1 > version2 */ export declare function compareVersions(version1: string, version2: string): number; /** * Check if a version is greater than another version */ export declare function isVersionGreater(version1: string, version2: string): boolean; /** * Check if a version is less than another version */ export declare function isVersionLess(version1: string, version2: string): boolean; /** * Check if two versions are equal */ export declare function isVersionEqual(version1: string, version2: string): boolean; /** * Increment the patch version of a semantic version * Examples: 1.0.0 -> 1.0.1, 2.1.5 -> 2.1.6 */ export declare function incrementPatchVersion(version: string): string; //# sourceMappingURL=PathUtils.d.ts.map