bugx-cli 0.1.2 → 0.1.3

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 (84) hide show
  1. package/README.md +26 -29
  2. package/core/agent/agent_orchestrator.py +3 -0
  3. package/core/agent/agent_workspace.py +14 -2
  4. package/core/assets/twitter_promo_art.jpg +0 -0
  5. package/core/assets/twitter_promo_card.svg +166 -0
  6. package/core/assets/twitter_promo_clean.jpg +0 -0
  7. package/core/assets/twitter_terminal_real.png +0 -0
  8. package/core/bugx.md +2 -2
  9. package/core/bugx_paths.py +2 -2
  10. package/core/cli-help.txt +1 -1
  11. package/core/contracts/bugx-opencode.md +1 -1
  12. package/core/contracts/bugx-runtime-contract.md +1 -1
  13. package/core/contracts/bugx-worker.md +1 -1
  14. package/core/engine-integrity.json +82 -42
  15. package/core/host_acp/kimi.py +175 -0
  16. package/core/host_acp/minimax.py +28 -0
  17. package/core/host_runtime/host_registry.py +23 -3
  18. package/core/hosts/dsh.py +1 -1
  19. package/core/hosts/kimi.py +293 -0
  20. package/core/hosts/minimax.py +248 -0
  21. package/core/hosts/zcode.py +5 -0
  22. package/core/infra/build_info.py +30 -5
  23. package/core/launch_phases/startup_version_gate.py +2 -2
  24. package/core/launch_phases/supervisor_bridge.py +14 -23
  25. package/core/metadata.txt +2 -2
  26. package/core/runtime/scenario_eval.py +1 -1
  27. package/core/runtime/setup_ui_env.py +4 -7
  28. package/core/supervisor/cli.py +2 -2
  29. package/core/webui/mcp_inspector.py +6 -0
  30. package/core/webui/static/index.html +51 -3
  31. package/core/webui/static/manifest.webmanifest +1 -1
  32. package/core/webui/static/project-settings.js +18 -3
  33. package/core/webui/static/robots.txt +36 -0
  34. package/core/webui/static/sitemap.xml +15 -0
  35. package/docs/07_distribution/01_README_NPM.md +26 -29
  36. package/ecosystem/integrations/cline/skills/bugx/SKILL.md +1 -1
  37. package/ecosystem/integrations/dsh/agents/bugx.md +1 -1
  38. package/ecosystem/integrations/dsh/dsh-patch.yml +2 -2
  39. package/ecosystem/integrations/dsh/mcp/package.json +1 -1
  40. package/ecosystem/integrations/dsh/skills/bugx/SKILL.md +1 -1
  41. package/ecosystem/integrations/dsh/skills/bugx-dsh/SKILL.md +1 -1
  42. package/ecosystem/integrations/dsh/ui/package.json +1 -1
  43. package/ecosystem/integrations/opencode/bugx-mcp-manifest.json +1 -1
  44. package/ecosystem/integrations/pi/extensions/bugx/manifest.json +1 -1
  45. package/ecosystem/integrations/pi/skills/bugx/SKILL.md +1 -1
  46. package/ecosystem/integrations/qoder/connector-meta.json +9 -9
  47. package/ecosystem/integrations/workbuddy/connector-meta.json +9 -9
  48. package/ecosystem/integrations/workbuddy/skills/bugx/SKILL.md +2 -2
  49. package/ecosystem/plugins/bugx/.claude-plugin/marketplace.json +2 -2
  50. package/ecosystem/plugins/bugx/.claude-plugin/plugin.json +2 -2
  51. package/ecosystem/plugins/bugx/.codex-plugin/plugin.json +4 -4
  52. package/ecosystem/plugins/bugx/.zcode-plugin/plugin.json +2 -2
  53. package/ecosystem/plugins/bugx/agents/bugx-worker.md +1 -1
  54. package/ecosystem/plugins/bugx/agents/bugx.md +1 -1
  55. package/ecosystem/plugins/bugx/skills/bugx/SKILL.md +3 -3
  56. package/ecosystem/plugins/bugx/skills/bugx-claude/SKILL.md +1 -1
  57. package/ecosystem/plugins/bugx/skills/bugx-dsh/SKILL.md +1 -1
  58. package/ecosystem/plugins/bugx/skills/bugx-opencode/SKILL.md +1 -1
  59. package/ecosystem/plugins/bugx/skills/bugx-zcode/SKILL.md +1 -1
  60. package/interfaces/bin/bugx.js +2 -0
  61. package/interfaces/cli/bugx_cli/__init__.py +2 -2
  62. package/interfaces/cli/bugx_cli/cli.py +15 -0
  63. package/interfaces/cli/bugx_cli/commands/agent.py +192 -67
  64. package/interfaces/cli/bugx_cli/commands/doctor.py +18 -0
  65. package/interfaces/cli/bugx_cli/commands/lifecycle.py +54 -47
  66. package/interfaces/cli/bugx_cli/commands/plugin.py +6 -6
  67. package/interfaces/cli/bugx_cli/commands/plugin_claude.py +27 -13
  68. package/interfaces/cli/bugx_cli/commands/plugin_kimi.py +348 -0
  69. package/interfaces/cli/bugx_cli/commands/plugin_minimax.py +322 -0
  70. package/interfaces/cli/bugx_cli/commands/plugin_qoder.py +3 -4
  71. package/interfaces/cli/bugx_cli/commands/plugin_zcode.py +4 -5
  72. package/interfaces/cli/bugx_cli/commands/system.py +64 -4
  73. package/interfaces/cli/bugx_cli/common.py +96 -7
  74. package/interfaces/cli/bugx_cli/host_adapters.py +150 -4
  75. package/interfaces/cli/bugx_cli/hosts/registry.py +4 -2
  76. package/interfaces/cli/bugx_cli/hosts/template_engine.py +10 -9
  77. package/interfaces/cli/bugx_cli/infra/engine_installer.py +4 -4
  78. package/interfaces/cli/bugx_cli/infra/host_sync.py +1 -1
  79. package/interfaces/cli/bugx_cli/infra/mcp_advisor.py +2 -2
  80. package/package.json +37 -13
  81. package/pyproject.toml +36 -12
  82. package/scripts/sync-version.mjs +1 -1
  83. package/skills/README.md +25 -0
  84. package/skills/platform/bugx-user/SKILL.md +92 -0
