cc-pets 2.4.0 → 2.6.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/CC_BRIDGE.md +93 -14
  2. package/CC_BRIDGE.zh-CN.md +71 -11
  3. package/CHANGELOG.md +55 -0
  4. package/CHANGELOG.zh-CN.md +56 -1
  5. package/CONTRIBUTING.md +1 -1
  6. package/CONTRIBUTING.zh-CN.md +1 -1
  7. package/PROVIDER_PROTOCOL.md +5 -1
  8. package/PROVIDER_PROTOCOL.zh-CN.md +4 -1
  9. package/README.md +116 -34
  10. package/README.zh-CN.md +99 -35
  11. package/Resources/AgentIcons/antigravity.icns +0 -0
  12. package/Resources/zh-Hans.lproj/Localizable.strings +99 -26
  13. package/Sources/CCPets/App/CCPetsAppDelegate+AgentEvents.m +51 -4
  14. package/Sources/CCPets/App/CCPetsAppDelegate+AgentStatus.m +120 -17
  15. package/Sources/CCPets/App/CCPetsAppDelegate+Bridge.m +24 -11
  16. package/Sources/CCPets/App/CCPetsAppDelegate+MenuBar.m +86 -0
  17. package/Sources/CCPets/App/CCPetsAppDelegate+Private.h +24 -1
  18. package/Sources/CCPets/App/CCPetsAppDelegate+Profiles.m +21 -11
  19. package/Sources/CCPets/App/CCPetsAppDelegate+Quota.m +33 -17
  20. package/Sources/CCPets/App/CCPetsAppDelegate+Settings.m +43 -7
  21. package/Sources/CCPets/App/CCPetsAppDelegate+Speech.m +7 -4
  22. package/Sources/CCPets/App/CCPetsAppDelegate+Update.m +7 -4
  23. package/Sources/CCPets/App/CCPetsAppDelegate+Workbench.m +24 -22
  24. package/Sources/CCPets/App/CCPetsAppDelegate.h +10 -0
  25. package/Sources/CCPets/App/CCPetsAppDelegate.m +18 -8
  26. package/Sources/CCPets/App/CCPetsVersion.h +4 -0
  27. package/Sources/CCPets/App/CCPetsVersion.m +34 -0
  28. package/Sources/CCPets/App/main.m +11 -0
  29. package/Sources/CCPets/Bridge/CCPetsBridge.m +41 -17
  30. package/Sources/CCPets/Bridge/CCPetsBridgeAntigravityApp.h +4 -0
  31. package/Sources/CCPets/Bridge/CCPetsBridgeAntigravityApp.m +119 -0
  32. package/Sources/CCPets/Bridge/CCPetsBridgeCLI.h +3 -1
  33. package/Sources/CCPets/Bridge/CCPetsBridgeCLI.m +272 -50
  34. package/Sources/CCPets/Bridge/CCPetsBridgeCore.h +12 -3
  35. package/Sources/CCPets/Bridge/CCPetsBridgeCore.m +341 -95
  36. package/Sources/CCPets/Bridge/CCPetsBridgeSetup.h +0 -2
  37. package/Sources/CCPets/Bridge/CCPetsBridgeSetup.m +227 -95
  38. package/Sources/CCPets/Bridge/CCPetsBridgeStore.h +35 -5
  39. package/Sources/CCPets/Bridge/CCPetsBridgeStore.m +310 -42
  40. package/Sources/CCPets/Bridge/CCPetsBridgeTerminalTitle.h +12 -0
  41. package/Sources/CCPets/Bridge/CCPetsBridgeTerminalTitle.m +105 -0
  42. package/Sources/CCPets/Integrations/CCPetsAntigravityConfig.h +17 -0
  43. package/Sources/CCPets/Integrations/CCPetsAntigravityConfig.m +462 -0
  44. package/Sources/CCPets/Integrations/CCPetsAntigravityEvents.h +5 -0
  45. package/Sources/CCPets/Integrations/CCPetsAntigravityEvents.m +180 -0
  46. package/Sources/CCPets/Integrations/CCPetsBridgeTitleRelay.h +3 -0
  47. package/Sources/CCPets/Integrations/CCPetsBridgeTitleRelay.m +463 -0
  48. package/Sources/CCPets/Integrations/CCPetsEvents.h +5 -0
  49. package/Sources/CCPets/Integrations/CCPetsEvents.m +68 -12
  50. package/Sources/CCPets/Integrations/CCPetsIntegrations.h +1 -1
  51. package/Sources/CCPets/Integrations/CCPetsIntegrations.m +38 -8
  52. package/Sources/CCPets/Integrations/CCPetsLaunchPreflight.m +15 -5
  53. package/Sources/CCPets/Integrations/CCPetsProfiles.h +2 -1
  54. package/Sources/CCPets/Integrations/CCPetsProfiles.m +112 -81
  55. package/Sources/CCPets/Integrations/CCPetsTerminalFocus.h +11 -1
  56. package/Sources/CCPets/Integrations/CCPetsTerminalFocus.m +217 -45
  57. package/Sources/CCPets/Pet/CCPetsPhrasesEditor.m +7 -0
  58. package/Sources/CCPets/Pet/CCPetsPreviews.m +16 -8
  59. package/Sources/CCPets/Pet/PetView+Menu.m +64 -5
  60. package/Sources/CCPets/Pet/PetView.h +7 -0
  61. package/Sources/CCPets/Pet/PetView.m +12 -1
  62. package/Sources/CCPets/Support/CCPetsDoctor.m +126 -37
  63. package/Sources/CCPets/Support/CCPetsPaths.h +5 -0
  64. package/Sources/CCPets/Support/CCPetsPaths.m +15 -0
  65. package/Sources/CCPets/Support/CCPetsPreferences.h +14 -1
  66. package/Sources/CCPets/Support/CCPetsPreferences.m +36 -0
  67. package/Sources/CCPets/UI/CCPetsMenuBarIcon.h +16 -0
  68. package/Sources/CCPets/UI/CCPetsMenuBarIcon.m +70 -0
  69. package/Sources/CCPets/UI/CCPetsMenuBarPanel.h +18 -0
  70. package/Sources/CCPets/UI/CCPetsMenuBarPanel.m +533 -0
  71. package/Sources/CCPets/UI/CCPetsMenuBarSummary.h +51 -0
  72. package/Sources/CCPets/UI/CCPetsMenuBarSummary.m +98 -0
  73. package/Sources/CCPets/UI/CCPetsSettingsPage.h +7 -1
  74. package/Sources/CCPets/UI/CCPetsSettingsPage.m +205 -8
  75. package/Sources/CCPets/UI/CCPetsStatusItem.h +28 -0
  76. package/Sources/CCPets/UI/CCPetsStatusItem.m +147 -0
  77. package/Sources/CCPets/UI/CCPetsUIStyle.m +3 -1
  78. package/Sources/CCPets/UI/CCPetsUsagePage.h +4 -3
  79. package/Sources/CCPets/UI/CCPetsUsagePage.m +69 -43
  80. package/Sources/CCPets/UI/CCPetsUsageStore.m +11 -1
  81. package/Sources/CCPets/UI/CCPetsWorkbenchPages.m +6 -4
  82. package/Sources/CCPets/Usage/CCPetsAntigravityQuota.m +115 -0
  83. package/Sources/CCPets/Usage/CCPetsNormalizedUsage.h +5 -0
  84. package/Sources/CCPets/Usage/CCPetsNormalizedUsage.m +43 -0
  85. package/Sources/CCPets/Usage/CCPetsProviderRegistry+Testing.h +13 -0
  86. package/Sources/CCPets/Usage/CCPetsProviderRegistry.h +25 -0
  87. package/Sources/CCPets/Usage/CCPetsProviderRegistry.m +94 -0
  88. package/Sources/CCPets/Usage/CCPetsQuotaHistory.h +1 -1
  89. package/Sources/CCPets/Usage/CCPetsQuotaHistory.m +11 -8
  90. package/Sources/CCPets/Usage/CCPetsUsage+Internal.h +2 -0
  91. package/Sources/CCPets/Usage/CCPetsUsage+Models.m +206 -14
  92. package/Sources/CCPets/Usage/CCPetsUsage+TokenTotals.m +4 -4
  93. package/Sources/CCPets/Usage/CCPetsUsage.h +7 -2
  94. package/Sources/CCPets/Usage/CCPetsUsageMode.h +2 -0
  95. package/Sources/CCPets/Usage/CCPetsUsageMode.m +29 -4
  96. package/Sources/CCPets/Usage/CCPetsUsageMonitor.h +4 -4
  97. package/Sources/CCPets/Usage/CCPetsUsageMonitor.m +90 -7
  98. package/Sources/CCPets/Usage/QuotaDashboardView+CompactRow.m +81 -0
  99. package/Sources/CCPets/Usage/QuotaDashboardView+Primitives.m +5 -8
  100. package/Sources/CCPets/Usage/QuotaDashboardView+Private.h +26 -4
  101. package/Sources/CCPets/Usage/QuotaDashboardView+Rendering.m +99 -99
  102. package/Sources/CCPets/Usage/QuotaDashboardView.h +9 -10
  103. package/Sources/CCPets/Usage/QuotaDashboardView.m +232 -79
  104. package/THIRD_PARTY_NOTICES.md +5 -4
  105. package/THIRD_PARTY_NOTICES.zh-CN.md +6 -5
  106. package/bin/agy-with-pet +82 -0
  107. package/bin/cc-pets +1 -1
  108. package/bin/claude-with-pet +15 -0
  109. package/bin/codex-with-pet +17 -2
  110. package/package.json +5 -3
  111. package/scripts/install-shell-integration.sh +5 -0
