Commit Graph
100 Commits
Author SHA1 Message Date
arkonandClaude Opus 4.5 40df0748c5 ui: improve respawn controller layout and filter action log noise
- Stack timers row vertically (timers on top, action log below)
- Reduce action log height to 60px since it's now full width
- Filter action log to show only important entries:
  - Commands sent to console
  - Plan-check with action taken
  - Step completions
- Skip timer starts/cancels, detection updates, ai-check status

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 19:59:42 +01:00
arkonandClaude Opus 4.5 c6b16bf815 fix: subagent title extraction race condition
- Add 100ms debounce for new file detection to allow content to be written
- Add subagent:updated event for retroactive description updates
- Extract description in processEntry when first user message is processed
- Add extractDescriptionFromFile helper with retry in file change handler
- Update SubagentTranscriptEntry.content type to support string | array
- Add test coverage for subagent:updated event

Fixes 43% failure rate where subagents displayed raw IDs instead of descriptions
due to race condition when files were discovered before first line was written.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 19:49:58 +01:00
arkonandClaude Opus 4.5 87bdd9376c ui: make Subagents panel detachable and position on right side
- Move Subagents panel to right side (same as Monitor)
- Add detach/float functionality with drag support
- Add resize handle for detached mode
- Clean up duplicate CSS
- Bump version to 0.1358

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 18:33:43 +01:00
arkonandClaude Opus 4.5 dc1dc5844e ui: add JavaScript logic for standalone Subagents panel
- Add closeSubagentsPanel() and toggleSubagentsPanel() methods
- Add showSubagents setting to app settings
- Update applyMonitorVisibility() to handle subagents panel visibility

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 18:11:45 +01:00
arkonandClaude Opus 4.5 04e25b6b7d ui: separate Subagents panel from Monitor panel
- Move subagents view into its own independent panel
- Position subagents panel to the left of monitor panel
- Add collapsible/closeable behavior for subagents panel
- Add responsive stacking on small screens
- Simplify monitor panel (now just Screen Sessions + Background Tasks)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 18:11:14 +01:00
arkonandClaude Opus 4.5 0d22d19645 docs: improve CLAUDE.md structure and discoverability
- Move COM shorthand to prominent position after safety warning
- Add version sync note (must match package.json)
- Consolidate Key Files into 4 logical categories
- Clarify next available test port (3128)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 18:09:25 +01:00
arkonandClaude Opus 4.5 8094a756c6 feat: smart title extraction for subagent descriptions
- Condenses long prompts to ~45 chars while preserving meaning
- Removes filler words (the, a, please, I need you to, etc.)
- Cuts at natural boundaries (colons, dashes, commas)
- Falls back to word-boundary truncation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 17:56:31 +01:00
arkonandClaude Opus 4.5 953d9845ca fix: subagent description extraction for JSONL format
The JSONL files have message.content as a direct string, not an array
of content blocks. Now handles both formats correctly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 17:51:59 +01:00
arkonandClaude Opus 4.5 74bcede607 ui: add double-click to open subagent tracking window
Double-click on subagent items in the Subagents tab to open
the floating tracking window. Includes tooltip hint.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 17:47:44 +01:00
arkonandClaude Opus 4.5 cec9608b66 ui: improve subagent window titles and readability
- Extract better titles from task description (first line/sentence)
- Make subagent window text white for better readability
- Expand monitor panel to 700px when subagents tab is active
- Add smooth width transition when switching tabs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 17:40:28 +01:00
arkonandClaude Opus 4.5 ad24020cdc feat: add real-time subagent visibility - monitor Claude Code background agents
- Add SubagentWatcher service that discovers and tails Claude Code's subagent
  transcript files (~/.claude/projects/.../subagents/agent-*.jsonl)
- Track tool calls, progress events, and messages in real-time via file watching
- Add SSE events for subagent:discovered, subagent:tool_call, subagent:progress,
  subagent:message, subagent:completed
- Add REST API endpoints: GET /api/subagents, /api/subagents/:id,
  /api/subagents/:id/transcript
- Add subagent panel in Monitor section showing active agents and their activity
- Add floating draggable windows that auto-open for each active agent
- Add standalone CLI tool: scripts/watch-subagents.ts for terminal monitoring

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 14:33:12 +01:00
arkonandClaude Opus 4.5 4c34966827 ui: hide case folder display from bottom toolbar
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 09:11:48 +01:00
arkonandClaude Opus 4.5 437322fb80 docs: document test cleanup patterns and known issues in CLAUDE.md
Added documentation about test cleanup patterns, known issues with
session/case cleanup in specific test files, and manual cleanup commands
for orphaned test resources.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 09:08:57 +01:00
arkonandClaude Opus 4.5 9d42ff5bb6 fix: sticky scroll on tab switch - keep terminal at bottom after new output
Add isTerminalAtBottom() helper and modify batchTerminalWrite() to implement
sticky scroll behavior. When SSE terminal data arrives after tab switch,
terminal now stays scrolled to Claude input if user was already at bottom.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 08:30:42 +01:00
arkonandClaude Opus 4.5 fc97f6a41a refactor: extract AI checker base class + fix persistence + dedupe restoration
- Add AiCheckerBase abstract class to eliminate ~700 lines of duplication
  between AiIdleChecker and AiPlanChecker
- Fix missing persistence fields (completionConfirmMs, noOutputTimeoutMs)
  that caused custom timing values to be lost on server restart
