trail-boss/daemon
jedarden 114dc5bf35 feat(tmux-detector): implement automatic poller with @tb- prefix opt-in
Implements the tmux detector poller module based on the design in
docs/notes/tmux-detector-design.md.

Features:
- Auto-discovers opted-in panes via @tb- prefix in window title
- Polls every 2s (configurable via TRAILBOSS_POLL_INTERVAL_MS)
- Detects stuck sessions: quiet for 30s with prompt-like last line
- Detects unstuck: any output change after being stuck
- Emits normalized events to /event/normalized endpoint
- Synthetic session IDs: tmux-%446-{timestamp}
- Graceful shutdown with SIGINT/SIGTERM handling

Configuration:
- TRAILBOSS_POLL_INTERVAL_MS (default: 2000)
- TRAILBOSS_QUIET_THRESHOLD_MS (default: 30000)
- TRAILBOSS_OPT_IN_PREFIX (default: @tb-)
- TRAILBOSS_DAEMON_URL (default: http://127.0.0.1:4000/event/normalized)

Usage: bun run daemon/tmux-detector.ts

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-02 09:47:31 -04:00
..
claude-adapter.ts feat(trail-boss): commit phase 3 daemon code (previously untracked) 2026-05-25 22:57:51 -04:00
db.ts feat(reconcile): implement stuck-direction reconcile for dropped Stop events 2026-07-02 08:45:26 -04:00
index.ts feat(security): tighten ingest trust boundary and add invariant tests 2026-07-02 09:03:55 -04:00
reconcile.ts feat(reconcile): implement stuck-direction reconcile for dropped Stop events 2026-07-02 08:45:26 -04:00
schema.sql feat(trail-boss): commit phase 3 daemon code (previously untracked) 2026-05-25 22:57:51 -04:00
tmux-detector.ts feat(tmux-detector): implement automatic poller with @tb- prefix opt-in 2026-07-02 09:47:31 -04:00
types.ts feat(trail-boss): commit phase 3 daemon code (previously untracked) 2026-05-25 22:57:51 -04:00