0.14.2:wheel 隨附 usage/pages 文件
CHANGELOG.mdDocs/usage.mdpyproject.tomlsrc/changelogkit/__init__.pysrc/changelogkit/capabilities.py
commit a42a0dbce2bab8b9b42251a5a10c96004a9d4dc8Author: Nuclear0709 <agp05432@gmail.com>Date: Fri Nov 27 17:11:07 2026 +0800 0.14.2:wheel 隨附 usage/pages 文件 diff --git a/CHANGELOG.md b/CHANGELOG.md--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -1,5 +1,19 @@ # Changelog +## 2026.11.27 17:10 changelogkit 0.14.2 發佈++**類型**: 修正 · **檔案**: `pyproject.toml`、`Docs/usage.md`、`capabilities.py`++### 問題 - 已安裝的使用者沒有 `Docs/usage.md`,技能只能假設需要原始碼++### 修改 - wheel 隨附使用者文件++- wheel 透過 hatch `force-include` 打包 `Docs/usage.md` 與 `Docs/pages.md` 到 `changelogkit/docs/`,不複製來源檔。+- 安裝版可用 `python -c "import changelogkit, pathlib; ..."` 找到文件;舊版或讀不到時仍以 `--help`/`capabilities` 為準。+- 新增 `docs.bundled` 能力標記,技能可判斷 0.14.2+ 是否隨附文件。++---+ ## 2026.11.27 14:49 changelogkit 0.14.1 發佈 **類型**: 修正 · **檔案**: `server.py`diff --git a/Docs/usage.md b/Docs/usage.md--- a/Docs/usage.md+++ b/Docs/usage.md@@ -26,7 +26,9 @@ changelogkit workflows [--json] [--check] # 掃描 GitHub Actions action r 摘要末尾的 `.,;:!?。,;:!?` 會自動移除(markdownlint MD026);`…`、`—` 不在規則內,會保留;內文與條列不受影響。 -未安裝時用 `python -m changelogkit …`(`PYTHONPATH` 指向 `src/`)。+未安裝時用 `python -m changelogkit …`(`PYTHONPATH` 指向 `src/`)。0.14.2 以後的 wheel 也隨附+`changelogkit/docs/usage.md` 與 `pages.md`;可用安裝該套件的 Python 讀取+`pathlib.Path(changelogkit.__file__).parent / "docs" / "usage.md"`,不需要另拉原始碼。 全域旗標 **`--locale zh-TW|zh-CN|ja|en`** 可切換 **CLI 說明與網頁語系**(預設跟隨系統:`zh*` 依 Hant/Hans 判為 `zh-TW`/`zh-CN`、`ja*` → `ja`、其餘 → `en`)。 diff --git a/pyproject.toml b/pyproject.toml--- a/pyproject.toml+++ b/pyproject.toml@@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "changelogkit"-version = "0.14.1"+version = "0.14.2" description = "本機變更歷史 GUI 與開發索引:解析 ChangeHistory.md、唯讀索引 Git/文件/API 宣告" readme = "README.md" requires-python = ">=3.10"@@ -49,8 +49,13 @@ Documentation = "https://github.com/TwhomeGH/ChangeLogKit/tree/main/Docs" [tool.hatch.build.targets.wheel] packages = ["src/changelogkit"] +# 讓已安裝的 wheel 也帶一份使用者文件;不複製檔案,直接從 repo 的 Docs 打包。+[tool.hatch.build.targets.wheel.force-include]+"Docs/usage.md" = "changelogkit/docs/usage.md"+"Docs/pages.md" = "changelogkit/docs/pages.md"+ [tool.hatch.build.targets.sdist]-include = ["src", "tests", "examples", "README.md"]+include = ["src", "Docs", "tests", "examples", "README.md"] [tool.ruff] target-version = "py310"diff --git a/src/changelogkit/__init__.py b/src/changelogkit/__init__.py--- a/src/changelogkit/__init__.py+++ b/src/changelogkit/__init__.py@@ -53,4 +53,4 @@ def _installed_version(): # 版號來源優先序:原始碼 checkout 的 pyproject → 已安裝中介資料 → 字面值備援。 # 優先原始碼,讓 `PYTHONPATH=src` 直接跑時「所見即所跑」,不被環境中殘留的舊安裝誤導。-__version__ = _pyproject_version() or _installed_version() or "0.14.1"+__version__ = _pyproject_version() or _installed_version() or "0.14.2"diff --git a/src/changelogkit/capabilities.py b/src/changelogkit/capabilities.py--- a/src/changelogkit/capabilities.py+++ b/src/changelogkit/capabilities.py@@ -106,6 +106,12 @@ FEATURES = [ "surfaces": ["cli"], "commands": ["capabilities"], },+ {+ "id": "docs.bundled",+ "since": "0.14.2",+ "summary": "Wheel includes usage and pages docs under changelogkit/docs/.",+ "surfaces": ["package"],+ }, { "id": "workflows.health", "since": "0.14.0",