vod-devkit 0.2.3 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +64 -0
- package/bin/vod-devkit +177 -11
- package/contract/tools.schema.json +120 -4
- package/package.json +1 -1
- package/plugins/vod-devkit/.codex-plugin/plugin.json +1 -1
- package/plugins/vod-devkit/build-info.json +3 -3
- package/plugins/vod-devkit/skills/vod-feedback-collect/SKILL.md +56 -3
- package/plugins/vod-devkit/vod_mcp/__init__.py +1 -1
- package/plugins/vod-devkit/vod_mcp/packs.py +23 -2
- package/plugins/vod-devkit/vod_mcp/tools.py +192 -5
- package/skills/vod-feedback-collect/SKILL.md +56 -3
- package/vod_mcp/__init__.py +1 -1
- package/vod_mcp/packs.py +23 -2
- package/vod_mcp/tools.py +192 -5
package/CHANGELOG.md
CHANGED
|
@@ -162,3 +162,67 @@
|
|
|
162
162
|
- bb312e3 test: golden status 重录版本号 0.2.1→0.2.2(v0.2.2 发版漏重录,pre-push 门禁被存量红挡)
|
|
163
163
|
- b111900 fix(D-consent-desc-1): 确认纪律前置进工具描述——opencode 把用户陈述反馈当同意直提单实锤(契约 description 立即调用话术与 confirm 纪律冲突,MCP-only 宿主不加载技能唯描述可依)+dsh 壳同步+回归锁
|
|
164
164
|
|
|
165
|
+
|
|
166
|
+
## v0.3.0(2026-11-08)
|
|
167
|
+
|
|
168
|
+
- 370ee37 fix(gate): secret_scan 测试正例改常量承载+行内豁免——门禁拦自测样例的自指问题终解(正例即豁免机制的真实用法自证);新增 query token 模式用例
|
|
169
|
+
- 2600638 fix(gate): secret_scan 正例载体行内豁免——测试自身样例串被门禁拦推的 自指问题(gitleaks 同款 allow 标注机制首用即验证)
|
|
170
|
+
- 0bffc9b feat(gate): pre-push 第三检查=凭据泄漏+高危运行模式静态扫描(对标 huaweicloud-skills 市场采纳清单①)——零依赖 secret_scan.py(oauth2:token@host/query token/私钥块/AK-SK/Bearer 等模式+eval/exec/pickle/shell=True 高危面;行内 secret-scan:allow 豁免留痕;测试正例反例双锁抓出首版 URL token 模式顺序反写缺陷已修);vod-feedback-collect description 补显式 Triggers 词表(中英 19 词,市场惯例=显式词表比散文召回稳,采纳清单②;SKILL 双副本+五宿主装机副本 md5 对齐);pytest 147 绿+node 9 绿+scan OK
|
|
171
|
+
- 350b0a8 fix(skill): S73 拼接判定例——逐字=含语气词/标点,禁删'啊'补句号式改写(opencode 第二次实锤:S72 拼接生效但标点裁量漏网);轮次衔接换行/空格分隔不新增标点+可逐字符还原判据;SKILL 双副本+四宿主副本刷齐;proposal S73+design+decisions 同构序列第四次记档;pytest 141 绿
|
|
172
|
+
- ef1ebbd docs(decisions): S72 附带发现闭环——负责人确认输入原文即'流程合理',DB 记录准确,opencode 输入链路无缺陷,移交项不存在
|
|
173
|
+
- f4681bd fix(skill): S72 反截断红线——引导补充句整体=content 逐字上送禁摘片段(opencode 实锤:'操作不方便,流程合理'被截成'操作不方便',reasoning 日志取证);多轮分散表达按序拼接;SKILL 双副本+四宿主副本刷齐;proposal S72+design 承载+decisions 取证链;pytest 140 绿
|
|
174
|
+
- f3fde9e feat(followup): S71 问卷化追问 tripwire——话术载体结构词黑名单锁(自由生成四维追问清单实锤复盘:分叉示例+频率刻度+期望vs实际三红线全破);数字编号不锁(规则层/话术层分层);proposal S71 用例+design 承载+decisions 记档;pytest 139 绿
|
|
175
|
+
- d158bad chore(lint): test_followup 未使用变量清理(pre-push pyflakes 门禁)
|
|
176
|
+
- e223467 docs(followup): 二次微调落档 design 承载行+decisions 决策记录(跳过条件收窄依据/判定例先于行为验收/一句话口径三处诚实回退与 I22 对齐);pytest 138 绿
|
|
177
|
+
- 6f16aad docs(followup): 判定块二次微调(负责人确认)——跳过条件收窄去"操作/期望"回溯歧义(新字段来源唯一=固定追问原样回答,引导补充自然出现的操作/期望留在 content);"未回应/泛化抱怨"补可执行判定例;一句话口径改可测原文(payload 键+issue 段+来源注记三处诚实回退);契约跳过句补不回溯边界(939/1500);SKILL 判定块锁+边界锁双更新;四宿主副本刷齐;pytest 138 绿
|
|
178
|
+
- e7e8c48 docs(followup): S67-S70 追问触发判定块场景用例落档——proposal 判定块三层+四场景表(S67 已有实质回应不触发/S68 泛化+确认出现一次/S69 未回应+答没有键不存在/S70 防漂移锁);契约 description 补跳过句(831→903/1500);design S67-S70 承载行(dsh desc 无余量由宿主技能层承载的边界显式化);+契约跳过句回归锁;pytest 137 绿
|
|
179
|
+
- 716371e feat(followup): SKILL 追问触发判定块三层显式化(触发前置/跳过条件/触发条件,负责人确认)——引导补充已有实质回应并入 content 则不再触发固定追问(reproSteps/expectedBehavior 不上送=诚实回退);仅泛化抱怨或未回应且确认提交才原样带出至多一次;+SKILL 判定块文本回归锁(双副本逐字一致+四行为用例口径);四宿主装机副本已刷齐;pytest 136 绿
|
|
180
|
+
- adee656 refactor(followup): 透传逻辑单源化 _followup_fields(submit/draft 双路径共用,禁双边漂移)+拒答词集补全(没有了/不方便说)+design §三 S63→S64-S66 落地承载映射表(含重复节头修复)+helper 单元回归锁;pytest 135 绿+node 9 绿
|
|
181
|
+
- 4b43427 feat(followup): D-followup-impl-2 复现/预期追问补充插件侧落地(S64-S66,负责人确认开工,A1 确认环节合并一问/A2 MCP+dsh 壳)——契约 submit+draft 双工具 voices[] 增可选 reproSteps/expectedBehavior(maxLength 2000);固定问句逐字锁死+拒答词集技术兜底(_FOLLOWUP_DECLINES/DECLINES,模型不守话术键集合仍零漂移);仅 trim 非空含键+超 2000 引擎同口径截断+content 原话禁污染;draft 路径随 payload 暂存 commit 原样上送;SKILL 双副本+四宿主装机副本 md5 对账齐;引擎零改动旧路径不变;pytest 134 绿+node 9 绿
|
|
182
|
+
- 44218db feat(two-phase): 两段式提交插件本地极简形态(D-token-approval-2 解冻,负责人拍板方案 2)——vod_draft_voices(暂存+一次性令牌+contents 原话回显)+vod_commit_voices(令牌校验/单次消费/载荷 sha 防调包,内部复用 submit 既有链零新增语义);draft cap10 环形+TTL600s 惰性清除;账本 stage=draft/committed+draftId 关联(验收③绕过两段式可检测);SKILL 话术改两步流程(双副本 md5 同步);128 pytest+8 node 绿
|
|
183
|
+
- 31908e0 decisions: D-token-approval-2 token 化暂缓(负责人拍板 A)——触发条件=codex 真实消费需求;复杂度收益失衡裁剪(引擎写表面不值),恢复门禁口径不变(暂缓=codex 保持只读)
|
|
184
|
+
- fec386e docs+test:S63 复现步骤 AI 追问前置规范落档(业界对表 D-followup-design-1 四约束:可选增强/话术固定化/数据分层/诚实回退;当期不落话术——引擎无 supplement 承载 S51)+S63 tripwire 锁(采集话术禁追问承诺,立项随承载更新)
|
|
185
|
+
- 7a9eb08 decisions: D-followup-design-1 复现步骤 AI 追问前置规范(业界对表,负责人确认)——四条硬约束(可选增强/话术固定化/数据分层/诚实回退),当期不落话术(无承载 S51),立项前置
|
|
186
|
+
- 0ab66ce decisions: B 方案(bundle patch 接管)可行性修正落档——机制确定(bundles 清单管理),调研目标收敛为静态值确认+整行 config 完整性;A 自愈已落(e6a7d32)
|
|
187
|
+
- e6a7d32 feat(doctor): dsh patch 块自愈(A 止血,用户拍板)——doctor 检测 vod 块缺失/打平后按 manifest product/apiBase 重建嵌套块;manifest 补记 apiBase;status 输出归一化动态端口(golden 稳定性);+三态自愈回归锁(123 绿)
|
|
188
|
+
- 6afeb4e decisions: D-codex-circuit-breaker-1 补深审收口记录(P0-2/P0-3/P1-4/P1-5/P2 修复清单)
|
|
189
|
+
- 23a7bb1 fix(installer+packs): 深审四项收口——P0-2 packs 命名漂移(PRESETS full 对齐 ALL_PACKS+kb→knowledge 别名归一,安装口与运行口单源);P0-3 uninstall 破坏性路径(codex mcpConfig 改指插件 .mcp.json/None+config.toml 永不删+codex plugin remove best-effort+doctor None 守卫);P1-4 ack 解除后置到安装成功(失败安装不解熔断);P1-5 codex .mcp.json env 对齐本次 packs;P2 strip 精确表头+AGENTS END 缺失拒写盘;+5 回归锁(122 绿)
|
|
190
|
+
- 4309a41 docs:S60-S62 codex 熔断与恢复门禁场景用例落档(熔断触发/双层门禁安装+运行期/显式解除语义与审计)+design 承载映射(D-codex-circuit-breaker-1);118 绿
|
|
191
|
+
- 525826f feat(breaker): codex 熔断恢复门禁代码化(D-codex-circuit-breaker-1 收口)——①install 门禁:标记在+collect 拒装 exit2 ②--ack-suspension=显式解除(删标记+审计日志,语义与实现一致)③运行期门禁:serve enabled_packs 同查标记强制降级只读(堵 VOD_PACKS 绕过)④probe/packs 测试 HOME 隔离(真实标记不可被测试触碰);118 绿
|
|
192
|
+
- f30d0d8 decisions: D-codex-circuit-breaker-1 落档——熔断执行记录+token 化立项表述纠偏(最强摩擦+审计链,非人类确认硬保证)+恢复门禁(token 化上线前禁恢复采集)+验收标准改写
|
|
193
|
+
- 3a4a519 docs:S58(dsh patch 块 name 绑定+嵌套铁律,入口消失事故)/S59(回执话术=行为实况,S51 回执面应用)落档 proposal+design;116 pytest+8 node 绿
|
|
194
|
+
- 76a3c9d fix(UI): 回执话术=行为实况(S51,用户抓出)——删「审核后将以 issue 形式跟进」空头承诺(匿名直建无人工审核闸,issue 链接由 pollForReceipt 真实建成后补出);+回执实况回归锁(禁审核跟进句/REJECTED 须有引擎状态承载)
|
|
195
|
+
- 87cc0d0 fix(installer): dsh patch 块模板补 name 绑定行——重装幂等替换吞掉 name=client 半静默失激活(入口消失真机实锤:工具壳正常而按钮不在);+name 回归锁(116 绿)
|
|
196
|
+
- 43c57ee docs+test:S54-S57 场景用例落档(暂存恢复补提示/禁拉伸/legacy 清退/widget E_AUTH 兜底)+design 话术分层承载节;ux-sync 回归锁扩容(resize none/恢复话术要素/用户面 key 明文禁令),115 pytest+8 node 绿
|
|
197
|
+
- 856b1db legacy 共用 key 用户面清退(负责人拍板'不合理逻辑去掉'):INSTALL 删明文 legacy key 警告句(公开文档泄露 key 值+教唆反效果);nightly E2E 切匿名令牌主路径(legacy 属 GTD 兼容收尾不进健康检查)+清 scene 残留字段;测试归因绑定显式桩定(曾依赖仓内 runtime 偶发绑定假绿,D-attrib-A 无绑定分支新增回归锁);115 绿
|
|
198
|
+
- 592999e UI:弹窗输入框禁拉伸(resize none,用户反馈拉角顶破布局)——随后台重试补提示一版
|
|
199
|
+
- f90e130 UX 修复:后台重试成功不再静默——暂存反馈自动重试成功后落旗标,下次打开弹窗补提示(逐条原话回显,voice-id 不出用户面 F2;措辞「已自动重试成功」说清=完成用户此前点提交的指令非绕过确认;产品名不带——用户不感知归因拍板)
|
|
200
|
+
- a3cdd6d dsh 壳 UX 定稿同步(web widget 拍板漏同步各壳漂移实锤):提示语去括号后缀与受理引导句、撤 maxlength 计数器(硬帽保留)、撤「我的反馈」入口(账本写入保留);+ux-sync 回归锁(src+构建产物双级)
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
## v0.3.1(2026-11-09)
|
|
204
|
+
|
|
205
|
+
- 141dce4 fix(auth): probe_key 匿名令牌 401 报 expired-anonymous 而非 rejected——runtime 残留过期匿名令牌曾被误读为正式 key 失效(本机实锤:指纹 712c0ae4 实为 anonymous 档过期令牌);显式 key 被拒仍 rejected(fail fast 口径不变),note 指明下次提交自动重领;+回归锁(匿名档 expired-anonymous+重领提示、显式档 rejected 保持)
|
|
206
|
+
- 84cc6f1 fix(installer+dsh): 四宿主全链模拟两项实锤修复——①重装吃掉配置:dsh plugin add 模板含字面量 [] 顶层行,幂等追加块后 = 非法 YAML 整 profile 启动崩溃(upsert 追加路径清除空数组占位+回归锁);②headless 审批死锁:dsh 原生 ask 门禁无通道永久阻断写工具(requires approval, but no approval channel 实锤,此前靠 11-06 手工配置 confirmWrites:false 残留掩盖)——installer 显式写 confirmWrites:false(同意由 SKILL 话术层承担,web 端按 profile 覆盖回 true);dsh 真机重装→提交成功复验 ✅
|
|
207
|
+
- 9b87594 feat(followup-status): 插件侧 followupStatus 上报对接(引擎 V55-V57 契约增量,proposal S74-S76)——单源 _followup_fields 扩展三态白名单归一(strip+lower,白名单外/缺失省键,submit/draft 双路径共用禁双边漂移;commit 随 draft 暂存冻结防调包语义不变);契约 draft/submit 双工具 items 增枚举字段(工具 description 零增量,预算门禁不回退);dsh 壳透传同口径扩展(desc 1495/1500 无预算不宣讲,SKILL 宿主技能层承载);SKILL 判定块第 5 条三态映射话术锁(七副本 md5 对齐);+5 回归锁;pytest 153 绿+node 9 绿
|
|
208
|
+
- e40fafe fix(auth): 旧版残留凭据检测与自愈提示(评审拍板项,优先于公告)——codex 0.2.3 残留 legacy key 挡匿名链四宿主实测实锤;三处提交失败路径错误消息追加可操作自愈指引(_legacy_key_hint:当前版本+npx 重装命令+匿名档出口,不发公告靠用户撞);vod_auth_status 显式 key 在位即挂 legacyKeyHint 检测位(不等提交撞 401 才发现);不静默删 key 不静默重装(提示用户确认更新口径);+回归锁(提示含版本与重装命令+四处调用点在位);pytest 148 绿
|
|
209
|
+
- 1ac4b48 fix(release): GitCode 推送失败改硬失败 exit 1——本次发版 push 被 pre-push 拦后脚本吞错仍误报'发版完成'的实锤修复
|
|
210
|
+
- 87ac1ee test: golden status 版本快照随 v0.3.0 发版重录——release.sh 推送失败被 '|| echo 跳过' 吞掉的实锤(本次 push 被 pre-push 拦后仍误报发版完成,脚本待修:push 失败应 exit 1)
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
## v0.4.0(2026-11-09)
|
|
214
|
+
|
|
215
|
+
- 3c54786 feat(two-phase): D-resume-commit-1 断回合续提交+确认收口话术锁——实锤:agent draft 后收工,用户两次说提交仍无下文(approvalToken 只存于 draft 响应文本,回合断即丢失)。①draft 将 token 随草稿落盘(runtime 0600,与 java_key 同级;token 威胁模型=防载荷改写非同意凭证,落盘不放大);commit 允许省略 token/sha 由本地未过期草稿恢复,显式传错仍拒(语义不放宽);契约 required 收窄为 draftId。②SKILL 真源加话术锁:用户确认后当回合必须 commit、不成必须明告未提交(真源生成+sync 同步,禁自由裁量)。+4 回归锁(恢复成功/错 sha 仍拒/过期拒/token 落盘+0600);pytest 159 绿+node 9 绿
|
|
216
|
+
- ca84c3a test: conftest autouse runtime 隔离——test_followup 等 _submit 用例桩了 _http 未重定向 _runtime_path,账本追加写穿仓内真实 runtime.json(本机 200 条账本被测试数据灌满实锤);autouse 重定向 tmp,用例内显式 setattr 仍可覆盖;pytest 155 绿
|
|
217
|
+
- f35cd0e test: golden status 版本快照随 v0.3.1 重录(仅 version 字段,diff 已过目)
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
## v0.4.1(2026-11-09)
|
|
221
|
+
|
|
222
|
+
- a0cf5c2 chore(dsh-release): dsh-vod-devkit 0.2.0——首装 nonce 同步+issue_sync 轮询拆除随包(tgz 本地重打包不入 git,嵌入方经 dsh plugin add <tgz> 或重装升级)
|
|
223
|
+
- 4e9a015 fix(nonce-sync): D-dev-nonce-sync-1 首装 nonce 内存态同步——真机实锤:全新安装首次提交必失败冒给用户(_install_nonce 首次生成只落盘不回写 _RT,同进程每次新 nonce→领令牌与提交设备不同→绑定校验 401,重试仍新 nonce 再 401;二次提交才成功);修复=生成后同步 _RT[install_nonce],领令牌/提交/重试同设备 401→领令牌→重试全程无感;存量安装不受影响;回归锁 tests/test_install_nonce_sync.py;pytest 163 绿(162+1)+ 本地 e2e 修复后干净沙箱首提一次成功;decisions.md D-dev-nonce-sync-1
|
|
224
|
+
- b8eed60 feat(dsh-ui)+docs: D-inbox-direct-ui-1 issue_sync 轮询拆除——引擎单表收口后回执无 issue_sync 节,原 U-S2 轮询(GET ?limit=50 找 voiceId)永远空转静默失效;净删 pollIssueSync/pollForReceipt 及调用点,提交成功(201)即终态提示「已收录,产品团队会看到」(对齐 D-inbox-DIRECT 不建 issue 拍板);提交链本体(POST+断线自动重提)保留不动;lib 随构建重出;docs:dsh-ui-collect §六/§七/U-S 用例表同步、decisions.md D-inbox-direct-ui-1 决策条目;回归锁 +1(no-issue-sync-poll.test.mjs:src/lib 双侧禁 issue_sync 与已建成 issue 话术+提交链本体保留锁);dsh node --test 10/10 绿
|
|
225
|
+
- b0f121c docs(quota): D-quota-raise-1 匿名档配额提额+引擎侧可配置化文档化——面向用户数值口径同步(5000/日500),proposal 信任模型表/decisions 决策条目/design 数值归属节(插件零配额数值,429 文案引擎透传)
|
|
226
|
+
- fa9c92b refactor(two-phase)+docs: D-resume-commit-1 文档化+场景用例 S83-S86+草稿库读写单源化——docs: decisions.md 决策条目/design.md 承载补充(分层治理口径)/proposal.md 场景用例清单(S83 全链回执逐字、S84 断回合恢复、S85 过期重开链、S86 消费后不可复活);refactor: _drafts_load() 单源化 draft/commit 草稿库读写(现读+TTL 惰性清除,禁双边漂移);+3 场景回归锁;pytest 162 绿+node 9 绿
|
|
227
|
+
- 9b5e6ec test: golden status 版本快照随 v0.4.0 重录(仅 version 字段,diff 已过目)
|
|
228
|
+
|
package/bin/vod-devkit
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import argparse
|
|
8
8
|
import json
|
|
9
9
|
import os
|
|
10
|
+
import re
|
|
10
11
|
import shutil
|
|
11
12
|
import subprocess
|
|
12
13
|
import sys
|
|
@@ -62,8 +63,12 @@ def manifest_path() -> Path:
|
|
|
62
63
|
PRESETS = {
|
|
63
64
|
# 对外默认:开发者=反馈采集者(workflow 不进对外默认集)
|
|
64
65
|
"collect": "core,collect",
|
|
65
|
-
#
|
|
66
|
-
|
|
66
|
+
# 内部:运营/可信第三方全量。2026-11-06 修正(深审 P0-2):原值
|
|
67
|
+
# "core,workflow,kb,collect" 与运行期 ALL_PACKS=(core,collect,knowledge)
|
|
68
|
+
# 命名漂移——workflow 包已随"运营归 vod-system 前端"净删、kb 是
|
|
69
|
+
# knowledge 的旧称,按原值安装 workflow/kb 被静默丢弃(安装口说装了
|
|
70
|
+
# 运行口不认=挪到别处而非消除)
|
|
71
|
+
"full": "core,collect,knowledge",
|
|
67
72
|
}
|
|
68
73
|
|
|
69
74
|
|
|
@@ -234,7 +239,9 @@ def _strip_codex_vod_blocks(text: str) -> str:
|
|
|
234
239
|
out, skipping = [], False
|
|
235
240
|
for line in text.splitlines():
|
|
236
241
|
s = line.strip()
|
|
237
|
-
|
|
242
|
+
# P2(深审 2026-11-06):精确匹配表头——startswith("…vod-devkit")
|
|
243
|
+
# 会误删 [mcp_servers.vod-devkit2] 等无关表
|
|
244
|
+
if s == "[mcp_servers.vod-devkit]":
|
|
238
245
|
skipping = True
|
|
239
246
|
continue
|
|
240
247
|
if skipping and s.startswith("["):
|
|
@@ -249,7 +256,11 @@ _AGENTS_MARKER_END = "<!-- vod-devkit:feedback-skill END -->"
|
|
|
249
256
|
|
|
250
257
|
|
|
251
258
|
def _strip_agents_vod_block(text: str) -> str:
|
|
252
|
-
"""幂等剥离 AGENTS.md 中带标记的 vod-devkit 技能块(历史方案清理)。
|
|
259
|
+
"""幂等剥离 AGENTS.md 中带标记的 vod-devkit 技能块(历史方案清理)。
|
|
260
|
+
|
|
261
|
+
P2(深审 2026-11-06):只有 BEGIN 没有 END 时不得静默吞掉文件剩余
|
|
262
|
+
全部内容——抛错拒绝(调用方 exit 2 不落盘),宁可装不上不可删用户文件。
|
|
263
|
+
"""
|
|
253
264
|
lines, skipping, out = text.splitlines(), False, []
|
|
254
265
|
for line in lines:
|
|
255
266
|
if line.strip() == _AGENTS_MARKER_BEGIN:
|
|
@@ -260,6 +271,10 @@ def _strip_agents_vod_block(text: str) -> str:
|
|
|
260
271
|
continue
|
|
261
272
|
if not skipping:
|
|
262
273
|
out.append(line)
|
|
274
|
+
if skipping:
|
|
275
|
+
raise RuntimeError(
|
|
276
|
+
"AGENTS.md 存在 vod-devkit BEGIN 标记但缺失 END 标记"
|
|
277
|
+
"(文件可能被手动截断)——拒绝自动清理,请手动检查该文件")
|
|
263
278
|
return "\n".join(out).rstrip()
|
|
264
279
|
|
|
265
280
|
|
|
@@ -284,7 +299,11 @@ def _install_codex(args, packs: str) -> Path:
|
|
|
284
299
|
agents = Path.home() / ".codex" / "AGENTS.md"
|
|
285
300
|
if agents.exists(): # 历史遗留:AGENTS.md 技能块已被原生 skill 取代
|
|
286
301
|
text = agents.read_text(encoding="utf-8")
|
|
287
|
-
|
|
302
|
+
try:
|
|
303
|
+
cleaned = _strip_agents_vod_block(text)
|
|
304
|
+
except RuntimeError as e:
|
|
305
|
+
print(f"[vod-devkit] {e}", file=sys.stderr)
|
|
306
|
+
sys.exit(2)
|
|
288
307
|
if cleaned != text.rstrip():
|
|
289
308
|
agents.write_text(cleaned + "\n", encoding="utf-8")
|
|
290
309
|
print(f"已移除旧 AGENTS.md 技能块(原生 skill 取代):{agents}")
|
|
@@ -310,7 +329,33 @@ def _install_codex(args, packs: str) -> Path:
|
|
|
310
329
|
print(f"已注册本地 marketplace:{mp_root}")
|
|
311
330
|
_run([codex, "plugin", "add", f"vod-devkit@{mp_name}"])
|
|
312
331
|
print("已安装 codex 原生插件 vod-devkit(skills + MCP,重启 Codex 会话生效)")
|
|
313
|
-
|
|
332
|
+
# P1-5(深审 2026-11-06):插件自带的 .mcp.json 硬编码 env.VOD_PACKS=
|
|
333
|
+
# core,collect——--packs 对 codex 半失效(运行期仍注册 collect 工具)。
|
|
334
|
+
# plugin add 后把缓存内 .mcp.json 的 packs 对齐本次安装值。
|
|
335
|
+
import glob as _glob
|
|
336
|
+
mcp_jsons = sorted(
|
|
337
|
+
_glob.glob(str(Path.home() / ".codex" / "plugins" / "cache"
|
|
338
|
+
/ mp_name / "vod-devkit" / "*" / ".mcp.json")),
|
|
339
|
+
key=lambda p: Path(p).stat().st_mtime, reverse=True)
|
|
340
|
+
if mcp_jsons:
|
|
341
|
+
try:
|
|
342
|
+
mj = json.loads(Path(mcp_jsons[0]).read_text(encoding="utf-8"))
|
|
343
|
+
srv = mj.get("mcpServers", {}).get("vod-devkit")
|
|
344
|
+
if srv is not None:
|
|
345
|
+
srv.setdefault("env", {})["VOD_PACKS"] = packs
|
|
346
|
+
Path(mcp_jsons[0]).write_text(
|
|
347
|
+
json.dumps(mj, ensure_ascii=False, indent=2) + "\n",
|
|
348
|
+
encoding="utf-8")
|
|
349
|
+
print(f"已对齐插件 MCP packs:{mcp_jsons[0]}(VOD_PACKS={packs})")
|
|
350
|
+
except Exception as e:
|
|
351
|
+
print(f"[vod-devkit] warn: 插件 .mcp.json packs 对齐失败({e})——"
|
|
352
|
+
"运行期熔断门禁仍会兜底", file=sys.stderr)
|
|
353
|
+
return Path(mcp_jsons[0])
|
|
354
|
+
# 深审 P0-3:绝不再返回 ~/.codex/config.toml——它是用户整份 codex 配置,
|
|
355
|
+
# uninstall 对 mcpConfig 是删除语义,指向它=卸载删光用户配置(破坏性)
|
|
356
|
+
print("[vod-devkit] warn: 未定位到插件 .mcp.json(uninstall 将跳过 MCP 清理,"
|
|
357
|
+
"可手动删除插件缓存目录)", file=sys.stderr)
|
|
358
|
+
return None
|
|
314
359
|
|
|
315
360
|
|
|
316
361
|
def _install_dsh(args, packs: str) -> Path:
|
|
@@ -342,10 +387,19 @@ def _install_dsh(args, packs: str) -> Path:
|
|
|
342
387
|
print(f"已安装 dsh 插件 dsh-vod-devkit(profile={profile},dsh plugin list 可见)")
|
|
343
388
|
|
|
344
389
|
patch = Path.home() / ".dsh" / "profiles" / profile / "cordis.patch.yml"
|
|
390
|
+
# name 行必须保留:cordis.patch.yml 的 insert 块靠 name 绑定 client 半
|
|
391
|
+
# (反馈按钮)——只写 id+config 会在重装幂等替换时把 name 吞掉,UI 静默
|
|
392
|
+
# 失激活(2026-11-06 真机实锤:重装后入口消失)
|
|
345
393
|
block = ("- id: vod-devkit\n"
|
|
394
|
+
" name: dsh-vod-devkit\n"
|
|
346
395
|
" config:\n"
|
|
347
396
|
f" product: {args.product}\n"
|
|
348
|
-
f" apiBase: {args.java_api_base}\n"
|
|
397
|
+
f" apiBase: {args.java_api_base}\n"
|
|
398
|
+
" # headless 无审批通道:原生 ask 门禁会永久阻断写工具(四宿主实测实锤:\n"
|
|
399
|
+
" # requires approval, but no approval channel)。同意确认由 SKILL 话术层\n"
|
|
400
|
+
" # 承担(draft→用户确认→commit / 明确指令直发),web 端如需硬门禁按\n"
|
|
401
|
+
" # profile 覆盖回 true。\n"
|
|
402
|
+
" confirmWrites: false\n")
|
|
349
403
|
try:
|
|
350
404
|
written = _upsert_dsh_patch(patch, block)
|
|
351
405
|
except Exception as e:
|
|
@@ -385,6 +439,10 @@ def _upsert_dsh_patch(patch: Path, block: str) -> bool:
|
|
|
385
439
|
lines = patch.read_text(encoding="utf-8").splitlines() if patch.exists() else []
|
|
386
440
|
start, end = _find_dsh_block(lines)
|
|
387
441
|
if start is None:
|
|
442
|
+
# 空数组占位清除(四宿主实测实锤:dsh plugin add 自建的模板含字面量
|
|
443
|
+
# `[]` 顶层行,直接追加块 = `[]` 后跟 `- id:` 顶层元素 = 非法 YAML,
|
|
444
|
+
# 整个 profile 启动崩溃)。`[]` 语义=空数组,被块 entries 取代即删。
|
|
445
|
+
lines = [ln for ln in lines if ln.strip() != "[]"]
|
|
388
446
|
new = lines + ([""] if lines and lines[-1].strip() else []) + block.splitlines()
|
|
389
447
|
else:
|
|
390
448
|
new = lines[:start] + block.splitlines() + lines[end:]
|
|
@@ -525,6 +583,24 @@ def cmd_install(args):
|
|
|
525
583
|
print(f"不支持目标: {target}(可选 hermes|opencode|codex|auto)", file=sys.stderr)
|
|
526
584
|
sys.exit(2)
|
|
527
585
|
packs = args.packs or PRESETS.get(args.preset, "")
|
|
586
|
+
# 恢复门禁(D-codex-circuit-breaker-1,2026-11-06 负责人确认):
|
|
587
|
+
# 熔断标记存在(~/.codex/vod-collect-suspended.json)时,codex 装 collect
|
|
588
|
+
# 被拒——恢复采集的前置=token 化上线并过回归,不是改回 packs 一个动作;
|
|
589
|
+
# --ack-suspension=显式解除(P1-4 修正:解除动作后置到安装成功之后——
|
|
590
|
+
# 若产品校验/安装中途失败,熔断不得已被解除)。
|
|
591
|
+
pending_ack = False
|
|
592
|
+
if target == "codex" and "collect" in (packs or "").replace(" ", "").split(","):
|
|
593
|
+
marker = Path.home() / ".codex" / "vod-collect-suspended.json"
|
|
594
|
+
if marker.is_file() and getattr(args, "ack_suspension", False):
|
|
595
|
+
pending_ack = True # 解除后置:安装成功才落
|
|
596
|
+
elif marker.is_file():
|
|
597
|
+
print("[vod-devkit] 恢复门禁:codex 采集处于熔断状态"
|
|
598
|
+
"(未确认提交 ≥2 次,详见 docs/decisions.md"
|
|
599
|
+
" D-codex-circuit-breaker-1)。"
|
|
600
|
+
"恢复前置=token 化两段式上线并通过回归"
|
|
601
|
+
"(draft→commit 审计链/重复 commit 被拒/未确认可检测)。",
|
|
602
|
+
file=sys.stderr)
|
|
603
|
+
sys.exit(2)
|
|
528
604
|
# 归因绑定(T7d 统一:安装必配,与 dsh UI 加载必配同口径):--product 必填——
|
|
529
605
|
# 缺省宿主名在生态部署是错归陷阱(高校AI开发者平台 agent 底座=hermes,
|
|
530
606
|
# 不填则反馈全归 hermes)。宿主名仍是合法值(自反馈场景显式传
|
|
@@ -577,6 +653,18 @@ def cmd_install(args):
|
|
|
577
653
|
|
|
578
654
|
mcp_conf = installer(args, packs)
|
|
579
655
|
|
|
656
|
+
# P1-4 修正:ack 解除后置——安装全部成功才落(解除先于安装=失败安装
|
|
657
|
+
# 也绕过了恢复门禁语义)
|
|
658
|
+
if pending_ack:
|
|
659
|
+
marker = Path.home() / ".codex" / "vod-collect-suspended.json"
|
|
660
|
+
if marker.is_file():
|
|
661
|
+
marker.unlink()
|
|
662
|
+
audit = Path.home() / ".codex" / "vod-collect-suspension-audit.log"
|
|
663
|
+
with audit.open("a", encoding="utf-8") as f:
|
|
664
|
+
f.write(f"{datetime.datetime.now().isoformat(timespec='seconds')}\t"
|
|
665
|
+
f"ack_suspension\tpacks={packs}\n")
|
|
666
|
+
print(f"[vod-devkit] 已显式解除 codex 采集熔断(安装成功),审计已记录:{audit}")
|
|
667
|
+
|
|
580
668
|
# G1 修复:技能全量拷贝(目录型技能+平铺规则文档),按 packs 过滤
|
|
581
669
|
HERMES_SKILLS_DIR.mkdir(parents=True, exist_ok=True)
|
|
582
670
|
# opencode 原生技能目录(2026-11-06 实测:opencode 自动发现
|
|
@@ -627,7 +715,10 @@ def cmd_install(args):
|
|
|
627
715
|
"product": bound_product,
|
|
628
716
|
"packs": packs,
|
|
629
717
|
"dshProfile": (getattr(args, "dsh_profile", "") or "").strip() or None,
|
|
630
|
-
|
|
718
|
+
# dsh 修复用(S60/A 止血):patch 块被 dsh 运行时序列化冲掉后,
|
|
719
|
+
# doctor 可凭 product/apiBase 重建(块内容=安装期静态部署值)
|
|
720
|
+
"apiBase": (getattr(args, "java_api_base", "") or "") or None,
|
|
721
|
+
"mcpConfig": (str(mcp_conf) if mcp_conf else None),
|
|
631
722
|
"skillsDir": str(HERMES_SKILLS_DIR),
|
|
632
723
|
# 名册对账(huaweicloud-devkit doctor 模式借鉴,2026-11-06):
|
|
633
724
|
# 每个原生技能落点的独立指纹——漏装/漂移可被 doctor 逐落点抓出,
|
|
@@ -662,7 +753,54 @@ def cmd_status(_args):
|
|
|
662
753
|
if not p.exists():
|
|
663
754
|
print("未安装(无 install-manifest)")
|
|
664
755
|
sys.exit(1)
|
|
665
|
-
|
|
756
|
+
# golden 稳定性:apiBase 含安装期动态值(本地验证实例端口),归一化后输出
|
|
757
|
+
text = p.read_text(encoding="utf-8")
|
|
758
|
+
text = re.sub(r'"apiBase": "http://127\.0\.0\.1:\d+"',
|
|
759
|
+
'"apiBase": "http://127.0.0.1:<PORT>"', text)
|
|
760
|
+
print(text)
|
|
761
|
+
|
|
762
|
+
|
|
763
|
+
def _repair_dsh_patch_block(mf: dict) -> str | None:
|
|
764
|
+
"""doctor 自愈(S58/A):profile cordis.patch.yml 的 vod-devkit 块缺失或
|
|
765
|
+
打平(未缩进在 - insert: 之下)时,按 manifest 的 product/apiBase 重建
|
|
766
|
+
正确嵌套块。返回修复的文件路径;块完好返回 None。
|
|
767
|
+
|
|
768
|
+
嵌套铁律(真机实锤):id/name/config 必须缩进在 `- insert:` 之下——
|
|
769
|
+
dsh 的配置序列化只保留它能识别的块,手工游离块会被下次写盘冲掉。
|
|
770
|
+
"""
|
|
771
|
+
prof = mf["dshProfile"]
|
|
772
|
+
patch = Path.home() / ".dsh" / "profiles" / prof / "cordis.patch.yml"
|
|
773
|
+
if not patch.exists():
|
|
774
|
+
return None
|
|
775
|
+
lines = patch.read_text(encoding="utf-8").splitlines()
|
|
776
|
+
vod_idx = next((i for i, ln in enumerate(lines)
|
|
777
|
+
if ln.strip().startswith("- id: vod-devkit")), None)
|
|
778
|
+
if vod_idx is not None and lines[vod_idx].startswith((" ", "\t")):
|
|
779
|
+
# 已嵌套且在 insert 组内(简化判定:缩进+前文存在 - insert: 行)→ 完好
|
|
780
|
+
has_insert = any(ln.strip() == "- insert:" for ln in lines[:vod_idx])
|
|
781
|
+
has_name = any("name: dsh-vod-devkit" in ln
|
|
782
|
+
for ln in lines[vod_idx:vod_idx + 3])
|
|
783
|
+
if has_insert and has_name:
|
|
784
|
+
return None
|
|
785
|
+
# 需要重建:先摘除旧块(块边界=下一个 `- ` 群组项,任何缩进),再追加正确嵌套组
|
|
786
|
+
if vod_idx is not None:
|
|
787
|
+
end = next((j for j in range(vod_idx + 1, len(lines))
|
|
788
|
+
if lines[j].strip().startswith("- ")), len(lines))
|
|
789
|
+
del lines[vod_idx:end]
|
|
790
|
+
if lines and lines[-1].strip():
|
|
791
|
+
lines.append("")
|
|
792
|
+
product = mf.get("product") or ""
|
|
793
|
+
api_base = mf.get("apiBase") or ""
|
|
794
|
+
lines += [
|
|
795
|
+
"- insert:",
|
|
796
|
+
" - id: vod-devkit",
|
|
797
|
+
" name: dsh-vod-devkit",
|
|
798
|
+
" config:",
|
|
799
|
+
f" product: {product}",
|
|
800
|
+
f" apiBase: {api_base}",
|
|
801
|
+
]
|
|
802
|
+
patch.write_text("\n".join(lines).rstrip("\n") + "\n", encoding="utf-8")
|
|
803
|
+
return str(patch)
|
|
666
804
|
|
|
667
805
|
|
|
668
806
|
def cmd_doctor(_args):
|
|
@@ -672,10 +810,18 @@ def cmd_doctor(_args):
|
|
|
672
810
|
problems.append("无 install-manifest.json(未 install?)")
|
|
673
811
|
else:
|
|
674
812
|
mf = json.loads(p.read_text(encoding="utf-8"))
|
|
813
|
+
# dsh patch 块自愈(S58/A 止血,2026-11-06 真机实锤):dsh 运行时
|
|
814
|
+
# 序列化会冲掉 profile patch 里的 vod 块(配置树不含手工块)——
|
|
815
|
+
# doctor 检测缺失/打平后按 manifest 的 product/apiBase 重建嵌套块
|
|
816
|
+
if mf.get("target") == "dsh" and mf.get("dshProfile"):
|
|
817
|
+
patched = _repair_dsh_patch_block(mf)
|
|
818
|
+
if patched:
|
|
819
|
+
print(f"[doctor] 已重建 dsh patch 的 vod-devkit 块:{patched}"
|
|
820
|
+
"(重启 dsh 生效)")
|
|
675
821
|
bi = json.loads((ROOT / "build-info.json").read_text(encoding="utf-8"))
|
|
676
822
|
if mf["source"]["commitSha"] != bi.get("commitSha"):
|
|
677
823
|
problems.append("install-manifest 与 build-info 的 commitSHA 不一致")
|
|
678
|
-
if not Path(mf["mcpConfig"]).exists():
|
|
824
|
+
if mf.get("mcpConfig") and not Path(mf["mcpConfig"]).exists():
|
|
679
825
|
problems.append("MCP 配置文件缺失")
|
|
680
826
|
if not Path(mf["skillsDir"]).exists():
|
|
681
827
|
problems.append("skills 目录缺失")
|
|
@@ -798,10 +944,28 @@ def cmd_uninstall(_args):
|
|
|
798
944
|
if p.exists():
|
|
799
945
|
mf = json.loads(p.read_text(encoding="utf-8"))
|
|
800
946
|
for key in ("mcpConfig", "skillsDir"):
|
|
801
|
-
|
|
947
|
+
path_s = mf.get(key)
|
|
948
|
+
if not path_s:
|
|
949
|
+
continue # codex 等宿主 mcpConfig 可为 None(P0-3:无托管配置文件)
|
|
950
|
+
path = Path(path_s)
|
|
951
|
+
# 深审 P0-3(破坏性路径一票否决):config.toml 是用户整份 codex
|
|
952
|
+
# 配置,永不在 uninstall 删除——旧版 manifest 曾把它记成 mcpConfig
|
|
953
|
+
if path.name == "config.toml":
|
|
954
|
+
print(f"skip(用户配置文件,uninstall 永不删除):{path}")
|
|
955
|
+
continue
|
|
802
956
|
if path.exists():
|
|
803
957
|
shutil.rmtree(path) if path.is_dir() else path.unlink()
|
|
804
958
|
print("removed:", path)
|
|
959
|
+
# codex 原生插件摘除(best-effort:CLI 命令名随版本可能变化,失败不阻塞)
|
|
960
|
+
if mf.get("target") == "codex":
|
|
961
|
+
codex = shutil.which("codex")
|
|
962
|
+
if codex:
|
|
963
|
+
r = subprocess.run([codex, "plugin", "remove",
|
|
964
|
+
"vod-devkit@vod-local"],
|
|
965
|
+
capture_output=True, text=True, timeout=120)
|
|
966
|
+
print("codex plugin remove:",
|
|
967
|
+
"OK" if r.returncode == 0
|
|
968
|
+
else (r.stderr or r.stdout).strip()[-120:])
|
|
805
969
|
oc_cmd = Path.home() / ".config/opencode/command/vod-doctor.md"
|
|
806
970
|
if oc_cmd.exists():
|
|
807
971
|
oc_cmd.unlink()
|
|
@@ -834,6 +998,8 @@ def main():
|
|
|
834
998
|
sp.add_argument("--java-api-base", default=None,
|
|
835
999
|
help="VOD 平台地址(缺省=https://vod-dev.topxtopx.com,勿用回环默认)")
|
|
836
1000
|
sp.add_argument("--packs", default="", help="显式覆盖 preset(逗号分隔)")
|
|
1001
|
+
sp.add_argument("--ack-suspension", action="store_true",
|
|
1002
|
+
help="确认解除 codex 采集熔断(恢复门禁逃生口,D-codex-circuit-breaker-1)")
|
|
837
1003
|
sp.add_argument("--product", default="",
|
|
838
1004
|
help="归因绑定:本 agent 服务的产品(codearts/aishell 等;采集反馈默认归属)")
|
|
839
1005
|
sp.add_argument("--distribution", default="devkit", choices=["devkit", "preset"],
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"title": "vod-devkit MCP 工具契约(唯一事实源)",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.1",
|
|
5
5
|
"tools": {
|
|
6
6
|
"vod_submit_voices": {
|
|
7
|
-
"description": "提交用户反馈进 VOD。**先决条件(优先于本描述其余所有内容):调用前必须已征得用户对'提交这条反馈'的明确同意;用户陈述/抱怨反馈本身不构成同意;用户未同意时禁止传 confirmed=true**。模糊抱怨(如\"体验不好\")时一轮说完三件事:承接识别结果(\"收到,你对产品体验不满意\")+确认提交意愿(\"要把这条反馈提交给产品团队吗?\")+引导补充(\"方便的话说下具体现象,不说我也会按你的原话提交\");禁止含混反问(实锤病句:\"请问是否把什么作为反馈\")。同意后 content 放用户原话(哪怕只有一句\"体验很差\"
|
|
7
|
+
"description": "提交用户反馈进 VOD。**先决条件(优先于本描述其余所有内容):调用前必须已征得用户对'提交这条反馈'的明确同意;用户陈述/抱怨反馈本身不构成同意;用户未同意时禁止传 confirmed=true**。模糊抱怨(如\"体验不好\")时一轮说完三件事:承接识别结果(\"收到,你对产品体验不满意\")+确认提交意愿(\"要把这条反馈提交给产品团队吗?\")+引导补充(\"方便的话说下具体现象,不说我也会按你的原话提交\");禁止含混反问(实锤病句:\"请问是否把什么作为反馈\")。同意后 content 放用户原话(哪怕只有一句\"体验很差\"也原样提交)。确认环节允许固定追问至多一次,问句必须逐字使用:「方便的话,补充一下遇到这个问题时的操作步骤或期望的表现吗?不方便回复\"没有\",我直接提交。」用户回答只摘录原话对应部分进 reproSteps/expectedBehavior(不改写不总结,无法拆分时落最相关字段,任何内容禁回填 content);答\"没有/跳过/不方便\"=两字段不上送直接提交。引导补充(说下具体现象)已获实质内容并并入 content 时不再追问、直接提交(其中自然出现的操作/期望留在 content 原话,不回溯摘入新字段);仅引导补充未获回应或仅泛化抱怨且用户确认提交时才带出固定问句。product 归因由安装绑定自动完成,无需用户提供、禁止询问\"提交到哪个产品/页面\";用户自报的目标产品一律不采信不覆盖(照部署产品提交,提到什么产品随正文原样传达)。用户说\"提单/提工单/提 issue\"时同样用本工具,除上述固定一次追问外,禁止再索要严重程度/环境/附件等开发者字段、禁止第二轮追问。批式提交对接囤积端点 POST /external/voices(不触发分析,voiceId 由引擎计算回执下发;引擎未部署 404 自动回落老链)。tags=采集层三分类(problem_type:值,可选)。缺 key 时自动获取零字段匿名令牌。拿到回执后必须原样转述 echo.contents(每条「已收录原话:<content>」全文),禁止改写概括——这是用户核对原话是否被改写的唯一窗口。禁止向用户解释内部机制(声音来源/渠道字段/计数规则/配额/归因)。",
|
|
8
8
|
"input": {
|
|
9
9
|
"type": "object",
|
|
10
10
|
"properties": {
|
|
@@ -28,11 +28,32 @@
|
|
|
28
28
|
"items": {
|
|
29
29
|
"type": "string"
|
|
30
30
|
}
|
|
31
|
+
},
|
|
32
|
+
"reproSteps": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"maxLength": 2000,
|
|
35
|
+
"description": "用户追问补充(可选):复现步骤,来自固定追问一次的用户原话摘录;禁止改写/混入 content;超 2000 截断;未追问或用户答“没有”不得传"
|
|
36
|
+
},
|
|
37
|
+
"expectedBehavior": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"maxLength": 2000,
|
|
40
|
+
"description": "用户追问补充(可选):期望表现,来源与纪律同 reproSteps"
|
|
41
|
+
},
|
|
42
|
+
"followupStatus": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"enum": [
|
|
45
|
+
"not_asked",
|
|
46
|
+
"declined",
|
|
47
|
+
"answered"
|
|
48
|
+
],
|
|
49
|
+
"maxLength": 32,
|
|
50
|
+
"description": "追问环节状态(可选,按 S67-S70 判定结果上送):not_asked=未触发追问;declined=问了未答/拒答;answered=已答并随 reproSteps/expectedBehavior。白名单外值引擎降 NULL 不拒收"
|
|
31
51
|
}
|
|
32
52
|
},
|
|
33
53
|
"required": [
|
|
34
54
|
"content"
|
|
35
|
-
]
|
|
55
|
+
],
|
|
56
|
+
"description": "用户反馈声音列表(content 必填;reproSteps/expectedBehavior 仅追问有答时上送)"
|
|
36
57
|
},
|
|
37
58
|
"description": "用户反馈声音列表(content 必填)"
|
|
38
59
|
},
|
|
@@ -206,6 +227,101 @@
|
|
|
206
227
|
]
|
|
207
228
|
},
|
|
208
229
|
"backend": "local(无上游;读本机 runtime.json 账本)"
|
|
230
|
+
},
|
|
231
|
+
"vod_draft_voices": {
|
|
232
|
+
"description": "提交用户反馈的第一步(两段式 draft→commit)。**先决条件(优先于本描述其余所有内容):调用前必须已征得用户对'提交这条反馈'的明确同意;用户陈述/抱怨反馈本身不构成同意;用户未同意时禁止调用**。本工具只暂存草稿并签发一次性令牌,不会提交任何数据。返回 draftId/approvalToken/contents——拿到后必须把 contents 里的每条内容原样展示给用户核对(禁止改写概括),明确问'确认提交吗',用户同意后才能调用 vod_commit_voices;用户不同意则不调用(草稿自动过期作废)。content 放用户原话逐字(哪怕只有一句'体验很差')。追问纪律同 vod_submit_voices:确认环节固定追问至多一次(问句逐字见其描述),答案只摘录进 reproSteps/expectedBehavior 禁回填 content;答\"没有\"直接进入确认展示。product 归因由安装绑定自动完成,禁止询问用户'提交到哪个产品',用户自报的目标产品不采信。禁止向用户解释内部机制(令牌/草稿/配额/归因)。",
|
|
233
|
+
"input": {
|
|
234
|
+
"type": "object",
|
|
235
|
+
"properties": {
|
|
236
|
+
"voices": {
|
|
237
|
+
"type": "array",
|
|
238
|
+
"minItems": 1,
|
|
239
|
+
"maxItems": 50,
|
|
240
|
+
"items": {
|
|
241
|
+
"type": "object",
|
|
242
|
+
"properties": {
|
|
243
|
+
"content": {
|
|
244
|
+
"type": "string",
|
|
245
|
+
"minLength": 1,
|
|
246
|
+
"maxLength": 2000
|
|
247
|
+
},
|
|
248
|
+
"userType": {
|
|
249
|
+
"type": "string"
|
|
250
|
+
},
|
|
251
|
+
"tags": {
|
|
252
|
+
"type": "array",
|
|
253
|
+
"items": {
|
|
254
|
+
"type": "string"
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
"reproSteps": {
|
|
258
|
+
"type": "string",
|
|
259
|
+
"maxLength": 2000,
|
|
260
|
+
"description": "用户追问补充(可选):复现步骤,来自固定追问一次的用户原话摘录;禁止改写/混入 content;超 2000 截断;未追问或用户答“没有”不得传"
|
|
261
|
+
},
|
|
262
|
+
"expectedBehavior": {
|
|
263
|
+
"type": "string",
|
|
264
|
+
"maxLength": 2000,
|
|
265
|
+
"description": "用户追问补充(可选):期望表现,来源与纪律同 reproSteps"
|
|
266
|
+
},
|
|
267
|
+
"followupStatus": {
|
|
268
|
+
"type": "string",
|
|
269
|
+
"enum": [
|
|
270
|
+
"not_asked",
|
|
271
|
+
"declined",
|
|
272
|
+
"answered"
|
|
273
|
+
],
|
|
274
|
+
"maxLength": 32,
|
|
275
|
+
"description": "追问环节状态(可选,按 S67-S70 判定结果上送):not_asked=未触发追问;declined=问了未答/拒答;answered=已答并随 reproSteps/expectedBehavior。白名单外值引擎降 NULL 不拒收"
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
"required": [
|
|
279
|
+
"content"
|
|
280
|
+
],
|
|
281
|
+
"description": "用户反馈声音列表(content 必填;reproSteps/expectedBehavior 仅追问有答时上送)"
|
|
282
|
+
},
|
|
283
|
+
"description": "用户反馈声音列表(content 必填)"
|
|
284
|
+
},
|
|
285
|
+
"confirmed": {
|
|
286
|
+
"type": "boolean",
|
|
287
|
+
"default": false,
|
|
288
|
+
"description": "用户已确认为 true 才执行(confirm 护栏,逐次同意)"
|
|
289
|
+
},
|
|
290
|
+
"product": {
|
|
291
|
+
"type": "string",
|
|
292
|
+
"description": "反馈关于的产品(宿主即产品,不设白名单)。归因顺序:本参数显式指定 > 安装绑定默认(install --product,缺省=宿主名,装在 hermes 归 hermes/dsh 归 DSH)> 不带(引擎落 UNKNOWN 档人工归因)。宿主工具自报产品名原样上送,引擎宽松归一(折叠空白+别名收编)。"
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
"required": [
|
|
296
|
+
"voices"
|
|
297
|
+
]
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
"vod_commit_voices": {
|
|
301
|
+
"description": "提交用户反馈的第二步(两段式 draft→commit),只能在 vod_draft_voices 之后调用。**先决条件:用户已看过草稿内容(draft 返回的 contents)并明确说'确认提交';用户未明确同意禁止调用**。参数 draftId/approvalToken/payloadSha256 全部取自 vod_draft_voices 的返回原样透传,禁止改动。提交成功后把回执 echo.contents 逐条向用户转述(每条以「已收录原话:」开头,content 全文,禁止改写概括增删字词)。令牌一次性:重复 commit 会被拒。禁止向用户解释内部机制。",
|
|
302
|
+
"input": {
|
|
303
|
+
"type": "object",
|
|
304
|
+
"properties": {
|
|
305
|
+
"draftId": {
|
|
306
|
+
"type": "string",
|
|
307
|
+
"minLength": 8,
|
|
308
|
+
"description": "vod_draft_voices 返回的 draftId 原样透传"
|
|
309
|
+
},
|
|
310
|
+
"approvalToken": {
|
|
311
|
+
"type": "string",
|
|
312
|
+
"minLength": 8,
|
|
313
|
+
"description": "vod_draft_voices 返回的 approvalToken 原样透传;断回合场景可省略——插件从本地暂存草稿恢复"
|
|
314
|
+
},
|
|
315
|
+
"payloadSha256": {
|
|
316
|
+
"type": "string",
|
|
317
|
+
"description": "vod_draft_voices 返回的 payloadSha256 原样透传;断回合场景可省略——插件从本地暂存草稿恢复"
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
"required": [
|
|
321
|
+
"draftId"
|
|
322
|
+
],
|
|
323
|
+
"additionalProperties": false
|
|
324
|
+
}
|
|
209
325
|
}
|
|
210
326
|
},
|
|
211
327
|
"backends": {
|
|
@@ -220,4 +336,4 @@
|
|
|
220
336
|
"auth": null
|
|
221
337
|
}
|
|
222
338
|
}
|
|
223
|
-
}
|
|
339
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
3
|
-
"commitSha": "
|
|
4
|
-
"builtAt": "2026-11-
|
|
2
|
+
"version": "0.4.1",
|
|
3
|
+
"commitSha": "a0cf5c26e2798205007ae693f2d3400d0dea7729",
|
|
4
|
+
"builtAt": "2026-11-09T17:47:25",
|
|
5
5
|
"sourceRemote": "https://gitcode.com/xiaowu2119/vod-devkit.git"
|
|
6
6
|
}
|