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.
- package/core/README.md +5 -3
- package/core/agent/agent_execution.py +7 -0
- package/core/assets/bugx-wechat-group.png +0 -0
- package/core/bugx.md +2 -2
- package/core/bugx_paths.py +10 -2
- package/core/bundled_docs/OVERVIEW.md +311 -0
- package/core/bundled_docs/README.md +10 -0
- package/core/bundled_docs/README_EN.md +278 -0
- package/core/bundled_docs/ai/01_AI_REFERENCE.md +838 -0
- package/core/bundled_docs/ai/02_AI_USAGE.md +161 -0
- package/core/bundled_docs/ai/03_AI_COMMANDS.md +322 -0
- package/core/bundled_docs/guides/01_USER_GUIDE.md +887 -0
- package/core/bundled_docs/guides/02_COMMANDS.md +935 -0
- package/core/bundled_docs/guides/03_TROUBLESHOOTING.md +763 -0
- package/core/bundled_docs/guides/04_CLOUD_AUTH_AND_SYNC_COOKBOOK.md +48 -0
- package/core/bundled_docs/guides/05_HOST_MATRIX_AND_DISPATCH.md +25 -0
- package/core/bundled_docs/guides/06_PROBES_AND_POC_COOKBOOK.md +49 -0
- package/core/bundled_docs/guides/07_LIFECYCLE_AND_RECOVERY_STATES.md +46 -0
- package/core/bundled_docs/guides/08_LESSONS_AND_PRIVACY_BOUNDARY.md +35 -0
- package/core/bundled_docs/hosts/bugx-claude_SKILL.md +326 -0
- package/core/bundled_docs/hosts/bugx-dsh_SKILL.md +229 -0
- package/core/bundled_docs/hosts/bugx-opencode_SKILL.md +129 -0
- package/core/bundled_docs/hosts/bugx-zcode_SKILL.md +459 -0
- package/core/bundled_docs/hosts/bugx_SKILL.md +118 -0
- package/core/bundled_docs/hosts/cline_bugx_SKILL.md +69 -0
- package/core/bundled_docs/hosts/platform_bugx_SKILL.md +50 -0
- package/core/bundled_docs/manifest.json +140 -0
- package/core/bundled_docs/reference/01_ENVIRONMENT_VARIABLES.md +422 -0
- package/core/bundled_docs/reference/04_REPOSITORY_TOPOLOGY.md +180 -0
- package/core/cli-help.txt +7 -3
- package/core/cloud_sync/cloud_client.py +81 -2
- package/core/cloud_sync/endpoint_router.py +22 -9
- package/core/cloud_sync/issue_uploader.py +297 -0
- package/core/cloud_sync/sensitive_filter.py +77 -7
- package/core/contracts/AGENT_GUIDE.md +3 -9
- package/core/contracts/README.md +1 -1
- package/core/contracts/bugx-runtime-contract.md +10 -20
- package/core/contracts/bugx-worker.md +1 -1
- package/core/coverage/coverage_ai_review.py +15 -11
- package/core/coverage/coverage_bootstrap.py +18 -13
- package/core/coverage/coverage_discovery.py +1 -1
- package/core/dev_harness/interaction_preset.py +1 -1
- package/core/engine-integrity.json +283 -159
- package/core/host_acp/README.md +4 -0
- package/core/host_acp/agnescode.py +128 -0
- package/core/host_acp/antigravity.py +153 -0
- package/core/host_runtime/README.md +3 -0
- package/core/host_runtime/adapters.py +5 -1
- package/core/host_runtime/antigravity.py +162 -0
- package/core/host_runtime/host_bootstrap.py +18 -7
- package/core/host_runtime/host_evaluators.py +4 -4
- package/core/host_runtime/host_registry.py +3 -1
- package/core/host_runtime/mcp_process_tracker.py +30 -3
- package/core/host_runtime/mcp_registry_gate.py +34 -11
- package/core/hosts/README.md +4 -0
- package/core/hosts/agnescode.py +415 -0
- package/core/hosts/antigravity.py +115 -0
- package/core/hosts/codex.py +3 -0
- package/core/hosts/dsh.py +42 -23
- package/core/hosts/minimax.py +5 -4
- package/core/hosts/opencode.py +11 -3
- package/core/i18n.py +94 -5
- package/core/infra/README.md +1 -1
- package/core/infra/build_info.py +2 -2
- package/core/infra/python_runtime.py +4 -1
- package/core/launch_phases/README.md +2 -2
- package/core/launch_phases/finding_confirm_phase.py +1 -1
- package/core/launch_phases/semantic_recon.py +3 -19
- package/core/launch_phases/startup_version_gate.py +2 -2
- package/core/launch_phases/supervisor_bridge.py +2 -0
- package/core/launch_phases/supervisor_degraded.py +7 -5
- package/core/launch_phases/verify_loop.py +3 -19
- package/core/ledger/README.md +1 -1
- package/core/ledger/finding_confirmation.py +1 -1
- package/core/ledger/finding_verification.py +2 -20
- package/core/ledger/fp_ledger.py +3 -19
- package/core/ledger/life_ledger.py +7 -33
- package/core/ledger/schema.py +1 -1
- package/core/locales/en-US.json +3 -3
- package/core/locales/zh-CN.json +3 -3
- package/core/mcp_handlers/supervisor_handlers.py +1 -1
- package/core/mcp_runtime_support/common.py +6 -0
- package/core/mcp_runtime_support/environment.py +88 -24
- package/core/metadata.txt +1 -1
- package/core/planning/README.md +1 -1
- package/core/planning/prompt_harness.py +2 -2
- package/core/planning/target_sandbox_manager.py +2 -0
- package/core/probes/codebase_memory_probe.py +43 -24
- package/core/probes/mobile_probe.py +1 -0
- package/core/probes/probe_registry.py +10 -7
- package/core/probes/sast_probe.py +1 -1
- package/core/probes/sca_scanner.py +1 -1
- package/core/project_profiler/constants.py +1 -1
- package/core/prompts/command_routing_en.md +6 -5
- package/core/prompts/command_routing_zh.md +6 -5
- package/core/repair/rsi_rounds.py +3 -0
- package/core/repair/self_heal.py +160 -6
- package/core/retrieval/README.md +1 -1
- package/core/retrieval/symbol_index.py +227 -52
- package/core/runtime/README.md +1 -1
- package/core/runtime/daemon_runner.py +3 -2
- package/core/runtime/project_init.py +1 -1
- package/core/runtime/scenario_eval.py +5 -1
- package/core/runtime/tool_install_targets.py +12 -2
- package/core/skills/README.md +4 -2
- package/core/skills/bugx_docs_cloud_sync.py +658 -0
- package/core/skills/bugx_docs_mcp_server.py +966 -140
- package/core/skills/bugx_mcp_server.py +9 -0
- package/core/skills/mcp_session_proof.py +3 -31
- package/core/supervisor/README.md +1 -1
- package/core/supervisor/finding_commit.py +3 -24
- package/core/supervisor/task_scheduler.py +5 -2
- package/core/supervisor/worker_execution.py +16 -3
- package/core/supervisor/worker_handoff.py +2 -2
- package/core/webui/docs_session_service.py +40 -2
- package/core/webui/mcp_inspector.py +6 -6
- package/ecosystem/integrations/cline/skills/bugx/SKILL.md +46 -46
- package/ecosystem/integrations/dsh/agents/bugx.md +2 -1
- package/ecosystem/integrations/dsh/mcp/package.json +1 -1
- package/ecosystem/integrations/dsh/skills/bugx/SKILL.md +5 -5
- package/ecosystem/integrations/dsh/ui/package.json +1 -1
- package/ecosystem/integrations/opencode/bugx-mcp-manifest.json +4 -4
- package/ecosystem/integrations/opencode/mcp-lock.json +1 -1
- package/ecosystem/integrations/pi/extensions/bugx/manifest.json +1 -1
- package/ecosystem/integrations/pi/skills/bugx/SKILL.md +5 -5
- package/ecosystem/integrations/qoder/CONNECTORS.md +11 -23
- package/ecosystem/integrations/qoder/connector-meta.json +1 -1
- package/ecosystem/integrations/workbuddy/connector-meta.json +1 -1
- package/ecosystem/integrations/workbuddy/skills/bugx/SKILL.md +8 -7
- package/ecosystem/plugins/bugx/.claude-plugin/plugin.json +1 -1
- package/ecosystem/plugins/bugx/.codex-plugin/plugin.json +1 -1
- package/ecosystem/plugins/bugx/.zcode-plugin/plugin.json +1 -1
- package/ecosystem/plugins/bugx/agents/bugx-worker.md +14 -18
- package/ecosystem/plugins/bugx/agents/bugx.md +45 -49
- package/ecosystem/plugins/bugx/skills/bugx/SKILL.md +7 -7
- package/ecosystem/plugins/bugx/skills/bugx-zcode/SKILL.md +2 -2
- package/interfaces/cli/bugx_cli/__init__.py +1 -1
- package/interfaces/cli/bugx_cli/cli.py +153 -8
- package/interfaces/cli/bugx_cli/commands/agent.py +376 -69
- package/interfaces/cli/bugx_cli/commands/audit.py +2 -1
- package/interfaces/cli/bugx_cli/commands/cloud.py +42 -1
- package/interfaces/cli/bugx_cli/commands/doctor.py +650 -223
- package/interfaces/cli/bugx_cli/commands/guide.py +143 -0
- package/interfaces/cli/bugx_cli/commands/issue.py +262 -0
- package/interfaces/cli/bugx_cli/commands/lifecycle.py +56 -26
- package/interfaces/cli/bugx_cli/commands/patch.py +5 -1
- package/interfaces/cli/bugx_cli/commands/plugin.py +306 -56
- package/interfaces/cli/bugx_cli/commands/plugin_antigravity.py +350 -0
- package/interfaces/cli/bugx_cli/commands/plugin_claude.py +2 -2
- package/interfaces/cli/bugx_cli/commands/plugin_kimi.py +154 -62
- package/interfaces/cli/bugx_cli/commands/plugin_minimax.py +308 -108
- package/interfaces/cli/bugx_cli/commands/system.py +11 -1
- package/interfaces/cli/bugx_cli/common.py +39 -8
- package/interfaces/cli/bugx_cli/host_adapters.py +46 -3
- package/interfaces/cli/bugx_cli/hosts/registry.py +3 -2
- package/interfaces/cli/bugx_cli/hosts/template_engine.py +21 -2
- package/interfaces/cli/bugx_cli/infra/__init__.py +4 -0
- package/interfaces/cli/bugx_cli/infra/ai_advisor.py +14 -12
- package/interfaces/cli/bugx_cli/infra/engine_installer.py +76 -10
- package/interfaces/cli/bugx_cli/infra/host_sync.py +66 -1
- package/interfaces/cli/bugx_cli/infra/mcp_advisor.py +240 -50
- package/package.json +3 -2
- package/pyproject.toml +22 -2
- package/scripts/sync-version.mjs +1 -1
- package/skills/README.md +1 -2
- package/skills/platform/bugx/SKILL.md +50 -0
- package/skills/platform/bugx-user/SKILL.md +0 -92
|
@@ -175,9 +175,10 @@ class DaemonRunner:
|
|
|
175
175
|
self._remove_pid()
|
|
176
176
|
return 0
|
|
177
177
|
|
|
178
|
+
sigkill = getattr(signal, "SIGKILL", signal.SIGTERM)
|
|
178
179
|
print(f"[BugX Daemon] 正在终止守护进程 (PID: {pid})...")
|
|
179
180
|
try:
|
|
180
|
-
sig =
|
|
181
|
+
sig = sigkill if force else signal.SIGTERM
|
|
181
182
|
os.kill(pid, sig)
|
|
182
183
|
except OSError as exc:
|
|
183
184
|
print(f"[BugX Daemon] 发送信号失败: {exc}")
|
|
@@ -190,7 +191,7 @@ class DaemonRunner:
|
|
|
190
191
|
|
|
191
192
|
if _is_pid_alive(pid) and force:
|
|
192
193
|
try:
|
|
193
|
-
os.kill(pid,
|
|
194
|
+
os.kill(pid, sigkill)
|
|
194
195
|
except OSError:
|
|
195
196
|
pass
|
|
196
197
|
|
|
@@ -468,7 +468,7 @@ def run_init_pipeline(root: Path, engine_root: Path) -> dict[str, Any]:
|
|
|
468
468
|
if not coverage.get("ready"):
|
|
469
469
|
if coverage.get("blocked"):
|
|
470
470
|
raise RuntimeError(str(coverage.get("detail") or "覆盖清单被阻断"))
|
|
471
|
-
coverage_bootstrap.bootstrap(root, confirmed=True)
|
|
471
|
+
coverage_bootstrap.bootstrap(root, confirmed=True, symbols=False)
|
|
472
472
|
_write_ready_config(root, config, current, optional_mcp_report)
|
|
473
473
|
ticket = resume_ticket.create_resume_ticket(root) if initialized else None
|
|
474
474
|
(root / ".bugx" / ".init_progress.json").unlink(missing_ok=True)
|
|
@@ -141,11 +141,15 @@ def _run(argv: list[str], *, cwd: Path, timeout: float = 120.0,
|
|
|
141
141
|
# L3 等场景验证当前 checkout;不让已安装的旧引擎成为量具。
|
|
142
142
|
merged["BUGX_DEV_MODE"] = "1"
|
|
143
143
|
# 源码树里的版本声明是构建模板;开发态启动门禁需要同一解析值。
|
|
144
|
-
merged["BUGX_VERSION"] = os.environ.get("BUGX_VERSION", "0.1.
|
|
144
|
+
merged["BUGX_VERSION"] = os.environ.get("BUGX_VERSION", "0.1.5")
|
|
145
145
|
merged["HOME"] = str(_sandbox_home())
|
|
146
146
|
try:
|
|
147
147
|
proc = subprocess.run(
|
|
148
148
|
argv, cwd=str(cwd), capture_output=True, text=True,
|
|
149
|
+
# 场景评测是无人值守量具;如果外层宿主恰好有 TTY,子命令不能
|
|
150
|
+
# 继承它再偷偷阻塞在 input()。显式关闭 stdin,让意外交互立即
|
|
151
|
+
# 得到 EOF/失败,而不是把 RSI 轮次挂成数分钟的假运行。
|
|
152
|
+
stdin=subprocess.DEVNULL,
|
|
149
153
|
timeout=timeout, env=merged, check=False,
|
|
150
154
|
)
|
|
151
155
|
return proc.returncode, proc.stdout, proc.stderr
|
|
@@ -1,16 +1,26 @@
|
|
|
1
|
-
"""Pinned top-level package specs used by optional
|
|
1
|
+
"""Pinned top-level package specs used by required and optional tool probes."""
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
REQUIRED_TOOL_PACKAGE_SPECS = {
|
|
4
4
|
"codebase-memory": "codebase-memory-mcp==0.12.1",
|
|
5
|
+
"tree-sitter": "tree-sitter-language-pack==1.14.3",
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
OPTIONAL_TOOL_PACKAGE_SPECS = {
|
|
5
9
|
"ast-grep": "ast-grep-cli==0.45.1",
|
|
6
10
|
"semgrep": "semgrep==1.182.0",
|
|
7
11
|
"bandit": "bandit==1.9.4",
|
|
8
12
|
}
|
|
9
13
|
|
|
14
|
+
TOOL_PACKAGE_SPECS = {
|
|
15
|
+
**REQUIRED_TOOL_PACKAGE_SPECS,
|
|
16
|
+
**OPTIONAL_TOOL_PACKAGE_SPECS,
|
|
17
|
+
}
|
|
18
|
+
|
|
10
19
|
# Only these probe capabilities may trigger self-healing. Values are trusted
|
|
11
20
|
# registry keys, never package names copied from probe output.
|
|
12
21
|
PROBE_REPAIR_TARGETS = {
|
|
13
22
|
"codebase-memory": ("codebase-memory",),
|
|
23
|
+
"tree-sitter": ("tree-sitter",),
|
|
14
24
|
"efficiency": ("ast-grep",),
|
|
15
25
|
"sast": ("bandit", "semgrep"),
|
|
16
26
|
"bandit": ("bandit",),
|
package/core/skills/README.md
CHANGED
|
@@ -16,7 +16,8 @@ flowchart TD
|
|
|
16
16
|
|
|
17
17
|
subgraph MCPServer["2. MCP 协议服务 (Model Context Protocol Services)"]
|
|
18
18
|
BMS["bugx_mcp_server.py<br/>BugX 官方标准 MCP Server 入口与状态机暴露"]
|
|
19
|
-
BDMS["bugx_docs_mcp_server.py<br
|
|
19
|
+
BDMS["bugx_docs_mcp_server.py<br/>双作用域章节级文档与架构知识库检索服务"]
|
|
20
|
+
BDCS["bugx_docs_cloud_sync.py<br/>官方文档不可变内容寻址缓存与热同步引擎"]
|
|
20
21
|
MSP["mcp_session_proof.py<br/>MCP 会话自证明与受控退休协议"]
|
|
21
22
|
MR["mcp_runtime.py<br/>离线锁定版本 MCP 包安装与生命周期管理"]
|
|
22
23
|
end
|
|
@@ -36,7 +37,8 @@ flowchart TD
|
|
|
36
37
|
| 文件名 | 职责与功能定位 | 关键类 / 函数 |
|
|
37
38
|
| :--- | :--- | :--- |
|
|
38
39
|
| `__init__.py` | 技能与 MCP 子系统聚合导出与包入口 | `__all__` |
|
|
39
|
-
| `
|
|
40
|
+
| `bugx_docs_cloud_sync.py` | 官方文档云端热同步客户端,管理不可变 SHA-256 缓存、单飞锁与安全 GC | `sync_official_docs`, `current_cached_db`, `remote_search_docs` |
|
|
41
|
+
| `bugx_docs_mcp_server.py` | 双作用域文档 MCP 服务端,基于 FTS5 trigram 与章节索引提供检索与目录浏览 | `DocsMcpError`, `index_documents`, `call_tool`, `serve` |
|
|
40
42
|
| `bugx_mcp_server.py` | BugX 核心 Supervisor MCP 服务端,向外部 Agent 暴露审计状态机 | `BugxMcpService`, `SERVER_NAME`, `SERVER_VERSION` |
|
|
41
43
|
| `mcp_runtime.py` | 离线 MCP 运行时,负责包隔离安装、版本回滚与沙箱启动 | `install_runtime`, `rollback_runtime`, `start_server`, `doctor_runtime` |
|
|
42
44
|
| `mcp_session_proof.py` | MCP 会话自证明与安全退役握手协议,防止 PID 复用与状态竞争 | `write_proof`, `read_proof`, `validate_proof`, `retire_target` |
|