mirror of
https://github.com/Jeuners/ECC.git
synced 2026-09-09 15:02:30 +02:00
* fix: auto-start development servers in tmux instead of blocking Replace blocking PreToolUse hook that used process.exit(2) with an auto-transform hook that: - Detects development server commands - Wraps them in tmux with directory-based session names - Runs server detached so Claude Code is not blocked - Provides confirmation message with log viewing instructions Benefits: - Development servers no longer block Claude Code execution - Each project gets its own tmux session (allows multiple projects) - Logs remain accessible via 'tmux capture-pane -t <session>' - Non-blocking: if tmux unavailable, command still runs (graceful fallback) Implementation: - Created scripts/hooks/auto-tmux-dev.js with transform logic - Updated hooks.json to reference the script instead of inline node command - Applied same fix to cached plugin version (1.4.1) for immediate effect * fix: resolve PR #344 code review issues in auto-tmux-dev.js Critical fixes: - Fix variable scope: declare 'input' before try block, not inside - Fix shell injection: sanitize sessionName and escape cmd for shell - Replace unused execFileSync import with spawnSync Improvements: - Add real Windows support using cmd /k window launcher - Add tmux availability check with graceful fallback - Update header comment to accurately describe platform support Test coverage: - Valid JSON input: transforms command for respective platform - Invalid JSON: passes through raw data unchanged - Unsupported tools: gracefully falls back to original command - Shell metacharacters: sanitized in sessionName, escaped in cmd * fix: correct cmd.exe escape sequence for double quotes on Windows Use double-quote doubling ('""') instead of backslash-escape ('\\\") for cmd.exe syntax. Backslash escaping is Unix convention and not recognized by cmd.exe. This fixes quoted arguments in dev server commands on Windows (e.g., 'npm run dev --filter="my-app"'). |
||
|---|---|---|
| .. | ||
| auto-tmux-dev.js | ||
| check-console-log.js | ||
| check-hook-enabled.js | ||
| cost-tracker.js | ||
| doc-file-warning.js | ||
| evaluate-session.js | ||
| post-bash-build-complete.js | ||
| post-bash-pr-created.js | ||
| post-edit-console-warn.js | ||
| post-edit-format.js | ||
| post-edit-typecheck.js | ||
| pre-bash-dev-server-block.js | ||
| pre-bash-git-push-reminder.js | ||
| pre-bash-tmux-reminder.js | ||
| pre-compact.js | ||
| pre-write-doc-warn.js | ||
| quality-gate.js | ||
| run-with-flags-shell.sh | ||
| run-with-flags.js | ||
| session-end-marker.js | ||
| session-end.js | ||
| session-start.js | ||
| suggest-compact.js | ||