- Extract restoreRespawnController() helper to dedupe session restoration
  logic between state.json and screens.json paths

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 08:25:51 +01:00
arkonandClaude Opus 4.5 3455b27f6f fix: respawn disabled state not persisted across server restarts
When /respawn/stop was called, the controller was stopped but remained
in the respawnControllers map. This caused persistSessionState() to
still read config.enabled=true and save respawnEnabled=true to state.json.

On server restart, the respawn controller would be re-enabled because
state.json had respawnEnabled=true.

Fix: Remove controller from map and clear any timed respawn when
/respawn/stop is called, so persistSessionState() correctly sets
respawnEnabled=false.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 08:01:57 +01:00
arkonandClaude Opus 4.5 044021953a docs: add ai-plan-checker, test utilities, and update respawn state machine
- Add ai-plan-checker.ts to CLAUDE.md Key Files table
- Document test utilities (MockSession, MockAiIdleChecker, MockAiPlanChecker)
- Update port allocation (3127 reserved for respawn-integration)
- Add ai_checking state to respawn state diagram
- Document AI Plan Checker in respawn-state-machine.md
- Add references to test documentation files

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 07:57:12 +01:00
arkonandClaude Opus 4.5 eb98caa812 fix: use temp file for plan checker prompt to avoid E2BIG + fix cancel race condition
The ai-plan-checker.ts was passing the prompt directly as a shell argument,
which can cause E2BIG errors when the terminal buffer is large (8KB+).
This fix applies the same temp file approach already used in ai-idle-checker.ts:
- Write prompt to a temp file instead of passing as shell argument
- Pipe the file to claude via stdin: `cat prompt.txt | claude -p ...`
- Clean up prompt file after check completes

Also fixes a race condition in the cancel() method of both AI checkers where
the poll timer could fire between setting checkCancelled and clearing timers.
Now timers are cleared before resolving the promise to prevent this race.

Includes test utilities and analysis documents for the respawn controller
created by other agents:
- test/respawn-test-utils.ts - MockSession, MockAiIdleChecker utilities
- test/respawn-analysis.md - Code analysis and issue identification
- test/respawn-scenarios.md - Test scenario documentation
- test/respawn-test-plan.md - Testing architecture documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 07:52:40 +01:00
arkonandClaude Opus 4.5 4d1da8bb71 fix: persist respawn config across server restarts
- persistSessionState() now saves respawnEnabled based on config.enabled
  (user intent) instead of controller.state (running state)
- cleanupSession() saves respawn config BEFORE removing controller
- AiIdleChecker and AiPlanChecker constructors filter undefined values
  to prevent overwriting defaults (fixes "timed out after undefinedms")
- updateConfig() methods also filter undefined values

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 07:42:05 +01:00
arkonandClaude Opus 4.5 8c17c54a3a fix: prevent undefined config values from overwriting AI checker defaults
When respawn config objects had explicit undefined values for fields like
aiIdleCheckTimeoutMs, the spread operator would overwrite defaults with
undefined, causing "AI check timed out after undefinedms" errors.

- Add default fallbacks when saving pre-config in server.ts
- Filter out undefined values before spreading in RespawnController
- Add tests verifying undefined filtering works correctly

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 07:28:30 +01:00
arkonandClaude Opus 4.5 e56c8626e4 feat: persistent token tracking with global stats aggregation
- Add restoreTokens() method to Session class for recovery after restart
- Add GlobalStats type for cumulative usage tracking across all sessions
- Accumulate tokens from deleted sessions into global stats
- Track lifetime session count with incrementSessionsCreated()
- Add /api/stats endpoint for global stats
- Include globalStats in /api/status response
- Frontend shows aggregate tokens + cost in header
- Fix respawn controller config to filter undefined values
- Add 7 new tests for global stats functionality (v0.1343)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 07:26:49 +01:00
arkonandClaude Opus 4.5 0aca55b099 fix: use temp file for AI check prompt to avoid E2BIG spawn error
The AI idle checker was passing the prompt (including up to 16KB of terminal
buffer) as a command-line argument to bash -c, which exceeded the Linux
argument size limit causing "spawn E2BIG" errors.

Now writes the prompt to a temp file and pipes it to claude via stdin,
avoiding the argument size limit entirely. Temp file is cleaned up both
in the normal case (by the shell command) and on cancellation/timeout.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 06:54:56 +01:00
arkonandClaude Opus 4.5 706392d264 fix: prevent respawn cycle after plan mode auto-accept + enhance action log UI
- Add state check in startPlanCheck() to prevent Enter if state changed
- sendAutoAcceptEnter() now cancels pending AI idle checks and resets state
- Log auto-accept as [command] type for visibility in action log
- Highlight command entries with blue background in action log
- Show action log row when there are actions (not just timers)
- Increase action log height and opacity for better visibility

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 06:46:20 +01:00
arkonandClaude Opus 4.5 eef6c0690e docs: COM always bumps version in both files (v0.1340)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 05:54:54 +01:00
arkonandClaude Opus 4.5 e1ef848817 docs: clarify COM updates both package.json and CLAUDE.md for version
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 05:54:18 +01:00
arkonandClaude Opus 4.5 6e8878b398 chore: bump package.json version to 0.1339
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 05:53:56 +01:00
arkonandClaude Opus 4.5 0f3a85dc0a docs: add COM shorthand for commit-push-build-restart workflow
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 05:53:21 +01:00
arkonandClaude Opus 4.5 6dba5e9671 fix: improve screen sendInput reliability with retry logic (v0.1339)
- Add 100ms delay between text and carriage return to prevent race conditions
- Add retry logic (up to 3 attempts) for carriage return with increasing delays
- Trim trailing whitespace from text to avoid spurious spaces
- Better error logging for debugging input delivery issues

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 05:52:34 +01:00
arkonandClaude Opus 4.5 0f9caa9d29 feat: improve respawn display readability and AI check info (v0.1338)
- State label now white on green pill for better visibility
- AI check shows detailed status with color-coded badges:
  - Blue: Analyzing terminal output
  - Green: Idle confirmed
  - Yellow: Working detected
  - Gray: Disabled