@@ -39,7 +39,7 @@
39
39
  "Disabled. The related hooks and MCP registrations were removed." = "已关闭,相关 hooks 与 MCP 注册已移除。";
40
40
  "Can't Enable Notifications" = "无法启用系统通知";
41
41
  "Allow notifications in System Settings → Notifications → CC Pets, then try again." = "请在“系统设置 → 通知 → CC Pets”中允许通知后重试。";
42
- "%1$@ → %2$@ and %3$lu more" = "%@ → %@ 等 %lu 条";
42
+ "%1$@ → %2$@ and %3$lu more" = "%@ → %@ 及另外 %lu 条";
43
43
  "New CC Bridge Message" = "CC Bridge 新消息";
44
44
  "CC Bridge Messages" = "CC Bridge 消息";
45
45
  "📬 %1$@ has %2$lu undelivered message (say anything in that terminal to deliver)" = "📬 %@ 有 %lu 条消息待投递(去那个终端说句话即可送达)";
@@ -195,15 +195,18 @@
195
195
  "Delete %@" = "删除素材 %@";
196
196
  "%@ usage display" = "%@ 用量展示模式";
197
197
  "Enable" = "启用";
198
- "Let local Claude Code / Codex sessions message and wake each other and reserve files" = "让本机 Claude Code / Codex 会话互相发消息、唤醒对方、预留文件";
198
+ "Let local Agent sessions exchange messages, wake supported sessions, and reserve files" = "让本机 Agent 会话互相发消息、唤醒可唤醒的会话并预留文件";
199
199
  "\nBelow: online sessions · active file reservations" = "\n下方为在线会话数 · 有效的文件预留数";
200
200
  "%lu sessions · %lu reserved" = "%lu 会话 · %lu 预留";
201
201
  "Auto-wake" = "自动唤醒";
202
+ "Tab nicknames" = "标签昵称";
203
+ "Append CC Bridge nicknames to terminal tab titles. Restart CLI sessions after turning this on." = "在终端标签标题末尾追加 CC Bridge 昵称。开启后,请重启 CLI 会话。";
204
+ "Bridge nicknames in tab titles: {tabTitle}" = "终端标签昵称:{tabTitle}";
202
205
  "Wake idle sessions automatically. When off, messages wait in the inbox until that session's next input, which saves tokens. Codex needs a session restart" = "自动唤醒空闲会话。关闭后消息只进信箱,等对方下次收到你的输入时带入,可省 token;Codex 需重启会话生效";
203
206
  "Edit guard" = "编辑拦截";
204
207
  "Pause once with an explanation when editing a file another session reserved; retrying goes through. Codex needs a session restart" = "编辑他人预留的文件时先暂停一次并说明原因,重试即放行;Codex 需重启会话生效";
205
208
  "Auto-approve" = "免审批";
206
- "Each group applies to both Codex approvals and Claude permissions. Codex needs a session restart" = "每组同时作用于 Codex 免审批与 Claude 免确认;Codex 需重启会话生效";
209
+ "Each group applies to the integrated Agents. Restart sessions to reload tool permissions" = "每组对已集成的 Agent 生效。请重启会话以加载工具权限";
207
210
  "Read" = "查看类";
208
211
  "Listing sessions, viewing reservations and reading the inbox. Read-only and safe" = "列出会话、查看预留、读取信箱免审批;只读,放开没有风险";
209
212
  "Send" = "发消息";
@@ -365,9 +368,9 @@
365
368
  "Removed the CC Pets hooks in %@." = "已移除 %@ 中的 CC Pets Hooks。";
366
369
  "Removed the CC Pets hooks in %@ and restored the original status line." = "已移除 %@ 中的 CC Pets Hooks,并恢复原 status line。";
367
370
  "%1$@ the CC Pets shell integration in %2$@." = "%1$@ %2$@ 中的 CC Pets shell 集成。";
368
- "%1$@ the codex / claude shims in %2$@." = "%1$@ %2$@ 中的 codex / claude shim。";
371
+ "%1$@ the codex / claude / agy shims in %2$@." = "%1$@ %2$@ 中的 codex / claude / agy shim。";
369
372
  "No CC Pets integrations to remove." = "未发现需要移除的 CC Pets 集成。";
