(cwd: string)
| 99 | |
| 100 | /** Extra command roots contributed by Claude Code, lowest-precedence first. */ |
| 101 | export async function claudeCodeCommandDirs(cwd: string): Promise<ClaudeAssetDir[]> { |
| 102 | if (disabled()) return []; |
| 103 | const dirs: ClaudeAssetDir[] = []; |
| 104 | try { |
| 105 | for (const p of await relevantPluginPaths(cwd)) { |
| 106 | dirs.push({ dir: path.join(p.path, 'commands'), origin: 'plugin', plugin: p.name }); |
| 107 | } |
| 108 | } catch (e: any) { |
| 109 | logger.debug('claudeCodeCommandDirs: plugin scan failed', { err: e?.message }); |
| 110 | } |
| 111 | dirs.push({ dir: path.join(claudeHome(), 'commands'), origin: 'user' }); |
| 112 | dirs.push({ dir: path.join(cwd, '.claude', 'commands'), origin: 'project' }); |
| 113 | return dirs; |
| 114 | } |
| 115 | |
| 116 | // ───────────────────────────── Agents → roles ────────────────────────────── |
| 117 | // |
no test coverage detected