Updated 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() -> _PathPath to the repo-root package.json (one level above the package dir).
#_detect_version
python
def _detect_version(package_json=None, metadata_version=_version) -> strResolve the package version, preferring the repo-root package.json.
Resolution order (exact, not heuristic):
/../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.
importlib.metadata.version("claudewheel")-- used for PyPI wheels,
where the repo-root package.json is absent.
"unknown"-- final fallback when neither source is available.
package_json and metadata_version are injectable for testing.