pandaone-guard 0.7.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. pandaone_guard-0.7.6/CHANGELOG.md +340 -0
  2. pandaone_guard-0.7.6/LICENSE +21 -0
  3. pandaone_guard-0.7.6/MANIFEST.in +22 -0
  4. pandaone_guard-0.7.6/PKG-INFO +459 -0
  5. pandaone_guard-0.7.6/README.md +422 -0
  6. pandaone_guard-0.7.6/RELEASE.md +230 -0
  7. pandaone_guard-0.7.6/assets/banner-readme.svg +92 -0
  8. pandaone_guard-0.7.6/assets/favicon.svg +6 -0
  9. pandaone_guard-0.7.6/assets/icon-github.svg +58 -0
  10. pandaone_guard-0.7.6/assets/icon-pypi.svg +23 -0
  11. pandaone_guard-0.7.6/assets/quick-demo.svg +216 -0
  12. pandaone_guard-0.7.6/assets/social-preview.svg +133 -0
  13. pandaone_guard-0.7.6/pyproject.toml +86 -0
  14. pandaone_guard-0.7.6/setup.cfg +4 -0
  15. pandaone_guard-0.7.6/setup.py +23 -0
  16. pandaone_guard-0.7.6/src/pandaone/README.md +794 -0
  17. pandaone_guard-0.7.6/src/pandaone/__init__.py +46 -0
  18. pandaone_guard-0.7.6/src/pandaone/__main__.py +6 -0
  19. pandaone_guard-0.7.6/src/pandaone/banner.txt +9 -0
  20. pandaone_guard-0.7.6/src/pandaone/cli.py +2342 -0
  21. pandaone_guard-0.7.6/src/pandaone/desktop_icon.py +195 -0
  22. pandaone_guard-0.7.6/src/pandaone/exporters.py +613 -0
  23. pandaone_guard-0.7.6/src/pandaone/gitignore_helper.py +144 -0
  24. pandaone_guard-0.7.6/src/pandaone/i18n.py +907 -0
  25. pandaone_guard-0.7.6/src/pandaone/index.html +602 -0
  26. pandaone_guard-0.7.6/src/pandaone/install_hook.py +106 -0
  27. pandaone_guard-0.7.6/src/pandaone/installer/codeaudit.iss +174 -0
  28. pandaone_guard-0.7.6/src/pandaone/installer/linux/dolphin/pandax-lock.desktop +40 -0
  29. pandaone_guard-0.7.6/src/pandaone/installer/linux/install_context_menu.sh +231 -0
  30. pandaone_guard-0.7.6/src/pandaone/installer/linux/nautilus/Pandaone +259 -0
  31. pandaone_guard-0.7.6/src/pandaone/installer/linux/uninstall_context_menu.sh +41 -0
  32. pandaone_guard-0.7.6/src/pandaone/installer/macos/install_context_menu.sh +231 -0
  33. pandaone_guard-0.7.6/src/pandaone/installer/macos/uninstall_context_menu.sh +32 -0
  34. pandaone_guard-0.7.6/src/pandaone/installer/windows/install_context_menu.ps1 +317 -0
  35. pandaone_guard-0.7.6/src/pandaone/installer/windows/uninstall_context_menu.ps1 +112 -0
  36. pandaone_guard-0.7.6/src/pandaone/pandaone_serve.py +437 -0
  37. pandaone_guard-0.7.6/src/pandaone/pandax_locked.ico +0 -0
  38. pandaone_guard-0.7.6/src/pandaone/pandax_unlocked.ico +0 -0
  39. pandaone_guard-0.7.6/src/pandaone/templates/pre-commit-check.py +155 -0
  40. pandaone_guard-0.7.6/src/pandaone/templates/pre-commit-hook +41 -0
  41. pandaone_guard-0.7.6/src/pandaone_guard/__init__.py +13 -0
  42. pandaone_guard-0.7.6/src/pandaone_guard/__main__.py +356 -0
  43. pandaone_guard-0.7.6/src/pandaone_guard.egg-info/PKG-INFO +459 -0
  44. pandaone_guard-0.7.6/src/pandaone_guard.egg-info/SOURCES.txt +87 -0
  45. pandaone_guard-0.7.6/src/pandaone_guard.egg-info/dependency_links.txt +1 -0
  46. pandaone_guard-0.7.6/src/pandaone_guard.egg-info/entry_points.txt +4 -0
  47. pandaone_guard-0.7.6/src/pandaone_guard.egg-info/requires.txt +12 -0
  48. pandaone_guard-0.7.6/src/pandaone_guard.egg-info/top_level.txt +3 -0
  49. pandaone_guard-0.7.6/src/pandaone_mcp/__init__.py +8 -0
  50. pandaone_guard-0.7.6/src/pandaone_mcp/__main__.py +381 -0
  51. pandaone_guard-0.7.6/tests/test_audit_i18n_ci.py +299 -0
  52. pandaone_guard-0.7.6/tests/test_binary_snapshots.py +265 -0
  53. pandaone_guard-0.7.6/tests/test_bug_29_init_overwrite.py +184 -0
  54. pandaone_guard-0.7.6/tests/test_bug_48_trust_default.py +98 -0
  55. pandaone_guard-0.7.6/tests/test_ci_command.py +286 -0
  56. pandaone_guard-0.7.6/tests/test_desktop_icon.py +246 -0
  57. pandaone_guard-0.7.6/tests/test_e2e.py +154 -0
  58. pandaone_guard-0.7.6/tests/test_export_subcommand.py +188 -0
  59. pandaone_guard-0.7.6/tests/test_fingerprint.py +117 -0
  60. pandaone_guard-0.7.6/tests/test_fingerprint_password_env.py +153 -0
  61. pandaone_guard-0.7.6/tests/test_fix_29_39.py +192 -0
  62. pandaone_guard-0.7.6/tests/test_gitignore_helper.py +180 -0
  63. pandaone_guard-0.7.6/tests/test_hidden_file_lock.py +173 -0
  64. pandaone_guard-0.7.6/tests/test_i18n.py +377 -0
  65. pandaone_guard-0.7.6/tests/test_i18n_export.py +133 -0
  66. pandaone_guard-0.7.6/tests/test_i18n_log_status.py +167 -0
  67. pandaone_guard-0.7.6/tests/test_init.py +91 -0
  68. pandaone_guard-0.7.6/tests/test_install_git.py +96 -0
  69. pandaone_guard-0.7.6/tests/test_install_hook.py +192 -0
  70. pandaone_guard-0.7.6/tests/test_installer_dir.py +214 -0
  71. pandaone_guard-0.7.6/tests/test_lock.py +109 -0
  72. pandaone_guard-0.7.6/tests/test_lock_auto_init.py +224 -0
  73. pandaone_guard-0.7.6/tests/test_log.py +159 -0
  74. pandaone_guard-0.7.6/tests/test_log_export.py +300 -0
  75. pandaone_guard-0.7.6/tests/test_log_export_more.py +265 -0
  76. pandaone_guard-0.7.6/tests/test_mcp_server.py +308 -0
  77. pandaone_guard-0.7.6/tests/test_pandax_serve.py +442 -0
  78. pandaone_guard-0.7.6/tests/test_phase2_e2e.py +170 -0
  79. pandaone_guard-0.7.6/tests/test_pre_commit_hook.py +155 -0
  80. pandaone_guard-0.7.6/tests/test_protected_extensions.py +262 -0
  81. pandaone_guard-0.7.6/tests/test_readme_loaded.py +145 -0
  82. pandaone_guard-0.7.6/tests/test_serve_bugfix.py +148 -0
  83. pandaone_guard-0.7.6/tests/test_status.py +125 -0
  84. pandaone_guard-0.7.6/tests/test_v073_audit_diff.py +276 -0
  85. pandaone_guard-0.7.6/tests/test_version_single_source.py +129 -0
  86. pandaone_guard-0.7.6/tests/test_watch.py +141 -0
  87. pandaone_guard-0.7.6/tests/test_watchdog.py +237 -0
  88. pandaone_guard-0.7.6/tests/test_watchdog_dedupe.py +211 -0
  89. pandaone_guard-0.7.6/tests/test_write.py +505 -0
