fix: reclaim idle remote runtimes and retire replaced agents

Remote tasks could leave idle Runtime processes behind, and replaced Agent
installations lacked a drain-and-exit lifecycle. Keep the current Agent
resident, let displaced Agents finish existing work and reconnect for its
results, then retire them without restarting obsolete installations.

Reclaim Runtime processes when their last active task finishes, preserve
pending questions and shared active tasks, and restore conversation history
when the next turn starts. Remove the Remote Projects technical preview label
from settings, errors, tests, and current documentation; the feature remains
disabled by default.

Validation recorded during implementation: 213 lifecycle tests and 28 focused
UI/IPC tests passed, as did SettingsPanel and lint. Linux x64 real-Host checks
used 8 provider requests. Broader tests and final typecheck encountered
unrelated concurrent changes; details and coverage limits are documented.

Release note: 远程任务结束后自动释放空闲运行进程,下一轮对话恢复历史;更新后的旧 Agent 等待已有任务完成再退出,当前 Agent 保持常驻。远程项目移除“技术预览”标识,仍默认关闭。
This commit is contained in:
mesalogo
2026-09-23 17:37:14 +08:00
parent cdd573778c
commit 83a48a4079
29 changed files with 402 additions and 63 deletions
@@ -24,7 +24,7 @@
1. “平台功能”保留现有一级设置分类,在分类内部增加共享 `PageTabs`:
- **通用设置**
- **远程项目(技术预览)**
- **远程项目**
2. “通用设置”首个功能为“模型下载源”。
3. 首期提供两个互斥选项:
- `modelscope`,用户文案为 **ModelScope**,默认值。
@@ -60,7 +60,7 @@
“平台功能”现已使用两个二级页签:
- “通用设置”承载全局模型下载源。
- “远程项目(技术预览)”承载远程项目开关与 Agent 包管理。
- “远程项目”承载远程项目开关与 Agent 包管理。
页签复用共享 `PageTabs`,默认打开“通用设置”,不会把当前页签写入应用设置。
@@ -166,7 +166,7 @@
└─ 平台功能
├─ 通用设置
│ └─ 模型下载源
└─ 远程项目(技术预览)
└─ 远程项目
├─ 远程项目开关
└─ Agent 包管理
```
@@ -185,7 +185,7 @@
onChange={setActiveSection}
tabs={[
{ id: 'general', label: '通用设置' },
{ id: 'remote-projects', label: '远程项目(技术预览)' }
{ id: 'remote-projects', label: '远程项目' }
]}
value={activeSection}
variant="segmented"
@@ -213,7 +213,7 @@
未来新增页签时:
- 必须与“通用设置”和“远程项目(技术预览)”处于同级。
- 必须与“通用设置”和“远程项目”处于同级。
- 页签表示完整、独立的功能设置域。
- 通用设置只放跨功能的全局行为,不成为任意设置的杂物区。
- 页签超过可读数量时重新组织信息架构,不允许多行堆叠。
@@ -229,7 +229,7 @@
平台功能
管理通用平台行为与可选工作区能力
[ 通用设置 ] [ 远程项目(技术预览) ]
[ 通用设置 ] [ 远程项目 ]
┌ 模型下载源 ────────────────────────────────────────────┐
│ 选择 GoodBuddy 托管本地模型后续下载使用的平台。 │
@@ -965,7 +965,7 @@ Ollama 的模型下载由用户和 Ollama 管理。GoodBuddy 的模型下载源
### 19.1 产品
- “平台功能”显示“通用设置”和“远程项目(技术预览)”两个可访问页签。
- “平台功能”显示“通用设置”和“远程项目”两个可访问页签。
- 默认打开“通用设置”。
- “通用设置”提供 ModelScope 和 Hugging Face,默认 ModelScope。
- 来源选择说明影响范围,并明确已安装模型、ZIP、Ollama 和应用更新不受影响。