From 43d0f2e770b66417f59f898b3940b0bf625b897c Mon Sep 17 00:00:00 2001 From: Yao Jingxi <23722032@bjtu.edu.cn> Date: Sun, 22 Nov 2026 14:12:07 +0800 Subject: [PATCH] =?UTF-8?q?docs(matrix):=20=E8=BF=9C=E7=A8=8B=E5=BC=80?= =?UTF-8?q?=E5=8F=91=E6=80=BB=E6=9D=A1=E7=9B=AE=E6=8C=89=20Viva=20?= =?UTF-8?q?=E7=8E=B0=E7=8A=B6=E6=94=B9=E4=B8=BA=E9=83=A8=E5=88=86=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=EF=BC=8C=E8=BF=81=E7=A7=BB=E6=96=87=E6=A1=A3=E7=9A=84?= =?UTF-8?q?=E8=BF=9C=E7=A8=8B=E4=B8=A4=E8=A1=8C=E5=92=8C=E8=AE=A1=E6=95=B0?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=20(#2231)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - remote-development-workspace 两端从 missing / not-applicable 改为 partial / pending。 证据改为 Viva 的远程开发实现、真实主机验收测试和 #2231 的 Agent Note。 验证方式按 #2231 第 13 节写成 macOS 与 Windows 客户端的整机流程。 备注说明为什么是部分实现:远程 Mac 按 D2 不做,插件任务、构建工具、插件运行和调试属于 R3/R4。 legacy 不变。 - docs/viva-migration.md: - remote-development-workspace、remote-workspace 两行从“未开始 / 无 desktop/ 证据”改为“部分”,并写上主要实现文件和缺口。 - 现状计数按主表重新计数,改为完成 40、部分 111、未开始 2;原来的 42/106/5 和“152 项”与主表不一致。 - 数据位置表的“远程工作区”行写上 Viva 的存储位置,并说明旧版 connections.json 没有导入。 --- docs/viva-migration.md | 16 ++++--- .../remote-development-workspace.json | 43 +++++++++++++++---- 2 files changed, 44 insertions(+), 15 deletions(-) diff --git a/docs/viva-migration.md b/docs/viva-migration.md index ec3b8858b8..f741223721 100644 --- a/docs/viva-migration.md +++ b/docs/viva-migration.md @@ -27,18 +27,20 @@ | 不纳入 | 2 | | 合计 | 254 | -必须迁移 152 项的 Viva 现状: +必须迁移 153 项的 Viva 现状(2026-11-22 按主表重新计数): | 现状 | 数量 | | --- | --- | -| 完成 | 42 | -| 部分 | 106 | -| 未开始 | 5 | +| 完成 | 40 | +| 部分 | 111 | +| 未开始 | 2 | 2026-11-12 起 Agent 对话整体放弃,原先唯一“完成”的 `agent-minimal-conversation` 随之移入“放弃”。 2026-11-12 按功能矩阵 JSON 与代码重新核对一遍现状列:“完成”是两端(平台专属行只看对应平台)在 JSON 里都为 implemented,即代码已接通,原生窗口验收仍为 pending;“部分”含 JSON 为 partial 的行与按代码改判的行;说明列原写“无 desktop/ 证据”的行改写为主要实现文件,具体缺口见对应 JSON 的 notes。仍未开始的 5 项:远程开发两项、构建 Provider 原生配置与只读模型输入,以及依赖 webview、按用户决定暂缓的 `embedded-viewers`。 +2026-11-22 按主表重新计数:上表原来的 42、106、5 与主表各行不一致,现按主表现状列计数。远程开发两项(`remote-development-workspace`、`remote-workspace`)随 #2231 R0–R2 合入,改为“部分”,缺口是远程工作区里的插件任务、构建工具、插件运行和调试(#2231 R3/R4),远程 Mac 按 #2231 D2 不做;`embedded-viewers` 在主表中已是“部分”。仍未开始的 2 项是构建 Provider 原生配置与只读模型输入。 + ## 主表(254 项,按 area 分组) 列说明:基线为 5a54c41 上 macOS/Windows 的实现状态(实现/部分/缺/专属/插件/未盘);Viva 现状为完成(代码接通、验收 pending)/部分/未开始,“—”表示该分类不迁移。 @@ -182,8 +184,8 @@ | `workspace-open-switch` | 打开工作区与切换项目 | 必须迁移 | 实现/实现 | 部分 | — | | `workspace-tabs-projects` | 多项目与多标签 | 必须迁移 | 实现/实现 | 部分 | editorgroups.go、tabstrip.go;仅单项目(workspace-open-switch) | | `workspace-tree-batch-files` | 项目树独立多选、范围选择及批量拖动移动、复制、重复和移到废纸篓 | 必须迁移 | 实现/缺 | 部分 | `workbench/filetree_menu.go` | -| `remote-development-workspace` | 在 SSH 主机、容器和远程 Mac 上打开并开发项目 | 必须迁移 | 部分/缺 | 未开始 | 无 desktop/ 证据 | -| `remote-workspace` | 远程连接与远程路径工作区 | 必须迁移 | 部分/实现 | 未开始 | 无 desktop/ 证据 | +| `remote-development-workspace` | 在 SSH 主机、容器和远程 Mac 上打开并开发项目 | 必须迁移 | 部分/缺 | 部分 | `workbench/remote*.go`、`core/remote_session.go`、`remoteserver/`;SSH、WSL、容器与 devcontainer.json 已接通(#2231 R0–R2),远程 Mac 按 #2231 D2 不做,插件任务、构建工具、插件运行和调试属于 R3/R4 | +| `remote-workspace` | 远程连接与远程路径工作区 | 必须迁移 | 部分/实现 | 部分 | `workbench/remote_workspace.go`、`remote_terminal.go`、`remote_run.go`、`remote_ports.go`、`remote_close.go`;文件、终端、搜索、Git、运行、端口、关闭确认与断线重连已接通,缺口同上一行 | | `plugin-project-generators` | 新建项目窗口按 IDEA 的布局列出“新建项目”和“生成器”两组条目 | 必须迁移 | 实现/缺 | 部分 | C04 | | `dependency-browser` | 项目依赖与模块浏览 | 必须迁移 | 实现/实现 | 部分 | — | | `file-explorer` | 项目文件树与资源打开 | 必须迁移 | 实现/实现 | 部分 | — | @@ -558,7 +560,7 @@ MCP 管理随 Agent 对话失去消费者后,本轮整块删除,后续重新 | 凭据:GitHub / 代理 / 数据库 / 远程 / 插件 | Keychain service:`app.lithe.desktop.github`(键 `oauth-token`)、`app.lithe.desktop.proxy`(键 `proxy.password`)、`app.lithe.desktop.database`、`app.lithe.desktop.remote`、`app.lithe.desktop.plugin-credentials`(按 pluginID 追加) | Windows 凭据管理器(keyring crate):service 为应用标识 `app.lithe.windows`,用户名为调用方键(如 `ai-provider-token/`) | macOS `MacServiceContainer.swift`、`MacKeychainSecureStore.swift`、`MacPluginCredentialStore.swift`;Windows `secure_storage.rs` | 插件凭据:`desktop/internal/credentials`,service `app.lithe.viva.plugin-credentials.<插件ID>`(macOS 钥匙串,Windows 凭据管理器,Linux Secret Service);GitHub、代理、数据库、远程凭据:未找到 | 插件凭据已实现导入:用户在设置齿轮菜单确认后,列出旧 `app.lithe.desktop.plugin-credentials.<插件ID>`(及 `.dev`)下的项,逐项读取(系统可能请求允许访问),只填补新位置没有的值,旧项不改不删;平时 `get`/`delete` 不碰旧项。旧 Windows 没有插件凭据。其余凭据随对应功能实现同样的可选导入;不得导出明文 JSON | | 凭据:AI/Agent | Keychain 键 `lithe.<来源>.imported.apiKey`;回退文件 `Application Support/Lithe/ai-secrets.json`(`MacLocalSecretStore.swift`);Agent 数据目录 `Application Support/Lithe`(`AgentAccounts//` 订阅账号,`agents/` 适配器安装) | Tauri store `settings.json` 的 `agentPanel`;凭据在凭据管理器;Rust agent-host 数据目录 | macOS `AppModel+AgentAccounts.swift`、`AppModel+AgentConversation.swift`;Windows `agent_provider_settings.rs`、`ai-token-service.ts` | Core `agent.*` 接口接收调用方传入的 dataDirectory,Viva 传入的默认目录未找到;Agent 会话历史由 Codex/Claude CLI 自己保存,Viva 通过 `listSessions` 读取 | 订阅账号目录是官方 CLI 的独立配置目录,建议原路径只读复用;密钥按上一行处理 | | 数据库连接(旧内置模块) | UserDefaults `database.profiles.v1`、`database.connection-folders.v1`、`database.sql-history.v1`;迁移标记 `lithe.databasePluginMigration.v1` | 未找到 | `MacDatabasePluginMigration.swift` | 不适用(数据库由 Lithe Store 社区插件提供) | 由数据库插件负责导入;宿主不自动读取旧键与旧钥匙串,旧值只经用户触发的导入取得(插件凭据导入见“凭据:GitHub / 代理 / 数据库 / 远程 / 插件”行) | -| 远程工作区 | `Application Support/Lithe/RemoteWorkspaces/<连接>/<路径哈希>/`;连接 `connections.json` | 未找到 | `MacRemoteWorkspaceRoots.swift` | 未找到 | 随远程功能迁移时再定 | +| 远程工作区 | `Application Support/Lithe/RemoteWorkspaces/<连接>/<路径哈希>/`;连接 `connections.json` | 未找到 | `MacRemoteWorkspaceRoots.swift` | 偏好根目录下的 `remote/connections.json`、`remote/preferences.json`、`remote/ports.json` 与 `toolchains/remote-trust.json`(路径和大小上限由 Core 给出,`remoteconn/`);关闭时保留的会话键存系统密钥存储(`remoteconn/kept.go`);本机占位根在用户缓存目录 `Lithe/remote-workspaces` 下(`remoteplaceholder/`) | 未导入旧版 `connections.json`:远程开发窗口的导入只读 Motty 与 `~/.ssh/config`(`workbench/remote_import.go`);旧 `RemoteWorkspaces/` 下的本机根不复用 | | 未保存文档恢复 | 专用恢复存储未找到 | 未找到(`buffer.store.ts` 仅内存/localStorage 处理,未定位具体键) | — | 未找到 | 在新客户端设计恢复记录;不能丢旧未保存正文,但旧侧没有可迁移文件 | | 本地历史 | `Application Support/Lithe/LocalHistory`(`MacLocalHistoryAdapters.swift`,Rust Core 存取) | 未找到(`shelf_storage.rs` 的 `app_data_dir/git-shelves/<身份>` 是 Git Shelf,不是本地历史) | `RustLocalHistoryOperations.swift` | 未找到 | 保留旧目录只读,Viva 实现本地历史后按工作区相对身份导入 | | Git Shelf | `Application Support/Lithe/` 下版本化 JSON(`ShelveService.swift`) | `%APPDATA%\app.lithe.windows\git-shelves\<身份>` | 同左;Windows `shelf_storage.rs` | 未找到 | 随 Shelf 功能迁移 | diff --git a/shared/platform-feature-matrix/features/remote-development-workspace.json b/shared/platform-feature-matrix/features/remote-development-workspace.json index b164e7f0ab..18ab62beb5 100644 --- a/shared/platform-feature-matrix/features/remote-development-workspace.json +++ b/shared/platform-feature-matrix/features/remote-development-workspace.json @@ -4,21 +4,48 @@ "group": "远程开发", "capability": "在 SSH 主机、容器和远程 Mac 上打开并开发项目", "macos": { - "implementationStatus": "missing", - "verificationStatus": "not-applicable", + "implementationStatus": "partial", + "verificationStatus": "pending", "evidence": [ - "docs/viva-migration.md" + "desktop/internal/workbench/remote.go", + "desktop/internal/workbench/remote_browse.go", + "desktop/internal/workbench/remote_workspace.go", + "desktop/internal/workbench/remote_container.go", + "desktop/internal/workbench/remote_host_containers.go", + "desktop/internal/workbench/remote_devcontainer.go", + "desktop/internal/workbench/remote_run.go", + "desktop/internal/workbench/remote_ports.go", + "desktop/internal/workbench/remote_close.go", + "desktop/internal/core/remote_session.go", + "desktop/internal/remoteserver/remoteserver.go", + "desktop/internal/core/remote_acceptance_test.go", + ".agents/notes/implemented/feature/2026-11-21-remote-connections-window.md", + ".agents/notes/implemented/architecture/2026-11-22-remote-workspace-process-runs.md" ] }, "windows": { - "implementationStatus": "missing", - "verificationStatus": "not-applicable", + "implementationStatus": "partial", + "verificationStatus": "pending", "evidence": [ - "docs/viva-migration.md" + "desktop/internal/workbench/remote.go", + "desktop/internal/workbench/remote_browse.go", + "desktop/internal/workbench/remote_workspace.go", + "desktop/internal/workbench/remote_container.go", + "desktop/internal/workbench/remote_host_containers.go", + "desktop/internal/workbench/remote_devcontainer.go", + "desktop/internal/workbench/remote_wsl.go", + "desktop/internal/workbench/remote_run.go", + "desktop/internal/workbench/remote_ports.go", + "desktop/internal/workbench/remote_close.go", + "desktop/internal/core/remote_session.go", + "desktop/internal/remoteserver/remoteserver.go", + "desktop/internal/core/remote_acceptance_test.go", + ".agents/notes/implemented/feature/2026-11-21-remote-connections-window.md", + ".agents/notes/implemented/architecture/2026-11-22-remote-workspace-process-runs.md" ] }, "owner": "Workspace", - "verification": "欢迎页点“远程开发”:新建 Linux SSH 连接,分别验证 SSH Agent、私钥、密码和 2FA,核对主机信息卡片;打开项目后验证文件树、编辑保存和外部修改冲突。在远程终端运行 pwd,检查真实主机目录;探测 Shell,确认仅出现远端可执行程序,连续缩放与取消启动无残留进程。刷新工具链,确认读取远端环境且断线不回退本机。在远端仓库验证状态、暂存、提交、历史分页和 Git 设置来源;检查选择文件提交保留无关暂存,未保存缓冲区的行历史正确,worktree 创建、列举、锁定、删除及克隆均只操作远端目录;Shift+Shift 搜索远端文件与内容。Core 远端文件装入内存不超过 32 MiB,原子写入不超过 8 MiB,超限和断线均明确失败且不覆盖现有内容;更大的 Git 临时内容尚不支持。上述 I/O 路径已有适配和隔离 fixture,真实 SSH 完整流程待验收;构建 I/O、工具解析、状态目录、插件资源部署和通用 stdio 提供者接入已有实现;真实 SSH 上的完整构建和插件启动尚未验收。Agent 执行位置选择、远端服务强制终止后的快照安全回收、远程 Mac 和容器入口仍待完成。运行 scripts/remote/verify-remote-workspace.sh、RemoteRuntimeDiscoveryTests、RemoteTerminalTransportTests、RemoteShellDiscoveryTests 和 Core remote::sessions 集成测试。Linux musl 两种架构服务由 scripts/desktop/build-remote-server.sh 编译,scripts/desktop/verify/verify-remote-server-artifacts.mjs 检查清单、哈希、ELF 架构与静态链接;CI 在 x86_64 与 arm64 runner 上用 --require-smoke <目标> --require-pinned 分别原生运行同一份产物的 --identity、--version 和 server.hello 冒烟,不用模拟器;体积由 CI 记录在任务摘要中,不设硬上限(#2231 的 D9)。Release 与 AutoBuild 调用同一个 desktop-remote-server.yml,package-desktop.sh 把这份已冒烟的产物以 lithe_bundled_remote_server 嵌入客户端;desktop/internal/remoteserver 按嵌入清单校验后安装到用户缓存目录(0600,字节相同不重写),不写安装目录,由 package-desktop.test.mjs 与 remoteserver 测试覆盖。远程开发窗口与 Open 面板在 800×650 父窗口中验证信息换行、架构标签、底部按钮和编辑期间尺寸稳定。 文件树新建、目录、复制、重命名与主机废纸篓已接入,14 项 Swift 路由/监听 fixture 通过;真实 SSH 验证外部创建、编辑、移动、删除、溢出重扫和 watcher 取消后无资源残留。 RemoteBuildExecutionTests、RemotePluginDeploymentTests 与 MacBuildProviderSessionsTests 覆盖字节/参数保留、信号和错误、上传完整性、原连接清理、异步准备及迟到启动;补充真实 SSH stdio 顺序、断线、背压与取消后再更新验证状态。 通用资源启动在读取请求时预留身份,启动期间的关闭由创建者保留最终清理责任;验证清理早于注册、工作线程饱和、失败启动、无效关闭参数,以及不同资源独立性;区分常驻会话断线保留、非驻留断线清理和会话关闭/空闲到期后的迟到资源清理。RemotePluginLaunchPreparerTests 使用真实声明覆盖目标架构、远端状态目录、缺失资源、准备中重连和取消清理;本机 fixture 不替代 SSH/Linux 验收。语言和工具专属集成由各插件负责,不在本能力范围。 会话拥有完整插件快照:验证分配回复丢失后按原身份释放、重复释放不接管已有目录、跨会话隔离、父目录权限与链接拒绝、删除失败(包括等待创建者清理)保留原身份供重试、普通断线清理、常驻断线保留及关闭/空闲到期回收;服务端强杀后的回收仍未实现。上传验证同文件并发 BUSY、不同文件独立提交,以及取消/到期不等待文件锁。Agent 后续单独处理,本轮不扩展。 远端子目录与符号链接根:验证发现父仓库后,仅用返回 URL 查询状态和暂存仍选择原连接;同名本机哨兵仓库的索引和文件保持不变,同一远端路径在不同连接上隔离;外部 Git 元数据监听的订阅与事件使用同一可逆身份。 运行配置发现与生成(runConfig.inspect 等)尚未接入远程工作区,Core 对它们返回 NotSupported,不得把本机扫描结果当作远端项目。共享运行扫描的远程契约由 Core 集成测试 shared_run_scan_reads_the_host_tree_and_stops_when_the_link_drops 覆盖:读取主机目录树且占位目录保持为空、主机报告的单目录错误记为扫描不完整、链路中断时整体失败而不发布截断结果。运行准备与测试发现复用远程构建的状态租约(BuildSystemService.withPlanContext),真实 SSH 上的验收仍待完成。 macOS 远程开发主面板经 LitheCenteredPopup 有标题表单入口居中无动画打开,复用统一窗口外框;取消、保存成功、关闭窗口复位呈现状态并清理任务。输入框和按钮样式不变,内部认证/目录浏览 sheet 保留。运行 LitheCenteredPopupTests、RemoteConnectionsTests 和 RemoteWorkspaceRoutingTests;人工验证欢迎页和菜单入口。", + "verification": "在 macOS 和 Windows 客户端上,分别按 remote-connections 与 remote-workspace 两项的验证方式完整走一遍(#2231 第 13 节)。目标覆盖 Linux x86_64、Linux arm64、经跳板机访问的主机、本机容器和 SSH 主机上的容器,Windows 另加 WSL 发行版。每个组合依次验证:打开 → 信任 → 编辑保存与外部修改冲突 → 终端 → 搜索与 Git → 运行程序和脚本运行配置 → 端口转发与本机预览 → 断线重连后运行接着输出 → 关闭确认与保留进程 → 清理;最后确认本机和主机上都没有残留的 Lithe 进程。远程 Mac 不在范围内(#2231 D2:远端只支持 Linux),不验证。自动部分运行 desktop/internal/core/remote_acceptance_test.go(LITHE_TEST_REMOTE_SSH_HOST 等环境变量指定真实主机时才运行,CI 跳过),以及两项条目列出的单元测试和无头截图。", "legacy": { "revision": "5a54c41aa37a4e6e6b68918a4b05765b9dd07a36", "macos": { @@ -68,5 +95,5 @@ "verificationStatus": "not-applicable" } }, - "notes": "Viva:未找到 SSH、容器或远程 Mac 的远程开发入口、远程文件、远程 Git 或远端工具链探测实现;localshell/shell.go 只在注释中提及 sshconn.Shell,desktop/ 中没有对应包。" + "notes": "Viva:SSH 主机、Windows 上的 WSL 发行版、本机及 SSH/WSL 主机上的 Docker/Podman 容器,以及按本机 devcontainer.json 构建的容器,都经 Core 的 remote.* 打开为远程工作区(#2231 R0–R2 已合入)。连接管理见 remote-connections;工作区里的文件、终端、搜索、Git、运行、端口、关闭确认和断线重连见 remote-workspace。记为部分实现,原因有两个:远程 Mac 按 #2231 D2 不支持;远程工作区里的插件任务、构建工具、插件运行和调试属于 #2231 R3/R4,尚未实现。验证状态仍为待验证:自动验收已在 macOS(经 OpenSSH 连 Linux 容器)和 Windows(WSL)上通过,但按上面验证方式完成整机交互验收的结果还没有记录到本项。" }