bugx-cli 0.1.0 → 0.1.1

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 (311) hide show
  1. package/README.md +190 -186
  2. package/core/README.md +2 -2
  3. package/core/agent/README.md +2 -1
  4. package/core/agent/agent_artifacts.py +8 -6
  5. package/core/agent/agent_eval.py +136 -54
  6. package/core/agent/agent_execution.py +218 -52
  7. package/core/agent/agent_orchestrator.py +14 -8
  8. package/core/agent/agent_targets.py +8 -2
  9. package/core/agent/feature_baseline.py +150 -0
  10. package/core/assets/axe-core/LICENSE-3RD-PARTY.txt +66 -0
  11. package/core/assets/axe-core/LICENSE.txt +362 -0
  12. package/core/assets/axe-core/UPSTREAM.md +10 -0
  13. package/core/assets/axe-core/axe.min.js +12 -0
  14. package/core/assets/bugx-hero-en.svg +74 -0
  15. package/core/assets/bugx-hero-zh.svg +74 -0
  16. package/core/assets/codex.png +0 -0
  17. package/core/assets/dsh.png +0 -0
  18. package/core/assets/webui-chatgpt.jpg +0 -0
  19. package/core/assets/webui-session.jpg +0 -0
  20. package/core/assets/webui-skills.jpg +0 -0
  21. package/core/assets/webui-studio.jpg +0 -0
  22. package/core/assets/webui-zcode.jpg +0 -0
  23. package/core/assets/zcode.png +0 -0
  24. package/core/autonomous_cve/SPEC.md +1 -1
  25. package/core/autonomous_cve/attack_graph_store.py +152 -106
  26. package/core/autonomous_cve/behavior_graph.py +8 -2
  27. package/core/autonomous_cve/verifier.py +4 -1
  28. package/core/bugx.md +1 -1
  29. package/core/bugx_paths.py +43 -8
  30. package/core/cli-help.txt +66 -0
  31. package/core/cloud_sync/SPEC.md +1 -1
  32. package/core/cloud_sync/cloud_client.py +25 -6
  33. package/core/cloud_sync/cloud_onboard.py +42 -1
  34. package/core/cloud_sync/flywheel_client.py +16 -7
  35. package/core/cloud_sync/network_transport.py +24 -3
  36. package/core/cloud_sync/sensitive_filter.py +2 -2
  37. package/core/cloud_sync/sync_push.py +12 -10
  38. package/core/contracts/AGENT_GUIDE.md +6 -9
  39. package/core/contracts/README.md +2 -2
  40. package/core/contracts/bugx-runtime-contract.md +1 -1
  41. package/core/contracts/bugx-worker.md +1 -1
  42. package/core/contracts/engine_gap_contracts.py +86 -3
  43. package/core/coverage/coverage_discovery.py +599 -29
  44. package/core/coverage/coverage_evidence.py +47 -0
  45. package/core/coverage/coverage_forensics.py +9 -0
  46. package/core/coverage/coverage_validate.py +6 -1
  47. package/core/dev_harness/SPEC.md +1 -1
  48. package/core/engine-integrity.json +591 -419
  49. package/core/fuzzing/concurrency_fuzzer.py +53 -0
  50. package/core/fuzzing/differential_oracle.py +562 -27
  51. package/core/fuzzing/fuzz_input.py +109 -6
  52. package/core/fuzzing/stateful_fuzzer.py +72 -0
  53. package/core/governance/secret_redactor.py +22 -10
  54. package/core/host_acp/SPEC.md +1 -1
  55. package/core/host_acp/__init__.py +4 -4
  56. package/core/host_acp/claude.py +59 -1
  57. package/core/host_acp/cline.py +64 -1
  58. package/core/host_acp/codex.py +56 -1
  59. package/core/host_acp/dsh.py +59 -1
  60. package/core/host_acp/opencode.py +56 -1
  61. package/core/host_acp/pi.py +59 -1
  62. package/core/host_acp/zcode.py +59 -1
  63. package/core/host_runtime/SPEC.md +1 -1
  64. package/core/host_runtime/adapters.py +1 -1
  65. package/core/host_runtime/cline.py +13 -0
  66. package/core/host_runtime/host_evaluators.py +44 -4
  67. package/core/host_runtime/host_probe.py +1 -1
  68. package/core/host_runtime/host_provider_arbitrator.py +116 -62
  69. package/core/host_runtime/host_registry.py +15 -8
  70. package/core/host_runtime/mcp_registry_gate.py +12 -1
  71. package/core/host_runtime/pi.py +102 -0
  72. package/core/host_runtime/provider_facts.py +66 -0
  73. package/core/hosts/SPEC.md +1 -1
  74. package/core/hosts/__init__.py +6 -2
  75. package/core/hosts/_dsh_usage.py +1 -1
  76. package/core/hosts/base.py +32 -4
  77. package/core/hosts/claude.py +55 -0
  78. package/core/hosts/cline.py +6 -2
  79. package/core/hosts/codex.py +58 -0
  80. package/core/hosts/dsh.py +9 -1
  81. package/core/hosts/opencode.py +6 -6
  82. package/core/hosts/pi.py +159 -2
  83. package/core/infra/README.md +4 -2
  84. package/core/infra/__init__.py +2 -0
  85. package/core/infra/build_info.py +22 -3
  86. package/core/infra/client_metadata.py +1 -1
  87. package/core/infra/json_utils.py +22 -0
  88. package/core/launch_phases/README.md +2 -2
  89. package/core/launch_phases/SPEC.md +1 -1
  90. package/core/launch_phases/common.py +21 -2
  91. package/core/launch_phases/finding_confirm_phase.py +5 -1
  92. package/core/launch_phases/finding_settlement.py +188 -1
  93. package/core/launch_phases/judge_phase.py +69 -12
  94. package/core/launch_phases/orchestrator_controls.py +11 -7
  95. package/core/launch_phases/post_coverage_sync.py +9 -2
  96. package/core/launch_phases/post_phase.py +139 -3
  97. package/core/launch_phases/post_receipt.py +12 -1
  98. package/core/launch_phases/pre_phase.py +3 -3
  99. package/core/launch_phases/pre_recon_scout.py +53 -36
  100. package/core/launch_phases/pre_state_builder.py +23 -176
  101. package/core/launch_phases/round_orchestrator.py +15 -32
  102. package/core/launch_phases/session_runtime.py +56 -9
  103. package/core/launch_phases/startup_gates.py +36 -8
  104. package/core/launch_phases/startup_interaction.py +68 -12
  105. package/core/launch_phases/startup_version_gate.py +9 -3
  106. package/core/launch_phases/supervisor_bridge.py +46 -17
  107. package/core/launch_phases/supervisor_coverage.py +8 -2
  108. package/core/launch_phases/supervisor_degraded.py +1 -9
  109. package/core/launch_phases/worker_barriers.py +15 -5
  110. package/core/launch_phases/worker_orchestrator.py +105 -25
  111. package/core/ledger/README.md +1 -1
  112. package/core/ledger/SPEC.md +1 -1
  113. package/core/ledger/_facade.py +2 -1
  114. package/core/ledger/archive_ops.py +60 -2
  115. package/core/ledger/cli.py +6 -1
  116. package/core/ledger/export_ops.py +6 -1
  117. package/core/ledger/finding_confirmation.py +48 -6
  118. package/core/ledger/finding_lifecycle.py +428 -5
  119. package/core/ledger/finding_verification.py +44 -8
  120. package/core/ledger/incidents.py +10 -4
  121. package/core/ledger/patterns.py +10 -7
  122. package/core/ledger/receipt_contract.py +17 -1
  123. package/core/ledger/sync_ops.py +21 -16
  124. package/core/ledger/tool_experience.py +2 -1
  125. package/core/ledger/verify_life.py +88 -17
  126. package/core/locales/en-US.json +2 -2
  127. package/core/locales/zh-CN.json +2 -2
  128. package/core/mcp_handlers/SPEC.md +1 -1
  129. package/core/mcp_handlers/base.py +23 -3
  130. package/core/mcp_handlers/channel_lifecycle.py +85 -30
  131. package/core/mcp_handlers/retrieval_handlers.py +11 -1
  132. package/core/mcp_handlers/rpc_server.py +6 -1
  133. package/core/mcp_handlers/supervisor_handlers.py +32 -6
  134. package/core/mcp_handlers/tool_table.py +15 -0
  135. package/core/mcp_runtime_support/environment.py +0 -38
  136. package/core/mcp_runtime_support/verifier.py +0 -52
  137. package/core/metadata.txt +2 -3
  138. package/core/planning/README.md +1 -1
  139. package/core/planning/domain_router.py +4 -2
  140. package/core/planning/dynamic_flow_analyzer.py +219 -14
  141. package/core/planning/judge_pipeline.py +87 -4
  142. package/core/planning/prompt_harness.py +7 -5
  143. package/core/planning/spec_harvester.py +4 -4
  144. package/core/probes/INTERFACE.md +11 -1
  145. package/core/probes/SPEC.md +11 -1
  146. package/core/probes/__init__.py +46 -40
  147. package/core/probes/android_probe.py +177 -9
  148. package/core/probes/codebase_memory_probe.py +57 -0
  149. package/core/probes/desktop_probe.py +104 -0
  150. package/core/probes/differential_probe.py +99 -21
  151. package/core/probes/efficiency_probe.py +64 -0
  152. package/core/probes/ios_binary_probe.py +105 -1
  153. package/core/probes/memory_probe.py +66 -0
  154. package/core/probes/miniprogram_probe.py +75 -13
  155. package/core/probes/mobile_probe.py +215 -30
  156. package/core/probes/native_probe.py +88 -0
  157. package/core/probes/openwiki_probe.py +70 -0
  158. package/core/probes/pattern_probe.py +106 -0
  159. package/core/probes/platform_probe.py +81 -0
  160. package/core/probes/probe_registry.py +108 -7
  161. package/core/probes/sast_fixture_corpus.py +340 -0
  162. package/core/probes/sast_probe.py +553 -52
  163. package/core/probes/sast_rules.py +668 -28
  164. package/core/probes/sca_scanner.py +48 -0
  165. package/core/probes/ui_accessibility.py +149 -0
  166. package/core/probes/ui_audit.py +513 -0
  167. package/core/probes/ui_contract.py +273 -0
  168. package/core/probes/ui_evidence.py +212 -0
  169. package/core/probes/ui_measurements.py +314 -0
  170. package/core/probes/ui_repair.py +250 -0
  171. package/core/probes/ui_review.py +133 -0
  172. package/core/probes/ui_storybook.py +107 -0
  173. package/core/probes/ui_tokens.py +185 -0
  174. package/core/probes/ui_visual_diff.py +131 -0
  175. package/core/probes/web_probe.py +373 -18
  176. package/core/project_profiler/SPEC.md +1 -1
  177. package/core/project_profiler/arbitrator.py +6 -1
  178. package/core/project_profiler/detector.py +8 -1
  179. package/core/project_profiler/strategy.py +51 -15
  180. package/core/prompts/command_routing_en.md +2 -2
  181. package/core/prompts/command_routing_zh.md +2 -2
  182. package/core/prompts/stages/stage_repair.md +1 -1
  183. package/core/repair/README.md +1 -1
  184. package/core/repair/l7_repair_loop.py +1 -4
  185. package/core/repair/rsi_fixer.py +4 -4
  186. package/core/repair/rsi_loop.py +1 -3
  187. package/core/repair/rsi_repair.py +7 -7
  188. package/core/repair/rsi_scope.py +27 -8
  189. package/core/report_engine/SPEC.md +1 -1
  190. package/core/report_engine/attestation.py +8 -4
  191. package/core/report_engine/finding_report.py +2 -1
  192. package/core/report_engine/models.py +7 -9
  193. package/core/report_engine/sast_bridge.py +2 -2
  194. package/core/report_engine/server.py +18 -8
  195. package/core/report_engine/web-conformance.md +123 -18
  196. package/core/report_engine/web_conformance.py +21 -52
  197. package/core/retrieval/README.md +1 -1
  198. package/core/retrieval/SPEC.md +1 -1
  199. package/core/retrieval/code_analyzer.py +50 -14
  200. package/core/retrieval/context_assembler.py +7 -1
  201. package/core/retrieval/knowledge_sync.py +108 -14
  202. package/core/retrieval/symbol_index.py +25 -6
  203. package/core/retrieval/universal_code_matcher.py +234 -49
  204. package/core/runtime/README.md +1 -1
  205. package/core/runtime/bugx_logging.py +78 -7
  206. package/core/runtime/fixture_solidify.py +5 -10
  207. package/core/runtime/incident_eval.py +1 -1
  208. package/core/runtime/model_runner.py +4 -41
  209. package/core/runtime/platform_adapter.py +2 -2
  210. package/core/runtime/prep_validate.py +4 -2
  211. package/core/runtime/project_settings.py +2 -1
  212. package/core/runtime/scenario_eval.py +50 -8
  213. package/core/skills/bugx_docs_mcp_server.py +3 -1
  214. package/core/skills/bugx_mcp_server.py +29 -2
  215. package/core/skills/tools_kb.py +1 -1
  216. package/core/supervisor/README.md +1 -1
  217. package/core/supervisor/SPEC.md +1 -1
  218. package/core/supervisor/budget_governor.py +503 -9
  219. package/core/supervisor/checkpoint_pipeline.py +248 -6
  220. package/core/supervisor/checkpoint_sync.py +13 -0
  221. package/core/supervisor/claim_events.py +1 -1
  222. package/core/supervisor/finding_workflow.py +22 -5
  223. package/core/supervisor/lease_manager.py +1 -1
  224. package/core/supervisor/lifecycle_blocks.py +6 -1
  225. package/core/supervisor/rejection_remedies.py +52 -5
  226. package/core/supervisor/serial_authorization.py +48 -4
  227. package/core/supervisor/task_scheduler.py +2 -2
  228. package/core/supervisor/worker_checkpoint.py +8 -1
  229. package/core/supervisor/worker_runtime.py +8 -2
  230. package/core/supervisor_types/worker_claim.py +9 -0
  231. package/core/webui/README.md +1 -1
  232. package/core/webui/SPEC.md +2 -1
  233. package/core/webui/adapters/claude.py +5 -1
  234. package/core/webui/adapters/cline.py +10 -2
  235. package/core/webui/adapters/codex.py +5 -1
  236. package/core/webui/adapters/dsh.py +5 -1
  237. package/core/webui/docs_session_service.py +2 -2
  238. package/core/webui/mcp_inspector.py +11 -7
  239. package/core/webui/static/00-base.css +1060 -0
  240. package/core/webui/static/01-monitoring.css +802 -0
  241. package/core/webui/static/02-header-actions.css +321 -0
  242. package/core/webui/static/03-trigger-popover.css +697 -0
  243. package/core/webui/static/04-composer.css +628 -0
  244. package/core/webui/static/05-skills-center.css +878 -0
  245. package/core/webui/static/06-mcp-center.css +623 -0
  246. package/core/webui/static/07-skill-detail.css +265 -0
  247. package/core/webui/static/08-files-management.css +167 -0
  248. package/core/webui/static/09-files-center.css +386 -0
  249. package/core/webui/static/10-icons.css +105 -0
  250. package/core/webui/static/11-project-options.css +185 -0
  251. package/core/webui/static/12-profile-tab.css +383 -0
  252. package/core/webui/static/design-tokens.css +113 -0
  253. package/core/webui/static/index.html +14 -1
  254. package/core/webui/workspace_service.py +1 -1
  255. package/docs/07_distribution/01_README_NPM.md +190 -186
  256. package/ecosystem/integrations/README.md +1 -1
  257. package/ecosystem/integrations/dsh/mcp/package.json +1 -1
  258. package/ecosystem/integrations/dsh/skills/bugx-dsh/SKILL.md +1 -1
  259. package/ecosystem/integrations/dsh/ui/package.json +1 -1
  260. package/ecosystem/integrations/opencode/bugx-mcp-manifest.json +4 -4
  261. package/ecosystem/integrations/opencode/mcp-lock.json +14 -6
  262. package/ecosystem/integrations/opencode/opencode.json +23 -12
  263. package/ecosystem/integrations/pi/extensions/bugx/manifest.json +1 -1
  264. package/ecosystem/integrations/qoder/connector-meta.json +1 -1
  265. package/ecosystem/integrations/workbuddy/connector-meta.json +1 -1
  266. package/ecosystem/integrations/workbuddy/skills/bugx/SKILL.md +1 -1
  267. package/ecosystem/plugins/bugx/.claude-plugin/plugin.json +1 -1
  268. package/ecosystem/plugins/bugx/.codex-plugin/plugin.json +1 -1
  269. package/ecosystem/plugins/bugx/.zcode-plugin/plugin.json +1 -1
  270. package/ecosystem/plugins/bugx/skills/bugx/SKILL.md +2 -2
  271. package/ecosystem/plugins/bugx/skills/bugx-dsh/SKILL.md +1 -1
  272. package/ecosystem/plugins/bugx/skills/bugx-opencode/SKILL.md +1 -1
  273. package/ecosystem/plugins/bugx/skills/bugx-zcode/SKILL.md +1 -1
  274. package/interfaces/bin/bugx.js +37 -0
  275. package/interfaces/cli/bugx_cli/__init__.py +4 -2
  276. package/interfaces/cli/bugx_cli/cli.py +11 -4
  277. package/interfaces/cli/bugx_cli/commands/advisory.py +1 -1
  278. package/interfaces/cli/bugx_cli/commands/agent.py +339 -73
  279. package/interfaces/cli/bugx_cli/commands/audit.py +2 -2
  280. package/interfaces/cli/bugx_cli/commands/autonomous.py +1 -1
  281. package/interfaces/cli/bugx_cli/commands/cloud.py +4 -3
  282. package/interfaces/cli/bugx_cli/commands/doctor.py +449 -204
  283. package/interfaces/cli/bugx_cli/commands/interaction.py +5 -1
  284. package/interfaces/cli/bugx_cli/commands/knowledge.py +2 -0
  285. package/interfaces/cli/bugx_cli/commands/lifecycle.py +3 -3
  286. package/interfaces/cli/bugx_cli/commands/plugin.py +55 -20
  287. package/interfaces/cli/bugx_cli/commands/plugin_claude.py +7 -7
  288. package/interfaces/cli/bugx_cli/commands/plugin_funide.py +2 -1
  289. package/interfaces/cli/bugx_cli/commands/plugin_zcode.py +1 -1
  290. package/interfaces/cli/bugx_cli/commands/report.py +2 -6
  291. package/interfaces/cli/bugx_cli/commands/system.py +11 -11
  292. package/interfaces/cli/bugx_cli/common.py +15 -7
  293. package/interfaces/cli/bugx_cli/host_adapters.py +29 -54
  294. package/interfaces/cli/bugx_cli/hosts/registry.py +8 -6
  295. package/interfaces/cli/bugx_cli/infra/ai_advisor.py +157 -27
  296. package/interfaces/cli/bugx_cli/infra/engine_installer.py +18 -10
  297. package/interfaces/cli/bugx_cli/infra/host_sync.py +11 -8
  298. package/interfaces/cli/bugx_cli/infra/mcp_advisor.py +76 -5
  299. package/interfaces/cli/bugx_cli/infra/security.py +13 -6
  300. package/package.json +2 -1
  301. package/pyproject.toml +20 -8
  302. package/scripts/ensure-python.mjs +7 -7
  303. package/scripts/sync-version.mjs +10 -21
  304. package/scripts/test-npm-wrapper.mjs +1 -1
  305. package/core/webui/static/project-settings.css +0 -6458
  306. package/docs/07_distribution/README.md +0 -16
  307. package/docs/README.md +0 -121
  308. package/interfaces/README.md +0 -143
  309. package/interfaces/bin/README.md +0 -35
  310. package/interfaces/cli/README.md +0 -90
  311. package/scripts/README.md +0 -118