370
- "Usage: cc-pets bridge <command>\n\n enable [options] Turn on CC Bridge: write Claude Code / Codex hooks and register MCP\n configure [options] Change options while enabled (doesn't re-register MCP)\n disable Turn off and remove all CC Bridge integrations\n status Show whether it's on and which sessions are online\n list List online sessions\n send <to> <message…> Send as the current session (run inside an Agent session, or use --from)\n name <new-name> Rename the current session (run inside an Agent session, or use --from)\n inbox Read the current session's inbox (for debugging)\n\nOptions (anything omitted keeps its current value):\n --approve=<list> Auto-approve in both Codex and Claude\n --codex-approve=<list> Auto-approve in Codex only\n --claude-allow=<list> Allow without asking in Claude only\n Use groups view, send, reserve, name, or tool names; pass an empty value to clear\n --wake=on|off Wake idle sessions automatically (off saves tokens; messages arrive with the next user input)\n --edit-guard=on|off Pause once when editing a file another session reserved\n\nName a session at launch: CC_BRIDGE_NAME=frontend claude (or codex)\n\nCC Bridge lets local Claude Code and Codex terminal sessions find, message and wake each other.\nMessage bodies are stored in a local temp directory readable only by you. Off by default." = "用法: cc-pets bridge <命令>\n\n enable [选项] 开启 CC Bridge:写入 Claude Code / Codex hooks 并注册 MCP\n configure [选项] 已开启时只修改选项(不重新注册 MCP)\n disable 关闭并移除所有 CC Bridge 集成\n status 查看开关状态与在线会话\n list 列出在线会话\n send <to> <消息…> 以当前会话身份发送(需在 Agent 会话内执行,或用 --from 指定)\n name <新名字> 修改当前会话的名字(需在 Agent 会话内执行,或用 --from 指定)\n inbox 读取当前会话信箱(调试用)\n\n选项(没给的保持原值):\n --approve=<列表> Codex 与 Claude 同时免审批\n --codex-approve=<列表> 只设 Codex 免审批\n --claude-allow=<列表> 只设 Claude 免确认\n 列表可写分组 view, send, reserve, name,或具体工具名;传空值表示清空\n --wake=on|off 自动唤醒空闲会话(关闭可省 token,消息等对方下次收到用户输入时带入)\n --edit-guard=on|off 编辑他人预留的文件时暂停一次\n\n启动时指定会话名:CC_BRIDGE_NAME=frontend claude(或 codex)\n\nCC Bridge 让本机的 Claude Code 与 Codex 终端会话互相发现、发消息、唤醒对方。\n消息正文会保存在本机临时目录(仅当前用户可读),默认关闭。";
373
+ "Usage: cc-pets bridge <command>\n\n enable [options] Turn on CC Bridge: install Agent hooks and register MCP\n configure [options] Change options while enabled (doesn't re-register MCP)\n disable Turn off and remove all CC Bridge integrations\n status Show whether it's on and which sessions are online\n list List online sessions\n send <to> <message…> Send as the current session (run inside an Agent session, or use --from)\n name <new-name> Rename the current session (run inside an Agent session, or use --from)\n inbox Read the current session's inbox (for debugging)\n\nOptions (anything omitted keeps its current value):\n --approve=<list> Auto-approve in both Codex and Claude\n --codex-approve=<list> Auto-approve in Codex only\n --claude-allow=<list> Allow without asking in Claude only\n --agy-allow=<list> Allow without asking in Antigravity only\n Use groups view, send, reserve, name, or tool names; pass an empty value to clear\n --agy-app=on|off Enable or disable the Antigravity App Sidecar (off by default)\n --tab-title=on|off Append Bridge nicknames to CLI terminal titles (off by default)\n --wake=on|off Wake supported idle sessions automatically (off saves tokens; messages arrive with the next user input)\n --edit-guard=on|off Pause once when editing a file another session reserved\n\nName a session at launch: CC_BRIDGE_NAME=frontend claude (or codex, or agy)\n\nCC Bridge connects local Claude Code, Codex and Antigravity sessions.\nMessage bodies are stored in a local temp directory readable only by you. Off by default." = "用法: cc-pets bridge <命令>\n\n enable [选项] 开启 CC Bridge:安装 Agent Hooks 并注册 MCP\n configure [选项] 已开启时只修改选项(不重新注册 MCP)\n disable 关闭并移除所有 CC Bridge 集成\n status 查看开关状态与在线会话\n list 列出在线会话\n send <to> <消息…> 以当前会话身份发送(需在 Agent 会话内执行,或用 --from 指定)\n name <新名字> 修改当前会话的名字(需在 Agent 会话内执行,或用 --from 指定)\n inbox 读取当前会话信箱(调试用)\n\n选项(没给的保持原值):\n --approve=<列表> Codex 与 Claude 同时免审批\n --codex-approve=<列表> 只设 Codex 免审批\n --claude-allow=<列表> 只设 Claude 免确认\n --agy-allow=<列表> 只设 Antigravity 免确认\n 列表可写分组 view, send, reserve, name,或具体工具名;传空值表示清空\n --agy-app=on|off 启用或关闭 Antigravity App Sidecar(默认关闭)\n --tab-title=on|off 在 CLI 终端标签标题末尾追加 Bridge 昵称(默认关闭)\n --wake=on|off 自动唤醒支持此功能的空闲会话(关闭可省 token,消息等对方下次收到用户输入时带入)\n --edit-guard=on|off 编辑他人预留的文件时暂停一次\n\n启动时指定会话名:CC_BRIDGE_NAME=frontend claude(也可用 codex 或 agy)\n\nCC Bridge 连接本机的 Claude Code、Codex 和 Antigravity 会话。\n消息正文会保存在本机临时目录(仅当前用户可读),默认关闭。";
371
374
  "No sessions online." = "没有在线会话。";
372
375
  "pending" = "待投递";
373
376
  "[cc-bridge file reservation] This edit is paused once: the files below are reserved by another Agent session on this machine." = "[cc-bridge 文件预留] 这次编辑先暂停一次:以下文件已被本机另一个 Agent 会话预留。";
@@ -381,19 +384,19 @@
381
384
  "Users may also call it “pet”, “desktop pet”, “桌宠” or “cc-pets”: “send this to web with pet”, “have the pet tell api”, “pet, who's online?” " = "用户也会把它叫作“pet”“桌宠”“cc-pets”:“用 pet 发给 web”“让桌宠转告 api”“pet 看看谁在线”";
382
385
  "and “reserve src/api with pet” all mean this tool. It only counts when it's about messaging other sessions, listing sessions or reserving files; " = "“用 pet 预留 src/api”都指本工具。只有涉及给其他会话发消息、查看会话、预留文件时才算;";
383
386
  "“add a field to pet” or “the pet API” refer to a pet in the code, so don't call this tool for those." = "“给 pet 加个字段”“pet 接口”这类说的是业务代码里的 pet,不要调用本工具。";
384
- "List the other Claude Code / Codex terminal sessions running on this machine that can exchange messages (cc-pets CC Bridge; " = "列出本机正在运行、可以互发消息的其他 Claude Code / Codex 终端会话(cc-pets CC Bridge,";
387
+ "List other local sessions that can receive CC Bridge messages, including Claude Code, Codex, and Antigravity CLI sessions (" = "列出本机其他可接收 CC Bridge 消息的会话,包括 Claude Code、Codex 和Antigravity CLI(";
385
388
  "this is what the user means by “bridge”, “cc-bridge”, “other sessions” or “another terminal”). " = "用户说“bridge”“cc-bridge”“其他会话”“另一个终端”时指的就是它)。";
386
389
  "Each line shows: name [ref], CLI, busy/idle, terminal (tty), start time, working directory. " = "每行依次是:名字 [ref]、CLI、忙闲状态、所在终端(tty)、启动时间、工作目录。";
387
390
  "The name is the send_message address; append ` [ref]` only when names collide. " = "名字就是 send_message 的地址;只有重名时才需要在名字后加上 ` [ref]`。";
388
391
  "When the user describes a target by terminal (e.g. ttys003) or directory, use this to find its name." = "用户用终端(如 ttys003)或目录描述目标时,据此找到对应的名字。";
389
392
  "List Agent sessions" = "列出 Agent 会话";
390
- "Send a message to another Claude Code / Codex session on this machine (what the user means by “message it via bridge” or “send to another session / terminal”). " = "给本机另一个 Claude Code / Codex 会话发消息(用户说“用 bridge 发消息”“发给另一个会话 / 终端”即指此工具)。";
393
+ "Send a message to another CC Bridge session on this machine (what the user means by “message it via bridge” or “send to another session / terminal”). " = "给本机另一个 CC Bridge 会话发消息(用户说“用 bridge 发消息”“发给另一个会话 / 终端”即指此工具)。";
391
394
  "An idle recipient is woken; a busy one gets it after its current turn. " = "对方空闲时会被唤醒,忙碌时排在当前回合之后。";
392
395
  "Delivery doesn't mean it was read or agreed to; replies arrive as new messages in this session. " = "送达不代表对方已读或同意;对方回复会作为新消息出现在本会话里。";
393
396
  "When replying, put the from name from the message header into to." = "回复收到的消息时,把消息头里的 from 名字填到 to。";
394
397
  "Recipient session name (from list_agents); write \"name [ref]\" when names collide" = "收件会话名(来自 list_agents),重名时写成 \"名字 [ref]\"";
395
398
  "Message body. Say what it's about in the first sentence; don't rely on @file references, since attachments aren't delivered." = "消息正文。第一句写清楚这条消息是关于什么的;不要依赖 @文件 引用,对方收不到附件。";
396
- "When true, this session gets a one-time notice when the recipient next finishes a turn and goes idle." = "为 true 时,对方下一次完成回合进入空闲后,本会话会收到一条一次性空闲通知。";
399
+ "When true, this session gets a one-time notice when the recipient next finishes a turn and goes idle. That turn may be one already in progress, so the notice doesn't mean this message was handled." = "为 true 时,对方下一次完成回合进入空闲后,本会话会收到一条一次性空闲通知。这一回合可能是正在进行的回合,所以收到通知不代表这条消息已处理。";
397
400
  "Send cross-session message" = "发送跨会话消息";
398
401
  "Rename the current session in CC Bridge (the address other sessions use to message you), e.g. frontend or api-server. " = "修改当前会话在 CC Bridge 中的名字(即其他会话给你发消息时用的地址),例如 frontend、api-server。";
399
402
  "Only lowercase letters, digits and . _ - are allowed, up to 40 characters; fails if another online session uses the name. " = "只允许小写字母、数字和 . _ -,最长 40 个字符;名字已被其他在线会话占用时会失败。";
