()
| 235 | // fall through to cwd instead. We intentionally do NOT recurse into evolver |
| 236 | // package discovery here — this is purely "where is the user's code". |
| 237 | function resolveProjectDir() { |
| 238 | for (const key of ['CURSOR_PROJECT_DIR', 'CLAUDE_PROJECT_DIR']) { |
| 239 | const v = process.env[key]; |
| 240 | if (typeof v === 'string' && v.trim()) { |
| 241 | try { |
| 242 | if (fs.statSync(v).isDirectory()) return v; |
| 243 | } catch { /* not a usable dir — try next / fall back to cwd */ } |
| 244 | } |
| 245 | } |
| 246 | return process.cwd(); |
| 247 | } |
| 248 | |
| 249 | // Determine the workspace ROOT for a project, mirroring src/gep/paths.js |
| 250 | // getWorkspaceRoot() step-for-step so the FS-only fallback lands its secret at |
no outgoing calls
no test coverage detected