@@ -33,29 +33,39 @@
33
33
  },
34
34
  "postmcp": {
35
35
  "type": "local",
36
- "codemode": false,
37
36
  "command": [
38
37
  "bugx",
39
38
  "mcp-runtime",
40
39
  "start",
41
40
  "--server",
42
41
  "postmcp"
43
- ]
42
+ ],
43
+ "codemode": false
44
44
  },
45
45
  "playwright": {
46
46
  "type": "local",
47
- "codemode": false,
48
47
  "command": [
49
48
  "bugx",
50
49
  "mcp-runtime",
51
50
  "start",
52
51
  "--server",
53
52
  "playwright"
54
- ]
53
+ ],
54
+ "codemode": false
55
+ },
56
+ "codindex": {
57
+ "type": "local",
58
+ "command": [
59
+ "bugx",
60
+ "mcp-runtime",
61
+ "start",
62
+ "--server",
63
+ "codindex"
64
+ ],
65
+ "codemode": false
55
66
  },
56
67
  "bugx-docs": {
57
68
  "type": "local",
58
- "codemode": false,
59
69
  "command": [
60
70
  "bugx",
61
71
  "mcp",
@@ -65,11 +75,11 @@
65
75
  ".",
66
76
  "--db",
67
77
  ".bugx/knowledge/docs.sqlite3"
68
- ]
78
+ ],
79
+ "codemode": false
69
80
  },
