Skip to main content

Module activity

Module activity 

Source
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§

ShellActivity
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_action so 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_verifier should come from default_verifier_for_workspace; when None, 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_DESCRIPTION when none was resolved. default_verifier should come from default_verifier_for_workspace or the harness override resolution built on it.