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:
@@ -8586,11 +8586,11 @@ describe("App", () => {
|
||||
fireEvent.click(await screen.findByRole("tab", { name: "平台功能" }));
|
||||
fireEvent.click(
|
||||
await screen.findByRole("tab", {
|
||||
name: "远程项目(技术预览)",
|
||||
name: "远程项目",
|
||||
}),
|
||||
);
|
||||
const remoteProjectsSwitch = await screen.findByRole("switch", {
|
||||
name: "远程项目(技术预览)",
|
||||
name: "远程项目",
|
||||
});
|
||||
expect(remoteProjectsSwitch).toBeChecked();
|
||||
fireEvent.click(remoteProjectsSwitch);
|
||||
|
||||
@@ -1563,7 +1563,7 @@ describe('SettingsPanel runtime files', () => {
|
||||
})
|
||||
|
||||
expect(
|
||||
screen.getByRole('tab', { name: '远程项目(技术预览)' })
|
||||
screen.getByRole('tab', { name: '远程项目' })
|
||||
).toBeInTheDocument()
|
||||
})
|
||||
|
||||
@@ -2060,10 +2060,10 @@ describe('SettingsPanel runtime files', () => {
|
||||
|
||||
fireEvent.click(screen.getByRole('tab', { name: '平台功能' }))
|
||||
fireEvent.click(
|
||||
screen.getByRole('tab', { name: '远程项目(技术预览)' })
|
||||
screen.getByRole('tab', { name: '远程项目' })
|
||||
)
|
||||
const remoteProjectsSwitch = await screen.findByRole('switch', {
|
||||
name: '远程项目(技术预览)'
|
||||
name: '远程项目'
|
||||
})
|
||||
expect(remoteProjectsSwitch).not.toBeChecked()
|
||||
expect(
|
||||
@@ -2178,7 +2178,7 @@ describe('SettingsPanel runtime files', () => {
|
||||
|
||||
fireEvent.click(screen.getByRole('tab', { name: '平台功能' }))
|
||||
fireEvent.click(
|
||||
screen.getByRole('tab', { name: '远程项目(技术预览)' })
|
||||
screen.getByRole('tab', { name: '远程项目' })
|
||||
)
|
||||
expect(
|
||||
await screen.findByText(
|
||||
@@ -2239,7 +2239,7 @@ describe('SettingsPanel runtime files', () => {
|
||||
|
||||
fireEvent.click(screen.getByRole('tab', { name: '平台功能' }))
|
||||
fireEvent.click(
|
||||
screen.getByRole('tab', { name: '远程项目(技术预览)' })
|
||||
screen.getByRole('tab', { name: '远程项目' })
|
||||
)
|
||||
|
||||
expect(
|
||||
@@ -2332,11 +2332,11 @@ describe('SettingsPanel runtime files', () => {
|
||||
screen.queryByRole('tab', { name: '主机与远程执行' })
|
||||
).not.toBeInTheDocument()
|
||||
fireEvent.click(
|
||||
screen.getByRole('tab', { name: '远程项目(技术预览)' })
|
||||
screen.getByRole('tab', { name: '远程项目' })
|
||||
)
|
||||
expect(
|
||||
await screen.findByRole('switch', {
|
||||
name: '远程项目(技术预览)'
|
||||
name: '远程项目'
|
||||
})
|
||||
).toBeInTheDocument()
|
||||
})
|
||||
|
||||
@@ -567,7 +567,7 @@ export const settingsSections = {
|
||||
enabled: 'Render HTML in conversations'
|
||||
},
|
||||
remoteProjects: {
|
||||
title: 'Remote Projects (Technical Preview)',
|
||||
title: 'Remote Projects',
|
||||
description:
|
||||
'Enables SSH Host management and GoodBuddy-managed remote projects.',
|
||||
enabled: 'Enable Remote Projects',
|
||||
|
||||
@@ -538,7 +538,7 @@ export const settingsSections = {
|
||||
enabled: '在会话中渲染 HTML'
|
||||
},
|
||||
remoteProjects: {
|
||||
title: '远程项目(技术预览)',
|
||||
title: '远程项目',
|
||||
description: '启用 SSH Host 管理和由 GoodBuddy 托管的远程项目。',
|
||||
enabled: '启用远程项目',
|
||||
agentInventory: {
|
||||
|
||||
Reference in New Issue
Block a user