移除 OpenCode 配置与命令,技能与串口单一配置源迁移至 .dsh/skills 与 .serialtest,同步更新全部文档引用

This commit is contained in:
2026-10-10 14:05:36 +08:00
parent e89fe54a97
commit aac5f99fe9
44 changed files with 3868 additions and 180 deletions
+1 -1
View File
@@ -16,7 +16,7 @@
## 使用方式
```bash
# 打开串口(daemon 自动拉起;端口缺省取 .opencode/serial_config.json,不必带参数)
# 打开串口(daemon 自动拉起;端口缺省取 .serialtest/config.json,不必带参数)
& '.venv\Scripts\python.exe' tools/serial_tool/serial_tool.py open
# 看有哪些口 / 配置口是否还在位(单一候选时回 hint)
+3 -3
View File
@@ -55,7 +55,7 @@ STATE_DIR = TOOL_DIR / "state"
LOG_FILE = STATE_DIR / "serial.log"
META_FILE = STATE_DIR / "meta.json"
DAEMON_LOG = STATE_DIR / "daemon.log"
CONFIG_FILE = REPO_ROOT / ".opencode" / "serial_config.json"
CONFIG_FILE = REPO_ROOT / ".serialtest" / "config.json"
DEFAULT_HTTP_PORT = 18765
CAP_BYTES = 20 * 1024 * 1024 # 日志体积上限
@@ -71,7 +71,7 @@ DAEMON_LOG_KEEP = 256 * 1024
# ---------------------------------------------------------------- 配置 / 元数据
def load_config():
"""读唯一配置源 .opencode/serial_config.json。
"""读唯一配置源 .serialtest/config.json。
编码用 utf-8-sig(与 run_boot_test.py 同口径):纯 utf-8 遇 BOM 会让 json.load
抛错,旧实现再把它静默吞掉 → 端口/波特率全回退默认 → 报 "no port specified",
@@ -1287,7 +1287,7 @@ def build_parser():
sub.add_parser("ports", parents=[common], help="枚举 COM 口(本地执行,不依赖 daemon)")
p = sub.add_parser("open", parents=[common], help="开串口(幂等;daemon 未运行会自动拉起)")
p.add_argument("--port", help="COM 口(默认取 .opencode/serial_config.json)")
p.add_argument("--port", help="COM 口(默认取 .serialtest/config.json)")
p.add_argument("--baud", type=int, help="波特率(默认取配置)")
p.add_argument("--dtr", type=int, choices=[0, 1], help="显式置 DTR(默认不翻转)")
p.add_argument("--rts", type=int, choices=[0, 1], help="显式置 RTS(默认不翻转)")