pub struct RlmResult {
pub processed: String,
pub stats: RlmStats,
pub success: bool,
pub error: Option<String>,
pub trace: Option<ContextTrace>,
pub trace_id: Option<Uuid>,
}Expand description
RLM processing result.
The trace field is populated when the caller supplied a
crate::session::SessionBus (or otherwise opted in) so downstream
consumers — the TUI /rlm view, the JSONL flywheel, trace-driven
tuning jobs — can reconstruct the iteration-by-iteration behaviour
of the loop after the fact.
trace_id is always generated for a run (even when no bus is
attached) and is echoed in the matching
crate::session::SessionEvent::RlmComplete event. Callers who
supplied a bus can use it to correlate the durable completion
record with this returned value.
§Examples
use codetether_agent::rlm::{RlmResult, RlmStats};
let r = RlmResult {
processed: "summary".into(),
stats: RlmStats::default(),
success: true,
error: None,
trace: None,
trace_id: None,
};
assert!(r.success);
assert!(r.trace.is_none());Fields§
§processed: StringThe final text produced by the loop (summary or answer).
stats: RlmStatsAggregate statistics for the run.
success: booltrue when the loop converged within its iteration budget.
error: Option<String>Populated when success is false — a short diagnostic.
trace: Option<ContextTrace>Optional per-iteration event trace. Serialised only when present
so existing on-disk RlmResult records stay compatible.
trace_id: Option<Uuid>Identifier echoed on the matching RlmComplete bus event.
None for on-disk records written before this field existed.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RlmResult
impl<'de> Deserialize<'de> for RlmResult
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for RlmResult
impl RefUnwindSafe for RlmResult
impl Send for RlmResult
impl Sync for RlmResult
impl Unpin for RlmResult
impl UnsafeUnpin for RlmResult
impl UnwindSafe for RlmResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request