@vibedev-si/dsh-vibedev 0.10.0 → 0.11.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/README.md CHANGED
@@ -10,6 +10,25 @@
10
10
 
11
11
  本插件由 `dsh-media` 改名而来,见下面的「从 dsh-media 升级」。
12
12
 
13
+ ## 0.11.1 用户可见更新
14
+
15
+ 兼容 DSH 0.2.3:修复发送图片失败。桌面版升级到 DeepSeek Harness 0.2.3 后,用 VibeDev 网关的模型发一张图片,那一轮会失败,并提示 `Image request maxImageBytes must be a positive integer.`;图片留在对话里后,之后每一轮和 `/compact` 也会失败。0.11.1 修好了这些,改版后不需要清理或重发对话。
16
+
17
+ - **图片**:请求图片的大小上限同时按 0.2.3 的新规则和 0.2.2-rc.5 的旧规则给出,每张图片仍限制在 1 MiB 以内(超过时会继续缩小)。DeepSeek Harness 0.2.2-rc.5 及以上继续可用。
18
+ - **系统提示**:0.2.3 把系统提示按段落分别保存,插件原来把它们直接连在一起;现在按空行分隔,之后补充的系统指令以「系统提醒」的形式发给模型,不再混作你说的话。
19
+ - **Computer Use 截图**:Computer Use 取截图尺寸用的是插件给出的同一套图片预算,截图只缩一次,模型看到的尺寸和点击坐标一致。
20
+ - **凭据**:向 VibeDev 网关取宿主登录凭据时,优先使用 0.2.3 的公开接口,找不到时才用旧接口;两者都没有时回退到插件自己的登录,不会让所有请求都取不到凭据。
21
+ ## 0.11.0 用户可见更新
22
+
23
+ - **公告改叫「通知」**:账户中心的「消息」页改名为「通知」,账号菜单里的那一行也一起改,例如「通知(3)」;行上的未读提示写「3 条未读通知」,空的时候写「还没有未读通知」,公告弹窗里的按钮是「查看全部通知」。弹窗标题仍是「VibeDev 公告」。改名是为了和 VibeDev 桌面的聊天「消息」分开;公告内容、红点和已读规则都不变。英文界面是 Notifications。
24
+ - **账号菜单新增「联系客服」**:两处账号菜单都在「通知」下面多了「联系客服」,一处是 VibeDev 应用左下角的账号行,另一处是 DeepSeek Harness 侧栏里的 VibeDev 状态。点一下,由「消息」插件(`@vibedev-si/dsh-vibedev-messages`)打开 VibeDev 客服。这一项只在三个条件同时满足时出现:已登录 VibeDev、装了「消息」插件、它报告一键客服可用(目前是 VibeDev 桌面内嵌聊天,并且配置了客服接口)。打不开时提示「暂时无法打开客服,请稍后重试。」。
25
+
26
+ 新增给 VibeDev 桌面用的宿主服务 `vibedevDesktopChatConsent`:在桌面版「消息」里点「使用 VibeDev 登录」后,只要在原生对话框里确认一次,桌面就通过本插件用当前登录的 VibeDev App 账号完成聊天授权,不用再在网页上登录 VibeDev。这项服务要等用上它的 VibeDev 桌面版发布后才生效,模型和媒体工具不变。见下文「给其他插件用」里的「聊天一次授权」。
27
+
28
+ 服务名用的是 `vibedevDesktopChatConsent`,不是内测时的 `vibedevChatConsent`,插件也不会在旧名下注册。rc.2 内测包里改过的 desktop-host 会按旧名查找这个服务,并把结果原样当作回调地址转给主进程;内测主进程在那里只接受字符串,收到本服务返回的对象会判为非法 IPC 并结束 Host。换了名字以后,内测包找不到服务,会安全地回到失败提示。正式版 rc.2 的 desktop-host 不调用这个服务,不受影响。
29
+
30
+ 配置新增 `chatConsent.endpoint`(授权接口)和 `chatConsent.callbackUrl`(Matrix 回调),只能在配置文件里改,默认值即可使用,留空也按默认值。授权接口必须是 https,并且在聊天授权的签发方主机 `https://vibedev.studio` 上(网关只在那里处理授权请求);本服务只在插件自己的 `gatewayOrigin` 是第一方源(`https://vibedev.studio` 或 `https://api.vibedev.studio`)时提供。不合规则时插件照常启动,模型、账户和工具都不受影响,只是不提供 `vibedevDesktopChatConsent`,Host 日志会写明是哪一项、违反了哪条规则;桌面这时改用网页授权。这是「凭据只发往网关源」的一处受控例外,原因见「聊天一次授权」的安全边界。
31
+
13
32
  ## 0.10.0 用户可见更新
14
33
 
