Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ _testmain.go
*.test
*.prof
.idea/
.claude/

che-machine-exec
2 changes: 1 addition & 1 deletion devfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ components:
type: terminal-dev
protocol: ws
secure: false
image: registry.access.redhat.com/ubi9/go-toolset:1.25.5-1770596585
image: registry.access.redhat.com/ubi9/go-toolset:1.25.9-1778675823
args:
- tail
- '-f'
Expand Down
74 changes: 74 additions & 0 deletions timeout/.noidle.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Example .noidle configuration for CLI Watcher
#
# This file shows all available configuration options.
# For minimal config, see .noidle.minimal (just 'enabled: true' is enough!)
#
# Place this file in your project directory, or in $HOME/.noidle
# You can also set CLI_WATCHER_CONFIG environment variable to specify a custom path.
#
# NOTE: Comments (lines starting with #) are part of YAML syntax and work fine.
# Copy any section below directly into your .noidle file.

enabled: true
checkPeriod: 30 # How often to check for active processes (accepts: 30, 30s, etc.)
activityWindow: 25m # How long to wait for activity from interactive processes
gracePeriod: 5m # All processes prevent idling when this young
maxProcessAge: 6h # Safety limit to prevent indefinite idling prevention

watchedCommands:
# Simple string format (backward compatible)
# These commands will be auto-detected (interactive vs work process)
- claude # AI assistant, will be auto-detected as interactive (checks for user input activities)
- gemini # AI assistant, will be auto-detected as interactive (checks for user input activities)
- kubectl # Kubernetes deployment, will be auto-detected as non-interactive (always prevents idling)

# Object format with explicit interactive mode control
- name: vim
interactive: auto # Auto-detect based on foreground + TTY read behavior

# Force interactive mode (always check for user input activity)
- name: claude
interactive: true # Force interactive even if auto-detection thinks otherwise

# Long-running build/deploy commands - force non-interactive (always prevent idling)
- name: npm
interactive: false # Force non-interactive (always prevent idling)

- name: docker
interactive: no # Same as 'false'

- name: gradle
interactive: false # Force non-interactive (always prevent idling during builds)

# Override always-ignored commands (USE WITH CAUTION)
- name: watch
interactive: false
forceWatch: true # Override always-ignored list to watch 'watch' command
# Normally 'watch', 'top', 'htop', 'tail' are always ignored

- name: top
forceWatch: yes # Also accepts: true, yes, false, no (default: false)

# Interactive mode options:
# - auto: Auto-detect (foreground + has read from TTY → interactive, otherwise → work process)
# - true/yes: Force interactive (always check for user input activity)
# - false/no: Force non-interactive work process (always prevent idling, default)
#
# ForceWatch option (optional, defaults to false):
# - true/yes: Override always-ignored list (tail, watch, top, htop) to monitor this command
# - false/no: Respect always-ignored list (default behavior)
# WARNING: Use forceWatch with caution. Always-ignored commands are typically passive
# monitoring tools that shouldn't prevent workspace idling.
#
# Global settings:
# - activityWindowSeconds: How long to wait for input from interactive processes (default: 1500 = 25 min)
# - gracePeriodSeconds: All processes prevent idling when younger than this (default: 300 = 5 min)
# - checkPeriodSeconds: How often to scan for processes (default: 60 = 1 min)
#
# Unconfigured commands:
# - Auto-detected as interactive or work process during grace period
# - After grace period: interactive processes checked for activity, work processes always prevent idling
#
# Always-ignored commands (never prevent idling):
# - tail, watch, top, htop (passive monitoring tools)
# These are always ignored even if explicitly listed in watchedCommands.
32 changes: 32 additions & 0 deletions timeout/.noidle.minimal
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Minimal .noidle configuration
#
# This is the absolute minimum needed to enable CLI watcher.
# All user processes will be watched with smart defaults.
#
# NOTE: Comments (lines starting with #) are supported in YAML.
# You can copy these examples directly into your .noidle file.

enabled: true

# That's it! With just this, the CLI watcher will:
#
# ✅ Watch ALL user-initiated processes (processes with TTY from user terminals)
# ✅ Auto-detect interactive processes (vim, python REPL, etc.) vs work processes (builds, deploys)
# ✅ Interactive processes: check for user input activity within 25 minutes
# ✅ Work processes: always prevent idling while running
# ✅ All processes: prevent idling for first 5 minutes (grace period)
# ✅ Safety limit: stop preventing idling after 6 hours (catches hung/forgotten processes)
# ✅ Ignore passive monitoring tools: tail, watch, top, htop
#
# You can override any defaults:
#
# checkPeriod: 45 # Check every 45 seconds instead of default 60
# activityWindow: 30m # 30 minutes instead of default 25m
# gracePeriod: 10m # 10 minutes instead of default 5m
# maxProcessAge: 8h # 8 hours instead of default 6h
#
# Explicitly configure specific commands only if you need to override auto-detection:
#
# watchedCommands:
# - name: myTool
# interactive: false # Force non-interactive (always prevent idling)
Loading
Loading