/** * Definition resolver with three-tier resolution and full semver support */ import type { ResolvedAgent, ResolvedTool, RegistryConfig } from './types'; export declare class DefinitionResolver { private loader; private cache; private inheritanceResolver; private config; constructor(config?: Partial); /** * Resolve agent with three-tier lookup and version constraints */ agentResolve(name: string): Promise; /** * Resolve tool with three-tier lookup and version constraints */ toolResolve(name: string): Promise; /** * Check local directory for agent definition */ private checkLocalAgent; /** * Check local directory for tool definition */ private checkLocalTool; /** * Check global registry for agent definition with version constraint * * Supports both formats in directory-per-definition structure: * - agents/{agent-name}@{version}/agent.md (preferred) * - agents/{agent-name}@{version}/agent.yaml (legacy) */ private checkGlobalAgent; /** * Check global registry for tool definition with version constraint * * Supports both formats in directory-per-definition structure: * - tools/{tool-name}@{version}/tool.md (preferred) * - tools/{tool-name}@{version}/tool.yaml (legacy) */ private checkGlobalTool; /** * Find the best matching version using full npm semver range syntax. * * Supports: ^, ~, >=, <=, >, <, =, ||, -, x, X, * * * Examples: * - "^1.0.0" -> >=1.0.0 <2.0.0 * - "~1.2.3" -> >=1.2.3 <1.3.0 * - ">=1.0.0" -> Any version >= 1.0.0 * - "1.x" -> Any 1.x.x version * - ">=1.0.0 <2.0.0 || >=3.0.0" -> Complex range */ private findBestVersion; /** * Check if version satisfies constraint */ private satisfiesConstraint; /** * Parse name with version constraint. * * Supports: * - "agent-name" -> name: agent-name, versionRange: latest * - "agent-name@1.0.0" -> name: agent-name, versionRange: 1.0.0 * - "agent-name@^1.0.0" -> name: agent-name, versionRange: ^1.0.0 * - "agent-name@>=1.0.0" -> name: agent-name, versionRange: >=1.0.0 * - "agent-name@1.x" -> name: agent-name, versionRange: 1.x */ private parseName; /** * Get local path for definition * * Supports both formats: * - agents/{agent-name}/agent.md (preferred) * - agents/{agent-name}/agent.yaml (legacy) * - tools/{tool-name}/tool.md (preferred) * - tools/{tool-name}/tool.yaml (legacy) */ private getLocalPath; /** * Clear cache */ clearCache(): void; /** * Get cache statistics */ getCacheStats(): { agents: { count: number; keys: string[]; }; tools: { count: number; keys: string[]; }; ttl: number; }; } //# sourceMappingURL=resolver.d.ts.map