ECC/scripts/hooks
Affaan Mustafa 90ea2f327c fix: 2 bugs fixed, 17 tests added for hook scripts
Bug fixes:
- evaluate-session.js: whitespace-tolerant regex for counting user
  messages in JSONL transcripts (/"type":"user"/ → /"type"\s*:\s*"user"/)
- session-end.js: guard against null elements in content arrays
  (c.text → (c && c.text) to prevent TypeError)

New tests (17):
- evaluate-session: whitespace JSON regression test
- session-end: null content array elements regression test
- post-edit-console-warn: 5 tests (warn, skip non-JS, clean files,
  missing file, stdout passthrough)
- post-edit-format: 3 tests (empty stdin, non-JS skip, invalid JSON)
- post-edit-typecheck: 4 tests (empty stdin, non-TS skip, missing file,
  no tsconfig)

Total test count: 191 (up from 164)
2026-02-12 16:02:31 -08:00
..
check-console-log.js fix: use readFile utility in hooks and add pattern type safety 2026-02-12 15:28:30 -08:00
evaluate-session.js fix: 2 bugs fixed, 17 tests added for hook scripts 2026-02-12 16:02:31 -08:00
post-edit-console-warn.js fix: remove unused fs imports in 3 hook scripts 2026-02-12 15:33:51 -08:00
post-edit-format.js fix: remove unused fs imports in 3 hook scripts 2026-02-12 15:33:51 -08:00
post-edit-typecheck.js fix: use readFile utility in hooks and add pattern type safety 2026-02-12 15:28:30 -08:00
pre-compact.js feat: cross-platform support with Node.js scripts 2026-01-22 23:08:07 -08:00
session-end.js fix: 2 bugs fixed, 17 tests added for hook scripts 2026-02-12 16:02:31 -08:00
session-start.js fix: remove unused fs imports in 3 hook scripts 2026-02-12 15:33:51 -08:00
suggest-compact.js fix: migrate hooks to stdin JSON input, fix duplicate main() calls, add threshold validation 2026-02-12 15:33:55 -08:00