bugx-cli 0.1.3 → 0.1.5

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 (167) hide show
  1. package/core/README.md +5 -3
  2. package/core/agent/agent_execution.py +7 -0
  3. package/core/assets/bugx-wechat-group.png +0 -0
  4. package/core/bugx.md +2 -2
  5. package/core/bugx_paths.py +10 -2
  6. package/core/bundled_docs/OVERVIEW.md +311 -0
  7. package/core/bundled_docs/README.md +10 -0
  8. package/core/bundled_docs/README_EN.md +278 -0
  9. package/core/bundled_docs/ai/01_AI_REFERENCE.md +838 -0
  10. package/core/bundled_docs/ai/02_AI_USAGE.md +161 -0
  11. package/core/bundled_docs/ai/03_AI_COMMANDS.md +322 -0
  12. package/core/bundled_docs/guides/01_USER_GUIDE.md +887 -0
  13. package/core/bundled_docs/guides/02_COMMANDS.md +935 -0
  14. package/core/bundled_docs/guides/03_TROUBLESHOOTING.md +763 -0
  15. package/core/bundled_docs/guides/04_CLOUD_AUTH_AND_SYNC_COOKBOOK.md +48 -0
  16. package/core/bundled_docs/guides/05_HOST_MATRIX_AND_DISPATCH.md +25 -0
  17. package/core/bundled_docs/guides/06_PROBES_AND_POC_COOKBOOK.md +49 -0
  18. package/core/bundled_docs/guides/07_LIFECYCLE_AND_RECOVERY_STATES.md +46 -0
  19. package/core/bundled_docs/guides/08_LESSONS_AND_PRIVACY_BOUNDARY.md +35 -0
  20. package/core/bundled_docs/hosts/bugx-claude_SKILL.md +326 -0
  21. package/core/bundled_docs/hosts/bugx-dsh_SKILL.md +229 -0
  22. package/core/bundled_docs/hosts/bugx-opencode_SKILL.md +129 -0
  23. package/core/bundled_docs/hosts/bugx-zcode_SKILL.md +459 -0
  24. package/core/bundled_docs/hosts/bugx_SKILL.md +118 -0
  25. package/core/bundled_docs/hosts/cline_bugx_SKILL.md +69 -0
  26. package/core/bundled_docs/hosts/platform_bugx_SKILL.md +50 -0
  27. package/core/bundled_docs/manifest.json +140 -0
  28. package/core/bundled_docs/reference/01_ENVIRONMENT_VARIABLES.md +422 -0
  29. package/core/bundled_docs/reference/04_REPOSITORY_TOPOLOGY.md +180 -0
  30. package/core/cli-help.txt +7 -3
  31. package/core/cloud_sync/cloud_client.py +81 -2
  32. package/core/cloud_sync/endpoint_router.py +22 -9
  33. package/core/cloud_sync/issue_uploader.py +297 -0
  34. package/core/cloud_sync/sensitive_filter.py +77 -7
  35. package/core/contracts/AGENT_GUIDE.md +3 -9
  36. package/core/contracts/README.md +1 -1
  37. package/core/contracts/bugx-runtime-contract.md +10 -20
  38. package/core/contracts/bugx-worker.md +1 -1
  39. package/core/coverage/coverage_ai_review.py +15 -11
  40. package/core/coverage/coverage_bootstrap.py +18 -13
  41. package/core/coverage/coverage_discovery.py +1 -1
  42. package/core/dev_harness/interaction_preset.py +1 -1
  43. package/core/engine-integrity.json +283 -159
  44. package/core/host_acp/README.md +4 -0
  45. package/core/host_acp/agnescode.py +128 -0
  46. package/core/host_acp/antigravity.py +153 -0
  47. package/core/host_runtime/README.md +3 -0
  48. package/core/host_runtime/adapters.py +5 -1
  49. package/core/host_runtime/antigravity.py +162 -0
  50. package/core/host_runtime/host_bootstrap.py +18 -7
  51. package/core/host_runtime/host_evaluators.py +4 -4
  52. package/core/host_runtime/host_registry.py +3 -1
  53. package/core/host_runtime/mcp_process_tracker.py +30 -3
  54. package/core/host_runtime/mcp_registry_gate.py +34 -11
  55. package/core/hosts/README.md +4 -0
  56. package/core/hosts/agnescode.py +415 -0
  57. package/core/hosts/antigravity.py +115 -0
  58. package/core/hosts/codex.py +3 -0
  59. package/core/hosts/dsh.py +42 -23
  60. package/core/hosts/minimax.py +5 -4
  61. package/core/hosts/opencode.py +11 -3
  62. package/core/i18n.py +94 -5
  63. package/core/infra/README.md +1 -1
  64. package/core/infra/build_info.py +2 -2
  65. package/core/infra/python_runtime.py +4 -1
  66. package/core/launch_phases/README.md +2 -2
  67. package/core/launch_phases/finding_confirm_phase.py +1 -1
  68. package/core/launch_phases/semantic_recon.py +3 -19
  69. package/core/launch_phases/startup_version_gate.py +2 -2
  70. package/core/launch_phases/supervisor_bridge.py +2 -0
  71. package/core/launch_phases/supervisor_degraded.py +7 -5
  72. package/core/launch_phases/verify_loop.py +3 -19
  73. package/core/ledger/README.md +1 -1
  74. package/core/ledger/finding_confirmation.py +1 -1
  75. package/core/ledger/finding_verification.py +2 -20
  76. package/core/ledger/fp_ledger.py +3 -19
  77. package/core/ledger/life_ledger.py +7 -33
  78. package/core/ledger/schema.py +1 -1
  79. package/core/locales/en-US.json +3 -3
  80. package/core/locales/zh-CN.json +3 -3
  81. package/core/mcp_handlers/supervisor_handlers.py +1 -1
  82. package/core/mcp_runtime_support/common.py +6 -0
  83. package/core/mcp_runtime_support/environment.py +88 -24
  84. package/core/metadata.txt +1 -1
  85. package/core/planning/README.md +1 -1
  86. package/core/planning/prompt_harness.py +2 -2
  87. package/core/planning/target_sandbox_manager.py +2 -0
  88. package/core/probes/codebase_memory_probe.py +43 -24
  89. package/core/probes/mobile_probe.py +1 -0
  90. package/core/probes/probe_registry.py +10 -7
  91. package/core/probes/sast_probe.py +1 -1
  92. package/core/probes/sca_scanner.py +1 -1
  93. package/core/project_profiler/constants.py +1 -1
  94. package/core/prompts/command_routing_en.md +6 -5
  95. package/core/prompts/command_routing_zh.md +6 -5
  96. package/core/repair/rsi_rounds.py +3 -0
  97. package/core/repair/self_heal.py +160 -6
  98. package/core/retrieval/README.md +1 -1
  99. package/core/retrieval/symbol_index.py +227 -52
  100. package/core/runtime/README.md +1 -1
  101. package/core/runtime/daemon_runner.py +3 -2
  102. package/core/runtime/project_init.py +1 -1
  103. package/core/runtime/scenario_eval.py +5 -1
  104. package/core/runtime/tool_install_targets.py +12 -2
  105. package/core/skills/README.md +4 -2
  106. package/core/skills/bugx_docs_cloud_sync.py +658 -0
  107. package/core/skills/bugx_docs_mcp_server.py +966 -140
  108. package/core/skills/bugx_mcp_server.py +9 -0
  109. package/core/skills/mcp_session_proof.py +3 -31
  110. package/core/supervisor/README.md +1 -1
  111. package/core/supervisor/finding_commit.py +3 -24
  112. package/core/supervisor/task_scheduler.py +5 -2
  113. package/core/supervisor/worker_execution.py +16 -3
  114. package/core/supervisor/worker_handoff.py +2 -2
  115. package/core/webui/docs_session_service.py +40 -2
  116. package/core/webui/mcp_inspector.py +6 -6
  117. package/ecosystem/integrations/cline/skills/bugx/SKILL.md +46 -46
  118. package/ecosystem/integrations/dsh/agents/bugx.md +2 -1
  119. package/ecosystem/integrations/dsh/mcp/package.json +1 -1
  120. package/ecosystem/integrations/dsh/skills/bugx/SKILL.md +5 -5
  121. package/ecosystem/integrations/dsh/ui/package.json +1 -1
  122. package/ecosystem/integrations/opencode/bugx-mcp-manifest.json +4 -4
  123. package/ecosystem/integrations/opencode/mcp-lock.json +1 -1
  124. package/ecosystem/integrations/pi/extensions/bugx/manifest.json +1 -1
  125. package/ecosystem/integrations/pi/skills/bugx/SKILL.md +5 -5
  126. package/ecosystem/integrations/qoder/CONNECTORS.md +11 -23
  127. package/ecosystem/integrations/qoder/connector-meta.json +1 -1
  128. package/ecosystem/integrations/workbuddy/connector-meta.json +1 -1
  129. package/ecosystem/integrations/workbuddy/skills/bugx/SKILL.md +8 -7
  130. package/ecosystem/plugins/bugx/.claude-plugin/plugin.json +1 -1
  131. package/ecosystem/plugins/bugx/.codex-plugin/plugin.json +1 -1
  132. package/ecosystem/plugins/bugx/.zcode-plugin/plugin.json +1 -1
  133. package/ecosystem/plugins/bugx/agents/bugx-worker.md +14 -18
  134. package/ecosystem/plugins/bugx/agents/bugx.md +45 -49
  135. package/ecosystem/plugins/bugx/skills/bugx/SKILL.md +7 -7
  136. package/ecosystem/plugins/bugx/skills/bugx-zcode/SKILL.md +2 -2
  137. package/interfaces/cli/bugx_cli/__init__.py +1 -1
  138. package/interfaces/cli/bugx_cli/cli.py +153 -8
  139. package/interfaces/cli/bugx_cli/commands/agent.py +376 -69
  140. package/interfaces/cli/bugx_cli/commands/audit.py +2 -1
  141. package/interfaces/cli/bugx_cli/commands/cloud.py +42 -1
  142. package/interfaces/cli/bugx_cli/commands/doctor.py +650 -223
  143. package/interfaces/cli/bugx_cli/commands/guide.py +143 -0
  144. package/interfaces/cli/bugx_cli/commands/issue.py +262 -0
  145. package/interfaces/cli/bugx_cli/commands/lifecycle.py +56 -26
  146. package/interfaces/cli/bugx_cli/commands/patch.py +5 -1
  147. package/interfaces/cli/bugx_cli/commands/plugin.py +306 -56
  148. package/interfaces/cli/bugx_cli/commands/plugin_antigravity.py +350 -0
  149. package/interfaces/cli/bugx_cli/commands/plugin_claude.py +2 -2
  150. package/interfaces/cli/bugx_cli/commands/plugin_kimi.py +154 -62
  151. package/interfaces/cli/bugx_cli/commands/plugin_minimax.py +308 -108
  152. package/interfaces/cli/bugx_cli/commands/system.py +11 -1
  153. package/interfaces/cli/bugx_cli/common.py +39 -8
  154. package/interfaces/cli/bugx_cli/host_adapters.py +46 -3
  155. package/interfaces/cli/bugx_cli/hosts/registry.py +3 -2
  156. package/interfaces/cli/bugx_cli/hosts/template_engine.py +21 -2
  157. package/interfaces/cli/bugx_cli/infra/__init__.py +4 -0
  158. package/interfaces/cli/bugx_cli/infra/ai_advisor.py +14 -12
  159. package/interfaces/cli/bugx_cli/infra/engine_installer.py +76 -10
  160. package/interfaces/cli/bugx_cli/infra/host_sync.py +66 -1
  161. package/interfaces/cli/bugx_cli/infra/mcp_advisor.py +240 -50
  162. package/package.json +3 -2
  163. package/pyproject.toml +22 -2
  164. package/scripts/sync-version.mjs +1 -1
  165. package/skills/README.md +1 -2
  166. package/skills/platform/bugx/SKILL.md +50 -0
  167. package/skills/platform/bugx-user/SKILL.md +0 -92
