nvflare.tool.agent.inspector module

Static read-only inspection for agent workflows.

class InspectState(root: pathlib.Path, redact: bool, entries_visited: int = 0, files_considered: int = 0, files_scanned: int = 0, bytes_scanned: int = 0, files_skipped_count: int = 0, file_limit_reached: bool = False, file_limit_accounted_skips: int = 0, file_limit_skip_accounting_truncated: bool = False, classification_incomplete: bool = False, files_skipped: list[dict] = <factory>, findings: list[dict] = <factory>, framework_evidence: dict[str, list[dict]] = <factory>, flare_imports: list[dict] = <factory>, flare_calls: set[str] = <factory>, integration_signals: dict[str, set[str]] = <factory>, file_imports: dict[str, set[str]] = <factory>, entry_points: list[dict] = <factory>, job_py: Optional[str] = None, sim_env_used: bool = False, export_support: bool = False, exported_job_markers: list[str] = <factory>, exported_job_marker_paths: list[pathlib.Path] = <factory>, distributed_patterns: list[dict] = <factory>, dynamic_patterns: list[dict] = <factory>, absolute_path_findings: list[dict] = <factory>, class_body_ranges: dict[str, list[tuple[int, int]]] = <factory>, local_files_by_module_cache: Optional[dict[str, set[str]]] = None)[source]

Bases: object

absolute_path_findings: list[dict]
bytes_scanned: int = 0
class_body_ranges: dict[str, list[tuple[int, int]]]
classification_incomplete: bool = False
distributed_patterns: list[dict]
dynamic_patterns: list[dict]
entries_visited: int = 0
entry_points: list[dict]
export_support: bool = False
exported_job_marker_paths: list[Path]
exported_job_markers: list[str]
file_imports: dict[str, set[str]]
file_limit_accounted_skips: int = 0
file_limit_reached: bool = False
file_limit_skip_accounting_truncated: bool = False
files_considered: int = 0
files_scanned: int = 0
files_skipped: list[dict]
files_skipped_count: int = 0
findings: list[dict]
flare_calls: set[str]
flare_imports: list[dict]
framework_evidence: dict[str, list[dict]]
integration_signals: dict[str, set[str]]
job_py: str | None = None
local_files_by_module_cache: dict[str, set[str]] | None = None
redact: bool
root: Path
sim_env_used: bool = False
inspect_path(path: Path | str, *, redact: bool = True, max_files: int = 250, max_file_bytes: int = 524288) dict[source]

Inspect a path without importing or executing user code.