15
34
  支持家族分组的 VibeDev 宿主现在会按网关目录将普通和中转模型分组。配置中的 `preferredModels` 提供常用模型的初始顺序。模型目录缺少家族信息时,模型仍可正常选择。
@@ -329,7 +348,7 @@ VibeDev 开着时发布的 `popup` 公告,现在会在下一次读取消息时
329
348
  | Claude 提示词缓存保留时间 | 默认 | 可选默认、5分钟、1小时;保存后用于后续 Claude Messages 请求,默认不是关闭缓存。 |
330
349
  | 默认生图 / 视频 / 音乐 / 播客 / 语音合成 / 转写模型 | 空 | 留空时由 Agent 按模型目录选择;可以填模型 id 或别名。 |
331
350
 
332
- 另有几项只能在配置文件(`cordis.patch.yml` 中 `dsh-vibedev` 一行)里改:`displayName`(普通模型分组名,默认 `VibeDev`)、`relayDisplayName`(中转模型分组名,默认「中转」)、`preferredModels`(排在最前的 VibeDev 模型)、`openBrowserOnSignIn`(登录时是否自动打开系统浏览器,默认开)、`catalogRefreshMinutes`(模型目录定时刷新间隔,默认 30 分钟;是没人打开余额卡片、账号菜单或设置时的兜底)、`client`(登录时报给网关的客户端名称,默认 `vibedev-plugin`)、`primary`(作为应用的主账号显示,默认关,VibeDev 应用里开)、`gatewayFetch`(注册网关抓取提供方 `vibedev-gateway`,默认关;仍由 `web` 行的 `fetchProvider` 决定是否选中)。
351
+ 另有几项只能在配置文件(`cordis.patch.yml` 中 `dsh-vibedev` 一行)里改:`displayName`(普通模型分组名,默认 `VibeDev`)、`relayDisplayName`(中转模型分组名,默认「中转」)、`preferredModels`(排在最前的 VibeDev 模型)、`openBrowserOnSignIn`(登录时是否自动打开系统浏览器,默认开)、`catalogRefreshMinutes`(模型目录定时刷新间隔,默认 30 分钟;是没人打开余额卡片、账号菜单或设置时的兜底)、`client`(登录时报给网关的客户端名称,默认 `vibedev-plugin`)、`primary`(作为应用的主账号显示,默认关,VibeDev 应用里开)、`gatewayFetch`(注册网关抓取提供方 `vibedev-gateway`,默认关;仍由 `web` 行的 `fetchProvider` 决定是否选中)、`chatConsent.endpoint` 与 `chatConsent.callbackUrl`(VibeDev 桌面「消息」一次授权的授权接口和 Matrix 回调,见「聊天一次授权」)。
333
352
 
334
353
  ## 从 dsh-media 升级
335
354
 
@@ -363,6 +382,57 @@ VibeDev 开着时发布的 `popup` 公告,现在会在下一次读取消息时
363
382
 
364
383
  失败抛 `ContentError`,`code` 和 `status` 都在错误对象顶层(宿主的调用方只读这两个):`NOT_SIGNED_IN`(`status: 401`)、`NOT_FOUND`(404)、`RATE_LIMITED`(429,带 `retryAfterMs`)、`REFUSED`(其余 4xx)、`GATEWAY_ERROR`(5xx)、`GATEWAY_BAD_RESPONSE`、`NETWORK_ERROR`、`INVALID_REQUEST`、`BLOB_TOO_LARGE`、`HASH_MISMATCH`、`ABORTED`。`status` 只在网关确实对这次请求答复了 HTTP 状态时带上:标了状态码的那几类一定带;`GATEWAY_BAD_RESPONSE` 和 `BLOB_TOO_LARGE` 有时带(下载地址被拒绝的那一类不带,所以它不会被当成「需要登录」或「没有这个文件」);`NETWORK_ERROR`、`INVALID_REQUEST`、`HASH_MISMATCH`、`ABORTED` 不带。每条错误的 `message` 都是一句可以直接给用户看的中文,细节留在 `cause` 里。
365
384
 
