Skip to content

feat: cooperative input locking — pause agent on user activity [#29]#41

Open
richard-devbot wants to merge 4 commits intoCursorTouch:mainfrom
richard-devbot:richardson/phase2-cooperative-input
Open

feat: cooperative input locking — pause agent on user activity [#29]#41
richard-devbot wants to merge 4 commits intoCursorTouch:mainfrom
richard-devbot:richardson/phase2-cooperative-input

Conversation

@richard-devbot
Copy link
Copy Markdown

Summary

Sub-component 2 of #29 (agent workspace isolation).

Adds InputActivityMonitor that detects user mouse/keyboard activity via platform-native hooks and queues agent actions while the user is actively working.

  • macOS: CGEventTap monitors input at the system level
  • Windows: WH_MOUSE_LL / WH_KEYBOARD_LL low-level hooks
  • 500ms idle threshold before agent resumes
  • is_user_active(), wait_for_idle(timeout) API

Related: #29

Richardson Gunde and others added 2 commits April 19, 2026 21:38
- Add create=True to all patch("ctypes.windll", ...) calls so the patch
  works on platforms where windll does not exist (Linux/macOS).
- Save windll_mock reference before patch.dict context to avoid
  AttributeError on post-context assertions (patch with create=True
  deletes the attribute on exit).

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@richard-devbot richard-devbot force-pushed the richardson/phase2-cooperative-input branch from c28db39 to f011377 Compare April 19, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant