Compare commits

...
Author SHA1 Message Date
总管andmultica-agent 8cd4265182 HEL-797: allocate first-use memory budget across team verification and user trial
Co-authored-by: multica-agent <github@multica.ai>
2026-10-29 22:41:31 +08:00
总管andmultica-agent 049d3dbdff HEL-913: correct runtime wiring and closeout instructions after coordinator checks
Co-authored-by: multica-agent <github@multica.ai>
2026-10-29 22:39:04 +08:00
总工andmultica-agent 8ea5fdc4c9 HEL-913 close-out: executable package version/dir entry, consistent pending-approval enablement, complete auditable mem0 install (isolated venv), identity-checked ctl scripts + voice-window wiring (42/42 offline stub checks), fact-table accuracy fixes
Co-authored-by: multica-agent <github@multica.ai>
2026-10-29 22:30:56 +08:00
总工andmultica-agent 0146e370b1 HEL-913: unified-experience run package — fixed-version manifest, sanitized templates, offline zero-real-call verification (34/34), mem0 cp311 gap verified, capability list + one-shot enablement proposal
Co-authored-by: multica-agent <github@multica.ai>
2026-10-29 22:04:52 +08:00
施工员2号andmultica-agent 4a38106eef HEL-911: fix AgentHandoff/shutdown seams, attribute & fix the 3.66s pre-generation wait
- worker _on_item: filter conversation_item_added by the real 1.8.8 item
  discriminator (ChatMessage | AgentHandoff | _TypeDiscriminator); only
  assistant str-part body feeds the echo filter (HEL-910 AttributeError)
- bind_interrupt_channel unload: async (JobContext shutdown callbacks are
  awaited), idempotent, disconnect-safe; interrupt/receipt/budget paths
  untouched (HEL-910 TypeError await None)
- TURN_HANDLING: explicit turn_detection=None — 1.8.8 silently installs an
  English EOU TurnDetector whose unlikely verdicts on Chinese finals push
  endpointing to max_delay=6.0 (measured 3.667/3.654s HEL-910 call2; offline
  A/B on the real SDK: baseline 3.704s vs fixed 0.004s). Endpointing
  0.8/6.0 kept verbatim; no VAD/buffer_turn/semantic change
- scripts/gen_hel911_wait_repro.py: offline reproduction harness (real
  AgentSession + real silero VAD + HEL-910 wav and measured timings)
- tests: +3 real-SDK checks (11/11 on .12 agent venv; prior 8 regressions
  kept, unload call sites await the new protocol)
- hel910_call1.mjs reliability: segmented probe/recorder dumps to disk,
  timing-A trigger requires the server-committed voice turn row (not a
  we-sent-it proxy); node --check only, no real run
- window-record.md §9: appended factual corrections (companion 9 not 18,
  turn_start +6.099 not +4.10, assistant_final is the playout/receipt gate,
  post-window ListRooms token failure is not empty-room evidence); original
  record untouched
- docs/rework/hel911/summary.md + handoff-HEL-911.json; requirement checks
  pass vs origin/main and 407fc81

Co-authored-by: multica-agent <github@multica.ai>
2026-10-29 21:25:25 +08:00
xiaomoandmultica-agent 407fc8158c HEL-910: real-call retest window record — web text interrupt, wait chain, budgets, cleanup evidence
Co-authored-by: multica-agent <github@multica.ai>
2026-10-29 20:24:52 +08:00
xiaomoandmultica-agent 958c6962fb HEL-908 R1/R2 rework (HEL-909 review): whole-turn reasoning gate + cg.interrupt data channel
R1 — reasoning separation truly closed. The streaming hold leaked wholesale
on real token arrival (review A1: 'private reasoning '*20 beyond the 128-char
bound, no sentence ender; review A2: a Chinese sentence ender released the
hold) AND the adapter consumed the stray closer, so the app-level turn split
could never recover — the previous 'persistence and receipt always clean'
claim was false and is retracted. Per the engineering ruling the adapter now
has two explicit endpoint modes (GOV-006, no heuristics, no new engine):
buffer_turn (TurnReasoningGate) emits NOTHING during generation, splits the
whole turn at stream end and only then delivers the clean visible text; it
is set explicitly for all tiers in config/models.yaml (first visible text
waits for the full generation; cancelled/timed-out turns emit nothing and
end exactly as before — recorded and test-pinned, low latency NOT claimed).
stream (default, backward compatible) keeps explicit-tag/field semantics and
passes stray closers through unmodified so the turn-level split keeps its
signal. Both review strings and the recorded id=12 stream replay clean at
every chunk size through the real adapter and the real app into chat.delta,
the archive and the receipt; normal zh/en preserved byte-for-byte; unclosed
explicit thinking still fails honestly.

R2 — an authoritative interrupt when the LLM already finalized and TTS is
still playing (review evidence C: zero interrupts, old audio played out).
The page's existing hush() entry (ChatPanel untouched) now also publishes
{"v":1} on the room's own reliable data channel topic cg.interrupt
(fire-and-forget: a dropped publish never blocks or breaks the text send);
the worker subscribes data_received, validates topic/sender/payload and
calls session.interrupt(force=True) — the SDK's own programmatic interrupt,
force confirmed against the installed 1.8.8 source (non-force raises
RuntimeError on allow_interruptions=False speech). Failures log loudly; the
listener is unloaded via add_shutdown_callback; the server-cancel path in
llm_chat_api also interrupts with force and logs failures.

Verification (offline, zero real requests): real-SDK harness 8/8 including a
real SpeechHandle with a genuinely pending playout wait released by the
cg.interrupt message after a clean chat.final (evidence-C shape) plus the
full validation matrix; .venv311 full suite 480 passed / 8 skipped (2
test_r3 failures pre-exist at 5625de6); web npm ci from the existing lock,
typecheck 0 errors, lint 0 errors + 1 pre-existing warning, vitest 148/148,
build ok; ruff clean; check_requirements vs origin/main and b8ec832 with the
corrected handoff.

Co-authored-by: multica-agent <github@multica.ai>
2026-10-28 22:21:16 +08:00
xiaomoandmultica-agent b8ec832f35 HEL-908: terminal chat.cancelled + no-revive gate for text interrupt; reasoning/content separation at the adapter seam
Bug 1 (recorded call1): server-side cancel ended the voice SSE without a
terminal frame BEFORE the first delta (worker.log:108 SDK retry 13ms after
the text POST); the adapter raised a connection error, livekit-agents 1.8.8
silently retried the same turn_id, the retry re-acquired the gate, cancelled
the user's text turn and re-spoke a full ~32s reply. The HEL-907 claim that
the _retry_on_chunk_sent guard never worked is corrected: the guard only
applies after output (output_sent), verified against the installed SDK
source. Fix: explicit chat.cancelled terminal frame; a cancelled turn_id is
refused re-activation (never touches the newer active turn); the worker ends
cancelled turns on the SDK's own 499 path (no retry) and stops the cached
playout via SpeechHandle.interrupt(); a server_cancelled latch short-circuits
any re-entry with zero network. Failed-turn retries, completed-turn replay
and receipt validation are unchanged (dedicated tests).

Bug 2 (recorded row id=12): the endpoint streams implicit-open reasoning
plus a stray </think> inline in content into subtitles and TTS. Fix:
ReasoningSeparator at the OpenAI-compat adapter seam (cross-chunk safe,
reasoning_content field side-channel on LLMDelta.reasoning, never persisted)
plus a turn-level split before persist/final/receipt. Recorded stream
replays clean at every chunk size; normal zh/en content preserved
byte-for-byte; documented residual: implicit-open reasoning whose closer
lies beyond the 128-char hold streams partially (persistence stays clean).

Offline verification: .venv311 full suite 445 passed / 5 skipped (2
pre-existing test_r3 failures fail identically at 5625de6); real-SDK harness
(livekit-agents 1.8.8, agent venv) 5/5; reasoning separation 37/37; ruff
clean. Zero real requests, zero deployment, no dependency changes.

