import type { PackageManager } from '../types.js'; export interface WorkspaceOwnership { root: string; kind: 'pnpm' | 'package-json' | 'standalone'; patterns: string[]; } export interface WorkspaceManagerConstraint { authoritative: boolean; ambiguous: boolean; manager?: PackageManager; reason?: string; } /** Resolve the nearest ancestor workspace that explicitly owns cwd. */ export declare function resolveWorkspaceOwnership(cwd: string): WorkspaceOwnership; export declare function findWorkspaceRoot(cwd: string): string; export declare function workspaceManagerConstraint(cwd: string): WorkspaceManagerConstraint; export declare function validateWorkspacePackageManager(cwd: string, selected: PackageManager): { valid: true; } | { valid: false; reason: string; expected?: PackageManager; }; export declare function ancestors(cwd: string): string[]; export declare function matchesWorkspacePatterns(root: string, directory: string, patterns: string[]): boolean; /** Enumerate only package directories reachable through declared positive workspace patterns. */ export declare function workspacePackageDirectories(ownership: WorkspaceOwnership): string[]; //# sourceMappingURL=workspace-root.d.ts.map