* Whether `base` is a plausible workspace root for the sub-project down-scan. * Mirrors `planFrontload`'s manifest gate, widened to accept a bare `.git` * entry — the #1606 shape is a workspace container holding only agent config * and a `.git`, with every build manifest living in the indexed chi
(base: string)
| 473 | * unrelated project (#1454 documents that failure mode for the prompt-hook). |
| 474 | */ |
| 475 | function eligibleForSubprojectScan(base: string): boolean { |
| 476 | if (base === path.parse(base).root) return false; |
| 477 | let home: string | null = null; |
| 478 | try { home = os.homedir(); } catch { home = null; } |
| 479 | if (home && (base === home || base === path.resolve(home))) return false; |
| 480 | if (looksLikeProjectRoot(base)) return true; |
| 481 | return fs.existsSync(path.join(base, '.git')); |
| 482 | } |
| 483 | |
| 484 | /** |
| 485 | * Resolve the project root an MCP server should serve as its DEFAULT project |
no test coverage detected