Skip to content

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

Open
richard-devbot wants to merge 3 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 3 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 3 commits April 13, 2026 18:01
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…[ci]

- BrowserPlugin.SYSTEM_PROMPT: add <perception>, <tool_use>, <execution_principles> sections
- BrowserPlugin.register_hooks: actually register _state_hook on BEFORE_LLM_CALL when enabled
- BrowserPlugin.unregister_hooks: unregister _state_hook from BEFORE_LLM_CALL
- BrowserPlugin.unregister_tools: call unset_extension for "browser" and "_browser"
- BrowserPlugin.enable/disable: wire hook register/unregister through lifecycle
- ComputerPlugin.SYSTEM_PROMPT: add <perception>, <tool_use>, <execution_principles> sections
- ComputerPlugin.register_hooks: register _state_hook + _wait_for_ui_hook when enabled
- ComputerPlugin.unregister_hooks: unregister both hooks
- ComputerPlugin.enable/disable: wire hook register/unregister through lifecycle
- control_center: pass kwargs._graceful_restart_fn through to _do_restart(graceful_fn=...)
- ToolRegistry.get: also check _extensions so registry.get("browser") finds the browser instance
- ruff format: reformat entire codebase to resolve style violations

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
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