385
+ ### 聊天一次授权:`vibedevDesktopChatConsent`(0.11.0)
386
+
387
+ VibeDev 桌面的「消息」是 Matrix(Element)聊天,Matrix 通过 VibeDev 的聊天 OIDC 登录。桌面在原生对话框里问过用户以后,由桌面的 Host 进程调用这个服务完成那一次授权:服务用当前登录的 App 账号的令牌把用户的决定发给网关,再把网关返回、已经核对过的 Matrix 回调交回桌面,由桌面在原来的消息分区里打开。服务只在 Host 里提供,不是客户端连接路由。
388
+
389
+ 服务名 `vibedevDesktopChatConsent`(发布前由 `vibedevChatConsent` 改名,旧名不注册,原因见 0.11.0 更新说明),类型从包入口导出,桌面 Host 用 `import type { VibeDevDesktopChatConsent, VibeDevDesktopChatConsentRequest, VibeDevDesktopChatConsentResult } from '@vibedev-si/dsh-vibedev'` 引用:
390
+
391
+ | 成员 | 说明 |
392
+ | --- | --- |
393
+ | `version` | 固定为 `1` |
394
+ | `resolve({ subject, handle, approve })` | `subject`:桌面要登录的 VibeDev 用户 ID(`^[1-9]\d{0,18}$`);`handle`:待授权的聊天 OIDC 请求(`^[A-Za-z0-9_-]{43}$`);`approve`:`true` 同意,`false` 取消 |
395
+
396
+ `resolve()` 不会 reject,结果是下面五种之一:
397
+
398
+ | `status` | 含义 |
399
+ | --- | --- |
400
+ | `redirect` | 带 `url`:网关返回的 Matrix 回调,已经核对 |
401
+ | `signed-out` | 没有登录,或者当前凭据不是 App 账号的 App Token(开发密钥,或不是 `vdat_` 开头的插件令牌、宿主令牌);不发请求 |
402
+ | `mismatch` | 当前登录的账号不是 `subject`;不发请求 |
403
+ | `rejected` | 网关回了 4xx(请求过期或已经用过、账号无权、令牌失效等);不重发。401 且网关表明是登录本身失效时,通知凭据的持有方(见下文「不重试」) |
404
+ | `failed` | 其余情况:请求格式不对、读不到当前账号的用户 ID、网络错误、超时(一次最多 10 秒,读账号、请求和响应合计)、5xx、响应超过 8 KiB 或内容不合契约 |
405
+
406
+ 请求是 `POST <chatConsent.endpoint>`,带 `Authorization: Bearer <App Token>`,正文 `{"request": "<handle>", "approve": true|false}`,遇到重定向直接失败;网关回 `{"redirect_to": "<回调>"}`。回调必须同时满足:不超过 1024 个字符;https,不带用户名密码,整串不含 `#`;是规范写法(`new URL(url).href` 与原文完全一样);源和路径等于 `chatConsent.callbackUrl`;查询参数恰好两个,按原文比对、不解码:同意时是 `state` 和 `code`,取消时是 `state` 和 `error=access_denied`;`state` 符合 `^[A-Za-z0-9_-]{16,256}$`,`code` 符合 `^[A-Za-z0-9_-]{43}$`。这些检查也从包入口导出:`readChatConsentRequest(value)`、`readChatConsentCallback(url, approve, callbackUrl)`、`readChatConsentResult(result, approve, callbackUrl)`。一次授权会经过三层检查:本插件、桌面 Host、桌面主进程。本插件这一层最严;桌面的两层另有自己的校验,可以复用这些函数,但不保证与它们完全一致,以桌面的实现为准。
407
+
408
+ 配置(只能在配置文件里改):
409
+
410
+ | 配置 | 默认值 | 规则 |
411
+ | --- | --- | --- |
412
+ | `chatConsent.endpoint` | `https://vibedev.studio/api/v1/vibedev/chat-oidc/desktop-consent` | https;源必须是聊天授权的签发方主机 `https://vibedev.studio`;不能带用户名密码、查询或片段 |
413
+ | `chatConsent.callbackUrl` | `https://matrix.vibedev.studio/_synapse/client/oidc/callback` | https;只含源和路径 |
414
+
415
+ 留空按默认值。不合规则时插件照常启动,其余功能不受影响,只是不注册 `vibedevDesktopChatConsent`:Host 日志记一条错误,写明是哪一项、违反了哪条规则(不回显凭据),桌面 Host 这时回 `unavailable`,桌面改用网页授权。
416
+
417
+ 默认回调是正式聊天服务(`matrix.vibedev.studio`)的回调。网关按请求所属的聊天客户端返回对应的回调,所以内测构建若连测试站,需要把 `chatConsent.callbackUrl` 配成测试回调 `https://matrix-test.vibedev.studio/_synapse/client/oidc/callback`,否则网关返回的测试站回调会被拒绝,结果是 `failed`。授权接口两边相同,不用改。
418
+
419
+ 安全边界:
420
+
421
+ - **凭据只发往网关源的受控例外**:插件的其他请求只把凭据发往所选的 `gatewayOrigin`,上传和下载链接都不带凭据。本服务是唯一的例外:App Token 会发往 `chatConsent.endpoint`。这是因为网关只在聊天 OIDC 的签发方主机 `vibedev.studio` 上消费授权请求(同一个接口在 `api.vibedev.studio` 上回 404),而 App Token 由 API 源签发。两个源属于同一个第一方部署。授权接口只能配置在签发方主机 `https://vibedev.studio` 上;只有插件自己的 `gatewayOrigin` 是第一方源(`https://vibedev.studio` 或 `https://api.vibedev.studio`)时才提供本服务:改用别的网关时不注册 `vibedevDesktopChatConsent`,那个网关签发的令牌不会发往 VibeDev,桌面这时改用网页授权。
422
+ - **只发 App Token**:令牌来自插件自己的登录(VibeDev 桌面的主账号就是它)或宿主的账号服务都可以,但只有 `vdat_` 开头、只含 base64url 字符的 App Token 才会发出。授权接口本来也只认 App Token,别的令牌一律被 `APP_TOKEN_INVALID` 拒绝。开发密钥一律不发,哪怕长得像 App Token。令牌和用户 ID 来自同一次账号读取,用户 ID 与 `subject` 不一致时不发请求。
423
+ - **不重试**:一个授权请求只能用一次,失败就如实报给桌面,由桌面提供「改用网页授权」。网关回 401,并且表明是登录本身失效(`APP_TOKEN_EXPIRED`、`APP_TOKEN_INVALID`、`APP_SESSION_REVOKED` 或认证类错误)时,和插件的其他请求一样通知凭据的持有方:插件自己的登录会刷新令牌,宿主账号服务会丢弃仍持有这个令牌的登录。通知不等结果,这次授权也不会重发。
424
+ - **时间**:一次 `resolve()` 最多 10 秒,读账号、发请求和读响应合计。这比桌面等回复的时间短(rc2 桌面是 12 秒,带这个服务的新桌面是 15 秒),所以授权通常会先在插件这里结束,但不能保证:桌面的等待开始得更早,还包括进程间往返;请求一旦发出,插件只能停止等待,网关仍可能处理它并用掉这个授权请求。桌面随后改用网页授权时,网页可能提示请求已失效,需要重新发起。
425
+ - **诊断日志**:每个不是 `redirect` 的结果记一行,例如 `dsh-vibedev chat consent {"outcome":"rejected","reason":"gateway-refused","httpStatus":401,"credential":"plugin","credentialRejected":true}`。字段只有这些:
426
+ - `outcome`:结果。
427
+ - `reason`:固定的原因,取值为 `invalid-request`、`unloaded`、`timeout`、`account-unavailable`、`signed-out`、`not-app-credential`、`account-unknown`、`subject-mismatch`、`network`、`redirect`、`gateway-refused`、`gateway-unavailable`、`gateway-status`、`response-too-large`、`invalid-response`、`invalid-callback`、`internal`。
428
+ - `httpStatus`:HTTP 状态。
429
+ - `networkCode`:受控的网络错误码。
430
+ - `credential`:读到账号以后才有,只写凭据类别 `account`、`plugin` 或 `key`。
431
+ - `credentialRejected`:401 已经通知凭据持有方时为 `true`。
432
+
433
+ 日志不写令牌、`handle`、`subject` 或回调地址。
434
+ - **可见范围**:同一个 Host 里的插件都能拿到这个服务。它们和本插件在同一进程里运行、同样受信任,本来就能向宿主的账号服务取令牌;这个服务没有给它们增加别的能力。
435
+
366
436
  ## 开发
