@vibedev-si/dsh-vibedev 0.3.11 → 0.5.2

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.
Files changed (51) hide show
  1. package/README.md +193 -10
  2. package/THIRD-PARTY-NOTICES.txt +1 -1
  3. package/client/client.account-center.js +13555 -0
  4. package/client/client.js +3503 -878
  5. package/cordis.patch.yml +5 -0
  6. package/lib/account/center-business-contract.d.ts +22 -0
  7. package/lib/account/center-business.d.ts +6 -0
  8. package/lib/account/center-contract.d.ts +12 -0
  9. package/lib/account/center-monitor-contract.d.ts +10 -0
  10. package/lib/account/center-price-contract.d.ts +5 -0
  11. package/lib/account/center.d.ts +7 -0
  12. package/lib/account/index.d.ts +14 -0
  13. package/lib/{anthropic-messages-BgIfgjNt.js → anthropic-messages-QcnVMGaA.js} +11 -11
  14. package/lib/contract-v1.types.d.ts +134 -0
  15. package/lib/contracts.d.ts +34 -0
  16. package/lib/fetch/host-web.d.ts +34 -0
  17. package/lib/fetch/provider.d.ts +125 -0
  18. package/lib/fetch/wiring.d.ts +124 -0
  19. package/lib/gateway/errors.d.ts +29 -1
  20. package/lib/gateway/http.d.ts +24 -0
  21. package/lib/host-locales.d.ts +4 -0
  22. package/lib/index.d.ts +23 -0
  23. package/lib/index.js +3630 -505
  24. package/lib/{node-D58f7Ea6.js → node-CcLPV4RA.js} +4 -4
  25. package/lib/{node-Br-0fshF.js → node-vkDR3GtK.js} +2 -2
  26. package/lib/pricing.d.ts +21 -1
  27. package/lib/search/provider.d.ts +28 -5
  28. package/lib/service.d.ts +36 -9
  29. package/lib/tasks/remote.d.ts +4 -4
  30. package/lib/tasks/store.d.ts +54 -9
  31. package/lib/tasks/tracker.d.ts +45 -45
  32. package/lib/tools/image.d.ts +1 -0
  33. package/lib/tools/video.d.ts +3 -0
  34. package/lib/util/files.d.ts +2 -0
  35. package/locale/en.json +13 -0
  36. package/locale/zh.json +13 -0
  37. package/node_modules/@vibedev-si/dsh-ecosystem/LICENSE +22 -0
  38. package/node_modules/@vibedev-si/dsh-ecosystem/README.md +154 -0
  39. package/node_modules/@vibedev-si/dsh-ecosystem/catalog/catalog.json +167 -0
  40. package/node_modules/@vibedev-si/dsh-ecosystem/catalog-updates.js +326 -0
  41. package/node_modules/@vibedev-si/dsh-ecosystem/catalog-validator.js +263 -0
  42. package/node_modules/@vibedev-si/dsh-ecosystem/client.js +2816 -0
  43. package/node_modules/@vibedev-si/dsh-ecosystem/cordis.patch.yml +5 -0
  44. package/node_modules/@vibedev-si/dsh-ecosystem/icon.svg +5 -0
  45. package/node_modules/@vibedev-si/dsh-ecosystem/index.js +169 -0
  46. package/node_modules/@vibedev-si/dsh-ecosystem/locale/en.json +6 -0
  47. package/node_modules/@vibedev-si/dsh-ecosystem/locale/zh.json +6 -0
  48. package/node_modules/@vibedev-si/dsh-ecosystem/package.json +75 -0
  49. package/node_modules/@vibedev-si/dsh-ecosystem/remote-catalog.js +212 -0
  50. package/package.json +41 -24
  51. package/scripts/verify-fetch-joint.mjs +72 -0
package/README.md CHANGED
@@ -6,10 +6,70 @@
6
6
  - **媒体生成**:Agent 可以生成图片、视频、音乐、播客和语音,并把语音转成文字,结果保存在工作区的 `media/` 目录下;
7
7
  - **网页搜索**:提供走 VibeDev 网关的网页搜索,见下面的「网页搜索」。
8
8
 
