Add discovery connector follow-up
This commit is contained in:
parent
239ad11547
commit
0b093741e2
7 changed files with 783 additions and 3 deletions
|
|
@ -4,13 +4,14 @@ import json
|
|||
import re
|
||||
import subprocess
|
||||
import tomllib
|
||||
from dataclasses import dataclass
|
||||
from dataclasses import dataclass, field
|
||||
from datetime import datetime, timezone
|
||||
from pathlib import Path
|
||||
from typing import Any, Iterable
|
||||
|
||||
import yaml
|
||||
|
||||
from .connectors import ConnectorConfig, apply_connectors
|
||||
from .discovery import (
|
||||
attribute_stable_key,
|
||||
discovery_stable_key,
|
||||
|
|
@ -89,6 +90,7 @@ class ScanOptions:
|
|||
llm_enabled: bool = False
|
||||
llm_config: LLMExtractionConfig | None = None
|
||||
llm_adapter: object | None = None
|
||||
connectors: list[ConnectorConfig] = field(default_factory=list)
|
||||
|
||||
|
||||
class CandidateAccumulator:
|
||||
|
|
@ -319,6 +321,12 @@ def scan_repo(options: ScanOptions | Path, **overrides: object) -> dict[str, obj
|
|||
"retirement_policy": "missing candidates retire only inside their replacement scope",
|
||||
},
|
||||
}
|
||||
if options.connectors:
|
||||
snapshot = apply_connectors(
|
||||
snapshot,
|
||||
repo_path=repo_path,
|
||||
configs=options.connectors,
|
||||
)
|
||||
if options.llm_enabled:
|
||||
return augment_snapshot_with_llm(
|
||||
snapshot,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue