Skip to main content

Module state

Module state 

Source
Expand description

What the terminal is doing, as the agent reads it.

Two answers, and the state says which one it is. With shell integration the marks are exact: a C is a command running, a D;N is that command finished with N. Without it - a shell that has no integration, or a full-screen program that emits no marks - the classifier falls back to “quiet at a prompt-shaped line” and says heuristic, so the model knows what it has rather than trusting a guess as a fact.

Re-exports§

use serde::Deserialize; 🔒
use serde::Deserialize; 🔒
use serde::Serialize; 🔒
use serde::Serialize; 🔒
use crate::osc::Marks; 🔒

Structs§

ClassifyInput
Everything the classifier reads.
Exit
A command’s exit, as the shell or the process reported it.
InputExpected
One input the terminal is waiting for, with the evidence behind it.
State
What the terminal is doing.

Enums§

InputKind
What kind of input the terminal is waiting for.
Source
Where a state answer came from.

Functions§

classify
Classify the terminal’s state.
confirm_evidence 🔒
The evidence a yes/no question is on the last line, when it is.
is_prompt_shaped 🔒
Whether a line looks like a shell prompt waiting for input.