@@ -441,7 +444,7 @@
441
444
  "File reservations in {root} ({length}):\n" = "{root} 的文件预留({length}):\n";
442
445
  "No new messages in the inbox." = "信箱里没有新消息。";
443
446
  "Unknown tool: {name}" = "未知工具:{name}";
444
- "cc-pets CC Bridge: exchange messages with other Claude Code / Codex terminal sessions on this machine. " = "cc-pets CC Bridge:与本机其他 Claude Code / Codex 终端会话互发消息。";
447
+ "cc-pets CC Bridge: exchange messages with local Claude Code, Codex, and Antigravity CLI sessions. " = "cc-pets CC Bridge:与本机的 Claude Code、Codex 和 Antigravity CLI 会话互发消息。";
445
448
  "When the user mentions cc-bridge, bridge, pet, desktop pet, 桌宠, cc-pets, cross-session / cross-terminal messages, " = "当用户提到 cc-bridge、bridge、pet、桌宠、cc-pets、跨会话 / 跨终端消息、";
446
449
  "“message another session / terminal / Claude / Codex”, or names a session or tty (e.g. ttys003), " = "“给另一个会话 / 终端 / Claude / Codex 发消息”,或提到某个会话名、tty(如 ttys003)时,";
447
450
  "use this server's tools directly; there's no need to look up bridge usage in project files. " = "直接使用本服务器的工具,不需要在项目文件里查找 bridge 的用法。";
@@ -482,6 +485,8 @@
482
485
  "[cc-pets idle notice] {target} finished its current turn and is now idle. " = "[cc-pets 空闲通知] {target} 已完成当前回合,现在处于空闲状态。";
483
486
  "This is an automatic notice, not an instruction from anyone." = "这是自动通知,不是来自某个人的指令。";
484
487
  "Delivered to {name}'s input queue ({status}). Delivery doesn't mean it was read or agreed to." = "已送达 {name} 的输入队列({status})。送达不代表对方已读或同意。";
488
+ "Submitted the message as a prompt to {name}." = "已将消息作为提示词提交给 {name}。";
489
+ "If the cc-bridge MCP server is configured, reply to {name} using that server's send_message tool." = "如果已配置 cc-bridge MCP server,请用该服务的 send_message 工具回复 {name}。";
485
490
  "busy; it will be handled after the current turn" = "对方忙碌,将在当前回合结束后处理";
486
491
  "idle; it was woken up" = "对方空闲,已被唤醒";
487
492
  "Put in {name}'s inbox (auto-wake is off): it will be read with the next user input, or via check_inbox." = "已放入 {name} 的信箱(未开启自动唤醒):对方下次收到用户输入时读到,也可以让对方用 check_inbox 读取。";
@@ -505,17 +510,11 @@
505
510
  "codex executable not found, so messages to Codex can only go to its inbox; set CODEX_REAL_BIN and run cc-pets bridge enable." = "未找到 codex 可执行文件,发给 Codex 的消息只能进信箱;可设置 CODEX_REAL_BIN 后执行 cc-pets bridge enable。";
506
511
  "Couldn't tell whether Codex supports codex queue; failed deliveries fall back to the inbox." = "无法确认 Codex 是否支持 codex queue;投递失败时会自动退回信箱。";
507
512
  "Claude Code hooks written to {path}" = "Claude Code hooks 已写入 {path}";
508
- "Claude Code allows these tools without asking: {claudeAllow}" = "Claude Code 中以下工具免确认:{claudeAllow}";
509
- "In Claude Code, cc-bridge tools follow your permission settings." = "Claude Code 中 cc-bridge 的工具按你的权限设置询问。";
510
513
  "Claude Code MCP registered: {MCP_NAME} (on first use, Claude asks according to your permission settings)" = "Claude Code MCP 已注册:{MCP_NAME}(首次调用时 Claude 会按你的权限设置询问是否允许)";
511
514
  "Claude Code MCP registration failed. Run manually: claude {shellQuote}" = "Claude Code MCP 注册失败,请手动执行:claude {shellQuote}";
512
- "Claude Code CLI not detected, skipped." = "未检测到 Claude Code CLI,跳过。";
513
515
  "Codex hooks written to {path}. Next time you start Codex, run /hooks and trust the cc-pets bridge hooks." = "Codex hooks 已写入 {path}——下次启动 Codex 后请执行 /hooks 并信任 cc-pets bridge 的 hooks。";
514
516
  "Codex MCP registered: {MCP_NAME}" = "Codex MCP 已注册:{MCP_NAME}";
515
517
  "Codex MCP registration failed. Run manually: codex {shellQuote}" = "Codex MCP 注册失败,请手动执行:codex {shellQuote}";
516
- "Codex auto-approves these tools: {codexApprove} (restart Codex sessions to apply)" = "Codex 中以下工具免审批:{codexApprove}(需重启 Codex 会话生效)";
517
- "cc-bridge tools keep Codex's default approvals (calls fail under approval_policy=never; allow them with --codex-approve)." = "Codex 中 cc-bridge 的工具保持默认审批(approval_policy=never 时调用会失败,可用 --codex-approve 放开)。";
518
- "Codex CLI not detected, skipped." = "未检测到 Codex CLI,跳过。";
519
518
  "Removed the cc-bridge hooks and tool permissions from Claude Code." = "已移除 Claude Code 中的 cc-bridge hooks 与工具放行规则。";
520
519
  "Removed the cc-bridge hooks from Codex." = "已移除 Codex 中的 cc-bridge hooks。";
521
520
  "{flag} only accepts groups {TOOL_GROUPS} or tools {ALL_TOOLS}, got: {unknown}" = "{flag} 只接受分组 {TOOL_GROUPS} 或工具 {ALL_TOOLS},收到:{unknown}";
@@ -570,6 +569,7 @@
570
569
  "{stale} {name} hooks point to cc-pets elsewhere (the package was moved or reinstalled)" = "{name} Hooks 中有 {stale} 条指向其他位置的 cc-pets(包被移动或重装过)";
571
570
  "{stale} {name} hook points to cc-pets elsewhere (the package was moved or reinstalled)" = "{name} Hooks 中有 {stale} 条指向其他位置的 cc-pets(包被移动或重装过)";
572
571
  "{name} hooks installed ({total} events)" = "{name} Hooks 已安装({total} 个事件)";
572
+ "{name} hooks installed" = "{name} Hooks 已安装";
573
573
  "{name} config still has {legacy} old codex-pet hooks" = "{name} 配置里残留 {legacy} 条旧版 codex-pet Hooks";
574
574
  "{name} config still has {legacy} old codex-pet hook" = "{name} 配置里残留 {legacy} 条旧版 codex-pet Hooks";
575
575
  "Claude status line feeds quota data through the wrapper" = "Claude status line 已通过包装器接入额度采集";
@@ -584,9 +584,9 @@
584
584
  "Shims complete: {shimDirectory}" = "shim 完整:{shimDirectory}";
585
585
  "Shim problems: {broken}" = "shim 异常:{broken}";
586
586
  "source {shellRC}, or open a new terminal" = "source {shellRC},或新开一个终端";
587
- "This terminal's PATH lacks the shim directory, so typing codex / claude won't start the pet" = "当前终端的 PATH 里没有 shim 目录,直接敲 codex / claude 不会拉起桌宠";
587
+ "This terminal's PATH lacks the shim directory, so the Agent launchers won't start the pet" = "当前终端的 PATH 里没有 shim 目录,直接运行 Agent CLI 时无法拉起桌宠";
588
588
  "{shadowing} comes before the shim directory in PATH and bypasses the pet" = "PATH 中 {shadowing} 排在 shim 目录之前,会绕过桌宠";
589
- "The shim directory comes before the real codex / claude in PATH" = "PATH 中 shim 目录优先于真实的 codex / claude";
589
+ "The shim directory comes before the real Agent binaries in PATH" = "PATH 中 shim 目录优先于真实的 Agent CLI 程序";
590
590
  "The shim directory is first in PATH" = "PATH 中 shim 目录排在最前";
591
591
  "Found the real {name}: {real}" = "找到真实的 {name}:{real}";
592
592
  "The real {name} isn't in PATH, so the shim can't forward to it" = "PATH 中找不到真实的 {name},shim 无法转发";
