Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
fix(remote-agent): 闲置释放只在管理本机时显示,手机补接不回会话的提示
fmfsaisai95bc6805fb83
diff --git a/apps/desktop/src/renderer/features/provider-share/ProviderShareManagePage.tsx b/apps/desktop/src/renderer/features/provider-share/ProviderShareManagePage.tsxindex 8de780702a..dc04ac9dfd 100644--- a/apps/desktop/src/renderer/features/provider-share/ProviderShareManagePage.tsx+++ b/apps/desktop/src/renderer/features/provider-share/ProviderShareManagePage.tsx@@ -521,8 +521,8 @@ export function ProviderShareManagePage({time={time}/>- {/* 这台电脑作为使用方的设置(与上面提供方的额度分开):不管管理的是哪台电脑,改的都是这台。 */}- <RemoteAgentIdleReleaseSection />+ {/* 这台电脑作为使用方的设置(与上面提供方的额度分开):只对这台生效,管理另一台电脑时不显示,免得以为改的是那台。 */}+ {!deviceId && <RemoteAgentIdleReleaseSection />}{linkOpen && (<ProviderShareLinkDialogdiff --git a/apps/desktop/src/renderer/features/provider-share/__tests__/ProviderShareManagePage.test.tsx b/apps/desktop/src/renderer/features/provider-share/__tests__/ProviderShareManagePage.test.tsxindex 70565e1c1e..90217c1413 100644--- a/apps/desktop/src/renderer/features/provider-share/__tests__/ProviderShareManagePage.test.tsx+++ b/apps/desktop/src/renderer/features/provider-share/__tests__/ProviderShareManagePage.test.tsx@@ -373,6 +373,19 @@ describe('ProviderShareManagePage', () => {* - tier:unit;验证本地页面状态与跨电脑路由字段。* - 实测耗时:本文件单独运行约 3 秒。*/+ // 闲置释放只对这台电脑生效:管理另一台电脑时不显示,免得以为改的是那台。+ it('shows the idle release setting only when managing this computer', async () => {+ renderPage();+ expect(await screen.findByTestId('remote-agent-idle-release')).toBeTruthy();+ expect(command).toHaveBeenCalledWith({ action: 'get-idle-release' });+ cleanup();+ command.mockClear();+ renderPage('on', { deviceId: 'studio' });+ await screen.findByTestId('remote-agent-limits');+ expect(screen.queryByTestId('remote-agent-idle-release')).toBeNull();+ expect(command).not.toHaveBeenCalledWith({ action: 'get-idle-release' });+ });+it('keeps the managed computer on pending approvals', async () => {renderPage('on', { deviceId: 'studio' });await screen.findByTestId('provider-share-pending-row');diff --git a/apps/mobile/src/__tests__/AgentErrorLocalization.test.tsx b/apps/mobile/src/__tests__/AgentErrorLocalization.test.tsxindex 94c5ae35b9..14668ce100 100644--- a/apps/mobile/src/__tests__/AgentErrorLocalization.test.tsx+++ b/apps/mobile/src/__tests__/AgentErrorLocalization.test.tsx@@ -149,6 +149,16 @@ describe.each(SUPPORTED_LOCALES)('known mobile remote errors in %s', locale => {expect(unclassifiedAgentErrorI18nKey('[REMOTE_AGENT_BUSY] too many tasks')).toBe('session.remoteError.REMOTE_AGENT_BUSY');});+ it('explains a remote conversation that could not be resumed instead of a generic reply failure', async () => {+ await i18n.changeLanguage(locale);+ const message = '[REMOTE_AGENT_RESUME_LOST] The earlier conversation on the other computer could not be resumed, so the agent continues without it.';+ const key = 'session.remoteError.REMOTE_AGENT_RESUME_LOST';+ expect(unclassifiedAgentErrorI18nKey(message)).toBe(key);+ expect(i18n.t(key)).not.toBe(i18n.t('session.tail.replyFailed'));+ const [normalized] = normalizeRemoteMessages([row(message)]);+ expect(normalized.body).toBe(i18n.t(key));+ });+it('has every desktop bracket-code translation without relying on fallback languages', async () => {await i18n.changeLanguage(locale);const desktop = JSON.parse(readFileSync(`../desktop/src/renderer/i18n/locales/${locale}/common.json`, 'utf8'));diff --git a/apps/mobile/src/i18n/locales/en/session.json b/apps/mobile/src/i18n/locales/en/session.jsonindex ffc398ca0c..0ee9e17553 100644--- a/apps/mobile/src/i18n/locales/en/session.json+++ b/apps/mobile/src/i18n/locales/en/session.json@@ -585,6 +585,7 @@"REMOTE_AGENT_BUSY": "Too many sessions are running on the other computer. End some of them and try again.","REMOTE_AGENT_DEVICE_LIMIT": "This device has reached its remote session limit. Archive unused sessions or ask the provider owner to raise the limit in Remote & sharing.","REMOTE_AGENT_TOTAL_LIMIT": "The provider computer has reached its total remote session limit. Ask the owner to release unused sessions or raise the limit in Remote & sharing.",+ "REMOTE_AGENT_RESUME_LOST": "The earlier conversation on the other computer could not be reconnected, so the agent continues without that context.","REMOTE_AGENT_UNSUPPORTED": "This Agent isn't available on the other computer. Install or sign in to it there, or pick another Agent.","REMOTE_AGENT_INVALID": "Something went wrong talking to the computer running the Agent. Try again; if it keeps happening, update Cindy on both computers.","REMOTE_AGENT_PROVIDER_NOT_ALLOWED": "That computer hasn’t allowed remote use of this provider. On that computer, turn on “Allow remote use” in Settings → Providers, or pick another model.",diff --git a/apps/mobile/src/i18n/locales/ja/session.json b/apps/mobile/src/i18n/locales/ja/session.jsonindex 46901d709d..323def182b 100644--- a/apps/mobile/src/i18n/locales/ja/session.json+++ b/apps/mobile/src/i18n/locales/ja/session.json@@ -585,6 +585,7 @@"REMOTE_AGENT_BUSY": "相手のパソコンで実行中のセッションが多すぎます。いくつか終了してからもう一度お試しください。","REMOTE_AGENT_DEVICE_LIMIT": "このデバイスのリモートセッション数が上限に達しました。不要なセッションをアーカイブするか、提供者に「リモートと共有」で上限の変更を依頼してください。","REMOTE_AGENT_TOTAL_LIMIT": "提供者のパソコンのリモートセッション総数が上限に達しました。提供者に不要なセッションの解放、または「リモートと共有」での上限変更を依頼してください。",+ "REMOTE_AGENT_RESUME_LOST": "相手のパソコンでのこれまでの会話に再接続できなかったため、Agent はその文脈なしで続行します。","REMOTE_AGENT_UNSUPPORTED": "相手のパソコンではこの Agent を使えません。そのパソコンでインストールまたはサインインするか、別の Agent を選んでください。","REMOTE_AGENT_INVALID": "Agent を実行しているパソコンとの通信でエラーが発生しました。もう一度お試しください。続く場合は両方のパソコンの Cindy を最新版に更新してください。","REMOTE_AGENT_PROVIDER_NOT_ALLOWED": "そのパソコンでは、このプロバイダーのリモート利用が許可されていません。そのパソコンの「設定 → モデルプロバイダー」で「リモート利用を許可」をオンにするか、別のモデルを選んでください。",diff --git a/apps/mobile/src/i18n/locales/ko/session.json b/apps/mobile/src/i18n/locales/ko/session.jsonindex 1497666c37..9145d14c8f 100644--- a/apps/mobile/src/i18n/locales/ko/session.json+++ b/apps/mobile/src/i18n/locales/ko/session.json@@ -581,6 +581,7 @@"REMOTE_AGENT_BUSY": "상대 컴퓨터에서 실행 중인 세션이 너무 많습니다. 일부를 종료한 뒤 다시 시도하세요.","REMOTE_AGENT_DEVICE_LIMIT": "이 기기의 원격 세션 수가 한도에 도달했습니다. 사용하지 않는 세션을 보관하거나 제공자에게 원격 및 공유에서 한도를 높여 달라고 요청하세요.","REMOTE_AGENT_TOTAL_LIMIT": "제공자 컴퓨터의 전체 원격 세션 수가 한도에 도달했습니다. 제공자에게 불필요한 세션을 해제하거나 원격 및 공유에서 한도를 높여 달라고 요청하세요.",+ "REMOTE_AGENT_RESUME_LOST": "상대 컴퓨터의 이전 대화에 다시 연결하지 못해 Agent가 그 맥락 없이 계속합니다.","REMOTE_AGENT_UNSUPPORTED": "상대 컴퓨터에서는 이 Agent를 사용할 수 없습니다. 그 컴퓨터에서 설치하거나 로그인한 뒤 다시 시도하거나, 다른 Agent를 선택하세요.","REMOTE_AGENT_INVALID": "Agent를 실행하는 컴퓨터와 통신하는 중 오류가 발생했습니다. 다시 시도하고, 계속되면 두 컴퓨터의 Cindy를 모두 최신 버전으로 업데이트하세요.","REMOTE_AGENT_PROVIDER_NOT_ALLOWED": "그 컴퓨터에서 이 제공자의 원격 사용을 허용하지 않았습니다. 그 컴퓨터의 설정 → 모델 제공자에서 원격 사용 허용을 켜거나 다른 모델을 선택하세요.",diff --git a/apps/mobile/src/i18n/locales/zh-CN/session.json b/apps/mobile/src/i18n/locales/zh-CN/session.jsonindex 4c52c65f8e..15a9f63c1f 100644--- a/apps/mobile/src/i18n/locales/zh-CN/session.json+++ b/apps/mobile/src/i18n/locales/zh-CN/session.json@@ -581,6 +581,7 @@"REMOTE_AGENT_BUSY": "那台电脑上同时运行的任务太多。先结束一些任务后再试。","REMOTE_AGENT_DEVICE_LIMIT": "这台设备保留的远程任务数已达上限。可归档暂时不用的任务,或请远程电脑的主人在“远程与分享”中提高上限。","REMOTE_AGENT_TOTAL_LIMIT": "远程电脑保留的任务总数已达上限。请那台电脑的主人释放暂时不用的任务,或在“远程与分享”中提高上限。",+ "REMOTE_AGENT_RESUME_LOST": "之前在那台电脑上的对话没能接上,Agent 会在没有之前上下文的情况下继续。","REMOTE_AGENT_UNSUPPORTED": "那台电脑上这个 Agent 不可用。在那台电脑上安装或登录后再试,或换一个 Agent。","REMOTE_AGENT_INVALID": "和运行 Agent 的电脑通信出错。请重试;如果一直出现,请把两台电脑上的 Cindy 都更新到最新版。","REMOTE_AGENT_PROVIDER_NOT_ALLOWED": "那台电脑没有允许远程调用这个供应商。请在那台电脑的「设置 → 模型供应商」里打开「允许被远程调用」,或换一个模型。",diff --git a/apps/mobile/src/i18n/locales/zh-TW/session.json b/apps/mobile/src/i18n/locales/zh-TW/session.jsonindex 600a9df22c..10ba714de1 100644--- a/apps/mobile/src/i18n/locales/zh-TW/session.json+++ b/apps/mobile/src/i18n/locales/zh-TW/session.json@@ -585,6 +585,7 @@"REMOTE_AGENT_BUSY": "那臺電腦上同時執行的任務太多。先結束一些任務後再試。","REMOTE_AGENT_DEVICE_LIMIT": "這台裝置保留的遠端任務數已達上限。可封存暫時不用的任務,或請遠端電腦的主人在「遠端與分享」中提高上限。","REMOTE_AGENT_TOTAL_LIMIT": "遠端電腦保留的任務總數已達上限。請那台電腦的主人釋放暫時不用的任務,或在「遠端與分享」中提高上限。",+ "REMOTE_AGENT_RESUME_LOST": "之前在那台電腦上的對話沒能接上,Agent 會在沒有之前上下文的情況下繼續。","REMOTE_AGENT_UNSUPPORTED": "那臺電腦上這個 Agent 無法使用。在那臺電腦上安裝或登入後再試,或換一個 Agent。","REMOTE_AGENT_INVALID": "與執行 Agent 的電腦通訊時出錯。請重試;如果持續出現,請把兩臺電腦上的 Cindy 都更新到最新版。","REMOTE_AGENT_PROVIDER_NOT_ALLOWED": "那臺電腦沒有允許遠端呼叫這個供應商。請在那臺電腦的「設定 → 模型供應商」裡開啟「允許遠端呼叫」,或換一個模型。",diff --git a/docs/dev-rules/protocol-compatibility.md b/docs/dev-rules/protocol-compatibility.mdindex 45466e9397..688d49e53e 100644--- a/docs/dev-rules/protocol-compatibility.md+++ b/docs/dev-rules/protocol-compatibility.md@@ -1334,7 +1334,7 @@ Codex 原生图片恢复(#6412)在既有 `maker:remote-agent:v1` 上追加- **控制端连接池:名额紧张时让出闲置任务的 Agent 进程**(2026-10-17):B 按发起设备限制同时开着的 run(`caps.maxRuns`),A 上开着的任务即使闲着也占名额。A 对每台 B 一个连接池(`controller/connectionPool.ts`,计数口径与 B 的 `limitDeviceOf`一致:这台设备),**只在名额紧张时**让出「不忙且闲置满 N 分钟」的连接;N 是 A 本机设置(「远程与分享」页「这台电脑使用- 其他电脑的模型」,默认 10,0~120,**0 = 从不让出**,与没有连接池时一样满了直接报错)。三条路径都只让有资格的:+ 其他电脑的模型」,只在管理本机时显示,默认 10,0~120,**0 = 从不让出**,与没有连接池时一样满了直接报错)。三条路径都只让有资格的:A 在这台 B 上开着的连接数到了水位线 `ceil(maxRuns×80%)`(只在水位线低于上限、即 maxRuns ≥ 5 时;每次 open 前与每分钟查一次)按最久没活动的顺序让,直到降到水位线以下;open 前已满先同步让一个;open 被拒且是名额类 `REMOTE_AGENT_BUSY`(`[DEVICE_LIMIT]` / `[TOTAL_LIMIT]`,旧 B 是 `too many tasks are running from this computer`;`too much staged data` 不算)@@ -1364,7 +1364,7 @@ Codex 原生图片恢复(#6412)在既有 `maker:remote-agent:v1` 上追加`forkSession` 只在第一轮跑完前带(之后再带会再截断一次);`setVendorOptions` 改过的内容、`libraryRoot`、`useCindyAutoReviewFallback` 连回后再告诉 B 一次。受邀者归属校验、供应商组 `relayMemberOf` 回到原组内电脑与 App 重启后接回同一条路径。B 接不回原会话时(会话失效回调里正是这次带的 id,或 B返回了别的会话 id)沿用 `onInvalidResumeSession` 语义,同时在任务里插一条非终止的 `[REMOTE_AGENT_RESUME_LOST]` 提示,- 不悄悄丢上下文;旧手机没有这条文案,显示 message 的英文兜底。+ 不悄悄丢上下文;手机端同步补了 `session.remoteError.REMOTE_AGENT_RESUME_LOST`,旧手机没有这条文案,显示通用的「回复失败」。- **并发**:让出进行中来的调用等它让完再连回;同时几个调用只连一次;调用开始后让出放弃;已让出时的关闭、归档、删除、换账号、退出 App(`detach`)只收本机部分,不再联系 B。- **已知限制**:B 的整机合计上限(`TOTAL_LIMIT`)A 看不到别的设备的占用,只能靠被拒后处理;A 在自己额度内不让出,可能挡住别的