feat: 站点 JSON、语音终端 WebSocket 指派与客户端联调

- 用 OR_SITE_CONFIG_JSON_FILE 统一术间配置(video_rtsp_urls + voice_or_room_bindings)
- VoiceTerminalHub:assignment、WS 推送与 HTTP 查询;开录/停录后 notify
- 一键联调 orchestrate-and-start 与 /client/surgeries/start 共用指派逻辑,修复 demo 路径不发 WS
- 语音桌面端:SIGINT 退出、shutdown 清理、仅 WS 指派、固定 pending 轮询间隔、界面仅保留录音时长
- 新增/调整契约与绑定测试,文档与示例配置同步

Made-with: Cursor
This commit is contained in:
Kevin
2026-04-27 11:21:16 +08:00
parent 4c3f9a367b
commit 6b3adb4ad8
36 changed files with 1194 additions and 162 deletions

View File

@@ -19,9 +19,13 @@ POSTGRES_PORT=35432
# --- VideoRTSP 与按路后端(须与客户端 camera_ids 一致)---
# VIDEO_DEFAULT_BACKEND=rtsp
# VIDEO_CAMERA_BACKEND_OVERRIDES_JSON={"or-cam-01":"rtsp","or-cam-02":"hikvision_sdk"}
# VIDEO_RTSP_URLS_JSON_FILE=app/resources/camera_rtsp_urls.sample.json
# VIDEO_RTSP_URLS_JSON={"or-cam-01":"rtsp://..."}
# 站点 JSON术间↔摄像头↔语音终端只在这里维护voice_or_room_bindings须同时含 video_rtsp_urls可为 []。
# 见 app/resources/or_site_config.sample.json
# OR_SITE_CONFIG_JSON_FILE=app/resources/or_site_config.sample.json
# VIDEO_RTSP_URL_TEMPLATE=rtsp://user:pass@host:554/path/{camera_id}
#
# 语音桌面客户端的「本机是哪一个 voice_terminal_id」不在此文件配置在客户端界面填写
# 或在该客户端运行环境的 shell / systemd 里设 VOICE_TERMINAL_ID与 JSON 中对应值一致即可)。
# --- 海康 SDKLinux x86_64二进制勿提交仓库---
# HIKVISION_LIB_DIR=/opt/hikvision/lib