[codex] Harden bridge HID access with broker#24
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #24 +/- ##
==========================================
+ Coverage 58.25% 63.35% +5.10%
==========================================
Files 8 12 +4
Lines 1121 1411 +290
==========================================
+ Hits 653 894 +241
- Misses 468 517 +49
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
@cursor review |
PR SummaryMedium Risk Overview On Windows, the network-facing bridge no longer writes HID directly:
The crate is reorganized into a Reviewed by Cursor Bugbot for commit 3a90ac2. Configure here. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3a90ac2f1b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -0,0 +1,40 @@ | |||
| use agent_notify_bridge::hid_broker::{MockHidBackend, RealHidBackend, run_stdio}; | |||
There was a problem hiding this comment.
Set a default binary for cargo run
Adding this second binary makes the package ambiguous for the existing documented dev command cargo run -p agent-notify-bridge -- --mock-display from README.md and AGENTS.md; I checked that Cargo now exits with could not determine which binary to run and lists both agent-notify-bridge and agent-notify-hid-broker. Please add default-run = "agent-notify-bridge" to the package manifest or update the documented commands to pass --bin agent-notify-bridge, otherwise the bridge can no longer be launched the documented way.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 3a90ac2. Configure here.

Summary
agent-notify-hid-brokerchild process for UHK HID access--mock-displayin-process while moving real HID macro generation/write handling behind the broker boundaryNotes
This keeps the tray/network bridge easy to run while preventing the network-facing process from directly writing arbitrary macro commands to the keyboard. The broker receives structured display intent, generates the UHK macro internally, and owns the HID write path.
Verification
cargo fmt --all --checkcargo check --workspacecargo test --workspacecargo clippy --workspace --all-targets -- -D warningsWindows-target compilation was not available in the local toolchain used for implementation; the installed target was
aarch64-apple-darwinonly.