@@ -12,6 +12,111 @@ import sys
12
12
  import typing
13
13
  from pathlib import Path
14
14
 
15
+
16
+ def _ensure_utf8_stdio() -> None:
17
+ """Force UTF-8 stdio and child Python encoding on Windows (avoid GBK/cp1252 crashes)."""
18
+ os.environ.setdefault("PYTHONUTF8", "1")
19
+ for stream, err_mode in ((sys.stdin, "strict"), (sys.stdout, "replace"), (sys.stderr, "replace")):
20
+ reconf = getattr(stream, "reconfigure", None)
21
+ if callable(reconf):
22
+ try:
23
+ reconf(encoding="utf-8", errors=err_mode)
24
+ except (OSError, ValueError):
25
+ pass
26
+
27
+
28
+ _ensure_utf8_stdio()
29
+
30
+
31
+ def _fast_dispatch_mcp_serve() -> None:
32
+ """Start the stdio MCP script before heavy CLI imports.
33
+
34
+ ``bugx mcp serve`` is a long-lived protocol process. Importing the full
35
+ command surface first adds about six seconds on Windows, which is longer
36
+ than Antigravity ACP's MCP pre-load window and makes the Supervisor/Worker
37
+ servers disappear from the session. The core script is self-bootstrapping
38
+ when executed directly, so early dispatch preserves the exact runtime
39
+ while removing the unrelated CLI import cost. Unknown flags and help still
40
+ use the normal parser.
41
+ """
42
+ raw = list(sys.argv[1:])
43
+ if len(raw) < 2 or raw[:2] != ["mcp", "serve"]:
44
+ return
45
+
46
+ root_value: str | None = None
47
+ role = "host"
48
+ takeover = False
49
+ index = 2
50
+ while index < len(raw):
51
+ token = raw[index]
52
+ if token in {"-h", "--help"}:
53
+ return
54
+ if token == "--takeover":
55
+ takeover = True
56
+ index += 1
57
+ continue
58
+ if token == "--root":
59
+ if index + 1 >= len(raw):
60
+ return
61
+ root_value = raw[index + 1]
62
+ index += 2
63
+ continue
64
+ if token.startswith("--root="):
65
+ root_value = token.split("=", 1)[1]
66
+ index += 1
67
+ continue
68
+ if token == "--role":
69
+ if index + 1 >= len(raw) or raw[index + 1] not in {"host", "worker"}:
70
+ return
71
+ role = raw[index + 1]
72
+ index += 2
73
+ continue
74
+ if token.startswith("--role="):
75
+ role = token.split("=", 1)[1]
76
+ if role not in {"host", "worker"}:
77
+ return
78
+ index += 1
79
+ continue
80
+ # Let argparse retain its normal error/help contract for anything else.
81
+ return
82
+
83
+ if root_value is None:
84
+ for env_name in ("BUGX_PROJECT_ROOT", "CODEBUDDY_PROJECT_DIR", "CLAUDE_PROJECT_DIR"):
85
+ candidate = os.environ.get(env_name)
86
+ if candidate and Path(candidate).is_dir():
87
+ root_value = candidate
88
+ break
89
+ root = Path(root_value or Path.cwd()).expanduser().resolve()
90
+
91
+ engine_candidates: list[Path] = []
92
+ for env_name in ("BUGX_GLOBAL_ENGINE_ROOT", "BUGX_ASSET_ROOT"):
93
+ raw_engine = os.environ.get(env_name)
94
+ if raw_engine:
95
+ engine_candidates.append(Path(raw_engine).expanduser() / "skills" / "bugx_mcp_server.py")
96
+ engine_candidates.append(Path.home() / ".bugx" / "core" / "skills" / "bugx_mcp_server.py")
97
+ # Source checkout fallback keeps ``python -m`` development runs working.
98
+ engine_candidates.append(
99
+ Path(__file__).resolve().parents[3] / "core" / "skills" / "bugx_mcp_server.py"
100
+ )
101
+ script = next((candidate for candidate in engine_candidates if candidate.is_file()), None)
102
+ if script is None:
103
+ return
104
+
105
+ forwarded = ["serve", "--root", str(root), "--role", role]
106
+ if takeover:
107
+ forwarded.append("--takeover")
108
+ command = [sys.executable, str(script), *forwarded]
109
+ if os.name == "nt":
110
+ # Windows execv uses CRT argument joining without preserving spaces.
111
+ # subprocess quotes each argument and keeps the stdio handles attached.
112
+ import subprocess
113
+
114
+ raise SystemExit(subprocess.call(command))
115
+ os.execv(sys.executable, command)
116
+
117
+
118
+ _fast_dispatch_mcp_serve()
119
+
15
120
  # 确保在管道重定向或非 UTF-8 环境(如 Windows GBK/cp936 控制台)下输出非 ASCII 符号(如 ✓、✗)不触发 UnicodeEncodeError
