feat(codex): add Windows support and compatibility for Codex plugin#101
Open
SparshGarg999 wants to merge 1 commit into
Open
feat(codex): add Windows support and compatibility for Codex plugin#101SparshGarg999 wants to merge 1 commit into
SparshGarg999 wants to merge 1 commit into
Conversation
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.
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