pub enum Classification {
Failure {
label: String,
output: String,
},
Passthrough {
output: String,
},
Success {
label: String,
summary: String,
},
Large {
label: String,
output: String,
size: usize,
},
}Expand description
Command output classification result.
Represents the outcome of analyzing a command’s exit code and output. Each variant determines how the output should be presented to the AI agent.
§Variants
- Failure: Command exited non-zero. Contains filtered error output.
- Passthrough: Command succeeded with small output. Contains verbatim output.
- Success: Command succeeded with large output and pattern match. Contains compressed summary.
- Large: Command succeeded with large output and no pattern. Output is indexed for recall.
The classification is produced by the classify function.
Variants§
Failure
Exit ≠ 0. Filtered failure output.
§Fields
label- Short label derived from the command (e.g., “cargo”, “pytest”).output- Filtered error output, truncated if large.
Fields
Passthrough
Exit 0, output ≤ threshold. Verbatim.
§Fields
output- The full command output (merged stdout and stderr).
Success
Exit 0, output > threshold, pattern matched with summary.
§Fields
label- Short label derived from the command (e.g., “cargo”, “pytest”).summary- Compressed summary extracted using the pattern’s template.
Fields
Large
Exit 0, output > threshold, no pattern. Content needs indexing.
§Fields
label- Short label derived from the command (e.g., “git”, “gh”).output- The full command output to be indexed for recall.size- Size of the output in bytes.
Auto Trait Implementations§
impl Freeze for Classification
impl RefUnwindSafe for Classification
impl Send for Classification
impl Sync for Classification
impl Unpin for Classification
impl UnsafeUnpin for Classification
impl UnwindSafe for Classification
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
Mutably borrows from an owned value. Read more