pub struct ActivityInput {
pub run: RunId,
pub source_sequence: u64,
pub kind: ActivityKind,
pub text: Option<String>,
pub observed_at: Option<DateTime<Utc>>,
}Expand description
What a caller asks to record as one activity record.
Fields§
§run: RunIdThe run the activity belongs to.
source_sequence: u64The reporter’s own sequence number for this record within the run, at least 1 and strictly increasing; gaps are allowed. It is the idempotency identity: resending a record with the same sequence and content is harmless while the record is retained, and a sequence at or below the run’s high-water mark that is no longer retained is refused as expired.
kind: ActivityKindWhat the record describes.
text: Option<String>Public text such as a tool name or progress note; never hidden reasoning.
observed_at: Option<DateTime<Utc>>When the source says it happened. It is a claim, never used to judge freshness.
Implementations§
Source§impl ActivityInput
impl ActivityInput
Sourcepub fn normalized(&self) -> NormalizedActivity
pub fn normalized(&self) -> NormalizedActivity
Apply the size bound and fingerprint the whole text, so a retry is compared against everything that was sent and not only the part that was kept.
Source§impl ActivityInput
impl ActivityInput
Sourcepub fn validate(&self) -> Result<(), ValidationError>
pub fn validate(&self) -> Result<(), ValidationError>
Check the request’s own form; over-long text is truncated, not refused.