@@ -667,6 +667,7 @@
667
667
  "CC_PETS_SOURCE points to an unknown source \"{DEFAULT_SOURCE}\". Available sources: {SOURCES}" = "CC_PETS_SOURCE 指向未知的源 \"{DEFAULT_SOURCE}\"。可用的源: {SOURCES}";
668
668
  "Unknown subcommand: {command}" = "未知子命令: {command}";
669
669
  "No executable Codex CLI found. Install codex, or set CODEX_REAL_BIN to its real path." = "未找到可执行的 Codex CLI。请先安装 codex,或通过 CODEX_REAL_BIN 指定真实路径。";
670
+ "No executable Antigravity CLI found. Install agy, or set AGY_REAL_BIN to its real path." = "未找到可执行的 Antigravity CLI。请先安装 agy,或通过 AGY_REAL_BIN 指定真实路径。";
670
671
  "No executable Claude Code CLI found. Install claude, or set CLAUDE_REAL_BIN to its real path." = "未找到可执行的 Claude Code CLI。请先安装 claude,或通过 CLAUDE_REAL_BIN 指定真实路径。";
671
672
  "Failed to install CC Pets.app; the existing app was kept." = "安装 CC Pets.app 失败,已保留原应用。";
672
673
  "App installed: {targetApp}" = "应用已安装: {targetApp}";
@@ -687,7 +688,7 @@
687
688
  "Refusing to delete: {targetApp} isn't the CC Pets app (bundle ID mismatch)." = "拒绝删除:{targetApp} 不是 CC Pets 应用(Bundle ID 不匹配)。";
688
689
  "App removed: {targetApp}" = "已删除应用: {targetApp}";
689
690
  "App not installed: {targetApp}" = "未安装应用: {targetApp}";
690
- "Usage: cc-pets [command]\n\n cc-pets Start the pet (prefers the copy installed in ~/Applications)\n cc-pets install Install or repair the shell / Claude Code / Codex integrations\n cc-pets uninstall Remove the integrations and restore the status line\n cc-pets uninstall --purge Also delete the app, app data and preferences (asks first; keeps pets and lines in ~/.cc-pets)\n cc-pets uninstall-app Only delete ~/Applications/CC Pets.app\n cc-pets build Rebuild\n cc-pets clean Clear caches (quit the pet first)\n cc-pets doctor Check the installation and integrations, with suggested fixes\n cc-pets open [page] Open the Main menu (pages: overview, sessions, usage, pet, accounts, alerts, general, diagnostics)\n cc-pets paths [--json] List where settings, caches and data live, and their sizes\n cc-pets pet <command> Manage pet sprites; see cc-pets pet help\n cc-pets bridge <command> CC Bridge cross-session messaging; see cc-pets bridge --help\n cc-pets --status Print the current Codex quota\n cc-pets --history Print quota history (JSON)\n cc-pets --foreground Run the pet in the foreground (for debugging)\n cc-pets -v, --version Show the version\n cc-pets -h, --help Show this help\n\ncodex-with-pet / claude-with-pet start the pet along with the CLI." = "用法:cc-pets [命令]\n\n cc-pets 启动桌宠(优先使用 ~/Applications 里安装的版本)\n cc-pets install 安装或修复 shell / Claude Code / Codex 集成\n cc-pets uninstall 移除集成并恢复 status line\n cc-pets uninstall --purge 同时删除 App、应用数据和偏好(会先确认;保留 ~/.cc-pets 的素材与台词)\n cc-pets uninstall-app 只删除 ~/Applications/CC Pets.app\n cc-pets build 重新构建\n cc-pets clean 清理缓存(需先退出桌宠)\n cc-pets doctor 检查安装与各项集成是否正常,并给出修复建议\n cc-pets open [页面] 打开主菜单(页面:overview、sessions、usage、pet、accounts、alerts、general、diagnostics)\n cc-pets paths [--json] 列出配置、缓存与数据的存放位置和大小\n cc-pets pet <命令> 管理桌宠素材,详见 cc-pets pet help\n cc-pets bridge <命令> CC Bridge 跨会话消息,详见 cc-pets bridge --help\n cc-pets --status 输出 Codex 当前额度\n cc-pets --history 输出额度历史(JSON)\n cc-pets --foreground 在前台运行桌宠(调试用)\n cc-pets -v, --version 显示版本\n cc-pets -h, --help 显示本帮助\n\ncodex-with-pet / claude-with-pet 会在启动 CLI 的同时拉起桌宠。";
691
+ "Usage: cc-pets [command]\n\n cc-pets Start the pet (prefers the copy installed in ~/Applications)\n cc-pets install Install or repair the shell / Claude Code / Codex integrations\n cc-pets uninstall Remove the integrations and restore the status line\n cc-pets uninstall --purge Also delete the app, app data and preferences (asks first; keeps pets and lines in ~/.cc-pets)\n cc-pets uninstall-app Only delete ~/Applications/CC Pets.app\n cc-pets build Rebuild\n cc-pets clean Clear caches (quit the pet first)\n cc-pets doctor Check the installation and integrations, with suggested fixes\n cc-pets open [page] Open the Main menu (pages: overview, sessions, usage, pet, accounts, alerts, general, diagnostics)\n cc-pets paths [--json] List where settings, caches and data live, and their sizes\n cc-pets pet <command> Manage pet sprites; see cc-pets pet help\n cc-pets bridge <command> CC Bridge cross-session messaging; see cc-pets bridge --help\n cc-pets --status Print the current Codex quota\n cc-pets --history Print quota history (JSON)\n cc-pets --foreground Run the pet in the foreground (for debugging)\n cc-pets -v, --version Show the version\n cc-pets -h, --help Show this help\n\ncodex-with-pet / claude-with-pet / agy-with-pet start the pet along with the CLI." = "用法:cc-pets [命令]\n\n cc-pets 启动桌宠(优先使用 ~/Applications 里安装的版本)\n cc-pets install 安装或修复 shell / Claude Code / Codex 集成\n cc-pets uninstall 移除集成并恢复 status line\n cc-pets uninstall --purge 同时删除 App、应用数据和偏好(会先确认;保留 ~/.cc-pets 的素材与台词)\n cc-pets uninstall-app 只删除 ~/Applications/CC Pets.app\n cc-pets build 重新构建\n cc-pets clean 清理缓存(需先退出桌宠)\n cc-pets doctor 检查安装与各项集成是否正常,并给出修复建议\n cc-pets open [页面] 打开主菜单(页面:overview、sessions、usage、pet、accounts、alerts、general、diagnostics)\n cc-pets paths [--json] 列出配置、缓存与数据的存放位置和大小\n cc-pets pet <命令> 管理桌宠素材,详见 cc-pets pet help\n cc-pets bridge <命令> CC Bridge 跨会话消息,详见 cc-pets bridge --help\n cc-pets --status 输出 Codex 当前额度\n cc-pets --history 输出额度历史(JSON)\n cc-pets --foreground 在前台运行桌宠(调试用)\n cc-pets -v, --version 显示版本\n cc-pets -h, --help 显示本帮助\n\ncodex-with-pet / claude-with-pet / agy-with-pet 会在启动 CLI 的同时拉起桌宠。";
691
692
  "Main menu" = "主菜单";
692
693
  "Settings…" = "设置…";
693
694
  "Window" = "窗口";
@@ -818,6 +819,8 @@
818
819
  "Agent profiles" = "Agent 配置";
819
820
  "Add Claude Home…" = "添加 Claude Home…";
820
821
  "Add Codex Home…" = "添加 Codex Home…";
822
+ "Add Antigravity Home…" = "添加 Antigravity Home…";
823
+ "Provider must be claude, codex, or antigravity." = "Provider 必须是 claude、codex 或 antigravity。";
821
824
  "Repair Integration" = "修复集成";
822
825
  "Remove Integration…" = "移除集成…";
823
826
  "Agent Profile Setup" = "Agent 配置适配";
@@ -825,6 +828,7 @@
825
828
  "Choose Home" = "选择 Home";
826
829
  "Choose an existing Claude Home folder, such as ~/.claude-work." = "选择已有的 Claude Home 文件夹,例如 ~/.claude-work。";
