feat: 心跳修复 + 接口测试代理命令(GET_APIS/HTTP_PROXY)

- ws_client: start() 连接改为独立线程,修复心跳线程被阻塞导致 B 端'暂无心跳数据'
- dispatcher: 新增 GET_APIS(返回主程序接口清单) + HTTP_PROXY(代理调用前置机接口)
- main_app_client: 新增 get_apis/http_proxy,自动按 path 加鉴权(/order→Basic, /api/admin→X-Admin-Token)
- config: 新增 order_basic 配置项
- process_guard: 看门狗支持 nssm restart 拉起服务(优先于 start.cmd)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-09-02 13:50:01 +08:00
co-authored by Claude
parent f07bbbc49d
commit b572697e17
4 changed files with 93 additions and 5 deletions
+2
View File
@@ -36,6 +36,7 @@ class AgentConfig:
heartbeat_sec: int
guard_enabled: bool
log_dir: str
order_basic: str
@classmethod
def load(cls, conf_path: str = "conf/agent.properties") -> "AgentConfig":
@@ -68,6 +69,7 @@ class AgentConfig:
heartbeat_sec=int(_get(props, "heartbeat.sec", "15")),
guard_enabled=_get(props, "guard.enable", "true").lower() == "true",
log_dir=_get(props, "log.dir", "logs"),
order_basic=_get(props, "order.basic", ""),
)