swarmauri 0.7.1.dev1__tar.gz → 0.7.2.dev2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {swarmauri-0.7.1.dev1 → swarmauri-0.7.2.dev2}/PKG-INFO +1 -1
- {swarmauri-0.7.1.dev1 → swarmauri-0.7.2.dev2}/pyproject.toml +1 -1
- {swarmauri-0.7.1.dev1 → swarmauri-0.7.2.dev2}/swarmauri/plugin_manager.py +24 -24
- {swarmauri-0.7.1.dev1 → swarmauri-0.7.2.dev2}/LICENSE +0 -0
- {swarmauri-0.7.1.dev1 → swarmauri-0.7.2.dev2}/README.md +0 -0
- {swarmauri-0.7.1.dev1 → swarmauri-0.7.2.dev2}/swarmauri/__init__.py +0 -0
- {swarmauri-0.7.1.dev1 → swarmauri-0.7.2.dev2}/swarmauri/cli.py +0 -0
- {swarmauri-0.7.1.dev1 → swarmauri-0.7.2.dev2}/swarmauri/importer.py +0 -0
- {swarmauri-0.7.1.dev1 → swarmauri-0.7.2.dev2}/swarmauri/interface_registry.py +0 -0
- {swarmauri-0.7.1.dev1 → swarmauri-0.7.2.dev2}/swarmauri/plugin_citizenship_registry.py +0 -0
|
@@ -9,7 +9,7 @@ import sys
|
|
|
9
9
|
from importlib.metadata import EntryPoint, entry_points
|
|
10
10
|
from typing import Any, Dict, Optional
|
|
11
11
|
|
|
12
|
-
from swarmauri_base.ComponentBase import ComponentBase
|
|
12
|
+
# from swarmauri_base.ComponentBase import ComponentBase
|
|
13
13
|
|
|
14
14
|
from .interface_registry import InterfaceRegistry
|
|
15
15
|
from .plugin_citizenship_registry import PluginCitizenshipRegistry
|
|
@@ -245,9 +245,9 @@ def _register_lazy_plugin_from_metadata(
|
|
|
245
245
|
resource_path = f"swarmauri.{resource_kind}.{type_name}"
|
|
246
246
|
|
|
247
247
|
# Retrieve the required interface class, if applicable
|
|
248
|
-
interface_class = InterfaceRegistry.get_interface_for_resource(
|
|
249
|
-
|
|
250
|
-
)
|
|
248
|
+
# interface_class = InterfaceRegistry.get_interface_for_resource(
|
|
249
|
+
# f"swarmauri.{resource_kind}"
|
|
250
|
+
# )
|
|
251
251
|
|
|
252
252
|
# Determine classification: first or second class
|
|
253
253
|
if PluginCitizenshipRegistry.is_first_class(entry_point):
|
|
@@ -280,13 +280,13 @@ def _register_lazy_plugin_from_metadata(
|
|
|
280
280
|
# Add LazyLoaded plugin
|
|
281
281
|
sys.modules[spec.name] = plugin_class
|
|
282
282
|
|
|
283
|
-
type_name = resource_path.split(".")[-1]
|
|
284
|
-
ComponentBase.TYPE_REGISTRY.setdefault(interface_class, {})[type_name] = (
|
|
285
|
-
|
|
286
|
-
)
|
|
287
|
-
logger.info(
|
|
288
|
-
|
|
289
|
-
)
|
|
283
|
+
# type_name = resource_path.split(".")[-1]
|
|
284
|
+
# ComponentBase.TYPE_REGISTRY.setdefault(interface_class, {})[type_name] = (
|
|
285
|
+
# plugin_class
|
|
286
|
+
# )
|
|
287
|
+
# logger.info(
|
|
288
|
+
# f"Registered class-based plugin '{plugin_class.__name__}' in ComponentBase.TYPE_REGISTRY under '{interface_class}'"
|
|
289
|
+
# )
|
|
290
290
|
|
|
291
291
|
except KeyError as e:
|
|
292
292
|
logger.error(
|
|
@@ -410,13 +410,13 @@ def _process_class_plugin(
|
|
|
410
410
|
|
|
411
411
|
# Step 5: Register the plugin class in ComponentBase.TYPE_REGISTRY
|
|
412
412
|
# Extract type_name from resource_path (e.g., 'ExampleAgent' from 'swarmauri.agents.ExampleAgent')
|
|
413
|
-
type_name = resource_path.split(".")[-1]
|
|
414
|
-
ComponentBase.TYPE_REGISTRY.setdefault(interface_class, {})[type_name] = (
|
|
415
|
-
|
|
416
|
-
)
|
|
417
|
-
logger.info(
|
|
418
|
-
|
|
419
|
-
)
|
|
413
|
+
# type_name = resource_path.split(".")[-1]
|
|
414
|
+
# ComponentBase.TYPE_REGISTRY.setdefault(interface_class, {})[type_name] = (
|
|
415
|
+
# plugin_class
|
|
416
|
+
# )
|
|
417
|
+
# logger.info(
|
|
418
|
+
# f"Registered class-based plugin '{plugin_class.__name__}' in ComponentBase.TYPE_REGISTRY under '{interface_class}'"
|
|
419
|
+
# )
|
|
420
420
|
|
|
421
421
|
return True
|
|
422
422
|
|
|
@@ -502,12 +502,12 @@ def _process_module_plugin(
|
|
|
502
502
|
)
|
|
503
503
|
|
|
504
504
|
# Register in TYPE_REGISTRY
|
|
505
|
-
ComponentBase.TYPE_REGISTRY.setdefault(interface_class, {})[
|
|
506
|
-
|
|
507
|
-
] = attr
|
|
508
|
-
logger.info(
|
|
509
|
-
|
|
510
|
-
)
|
|
505
|
+
# ComponentBase.TYPE_REGISTRY.setdefault(interface_class, {})[
|
|
506
|
+
# attr_name
|
|
507
|
+
# ] = attr
|
|
508
|
+
# logger.info(
|
|
509
|
+
# f"Registered class-based plugin '{attr_name}' in TYPE_REGISTRY under '{interface_class}'"
|
|
510
|
+
# )
|
|
511
511
|
|
|
512
512
|
elif citizenship is None:
|
|
513
513
|
logger.warning(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|