367
437
 
368
438
  ```bash
@@ -383,6 +453,25 @@ npm run build
383
453
 
384
454
  ## English
385
455
 
456
+ ### What changes in 0.11.1
457
+
458
+ Compatible with DSH 0.2.3: fixes sending images. After the desktop app moved to DeepSeek Harness 0.2.3, sending a picture with a VibeDev gateway model failed that turn with `Image request maxImageBytes must be a positive integer.`; once the picture was in the conversation, every later turn and `/compact` failed too. 0.11.1 fixes this; no need to clear or resend the conversation.
459
+
460
+ - **Images**: the request-image size limit is now given in both the 0.2.3 shape and the 0.2.2-rc.5 shape, and each image stays within 1 MiB (a larger one is shrunk further). DeepSeek Harness 0.2.2-rc.5 and later keep working.
461
+ - **System prompt**: 0.2.3 stores the system prompt one section at a time, and the plugin used to run the sections together. They are now separated by a blank line, and system instructions added later reach the model as a system reminder instead of looking like something you said.
462
+ - **Computer Use screenshots**: Computer Use now sizes a screenshot with the same image budget the plugin uses for the request, so a screenshot is shrunk once and the coordinates the model sees match the click targets.
463
+ - **Credentials**: the host's signed-in credential for the VibeDev gateway is read through 0.2.3's public interface first and the older one only when that is missing; with neither, the plugin's own sign-in answers instead of every request losing its credential.
464
+ ### What changes in 0.11.0
465
+
466
+ - **Announcements are now Notifications**: the account center's Messages page is renamed Notifications (通知), and so is its row in the account menus, for example "Notifications (3)". The row's unread hint says "3 unread notifications", an empty page says "No unread notifications", and the announcement dialog's button says "See all notifications". The dialog title stays "VibeDev announcement". The rename keeps announcements apart from the VibeDev desktop's chat, which is called Messages; content, the red dot and the read rules are unchanged.
467
+ - **Contact support in the account menus**: both account menus gain Contact support (联系客服) below Notifications. One is the account row at the bottom left of the VibeDev app; the other is the VibeDev status in the DeepSeek Harness sidebar. It asks the Messages plugin (`@vibedev-si/dsh-vibedev-messages`) to open VibeDev support. The entry appears only when three things hold: you are signed in to VibeDev, the Messages plugin is installed, and that plugin reports one-click support as available (today: the VibeDev desktop's embedded chat with a support route configured). If support cannot open, a notice says so ("Could not open support right now. Please try again later.").
468
+
469
+ A new Host service for the VibeDev desktop, `vibedevDesktopChatConsent`: after "Sign in with VibeDev" in the desktop's Messages and one confirmation in a native dialog, the desktop completes the chat sign-in through this plugin with the VibeDev App account that is signed in, without signing in to VibeDev on a web page. The service takes effect once a VibeDev desktop release uses it; models and media tools are unchanged. See "One-step chat consent" below.
470
+
471
+ The service is named `vibedevDesktopChatConsent`, not `vibedevChatConsent` as during the beta, and the plugin registers nothing under the old name. The desktop-host modified in the rc.2 beta build looks the service up under the old name and forwards its answer to the main process as the callback address; the beta main process takes only a string there, so the object this service answers would be judged an invalid IPC message and the Host ended. Under the new name the beta build finds no service and safely falls back to its failure prompt. The desktop-host of the official rc.2 never calls this service and is unaffected.
472
+
473
+ The config gains `chatConsent.endpoint` (the consent endpoint) and `chatConsent.callbackUrl` (the Matrix callback), set only in the profile, with working defaults; a blank value means the default. The endpoint must be https on the chat sign-in issuer host `https://vibedev.studio` (the gateway handles consent there alone); the service is provided only while the plugin's own `gatewayOrigin` is first-party (`https://vibedev.studio` or `https://api.vibedev.studio`). A value that breaks its rule does not stop the plugin: models, the account and the tools work as usual, only `vibedevDesktopChatConsent` is not provided, and the Host log names the field and the rule; the desktop then uses web consent. This is a controlled exception to "credentials go to the gateway origin only", explained under the service's security boundary.
474
+
386
475
  ### What changes in 0.10.0
