scanner
agent_cover.instrumentation.promptflow.scanner
PromptFlow Integration Module.
This module provides functionality to scan directories for PromptFlow definitions
(specifically flow.dag.yaml files) and register associated Jinja2 templates
into the AgentRegistry.
It supports dependency injection for file system operations to facilitate testing without accessing the actual file system.
Classes
Functions
scan_promptflow_definitions(root_path=None, registry=None, walker_func=None, file_reader=None)
Scans for PromptFlow YAML files.
This function scans the directory tree for flow.dag.yaml files and processes
them to register Jinja2 templates found within the nodes. It is completely
isolated from the real file system via walker_func and file_reader injections.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root_path
|
Optional[str]
|
The root directory to start scanning. Defaults to the current working directory. |
None
|
registry
|
Optional[AgentRegistry]
|
The registry instance to register definitions into. Defaults to the global registry. |
None
|
walker_func
|
Optional[Callable]
|
A callable that behaves like os.walk. Defaults to |
None
|
file_reader
|
Optional[Callable]
|
A callable that reads a file path and returns content.
Defaults to |
None
|