9
- 费用都从你的 VibeDev 余额里扣,DeepSeek 账号照常由 DeepSeek Harness 自己管理,两边互不影响。还没有 VibeDev 账号的话,可以在 [VibeDev](https://api.vibedev.studio) 注册。
9
+ 费用与可用计费方式以 VibeDev 网关回执为准,DeepSeek 账号照常由 DeepSeek Harness 自己管理,两边互不影响。还没有 VibeDev 账号的话,可以在 [VibeDev](https://api.vibedev.studio) 注册。
10
10
 
11
11
  本插件由 `dsh-media` 改名而来,见下面的「从 dsh-media 升级」。
12
12
 
13
+ ## 0.5.2 用户可见更新
14
+
15
+ 账户中心的邀请返利页适配网关的消费返利。页面说明你邀请的好友分别按旧充值模式还是消费返利获得返利,混合时分别给出人数,消费返利已暂停的人数单独说明,并说明新邀请的好友按哪种方式返利。页面新增各模型消费返利比例(含比例来源:模型默认或你的专属比例)和返利记录(计入本金、当时确定的比例、返利或退款冲回、状态和冻结到期时间,可加载更早的记录)。旧充值返利比例不再作为页面的“返利比例”显示,只在说明旧充值模式的好友时标明。「刷新返利」改为「更新并解冻到期返利」。网关尚未提供这些读取接口时,页面提示“网关暂不支持消费返利详情”,其余功能照常。见[返利读取契约](docs/account-affiliate-rebates-contract.md)。
16
+
17
+ 网页搜索按已部署的 DeepSeek Search 网关契约处理查询长度、结构化诊断和重试,Agent 使用说明随之更新,详见[网页搜索](#网页搜索)。
18
+
19
+ 兼容 DeepSeek Harness 0.2.2:插件按官方 npm SDK `0.2.2-alpha.2` 编译;在 DSH 0.2.2 中,VibeDev 搜索说明只在本步骤可以使用 `web_search` 时出现。DSH 0.2.1 宿主行为不变。
20
+
21
+ 新增可选的网页正文提取 `gatewayFetch`,默认关闭,默认仍用本地 HTTP 抓取,见下文「网页正文提取」。
22
+
23
+ ## 0.5.0 用户可见更新
24
+
25
+ 侧边栏的「VibeDev」集中提供「账户」和「插件」两个分区。账户页保留仪表盘、使用记录、订阅和原有服务;生态 0.2.0 加入插件分区后不再单独占用侧边栏入口,更新数量会同时提示在插件分区和 VibeDev 入口上。插件分区未打开时不加载其页面内容,未登录也能浏览插件。
26
+
27
+ 登录、充值、用量和 Film 的账户入口仍回到账户分区;插件页与更新页使用浏览器内导航,不改变网关或 Film 的账户页面枚举。两个分区共用现有账号状态,提供中英文、深浅主题和窄窗口选择器。搭配旧生态时继续保留独立生态入口。
28
+
29
+ 生态 0.2.0 的精确副本随账号包提供,安装时无需单独从 registry 下载配套副本。没有独立生态配置时,配套行自动启用;已有独立安装或桌面内置生态时沿用其配置,不重复加载,也不覆盖用户主动禁用的选择。独立生态可按自己的版本更新;配套副本随账号插件更新。单独安装生态不会反向创建依赖,页面会提供确认后补装账号插件的入口。
30
+
31
+ ## 0.4.4 用户可见更新
32
+
33
+ 账户中心补齐原生充值、我的订单、兑换、邀请返利和个人资料,与仪表盘、使用记录、订阅、渠道状态及模型价格使用同一套紧凑布局。充值可点选快捷金额或填写自定义金额,选择支付方式后,点击带实付金额的确认按钮即可创建订单。付款页直接显示二维码或收银台入口,并自动查询订单状态;仅在确认入账后刷新余额。手续费、活动和限额按网关配置展示,详细计算可展开查看。支付二维码在本机生成,支付认证及密码、邮箱和二次验证等安全设置继续在官网完成。
34
+
35
+ 订单支持常用筛选、原位详情和窄窗口卡片;兑换提供明确权益回执和继续兑换入口;邀请页集中展示返利、复制链接与全额转入确认;个人资料按账号概况、基本资料、余额提醒及官网安全设置分区。页面只使用服务端提供的数据,未知或未配置的金额与状态不会显示成零。
36
+
37
+ 渠道状态只展示有真实观测数据的渠道和模型;失败请求及健康状态未知但有历史样本的条目仍保留,没有请求记录的目录占位不再逐项展示。
38
+
39
+ 订单可筛选、分页、查看明细,并按网关权限取消、查询支付或申请退款;兑换、返利转入及资料保存均显示可恢复的操作回执。连接中断或结果未确认时只查询原操作,不自动重复提交;多个窗口共享操作保护,刷新后仍能继续查询。旧网关未提供接口时给出官网入口,权限拒绝不会绕过。
40
+
41
+ 渠道状态按“筛选、三项摘要、趋势、底部模型列表”整理,不再显示错误原因或无效的详情按钮。页面继续支持中英文、深浅主题和窄窗口;人民币余额与实际支付币种分别标注,未知限额及金额保持未知。媒体调用、定价、路由和扣费逻辑保持现有方式。
42
+
43
+ ## 0.4.3 用户可见更新
44
+
45
+ 账户中心新增原生「渠道状态」与「模型价格」页面,沿用仪表盘、使用记录和订阅的紧凑布局。窄窗口用页面选择器切换,不再显示「可用渠道」入口;旧版调用该入口会打开模型价格。
46
+
47
+ 模型价格直接读取网关当前发布目录和分组售价,提供搜索、类型与分组筛选、分页、能力详情,完整保留上下文区间和 5 分钟/1 小时缓存创建价格。图片、视频和音频显示各自的规格、费用单位及预估条件;官方参考价仅在已确认的相同条件下比较,未绑定或不匹配时给出原因。
48
+
49
+ 渠道状态显示权限范围内的健康、成功率、延迟、缓存率、趋势与安全错误分类;兼容旧版监控,区分历史覆盖不足、未知状态和权限限制。尚未原生接入的其他服务继续明确打开官网。
50
+
51
+ ## 0.4.2 用户可见更新
52
+
53
+ 账户中心按 Sub2 的信息层级重新整理:顶部切换仪表盘、使用记录和订阅,官网服务单独标明外链。仪表盘突出余额、请求与消费,趋势、模型与最近记录更紧凑;图表可选择数据点查看精确值。
54
+
55
+ 使用记录优先展示筛选、汇总与列表,分析图按需展开。缓存读取、创建及 5 分钟/1 小时拆分分层展示,实际扣款与标准计费分别保留。详情按概览、Token/缓存、费用与技术信息分区,支持复制安全的请求 ID;列设置可恢复推荐列,已有偏好仍保留。订阅突出状态、真实额度窗口与恢复时间,读取失败时明确标注旧数据。
56
+
57
+ 支持中英文、深浅主题和窄窗;刷新期间避免重复刷新。费用和可用性仍以网关回执为准,未提供的字段保持未知。本版本未增加原生支付或改变媒体生成与扣费方式。
58
+
59
+ ## 0.4.1 用户可见更新
60
+
61
+ 账户中心完整扩充前三页:仪表盘展示实际/标准费用、Token 缓存、RPM/TPM、日期趋势、模型与平台用量;使用记录提供同条件统计、筛选、排序、列显隐、分页和安全详情。CSV 明确只导出当前页;本条金额折算的单价不会冒充历史价卡。缺失数据保持未知,刷新失败会标记同一账号和查询的旧快照。订阅主页面补充真实计划元数据和官网续费入口,仅显示网关提供的真实 5 小时/7 天窗口比例。其余七页仍使用官网入口,新订阅扣费与支付写入保持未启用。
62
+
63
+ 从仪表盘查看使用记录会保留已选日期与时区。订阅按网关给出的完整恢复时刻刷新,安全错误详情提供分类、阶段和请求/任务标识,不展示原始请求或上游响应。详情在桌面、窄屏及深浅主题中保持标题和关闭按钮可见,内容内部滚动。新增接口尚未开放时按页面提供官网入口;权限拒绝保持拒绝,不自动降级。
64
+
65
+ ## 0.4.0 用户可见更新
66
+
67
+ - 新增账户中心:仪表盘、用量、订阅与门户快捷入口;充值直接打开原充值页。旧网关继续使用已有只读接口。
68
+ - 余额卡与设置展示订阅比例、恢复时间和读取失败;支持中英文、深浅主题与窄屏。新订阅功能仅在网关实际提供时显示真实快照。
69
+ - 升级保留旧任务;任务按网关与账号隔离。查询或下载失败只恢复原任务,图片提交结果不明时不会自动重复生成。
70
+ - 具体参数原因保留并净化敏感信息。生成、提交和计费状态分别按网关回执显示;超时不代表未扣费。
71
+ - 新报价可用时绑定原operationId;旧网关仍为目录预估。新写账、支付写入及图片持久恢复尚未启用。
72
+
13
73
  [English](#english)
14
74
 
15
75
  ## 安装
@@ -117,7 +177,31 @@
117
177
 
118
178
  ## 网页搜索
119
179
 
120
- 插件注册了一个网页搜索提供方 `vibedev-gateway`,用你的 VibeDev 登录调用网关的搜索。注册不等于启用:DeepSeek Harness 默认仍用自己的搜索;想改用 VibeDev 的,在配置文件里把 `web` 一行的 `searchProvider` 设为 `vibedev-gateway`(VibeDev 应用默认就是这样)。搜索本身不收费,但余额为零时网关会拒绝所有请求,包括搜索。
180
+ 插件注册网页搜索提供方 `vibedev-gateway`,用现有 VibeDev 登录调用 `POST /v1/vibedev/web-search`,保持 `query` / `max_results` 请求及 `results` 响应兼容。注册不等于启用:DeepSeek Harness 默认仍用自己的搜索;想改用 VibeDev,在配置文件的 `web` 行把 `searchProvider` 设为 `vibedev-gateway`(VibeDev 应用默认如此)。供应商 Key 只保存在网关,客户端不直连供应商。
181
+
182
+ 完整搜索表达式最多 **128 个 Unicode 字符(码点)**,包括 `site:`、`lang:`、`after:`、`before:` 等条件。建议使用短关键词。超长在发送前拒绝,不截断或自动拆成多次搜索;网关报 `WEB_SEARCH_QUERY_TOO_LONG` 时保留 message、field 与 max_characters。`max_results` 为 1–20,省略时由网关默认 10。分类只支持 `general`,新闻、地区或官方资料需求用关键词和支持的站点、语言、时间条件表达;语言筛选不表示限制地区。本 provider 不额外发送分类或筛选字段。
183
+
184
+ 搜索错误保留实际 code、category、retryable、field、maxCharacters 与有效 Retry-After;这些安全诊断也随工具错误正文返回给 Agent,原始提示会移除凭据、链接和本地路径。只有明确 `retryable: true` 的 429/503 且单次等待不超过 10 秒才自动重试,最多两次。预算耗尽及平台供应商账号/凭据错误始终停止;不会要求用户为平台供应商充值、刷新登录或退出账号。真正的用户 Token 拒绝继续走现有的一次续期机制,400 参数错误不原样重试。
185
+
186
+ 200 空结果有效。URL、标题、摘要和可选发布时间按网关返回保留,不补造全文或日期。搜索摘要不等于全文,也不保证最新或事实正确;关键结论应打开可靠来源核对,网页内容按不可信数据处理。`web_search` 可见且宿主提供 systemPrompt 时,账号插件增加明确限定于 VibeDev 网关的使用说明;隐藏工具或卸载插件后不保留该说明,不改其他 provider 的工具参数。
187
+
188
+ 搜索成本和鉴权资格以网关为准,本版不改变余额或订阅规则,也不按界面余额预先拦截。共享鉴权仍可能对余额为零的父级分组返回 `INSUFFICIENT_BALANCE`,即使用户另有订阅,也不能据本次更新承诺零余额可用。
189
+
190
+ ## 网页正文提取(`gatewayFetch`,默认关闭)
191
+
192
+ 默认 Fetch 仍使用现有 HTTP provider。网关已有 [Web Fetch V1 契约](https://github.com/CrisLIUning/sub2-vibedev/blob/main/docs/vibedev/web-fetch-v1.md)(revision `2026-10-30.1`)。把插件配置 `gatewayFetch` 设为 `true` 后,`apply` 在 `ctx.inject(['web'])` 内注册抓取提供方 `vibedev-gateway`(与搜索同一 id,两个注册表独立);注册不等于启用:只有 profile 把 `web.fetchProvider` 设为 `vibedev-gateway` 才会被选中。宿主固定为 `http` 时网关路径不会被使用;宿主固定为 `vibedev-gateway` 而账号没有该能力时,注册项改用宿主自己挂载的 `http` 提供方。
193
+
194
+ 注册项每次抓取先读真实的 `/v1/account/entitlements`,复用 `GatewayHttp.entitlements` 以 `${gatewayOrigin}\nuser:${userId}` 为键的 30 秒账号/网关隔离缓存;登录、账号切换和插件登录变化沿用现有的 `identityInvalidated` 钩子清空快照。仅当 `capabilities` 含 `web-fetch-v1` 且 `web_fetch` 元数据有效时才用 `GatewayFetchProvider`;只有确定没有该能力才委派给宿主已挂载的本地 `http` 提供方(沿用宿主那一行配置的限额与 User-Agent),不递归调用已选中的网关 provider,也不调用 `ctx.web.fetch`。能力读取失败或被拒绝、元数据无效、请求被拒绝、限流、超时、供应商或预算错误都明确报错:不降级、不自动重发,也不清登录;只有 401 且确属真实用户鉴权失败时才经现有凭据链 reject 并重新 resolve 一次,开发密钥不续期。
195
+
196
+ 一次抓取绑定开始时的账号身份(VibeDev `userId`)与网关 origin:能力读取返回后、取得网关凭据时、发 POST 前、以及 401 续期后重发前都会重新读取身份。**凭据只取自同一次已验证 `userId` 与 origin 的身份读取**(`AccountIdentity` 同时给出凭据与用户),能力读取的凭据也由该操作绑定而不是共享凭据平面;401 响应在 reject 之前再次核对身份,因此切号后不会 reject 新账号的登录,另一账号的 token 也不会与本操作配对。任一变化(切号、退出登录、网关 origin 改动)立即以 `ACCOUNT_CHANGED`(`retryable: false`)终止本次抓取,既不把原操作交给新账号,也不回退本地;同账号续期只换 token、不换用户,因此仍只续期一次并重发一次。整个抓取共用一个 40 秒总预算,贯穿身份读取、能力读取、凭据取得、网关 POST、401 续期与重发以及能力缺失后的本地后备,各阶段不会各自重新计时;调用方取消与总超时分别报 `WEB_ABORTED` 与 `WEB_FETCH_TIMEOUT`,超时后不再重发。
197
+
198
+ 本地后备不复制、不重建:宿主 `ctx.web` 提供 `getFetchProvider` 时(VibeDev 桌面端),`src/index.ts` 注册时传入 `resolveLocal: () => webCtx.web.getFetchProvider?.('http')`,只有在账号确定没有该能力的那一刻才向宿主取当前挂载的 `http` 提供方,因此下一次 HMR 或配置改动会被跟随。宿主没有挂载该提供方时报 `WEB_FETCH_LOCAL_PROVIDER_MISSING`,挂载了但自称不可用时报 `WEB_FETCH_LOCAL_PROVIDER_UNAVAILABLE`;官方 DSH 宿主没有 `getFetchProvider`,此时报 `WEB_FETCH_LOCAL_PROVIDER_UNREACHABLE`。这些情况下都不构造默认副本、也不把缺失当成“没有能力”。`GatewayFetchWiring` 仍接受显式 `local`(测试与直接使用方),它优先于 `resolveLocal`。
199
+
200
+ 该接口是正文提取,结果保持官方 SDK 的 `WebFetchResult` 类型:网关不报告最终地址与目标状态,`url` 填请求地址、`statusCode` 填 200(与官方 DeepSeek Fetch 提供方相同),并标记 `contentSource: extracted`,VibeDev 宿主据此把两者显示为未知;请求地址另存于 `requestedUrl`,Markdown 是 `body.kind: text` 加 `bodyFormat: markdown`,供应商正文完整性固定 `sourceCompleteness: unknown`,不从 `truncated: false` 推断完整。SDK 的 `gateway` 回执保留真实缓存标志和安全请求编号;该编号不是持久任务或幂等键。取消只保证客户端停止等待,不证明供应商取消或未计费。
201
+
202
+ 本插件按官方 npm SDK 编译。VibeDev 宿主新增的 `WebFetchResult` 字段与 `WebRuntime.getFetchProvider` 在 `src/fetch/host-web.ts` 中以模块扩充声明为可选,使用前先检测。网关安全范围仅为初始 URL/DNS 预检及供应商管理抓取,不声明全程 DNS 固定、同源跳转或原网页编码保证。
203
+
204
+ 显式联合验收入口为 `node scripts/verify-fetch-joint.mjs <一至两个已授权公开URL>`。由受控运行方把短效、具备权限的 VibeDevAppToken 注入单个进程的 `VIBEDEV_FETCH_TEST_APP_TOKEN`,不要贴到聊天、保存到仓库或使用 DeepSeek Key。该入口最多两个 POST、总等待 80 秒、没有自动重试,只输出脱敏回执;缺少凭据直接报告阻断且零请求。手动验收使用契约快照,不等于能力已经公告或自动选择已验收。
121
205
 
122
206
  ## 媒体工具
123
207
 
@@ -156,8 +240,8 @@
156
240
  - VibeDev 的聊天模型按用量计费,价格以 VibeDev 网关为准。
157
241
  - 图片按张计费,视频按秒计费(参考视频的时长也计入),音乐和播客按次计费,语音按原始秒计费(按服务商返回的原始时长,可能和播放时长不同),转写按分钟计费。`media_models` 会列出当前价格;目录没有给出价格的模型显示「未定价」,不代表免费。
158
242
  - 按视频 Token 计价的模型(目录里的 `video_pricing`)按分辨率和有无参考视频、参考音频、参考图(含首尾帧)分档,例如「480p 无参考视频 ¥60.06/百万 Token(预计 ¥0.5819/秒)」。生成前的金额只是预估:每秒预估价 ×(输出时长 + 所有参考视频时长),最终按实际视频 Token 结算。参考视频时长未知、目录没有每秒预估价或计价方式当前版本不支持时,显示「无法预估;按实际视频 Token 用量结算」,不会当成免费或未定价。视频生成后费用仍在确认(`billing_status: pending`)时,视频照常保存,只是费用待确认,不会重新生成。
159
- - 视频和音频只在成功时扣费,失败和取消的任务不扣。视频提交后无法取消。
160
- - 同一次操作只会生成一次:提交没有得到确认时,会用同一个请求键向网关确认结果;查询或下载失败只会重新查询、刷新链接,不会重新提交。结果已经生成、但费用还在结算(`settlement_pending`)时,结果照常保存,不会重新生成。
243
+ - 视频和音频的扣费、释放及未知状态只按网关明确的账务回执展示;失败或取消本身不能证明未扣费。视频提交后无法取消。
244
+ - 视频和音频提交结果待确认时,保留原操作编号与已落盘请求,只用原 Key 和原请求核对,不自动创建新编号。默认首轮总计最多 3 次尝试,之后最多 30 次后台核对,核对窗口从原任务创建起共 5 分钟;这些默认值沿用 0.3.11。次数、上限、截止时间和退避时间均落盘,刷新、同号调用或重启不会重置预算;429 本身不证明未提交,等待网关的 Retry-After 后才核对。网关明确永久歧义时停止同键核对并保留 unknown;没有任务 ID 的记录也受默认 3 小时最长跟踪时间约束,最终为 lost/unknown,不表示可以自动换新编号。已取得任务 ID 后只查询和下载原任务。结果已生成但费用仍在结算(`settlement_pending`)时照常保存,不会重新生成。
161
245
  - 余额在每次付费请求结束后(对话回复、生成、转写)马上重新读取,侧栏和设置页几秒内就能看到扣费后的余额。
162
246
  - 视频、批量生图任务提交时,网关先把预估金额从可用余额转为冻结金额,任务结束后结算。余额卡片分别显示可用、冻结中与合计,设置页在有冻结金额时多显示一行;冻结金额的变化也会让页面及时更新。
163
247
  - 插件设置里的「每次付费生成前先询问」默认关闭。打开后,每次付费的媒体请求之前都会先弹出确认,并显示预估金额。
@@ -173,7 +257,7 @@
173
257
  | Claude 提示词缓存保留时间 | 默认 | 可选默认、5分钟、1小时;保存后用于后续 Claude Messages 请求,默认不是关闭缓存。 |
174
258
  | 默认生图 / 视频 / 音乐 / 播客 / 语音合成 / 转写模型 | 空 | 留空时由 Agent 按模型目录选择;可以填模型 id 或别名。 |
175
259
 
176
- 另有几项只能在配置文件(`cordis.patch.yml` 中 `dsh-vibedev` 一行)里改:`displayName`(普通模型分组名,默认 `VibeDev`)、`relayDisplayName`(中转模型分组名,默认「中转」)、`preferredModels`(排在最前的 VibeDev 模型)、`openBrowserOnSignIn`(登录时是否自动打开系统浏览器,默认开)、`catalogRefreshMinutes`(模型目录定时刷新间隔,默认 30 分钟;是没人打开余额卡片、账号菜单或设置时的兜底)、`client`(登录时报给网关的客户端名称,默认 `vibedev-plugin`)、`primary`(作为应用的主账号显示,默认关,VibeDev 应用里开)。
260
+ 另有几项只能在配置文件(`cordis.patch.yml` 中 `dsh-vibedev` 一行)里改:`displayName`(普通模型分组名,默认 `VibeDev`)、`relayDisplayName`(中转模型分组名,默认「中转」)、`preferredModels`(排在最前的 VibeDev 模型)、`openBrowserOnSignIn`(登录时是否自动打开系统浏览器,默认开)、`catalogRefreshMinutes`(模型目录定时刷新间隔,默认 30 分钟;是没人打开余额卡片、账号菜单或设置时的兜底)、`client`(登录时报给网关的客户端名称,默认 `vibedev-plugin`)、`primary`(作为应用的主账号显示,默认关,VibeDev 应用里开)、`gatewayFetch`(注册网关抓取提供方 `vibedev-gateway`,默认关;仍由 `web` 行的 `fetchProvider` 决定是否选中)。
177
261
 
178
262
  ## 从 dsh-media 升级
179
263
 
@@ -207,8 +291,71 @@ npm run build
207
291
 
208
292
  ---
209
293
 
294
+ 启动配置 `resendWindowMs`(1000–10800000 毫秒,默认 300000)、`submitAttempts`(1–30,默认 3)、`reconcileAttempts`(0–30,默认 30,0 关闭后台核对)会实际传入任务跟踪器;只对新操作生效,已有操作保留落盘的原预算。
295
+
210
296
  ## English
211
297
 
298
+ ### What changes in 0.5.2
299
+
300
+ The account center's affiliate page follows the gateway's consumption rebates. It explains whether the people you invited are on the old top-up rebate or consumption rebates, with the count of each for a mix and a separate count of those whose consumption rebates are paused, and which type new invitations get. The page adds the consumption rebate rate for each model with its source (the model default or your custom rate) and rebate records: counted principal, the rate fixed at the time, the rebate or refund reversal, the state and the freeze end, with older records on request. The old top-up rate is no longer shown as the page's rebate rate; it appears only when describing invitees on the old top-up rebate. "Refresh rebates" becomes "Update and release matured rebates". Without these gateway reads the page says the gateway does not provide consumption rebate details yet, and everything else keeps working. See the [rebate read contract](docs/account-affiliate-rebates-contract.md).
301
+
302
+ Web search follows the deployed DeepSeek Search gateway contract for query limits, structured diagnostics and retries, with updated Agent guidance; see Web search below.
303
+
304
+ DeepSeek Harness 0.2.2 compatibility: the plugin compiles against the official npm SDK `0.2.2-alpha.2`, and on DSH 0.2.2 the VibeDev search guidance appears only in steps where `web_search` is available. DSH 0.2.1 hosts behave as before.
305
+
306
+ Adds optional extracted-content Fetch (`gatewayFetch`), off by default; the default stays local HTTP. See "Extracted-content Fetch" below.
307
+
308
+ ### What changes in 0.5.0
309
+
310
+ The VibeDev sidebar entry brings Account and Plugins into one page. Existing account services remain available. Ecosystem 0.2.0 contributes its plugin pages here instead of adding a second sidebar entry; its update count appears on both the section tab and the VibeDev entry. Plugin content mounts only while selected, and can be browsed while signed out.
311
+
312
+ Sign-in, top-up, usage and Film account actions still select Account. Plugin navigation stays inside the Client and does not extend gateway or Film account page values. Both sections use the existing account state and support Chinese, English, light and dark themes, and a narrow-window selector. Older ecosystem releases keep their independent entry.
313
+
314
+ The account package includes an exact Ecosystem 0.2.0 copy, so installation needs no separate registry download for the companion. Its companion entry runs only when no explicit ecosystem entry exists. A standalone or application-owned ecosystem keeps its own configuration, including an intentional disable choice, without loading twice. Standalone ecosystem updates remain independent; the companion copy follows account-plugin updates. Installing the ecosystem alone creates no reverse dependency and offers a confirmed account-plugin installation action.
315
+
316
+ ### What changes in 0.4.4
317
+
318
+ The account center now includes native top-up, orders, redemption, referrals and profile pages in the same compact layout as the dashboard, usage, subscriptions, channel status and model prices. Pick a quick amount or enter a custom one, choose a payment method, then confirm the displayed total to create an order. The payment view shows the QR code or checkout link immediately and checks order status automatically; balances refresh only after crediting is confirmed. Fees, offers and limits follow gateway configuration, with an expandable breakdown. Payment QR codes are generated locally; provider authentication and security settings such as passwords, email and two-factor authentication continue on the official website.
319
+
320
+ Orders offer common filters, in-place details and narrow-window cards. Redemption shows benefit receipts and a clear way to redeem another code. The affiliate page groups rebate metrics, copying invitation links and confirmed full-balance transfers. Profile separates account information, basic edits, balance notifications and official website security settings. Missing amounts and states remain unknown rather than being displayed as zero.
321
+
322
+ Channel status lists only channels and models with observed data. Failed requests and historical observations with unknown current health remain visible; catalogue placeholders with no observations are omitted.
323
+
324
+ Filter and inspect your own orders, and cancel, check payment or request a refund when the gateway permits. Redemption, rebate transfer and profile changes return recoverable operation receipts. An interrupted or unconfirmed action is queried using its original identity rather than automatically submitted again. Multiple windows share action protection and pending receipts survive refresh. Unsupported gateways offer website links; access denials remain denials.
325
+
326
+ Channel status now follows filters, three summary metrics, availability trends and a bottom model table, with error-reason and inactive detail controls removed. Chinese and English, light and dark themes and narrow windows remain supported. CNY account balances and actual payment currencies are labeled separately, and missing limits or amounts remain unknown. Existing media calls, pricing, routing and billing are unchanged.
327
+
328
+ ### What changes in 0.4.3
329
+
330
+ The account center adds native Channel status and Model prices using the compact dashboard, usage and subscription layout. Narrow windows use a page selector. Available channels is no longer listed; older callers are directed to Model prices.
331
+
332
+ Model prices reads the gateway's current published catalog and group retail prices, with search, kind/group filters, pagination and capability details. Context tiers and separate 5-minute/1-hour cache creation rates remain visible. Image, video and audio conditions distinguish final rates from estimates. Official references are compared only when confirmed conditions match; missing mappings and mismatches explain why no comparison is shown.
333
+
334
+ Channel status shows authorized health, success, latency, cache, trends and safe error categories. It supports legacy monitoring and distinguishes partial history, unknown states and access restrictions. Services not yet implemented natively remain clearly labeled website actions.
335
+
336
+ ### What changes in 0.4.2
337
+
338
+ The account center follows Sub2's information hierarchy with native Dashboard, Usage and Subscriptions tabs, plus separately labeled website links. The dashboard emphasizes balance, requests and spending, with compact charts, recent activity and selectable exact chart values.
339
+
340
+ Usage puts filters, summaries and records first, with optional analytics. Cache reads, creation and 5-minute / 1-hour creation splits are distinguished; actual and standard charges remain separate. Grouped details provide a safe request-ID copy action. Existing column preferences are retained, with an explicit recommended-column reset. Subscription cards emphasize availability, real quota windows and recovery times, and identify retained data after a failed refresh.
341
+
342
+ English and Chinese, light and dark themes, and narrow layouts are supported. Refresh controls wait for related reads. Unknown fields stay unknown, while charges and availability follow the gateway receipt. This version adds no native payment flow and does not change media generation or billing.
343
+
344
+ ### What changes in 0.4.1
345
+
346
+ The first three account pages now include actual and standard costs, cache tokens, RPM/TPM, date trends, model and platform usage, matching usage filters, sorting, visible columns, pagination and safe details. CSV exports the current page only. Observed unit prices are calculated from that record’s amounts, never a historical tariff. Missing facts stay unknown; failed refreshes label the last successful snapshot for the same account and query. Subscription metadata and official renewal links accompany only gateway-provided 5-hour/7-day percentages. The other seven pages retain website links; new subscription billing and payment writes remain disabled.
347
+
348
+ Opening usage from the dashboard retains the selected dates and time zone. Subscription pages refresh at the gateway’s complete reset instant. Safe error details include local explanations and request/task identifiers, without raw requests or upstream responses. Detail dialogs keep their title and close controls visible with internal scrolling on desktop and narrow screens in both themes. Unavailable routes offer the official website; permission refusals remain refusals.
349
+
350
+ ### What changes in 0.4.0
351
+
352
+ Video/audio recovery retains the original key and saved wire body. Historical 0.3.11 defaults are 3 initial attempts in total, up to 30 additional background checks, and one 5-minute recovery window from task creation. Attempts, limits, deadline and Retry-After backoff survive refresh and restart. Permanent submission ambiguity stops further POST checks; expired tracking becomes lost/unknown after at most 3 hours, including tasks without a gateway ID. Lost does not authorize a new operation. Once an ID is known, recovery only polls/downloads that task. Plugin Config exposes resendWindowMs (1000–10800000 milliseconds, default 300000), submitAttempts (1–30, default 3) and reconcileAttempts (0–30, default 30; 0 disables background POST checks), and passes them to TaskTracker. These startup settings affect new operations only; changing them does not reset a stored operation's limits. TrackerOptions also exposes maxAgeMs for Host integrations.
353
+
354
+ Account center adds dashboard, usage, subscriptions and portal shortcuts; top-up opens the original checkout page directly. Older gateways retain their existing read-only routes. Subscription cards show quota percentages, reset times and read failures in Chinese or English, with light, dark and narrow layouts. New subscription facts appear only when supplied by the gateway.
355
+
356
+ Upgrades retain old tasks and isolate recovery by gateway and account. Query and download failures recover the original task. An uncertain image submission is not automatically generated again. Safe parameter reasons are preserved, while submission, generation and billing states follow separate gateway facts; a timeout does not mean no charge. New quotes bind the original operation ID when available; old gateways keep catalog estimates. New billing writes, payment writes and durable image recovery remain unavailable.
357
+
358
+
212
359
  **American API default**: production defaults to `https://api.vibedev.studio`. Upgrades from unscoped historical state require a new app-token login before listing models. Every origin has separate credentials, devices and durable media tasks; grants must carry a matching origin. Historical unmarked files and the old credential record stay intact but are never read, imported, resumed or resubmitted. Existing American-origin grants remain usable. Other accounts, chats, workspaces and historical media URLs are unchanged. API control requests, account web links and web search follow the selected origin; uploads/downloads preserve the server's complete signed URL without an app token. Redirects and cross-region fallback are refused. S256 PKCE, state, random localhost callback, SSE, heartbeats, cancellation and same-origin idempotency remain. Developer-key fallback is disabled by default and the old shared environment variable is ignored; development requires an explicitly named gateway-specific variable. Local verification neither removes the server's 503 gate nor sends real model or paid media tests.
213
360
 
214
361
  Sign in to VibeDev in DeepSeek Harness, next to the DeepSeek account:
@@ -216,7 +363,7 @@ Sign in to VibeDev in DeepSeek Harness, next to the DeepSeek account:
216
363
  - **VibeDev models**: once signed in, the model picker gains a "VibeDev" group for ordinary gateway models and a separate 中转 (Relay) group for `relay-` chat models, next to DeepSeek's;
217
364
  - **Media generation**: the agent generates images, videos, music, podcasts and speech, and transcribes speech; results are saved in the workspace under `media/`.
218
365
 
219
- Everything is paid from your VibeDev balance; the DeepSeek account stays DeepSeek Harness's own, and the two do not affect each other. To create an account, register at [VibeDev](https://api.vibedev.studio). This plugin was renamed from `dsh-media`.
366
+ Billing and available payment sources follow the VibeDev gateway receipt; the DeepSeek account stays DeepSeek Harness's own, and the two do not affect each other. To create an account, register at [VibeDev](https://api.vibedev.studio). This plugin was renamed from `dsh-media`.
220
367
 
221
368
  **Install**: install `@vibedev-si/dsh-vibedev` by package name on the Plugins page (the `@vibedev-si/` scope is required), or from the [VibeDev Plugin Center](https://github.com/VibeDev-Si/dsh-ecosystem); from the command line, `dsh plugin add @vibedev-si/dsh-vibedev`, or `dsh plugin --profile desktop add @vibedev-si/dsh-vibedev` for the desktop app (quit it fully first). The VibeDev app ships with the plugin built in, and there the VibeDev account is the main account (the bottom row of the sidebar and the first Settings section), with the DeepSeek account as the second one. Within 24 hours of a release, name the version (e.g. `@vibedev-si/dsh-vibedev@0.2.5`): pnpm does not install versions younger than a day by default.
222
369
 
@@ -248,21 +395,45 @@ Everything is paid from your VibeDev balance; the DeepSeek account stays DeepSee
248
395
 
249
396
  **Generation progress (0.3.11)**: when a video or audio task answer (polls, and the submission's answer) carries progress facts, the plugin reads them and hands them to the film workbench and the agent. `timing.phase` is normalized to `pending_submit`, `queued`, `generating`, `archiving` or `done`, accepting the aliases `submitting`, `waiting`, `running`, `processing`, `in_progress`, `uploading`, `finalizing`, `completed` and `succeeded`. `estimated_remaining_seconds` and `remaining_p90_seconds` become the completion times `estimatedCompletionAt` and `p90CompletionAt`, anchored to the local time the answer arrived; `started_at` and `phase_started_at` are moved onto the local clock by the difference to `server_time` (none when it is missing). `estimate_source`, `confidence` and `progress` are kept (`progress` 0–1, a value above 1 up to 100 read as a percentage); `queue` gives `position`, or `position_min`/`position_max` when only a range is known; `next_poll_after_seconds` sets the next query, kept within 2–30 s, and without it the usual rhythm applies. A field of the wrong type, a negative number or an unknown value is dropped on its own and never fails the task. `vibedevMedia` task views gain `stage` (`submitting`, `queued`, `generating`, `saving`), `timing` (epoch milliseconds on the local clock) and `queue`; finished tasks (completed, failed, lost) carry none of them. `media_tasks` and background job results state the stage, queue position and coarse time left ("under 1 min", "about N min", "slower than estimated" once the estimate has passed; low-confidence estimates are not stated), in English with the Chinese wording. Without these fields, polling, records and text are exactly as in 0.3.10. Plugin-only update; the desktop app is not rebuilt.
250
397
 
251
- **Web search**: the plugin registers the web search provider `vibedev-gateway`, signed in with your VibeDev account. Registering does not select it: DeepSeek Harness keeps its own search unless the profile sets `searchProvider: vibedev-gateway` on the `web` row (the VibeDev app does). Searching is free, but the gateway refuses every request, searches included, while the balance is zero.
398
+ **Web search**: `vibedev-gateway` uses the existing VibeDev sign-in for `POST /v1/vibedev/web-search`, retaining the `query` / `max_results` request and `results` response. Registering does not select it: DeepSeek Harness keeps its own provider unless the profile selects `searchProvider: vibedev-gateway` on the `web` row (the VibeDev app does). Provider keys stay on the gateway; the client never calls the supplier directly.
399
+
400
+ The complete expression is limited to **128 Unicode code points**, including `site:`, `lang:`, `after:` and `before:` filters. Prefer short keywords. Oversized queries are rejected before dispatch, never truncated or automatically split into extra searches. A gateway `WEB_SEARCH_QUERY_TOO_LONG` retains its message, field and max_characters. Result counts are 1–20; an omitted count uses the gateway's default 10. Only `general` search is supported: express news, location or official-source needs through keywords and supported filters. Language does not enforce geography, and this provider adds no category or structured-filter fields.
401
+
402
+ Errors retain their code, category, retryable flag, field, maxCharacters and valid Retry-After. These safe facts also reach the Agent in the tool's error text; displayed gateway messages remove credentials, URLs and local paths. Only explicitly retryable 429/503 responses with a wait of at most 10 seconds are retried, at most twice. Budget exhaustion and platform-provider account/credential failures stop immediately and do not trigger a user top-up or sign-in refresh. Genuine user-token rejections retain the existing single renewal; parameter errors are not repeated unchanged.
403
+
404
+ Empty 200 results are valid. URLs, titles, snippets and optional publication dates are retained without invented bodies or dates. Snippets are not full pages, verified facts or a freshness guarantee: check reliable sources for important claims and treat web content as untrusted. When web_search is visible and systemPrompt exists, the plugin adds explicitly VibeDev-conditional guidance. Hiding the tool or unloading the plugin removes the guidance without altering other providers' tool parameters.
405
+
406
+ Search eligibility and cost follow the gateway. This version changes no balance or subscription rules and does not pre-block from the displayed balance. Shared authorization can still return INSUFFICIENT_BALANCE for a zero-balance parent group even when the user has another subscription; zero-balance eligibility is not promised.
407
+
408
+ ### Extracted-content Fetch (`gatewayFetch`, off by default)
409
+
410
+ The default Fetch provider remains local HTTP. The gateway implements [Web Fetch V1](https://github.com/CrisLIUning/sub2-vibedev/blob/main/docs/vibedev/web-fetch-v1.md), revision `2026-10-30.1`. Setting the plugin's `gatewayFetch` config to `true` makes apply register the fetch provider `vibedev-gateway` inside `ctx.inject(['web'])` (the same id as search; the two registries are separate). Registering does not select it: only a profile that sets `web.fetchProvider: vibedev-gateway` uses it. With the host pinned to `http` the gateway path is never used; with the host pinned to `vibedev-gateway` and no advertised capability, the registration serves the `http` provider the host itself mounted.
411
+
412
+ Each fetch first reads the real `/v1/account/entitlements`, reusing `GatewayHttp.entitlements` and its 30-second account/gateway-scoped cache keyed by `${gatewayOrigin}\nuser:${userId}`; the existing `identityInvalidated` hooks clear that snapshot on sign-in, account switch and plugin sign-in changes. Only `capabilities` containing `web-fetch-v1` with valid `web_fetch` metadata selects `GatewayFetchProvider`; only a capability that is definitely absent delegates to the `http` provider the host mounted (with that row's own limits and User-Agent), never to the selected gateway provider again and never to `ctx.web.fetch`. Failed or refused capability reads, invalid metadata, refusals, rate limits, timeouts and supplier/budget errors are named errors: no fallback, no automatic resend, no sign-out. A 401 renews through the existing credential chain at most once and only for a real user authentication failure; a development key is never renewed.
413
+
414
+ One fetch is bound to the account identity (VibeDev `userId`) and gateway origin it started under: the identity is read again after the capability returns, when the gateway credential is taken, before the POST, and after a 401 renewal before the resend. A credential is only ever taken from the same identity read that verified the `userId` and origin (`AccountIdentity` supplies both), and the capability read carries that operation-bound credential instead of the shared credential plane; a 401 is checked against the account again before anything is rejected, so a switch neither rejects the replacing account's sign-in nor pairs another account's token with this operation. A change — an account switch, a sign-out, or a different gateway origin — ends the fetch with `ACCOUNT_CHANGED` (`retryable: false`): the operation is never handed to the new account and never falls back locally. A same-account renewal only rotates the token, so it still renews once and resends once. The whole fetch spends one 40-second budget across the identity read, the capability read, the credential, the gateway POST, a renewal and resend, and the local fallback; no stage restarts it, a caller cancellation is `WEB_ABORTED` while the budget expiring is `WEB_FETCH_TIMEOUT`, and an expired budget never resends.
415
+
416
+ The fallback is neither copied nor rebuilt: when the host's `ctx.web` offers `getFetchProvider` (the VibeDev desktop), `src/index.ts` registers the provider with `resolveLocal: () => webCtx.web.getFetchProvider?.('http')`, so the plugin asks the host for the instance mounted at the moment the capability is found absent, and a later reload or configuration change is followed. A host that mounted no such provider gets `WEB_FETCH_LOCAL_PROVIDER_MISSING`; one that reports itself unavailable gets `WEB_FETCH_LOCAL_PROVIDER_UNAVAILABLE`; an official DSH host, which has no `getFetchProvider`, gets `WEB_FETCH_LOCAL_PROVIDER_UNREACHABLE`. No case builds a default copy, and none is read as absent capability. `GatewayFetchWiring` still accepts an explicit `local` provider (tests and direct consumers), which wins over `resolveLocal`.
417
+
418
+ An extraction keeps the official SDK's `WebFetchResult` types: the gateway reports no final URL or target status, so `url` holds the requested URL and `statusCode` is 200 (as in the official DeepSeek Fetch provider), marked `contentSource: extracted`, and VibeDev hosts show both as unknown. `requestedUrl` keeps the request, the body is text with `bodyFormat: markdown`, and sourceCompleteness stays unknown independently of explicit truncation. SDK-only gateway receipt facts retain cached and a safe request ID, which is not a durable operation or idempotency key. Cancellation stops client waiting without promising supplier cancellation or a billing outcome.
419
+
420
+ The plugin compiles against the official npm SDK. The `WebFetchResult` facts and `WebRuntime.getFetchProvider` that VibeDev hosts add are declared as optional module augmentations in `src/fetch/host-web.ts` and checked before use. The gateway advertises only an initial URL/DNS precheck and provider-managed retrieval, without target DNS-pinning, redirect or original-charset guarantees.
421
+
422
+ For explicit joint acceptance, run node scripts/verify-fetch-joint.mjs with one or two authorized public URLs and a short-lived authorized VibeDevAppToken injected into the single process as VIBEDEV_FETCH_TEST_APP_TOKEN. Never paste it into chat, store it in the repository or substitute a supplier Key. The runner makes at most two POSTs within an 80-second total budget, never retries, and emits only sanitized receipts. Missing credentials produce a blocked result with zero requests. Its contract snapshot is not an advertised capability or proof of automatic selection.
252
423
 
253
424
  **Media tools**: `image_generate`, `video_generate` (runs as a background job), `audio_generate` (music, a podcast or speech), `audio_transcribe` (a multipart file upload; languages and limits as each model declares), `media_models`, `media_tasks` and `media_account`. Reference images, videos and audio, and first and last frames, can each be a workspace path, an http(s) link, or `chat:1` for the most recent matching file you attached. A request the model cannot serve is refused before anything is uploaded or charged.
254
425
 
255
426
  **Audio models**: whether an audio model makes music, a podcast, speech or a transcription comes from its catalog declaration (`audio.generation_kind`), never from its name; a model that declares no kind is listed but cannot generate. Each model is sent only the fields it declares in `request_fields`, with the text in its `prompt_field`: music takes `prompt`, `lyrics`, `genre`, `mood` and `gender`; a podcast `prompt` and `source_url`; speech what it declares (Seed: `text_prompt`, `references`, `audio_config`, `watermark`). Speech reference limits (count, size, length, exclusions) and the sample rates of each output format come from the gateway. Music and podcasts take no references, format, sample rate or duration.
256
427
 
257
- **Cost**: chat models are billed by usage at the gateway's prices; images per image, video per second (reference video length counts), music and podcasts per request, speech per second of original audio (the length the provider reports, which can differ from playback), transcription per minute. A model without a catalog price is shown as "not priced" (未定价), never as free. Video models priced per video Token (`video_pricing` in the catalog) have one Token price per resolution and presence of reference video, audio and images (first and last frames count as images); before a run the plugin estimates the matching rule's per-second price times the output length plus every reference video's length, and the final charge is the actual video Tokens. When that cannot be estimated (an unmeasured reference video, no per-second estimate, a pricing mode this version does not read) it says "estimate unavailable; billed by actual video Token usage" — never free, never "not priced". A finished video whose billing is still pending (`billing_status: pending`) is saved as usual and never generated again; only the charge is still to be confirmed. Failed and cancelled video and audio tasks are not charged, and a submitted video cannot be cancelled. One operation generates once: an unconfirmed submission is settled under the same key, a failed query or download only queries again or renews the link, and a result whose charge is still settling (`settlement_pending`) is kept, never generated again. "Ask before each paid generation" is off by default.
428
+ **Cost**: chat models are billed by usage at the gateway's prices; images per image, video per second (reference video length counts), music and podcasts per request, speech per second of original audio (the length the provider reports, which can differ from playback), transcription per minute. A model without a catalog price is shown as "not priced" (未定价), never as free. Video models priced per video Token (`video_pricing` in the catalog) have one Token price per resolution and presence of reference video, audio and images (first and last frames count as images); before a run the plugin estimates the matching rule's per-second price times the output length plus every reference video's length, and the final charge is the actual video Tokens. When that cannot be estimated (an unmeasured reference video, no per-second estimate, a pricing mode this version does not read) it says "estimate unavailable; billed by actual video Token usage" — never free, never "not priced". A finished video whose billing is still pending (`billing_status: pending`) is saved as usual and never generated again; only the charge is still to be confirmed. Charges, releases and unknown outcomes follow explicit gateway billing receipts; failure or cancellation alone does not prove no charge. A submitted video cannot be cancelled. One operation generates once: an unconfirmed submission keeps its original operation and unknown state without another automatic creation POST; only a declared read-only lookup capability can reconcile it, a failed query or download only queries again or renews the link, and a result whose charge is still settling (`settlement_pending`) is kept, never generated again. "Ask before each paid generation" is off by default.
258
429
 
259
- **Settings**: open "VibeDev Account & Models" on the Plugins page for the spending confirmation, the output folder and the default media models. `displayName`, `relayDisplayName` (the relay group label, default 中转), `preferredModels`, `openBrowserOnSignIn`, `catalogRefreshMinutes`, `client` (the client name sent with the sign-in, default `vibedev-plugin`) and `primary` (show the account as the app's main account; off by default, on in the VibeDev app) are set in the profile's `cordis.patch.yml` row `dsh-vibedev`.
430
+ **Settings**: open "VibeDev Account & Models" on the Plugins page for the spending confirmation, the output folder and the default media models. `displayName`, `relayDisplayName` (the relay group label, default 中转), `preferredModels`, `openBrowserOnSignIn`, `catalogRefreshMinutes`, `client` (the client name sent with the sign-in, default `vibedev-plugin`), `primary` (show the account as the app's main account; off by default, on in the VibeDev app) and `gatewayFetch` (register the gateway fetch provider `vibedev-gateway`; off by default, and the `web` row's `fetchProvider` still selects it) are set in the profile's `cordis.patch.yml` row `dsh-vibedev`.
260
431
 
261
432
  **Upgrading from dsh-media**: the VibeDev Plugin Center (0.1.5 or later) switches it over for you, from its banner or when you install this plugin, the film workbench or the AI Creator Suite: the new package is installed disabled, `dsh-media` is disabled, the new one enabled, and `dsh-media` removed only after that worked. By hand, disable `dsh-media` first, install `@vibedev-si/dsh-vibedev`, uninstall `dsh-media` and restart the app fully. The two cannot both be enabled: they register the same tool names, and whichever loads second fails to start. The sign-in and running video and audio tasks carry over; the media settings go back to their defaults.
262
433
 
263
434
  **Privacy**: prompts and reference media are sent to the VibeDev gateway, which forwards them to the model provider. The plugin's own sign-in is kept in the DeepSeek Harness credential store, and task records under `dsh-media/` in the DeepSeek Harness data folder (the former name, kept so an upgrade loses nothing).
264
435
 
265
- **For other plugins**: the `vibedevMedia` service generates images, videos and audio (`startAudio`: music, podcasts and speech) through the same model choice, reference checks, idempotent submission and background saving; the film workbench ([dsh-film](https://github.com/VibeDev-Si/dsh-film)) storyboard uses it. `models()` lists the account's media models; an image model carries the size tiers and ratios it declares (`imageSizes`, `imageRatios`). `audioForms()` describes the form of each audio model (only its declared fields, choices and limits, and its price). `videoQuote(request)` quotes a video request from the cached catalog alone (no upload, no submission): a video Token estimate with its rule and basis, a legacy estimate, or why there is none. Task views carry `settlement`, `settlementPendingReason`, `chargedCny` (only once settled, exactly as the gateway wrote it) and `billing.tokens`. Every task is read the same way: `task` (as recorded), `refreshTask` (ask the gateway again — fresh links, settlement; a query, never a submission), `onTask` (each change) and `result` (the files to play or download). Pass the same `operationId` when one click is retried: its task is returned and nothing is submitted twice.
436
+ **For other plugins**: the `vibedevMedia` service generates images, videos and audio (`startAudio`: music, podcasts and speech) through the same model choice, reference checks, idempotent submission and background saving; the film workbench ([dsh-film](https://github.com/VibeDev-Si/dsh-film)) storyboard uses it. `models()` lists the account's media models; an image model carries the size tiers and ratios it declares (`imageSizes`, `imageRatios`). `audioForms()` describes the form of each audio model (only its declared fields, choices and limits, and its price). `videoQuote(request)` quotes a video request from the cached catalog alone (no upload, no submission): a video Token estimate with its rule and basis, a legacy estimate, or why there is none. Task views carry `settlement`, `settlementPendingReason`, `chargedCny` (only once settled, exactly as the gateway wrote it) and `billing.tokens`. Every task is read the same way: `task` (as recorded), `refreshTask` (ask the gateway again — fresh links, settlement; same-key recovery while unconfirmed; query only after a task ID is known), `onTask` (each change) and `result` (the files to play or download). Pass the same `operationId` when one click is retried: the recorded task is returned or checked under its original key and saved body; no new operation is created.
266
437
 
267
438
  **Third-party code**: the model route in `src/llm/` is ported from the VibeDev app; `context.ts`, `replay.ts` and `stream.ts` are copied from DeepSeek Harness's `@deepseek-ai/dsh-llm-pi-ai` (MIT). The licences of the bundled pi-ai, Anthropic SDK, OpenAI SDK and their dependencies are in `THIRD-PARTY-NOTICES.txt`.
268
439
 
@@ -289,3 +460,15 @@ npm 的 Trusted Publisher 配置为:GitHub 所有者 `VibeDev-Si`、仓库 `ds
289
460
  ## License
290
461
 
291
462
  MIT
463
+
464
+ ### Durable local task lookup
465
+
466
+ The optional `supportsDurableTaskLookup(kind: 'video' | 'audio'): boolean` is true only after an awaited lookup has initialized the current stable gateway/account partition and legacy ownership. Check the current scope, check this capability, then await `task(operationId)`. Only a successful local lookup returning undefined means this plugin did not send a creation POST for that operation in that partition. A lookup failure, unknown identity, another account, remote polling 403/404, an older plugin without this method, or an image operation does not provide that guarantee. Every video/audio POST has a durable draft first; rejected and pruned terminal records retain queryable receipts. Switching credentials invalidates the synchronous capability until identity and storage are initialized again.
467
+
468
+ 可选 `supportsDurableTaskLookup(kind: 'video' | 'audio'): boolean` 仅在当前稳定账号与网关分区完成旧任务归属和初始化后声明。先核对 scope 与能力,再 await `task(operationId)`;仅成功的本地查找返回不存在时,才说明本插件未为该分区下的操作发送创建 POST。查找失败、未知身份、其他账号、远端查询403/404、没有该方法的旧插件及图片均不具备此保证。明确拒绝和被列表裁剪的终态保留可查询收据;切换凭证后重新初始化前不声明。
469
+
470
+ ### Host method and gateway capability detection
471
+
472
+ `account`, `openAccountCenter`, `refreshAccount`, `quoteVideo`, `startVideo`, `startAudio`, `task`, `refreshTask`, `result` and `onTask` are Host SDK methods; integrations must detect optional methods when supporting older plugins. `capabilities` lists the wire protocols this plugin understands (`errors-v1`, `media-quotes-v1`); it does not promise that the connected gateway has enabled them. Gateway support comes from the shared account entitlements snapshot. Quotes without an operation ID remain catalog estimates. A quote ID is accepted only with the same operation and account that obtained it. Image recovery and durable image deduplication are not advertised.
473
+
474
+ 这些是Host SDK方法,兼容旧插件时按方法是否存在检测。插件capabilities仅说明可解析的协议,网关实际启用情况由账户权益快照声明,不能据插件字段假定新报价或订阅可用。没有operationId的价格标签是目录预估;quoteId仅随原操作和原账号提交。图片不声明持久恢复或幂等保证。
@@ -1,4 +1,4 @@
1
- THIRD-PARTY NOTICES · @vibedev-si/dsh-vibedev 0.3.11
1
+ THIRD-PARTY NOTICES · @vibedev-si/dsh-vibedev 0.5.2
2
2
 
3
3
  This package bundles code from the projects below. Each is used under the licence that
4
4
  follows its name; the licence texts are reproduced as the projects ship them.