claudewheel v0.20.1 /claudewheel
Edit
On this page

claudewheel package root -- resolves the installed version from the repo-root package.json or Python package metadata.

#claudewheel

#claudewheel

Package version detection from package.json or installed metadata.

#_default_package_json

python
def _default_package_json() -> _Path

Path to the repo-root package.json (one level above the package dir).

#_detect_version

python
def _detect_version(package_json=None, metadata_version=_version) -> str

Resolve the package version, preferring the repo-root package.json.

Resolution order (exact, not heuristic):

  1. /../package.json -- present only in a source checkout (the wheel

packages only claudewheel/). In an editable/source checkout this file is authoritative and wins over possibly-stale installed metadata.

  1. importlib.metadata.version("claudewheel") -- used for PyPI wheels,

where the repo-root package.json is absent.

  1. "unknown" -- final fallback when neither source is available.

package_json and metadata_version are injectable for testing.