fix: tune detection patterns and add state transition logging

- Added "Resume" and "Continue" to approval keywords
- Added state transition logging to daemon for observability
- Guarded signal handler against duplicate SIGTERM delivery
- Verified end-to-end: daemon detects approval prompt, transitions
  to waiting_for_user, overlays 1 window, plays sound

Made-with: Cursor
This commit is contained in:
cottongin
2026-03-10 02:57:01 -04:00
parent b31f39268e
commit a5ca7f5d33
2 changed files with 10 additions and 2 deletions

View File

@@ -27,7 +27,7 @@ CURSOR_BUNDLE_ID = "com.todesktop.230313mzl4w4u92"
AGENT_WORKING_EXACT = {"Stop", "Cancel generating"}
AGENT_WORKING_PATTERNS = [re.compile(r"^Generating\b", re.IGNORECASE)]
APPROVAL_EXACT = {"Accept", "Reject", "Accept All", "Deny"}
APPROVAL_EXACT = {"Accept", "Reject", "Accept All", "Deny", "Resume", "Continue"}
APPROVAL_PATTERNS = [
re.compile(r"^Run\b", re.IGNORECASE),
re.compile(r"^Allow\b", re.IGNORECASE),