Expand description
RPC bridge that services llm_query / rlm_query calls coming back
from the long-lived Python REPL during an RLM turn.
This is the spiritual successor to the HTTP sidecar from earlier
versions — except instead of binding a localhost port and routing
through urllib, requests come in through stdin/stdout and we just
call the LLM client directly here in Rust.
The bridge tracks cumulative token usage and the recursion budget. For
Rlm / RlmBatch requests it recursively calls run_rlm_turn_inner
at depth-1; the future-type cycle (bridge → run_rlm_turn_inner →
bridge) is broken by run_rlm_turn_inner returning a boxed dyn future.
Structs§
- RlmBridge
- State shared with the bridge across all RPC calls in one turn.
Constants§
- MAX_
BATCH - Hard cap on prompts per batch RPC.