pub enum Classification {
Failure {
label: String,
output: String,
},
Passthrough {
output: String,
},
Success {
label: String,
summary: String,
},
Bounded {
label: String,
output: String,
display: String,
size: usize,
},
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.
- Bounded: Content/Unknown command with large output. Full output is indexed;
displayis a byte-bounded head+tail slice. - Large: Data command 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
Bounded
Exit 0, output > threshold, no pattern, Content or Unknown category.
The full output is indexed for recall; display is a byte-bounded
head+tail slice (≤ DISPLAY_CAP bytes + truncation marker).
§Fields
label- Short label derived from the command (e.g., “git”, “gh”).output- The full command output to be indexed for recall.display- Byte-bounded head+tail slice for display (≤DISPLAY_CAP+ marker).size- Size of the full output in bytes.
Fields
Large
Exit 0, output > threshold, no pattern. Data category — index for recall.
§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.
Trait Implementations§
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