tree-ast-grep-mcp
Version:
Simple, direct ast-grep wrapper for AI coding agents. Zero abstractions, maximum performance.
44 lines • 1.32 kB
TypeScript
export interface ResolvedPaths {
workspace: string;
targets: string[];
errors: string[];
}
/**
* Resolves user provided paths against the workspace and validates boundaries.
*/
export declare class PathResolver {
private workspaceRoot;
/**
* Persist the absolute workspace root used for subsequent checks.
*/
constructor(workspaceRoot: string);
/**
* Resolve and validate paths asynchronously while collecting detailed errors.
*/
resolvePaths(inputPaths?: string[]): Promise<ResolvedPaths>;
/**
* Synchronous path resolution for cases where file existence isn't critical
*/
/**
* Resolve paths synchronously for tooling that cannot await filesystem results.
*/
resolvePathsSync(inputPaths?: string[]): ResolvedPaths;
private isWithinWorkspace;
/**
* Get workspace-relative path for display purposes
*/
getRelativePath(absolutePath: string): string;
/**
* Enhanced path normalization with cross-platform support
*/
private normalizePath;
/**
* Provide helpful suggestions for missing paths
*/
private getSuggestionsForMissingPath;
/**
* Expose the normalized workspace root path.
*/
getWorkspaceRoot(): string;
}
//# sourceMappingURL=path-resolver.d.ts.map