cc-pets 2.2.1 → 2.4.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 (197) hide show
  1. package/CC_BRIDGE.md +24 -2
  2. package/CC_BRIDGE.zh-CN.md +19 -2
  3. package/CHANGELOG.md +111 -0
  4. package/CHANGELOG.zh-CN.md +111 -0
  5. package/CONTRIBUTING.md +35 -10
  6. package/CONTRIBUTING.zh-CN.md +28 -10
  7. package/README.md +212 -32
  8. package/README.zh-CN.md +167 -36
  9. package/Resources/AgentIcons/claude.png +0 -0
  10. package/Resources/AgentIcons/codex.icns +0 -0
  11. package/Resources/IDEPlugins/cc-pets-terminal.vsix +0 -0
  12. package/Resources/IDEPlugins/cc-pets-terminal.zip +0 -0
  13. package/Resources/zh-Hans.lproj/Localizable.strings +699 -20
  14. package/Sources/CCPets/{CCPetsAppDelegate+AgentEvents.m → App/CCPetsAppDelegate+AgentEvents.m} +15 -5
  15. package/Sources/CCPets/{CCPetsAppDelegate+AgentStatus.m → App/CCPetsAppDelegate+AgentStatus.m} +90 -25
  16. package/Sources/CCPets/{CCPetsAppDelegate+Bridge.m → App/CCPetsAppDelegate+Bridge.m} +35 -24
  17. package/Sources/CCPets/{CCPetsAppDelegate+Pets.m → App/CCPetsAppDelegate+Pets.m} +17 -3
  18. package/Sources/CCPets/{CCPetsAppDelegate+Private.h → App/CCPetsAppDelegate+Private.h} +71 -23
  19. package/Sources/CCPets/App/CCPetsAppDelegate+Profiles.m +238 -0
  20. package/Sources/CCPets/{CCPetsAppDelegate+Quota.m → App/CCPetsAppDelegate+Quota.m} +47 -32
  21. package/Sources/CCPets/{CCPetsAppDelegate+Settings.m → App/CCPetsAppDelegate+Settings.m} +87 -102
  22. package/Sources/CCPets/{CCPetsAppDelegate+Speech.m → App/CCPetsAppDelegate+Speech.m} +121 -51
  23. package/Sources/CCPets/App/CCPetsAppDelegate+Workbench.m +139 -0
  24. package/Sources/CCPets/{CCPetsAppDelegate.h → App/CCPetsAppDelegate.h} +17 -2
  25. package/Sources/CCPets/{CCPetsAppDelegate.m → App/CCPetsAppDelegate.m} +107 -11
  26. package/Sources/CCPets/App/CCPetsOpenCommand.h +13 -0
  27. package/Sources/CCPets/App/CCPetsOpenCommand.m +99 -0
  28. package/Sources/CCPets/{main.m → App/main.m} +74 -1
  29. package/Sources/CCPets/{CCPetsBridge.h → Bridge/CCPetsBridge.h} +17 -4
  30. package/Sources/CCPets/{CCPetsBridge.m → Bridge/CCPetsBridge.m} +43 -23
  31. package/Sources/CCPets/Bridge/CCPetsBridgeCLI.h +10 -0
  32. package/Sources/CCPets/Bridge/CCPetsBridgeCLI.m +832 -0
  33. package/Sources/CCPets/Bridge/CCPetsBridgeCore.h +59 -0
  34. package/Sources/CCPets/Bridge/CCPetsBridgeCore.m +576 -0
  35. package/Sources/CCPets/Bridge/CCPetsBridgeSetup.h +24 -0
  36. package/Sources/CCPets/Bridge/CCPetsBridgeSetup.m +507 -0
  37. package/Sources/CCPets/Bridge/CCPetsBridgeStore.h +106 -0
  38. package/Sources/CCPets/Bridge/CCPetsBridgeStore.m +897 -0
  39. package/Sources/CCPets/Integrations/CCPetsCLISupport.h +75 -0
  40. package/Sources/CCPets/Integrations/CCPetsCLISupport.m +342 -0
  41. package/Sources/CCPets/Integrations/CCPetsEvents.h +15 -0
  42. package/Sources/CCPets/{CCPetsEvents.m → Integrations/CCPetsEvents.m} +23 -0
  43. package/Sources/CCPets/Integrations/CCPetsIDEIntegration.h +21 -0
  44. package/Sources/CCPets/Integrations/CCPetsIDEIntegration.m +503 -0
  45. package/Sources/CCPets/Integrations/CCPetsIntegrations.h +51 -0
  46. package/Sources/CCPets/Integrations/CCPetsIntegrations.m +662 -0
  47. package/Sources/CCPets/Integrations/CCPetsLaunchPreflight.h +5 -0
  48. package/Sources/CCPets/Integrations/CCPetsLaunchPreflight.m +367 -0
  49. package/Sources/CCPets/Integrations/CCPetsProfiles.h +38 -0
  50. package/Sources/CCPets/Integrations/CCPetsProfiles.m +516 -0
  51. package/Sources/CCPets/{CCPetsTerminalFocus.h → Integrations/CCPetsTerminalFocus.h} +2 -1
  52. package/Sources/CCPets/{CCPetsTerminalFocus.m → Integrations/CCPetsTerminalFocus.m} +148 -36
  53. package/Sources/CCPets/Integrations/CCPetsTerminalIntegration.h +17 -0
  54. package/Sources/CCPets/Integrations/CCPetsTerminalIntegration.m +64 -0
  55. package/Sources/CCPets/Integrations/CCPetsVSCodeIntegration.h +23 -0
  56. package/Sources/CCPets/Integrations/CCPetsVSCodeIntegration.m +475 -0
  57. package/Sources/CCPets/Pet/CCPetsPetStore.h +12 -0
  58. package/Sources/CCPets/Pet/CCPetsPetStore.m +476 -0
  59. package/Sources/CCPets/{CCPetsPhrases.h → Pet/CCPetsPhrases.h} +11 -2
  60. package/Sources/CCPets/{CCPetsPhrases.m → Pet/CCPetsPhrases.m} +19 -2
  61. package/Sources/CCPets/{CCPetsPhrasesEditor.m → Pet/CCPetsPhrasesEditor.m} +4 -1
  62. package/Sources/CCPets/Pet/PetView+Interaction.m +207 -0
  63. package/Sources/CCPets/Pet/PetView+Menu.m +598 -0
  64. package/Sources/CCPets/Pet/PetView+MicroBehavior.m +234 -0
  65. package/Sources/CCPets/Pet/PetView+Private.h +81 -0
  66. package/Sources/CCPets/{PetView.h → Pet/PetView.h} +3 -5
  67. package/Sources/CCPets/Pet/PetView.m +635 -0
  68. package/Sources/CCPets/Support/CCPetsDoctor.h +25 -0
  69. package/Sources/CCPets/Support/CCPetsDoctor.m +646 -0
  70. package/Sources/CCPets/Support/CCPetsJSON.h +27 -0
  71. package/Sources/CCPets/Support/CCPetsJSON.m +397 -0
  72. package/Sources/CCPets/{CCPetsL10n.h → Support/CCPetsL10n.h} +3 -1
  73. package/Sources/CCPets/{CCPetsL10n.m → Support/CCPetsL10n.m} +30 -1
  74. package/Sources/CCPets/Support/CCPetsPreferences.h +33 -0
  75. package/Sources/CCPets/Support/CCPetsPreferences.m +117 -0
  76. package/Sources/CCPets/UI/CCPetsDiagnosticsPage.h +25 -0
  77. package/Sources/CCPets/UI/CCPetsDiagnosticsPage.m +440 -0
  78. package/Sources/CCPets/UI/CCPetsFormBuilder.h +44 -0
  79. package/Sources/CCPets/UI/CCPetsFormBuilder.m +279 -0
  80. package/Sources/CCPets/UI/CCPetsGlassView.h +57 -0
  81. package/Sources/CCPets/{CCPetsGlassView.m → UI/CCPetsGlassView.m} +60 -11
  82. package/Sources/CCPets/UI/CCPetsMainWindow.h +55 -0
  83. package/Sources/CCPets/UI/CCPetsMainWindow.m +730 -0
  84. package/Sources/CCPets/UI/CCPetsSettingsPage.h +64 -0
  85. package/Sources/CCPets/UI/CCPetsSettingsPage.m +1412 -0
  86. package/Sources/CCPets/UI/CCPetsUIStyle.h +135 -0
  87. package/Sources/CCPets/UI/CCPetsUIStyle.m +865 -0
  88. package/Sources/CCPets/UI/CCPetsUsageChartView.h +15 -0
  89. package/Sources/CCPets/UI/CCPetsUsageChartView.m +288 -0
  90. package/Sources/CCPets/UI/CCPetsUsagePage.h +32 -0
  91. package/Sources/CCPets/UI/CCPetsUsagePage.m +712 -0
  92. package/Sources/CCPets/UI/CCPetsUsageShared.h +53 -0
  93. package/Sources/CCPets/UI/CCPetsUsageStore.m +120 -0
  94. package/Sources/CCPets/UI/CCPetsUsageWidgets.h +30 -0
  95. package/Sources/CCPets/UI/CCPetsUsageWidgets.m +201 -0
  96. package/Sources/CCPets/UI/CCPetsWorkbench.h +40 -0
  97. package/Sources/CCPets/UI/CCPetsWorkbenchPages.h +13 -0
  98. package/Sources/CCPets/UI/CCPetsWorkbenchPages.m +783 -0
  99. package/Sources/CCPets/{MenuToggleSwitch.m → UI/MenuToggleSwitch.m} +1 -0
  100. package/Sources/CCPets/{CCPetsCodexRateLimits.h → Usage/CCPetsCodexRateLimits.h} +1 -0
  101. package/Sources/CCPets/{CCPetsCodexRateLimits.m → Usage/CCPetsCodexRateLimits.m} +10 -3
  102. package/Sources/CCPets/{CCPetsQuotaHistory.h → Usage/CCPetsQuotaHistory.h} +3 -0
  103. package/Sources/CCPets/{CCPetsQuotaHistory.m → Usage/CCPetsQuotaHistory.m} +58 -0
  104. package/Sources/CCPets/Usage/CCPetsUsage+ClaudeReader.m +436 -0
  105. package/Sources/CCPets/Usage/CCPetsUsage+CodexBackground.m +193 -0
  106. package/Sources/CCPets/Usage/CCPetsUsage+CodexReader.m +392 -0
  107. package/Sources/CCPets/Usage/CCPetsUsage+CodexSessions.m +484 -0
  108. package/Sources/CCPets/Usage/CCPetsUsage+Internal.h +97 -0
  109. package/Sources/CCPets/Usage/CCPetsUsage+Models.m +323 -0
  110. package/Sources/CCPets/Usage/CCPetsUsage+TokenTotals.m +655 -0
  111. package/Sources/CCPets/Usage/CCPetsUsage.h +58 -0
  112. package/Sources/CCPets/Usage/CCPetsUsage.m +225 -0
  113. package/Sources/CCPets/Usage/CCPetsUsageMode.h +10 -0
  114. package/Sources/CCPets/Usage/CCPetsUsageMode.m +163 -0
  115. package/Sources/CCPets/{CCPetsUsageMonitor.h → Usage/CCPetsUsageMonitor.h} +3 -0
  116. package/Sources/CCPets/{CCPetsUsageMonitor.m → Usage/CCPetsUsageMonitor.m} +174 -19
  117. package/Sources/CCPets/Usage/QuotaDashboardView+Primitives.m +328 -0
  118. package/Sources/CCPets/Usage/QuotaDashboardView+Private.h +103 -0
  119. package/Sources/CCPets/Usage/QuotaDashboardView+Rendering.m +598 -0
  120. package/Sources/CCPets/{QuotaDashboardView.h → Usage/QuotaDashboardView.h} +17 -0
  121. package/Sources/CCPets/Usage/QuotaDashboardView.m +713 -0
  122. package/THIRD_PARTY_NOTICES.md +8 -4
  123. package/THIRD_PARTY_NOTICES.zh-CN.md +6 -2
  124. package/bin/cc-pets +8 -6
  125. package/bin/claude-with-pet +12 -2
  126. package/bin/codex-with-pet +15 -5
  127. package/package.json +5 -1
  128. package/plugins/jetbrains/README.md +62 -0
  129. package/plugins/jetbrains/src/main/java/com/ccpets/terminal/TerminalBridge.java +379 -0
  130. package/plugins/jetbrains/src/main/java/com/ccpets/terminal/TerminalIdentity.java +24 -0
  131. package/plugins/jetbrains/src/main/java/com/ccpets/terminal/TerminalStartup.java +12 -0
  132. package/plugins/jetbrains/src/main/resources/META-INF/plugin.xml +23 -0
  133. package/plugins/jetbrains/src/main/resources/META-INF/pluginIcon.svg +380 -0
  134. package/plugins/vscode/README.md +63 -0
  135. package/plugins/vscode/extension.js +210 -0
  136. package/plugins/vscode/package.json +18 -0
  137. package/scripts/build-idea-plugin.sh +101 -0
  138. package/scripts/build-vscode-extension.sh +112 -0
  139. package/scripts/build.sh +31 -5
  140. package/scripts/compile-cached.zsh +133 -0
  141. package/scripts/i18n.zsh +9 -52
  142. package/scripts/install-app.sh +4 -0
  143. package/scripts/install-shell-integration.sh +17 -10
  144. package/scripts/uninstall-shell-integration.sh +6 -1
  145. package/Sources/CCPets/CCPetsEvents.h +0 -10
  146. package/Sources/CCPets/CCPetsGlassView.h +0 -31
  147. package/Sources/CCPets/CCPetsUsage.h +0 -36
  148. package/Sources/CCPets/CCPetsUsage.m +0 -2069
  149. package/Sources/CCPets/PetView.m +0 -1839
  150. package/Sources/CCPets/QuotaDashboardView.m +0 -1145
  151. package/scripts/bridge/cli.mjs +0 -237
  152. package/scripts/bridge/core.mjs +0 -228
  153. package/scripts/bridge/hook.mjs +0 -150
  154. package/scripts/bridge/install.mjs +0 -311
  155. package/scripts/bridge/mcp-server.mjs +0 -308
  156. package/scripts/bridge/options.mjs +0 -87
  157. package/scripts/bridge/process.mjs +0 -151
  158. package/scripts/bridge/reservations.mjs +0 -248
  159. package/scripts/bridge/store.mjs +0 -433
  160. package/scripts/bridge/watch.mjs +0 -69
  161. package/scripts/check-l10n.mjs +0 -168
  162. package/scripts/configure-updater.mjs +0 -43
  163. package/scripts/detect-cli.mjs +0 -68
  164. package/scripts/doctor.mjs +0 -470
  165. package/scripts/i18n.mjs +0 -122
  166. package/scripts/install-claude-hooks.mjs +0 -253
  167. package/scripts/install-codex-hooks.mjs +0 -78
  168. package/scripts/integration-markers.mjs +0 -51
  169. package/scripts/locales/zh-Hans.json +0 -366
  170. package/scripts/pet-store.mjs +0 -415
  171. package/scripts/uninstall-integrations.mjs +0 -205
  172. /package/Sources/CCPets/{CCPetsAppDelegate+Update.m → App/CCPetsAppDelegate+Update.m} +0 -0
  173. /package/Sources/CCPets/{CCPetsVersion.h → App/CCPetsVersion.h} +0 -0
  174. /package/Sources/CCPets/{CCPetsVersion.m → App/CCPetsVersion.m} +0 -0
  175. /package/Sources/CCPets/{CCPetsImageLoader.h → Pet/CCPetsImageLoader.h} +0 -0
  176. /package/Sources/CCPets/{CCPetsImageLoader.m → Pet/CCPetsImageLoader.m} +0 -0
  177. /package/Sources/CCPets/{CCPetsPetSize.h → Pet/CCPetsPetSize.h} +0 -0
  178. /package/Sources/CCPets/{CCPetsPetSize.m → Pet/CCPetsPetSize.m} +0 -0
  179. /package/Sources/CCPets/{CCPetsPhrasesEditor.h → Pet/CCPetsPhrasesEditor.h} +0 -0
  180. /package/Sources/CCPets/{CCPetsPreviews.h → Pet/CCPetsPreviews.h} +0 -0
  181. /package/Sources/CCPets/{CCPetsPreviews.m → Pet/CCPetsPreviews.m} +0 -0
  182. /package/Sources/CCPets/Resources/{/351/273/230/350/256/244.webp" → ByteMochi.webp} +0 -0
  183. /package/Sources/CCPets/{CCPetsCleanup.h → Support/CCPetsCleanup.h} +0 -0
  184. /package/Sources/CCPets/{CCPetsCleanup.m → Support/CCPetsCleanup.m} +0 -0
  185. /package/Sources/CCPets/{CCPetsPaths.h → Support/CCPetsPaths.h} +0 -0
  186. /package/Sources/CCPets/{CCPetsPaths.m → Support/CCPetsPaths.m} +0 -0
  187. /package/Sources/CCPets/{CCPetsSystemMonitor.h → Support/CCPetsSystemMonitor.h} +0 -0
  188. /package/Sources/CCPets/{CCPetsSystemMonitor.m → Support/CCPetsSystemMonitor.m} +0 -0
  189. /package/Sources/CCPets/{CCPetsGlassMenu.h → UI/CCPetsGlassMenu.h} +0 -0
  190. /package/Sources/CCPets/{CCPetsGlassMenu.m → UI/CCPetsGlassMenu.m} +0 -0
  191. /package/Sources/CCPets/{MenuChoiceRow.h → UI/MenuChoiceRow.h} +0 -0
  192. /package/Sources/CCPets/{MenuChoiceRow.m → UI/MenuChoiceRow.m} +0 -0
  193. /package/Sources/CCPets/{MenuHintView.h → UI/MenuHintView.h} +0 -0
  194. /package/Sources/CCPets/{MenuHintView.m → UI/MenuHintView.m} +0 -0
  195. /package/Sources/CCPets/{MenuPetSizeView.h → UI/MenuPetSizeView.h} +0 -0
  196. /package/Sources/CCPets/{MenuPetSizeView.m → UI/MenuPetSizeView.m} +0 -0
  197. /package/Sources/CCPets/{MenuToggleSwitch.h → UI/MenuToggleSwitch.h} +0 -0
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <img src="docs/images/cover.png" alt="CC Pets v2.2.1: adjustable pet size and selectable speech sources">
2
+ <img src="docs/images/cover.png" alt="CC Pets v2.4.0: Exact terminal jumps, launch protection and usage improvements">
3
3
  </p>
4
4
 
5
5
  # CC Pets
@@ -13,25 +13,21 @@ Codex App Server interface and Claude Code's official status line input.
13
13
 
14
14
  > The app and CLI are available in English and Simplified Chinese (see [Language](#language)).
15
15
 
16
- ## What's new in v2.2.1
16
+ ## What's new in v2.4.0
17
17
 
18
- - **Adjustable pet size** — use **Pet Size** in the right-click menu for live 50%–200%
19
- scaling. The setting persists, smaller pets get proportionally smaller status cards
20
- and bubbles, and sprites stay sharper on Retina displays.
21
- - **Selectable speech sources** — choose **Chatter → Line Source → Pet-specific Lines**
22
- or **Default Lines**. The choice applies immediately and survives pet changes and restarts.
23
- - **Menu and editor fixes** — choice menus stay open and update their checkmarks,
24
- longer English labels fit, and the lines editor refreshes its language without losing edits.
18
+ - **Exact terminal jumps** — select terminals in VS Code and its forks, JetBrains,
19
+ Ghostty and iTerm2, with permissions and extension management in Settings.
20
+ - **Launch protection and CC Bridge** — optional Shadowrocket exit checks before
21
+ wrapper launches, safer session identity matching and recoverable inbox delivery.
22
+ - **Usage and pet management** — corrected Codex token accounting, background usage,
23
+ per-account quota reminders, refreshed appearance settings and custom pet deletion.
25
24
 
26
- See the [changelog](./CHANGELOG.md) and [release notes](./docs/release-notes-v2.2.1.md) for the full list.
25
+ See the [changelog](./CHANGELOG.md) and [release notes](./docs/release-notes-v2.4.0.md) for the full list.
27
26
 
28
27
  ## Screenshots
29
28
 
30
- English — v2.2.0 quota panel and Language menu:
31
-
32
29
  <p align="center">
33
- <img src="docs/images/liquid-glass-panel.en.png" width="45%" alt="English Agent Usage panel in v2.2.0 with quota, tokens, trends, and system status">
34
- <img src="docs/images/liquid-glass-menu.en.png" width="45%" alt="English right-click menu with English selected in the Language submenu">
30
+ <img src="docs/images/liquid-glass-panel.en.png" width="48%" alt="English Agent Usage panel with quota, tokens, trends, and system status"> <img src="docs/images/liquid-glass-menu.en.png" width="48%" alt="English right-click menu with English selected in the Language submenu">
35
31
  </p>
36
32
 
37
33
  ## Features
@@ -56,12 +52,14 @@ English — v2.2.0 quota panel and Language menu:
56
52
  override shared sections; default lines use only the editable shared speech file. The
57
53
  selection persists across pet changes and restarts, with pet-specific lines selected initially.
58
54
  - Includes one original pet and can download compatible assets from PetDex.
55
+ - Opens the Main menu, a regular app window with an overview, your sessions and CC Bridge messages, token usage by model, every setting and built-in diagnostics (see [Main menu](#main-menu)).
59
56
  - Uses native AppKit with no Electron runtime.
60
57
 
61
58
  ## Requirements
62
59
 
63
60
  - macOS 13 or later
64
- - Node.js 18 or later
61
+ - Node.js 18 or later, for npm only: it installs and updates CC Pets, while the app and
62
+ its `cc-pets` commands, hooks and CC Bridge run natively
65
63
  - Codex CLI and/or Claude Code CLI installed and signed in
66
64
  - zsh
67
65
  - Xcode Command Line Tools (`xcode-select --install`)
@@ -107,10 +105,11 @@ the list after 60 idle seconds.
107
105
 
108
106
  Every hook status card is clickable. The circular status icon lists up to eight
109
107
  recent online Agent terminal sessions. Terminal.app and iTerm2 are selected
110
- precisely by TTY. Without an editor extension, VS Code, JetBrains IDEs, Warp,
111
- WezTerm, and Ghostty fall back to activating the owning application; selection of
112
- an internal tab is left to that application. macOS may request Automation
113
- permission on the first Terminal.app or iTerm2 jump.
108
+ precisely by TTY; Ghostty 1.4+ also selects the exact tab and split. VS Code and
109
+ JetBrains IDEs use their bundled extensions for exact terminal selection. Without
110
+ an extension, or for Warp, WezTerm and older Ghostty versions, the owning app is
111
+ brought forward. macOS may request Automation permission for Terminal.app, iTerm2
112
+ and Ghostty. Manage permissions and extensions in Settings → Terminal Jump.
114
113
 
115
114
  ### Install from source
116
115
 
@@ -140,6 +139,73 @@ export CLAUDE_REAL_BIN=/absolute/path/to/claude
140
139
  The wrappers pass the current terminal environment through unchanged. They do not
141
140
  load or execute `.env` files.
142
141
 
142
+ ## Multi-Account
143
+
144
+ CC Pets automatically detects and integrates the official `~/.claude` and
145
+ `~/.codex` Homes. Custom Homes such as `~/.claude-x` or `~/.codex-work` are never
146
+ scanned automatically: add them explicitly from **Main menu → Multi-Account**.
147
+ The folder name is used as the account name by default and is preserved exactly;
148
+ you can rename an account from its Manage menu on the same page. Each provider has its own
149
+ circular quota-card carousel, and the Usage page can filter local token history
150
+ by account.
151
+
152
+ Pet Hooks and usage collection are configured when an account is added. If CC
153
+ Bridge is already enabled, its Hooks, permissions, and MCP registration are also
154
+ configured immediately; otherwise they are added automatically when CC Bridge is
155
+ enabled later.
156
+
157
+ ## Shadowrocket launch check
158
+
159
+ Enable **Main menu → Settings → Launch Protection → Shadowrocket** (off by default).
160
+ Each proxy app has its own preference; Shadowrocket is the first supported option.
161
+ CC Pets wrappers require a connected Shadowrocket VPN and a valid exit IP / region from
162
+ the service's HTTPS `/cdn-cgi/trace` endpoint before starting Claude / Codex. Failures
163
+ print a reason and return a nonzero exit code before registering a session or sending
164
+ a starting event. Disabling the option skips all network checks.
165
+
166
+ Claude defaults to `api.anthropic.com`. Codex uses the current Home's `auth.json` to select
167
+ `chatgpt.com` for ChatGPT login or `api.openai.com` for API-key login. If the mode is unknown
168
+ (for example, credentials stored only in Keychain), both exits must pass.
169
+ The response must contain valid `ip`, `loc` and matching `h` fields. `CN` and `HK` exits,
170
+ unknown regions, invalid responses, non-200 HTTP responses and connection / TLS / timeout
171
+ failures block launch. Successful probes print the domain, exit IP and region.
172
+ Each attempt has an 8-second connect timeout, a 15-second total request timeout and a
173
+ 16-second process watchdog. Temporary transport failures and HTTP 502 / 503 / 504 retry
174
+ once after 1 second; VPN status is checked again before retrying. Two timed-out requests
175
+ take about 31 seconds per domain, plus VPN checks and process overhead. Blocked regions,
176
+ invalid trace responses and certificate errors are not retried. Failure messages distinguish
177
+ connection, response and process timeouts and include attempt counts and cumulative DNS /
178
+ TCP / TLS / response timings. There is no separate DNS lookup or homepage HEAD request.
179
+ Probes send no account credentials,
180
+ verify TLS certificates, ignore `~/.curlrc` and do not follow redirects.
181
+
182
+ Claude reads network environment settings from the current `CLAUDE_CONFIG_DIR/settings.json`
183
+ and terminal proxy variables, including an overridden `ANTHROPIC_BASE_URL`. Codex supports
184
+ common single-line string routing settings in `CODEX_HOME/config.toml` (`model_provider`,
185
+ `profile`, `model_providers.<id>.base_url`, `chatgpt_base_url`), `--profile` / `-p`,
186
+ `OPENAI_BASE_URL` and terminal proxy variables. Custom endpoints use their own origin's
187
+ `/cdn-cgi/trace`, with no fallback to another domain. Gateways must serve valid trace data;
188
+ this only describes the exit to the gateway, not the gateway's upstream exit.
189
+ Complex routing TOML, unsupported cloud providers, command-line configuration overrides
190
+ and project network overrides are rejected with an explanation. Enterprise-managed network
191
+ configuration is outside the supported scope. The check does not validate account access,
192
+ service-supported countries or future routing changes. It recognizes the Shadowrocket VPN
193
+ configuration, not just its running process. Original CLI binaries and desktop clients bypass it.
194
+
195
+ ## CC Bridge
196
+
197
+ [CC Bridge](./CC_BRIDGE.md) is optional and off by default. It lets local Claude Code
198
+ and Codex sessions exchange messages and reserve files. Session IDs are validated;
199
+ PID fallback is accepted only for a unique live session. Ambiguous shared-host identities
200
+ are rejected rather than guessed. Codex delivery uses the recipient's Home.
201
+
202
+ Unconfirmed inbox messages are recoverable after a crash. A crash between output and
203
+ confirmation may repeat the same message ID; delivery does not mean the recipient has
204
+ read or accepted it. Turning off auto-wake also stops existing watchers from taking new
205
+ messages. Disabling Bridge blocks CLI send, rename and inbox operations; incomplete
206
+ integration removal returns an error and can be retried. See the guide for configuration
207
+ and delivery details, and the [unreleased changelog](./CHANGELOG.md#unreleased) for fixes.
208
+
143
209
  ## Commands
144
210
 
145
211
  ```bash
@@ -151,6 +217,7 @@ cc-pets --status # Print parsed Codex quota data.
151
217
  cc-pets --history # Print local quota history as JSON.
152
218
  cc-pets clean # Remove rebuildable state and caches.
153
219
  cc-pets doctor # Check the installation and integrations, with fixes.
220
+ cc-pets open [page] # Open the Main menu (pages: overview, sessions, usage, pet, accounts, alerts, general, diagnostics).
154
221
  cc-pets paths # List where settings, caches and data are stored.
155
222
 
156
223
  cc-pets pet search otter # Search the configured asset source.
@@ -180,6 +247,32 @@ Commit the bilingual `docs/release-notes-vX.Y.Z.md` before tagging; follow the
180
247
 
181
248
  ## Agent integration
182
249
 
250
+ ### JetBrains IDE terminal jump
251
+
252
+ Local Reworked terminals in IntelliJ-based IDEs 2026.2 / 2026.3 (IntelliJ IDEA,
253
+ PyCharm, WebStorm, GoLand, CLion, PhpStorm, RubyMine, Rider, etc.) support exact tab selection through
254
+ the **CC Pets Terminal** plugin. Open **Settings → General → Terminal Jump** in CC Pets:
255
+ each detected IDE has its own row, and **Install** writes the bundled plugin into that IDE's
256
+ plugin folder after you confirm. Restart the IDE if it was running, then open a project to
257
+ connect automatically; no port configuration is needed. When a newer plugin ships with
258
+ CC Pets, the row offers **Update**. IDEs with a customized plugin folder (`idea.plugins.path`)
259
+ fall back to **Settings → Plugins → ⚙ → Install Plugin from Disk**. Each IDE, stable and EAP
260
+ build keeps its own plugins. Classic and remote terminals are not supported yet.
261
+ See [plugin details](plugins/jetbrains/README.md) for installation and build instructions.
262
+
263
+ ### VS Code terminal jump
264
+
265
+ VS Code 1.80+ and its forks (Cursor, Windsurf, VSCodium, Insiders, etc.) jump to the exact
266
+ integrated terminal — in the panel, a split or the editor area — through the **CC Pets Terminal**
267
+ extension. In **Settings → General → Terminal Jump**, each detected app has its own row;
268
+ **Install** runs that app's own command line tool with the bundled VSIX after you confirm.
269
+ Open windows usually connect on their own; otherwise run **Developer: Reload Window**. Apps
270
+ without a command line tool fall back to **Extensions → ⋯ → Install from VSIX…**. Without the
271
+ extension, a card only brings the app forward. Remote windows (SSH, WSL, containers) are not
272
+ supported. See [extension details](plugins/vscode/README.md).
273
+
274
+ ### Codex and Claude hooks
275
+
183
276
  Codex Hooks and Claude Code Hooks drive the pet's agent-state animations. After a
184
277
  first installation or a Codex Hook update, start Codex and run `/hooks` to review
185
278
  and trust the CC Pets Hook. Codex skips untrusted user hooks.
@@ -199,6 +292,77 @@ printf '%s' '{"schemaVersion":1,"provider":"MyAgent","state":"thinking"}' \
199
292
  See [Provider protocol](./PROVIDER_PROTOCOL.md). The protocol does not accept
200
293
  prompts, command text, file contents, or model output.
201
294
 
295
+ ## Main menu
296
+
297
+ Besides the right-click menu and the hover quota panel, CC Pets has a regular app
298
+ window for your sessions, usage and settings. Open it from the right-click menu
299
+ (**Main menu**), the app menu, or the terminal:
300
+
301
+ ```bash
302
+ cc-pets open # the page you used last
303
+ cc-pets open overview
304
+ cc-pets open sessions
305
+ cc-pets open usage
306
+ cc-pets open accounts
307
+ cc-pets open general # also: pet, accounts, alerts, diagnostics
308
+ ```
309
+
310
+ <p align="center">
311
+ <img src="docs/images/main-menu-overview.en.png" width="48%" alt="Main menu Overview page with the pet, today's token usage and quota cards for each account"> <img src="docs/images/main-menu-usage.en.png" width="48%" alt="Main menu Usage page with a 30-day daily chart stacked by model and a per-model table">
312
+ </p>
313
+
314
+ - **Sidebar** — the current pet, animated, with its status, then two groups: **Workbench**
315
+ (Overview, Sessions, Usage, Pet, Multi-Account) and **General** (Alerts,
316
+ Settings). Diagnostics sits at the bottom with a badge when something needs fixing.
317
+ - **Overview** — the pet and what it is doing, today's total usage with input, output, cached input and requests,
318
+ a notice when diagnostics found problems, and compact account cards using the hover
319
+ panel's data. Plan mode shows 5-hour and weekly quota rings, reset times and weekly pace.
320
+ API mode shows monthly calls and total tokens, with daily call averages and input/output
321
+ tokens underneath. Every registered account has its own card in a two-column grid.
322
+ **Check Diagnostics** sits next to the account name only when that account has a
323
+ diagnostic warning or failure; missing quota data alone does not trigger it.
324
+ Existing Plan/API pills remain available per registered account, inheriting the old
325
+ provider preference until customized. Accounts identified as API authentication are
326
+ fixed to API usage and cannot switch; subscription accounts can still choose either
327
+ display. Unknown authentication keeps manual switching available. Detection runs in the
328
+ background without retaining keys or authentication command output.
329
+ - **Sessions** — the Agent sessions online right now (sessions waiting for
330
+ approval first, each with **Go to Terminal**) and CC Bridge traffic: messages waiting in
331
+ an inbox and recent deliveries. Only who sent what to whom is shown, never the message.
332
+ - **Usage** — local Claude Code and Codex token usage for the last 7, 30 or 90 days. The same
333
+ five numbers as the overview lead the page: total usage (input + cache write + output +
334
+ cached input + background usage), input, output, cached input with its hit rate, and requests. Background usage from local Codex SQLite logs contributes to the total only, without an inferred token breakdown. The daily bar
335
+ chart stacks models in fixed colors and can switch between those five measures; click a model in the legend or the table to see only that
336
+ model, and hover a bar for that day's numbers. Everything is counted from local session
337
+ logs; nothing is sent anywhere. A per-day archive keeps history after Claude Code prunes
338
+ old transcripts.
339
+ - **Multi-Account** — add Claude / Codex Homes, view paths and integration status, and manage repairs, names, relocation and removal of custom Home integrations.
340
+ - **Pet / Alerts / Settings** — every pet setting, split into three short pages (Pet:
341
+ picker, deletion of unselected custom pets with confirmation, size, chatter, click reactions and Codex import; Alerts: notifications, the status
342
+ card and system status; Settings: language, panel appearance and the pet sprites folder), plus finer controls such as the click-reaction thresholds and a
343
+ continuous glass dimming slider (the menu keeps its four presets). Changes apply to the
344
+ desktop pet immediately, and changes made in the menu show up here. Options that rewrite
345
+ Claude Code / Codex configuration (enabling CC Bridge, auto-approve) stay in the
346
+ right-click menu. The right-click menu keeps only the everyday items: Pets, Pet Size,
347
+ Show Status Card, Usage Display, Panel Theme and CC Bridge.
348
+ - **Diagnostics** — the same checks as `cc-pets doctor`, problems first: each with its area,
349
+ the suggested fix command and a copy button. Passing checks fold into one line. The PATH
350
+ order check only points you to `cc-pets doctor` in a terminal, since the pet's own PATH
351
+ isn't your terminal's. Version checks compare the local package, running binary and installed App;
352
+ source checkouts are labeled as a local source package, npm installations as a local npm package,
353
+ and unrecognized locations as a local package. These labels do not indicate publication on npm;
354
+ the update checker queries published versions separately.
355
+ **Re-check** and **Copy Report** (paths are shown as `~`, so it is safe to paste into an
356
+ issue). Registered accounts' Hooks and Claude status line issues offer **Auto-fix** and
357
+ **Fix All**. Configuration and affected scripts are backed up before changes, then checks
358
+ run again automatically. The page shows backup locations and any failures; each backup's
359
+ `manifest.json` records original paths, permissions and backup files. Other issues retain
360
+ their manual commands. Plain `cc-pets doctor` remains read-only.
361
+
362
+ The window is created when you open it and released when you close it, and nothing runs in
363
+ the background while it is closed. The Dock icon and menu bar appear only while it is open;
364
+ clicking the Dock icon brings a minimized window back.
365
+
202
366
  ## Pet interaction
203
367
 
204
368
  | Interaction | Response |
@@ -209,7 +373,7 @@ prompts, command text, file contents, or model output.
209
373
  | Hover on either body side | Directional interaction animation |
210
374
  | Click | Playful response animation |
211
375
  | Drag left or right | Directional drag animation |
212
- | Right-click | Pet, size, notification, Help (update check and About), and exit menu |
376
+ | Right-click | Pets, size, status card, usage display, panel theme, CC Bridge, Help, open the window, and quit |
213
377
 
214
378
  **Pet Size** in the right-click menu offers a 50%–200% slider with a live percentage
215
379
  and **Reset Size** to return to 100%. The pet scales around its feet, and its size
@@ -222,13 +386,12 @@ default. Changes apply immediately to the quota panel, status card, and speech
222
386
  bubble, and persist across restarts. Liquid Glass uses native system glass and is
223
387
  available on macOS 26 and later only. Building native glass support requires the
224
388
  macOS 26 SDK or later. The same submenu has a **Glass dimming** setting for the quota
225
- panel, status card, and speech bubble: Clear (0%), Light (15%), Standard (25%,
226
- default), or Legible (45%). Lower levels
389
+ panel, status card, and speech bubble: Clear (0%), Light (25%), Standard (50%), or Legible (100%). Lower levels
227
390
  look more transparent; higher levels keep text readable over light backgrounds.
228
391
 
229
392
  ### Language
230
393
 
231
- The **Language** submenu offers **System Default** plus every bundled language,
394
+ The **Language** option on the window's **Settings** page offers **System Default** plus every bundled language,
232
395
  currently **English** and **简体中文**. System Default follows the first supported
233
396
  entry in macOS's preferred languages and falls back to English. Menus and panels switch right away; system
234
397
  buttons in dialogs follow after the next launch. The choice is written to
@@ -240,7 +403,7 @@ language, see [Adding a language](./CONTRIBUTING.md#adding-a-language).
240
403
 
241
404
  The pet switcher scans only built-in assets and `~/.cc-pets/pets/`. It does not
242
405
  scan `~/.petdex/pets/` or `~/.codex/pets/`. To use assets installed by Codex,
243
- enable **Import Codex pets** in the app's right-click menu; CC Pets copies valid
406
+ enable **Import Codex Pets** on the window's **Pet** page; CC Pets copies valid
244
407
  assets into its own directory without overwriting names already present.
245
408
 
246
409
  External assets use their directory name in the menu. The app caches the list and
@@ -286,10 +449,19 @@ Local seven-day quota history is disabled by default. When enabled, it is stored
286
449
  only at `~/Library/Application Support/CC Pets/quota-history.json`, retains seven
287
450
  days, and records at most once every 15 minutes.
288
451
 
452
+ In API usage mode, the monthly token trend shows today's usage and recorded days on
453
+ separate lines; hover over it for the selected account's peak usage. Codex exhaustion
454
+ markers expire five minutes after sampling, including when recovered from cache.
455
+
289
456
  ## Speech
290
457
 
291
- The pet's speech comes from `~/.cc-pets/speech.txt`. Open **Speech → Edit lines…**
292
- in the right-click menu to edit, validate, preview, or restore it. Lines are grouped
458
+ Low-quota reminders track subscription accounts independently at 20%, 10% and 5%
459
+ remaining, name the triggering account, and queue during cooldown. Initial samples,
460
+ expired windows and API-usage accounts do not trigger reminders. General quota
461
+ placeholders use the subscription account with the least remaining quota.
462
+
463
+ The pet's speech comes from `~/.cc-pets/speech.txt`. Open **Chatter → Edit Lines…**
464
+ on the window's **Pet** page to edit, validate, preview, or restore it. Lines are grouped
293
465
  under stable situation tags such as `[idle]`, `[done]`, and `[state_thinking]`.
294
466
  Each line is limited to 30 characters if it contains Chinese, Japanese, or Korean
295
467
  text, and to 40 characters otherwise.
@@ -299,7 +471,7 @@ Supported live placeholders are `{quota5h}`, `{resetTime}`, `{toolName}`,
299
471
  is unavailable.
300
472
 
301
473
  Per-pet overrides live at `~/.cc-pets/speech/<pet-name>.txt` (the built-in asset
302
- uses `builtin-默认.txt`). A missing section falls back to global speech; a present
474
+ uses `builtin-ByteMochi.txt`). A missing section falls back to global speech; a present
303
475
  section replaces that global section; an empty present section keeps the pet silent
304
476
  for that situation.
305
477
 
@@ -321,7 +493,7 @@ defaults delete com.universewang.cc-pets CCPetsSpeechCooldown
321
493
  ## Pet assets
322
494
 
323
495
  This project does not operate an asset registry. The repository and npm package
324
- contain one original built-in asset, ByteMochi (`默认.webp`), distributed under the
496
+ contain one original built-in asset, ByteMochi (`ByteMochi.webp`), distributed under the
325
497
  MIT License. All other assets are downloaded by the user to
326
498
  `~/.cc-pets/pets/<name>/` and are not part of this repository or npm package.
327
499
 
@@ -332,7 +504,7 @@ licenses, copyrights, and terms remain with their respective authors and platfor
332
504
 
333
505
  ```bash
334
506
  cc-pets pet search otter
335
- cc-pets pet add boba doraemon
507
+ cc-pets pet add boba otterumells
336
508
  cc-pets pet add petdex:boba --as boba-petdex
337
509
  cc-pets pet list
338
510
  cc-pets pet remove boba
@@ -347,8 +519,8 @@ consecutive `..` sequences.
347
519
 
348
520
  ### Importing Codex assets
349
521
 
350
- CC Pets never renders directly from `~/.codex/pets/`. Enable **Import Codex pets**
351
- to copy assets containing `spritesheet.webp` or `spritesheet.png` into
522
+ CC Pets never renders directly from `~/.codex/pets/`. Enable **Import Codex Pets** on the
523
+ window's **Pet** page to copy assets containing `spritesheet.webp` or `spritesheet.png` into
352
524
  `~/.cc-pets/pets/`. Existing names are skipped, imports are idempotent, and disabling
353
525
  the option does not delete previously copied files.
354
526
 
@@ -364,7 +536,12 @@ external assets.
364
536
 
365
537
  ## Privacy
366
538
 
539
+ - Optional Shadowrocket launch protection (off by default) checks the local VPN state and sends HTTPS requests to the configured service’s `/cdn-cgi/trace` endpoint. The endpoint sees the connection’s exit IP; probes send no account credentials, verify TLS and do not follow redirects. See [Shadowrocket launch check](#shadowrocket-launch-check) for routing and support limits.
540
+ - Token accounting also reads local Codex SQLite logs and thread metadata, and keeps derived usage totals and incremental-read cursors in local caches; it does not upload those logs.
541
+ - Installed terminal extensions listen only on `127.0.0.1` and authenticate local requests. They store instance metadata and a local access token in `~/Library/Application Support/CC Pets/ide-instances/` with owner-only permissions. Extension installation writes to the selected IDE’s plugin/extension directory after confirmation; scripted terminal jumps require macOS Automation permission.
367
542
  - Codex quota is read through the official Codex App Server started from your installed Codex CLI with its existing sign-in; Claude quota comes from the status line input Claude Code passes locally. Token counts are read from local Codex and Claude Code files.
543
+ - To tell API accounts from subscription accounts, CC Pets reads the authentication settings in each registered Home (Claude `settings.json`; Codex `auth.json` and `config.toml`) and may run that Home's `claude auth status` / `codex login status` locally. Only the resulting mode is kept, in memory; keys, emails and command output are not stored.
544
+ - Diagnostics repairs back up the affected configuration files and scripts to `~/Library/Application Support/CC Pets/diagnostic-backups/` (owner-only) before changing them; the backups stay on this Mac.
368
545
  - Hooks write only redacted state events and quota cache files to the current user's temporary directory.
369
546
  - Local quota history is disabled by default and retains seven days when enabled.
370
547
  - Status cards and notifications show only provider, state, and redacted tool category.
@@ -394,7 +571,10 @@ and restores the previous Claude status line. Other user settings and hooks rema
394
571
  CC Pets is a community open-source project with no affiliation, authorization, or
395
572
  official partnership with OpenAI, Anthropic, PetDex, or any character rights holder.
396
573
  Codex, ChatGPT, Claude, their icons, and their trademarks belong to their respective
397
- owners.
574
+ owners. When installed application icons are unavailable, CC Pets uses bundled Claude
575
+ and Codex fallback icons with normalized sizing. Their sources and separate ownership
576
+ are documented in [Third-party notices](./THIRD_PARTY_NOTICES.md); these icons are not
577
+ covered by the project's MIT License.
398
578
 
399
579
  ## License
400
580