1
0

3 Коміти 4f6f2bb4a3 ... 500930499e

Автор SHA1 Опис Дата
  Samien 500930499e 更新断线恢复测试的工具结果延迟加载协议断言 1 місяць тому
  Samien d5e132683e 修复发布回归夹具:适配聊天快照参数并等待登录页就绪 1 місяць тому
  Samien 1400dd1d07 发布 v0.4.81:更新桌面与服务端升级、凭据授权和聊天加载 1 місяць тому

+ 5 - 5
README.md

@@ -1,6 +1,6 @@
 # 夭夭 AI
 
-当前 Web 与 macOS 桌面发布版本:**v0.4.80**。桌面版提供 Apple Silicon(arm64)客户端正式 DMG;本次未发布完整版桌面安装包,Windows 与 Android 沿用旧版,详见 [发布说明](docs/releases/v0.4.80.md)。
+当前 Web 与 macOS 桌面发布版本:**v0.4.81**。桌面版提供 Apple Silicon(arm64)客户端正式 DMG;本次未发布完整版桌面安装包,Windows 与 Android 沿用旧版,详见 [发布说明](docs/releases/v0.4.81.md)。
 
 夭夭 AI 为网页、iOS 和安卓提供统一的 Agent、群聊、文件库及语音配置服务。Hermes 通过标准 9119 HTTP/WebSocket 接口执行任务。
 
@@ -68,11 +68,11 @@ yaoyao service install
 
 | 镜像 | 架构 |
 | --- | --- |
-| `samienluo/yaoyao:v0.4.80-amd` | AMD64 |
-| `samienluo/yaoyao:v0.4.80` | 自动匹配 AMD64 / ARM64 |
-| `samienluo/yaoyao:latest` | 最新稳定版通用镜像,当前与 `v0.4.80` 相同 |
+| `samienluo/yaoyao:v0.4.81-amd` | AMD64 |
+| `samienluo/yaoyao:v0.4.81` | 自动匹配 AMD64 / ARM64 |
+| `samienluo/yaoyao:latest` | 最新稳定版通用镜像,当前与 `v0.4.81` 相同 |
 
