Skip to content

Local desktop parity: Esc kill switch everywhere, one agent per desktop, reusable MCP host engine - #247

Merged
abonneth merged 11 commits into
mainfrom
antoine/local-desktop-parity
Oct 8, 2026
Merged

abonneth merged 11 commits into
mainfrom
antoine/local-desktop-parity

Conversation

@abonneth

@abonneth abonneth commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Made with Cursor


Note

Medium Risk
Changes affect local desktop control, global keyboard hooks, and runtime port/inference attachment—areas where misbehavior could block agents or touch user configs, but behavior is fail-fast with tests added.

Overview
Release 1.2.2 tightens local desktop safety and broadens CLI/MCP ergonomics.

Desktop control now enforces one agent per machine for desktop and workstation bridges via a cross-process file lock (desktop.lock). A second process fails with DesktopBusyError after a short wait instead of sharing the mouse; bridges in the same process can still share the lock.

The double-Esc kill switch is no longer macOS-only: Windows and X11 Linux use pynput (optional on Windows workstation installs). The CLI warns when arming fails on any platform, and listener callbacks no longer silently disarm if writing the stop file fails.

Local runtime picks stable ports per inference profile (hosted vs self-hosted), records which inference a spawned runtime serves, and rejects attaching when the wrong profile is already listening—so hosted and self-hosted runtimes can coexist. hai doctor adds a runtime check via locate_runtime().

MCP install is refactored into a reusable host engine: YAML configs (Hermes), merge server entries instead of overwriting user keys, .bak on YAML edits, and a Hermes registry entry. Placeholders use a substitution map; skill wiring is parameterized.

Smaller fixes: session exit-cancel retry stays registered until the platform confirms stop (not on 409/404); bridge startup errors include the underlying exception; README documents exclusivity and kill-switch behavior.

Reviewed by Cursor Bugbot for commit 6fa9891. Bugbot is set up for automated code reviews on this repo. Configure here.

…esktop, reusable MCP host engine, runtime doctor check
@abonneth
abonneth requested a review from adeprezh as a code owner October 7, 2026 23:38

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread src/hai_agents_local/manager.py
Comment thread src/hai_agents_cli/mcp_hosts.py Outdated
Comment thread src/hai_agents_local/killswitch.py

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread src/hai_agents_local/desktop_lock.py
Comment thread pyproject.toml

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread src/hai_agents_local/killswitch.py Outdated

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread src/hai_agents_local/killswitch.py Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1ea2dfc. Configure here.

Comment thread src/hai_agents_local/killswitch.py
@abonneth
abonneth merged commit 667876c into main Oct 8, 2026
7 checks passed
@abonneth
abonneth deleted the antoine/local-desktop-parity branch October 8, 2026 13:09
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.

2 participants