70
81
  "dbhub": {
71
82
  "type": "local",
72
- "codemode": false,
73
83
  "command": [
74
84
  "bugx",
75
85
  "mcp-runtime",
@@ -77,11 +87,11 @@
77
87
  "--server",
78
88
  "dbhub"
79
89
  ],
90
+ "codemode": false,
80
91
  "disabled": true
81
92
  },
82
93
  "redis": {
83
94
  "type": "local",
84
- "codemode": false,
85
95
  "command": [
86
96
  "bugx",
87
97
  "mcp-runtime",
@@ -89,29 +99,30 @@
89
99
  "--server",
90
100
  "redis"
91
101
  ],
102
+ "codemode": false,
92
103
  "disabled": true
93
104
  },
94
105
  "semgrep": {
95
106
  "type": "local",
96
- "codemode": false,
97
107
  "command": [
98
108
  "bugx",
99
109
  "mcp-runtime",
100
110
  "start",
101
111
  "--server",
102
112
  "semgrep"
103
- ]
113
+ ],
114
+ "codemode": false
104
115
  },
105
116
  "mobile": {
106
117
  "type": "local",
107
- "codemode": false,
108
118
  "command": [
109
119
  "bugx",
110
120
  "mcp-runtime",
111
121
  "start",
112
122
  "--server",
113
123
  "mobile"
114
- ]
124
+ ],
125
+ "codemode": false
115
126
  }
