* fix(#384): make getAgentsDir runtime-aware so non-Claude installs find agents getAgentsDir() ignored the active runtime and always returned the claude-family __dirname-relative agents path, so on OpenCode (and other non-Claude runtimes) checkAgentsInstalled() looked in the wrong directory and reported agents missing even when installed. Resolve the per-runtime global config dir via getGlobalConfigDir(runtime) (GSD_AGENTS_DIR env > runtime arg > GSD_RUNTIME env > 'claude'), and surface agent_runtime and agents_dir through withProjectRoot() so init diagnostics show which directory was checked. Updates the stale W010 health-check test that relied on the old __dirname path. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * chore(#384): set changeset pr to 617 * fix(#384): keep claude on __dirname agents path; fix test lint + leak Address CI failures on the first cut: - getAgentsDir now only routes NON-claude runtimes through getGlobalConfigDir(runtime); claude retains the original __dirname- relative agents path, which correctly resolves to <repo>/agents for repo runs and the runtime config agents dir for real installs. This restores validate-health / W010 checks that were regressing because the claude default had moved off the repo-relative path. - Revert the now-unneeded GSD_AGENTS_DIR workaround in agent-install-validation.test.cjs (back to its next state). - bug-384 test: use helpers.cleanup() instead of raw fs.rmSync() (local/no-raw-rmsync-in-tests) and drop an unused var. - Reword a doc comment that contained a literal ~/.claude/agents path, which tripped the cline-install no-leaked-paths scanner. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -85,9 +85,12 @@ function getLatestCompletedMilestone(cwd: string): { version: string; name: stri
|
||||
|
||||
function withProjectRoot(cwd: string, result: Record<string, unknown>): Record<string, unknown> {
|
||||
result['project_root'] = cwd;
|
||||
const agentStatus = checkAgentsInstalled();
|
||||
const activeRuntime = resolveRuntime(cwd);
|
||||
const agentStatus = checkAgentsInstalled(activeRuntime);
|
||||
result['agents_installed'] = agentStatus.agents_installed;
|
||||
result['missing_agents'] = agentStatus.missing_agents;
|
||||
result['agents_dir'] = agentStatus.agents_dir;
|
||||
result['agent_runtime'] = agentStatus.agent_runtime;
|
||||
const config = loadConfig(cwd);
|
||||
if (config.response_language) {
|
||||
result['response_language'] = config.response_language;
|
||||
|
||||
Reference in New Issue
Block a user