Skip to content

feat: vendored PyYAML config, single version source, launcher fixes - #10

Merged
9thLevelSoftware merged 1 commit into
chore/split-tests-and-cifrom
feat/packaging-yaml-version
Oct 1, 2026
Merged

9thLevelSoftware merged 1 commit into
chore/split-tests-and-cifrom
feat/packaging-yaml-version

Conversation

@9thLevelSoftware

Copy link
Copy Markdown
Owner

Summary

Stacked on #9 (PR 3 of the modernization plan).

  • Config: CLODEX.md front matter now uses yaml.safe_load — real PyYAML when installed, a vendored pure-Python PyYAML 6.0.3 (clodex/_vendor, MIT, sha256 recorded in VENDORED.md) for npm installs on a bare system Python. Nested keys work, bad YAML raises ConfigError, empty sections keep defaults. Parsed output is identical to the old parser for the shipped CLODEX.md (verified).
  • Version: clodex.__version__ is the single source (pyproject dynamic, MCP serverInfo); a test keeps package.json, both plugin manifests and install/uninstall scripts in sync.
  • pyproject: readme, pyyaml>=6 dependency, clodex-mcp-server script, package discovery (wheel excludes the vendored copy).
  • npm files: ships all clodex/**/*.py + vendored license; test checks npm pack --dry-run lists every module.
  • Launchers act on the caller's repo: clodex.ps1 and mcp-bridge/bin/clodex-mcp-server no longer cd into the Clodex checkout; clodex.ps1 survives the Microsoft Store python3 stub and tries py -3; the npm launcher tries py -3, 3.14, 3.13, 3.12.

Test plan

  • 124 tests pass locally (6 new)
  • Fresh venv pip install . → real PyYAML used, clodex and clodex-mcp-server run
  • npm tarball on a Python with no PyYAML → clodex doctor works against the caller's repo
  • clodex.ps1 (Windows PowerShell 5.1 and pwsh 7) and the MCP bridge report the caller's repo
  • CI matrix

🤖 Generated with Claude Code

- CLODEX.md front matter is parsed with yaml.safe_load (real PyYAML when
  installed, vendored pure-Python 6.0.3 under clodex/_vendor for npm
  installs, which run on a bare system Python). Nested keys now work,
  bad YAML raises ConfigError, empty sections keep their defaults. Output
  is identical to the old parser for the shipped CLODEX.md.
- clodex.__version__ is the single source: pyproject reads it dynamically,
  the MCP server reports it, and a test keeps package.json, both plugin
  manifests and install/uninstall scripts in sync.
- pyproject: readme, pyyaml dependency, clodex-mcp-server script, package
  discovery (wheel excludes the vendored copy).
- package.json files: ship every clodex/**/*.py plus the vendored license;
  a test checks `npm pack --dry-run` lists every module.
- Launchers operate on the caller's repo: clodex.ps1 and
  mcp-bridge/bin/clodex-mcp-server no longer cd into the Clodex checkout;
  clodex.ps1 survives the Microsoft Store python3 stub and tries `py -3`;
  npm launcher tries `py -3`, 3.14, 3.13, 3.12.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 1, 2026 02:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@kilo-code-bot

kilo-code-bot Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (11 files)
  • clodex.ps1
  • clodex/_vendor/VENDORED.md
  • clodex/_vendor/__init__.py
  • clodex/config.py
  • clodex/mcp_server.py
  • mcp-bridge/bin/clodex-mcp-server
  • npm/clodex.js
  • package.json
  • pyproject.toml
  • tests/test_config_commands.py
  • tests/test_packaging.py

(Vendored clodex/_vendor/yaml/*.py are unmodified upstream MIT-licensed PyYAML 6.0.3, attributed in VENDORED.md, and excluded from the wheel. Not reviewed line-by-line.)


Reviewed by minimax-m3 · Input: 0 · Output: 0 · Cached: 0

@9thLevelSoftware
9thLevelSoftware added this pull request to stack #13 October 1, 2026 02:44
@9thLevelSoftware
9thLevelSoftware merged commit 4a736fd into main Oct 1, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants