feat(codex): add Windows support and compatibility for Codex plugin#101
feat(codex): add Windows support and compatibility for Codex plugin#101SparshGarg999 wants to merge 3 commits into
Conversation
|
Thanks for working on Windows support — the Windows installer/runner and Codex tool shim remain useful even after #98, so this PR has merge value. We ran it against the latest Current result: The new path-resolution test patches
Please rebase onto current |
Yif-Yang
left a comment
There was a problem hiding this comment.
Requesting changes based on the reproducible Linux test failure and the Windows runner, exit-code, scheduler, discovery, and CI gaps detailed in the maintainer comment above. The feature remains welcome after those fixes.
c7a1604 to
79d6117
Compare
|
Hello @Yif-Yang! Thank you for the detailed feedback. I have rebased onto
All 216 python tests and the 4 Pester runner tests pass successfully on Windows. Please let me know if you need anything else! |
|
Thanks for the substantial update. We re-ran the latest head against current We will not ask you to spend another round on minor cleanup. After merge, maintainers can handle the trailing whitespace and the small Two Windows-specific blockers still need verification/fixes from your Windows environment before we can merge:
Once those two Windows runtime paths pass, we can merge this original PR to preserve your contribution history, then take care of the minor deterministic cleanup ourselves. |
|
Hello! I have addressed the two outstanding blockers for Windows support:
All 12 Pester tests and all 220 Python tests are passing successfully. Please let me know if any further tweaks are needed! |
Root Cause
The Codex integration for
skillopt-sleepwas previously designed primarily for Unix-like environments, using bash runner scripts (run-sleep.sh), unix-stylemkdir -pdirectory creation in the scheduler, shell profile export paths, and a Unix bash installer (install.sh). This caused installation and execution to fail when running under Windows CMD or PowerShell. Additionally, the Codex CLI backend did not support Windows-style tool shims (.cmd), unlike the Copilot backend.Solution
This PR adds comprehensive Windows compatibility and support for the Codex plugin:
plugins/codex/install.ps1: A PowerShell installer for Windows that replicates the exact logic ofinstall.sh(copies skill files, retires legacy prompts, and suggests User-level environment variable setup).plugins/run-sleep.cmd: A CMD runner wrapper.plugins/run-sleep.ps1: A PowerShell runner wrapper.plugins/codex/skills/skillopt-sleep/SKILL.mdto include Windows CMD and PowerShell commands, allowing Codex to run correctly in Windows terminals.plugins/codex/README.mdwith Windows installation instructions.resolve_codex_pathinskillopt_sleep/backend.pyto search Windows global Node/npm/NVM directories (e.g.%APPDATA%\npm\codex.cmd).CodexCliBackend.attempt_with_toolsinskillopt_sleep/backend.pyto write Windows-style.cmdtool shims when running on Windows (os.name == "nt")._runner_cmdinskillopt_sleep/scheduler.pyto produce a Windows CMD-compatible directory creation and launch string whensys.platform == "win32".Files Changed
plugins/codex/README.mdplugins/codex/skills/skillopt-sleep/SKILL.mdskillopt_sleep/backend.pyskillopt_sleep/scheduler.pytests/test_sleep_engine.pyplugins/codex/install.ps1(NEW)plugins/run-sleep.cmd(NEW)plugins/run-sleep.ps1(NEW)Testing/Benchmark Performed
test_codex_resolve_path_windowsandtest_codex_attempt_with_tools_windowstotests/test_sleep_engine.pyto verify path resolution and.cmdshim generation.test_sleep_engine.pyto ensure cross-platform test parity.Fixes #46