feat(local): Windows named-pipe transport and ConPTY #4
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/windows-named-pipes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Nothing Windows-only here has run on Windows. This is RKD #1085:
rkd-terminalandrkd-local-linkon Windows. It compiles and passes clippy forx86_64-pc-windows-msvc, and its platform-neutral logic is unit-tested on the host. It stays WIP until someone runslocal/WINDOWS-CHECKLIST.mdon Windows 10 or 11.\\.\pipe\rkd-plugins-<user SID>-<id>(ADR-0003 decision 1).FILE_FLAG_FIRST_PIPE_INSTANCE, an owner-only DACL (D:P(A;;GA;;;<SID>)) andreject_remote_clients.GetNamedPipeServerProcessId).connect_pipeopens with identification-only QoS.serve_connection<S: AsyncRead + AsyncWrite>. Unix behaviour is unchanged.TerminateProcesswith no SIGHUP grace. Program lookup follows Windows rules: PATHEXT, never the current folder, drive and UNC paths, and\\?\stripped for display.%LOCALAPPDATA%rather than roaming%APPDATA%, because a pairing belongs to one machine.with_locktakes a realLockFileEx.serve,pair,statusandunpairwork.install/uninstallsay "not on Windows yet" and exit non-zero; you runserveat login yourself.windows-checkjob (Windows clippy on the Linux runner). No Windows release artifact yet.local/README.md, andlocal/WINDOWS-CHECKLIST.md: build, tests, the pipe's SID and DACL, a second serve refused, another user viarunas(opening our pipe and squatting the name), pairing, tabs, and closing a tab.Tests
-D warnings,cargo test --workspace; existing unix tests pass unchanged.cargo clippy --target x86_64-pc-windows-msvc --workspace --all-targets -D warnings(type-check only; no MSVC linker or SDK here).\\?\), all caught.pair_begin's reply when the pipe closes right after writing it;Pairs with the RKD app PR for #1085, where the Tauri client connects over the pipe and Electron on Windows stays unsupported (#1101).
https://claude.ai/code/session_01P4hUduqyzHTYckP7dX5fXV
Merged without a Windows run: the maintainer waived the Windows checklist on 2026-09-24.
local/WINDOWS-CHECKLIST.mdstays as the first thing to run on a Windows machine, and the README keeps calling Windows experimental.ADR-0003 decision 1 on Windows: `paths::socket_path` returns `\\.\pipe\rkd-plugins-<user SID>-<id>` for the SID in the process token. `pipe_name`, `is_sid_string` and `owner_only_sddl` (`D:P(A;;GA;;;<SID>)`) are plain string rules, unit-tested on any host, and refuse anything that could add to a pipe name or an ACE. New `win` module (windows-sys 0.61, the version tokio already pulls in): current_user_sid, process_is_current_user (EqualSid on token users), pipe_server_is_current_user / pipe_client_is_current_user via GetNamedPipe{Server,Client}ProcessId, OwnerOnly security attributes for CreateNamedPipeW, and connect_pipe, a client that opens with identification-only QoS and checks the server's user before returning. Each call carries the Win32 contract it relies on. Store: config_home is %LOCALAPPDATA% (not roaming: a pairing is per machine) and the profile ACL is the boundary for secret files there; with_lock uses std's File::lock (LockFileEx) on Windows instead of being a no-op. Compile-checked for x86_64-pc-windows-msvc only; not run on Windows. Claude-Session: https://claude.ai/code/session_01P4hUduqyzHTYckP7dX5fXVWIP: feat(local): Windows named-pipe transport and ConPTY (untested on Windows)to feat(local): Windows named-pipe transport and ConPTY