refactor: remove dead descriptor-driven mechanisms (no remaining consumer)

Drop code whose only consumer was a retired runtime: hostBehaviors readers for
agentFileExtension, localTargetIsProjectRoot, sharedHooksDirName,
skillsManifestPrefix and skipCodexSkillsManifest; the empty
NON_REGISTRY_CONFIG_HOME_DESCRIPTORS array and live-config-guard plumbing; the
empty RUNTIME_NOTE_AUDIENCE_BY_HEADING filter; the unused resolveVersionFrom
export; and the WINDSURF_SESSION_ID workstream session key. Delete tests that
only exercised those mechanisms.
This commit is contained in:
Jakub Zych
2026-10-06 20:49:35 +02:00
parent fe3ed06691
commit 6b0b92674a
25 changed files with 63 additions and 912 deletions

View File

@@ -159,17 +159,10 @@ function getAgentsDir(runtime?: string, projectRoot?: string): string {
return installRelative;
}
if (projectRoot) {
// eslint-disable-next-line @typescript-eslint/no-require-imports
const { runtimes } = require('./capability-registry.cjs') as {
runtimes: Record<string, { runtime?: { hostBehaviors?: { localTargetIsProjectRoot?: boolean } } }>;
};
const runtimeConfig = runtimes[resolved]?.runtime;
const localConfigDirName = getDirName(resolved);
const localConfigDir = localConfigDirName === NO_LOCAL_CONFIG_DIR_SENTINEL
? undefined
: runtimeConfig?.hostBehaviors?.localTargetIsProjectRoot
? projectRoot
: path.join(projectRoot, localConfigDirName);
: path.join(projectRoot, localConfigDirName);
if (!localConfigDir) {
return path.join(getGlobalConfigDir(resolved), 'agents');
}