pub struct FinalOutput {
pub content: String,
pub format: Option<String>,
pub stage: String,
pub submitted_at: i64,
pub truncated: bool,
pub artifacts: Vec<String>,
}Expand description
What an agent actually produced, content included.
content is stored exactly as submitted. Nothing in the
engine reformats, re-indents, or re-serializes it, so a consumer that asked
for a particular byte sequence receives that byte sequence.
This is the in-memory and one-shot form: the live ECS component, the
completion event, a webhook body, a reply to a waiting parent. What a run’s
meta.json carries is the FinalOutputDescriptor, because that file is
read for every run on every listing and must not carry a payload.
Fields§
§content: StringThe submission, verbatim (subject only to MAX_FINAL_OUTPUT_BYTES).
format: Option<String>The format label in effect when this was submitted, if any. Copied from the resolved spec rather than guessed from the content.
stage: StringThe stage that produced it. Read by the enforcement gate, which must tell “this stage submitted” from “some earlier stage did”.
submitted_at: i64Unix seconds at submission.
truncated: boolWhether MAX_FINAL_OUTPUT_BYTES cut the content short.
artifacts: Vec<String>Files the run produced, as workdir-relative paths.
An answer is one model response; anything larger is a file. A run that gathers two million rows writes them incrementally and names the file here, so a consumer can fetch it rather than parse the path out of prose. Validated to resolve inside the run’s working directory, the same rule the files endpoint enforces when serving one.
Implementations§
Source§impl FinalOutput
impl FinalOutput
Sourcepub fn new(
content: &str,
format: Option<String>,
stage: String,
submitted_at: i64,
) -> Self
pub fn new( content: &str, format: Option<String>, stage: String, submitted_at: i64, ) -> Self
Record a submission, truncating at a character boundary if it exceeds
MAX_FINAL_OUTPUT_BYTES.
Truncation walks back to a boundary rather than slicing by byte index:
this workspace denies clippy::string_slice because a byte cut through a
multi-byte character once double-panicked and aborted the whole daemon.
Sourcepub fn with_artifacts(self, artifacts: Vec<String>) -> Self
pub fn with_artifacts(self, artifacts: Vec<String>) -> Self
The same submission with artifacts attached.
Sourcepub fn descriptor(&self) -> FinalOutputDescriptor
pub fn descriptor(&self) -> FinalOutputDescriptor
Everything about this answer except the bytes.
Trait Implementations§
Source§impl Clone for FinalOutput
impl Clone for FinalOutput
Source§fn clone(&self) -> FinalOutput
fn clone(&self) -> FinalOutput
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 FinalOutput
impl Debug for FinalOutput
Source§impl<'de> Deserialize<'de> for FinalOutput
impl<'de> Deserialize<'de> for FinalOutput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for FinalOutput
Source§impl PartialEq for FinalOutput
impl PartialEq for FinalOutput
Source§impl Serialize for FinalOutput
impl Serialize for FinalOutput
impl StructuralPartialEq for FinalOutput
Auto Trait Implementations§
impl Freeze for FinalOutput
impl RefUnwindSafe for FinalOutput
impl Send for FinalOutput
impl Sync for FinalOutput
impl Unpin for FinalOutput
impl UnsafeUnpin for FinalOutput
impl UnwindSafe for FinalOutput
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.