This commit is contained in:
25
app/nodes/discovery_node.py
Normal file
25
app/nodes/discovery_node.py
Normal file
@@ -0,0 +1,25 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
from ..states.ingestion_state import IngestionState
|
||||
|
||||
|
||||
def discovery_node(state: IngestionState) -> dict[str, Any]:
|
||||
"""Discovery Phase: Check existing capabilities and resources non-blockingly."""
|
||||
request = state.get("request")
|
||||
source = request.source if request else "unknown"
|
||||
locator = request.locator if request else "unknown"
|
||||
|
||||
# Non-blocking check for existing ingestion resources
|
||||
existing_resources = {
|
||||
"source": source,
|
||||
"locator": locator,
|
||||
"previously_ingested": False,
|
||||
"connector_available": source in {"github", "sharepoint"},
|
||||
}
|
||||
|
||||
return {
|
||||
"existing_resources": existing_resources,
|
||||
"current_step": "discovery",
|
||||
"next_step": "validation",
|
||||
}
|
||||
Reference in New Issue
Block a user