Let adapter plugins provide configured endpoints

This commit is contained in:
Lyncoln
2026-09-20 19:20:26 -04:00
parent 832928159d
commit 16359dc164
6 changed files with 421 additions and 34 deletions
+15 -12
View File
@@ -14,6 +14,7 @@ from .executor import execute_endpoint_plans
from .orchestrator import discover_reconcile_plan
from .persistence import SQLiteStateStore
from .registry import (
configured_adapter_endpoints,
enabled_plugins,
load_adapter,
load_provider,
@@ -145,20 +146,22 @@ def run_sync(args):
def _configured_adapters(config):
enabled = enabled_plugins()
adapters = []
endpoints = []
for plugin_name in sorted(enabled_plugins()):
for endpoint in configured_adapter_endpoints(
plugin_name,
config,
):
adapters.append(
load_adapter(
plugin_name,
config,
endpoint,
)
)
if "npm" in enabled:
endpoints.extend(config.npm_endpoints)
if "verizon" in enabled:
endpoints.extend(config.verizon_endpoints)
return [
load_adapter(endpoint.plugin, config, endpoint)
for endpoint in endpoints
]
return adapters
def run_reconcile(args):