116
127
  }
117
128
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schema_version": 1,
3
3
  "name": "bugx-pi",
4
- "version": "1.0.0",
4
+ "version": "0.1.1",
5
5
  "host": "pi",
6
6
  "kind": "extension",
7
7
  "entry": "index.ts",
@@ -7,7 +7,7 @@
7
7
  "description_en": "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.",
8
8
  "source": "bugx-agent",
9
9
  "type": "mcp-connector",
10
- "version": "1.0.0",
10
+ "version": "0.1.1",
11
11
  "homepage": "https://bugx.dev",
12
12
  "website": "https://bugx.dev",
13
13
  "examples_zh": [
@@ -7,7 +7,7 @@
7
7
  "description_en": "Use BugX to discover, reproduce, verify, and report real bugs.",
8
8
  "source": "bugx-agent",
9
9
  "type": "skill-only",
10
- "version": "1.0.0",
10
+ "version": "0.1.1",
11
11
  "examples_zh": [
12
12
  "检查这个项目中是否存在真实漏洞",
13
13
  "复现并验证这个 BugX 发现的问题"
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: bugx
3
3
  description: Use BugX to find, reproduce, verify, fix, and report bugs in an app or codebase.
4
- version: 1.0.0
4
+ version: 0.1.1
5
5
  author: BugX
6
6
  ---
7
7
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bugx",
3
- "version": "1.0.0",
3
+ "version": "0.1.1",
4
4
  "bugx_build_id": 98,
5
5
  "description": "Autonomous code review and vulnerability hunting agent that uncovers, reproduces, and fixes deep bugs.",
6
6
  "author": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bugx",
3
- "version": "1.0.0",
3
+ "version": "0.1.1",
4
4
  "description": "Autonomous code review and vulnerability hunting agent that uncovers, reproduces, and fixes deep bugs.",
5
5
  "skills": "./skills/",
6
6
  "homepage": "https://bugx.dev",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bugx",
3
- "version": "1.0.0",
3
+ "version": "0.1.1",
4
4
  "description": "Autonomous code review and vulnerability hunting agent that uncovers, reproduces, and fixes deep bugs.",
5
5
  "homepage": "https://bugx.dev",
6
6
  "author": {
@@ -2,7 +2,7 @@
2
2
  name: bugx
3
3
  description: 专注于代码质量与安全的自主审查智能体。专为深层缺陷排查而生——在功能写完、提 PR 或排查疑难 Bug 时,它能深入分析代码逻辑,自动编写测试用例,挖掘、复现Bug和漏洞,生成经过验证的修复补丁。随时为您的代码质量和代码安全把关。
4
4
  metadata:
5
- bugx_version: "1.0.0"
5
+ bugx_version: "0.1.1"
6
6
  ---
7
7
  <!-- bugx-locale: zh-CN -->
8
8
 
@@ -10,7 +10,7 @@ metadata:
10
10
 
11
11
  BugX ChatGPT Skill 镜像。执行前用 `bugx engine path --name AGENT_GUIDE.md` 和 `bugx engine path --name bugx.md` 读取全局协议;项目 `.bugx/` 只保存状态与配置。
12
12
 
13
- 协议镜像版本:1.0.0
13
+ 协议镜像版本:0.1.1
14
14
 
15
15
  ## ChatGPT 原生交互适配(强制)
16
16
 
@@ -18,7 +18,7 @@ description: BugX 漏洞挖掘引擎在 DeepSeek Harness (DSH) 宿主下的专
18
18
  python3 --version && node --version
19
19
 
20
20
  # 2. 从源码构建安装最新 bugx-agent(避免 wheel 滞后)
21
- cd /Users/sp/workspace/bug-hunter \
21
+ cd <repo-root> \
22
22
  && python3 -m build --wheel \
23
23
  && python3 -m pip install dist/bugx_agent-*.whl --force-reinstall --no-deps
24
24
 
@@ -5,7 +5,7 @@ description: "BugX 对抗审计在 OpenCode 宿主的操作手册。当宿主发
5
5
 
6
6
  # BugX × OpenCode 使用手册(实战复盘版)
7
7
 
8
- 引擎源码仓库 `/Users/sp/workspace/bug-hunter`(dev 分支)。本手册共性部分继承
8
+ 引擎源码仓库(本仓 dev 分支)。本手册共性部分继承
9
9
  `bugx-zcode` skill(判读式审计/确认协议/坑位),特性部分按 OpenCode 宿主契约
10
10
  (`core/contracts/bugx-opencode.md`)微调。所有坑位均实证。
11
11
 
@@ -6,7 +6,7 @@ description: BugX 漏洞挖掘引擎在 ZCode 宿主下的专属使用手册—
6
6
  # BugX × ZCode 使用手册(实战复盘版)
7
7
 
8
8
  本手册由 2026-11-01~04 在 bugxtest 项目的多轮真实审计复盘提炼。所有坑位都在
9
- 本机实证过并已在引擎源码修复(源码仓库 `/Users/sp/workspace/bug-hunter`,dev 分支)。
9
+ 本机实证过并已在引擎源码修复(源码仓库本仓 dev 分支)。
10
10
 
11
11
 
12
12
  ### 0.与通用 bugx skill 的关系(先读)
@@ -53,6 +53,43 @@ function resolvePython() {
53
53
  return process.platform === 'win32' ? 'python' : 'python3';
54
54
  }
55
55
 
56
+ // F-327 快路径:--version 只需版本号,绕过 Python 解析与候选探测
57
+ // (此前全链路 461ms:node 45ms + resolvePython 串行探测 + Python 冷启动;
58
+ // 直接读 metadata.txt 应 <50ms,耗时账目 W-001)
59
+ {
60
+ const argv = process.argv.slice(2);
61
+ if (argv.some((a) => a === '--version' || a === '-V')) {
62
+ try {
63
+ const meta = readFileSync(join(pkgRoot, 'core', 'metadata.txt'), 'utf8');
64
+ const ver = (meta.match(/^bugx_version:\s*"([^"]+)"/m) || [])[1] || '0.1.0';
65
+ const bid = (meta.match(/^build_id:\s*(\d+)/m) || [])[1];
66
+ console.log(`bugx ${ver}${bid ? `+build.${bid}` : ''}`);
67
+ } catch {
68
+ console.log('bugx 0.1.0');
69
+ }
70
+ process.exit(0);
71
+ }
72
+ }
73
+
74
+ // F-328 快路径:顶层 --help/-h 直接输出 argparse 真源快照(耗时账目 W-003)
75
+ // 快照 core/cli-help.txt 由 `python3 scripts/bump_version.py --refresh-help`
76
+ // 从 Python argparse 导出,--check 会校验快照与真源逐字一致。
77
+ // 仅当 argv 只有 help flag 时拦截:带子命令(bugx audit --help)仍走 Python
78
+ // 真源,拿到该子命令自己的帮助文本。
79
+ {
80
+ const argv = process.argv.slice(2);
81
+ if (argv.length === 1 && (argv[0] === '--help' || argv[0] === '-h')) {
82
+ const snapshot = join(pkgRoot, 'core', 'cli-help.txt');
83
+ if (existsSync(snapshot)) {
84
+ process.stdout.write(readFileSync(snapshot, 'utf8'));
85
+ process.exit(0);
86
+ }
87
+ // 快照资产缺失:走 Python argparse 真源,保证 help 永远可用。
88
+ console.error('[bugx] 提示: core/cli-help.txt 缺失,help 走 Python 真源路径'
89
+ + '(运行 python3 scripts/bump_version.py --refresh-help 恢复快路径)');
90
+ }
91
+ }
92
+
56
93
  const pythonCmd = resolvePython();
57
94
  const env = { ...process.env };
58
95
  env.BUGX_ASSET_ROOT = env.BUGX_ASSET_ROOT || join(pkgRoot, 'core');
@@ -1,4 +1,6 @@
1
1
  """BugX installable command package."""
2
2
 
3
- __version__ = "1.0.0"
4
- __build_id__: int = 468
3
+ import os
4
+
5
+ __version__ = os.environ.get("BUGX_VERSION", "0.1.1")
6
+ __build_id__: int = 9
@@ -122,7 +122,10 @@ class _BugXArgumentParser(argparse.ArgumentParser):
122
122
  if match:
123
123
  bad_cmd = match.group(1).strip()
124
124
  from .infra.ai_advisor import CommandIntentArbitrator
125
- arbitrator = CommandIntentArbitrator()
125
+ # 命令面真值来自解析器自身的 choose-from 清单——建议永不指向不存在的命令。
126
+ choices_match = re.search(r"choose from (.+?)\)", message)
127
+ known = re.findall(r"'([^']+)'", choices_match.group(1)) if choices_match else None
128
+ arbitrator = CommandIntentArbitrator(known_commands=known)
126
129
  res = arbitrator.infer_intent(bad_cmd)
127
130
 
128
131
  err_output = [
@@ -653,6 +656,10 @@ def build_parser() -> argparse.ArgumentParser:
653
656
  knowledge.add_argument("--output", type=Path)
654
657
  knowledge.add_argument("--bundle-id")
655
658
  knowledge.add_argument("--contributor", default="local-supervisor")
659
+ knowledge.add_argument(
660
+ "--include-source-snippets", action="store_true",
661
+ help="导出时在便携包中携带 before/after 源码片段(默认不带;开启后经片段级审查)",
662
+ )
656
663
  knowledge.add_argument("--reviewer")
657
664
  knowledge.add_argument("--reason")
658
665
  knowledge.set_defaults(handler=command_knowledge)
@@ -1395,7 +1402,7 @@ def build_parser() -> argparse.ArgumentParser:
1395
1402
  p.add_argument("--source", choices=("project", "eval", "auto"), default="project",
1396
1403
  help=report_source_help)
1397
1404
  p.add_argument("--root", type=Path, help="项目根目录 (默认当前工作目录)")
1398
- p.add_argument("--eval-dir", type=Path, help="审计收据目录 (默认 evals/oss)")
1405
+ p.add_argument("--eval-dir", type=Path, help="审计收据目录 (默认 verification/evals/oss)")
1399
1406
  p.add_argument("--out", type=Path, help="报告输出目录 (默认与 eval-dir 相同)")
1400
1407
  p.add_argument("--format", choices=("html", "md", "pdf", "both"), default="both", help="文件格式 (默认 both)")
1401
1408
  p.add_argument("--title", help="自定义报告主标题")
@@ -1495,7 +1502,7 @@ def main(argv: list[str] | None = None) -> int:
1495
1502
  "matrix": "项目级攻防渗透审计已统一收敛至: bugx audit",
1496
1503
  "console": "启动统一 Web 控制台与报告预览请使用: bugx report serve",
1497
1504
  "watch": "实时流式监视日志与 MCP 工具调用请使用: bugx log --watch",
1498
- "test": "受影响测试选择器属于引擎核心开发工具,公共 CLI 已移除;开发者请使用: python3 scripts/test_selector.py",
1505
+ "test": "单元测试与提交门禁已从当前发行版移除",
1499
1506
  }
1500
1507
  if first_cmd in removed_map:
1501
1508
  print(
@@ -1579,7 +1586,7 @@ def main(argv: list[str] | None = None) -> int:
1579
1586
  print(f"[bugx] ✗ {exc}", file=sys.stderr)
1580
1587
  print(f"[bugx] ✗ 安全自愈未完成:{repair_exc}", file=sys.stderr)
1581
1588
  print(
1582
- " 可在发布服务恢复后重试,或先安装经过校验的 bugx-agent wheel。",
1589
+ " 可在发布服务恢复后重试,或先安装经过校验的 bugx-cli wheel。",
1583
1590
  file=sys.stderr,
1584
1591
  )
1585
1592
  return 2
@@ -25,7 +25,7 @@ def command_advisory(args: argparse.Namespace) -> int:
25
25
  if subcommand == "list":
26
26
  # Look for existing advisories in standard locations
27
27
  candidates = [
28
- Path.cwd() / "evals" / "oss" / "ghsa_advisories.json",
28
+ Path.cwd() / "verification" / "evals" / "oss" / "ghsa_advisories.json",
29
29
  Path.cwd() / ".bugx" / "advisories.json",
30
30
  ]
31
31
  found = False