Add Windows host providers for WSL - #631
Draft
inayayousfi wants to merge 2 commits into
Draft
inayayousfi wants to merge 2 commits into
inayayousfi wants to merge 2 commits into
Conversation
Route the five default desktop providers through one persistent Windows helper without loading Linux native libraries. Return screenshot pixels directly and preserve provider-disable settings and a Linux desktop opt-out. Add provider, protocol-client and WSL selection tests. Document the companion libnut-core release required before integration.
Include configured input delays in command timeouts and reject timer overflow before sending actions. Remove the extra string-typing delay without changing shared keyboard timing. Add regression tests for long delays, timer limits and public string typing configuration, and document the limits.
This branch has not been deployed
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 Windows host control through the existing nut.js providers when Node.js runs in Windows Subsystem for Linux (WSL).
Detailed description (motivation, use-case etc.)
WSL currently selects Linux native providers. This draft directs mouse, keyboard, screen, clipboard and window operations to one persistent, precompiled Windows helper instead. Screenshots return pixel data directly as nut.js Images. The helper uses standard input/output and requires neither a network listener nor runtime compilation.
NUT_JS_DISABLE_WSL retains Linux desktop control. Existing default-provider disable settings remain respected. Capture follows the documented primary-screen contract with physical pixel coordinates. Interrupted input commands are never automatically retried.
The companion native implementation is on inayayousfi/libnut-core, branch feature/wsl-windows-host. Before integration, that helper must be released and the native dependency pin updated. NUT_JS_WSL_HELPER supports testing a local build in the meantime.
Validation: the complete TypeScript library compiles and 38 focused tests pass. Linux Node.js in WSL selected all five providers without loading Linux native libraries, reused one Windows helper for 100 protocol commands, and exited normally without leaving that helper running.
This remains a draft. Actual screenshots, input, clipboard changes and window operations have not been tested because the available Windows host has no signed-in interactive desktop. ARM64 builds, antivirus behavior and installation from a released package remain unverified. The existing full suite is blocked by private native dependencies unavailable from the public registry.
Screenshots (if appropriate)
None. No desktop capture or input was performed.
Checklist