* 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)
| 258 | * unrelated project (#1454 documents that failure mode for the prompt-hook). |
| 259 | */ |
| 260 | function eligibleForSubprojectScan(base: string): boolean { |
| 261 | if (base === path.parse(base).root) return false; |
| 262 | let home: string | null = null; |
| 263 | try { home = os.homedir(); } catch { home = null; } |
| 264 | if (home && (base === home || base === path.resolve(home))) return false; |
| 265 | if (looksLikeProjectRoot(base)) return true; |
| 266 | return fs.existsSync(path.join(base, '.git')); |
| 267 | } |
| 268 | |
| 269 | /** |
| 270 | * Resolve the project root an MCP server should serve as its DEFAULT project |
no test coverage detected