@@ -248,6 +248,7 @@ bool cbm_hook_augment_invocation_supported_for_testing(const char *dialect,
248248bool cbm_hook_path_contains_for_testing (const char * root , const char * candidate ,
249249 bool case_insensitive );
250250const char * cbm_hook_no_project_index_guidance_for_testing (const char * event );
251+ bool cbm_hook_augment_parse_bash_pattern_for_testing (const char * cmd , char * out , size_t out_sz );
251252bool cbm_mcp_command_path_probe_safe_for_testing (const char * command , bool windows );
252253void cbm_set_mcp_command_path_probe_counter_for_testing (int * counter );
253254int cbm_install_editor_mcp_with_previous_for_testing (const char * binary_path ,
@@ -310,7 +311,7 @@ const char *cbm_get_aider_instructions(void);
310311/* ── Pre-tool hook management ─────────────────────────────────── */
311312
312313/* Upsert a PreToolUse hook in ~/.claude/settings.json for Claude Code.
313- * Adds a Grep|Glob matcher that reminds to use MCP tools.
314+ * Adds a Grep|Glob|Bash matcher that reminds to use MCP tools.
314315 * Returns 0 on success. */
315316int cbm_upsert_claude_hooks (const char * settings_path );
316317
@@ -506,7 +507,7 @@ int cbm_cmd_config(int argc, char **argv);
506507
507508/* hook-augment: stdin-driven Claude Code PreToolUse augmenter.
508509 * Reads the hook JSON from stdin and emits hookSpecificOutput.additionalContext
509- * with search_graph hits for Grep/Glob calls. NEVER blocks: every failure
510+ * with search_graph hits for Grep/Glob/Bash search calls. NEVER blocks: every failure
510511 * path returns 0 with no stdout output. */
511512int cbm_cmd_hook_augment (int argc , char * * argv );
512513
@@ -524,6 +525,10 @@ char *cbm_hook_augment_lifecycle_json_for(const char *input, const char *forced_
524525 * hard fail-open deadline without constructing a local MCP/store instance. */
525526void cbm_hook_augment_arm_deadline (void );
526527char * cbm_hook_augment_read_stdin (void );
528+ /* Pure no-op gate for the hook-client fast path (see hook_augment.c). */
529+ bool cbm_hook_augment_input_is_noop_bash (const char * input );
530+ /* Hand back stdin bytes main() consumed early; the next read returns them. */
531+ void cbm_hook_augment_prefetch_stdin (char * owned );
527532
528533/* Why a hook client is not augmenting. The hook caller only ever sees stdout,
529534 * so each reason that is actionable by the user must have a stdout notice
0 commit comments