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:
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user