827
830
  "Choose an existing Codex Home folder, such as ~/.codex-work." = "选择已有的 Codex Home 文件夹,例如 ~/.codex-work。";
831
+ "Choose a Gemini root folder containing the antigravity-cli directory." = "选择包含 antigravity-cli 子目录的 Gemini 根目录。";
828
832
  "This folder doesn't look like an Agent Home" = "这个文件夹不像 Agent Home";
829
833
  "Choose a folder containing Claude settings, state, or projects." = "请选择包含 Claude 设置、状态或项目数据的文件夹。";
830
834
  "Choose a folder containing Codex config, hooks, or sign-in state." = "请选择包含 Codex 配置、Hooks 或登录状态的文件夹。";
@@ -842,6 +846,7 @@
842
846
  "Agent Profile Setup Failed" = "Agent 配置适配失败";
843
847
  "The Claude Home is integrated. Restart Claude to load newly registered MCP tools." = "Claude Home 已集成。请重启 Claude 以加载新注册的 MCP 工具。";
844
848
  "The Codex Home is integrated. Restart Codex, then trust the CC Pets hooks in /hooks." = "Codex Home 已集成。请重启 Codex,然后在 /hooks 中信任 CC Pets Hooks。";
849
+ "The Antigravity CLI Home is integrated. Restart agy to load the updated hooks and tools." = "Antigravity CLI Home 已集成。请重启 agy 以加载更新后的 Hooks 和工具。";
845
850
  "Repairing %@" = "正在修复 %@";
846
851
  "The Agent profile integration was repaired." = "Agent 配置集成已修复。";
847
852
  "Remove integration for %@?" = "移除 %@ 的集成?";
@@ -849,7 +854,6 @@
849
854
  "Remove Integration" = "移除集成";
850
855
  "Removing %@" = "正在移除 %@";
851
856
  "The CC Pets integration was removed. The Agent Home and its data were kept." = "CC Pets 集成已移除,Agent Home 及其数据已保留。";
852
- "All accounts" = "全部账号";
853
857
  "No Agent accounts detected" = "尚未检测到账号";
854
858
  "Official Homes appear automatically" = "官方 Home 会自动显示";
855
859
  "Add custom Homes from Multi-Account in the Main menu" = "自定义 Home 请从主菜单的“多账号”中添加";
@@ -867,6 +871,10 @@
867
871
  "Relocating %@" = "正在重新定位 %@";
868
872
  "The Agent Home was relocated and its integration was updated." = "Agent Home 已重新定位,集成也已更新。";
869
873
  "Agent profile registry" = "Agent 配置注册表";
874
+ "Agent shims" = "Agent shim 目录";
875
+ "Antigravity CLI hooks" = "Antigravity CLI Hooks";
876
+ "Antigravity CLI MCP config" = "Antigravity CLI MCP 配置";
877
+ "Antigravity CLI settings" = "Antigravity CLI 设置";
870
878
  "Agent profile: %@" = "Agent 配置:%@";
871
879
  "No registered Agent profiles" = "没有已登记的 Agent 配置";
872
880
  "Some registered Agent profiles need repair; open Multi-Account in the Main menu and retry." = "部分已登记的账号需要修复;请打开主菜单的“多账号”后重试。";
@@ -874,8 +882,11 @@
874
882
  "No Agent Homes are registered; CC Bridge will be applied when you add one from Multi-Account in the Main menu." = "尚未登记 Agent Home;以后从主菜单的“多账号”添加时会自动接入 CC Bridge。";
875
883
  "CC Bridge hooks installed in %@" = "%@ 已安装 CC Bridge Hooks";
876
884
  "CC Bridge hooks missing in %@" = "%@ 缺少 CC Bridge Hooks";
885
+ "CC Bridge hooks and MCP installed in %@" = "%@ 已安装 CC Bridge Hooks 和 MCP";
886
+ "CC Bridge hooks or MCP missing in %@" = "%@ 缺少 CC Bridge Hooks 或 MCP";
887
+ "Antigravity CLI reads Bridge messages on its next model invocation." = "Antigravity CLI 会在下次模型调用时读取 Bridge 消息。";
877
888
  "Agent usage account cards" = "Agent 用量账号卡片";
878
- "Click the arrows or page dots, swipe horizontally, or use the left and right arrow keys to switch accounts." = "点击箭头或页码圆点、横向滑动,或使用左右方向键切换账号。";
889
+ "Use the arrows, page dots, or horizontal swipes to switch usage pages or accounts. Use the button below the cards to show more or fewer." = "点击箭头或页码圆点,或横向滑动,可切换用量页面或账号。点击卡片下方的按钮可展开或收起。";
879
890
 
880
891
  /* 多账号页面。 */
881
892
  "Add and manage Claude and Codex Homes." = "添加和管理 Claude、Codex 的 Home。";
@@ -883,7 +894,7 @@
883
894
  "Integrated" = "已集成";
884
895
  "Home unavailable" = "Home 不可用";
885
896
  "Needs repair" = "需要修复";
886
- "Use the buttons above to add an existing Claude or Codex Home." = "使用上方按钮添加已有的 Claude 或 Codex Home。";
897
+ "Use the buttons above to add an existing Agent Home." = "使用上方按钮添加已有的 Agent Home。";
887
898
 
888
899
  "The target Codex Home is unknown; send input in that session to refresh its registration." = "无法确定接收方的 Codex Home;请在该会话发送输入以刷新注册信息。";
889
900
 
@@ -899,16 +910,31 @@
899
910
 
900
911
  "Current session identity is unavailable or ambiguous (you can view sessions, but cannot act as one)." = "当前会话身份缺失或不明确(可以查看会话列表,但不能以任何会话身份操作)。";
901
912
 
913
+ "[cc-bridge identity] Your current session_id is {session_id}. Pass this exact value as session_id on every CC Bridge tool call. Do not use a recipient's ID or an ID from a cross-session message." = "[cc-bridge 身份] 你当前的 session_id 是 {session_id}。每次调用 CC Bridge 工具都将此值原样作为 session_id 传入。不要使用收件人的 ID 或跨会话消息中的 ID。";
914
+ "Your current session ID from the cc-bridge hook context or your own shell's CODEX_THREAD_ID / CLAUDE_CODE_SESSION_ID. Pass it on every call when available; required to identify one of several sessions sharing a host. Never use the recipient's ID or guess from the session list." = "来自 cc-bridge hook 上下文或当前会话 shell 的 CODEX_THREAD_ID / CLAUDE_CODE_SESSION_ID 的会话 ID。有值时每次调用都传入;多个会话共享宿主时必须提供才能识别身份。不要使用收件人的 ID,也不要根据会话列表猜测。";
915
+ " Pass your current session_id on every CC Bridge tool call, using the ID from the cc-bridge hook context. If it is missing, read CODEX_THREAD_ID (Codex) or CLAUDE_CODE_SESSION_ID (Claude) in your own session's shell; if neither is available, refresh this session's bridge hooks. Never guess an ID from names, directories, activity or received messages, and never save one session's ID in shared MCP configuration." = " 每次调用 CC Bridge 工具都传入当前 session_id,取值来自 cc-bridge hook 上下文。缺失时,在当前会话的 shell 中读取 CODEX_THREAD_ID(Codex)或 CLAUDE_CODE_SESSION_ID(Claude);仍不可用时,刷新当前会话的 bridge hooks。不要根据名字、目录、忙闲或收到的消息猜测 ID,也不要把某个会话的 ID 写入共享 MCP 配置。";
916
+ "Invalid session_id: it must identify a live registered session belonging to this MCP host. No action was taken." = "无效的 session_id:必须对应属于当前 MCP 宿主的已注册在线会话。未执行操作。";
917
+ "It isn't a registered online session." = "该 ID 不是已注册的在线会话。";
918
+ "This MCP server's host process can't be identified, so the session can't be verified as belonging to it." = "无法识别此 MCP 服务的宿主进程,因此无法确认该会话属于它。";
919
+ "It belongs to a different host process." = "该会话属于其他宿主进程。";
920
+ "paths must be an array of strings." = "paths 必须是字符串数组。";
921
+ "codex queue timed out, so the message may already be queued for {name}. It was also put in its inbox, so it may arrive twice with the same message id." = "codex queue 超时,消息可能已进入 {name} 的队列。消息同时放进了它的信箱,所以可能以相同的消息 id 到达两次。";
922
+ "{flag} needs a value." = "{flag} 需要一个值。";
923
+ "Unknown option: {option}" = "未知选项:{option}";
924
+
902
925
  /* 启动前代理检查 */
