Repository navigation
Add a persistent Windows host helper for WSL - #192
Draft
inayayousfi wants to merge 2 commits into
Draft
inayayousfi wants to merge 2 commits into
inayayousfi wants to merge 2 commits into
Conversation
Build a standalone C++17 helper for mouse, keyboard, primary-screen capture, clipboard and window operations over standard input/output. Add a helper-only build option, protocol smoke tests and Windows workflow checks. Document the protocol and interactive-session requirement.
Synchronize screenshot reads and use fixed US key mappings. Retain failed input releases, bound JSON replies and use asynchronous window changes with bounded waits. Add native regression tests and workflow checks, exclude test build artifacts from packages, and document failure behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
inayayousfi directed the work and made every decision.
GPT-6.1 Sol, running in OpenCode, carried inayayousfi's decisions out.
Short summary
Add a standalone C++17 Windows executable for the companion nut.js WSL providers.
Detailed description (motivation, use-case etc.)
The helper keeps one process running for mouse, keyboard, primary-screen capture, clipboard text and window operations. It reads ordered JSON requests from standard input and returns JSON replies followed by binary screenshot pixels when needed. Windows does not need Node.js or runtime compilation, and the helper opens no network listener.
Windows builds produce libnut-wsl-host.exe alongside the existing native addon. A helper-only build option avoids the Node-API build dependency. Closing the command pipe stops long typing or highlight operations and attempts to release input held by the helper.
The companion TypeScript implementation is on inayayousfi/nut.js, branch feature/wsl-windows-host. Its native package pin must be updated after a helper-containing release is available.
Validation: an x64 Release build passed on Windows with MSVC 19.44 and Windows SDK 10.0.26100.0, without compiler warnings. The five-request protocol smoke test passed both from Windows Node.js and from Linux Node.js in WSL. The WSL test also confirmed persistent process reuse and helper exit after the caller finished.
This remains a draft. Actual capture, input, clipboard changes and window operations are untested because the available host has no signed-in interactive desktop. ARM64, antivirus behavior, the combined addon/helper build and released-package installation remain unverified.
Screenshots (if appropriate)
None. The protocol test does not capture the desktop or send input.
Checklist