HEL-879 rework materials: hatchling cache correction with the offline mem0ai wheel actually built from the fixed source (sha256 698284b6..., zero downloads/installs, no 3.10 mixing, recorded in release-artifacts.json), hel895 release doc §0 now separates the historical HEL-895/896 candidate from the current hel-879-assembly candidate and §4/§5 carry the v3 snapshot semantics, budget §6.2.4 amended - a sealed library is never reopened by raising total_requests (contradiction removed), runbook §3.3/3.5/3.6/4.4/4.5 corrected (bounded cleanup ledger replaces the unproven rooms-die-naturally claim; assistant_interim kind; real-but-default-off proactive seam; single-owner dual launcher), one comment-only correction in web/src/voice/session.ts removing the unproven server-auto-cleanup claim (no logic/style change; CSS and JS bundle hashes byte-stable), CG-011 + her incremental subtitles now have a real minimal backend seam (voice/seam.py + worker/llm_chat_api wiring, proactive default off) with the precise frontend interface and acceptance list in docs/rework/hel879/voice-seam-interfaces.md, real-SDK check extended to 10 items (worker callback path on real SpeechHandle/SpeechCreatedEvent; interim seam through real LLMStream) and re-run on .12 ALL PASS, handoff-HEL-879.json appended with the rework scope; regression at this head: pytest 341/341, ruff clean except 1 pre-existing error identical at 7f0a739, web typecheck 0 errors / lint 0 errors 1 pre-existing warning / vitest 88/88 / build passes (CSS index-BpZaybfD.css unchanged), voice chain 8/8, budget split 10/10, release offline R1-R7, http pagination 7/7, real-service browser 9/9 with zero non-loopback outbound, pinned-SDK 16/16+12/12+6/6+7/7+12/12, requirements checks 4/4 (origin/main and c121c42, each with/without handoff)
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
co-authored by
multica-agent
parent
78a5cfd8d7
commit
7c73d392b9
Binary file not shown.
|
Before Width: | Height: | Size: 438 KiB After Width: | Height: | Size: 438 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 441 KiB After Width: | Height: | Size: 441 KiB |
@@ -2,6 +2,7 @@
|
||||
"card": "HEL-879",
|
||||
"generated_by": "release-artifacts inventory (offline, zero downloads)",
|
||||
"release_code_commit": "01ff91985920162cddabc5f190d146d86793627d",
|
||||
"rework_head": "see delivery comment (branch hel-879-assembly, appended after 7f0a739; this inventory refreshed on that head)",
|
||||
"audit_evidence": "docs/rework/hel879/sdk-audit/sdk-audit.json (head c121c42e39174e0f627f129e7f7e5700f33acf26)",
|
||||
"single_install_entry": "deploy/hel895-release-candidate.md #4 (supersedes deploy/hel874-release.md #4)",
|
||||
"fixed_source": {
|
||||
@@ -115,9 +116,28 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
"build_backend_gap": {
|
||||
"build_backend": {
|
||||
"hatchling_cached_or_local": true,
|
||||
"note": "固定源码构建仍缺 hatchling;如实保留,未获批不联网补齐"
|
||||
"hatchling_version": "1.32.4",
|
||||
"hatchling_cache_evidence": [
|
||||
"uv wheels-v6: ~/.cache/uv/wheels-v6/pypi/hatchling/1.32.4-py3-none-any",
|
||||
"uv wheels-v7: ~/.cache/uv/wheels-v7/pypi/hatchling/1.32.4-py3-none-any",
|
||||
"uv archive-v0 unpacked: hatchling-1.32.4.dist-info (wheels-v6 + wheels-v7 linked copies)"
|
||||
],
|
||||
"offline_wheel_built": {
|
||||
"built_at": "2026-10-27T04:10:00Z",
|
||||
"command": "cd <extracted mem0-2c81af3 tarball> && uv build --wheel --offline --python 3.11 -o <out>",
|
||||
"tool": "uv 0.13.5, uv-managed CPython 3.11.16, build backend hatchling from the offline cache only",
|
||||
"source_tarball_sha256": "9dcef9303ebcec116eec6739f01b8b35bd24459de6a569686b4d19b9412dda23",
|
||||
"source_commit": "2c81af3bbe27d9bccb09c772d583df9e9be72ee5",
|
||||
"wheel": "mem0ai-2.2.1-py3-none-any.whl",
|
||||
"wheel_sha256": "698284b6083ab8b7761454d65876a6d1bb983d278ad21a7bee38d760cb20e9db",
|
||||
"wheel_bytes": 352586,
|
||||
"wheel_files": 153,
|
||||
"installed_anywhere": false,
|
||||
"network_used": false,
|
||||
"note": "HEL-879 勘误:v1 清单一面写 hatchling_cached_or_local=true 一面又称本机缺 hatchling,并把 hatchling 列入待下载——总管只读核查指出 uv v6/v7 均有 1.32.4 缓存。已核实并直接完成可离线构建:固定源码 tarball(sha 与 lock 一致)经缓存 hatchling 离线构建出上面这只 wheel,未安装、未联网、未混 3.10 site-packages。待下载清单据此只余 41 项运行闭包(不含 hatchling)。"
|
||||
}
|
||||
},
|
||||
"fastembed_models": {
|
||||
"cache_dir": "/home/xiaomo/multica_workspaces/hello-af23464d222e/hel-857-2cf6dc7dfc87/workdir/hel857-data/fastembed-cache",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"head": "c121c42e39174e0f627f129e7f7e5700f33acf26",
|
||||
"head": "78a5cfd8d75e3cfd00c60dc5c3592eb08cc757a1",
|
||||
"scope": "只读审计:3.10 固定栈安装元数据按 3.11 Linux markers+extras 求闭包,对照产品 3.11 venv 与本机 uv/pip 缓存;这是依赖闭包清单,不是已完成的 cp311 解析或下载结果",
|
||||
"read_only": true,
|
||||
"zero_downloads_this_card": true,
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
# HEL-879 rework: real-SDK check regenerated from THIS head's voice sources
|
||||
# head: 78a5cfd8d75e3cfd00c60dc5c3592eb08cc757a1
|
||||
# run: 2026-10-26T20:16:05Z, .12 /opt/voice-agent/agent/venv/bin/python (livekit-agents 1.8.8), stdin-only, zero writes zero network, no service touched
|
||||
# generator: scripts/gen_hel877_sdk_check.py (10 checks; #9/#10 new: worker callback path on real SpeechHandle/SpeechCreatedEvent; assistant_interim seam through real LLMStream)
|
||||
|
||||
HEL-877/879 real-SDK check on livekit-agents 1.8.8: ALL PASS
|
||||
OK CyberGrillLLM/ChatApiLLMStream subclass real livekit-agents 1.8.8 LLM/LLMStream
|
||||
OK latest_user_text reads a real ChatContext (items/role/text_content)
|
||||
OK fake-SSE turn through real LLMStream emits ChatChunks, final text and receipt
|
||||
OK chat.error phi is spoken verbatim via ChatChunk and carries no receipt
|
||||
OK mint_token claims byte-parity with livekit.api.AccessToken (video/iss/sub/keys)
|
||||
OK mint_server_token matches SDK no-grant auth header claims
|
||||
OK worker.py SDK surface (SpeechHandle, UserInputTranscribedEvent.is_final) present
|
||||
OK barge-in task cancel closes the in-flight HTTP stream immediately
|
||||
OK worker callback path on real SpeechHandle/SpeechCreatedEvent: no-generation handle discards, next turn keeps its own stream (explicit binding)
|
||||
OK assistant_interim seam: SSE deltas through real LLMStream feed her incremental subtitle payloads (replace semantics, reset works)
|
||||
@@ -0,0 +1,80 @@
|
||||
# HEL-879 · 语音接缝接口与验收(交原视觉作者接线;总工不改已认可 web/src 视觉)
|
||||
|
||||
> 背景:总管独立复核指出「CG-011 语音主动开口 no-op、她的增量字幕缺失」是
|
||||
> **实现缺口**,不能归为「等音色/预算就能自动完成」。本文件给出后台已落地的
|
||||
> 最小接缝、前端需要补的**精确接口**与**验收标准**。代码基点:分支
|
||||
> `hel-879-assembly`(见交付评论精确 head);后台实现
|
||||
> `src/cybergril/voice/seam.py` + `worker.py` 接线。
|
||||
|
||||
## A. 她的增量回复字幕(assistant_interim)
|
||||
|
||||
### 现状与缺口
|
||||
- 用户侧 ASR 字幕已齐:`interim`(ASR 草稿)与 `user_final`(纠错终稿)在
|
||||
`web/src/voice/session.ts` 已渲染(现有 `interim` 分支当「听到用户在说」处理,
|
||||
**不能复用来渲染她的回复**——那是另一个语义)。
|
||||
- 缺的是**她**的回复在 TTS 首包前/播放中的增量文字。后台现已补齐:worker 把
|
||||
/api/chat SSE 的每个 delta 累积后发布到同一 `cg.subtitle` 通道。
|
||||
|
||||
### 后台已交付(无需前端改动即生效的数据)
|
||||
- 数据通道:topic `cg.subtitle`(不变)。
|
||||
- 新 kind:`assistant_interim`,`role: "assistant"`,`text` 为**截至当前的完整
|
||||
回复文本**(替换语义,同用户 interim;发布时机=SSE 分片到达,先于/伴随 TTS)。
|
||||
- 既有 kind 不变:`assistant_final`(已落库的完整回复,播放完成且未打断后发)、
|
||||
`error`(φ 原句,未落库)、`interim`/`user_final`(用户侧)。
|
||||
- fail-closed 语义不变:打断/失败/无回执的轮**只有 interim,不会有 final**——
|
||||
前端必须把无 final 收尾的 interim 按「这轮没有成为她的正式回复」处理。
|
||||
|
||||
### 前端需补(原视觉作者;具体视觉由其定)
|
||||
1. `web/src/voice/session.ts` 字幕分支:新增 `assistant_interim` 处理(当前
|
||||
`if (s.kind === 'interim')` 只覆盖用户草稿)。
|
||||
2. 渲染位置/样式:与 `assistant_final` 同一气泡位(建议替换式过渡),与用户
|
||||
`heard` 视觉可区分;**不进入正式聊天记录**(只有 final 落库)。
|
||||
3. 收尾规则:`assistant_final` 到达 → interim 消失、final 生效;`error` 到达 →
|
||||
interim 消失、按现有 error 呈现;被打断(无任何收尾)→ 下一次 interim 或
|
||||
新轮开始时清掉;挂断 → 清掉。
|
||||
|
||||
### 验收(离线可测,无需真实通话)
|
||||
- [ ] 用假 LiveKit/假音频脚本回放 `cg.subtitle` 序列
|
||||
`interim(user) → user_final → assistant_interim("她在") →
|
||||
assistant_interim("她在打字中") → assistant_final("她在打字中。")`,
|
||||
页面按序呈现且 interim 被 final 原子替换。
|
||||
- [ ] 打断负例:`assistant_interim` 后直接新的 `interim(user)`(无 final/error),
|
||||
她的 interim 残影不越过新用户轮。
|
||||
- [ ] φ 负例:`assistant_interim` → `error`,error 文案呈现且不落正式记录。
|
||||
- [ ] 全程零新增权限申请、零非回环出站(沿用 HEL-896 浏览器检查口径)。
|
||||
|
||||
## B. CG-011 语音主动开口(最小接缝,默认关闭)
|
||||
|
||||
### 后台已交付
|
||||
- `worker.py _maybe_open_proactive`(真实代码路径,`CYBERGRIL_PROACTIVE_VOICE=1`
|
||||
才启用;**默认关**,等接线卡与呈现批准):
|
||||
- 数据来源:与文字收件箱同一 `GET /api/messages`(`ChatApiClient.recent_messages`),
|
||||
只选**服务端已落库**(`proactive=1`、`role=companion`、`status=sent`、非空、
|
||||
本房间未念过)的行,最新优先,每会话 ≤1 条(`PROACTIVE_PER_SESSION`)。
|
||||
- 播报:`session.say(text, allow_interruptions=True)`——可被用户打断;
|
||||
无新模型调用、无第二人格、**无第二条回执通道**(文字回执规则独立且已存在)。
|
||||
- 失败 fail-closed:接缝任何异常只记日志跳过,不影响会话开启。
|
||||
- 选择逻辑独立在 `seam.py pick_proactive/pending_proactive`(离线可测,
|
||||
`tests/test_voice_rework_hel879.py` 三例覆盖)。
|
||||
|
||||
### 前端/接线卡需定(原视觉作者 + 总管,经用户批准后启用)
|
||||
1. 入口呈现:她主动开口时页面如何呈现(字幕走 `assistant_final` 同位?
|
||||
是否复用留言卡「回她」入口语义?未读标记如何联动——**worker 不代标已读**,
|
||||
阅读态仍归页面)。
|
||||
2. 节奏:会话开启后何时念(现在=开启即查一次、每会话最多一条);是否需要在
|
||||
会话中轮询新 proactive(后续卡,不默记完成)。
|
||||
3. 打断呈现:用户开口打断她的主动播报时,字幕按打断负例处理(无 final 收尾)。
|
||||
|
||||
### 验收(启用后)
|
||||
- [ ] 预置一条落库 proactive 行 → 开语音会话 → 她原文念出该行(与文字收件箱
|
||||
同一行、一字不差),字幕按定稿呈现。
|
||||
- [ ] 播报中用户开口 → 立即被打断、无残音;该行不被标记已读(除非用户在页面
|
||||
读它)、无回执伪造。
|
||||
- [ ] 无 proactive 行 → 会话正常开启,静默。
|
||||
- [ ] API 不可达 → 接缝跳过,语音会话不受影响。
|
||||
|
||||
## 边界
|
||||
- 本文件只交接口与验收;**总工未改任何已认可 web/src 视觉**(本卡 web/src 仅
|
||||
勘正 session.ts 一处无证据注释,无逻辑/样式改动,diff 见交付评论)。
|
||||
- R5 真机验收(≥3 轮、1 秒打断、停麦无残音、可信 HTTPS/WSS、D1 音色、有限
|
||||
预算)仍待主卡集中批准,接缝通过≠R5 完成。
|
||||
@@ -37,5 +37,5 @@
|
||||
}
|
||||
],
|
||||
"failures": [],
|
||||
"service_stderr_tail": "INFO: Started server process [1535952]\nINFO: Waiting for application startup.\nINFO: Application startup complete.\nINFO: Uvicorn running on http://127.0.0.1:8395 (Press CTRL+C to quit)\nINFO: Shutting down\nINFO: Waiting for application shutdown.\nINFO: Application shutdown complete.\nINFO: Finished server process [1535952]\n"
|
||||
"service_stderr_tail": "INFO: Started server process [1595966]\nINFO: Waiting for application startup.\nINFO: Application startup complete.\nINFO: Uvicorn running on http://127.0.0.1:8395 (Press CTRL+C to quit)\nINFO: Shutting down\nINFO: Waiting for application shutdown.\nINFO: Application shutdown complete.\nINFO: Finished server process [1595966]\n"
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"head": "7f66015ac854b7f513a35a42b680a143058561bb",
|
||||
"head": "78a5cfd8d75e3cfd00c60dc5c3592eb08cc757a1",
|
||||
"no_provider_calls": true,
|
||||
"temp_only": true,
|
||||
"scenes": {
|
||||
@@ -65,12 +65,12 @@
|
||||
"marker": {
|
||||
"requests": 51,
|
||||
"tokens": 510,
|
||||
"sealed_at": 1793043424
|
||||
"sealed_at": 1793045944
|
||||
},
|
||||
"next_after_seal": "budget_sealed:51/55(封账于 1793043424,真实用量保留,不伪造、不清零)",
|
||||
"other_scene_after_seal": "budget_sealed:51/55(封账于 1793043424,真实用量保留,不伪造、不清零)",
|
||||
"after_restart": "budget_sealed:51/55(封账于 1793043424,真实用量保留,不伪造、不清零)",
|
||||
"after_archive_restore": "budget_sealed:51/55(封账于 1793043424,真实用量保留,不伪造、不清零)",
|
||||
"next_after_seal": "budget_sealed:51/55(封账于 1793045944,真实用量保留,不伪造、不清零)",
|
||||
"other_scene_after_seal": "budget_sealed:51/55(封账于 1793045944,真实用量保留,不伪造、不清零)",
|
||||
"after_restart": "budget_sealed:51/55(封账于 1793045944,真实用量保留,不伪造、不清零)",
|
||||
"after_archive_restore": "budget_sealed:51/55(封账于 1793045944,真实用量保留,不伪造、不清零)",
|
||||
"idempotent_reseal": true
|
||||
},
|
||||
"S3_user_instance": {
|
||||
@@ -120,12 +120,12 @@
|
||||
{
|
||||
"name": "S6a_early_finish_51_seals_real_usage_no_fake_no_zero",
|
||||
"ok": true,
|
||||
"detail": "used=51 dialogue_next=budget_sealed:51/55(封账于 1793043424,真实用量保留,不伪造、不清零) semantic_next=budget_sealed:51/55(封账于 1793043424,真实用量保留,不伪造、不清零) after=51 dialogue_daily=19/60"
|
||||
"detail": "used=51 dialogue_next=budget_sealed:51/55(封账于 1793045944,真实用量保留,不伪造、不清零) semantic_next=budget_sealed:51/55(封账于 1793045944,真实用量保留,不伪造、不清零) after=51 dialogue_daily=19/60"
|
||||
},
|
||||
{
|
||||
"name": "S6b_seal_survives_restart_and_archive_restore",
|
||||
"ok": true,
|
||||
"detail": "restart=budget_sealed:51/55(封账于 1793043424,真实用量保留,不伪造、不清零) archive=budget_sealed:51/55(封账于 1793043424,真实用量保留,不伪造、不清零) arch_used=51 marker={'requests': 51, 'tokens': 510, 'sealed_at': 1793043424}"
|
||||
"detail": "restart=budget_sealed:51/55(封账于 1793045944,真实用量保留,不伪造、不清零) archive=budget_sealed:51/55(封账于 1793045944,真实用量保留,不伪造、不清零) arch_used=51 marker={'requests': 51, 'tokens': 510, 'sealed_at': 1793045944}"
|
||||
},
|
||||
{
|
||||
"name": "S3_user_instance_B_and_C_unblocked_after_A",
|
||||
|
||||
Reference in New Issue
Block a user