(dir)
| 38 | const DRY_RUN = args.includes('--dry-run'); |
| 39 | const PROJECT_ROOT = args.find(a => !a.startsWith('--')) || process.env.CLAUDE_PROJECT_DIR || process.cwd(); |
| 40 | const CODEX_PLUGIN_HOOKS_PATH = './runtimes/codex/hooks.json'; |
| 41 | |
| 42 | // ---- Utility helpers -------------------------------------------------------- |
| 43 | |
| 44 | function ensureDir(dir) { |
| 45 | if (!DRY_RUN && !fs.existsSync(dir)) { |
| 46 | fs.mkdirSync(dir, { recursive: true }); |
| 47 | } |