903
926
  "Launch Protection" = "启动保护";
904
- "Block Claude / Codex when Shadowrocket is disconnected or the exit is in an unsupported region" = "Shadowrocket 未连接,或出口为不支持的地区时,阻止启动 Claude / Codex";
927
+ "Block Claude / Codex when Shadowrocket is disconnected or the exit is in an unsupported region. Antigravity only checks the connection." = "Shadowrocket 未连接,或出口为不支持的地区时,阻止启动 Claude / Codex。Antigravity 只检查连接状态。";
905
928
  "Off by default. Checks each service's exit IP and region through CC Pets wrappers; does not validate your account or API key." = "默认关闭。通过 CC Pets 包装器分别检查各服务的出口 IP 和地区,不验证账号或 API 密钥。";
906
929
  "CC Pets blocked {provider}: {reason}" = "CC Pets 已阻止启动 {provider}:{reason}";
907
- "Connect Shadowrocket and select an exit outside mainland China / Hong Kong, then check routing and DNS settings. You can turn off this check in Main menu → Settings → Launch Protection." = "请连接小火箭,选择中国大陆和香港以外的出口,并检查分流及 DNS 设置。可在「主菜单 → 设置 → 启动保护」关闭此检查。";
930
+ "Connect Shadowrocket and select an exit outside mainland China / Hong Kong, then check routing and DNS settings. You can turn off this check in Main menu → Settings → Launch Protection." = "请连接 Shadowrocket,选择中国大陆和香港以外的出口,并检查分流及 DNS 设置。可在「主菜单 → 设置 → 启动保护」关闭此检查。";
931
+ "Connect Shadowrocket to continue. You can turn off this check in Main menu → Settings → Launch Protection." = "请连接 Shadowrocket 后继续。可在「主菜单 → 设置 → 启动保护」关闭此检查。";
908
932
  "Unable to read the system VPN status." = "无法读取系统 VPN 状态。";
909
- "Shadowrocket is not connected. Opening the app alone is not enough." = "小火箭尚未连接,仅打开应用不代表代理已开启。";
910
- "No Shadowrocket VPN configuration was found." = "未找到小火箭的 VPN 配置。";
911
- "Launch check expects claude or codex." = "启动检查需要指定 claude 或 codex。";
933
+ "Shadowrocket is not connected. Opening the app alone is not enough." = "Shadowrocket 尚未连接,仅打开应用不代表代理已开启。";
934
+ "No Shadowrocket VPN configuration was found." = "未找到 Shadowrocket 的 VPN 配置。";
935
+ "Launch check expects claude, codex or agy." = "启动检查需要指定 claude、codex 或 agy。";
936
+ "CC Pets: checking Shadowrocket ..." = "CC Pets:正在检查 Shadowrocket 连接状态 ...";
937
+ "CC Pets: Shadowrocket is connected." = "CC Pets:Shadowrocket 已连接。";
912
938
  "CC Pets: checking Shadowrocket and service exit regions ..." = "CC Pets:正在检查 Shadowrocket 连接状态及服务出口地区 ...";
913
939
  "The proxy or service hostname could not be resolved." = "无法解析代理或服务域名。";
914
940
  "TLS negotiation or certificate verification failed." = "TLS 握手或证书校验失败。";
@@ -1014,3 +1040,50 @@
1014
1040
  "Install Extension…" = "安装扩展…";
1015
1041
  "Delete “%@”?" = "删除「%@」?";
1016
1042
  "This can't be undone. Continue?" = "删除后无法撤销,是否继续?";
1043
+
1044
+ /* 菜单栏图标 */
1045
+ "%@ awaiting approval" = "%@ 个等待审批";
1046
+ "Show Pet" = "显示桌宠";
1047
+ "This month · %@ calls" = "本月 · %@ 次调用";
1048
+ "Week %@" = "本周 %@";
1049
+ "Quota" = "额度";
1050
+ "%@ more sessions…" = "还有 %@ 个会话…";
1051
+ "Show In" = "显示位置";
1052
+ "Display" = "显示方式";
1053
+ "Desktop Pet" = "仅桌宠";
1054
+ "Pet + Menu Bar" = "桌宠 + 菜单栏";
1055
+ "Menu Bar Only" = "仅菜单栏";
1056
+ "Menu bar only hides the pet, its status card, speech and hover panel; notifications still work" = "仅菜单栏时隐藏桌宠、状态卡、气泡和悬停面板,系统通知照常";
1057
+ "Quota in Menu Bar" = "菜单栏显示额度";
1058
+ "Lowest 5-hour quota left; orange at 20% or below, red at 10%" = "显示最低的 5 小时剩余额度;20% 及以下为橙色,10% 及以下为红色";
1059
+ "The pet is hidden (menu bar only). Line: %@" = "桌宠已隐藏(仅菜单栏),这句是:%@";
1060
+ "Click to jump to the session awaiting approval (⌥-click for the panel)" = "点击跳到等待审批的会话(按住 ⌥ 点击打开面板)";
1061
+ "No quota data" = "暂无额度数据";
1062
+ "API · This month %@" = "API · 本月 %@";
1063
+ "Credits · This month %@" = "积分计费 · 本月 %@";
1064
+
1065
+ "Antigravity allow without asking: {agyAllow}" = "Antigravity 免确认:{agyAllow}";
1066
+ "Queued in {name}'s inbox. Antigravity CLI will read it on its next model invocation." = "已放入 {name} 的信箱,Antigravity CLI 会在下次调用模型时读取。";
1067
+ "The supplied session_id differs from the current Antigravity conversation." = "传入的 session_id 与当前 Antigravity 对话不一致。";
1068
+ "Expected a JSON object." = "配置必须是 JSON 对象。";
1069
+ "The Antigravity hook name is already in use." = "Antigravity Hook 名称已被使用。";
1070
+ "Antigravity CLI hooks configured in {path}." = "已在 {path} 配置 Antigravity CLI Hooks。";
1071
+ "The Antigravity MCP server name is already in use." = "Antigravity MCP 服务名称已被使用。";
1072
+ "Expected an Antigravity permissions object with an allow array." = "Antigravity 的 permissions 必须是对象,allow 必须是数组。";
1073
+ "Registered CC Bridge MCP for Antigravity CLI." = "已为 Antigravity CLI 注册 CC Bridge MCP。";
1074
+ "Removed CC Bridge MCP from Antigravity CLI." = "已从 Antigravity CLI 移除 CC Bridge MCP。";
1075
+
1076
+ "Antigravity App integration: {agyApp}" = "Antigravity App 集成:{agyApp}";
1077
+ "Open Antigravity App once before enabling its CC Bridge integration." = "请先打开一次 Antigravity App,再启用它的 CC Bridge 集成。";
1078
+ "CC Bridge is unavailable for this Antigravity host." = "当前 Antigravity 宿主无法使用 CC Bridge。";
1079
+ "Delivered to the Antigravity App conversation {name}." = "已送入 Antigravity App 对话 {name}。";
1080
+ "Queued in {name}'s inbox. Idle Antigravity App conversations are woken by the Sidecar." = "已放入 {name} 的信箱。Sidecar 会唤醒空闲的 Antigravity App 对话。";
1081
+ "Antigravity App Sidecar configured" = "Antigravity App Sidecar 已配置";
1082
+ "Antigravity App Sidecar needs repair" = "Antigravity App Sidecar 需要修复";
1083
+ "The Antigravity sidecar name is already in use." = "Antigravity Sidecar 名称已被使用。";
1084
+ "Antigravity App Sidecar enabled." = "已启用 Antigravity App Sidecar。";
1085
+ "Antigravity App Sidecar disabled." = "已停用 Antigravity App Sidecar。";
1086
+ "Expand all" = "展开全部";
1087
+ "Show less" = "收起";
1088
+ "Quota Card Order" = "额度卡片顺序";
1089
+ "Drag to reorder cards in the hover panel" = "拖动调整悬停面板中的卡片顺序";
@@ -1,5 +1,6 @@
1
1
  // agent 事件流读取与客户端存活检测。
