generated from coulomb/repo-seed
Add discovery connector follow-up
This commit is contained in:
@@ -10,6 +10,7 @@ import urllib.request
|
||||
from datetime import datetime, timezone
|
||||
from pathlib import Path
|
||||
|
||||
from .connectors import ConnectorConfig
|
||||
from .loader import declaration_files, load_yaml
|
||||
from .graph import FabricGraph, build_graph
|
||||
from .graph_explorer import fabric_graph_explorer_payload
|
||||
@@ -82,6 +83,19 @@ def build_parser() -> argparse.ArgumentParser:
|
||||
scan.add_argument("--llm-temperature", type=float, default=0.0)
|
||||
scan.add_argument("--llm-max-tokens", type=int, default=1500)
|
||||
scan.add_argument("--llm-min-confidence", type=float, default=0.6)
|
||||
scan.add_argument(
|
||||
"--connector",
|
||||
action="append",
|
||||
choices=["local-fabric-registry"],
|
||||
default=[],
|
||||
help="Enable a discovery connector. May be passed more than once.",
|
||||
)
|
||||
scan.add_argument(
|
||||
"--connector-manifest",
|
||||
type=Path,
|
||||
default=Path("registry/local-repos.yaml"),
|
||||
help="Manifest path for the local-fabric-registry connector.",
|
||||
)
|
||||
|
||||
registry = sub.add_parser("registry", help="Feed a running Railiance Fabric registry service.")
|
||||
registry_sub = registry.add_subparsers(dest="registry_command", required=True)
|
||||
@@ -410,6 +424,14 @@ def _scan_repo(args: argparse.Namespace) -> int:
|
||||
max_tokens=args.llm_max_tokens,
|
||||
min_confidence=args.llm_min_confidence,
|
||||
),
|
||||
connectors=[
|
||||
ConnectorConfig(
|
||||
connector_id=connector_id,
|
||||
connector_type="fabric_registry",
|
||||
source_path=str(args.connector_manifest),
|
||||
)
|
||||
for connector_id in args.connector
|
||||
],
|
||||
)
|
||||
)
|
||||
if args.previous_snapshot:
|
||||
@@ -433,7 +455,10 @@ def _scan_repo(args: argparse.Namespace) -> int:
|
||||
candidates = snapshot["candidates"]
|
||||
review_count = len(snapshot.get("review_artifacts", []))
|
||||
review_summary = f", {review_count} review artifact(s)" if review_count else ""
|
||||
diff = snapshot.get("reconciliation", {}).get("diff", {})
|
||||
connector_count = len(snapshot.get("connector_runs", []))
|
||||
connector_summary = f", {connector_count} connector run(s)" if connector_count else ""
|
||||
reconciliation = snapshot.get("reconciliation", {})
|
||||
diff = reconciliation.get("diff") if isinstance(reconciliation, dict) else None
|
||||
diff_summary = ""
|
||||
if isinstance(diff, dict):
|
||||
diff_summary = (
|
||||
@@ -451,6 +476,7 @@ def _scan_repo(args: argparse.Namespace) -> int:
|
||||
f"{len(candidates['attributes'])} attribute(s), "
|
||||
f"{len(snapshot['replacement_scopes'])} replacement scope(s)"
|
||||
f"{review_summary}"
|
||||
f"{connector_summary}"
|
||||
f"{diff_summary}"
|
||||
)
|
||||
if args.output:
|
||||
|
||||
Reference in New Issue
Block a user