16
121
  for _stream in (sys.stdout, sys.stderr):
17
122
  if hasattr(_stream, "reconfigure"):
@@ -45,6 +150,7 @@ from .hosts.registry import (
45
150
  from .commands import (
46
151
  plugin, lifecycle, agent, doctor, knowledge, cloud, system, stats, project,
47
152
  patch, skill, daemon, autonomous, goal, advisory, report, audit, interaction,
153
+ guide, issue,
48
154
  )
49
155
 
50
156
 
@@ -66,7 +172,7 @@ class _UniqueRootAction(argparse.Action):
66
172
  for _mod in (
67
173
  common, plugin, lifecycle, agent, doctor, knowledge, cloud, system, stats,
68
174
  project, patch, skill, daemon, autonomous, goal, advisory, report,
69
- audit, interaction,
175
+ audit, interaction, guide, issue,
70
176
  ):
71
177
  for _k, _v in vars(_mod).items():
72
178
  if not _k.startswith("__"):
@@ -81,6 +187,8 @@ _COMMAND_DESCRIPTIONS: dict[str, str] = {
81
187
  "uninstall": "从指定 AI 宿主卸载 BugX 集成",
82
188
  "audit": "项目级漏洞渗透挖掘与代码安全审计",
83
189
  "interaction": "查看/回答 BugX 抛出的结构化交互问题(非交互宿主答案回灌)",
190
+ "issue": "问题上报与会话异常诊断(脱敏打包上传至 BugX 服务端)",
191
+ "feedback": "问题快速反馈(bugx issue report 快捷方式)",
84
192
  "autonomous": "启动全自动无人值守 BugX 漏洞挖掘",
85
193
  "analyze": "项目画像深度分析与代码覆盖度全景扫描",
86
194
  "project": "项目元数据管理、画像展示与云端同步",
@@ -126,6 +234,9 @@ _INTENT_SYNONYMS: dict[str, str] = {
126
234
  "状态": "stats",
127
235
  "统计": "stats",
128
236
  "守护": "daemon",
237
+ "指引": "guide",
238
+ "指南": "guide",
239
+ "问答": "guide",
129
240
  }
130
241
 
131
242
 
@@ -314,6 +425,15 @@ def build_parser() -> argparse.ArgumentParser:
314
425
  completion.add_argument("shell", choices=("bash", "zsh", "fish"))
315
426
  completion.set_defaults(handler=command_completion)
316
427
 
428
+ guide = subparsers.add_parser("guide", help="检索 BugX 本地文档与操作指南(支持中英文按需检索)")
429
+ guide.add_argument("query", help="检索关键词或问题(例如:'云端登录'、'错题集'、'doctor 修复')")
430
+ guide.add_argument("--root", type=Path, default=None, help="项目根目录")
431
+ guide.add_argument("--limit", type=int, default=3, help="返回条目数上限(默认 3,最大 10)")
432
+ guide.add_argument("--reindex", action="store_true", help="强制重新建立本地知识库全文索引")
433
+ guide.add_argument("--offline", action="store_true", help="强制离线模式(不拉取云端官方热更新缓存)")
434
+ guide.add_argument("--json", action="store_true", help="以 JSON 格式输出结果")
435
+ guide.set_defaults(handler=command_guide)
436
+
317
437
  init = subparsers.add_parser("init", help="把宿主无关的 BugX 核心初始化到项目")
318
438
  init.add_argument("--root", type=Path, default=Path.cwd())
319
439
  init.add_argument("--force", action="store_true", help="更新已有静态文件")
@@ -353,6 +473,14 @@ def build_parser() -> argparse.ArgumentParser:
353
473
  install.add_argument("--force", action="store_true")
354
474
  install.add_argument("--allow-missing", action="store_true")
355
475
  install.add_argument("--non-interactive", action="store_true")
476
+ install.add_argument(
477
+ "--docs-transport", choices=("stdio", "remote"), default=None,
478
+ help="显式设置 bugx-docs MCP 传输模式:stdio(本地双域网关)或 remote(官方官档远端 HTTP)",
479
+ )
480
+ install.add_argument(
481
+ "--docs-remote-url", default=None,
482
+ help="配合 --docs-transport=remote 指定官方 docs MCP 服务端 URL",
483
+ )
356
484
  install.add_argument("--locale", type=str, default=None, help="显式指定安装语言(如 zh-CN, en-US)")
357
485
  install.add_argument("--json", action="store_true")
358
486
 
@@ -517,14 +645,15 @@ def build_parser() -> argparse.ArgumentParser:
517
645
  mcp_spy.set_defaults(handler=command_mcp_spy)
518
646
 
519
647
  mcp_docs = mcp_subparsers.add_parser(
520
- "docs", help="索引或启动本地项目文档 MCP(无第三方 API Key)",
648
+ "docs", help="索引、同步或启动双域文档 MCP(支持云端官方热更新 + 本地私有隔离)",
521
649
  )
522
650
  mcp_docs_subparsers = mcp_docs.add_subparsers(
523
651
  dest="mcp_docs_command", required=True,
524
652
  )
525
653
  for command_name, help_text in (
526
- ("index", "索引 README/docs/core Markdown 到 SQLite FTS5"),
527
- ("serve", "以 stdio 方式启动只读文档 MCP"),
654
+ ("index", "索引当前项目文档到 SQLite FTS5 trigram 章节索引"),
655
+ ("serve", "以 stdio 方式启动只读文档 MCP(官方热同步 + 项目本地双域检索)"),
656
+ ("sync", "同步全局官方云端文档缓存并刷新当前项目文档索引"),
528
657
  ):
529
658
  docs_command = mcp_docs_subparsers.add_parser(command_name, help=help_text)
530
659
  docs_command.add_argument(
@@ -538,6 +667,15 @@ def build_parser() -> argparse.ArgumentParser:
538
667
  docs_command.add_argument("--version", default=None)
539
668
  if command_name == "serve":
540
669
  docs_command.add_argument("--no-auto-index", action="store_true")
670
+ docs_command.add_argument(
671
+ "--mode", choices=("hybrid", "local-only", "remote-only"), default="hybrid",
672
+ help="hybrid=双域缓存热同步(默认);local-only=纯本地离线;remote-only=官档直查服务端",
673
+ )
674
+ docs_command.add_argument("--remote-url", default=None, help="覆盖云端文档服务地址")
675
+ elif command_name == "sync":
676
+ docs_command.add_argument("--force", action="store_true", help="忽略冷却期强制拉取服务端清单")
677
+ docs_command.add_argument("--offline", action="store_true", help="仅检查本地与重建项目库,不联网")
678
+ docs_command.add_argument("--remote-url", default=None, help="覆盖云端文档服务地址")
541
679
  docs_command.set_defaults(handler=command_mcp_docs)
542
680
 
543
681
  capability = subparsers.add_parser(
@@ -814,9 +952,12 @@ def build_parser() -> argparse.ArgumentParser:
814
952
  return p
815
953
 
816
954
  p_auth = _auth_common(auth)
817
- p_auth.add_argument("auth_action", choices=("login", "status", "set-key", "logout"))
955
+ p_auth.add_argument("auth_action", choices=("login", "status", "set-key", "logout", "verify"))
818
956
  p_auth.add_argument("--api-key", dest="api_key")
819
957
  p_auth.add_argument("--json", action="store_true")
958
+ p_auth.add_argument("--non-blocking", dest="non_blocking", action="store_true",
959
+ help="非阻塞模式发起登录,立即打印授权链接并退出")
960
+ p_auth.add_argument("--device-code", dest="device_code", help="指定待核验的 device_code")
820
961
  p_auth.add_argument(
821
962
  "--verify", dest="verify_auth", action="store_true",
822
963
  help="通过只读云端接口验证登录态(可能触发刷新令牌,不创建或修改业务数据)",
@@ -978,13 +1119,14 @@ def build_parser() -> argparse.ArgumentParser:
978
1119
  "config_key",
979
1120
  choices=("telemetry.data_sharing",
980
1121
  "cloud.sync_detail_mode", "cloud.sensitive_policy",
981
- "cloud.sync_scope_default"),
982
- help="telemetry.data_sharing=遥测数据分享;cloud.*=DOC-211 同步内容策略",
1122
+ "cloud.sync_scope_default", "cloud.docs_remote_enabled"),
1123
+ help="telemetry.data_sharing=遥测数据分享;cloud.*=同步与文档远端策略",
983
1124
  )
984
1125
  config_set.add_argument(
985
1126
  "config_value",
986
1127
  help="telemetry.data_sharing 取 true/false;cloud.sync_detail_mode 取 full/summary;"
987
- "cloud.sensitive_policy 取 block/redact/allow;cloud.sync_scope_default 取 all/project/global",
1128
+ "cloud.sensitive_policy 取 block/redact/allow;cloud.sync_scope_default 取 all/project/global;"
1129
+ "cloud.docs_remote_enabled 取 true/false",
988
1130
  )
989
1131
  config_set.set_defaults(handler=command_telemetry_config)
990
1132
 
@@ -1464,6 +1606,9 @@ def build_parser() -> argparse.ArgumentParser:
1464
1606
  # ── interaction:非交互宿主的启动门禁答案回灌通道 ──
1465
1607
  interaction.register_parser(subparsers)
1466
1608
 
1609
+ # ── issue / feedback:问题上报、会话脱敏提取与异常现场诊断 ──
1610
+ issue.register_issue_parser(subparsers)
1611
+
1467
1612
  # ── advisory:GitHub Security Advisory (GHSA) 标准公告与 PR 草稿 ──
1468
1613
  adv_parser = subparsers.add_parser("advisory", help="GitHub Security Advisory (GHSA) 标准安全公告与 PR 修复草案管理")
1469
1614
  adv_sub = adv_parser.add_subparsers(dest="advisory_command")