Repository navigation
fix: add Windows support — named pipe transport, auth, and encoding - #42
Merged
Merged
Conversation
- pid_alive(): use ctypes OpenProcess on Windows instead of os.kill(pid, 0) - discover(): recognise named pipe paths as valid inboxes - post_to_socket(): route Windows pipes to _post_to_pipe(), which reads the .key file and sends the mandatory auth line before the message - All subprocess.run calls use encoding='utf-8' instead of text=True to avoid cp949 decode/encode crashes on non-English Windows - All read_text() calls specify encoding='utf-8' - main() reconfigures stdout/stderr to utf-8 on Windows Verified on Windows 10 22H2, Python 3.10, Claude Code v2.1.263: list, list --json, send (named pipe + auth), send --dry-run, send --json, update --check, list --host, send --host --dry-run all pass.
- README: replace 'Linux and macOS only' with Windows support note, add Windows to Verified section with named pipe details - SKILL.md: add Windows-specific troubleshooting rows
Use str(resolved) instead of the POSIX literal so the assertion matches the platform's native separator.
Merged
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.
Closes #22
Summary
Native Windows에서 cc-peer의
list와send가 동작하도록 지원합니다.Changes
cc_peer.py
pid_alive(): Windows에서ctypes.windll.kernel32.OpenProcess()사용 (os.kill(pid, 0)은 Windows에서 동작하지 않음)discover(): named pipe 경로(\\.\pipe\) 인식_post_to_pipe(): 신규 —.key파일에서 auth 토큰을 읽어 auth line 전송 후 메시지 전송post_to_socket(): Windows pipe 감지 시_post_to_pipe()로 분기text=True→encoding="utf-8",read_text(encoding="utf-8")명시,main()에서 stdout/stderr reconfigureREADME.md
SKILL.md
Verified
Windows 10 22H2, Python 3.10.0, Claude Code v2.1.263에서 실기 테스트:
list(named pipe 인식)list --jsonsend(named pipe + auth)send --dry-run / --jsonupdate --checklist --host(Windows → Linux)send --host --dry-run기존 57개 테스트 전부 통과 (macOS/Linux 미파손).