Co-authored-by: multica-agent <github@multica.ai>
2026-10-28 21:27:08 +08:00
xiaomoandmultica-agent 5625de6606 HEL-907: custom-voice web flow + 3 real calls window record, budget accounts, recycle evidence; hel900 harness minimal fix
Co-authored-by: multica-agent <github@multica.ai>
2026-10-28 20:29:23 +08:00
210 changed files with 9700 additions and 31 deletions
+5
View File
@@ -23,6 +23,9 @@ tiers:
api_key_env: null
timeout: 60.0
temperature: 0.85
# HEL-908/909:该端点会把隐式开头思考(无 <think>、模板预填)混入 content,
# 只能整轮缓冲后分离;首段可见文本因此等整轮生成完成(见 reasoning.py)。
reasoning: buffer_turn
# ---- 中档:可以指向同一个模型,但配更短的上下文预算 ----
# 省钱的杠杆通常不是换更小的模型,而是少喂上下文。
@@ -33,6 +36,7 @@ tiers:
api_key_env: null
timeout: 40.0
temperature: 0.7
reasoning: buffer_turn
# ---- 本地小模型:后台任务的主力 ----
# 没有本地服务时,把它指向 openai_compat 的远端小模型即可。
@@ -43,6 +47,7 @@ tiers:
api_key_env: null
timeout: 20.0
temperature: 0.4
reasoning: buffer_turn
# ---- 场景 → 档位 ----
# 改这里就能调成本结构,不用改代码。
+393
View File
@@ -0,0 +1,393 @@
# HEL-913 · 统一体验运行包(固定版本,未部署、cap=0)
> 本目录是把已通过 HEL-912 审核的统一候选装成的**可交接运行包**:精确源码
> 版本、产物与哈希、脱敏配置模板、唯一启动方式、独立空资料空间、停止/
> 备份/保留资料回退说明、一次零真实调用的运行准备验证记录、真实记忆的
> 完整可审安装清单,以及语音窗口的唯一布防接线。**本卡未部署任何现网
> 服务、未监听 836x/8082/9880/8090、未改任何现有实例;实际启用与新用量
> 由总管统一向白栖知说明并获批准后再执行。**
## 0. 精确版本:产品基线 vs 运行包提交(不要混同)
- **已审产品基线**:`agent/2/8e99cc2cc592` @ `4a38106eef21c43ba24ab7d07992b1bfe539137d`
(HEL-911 接缝修复;HEL-912 审核「通过,无必须修复项」)。父线:
`407fc81`(HEL-910 窗口记录)← `958c696`(HEL-908 R1/R2 返工)。
**产品代码(src/web/config/tools/tests)以这个提交为准。**
- **运行包提交**:同一分支上、`4a38106` 之后的追加提交——只新增/修改
`deploy/hel913-unified/` 与 `docs/` 下文件,**不改任何产品代码**。交付
评论给出运行包精确 head;本文件自身就在该提交里,所以不能在文件内
写死自己的哈希。部署**照抄入口是运行包提交**(本目录随它一起走),
只 checkout `4a38106` 会没有本目录——这是收口修正点,别再踩。
- **部署前自校验**(两条都必须通过):
```bash
git merge-base --is-ancestor 4a38106eef21c43ba24ab7d07992b1bfe539137d HEAD && echo ok
git diff --stat 4a38106eef21c43ba24ab7d07992b1bfe539137d HEAD -- src web config tools tests # 必须为空
```
- 需求基准 v1.12(`docs/requirements/`),需求检查见 `handoff-HEL-913.json`。
## 1. 交付物清单(本目录)
| 文件 | 作用 |
| --- | --- |
| `README.md` | 本运行说明(唯一照抄入口;不跳旧 HEL-895 通用步骤) |
| `manifest.json` | 机器可读清单:产品基线、dist 哈希、环境引用、边界 |
| `dist-manifest.json` | web dist 8 文件 SHA256(复用 HEL-910 实测构建) |
| `models.template.yaml` | 脱敏模型/预算配置(**一切预算=0**;占位符标注待批写入位置) |
| `voice.template.yaml` | 脱敏语音配置(livekit_url 必须是 wss 桥地址,见 §5) |
| `worker.env.template` | 语音 worker 环境模板(含 ASR 窗口闸三项,默认未布防=拒绝一切 ASR) |
| `voice-window-arm.template.env` | 语音窗口一次性布防参数模板(默认全 0/未布防) |
| `api_ctl.sh` / `worker_ctl.sh` | 统一实例 API(单进程 HTTP+HTTPS)与语音 worker 启停(身份核验版) |
| `bridge_ctl.template.sh` | wss TLS 桥启停(获批语音窗口用;浏览器侧语音的前提) |
| `tts_ctl.template.sh` | 共享 TTS 9880 窗口内临时恢复/停回(只停自己起的 PID) |
| `force_end.template.sh` | 窗口到期强制收尾(`now` 立即 / `watch <epoch>` 到点;封窗停服) |
| `verify_offline.py` | 零真实调用运行准备验证(34 项;TestClient 进程内,不监听端口) |
| `test_ctl_scripts.sh` | 启停脚本离线替身检查(42 项;stub,零真实服务) |
| `mem0-cp311-wheels.txt` | 真实 Mem0 记忆栈 cp311 缺项轮清单(40 项,待批一次性下载) |
运行记录:`docs/rework/hel913/verify-offline-run.txt`(.12 产品 3.11 venv
实跑 34/34)、`docs/rework/hel913/ctl-checks-run.txt`(收口轮启停检查 42/42)。
## 2. 版本固定与产物复用
- **源码**:产品基线 `4a38106`(含 `requirements.lock` 19 项固定版本,
Python 3.11 实测)+ 运行包提交(仅本目录与 docs)。
- **web dist 复用**:`git diff 958c696 4a38106 -- web/` 为空(网页源码零变动),
直接复用 HEL-910 已实测部署的 dist(.12 `/opt/cybergril-hel910/current/web/dist`,
REVISION 标记 `958c6962…`),只读拷贝,不安装 node、不重建、不跳任何会
`npm install` 或创建旧端口实例的旧发布步骤(如 `deploy/hel895-release-candidate.md`
的通用总装流程——那不是本包的入口)。8 文件哈希见 `dist-manifest.json`
(2026-10-29 于 .12 逐文件实测),部署时核对一致即可。
- **解释器(既有环境引用,不新建、不增改)**:
- 产品 API:`.12 /opt/cybergril-hel879/current/.venv311`(Python 3.11.16,
requirements.lock 全量,fastapi 0.159.1 / uvicorn 0.54.0 / httpx 0.28.1 /
pydantic 2.14.1)。**只借用运行,绝不向它安装任何东西**(记忆栈装进
本实例自己的隔离 venv,见 §7)。
- 语音 worker:`.12 /opt/voice-agent/agent/venv`(livekit-agents 1.8.8,
含 silero VAD)。
- 证书:`.12 /opt/cybergril-voice-certs/cybergril-voice.{pem,key}`(既有
自签,覆盖 192.168.200.12;8361 与 wss 桥 8363 共用)。
- 本机 LiveKit `ws://127.0.0.1:7880`(常驻);TTS 9880 / 面板 8090 /
wss 桥 8363 只在获批窗口内启动(§5),未获批保持停机。
## 3. 目标实例布局(唯一布局;用户实例 data 必须为空)
```
/opt/cybergril-hel913/ # 实例根(名字可换;以下结构固定)
current/ # git checkout <运行包提交>(见 §0,不是 4a38106)
web/dist/ # 按 dist-manifest.json 核哈希后放入(只读复用件)
etc/
models.yaml # 由 models.template.yaml 复制,填入获批网关与预算
voice.yaml # 由 voice.template.yaml 复制,填入服务器本地值
semantic.yaml # (仅批准真实记忆时)由 config/semantic.example.yaml 复制,见 §7
data/ # 独立空资料空间:新库从零初始化
worker/.env # 由 worker.env.template 复制并填好(占位全清)
logs/
```
**不打包进她的正式档案**:任何历史测试库(8360 团队库、HEL-907/910 窗口库)、
聊天记录、LiveKit/TTS 凭据、自签证书私钥、agent venv 内实物。用户实例在用户
亲自创建前 `companion` 表必须为空(离线验证第 3 项复现该守门)。
## 4. 首次准备与启停(唯一照抄入口)
### 4.1 首次准备(获批部署窗口内执行一次;不真启动服务)
```bash
# 0) 取运行包提交(精确 head 见交付评论;下述校验两条都要过,见 §0)
git clone -b agent/2/8e99cc2cc592 ssh://git@192.168.200.36:222/leefer/CyberGril.git \
/opt/cybergril-hel913/current
cd /opt/cybergril-hel913/current
git checkout --detach <本轮交付评论的运行包完整提交号>
git merge-base --is-ancestor 4a38106eef21c43ba24ab7d07992b1bfe539137d HEAD
git diff --stat 4a38106eef21c43ba24ab7d07992b1bfe539137d HEAD -- src web config tools tests # 空
# 1) 目录骨架(固定布局)
mkdir -p /opt/cybergril-hel913/{etc,data,logs,worker}
# 2) 配置落位(占位符必须全部替换;预算值未经批准一律保持 0)
cp deploy/hel913-unified/models.template.yaml /opt/cybergril-hel913/etc/models.yaml
cp deploy/hel913-unified/voice.template.yaml /opt/cybergril-hel913/etc/voice.yaml
cp deploy/hel913-unified/worker.env.template /opt/cybergril-hel913/worker/.env
vi /opt/cybergril-hel913/etc/models.yaml /opt/cybergril-hel913/etc/voice.yaml /opt/cybergril-hel913/worker/.env
# 3) web dist 只读复用(核哈希后拷入;不装 node、不重建)
rsync -a /opt/cybergril-hel910/current/web/dist/ /opt/cybergril-hel913/current/web/dist/
python3 - <<'EOF'
import hashlib, json, pathlib
m = json.loads(pathlib.Path("deploy/hel913-unified/dist-manifest.json").read_text())
bad = [k for k, want in m.items()
if hashlib.sha256((pathlib.Path("web/dist")/k).read_bytes()).hexdigest() != want]
raise SystemExit(f"dist hash mismatch: {bad}" if bad else 0)
EOF
# 4) 未创建档案守门复验(进程内 TestClient,零监听零出站;34 项全过才继续)
PYTHONPATH=src /opt/cybergril-hel879/current/.venv311/bin/python \
deploy/hel913-unified/verify_offline.py --web web/dist
```
### 4.2 启动与停止(唯一方式;子命令只认 start|stop|status)
```bash
# API:单进程双入口(HTTP 8360 + HTTPS 8361 共用同一 app 状态;lifespan 只进一次)
cd /opt/cybergril-hel913/current
HEL913_BASE=/opt/cybergril-hel913 bash deploy/hel913-unified/api_ctl.sh start
# 健康检查:curl -s http://127.0.0.1:8360/api/health(version=R4-assembly,
# semantic_backend=stub;llm.ok=false 是诚实状态——cap=0 且未配网关)
# 语音 worker(语音窗口获批后;接线与前置见 §5)
HEL913_BASE=/opt/cybergril-hel913 bash deploy/hel913-unified/worker_ctl.sh start
# 停止顺序:先 worker 后 API(语音会话先释放,再关统一进程)
HEL913_BASE=/opt/cybergril-hel913 bash deploy/hel913-unified/worker_ctl.sh stop
HEL913_BASE=/opt/cybergril-hel913 bash deploy/hel913-unified/api_ctl.sh stop
```
启停脚本安全口径(收口版,`test_ctl_scripts.sh` 42 项离线替身验证):
非法子命令拒绝退出 2,绝不静默当 start;重复 start 拒绝(不丢既有 pid
句柄);stop/失败收尾只杀**身份核验通过**(cmdline 含本启动器/模块名且
cwd 是本实例目录)的进程,PID 被复用时拒杀并报告;启动健康/注册检查
不过时清掉自己刚起的进程、保留日志退出 1;`worker_ctl.sh` 启动前拒绝
含未填 `<...>` 占位或解析失败的 `.env`。
同一数据目录**绝不允许**两个写入实例并存(双入口由 `deploy/voice/serve_dual_8360_8361.py`
在同一进程内保证;另起独立 uvicorn 会触发 lifespan 重入 fail-closed)。
## 5. 语音窗口唯一接线(获批窗口才动;默认全 0/未布防)
浏览器从 HTTPS(8361) 页面连 LiveKit **必须走 wss**(混合内容策略),
`voice.yaml` 的 `livekit_url` 因此必须是 wss 桥地址(默认拟 `wss://192.168.200.12:8363`,
`bridge_ctl.template.sh` 启停,与 8361 同证书、回环转发 7880)——**不是
可选件**;服务器内部(开房/删房/worker 注册)仍走 `livekit_internal` 的
本机明文 7880。窗口内各上限的唯一接线:
| 上限 | 接线(唯一) | 性质 |
| --- | --- | --- |
| ASR 音频总量 / 每通重连 | `worker/.env` 三项 `CYBERGRIL_ASR_WINDOW_ID`、`CYBERGRIL_ASR_WINDOW_MAX_AUDIO_SECONDS`、`CYBERGRIL_ASR_MAX_CONNECT_RETRIES_PER_CALL`(空/0=拒绝一切 ASR;布防值见 `voice-window-arm.template.env`) | 程序硬闸,发送前拒绝(`src/cybergril/voice/asr_usage.py`,逐通落账) |
| 每通墙钟/房间寿命 | `voice.yaml` `session_ttl_seconds: 600` + token TTL 300;挂断即删房(失败留账重试) | 程序硬闸 + 到期失效 |
| TTS 段数 | `tts_ctl.template.sh` start 时记录 tts.log 起始字节,`grep -c "first chunk"` 对照窗口段数上限 | 监控口径(到顶即人工 force_end;程序不硬闸) |
| 窗口总时限 | `force_end.template.sh watch <deadline>` 到点强制收尾(DELETE 全部会话→worker→api→bridge→tts,各按专属句柄);更可靠的等价物是获批后装 systemd timer 调 `now` | 可执行停服,非口头承诺 |
窗口启动顺序:tts_ctl snapshot→start → bridge_ctl start → 改 `worker/.env`
布防三项并 worker_ctl start → api_ctl start(见 §4.2)→ force_end watch
挂上。窗口结束(到期/触线/人工):force_end now → 按 `seal_budget_hel879.py`
封账归档(**封账不解除**,旧三窗口余额也不结转进新窗)。
## 6. 备份与保留资料回退
- **发布/阶段归档**(本包口径,沿用 HEL-896 收口工具,一致性快照):
```bash
# 停服口径(推荐;目录内 SQLite 一并 checkpoint+逐表核对)
bash deploy/hel913-unified/api_ctl.sh stop
/opt/cybergril-hel913/venv311/bin/python tools/release_snapshot_hel896.py snapshot \
--name <阶段名> --db /opt/cybergril-hel913/data/companion.db \
--file /opt/cybergril-hel913/data --out /opt/cybergril-hel913/archives/
```
产物含逐文件 SHA256、代码精确提交、逐表行数与回退演练;旧归档不删。
- **回退**:停服 → 解包快照到新 data 目录(按 rollback_plan 源路径映射)→
`current` 切回上一运行包提交(`git checkout <旧head>`)→ 起服务 → `verify` 通过。
- **整实例撤销但保留资料**:`api_ctl.sh stop`,data/ 原样保留,重新启用 =
同一 data 目录再 start(epoch 递增、聊天记忆保留,离线验证第 11 组复现)。
- **CG-009 每日自动备份/用户手动完整导出(R6)尚未实现**,本节只是发布归档,
不得冒充 R6 完成。
## 7. 零真实调用运行准备验证(已执行,34/34;口径如实)
在 .12 产品 3.11 venv 对产品基线树实跑 `verify_offline.py`(进程内
TestClient,零监听、零出站——网关地址重写为 127.0.0.1:1 + provider.stream
出站哨兵双保险):
- 包完整性:Python 3.11.16、候选树 import、**4 个关键包版本打印**
(fastapi/uvicorn/httpx/pydantic——不是 19 项锁依赖的逐项核对)、记忆栈
四项缺置如实。
- 入口/创建守门:health 诚实(llm.ok=false)、空库 404 无伪造档案、预览
本地计算、创建 201、二次创建 409、底色落库与预览一致、persona 在 cap=0
下诚实 failed(无编造诠释)。
- 传输:SSE 对话在预算 0 下诚实 `chat.error`,零 provider 出站;失败轮如实
落库;同轮重试幂等拒绝。
- 日子与回忆:**空库上的**未分享生活服务端裁剪(told=1;未做正反种子对照,
不夸成实质权限全覆盖)、分页形状、未知回执/详情 404。
- 语音:status 诚实 voice=false;TTS 不可达时开房 503 拒绝(绝不建房);
未知会话 DELETE 404。
- 重开:epoch=2、身份/关系/聊天保留、无伪造回复。
- dist:GET / 出 index.html;8 文件哈希与 manifest 全符。
- worker 接线:agent venv(livekit-agents 1.8.8)下 `import cybergril.voice.worker`
通过(只读 import,未启动注册)。
**预算 0 下只能诚实拒绝的**:一切真实创建诠释/习惯、对话生成、生活事件
生成、判定/成长/gist、主动措辞、嵌入、语音开房。`/api/health` 的 200 不代表
模型已运行——`llm.ok=false` 才是诚实状态。
## 8. 真实记忆(Mem0)最少安装与接线 —— 完整可审清单(零安装零下载,待批)
### 8.1 现状(2026-10-29 只读实测,收口轮复核沿用)
- 服务器 .12 产品 `.venv311`(3.11.16)内 `mem0 / qdrant_client /
fastembed / onnxruntime` 四项均未安装;服务器全盘无 mem0 安装、无固定
tarball、无已建轮、无 fastembed 缓存、uv 缓存仅 28K。**没有另一个已
准备好的 3.11 兼容环境**;旧 3.10 `hel857-venv`(工作站)不能混入 3.11
进程。
- 工作站本地实物(未上服务器):固定源 tarball `mem0-2c81af3.tar.gz`
(sha256 `9dcef9303ebcec116eec6739f01b8b35bd24459de6a569686b4d19b9412dda23`,
与 `deploy/mem0-stack.lock` 一致)、固定源已建轮
`mem0ai-2.2.1-py3-none-any.whl`(sha256
`698284b6083ab8b7761454d65876a6d1bb983d278ad21a7bee38d760cb20e9db`)、
fastembed 模型缓存 92MB(Qdrant/bge-small-zh-v1.5 + bm25)、uv 缓存可
复用 3 轮(greenlet/pillow/truststore cp311)。
### 8.2 安装目标环境:本实例自己的隔离 venv(不是产品 .venv311)
**绝不向借用的 `/opt/cybergril-hel879/current/.venv311` 增改任何依赖。**
目标环境是 `/opt/cybergril-hel913/venv311`(服务器既有 python3.11 基座
新建,3.11.16),装两套东西:产品锁 19 项 + 记忆栈 41 项(40 缺轮 + 固定
源 mem0ai 轮)。装好后本实例 API 用它跑(`api_ctl.sh` 里
`HEL913_VENV=/opt/cybergril-hel913/venv311/bin/python`),与 hel879 实例
彻底隔离;`.venv311` 保持只读借用前的原样(部署后可直接改回借用口径,
两者兼容——同一 requirements.lock)。
### 8.3 一次性批准窗口内的完整命令(逐项哈希留证;任一步失败即停)
```bash
# W0 · 固定源身份核对(零下载;哈希不符立即停,禁用索引同名轮替代)
sha256sum <hel857-data>/mem0-2c81af3.tar.gz # 必须等于 9dcef930…2dda23
sha256sum <hel857-data>/mem0ai-2.2.1-py3-none-any.whl # 必须等于 698284b6…20e9db
# W1 · 获批下载窗口(工作站联网执行;cp311/manylinux2014_x86_64 定版)
mkdir -p wheels-product wheels-mem0
python3 -m pip download --only-binary :all: --implementation cp \
--python-version 3.11 --platform manylinux2014_x86_64 --abi cp311 \
-r requirements.lock -d wheels-product/ # 产品锁 19 项
python3 -m pip download --only-binary :all: --implementation cp \
--python-version 3.11 --platform manylinux2014_x86_64 --abi cp311 \
-c requirements.lock -r deploy/hel913-unified/mem0-cp311-wheels.txt -d wheels-mem0/ # 记忆栈 40 项
# 其中 greenlet/pillow/truststore 3 项可从工作站 uv 缓存离线复用
# (release-artifacts.json 记录),命中即从 wheels-mem0/ 删除同版本再放缓存件
cp <hel857-data>/mem0ai-2.2.1-py3-none-any.whl wheels-mem0/
( cd wheels-product && sha256sum * > ../wheels-product.sha256 )
( cd wheels-mem0 && sha256sum * > ../wheels-mem0.sha256 ) # 逐项留证入库
# W2 · 传输与落位(scp 到 .12;约 wheels 250–350MB + 模型缓存 92MB)
scp -r wheels-product wheels-mem0 wheels-product.sha256 wheels-mem0.sha256 <hel857-data>/fastembed-cache root@192.168.200.12:/opt/cybergril-hel913/
ssh root@192.168.200.12 'cd /opt/cybergril-hel913/wheels-product && sha256sum -c ../wheels-product.sha256 && \
cd ../wheels-mem0 && sha256sum -c ../wheels-mem0.sha256' # 传输后复核
# W3 · 隔离 venv 创建 + 仅本地轮安装(--no-index 全程,失败即停)
ssh root@192.168.200.12
/opt/cybergril-hel879/runtime/cpython-3.11.16/bin/python3.11 -m venv /opt/cybergril-hel913/venv311
/opt/cybergril-hel913/venv311/bin/python -m pip install --no-index \
--find-links /opt/cybergril-hel913/wheels-product -r /opt/cybergril-hel913/current/requirements.lock
/opt/cybergril-hel913/venv311/bin/python -m pip install --no-index \
--find-links /opt/cybergril-hel913/wheels-mem0 \
--find-links /opt/cybergril-hel913/wheels-product \
-c /opt/cybergril-hel913/current/requirements.lock \
mem0ai==2.2.1 qdrant-client==1.20.0 fastembed==0.9.1
# mem0ai 的安装来源必须是 W0 的固定源码轮(同版本号不同来源不互认)
# W4 · co-import 冒烟(同进程;失败即停,不降级)
cd /opt/cybergril-hel913/current
MEM0_TELEMETRY=False HF_HUB_OFFLINE=1 TRANSFORMERS_OFFLINE=1 PYTHONPATH=src /opt/cybergril-hel913/venv311/bin/python -c \
"import cybergril.api, mem0, qdrant_client, fastembed; print('co-import ok')"
# W5 · 模型缓存落位(真实本地嵌入零下载)
mkdir -p /opt/cybergril-hel913/data/sem
cp -a /opt/cybergril-hel913/fastembed-cache /opt/cybergril-hel913/data/sem/fastembed-cache
# api_ctl.sh 通过 FASTEMBED_CACHE_PATH 指向它,模型资源禁止联网获取。
# W6 · 清理暂存(轮文件传输件用毕即删;哈希清单留档)
rm -rf /opt/cybergril-hel913/wheels-product /opt/cybergril-hel913/wheels-mem0 /opt/cybergril-hel913/fastembed-cache
```
**空间/影响(.12 实测口径估)**:`venv311` 成品约 450–550MB(产品 19 项
约 120–150MB + 记忆栈约 330–400MB,参照 3.10 同栈实测 366MB)+ 传输暂存
约 350MB(W6 删除)+ 模型缓存 92MB(常驻 data/sem)。首次本地嵌入零下载
(缓存就位)。**当前不触发任何嵌入**:装完不批 B 预算时
`CYBERGRIL_SEMANTIC=stub`,长期检索走词面 FTS,不以 stub 冒充真实 Mem0。
### 8.4 记忆账本与配置接线(新空用户库续账,不搬测试聊天)
- `CYBERGRIL_SEMANTIC`(api_ctl.sh 的 `HEL913_SEMANTIC`):`stub`(默认,
全链可跑、非语义)→ 批准后 `mem0`(真实)。
- 配置:`cp config/semantic.example.yaml /opt/cybergril-hel913/etc/semantic.yaml`,
启动器显式传 `CYBERGRIL_SEMANTIC_CONFIG=$BASE/etc/semantic.yaml`(不再误读仓库默认路径)。
`MEM0_TELEMETRY=False`、`FASTEMBED_CACHE_PATH=$BASE/data/sem/fastembed-cache`、
`HF_HUB_OFFLINE=1`、`TRANSFORMERS_OFFLINE=1` 由启动器在 import 前设置。
填 `ledger_path=/opt/cybergril-hel913/data/embed_ledger.sqlite3`、
`vector_root/history_root=/opt/cybergril-hel913/data/sem/{vec,hist}`、
网关三键(与 models.yaml 同源)、`authority` 块。
- **权威旧账续账(498 已用 / 原批 500 / 冻结 2 不动)**:把 HEL-857 系列
唯一权威嵌入账文件复制为实例 `data/embed_ledger.sqlite3`(只复制账本,
**不搬任何测试聊天/向量**——聊天在旧测试库,向量在新库从零生成);
`authority` 按 `config/semantic.example.yaml` 算式填
`prefix_rows: 181`、`prefix_sha256: <权威账前 181 行逐行摘要,总管按账现值填>`、
`min_used: 498`。批准 B 嵌入 180 条后写累计口径
`embed_cap: 680`、`embed_reserve: 2`(可用 = 680−498−2 = 180;**禁止**
把 180 直接填成 cap、禁止动冻结 2 条;缺/错 authority 在构造前拒绝,
指向新空文件重开余额同样被拒——`src/cybergril/memory/semantic.py`
`verify_ledger_authority`)。
- **不把旧实验余额当新用量**:39/60(HEL-857 真实请求旧账)与旧三窗口
余额一律不结转;用户实例的 LLM/请求账从 0 起记(自己的 SQLite 日账)。
- **副作用如实分开**:真实 embed(写入向量库+权威账)、SDK 内部提取 LLM
(`llm_ops` 独立 cap + 统一请求闸 "semantic" 类)、co-import 冒烟(零
调用,只 import)——三者互不冒充;当前阶段三者全部 0。
## 9. 本包不做的事
不部署、不监听现网端口、不恢复 9880/8090/836x/8082、不触 4080、不下载任何
依赖/模型/浏览器、不改模型/认证/运行时绑定、不合并 PR、不替换正式界面、
8300/8310/8320/8350 与既有资料不动、8340/ComfyUI 保持停机、不向
`/opt/cybergril-hel879/current/.venv311` 增改依赖。旧三次测试窗口余额不
结转;一切提额、安装、部署都是待批准建议。
## 10. 总管独立取件勘误与最终执行约束(2026-10-29)
本节优先于上文笼统模板描述,当前仍全部待批,零真实调用。
- 运行包基线8ea5fdc之后仅机械收口:补语义配置路径/缓存/禁遥测离线变量;
force_end按真实持久化sessions列表取session_id;补桥/TTS非法命令拒绝和失败收尾;
传输hash清单与目标工作目录、既有3.11解释器路径纠正;每通TTL改600秒与10分钟一致。
- 40项记忆缺轮与产品19项锁是现有版本清单。下载使用两份requirements合并约束,
不得让第二次下载/安装解析器静默换掉产品锁版本:W1增加`-c requirements.lock`,
W3记忆安装同时传`--find-links .../wheels-product -c .../requirements.lock`。
解析冲突/缺cp311轮即停并留首错,不自动换版本、不引入新模型。
- B记忆日顶明确为embed_daily=60、llm_daily=40(SDK提取另受累计llm_cap=60),
authority/累计embed_cap=680、reserve=2原样。语义日账按UTC(北京时间08:00)
切日,产品对话/生活日账显式TZ=Asia/Shanghai按北京时间00:00切日,不能混说。
- 不运行测试脚本里的失管sleep替身作为长期任务。未来实际截止保护用获批后的
systemd一次性定时服务(服务/日志/停机句柄可查);不能把本轮本地watch留到结束后。
部署卡执行`systemd-run --unit=cybergril-hel913-expiry --on-calendar="<明确UTC截止时间>" \
/usr/bin/env HEL913_BASE=/opt/cybergril-hel913 /usr/bin/bash \
/opt/cybergril-hel913/current/deploy/hel913-unified/force_end.template.sh now`,
放行前必须核`systemctl list-timers cybergril-hel913-expiry.timer`及临时实例停止句柄。
这是未来待批动作,本轮没有创建服务/定时器。
- 语音为团队陪同的3次预约短用,每次600秒,总ASR1800秒,建房尝试最多6次,
每通ASR重连最多2次,TTS60段及声音登记+试听合计10次由当班执行者监督计数。
这些软上限不冒充程序硬闸;不在无人值守时开启语音窗口。
TTS段顶/语音配额到顶只结束语音,B文字生活仍可用;到期/用户叫停才停全实例。
自定义声音需要既有8090面板的实例专属启动句柄与前后快照,
复用HEL907已有面板启动方法,不动8081;句柄或快照未备齐不放行上传/试听,
默认已有工程声音仍能通话。共享voices列表需恢复前快照,自定义参考材料在独立实例保留。
- 到期脚本负责停本实例入口与自己启动的语音服务。封账归档、LiveKit只读核空、
voices快照恢复由当班执行者另行执行并核实,不能把日志里的done当全部清理完成。
清理失败保留原始错误/账/日志,不解除封账、不重启服务来“证明已停”。
自定义声音细分额度(同一次待批方案):最多登记2段参考音频,每段由陪同人员先核≤20秒;
自动转写最多2次/合计40秒,单列监督账,不冒充通话ASR的1800秒硬闸。
最多试听8次;登记2次+试听8次共10次。试听合成并入60段TTS总上限。
两类ASR合计最大1840秒(通话1800+参考40);失败/重试同样记账,不返余额。
本轮未执行登记、转写或试听。
### 最终统一预算勘误:团队先验真实记忆,再交用户(总管)
此条取代上文A“0嵌入”的旧建议,仅修改待批方案,当前真实额度仍0。
团队先用独立测试资料核真实Mem0接入,不把首次故障留给用户:
A的55请求/50万tokens内,最多10次用于SDK提取;先用最多20条新嵌入。
这10次/20条从同一批新申请的60次提取/180条嵌入中先扣,
不是另加额度;余量(至少50次提取/160条嵌入)留给用户期,使用实账计算。
两阶段共用唯一活动记账文件、串行写入,测试向量/档案与用户向量/档案分开,
只共用计数账,不拷贝测试聊天或测试记忆给用户。旧权威embed_ops前缀不改,
旧39/60实验的授权和账原封保存,不挪用其余额;新提取批建立独立可审计操作记录。
如旧llm_ops表已有用量,新60次必须按现值加增量并保存旧行,不可清表/重置;
操作前核旧基数并留证,实际新增始终≤60。团队检查最多2小时,从首个真实调用计时;
检查不通过则停止并报告首个错误,用户期不自动开始。
+146
View File
@@ -0,0 +1,146 @@
#!/usr/bin/env bash
# HEL-913 统一体验运行包 · 统一实例 API 启停(单进程 HTTP+HTTPS 双入口)
#
# 启动器 deploy/voice/serve_dual_8360_8361.py 保证 HTTP 与 HTTPS 共用同一
# API 进程/同一份状态(lifespan 只进一次)。本脚本只做本实例常规启停安全:
# - 子命令只认 start|stop|status,其他一律拒绝退出 2(不会静默当 start);
# - start 前核对 pid 句柄:本实例已在跑 → 拒绝重复 start(不覆盖句柄);
# 句柄 pid 活着但不属于本实例(PID 复用)→ 拒绝动手,提示人工处理;
# - stop/start 失败收尾只杀经身份核验的进程(/proc/<pid> 的 cmdline 含
# 本启动器且 cwd 是本实例代码目录),身份不符一律不杀;
# - start 健康检查不过 → 清掉自己刚起的进程、保留日志、退出 1。
#
# 用法: [ENV=..] bash deploy/hel913-unified/api_ctl.sh start|stop|status
# 环境变量(默认值按部署说明的实例布局):
# HEL913_BASE 实例根目录(含 current/ etc/ data/ logs/)
# HEL913_HTTP HTTP 端口(默认 8360)
# HEL913_HTTPS HTTPS 端口(默认 8361;语音页需要 secure context)
# HEL913_VENV 产品 3.11 venv python(默认 /opt/cybergril-hel879/current/.venv311/bin/python)
# HEL913_CERT / HEL913_KEY 证书路径(默认 /opt/cybergril-voice-certs/ 下既有证书)
set -u
BASE=${HEL913_BASE:-/opt/cybergril-hel913}
CODE=${HEL913_CODE:-$BASE/current}
HTTP=${HEL913_HTTP:-8360}
HTTPS=${HEL913_HTTPS:-8361}
VENV=${HEL913_VENV:-/opt/cybergril-hel879/current/.venv311/bin/python}
CERT=${HEL913_CERT:-/opt/cybergril-voice-certs/cybergril-voice.pem}
KEY=${HEL913_KEY:-/opt/cybergril-voice-certs/cybergril-voice.key}
LOG=$BASE/logs/api.log
PIDF=$BASE/logs/api.pid
MARKER="serve_dual_8360_8361.py"
usage() { echo "usage: [ENV=..] bash $0 start|stop|status" >&2; exit 2; }
# 进程身份核验:pid 存活、cmdline 含本启动器、cwd 是本实例代码目录。
# 任一不满足即视为“不是我们的进程”(含 PID 被系统复用),一律不动它。
ours() {
local p=$1 cmd cw
case "$p" in ''|*[!0-9]*) return 1 ;; esac
[ "$p" != "$$" ] || return 1
kill -0 "$p" 2>/dev/null || return 1
cmd=$(tr '\0' ' ' < "/proc/$p/cmdline" 2>/dev/null) || return 1
cw=$(readlink "/proc/$p/cwd" 2>/dev/null) || return 1
case "$cmd" in *"$MARKER"*) ;; *) return 1 ;; esac
[ "$cw" = "$CODE" ] || return 1
return 0
}
pidfile_pid() { [ -f "$PIDF" ] && cat "$PIDF" 2>/dev/null; }
stop() {
local p
p=$(pidfile_pid)
if [ -z "$p" ]; then
echo "api not running (no pid file)"
return 0
fi
if kill -0 "$p" 2>/dev/null && ! ours "$p"; then
echo "REFUSED: pid $p is alive but is NOT this instance's api (pid reuse?) — not killing; resolve $PIDF manually" >&2
return 1
fi
if ours "$p"; then
kill "$p"
sleep 3
if ours "$p"; then kill -9 "$p"; sleep 1; fi
fi
rm -f "$PIDF"
echo "api stopped"
return 0
}
start() {
local p
p=$(pidfile_pid)
if [ -n "$p" ] && kill -0 "$p" 2>/dev/null; then
if ours "$p"; then
echo "REFUSED: api already running (pid $p) — stop first" >&2
else
echo "REFUSED: pid file has live pid $p that is not this instance's api (pid reuse?) — resolve $PIDF manually" >&2
fi
exit 1
fi
rm -f "$PIDF" # 死句柄:清掉再起
[ -d "$CODE" ] || { echo "REFUSED: code dir missing: $CODE" >&2; exit 1; }
[ -x "$VENV" ] || { echo "REFUSED: venv python not executable: $VENV" >&2; exit 1; }
[ -r "$CERT" ] && [ -r "$KEY" ] || { echo "REFUSED: cert/key not readable ($CERT / $KEY)" >&2; exit 1; }
mkdir -p "$BASE/logs" "$BASE/data"
cd "$CODE" || exit 1
set -a
export CYBERGRIL_DB=$BASE/data/companion.db
export CYBERGRIL_SEMANTIC=${HEL913_SEMANTIC:-stub}
export CYBERGRIL_R2_ENABLED=${HEL913_R2:-1}
export TZ=Asia/Shanghai
export CYBERGRIL_SEMANTIC_CONFIG=$BASE/etc/semantic.yaml
export MEM0_TELEMETRY=False
export FASTEMBED_CACHE_PATH=$BASE/data/sem/fastembed-cache
export HF_HUB_OFFLINE=1
export TRANSFORMERS_OFFLINE=1
export CYBERGRIL_MODELS=$BASE/etc/models.yaml
export CYBERGRIL_VOICE_CONFIG=$BASE/etc/voice.yaml
export CYBERGRIL_WEB=$CODE/web/dist
export PYTHONPATH=$CODE/src
set +a
nohup "$VENV" deploy/voice/serve_dual_8360_8361.py \
--http-port "$HTTP" --https-port "$HTTPS" --cert "$CERT" --key "$KEY" \
> "$LOG" 2>&1 &
p=$!
echo "$p" > "$PIDF"
echo "api starting (pid $p) http=$HTTP https=$HTTPS"
sleep 6
if curl -s --max-time 3 "http://127.0.0.1:$HTTP/api/health" >/dev/null \
&& curl -sk --max-time 3 "https://127.0.0.1:$HTTPS/api/health" >/dev/null; then
echo "OK: $HTTP + $HTTPS healthy"
return 0
fi
echo "FAIL: health check did not pass — full log kept at $LOG; tail:" >&2
tail -20 "$LOG" >&2
# 失败收尾:只清自己刚起的这个进程(身份核验),日志保留
if ours "$p"; then
kill "$p"; sleep 2
ours "$p" && kill -9 "$p"
fi
rm -f "$PIDF"
echo "cleaned up failed start (log kept: $LOG)" >&2
exit 1
}
status() {
local p
p=$(pidfile_pid)
if [ -n "$p" ]; then
if ours "$p"; then echo "running pid $p (identity verified)"
elif kill -0 "$p" 2>/dev/null; then echo "pid $p alive but NOT ours (stale pid file?)"
else echo "pid $p not alive (stale pid file)"; fi
else
echo "no pid file"
fi
curl -s --max-time 3 "http://127.0.0.1:$HTTP/api/health" && echo " <- health" \
|| echo "health not answering"
}
case "${1:-}" in
start) start ;;
stop) stop ;;
status) status ;;
*) usage ;;
esac
@@ -0,0 +1,78 @@
#!/usr/bin/env bash
# HEL-913 运行包 · wss TLS 桥启停模板(8363 → 127.0.0.1:7880;脱敏待批件)
#
# 浏览器从 HTTPS(8361) 页面连 LiveKit 必须走 wss(混合内容策略),本桥在新
# 端口终结 TLS 并只向回环 7880 转发(字节级,协议无关;WebRTC 媒体面不经
# 本桥)。与 8361 同一张自签证书。改编自 HEL-910 已实测 bridge_ctl.sh;
# 本文件默认不运行,获批语音窗口才使用。子命令只认 start|stop|status。
#
# 用法: [ENV=..] bash bridge_ctl.template.sh start|stop|status
# 环境变量: HEL913_BASE / HEL913_BRIDGE_PORT(8363) / HEL913_CERT / HEL913_KEY
set -u
case "${1:-}" in start|stop|status) ;; *) echo "invalid subcommand" >&2; exit 2 ;; esac
BASE=${HEL913_BASE:-/opt/cybergril-hel913}
PORT=${HEL913_BRIDGE_PORT:-8363}
CERT=${HEL913_CERT:-/opt/cybergril-voice-certs/cybergril-voice.pem}
KEY=${HEL913_KEY:-/opt/cybergril-voice-certs/cybergril-voice.key}
LOG=$BASE/logs/bridge.log
PIDF=$BASE/logs/bridge.pid
MARKER="wss_bridge.example.py"
usage() { echo "usage: [ENV=..] bash $0 start|stop|status" >&2; exit 2; }
ours() {
local p=$1 cmd cw
case "$p" in ''|*[!0-9]*) return 1 ;; esac
[ "$p" != "$$" ] || return 1
kill -0 "$p" 2>/dev/null || return 1
cmd=$(tr '\0' ' ' < "/proc/$p/cmdline" 2>/dev/null) || return 1
cw=$(readlink "/proc/$p/cwd" 2>/dev/null) || return 1
case "$cmd" in *"$MARKER"*) ;; *) return 1 ;; esac
[ "$cw" = "$BASE/current/deploy/voice" ] || return 1
return 0
}
pidfile_pid() { [ -f "$PIDF" ] && cat "$PIDF" 2>/dev/null; }
stop() {
local p
p=$(pidfile_pid)
if [ -z "$p" ]; then echo "bridge not running (no pid file)"; return 0; fi
if kill -0 "$p" 2>/dev/null && ! ours "$p"; then
echo "REFUSED: pid $p alive but not this bridge (pid reuse?) — not killing; resolve $PIDF manually" >&2
return 1
fi
if ours "$p"; then kill "$p"; sleep 2; ours "$p" && kill -9 "$p"; fi
rm -f "$PIDF"
echo "bridge stopped"
}
case "${1:-}" in
stop) stop; exit $? ;;
status)
p=$(pidfile_pid)
if [ -n "$p" ]; then
ours "$p" && echo "running pid $p (identity verified)" \
|| { kill -0 "$p" 2>/dev/null && echo "pid $p alive but NOT ours" || echo "pid $p not alive (stale)"; }
else
echo "no pid file"
fi
exit 0 ;;
esac
p=$(pidfile_pid)
if [ -n "$p" ] && kill -0 "$p" 2>/dev/null; then
echo "REFUSED: bridge already running (pid $p)" >&2; exit 1
fi
rm -f "$PIDF"
[ -r "$CERT" ] && [ -r "$KEY" ] || { echo "REFUSED: cert/key not readable" >&2; exit 1; }
cd "$BASE/current/deploy/voice" || exit 1
nohup /usr/bin/python3 wss_bridge.example.py \
--listen "0.0.0.0:$PORT" --upstream 127.0.0.1:7880 \
--cert "$CERT" --key "$KEY" > "$LOG" 2>&1 &
echo $! > "$PIDF"
echo "bridge starting (pid $(cat "$PIDF")) on :$PORT"
sleep 3
timeout 8 openssl s_client -connect "127.0.0.1:$PORT" -servername 192.168.200.12 </dev/null 2>/dev/null \
| grep -q "TLSv1.3" && echo "OK: bridge TLS up" \
|| { echo "FAIL: TLS probe failed — check $LOG"; tail -5 "$LOG"; stop; exit 1; }
+10
View File
@@ -0,0 +1,10 @@
{
"assets/her-room.jpg": "51ca450a454c108d304feee2745070fbbbd3232863096126badf279ee53a925a",
"assets/her-talk.jpg": "0b9e91b58d75afb836efdad3d8e8f0aab0c44df64b2c4ddd59d011fd499aeb33",
"assets/icons.svg": "8630691c7349dd33c1accf2331cb4c844ffd9b70465021b1c18bf8f5aea0588e",
"assets/index-B8TdHoQm.css": "a0af3163f564f2ff9cfe7d995378b7ac436bfe2f9fabda9f370ca0aa30c2412f",
"assets/index-Vm-EFPLb.js": "81f55e20c5c2afe4673ccc9020264a2bf99b3c84998c275f03fa48fe4f940bb0",
"demo-material.json": "78fd67e8e4a680e8b3277db4a922360a83fa0be1ceee0cb257ba1c74bc6ede37",
"index.html": "8d84f131b6922fe92ac0c562f5fec73aacd9c6e4db2cfa28f6190b4246f9c8d0",
"vendor/livekit-client-2.22.4.umd.min.js": "040db4c0db72e7f7599cd0e06b0f58f95e0082a395cdde410ca26224a79a0626"
}
@@ -0,0 +1,70 @@
#!/usr/bin/env bash
# HEL-913 运行包 · 窗口到期强制收尾模板(脱敏待批件;默认不布防)
#
# 用途:获批体验/语音窗口到截止时点的**可执行**停服与封窗:先经统一实例
# API 逐个 DELETE 本实例房间(欠清理的房间会留在登记账重试),再按专属
# pid 句柄停 worker → api → wss 桥 → 共享 TTS(都不是我们的就如实报告,
# 绝不按进程名/端口扫杀,绝不触碰 8300/8310/8320/8350、7880/7881、10095、
# 8081 等共享服务)。改编自 HEL-910 已实测 force_end.sh/watchdog.sh。
#
# 用法:
# bash force_end.template.sh now # 立即收尾(幂等,可重复)
# bash force_end.template.sh watch <epoch秒> # 到点自动收尾(受监督后台任务;
# # 更可靠的等价物是获批后装
# # systemd timer 调本脚本 now)
# 环境变量: HEL913_BASE / HEL913_HTTP(8360)
set -u
set -o pipefail
BASE=${HEL913_BASE:-/opt/cybergril-hel913}
HTTP=${HEL913_HTTP:-8360}
PKG=$BASE/current/deploy/hel913-unified
LOG=$BASE/logs/force_end.log
usage() { echo "usage: [ENV=..] bash $0 now|watch <deadline_epoch_seconds>" >&2; exit 2; }
force_end() {
mkdir -p "$BASE/logs"
ts() { date -u +%FT%TZ; }
{
echo "[$(ts)] force_end begin"
# 1) 结清本实例房间(DELETE 走统一实例所有者路径;失败房间留账重试)
for sid in $(python3 - "$BASE/data" <<'EOF' 2>/dev/null
import json, sys, pathlib
p = pathlib.Path(sys.argv[1]) / "companion-voice-sessions.json"
try:
d = json.loads(p.read_text())
except Exception:
raise SystemExit
# VoiceSessionService._persist_state stores sessions as a LIST, not a dict.
# Debts already follow bounded SDK cleanup; do not reset their retry budgets here.
for entry in d.get("sessions", []):
sid = entry.get("session_id", "")
if sid and all(c.isalnum() or c in "-_" for c in sid):
print(sid)
EOF
); do
code=$(curl -s -o /dev/null -w '%{http_code}' --max-time 8 -X DELETE "http://127.0.0.1:$HTTP/api/voice/session/$sid" || echo err)
echo "[$(ts)] DELETE session $sid -> $code"
done
# 2) 按专属句柄逐个停(每步幂等;不是我们的如实报告)
bash "$PKG/worker_ctl.sh" stop 2>&1 | sed 's/^/ worker: /'
bash "$PKG/api_ctl.sh" stop 2>&1 | sed 's/^/ api: /'
bash "$PKG/bridge_ctl.template.sh" stop 2>&1 | sed 's/^/ bridge: /'
bash "$PKG/tts_ctl.template.sh" stop 2>&1 | sed 's/^/ tts: /'
echo "[$(ts)] force_end done(封账归档另由 seal_budget_hel879.py 按账执行,封账不解除)"
} >> "$LOG" 2>&1
}
case "${1:-}" in
now) force_end ;;
watch)
DL=${2:?deadline epoch seconds required}
case "$DL" in *[!0-9]*|'') usage ;; esac
mkdir -p "$BASE/logs"
echo "[$(date -u +%FT%TZ)] watch start, deadline $(date -u -d "@$DL" +%FT%TZ) (pid $$)" >> "$LOG"
while [ "$(date +%s)" -lt "$DL" ]; do sleep 30; done
echo "[$(date -u +%FT%TZ)] DEADLINE REACHED — force end" >> "$LOG"
force_end
;;
*) usage ;;
esac
+86
View File
@@ -0,0 +1,86 @@
{
"task": "HEL-913",
"product_baseline_head": "4a38106eef21c43ba24ab7d07992b1bfe539137d",
"package_head": "运行包提交 = 本文件所在分支 tip(交付评论给出精确 hash;本文件无法写死自身提交)。部署照抄入口是运行包提交,只 checkout 4a38106 会没有 deploy/hel913-unified/",
"package_only_change_check": "git diff --stat 4a38106 <package_head> -- src web config tools tests 必须为空(运行包只动 deploy/hel913-unified 与 docs)",
"branch": "agent/2/8e99cc2cc592",
"review": "HEL-912 01a187e8-1058-7a2d-84e7-bd1896f212cb passed, no must-fix items (product baseline)",
"requirements_lock": "requirements.lock (19 pinned, Python 3.11.16 verified; offline verify printed 4 key package versions only — not a per-item lock audit)",
"web_dist_reuse": {
"source": "/opt/cybergril-hel910/current/web/dist (REVISION 958c6962fb1f2a4462a6df794d893aee1fcb0667)",
"justification": "git diff 958c696 4a38106 -- web/ is empty",
"manifest": "deploy/hel913-unified/dist-manifest.json (8 files, sha256 measured on .12 2026-10-29)"
},
"environments": {
"api_python_default": "/opt/cybergril-hel879/current/.venv311 (Python 3.11.16) — borrow-run only, NEVER install into it",
"api_python_after_mem0": "/opt/cybergril-hel913/venv311 — isolated instance venv created only inside the approved one-shot window (README §8)",
"worker_python": "/opt/voice-agent/agent/venv (livekit-agents 1.8.8)",
"certs": "/opt/cybergril-voice-certs/cybergril-voice.{pem,key} (shared by 8361 and wss bridge 8363)",
"livekit": "ws://127.0.0.1:7880 internal (standing); browser MUST use wss bridge (8363) — not optional from HTTPS pages",
"tts_panel_bridge": "9880/8090/8363 only inside approved voice windows (README §5); stopped otherwise"
},
"package_files": [
"deploy/hel913-unified/README.md",
"deploy/hel913-unified/manifest.json",
"deploy/hel913-unified/dist-manifest.json",
"deploy/hel913-unified/models.template.yaml",
"deploy/hel913-unified/voice.template.yaml",
"deploy/hel913-unified/worker.env.template",
"deploy/hel913-unified/voice-window-arm.template.env",
"deploy/hel913-unified/api_ctl.sh",
"deploy/hel913-unified/worker_ctl.sh",
"deploy/hel913-unified/bridge_ctl.template.sh",
"deploy/hel913-unified/tts_ctl.template.sh",
"deploy/hel913-unified/force_end.template.sh",
"deploy/hel913-unified/verify_offline.py",
"deploy/hel913-unified/test_ctl_scripts.sh",
"deploy/hel913-unified/mem0-cp311-wheels.txt",
"docs/rework/hel913/verify-offline-run.txt",
"docs/rework/hel913/ctl-checks-run.txt",
"docs/hel913-capability-and-enablement.md"
],
"offline_verification": {
"where": ".12 product .venv311, candidate tree at /tmp/hel913-verify (cleaned after run); re-run by manager: 34/34 passed, dist 8-file hashes match",
"result": "34/34 checks passed; worker import ok under livekit-agents 1.8.8",
"zero_real_calls": "models base_url rewritten to 127.0.0.1:1 + provider.stream outbound sentinel; no listening sockets; no rooms; no gateway contact",
"scope_limits": "deps check printed 4 key versions only; unshared-life trimming verified on an empty DB (told=1) without positive/negative seed contrast — not claimed as full dependency or permission coverage",
"ctl_scripts": "test_ctl_scripts.sh 42/42 offline stub checks (invalid subcommand, duplicate start, pid-reuse refusal, failed-start cleanup, .env gating, templates default 0)"
},
"voice_window_wiring": {
"asr_hard_gate": "worker/.env CYBERGRIL_ASR_WINDOW_ID/_MAX_AUDIO_SECONDS/_MAX_CONNECT_RETRIES_PER_CALL (empty/0 = deny all ASR)",
"room_lifetime": "voice.yaml session_ttl_seconds=900 + token_ttl 300 + delete-on-hangup (bounded cleanup ledger)",
"tts_segments": "monitored via tts.log first-chunk count since window start (tts_ctl.template.sh records start byte); hard stop = window deadline",
"deadline": "force_end.template.sh now|watch <epoch> (DELETE sessions -> worker -> api -> bridge -> tts, pid-handle stops only)"
},
"memory_gap": {
"server_venv311": "mem0/qdrant_client/fastembed/onnxruntime all absent (verified 2026-10-29; never install into this borrowed venv)",
"no_other_311_env_on_server": true,
"local_artifacts": {
"mem0-2c81af3.tar.gz": "9dcef9303ebcec116eec6739f01b8b35bd24459de6a569686b4d19b9412dda23",
"mem0ai-2.2.1-py3-none-any.whl": "698284b6083ab8b7761454d65876a6d1bb983d278ad21a7bee38d760cb20e9db",
"fastembed_cache": "92MB (Qdrant/bge-small-zh-v1.5 + bm25)",
"hel857_venv": "Python 3.10.12 — must not mix into 3.11 process"
},
"install_target": "isolated /opt/cybergril-hel913/venv311 (python3.11 base + product lock 19 wheels + mem0 stack 40 wheels + fixed-source mem0ai wheel; all --no-index; complete auditable steps in README §8.3 with per-file sha256 evidence and fail-stop)",
"ledger_continuation": "authoritative embed ledger copied to instance data/embed_ledger.sqlite3 (ledger only — no test chats/vectors moved); authority prefix_rows=181, prefix_sha256 by manager, min_used=498, embed_cap=680 cumulative formula, frozen 2 untouched; 39/60 and old window balances never carried over"
},
"enablement_doc": "docs/hel913-capability-and-enablement.md §2 — single consistent pending-approval proposal: A/B/C separate accounts, all awaiting approval (manager does not self-approve A), B voice = 3 calls x <=10min = <=1800s ASR hard gate with per-cap consequences and executable window end, B/C boundary fixed",
"boundaries": "not deployed; nothing listening; caps all 0; no PR; existing instances and data untouched; no downloads this card; protected venvs untouched",
"coordinator_close_verification": "docs/rework/hel913/coordinator-close-checks.txt: 17/17 targeted offline checks; product baseline unchanged",
"file_sha256": {
"deploy/hel913-unified/README.md": "580e3100b207c8c0e3da9cddc644b00d7b3d66ae0d195ac058dba279f63e242e",
"deploy/hel913-unified/api_ctl.sh": "3eeff54fcdc1becb79d9fe63767eceee9209ed6239663ff7d0a3e90d27379c55",
"deploy/hel913-unified/bridge_ctl.template.sh": "43e951f01ceed07b9c1606cfc046aa1d34eefc8fad3a40c66db2de57f16c1d14",
"deploy/hel913-unified/dist-manifest.json": "c2ebc6e515096b535f5e08cce18dc9c4f104c1b2cabe3f3afb5fdd88f12d63db",
"deploy/hel913-unified/force_end.template.sh": "3f250942ff68e26e4a71750e17fd804fa57be921097d83ee76f1b5b0024fe893",
"deploy/hel913-unified/mem0-cp311-wheels.txt": "2a6fd3d287fe0713a2ac683584ee7f3723c83c236696f39551015ca2db358b94",
"deploy/hel913-unified/models.template.yaml": "0b8f051cedfcf0218929a652fed91b00762c33dd17fbb8f7eadcc50c65d4e837",
"deploy/hel913-unified/test_ctl_scripts.sh": "702f7b911598fc0433f63f250f2f1e58dec9d727dd7eb6ae8a773d521fcad5cd",
"deploy/hel913-unified/tts_ctl.template.sh": "f638f24a41f07cfef64e66eee996b4280fdd7aac80a5fc20be6d47a41b72cabf",
"deploy/hel913-unified/verify_offline.py": "86ea3da6f2c682ad8ee9a932f91d713e0778c61be5d4c15f916e38d15e3e66e4",
"deploy/hel913-unified/voice-window-arm.template.env": "4002b99d63fa556a5f1e8cb86bf74846e7b944571dd76ed40bfb549cf64f3307",
"deploy/hel913-unified/voice.template.yaml": "55e556d5df149ab4fa257640b4d87dc40bb43107a5e90279826516a7ec423f4c",
"deploy/hel913-unified/worker.env.template": "be80fc87cc04a379a776732ad94f392e08af4ecb9eaad4190a090f4071f40383",
"deploy/hel913-unified/worker_ctl.sh": "57fd028e3b0d932cdbde483925cc7e39a5b994fa53742f9350cc5fc22381077f"
}
}
@@ -0,0 +1,45 @@
# HEL-913 记忆栈 cp311 缺项轮清单(40 项;来源 docs/rework/hel879/sdk-audit/sdk-audit.json 闭包 55-产品已有)
# mem0ai 不在本表:只认固定源码轮 sha256 698284b6…(deploy/hel895-release-candidate.md §4 唯一入口)。
# 获批下载命令:pip download --only-binary :all: --implementation cp --python-version 3.11 \
# --platform manylinux2014_x86_64 --abi cp311 -r 本文件 -d wheels/ 逐项 sha256 留证。
# 其中 greenlet/pillow/truststore 三项已在工作站 uv 缓存命中(hel-879 release-artifacts 记录),可离线复用。
backoff==2.2.1
charset-normalizer==3.5.2
coloredlogs==15.0.1
distro==1.9.0
fastembed==0.9.1
filelock==4.1.0
flatbuffers==25.12.19
fsspec==2026.9.0
greenlet==3.5.6
grpcio==1.84.1
h2==4.4.1
hf-xet==1.7.0
hpack==4.2.0
httpcore2==2.14.0
httpx2==2.14.0
huggingface-hub==1.33.0
humanfriendly==10.0
hyperframe==6.1.0
jiter==0.18.0
loguru==0.7.3
mmh3==5.3.1
mpmath==1.3.0
numpy==2.2.6
onnxruntime==1.23.2
openai==3.37.0
pillow==12.3.0
portalocker==4.4.1
posthog==7.75.11
protobuf==6.33.6
py-rust-stemmers==0.1.8
pytz==2026.5
qdrant-client==1.20.0
requests==2.34.2
sniffio==1.3.1
sqlalchemy==2.0.55
sympy==1.14.0
tokenizers==0.23.3
tqdm==4.70.1
truststore==0.10.5
urllib3==2.8.0
@@ -0,0 +1,89 @@
# HEL-913 统一体验运行包 · models 配置模板(脱敏;本文件一切预算=0)
#
# 用法:复制到 <实例>/etc/models.yaml,按部署说明只改 base_url 指向获批网关、
# 按批准包写入预算值。未经批准一律保持 0(发送前拒绝,fail-closed)。
# 候选分支 config/models.yaml 的 tiers/routing 与本模板一致;本模板把
# base_url 换成占位符并保留 HEL-908 reasoning: buffer_turn 与 HEL-911/912
# 审核通过的调度修正(turn_detection=None 在代码侧,见 src/cybergril/voice/worker.py)。
tiers:
high:
provider: openai_compat
model: <获批模型名>
base_url: <http://内网网关:端口/v1>
api_key_env: null
timeout: 60.0
temperature: 0.85
reasoning: buffer_turn
standard:
provider: openai_compat
model: <获批模型名>
base_url: <http://内网网关:端口/v1>
api_key_env: null
timeout: 40.0
temperature: 0.7
reasoning: buffer_turn
low:
provider: openai_compat
model: <获批模型名>
base_url: <http://内网网关:端口/v1>
api_key_env: null
timeout: 20.0
temperature: 0.4
reasoning: buffer_turn
routing:
dialogue_main: high
dialogue_followup: standard
proactive_message: high
crisis: high
life_event: low
memory_gist: low
fact_extract: low
output_guard: low
pattern_detect: low
filler: none
tick: none
reach_out: none
avatar_drive: none
budget:
daily_tokens: 0
warn_ratio: 0.7
hard_stop_ratio: 0.95
daily_requests:
dialogue: 0
life: 0
background: 0
semantic: 0
# 用户实例永不配置一次性总量(total_requests/total_tokens 保持缺省):
# 一次性总量只属于独立团队测试实例,见 docs/budget-package-hel895.md §6。
asr:
provider: scripted
model: qwen3-asr-1.7b
language: zh
paralinguistic:
provider: scripted
model: sensevoice-small
window_ms: 1500
enabled: true
tts:
provider: silence
model: fun-cosyvoice3-0.5b
voice_ref: null
sample_rate: 16000
vad:
provider: energy
model: silero-v6
sample_rate: 16000
turn:
provider: heuristic
silence_min_ms: 150
silence_hard_end_ms: 800
embedding:
provider: openai_compat
model: qwen3-embedding-0.6b
base_url: null
api_key_env: null
dim: 1024
avatar:
route: vrm
renderer: three.js
lipsync: envelope
+149
View File
@@ -0,0 +1,149 @@
#!/usr/bin/env bash
# HEL-913 运行包 · 启停脚本离线替身检查(零真实服务、零真实端口、零出站)
#
# 用离线替身(stub 解释器 = 只休眠的脚本)与静态检查验证收口后的常规启停
# 安全:非法子命令拒绝、重复 start 拒绝、stop 的 PID 复用防护、启动失败
# 收尾清理、.env 占位/解析守门。不启动真实 API/worker/共享服务,不监听
# 任何端口(curl 只连本机高位死端口,必然失败,正是失败路径所需的输入)。
#
# 用法: bash deploy/hel913-unified/test_ctl_scripts.sh (在检出根目录)
set -u
PKG=$(cd "$(dirname "$0")" && pwd)
ROOT=$(cd "$PKG/../.." && pwd)
TMP=$(mktemp -d /tmp/hel913-ctl-test.XXXXXX)
PASS=0; FAIL=0
cleanup() { rm -rf "$TMP"; }
trap cleanup EXIT
ok() { PASS=$((PASS+1)); echo "PASS $1"; }
bad() { FAIL=$((FAIL+1)); echo "FAIL $1"; }
expect_rc() { # expect_rc <want> <got> <label>
[ "$2" = "$1" ] && ok "$3" || bad "$3 (want rc=$1 got rc=$2)"
}
# ---- S1. 静态:语法 + 包文件齐全 ----
for f in api_ctl.sh worker_ctl.sh bridge_ctl.template.sh tts_ctl.template.sh force_end.template.sh; do
bash -n "$PKG/$f" 2>/dev/null && ok "syntax $f" || bad "syntax $f"
done
for f in README.md manifest.json dist-manifest.json models.template.yaml voice.template.yaml \
worker.env.template verify_offline.py mem0-cp311-wheels.txt \
voice-window-arm.template.env test_ctl_scripts.sh; do
[ -f "$PKG/$f" ] && ok "package file $f" || bad "package file $f missing"
done
# ---- 沙盒实例布局(镜像 README §4 的目标布局) ----
BASE=$TMP/inst
mkdir -p "$BASE/current" "$BASE/worker" "$BASE/etc" "$BASE/data" "$BASE/logs"
CODE=$BASE/current; WDIR=$BASE/worker
touch "$BASE/etc/models.yaml" "$BASE/etc/voice.yaml"
printf 'dummy cert\n' > "$TMP/c.pem"; printf 'dummy key\n' > "$TMP/c.key"
# stub 解释器:保持 argv 不变(cmdline 保留 marker),留一行输出后休眠
STUB=$TMP/stub-python
printf '#!/usr/bin/env bash\necho "stub alive pid=$$ argv=$*" >&2\nsleep 600\n' > "$STUB"; chmod +x "$STUB"
HTTP=53881; HTTPS=53882
API_ENV="HEL913_BASE=$BASE HEL913_HTTP=$HTTP HEL913_HTTPS=$HTTPS HEL913_VENV=$STUB HEL913_CERT=$TMP/c.pem HEL913_KEY=$TMP/c.key"
alive_marker() { pgrep -f "$1" | while read -r p; do [ -d "/proc/$p" ] && echo "$p"; done; }
# ---- S2. 非法子命令拒绝(不静默当 start) ----
env $API_ENV bash "$PKG/api_ctl.sh" bogus >/dev/null 2>&1; expect_rc 2 $? "api_ctl invalid subcommand refused (rc=2)"
[ ! -f "$BASE/logs/api.pid" ] && ok "api_ctl invalid subcommand started nothing" || bad "api_ctl invalid subcommand left a pid file"
env HEL913_BASE=$BASE HEL913_AGENT_VENV=$STUB bash "$PKG/worker_ctl.sh" frobnicate >/dev/null 2>&1
expect_rc 2 $? "worker_ctl invalid subcommand refused (rc=2)"
[ ! -f "$BASE/logs/worker.pid" ] && ok "worker_ctl invalid subcommand started nothing" || bad "worker_ctl invalid subcommand left a pid file"
# ---- S3. api 启动失败收尾:健康不过 → 清自己、留日志、rc=1 ----
env $API_ENV bash "$PKG/api_ctl.sh" start >/dev/null 2>&1; expect_rc 1 $? "api_ctl failed start exits 1"
[ ! -f "$BASE/logs/api.pid" ] && ok "api_ctl failed start removed pid file" || bad "api_ctl failed start left pid file"
[ -s "$BASE/logs/api.log" ] && ok "api_ctl failed start kept log" || bad "api_ctl failed start lost log"
sleep 1
N=$(alive_marker "$STUB.*serve_dual_8360_8361" | wc -l)
[ "$N" = "0" ] && ok "api_ctl failed start left no stub process" || bad "api_ctl failed start left $N stub process(es)"
# ---- S4. api 重复 start 拒绝(活进程 + 有效句柄) ----
( cd "$CODE" && nohup "$STUB" deploy/voice/serve_dual_8360_8361.py --http-port $HTTP --https-port $HTTPS > "$BASE/logs/api.log" 2>&1 & echo $! > "$BASE/logs/api.pid" )
LIVEPID=$(cat "$BASE/logs/api.pid")
kill -0 "$LIVEPID" 2>/dev/null && ok "stub api process running (pid $LIVEPID)" || bad "stub api process failed to start"
env $API_ENV bash "$PKG/api_ctl.sh" start >/dev/null 2>&1; expect_rc 1 $? "api_ctl duplicate start refused (rc=1)"
[ "$(cat "$BASE/logs/api.pid" 2>/dev/null)" = "$LIVEPID" ] && ok "api_ctl duplicate start kept original handle" || bad "api_ctl duplicate start overwrote handle"
kill "$LIVEPID" 2>/dev/null; wait 2>/dev/null
# ---- S5. api stop 的 PID 复用防护:活 pid 但身份不符 → 拒杀 ----
sleep 600 & UNRELATED=$!
echo "$UNRELATED" > "$BASE/logs/api.pid"
env $API_ENV bash "$PKG/api_ctl.sh" stop >/dev/null 2>&1; expect_rc 1 $? "api_ctl stop refused reused pid (rc=1)"
kill -0 "$UNRELATED" 2>/dev/null && ok "unrelated process untouched" || bad "api_ctl stop killed an unrelated process!"
kill "$UNRELATED" 2>/dev/null; wait 2>/dev/null
rm -f "$BASE/logs/api.pid"
# ---- S6. api stop 死句柄:直接清 ----
echo 999999999 > "$BASE/logs/api.pid"
env $API_ENV bash "$PKG/api_ctl.sh" stop >/dev/null 2>&1; expect_rc 0 $? "api_ctl stop with dead pid exits 0"
[ ! -f "$BASE/logs/api.pid" ] && ok "api_ctl stop removed stale pid file" || bad "api_ctl stop kept stale pid file"
# ---- S7. worker .env 守门:占位未填 → 拒绝 ----
cp "$PKG/worker.env.template" "$WDIR/.env"
env HEL913_BASE=$BASE HEL913_AGENT_VENV=$STUB bash "$PKG/worker_ctl.sh" start >/dev/null 2>&1
expect_rc 1 $? "worker_ctl refuses .env with unfilled placeholders (rc=1)"
[ ! -f "$BASE/logs/worker.pid" ] && ok "placeholder refusal started nothing" || bad "placeholder refusal left pid file"
# ---- S8. worker .env 守门:解析失败 → 拒绝 ----
printf 'CYBERGRIL_API_BASE=http://127.0.0.1:8360\nFOO=bar baz\n' > "$WDIR/.env"
env HEL913_BASE=$BASE HEL913_AGENT_VENV=$STUB bash "$PKG/worker_ctl.sh" start >/dev/null 2>&1
expect_rc 1 $? "worker_ctl refuses unparseable .env (rc=1)"
[ ! -f "$BASE/logs/worker.pid" ] && ok "parse refusal started nothing" || bad "parse refusal left pid file"
# ---- S9. worker 启动失败收尾(注册不过 → 清自己、留日志) ----
cat > "$WDIR/.env" <<'EOF'
CYBERGRIL_API_BASE=http://127.0.0.1:8360
CYBERGRIL_AGENT_NAME=cybergril-voice-agent
LIVEKIT_URL=ws://127.0.0.1:7880
LIVEKIT_API_KEY=filled
LIVEKIT_API_SECRET=filled
CYBERGRIL_WORKER_HEALTH_PORT=8082
CYBERGRIL_VOICE_STATE=/tmp/x/voice_state.json
CYBERGRIL_ASR_USAGE_LEDGER=/tmp/x/asr-usage.jsonl
CYBERGRIL_ASR_WINDOW_ID=
CYBERGRIL_ASR_WINDOW_MAX_AUDIO_SECONDS=0
CYBERGRIL_ASR_MAX_CONNECT_RETRIES_PER_CALL=0
EOF
env HEL913_BASE=$BASE HEL913_AGENT_VENV=$STUB bash "$PKG/worker_ctl.sh" start >/dev/null 2>&1
expect_rc 1 $? "worker_ctl failed start exits 1"
[ ! -f "$BASE/logs/worker.pid" ] && ok "worker_ctl failed start removed pid file" || bad "worker_ctl failed start left pid file"
[ -s "$BASE/logs/worker.log" ] && ok "worker_ctl failed start kept log" || bad "worker_ctl failed start lost log"
sleep 1
N=$(alive_marker "$STUB.*cybergril.voice.worker" | wc -l)
[ "$N" = "0" ] && ok "worker_ctl failed start left no stub process" || bad "worker_ctl failed start left $N stub process(es)"
# ---- S10. worker 重复 start 拒绝 ----
( cd "$WDIR" && nohup "$STUB" -m cybergril.voice.worker start > "$BASE/logs/worker.log" 2>&1 & echo $! > "$BASE/logs/worker.pid" )
LIVEPID=$(cat "$BASE/logs/worker.pid")
env HEL913_BASE=$BASE HEL913_AGENT_VENV=$STUB bash "$PKG/worker_ctl.sh" start >/dev/null 2>&1
expect_rc 1 $? "worker_ctl duplicate start refused (rc=1)"
kill "$LIVEPID" 2>/dev/null; wait 2>/dev/null
rm -f "$BASE/logs/worker.pid"
# ---- S11. worker stop 的 PID 复用防护 ----
sleep 600 & UNRELATED=$!
echo "$UNRELATED" > "$BASE/logs/worker.pid"
env HEL913_BASE=$BASE bash "$PKG/worker_ctl.sh" stop >/dev/null 2>&1; expect_rc 1 $? "worker_ctl stop refused reused pid (rc=1)"
kill -0 "$UNRELATED" 2>/dev/null && ok "worker stop left unrelated process alive" || bad "worker stop killed unrelated process!"
kill "$UNRELATED" 2>/dev/null; wait 2>/dev/null
rm -f "$BASE/logs/worker.pid"
# ---- S12. 模板可解析性:arm 模板是合法 KEY=value(可被 source,默认全 0) ----
if ( set -a; . "$PKG/voice-window-arm.template.env"; set +a
[ "${HEL913_ASR_MAX_AUDIO_SECONDS:-x}" = "0" ] \
&& [ -n "${HEL913_WINDOW_ID+x}" ] && [ -z "$HEL913_WINDOW_ID" ] \
&& [ "${HEL913_TTS_SEGMENT_CAP:-x}" = "0" ] ) 2>/dev/null; then
ok "voice-window-arm.template.env parses, defaults 0/unarmed"
else
bad "voice-window-arm.template.env unparseable or non-zero default"
fi
echo
echo "$PASS passed, $FAIL failed"
[ "$FAIL" = "0" ]
+89
View File
@@ -0,0 +1,89 @@
#!/usr/bin/env bash
# HEL-913 运行包 · 共享 CosyVoice TTS 9880 窗口内临时恢复/停回模板(脱敏待批件)
#
# 只在获批语音窗口内使用;窗口结束必须 stop 停回(force_end.template.sh 会调
# 本脚本 stop)。只按自己写的 pid 句柄停止,快照先行;9880 已被别人启动时
# 不碰。改编自 HEL-910 已实测 tts_ctl.sh。子命令只认 start|stop|status|snapshot。
#
# 用法: [ENV=..] bash tts_ctl.template.sh start|stop|status|snapshot
# 环境变量: HEL913_BASE / HEL913_TTS_VENV(/opt/voice-agent/cosyvoice/venv/bin/python)
set -u
case "${1:-}" in start|stop|status|snapshot) ;; *) echo "invalid subcommand" >&2; exit 2 ;; esac
BASE=${HEL913_BASE:-/opt/cybergril-hel913}
CC=${HEL913_TTS_HOME:-/opt/voice-agent/cosyvoice}
TTSVENV=${HEL913_TTS_VENV:-$CC/venv/bin/python}
PIDF=$BASE/logs/tts9880.pid
SNAP=$BASE/logs/tts9880-before.txt
usage() { echo "usage: [ENV=..] bash $0 start|stop|status|snapshot" >&2; exit 2; }
ours() {
local p=$1 cmd cw
case "$p" in ''|*[!0-9]*) return 1 ;; esac
[ "$p" != "$$" ] || return 1
kill -0 "$p" 2>/dev/null || return 1
cmd=$(tr '\0' ' ' < "/proc/$p/cmdline" 2>/dev/null) || return 1
cw=$(readlink "/proc/$p/cwd" 2>/dev/null) || return 1
case "$cmd" in *"server.py"*) ;; *) return 1 ;; esac
[ "$cw" = "$CC" ] || return 1
return 0
}
pidfile_pid() { [ -f "$PIDF" ] && cat "$PIDF" 2>/dev/null; }
case "${1:-}" in
status)
p=$(pidfile_pid)
if [ -n "$p" ]; then ours "$p" && echo "running pid $p (ours)" || echo "pid $p not verified as ours"; else echo "not started by us"; fi
curl -s --max-time 3 http://127.0.0.1:9880/health && echo " <- health" || echo "health not answering"
exit 0 ;;
snapshot)
mkdir -p "$BASE/logs"
{ echo "ts=$(date -u +%FT%TZ)"
if curl -s --max-time 3 http://127.0.0.1:9880/health >/dev/null 2>&1; then echo "was=up"; else echo "was=down"; fi
ss -ltn 2>/dev/null | grep ':9880 ' || echo "port9880=free"; } > "$SNAP"
cat "$SNAP"; exit 0 ;;
stop)
p=$(pidfile_pid)
if [ -z "$p" ]; then echo "not ours to stop (no pid file)"; exit 0; fi
if kill -0 "$p" 2>/dev/null && ! ours "$p"; then
echo "REFUSED: pid $p alive but not this tts (pid reuse?) — not killing; resolve $PIDF manually" >&2
exit 1
fi
if ours "$p"; then kill "$p"; sleep 5; ours "$p" && kill -9 "$p"; fi
rm -f "$PIDF"
echo "tts stopped (pid $p)"
exit 0 ;;
esac
# start(仅 start 子命令落到这里)
mkdir -p "$BASE/logs"
p=$(pidfile_pid)
if [ -n "$p" ] && kill -0 "$p" 2>/dev/null; then
echo "REFUSED: live pid handle already exists; inspect/stop first" >&2; exit 1
fi
if curl -s --max-time 3 http://127.0.0.1:9880/health >/dev/null 2>&1; then
echo "9880 already up — NOT ours, not touching"; exit 0
fi
if ss -ltn 2>/dev/null | grep -q ':9880 '; then
echo "port 9880 occupied by non-healthy process — abort"; exit 1
fi
[ -x "$TTSVENV" ] || { echo "REFUSED: tts venv python not executable: $TTSVENV" >&2; exit 1; }
cd "$CC" || exit 1
nohup "$TTSVENV" server.py >> "$CC/tts.log" 2>&1 &
echo $! > "$PIDF"
echo "tts starting (pid $(cat "$PIDF")) — model load takes up to ~120s"
for i in $(seq 1 60); do
sleep 2
if curl -s --max-time 3 http://127.0.0.1:9880/health 2>/dev/null | grep -q '"ok"[[:space:]]*:[[:space:]]*true'; then
echo "OK: tts healthy after ~$((i*2))s"
wc -c < "$CC/tts.log" > "$BASE/logs/tts-log-start-byte" # TTS 段数计数的窗口起点
exit 0
fi
kill -0 "$(cat "$PIDF")" 2>/dev/null || { echo "FAIL: tts process died"; tail -10 "$CC/tts.log"; exit 1; }
done
echo "FAIL: tts not healthy in 120s"; tail -10 "$CC/tts.log"
p=$(pidfile_pid)
if ours "$p"; then kill "$p"; sleep 2; ours "$p" && kill -9 "$p"; fi
rm -f "$PIDF"
exit 1
+273
View File
@@ -0,0 +1,273 @@
"""HEL-913 运行准备离线验证:零真实调用(cap=0 + 死地址双重保险)。
在进程内用 TestClient 走统一实例的关键接线:入口健康、创建守门、传输
(SSE 对话在预算 0 下诚实拒绝且绝不触发出站)、关系调整、日子与回忆
读取的服务端裁剪、语音诚实拒绝、重开(epoch/资料保留)、静态页与 dist
哈希。不监听任何端口(836x/8082/9880/8090 全程不出现监听 socket),
不访问真实网关(models.base_url 重写为 127.0.0.1:1,livekit 指向死地址,
即使预算闸失效也只能连本机死端口)。
用法(在候选 head 检出根目录、产品 3.11 venv 下):
PYTHONPATH=src <venv311>/python deploy/hel913-unified/verify_offline.py \
[--web <dist目录>] [--keep]
退出码 0 = 全部通过;任一 FAIL 即非 0。临时库写在 <root>/.hel913-verify-tmp,
默认结束后删除(--keep 保留)。
"""
from __future__ import annotations
import argparse
import atexit
import json
import os
import shutil
import sys
import tempfile
import uuid
from pathlib import Path
RESULTS: list[tuple[bool, str]] = []
def check(ok: bool, label: str) -> bool:
RESULTS.append((bool(ok), label))
print(("PASS " if ok else "FAIL ") + label)
return bool(ok)
def main() -> int:
parser = argparse.ArgumentParser()
parser.add_argument("--web", default=None, help="web dist 目录(只读;默认不挂静态)")
parser.add_argument("--keep", action="store_true")
args = parser.parse_args()
root = Path(__file__).resolve().parents[2]
os.chdir(root)
tmp = Path(tempfile.mkdtemp(prefix="hel913-verify-", dir=root))
if not args.keep:
atexit.register(shutil.rmtree, tmp, ignore_errors=True)
# ---- 0. 包完整性:Python / 锁定依赖 / 模块树 -----------------------------
check(sys.version_info[:2] == (3, 11), f"python 3.11 (actual {sys.version_info[:3]})")
import cybergril # noqa: E402
check(str(Path(cybergril.__file__).resolve()).startswith(str(root / "src")),
f"cybergril imported from candidate tree ({cybergril.__file__})")
import fastapi # noqa: E402
import httpx # noqa: E402
import pydantic # noqa: E402
import uvicorn # noqa: E402
import yaml # noqa: E402
check(True, f"deps: fastapi {fastapi.__version__} uvicorn {uvicorn.__version__} "
f"httpx {httpx.__version__} pydantic {pydantic.__version__}")
from cybergril.api.app import create_app # noqa: E402
from cybergril.voice.router import build_voice_router # noqa: E402
from cybergril.voice.session import load_voice_config # noqa: E402
check(True, "product modules import (api.app / voice.router / voice.session)")
# 记忆栈缺项如实呈现(不允许 stub 冒充真实 mem0)
for mod, expect in (("mem0", False), ("qdrant_client", False), ("fastembed", False)):
try:
__import__(mod)
got = True
except Exception:
got = False
check(got == expect, f"{mod} {'absent' if not expect else 'present'} in product venv (as documented)")
# ---- 1. 脱敏配置:cap=0 + 死地址 ----------------------------------------
models_src = (root / "config" / "models.yaml").read_text()
assert "daily_tokens" in models_src, "models.yaml missing budget block"
dead = models_src.replace("192.168.200.11:8731", "127.0.0.1:1")
assert "192.168" not in dead, "real gateway address survived rewrite"
models_path = tmp / "models.yaml"
models_path.write_text(dead)
voice_path = tmp / "voice.yaml"
voice_path.write_text(
"# HEL-913 offline template: everything points at dead local ports;\n"
"# no real LiveKit/TTS/panel is contacted by this verification.\n"
"livekit_url: ws://127.0.0.1:1\n"
"livekit_internal: http://127.0.0.1:1\n"
"api_key: dead\n"
"api_secret: dead\n"
"agent_name: cybergril-voice-agent\n"
"tts_health_url: http://127.0.0.1:1/health\n"
"panel_url: https://127.0.0.1:1\n"
"tts_url: http://127.0.0.1:1\n"
"registry_file: " + str(tmp / "voices.json") + "\n"
"worker_state_file: " + str(tmp / "voice_state.json") + "\n"
"token_ttl_seconds: 300\n"
"session_ttl_seconds: 900\n"
)
db_path = tmp / "companion.db"
env = {
"CYBERGRIL_DB": str(db_path),
"CYBERGRIL_MODELS": str(models_path),
"CYBERGRIL_VOICE_CONFIG": str(voice_path),
"CYBERGRIL_SEMANTIC": "stub",
"CYBERGRIL_R2_ENABLED": "1",
**({"CYBERGRIL_WEB": args.web} if args.web else {}),
}
old = {k: os.environ.get(k) for k in env}
os.environ.update(env)
from fastapi.testclient import TestClient # noqa: E402
app = create_app()
# 出站哨兵:把所有已装配 provider 的 stream 打上标记——预算 0 下任何
# 真实发送意图都会把本验证置为 FAIL(而不是悄悄连死地址)。
outbound = []
client = TestClient(app)
with client:
st = app.state
router = st.life.router # LifeRuntime 持有本实例同一 router
for tier in router.available_tiers():
prov = router.provider_for(tier)
def _guard_stream(self, *a, __orig=prov.stream, __name=getattr(prov, "name", tier), **kw):
outbound.append(__name)
raise AssertionError(f"unexpected outbound stream via {__name}")
prov.stream = _guard_stream.__get__(prov, type(prov))
birth = {"birth": "2001-08-16", "hour": "辰时", "name": "临川", "relation": "朋友",
"nickname": "", "boundary": "轻松相处"}
# 2. 入口健康
r = client.get("/api/health")
h = r.json()
check(r.status_code == 200 and h["ok"] and h["capabilities"]["text"] is True,
"GET /api/health 200, text capability true")
check(h["companion_created"] is False, "health: companion_created=false before creation")
check(h["llm"]["ok"] is False, "health: llm honestly not ok (dead addr, cap=0)")
# 3. 创建守门:空库 404,不能读出任何伪造档案
check(client.get("/api/companion").status_code == 404,
"GET /api/companion 404 before creation (no fabricated profile)")
# 4. 生辰预览:纯本地计算,无模型参与(BirthInput 只收 name/birth/hour)
r = client.post("/api/companion/preview",
json={k: birth[k] for k in ("name", "birth", "hour")})
preview_pillars = r.json().get("pillars") if r.status_code == 200 else None
check(r.status_code == 200 and "pillars" in r.json() and "sections" in r.json(),
"POST /api/companion/preview 200 (local bazi compile)")
# 5. 创建 + 底色只读落库
r = client.post("/api/companion", json=birth)
check(r.status_code == 201 and r.json()["name"] == "临川",
"POST /api/companion 201")
row = st.store.query_one("SELECT pillars FROM bazi_core WHERE id=1")
saved_day = json.loads(row["pillars"])["day"][0] if row else None
prev_day = (preview_pillars or {}).get("day", [None])[0]
check(saved_day is not None and saved_day == prev_day,
f"bazi_core persisted and matches preview (day master {saved_day})")
check(client.post("/api/companion", json=birth).status_code == 409,
"second create refused 409 (single companion guard)")
pv = client.get("/api/persona").json()
check(pv["interpretation"] is None and pv["state"] in {"failed", "loading", "disabled"},
f"persona honest at cap=0 (state={pv['state']}, no fabricated interpretation)")
# 6. 传输:SSE 对话在预算 0 下诚实拒绝,零出站
turn1 = str(uuid.uuid4())
with client.stream("POST", "/api/chat",
json={"text": "在吗", "turn_id": turn1, "epoch": st.epoch}) as resp:
check(resp.status_code == 200 and resp.headers["content-type"].startswith("text/event-stream"),
"POST /api/chat opens SSE stream")
kinds = [json.loads(line[6:])["t"] for line in resp.iter_lines()
if line.startswith("data: ")]
check("chat.error" in kinds and "chat.final" not in kinds,
f"chat honestly errors at cap=0 (frames={kinds})")
check(not outbound, f"zero provider stream calls (outbound={outbound})")
msgs = client.get("/api/messages").json()["messages"]
check(msgs and msgs[-1]["role"] == "user" and msgs[-1]["status"] in {"failed", "cancelled"},
"failed turn persisted as user row, no fake companion reply")
with client.stream("POST", "/api/chat",
json={"text": "在吗", "turn_id": turn1, "epoch": st.epoch}) as resp:
kinds2 = [json.loads(line[6:])["t"] for line in resp.iter_lines()
if line.startswith("data: ")]
check("chat.error" in kinds2 and not outbound,
"retry same failed turn: honest error again, still zero outbound")
# 7. 关系可调整、名字保留
r = client.patch("/api/relation", json={"relation": "恋人"})
check(r.status_code == 200 and r.json()["relation"] == "恋人" and r.json()["name"] == "临川",
"PATCH /api/relation 200 (relation adjustable, name kept)")
# 8. 日子与回忆:服务端裁剪 + 分页形状(told=1 之外不可见)
r = client.get("/api/life")
check(r.status_code == 200 and r.json()["events"] == [],
"GET /api/life 200 empty (only told events, none yet)")
r = client.get("/api/memories")
check(r.status_code == 200 and r.json()["memories"] == [],
"GET /api/memories 200 empty")
check(client.get("/api/life/1").status_code == 404,
"GET /api/life/1 404 (unshared detail refused)")
bogus = {"message_id": 99999, "turn_id": str(uuid.uuid4()), "epoch": st.epoch,
"token": "x" * 40, "text_hash": "0" * 64}
check(client.post("/api/chat/received", json=bogus).status_code == 404,
"POST /api/chat/received 404 on unknown receipt")
# 9. 语音诚实拒绝:配置指向死地址 → 开房必须 503,绝不建房
r = client.get("/api/voice/status")
check(r.status_code == 200 and r.json()["configured"] is True and r.json()["voice"] is False,
"GET /api/voice/status 200, voice honestly false")
r = client.post("/api/voice/session")
check(r.status_code == 503,
f"POST /api/voice/session honest 503 when TTS unreachable ({r.status_code})")
check(client.delete("/api/voice/session/no-such").status_code == 404,
"DELETE /api/voice/session/{unknown} honest 404")
# 10. 静态页与 dist 哈希(只读)
if args.web:
page = client.get("/")
check(page.status_code == 200 and b"<div id=" in page.content,
"GET / serves web dist index.html")
# 11. 重开:新进程入口、epoch 递增、资料保留
with TestClient(app) as client2:
h2 = client2.get("/api/health").json()
check(h2["epoch"] == 2, f"reopen: epoch=2 (got {h2['epoch']})")
c2 = client2.get("/api/companion").json()
check(c2["name"] == "临川" and c2["relation"] == "恋人" and c2["birth"] == "2001-08-16",
"reopen: companion identity + adjusted relation retained")
m2 = client2.get("/api/messages").json()["messages"]
check(len(m2) == 1 and m2[0]["role"] == "user",
"reopen: chat history retained, still no fabricated replies")
if args.web:
manifest = json.loads((Path(__file__).parent / "dist-manifest.json").read_text())
bad = []
for rel, want in manifest.items():
p = Path(args.web) / rel
if not p.is_file():
bad.append(f"{rel} missing")
continue
import hashlib
got = hashlib.sha256(p.read_bytes()).hexdigest()
if got != want:
bad.append(f"{rel} {got[:12]}!={want[:12]}")
check(not bad, f"dist matches manifest ({len(manifest)} files; bad={bad})")
for k, v in old.items():
if v is None:
os.environ.pop(k, None)
else:
os.environ[k] = v
failed = [label for ok, label in RESULTS if not ok]
print(f"\n{len(RESULTS) - len(failed)}/{len(RESULTS)} checks passed")
if failed:
print("FAILED:")
for f in failed:
print(" - " + f)
return 1
return 0
if __name__ == "__main__":
sys.exit(main())
@@ -0,0 +1,12 @@
# HEL-913 · 语音窗口一次性布防模板(脱敏;默认全 0/未布防,随包不生效)
#
# 获批语音窗口的负责人在窗口启动时显式填写并在启动 worker 前写入
# <实例>/worker/.env(ASR 三项)与本文件(窗口参数)。唯一接线见
# deploy/hel913-unified/README.md §5;建议值口径见
# docs/hel913-capability-and-enablement.md §2 B。
# 已实测同形工具(HEL-910 窗口):docs/rework/hel910/tools/asr-arm.env。
HEL913_WINDOW_ID= # 例 hel913-20261106-a;空=未布防=拒绝一切 ASR
HEL913_ASR_MAX_AUDIO_SECONDS=0 # 全窗口实际送入 ASR 音频硬闸(秒)
HEL913_ASR_MAX_RETRIES_PER_CALL=0 # 每通连接重试硬闸(失败后的再建连)
HEL913_TTS_SEGMENT_CAP=0 # TTS 段数上限(监控口径;到顶即手动 force_end)
HEL913_WINDOW_DEADLINE_EPOCH= # date -d '<第3日> 24:00' +%s;到点 force_end
+23
View File
@@ -0,0 +1,23 @@
# HEL-913 统一体验运行包 · voice 配置模板(脱敏)
#
# 用法:复制到 <实例>/etc/voice.yaml,把 <...> 占位替换成服务器本地真实值。
# livekit_url 是 POST /api/voice/session 发给**浏览器**的接入地址:统一实例
# 页面走 HTTPS(8361),HTTPS 页面连 ws:// 明文会被混合内容策略阻断,因此
# 语音可用的前提是 wss TLS 桥(deploy/voice/wss_bridge.example.py 在新端口
# 终结 TLS、回环转发 7880,与 8361 同一张自签证书)——livekit_url 必须填
# 桥的 wss:// 地址,不是可选件(桥的启停见 README §5)。服务器内部
# (开房/删房/worker 注册)仍走 livekit_internal 的本机明文 7880。
# TTS/面板地址在语音窗口获批启动后指向本机 9880/8090;registry/worker_state
# 落实例数据目录,与产品库同空间,随实例备份。
livekit_url: wss://192.168.200.12:8363
livekit_internal: http://127.0.0.1:7880
api_key: <LiveKit api key,服务器本地>
api_secret: <LiveKit api secret,服务器本地>
agent_name: cybergril-voice-agent
tts_health_url: http://127.0.0.1:9880/health
panel_url: https://127.0.0.1:8090
tts_url: http://127.0.0.1:9880
registry_file: /opt/cybergril-hel913/data/voices.json
worker_state_file: /opt/cybergril-hel913/data/voice_state_cybergril.json
token_ttl_seconds: 300
session_ttl_seconds: 600
+26
View File
@@ -0,0 +1,26 @@
# HEL-913 统一体验运行包 · 语音 worker 环境模板(脱敏)
#
# 用法:复制到 <实例>/worker/.env,把所有 <...> 占位替换成服务器本地真实值。
# worker_ctl.sh 启动前会拒绝:仍含 <...> 占位的文件、解析失败的文件、缺文件。
# 运行解释器是 agent venv(livekit-agents 1.8.8),不是产品 .venv311。
CYBERGRIL_API_BASE=http://127.0.0.1:8360
CYBERGRIL_AGENT_NAME=cybergril-voice-agent
LIVEKIT_URL=ws://127.0.0.1:7880
LIVEKIT_API_KEY=<LiveKit api key,服务器本地>
LIVEKIT_API_SECRET=<LiveKit api secret,服务器本地>
CYBERGRIL_WORKER_HEALTH_PORT=8082
CYBERGRIL_VOICE_STATE=/opt/cybergril-hel913/data/voice_state_cybergril.json
# ASR 用量账本独立于产品库,落在实例数据目录(逐通历史不随删房消失):
CYBERGRIL_ASR_USAGE_LEDGER=/opt/cybergril-hel913/data/asr-usage.jsonl
# —— ASR 一次性窗口闸(HEL-906;本段是布防接线,默认未布防 = 真实 cap=0)——
# 三项保持空/0 时,worker 拒绝一切真实 ASR 新连接与新音频(fail-closed,
# 拒绝本身落账,src/cybergril/voice/asr_usage.py)。只有获批语音窗口的
# 负责人在窗口启动时显式改这里并重启 worker(接线与建议值见 README §5
# 与 docs/hel913-capability-and-enablement.md §2 B):
# CYBERGRIL_ASR_WINDOW_ID=hel913-<日期>-a # 新窗口 id;空=未布防
# CYBERGRIL_ASR_WINDOW_MAX_AUDIO_SECONDS=1800 # 3 通×10 分钟=30 分钟硬闸
# CYBERGRIL_ASR_MAX_CONNECT_RETRIES_PER_CALL=2 # 每通连接重试上限
CYBERGRIL_ASR_WINDOW_ID=
CYBERGRIL_ASR_WINDOW_MAX_AUDIO_SECONDS=0
CYBERGRIL_ASR_MAX_CONNECT_RETRIES_PER_CALL=0
+136
View File
@@ -0,0 +1,136 @@
#!/usr/bin/env bash
# HEL-913 统一体验运行包 · 专属语音 worker 启停
#
# 运行解释器是 agent venv(livekit-agents 1.8.8),产品代码经 PYTHONPATH 注入。
# worker 只连接本实例 API 与本机 LiveKit。本脚本只做本实例常规启停安全:
# - 子命令只认 start|stop|status,其他一律拒绝退出 2(不会静默当 start);
# - start 前核对 pid 句柄与 worker/.env(缺文件/含未填 <...> 占位/解析失败
# 一律拒绝),重复 start 拒绝,句柄 pid 复用拒绝;
# - stop/失败收尾只杀经身份核验的进程(cmdline 含 cybergril.voice.worker
# 且 cwd 是本实例 worker 目录),绝不按进程名扫杀;
# - start 注册检查不过 → 清掉自己刚起的进程、保留日志、退出 1。
#
# 用法: [ENV=..] bash deploy/hel913-unified/worker_ctl.sh start|stop|status
# 环境变量:
# HEL913_BASE 实例根目录(含 current/ worker/ 等)
# HEL913_AGENT_VENV agent venv python(默认 /opt/voice-agent/agent/venv/bin/python)
# HEL913_WORKER_HEALTH 健康端口(默认 8082;与 worker/.env 中一致)
set -u
BASE=${HEL913_BASE:-/opt/cybergril-hel913}
VENV=${HEL913_AGENT_VENV:-/opt/voice-agent/agent/venv/bin/python}
HEALTH=${HEL913_WORKER_HEALTH:-8082}
WDIR=$BASE/worker
ENVF=$WDIR/.env
LOG=$BASE/logs/worker.log
PIDF=$BASE/logs/worker.pid
MARKER="cybergril.voice.worker"
usage() { echo "usage: [ENV=..] bash $0 start|stop|status" >&2; exit 2; }
ours() {
local p=$1 cmd cw
case "$p" in ''|*[!0-9]*) return 1 ;; esac
[ "$p" != "$$" ] || return 1
kill -0 "$p" 2>/dev/null || return 1
cmd=$(tr '\0' ' ' < "/proc/$p/cmdline" 2>/dev/null) || return 1
cw=$(readlink "/proc/$p/cwd" 2>/dev/null) || return 1
case "$cmd" in *"$MARKER"*) ;; *) return 1 ;; esac
[ "$cw" = "$WDIR" ] || return 1
return 0
}
pidfile_pid() { [ -f "$PIDF" ] && cat "$PIDF" 2>/dev/null; }
stop() {
local p
p=$(pidfile_pid)
if [ -z "$p" ]; then
echo "no pid file; nothing stopped"
return 0
fi
if kill -0 "$p" 2>/dev/null && ! ours "$p"; then
echo "REFUSED: pid $p is alive but is NOT this worker (pid reuse?) — not killing; resolve $PIDF manually" >&2
return 1
fi
if ours "$p"; then
kill "$p"
sleep 3
if ours "$p"; then kill -9 "$p"; sleep 1; fi
fi
rm -f "$PIDF"
echo "worker stopped (pid $p)"
return 0
}
start() {
local p bad
p=$(pidfile_pid)
if [ -n "$p" ] && kill -0 "$p" 2>/dev/null; then
if ours "$p"; then
echo "REFUSED: worker already running (pid $p) — stop first" >&2
else
echo "REFUSED: pid file has live pid $p that is not this worker (pid reuse?) — resolve $PIDF manually" >&2
fi
exit 1
fi
rm -f "$PIDF"
[ -d "$WDIR" ] || { echo "REFUSED: worker dir missing: $WDIR" >&2; exit 1; }
[ -f "$ENVF" ] || { echo "REFUSED: $ENVF missing (copy worker.env.template and fill it)" >&2; exit 1; }
[ -x "$VENV" ] || { echo "REFUSED: agent venv python not executable: $VENV" >&2; exit 1; }
# 占位符守门:模板 <...> 未替换一律拒绝(不让占位串进进程环境)
bad=$(grep -nE '^[A-Za-z_][A-Za-z0-9_]*=.*<' "$ENVF" || true)
if [ -n "$bad" ]; then
echo "REFUSED: $ENVF still has unfilled <...> placeholders:" >&2
echo "$bad" >&2
exit 1
fi
# 解析守门:.env 必须能作为 KEY=value 被 source(坏引号/裸空格拒绝)
if ! (set -a; . "$ENVF"; set +a) 2>/dev/null; then
echo "REFUSED: $ENVF does not parse as KEY=value lines" >&2
exit 1
fi
mkdir -p "$BASE/logs"
cd "$WDIR" || exit 1
set -a
. "$ENVF"
set +a
PYTHONPATH="$BASE/current/src" nohup "$VENV" -m cybergril.voice.worker start > "$LOG" 2>&1 &
p=$!
echo "$p" > "$PIDF"
echo "worker starting (pid $p)"
sleep 18
if grep -m1 "registered worker" "$LOG" >/dev/null; then
echo "OK: worker registered"
return 0
fi
echo "FAIL: worker did not register — full log kept at $LOG; tail:" >&2
tail -8 "$LOG" >&2
if ours "$p"; then
kill "$p"; sleep 2
ours "$p" && kill -9 "$p"
fi
rm -f "$PIDF"
echo "cleaned up failed start (log kept: $LOG)" >&2
exit 1
}
status() {
local p
p=$(pidfile_pid)
if [ -n "$p" ]; then
if ours "$p"; then echo "running pid $p (identity verified)"
elif kill -0 "$p" 2>/dev/null; then echo "pid $p alive but NOT ours (stale pid file?)"
else echo "pid $p not alive (stale pid file)"; fi
else
echo "no pid file"
fi
curl -s --max-time 3 "http://127.0.0.1:$HEALTH/" >/dev/null && echo "health ok" \
|| echo "health port not answering"
}
case "${1:-}" in
start) start ;;
stop) stop ;;
status) status ;;
*) usage ;;
esac
+135
View File
@@ -0,0 +1,135 @@
# HEL-913 · 一页能力清单与一次真实启用建议
依据:产品基线 `4a38106`(HEL-912 审核通过)+ 运行包提交(仅 deploy/docs,
见运行包 README §0)、HEL-907/910 真实窗口记录、HEL-913 离线验证 34/34
(`docs/rework/hel913/verify-offline-run.txt`;其中依赖核对只打印 4 个关键
包版本、未分享裁剪只在空库验证——口径限制见运行包 README §7)。分级只分
三种:**✅接好且已验证**(真实窗口或真实服务验证过)/ **🟡有实现、缺真实验证**
(代码与离线/替身验证在,真实链路未跑或未批预算)/ **❌尚未接入**。不照抄
旧表:语音已接(HEL-907/910 实测),下述端口/能力以当前源码为准。
## 1. 能力清单(按用户使用顺序)
| # | 用户动作 | 现状 | 具体行为与证据 |
| --- | --- | --- | --- |
| 1 | 打开网页 | ✅ | HTTPS 入口出界面(自签证书需浏览器「高级→继续」);`GET /` 出 index.html、dist 8 文件哈希核过(HEL-913 验证)。导航:此刻/交谈/日子/设置(`web/src/app/RealApp.tsx`) |
| 2 | 自己给她起名、选生日、选关系 | ✅(起名/生日/关系)/ 🟡(自主诠释与初始习惯) | 用户亲选关系(不预选,AM-002)、亲起名(AM-003);创建守门 404/409、八字底色落库只读、公历农历四柱展示(`src/cybergril/api/app.py:427`、`src/cybergril/core/birth_view.py`)。**自主诠释/习惯生成(persona)从未真实跑过**:所有真实窗口 background=0 诚实拒绝(HEL-910 预检证实),首次用户体验需预算 |
| 3 | 文字聊天 | ✅ | 真实网页 Enter 发送、SSE 流式回复、完整落库;语音在播/待播时发文字打断=旧声停+完整文字回复+语音恢复(HEL-910 两通实测);**生成中的文字取消未取得有效真实样本**(HEL-908 的修复只有离线验证,HEL-910 想测没测成,如实记未验证);失败轮诚实 error 不伪造 |
| 4 | 她的生活(自己运行) | 🟡 | 生活循环/活动线程/分享判定/回执代码接好(`src/cybergril/life/`);未分享生活服务端裁剪(told=1,AM-001)空库离线验证(未做正反种子对照);**真实生活事件生成未发生**(life 预算 0),日子页真实模式下尚无真实事件可看 |
| 5 | 记忆 | 🟡(分两层) | 聊天记忆:逐轮落库、遗忘下限、词面检索(FTS)已接,真实窗口对话随轮落库(团队测试库);**语义记忆(真实 Mem0)缺依赖**:.12 venv311 四项未装(2026-10-29 实测),完整安装与接线见运行包 README §8;激活还需 B 部分嵌入/提取预算 |
| 6 | 关掉网页再回来 | ✅ | 同一位她保留:聊天/关系/八字/记忆持久;epoch 递增同步、分页缺口不跳留言、未读标记(HEL-895/896 真实服务浏览器 9 项检查;HEL-913 离线重开验证) |
| 7 | 她主动留言 | 🟡 | 时机判定+网页内留言卡+回来即看的前端链路已接并经真实服务浏览器验证(种子数据);**真实 LLM 主动措辞生成未发生**(proactive 预算 0);不接手机推送(CG-011 首版范围) |
| 8 | 语音通话 | ✅(工程验证) | 真实网页开通话、连续对话、字幕同步、挂断删房;文字打断在播旧声实测停(作者粗略观察约秒级,原始探针未保留,**不作精确口径、不承诺可独立精测**);首声原实测 9.53s,HEL-911 移除 3.66s 等待后**未实测**(不向用户承诺任何推算值);真人麦克风打断、生成中文字取消的正面样本未取得(承接) |
| 9 | 自定义声音 | ✅(工程验证) | 网页上传参考音频→登记→真 TTS 试听→应用→下一通生效;通话中改选不换声(HEL-907 全链 13/14 步实测,call1/2 以 cg- 音色真实合成;第 14 步真机复测未做);用户本人尚未亲自用过 |
| 10 | 换城市/天气跟随 | ❌ | 设置页城市项为演示(`web/src/manage/ManagePanel.tsx` cap=demo/off);后端无天气源(CG-023 承接 R6,T-07) |
| 11 | 换外观素材 | ❌ | 设置页外观项为演示;素材规范/导入未定稿(CG-005/030,T-03,R6;视觉参考见 PR#8 prototypes/hel-793/) |
| 12 | 备份导出/每日自动备份 | ❌(演示导出除外) | 设置页「本地演示导出」为演示件;CG-009 每日自动备份+手动完整导出未实现(R6);现阶段只有发布归档工具 `tools/release_snapshot_hel896.py`(工程用,不冒充 R6) |
| 13 | 摄像头观察 | ❌ | 无视觉服务接入;CG-021/022(R7),4080 未触,部署由用户负责(T-05) |
| 14 | 真实人物口型/交谈半身 | ❌ | 交谈时人物为静帧参考图(`assets/her-talk.jpg`);成品视频选片与实时驱动器未选型(CG-029,T-09;8340/ComfyUI 停机) |
机器可读口径:`GET /api/health` 的 `capabilities`(voice/vision/weather/materials/
backup=false 为诚实声明;text=true)。
## 2. 一次真实启用建议(**全部待批准**;当前配置仍全 0,旧窗口余额不结转)
> 更正声明:本节早前写「A 总管权限内新批、不用问用户」——与本轮真实
> cap=0 及主卡授权矛盾,**作废**。所有新增真实用量、安装、部署(含 A)
> 一律待批,总管不自行放行;批准前一切 cap=0。三本账彼此独立(独立实例/
> 独立库,HEL-896 §6 分账语义),任何一本用完不自动转另一本;所有硬闸
> 发送前拒绝、碰顶即停、**封账不解除**;提额永远是新批准。费用均为内网
> 自持服务(LLM 网关 .11:8731、TTS/ASR/LiveKit 在 .12),**无新增现金支出**,
> 消耗的是授权额度与本机资源。用户不需要理解 token/EOU,也不需要选算法
> 或决定"要不要真记忆"——工程侧按批准直接配置。
### A · 团队验收检查(建议顶:55 次 / 500,000 tokens / 0 嵌入——待批)
- 沿用 `docs/budget-package-hel895.md` §6 的形状:**独立团队实例**自己的
SQLite 账,体验链 1–7 走完(创建→诠释→对话→生活→情绪关系→主动联系→
重开同步,即本清单 🟡 项的团队级补证)即 `seal_budget_hel879.py` 封账
归档。
- A 是团队实例的账:**不并入用户实例、不给用户实例配置一次性总量**
(一次性总量只属于团队测试实例,见 budget-package-hel895 §6)。
### B · 用户首体验(一次批准;最小够用)
- **前置(窗口开始前,团队完成,不占用户额度)**:如批准真实记忆,先按
运行包 README §8 一次性窗口完成安装+co-import+缓存落位(约 1–2 小时
含验证;+450–550MB 磁盘);不批安装则记忆停在词面检索(stub 已验证
全链可跑),其余体验不受影响。四步检查(安装→独立部署→团队检查→用户
首用)见运行包 README §4/§8 与本节。
- **窗口与时点**:建议 3 个自然日,服务器本地时区(Asia/Shanghai)。T0 =
团队完成检查、把地址交给用户的时刻(如周五 19:00 交付,则周日 24:00
到期);日账按本地自然日零点重置;团队准备耗时全部在 T0 之前。
- **文字与生活(models.yaml 日账,程序硬闸)**:对话 60 轮/日、生活 8 次/
日、判定/成长/摘要 40 次/日、日 token 池 2,000,000、创建+诠释+习惯一次
性 4 次。**语音通话里的对话轮同样计 dialogue 日账**(不另开语音 LLM 账)。
- **记忆(若批安装)**:提取 LLM 累计 60 次(`llm_ops`)、新增嵌入累计
180 条(累计口径 `embed_cap=680`、冻结 2 不动,见运行包 README §8.4)、
语义类 40 次/日;嵌入日顶60条,提取日顶40次(两项按UTC切日,即北京时间08:00)。
- **语音(3 通 × ≤10 分钟 = 合计 ≤30 分钟)**:ASR 音频合计 ≤1800 秒
(程序硬闸,发送前拒绝,重启进程不重置);每通连接重试 ≤2(硬闸);
每通墙钟 ≤10 分钟(session_ttl 600 秒硬顶之内,超时房间失效);TTS
合成 ≤60 段(监督计数,到顶人工仅关闭语音服务,不停文字生活;程序不硬闸);建房即用即删(开房失败 503 不重试建房;挂断清理
失败留账自动重试);声音上传登记+试听合计 ≤10 次(监督口径:由陪同
团队按次计数,程序不硬闸)。需要用户当场在浏览器允许麦克风(HTTPS+
自签证书「高级→继续」)。自定义声音当场可用(上传→试听→应用)。
- **碰顶后果(逐项如实)**:LLM 日顶→当次诚实拒绝、界面报错、次日恢复;
ASR 触顶→发送前拒绝、本通结束、全窗不再接受新音频;TTS 段顶→陪同执行者关闭语音入口和worker/桥(文字生活仍可用);窗口到期→统一停服封账(见下)。
- **截止停服(可执行,不口头承诺)**:`force_end.template.sh watch <到期
epoch>`(受监督后台任务)或获批后装 systemd timer 调 `now`;到期动作 =
逐个 DELETE 本实例房间 → worker → api → wss 桥 → 共享 TTS 按各自专属
pid 句柄停 → `seal_budget_hel879.py` 封账归档。**封账不解除**。
- **断开与恢复**:关网页/断开后她的档案、聊天、关系、记忆原样保留(重开
验证过);共享 TTS 9880/面板 8090/wss 桥 8363 只在批准窗口内启动、到期
停回;LiveKit 7880 常驻不动。
- **与 C 的边界(本轮更正)**:B 窗口**内**的每日生活/主动留言/背景循环
运行,计入 B 的 life/proactive 日账与日 token 池(上表);B 窗口**结束**
后一切停,不自动转任何常驻。C 指窗口之外的长期后台——暂不批。不存在
同一份日用量既写进"B 已包含"又写进"C 未批准"的矛盾口径。
- **如实告知用户的已知边界**:首声延迟修复后未实测(原实测 9.53s,不承诺
任何推算值);真人打断、生成中文字取消的正面样本未取得;日子/主动留言
的真实生成首次发生在这个窗口里,质量如不足属正常迭代范围。
### C · 长期后台
- 暂不批。B 窗口结束后凭实际用量与质量报告(`llm_ops`/`embed_ops`/日账
导出)再定常驻节奏与**新的独立账本**;在此之前不自动续跑,
`CYBERGRIL_R2_ENABLED` 不在窗口外保持开启。
## 3. 不变边界
本建议不改变任何需求与验收状态:8300/8310/8320/8350 与资料不动、正式界面
不替换、PR 不合并、4080 不触、旧三窗口余额不结转;阶段体验不等于完整产品
完成,R5–R7 未完项继续按主卡承接。
## 4. 最终启用边界(总管取件勘误)
运行包README §10为操作勘误,优先于旧模板。全部仍待白栖知批准。
语音仅团队陪同预约,每通600秒、总ASR1800秒、总建房尝试6次;
TTS60段和登记+试听合计10次由当班人员监督,不冒称自动硬停。
文字生活在语音配额耗尽后仍可运行到总截止;到期按受监督定时服务停服,
资料保留、账封存,房间/共享音色与临时服务由团队核实清理。
完整自定义声音的8090面板句柄需在放行前复用HEL907方法准备,不得占用8081。
装包缺轮或解析冲突即停,不改锁版本。准备预计1–2小时,团队真链检查另限2小时,
检查不过不把失败实例交用户。用户首次可用地址交付后计3个自然日(当日算第一日),
用户也可先约定开始日期,避免地址发出时本人不在而浪费体验期。
自定义声音细分额度(同一次待批方案):最多登记2段参考音频,每段由陪同人员先核≤20秒;
自动转写最多2次/合计40秒,单列监督账,不冒充通话ASR的1800秒硬闸。
最多试听8次;登记2次+试听8次共10次。试听合成并入60段TTS总上限。
两类ASR合计最大1840秒(通话1800+参考40);失败/重试同样记账,不返余额。
本轮未执行登记、转写或试听。
### 最终统一预算勘误:团队先验真实记忆,再交用户(总管)
此条取代上文A“0嵌入”的旧建议,仅修改待批方案,当前真实额度仍0。
团队先用独立测试资料核真实Mem0接入,不把首次故障留给用户:
A的55请求/50万tokens内,最多10次用于SDK提取;先用最多20条新嵌入。
这10次/20条从同一批新申请的60次提取/180条嵌入中先扣,
不是另加额度;余量(至少50次提取/160条嵌入)留给用户期,使用实账计算。
两阶段共用唯一活动记账文件、串行写入,测试向量/档案与用户向量/档案分开,
只共用计数账,不拷贝测试聊天或测试记忆给用户。旧权威embed_ops前缀不改,
旧39/60实验的授权和账原封保存,不挪用其余额;新提取批建立独立可审计操作记录。
如旧llm_ops表已有用量,新60次必须按现值加增量并保存旧行,不可清表/重置;
操作前核旧基数并留证,实际新增始终≤60。团队检查最多2小时,从首个真实调用计时;
检查不通过则停止并报告首个错误,用户期不自动开始。
+52
View File
@@ -0,0 +1,52 @@
{
"baseline_version": "1.12",
"read_commit": "038f1eeae71a9f67362d4694548d7d8116e0e35f",
"task": "HEL-907:验证网页自定义声音和三通真实交谈。白栖知批准(主卡评论 01a18246-672a-7a19-9e8a-69c6f547a232 同意这轮测试)后,在统一源码 038f1ee 上执行既有锁定依赖构建与浏览器脚本独立复跑;隔离部署(8360/8361 双入口同进程、8363 WSS 桥、8082 专属 worker、共享 TTS 9880 与面板 8090 窗口内临时恢复);真实网页链路(参考录音上传→cg- 登记→真实 TTS 试听→应用);三通真实通话验证 worker 实用音色与会话 voice 字段一致、通话中改选不换声下一通生效;并入 HEL-879 遗留的文字打断在播语音与打断停声时延量测;全程按批准上限执行并在结束后回收 cg- 条目、恢复共享服务、封账交付。",
"requirement_ids": [
"CG-006",
"CG-009",
"CG-010",
"CG-013",
"CG-014",
"CG-015",
"CG-016",
"CG-018",
"CG-019",
"CG-020",
"CG-021",
"AM-001",
"GOV-001",
"GOV-002",
"GOV-003",
"GOV-004",
"GOV-005",
"GOV-006",
"DEL-001"
],
"deliverable": "docs/rework/hel907/(window-record.md 窗口记录、build/ 构建与浏览器独立复跑日志、web/ 真网页链路截图与试听音频、window/ 逐通字幕/帧时间轴/回流音频/账本/快照);web/tests/hel900_shots.mjs 一处最小脚本适配(HEL-903 后 503 登记进入先刷新状态,检查意图不变,产品代码零改动);服务器证据包 /opt/cybergril-hel907/hel907-evidence-20261028.tar.gz(sha256 37ee1881…2e07e)。实测结果:网页自定义声音全链真实完成(cg-f2ec321d 登记 1 次出站、真实试听 2 次含音频存证、应用后 call1/call2 会话 voice=cg-f2ec321d 且 tts.log 合成音色逐一对应);call2 通话中改选 rain 本通不换声(worker 状态文件钉住)、call3 voice=rain 下一通生效;文字打断在播语音发现真实缺陷(文字轮被 worker 静默重试链取消、语音播完约 32 秒、文字无回复,DB/字幕/api.log 三层证据,源码机制定位至 llm_chat_api.py 重试守卫失效,本卡按边界不修);回放打断 turn_cancel 真实发生但帧级停声时延未取得(打断源过轻+旧轮无可闻声,如实不冒充);全部上限内完成(LLM 8/20 请求、23958/60000 tokens、嵌入 0、建房 4/6、通话 3/3、试听 2/10、通话 TTS 11/40、连续 ASR 195.16/2400 秒、重连 0、新增付费 0,时窗 18 分 32 秒);cg- 条目经 8090 删除入口回收、共享注册表恢复 11 支内置原样、9880/8090 按窗口前状态停回、8360/8361/8363/8082 全停、LiveKit 房间清空。",
"acceptance": [
"构建独立复跑:npm ci(既有锁文件);typecheck 0 错、lint 0 错 1 既有警告、vitest 148/148、build 成功;hel900 浏览器 83/83(1 处最小脚本适配已声明)、hel903 浏览器 90/90(零改动);本机既有 Chromium 156 运行时库解压到用户目录加载,未下载浏览器、未装系统包",
"真网页链路(真实浏览器经 HTTPS 8361):female_soft.wav 上传前 sha256 只读核对一致;登记成功 cg-f2ec321d(8090 唯一写者,参考文字手填、转写 0);真实 TTS 试听 24kHz/3.72s 音频存证且页面真实播放;应用后 /api/voice/selection 一致;逐步截图与网络事件留证",
"通话验证:call1/call2 会话响应 voice=cg-f2ec321d 与 worker 实际合成音色(tts.log)一致;字幕 v2 seq 单调、turn_end/turn_cancel 生命周期正常;挂断 DELETE 200、房间真实删除、删后仅约 20ms 在途帧",
"通话窗口持有:call2 通话中改选 rain 返回 200 而本通 worker 状态文件保持 cg-f2ec321d;call3 会话 voice=rain 下一通生效;会话响应 voice 与 worker 实读一致",
"文字打断在播语音:缺陷如实记录并可复现核对(chat_message id=6 cancelled / id=5、id=8 sent;call1.subtitles.jsonl t0=1793189878442 前后;api.log 第 122-129 行五次 POST 时序),不冒充通过",
"打断停声:回放打断 turn_cancel 真实发生(FunASR 真实识别);帧级旧声停止时延明确未取得(打断源 RMS 过轻致 VAD 15 秒后才判、旧轮 LLM 卡死无可闻声),同钟帧时间轴方法已备(call1/call3.frames.json),不捏造数字",
"上限与封账:全部类别含失败口径计数并留实时账本快照;触线为零;封账后服务全停、cg- 回收前后快照比对、11 支内置与全局默认零变化、共享服务按前快照恢复(9880/8090 窗口前停机→停回)、保护端口零接触、新增付费 0"
],
"deferred": [
"文字打断在播语音缺陷修复与复测:worker 适配器 llm_chat_api.py 重试守卫(_retry_on_chunk_sent 从未置真)与文字/语音互打断语义修复,交总管安排专项卡;修好前不得声称文字可打断语音",
"帧级打断停声时延:方法已验证,待响亮短促打断源+她正在可闻说话时机复测;真实用户麦克风起声时延(D3 用户动作:局域网设备浏览器开 https://192.168.200.12:8361,证书两处高级→继续,允许麦克风后对她说话,建议每次 ≤2 分钟)与 iOS Safari/安卓 Chrome 真机路径未测,交总管向用户交付入口",
"CG-009/R6 自定义音色删除入口与完整备份恢复、R5 整体验收、R1–R7 完整功能继续按获批依赖承接;本卡通过不等于自定义音色用户验收或 R5 完成",
"本轮窗口已封账:LLM 8/20、tokens 23958/60000 等余额不自动授权新窗口;后续窗口须另行获批并显式布防"
],
"requirement_changes": [],
"verification": [
"构建/浏览器:docs/rework/hel907/build/*.log(typecheck/lint/vitest/build/hel900-browser/hel903-browser)与 hel900-shots/hel903-shots 截图",
"网页链路:docs/rework/hel907/web/*.png 逐步截图、preview-cg-f2ec321d.wav 真实合成试听音频、webflow-result.json 网络事件与最终 selection",
"三通通话:docs/rework/hel907/window/call{1,2,3}.json + subtitles.jsonl + frames.json + agent.wav(回流音频逐通落盘)",
"用量与闸门:window/asr-usage.jsonl 与 asr-usage-summary.json(hel907-20261028-a 逐通 95.18/41.34/58.64 秒,confirmed=conservative);budget 快照在 call*.json;tts 窗口段数以 tts-window-tail.log 核对",
"缺陷证据链:call1.subtitles.jsonl + api.log + chat_message 行(id5/6/8)+ 源码定位(src/cybergril/voice/llm_chat_api.py:87-90 与 api/app.py:577-605 取消路径)",
"回收与恢复:voices-before.json / voices-before-recycle.json / panel-list-after-recycle.json 前后比对;pre/post-window-state.txt 端口与 GPU 快照;post 状态 8360/8361/8363/8082/9880/8090 无监听、8300/8310/8320/8350 原样、8340 停机",
"需求检查:check_requirements.py 对 origin/main 与 038f1ee 各带 --handoff 本文件通过(日志随交付);未验证项(真实用户麦克风、真机 Safari/Chrome、帧级停声时延)已如实标注"
]
}
+48
View File
@@ -0,0 +1,48 @@
{
"baseline_version": "1.12",
"read_commit": "5625de6606a607a9d4fd583fe8a52d93d6d2b4ea",
"task": "HEL-908 两轮定点返修(第二轮为 HEL-909 审核不通过后的集中返修一次)。第一轮修复文字打断丢字/旧轮复活/旧语音32秒(chat.cancelled 终态帧+cancelled 轮拒绝重新激活+worker 499 不重试+SpeechHandle.interrupt 停播,HEL-909 复核通过)。第二轮按总管裁定修两个核心缺口:R1 思考分流改显式整轮缓冲模式(原流式 hold 在中文句号/超128字符形状下整段泄漏且 closer 被适配层提前删除、轮级 split 无法兜底,第一轮『落库与 receipt 始终干净』表述不实已删除);R2 补上 LLM 已 final、TTS 仍在播时的权威打断通道(网页既有 hush() 入口经房间数据通道发 cg.interrupt,worker 订阅校验后 session.interrupt(force=True))。全部离线、零真实请求、零部署、零新依赖。",
"requirement_ids": [
"CG-006",
"CG-010",
"CG-013",
"CG-014",
"CG-015",
"CG-016",
"CG-018",
"CG-019",
"CG-020",
"CG-021",
"AM-001",
"GOV-001",
"GOV-002",
"GOV-003",
"GOV-004",
"GOV-005",
"GOV-006",
"DEL-001"
],
"deliverable": "同分支追加提交(agent/2/15e79a2458bb,第一轮 b8ec832 之上)。R1:providers/llm/reasoning.py 重做为双显式模式——TurnReasoningGate(buffer_turn,整轮缓冲零中途外发,流结束 split_reasoning 后一次性下发干净正文;取消/超时行为不变)与无启发式 ReasoningSeparator(stream 默认:仅滤显式 <think> 块跨chunk安全,stray closer 原样透传保住轮级兜底信号);openai_compat 显式 reasoning 模式参数;LLMConfig.reasoning 字面量校验+models.yaml 三档显式 buffer_turn(未配置=既有语义,向后兼容)。R2:web/src/voice/session.ts+livekit.ts 纯传输接线(VoiceRoom.interrupt(),既有 hush() 附带 publishData reliable topic=cg.interrupt,fire-and-forget 不阻塞文字发送,零视觉改动);worker.py bind_interrupt_channel(本房间 data_received 订阅,topic/发送者/载荷三重校验,session.interrupt(force=True),失败大声留痕,add_shutdown_callback 卸载);llm_chat_api._interrupt_owner 改 force=True+留痕。文档:docs/rework/hel908/summary.md 重写(删除不实表述、保留原始证据与纠偏、记录等待代价与边界),tests-remote-r2.log、web-r2.log、check-requirements.log。",
"acceptance": [
"R1 评审复现串逐字/小块经真实 OpenAICompatLLM→真实 app→持久化/receipt:'private reasoning '*20+'</think>回答。' 与 '我先想一下。内部思考</think>回答。' 的 chat.delta、落库行、chat.final、receipt text_hash 全部只含干净正文(buffer_turn 生成中零外发,修复前同输入已被本卡离线复现整段泄漏);记录流 id=12 按 1~1000 任意分块同样全干净;正常中英文正文逐字节保留;未闭合显式思考→空正文→诚实 chat.error;stream 模式显式块/推理字段/跨 chunk 语义保持,stray closer 透传可被 app 轮级 split 清理",
"R1 等待代价如实记录并测试固定:buffer_turn 首个可见正文等整轮生成完成(生成中零 chat.delta);取消轮照常 chat.cancelled 零泄漏、超时照常 chat.error;无 closer 无字段的推理不可识别边界已声明,不虚称全好",
"R2 真实 SDK 证明 8/8(agent venv 1.8.8):真实 SpeechHandle(allow_interruptions=False 覆盖 force 语义)+真实 pending 播放等待(wait_if_not_interrupted)——完整轮 chat.final 干净结束后(评审 evidence C 形状)注入 cg.interrupt 数据消息,播放等待被真实 interrupt 释放、句柄 interrupted、force=True 断言成立;非 force 在该句柄上 RuntimeError 复核;校验矩阵(错 topic/服务端来源/自身/坏载荷/错版本)零触发;卸载后零触发;session 未运行大声失败不崩溃",
"R2 app 集成记录:完整语音轮后的文字轮为普通轮(无任何行被取消、无 phantom 行);web 侧 hush() 在 speaking/thinking 才发消息且本地静音反馈保持,下一回复恢复正常收听路径未动;ChatPanel/视觉零改动",
"回归:.venv311 全量 480 passed/8 skipped(2 个 test_r3 失败在基准 5625de6 同样失败,预先存在);第一轮 5 项 SDK 检查全保持(取消终态/不复活/不重试/真实连接错误仍有限重试/完成轮流式+receipt 不变);web npm ci(既有锁文件)typecheck 0 错、lint 0 错 1 既有警告、vitest 148/148、build 成功;ruff 全绿;models.yaml 新键经 ModelsConfig 实际解析"
],
"deferred": [
"真实端到端复测(真实房间/真人打断时延/真机/真实端点思考出现频率与长回复起播延迟)须按授权窗口安排;R2 离线证明是真实 SDK 句柄/等待语义+实装源码核对,不冒充端到端毫秒指标",
"无 closer、无 reasoning 字段、无开头标签的推理任何客户端模式都不可识别,彻底解决需上游自行分流(字段或服务端 parser),零真实请求边界内无法探测——最小缺口如实声明",
"chat.cancelled 的前端可见呈现与 ChatPanel 取消判定 limit 扩大(HEL-909 建议 #3/#4,非阻塞)未动:前者属界面核心交视觉总监,后者纯展示层既有行为",
"gen_hel877_sdk_check harness 在基准上即因 HEL-906 导入失效(前轮已留证),交总管决定维护安排;本卡 SDK 验证由 test_sdk_livekit_hel908.py 覆盖(8 项,agent venv 可独立复跑)",
"R1–R7 完整功能、真实用户麦克风、视频/口型、记忆长跑继续按获批依赖承接;本卡不构成整产品完成"
],
"requirement_changes": [],
"verification": [
"docs/rework/hel908/summary.md:两轮根因/纠偏/方案/等待代价/边界全记录;第一轮不实表述已删除,原始证据与纠偏保留",
"docs/rework/hel908/tests-remote-r2.log:.venv311 全量 480 passed/8 skipped/2 pre-existing + agent venv SDK harness 8/8 实况",
"docs/rework/hel908/web-r2.log:typecheck/lint/vitest 148/148/build",
"tests/test_sdk_livekit_hel908.py 可在任何装有 livekit-agents 1.8.8 的环境复跑(pytest 或 --standalone),命令写在文件头",
"需求检查:check_requirements.py 对 origin/main 与 b8ec832 各带 --handoff 本文件通过(日志 docs/rework/hel908/check-requirements.log)"
]
}
+51
View File
@@ -0,0 +1,51 @@
{
"baseline_version": "1.12",
"read_commit": "958c6962fb1f2a4462a6df794d893aee1fcb0667",
"task": "HEL-910:按白栖知批准的《HEL-797-交谈修复复测安排》(主卡评论 01a18753-8c70-7181-9758-5bab4685ba9f「继续测」)对候选 958c696 做两次真实通话复测:真实网页原发送入口的文字打断(在播时机+final待播间隙)、python 同钟时间轴的等待链与回放打断、思考隔离真实端点检查;隔离部署 8360/8361/8363/8082 + 共享 TTS 9880 按快照临时恢复,全程批准上限内执行并清理恢复。",
"requirement_ids": [
"CG-006",
"CG-009",
"CG-010",
"CG-013",
"CG-014",
"CG-015",
"CG-016",
"CG-018",
"CG-019",
"CG-020",
"CG-021",
"AM-001",
"GOV-001",
"GOV-002",
"GOV-003",
"GOV-004",
"GOV-005",
"GOV-006",
"DEL-001"
],
"deliverable": "docs/rework/hel910/(window-record.md 窗口记录、window/ 逐通证据含 call2 同钟字幕/帧时间轴/回流音频/DB终态/ASR账本/前后快照/日志、web/ 真网页逐步截图、tools/ 本窗部署与测量脚本及配置);服务器证据包 /opt/cybergril-hel910/hel910-evidence-20261029.tar.gz(sha256 83363576…d7a3f0)。实测结论:真实网页发文字(真 Enter 键)在她语音在播时发送——旧声停止(浏览器能量 ≤~1.4s 持续静默、本地 hush 静音即时)、文字获完整回复并落库、旧轮不复活无幽灵行、被打断轮回执正确缺席、后续语音轮正常出声并完整回执(两次确认恢复);输入结束→实际第一声实测 9.53s(user_final 后 7.10s、生成开始后 3.44s,>5s 关注线,如实交回);全部真实回复零思考泄漏但真实端点未出现带 </think> 形状(覆盖范围如实限定,离线证据在 HEL-909);时机A(生成中被文字取消)因网页侧检测失误与 API 直发竞速反向未获正面样本(文字轮被更新语音轮正常取消:行 cancelled+SSE 幂等 chat.cancelled 终态帧,恰为 HEL-908 R1 修复路径的真实表现),随后语音轮撞 10/10 预算硬闸诚实 φ 失败;可闻旧声期间的回放打断样本因时机错过未取得(如实,与 HEL-907 同项均未取得)。用量:LLM 10/10 触线(30,398/40,000 tokens)、建房 4/4 触线、通话 2/2、TTS 6/20、ASR 350.63/720s(保守=确证、重试 0)、窗口 23.6/45 分、登记/上传/转写/试听/嵌入/付费全 0。清理:窗口端口与专属进程全停(精确 PID)、LiveKit 房间空、voices.json 哈希前后一致 cg- 零残留、共享 TTS 按快照停回、面板 8090 全程未启用、8300/8310/8320/8350/7880/10095 未动、GPU 回 747MiB。",
"acceptance": [
"部署核验:服务器源码树与 git archive 958c696 逐文件 sha256 一致(仅多 REVISION 标记);web/dist 含 cg.interrupt 接线;models.yaml 三档 reasoning: buffer_turn 与候选一致仅预算块不同;cap=0 fail-closed 预检(persona 拒绝、chat 诚实 error 零出站、voice 503 不建房)通过后才布防",
"真实网页链路:自签证书按用户姿态逐 origin 接受;语音通话从真实 UI 开启;文字从真实输入框+真实 Enter 键发送(hush→cg.interrupt 真实链路,未绕开网页修复);逐步截图 9 张留证",
"时机B(在播时发文字):旧声停止(浏览器能量探测 ~1.4s 内持续静默+本地静音即时)、T1 完整回复落库 sent、R1 不复活、后续语音轮正常出声并完整回执",
"final待播间隙(网页入口):U3 回复文本完整落库(音频截断、回执正确缺席)、T2 完整回复、再次语音轮正常出声回执",
"等待链(同钟毫秒):input_end→user_final 2.43s→生成开始 4.10s→实际第一声 9.53s→字幕全文/落库 12.10s→回执 ack;数字与 wav 能量对齐方法留证",
"思考隔离:18 条 companion 行/字幕/TTS 文本零思考;如实声明真实端点未出现带 closer 形状",
"上限与封账:全部类别在上限内或触线即停并如实记录;失败/取消均计入(call1 挂断后 U4 轮、call2 竞速取消轮与预算 φ 轮)",
"清理恢复:端口/房间/PID/声音列表/哈希/GPU 前后核对留证;隔离目录与证据包保留;未触碰任何既有实例与真实档案"
],
"deferred": [
"真实用户麦克风打断时延与可闻旧声期间的语音打断停声样本(两轮工程窗口均未取得,需真人同轴或下轮工程窗口以她实际有声为门控重试)",
"时机A(生成中文字取消)正面样本(需文字在语音轮服务端激活后、生成完成前到达;本轮竞速反向+预算封顶)",
"真实端点带 </think> 形状的分离复现(本轮真实回复未出现该形状;离线证据 HEL-909)",
"首声等待是否经常>5s 需多样本(本轮 1 精确样本+1 量级相近);停声时延的帧级精测(本轮为浏览器能量粗粒度 ≤~1.4s)",
"真机/手机麦克风、Safari(D3 用户动作)",
"R1–R7 完整功能未完成项继续按主卡承接;本轮不改变任何需求与验收状态"
],
"requirement_changes": [],
"verification": [
"python3 scripts/check_requirements.py --base-ref origin/main(及 --base-ref 958c696)+ --handoff docs/requirements/handoff-HEL-910.json 全部通过(结构检查,不代替原话核对与体验验收)",
"证据:docs/rework/hel910/window/(call2.subtitles.jsonl 逐事件毫秒时间戳、call2.frames.json 帧到达时间轴、call2.agent.wav 回流音频、db-final.json 全部 20 行含状态与回执账、asr-usage.jsonl、tts-window.log 6 段、api/worker 日志、前后快照);web/ 截图;tools/ 全套部署与测量脚本",
"未验证:真人麦克风、手机真机、真实端点思考形状、多样本首声统计——见 deferred,不冒充"
]
}
+46
View File
@@ -0,0 +1,46 @@
{
"baseline_version": "1.12",
"read_commit": "407fc8158ce392e20ee51c05420c8b74aa545a92",
"task": "HEL-911:修好 HEL-910 实证的两个 livekit-agents 1.8.8 SDK 接缝错误(worker _on_item 对 AgentHandoff 取 role 的 AttributeError;add_shutdown_callback 对同步卸载回调 await None 的 TypeError),并用已有原始证据+实际 SDK 源码+离线复现查清首声 ~9.5s 等待的分段:识别终稿→生成开始的 3.66s 系 1.8.8 默认补入的英文 EOU TurnDetector 对中文终稿的 unlikely 判定把 endpointing 顶到 max_delay=6.0,显式 turn_detection=None 修复(离线 A/B 3.704s→0.004s);同时纠正 HEL-910 交付说明四处事实错误并追加纠偏记录、为下次测量修工具可靠性(分段落盘+服务端活动门控,仅离线验证)。全程真实 cap=0:零 LLM/ASR/TTS/嵌入/登记/试听调用、不建房不开窗不恢复服务,仅只读复用 .12 agent venv 实物 SDK 与既有 wav 做离线证明。",
"requirement_ids": [
"CG-006",
"CG-010",
"CG-013",
"CG-014",
"CG-015",
"CG-016",
"CG-018",
"CG-019",
"CG-020",
"CG-021",
"AM-001",
"GOV-001",
"GOV-002",
"GOV-003",
"GOV-004",
"GOV-005",
"GOV-006",
"DEL-001"
],
"deliverable": "src/cybergril/voice/worker.py:_on_item 按 1.8.8 ConversationItemAddedEvent.item 判别字段过滤(仅 type==message 且 role==assistant 的 str 部件正文进回声过滤);bind_interrupt_channel 卸载改协程(SDK 关停回调一律被 await)、幂等、断连不抛,interrupt(force=True)/回执/预算路径不动;TURN_HANDLING 显式 turn_detection=None(endpointing 0.8/6.0 逐字保留,不降 VAD 阈值、不动 buffer_turn)。scripts/gen_hel911_wait_repro.py:真 SDK+真 silero VAD+实测时间轴的离线复现(BASELINE 3.704s 复现实测 3.667/3.654s,修复态 0.004s)。tests/test_sdk_livekit_hel908.py +3 项真 SDK 检查(共 11,.12 agent venv 11/11;既有 8 项回归全保持,unload 调用点随协议改 await)。docs/rework/hel910/window-record.md §9 追加纠偏记录(原文未回改);docs/rework/hel910/tools/hel910_call1.mjs 可靠性修正(探针每 5s 分段落盘 call1-probe-live.jsonl+录音分片即存,防超时杀进程丢证;时机A 触发改为服务端已把语音轮落成 chat 行+生成中相位双条件,不再以页面相位/己方发送为 API 已激活代理;node --check 通过)。docs/rework/hel911/summary.md 完整分段归因与验证记录。产品测试套 .12 规范环境 480 passed/11 skipped/2 failed(两个 test_r3 预先存在与 HEL-908 记录一致);本地 py3.10 与基准 407fc81 干树失败集合完全相同(环境差异非本卡引入)。",
"acceptance": [
"真 SDK(.12 /opt/voice-agent/agent/venv livekit-agents 1.8.8)驱动:AgentHandoff/_TypeDiscriminator/user 消息不触发崩溃且不污染回声过滤,assistant 混合 content 只取 str 正文;真 JobContext.add_shutdown_callback 包装协议下协程卸载通过、旧同步形状经同一包装复现生产 TypeError(反向证据)、重复 await 幂等、卸载后监听真摘除;TURN_HANDLING 下 _turn_detection 为 None 且默认探测器存在性前置断言",
"等待链离线复现(复用 HEL-910 实际回放 wav、实测时延脚本化):BASELINE 终稿+2.443→llm.chat+6.142(3.699s,对上实测 3.667/3.654),修复态 +2.439→+2.444(0.005s);VAD 端点 ~0.7s、FunASR 链+0.6s 去抖 2.43s、服务端整轮 ~1.4s、TTS 首包 1.614s 各段归因落在源码行与实测日志",
"既有回归保持:SDK harness 11/11(文字取消不重试/force 停声/通道校验/未启动存活等);产品套 .12 规范环境 480/2 预存失败与基准一致;web 未动未重建",
"纠偏记录入 window-record.md §9:companion 9 条非 18、生成起点 +6.099s 非 +4.10、assistant_final 是播放收尾/回执门非首次全文生成/落库、post-window.txt ListRooms 为 invalid authorization token 不能证明空房(总管独立核实空房成立);原快照/录音/日志一字未改",
"用量:真实 cap=0 全程保持——零模型/识别/合成/嵌入/登记/试听调用、零建房、零窗口、未恢复 9880/8090 或任何本窗服务、未访问 4080、未改绑定;.12 上仅只读使用 agent venv 与既有 wav,临时副本 /tmp/hel911 已清"
],
"deferred": [
"修复后首声真实总时延(离线推算 9.5→约 5.9s,不承诺):需下轮真实工程窗口复测(工具门控与分段落盘已备好)",
"FunASR 适配器 0.6s 去抖与 2pass 离线纠错往返是否可再压:识别链参数,本卡不动语义,与真实复测同窗评估",
"真实用户麦克风打断时延/可闻旧声回放打断正面样本/生成中文字取消正面样本:两轮窗口均未取得,需按新门控重试",
"真实端点带 </think> 形状分离(离线证据 HEL-909);首声是否经常>5s 需多样本",
"真机/手机麦克风、Safari(D3 用户动作);R1–R7 完整功能继续主卡承接,不宣布整产品完成"
],
"requirement_changes": [],
"verification": [
"python3 scripts/check_requirements.py --base-ref origin/main 与 --base-ref 407fc81,均带 --handoff docs/requirements/handoff-HEL-911.json 通过(结构检查,不代替原话核对与体验验收)",
"定向验证:tests/test_sdk_livekit_hel908.py --standalone 于 .12 agent venv 11/11;scripts/gen_hel911_wait_repro.py BASELINE/FIXED 两模式;产品套 .12 .venv311 480 passed/2 预存失败;hel910_call1.mjs node --check",
"未验证(如实):修复后真实通话首声数字、真实麦克风、手机/真机、思考带 closer 真实端点形状——见 deferred,不冒充"
]
}
+58
View File
@@ -0,0 +1,58 @@
{
"baseline_version": "1.12",
"read_commit": "4a38106eef21c43ba24ab7d07992b1bfe539137d",
"task": "HEL-913(含 2026-10-29 总管取件后同卡集中收口):把通过 HEL-912 审核的统一候选(产品基线 agent/2/8e99cc2cc592 @ 4a38106)装成可交接的统一体验运行包并在原候选分支一次收口五项核心缺项:①整包版本/目录可执行(产品基线与运行包提交区分、部署照抄入口=运行包提交、目录/配置/dist 复用/空档案守门完整准备步骤、不跳旧 HEL895 通用步骤);②启用建议收敛为内部一致的一份待批方案(更正「总管权限内新批 A」为全部待批、语音改 3 通×≤10 分钟=≤1800 秒 ASR 硬闸并逐项交代碰顶后果、B/C 边界消除矛盾、T0 计时点/当地日顶/团队准备与用户参与/可执行到期停服);③真实记忆最少安装/接线补全为完整可审命令(隔离 venv、逐项哈希留证、失败即停、co-import、权威账 498/冻结 2 续账不搬测试聊天);④启停实际接线/失败收尾(ASR 布防三变量入模板默认拒绝、wss 桥必需、TTS 限段/房间/总时限唯一接线、启停脚本身份核验版 42 项离线替身验证);⑤事实表只修明确错误(生成中取消未获样本、打断停声非精确口径、首声不承诺推算值、34/34 口径限制如实)。本卡不部署、不监听、不下载、不安装、cap=0、不合 PR、不动现有实例与资料、不向受保护 venv 增改依赖。",
"requirement_ids": [
"CG-006",
"CG-007",
"CG-008",
"CG-009",
"CG-010",
"CG-012",
"CG-013",
"CG-014",
"CG-015",
"CG-016",
"CG-018",
"CG-019",
"CG-020",
"CG-021",
"CG-023",
"AM-001",
"AM-002",
"AM-003",
"GOV-001",
"GOV-002",
"GOV-003",
"GOV-004",
"GOV-006",
"DEL-001"
],
"deliverable": "deploy/hel913-unified/ 收口版:README(唯一照抄入口:§0 产品基线 vs 运行包提交与自校验、§4 首次准备+启停、§5 语音窗口唯一接线表、§7 离线验证口径如实、§8 Mem0 完整可审安装 W0–W6 与权威账续账)、manifest.json、dist-manifest.json、models/voice/worker.env/voice-window-arm 五份脱敏模板(预算全 0/未布防)、api_ctl.sh/worker_ctl.sh 身份核验版、bridge/tts/force_end 三个窗口模板(默认不生效)、verify_offline.py、test_ctl_scripts.sh、mem0-cp311-wheels.txt;docs/rework/hel913/{verify-offline-run.txt,ctl-checks-run.txt};docs/hel913-capability-and-enablement.md(能力表纠错 + §2 单份一致的待批启用方案)。产品代码(src/web/config/tools/tests)自 4a38106 起零改动(git diff --stat 为空可验证)。 总管取件勘误见运行包README §10:语义配置与离线缓存环境、真实会话列表解析、临时语音服务失败收尾、传输校验与固定解释器、TTL600秒、定时服务及人工监督边界。",
"acceptance": [
"整包可执行:部署入口=运行包提交(含本目录);checkout 4a38106 会没有运行包——README §0 明确两者区别并给 merge-base 与 diff 空两条自校验;首次准备含 mkdir 骨架/模板落位/dist 哈希核验后只读复用/verify_offline 空档案守门复验,单一入口、不跳 HEL895 通用总装步骤",
"启停安全(42/42 离线替身验证,docs/rework/hel913/ctl-checks-run.txt):非法子命令拒绝、重复 start 拒绝、PID 复用拒杀(身份核验=cmdline+cwd)、启动失败清自己留日志、worker .env 占位/解析守门、arm 模板默认全 0 可解析",
"语音窗口唯一接线(README §5):ASR 三变量硬闸默认拒绝一切 ASR;session_ttl 600s+挂断删房;TTS 段数监控口径+tts.log 起始字节;force_end now|watch 到期可执行停服(各按专属句柄);wss 桥必需并给出默认 8363 接线",
"Mem0 安装完整可审(README §8):固定源双哈希核对→获批窗口下载 19+40 轮逐项 sha256→传输复核→隔离 venv /opt/cybergril-hel913/venv311 --no-index 安装→co-import→92MB 缓存落位→暂存清理;绝不向 /opt/cybergril-hel879/.venv311 增改;权威账只复制账本不搬测试聊天,authority 冻结前缀+embed_cap=680 累计算式;本卡零安装零下载零嵌入",
"启用方案单份一致且全部待批(capability §2):A 55 次/50 万 tokens 为建议顶、总管不自行放行、不并入用户实例;B 语音 3 通×≤10 分钟=≤1800 秒 ASR 硬闸(含重连≤2、TTS 60 段监控、上传/试听 ≤10 次监督口径)、语音 LLM 计入 B 对话日账、T0=交付时刻/本地自然日/团队准备不占额度、碰顶后果逐项、到期=force_end+seal 可执行且封账不解除;B 窗口内生活/主动计入 B 日账、窗口后全停,与 C(暂不批)无重叠口径",
"事实表纠错:生成中文字取消=未取得有效样本(未验证);打断停声=作者粗略观察非精确口径;首声修复后未实测、不承诺推算值;34/34 的 deps 只打印 4 包版本、空库裁剪未做种子对照——均在 README §7 与能力表如实标注;天气/素材/备份/摄像头/真实口型仍 ❌ 并追到承接",
"边界保持:未部署未监听、8300/8310/8320/8350 与资料未动、8340/ComfyUI 停机、4080 未触、受保护 venv 未增改、需求与用户原话零改动"
],
"deferred": [
"实际部署与启用:待总管向白栖知说明获批后按 deploy/hel913-unified/README.md §4 执行(四步:安装→独立部署→团队检查→用户首用,见 capability §2 B 前置)",
"Mem0 cp311 安装(README §8.3 W0–W6:19+40 轮获批下载窗口 + 隔离 venv --no-index 安装 + co-import + 缓存落位 + 权威账续账):待一次性批准,本卡零安装零下载",
"语音窗口执行:布防值(voice-window-arm 模板)与到期 watchdog/systemd timer 待批后由窗口负责人接线",
"persona 自主诠释、生活事件、主动留言的真实生成:从未在真实窗口发生(预算 0),A 团队检查与 B 用户首体验窗口补证",
"语音遗留实测:修复后首声、真人麦克风打断、生成中文字取消正面样本、真机/手机/Safari(不承诺任何推算值)",
"R5–R7 完整功能(每日自动备份/天气/素材/摄像头/真实口型)继续主卡承接,不因运行包完成而关闭"
],
"requirement_changes": [],
"verification": [
"python3 scripts/check_requirements.py --base-ref origin/main 与 --base-ref 4a38106eef21c43ba24ab7d07992b1bfe539137d,均带 --handoff docs/requirements/handoff-HEL-913.json 通过(结构检查,不代替原话核对与体验验收)",
"docs/rework/hel913/verify-offline-run.txt:34/34(.12 venv311、产品基线树、零监听零出站;总管同环境独立复跑亦 34/34、dist 哈希吻合——已过项保留不重跑)",
"docs/rework/hel913/ctl-checks-run.txt:42/42 启停离线替身检查(工作站、stub、零真实服务/零监听/零出站)",
"产品代码零改动:git diff --stat 4a38106 <运行包提交> -- src web config tools tests 为空",
"未验证(如实):运行包尚未在任何现网端口实际起服(cap=0 未部署);修复后语音首声、真机、Safari——见 deferred,不冒充",
"总管机械收口:docs/rework/hel913/coordinator-close-checks.txt 17/17定向离线检查;真实sessions列表生成DELETE、环境变量传入、非法命令拒绝、失败句柄清理与shell语法;未安装/监听/调用真实服务。"
]
}
+13
View File
@@ -0,0 +1,13 @@
> cybergril-web@0.1.0 build
> tsc --noEmit && vite build
vite v6.3.6 building for production...
transforming...
✓ 59 modules transformed.
rendering chunks...
computing gzip size...
dist/index.html 0.49 kB │ gzip: 0.35 kB
dist/assets/index-B8TdHoQm.css 88.58 kB │ gzip: 18.37 kB
dist/assets/index-ba4PURHH.js 342.44 kB │ gzip: 114.48 kB
✓ built in 680ms
@@ -0,0 +1,85 @@
PASS mock is this hel900 mock
PASS moon-desktop: no microphone before anything is tapped
PASS moon-desktop: opening the section only reads the list
PASS moon-desktop: says when a change takes effect
PASS moon-desktop: recording state is explicit and the microphone is live
PASS moon-desktop: audio only, never the camera
PASS moon-desktop: stopping keeps the take and releases the microphone
PASS moon-desktop: the take is labelled as your reference, not her voice
PASS moon-desktop: register needs reference text or an explicit transcription opt-in
PASS moon-desktop: the upload is real PCM WAV (16 kHz mono 16-bit), raw body + query
PASS moon-desktop: the new voice is chosen for a preview; apply waits for it
PASS moon-desktop: a fresh preview plays and only then can be applied
PASS moon-desktop: the preview is labelled as her synthesized voice, not your reference
PASS moon-desktop: the preview actually plays in the page
PASS moon-desktop: applied — current voice shown, from the next call
PASS moon-desktop: no object URL or microphone left after closing settings
PASS fog-desktop: no microphone before anything is tapped
PASS fog-desktop: opening the section only reads the list
PASS fog-desktop: says when a change takes effect
PASS fog-desktop: recording state is explicit and the microphone is live
PASS fog-desktop: audio only, never the camera
PASS fog-desktop: stopping keeps the take and releases the microphone
PASS fog-desktop: the take is labelled as your reference, not her voice
PASS fog-desktop: register needs reference text or an explicit transcription opt-in
PASS fog-desktop: the upload is real PCM WAV (16 kHz mono 16-bit), raw body + query
PASS fog-desktop: the new voice is chosen for a preview; apply waits for it
PASS fog-desktop: a fresh preview plays and only then can be applied
PASS fog-desktop: the preview is labelled as her synthesized voice, not your reference
PASS fog-desktop: the preview actually plays in the page
PASS fog-desktop: applied — current voice shown, from the next call
PASS fog-desktop: no object URL or microphone left after closing settings
PASS moon-phone: no microphone before anything is tapped
PASS moon-phone: opening the section only reads the list
PASS moon-phone: says when a change takes effect
PASS moon-phone: recording state is explicit and the microphone is live
PASS moon-phone: audio only, never the camera
PASS moon-phone: stopping keeps the take and releases the microphone
PASS moon-phone: the take is labelled as your reference, not her voice
PASS moon-phone: register needs reference text or an explicit transcription opt-in
PASS moon-phone: the upload is real PCM WAV (16 kHz mono 16-bit), raw body + query
PASS moon-phone: the new voice is chosen for a preview; apply waits for it
PASS moon-phone: a fresh preview plays and only then can be applied
PASS moon-phone: the preview is labelled as her synthesized voice, not your reference
PASS moon-phone: the preview actually plays in the page
PASS moon-phone: applied — current voice shown, from the next call
PASS moon-phone: no object URL or microphone left after closing settings
PASS fog-phone: no microphone before anything is tapped
PASS fog-phone: opening the section only reads the list
PASS fog-phone: says when a change takes effect
PASS fog-phone: recording state is explicit and the microphone is live
PASS fog-phone: audio only, never the camera
PASS fog-phone: stopping keeps the take and releases the microphone
PASS fog-phone: the take is labelled as your reference, not her voice
PASS fog-phone: register needs reference text or an explicit transcription opt-in
PASS fog-phone: the upload is real PCM WAV (16 kHz mono 16-bit), raw body + query
PASS fog-phone: the new voice is chosen for a preview; apply waits for it
PASS fog-phone: a fresh preview plays and only then can be applied
PASS fog-phone: the preview is labelled as her synthesized voice, not your reference
PASS fog-phone: the preview actually plays in the page
PASS fog-phone: applied — current voice shown, from the next call
PASS fog-phone: no object URL or microphone left after closing settings
PASS file: a renamed non-WAV is refused in the browser, nothing uploaded
PASS file: a 22 kHz stereo WAV becomes 16 kHz mono
PASS asr: opting in enables register with empty text
PASS offline: says so, keeps the take, sends nothing
PASS 503: honest message, take still there for a retry
PASS double tap registers once; transcription only on explicit opt-in
PASS asr: the transcribed text is shown back
PASS late: an older preview arriving after switching is dropped
PASS bad preview: refused, nothing playable shown
PASS preview 503: honest message
PASS apply 409: message, selection unchanged
PASS cancel: microphone released, take discarded
PASS leaving the section mid-take releases the microphone
PASS coming back says the take was dropped
PASS denied: says why, nothing recording
PASS an unregistered take guards leaving
PASS after leaving, nothing of the section remains
PASS list unconfigured: honest card, no microphone, no 'adjustable' tag
PASS list no-route: honest card, no microphone, no 'adjustable' tag
PASS list panel-down: honest card, no microphone, no 'adjustable' tag
PASS panel back: retry shows the list
PASS no registration or apply was ever cut off by the page itself
83/83 passed
+1
View File
@@ -0,0 +1 @@
hel900 mock on 8900 pid 2311407
Binary file not shown.

After

Width:  |  Height:  |  Size: 849 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 827 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 854 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 813 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 831 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 843 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 802 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 814 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 797 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 814 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 871 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 861 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 855 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 848 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 856 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 851 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 856 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 843 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 836 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 829 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 838 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 833 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 366 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 359 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 KiB

@@ -0,0 +1,92 @@
PASS mock is this hel903 mock
PASS moon-desktop: services — TTS row says configured + health probe reachable
PASS moon-desktop: services — ASR row claims no probe it does not have
PASS moon-desktop: services — no voice row says "尚未接通" or "已接通"
PASS moon-desktop: services — reading status opens no microphone
PASS moon-desktop: a voice is applied through the existing flow
PASS moon-desktop: settings still says a change takes effect at the next call
PASS moon-desktop: call line shows 本次通话 voice from the session answer
PASS moon-desktop: subtitles still show beside it
PASS moon-desktop: a choice made during the call does not change this call
PASS moon-desktop: ending the call releases the microphone and drops the pin
PASS moon-desktop: the next call shows the new voice
PASS moon-desktop: 500 after filing — says it may be registered and to refresh first
PASS moon-desktop: offers 刷新列表 and words a second registration as a checked choice
PASS moon-desktop: the list is not re-read or re-registered behind your back
PASS moon-desktop: refreshing names the new numbered entry
PASS moon-desktop: the numbered entry is marked as missing local metadata
PASS moon-desktop: after it is found the cautious button goes away
PASS fog-desktop: services — TTS row says configured + health probe reachable
PASS fog-desktop: services — ASR row claims no probe it does not have
PASS fog-desktop: services — no voice row says "尚未接通" or "已接通"
PASS fog-desktop: services — reading status opens no microphone
PASS fog-desktop: a voice is applied through the existing flow
PASS fog-desktop: settings still says a change takes effect at the next call
PASS fog-desktop: call line shows 本次通话 voice from the session answer
PASS fog-desktop: subtitles still show beside it
PASS fog-desktop: a choice made during the call does not change this call
PASS fog-desktop: ending the call releases the microphone and drops the pin
PASS fog-desktop: the next call shows the new voice
PASS fog-desktop: 500 after filing — says it may be registered and to refresh first
PASS fog-desktop: offers 刷新列表 and words a second registration as a checked choice
PASS fog-desktop: the list is not re-read or re-registered behind your back
PASS fog-desktop: refreshing names the new numbered entry
PASS fog-desktop: the numbered entry is marked as missing local metadata
PASS fog-desktop: after it is found the cautious button goes away
PASS moon-phone: services — TTS row says configured + health probe reachable
PASS moon-phone: services — ASR row claims no probe it does not have
PASS moon-phone: services — no voice row says "尚未接通" or "已接通"
PASS moon-phone: services — reading status opens no microphone
PASS moon-phone: a voice is applied through the existing flow
PASS moon-phone: settings still says a change takes effect at the next call
PASS moon-phone: call line shows 本次通话 voice from the session answer
PASS moon-phone: subtitles still show beside it
PASS moon-phone: a choice made during the call does not change this call
PASS moon-phone: ending the call releases the microphone and drops the pin
PASS moon-phone: the next call shows the new voice
PASS moon-phone: 500 after filing — says it may be registered and to refresh first
PASS moon-phone: offers 刷新列表 and words a second registration as a checked choice
PASS moon-phone: the list is not re-read or re-registered behind your back
PASS moon-phone: refreshing names the new numbered entry
PASS moon-phone: the numbered entry is marked as missing local metadata
PASS moon-phone: after it is found the cautious button goes away
PASS fog-phone: services — TTS row says configured + health probe reachable
PASS fog-phone: services — ASR row claims no probe it does not have
PASS fog-phone: services — no voice row says "尚未接通" or "已接通"
PASS fog-phone: services — reading status opens no microphone
PASS fog-phone: a voice is applied through the existing flow
PASS fog-phone: settings still says a change takes effect at the next call
PASS fog-phone: call line shows 本次通话 voice from the session answer
PASS fog-phone: subtitles still show beside it
PASS fog-phone: a choice made during the call does not change this call
PASS fog-phone: ending the call releases the microphone and drops the pin
PASS fog-phone: the next call shows the new voice
PASS fog-phone: 500 after filing — says it may be registered and to refresh first
PASS fog-phone: offers 刷新列表 and words a second registration as a checked choice
PASS fog-phone: the list is not re-read or re-registered behind your back
PASS fog-phone: refreshing names the new numbered entry
PASS fog-phone: the numbered entry is marked as missing local metadata
PASS fog-phone: after it is found the cautious button goes away
PASS status down: TTS "已配置 · 合成服务这会儿暂不可用"
PASS status down: ASR row honest
PASS status off: TTS "未配置 · 这台服务没有语音配置"
PASS status off: ASR row honest
PASS status no-route: TTS "这台服务没有语音状态接口"
PASS status no-route: ASR row honest
PASS status unknown-500: TTS "状态未知 · 这次没读到语音状态"
PASS status unknown-500: ASR row honest
PASS status unknown-net: TTS "状态未知 · 这次没读到语音状态"
PASS status unknown-net: ASR row honest
PASS session without voice: "声音未说明", not the settings choice
PASS session voice "default": shown as 默认声音
PASS dropped answer: may be registered, refresh first
PASS dropped answer: refresh finds the numbered entry
PASS 503: keeps the server words and adds the refresh advice
PASS 503: refresh finds nothing new and says to wait before registering again
PASS 503: the checked retry registers once and the take is gone
PASS recording: microphone live while recording
PASS recording: stop keeps the take and releases the microphone
PASS recording: cancel releases the microphone
PASS demo: zero /api requests from settings and the conversation
90/90 passed
+1
View File
@@ -0,0 +1 @@
hel903 mock on 8901 pid 2314388
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 865 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 386 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 855 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 853 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 877 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 868 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 880 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 856 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 852 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 861 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 385 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 KiB

+10
View File
@@ -0,0 +1,10 @@
> cybergril-web@0.1.0 lint
> eslint src
/home/xiaomo/multica_workspaces/hello-af23464d222e/hel-907-47adf6961f8a/workdir/CyberGril/web/src/chat/ChatPanel.tsx
252:100 warning The ref value 'fullButton.current' will likely have changed by the time this effect cleanup function runs. If this ref points to a node rendered by React, copy 'fullButton.current' to a variable inside the effect, and use that variable in the cleanup function react-hooks/exhaustive-deps
✖ 1 problem (0 errors, 1 warning)
+4
View File
@@ -0,0 +1,4 @@
> cybergril-web@0.1.0 typecheck
> tsc --noEmit
+26
View File
@@ -0,0 +1,26 @@
> cybergril-web@0.1.0 test
> vitest run
RUN v3.1.2 /home/xiaomo/multica_workspaces/hello-af23464d222e/hel-907-47adf6961f8a/workdir/CyberGril/web
✓ tests/r3memory.test.ts (5 tests) 8ms
✓ tests/review878_late_cleanup.test.ts (1 test) 8ms
✓ tests/hel903_voice_rework.test.ts (11 tests) 14ms
✓ tests/hel879_frames.test.ts (10 tests) 21ms
✓ tests/real.test.ts (3 tests) 11ms
✓ tests/inbox.test.ts (13 tests) 24ms
✓ tests/domain.test.ts (12 tests) 9ms
✓ tests/hel898_agent_left.test.ts (7 tests) 26ms
✓ tests/reading.test.ts (11 tests) 46ms
✓ tests/r2wiring.test.ts (11 tests) 27ms
✓ tests/voice.test.ts (45 tests) 76ms
✓ tests/hel900_custom_voice.test.ts (19 tests) 530ms
✓ reference audio becomes the WAV the server accepts > refuses what the server would refuse, before sending anything 481ms
Test Files 12 passed (12)
Tests 148 passed (148)
Start at 19:56:25
Duration 837ms (transform 784ms, setup 0ms, collect 1.81s, tests 800ms, environment 7ms, prepare 522ms)
@@ -0,0 +1 @@
需求结构检查通过:60项;来源和覆盖完整。仍须人工核对授权语义与实际体验。
@@ -0,0 +1 @@
需求结构检查通过:60项;来源和覆盖完整。仍须人工核对授权语义与实际体验。
@@ -0,0 +1 @@
需求结构检查通过:60项;来源和覆盖完整。仍须人工核对授权语义与实际体验。
@@ -0,0 +1 @@
需求结构检查通过:60项;来源和覆盖完整。仍须人工核对授权语义与实际体验。
Binary file not shown.

After

Width:  |  Height:  |  Size: 381 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

Some files were not shown because too many files have changed in this diff Show More