387
476
 
388
477
  VibeDev hosts with family grouping show regular and relay models under the families advertised by the gateway catalog. The `preferredModels` setting supplies the initial order of favorites. Models without family metadata remain available in the picker.
@@ -578,7 +667,7 @@ For explicit joint acceptance, run node scripts/verify-fetch-joint.mjs with one
578
667
 
579
668
  **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.
580
669
 
581
- **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`.
670
+ **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), `gatewayFetch` (register the gateway fetch provider `vibedev-gateway`; off by default, and the `web` row's `fetchProvider` still selects it) and `chatConsent.endpoint` with `chatConsent.callbackUrl` (the consent endpoint and Matrix callback of the desktop Messages sign-in; see "One-step chat consent") are set in the profile's `cordis.patch.yml` row `dsh-vibedev`.
582
671
 
583
672
  **Upgrading from dsh-media**: disable `dsh-media` first, install `@vibedev-si/dsh-vibedev`, uninstall `dsh-media` and restart the app fully. The VibeDev Plugin Center used to do this switch for you; this plugin no longer brings it, so the steps are now done by hand. 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.
584
673
 
@@ -588,6 +677,35 @@ For explicit joint acceptance, run node scripts/verify-fetch-joint.mjs with one
588
677
 
589
678
  **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`.
590
679
 