-准备好 Docker Engine/Compose 和容器可访问的 Hermes 9119 服务,在仓库目录将 `docker.env.example` 复制为 `docker.env`。配置上游地址,并设置 `HERMES_YAOYAO_IMAGE=samienluo/yaoyao:v0.4.80`(或 `samienluo/yaoyao:latest`),即可使用远程镜像:
+准备好 Docker Engine/Compose 和容器可访问的 Hermes 9119 服务,在仓库目录将 `docker.env.example` 复制为 `docker.env`。配置上游地址,并设置 `HERMES_YAOYAO_IMAGE=samienluo/yaoyao:v0.4.81`(或 `samienluo/yaoyao:latest`),即可使用远程镜像:
 
 ```sh
 docker compose --env-file docker.env pull web

+ 1 - 1
docker.env.example

@@ -3,7 +3,7 @@ HERMES_YAOYAO_BIND_ADDRESS=127.0.0.1
 HERMES_YAOYAO_PUBLISHED_PORT=15300
 # 远程通用镜像支持 AMD64 / ARM64;每次发布更新 latest 并保留旧版本标签。
 # HERMES_YAOYAO_IMAGE=samienluo/yaoyao:latest
-# 固定版本:samienluo/yaoyao:v0.4.80;仅 AMD64:samienluo/yaoyao:v0.4.80-amd。
+# 固定版本:samienluo/yaoyao:v0.4.81;仅 AMD64:samienluo/yaoyao:v0.4.81-amd。
 # 留空时使用本地构建名称 yaoyao:local。
 # YAOYAO_DESKTOP_IMAGE=hermes-yaoyao-desktop:0.4.0
 # Cursor Universal 兼容桌面的本地构建名称;基础镜像在 deploy/computer/Dockerfile.cursor 中固定。

+ 48 - 0
docs/releases/v0.4.81.md

@@ -0,0 +1,48 @@
+# 夭夭 AI v0.4.81
+
+本次发布 Web 源码、Docker 双架构镜像和 macOS Apple Silicon 纯客户端。full、Windows 和 Android 沿用历史附件。
+
+## 更新内容
+
+- 桌面更新入口放到顶部铃铛旁,仅在有更新时显示;下载进度、准备状态和重启按钮直接呈现在当前页面,无需打开独立更新窗口。启动及登录页面也可使用更新入口。
+- macOS npm 服务端支持先下载并校验更新,由管理员点击「重启服务器」后就地覆盖安装;关闭或重新打开页面不会自动重启,下载状态保留。
+- npm 覆盖更新复用当前安装路径,清理临时安装包和旧程序文件,不保留额外版本副本或回滚备份,用户数据保持原位。
+- 支持为指定 Bot 持续授权使用凭据,管理界面锁定与已授权 Bot 使用独立;修复修改凭据后授权失效的问题,并简化保存和授权流程。
+- 获得 SSH 凭据授权的 Bot 可执行远端命令并读取输出;支持撤销授权、主机密钥固定、输出限制及操作审计。
+- 缩减聊天启动数据,大段工具结果按需加载,改善聊天切换和长会话显示性能。
+
+## 升级说明
+
+- 升级前备份完整 `.yaoyao` 数据目录,建议先更新服务端,再更新客户端;独立部署的执行节点也应同步更新。
+- npm 界面升级适用于 macOS LaunchAgent 服务,使用 npm 发布源检查更新;GitHub Release 和 Docker 标签发布不等同于 npm 仓库已经发布。下载完成后仍需管理员手动点击重启;覆盖或启动失败需要修复当前安装,不会自动恢复旧程序。
+- 本机密码保险箱在服务端进程内执行已授权操作,不具备独立 OS 身份隔离保证。管理界面锁定不会撤销已授予 Bot 的持续授权,停止使用请明确撤销;重启后管理界面仍需解锁。
+- SSH 持续授权允许 Bot 在对应主机上执行任意远程命令。只为可信 Bot 授权,检查主机和账户权限。首次连接固定主机密钥,后续变化需人工确认。
+- 显式配置的独立密码库服务连接失败时保持离线,不会自动切换到本机保险箱。
+- macOS 安装包为纯客户端,需要连接已有服务器,不包含本机服务器或执行节点运行时。历史 full 包继续保留。
+- macOS 沿用历史应用标识,使用 Developer ID Application 正式签名和 Apple 公证,提供完整自动更新附件。历史开发签名版请先手动安装正式 DMG。
+- 主项目采用 Apache-2.0,第三方组件保留各自许可与署名。
+
+## 下载
+
+- `Yaoyao-0.4.81-arm64.dmg`:macOS Apple Silicon 纯客户端安装包。
+- `Yaoyao-0.4.81-arm64.zip`、对应 `.blockmap` 和 `latest-mac.yml`:自动更新附件。
+- `Yaoyao-0.4.81-source.tar.gz`:Web/桌面源码和部署配置。
+- `SHA256SUMS.txt`:附件 SHA-256 校验值。
+
+## Docker Hub
+
+| 镜像 | 架构 |
+| --- | --- |
+| `samienluo/yaoyao:v0.4.81-amd` | `linux/amd64` |
+| `samienluo/yaoyao:v0.4.81` | `linux/amd64`、`linux/arm64` |
+| `samienluo/yaoyao:latest` | 验证后更新为本次双架构镜像 |
+
+```sh
+docker pull samienluo/yaoyao:v0.4.81
+docker compose --env-file docker.env pull web
+docker compose --env-file docker.env up -d --no-build web
+```
+
+Compose 镜像配置设为 `samienluo/yaoyao:v0.4.81`。Docker 镜像上传到 Docker Hub;GitHub 提供客户端、源码和校验附件。旧版本标签与附件保留。
+
+附件摘要、镜像摘要和验证结果见 [GitHub 发布页](https://github.com/Lsamien/yaoyao/releases/tag/v0.4.81)。

+ 2 - 2
package-lock.json

@@ -1,12 +1,12 @@
 {
   "name": "@lsamien/yaoyao",
-  "version": "0.4.80",
+  "version": "0.4.81",
   "lockfileVersion": 3,
   "requires": true,
   "packages": {
     "": {
       "name": "@lsamien/yaoyao",
-      "version": "0.4.80",
+      "version": "0.4.81",
       "license": "Apache-2.0",
       "dependencies": {
         "@koa/bodyparser": "^5.0.0",

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "@lsamien/yaoyao",
-  "version": "0.4.80",
+  "version": "0.4.81",
   "license": "Apache-2.0",
   "description": "夭夭 AI:聊天、多 Agent 团队、文件库与电脑工作空间",
   "type": "module",

+ 3 - 3
release.json

@@ -1,6 +1,6 @@
 {
   "schemaVersion": 1,
-  "releaseVersion": "0.4.80",
-  "webVersion": "0.4.80",
-  "gitTag": "v0.4.80"
+  "releaseVersion": "0.4.81",
+  "webVersion": "0.4.81",
+  "gitTag": "v0.4.81"
 }

+ 1 - 1
tests/client/conversationDeliveryMode.test.ts

@@ -21,7 +21,7 @@ it.each([true, false])('sends the selected delivery mode through the real compos
   vi.stubGlobal('EventSource', class { addEventListener() {} close() {} })
   vi.mocked(apiRequest).mockImplementation(async (path, options) => {
     if (path === '/api/app/capabilities') return { features: [], csrfToken: 'fixture' } as never
-    if (path === '/api/app/workspace/snapshot') return { agents, conversations: [group], cursor: 1, details: [] } as never
+    if (path.split('?')[0] === '/api/app/workspace/snapshot') return { agents, conversations: [group], cursor: 1, details: [] } as never
     if (path === '/api/app/agents') return { agents } as never
     if (path === '/api/app/agents/sources') return { sources: [] } as never
     if (path === '/api/app/conversations') return { conversations: [group], cursor: 1 } as never

+ 5 - 5
tests/client/conversationRecovery.test.ts

@@ -43,13 +43,13 @@ async function mountView(path = '/conversations', stubTimeline = false) {
 }
 function successfulResponse(path: string) {
   if (path === '/api/app/capabilities') return { features: [] }
-  if (path === '/api/app/workspace/snapshot') return { agents: [], conversations: [], details: [], cursor: 17 }
+  if (path.split('?')[0] === '/api/app/workspace/snapshot') return { agents: [], conversations: [], details: [], cursor: 17 }
   throw new Error(`Unexpected request ${path}`)
 }
 it.each([undefined, null, { agents: [], conversations: [], details: [] }])('recovers incomplete Bot initialization data without requiring a virtual machine', async snapshot => {
   let snapshots = 0
   vi.mocked(apiRequest).mockImplementation(async path => {
-    if (path === '/api/app/workspace/snapshot' && snapshots++ === 0) return snapshot as never
+    if (path.split('?')[0] === '/api/app/workspace/snapshot' && snapshots++ === 0) return snapshot as never
     return successfulResponse(path) as never
   })
   await mountView()
@@ -57,7 +57,7 @@ it.each([undefined, null, { agents: [], conversations: [], details: [] }])('reco
   expect(wrapper!.get('[role="alert"]').text()).toContain('Bot 会话数据尚未就绪')
   expect(wrapper!.text()).not.toContain('TypeError')
   await vi.advanceTimersByTimeAsync(1500); await flushPromises()
-  expect(sources.map(source => source.url)).toEqual(['/api/app/events/stream?after=17'])
+  expect(sources.map(source => source.url)).toEqual(['/api/app/events/stream?after=17&toolDetails=lazy'])
   expect(vi.mocked(apiRequest).mock.calls.some(([path]) => /local-vm|computer/.test(path))).toBe(false)
 })
 it('recovers an initial server outage while the browser stays online', async () => {
@@ -65,7 +65,7 @@ it('recovers an initial server outage while the browser stays online', async ()
   await mountView()
   expect(sources).toHaveLength(0)
   await vi.advanceTimersByTimeAsync(1500); await flushPromises()
-  expect(sources.map(source => source.url)).toEqual(['/api/app/events/stream?after=17'])
+  expect(sources.map(source => source.url)).toEqual(['/api/app/events/stream?after=17&toolDetails=lazy'])
   expect(vi.mocked(apiRequest).mock.calls.filter(([path]) => path === '/api/app/capabilities')).toHaveLength(2)
 })
 it('cancels a scheduled initial recovery when the view is destroyed', async () => {
@@ -101,7 +101,7 @@ it('cancels recovery while offline and restarts it only when connectivity return
   await vi.advanceTimersByTimeAsync(10_000)
   expect(apiRequest).toHaveBeenCalledTimes(1)
   online = true; window.dispatchEvent(new Event('online')); await flushPromises()
-  expect(sources.map(source => source.url)).toEqual(['/api/app/events/stream?after=17'])
+  expect(sources.map(source => source.url)).toEqual(['/api/app/events/stream?after=17&toolDetails=lazy'])
 })
 it('aborts a pending detail on going offline and ignores its late response', async () => {
   let online = true, signal: AbortSignal | undefined, release!: (value: unknown) => void

+ 1 - 1
tests/client/conversationSearchDelete.test.ts

@@ -20,7 +20,7 @@ async function setup(kind: 'direct' | 'group', remove: () => Promise<void> = asy
   vi.stubGlobal('EventSource', class { addEventListener() {} close() {} })
   vi.mocked(apiRequest).mockImplementation(async (path, options) => {
     if (path === '/api/app/capabilities') return { features: [], csrfToken: 'fixture-csrf' } as never
-    if (path === '/api/app/workspace/snapshot') return { agents: [{ id: 'bot', name: '旧聊天', archived: true }], conversations: archived, details: [], cursor: 1 } as never
+    if (path.split('?')[0] === '/api/app/workspace/snapshot') return { agents: [{ id: 'bot', name: '旧聊天', archived: true }], conversations: archived, details: [], cursor: 1 } as never
     if (path.endsWith('/lifecycle')) {
       if (options?.method !== 'POST') return { name: '旧聊天', kind, groups, confirmationToken: 'a'.repeat(64) } as never
       await remove()

+ 1 - 1
tests/client/conversationSettings.test.ts

@@ -24,7 +24,7 @@ it.each(['direct', 'group'] as const)('opens and saves the menu target %s while
   vi.stubGlobal('EventSource', class { addEventListener() {} close() {} })
   vi.mocked(apiRequest).mockImplementation(async path => {
     if (path === '/api/app/capabilities') return { features: [], csrfToken: 'fixture-csrf' } as never
-    if (path === '/api/app/workspace/snapshot') return { agents, conversations, cursor: 1, details: [] } as never
+    if (path.split('?')[0] === '/api/app/workspace/snapshot') return { agents, conversations, cursor: 1, details: [] } as never
     if (path === '/api/app/agents') return { agents } as never
     if (path === '/api/app/agents/sources') return { sources: [{ nodeId: 'local', profile: 'default', name: '基础机器人' }] } as never
     if (path === '/api/app/conversations') return { conversations, cursor: 1 } as never

+ 1 - 0
tests/e2e/model-confirmation.spec.ts

@@ -14,6 +14,7 @@ test('model confirmation survives reconnects and failed inputs retain their posi
     await route.fulfill({ json: { state: 'confirmed', response: { result } } })
   })
   await page.goto('/chat/session-demo?profile=yaoyao')
+  await expect(page.getByRole('heading', { name: '登录夭夭' })).toBeVisible()
   if (await page.getByRole('heading', { name: '登录夭夭' }).isVisible()) {
     await page.getByLabel('账号').fill('admin')
     await page.getByLabel('密码').fill('e2e-password')