import { SubmoduleInfo, MonorepoPackageInfo } from '../types.js';

declare class WorkspaceManager {
    static discoverSubmodules(repoRoot: string): SubmoduleInfo[];
    /**
     * Recursively scan `rootDir` up to `maxDepth` levels deep looking for
     * directories that contain a `.git` entry (file or folder).  The root
     * directory itself is excluded; each discovered repo is returned only once
     * and recursion stops at that boundary.
     *
     * Common noise directories (node_modules, dist, .cache, …) are skipped
     * automatically.
     */
    static discoverNestedGitRepos(rootDir: string, maxDepth?: number): SubmoduleInfo[];
    /**
     * Discover monorepo packages/apps within `rootDir`.
     *
     * Detection strategy (in priority order):
     *  1. `pnpm-workspace.yaml` → `packages:` list
     *  2. `package.json` `workspaces` field (npm / yarn)
     *  3. `lerna.json` `packages` field (defaults to `packages/*`)
     *  4. `rush.json` `projects[].projectFolder`
     *  5. `Cargo.toml` `[workspace] members`
     *  6. `go.work` `use` block
     *  7. `turbo.json` / `nx.json` — uses common dirs as patterns
     *  8. Fallback: scan `apps/`, `packages/`, `libs/`, `services/`, … for
     *     directories that contain a package manifest.
     *
     * A directory is only included when it contains at least one recognised
     * package manifest (`package.json`, `Cargo.toml`, `go.mod`, …) and does
     * **not** have its own `.git` entry (those are handled by
     * `discoverNestedGitRepos`).
     */
    static discoverMonorepoPackages(rootDir: string): MonorepoPackageInfo[];
    static discoverPeerRepos(workspaceRoot: string): SubmoduleInfo[];
    static discoverVSCodeWorkspace(workspaceFile: string, workspaceRoot: string): SubmoduleInfo[];
}

export { WorkspaceManager };
