Expand description
Path computation and resolution for dependency installation.
This module provides utilities for computing installation paths, resolving pattern paths, determining flatten behavior, and handling all path-related operations for resource dependencies. It supports both merge-target resources (Hooks, MCP servers) and regular file-based resources (Agents, Commands, Snippets, Scripts).
Functions§
- compute_
merge_ target_ install_ path - Computes the installation path for a merge-target resource (Hook or McpServer).
- compute_
regular_ resource_ install_ path - Computes the installation path for a regular resource (Agent, Command, Snippet, Script).
- construct_
full_ relative_ path - Constructs the full relative path for a matched pattern file.
- extract_
meaningful_ path - Extracts the meaningful path by removing redundant directory prefixes.
- extract_
pattern_ filename - Extracts the meaningful path for pattern matching.
- get_
flatten_ behavior - Determines the flatten behavior for a resource installation.
- is_
file_ relative_ path - Checks if a path is a file-relative path (starts with “./” or “../”).
- normalize_
bare_ filename - Normalizes a bare filename by removing directory components.
- parse_
pattern_ base_ path - Parses a pattern string to extract the base path and pattern components.
- resolve_
install_ path - Resolves the installation path for any resource type.
- resolve_
merge_ target_ path - Resolves the installation path for merge-target resources (Hook, McpServer).
- resolve_
regular_ resource_ path - Resolves the installation path for regular file-based resources.
- transform_
path_ for_ private - Transforms an installation path for private dependencies.