debug-control-plane 0.1.0__py3-none-any.whl
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.
- debug_control_plane/__init__.py +7 -0
- debug_control_plane/device_discovery/__init__.py +82 -0
- debug_control_plane/device_discovery/device_candidates.py +326 -0
- debug_control_plane/device_discovery/device_pool.py +369 -0
- debug_control_plane/device_discovery/discovery/__init__.py +14 -0
- debug_control_plane/device_discovery/discovery/cross_identify.py +396 -0
- debug_control_plane/device_discovery/discovery/lan_scan.py +183 -0
- debug_control_plane/device_discovery/discovery/manual_registry.py +245 -0
- debug_control_plane/device_discovery/discovery/usb_identity.py +228 -0
- debug_control_plane/device_discovery/discovery/vpn_immune.py +103 -0
- debug_control_plane/device_discovery/endpoint.py +317 -0
- debug_control_plane/device_discovery/protocol.py +230 -0
- debug_control_plane/mcp_plane/__init__.py +47 -0
- debug_control_plane/mcp_plane/bridge_client.py +525 -0
- debug_control_plane/mcp_plane/capability_mirror.py +642 -0
- debug_control_plane/mcp_plane/semantic_provider.py +57 -0
- debug_control_plane/mcp_plane/server.py +874 -0
- debug_control_plane-0.1.0.dist-info/METADATA +98 -0
- debug_control_plane-0.1.0.dist-info/RECORD +23 -0
- debug_control_plane-0.1.0.dist-info/WHEEL +5 -0
- debug_control_plane-0.1.0.dist-info/entry_points.txt +2 -0
- debug_control_plane-0.1.0.dist-info/licenses/LICENSE +21 -0
- debug_control_plane-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: debug-control-plane
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Multi-product reusable debug control plane (device discovery + MCP adapter).
|
|
5
|
+
Author: tangxiaolu
|
|
6
|
+
License: MIT
|
|
7
|
+
Requires-Python: >=3.10
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Requires-Dist: mcp<2,>=1.28
|
|
11
|
+
Requires-Dist: httpx>=0.28
|
|
12
|
+
Provides-Extra: test
|
|
13
|
+
Requires-Dist: pytest>=7; extra == "test"
|
|
14
|
+
Requires-Dist: pytest-cov>=4; extra == "test"
|
|
15
|
+
Requires-Dist: ruff>=0.4; extra == "test"
|
|
16
|
+
Dynamic: license-file
|
|
17
|
+
|
|
18
|
+
# debug-control-plane (Python)
|
|
19
|
+
|
|
20
|
+
Multi-product reusable debug control plane — Python slice.
|
|
21
|
+
多产品复用的调试控制平面——Python 切片。
|
|
22
|
+
|
|
23
|
+
Provides / 提供:
|
|
24
|
+
- **device_discovery**: USB/WiFi device discovery + cross-identity pairing (USB identity source / LAN scan / VPN-immune subnet / device pool with TTL).
|
|
25
|
+
USB/WiFi 设备发现 + 跨身份配对(USB 身份源 / LAN 扫描 / VPN 免疫网段 / 带 TTL 的设备池)。
|
|
26
|
+
- **mcp_plane**: MCP adapter over the R019 8-endpoint debug HTTP protocol — capability mirror (dynamic tools), bridge client, bare server, and a `SemanticProvider` protocol hook for product semantic sugar.
|
|
27
|
+
建立在 R019 8 端点调试 HTTP 协议之上的 MCP 适配器——能力镜像(动态 tools)、桥客户端、裸服务端,以及供产品语义糖接入的 `SemanticProvider` 协议钩子。
|
|
28
|
+
|
|
29
|
+
## Dependency direction / 依赖方向
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
business app (pantas_launcher / future products) 业务应用(pantas_launcher / 未来产品)
|
|
33
|
+
│ depends on (downward) 依赖(向下)
|
|
34
|
+
▼
|
|
35
|
+
debug_control_plane (this package) 本包
|
|
36
|
+
│ depends on (downward) 依赖(向下)
|
|
37
|
+
▼
|
|
38
|
+
mcp (SDK) · httpx (HTTP client)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
This package is **pure infrastructure**: it MUST NOT import any business package (`pantas_launcher`, `host4_flutter_gmacro`, gamepad/feature code). Business apps depend on this package; never the reverse.
|
|
42
|
+
本包是**纯基础设施**:绝不 import 任何业务包(`pantas_launcher`、`host4_flutter_gmacro`、手柄/特性代码)。业务应用依赖本包,反之禁止。
|
|
43
|
+
|
|
44
|
+
## Install / 安装
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# editable install — picks up source changes without reinstall
|
|
48
|
+
# 可编辑安装——源码改动即时生效,无需重装
|
|
49
|
+
python -m pip install -e .
|
|
50
|
+
|
|
51
|
+
# import sanity check / 导入自检
|
|
52
|
+
python -c "import debug_control_plane; print(debug_control_plane.__version__)"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Layout / 结构
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
python/
|
|
59
|
+
├── pyproject.toml # single-package, two sub-packages / 单包双子包
|
|
60
|
+
├── README.md # this file
|
|
61
|
+
├── LICENSE # MIT
|
|
62
|
+
└── debug_control_plane/
|
|
63
|
+
├── __init__.py # __version__ = "0.1.0"
|
|
64
|
+
├── device_discovery/ # USB/LAN device discovery + device pool
|
|
65
|
+
│ ├── device_candidates.py
|
|
66
|
+
│ ├── device_pool.py # identity-keyed pool, TTL expiry / 身份键池,TTL 过期
|
|
67
|
+
│ ├── endpoint.py
|
|
68
|
+
│ ├── protocol.py
|
|
69
|
+
│ └── discovery/
|
|
70
|
+
│ ├── usb_identity.py # USB identity source (adb / flutter devices) / USB 身份源
|
|
71
|
+
│ ├── lan_scan.py # LAN /hello probe / LAN /hello 探测
|
|
72
|
+
│ ├── vpn_immune.py # VPN-immune subnet calc / VPN 免疫网段计算
|
|
73
|
+
│ ├── cross_identify.py # USB ⊕ LAN cross pairing / USB ⊕ LAN 交叉配对
|
|
74
|
+
│ └── manual_registry.py # manually-told devices / 人工告知设备
|
|
75
|
+
└── mcp_plane/ # MCP adapter
|
|
76
|
+
├── capability_mirror.py # dynamic tools from /hello / 由 /hello 动态镜像 tools
|
|
77
|
+
├── bridge_client.py # HTTP bridge client / HTTP 桥客户端
|
|
78
|
+
├── server.py # bare stdio MCP server / 裸 stdio MCP 服务端
|
|
79
|
+
└── semantic_provider.py # SemanticProvider Protocol (product hook) / 语义糖协议钩子
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Console script / 控制台脚本
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
debug-control-plane-server
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Points at `debug_control_plane.mcp_plane.server:main` — a bare server (no business capability assembly) for debugging / plane self-testing.
|
|
89
|
+
指向 `debug_control_plane.mcp_plane.server:main`——裸服务端(无业务能力装配),用于调试 / 平面自测。
|
|
90
|
+
|
|
91
|
+
## Version / 版本
|
|
92
|
+
|
|
93
|
+
`0.1.0` — initial release, API unstable. 首发,API 不稳定。
|
|
94
|
+
|
|
95
|
+
## License / 许可证
|
|
96
|
+
|
|
97
|
+
Licensed under the MIT License — see [LICENSE](LICENSE).
|
|
98
|
+
采用 MIT 许可证授权——见 [LICENSE](LICENSE)。
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
debug_control_plane/__init__.py,sha256=TCTkdro2qRpkatqt0yjVF_Bom5I7RSG19zWv1e_hMws,283
|
|
2
|
+
debug_control_plane/device_discovery/__init__.py,sha256=coHedH6e93514sX5DmGfxGS4t_imu17EitUxVp7vgEs,2493
|
|
3
|
+
debug_control_plane/device_discovery/device_candidates.py,sha256=gC75X3jAALEn3KD6rcVTlw6JLK8osX0CUD7O-giB41U,10212
|
|
4
|
+
debug_control_plane/device_discovery/device_pool.py,sha256=mvh8YW-Mhrcp9GoxJMB00IY5a6OLSxXKHq4ZCpiAQ4I,14746
|
|
5
|
+
debug_control_plane/device_discovery/endpoint.py,sha256=3nTNIfgHvfWeJO5HG2_EVClPJSCmXsvJycmTR10UCmg,10619
|
|
6
|
+
debug_control_plane/device_discovery/protocol.py,sha256=VbmMsmyQt4KShMzeqZWCS-1VkWw3VELGPtRvqVVC6MA,9082
|
|
7
|
+
debug_control_plane/device_discovery/discovery/__init__.py,sha256=FE77P_yh-2OUEbz0tzRY0CYsXlp0_Tg6CXHM2VLMC8o,781
|
|
8
|
+
debug_control_plane/device_discovery/discovery/cross_identify.py,sha256=RIhZjjxsgiy9QUuOrzLRJSIw_2gmdX7s2k1YRJGRjNE,17546
|
|
9
|
+
debug_control_plane/device_discovery/discovery/lan_scan.py,sha256=eIN4OFdp6rt2HTo-dWd75EjsakaKfPqdkHqZQNfs7qQ,7048
|
|
10
|
+
debug_control_plane/device_discovery/discovery/manual_registry.py,sha256=kKYGLFXv-o-_Nz6uN4eKoSM-_ckjce4KkSjCbf5XBpo,10327
|
|
11
|
+
debug_control_plane/device_discovery/discovery/usb_identity.py,sha256=KnKXjurDg3XriaeewRecFH9B-Ol4sdijJJxOrQ3ORIk,10375
|
|
12
|
+
debug_control_plane/device_discovery/discovery/vpn_immune.py,sha256=spOeCnOOho-4K57HAFP_VN8yqIpWKN4taHOMP7Af4Yc,4129
|
|
13
|
+
debug_control_plane/mcp_plane/__init__.py,sha256=9Q_NQm89svWskptSsYIurUfEn3AqLacNkF4CSTWQGuc,1457
|
|
14
|
+
debug_control_plane/mcp_plane/bridge_client.py,sha256=7X9sNkiFuEp1CKz7nxQrpM6aV_BbTZW-FKpuxnPMWFk,22077
|
|
15
|
+
debug_control_plane/mcp_plane/capability_mirror.py,sha256=uAMlL6L3wndBuJM01s1AnnQAr_A7gBSLmo5Yb6ep51A,26889
|
|
16
|
+
debug_control_plane/mcp_plane/semantic_provider.py,sha256=y8OauoMS8l05TkTuGnS7r8nJsmqixvtgpDMAWTwh_PY,2606
|
|
17
|
+
debug_control_plane/mcp_plane/server.py,sha256=S3Fqq0pOxCICLzfF6ZcrGv7W1hwgBWGPAq-JfPLARcs,40924
|
|
18
|
+
debug_control_plane-0.1.0.dist-info/licenses/LICENSE,sha256=qxYi0SeiUP4f92bHg1hLwb-wIr7900O27m_RCgJr0xQ,1075
|
|
19
|
+
debug_control_plane-0.1.0.dist-info/METADATA,sha256=-4LR820UBGkDEgrCjDD5EJlu4cKy4-i6l7zqY9t-1Qs,4609
|
|
20
|
+
debug_control_plane-0.1.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
21
|
+
debug_control_plane-0.1.0.dist-info/entry_points.txt,sha256=k5w44mHI2RTFclfTKX-jrBXCDxUsJ4MgC6Y0554kZ3U,89
|
|
22
|
+
debug_control_plane-0.1.0.dist-info/top_level.txt,sha256=EQrD2n7aS1QZR4r9M0wO767ogy_yWiWk1U1RXI5ygEM,20
|
|
23
|
+
debug_control_plane-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026-present tangxiaolu
|
|
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 @@
|
|
|
1
|
+
debug_control_plane
|