Skip to main content

Transcript

Struct Transcript 

Source
pub struct Transcript {
    pub meta: SessionMeta,
    pub convo: Conversation,
    pub configs: Vec<RunConfig>,
    pub config_positions: Vec<usize>,
    pub episode: Option<RunStats>,
    pub taint_timeline: TaintTimeline,
}
Expand description

A transcript read once: see Session::read.

Fields§

§meta: SessionMeta§convo: Conversation§configs: Vec<RunConfig>

Every RunConfig recorded, in order. The first is the run the session began under; a /model switch appends another.

§config_positions: Vec<usize>

How many messages preceded each entry of configs in the loaded list — parallel to it, and what Transcript::config_covering reads. A front-end writes a Config at run start, before the run’s own messages, so the config in effect at message i is the last one with a position at or below i. A summarising Rewrite clamps every earlier position to zero: the rewritten head’s original indices are claims about a list that no longer exists, and the config in flight at the rewrite — the last of the clamped ones — is the honest answer for it (messages the rewrite kept from earlier attaches were genuinely recorded under older configs, but those turns are exactly the “not comparable” case run_configs’s own doc names, and the replay fidelity caveat is the place that says so). A truncating rewrite — the failed-turn rollback, whose new list is a strict prefix of the one in hand — rewrites nothing, so its positions stay exact; see the Rewrite arm in Session::read.

§episode: Option<RunStats>

Every recorded outcome, folded into the episode the session describes.

§taint_timeline: TaintTimeline

The taint checkpoints, positioned against the loaded messages — the same structure Session::taint_timeline builds from a second full read, carried here because this pass already walked every record. mecha distill paid four complete read-and-parse passes per session (load, taint_timeline, then for_session’s own read and taint_timeline) for questions this one walk answers together.

Implementations§

Source§

impl Transcript

Source

pub fn config_covering(&self, message_index: usize) -> Option<&RunConfig>

The run config in effect at message message_index of the loaded list, or None for a transcript recorded before configs were kept.

This is what a replay driver should ask, not configs.first(): resuming under different flags is a normal thing to do, and replaying a later attach’s turns under the first attach’s system prompt and tool list diverges for reasons that say nothing about those turns — which a counterfactual reader then mistakes for evidence.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more