feat: Enhanced CLI Watcher with automatic terminal process monitoring#363
Open
vrubezhny wants to merge 1 commit into
Open
feat: Enhanced CLI Watcher with automatic terminal process monitoring#363vrubezhny wants to merge 1 commit into
vrubezhny wants to merge 1 commit into
Conversation
CLI Watcher now automatically detects and tracks terminal-based development activity, distinguishing between interactive CLIs (vim, REPLs) and work processes (builds, deploys) without manual configuration. Key Features: - Fully automatic: Only requires 'enabled: true' - auto-detects ALL terminal processes - Smart defaults: Adapts activityWindow and gracePeriod to workspace idle timeout - Automatic classification: Interactive (vim, python REPL) vs work (builds, deploys) - Backward compatible: Old configs continue working with deprecation warnings - Safety mechanisms: Grace period (5min), max age limit (6h), activity monitoring - Flexible duration parsing: Accepts 6h, 25m, 60 (seconds), or duration strings Configuration: - Minimal: enabled: true (that's it!) - Smart defaults: Auto-calculated from workspace idle timeout - Time settings: checkPeriod, activityWindow, gracePeriod, maxProcessAge - Override options: watchedCommands (fix misclassification), ignoredCommands (skip entirely) Technical Implementation: - User process filtering: Parent TTY chain analysis (filters shells, system processes) - Interactive detection: Foreground process group + TTY read analysis - Activity tracking: TTY access time (Atime) monitoring for user input - Multicall binary support: Uses /proc/comm for proper command detection - Self-skip: che-machine-exec doesn't watch itself - Config validation: Warns about misconfigurations without breaking Documentation: - timeout/CLI-WATCHER.md - Comprehensive guide with testing scenarios - timeout/.noidle.minimal - Minimal config example - timeout/.noidle.example - Full config with all options Issue: https://redhat.atlassian.net/browse/CRW-11505 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CLI Watcher now automatically detects and tracks terminal-based development activity, distinguishing between interactive CLIs (vim, REPLs) and work processes (builds, deploys) without manual configuration.
Key Features:
Configuration:
Technical Implementation:
Documentation:
Issue: https://redhat.atlassian.net/browse/CRW-11505