pub struct ReflectionLoop { /* private fields */ }Expand description
The reflection engine. Runs the 3-stage pipeline on generated VibeScript.
Implementations§
Source§impl ReflectionLoop
impl ReflectionLoop
Sourcepub fn new(config: ReflectionConfig) -> Self
pub fn new(config: ReflectionConfig) -> Self
Creates a new ReflectionLoop.
Sourcepub fn run(&self, source: &str) -> ReflectionResult
pub fn run(&self, source: &str) -> ReflectionResult
Run the reflection loop on a generated source string. Returns the final result with all stage outcomes.
Sourcepub fn run_with_dry_run_host<H: Host>(
&self,
source: &str,
dry_run_host: &mut H,
) -> ReflectionResult
pub fn run_with_dry_run_host<H: Host>( &self, source: &str, dry_run_host: &mut H, ) -> ReflectionResult
Run the reflection loop with an isolated dry-run host (R4).
Stage 3 is extended to actually evaluate the source against the
provided host (which should be a detached fork — see
PoetSnapshot::fork()). This catches runtime errors that static
analysis alone cannot detect: type mismatches in capability.invoke
calls, graph query failures, missing host bindings, etc.
The host is only used for Stage 3 dry-run evaluation. Stages 1 and 2 remain purely static analysis. The host is never mutated in a way that reaches the live graph — the caller is responsible for passing an isolated fork.