extract_input | react_agent/graph.py | Analyzes unstructured chat history to parse translation inputs. | Uses EINFRA_QWEN3_CODER_NEXT with strict Pydantic formatting to resolve source_schema_code, source_query_code, framework types, and versions. Increments extraction_loop_count. |
schema_inspection | react_agent/graph.py | Connects to running database engines via MCP to retrieve schema context. | Uses a ReAct agent with custom database toolbox and MongoDB MCP tools. Automatically generates contextual summaries of SQL tables, neo4j labels, and mongo collections, saving them to state.schema_context to avoid message context bloat. |
generate_translation_node | react_agent/graph.py | Core structured code generator translating inputs to target. | Dynamically constructs a Pydantic output model using Pydantic create_model on the fly to exclude irrelevant fields based on the translation_type (SCHEMA, QUERY, or BOTH), optimizing token efficiency. |
prep_schema_validation | react_agent/graph.py | Prepares compiler tool invocation payload for schema validation. | Inspects the target framework (C# or Java) and structures a mock validate_dotnet_code or validate_java_code tool call message with the target schema validation code. |
validate_schema_node | react_agent/graph.py | Execution node for compiling schema validation code in sandboxes. | Executes compilation and unit fetching within Daytona sandboxes using dotnet build or mvn clean compile. |
prep_query_validation | react_agent/graph.py | Injects parallel sandbox compiler tool calls for source/target queries. | Formulates two concurrent tool calls (validate_dotnet_code for source SQL/LINQ C# code and validate_java_code for target Java MongoDB/Neo4j queries). |
validate_query_node | react_agent/graph.py | ToolNode executing parallel source/target query compilation & runs. | Compiles and executes both queries within Daytona sandboxes concurrently. Captures return JSON results (count, firstSample, lastSample) and stores them in state. |
prep_query_equivalence | react_agent/graph.py | Formulates the semantic comparison payload. | Structures a tool call for check_query_equivalence passing the two JSON outputs generated by the sandboxes. |
check_query_equivalence_node | react_agent/graph.py | Execution node for deep query equivalence testing. | Runs the check_query_equivalence tool, which delegates to background threads to compute deep differences using deepdiff.DeepDiff. |
evaluation_node | react_agent/graph.py | Structured judge assessing compilation results and equivalence diffs. | Utilizes Kimi K2.6 to read all validator outcomes, sandbox print logs, and DeepDiff results, outputting a structured ACCEPT or REJECT decision with granular reasoning. |
human_intervention_node | react_agent/graph.py | Pauses graph execution to solicit developer input. | Employs LangGraph’s interrupt() API to surface current generated code, evaluation error logs, and deep diffs to the user, blocking until manual accept or reject (with feedback) is submitted. |