680
+ ### One-step chat consent: `vibedevDesktopChatConsent` (0.11.0)
681
+
682
+ The VibeDev desktop's Messages is a Matrix (Element) chat that signs in through VibeDev's chat OIDC. Once the desktop has asked the user in a native dialog, its Host process calls this service for that one decision: the service posts it to the gateway with the signed-in App account's token and hands back the Matrix callback the gateway answered, checked, which the desktop opens in the original Messages partition. The service lives in the Host only; it is not a client connection route.
683
+
684
+ The service is `vibedevDesktopChatConsent` (renamed from `vibedevChatConsent` before release; the old name is never registered, as "What changes in 0.11.0" explains); its types come from the package entry (`import type { VibeDevDesktopChatConsent, VibeDevDesktopChatConsentRequest, VibeDevDesktopChatConsentResult } from '@vibedev-si/dsh-vibedev'`). It has `version: 1` and `resolve({ subject, handle, approve })`: `subject` is the VibeDev user id the desktop signs in as (`^[1-9]\d{0,18}$`), `handle` the pending chat OIDC request (`^[A-Za-z0-9_-]{43}$`), `approve` `true` to approve and `false` to decline. `resolve()` never rejects and answers one of five results: `redirect` with the checked callback as `url`; `signed-out` when nobody is signed in or the credential is not an App account's App Token (a development key, or a plugin or host token that does not start with `vdat_`), with no request; `mismatch` when the signed-in account is not `subject`, with no request; `rejected` for a gateway 4xx (an expired or used request, an account without access, a token no longer valid), never resent — a 401 that says the sign-in itself failed is also reported to the credential's owner (see "No retries" below); `failed` for anything else: a malformed request, a signed-in account whose user id cannot be read, the network, a timeout (10 s for one call in all: the account read, the request and the body), a 5xx, an answer over 8 KiB or one the contract does not allow.
685
+
686
+ The request is `POST <chatConsent.endpoint>` with `Authorization: Bearer <App Token>` and `{"request": "<handle>", "approve": true|false}`, refusing any redirect; the gateway answers `{"redirect_to": "<callback>"}`. The callback must be at most 1024 characters; https, without credentials and without any `#`; in canonical form (`new URL(url).href` equals it); on the origin and path of `chatConsent.callbackUrl`; with exactly two query parameters compared as sent, never decoded: `state` and `code` for an approval, `state` and `error=access_denied` for a decline, where `state` matches `^[A-Za-z0-9_-]{16,256}$` and `code` `^[A-Za-z0-9_-]{43}$`. These checks are exported as `readChatConsentRequest(value)`, `readChatConsentCallback(url, approve, callbackUrl)` and `readChatConsentResult(result, approve, callbackUrl)`. Three layers check one decision: this plugin, the desktop Host and the desktop main process. This plugin is the strictest of them; the desktop's two layers keep checks of their own, which may reuse these functions but are not bound to match them — the desktop's implementation is what they do.
687
+
688
+ Config, set only in the profile: `chatConsent.endpoint` (default `https://vibedev.studio/api/v1/vibedev/chat-oidc/desktop-consent`; https on the issuer host `https://vibedev.studio`, without credentials, query or fragment) and `chatConsent.callbackUrl` (default `https://matrix.vibedev.studio/_synapse/client/oidc/callback`; https, origin and path only). A blank value means the default. A value that breaks its rule does not stop the plugin, whose other features run as usual: only `vibedevDesktopChatConsent` is not registered, one error in the Host log names the field and the rule (without echoing a credential), the desktop's Host answers `unavailable`, and the desktop uses web consent.
689
+
690
+ The default callback belongs to the production chat service (`matrix.vibedev.studio`). The gateway answers each request with the callback of the chat client that issued it, so a beta build that connects to the test site must set `chatConsent.callbackUrl` to the test callback, `https://matrix-test.vibedev.studio/_synapse/client/oidc/callback`; otherwise the test site's callback is refused and the result is `failed`. The consent endpoint is the same for both and stays as it is.
691
+
692
+ Security boundary:
693
+
694
+ - **A controlled exception to "credentials go to the gateway origin only"**: every other request of this plugin carries the credential to the selected `gatewayOrigin` only, and upload and download links never carry it. This service alone sends the App Token to `chatConsent.endpoint`, because the gateway consumes chat sign-in requests only on the OIDC issuer host `vibedev.studio` (the same route answers 404 on `api.vibedev.studio`), while the App Token is issued by the API origin. Both origins belong to one first-party deployment. The endpoint may only be on the issuer host `https://vibedev.studio`, and the service is provided only while the plugin's own `gatewayOrigin` is first-party (`https://vibedev.studio` or `https://api.vibedev.studio`): with another gateway `vibedevDesktopChatConsent` is not registered, that gateway's token never goes to VibeDev, and the desktop uses the web consent page instead.
695
+ - **Only an App Token is sent**: the token may come from the plugin's own sign-in (the VibeDev desktop's main account) or from a host account service, but only an App Token — `vdat_` followed by base64url characters — is ever sent. The consent route accepts nothing else and refuses any other token with `APP_TOKEN_INVALID`. A development key is never sent, even one that looks like an App Token. The token and the user id come from one account read, and nothing is sent when that user id is not `subject`.
696
+ - **No retries**: a sign-in request can be used once, so a failure is reported as it is, and the desktop offers web consent instead. A 401 that says the sign-in itself failed (`APP_TOKEN_EXPIRED`, `APP_TOKEN_INVALID`, `APP_SESSION_REVOKED` or the authentication category) is reported to the credential's owner, as the plugin's other requests do: the plugin's own sign-in refreshes its token, and a host account service drops a login that still holds this token. The report is not waited for, and the decision is not posted again.
697
+ - **Timing**: one `resolve()` takes at most 10 s in all — the account read, the request and the body. That is shorter than the desktop waits for the answer (12 s in the rc2 desktop, 15 s in the desktop that ships this service), so a decision normally ends in the plugin first, but not certainly: the desktop's wait starts earlier and also covers the IPC hops, and a request already sent can only stop being waited for — the gateway may still process it and use up the sign-in request. The web consent page the desktop then falls back to may report the request as expired, and the sign-in starts again.
698
+ - **Diagnostics**: each result other than `redirect` logs one line such as `dsh-vibedev chat consent {"outcome":"rejected","reason":"gateway-refused","httpStatus":401,"credential":"plugin","credentialRejected":true}`. A line has these fields only:
699
+ - `outcome`: the result.
700
+ - `reason`: a fixed reason, one of `invalid-request`, `unloaded`, `timeout`, `account-unavailable`, `signed-out`, `not-app-credential`, `account-unknown`, `subject-mismatch`, `network`, `redirect`, `gateway-refused`, `gateway-unavailable`, `gateway-status`, `response-too-large`, `invalid-response`, `invalid-callback` or `internal`.
701
+ - `httpStatus`: the HTTP status.
702
+ - `networkCode`: an allowlisted network code.
703
+ - `credential`: present once the account was read; the kind of credential only, `account`, `plugin` or `key`.
704
+ - `credentialRejected`: `true` when a 401 was reported to the credential's owner.
705
+
706
+ A line never holds the token, the handle, the subject or the callback.
707
+ - **Visibility**: every plugin in the same Host can reach this service. They run in the same process with the same trust as this plugin and could already ask the host's account service for its token, so the service gives them nothing more.
708
+
591
709
  ## Login diagnostics (0.2.8-us.3) · 登录诊断
