Skip to main content

mati_core/hooks/
codex_post_bash.rs

1/// Codex PostToolUse(Bash) hook.
2///
3/// Thin wrapper that delegates to `mati hook-decide codex-post-bash`.
4/// Logs shell-read compliance for analytics. No content injection —
5/// context delivery is handled by mem_get (agent-initiated) and
6/// PreToolUse exit 2 (hard block on unconsulted reads).
7pub const SCRIPT: &str = r#"#!/usr/bin/env bash
8set -euo pipefail
9HOOKS_DIR="$(cd "$(dirname "$0")" && pwd)" && export PATH="$HOOKS_DIR:$PATH"
10command -v mati >/dev/null 2>&1 || exit 0
11exec mati hook-decide codex-post-bash
12"#;