pub struct TranscriptSession {
pub harness_id: String,
pub harness_session_id: String,
pub harness_version: Option<String>,
pub cwd: Option<String>,
pub org_id: String,
pub auth_subject: String,
}Expand description
The session a transcript belongs to, as the ingest lane needs it.
A client’s own session registry will carry more than this (a pid to watch,
bookkeeping for backoff); this is the subset that reaches the wire. Kept
owned rather than borrowed so a client can build one from a swept transcript
(see super::sweep) as easily as from a live registry
entry.
Fields§
§harness_id: StringWhich harness produced it — claude today. Should match the
X-Tapes-Harness-Id the same session’s wire traffic carries, so the
deriver fuses both sources under one session row.
harness_session_id: StringThe harness session id. Required by the server for transcripts; it is
what names <sid>.jsonl and keys the upload.
harness_version: Option<String>Harness version, when known.
cwd: Option<String>Working directory the harness ran in, when known.
org_id: StringOrganization id, or empty.
The server’s envelope validation requires a UUID here, so a client whose own organization identifier is some other shape leaves this empty deliberately rather than sending a value that would be rejected. That is not a loss: on a deployment with an authenticating edge, the wire-capture path derives org identity from the validated credential rather than from this envelope.
auth_subject: StringActing subject, or empty. A standalone client conventionally sets
local:<os-username>; on the platform the cloud edge stamps it from
validated JWT claims. Nothing parses the prefix — see
crate::attribution::Attribution::auth_subject.
Implementations§
Source§impl TranscriptSession
impl TranscriptSession
Sourcepub fn new(
harness_id: impl Into<String>,
harness_session_id: impl Into<String>,
) -> Self
pub fn new( harness_id: impl Into<String>, harness_session_id: impl Into<String>, ) -> Self
A session envelope with only the required fields set.
Sourcepub fn with_harness_version(self, version: Option<String>) -> Self
pub fn with_harness_version(self, version: Option<String>) -> Self
Set the harness version.
Sourcepub fn with_auth_subject(self, auth_subject: impl Into<String>) -> Self
pub fn with_auth_subject(self, auth_subject: impl Into<String>) -> Self
Set the acting subject.
Trait Implementations§
Source§impl Clone for TranscriptSession
impl Clone for TranscriptSession
Source§fn clone(&self) -> TranscriptSession
fn clone(&self) -> TranscriptSession
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 TranscriptSession
impl Debug for TranscriptSession
impl Eq for TranscriptSession
Source§impl PartialEq for TranscriptSession
impl PartialEq for TranscriptSession
impl StructuralPartialEq for TranscriptSession
Auto Trait Implementations§
impl Freeze for TranscriptSession
impl RefUnwindSafe for TranscriptSession
impl Send for TranscriptSession
impl Sync for TranscriptSession
impl Unpin for TranscriptSession
impl UnsafeUnpin for TranscriptSession
impl UnwindSafe for TranscriptSession
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.