From 0b58d9fed6e693a4eb5d457ec3da62e5ecf1c7f9 Mon Sep 17 00:00:00 2001 From: agessaman Date: Mon, 9 Mar 2026 18:07:53 -0700 Subject: [PATCH] Update ServicePluginLoader to include modules directory in service path - Enhanced the ServicePluginLoader to add the modules directory to the path for local services, ensuring that utility modules can be resolved correctly. - This change improves the loading mechanism for service plugins by allowing better integration of local utilities. --- modules/service_plugin_loader.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/service_plugin_loader.py b/modules/service_plugin_loader.py index d8d4d2a..aa794f3 100644 --- a/modules/service_plugin_loader.py +++ b/modules/service_plugin_loader.py @@ -149,7 +149,8 @@ class ServicePluginLoader: if "local_services" not in sys.modules: pkg = types.ModuleType("local_services") builtin_services_dir = getattr(self, 'services_dir', None) or os.path.join(os.path.dirname(__file__), 'service_plugins') - pkg.__path__ = [str(file_path.parent), builtin_services_dir] + modules_dir = os.path.dirname(__file__) # so local_services.utils resolves to modules.utils + pkg.__path__ = [str(file_path.parent), builtin_services_dir, modules_dir] sys.modules["local_services"] = pkg stem = file_path.stem module_name = f"local_services.{stem}"