Describe the Feature
Currently, the dynamic capability synthesis (Agentic Forge) fails during live execution because the LLM generation dispatcher in orchestrator.rs:L78 is a stub that immediately returns an error:
pub fn dispatch_agent_generation(_prompt: &str) -> Result<Value, String> {
Err("Agent dispatch via Python subprocess removed to comply with Data Plane Prohibition. Please implement gRPC LLM client.".to_string())
}
This issue proposes replacing this stub with a fully functioning gRPC or HTTP LLM client to query Gemini or OpenAI-compatible models directly from the Rust backend.
Proposed Architecture & Requirements
- Client Implementation:
- Implement the client within
crates/codegen (which already depends on reqwest).
- Support environment-driven configuration (e.g., checking for
GEMINI_API_KEY, OPENAI_API_KEY, OPENAI_API_BASE, or OPENAI_MODEL).
- Response Cleanup:
- Parse the JSON response payload.
- Clean/strip markdown syntax wrapping (e.g.,
```python ... ``` blocks) from the returned completion text to output clean code.
- Validation:
- Pass the cleaned payload back into the existing validation engine (
validate_generated_code) to assert that the generated AST conforms to the requested target schema.
- Testing:
- Introduce an integration test in the
test-suite that checks for the presence of these environment variables, calls the live client, and verifies successful code synthesis.
Implementation Checklist
Describe the Feature
Currently, the dynamic capability synthesis (Agentic Forge) fails during live execution because the LLM generation dispatcher in orchestrator.rs:L78 is a stub that immediately returns an error:
This issue proposes replacing this stub with a fully functioning gRPC or HTTP LLM client to query Gemini or OpenAI-compatible models directly from the Rust backend.
Proposed Architecture & Requirements
crates/codegen(which already depends onreqwest).GEMINI_API_KEY,OPENAI_API_KEY,OPENAI_API_BASE, orOPENAI_MODEL).```python ... ```blocks) from the returned completion text to output clean code.validate_generated_code) to assert that the generated AST conforms to the requested target schema.test-suitethat checks for the presence of these environment variables, calls the live client, and verifies successful code synthesis.Implementation Checklist
dispatch_agent_generationHTTP/gRPC client in orchestrator.rs.crates/test-suite/tests/unit.