2
2
  #import "CCPetsAppDelegate+Private.h"
3
+ #import "CCPetsBridgeStore.h"
3
4
 
4
5
  // 客户端是否真的还在跑。只问 kill(pid, 0) 不够:关掉终端窗口只是销毁 pty,claude /
5
6
  // codex(Node 进程)不一定跟着 SIGHUP 退出,会变成脱离控制终端的孤儿继续活着。那样
@@ -75,10 +76,41 @@ static BOOL ClientProcessAlive(pid_t pid, NSString *recordedTTY) {
75
76
  if (lineData.length == 0) continue;
76
77
  NSDictionary *record = [NSJSONSerialization JSONObjectWithData:lineData options:0 error:nil];
77
78
  if (![record isKindOfClass:NSDictionary.class]) continue;
78
- if (recentOnly && [record[@"timestamp"] doubleValue] < cutoff) continue;
79
+ NSMutableDictionary *normalized = [record mutableCopy];
80
+ NSString *profileID = NormalizedAgentProfileID(record[@"profileId"]);
81
+ if (profileID.length > 0) normalized[@"profileId"] = profileID;
82
+ else [normalized removeObjectForKey:@"profileId"];
83
+ record = normalized;
84
+ BOOL ended = [record[@"event"] isEqual:@"SessionEnd"];
85
+ BOOL desktop = [record[@"provider"] isEqual:@"Codex"] && IsCodexDesktopFocusTarget(record[@"terminal"]);
86
+ NSNumber *persistent = desktop && !ended ? [self desktopSessionPersistenceForRecord:record] : nil;
87
+ if (desktop && !ended && persistent && !persistent.boolValue) continue;
88
+ if (persistent) normalized[@"desktopPersistent"] = persistent;
89
+ BOOL replay = recentOnly && (desktop || [record[@"timestamp"] doubleValue] < cutoff);
90
+ BOOL liveAntigravity = replay && !ended && IsAntigravitySessionRecord(record) &&
91
+ CCBridgeEnabled() && CCBridgeSessionLive(CCBridgeReadSession(record[@"session"]));
92
+ // 只有确认的持久化聊天可以恢复在线列表。应用存活不证明某轮任务仍在运行。
93
+ if (replay && !ended && !liveAntigravity && !(desktop && persistent.boolValue && CodexDesktopFocusTargetIsLive(record[@"terminal"],
94
+ [record[@"timestamp"] doubleValue]))) continue;
95
+ NSString *sessionKey = [self agentSessionKeyForRecord:record];
96
+ NSDictionary *previous = sessionKey ? self.agentSessionRecords[sessionKey] : nil;
97
+ // 在记录、审批、动画等所有消费者之前挡住完成后的尾随事件。
98
+ if (!ended && previous && [[self statusIdentityForRecord:previous] isEqual:[self statusIdentityForRecord:record]] &&
99
+ [self isTrailingRecord:record afterState:previous[@"state"]]) continue;
100
+ if (replay && (desktop || liveAntigravity) && !ended &&
101
+ ![@[@"completed", @"failed"] containsObject:record[@"state"] ?: @""]) {
102
+ normalized[@"state"] = @"idle";
103
+ normalized[@"event"] = @"Snapshot";
104
+ normalized[@"tool"] = @"";
105
+ }
79
106
  [self trackAgentSessionRecord:record];
80
107
  NSString *event = record[@"event"];
81
108
  NSString *state = [record[@"state"] isKindOfClass:NSString.class] ? record[@"state"] : @"";
109
+ if (ended) {
110
+ [self.pendingApprovalRecords removeObjectForKey:[self approvalKeyForRecord:record]];
111
+ if (!recentOnly) [self finishAgentSessionPresentation:record];
112
+ continue;
113
+ }
82
114
  if ([event isKindOfClass:NSString.class]) {
83
115
  if (!self.pendingApprovalRecords) {
84
116
  self.pendingApprovalRecords = [NSMutableDictionary dictionary];
@@ -92,11 +124,13 @@ static BOOL ClientProcessAlive(pid_t pid, NSString *recordedTTY) {
92
124
  [self.pendingApprovalRecords removeObjectForKey:approvalKey];
93
125
  }
94
126
  [self prunePendingApprovalRecords];
127
+ if (replay || (desktop && [event isEqual:@"SessionStart"])) continue;
95
128
  // 多会话下不能让一个未处理的审批全局挡住其他 Agent 的所有 Hook。每条事件
96
129
  // 都正常驱动气泡和动画;仍在等待的审批保留在多会话记录中供用户回跳。
97
130
  [self displayAgentRecord:record notify:YES];
98
131
  }
99
132
  }
133
+ [self updateQuotaLiveState];
100
134
  [self refreshApprovalBadge];
101
135
  }
102
136
  - (void)readNewAgentEvents {
@@ -180,8 +214,7 @@ static BOOL ClientProcessAlive(pid_t pid, NSString *recordedTTY) {
180
214
  stringByTrimmingCharactersInSet:NSCharacterSet.whitespaceAndNewlineCharacterSet];
181
215
  NSString *tty = lines.count > 1 ? [lines[1]
182
216
  stringByTrimmingCharactersInSet:NSCharacterSet.whitespaceAndNewlineCharacterSet] : @"";
183
- NSString *profileID = lines.count > 2 ? [lines[2]
184
- stringByTrimmingCharactersInSet:NSCharacterSet.whitespaceAndNewlineCharacterSet] : @"";
217
+ NSString *profileID = lines.count > 2 ? NormalizedAgentProfileID(lines[2]) : @"";
185
218
  if (!ClientProcessAlive(pid, tty)) {
186
219
  [NSFileManager.defaultManager removeItemAtPath:path error:nil];
187
220
  continue;
@@ -205,6 +238,18 @@ static BOOL ClientProcessAlive(pid_t pid, NSString *recordedTTY) {
205
238
  self.liveClientProviders = providers;
206
239
  self.liveClientProfileIDs = profileIDs;
207
240
  self.liveUnscopedClientProviders = unscopedProviders;
241
+ if (!self.managedAgentSessionKeys) self.managedAgentSessionKeys = [NSMutableSet set];
242
+ // 先用本轮与上一轮的 pid 快照标记对应会话,再替换快照,保留精确退出信号。
243
+ NSMutableSet<NSString *> *observedKeys = [sessionKeys mutableCopy];
244
+ [observedKeys unionSet:self.liveAgentSessionKeys ?: [NSSet set]];
245
+ for (NSDictionary *record in self.agentSessionRecords.allValues) {
246
+ NSString *key = [self onlineAgentSessionKeyForRecord:record];
247
+ NSDictionary *terminal = [record[@"terminal"] isKindOfClass:NSDictionary.class] ? record[@"terminal"] : nil;
248
+ NSString *legacyKey = OnlineAgentSessionKey(record[@"provider"], nil, terminal[@"tty"]);
249
+ if ((key && [observedKeys containsObject:key]) || (legacyKey && [observedKeys containsObject:legacyKey])) {
250
+ [self.managedAgentSessionKeys addObject:[self statusIdentityForRecord:record]];
251
+ }
252
+ }
208
253
  self.liveAgentSessionKeys = sessionKeys;
209
254
  self.hasUnlabeledClient = unlabeled;
210
255
  [self pruneOfflineAgentSessionRecords];
@@ -220,6 +265,8 @@ static BOOL ClientProcessAlive(pid_t pid, NSString *recordedTTY) {
220
265
  [self refreshApprovalBadge];
221
266
  // 启动模式在应用生命周期内保持不变。手动启动的桌宠即使后来检测到
222
267
  // Codex/Claude 客户端,也不应被转成 CLI 托管模式并随客户端退出。
223
- if (liveClients == 0 && self.managedByCLI) [NSApp terminate:nil];
268
+ // 桌面端不创建 CLI pid 文件;只要桌面应用仍运行,就不能随最后一个终端退出。
269
+ if (liveClients == 0 && self.managedByCLI && !CodexDesktopApplicationIsRunning() &&
270
+ !AntigravityDesktopApplicationIsRunning()) [NSApp terminate:nil];
224
271
  }
225
272
  @end