@@ -602,49 +602,14 @@ def _purge_private_plugin_stores(root: Path, removed: list[str], preserved: list
602
602
  continue
603
603
  if manifest.get("private") is not True or manifest.get("autoload") is not False:
604
604
  continue
605
- shutil.rmtree(plugin_path)
605
+ _rmtree_force(plugin_path)
606
606
  removed.append(str(plugin_path.relative_to(root)))
607
607
  _remove_empty_parents(root, removed)
608
608
 
609
609
 
610
610
  def _rmtree_force(path: Path) -> None:
611
- """删除可能为**只读**的目录树(引擎载荷按不可变分发物安装)。
612
-
613
- 实测缺陷:`uninstall --self` 原先直接 ``shutil.rmtree(~/.bugx)``;当引擎目录
614
- 是 0o555/0o444 的只读载荷时抛 ``PermissionError: .bugx/core``,导致整个
615
- 自卸载失败(测试与真实用户同路径)。
616
-
617
- 关键点:删除条目需要**父目录**写权限,因此先自顶向下放开整棵树,再交给
618
- ``rmtree``;仅对失败条目 chmod 是不够的(实测仍 EACCES)。
619
- """
620
- if path.is_symlink() or path.is_file():
621
- path.unlink(missing_ok=True)
622
- return
623
- for root, _dirs, files in os.walk(path, topdown=True):
624
- try:
625
- os.chmod(root, 0o700)
626
- except OSError:
627
- pass
628
- for name in files:
629
- target = Path(root) / name
630
- if target.is_symlink():
631
- continue
632
- try:
633
- os.chmod(target, 0o600)
634
- except OSError:
635
- pass
636
-
637
- def _on_error(func, target, _exc): # noqa: ANN001 - stdlib 回调签名
638
- try:
639
- os.chmod(Path(target).parent, 0o700)
640
- except OSError:
641
- pass
642
- func(target)
643
-
644
- try:
645
- shutil.rmtree(path, onexc=_on_error)
646
- except TypeError: # Python < 3.12
647
- shutil.rmtree(path, onerror=_on_error)
611
+ """删除已完成安全校验、但可能包含只读条目的目录树。"""
612
+ _remove_tree_force(path)
648
613
 
649
614
 
650
615
  def _self_home_dir(*parts: str) -> Path:
@@ -967,7 +932,7 @@ def _self_remove_qoder_user_assets(
967
932
  cache_dir = _qoder_user_plugin_cache_dir()
968
933
  if cache_dir.is_dir() and not cache_dir.is_symlink():
969
934
  try:
970
- shutil.rmtree(cache_dir)
935
+ _rmtree_force(cache_dir)
971
936
  removed.append(f"{cache_dir}(已移除插件缓存)")
972
937
  except OSError as exc:
973
938
  preserved.append(f"{cache_dir}(删除失败:{exc})")
@@ -1216,7 +1181,7 @@ def _self_uninstall_pi_skill(
1216
1181
  if owned_copy:
1217
1182
  if backup_root is not None:
1218
1183
  _backup_tree_external(p_dir, backup_root / p_dir.name)
1219
- shutil.rmtree(p_dir)
1184
+ _rmtree_force(p_dir)
1220
1185
  removed.append(f"{label}(全局 skill 副本)")
1221
1186
  else:
1222
1187
  preserved.append(f"{label}(不是 BugX 副本或内容已变化,保留)")
@@ -1227,7 +1192,7 @@ def _self_uninstall_pi_skill(
1227
1192
  if agents_skill_dir.is_dir():
1228
1193
  if backup_root is not None:
1229
1194
  _backup_tree_external(agents_skill_dir, backup_root / "pi-global-skill")
1230
- shutil.rmtree(agents_skill_dir)
1195
+ _rmtree_force(agents_skill_dir)
1231
1196
  removed.append("~/.agents/skills/bugx(全局 skill 实体)")
1232
1197
  elif agents_skill_dir.exists():
1233
1198
  preserved.append("~/.agents/skills/bugx(不是安全目录,保留)")
@@ -1241,7 +1206,7 @@ def _self_uninstall_dsh_preset(
1241
1206
  return
1242
1207
  if backup_root is not None:
1243
1208
  _backup_tree_external(preset_dir, backup_root / "dsh-agent-presets")
1244
- shutil.rmtree(preset_dir)
1209
+ _rmtree_force(preset_dir)
1245
1210
  removed.append("~/.dsh/.agent-presets/bugx(全局预设)")
1246
1211
 
1247
1212
 
@@ -1274,7 +1239,7 @@ def _self_uninstall_dsh_ui_plugin(
1274
1239
  return
1275
1240
  if backup_root is not None:
1276
1241
  _backup_tree_external(plugin_root, backup_root / "dsh-ui-plugin")
1277
- shutil.rmtree(plugin_root)
1242
+ _rmtree_force(plugin_root)
1278
1243
  removed.append(f"{plugin_root}(DSH UI 插件)")
1279
1244
 
1280
1245
 
@@ -1344,7 +1309,7 @@ def _self_uninstall_workbuddy_skill(
1344
1309
  backup_root / "workbuddy-custom-expert" / config_root.name / "bugx",
1345
1310
  )
1346
1311
  try:
1347
- shutil.rmtree(expert_dir)
1312
+ _rmtree_force(expert_dir)
1348
1313
  removed.append(f"{expert_dir}(WorkBuddy 自定义专家)")
1349
1314
  except OSError as exc:
1350
1315
  preserved.append(f"{expert_dir}(删除失败:{exc})")
@@ -2377,14 +2342,14 @@ def command_uninstall(args: argparse.Namespace) -> int:
2377
2342
  for handler in list(logger.handlers):
2378
2343
  handler.close()
2379
2344
  logger.removeHandler(handler)
2380
- shutil.rmtree(bugx_root)
2345
+ _rmtree_force(bugx_root)
2381
2346
  # 与 --dry-run 预览保持一致:项目运行态被清掉必须在 removed 里可查,
2382
2347
  # 否则用户只能靠 ls 猜(removed 为空时会误以为没清干净)。
2383
2348
  removed.append(".bugx/(项目运行态、报告、证据与共享资源)")
2384
2349
  if args.purge_global_data and global_root.exists():
2385
2350
  if global_root.is_symlink():
2386
2351
  raise CliError(_i18n_exc("lifecycle.clean_global_knowledge_symlink_refused", "拒绝清理符号链接全局错题集目录"))
2387
- shutil.rmtree(global_root)
2352
+ _rmtree_force(global_root)
2388
2353
  removed.append("~/.bugx/knowledge/(全局错题集与经验集)")
2389
2354
  _remove_empty_parents(root, removed)
2390
2355
  payload = {
@@ -2427,6 +2392,43 @@ def _assert_writable(directory: Path, label: str) -> None:
2427
2392
  raise CliError(f"{label}不可写:{directory}: {exc}") from exc
2428
2393
 
2429
2394
 
2395
+ _PROJECT_USER_SKILL = Path(".agents/skills/bugx-user/SKILL.md")
2396
+
2397
+
2398
+ def _read_project_user_skill(root: Path, source: Path) -> bytes:
2399
+ """Validate the required bundled Skill and its project destination before init writes."""
2400
+ target = root / _PROJECT_USER_SKILL
2401
+ _assert_no_symlink_components(target)
2402
+ for parent in target.parents:
2403
+ if parent == root:
2404
+ break
2405
+ if parent.exists() and not parent.is_dir():
2406
+ raise CliError(f"项目 Skill 父路径不是目录:{parent}")
2407
+ if target.exists() and not target.is_file():
2408
+ raise CliError(f"项目 Skill 目标不是普通文件:{target}")
2409
+
2410
+ template = source.parent / "skills" / "platform" / "bugx-user" / "SKILL.md"
2411
+ _assert_no_symlink_components(template)
2412
+ if not template.is_file():
2413
+ raise CliError(f"安装包缺少 BugX 用户 Skill:{template}。请重新安装完整的 bugx-cli。")
2414
+ try:
2415
+ content = template.read_bytes()
2416
+ except OSError as exc:
2417
+ raise CliError(f"无法读取 BugX 用户 Skill:{template}: {exc}") from exc
2418
+ if not content.strip():
2419
+ raise CliError(f"安装包中的 BugX 用户 Skill 为空:{template}。请重新安装完整的 bugx-cli。")
2420
+ return content
2421
+
2422
+
2423
+ def _install_project_user_skill(root: Path, content: bytes, *, force: bool) -> Path | None:
2424
+ target = root / _PROJECT_USER_SKILL
2425
+ _assert_no_symlink_components(target)
2426
+ if target.is_file() and not force:
2427
+ return None
2428
+ _, _, backup = _write_host_resource(root, target, content, "bugx-user")
2429
+ return backup
2430
+
2431
+
2430
2432
  def _precheck_initialization(root: Path, source: Path) -> None:
2431
2433
  """F-L0-04 B 预检阶段:把可预知的失败全部前移到写盘之前(零落盘)。"""
2432
2434
  if not source.is_dir():
@@ -2581,6 +2583,7 @@ def command_init(args: argparse.Namespace) -> int:
2581
2583
  # F-L0-04 整改(commit-or-nothing):所有**已知**失败路径都必须在写盘前阻断。
2582
2584
  # ---- B 预检阶段(零落盘)------------------------------------------------
2583
2585
  _precheck_initialization(root, source)
2586
+ user_skill = _read_project_user_skill(root, source)
2584
2587
 
2585
2588
  # ---- A 决策阶段(零落盘):云端同步决策必须在任何写盘之前解析完成 --------
2586
2589
  onboarding_path = root / ".bugx" / "cloud-onboard.json"
@@ -2628,12 +2631,13 @@ def command_init(args: argparse.Namespace) -> int:
2628
2631
  _ensure_core_importable()
2629
2632
  from core.runtime.session_profile import save_commit_policy
2630
2633
  profile_file_ = save_commit_policy(commit_policy_, root=root)
2634
+ skill_backup_ = _install_project_user_skill(root, user_skill, force=args.force)
2631
2635
  _apply_cloud_onboarding_plan(root, onboarding_plan, preset_data)
2632
2636
  return {
2633
2637
  "removed": removed, "copied": copied_, "skipped": skipped_,
2634
2638
  "layout": layout_, "inherited": inherited_,
2635
2639
  "life_created": life_created_, "profile_file": profile_file_,
2636
- "commit_policy": commit_policy_,
2640
+ "commit_policy": commit_policy_, "skill_backup": skill_backup_,
2637
2641
  }
2638
2642
 
2639
2643
  committed = _commit_with_self_heal(_commit_project_state)
@@ -2682,6 +2686,9 @@ def command_init(args: argparse.Namespace) -> int:
2682
2686
  if removed_legacy_core:
2683
2687
  print(f" 已直接删除旧项目引擎入口:{removed_legacy_core}")
2684
2688
  print(f" 运行目录:{layout.root}")
2689
+ print(f" 用户 Skill:{_PROJECT_USER_SKILL.as_posix()}")
2690
+ if committed["skill_backup"] is not None:
2691
+ print(f" 用户 Skill 备份:{committed['skill_backup']}")
2685
2692
  print(f" 写入 {copied} 个文件,保留 {skipped} 个已有文件")
2686
2693
  if life_created:
2687
2694
  print(" 已创建 .bugx 当前生命周期生命状态(1 条初始寿命)")
@@ -507,7 +507,7 @@ def _chatgpt_plugin_manifest(version: str = __version__) -> dict[str, object]:
507
507
  return {
508
508
  "name": CHATGPT_PLUGIN_NAME,
509
509
  "version": version,
510
- "description": "Autonomous code review and vulnerability hunting agent that uncovers, reproduces, and fixes deep bugs.",
510
+ "description": "Autonomous code review and testing agent. Catches hidden deep bugs for developers, automates black-box, functional, and performance testing for QA, and ensures rock-solid software delivery.",
511
511
  "skills": "./skills/",
512
512
  "homepage": "https://bugx.dev",
513
513
  "author": {
@@ -518,8 +518,8 @@ def _chatgpt_plugin_manifest(version: str = __version__) -> dict[str, object]:
518
518
  "keywords": ["bugx", "audit", "security", "testing"],
519
519
  "interface": {
520
520
  "displayName": "BugX",
521
- "shortDescription": "Autonomous code review and vulnerability hunting agent that uncovers, reproduces, and fixes deep bugs.",
522
- "longDescription": "An autonomous agent dedicated to code review, vulnerability hunting, and automated bug fixing. Built for deep investigations, BugX steps in when you are wrapping up a feature, opening a pull request, or hunting down an elusive bug. It analyzes code logic, automatically writes test cases to uncover and reproduce hidden flaws, and delivers verified patches that resolve root causes. Always safeguarding your code quality and security.",
521
+ "shortDescription": "Autonomous code review and testing agent. Catches hidden deep bugs for developers, automates black-box, functional, and performance testing for QA, and ensures rock-solid software delivery.",
522
+ "longDescription": "BugX is an autonomous code review and testing agent designed to safeguard software delivery: it surfaces hidden, deep bugs for developers right after writing code to eliminate painful debugging and rework; automates black-box, functional, and performance testing across complex edge cases for QA; and ensures software strictly meets functional requirements with rock-solid stability and resilience. By taking over tedious verification, BugX frees engineers from manual grunt work, boosts team velocity, elevates code quality, and significantly lowers long-term maintenance costs—putting technology to work for people.",
523
523
  "developerName": "BugX",
524
524
  "category": "Developer tools",
525
525
  # ChatGPT only exposes its native choice/confirmation surface to
@@ -2362,7 +2362,7 @@ def _remove_dsh_user_preset(
2362
2362
  for child in preset_dir.iterdir():
2363
2363
  if child.is_file() and not child.is_symlink():
2364
2364
  _backup_uninstall_file(root, backup_host, child, backup_dir)
2365
- shutil.rmtree(preset_dir)
2365
+ _remove_tree_force(preset_dir)
2366
2366
  removed.append("~/.dsh/.agent-presets/bugx(已显式清理全局 DSH 预设)")
2367
2367
  except OSError as exc:
2368
2368
  preserved.append(f"~/.dsh/.agent-presets/bugx(清理失败:{exc})")
@@ -2658,7 +2658,7 @@ def _restore_reset_entries(moved: list[tuple[Path, Path]]) -> None:
2658
2658
  if source.is_symlink() or source.is_file():
2659
2659
  source.unlink(missing_ok=True)
2660
2660
  elif source.is_dir():
2661
- shutil.rmtree(source, ignore_errors=True)
2661
+ _remove_tree_force(source)
2662
2662
  shutil.move(str(destination), str(source))
2663
2663
 
2664
2664
 
@@ -2677,7 +2677,7 @@ def _clean_reset_entries(entries: list[tuple[Path, str]]) -> None:
2677
2677
  source.unlink(missing_ok=True)
2678
2678
  elif source.is_dir():
2679
2679
  _assert_no_symlink_components(source)
2680
- shutil.rmtree(source, ignore_errors=True)
2680
+ _remove_tree_force(source)
2681
2681
 
2682
2682
 
2683
2683
  def _bootstrap_global_knowledge(root: Path, source: Path) -> None:
@@ -18,6 +18,7 @@ from ..common import (
18
18
  _backup_host_resource,
19
19
  _i18n_exc,
20
20
  _i18n_prompt,
21
+ _remove_tree_force,
21
22
  _resolve_locale_name,
22
23
  get_build_id,
23
24
  )
@@ -133,9 +134,21 @@ def _claude_desktop_session_dirs() -> list[Path]:
133
134
  def _claude_skill_description(locale: str | None = None) -> str:
134
135
  """Return localized description for Claude skill."""
135
136
  loc = _resolve_locale_name(locale)
137
+ fallback = (
138
+ "BugX 是一个具备自主代码审查与测试能力的智能体,严把代码交付关:它帮助开发人员在写完代码后自动排查隐藏的深层 Bug,"
139
+ "减少反复排错与返工;帮助测试人员自动化运行黑盒测试、功能验证与性能测试,自动覆盖手工盲测难以覆盖的极端场景;"
140
+ "确保代码功能符合要求、具备良好的健壮性和稳定性。让开发和测试在繁琐的工作中解放双手,大幅提高工作效率、全面提升代码质量、显著降低后期维护成本,实现科技服务于人。"
141
+ ) if loc.startswith("zh") else (
142
+ "BugX is an autonomous code review and testing agent designed to safeguard software delivery: "
143
+ "it surfaces hidden, deep bugs for developers right after writing code to eliminate painful debugging and rework; "
144
+ "automates black-box, functional, and performance testing across complex edge cases for QA; "
145
+ "and ensures software strictly meets functional requirements with rock-solid stability and resilience. "
146
+ "By taking over tedious verification, BugX frees engineers from manual grunt work, boosts team velocity, "
147
+ "elevates code quality, and significantly lowers long-term maintenance costs—putting technology to work for people."
148
+ )
136
149
  return _i18n_prompt(
137
150
  "plugin.claude_skill_description",
138
- "专注于代码质量与安全的自主审查智能体。专为深层缺陷排查而生——在功能写完、提 PR 或排查疑难 Bug 时,它能深入分析代码逻辑,自动编写测试用例,挖掘、复现Bug和漏洞,生成经过验证的修复补丁。随时为您的代码质量和代码安全把关。",
151
+ fallback,
139
152
  locale=loc,
140
153
  )
141
154
 
@@ -247,9 +260,9 @@ def _claude_user_agent_content_worker(*, locale: str | None = None) -> str:
247
260
 
248
261
  _DEFAULT_CLAUDE_SKILL_CONTENT = """---
249
262
  name: bugx
250
- description: 专注于代码质量与安全的自主审查智能体。专为深层缺陷排查而生——在功能写完、提 PR 或排查疑难 Bug 时,它能深入分析代码逻辑,自动编写测试用例,挖掘、复现Bug和漏洞,生成经过验证的修复补丁。随时为您的代码质量和代码安全把关。
263
+ description: BugX 是一个具备自主代码审查与测试能力的智能体,严把代码交付关:它帮助开发人员在写完代码后自动排查隐藏的深层 Bug,减少反复排错与返工;帮助测试人员自动化运行黑盒测试、功能验证与性能测试,自动覆盖手工盲测难以覆盖的极端场景;确保代码功能符合要求、具备良好的健壮性和稳定性。让开发和测试在繁琐的工作中解放双手,大幅提高工作效率、全面提升代码质量、显著降低后期维护成本,实现科技服务于人。
251
264
  metadata:
252
- bugx_version: "0.1.2"
265
+ bugx_version: "0.1.3"
253
266
  ---
254
267
  <!-- bugx-locale: zh-CN -->
255
268
 
@@ -257,7 +270,7 @@ metadata:
257
270
 
258
271
  BugX Claude Skill 镜像。执行前用 `bugx engine path --name AGENT_GUIDE.md` 和 `bugx engine path --name bugx.md` 读取全局协议;项目 `.bugx/` 只保存状态与配置。
259
272
 
260
- 协议镜像版本:0.1.2
273
+ 协议镜像版本:0.1.3
261
274
 
262
275
  ## Claude 原生交互适配(强制)
263
276
 
@@ -364,7 +377,7 @@ def _claude_plugin_manifest() -> dict[str, object]:
364
377
  return {
365
378
  "name": "bugx",
366
379
  "version": __version__,
367
- "description": "Autonomous code review and vulnerability hunting agent that uncovers, reproduces, and fixes deep bugs.",
380
+ "description": "Autonomous code review and testing agent. Catches hidden deep bugs for developers, automates black-box, functional, and performance testing for QA, and ensures rock-solid software delivery.",
368
381
  "author": {
369
382
  "name": "BugX",
370
383
  "url": "https://bugx.dev",
@@ -612,13 +625,14 @@ def _build_claude_desktop_packages(
612
625
  skill_bytes = skill_buf.getvalue()
613
626
 
614
627
  # 构建 in-memory dxt zip (Claude Desktop Extension)
628
+ plugin_desc = _claude_skill_description(locale=locale)
615
629
  dxt_manifest = {
616
630
  "manifest_version": "0.4",
617
631
  "name": "bugx",
618
632
  "display_name": "BugX",
619
633
  "version": __version__,
620
634
  "bugx_build_id": get_build_id(),
621
- "description": "专注于代码质量与安全的自主审查智能体。专为深层缺陷排查而生——在功能写完、提 PR 或排查疑难 Bug 时,它能深入分析代码逻辑,自动编写测试用例,挖掘、复现Bug和漏洞,生成经过验证的修复补丁。随时为您的代码质量和代码安全把关。",
635
+ "description": plugin_desc,
622
636
  "author": {
623
637
  "name": "BugX",
624
638
  "url": "https://bugx.dev",
@@ -1172,7 +1186,7 @@ def _remove_claude_project_skills_and_dist(
1172
1186
  project_skill = root / ".claude" / "skills" / "bugx"
1173
1187
  if project_skill.is_dir() and not project_skill.is_symlink():
1174
1188
  try:
1175
- shutil.rmtree(project_skill)
1189
+ _remove_tree_force(project_skill)
1176
1190
  removed.append(f"{project_skill}(项目级 Claude Skill)")
1177
1191
  except OSError as exc:
1178
1192
  preserved.append(f"{project_skill}(删除失败:{exc})")
@@ -1194,7 +1208,7 @@ def _remove_claude_user_skills(
1194
1208
  user_skill = _claude_user_skills_dir() / "bugx"
1195
1209
  if user_skill.is_dir() and not user_skill.is_symlink():
1196
1210
  try:
1197
- shutil.rmtree(user_skill)
1211
+ _remove_tree_force(user_skill)
1198
1212
  removed.append(f"{user_skill}(Claude 用户级 Skill)")
1199
1213
  except OSError as exc:
1200
1214
  preserved.append(f"{user_skill}(删除失败:{exc})")
@@ -1202,7 +1216,7 @@ def _remove_claude_user_skills(
1202
1216
  host_manual = _claude_user_skills_dir() / "bugx-claude"
1203
1217
  if host_manual.is_dir() and not host_manual.is_symlink():
1204
1218
  try:
1205
- shutil.rmtree(host_manual)
1219
+ _remove_tree_force(host_manual)
1206
1220
  removed.append(f"{host_manual}(Claude 用户级宿主手册 Skill)")
1207
1221
  except OSError as exc:
1208
1222
  preserved.append(f"{host_manual}(删除失败:{exc})")
@@ -1211,7 +1225,7 @@ def _remove_claude_user_skills(
1211
1225
  target = d_dir / "bugx"
1212
1226
  if target.is_dir() and not target.is_symlink():
1213
1227
  try:
1214
- shutil.rmtree(target)
1228
+ _remove_tree_force(target)
1215
1229
  removed.append(f"{target}(Claude 桌面端 Skill)")
1216
1230
  except OSError as exc:
1217
1231
  preserved.append(f"{target}(删除失败:{exc})")
@@ -1229,7 +1243,7 @@ def _remove_claude_user_skills(
1229
1243
  ext_dir = desktop_support / "Claude Extensions" / ext_id
1230
1244
  if ext_dir.is_dir() and not ext_dir.is_symlink():
1231
1245
  try:
1232
- shutil.rmtree(ext_dir)
1246
+ _remove_tree_force(ext_dir)
1233
1247
  removed.append(f"{ext_dir}(Claude 桌面端扩展)")
1234
1248
  except OSError as exc:
1235
1249
  preserved.append(f"{ext_dir}(删除失败:{exc})")
@@ -1319,7 +1333,7 @@ def _remove_claude_desktop_cowork_plugins(
1319
1333
  bugx_dir = local_marketplace / "bugx"
1320
1334
  if bugx_dir.is_dir() and not bugx_dir.is_symlink():
1321
1335
  try:
1322
- shutil.rmtree(bugx_dir)
1336
+ _remove_tree_force(bugx_dir)
1323
1337
  removed.append(f"{bugx_dir}(Claude 桌面端插件目录)")
1324
1338
  except OSError as exc:
1325
1339
  preserved.append(f"{bugx_dir}(删除失败:{exc})")
@@ -1394,7 +1408,7 @@ def _remove_claude_plugin_registry(
1394
1408
  cache_dir = plugins_dir / "cache" / "bugx"
1395
1409
  if cache_dir.is_dir() and not cache_dir.is_symlink():
1396
1410
  try:
1397
- shutil.rmtree(cache_dir)
1411
+ _remove_tree_force(cache_dir)
1398
1412
  removed.append(f"{cache_dir}(Claude 插件缓存)")
1399
1413
  except OSError as exc:
1400
1414
  preserved.append(f"{cache_dir}(删除失败:{exc})")