ECC/scripts/hooks
Nomadu27 44dc96d2c6 fix: address CodeRabbit review — convert to PreToolUse, add type annotations, logging
Critical fixes:
- Convert hook from PostToolUse to PreToolUse so exit(2) blocking works
- Change all python references to python3 for cross-platform compat
- Add insaits-security-wrapper.js to bridge run-with-flags.js to Python

Standard fixes:
- Wrap hook with run-with-flags.js so users can disable via
  ECC_DISABLED_HOOKS="pre:insaits-security"
- Add "async": true to hooks.json entry
- Add type annotations to all function signatures (Dict, List, Tuple, Any)
- Replace all print() statements with logging module (stderr)
- Fix silent OSError swallow in write_audit — now logs warning
- Remove os.environ.setdefault('INSAITS_DEV_MODE') — pass dev_mode=True
  through monitor constructor instead
- Update hooks/README.md: moved to PreToolUse table, "detects" not
  "catches", clarify blocking vs non-blocking behavior

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 17:52:44 +01:00
..
auto-tmux-dev.js fix: auto-start dev servers in tmux instead of blocking (#344) 2026-03-07 14:47:46 -08:00
check-console-log.js Fix stdin overflow bug in hook scripts - truncate chunks to stay within MAX_STDIN limit 2026-02-18 07:40:12 +00:00
check-hook-enabled.js feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
cost-tracker.js feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
doc-file-warning.js feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
evaluate-session.js Fix stdin overflow bug in hook scripts - truncate chunks to stay within MAX_STDIN limit 2026-02-18 07:40:12 +00:00
insaits-security-monitor.py fix: address CodeRabbit review — convert to PreToolUse, add type annotations, logging 2026-03-10 17:52:44 +01:00
insaits-security-wrapper.js fix: address CodeRabbit review — convert to PreToolUse, add type annotations, logging 2026-03-10 17:52:44 +01:00
post-bash-build-complete.js feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
post-bash-pr-created.js feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
post-edit-console-warn.js Merge branch 'affaan-m:main' into main 2026-02-18 18:33:04 +05:30
post-edit-format.js Merge pull request #252 from pythonstrup/feat/auto-detect-formatter 2026-02-24 09:24:15 -08:00
post-edit-typecheck.js Fix stdin overflow bug in hook scripts - truncate chunks to stay within MAX_STDIN limit 2026-02-18 07:40:12 +00:00
pre-bash-dev-server-block.js fix(hooks): allow tmux-wrapped dev server commands (#321) 2026-03-07 14:47:49 -08:00
pre-bash-git-push-reminder.js feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
pre-bash-tmux-reminder.js feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
pre-compact.js fix: nullish coalescing in evaluate-session config, narrow pre-compact glob, add 11 tests 2026-02-13 02:42:01 -08:00
pre-write-doc-warn.js feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
quality-gate.js feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
run-with-flags-shell.sh feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
run-with-flags.js feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
session-end-marker.js feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
session-end.js feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
session-start.js feat: automatic project type and framework detection (#293) 2026-03-02 22:07:10 -08:00
suggest-compact.js fix(hooks): scrub secrets and harden hook security (#348) 2026-03-07 14:47:31 -08:00