import { type HostEnvironment, loadHostConfiguration } from "../host/index.js"; import { type ModulesDirectorySelection, resolveModulesDirectory } from "../modules/index.js"; /** * The modules directory an operator command discovers, read through the same host configuration * `startApi` and Doctor use and resolved by the one Core resolver (ADR 0048). Throws the resolver's * sanitized `ModuleDiscoveryError` for an unusable value, which every command already reports. */ export function resolveCommandModulesDirectory( environment: HostEnvironment, repositoryRoot: string, ): ModulesDirectorySelection { return resolveModulesDirectory({ configured: loadHostConfiguration(environment).modulesDirectory, repositoryRoot, }); }