@@ -0,0 +1,340 @@
1
+ # Changelog
2
+
3
+ All notable changes to Pandaone AI Agent will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.7.6] - 2026-09-13
9
+
10
+ ### Changed (品牌切回 / Rebrand Cutover)
11
+
12
+ - **PyPI 分发名从 `pandax-guard` 切回 `pandaone-guard`** (PR #23):
13
+ - `pyproject.toml` `name = "pandaone-guard"`,`version = "0.7.6"`
14
+ - 13 个用户面文件:`pandax-guard` → `pandaone-guard` (还原 PR #12 临时回退)
15
+ - 发布到 PyPI 后用户可执行 `pip install pandaone-guard`
16
+ - **PyPI `pandaone-guard` 项目自动创建**:M1+M2 阶段在 PyPI `/manage/account/publishing/` 配 pending trusted publisher(GitHub Actions from `hellob1889/Pandaone-AI-Agent`, workflow `publish.yml`)。第一次 OIDC upload 时 PyPI 自动建项目
17
+ - **PyPI `pandax-guard` 项目保留**(不动)——不破坏现有 `pip install pandax-guard` 用户,v0.7.4 仍是其最新版
18
+
19
+ ### Distribution 命名约定(永久)
20
+
21
+ | 包名 | 含义 | 引用 |
22
+ |---|---|---|
23
+ | `pandax-guard` | PyPI 旧分发名(2026-09-13 之前的发布) | 仅向后兼容,v0.7.4 是其最后一个 release |
24
+ | `pandaone-guard` | PyPI 新分发名(品牌 Pandaone AI Agent) | 主分发,本 release 起 |
25
+ | `pandaone` | Python `import` 包名(PR #4 改名,自 v0.7.4 起) | `from pandaone.cli import main` |
26
+ | `pandax` | Python `import` 旧别名(向后兼容) | `import pandax` 仍可用 |
27
+ | `pandaone` | CLI 主命令(PR #4 改名) | `pandaone --version` |
28
+ | `pandax` | CLI 旧命令别名(向后兼容) | `pandax --version` 仍可用 |
29
+
30
+ ### Migration Guide (从 pandax-guard 升级到 pandaone-guard)
31
+
32
+ ```bash
33
+ # 1. 卸载旧包
34
+ pip uninstall pandax-guard
35
+
36
+ # 2. 安装新包
37
+ pip install pandaone-guard
38
+
39
+ # 3. 验证
40
+ pandaone --version # 应输出: pandaone-guard v0.7.6
41
+ ```
42
+
43
+ ### Stats
44
+
45
+ - **测试**:342 passed, 1 skipped(无回归)
46
+ - **PyPI**:[pandaone-guard 0.7.6](https://pypi.org/project/pandaone-guard/0.7.6/)(首次发布到新包名)
47
+ - **GitHub Release**:[v0.7.6](https://github.com/hellob1889/Pandaone-AI-Agent/releases/tag/v0.7.6)
48
+ - **PRs in this release**:#23 + #22 (#22 是 v0.7.6 plan 文档,docs-only)
49
+ - **Trusted Publisher**:在 PyPI 配的 pending trusted publisher 自动激活(从 pending 转为 active)
50
+
51
+ ### Notes
52
+
53
+ - 本 release 是**纯品牌切回**,不影响业务代码
54
+ - 内部 Python 包 `import` 路径(自 v0.7.4 已切到 `pandaone`)保持不变
55
+ - CLI 命令(自 v0.7.4 已切到 `pandaone`)保持不变
56
+ - 向后兼容别名(`import pandax` / `pandax` CLI)保持不变
57
+
58
+ ## [0.7.5] - 2026-09-13
59
+
60
+ ### Fixed (CI 审计机制加固 / CI Audit Mechanism Hardening)
61
+
62
+ - **PR #18** — audit.yml `[skip-audit]` 检测范围从 commit subject-only (`%s`) 扩展到 subject+body (`%s%n%n%b`)。修复 PR #17 (CHANGELOG.md v0.7.4 补段) 把 `[skip-audit]` 写在 footer 却被旧逻辑漏检、L7 审计误判失败的问题。footer 标记写法现在和 `Signed-off-by:` / `[skip ci]` / `[skip actions]` 等 Git 社区惯例对齐
63
+ - **PR #19** — audit.yml 新增"docs-only / meta-only" 自动跳过机制。push 仅触及下列文件时自动跳过 pandax ci 验证,贡献者**无需**手动写 `[skip-audit]`:
64
+ - `CHANGELOG.md` / `README*.md`(含 `README.md` / `README-zh.md` 等)
65
+ - `docs/**`
66
+ - `.github/PULL_REQUEST_TEMPLATE/**` / `.github/PULL_REQUEST_TEMPLATE.md` / `.github/ISSUE_TEMPLATE/**`
67
+ - `.github/CODEOWNERS` / `CODE_OF_CONDUCT.md` / `CONTRIBUTING.md` / `SECURITY.md`
68
+ - `LICENSE` / `LICENSE-*` / `LICENSE.md` / `LICENSE.txt` / `NOTICE*`
69
+ - **PR #20** — docs-only regex bug 修复。PR #19 引入的 regex 用了 literal `docs/$` 形式(缺少 `.*` 后缀),导致 `docs/foo.md`、`docs/sub/nested/file.md`、`.github/PULL_REQUEST_TEMPLATE/foo.md` 等不匹配 → 仍触发 audit。PR #20 改成 `docs/.*` + `.github/PULL_REQUEST_TEMPLATE(\.md|/.*)`,本地用 bash `grep -E` 验证 23 个 docs 路径全部 SKIP ✅、4 个代码路径正确 AUDIT ✅
70
+
71
+ ### Added (PR Template / 贡献者引导)
72
+
73
+ - `.github/PULL_REQUEST_TEMPLATE.md`(v0.7.4 之前已存在,本 release 进一步强化)— "Audit 状态" 区块明确列出 4 种情况:
74
+ 1. 已通过 `pandaone write` 记录所有改动
75
+ 2. 仅 workflow 文件改动 → `[skip-audit]`
76
+ 3. 仅文档 / 示例 / assets 改动 → `[skip-audit]`(**v0.7.5 起也可省略,docs-only 自动跳过**)
77
+ 4. 其他情况说明
78
+
79
+ ### Repository Cleanup / 仓库清理
80
+
81
+ - **远端分支清理**:`docs/changelog-v074`(squash merge auto-delete 自动清)、`fix/audit-yml-skip-marker-body-scan`(PR #18 squash 后手动 API 删)、`chore/cleanup-stale-deployment`(部署清理用,任务完成后强删)
82
+ - **远端 tag 清理**:`v0.7.1-test`(实验分支 tag,无对应 release)
83
+ - **Deployment `6362252475` 清理** — v0.7.1-test 实验 deployment(3 天前失败的 publish run 残留)通过一次性 cleanup workflow(`github-actions[bot]`)自动加 `inactive` status,UI 不再显示为 "Active"
84
+
85
+ ### Stats
86
+
87
+ - **测试**:342 passed, 1 skipped(无回归)
88
+ - **PyPI**:无新发布(v0.7.4 仍是最新)
89
+ - **main HEAD**:`2635cfde9b2e2a7b0382aed7d6b3ae287caf2b1c`
90
+ - **PRs in this release**:#17 + #18 + #19 + #20(其中 #17 是 v0.7.4 补 CHANGELOG,#18/#19/#20 是 v0.7.5 CI 修复)
91
+
92
+ ### Notes
93
+
94
+ - 本 release 是**纯 CI/仓库工程化变更**,不影响 PyPI 包内容,也不影响受审计业务代码
95
+ - 下一 release (v0.7.6) 计划:切回 `pandaone-guard` PyPI 包名(需先在 PyPI 建新项目 + 配置 Trusted Publisher),把临时回退 (PR #12) 还原
96
+
97
+ ## [0.7.4] - 2026-09-13
98
+
99
+ ### Changed (Rebrand: PandaX → Pandaone AI Agent)
100
+ - **PyPI 包名保留 `pandax-guard`**(不切 `pandaone-guard`,避免破坏现有用户 + PyPI Trusted Publisher 历史配置)
101
+ - **Python 包 import 路径从 `pandax` 改为 `pandaone`**(PR #4):`from pandaone.cli import main`,旧 `import pandax` 仍可用(向后兼容别名)
102
+ - **CLI 主命令从 `pandax` 改为 `pandaone`** + 别名 `pandaone-guard` / `pandaone-mcp`(PR #4):`pandaone --version` 输出 `pandaone-guard v0.7.4`,`pandax --version` 仍可用
103
+ - **7 层防御架构名从 "PandaX" 改为 "Pandaone AI Agent"**:L7 CI workflow `.github/workflows/audit.yml` job 名 + 错误消息
104
+ - **CI/CD 工程化**(publish.yml + audit.yml):
105
+ - publish.yml 加 API token fallback(PR #16):当 `PYPI_API_TOKEN` secret 存在时优先使用 token 模式上传 PyPI,绕过 OIDC Trusted Publisher 配置不匹配的限制
106
+ - audit.yml 加自动跳过分支(PR #11):当 PR diff 只改 `.github/workflows/` 或 `.trae-html-share-packages/`(无业务代码变更),自动跳过审计验证
107
+ - **本地临时回退**(PR #12):用户面安装指令从 `pip install pandaone-guard` 临时回退到 `pip install pandax-guard`(v0.7.4 实际发布的包),等 PyPI 上新建 `pandaone-guard` 项目 + Trusted Publisher 配置完成后再统一切回品牌名
108
+ - **Repository 元数据清理**:URL / Topics / About description 全部更新为 Pandaone AI Agent
109
+
110
+ ### Stats
111
+ - **测试**:342 passed, 1 skipped(与 v0.7.3 持平)
112
+ - **PyPI**:[pandax-guard 0.7.4](https://pypi.org/project/pandax-guard/0.7.4/)(含 `pandaone` CLI 命令 + `pandax` 向后兼容别名)
113
+ - **GitHub Release**:[v0.7.4](https://github.com/hellob1889/Pandaone-AI-Agent/releases/tag/v0.7.4)
114
+ - **PRs in this release**: #4 + #5 + #6 + #7 + #8 + #9 (closed) + #10 + #11 + #12 + #13 + #14 + #15 + #16 (see [Release notes](https://github.com/hellob1889/Pandaone-AI-Agent/releases/tag/v0.7.4) for detail)
115
+
116
+ ## [0.7.3] - 2026-09-11
117
+
118
+ ### Added (审计可追溯性增强 / Audit Traceability)
119
+
120
+ - **`pandaone write --agent` 参数**:所有 audit 记录现在带 agent 身份字段
121
+ - **`pandaone write` 捕获 diff 上下文**(文本文件):在 audit log 里存 `old_content` / `new_content`(截断 500 字符)
122
+ - **`pandaone log` 重写为彩色面板格式**(ANSI box drawing chars):APPROVED=绿,REJECTED=红,agent=青,diff 行加号=绿 / 减号=红
123
+ - **HTML 导出升级为卡片式布局**:每条审计记录独立卡片 + 可折叠 diff 详情(`<details>` 标签)
124
+
125
+ ### Added (国际化 / i18n)
126
+ - **16 个新双语 key**:`panel_file` / `panel_commit` / `panel_lines` / `panel_reason` / `panel_problem` / `panel_approach` / `panel_attempted` / `panel_detection` / `panel_action` / `panel_diff` / `panel_force_write` / `panel_verbose_hint` / `panel_agent_by` / `panel_no_commit` / `status_by_agent` / `status_writes`(zh-CN + en 双语)
127
+
128
+ ### Stats
129
+ - **测试**:342 passed, 1 skipped
130
+ - **PyPI**:[pandaone-guard 0.7.3](https://pypi.org/project/pandaone-guard/0.7.3/)
131
+ - **Trusted Publishing**:tag `v0.7.3` push → GitHub Actions `publish.yml` 通过 OIDC 自动上传 PyPI
132
+
133
+ ## [0.7.2] - 2026-09-10
134
+
135
+ ### Fixed (CI 工程化 / CI Engineering)
136
+ - **CI Tests job 在干净 ubuntu-latest 上 25 秒 exit 1** —— 根因:test job 没 pin setuptools 版本,build-isolation 拉到的 setuptools 与 build job 不一致,导致 `pip install -e .[dev]` 阶段 metadata 解析失败
137
+ - test job pin `setuptools==80.10.2` + `pip install -e .[dev] --no-build-isolation`,与 build 步骤完全对齐
138
+ - v0.7.1 publish run(run 34429112009)Build ✅ / Tests ❌ / Publish ✅ — 已修复
139
+ - 新验证 run(run 34430629959)Build ✅ / Tests ✅ / Publish ✅
140
+
141
+ ### Added (CI 诊断加固 / CI Diagnostics Hardening)
142
+ - **pytest log artifact**:测试失败时 `tee /tmp/pytest.log` + `actions/upload-artifact@v4` 上传完整日志,artifact 名 `pytest-log-{run_id}`
143
+ - **continue-on-error + 显式 fail step**:解耦"上传日志"与"标红",下次 CI 失败可以直接从 artifact 看到 pytest 输出,无需再重新跑
144
+
145
+ ### Distribution
146
+ - **分发名 `pandax-guard`**(沿用 v0.7.1):保留 `pandax` 作为内部 Python 包和 CLI 命令
147
+ - **wheel/sdist 文件名归一化**:`pandax_guard-0.7.2-py3-none-any.whl` + `pandax_guard-0.7.2.tar.gz`
148
+
149
+ ### Stats
150
+ - **测试**:340 passed(与 v0.7.1 持平,无回归)
151
+ - **PyPI**:[pandax-guard 0.7.2](https://pypi.org/project/pandax-guard/0.7.2/)
152
+
153
+ ## [0.7.1] - 2026-09-06
154
+
155
+ ### Fixed (28 bugs)
156
+
157
+ **P0 安全 (5) / P0 Security (5)**:
158
+ - **#8 + #7** install-context 通配符阻塞(PS5.1 registry provider 改用 .NET API)
159
+ - **#12 v1** write 失败时 mode 恢复(try/finally + 原始 mode 恢复)
160
+ - **#12 v2** write 默认拒绝 ReadOnly 锁定文件(`--force-write` 显式 opt-in)
161
+ - **#22** pre-commit hook CRLF→LF
162
+ - **#23** watchdog dedupe(1 次写入只产 1 条审计,2 秒去重窗口)
163
+
164
+ **P1 (4) / P1 (4)**:
165
+ - **#2** status 用 `_iter_protected_files` 共享 helper(19 种扩展名全覆盖)
166
+ - **#5** `--lang` 全局参数支持任意位置(main() 预扫描 argv)
167
+ - **#15** PowerShell subprocess `-NoProfile -NonInteractive` + timeout=60
168
+ - **#29** `pandax init` merge-preserve(不再覆盖用户自定义 config.json)
169
+
170
+ **P2 (5) / P2 (5)**:
171
+ - **#21** doctor/write git 检测一致性(共享 `_resolve_git_exe()`)
172
+ - **#6** log 标签 i18n 完整(REJECTED/UNAUTHORIZED 走 t())
173
+ - **#20** ci 区分空仓库 vs 首次 commit(智能 baseline fallback)
174
+ - **#9 / #10** 智能长度阈值(`_info_length` unicode 宽度,1 中文字 = 2 宽度)
175
+
176
+ **P3 (4) / P3 (4)**:
177
+ - **#13** log `-n` 简写作为 `--recent` 别名
178
+ - **#4** README summary 显示最新 Phase 而非旧 Step
179
+ - **#26** export html/md/text 报告标签本地化
180
+ - **#39** cmd_write 4 处硬编码中文改为 i18n
181
+
182
+ **UX + 横切 i18n (3) / UX + Cross-cutting i18n (3)**:
183
+ - **#14** log 在 lang=en 时 Reason 字段本地化
184
+ - **#17** status i18n 完整性
185
+ - **#48** `--trust-default` 自动接受新指纹
186
+
187
+ **UX (2) / UX (2)**:
188
+ - **#25** 独立 `pandax export` 子命令(语义清晰,不再借用 log)
189
+ - **#28** `pandax lock` 一键启用(未 init 时自动 init,首次使用友好)
190
+
191
+ **工程化 (4) / Engineering (4)**:
192
+ - **版本号漂移** `src/pandax/__init__.py` 的 `__version__` 字面量与 `pyproject.toml` 漂移 → 改为 `importlib.metadata.version()` 动态读取 + pyproject.toml fallback
193
+ - **README 分组标签** `load_readme_summary` 解析 H3 分组标题,把 P0/P1/P2/P3/UX 标签附加到 step 行
194
+ - **自指纹 CRLF 根因** `python -m build` 在 Windows 上把 cli.py LF 转 CRLF,wheel 后处理 normalize LF
195
+ - **方案 A 文件夹图标** `pandax lock` 同步切换 Windows 文件夹图标
196
+ - **Git 兼容性** `pandax init` 在 git 仓库中自动维护 `.gitignore`
197
+ - **Web 实时仪表盘** 新增 `pandax serve` 子命令(`localhost:8765` HTTP + SSE)
198
+
199
+ ### Added
200
+ - **`tests/test_version_single_source.py`**(5 个测试):版本号单一事实源回归
201
+ - **`--trust-default`** 在子命令后位置无关生效
202
+ - **右键菜单端到端测试覆盖**:Init/Lock/Status/Unlock + Bug #48 + 路径含空格/中文
203
+
204
+ ### Changed
205
+ - README summary 自动取最新 Phase 而非旧 Step(#4)
206
+ - 右键菜单加 #28 一键 Lock 流程(自动 init)
207
+ - i18n 字典从 184 keys 增至 200+ keys
208
+
209
+ ### Stats
210
+ - **测试**:264 passed(+21 新测试)
211
+ - **零回归**:所有原有测试保持通过
212
+ - **打包**:wheel 73 KB + sdist 156 KB + ZIP 235 KB
213
+ - **右键菜单**:HKCU 注册表 4 项 + macOS Quick Action + Linux Nautilus/Dolphin
214
+
215
+ ## [0.7.0] - 2026-09-05
216
+
217
+ ### Added (Phase 9: OS 右键菜单集成 / OS Context Menu Integration)
218
+ - **Windows 右键菜单**:HKCU 注册表级联菜单(无需管理员权限)
219
+ - **macOS Finder 服务**:Automator Quick Action
220
+ - **Linux 文件管理器**:Nautilus 脚本 + Dolphin 服务菜单
221
+ - **`pandax install-context`**:CLI 自动检测 OS 并安装右键菜单
222
+ - **`pandax uninstall-context`**:一键卸载右键菜单
223
+
224
+ ### Added (Phase 10: 国际化 i18n / Internationalization)
225
+ - **`src/pandax/i18n.py`**:i18n 引擎(**184 keys** × 2 语言,100% 覆盖)
226
+ - **`--lang=zh-CN|en` 旗标**:CLI 语言切换
227
+ - **自动检测 OS 语言**:Windows `GetUserDefaultLocaleName` + Unix `LANG` + `locale` 模块
228
+ - **持久化偏好**:`~/.pandax/config.json` 保存用户语言偏好
229
+
230
+ ### Added (CI / 自动化 / Automation)
231
+ - **`scripts/audit_i18n.py`**:对抗式审查脚本
232
+ - **`.github/workflows/lint.yml`**:4-job CI
233
+ - **`scripts/doctor.py`**:环境自检工具
234
+ - **`scripts/install.sh`** + **`scripts/install.ps1`**:跨平台 bootstrap 安装器
235
+
236
+ ### Tests
237
+ - **191 个 pytest 测试全部通过**
238
+ - **新增 i18n 测试**(35 个)
239
+ - **新增 audit-CI 集成测试**(16 个)
240
+
241
+ ## [0.6.2] - 2026-09-04
242
+
243
+ ### Fixed
244
+ - **Hidden file protection bug**: `.env`, `.gitignore`, `.env.local` not locked (Python `Path.suffix` returns `""` for dotfiles)
245
+ - `--version` output shows outdated `v0.0.1` instead of real version
246
+ - `taskkill` hint on non-Windows platforms
247
+
248
+ ### Changed
249
+ - Bumped version to 0.6.2 (was incorrectly showing 0.0.1 / 0.1.0)
250
+ - Locked wheel/sdist metadata
251
+
252
+ ### Tests
253
+ - 140 passed
254
+
255
+ ## [0.6.1] - 2026-09-04
256
+
257
+ ### Fixed
258
+ - **CRITICAL: pre-commit hook bypass bug**: `git add -A` would automatically stage audit log, causing hook to falsely approve any commit.
259
+
260
+ ### Added
261
+ - `tests/test_pre_commit_hook.py`: 5 tests covering bypass scenarios
262
+ - `实战验证报告.md`: full e2e validation report
263
+
264
+ ### Tests
265
+ - 134 passed
266
+
267
+ ## [0.6.0] - 2026-09-04
268
+
269
+ ### Added - Phase 7: GitHub Actions CI (L7 defense)
270
+ - `pandax ci --root . --base main` subcommand
271
+ - `.github/workflows/audit.yml`: auto-run on pull_request + push
272
+ - Auto-comment on failed PR via `actions/github-script`
273
+
274
+ ### Tests
275
+ - 129 passed
276
+
277
+ ## [0.5.0] - 2026-09-04
278
+
279
+ ### Added - Phase 6: MCP Server for AI Agents
280
+ - `pandax_mcp` package: stdio JSON-RPC 2.0 server
281
+ - 10 tools exposed
282
+ - Registered as `pandax-mcp` console script
283
+
284
+ ### Tests
285
+ - 115 passed
286
+
287
+ ## [0.4.0] - 2026-09-04
288
+
289
+ ### Added - Phase 5: Binary File SHA256 Protection (L6 defense)
290
+ - `binary_protected_extensions`: 24 formats
291
+ - `binary_snapshots.json`: SHA256 dictionary
292
+ - `--from-file` and `--content-base64` options for `write`
293
+ - Watchdog now detects binary tampering
294
+
295
+ ### Tests
296
+ - 105 passed
297
+
298
+ ## [0.3.0] - 2026-09-04
299
+
300
+ ### Added - Phase 4.6: 17 Text Formats Protected (L1 defense upgrade)
301
+ - `protected_extensions` defaults expanded from `["py"]` to 17 formats
302
+ - Watchdog filters by `protected_extensions`
303
+
304
+ ### Tests
305
+ - 96 passed
306
+
307
+ ## [0.2.0] - 2026-09-04
308
+
309
+ ### Added - Phase 4: Multi-Format Audit Log Export
310
+ - `pandax log --format <fmt> --output <file>` exports audit history
311
+ - Supported: text / csv / tsv / json / yaml / md / html / xlsx / docx / pdf
312
+
313
+ ### Tests
314
+ - 69 passed
315
+
316
+ ## [0.1.0] - 2026-09-03
317
+
318
+ ### Added - Phase 1-3: MVP
319
+ - 5-layer defense: L1 file lock / L2 watchdog / L3 pre-commit hook / L4 README startup / L5 fingerprint
320
+ - `pandax` CLI with `init`/`lock`/`unlock`/`write`/`log`/`status`/`install-hook`/`watch`
321
+ - Pure Python, cross-platform
322
+ - Self-fingerprinting via SHA256
323
+ - Append-only `.pandax/pandax.jsonl` audit log
324
+
325
+ ### Tests
326
+ - 59 passed
327
+
328
+ [Unreleased]: https://github.com/hellob1889/Pandaone-AI-Agent/compare/v0.7.4...HEAD
329
+ [0.7.4]: https://github.com/hellob1889/Pandaone-AI-Agent/compare/v0.7.3...v0.7.4
330
+ [0.7.3]: https://github.com/hellob1889/Pandaone-AI-Agent/compare/v0.7.2...v0.7.3
331
+ [0.7.2]: https://github.com/hellob1889/Pandaone-AI-Agent/compare/v0.7.1...v0.7.2
332
+ [0.7.1]: https://github.com/hellob1889/Pandaone-AI-Agent/compare/v0.6.2...v0.7.1
333
+ [0.6.2]: https://github.com/hellob1889/Pandaone-AI-Agent/compare/v0.6.1...v0.6.0
334
+ [0.6.1]: https://github.com/hellob1889/Pandaone-AI-Agent/compare/v0.6.0...v0.6.0
335
+ [0.6.0]: https://github.com/hellob1889/Pandaone-AI-Agent/compare/v0.5.0...v0.5.0
336
+ [0.5.0]: https://github.com/hellob1889/Pandaone-AI-Agent/compare/v0.4.0...v0.4.0
337
+ [0.4.0]: https://github.com/hellob1889/Pandaone-AI-Agent/compare/v0.3.0...v0.3.0
338
+ [0.3.0]: https://github.com/hellob1889/Pandaone-AI-Agent/compare/v0.2.0...v0.2.0
339
+ [0.2.0]: https://github.com/hellob1889/Pandaone-AI-Agent/compare/v0.1.0...v0.2.0
340
+ [0.1.0]: https://github.com/hellob1889/Pandaone-AI-Agent/releases/tag/v0.1.0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Pandaone AI Agent Project
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,22 @@
1
+ include README.md
2
+ include LICENSE
3
+ include CHANGELOG.md
4
+ include RELEASE.md
5
+
6
+ include src/pandaone/banner.txt
7
+ recursive-include src/pandaone/templates *.sh pre-commit-hook pre-commit-check.py README.md
8
+
9
+ # Phase 9: OS 右键菜单集成(所有平台,v0.7.1+ installer 移入 src/pandaone/)
10
+ recursive-include src/pandaone/installer/windows *.ps1
11
+ recursive-include src/pandaone/installer/macos *.sh
12
+ recursive-include src/pandaone/installer/macos/Pandaone Lock.workflow *.plist *.wflow
13
+ recursive-include src/pandaone/installer/linux *.sh
14
+ include src/pandaone/installer/linux/nautilus/Pandaone
15
+ include src/pandaone/installer/linux/dolphin/*.desktop
16
+ include src/pandaone/installer/*.iss
17
+
18
+ # 文档资源
19
+ include assets/*.svg
20
+
21
+ # PyPI 元数据
22
+ include pyproject.toml