findConfigFile
Static helper that searches for a config file and returns the first match’s
absolute path without loading it. Useful for detecting whether a configuration
exists before deciding whether to instantiate a ConfigLoader. For searching
from an instance that also loads on match, use
search() instead.
The search order is:
{serviceName}_config.json(cwd) and.swml/{serviceName}_config.json(ifserviceName)- Each path in
additionalPaths(if provided) config.jsonagent_config.json.swml/config.json~/.swml/config.json/etc/swml/config.json
Parameters
serviceName
Service name. When provided, service-specific config filenames are checked before defaults.
additionalPaths
Extra file paths to check between service-specific and default locations.
Returns
string | null — absolute path of the first existing config file, or null
if none match.