- Shows time since last check when recent (<2min)
- Bump version to 0.1338

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 05:00:43 +01:00
arkonandClaude Opus 4.5 c6588ce352 refactor: simplify respawn controller display and improve CLAUDE.md
Respawn banner changes:
- Human-friendly state labels (e.g., "Kickstarting..." vs "waiting_kickstart")
- Removed redundant "→ waiting for" text
- Simplified AI check display (only shows when actively checking)
- Shorter cycle counter (#1 vs "Cycle 1")
- Fixed NaN timer bug with validation
- Flatter HTML structure

CLAUDE.md improvements:
- Reorganized Commands section into clear subsections
- Test port allocation in table format
- Simplified TypeScript config section
- Removed duplicate keyboard shortcuts (already in README)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 04:57:09 +01:00
arkonandClaude Opus 4.5 071960aba9 docs: add version, keyboard shortcuts, and test config details to CLAUDE.md
- Add version 0.1337 to project overview
- Add keyboard shortcuts section for web UI (Ctrl+Enter, Ctrl+W, etc.)
- Add teardown timeout (60s) and coverage excludes to test comments

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 04:07:43 +01:00
arkonandClaude Opus 4.5 ee6b6596d6 feat: add version display in toolbar (v0.1337)
- Display version number in center of bottom toolbar
- Load version from package.json via server's /api/status
- Version shown on initial load and SSE reconnect

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 04:04:24 +01:00
arkonandClaude Opus 4.5 d19d6ceddd feat: add respawn controller verbosity with countdown timers and bug fixes
- Fix "enable twice" bug: add enabled:true to getModalRespawnConfig()
- Add timer tracking with countdown display in respawn banner
- New events: timerStarted, timerCancelled, timerCompleted, actionLog
- Show active timers with progress bars and recent action log
- Skip remaining timeouts after AI check returns IDLE/WORKING verdict
- Enhanced DetectionStatus with activeTimers, recentActions, currentPhase

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 03:57:44 +01:00
arkonandClaude Opus 4.5 ae4c445601 feat: add AI-powered plan mode detection for auto-accept
Adds a two-stage gate before auto-accepting plan mode prompts:
1. Strict regex pre-filter - checks for numbered options + selector
2. AI confirmation - spawns Opus to classify as PLAN_MODE or NOT_PLAN_MODE

This prevents spurious Enter key presses when Claude is paused mid-thought
or experiencing network lag, rather than showing a plan approval prompt.

New files:
- src/ai-plan-checker.ts: AI checker following ai-idle-checker.ts pattern

Config fields added to RespawnConfig:
- aiPlanCheckEnabled (default: true)
- aiPlanCheckModel (default: claude-opus-4-5-20251101)
- aiPlanCheckMaxContext (default: 8000)
- aiPlanCheckTimeoutMs (default: 60000)
- aiPlanCheckCooldownMs (default: 30000)

New events: planCheckStarted, planCheckCompleted, planCheckFailed

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 02:55:43 +01:00
arkonandClaude Opus 4.5 5ce95ee1ba fix: respawn controller stuck after AI check and AI check PATH discovery
Two bugs fixed:

1. Respawn controller got stuck after AI check returned WORKING/ERROR.
   The pre-filter and no-output timers fired once but were never restarted,
   leaving the controller in a dead 'watching' state with no retry mechanism.
   Now restarts both timers after any non-IDLE AI check result and on
   cooldown expiry. Also seeds the controller's terminal buffer from the
   session's existing output so the first AI check has context.

2. AI idle checker couldn't find the claude binary in restricted environments
   (systemd service). The spawned screen ran `claude -p` without PATH
   augmentation. Now exports getAugmentedPath() from session.ts and prepends
   it in the AI checker's bash command.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 20:19:55 +01:00
arkonandClaude Opus 4.5 6025edd0b5 fix: remove duplicate border-left next to CPU stat
The header-system-stats had its own border-left in addition to the
header-right border-left, creating two vertical lines. Removed the
inner one for a cleaner look.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 19:57:28 +01:00
arkonandClaude Opus 4.5 7ec3e18044 fix: remove MEM stat from header, keep only CPU
Frees up horizontal space for session tabs in the header bar.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 19:54:34 +01:00
arkonandClaude Opus 4.5 e924cd3296 fix: reduce spacing between system stats and notification icon
Reduce header-right gap from 1rem to 0.5rem and remove margin-left
from notification button for tighter grouping.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 19:52:48 +01:00
arkonandClaude Opus 4.5 4b6248ac78 fix: align notification and settings icons at same height
Replace gear emoji with SVG icon matching the bell, remove extra margin
between them, and ensure both sit at the same vertical position.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 19:51:24 +01:00
arkonandClaude Opus 4.5 1cb5e62cc2 docs: extract respawn and spawn protocol details into dedicated docs
Condense CLAUDE.md by moving detailed state machine diagrams and spawn
protocol specs into docs/respawn-state-machine.md and docs/spawn-protocol.md.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 19:47:07 +01:00
arkonandClaude Opus 4.5 2bfebc5dba fix: replace notification bell emoji with gray SVG icon
Use an inline SVG bell that inherits currentColor, matching the gray
monochrome style of the settings gear icon.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 19:45:37 +01:00
arkonandClaude Opus 4.5 1674f3420c feat: promote Notification System as top feature in README
Moved the notifications section to the first position under "What Claudeman Does"
and renamed it to "Notification System" for better visibility.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 19:44:34 +01:00
arkonandClaude Opus 4.5 973358859f fix: prevent systemd from killing screen sessions on service restart
Default KillMode=control-group kills all processes in the cgroup,
including spawned GNU screen sessions. KillMode=process only kills
the node server, allowing screens to survive restarts and be
reattached via reconcileScreens().

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 19:37:39 +01:00
arkonandClaude Opus 4.5 5c2937342b fix: use DOM wheel listener instead of non-existent xterm API
attachCustomWheelEventHandler doesn't exist in xterm.js 5.3.0,
causing initTerminal() to crash and abort all app initialization.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 19:35:11 +01:00
arkonandClaude Opus 4.5 3f082c5e01 fix: prevent mouse wheel from cycling plan mode options instead of scrolling
Claude's Ink UI enables terminal mouse reporting, causing xterm.js to
forward wheel events to the application. This made scrolling up to read
the plan impossible. Intercept wheel events to always scroll the terminal
viewport directly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 19:21:04 +01:00
arkonandClaude Opus 4.5 b98913e328 refactor: move auto-compact/clear to new Context tab in session options
Split the session options modal into three tabs (Respawn, Context,
Ralph/Todo) to reduce vertical height. Removed redundant header and
border from the Respawn section. Also condensed CLAUDE.md and added
AI idle checker documentation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 19:12:47 +01:00
arkonandClaude Opus 4.5 0e56e590f3 feat: add AI-powered idle check for respawn controller
Replace the "Worked for Xm Xs" pattern as the sole primary idle
detection signal with a final AI-powered check. When pre-filter
conditions are met (output silence, no working patterns, tokens
stable), a fresh Claude CLI session is spawned in a screen to
analyze terminal output and provide a definitive IDLE/WORKING
verdict before proceeding with the respawn cycle.

New state in state machine: `ai_checking` (between pre-filter
confirmation and `sending_update`). WORKING verdict triggers a
3-minute cooldown. Errors auto-disable after 3 consecutive
failures, falling back to the existing noOutputTimeoutMs safety net.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 18:48:37 +01:00
arkonandClaude Opus 4.5 de8033fed5 docs: update docs for claude CLI PATH auto-resolution
Document the PATH augmentation behavior in PTY spawn modes, data flow,
screen-aware sessions, and requirements sections. Clarify that claude
does not need to be in the server's PATH as it's auto-discovered.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 17:53:16 +01:00
arkonandClaude Opus 4.5 19490dd763 fix: augment PATH with claude directory instead of using absolute path
The previous fix used absolute paths to spawn claude, but the CLI itself
checks if its directory is in PATH and warns if not. Instead, find where
claude is installed and prepend its directory to PATH in the spawn
environment. This ensures both execvp resolution and Claude's own PATH
check are satisfied.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 17:47:59 +01:00
arkonandClaude Opus 4.5 03a0cc862e fix: resolve claude CLI absolute path to prevent execvp failures
When the web server runs in environments where `claude` isn't in PATH
(e.g., systemd services, non-login shells), node-pty's execvp(3) fails
with "No such file or directory". Fix by resolving the absolute path
to the claude binary using `which` with fallback to common installation
locations (~/.local/bin, /usr/local/bin, etc.). The resolved path is
cached for performance.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 17:43:31 +01:00
arkonandClaude Opus 4.5 e55eca9824 docs: update all docs for security hardening, respawn fix, and test fixes
- CLAUDE.md: idle detection cancellation on substantial output, API input
  limits table, configure() method on RalphTracker, tighter completion
  pattern description
- ralph-wiggum-guide: add configure() to tracker methods table
- Both docs: update Last Updated date to 2026-01-24

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 16:26:31 +01:00
arkonandClaude Opus 4.5 e8eb6734e4 docs: update test badge to 1435 total tests
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 05:00:50 +01:00
arkonandClaude Opus 4.5 e8bb9f3493 fix: resolve 11 failing tests across 8 test files
- ralph-tracker: add ✓ to native todo pattern + pre-check, add configure() method
- session: remove stale message expectation from interactive endpoint test
- buffer-management: fix trim count expectations (1202 items triggers second trim)
- cli-commands: replace non-existent toStartWith with toMatch regex
- edge-cases: update error expectation for session-not-found on respawn config PUT
- ralph-integration: respawn config PUT without controller now saves as pre-config
- session-state: fix debouncer shouldFlush(0) - pass timestamp >= delayMs
- timing-utilities: attach catch handlers before advancing fake timers

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 04:58:44 +01:00
arkonandClaude Opus 4.5 d722aca2c7 refactor: pre-compile regex patterns and remove dead code
- task.ts: Cache completion phrase regex in constructor instead of
  re-creating on every checkCompletion() call. Add escapeRegex helper
  for safe RegExp construction from user-provided phrases.
- ralph-tracker.ts: Remove commented-out COMPLETION_SIGNAL_PATTERN

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 04:36:18 +01:00
arkonandClaude Opus 4.5 0ea7a21df2 fix: security hardening, SSE robustness, and API consistency
Security:
- Add sanitizeHookData() to whitelist/truncate hook event fields before SSE broadcast
- Add MAX_INPUT_LENGTH (64KB) validation on session input endpoint
- Add MAX_TERMINAL_COLS/ROWS bounds on resize endpoint
- Add MAX_SESSION_NAME_LENGTH on rename endpoint
- Remove Access-Control-Allow-Origin: * from SSE (same-origin only)
- Add X-Accel-Buffering: no header for nginx proxy compatibility

Robustness:
- Add SSE keep-alive comments in health check cycle (prevents proxy timeouts)
- Guard broadcast() against JSON.stringify failures (circular refs, BigInt)
- Prevent concurrent cleanup races with cleaningUp guard set
- Clear stateUpdatePending on session cleanup

API consistency:
- Normalize error responses to use createErrorResponse() with error codes
- Remove dead (session as any).ralphConfig assignment + unused destructuring

Performance:
- Pre-compile CLAUDE_BANNER_PATTERN, CTRL_L_PATTERN, LEADING_WHITESPACE_PATTERN

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 04:35:58 +01:00
arkonandClaude Opus 4.5 2e4320fee7 feat: hooks forward stdin data from Claude Code to notifications
The hook commands now read stdin JSON from Claude Code (contains tool_name,
tool_input, etc.) and forward it as the data field to the API. This enables
richer notifications showing actual context (e.g., "Bash: docker push prod").

Previously the curl commands only sent event type and session ID, losing
all hook context data.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 04:35:32 +01:00
arkonandClaude Opus 4.5 d1b40ab9e5 fix: respawn controller idle detection - prevent premature firing
Three improvements to prevent the respawn controller from sending update
prompts while Claude is still working:

1. Tighten COMPLETION_TIME_PATTERN to require "Worked for" prefix, avoiding
   false positives from bare time durations in regular text (e.g., "wait for 5s")
2. Increase completionConfirmMs default from 5s to 10s - Claude regularly
   pauses 5-8s between tool calls and during thinking
3. Cancel confirming_idle state when substantial output arrives (stripped of
   ANSI codes), instead of passively relying on the timer to self-restart

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 04:35:20 +01:00
arkonandClaude Opus 4.5 f95b02311c docs: update all docs for notifications, tab alerts, and systemd service
CLAUDE.md:
- Expanded HTTPS & Browser Notifications section with new behavior
  (default on, auto-permission, tab visibility rules, data forwarding)
- Added Tab Alert Blinking documentation (red/yellow, timing, clear triggers)
- Added Hook Event Data Forwarding section
- Added systemd service commands to Commands section
- Added scripts/claudeman-web.service to Key Files table
- Fixed switchToSession → selectSession in Frontend docs
- Added notification/tab alert timing constants
- Updated hook-event API route description
- Updated SSE events to mention data forwarding

README.md:
- Expanded notifications section with tab blinking and click-to-navigate
- Added systemd service install commands to Quick Start
- Updated hook-event API description

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 04:06:35 +01:00
arkonandClaude Opus 4.5 6393e00e95 fix: forward hook event data to notifications
The server was dropping the `data` field from hook-event POST requests,
so notifications always showed generic messages. Now forwards tool name,
command, question text, and reason to the frontend.

Notifications now show:
- permission_prompt: "Bash: docker push prod:latest"
- elicitation_dialog: "Merge PR #42 to main?"
- idle_prompt: custom message if provided
- stop: reason if provided

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 03:58:51 +01:00
arkonandClaude Opus 4.5 a2d4303300 feat: add systemd user service + slow down tab blink animations
- Add scripts/claudeman-web.service: respawning systemd user service
  for `claudeman web --https` (Restart=always, RestartSec=5)
- Slow tab blink animations: red 1s→2.5s, yellow 1.5s→3.5s
  with ease-in-out and reduced opacity for less aggressive feel

Install: symlink to ~/.config/systemd/user/, enable, start
Linger: loginctl enable-linger keeps it running after logout

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 03:52:13 +01:00
arkonandClaude Opus 4.5 7add243f39 feat: blinking tab alerts for sessions needing attention
- Red blink for action-required events (permission_prompt, elicitation_dialog)
- Yellow blink for idle sessions (idle_prompt)
- Alert clears when user clicks the tab or session starts working again
- Only blinks non-active tabs (active tab is already visible)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 03:49:19 +01:00
arkonandClaude Opus 4.5 66214478ff fix: browser notifications now fire correctly
Three issues fixed:
- Default browserNotifications to true (was false, never fired)
- Remove tab-visibility gate for critical/warning notifications
  (monitoring dashboard should alert regardless of tab focus)
- Auto-request Notification permission on first attempt instead of
  silently failing (re-sends the notification after permission granted)
- Migrate existing localStorage prefs from v1 default (false → true)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 03:37:40 +01:00
arkonandClaude Opus 4.5 4979df4a9f fix: notification click now navigates to affected session
switchToSession didn't exist - was calling a nonexistent method.
Changed to selectSession which actually switches the active tab and
loads the terminal buffer. Also enhanced browser push notifications
to navigate to the session when clicked (previously only focused window).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 03:33:56 +01:00
arkonandClaude Opus 4.5 d516609af5 docs: update all docs for hooks integration with elicitation_dialog
- Add hook:elicitation_dialog SSE handler in frontend (critical urgency)
- Add Desktop Notifications section to README with hook event table
- Add hooks API endpoint to README API reference
- Update CLAUDE.md SSE events and API routes for elicitation_dialog
- Add session log entry for hooks feature

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 03:20:03 +01:00
arkonandClaude Opus 4.5 10222075cb fix: restrict auto-accept to plan mode only, block AskUserQuestion prompts
The auto-accept feature was too aggressive - it would press Enter for any
silence without a completion message, including AskUserQuestion prompts.
Now uses the elicitation_dialog notification hook to detect when Claude is
asking a question, and blocks auto-accept in that case. Only plan mode
approvals (silence with no completion message AND no elicitation signal)
trigger auto-accept.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 03:10:02 +01:00
arkonandClaude Opus 4.5 b4aea57d9c feat: add Claude Code hooks for desktop notifications
Wire Claude Code's official hooks system (Notification, Stop) to POST
back to Claudeman's new /api/hook-event endpoint, which broadcasts SSE
events consumed by the existing NotificationManager for desktop alerts.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 02:46:24 +01:00
arkonandClaude Opus 4.5 f818fbb234 feat: persist notification preferences to server-side settings
Notification prefs are now included in the PUT /api/settings payload
and stored in ~/.claudeman/settings.json. On page load, server-stored
prefs are loaded as fallback when localStorage is empty (e.g. new
browser or cleared cache).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 02:19:46 +01:00
arkonandClaude Opus 4.5 1fb1007211 fix: hide notification bell icon when notifications are disabled
Also closes the notification drawer if it was open when the user
disables notifications in settings.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 02:17:27 +01:00
arkonandClaude Opus 4.5 582daf838c feat: add --https flag for self-signed TLS support
Enables the Web Notifications API when accessing via SSH tunnel or
non-localhost URLs. Self-signed cert is auto-generated with openssl
and stored in ~/.claudeman/certs/ for reuse across restarts.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 02:12:22 +01:00
arkonandClaude Opus 4.5 aa46d35970 chore: add todo.md to .gitignore
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 01:39:59 +01:00
arkonandClaude Opus 4.5 46c9e0f951 fix: clean up orphaned test screen sessions in afterAll
Integration tests create screen sessions via the web server, but
server.stop() intentionally preserves them (for reattachment in
production). This left 30+ detached screens after each test run.

Fix by recording pre-existing screens in beforeAll, then killing any
new detached claudeman-* screens in afterAll that weren't there at
test start. Never kills attached sessions (user's active work).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 01:34:57 +01:00
arkonandClaude Opus 4.5 0fc52902cc feat: add multi-layer browser notification system
Implement a 4-layer notification system for alerting users when Claude
Code sessions need attention:

1. Notification Drawer - persistent in-page log with bell icon + badge
2. Tab Title Updates - flashing title with unread count when unfocused
3. Web Notifications - browser push notifications when tab hidden
4. Audio Alerts - Web Audio API beep for critical events

Notification triggers:
- Critical: session errors, crashes (non-zero exit), agent failures/timeouts
- Warning: Ralph loop completions, budget warnings, stuck sessions (idle >10min)
- Info: auto-accepts, auto-clears, agent completions

Features:
- NotificationManager class with debouncing/grouping (5s window)
- Settings tab in App Settings with per-layer/per-urgency toggles
- Configurable idle threshold for stuck session detection
- Click notification to switch to relevant session
- Notification permission request flow
- Rate-limited browser notifications (max 1/3s)
- Idle timer cleanup on session delete

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 01:22:53 +01:00
arkonandClaude Opus 4.5 e40849da79 fix: scroll terminal to bottom on tab switch
After loading the terminal buffer on tab switch, xterm.js wasn't
guaranteed to be scrolled to the bottom, requiring users to manually
scroll down. Fix by:
1. Adding scrollToBottom() after chunkedTerminalWrite completes
2. Adding scrollToBottom() after terminal.focus()
3. Delaying chunkedTerminalWrite resolution by one extra rAF to ensure
   xterm.js has finished rendering the final chunk

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 00:53:47 +01:00
arkonandClaude Opus 4.5 99919d6dfb feat: replace SpawnDetector with MCP server for spawn1337 protocol
Instead of parsing terminal output for <spawn1337> tags, spawn capabilities
are now exposed as native MCP tools that Claude Code can call directly.
The MCP server (stdio transport) proxies requests to the existing REST API.

- Add src/mcp-server.ts with 6 tools: spawn_agent, list_agents,
  get_agent_status, get_agent_result, send_agent_message, cancel_agent
- Remove src/spawn-detector.ts and all references in session.ts/server.ts
- Add CLAUDEMAN_API_URL env var propagation to sessions and screens
- Write .mcp.json to case directories during creation
- Remove spawn1337 tag documentation from case-template.md
- Add claudeman-mcp bin entry to package.json

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 23:16:21 +01:00
arkonandClaude Opus 4.5 7c72802886 feat: add Spawn1337 protocol docs to case template
New sessions had no awareness of the spawn1337 agent protocol because
the case-template.md (copied as CLAUDE.md into every new case) was
missing the documentation. Added full spawn protocol reference including
tag syntax, task spec format, monitoring commands, and resource limits.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 22:32:42 +01:00
arkonandClaude Opus 4.5 9c322f7506 fix: make session numbering per-case instead of global
The w1/w2/s1/s2 session counter was scanning all sessions regardless
of case name, causing cross-case number inflation. Now only counts
sessions belonging to the same case when determining the next number.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 22:22:27 +01:00
arkonandClaude Opus 4.5 a41240049e feat: disable Ralph/Todo tracker auto-enable by default
Ralph tracker no longer auto-enables on pattern detection. It must be
explicitly enabled per-session (via API) or globally via the new
`ralphEnabled` AppConfig setting. Adds GET/PUT /api/config endpoints
for runtime configuration. Spawn agent ralph enable is unchanged.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 22:14:00 +01:00
arkonandClaude Opus 4.5 a39ae1d151 chore: add commands scratch file to .gitignore
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 21:56:44 +01:00
arkonandClaude Opus 4.5 8ff480f9e9 fix: preserve execute permission on dist/index.js during build
Add chmod +x after tsc compilation to prevent "Permission denied" errors
when running claudeman via npm link symlink.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 19:41:43 +01:00
arkonandClaude Opus 4.5 1c9272b6be docs: update all docs for spawn1337 protocol
- README: add spawn1337 section, update architecture diagram with
  orchestrator/detector, add spawn API endpoints, update test badge
  (1426 total)
- ralph-wiggum-guide: add spawn-related files to references
- All docs: update Last Updated dates to 2026-01-23

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 17:33:54 +01:00
arkonandClaude Opus 4.5 1705b7a67d feat: implement spawn1337 autonomous agent protocol
Add full lifecycle management for spawning autonomous Claude sessions as
screen-based agents. Agents communicate via filesystem message bus, signal
completion via RalphTracker <promise> mechanism, and enforce resource budgets
(tokens, cost, timeout, depth limits).

New files:
- spawn-types.ts: Types, YAML parser, factory functions, serialization
- spawn-detector.ts: Terminal pattern detection for spawn1337 tags
- spawn-orchestrator.ts: Agent lifecycle (spawn, monitor, queue, cleanup)
- spawn-claude-md.ts: CLAUDE.md generator for agent sessions

Modified:
- session.ts: SpawnDetector integration, parent/child tracking
- server.ts: Orchestrator wiring, 11 API endpoints, SSE events
- types.ts: Re-exports, SessionState additions

Tests: 80 new tests across 3 test files (all passing)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 10:20:37 +01:00
arkonandClaude Opus 4.5 33a8febf30 docs: document auto-accept prompts feature in CLAUDE.md
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 01:25:45 +01:00
arkonandClaude Opus 4.5 0e8c8b8c60 feat: auto-accept plan mode and question prompts in respawn controller
When Claude enters plan mode or asks a question (AskUserQuestion), output
stops without a completion message. The new autoAcceptPrompts feature
detects this state and sends Enter after a configurable delay (default 8s)
to accept the plan or select the default option, keeping Claude working
autonomously.

Enabled by default. Adds UI checkbox in the respawn config panel.
Safety: only fires once per silence period, requires prior output,
and won't fire during active respawn cycles.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 01:25:09 +01:00
arkonandClaude Opus 4.5 619f2a3403 fix: clean up test case directories after each test instead of at end
Moves case directory cleanup from afterAll to afterEach in all test
files that create cases. Previously, if the test suite was interrupted
or afterAll timed out, all case directories were left behind. Now each
test cleans up immediately after itself.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 22:54:26 +01:00
arkonandClaude Opus 4.5 afaa1d3adb refactor: move default CLAUDE.md template to bundled case-template.md
Replaces the ~400-line inline template string in claude-md.ts with a
file read from src/templates/case-template.md. Removes the hardcoded
/home/arkon/default/CLAUDE.md path from server.ts. The build script
now copies the template to dist/templates/ for production use.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 22:43:09 +01:00
arkonandClaude Opus 4.5 0ff0dcac82 docs: document Format 4 and Format 5 todo detection patterns
Add native checkbox (☐/◐/☒) and Claude Code checkmark-based
(✔ Task #N) formats to CLAUDE.md and ralph-wiggum-guide.md,
matching the recently added detection code.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 22:25:51 +01:00
arkonandClaude Opus 4.5 bf44925ea4 feat: detect Claude Code checkmark-based TodoWrite output format
The RalphTracker now recognizes Format 5 - the checkmark-based output
that Claude Code's TodoWrite tool produces:
- "✔ Task #N created: <content>" → creates todo
- "✔ #N <content>" → registers task summary
- "✔ Task #N updated: status → in progress/completed" → updates status

Previously only detected markdown checkboxes, icon indicators, and
native ☐/☒/◐ format, missing the primary output format used by
Claude Code CLI sessions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 22:02:49 +01:00
arkonandClaude Opus 4.5 d291dc0d05 docs: sync all documentation with recent state persistence and respawn changes
- CLAUDE.md: Add step confirmation behavior, respawnEnabled field, recovery
  strategy with dual redundancy, updated state lifecycle
- README.md: Multi-layer idle detection, step confirmation, state persistence
  in performance table, updated architecture diagram with State Store
- docs/: Updated last-modified dates to 2026-01-22

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 21:36:43 +01:00
arkonandClaude Opus 4.5 024425e979 fix: add screens.json fallback for respawn recovery
state.json is now the primary source for session recovery, but
screens.json is used as a fallback for respawn config since it was
the proven working path before. This provides double-redundancy:
both files would need to be lost for respawn state to disappear.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 21:23:59 +01:00
arkonandClaude Opus 4.5 a006621cd0 fix: don't wipe session state from state.json on server shutdown
cleanupSession() always called store.removeSession() which deleted the
session from state.json. On server stop, cleanupSession(id, false) was
called for all sessions - preserving screens but deleting their saved
state. On next restart, state.json was empty so nothing was restored.

Now only removes from state.json when killScreen=true (user explicitly
deleting a session), preserving state for recovery on restart.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 21:22:07 +01:00
arkonandClaude Opus 4.5 35c2f4fb61 fix: use state.json as single source of truth for session recovery
All session settings (auto-compact, auto-clear, ralph, respawn) are now
restored from state.json on server restart. Previously settings were
split across state.json, screens.json, and state-inner.json which was
fragile. state-inner.json is kept as a fallback for ralph state only.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 21:17:55 +01:00
arkonandClaude Opus 4.5 1c430e0cbd fix: persist session state after all restorations complete on restart
persistSessionState was called before the respawn controller was restored,
so respawnEnabled was always saved as false during recovery. Moved the
persist call to after all restorations (auto-compact, auto-clear, ralph,
respawn) are applied.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 21:13:23 +01:00
arkonandClaude Opus 4.5 8501dcbec5 fix: restore auto-compact/auto-clear settings on server restart
Session recovery from screens created fresh Session objects with default
values, losing the auto-compact and auto-clear settings that were saved
to state.json. Now reads them back during recovery.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 20:59:18 +01:00
arkonandClaude Opus 4.5 60f73fc5fe fix: correct property paths for auto-compact/clear in session options modal
The modal was reading from non-existent nested paths (session.autoClear?.autoCompact?)
instead of the flat properties from toState() (session.autoCompactEnabled, etc.).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 20:56:40 +01:00
arkonandClaude Opus 4.5 23c75578c0 fix: persist respawnEnabled state to state.json
The respawn controller's enabled/disabled state was not being saved,
so CLI status couldn't show whether respawn was active.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 20:52:41 +01:00
arkonandClaude Opus 4.5 e5aff372e8 feat: auto-save session options and restore on modal open
- Add GET /api/sessions/:id/respawn/config endpoint for reading saved config
- PUT /api/sessions/:id/respawn/config now works without running controller
  (saves pre-config to screens.json for when respawn starts)
- Respawn start/enable merges pre-saved config from screens.json
- Frontend auto-saves respawn config, auto-compact, auto-clear on field change
- Frontend loads saved config when opening session options modal
- Updated CLAUDE.md with state persistence docs, new API endpoint,
  SessionState fields table, state lifecycle, and session setting guide

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 20:49:09 +01:00
arkonandClaude Opus 4.5 43eaafe084 feat: persist full session state to state.json for CLI visibility
The web server now persists all per-session settings (name, mode,
auto-compact, auto-clear, respawn config, ralph state, tokens, cost)
to state.json so the CLI status/session commands can display them.
Also removes unused pendingStepConfirm property from respawn controller.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 20:36:06 +01:00
arkonandClaude Opus 4.5 5a97403066 fix: add step confirmation to respawn controller
- Add step confirmation timer for waiting_update, waiting_init, waiting_kickstart states
- After detecting completion in waiting states, wait for completionConfirmMs silence
- Prevents sending next command before Claude finishes processing current one
- Cancel step confirmation when working patterns detected
- Update CLAUDE.md with step confirmation documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 19:31:24 +01:00
arkonandClaude Opus 4.5 ec92e5b1cf fix: respawn controller multi-layer detection and cleanup
- Update idle detection from legacy '↵ send' to completion message pattern
  ("for Xm Xs" time patterns like "Worked for 2m 46s")
- Add confirming_idle state for false positive prevention
- Add completionConfirmMs (5s) and noOutputTimeoutMs (30s) config options
- Add multi-layer detection with confidence scoring (0-100%)
- Fix null pointer error in extractTokenCount with guard clause
- Fix respawn controller not stopping on session cleanup (broadcast respawn:stopped)
- Update tests to use new completion message patterns
- Add detection status UI display (confidence level, waiting state)
- Update CLAUDE.md with new detection documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 19:24:36 +01:00
arkonandClaude Opus 4.5 34fb33fbc6 test: add global test setup with screen limits and reach 1337 tests
- Add test/setup.ts with max 10 concurrent screen sessions limiter
- Add orphaned Claude/screen process cleanup before/after tests
- Add semaphore-based screen slot acquisition for concurrency control
- Update vitest.config.ts with setupFiles and fileParallelism: false
- Add 16 new test files for comprehensive coverage
- Update README badge to show 1337 total tests
- Update CLAUDE.md with test setup documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 11:30:10 +01:00