pub struct ThreadMetadataBuilder {Show 20 fields
pub id: ThreadId,
pub rollout_path: PathBuf,
pub created_at: DateTime<Utc>,
pub updated_at: Option<DateTime<Utc>>,
pub recency_at: Option<DateTime<Utc>>,
pub source: SessionSource,
pub history_mode: ThreadHistoryMode,
pub thread_source: Option<ThreadSource>,
pub agent_nickname: Option<String>,
pub agent_role: Option<String>,
pub agent_path: Option<String>,
pub model_provider: Option<String>,
pub cwd: PathBuf,
pub cli_version: Option<String>,
pub sandbox_policy: SandboxPolicy,
pub approval_mode: AskForApproval,
pub archived_at: Option<DateTime<Utc>>,
pub git_sha: Option<String>,
pub git_branch: Option<String>,
pub git_origin_url: Option<String>,
}Expand description
Builder data required to construct ThreadMetadata without parsing filenames.
Fields§
§id: ThreadIdThe thread identifier.
rollout_path: PathBufThe absolute rollout path on disk.
created_at: DateTime<Utc>The creation timestamp.
updated_at: Option<DateTime<Utc>>The last update timestamp, if known.
recency_at: Option<DateTime<Utc>>The product recency timestamp, if known.
source: SessionSourceThe session source.
history_mode: ThreadHistoryModePersisted thread history contract selected when this thread was created.
thread_source: Option<ThreadSource>Optional analytics source classification for this thread.
agent_nickname: Option<String>Optional random unique nickname assigned to the session.
agent_role: Option<String>Optional role (agent_role) assigned to the session.
agent_path: Option<String>Optional canonical agent path assigned to the session.
model_provider: Option<String>The model provider identifier, if known.
cwd: PathBufThe working directory for the thread.
cli_version: Option<String>Version of the CLI that created the thread.
sandbox_policy: SandboxPolicyThe sandbox policy.
approval_mode: AskForApprovalThe approval mode.
archived_at: Option<DateTime<Utc>>The archive timestamp, if the thread is archived.
git_sha: Option<String>The git commit SHA, if known.
git_branch: Option<String>The git branch name, if known.
git_origin_url: Option<String>The git origin URL, if known.
Implementations§
Source§impl ThreadMetadataBuilder
impl ThreadMetadataBuilder
Sourcepub fn new(
id: ThreadId,
rollout_path: PathBuf,
created_at: DateTime<Utc>,
source: SessionSource,
) -> Self
pub fn new( id: ThreadId, rollout_path: PathBuf, created_at: DateTime<Utc>, source: SessionSource, ) -> Self
Create a new builder with required fields and sensible defaults.
Sourcepub fn build(&self, default_provider: &str) -> ThreadMetadata
pub fn build(&self, default_provider: &str) -> ThreadMetadata
Build canonical thread metadata, filling missing values from defaults.
Trait Implementations§
Source§impl Clone for ThreadMetadataBuilder
impl Clone for ThreadMetadataBuilder
Source§fn clone(&self) -> ThreadMetadataBuilder
fn clone(&self) -> ThreadMetadataBuilder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ThreadMetadataBuilder
impl Debug for ThreadMetadataBuilder
impl Eq for ThreadMetadataBuilder
Source§impl PartialEq for ThreadMetadataBuilder
impl PartialEq for ThreadMetadataBuilder
impl StructuralPartialEq for ThreadMetadataBuilder
Auto Trait Implementations§
impl Freeze for ThreadMetadataBuilder
impl RefUnwindSafe for ThreadMetadataBuilder
impl Send for ThreadMetadataBuilder
impl Sync for ThreadMetadataBuilder
impl Unpin for ThreadMetadataBuilder
impl UnsafeUnpin for ThreadMetadataBuilder
impl UnwindSafe for ThreadMetadataBuilder
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
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 more