Expand description
Shell activity classification for progress accounting and output previews.
Mutation safety remains owned by super::classify_tool_intent. This
module adds the narrower distinction between repository inspection and
verification without duplicating that safety decision in binary consumers.
Enums§
- Shell
Activity - Progress semantics for a command invocation.
Constants§
- GENERIC_
VERIFIER_ DESCRIPTION - Stand-in for the verifier when no project command was detected or configured. It lists examples across ecosystems instead of naming one command, because a single concrete fallback (such as a Cargo command in a Go or Node workspace) would direct the model to a verifier that does not exist.
- VERIFIER_
SHELL_ FORM_ NOTE - Which shell forms of a verifier clear the anti-blind-editing gate. Shared
by the recovery directive and the blocked-mutation
next_actionso the two surfaces cannot drift.
Functions§
- classify_
shell_ activity - Classify a shell call without weakening the authoritative mutation guard.
- default_
verifier_ for_ workspace - Detect a project-appropriate default verifier for autonomous recovery.
- rewrite_
truncation_ only_ verifier - Rewrite a truncation-only piped verifier (
cargo check 2>&1 | head -c 4000) to its standalone verifier prefix so the observed exit status is the verifier’s, not the truncator’s. - shell_
args_ as_ executed - Shell-call arguments as the execution kernel runs them.
- shell_
command_ contains_ verifier - Recognize a verifier for diagnostic feedback, including status-masking tails
such as
; echo $?that cannot pass static verification admission. This heuristic grants no permissions, verification credit, or repair edits. - shell_
command_ is_ admitted_ verification_ attempt - Return whether a shell tool call is an admitted truncation-only verification attempt while the anti-blind-editing gate is pending.
- shell_
command_ is_ output_ search - Whether a command inspects search results that normally produce output.
- shell_
command_ is_ standalone_ grep_ search - Whether exit code 1 belongs to a standalone grep-style search. Compound commands, shell wrappers and redirected diagnostics cannot prove the search’s no-match status, even when their visible output is empty.
- verification_
recovery_ directive - Build the actionable verification-recovery directive with a concrete
command.
default_verifiershould come fromdefault_verifier_for_workspace; whenNone, the generic examples are kept so the directive never names a command that does not exist. - verifier_
reference - How harness text names the verifier to run: the resolved command in
backticks, or
GENERIC_VERIFIER_DESCRIPTIONwhen none was resolved.default_verifiershould come fromdefault_verifier_for_workspaceor the harness override resolution built on it.