592
710
 
593
711
  登录状态区分等待浏览器、交换登录凭据、保存凭据与成功、失败、取消、过期;设置页面和新版 VibeDev Next 欢迎页显示网络、超时、授权拒绝、服务不可用、响应异常、本地存储或回调错误。折叠的诊断信息及 Host 日志只记录尝试编号、阶段、目标 origin、HTTP 状态和受控网络错误码,不记录账号密码、授权码、PKCE verifier、token、响应正文或完整回调链接。保持 PKCE、state 与随机 localhost 回调;交换失败不会自动重发或切换网关。美国网页公开配置仍需服务维护方单独核对。
@@ -1,4 +1,4 @@
1
- THIRD-PARTY NOTICES · @vibedev-si/dsh-vibedev 0.10.0
1
+ THIRD-PARTY NOTICES · @vibedev-si/dsh-vibedev 0.11.1
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.
@@ -1488,44 +1488,47 @@ window.__ModuleLoader__.load({
1488
1488
  }
1489
1489
  //#endregion
1490
1490
  //#region src/client/AccountCenter/announcement-locales.ts
1491
- /** The 消息 page's words. Content itself is written by whoever publishes the announcement. */
1491
+ /**
1492
+ * The 通知 page's words (VibeDev's announcements; the page was called 消息 before 0.11.0, and its internal page id is
1493
+ * still `messages`). Content itself is written by whoever publishes the announcement.
1494
+ */
1492
1495
  const announcementZh = {
1493
- centerMessages: "消息",
1496
+ centerMessages: "通知",
1494
1497
  centerMessagesIntro: "VibeDev 的版本更新、服务调整和账号相关通知。",
1495
1498
  msgFilterUnread: "未读",
1496
1499
  msgFilterAll: "全部",
1497
- msgEmptyUnread: "还没有未读消息",
1498
- msgEmptyAll: "还没有消息",
1500
+ msgEmptyUnread: "还没有未读通知",
1501
+ msgEmptyAll: "还没有通知",
1499
1502
  msgEmptyHint: "新的版本更新和账号通知会出现在这里。",
1500
- msgReading: "正在读取消息…",
1503
+ msgReading: "正在读取通知…",
1501
1504
  msgExpand: "展开全部",
1502
1505
  msgCollapse: "收起",
1503
1506
  msgMarkRead: "标为已读",
1504
1507
  msgPopupTitle: "VibeDev 公告",
1505
1508
  msgPopupKnow: "知道了",
1506
1509
  msgPopupLater: "稍后",
1507
- msgPopupAll: "查看全部消息",
1508
- centerMessagesCount: "消息({count})",
1509
- msgUnreadCount: "{count} 条未读消息"
1510
+ msgPopupAll: "查看全部通知",
1511
+ centerMessagesCount: "通知({count})",
1512
+ msgUnreadCount: "{count} 条未读通知"
1510
1513
  };
1511
1514
  const announcementEn = {
1512
- centerMessages: "Messages",
1515
+ centerMessages: "Notifications",
1513
1516
  centerMessagesIntro: "Version updates, service changes and account notices from VibeDev.",
1514
1517
  msgFilterUnread: "Unread",
1515
1518
  msgFilterAll: "All",
1516
- msgEmptyUnread: "Nothing unread",
1517
- msgEmptyAll: "No messages yet",
1519
+ msgEmptyUnread: "No unread notifications",
1520
+ msgEmptyAll: "No notifications yet",
1518
1521
  msgEmptyHint: "Version updates and account notices will appear here.",
1519
- msgReading: "Reading messages…",
1522
+ msgReading: "Reading notifications…",
1520
1523
  msgExpand: "Show all",
1521
1524
  msgCollapse: "Show less",
1522
1525
  msgMarkRead: "Mark as read",
1523
1526
  msgPopupTitle: "VibeDev announcement",
1524
1527
  msgPopupKnow: "Got it",
1525
1528
  msgPopupLater: "Later",
1526
- msgPopupAll: "See all messages",
1527
- centerMessagesCount: "Messages ({count})",
1528
- msgUnreadCount: "{count} unread messages"
1529
+ msgPopupAll: "See all notifications",
1530
+ centerMessagesCount: "Notifications ({count})",
1531
+ msgUnreadCount: "{count} unread notifications"
1529
1532
  };
1530
1533
  //#endregion
1531
1534
  //#region src/client/AccountCenter/center-locales.ts
@@ -2100,6 +2103,8 @@ window.__ModuleLoader__.load({
2100
2103
  latencyHttp: "HTTP {status}",
2101
2104
  localeTag: "zh-CN",
2102
2105
  close: "关闭",
2106
+ contactSupport: "联系客服",
2107
+ supportUnavailable: "暂时无法打开客服,请稍后重试。",
2103
2108
  feedbackMenu: "意见反馈",
2104
2109
  feedbackTitle: "意见反馈",
2105
2110
  feedbackIntro: "告诉我们哪里好用、哪里需要改进。反馈会随你的 VibeDev 账号发送给 VibeDev 团队。",
@@ -2684,7 +2689,7 @@ window.__ModuleLoader__.load({
2684
2689
  `;
2685
2690
  //#endregion
2686
2691
  //#region src/client/AccountCenter/announcement-styles.ts
2687
- /** Presentation for the 消息 page, scoped to the account-center container like its siblings. */
2692
+ /** Presentation for the 通知 page, scoped to the account-center container like its siblings. */
2688
2693
  const ANNOUNCEMENT_STYLES = `
2689
2694
  .vibedev-center .center-announcements{display:flex;flex-direction:column;gap:14px;width:100%;max-width:960px;margin-inline:auto}
2690
2695
  .vibedev-center .center-announcements-filters{display:flex;align-items:center;gap:8px}
@@ -3685,7 +3690,7 @@ window.__ModuleLoader__.load({
3685
3690
  }
3686
3691
  //#endregion
3687
3692
  //#region src/client/AccountCenter/AnnouncementsPage.tsx
3688
- /** The 消息 page: what VibeDev published, unread first, and one tap to stop calling it unread. */
3693
+ /** The 通知 page: what VibeDev published, unread first, and one tap to stop calling it unread. */
3689
3694
  /**
3690
3695
  * One message.
3691
3696
  * @param props - the message, whether it is open, and what the two actions do.
@@ -14001,7 +14006,7 @@ window.__ModuleLoader__.load({
14001
14006
  setRefresh((value) => value + 1);
14002
14007
  Promise.allSettled([store.refresh(true), store.refreshSubscriptions(true)]).finally(() => setRefreshing(false));
14003
14008
  };
14004
- const intro = page === "dashboard" ? "centerDashboardIntro" : page === "usage" ? "centerUsageIntro" : page === "subscriptions" ? "centerSubscriptionsIntro" : page === "channel_status" ? "centerMonitorIntro" : page === "model_prices" ? "centerModelPricesIntro" : page === "recharge" ? "centerRechargeIntro" : page === "orders" ? "centerOrdersIntro" : page === "redeem" ? "centerRedeemIntro" : page === "affiliate" ? "centerAffiliateIntro" : page === "profile" ? "centerProfileIntro" : "centerWebsiteHint";
14009
+ const intro = page === "dashboard" ? "centerDashboardIntro" : page === "usage" ? "centerUsageIntro" : page === "subscriptions" ? "centerSubscriptionsIntro" : page === "channel_status" ? "centerMonitorIntro" : page === "model_prices" ? "centerModelPricesIntro" : page === "recharge" ? "centerRechargeIntro" : page === "orders" ? "centerOrdersIntro" : page === "redeem" ? "centerRedeemIntro" : page === "affiliate" ? "centerAffiliateIntro" : page === "profile" ? "centerProfileIntro" : page === "messages" ? "centerMessagesIntro" : "centerWebsiteHint";
14005
14010
  const accountUpdated = () => {
14006
14011
  store.refresh(true);
14007
14012
  store.refreshSubscriptions(true);