pub struct Report {
pub run: RunId,
pub agent: AgentName,
pub itinerary: ItineraryId,
pub headline: String,
pub body: String,
pub artifacts: Vec<String>,
pub at: Timestamp,
}Expand description
What one run concluded.
Fields§
§run: RunIdThe run this describes.
agent: AgentNameWhich agent wrote it.
itinerary: ItineraryIdThe chain it belonged to.
headline: StringOne line, for a list. What happened, not what was attempted.
body: StringThe report itself, as the agent wrote it.
artifacts: Vec<String>What it produced or changed: paths, branch names, pull request identifiers.
Separate from the body so a reader can find the output without reading the prose, and so a later run can be told what an earlier one left behind.
at: TimestampWhen it was written.
Implementations§
Source§impl Report
impl Report
Sourcepub fn new(
run: RunId,
agent: AgentName,
itinerary: ItineraryId,
headline: impl Into<String>,
body: impl Into<String>,
at: Timestamp,
) -> Self
pub fn new( run: RunId, agent: AgentName, itinerary: ItineraryId, headline: impl Into<String>, body: impl Into<String>, at: Timestamp, ) -> Self
Records a report, trimming anything past the caps.
Truncates rather than rejecting. A report is the only account of a run that has already happened and already cost money; throwing it away because it was too long would lose the thing entirely to punish a formatting mistake.
Sourcepub fn has_body(&self) -> bool
pub fn has_body(&self) -> bool
Returns true when the agent had something to say beyond the headline.
Sourcepub fn was_trimmed(&self) -> bool
pub fn was_trimmed(&self) -> bool
Returns true when anything was trimmed to fit.
Worth surfacing: a reader who can see the report was cut knows to look at the transcript rather than assuming the agent stopped there.