cc-pets 2.2.1 → 2.3.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.
- package/CC_BRIDGE.md +5 -2
- package/CC_BRIDGE.zh-CN.md +4 -2
- package/CHANGELOG.md +60 -0
- package/CHANGELOG.zh-CN.md +60 -0
- package/CONTRIBUTING.md +13 -10
- package/CONTRIBUTING.zh-CN.md +11 -10
- package/README.md +113 -24
- package/README.zh-CN.md +89 -28
- package/Resources/zh-Hans.lproj/Localizable.strings +568 -17
- package/Sources/CCPets/{CCPetsAppDelegate+AgentEvents.m → App/CCPetsAppDelegate+AgentEvents.m} +15 -5
- package/Sources/CCPets/{CCPetsAppDelegate+AgentStatus.m → App/CCPetsAppDelegate+AgentStatus.m} +82 -23
- package/Sources/CCPets/{CCPetsAppDelegate+Bridge.m → App/CCPetsAppDelegate+Bridge.m} +35 -24
- package/Sources/CCPets/{CCPetsAppDelegate+Pets.m → App/CCPetsAppDelegate+Pets.m} +17 -3
- package/Sources/CCPets/{CCPetsAppDelegate+Private.h → App/CCPetsAppDelegate+Private.h} +70 -22
- package/Sources/CCPets/App/CCPetsAppDelegate+Profiles.m +238 -0
- package/Sources/CCPets/{CCPetsAppDelegate+Quota.m → App/CCPetsAppDelegate+Quota.m} +47 -32
- package/Sources/CCPets/{CCPetsAppDelegate+Settings.m → App/CCPetsAppDelegate+Settings.m} +86 -98
- package/Sources/CCPets/{CCPetsAppDelegate+Speech.m → App/CCPetsAppDelegate+Speech.m} +8 -4
- package/Sources/CCPets/App/CCPetsAppDelegate+Workbench.m +139 -0
- package/Sources/CCPets/{CCPetsAppDelegate.h → App/CCPetsAppDelegate.h} +15 -0
- package/Sources/CCPets/{CCPetsAppDelegate.m → App/CCPetsAppDelegate.m} +107 -11
- package/Sources/CCPets/App/CCPetsOpenCommand.h +13 -0
- package/Sources/CCPets/App/CCPetsOpenCommand.m +99 -0
- package/Sources/CCPets/{main.m → App/main.m} +68 -1
- package/Sources/CCPets/{CCPetsBridge.h → Bridge/CCPetsBridge.h} +17 -4
- package/Sources/CCPets/{CCPetsBridge.m → Bridge/CCPetsBridge.m} +32 -17
- package/Sources/CCPets/Bridge/CCPetsBridgeCLI.h +10 -0
- package/Sources/CCPets/Bridge/CCPetsBridgeCLI.m +792 -0
- package/Sources/CCPets/Bridge/CCPetsBridgeCore.h +60 -0
- package/Sources/CCPets/Bridge/CCPetsBridgeCore.m +558 -0
- package/Sources/CCPets/Bridge/CCPetsBridgeSetup.h +24 -0
- package/Sources/CCPets/Bridge/CCPetsBridgeSetup.m +501 -0
- package/Sources/CCPets/Bridge/CCPetsBridgeStore.h +103 -0
- package/Sources/CCPets/Bridge/CCPetsBridgeStore.m +779 -0
- package/Sources/CCPets/Integrations/CCPetsCLISupport.h +75 -0
- package/Sources/CCPets/Integrations/CCPetsCLISupport.m +342 -0
- package/Sources/CCPets/Integrations/CCPetsEvents.h +15 -0
- package/Sources/CCPets/{CCPetsEvents.m → Integrations/CCPetsEvents.m} +23 -0
- package/Sources/CCPets/Integrations/CCPetsIntegrations.h +51 -0
- package/Sources/CCPets/Integrations/CCPetsIntegrations.m +662 -0
- package/Sources/CCPets/Integrations/CCPetsProfiles.h +38 -0
- package/Sources/CCPets/Integrations/CCPetsProfiles.m +516 -0
- package/Sources/CCPets/{CCPetsTerminalFocus.m → Integrations/CCPetsTerminalFocus.m} +42 -12
- package/Sources/CCPets/Pet/CCPetsPetStore.h +12 -0
- package/Sources/CCPets/Pet/CCPetsPetStore.m +476 -0
- package/Sources/CCPets/{CCPetsPhrases.h → Pet/CCPetsPhrases.h} +11 -2
- package/Sources/CCPets/{CCPetsPhrases.m → Pet/CCPetsPhrases.m} +19 -2
- package/Sources/CCPets/{CCPetsPhrasesEditor.m → Pet/CCPetsPhrasesEditor.m} +4 -1
- package/Sources/CCPets/Pet/PetView+Interaction.m +207 -0
- package/Sources/CCPets/Pet/PetView+Menu.m +598 -0
- package/Sources/CCPets/Pet/PetView+MicroBehavior.m +234 -0
- package/Sources/CCPets/Pet/PetView+Private.h +81 -0
- package/Sources/CCPets/{PetView.h → Pet/PetView.h} +3 -5
- package/Sources/CCPets/Pet/PetView.m +635 -0
- package/Sources/CCPets/Support/CCPetsDoctor.h +25 -0
- package/Sources/CCPets/Support/CCPetsDoctor.m +632 -0
- package/Sources/CCPets/Support/CCPetsJSON.h +27 -0
- package/Sources/CCPets/Support/CCPetsJSON.m +397 -0
- package/Sources/CCPets/{CCPetsL10n.h → Support/CCPetsL10n.h} +3 -1
- package/Sources/CCPets/{CCPetsL10n.m → Support/CCPetsL10n.m} +30 -1
- package/Sources/CCPets/Support/CCPetsPreferences.h +31 -0
- package/Sources/CCPets/Support/CCPetsPreferences.m +85 -0
- package/Sources/CCPets/UI/CCPetsDiagnosticsPage.h +25 -0
- package/Sources/CCPets/UI/CCPetsDiagnosticsPage.m +440 -0
- package/Sources/CCPets/UI/CCPetsFormBuilder.h +42 -0
- package/Sources/CCPets/UI/CCPetsFormBuilder.m +268 -0
- package/Sources/CCPets/{CCPetsGlassView.h → UI/CCPetsGlassView.h} +5 -1
- package/Sources/CCPets/{CCPetsGlassView.m → UI/CCPetsGlassView.m} +25 -7
- package/Sources/CCPets/UI/CCPetsMainWindow.h +55 -0
- package/Sources/CCPets/UI/CCPetsMainWindow.m +730 -0
- package/Sources/CCPets/UI/CCPetsSettingsPage.h +62 -0
- package/Sources/CCPets/UI/CCPetsSettingsPage.m +917 -0
- package/Sources/CCPets/UI/CCPetsUIStyle.h +132 -0
- package/Sources/CCPets/UI/CCPetsUIStyle.m +816 -0
- package/Sources/CCPets/UI/CCPetsUsageChartView.h +15 -0
- package/Sources/CCPets/UI/CCPetsUsageChartView.m +284 -0
- package/Sources/CCPets/UI/CCPetsUsagePage.h +32 -0
- package/Sources/CCPets/UI/CCPetsUsagePage.m +717 -0
- package/Sources/CCPets/UI/CCPetsUsageShared.h +53 -0
- package/Sources/CCPets/UI/CCPetsUsageStore.m +120 -0
- package/Sources/CCPets/UI/CCPetsUsageWidgets.h +30 -0
- package/Sources/CCPets/UI/CCPetsUsageWidgets.m +201 -0
- package/Sources/CCPets/UI/CCPetsWorkbench.h +40 -0
- package/Sources/CCPets/UI/CCPetsWorkbenchPages.h +13 -0
- package/Sources/CCPets/UI/CCPetsWorkbenchPages.m +783 -0
- package/Sources/CCPets/{MenuToggleSwitch.m → UI/MenuToggleSwitch.m} +1 -0
- package/Sources/CCPets/{CCPetsCodexRateLimits.h → Usage/CCPetsCodexRateLimits.h} +1 -0
- package/Sources/CCPets/{CCPetsCodexRateLimits.m → Usage/CCPetsCodexRateLimits.m} +10 -3
- package/Sources/CCPets/{CCPetsQuotaHistory.h → Usage/CCPetsQuotaHistory.h} +3 -0
- package/Sources/CCPets/{CCPetsQuotaHistory.m → Usage/CCPetsQuotaHistory.m} +58 -0
- package/Sources/CCPets/Usage/CCPetsUsage+ClaudeReader.m +436 -0
- package/Sources/CCPets/Usage/CCPetsUsage+CodexReader.m +392 -0
- package/Sources/CCPets/Usage/CCPetsUsage+CodexSessions.m +484 -0
- package/Sources/CCPets/Usage/CCPetsUsage+Internal.h +96 -0
- package/Sources/CCPets/Usage/CCPetsUsage+Models.m +285 -0
- package/Sources/CCPets/Usage/CCPetsUsage+TokenTotals.m +655 -0
- package/Sources/CCPets/Usage/CCPetsUsage.h +57 -0
- package/Sources/CCPets/Usage/CCPetsUsage.m +225 -0
- package/Sources/CCPets/Usage/CCPetsUsageMode.h +10 -0
- package/Sources/CCPets/Usage/CCPetsUsageMode.m +163 -0
- package/Sources/CCPets/{CCPetsUsageMonitor.h → Usage/CCPetsUsageMonitor.h} +3 -0
- package/Sources/CCPets/{CCPetsUsageMonitor.m → Usage/CCPetsUsageMonitor.m} +163 -6
- package/Sources/CCPets/Usage/QuotaDashboardView+Primitives.m +328 -0
- package/Sources/CCPets/Usage/QuotaDashboardView+Private.h +103 -0
- package/Sources/CCPets/Usage/QuotaDashboardView+Rendering.m +616 -0
- package/Sources/CCPets/{QuotaDashboardView.h → Usage/QuotaDashboardView.h} +17 -0
- package/Sources/CCPets/Usage/QuotaDashboardView.m +587 -0
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/THIRD_PARTY_NOTICES.zh-CN.md +1 -1
- package/bin/cc-pets +8 -6
- package/bin/claude-with-pet +10 -2
- package/bin/codex-with-pet +13 -5
- package/package.json +1 -1
- package/scripts/build.sh +7 -3
- package/scripts/i18n.zsh +9 -52
- package/scripts/install-app.sh +4 -0
- package/scripts/install-shell-integration.sh +17 -10
- package/scripts/uninstall-shell-integration.sh +6 -1
- package/Sources/CCPets/CCPetsEvents.h +0 -10
- package/Sources/CCPets/CCPetsUsage.h +0 -36
- package/Sources/CCPets/CCPetsUsage.m +0 -2069
- package/Sources/CCPets/PetView.m +0 -1839
- package/Sources/CCPets/QuotaDashboardView.m +0 -1145
- package/scripts/bridge/cli.mjs +0 -237
- package/scripts/bridge/core.mjs +0 -228
- package/scripts/bridge/hook.mjs +0 -150
- package/scripts/bridge/install.mjs +0 -311
- package/scripts/bridge/mcp-server.mjs +0 -308
- package/scripts/bridge/options.mjs +0 -87
- package/scripts/bridge/process.mjs +0 -151
- package/scripts/bridge/reservations.mjs +0 -248
- package/scripts/bridge/store.mjs +0 -433
- package/scripts/bridge/watch.mjs +0 -69
- package/scripts/check-l10n.mjs +0 -168
- package/scripts/configure-updater.mjs +0 -43
- package/scripts/detect-cli.mjs +0 -68
- package/scripts/doctor.mjs +0 -470
- package/scripts/i18n.mjs +0 -122
- package/scripts/install-claude-hooks.mjs +0 -253
- package/scripts/install-codex-hooks.mjs +0 -78
- package/scripts/integration-markers.mjs +0 -51
- package/scripts/locales/zh-Hans.json +0 -366
- package/scripts/pet-store.mjs +0 -415
- package/scripts/uninstall-integrations.mjs +0 -205
- /package/Sources/CCPets/{CCPetsAppDelegate+Update.m → App/CCPetsAppDelegate+Update.m} +0 -0
- /package/Sources/CCPets/{CCPetsVersion.h → App/CCPetsVersion.h} +0 -0
- /package/Sources/CCPets/{CCPetsVersion.m → App/CCPetsVersion.m} +0 -0
- /package/Sources/CCPets/{CCPetsTerminalFocus.h → Integrations/CCPetsTerminalFocus.h} +0 -0
- /package/Sources/CCPets/{CCPetsImageLoader.h → Pet/CCPetsImageLoader.h} +0 -0
- /package/Sources/CCPets/{CCPetsImageLoader.m → Pet/CCPetsImageLoader.m} +0 -0
- /package/Sources/CCPets/{CCPetsPetSize.h → Pet/CCPetsPetSize.h} +0 -0
- /package/Sources/CCPets/{CCPetsPetSize.m → Pet/CCPetsPetSize.m} +0 -0
- /package/Sources/CCPets/{CCPetsPhrasesEditor.h → Pet/CCPetsPhrasesEditor.h} +0 -0
- /package/Sources/CCPets/{CCPetsPreviews.h → Pet/CCPetsPreviews.h} +0 -0
- /package/Sources/CCPets/{CCPetsPreviews.m → Pet/CCPetsPreviews.m} +0 -0
- /package/Sources/CCPets/Resources/{/351/273/230/350/256/244.webp" → ByteMochi.webp} +0 -0
- /package/Sources/CCPets/{CCPetsCleanup.h → Support/CCPetsCleanup.h} +0 -0
- /package/Sources/CCPets/{CCPetsCleanup.m → Support/CCPetsCleanup.m} +0 -0
- /package/Sources/CCPets/{CCPetsPaths.h → Support/CCPetsPaths.h} +0 -0
- /package/Sources/CCPets/{CCPetsPaths.m → Support/CCPetsPaths.m} +0 -0
- /package/Sources/CCPets/{CCPetsSystemMonitor.h → Support/CCPetsSystemMonitor.h} +0 -0
- /package/Sources/CCPets/{CCPetsSystemMonitor.m → Support/CCPetsSystemMonitor.m} +0 -0
- /package/Sources/CCPets/{CCPetsGlassMenu.h → UI/CCPetsGlassMenu.h} +0 -0
- /package/Sources/CCPets/{CCPetsGlassMenu.m → UI/CCPetsGlassMenu.m} +0 -0
- /package/Sources/CCPets/{MenuChoiceRow.h → UI/MenuChoiceRow.h} +0 -0
- /package/Sources/CCPets/{MenuChoiceRow.m → UI/MenuChoiceRow.m} +0 -0
- /package/Sources/CCPets/{MenuHintView.h → UI/MenuHintView.h} +0 -0
- /package/Sources/CCPets/{MenuHintView.m → UI/MenuHintView.m} +0 -0
- /package/Sources/CCPets/{MenuPetSizeView.h → UI/MenuPetSizeView.h} +0 -0
- /package/Sources/CCPets/{MenuPetSizeView.m → UI/MenuPetSizeView.m} +0 -0
- /package/Sources/CCPets/{MenuToggleSwitch.h → UI/MenuToggleSwitch.h} +0 -0
package/CC_BRIDGE.md
CHANGED
|
@@ -59,7 +59,7 @@ Claude picks up changes immediately; Codex needs a session restart (and re-trust
|
|
|
59
59
|
|
|
60
60
|
Ask in plain language in any session:
|
|
61
61
|
|
|
62
|
-
> List the other agent sessions on this Mac, then tell codex
|
|
62
|
+
> List the other agent sessions on this Mac, then tell codex.my-app.otter that the endpoint is now POST /api/pets.
|
|
63
63
|
|
|
64
64
|
The agent uses these MCP tools:
|
|
65
65
|
|
|
@@ -75,7 +75,10 @@ The agent uses these MCP tools:
|
|
|
75
75
|
|
|
76
76
|
### Session names
|
|
77
77
|
|
|
78
|
-
Default names look like `<
|
|
78
|
+
Default names look like `<account>.<project-directory>.<animal>`, for example `claude.my-app.otter` or
|
|
79
|
+
`claude-x.my-app.panda`. The account part is the name shown on the Multi-Account page (`claude` / `codex` for the
|
|
80
|
+
default accounts), and the animal comes from a list of 100, so online sessions of the same account and project never
|
|
81
|
+
share a name. Names stay within 40 characters; long project directory names are truncated.
|
|
79
82
|
When several terminals share a directory, give them memorable names:
|
|
80
83
|
|
|
81
84
|
```bash
|
package/CC_BRIDGE.zh-CN.md
CHANGED
|
@@ -54,7 +54,7 @@ Claude 侧的改动会被热加载;Codex 侧(审批、hooks)需要重启 C
|
|
|
54
54
|
|
|
55
55
|
在任意一个会话里直接用自然语言:
|
|
56
56
|
|
|
57
|
-
> 列出本机其他 Agent 会话,然后给 codex
|
|
57
|
+
> 列出本机其他 Agent 会话,然后给 codex.my-app.otter 发消息:接口改成了 POST /api/pets,你那边同步一下。
|
|
58
58
|
|
|
59
59
|
Agent 会调用这些 MCP 工具:
|
|
60
60
|
|
|
@@ -70,7 +70,9 @@ Agent 会调用这些 MCP 工具:
|
|
|
70
70
|
|
|
71
71
|
### 会话名
|
|
72
72
|
|
|
73
|
-
默认名字是
|
|
73
|
+
默认名字是 `<账号名>.<项目目录名>.<动物>`,例如 `claude.my-app.otter`、`claude-x.my-app.panda`。账号名取多账号页里的名称
|
|
74
|
+
(默认账号就是 `claude` / `codex`),动物从 100 个萌系动物里挑,同账号同项目的在线会话不会重名。总长度不超过 40 个字符,
|
|
75
|
+
项目目录名过长时会截断。同一目录开多个终端时,
|
|
74
76
|
可以给它们起好记的名字:
|
|
75
77
|
|
|
76
78
|
```bash
|
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,66 @@ truth for the version.
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [2.3.0] - 2026-10-21
|
|
11
|
+
|
|
12
|
+
### Installation
|
|
13
|
+
|
|
14
|
+
- Everything CC Pets runs is now native: hook installation and removal, CC Bridge (hooks, watcher, MCP server and `cc-pets bridge`), `cc-pets doctor` / `paths`, `cc-pets pet` and the zsh scripts' translations. Node.js is only needed by npm to install and update the package, and CC Bridge hooks no longer start a Node process on every event.
|
|
15
|
+
- Rewritten `settings.json` / `hooks.json` keep their original key order and formatting, and numeric literals are preserved exactly (large integers no longer lose precision). Uninstalling no longer reformats a config file that had nothing of ours in it.
|
|
16
|
+
- `cc-pets install` re-registers CC Bridge with the native binary; after upgrading, restart running Codex sessions and trust the updated hooks in `/hooks`.
|
|
17
|
+
|
|
18
|
+
### Multi-Account
|
|
19
|
+
|
|
20
|
+
- Official `~/.claude` and `~/.codex` Homes are detected and integrated automatically, while custom Homes are added explicitly from the Main menu's **Multi-Account** page. Folder names are preserved as account names unless the user renames them.
|
|
21
|
+
- Each provider now has an independent circular quota-card carousel with arrow, page-dot, drag, trackpad and keyboard navigation. Quota history, usage totals, live state and approval state follow the selected account.
|
|
22
|
+
- The Usage page can filter local token history by account and switches to a compact account menu when names or account counts no longer fit in the header.
|
|
23
|
+
- Pet Hooks, usage collection, CC Bridge hooks, permissions and MCP registration are scoped to each Home. Custom Homes added before CC Bridge is enabled are integrated automatically when it is enabled later.
|
|
24
|
+
- Claude and Codex launch wrappers attach the resolved account identity to startup and hook events, so status cards and speech bubbles use the exact account name from the first event.
|
|
25
|
+
- CC Bridge default session names are now `<account>.<project-directory>.<animal>` (for example `claude-x.my-app.otter`), so sessions from different accounts in the same project are easy to tell apart. Already registered sessions keep their names.
|
|
26
|
+
- Claude and Codex accounts now detect API or subscription authentication in the background. Accounts identified as API authentication are fixed to API usage; subscription accounts can still switch between plan quota and API usage. Unknown authentication keeps manual switching available, and missing quota data is not treated as evidence of API authentication. Detection does not retain keys or authentication command output.
|
|
27
|
+
- Account management moved from the **Agent Accounts** submenus (right-click menu and app menu) to a **Multi-Account** page in the Main menu, also reachable from the app menu and `cc-pets open accounts`. It lists Claude and Codex Homes with their paths and integration status (Integrated, Needs repair, Home unavailable); each row's **Manage…** menu offers Repair Integration and Rename, plus Relocate Home and Remove Integration for custom Homes. The status refreshes after account changes, CC Bridge being turned on or off, Diagnostics checks and repairs, and when you return to the app after changing things in a terminal.
|
|
28
|
+
- Usage Display pills in the right-click menu and Settings now apply to each registered account independently, inheriting the previous provider preference until customized. The Settings page updates when accounts are added, removed, renamed or relocated.
|
|
29
|
+
|
|
30
|
+
### Main menu
|
|
31
|
+
|
|
32
|
+
- Added a regular app window. Open it from the right-click menu (**Main menu**), the app menu or `cc-pets open [page]` (pages: `overview`, `sessions`, `usage`, `pet`, `accounts`, `alerts`, `general`, `diagnostics`; `settings` still works and opens Pet). The Dock icon and menu bar appear only while it is open, and clicking the Dock icon brings a minimized window back; the window is created on open and released on close, and nothing runs while it is closed.
|
|
33
|
+
- The sidebar shows the current pet, animated, with its status, then **Workbench** (Overview, Sessions, Usage, Pet, Multi-Account) and **General** (Alerts, Settings); Diagnostics sits at the bottom with a badge when something needs fixing. The window has its own look: a teal accent, cards on a cool neutral background, status colors used only for status, in light and dark.
|
|
34
|
+
- **Overview** page: the pet and what it is doing, today's total usage with input, output, cached input and requests, a notice when diagnostics found problems, and compact cards for every registered Claude / Codex account, independent of the hover panel's carousel selection. Cards use the hover panel's data and refresh with usage and live-state changes. Plan mode shows 5-hour and weekly quota rings, reset times and weekly pace; API mode shows monthly calls and total tokens, with daily call averages and input/output tokens underneath. Cards form a two-column grid with equal heights across API and plan modes.
|
|
35
|
+
- **Sessions** page: Agent sessions online right now, sessions waiting for approval first, each with **Go to Terminal**; and CC Bridge messages waiting in an inbox or recently delivered. Only who sent what to whom is shown, never the message.
|
|
36
|
+
- **Usage** page: local Claude Code and Codex token usage for the last 7, 30 or 90 days. The same five-cell strip as the overview shows total usage (input + cache write + output + cached input), input, output, cached input with its hit rate, and requests for the chosen source and range. The daily chart stacks models in fixed colors (a color-blind-safe palette; models past the eighth fold into "Other") and switches between total, input, output, cached input and requests; click a model in the legend or the table to see only that model, and hover a bar for that day's per-model numbers and total. The columns are normalised so they never overlap (Codex cached tokens are subtracted from its input). Computed on a background queue from local session logs, with its own caches and a per-day archive that outlives Claude Code's transcript pruning. The hover panel's numbers and caches are unchanged. The first time after upgrading, session summaries are re-read once.
|
|
37
|
+
- **Pet**, **Alerts** and **Settings** pages: every pet setting, split into three short pages (Pet holds the pet picker, size, chatter, click reactions and Codex import; Alerts holds notifications, the status card and system status; Settings holds language, panel appearance and the pet sprites folder), plus finer controls such as click-reaction thresholds. All settings go through one preferences layer, so the desktop pet, the menu and the window stay in sync. Options that rewrite Claude Code / Codex configuration (enabling CC Bridge, auto-approve) remain in the right-click menu.
|
|
38
|
+
- The right-click menu is trimmed to the everyday items: Pets, Pet Size, Show Status Card, Usage Display, Panel Theme, CC Bridge, Help, Main menu and Quit. Import Codex Pets, Notifications, Click Reactions, System Status, Chatter and Language moved to the window's Pet, Alerts and Settings pages.
|
|
39
|
+
- In full screen or when zoomed to fill the screen, the sidebar is 10 pt wider, its content moves 5 pt right, and menu items get more room between icon and title (and between Chinese characters). In full screen the pet card no longer sits against the top edge of the screen.
|
|
40
|
+
- Glass dimming is now continuous (0–45%) with a slider on the Settings page; the right-click menu keeps its four presets and checks the closest one. The quota card scrim follows the value smoothly.
|
|
41
|
+
- The Main menu window has its own System Default / Light / Dark appearance setting, with teal control accents; the pet's panels keep their separate appearance preference.
|
|
42
|
+
- **Diagnostics** page: the same checks as `cc-pets doctor`, problems first with their fix commands and copy buttons, passing checks folded into one line, **Re-check** and **Copy Report**. Registered accounts' Hooks and Claude status line issues now offer **Auto-fix** and **Fix All**. Configuration and affected scripts are backed up before changes, with a manifest of original paths and permissions; checks run again automatically after repair, and the page shows backup locations and any failures. Other issues retain their manual commands. The PATH order check is shown as a hint to run `cc-pets doctor` in a terminal, because the pet's own PATH is not the terminal's.
|
|
43
|
+
- Added `cc-pets doctor --repair-profile <profile-id>` to repair a registered account's Hooks and Claude status line without reinstalling the app or changing shell configuration. Plain `cc-pets doctor` remains read-only.
|
|
44
|
+
- Added `cc-pets open [page]`. If the pet is running it asks it to open the window; otherwise it launches the app and opens the window. Terminals launching Claude Code or Codex never pop the window up.
|
|
45
|
+
- `cc-pets doctor` now also finds the npm package directory when run from the installed app, using a `package-dir` marker that `cc-pets install` leaves in the app data directory. Run `cc-pets install` once after upgrading.
|
|
46
|
+
- Behavior changes: ⌘Q in the lines editor now quits the pet (it did nothing before), and unsaved text in the editor is lost; speech bubbles no longer hide when the app loses focus, matching the pet and status card; chatter frequency accepts only `low`, `normal`, `high` and `chatty`, and any other stored value is normalized to `normal` when written (reading behaves as before).
|
|
47
|
+
|
|
48
|
+
### Pets
|
|
49
|
+
|
|
50
|
+
- The built-in pet is now named **ByteMochi** (its file was `默认.webp`). Upgrading keeps it selected and moves its pet-specific lines from `builtin-默认.txt` to `builtin-ByteMochi.txt`; an existing `builtin-ByteMochi.txt` is never overwritten.
|
|
51
|
+
|
|
52
|
+
### Fixes
|
|
53
|
+
|
|
54
|
+
- Fixed clipping in scaled status cards and speech bubbles, including the speech bubble's click bounds.
|
|
55
|
+
- Account-aware terminal focus is preserved, and starting a new session on the same terminal removes stale records left by the previous account instead of leaving a stuck Starting row.
|
|
56
|
+
- CLI messages now fill in placeholders containing underscores; `cc-pets bridge enable` previously printed `{MCP_NAME}` instead of `cc-bridge`.
|
|
57
|
+
- An account without quota data or history no longer falls back to another account's cached data in the hover panel or Overview.
|
|
58
|
+
- On Overview, **Check Diagnostics** now sits after the account name and only appears when that account actually has diagnostic warnings or failures; quota data that hasn't been collected yet no longer triggers it.
|
|
59
|
+
- Repairing, renaming, relocating or removing an account while another account is still being configured now says so, instead of silently doing nothing (Remove previously asked for confirmation and then did nothing).
|
|
60
|
+
- In `cc-pets doctor`, the section shown when no accounts are registered is now titled **Agent profiles** instead of the Main menu page name.
|
|
61
|
+
- Reinstalling or repairing an account now also replaces pet Hooks that point at the executable inside `CC Pets.app` (written when an account was repaired from the app). Previously they were not recognized as ours, so each repair added another copy and every event ran the pet hook several times. `cc-pets doctor` now reports such leftovers as stale; run `cc-pets profile repair --id <profile-id>` (or **Repair Integration** on the Multi-Account page) once to remove them.
|
|
62
|
+
- Adding or relocating an account now validates provider-specific Home files, preventing a Claude Home's `sessions/` directory from being mistaken for a Codex Home and receiving Codex configuration.
|
|
63
|
+
- Monthly token aggregation and its cache now follow each account's effective display mode, so switching an account to API usage refreshes the monthly data instead of reusing a shorter plan-mode window.
|
|
64
|
+
- Usage Display buttons in the right-click menu now align with a shared right margin across account names of different lengths; long names have tooltips, and API accounts' disabled pills have a distinct appearance.
|
|
65
|
+
|
|
66
|
+
### Development
|
|
67
|
+
|
|
68
|
+
- Grouped native sources into module subdirectories and split the larger pet, usage and quota UI implementations. Build and test scripts discover sources and headers recursively; npm packaging checks cover the new layout.
|
|
69
|
+
|
|
10
70
|
## [2.2.1] - 2026-10-11
|
|
11
71
|
|
|
12
72
|
### Pet size and rendering
|
package/CHANGELOG.zh-CN.md
CHANGED
|
@@ -6,6 +6,66 @@
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [2.3.0] - 2026-10-21
|
|
10
|
+
|
|
11
|
+
### 安装
|
|
12
|
+
|
|
13
|
+
- CC Pets 运行时的所有部分都改为原生实现:Hooks 的安装与卸载、CC Bridge(hooks、watcher、MCP server 与 `cc-pets bridge`)、`cc-pets doctor` / `paths`、`cc-pets pet`,以及 zsh 脚本的多语言。Node.js 只剩 npm 安装、升级时需要,CC Bridge 的 hook 也不再每次事件都拉起一个 Node 进程。
|
|
14
|
+
- 回写的 `settings.json` / `hooks.json` 保持原有键顺序与格式,数字按原文保留(大整数不再丢精度);卸载时,里面本来没有我们条目的配置文件不再被重新排版。
|
|
15
|
+
- `cc-pets install` 会用原生程序重新注册 CC Bridge;升级后需重启正在运行的 Codex 会话,并在 `/hooks` 中重新信任更新后的 hooks。
|
|
16
|
+
|
|
17
|
+
### 多账号
|
|
18
|
+
|
|
19
|
+
- 官方 `~/.claude` 和 `~/.codex` Home 会自动发现并集成;自定义 Home 只能从主菜单的「多账号」页手动添加。除非用户主动重命名,否则文件夹名会原样作为账号名称。
|
|
20
|
+
- 每个 Provider 拥有独立的循环额度卡片轮播,支持箭头、页码圆点、拖动、触控板和键盘切换;额度历史、用量汇总、在线状态与审批状态跟随当前账号。
|
|
21
|
+
- 用量页支持按账号筛选本机 Token 历史;账号数量或名称长度超出页头空间时,会自动切换为紧凑的账号下拉菜单。
|
|
22
|
+
- Pet Hooks、用量采集、CC Bridge Hooks、权限与 MCP 注册均按 Home 隔离。先添加自定义 Home、以后再开启 CC Bridge 时,会自动补齐对应集成。
|
|
23
|
+
- Claude 与 Codex 启动包装器会从第一个事件开始携带解析后的账号身份,因此状态卡和气泡会直接显示准确的账号名称。
|
|
24
|
+
- CC Bridge 默认会话名改为 `<账号名>.<项目目录名>.<动物>`(如 `claude-x.my-app.otter`),多个账号开在同一项目里也能一眼分清;已注册的会话保留原名。
|
|
25
|
+
- Claude 和 Codex 账号会在后台识别 API 或订阅认证。明确识别为 API 的账号固定显示 API 用量;订阅账号仍可切换订阅额度与 API 用量。认证类型不明时保留手动切换,缺少额度数据不作为 API 认证的判断依据。检测不保存密钥或认证命令的输出。
|
|
26
|
+
- 账号管理从右键菜单和应用菜单里的「Agent 账户」子菜单移到主菜单新增的「多账号」页,也可从应用菜单或 `cc-pets open accounts` 打开。页面按 Claude / Codex 列出各 Home 的路径和集成状态(已集成、需要修复、Home 不可用);每行的「管理…」菜单提供修复集成、重命名,自定义 Home 另有重新定位 Home 和移除集成。账号变更、开关 CC Bridge、诊断检查与修复之后,以及在终端改动后回到 App 时,状态都会刷新。
|
|
27
|
+
- 右键菜单和「设置」中的用量展示胶囊改为按已登记账号独立设置;尚未单独设置的账号沿用原有平台偏好。新增、移除、重命名或重新定位账号后,设置页会同步更新。
|
|
28
|
+
|
|
29
|
+
### 主菜单
|
|
30
|
+
|
|
31
|
+
- 新增普通 App 窗口。可从右键菜单(**主菜单**)、应用菜单或 `cc-pets open [page]` 打开(页面:`overview`、`sessions`、`usage`、`pet`、`accounts`、`alerts`、`general`、`diagnostics`;旧的 `settings` 仍可用,会打开「宠物」页)。Dock 图标和菜单栏只在窗口打开期间出现,窗口最小化后点 Dock 图标可以恢复;窗口打开时才创建、关闭即释放,关着的时候没有任何后台任务。
|
|
32
|
+
- 侧边栏顶部是会动的当前宠物和它的状态,下面分两组:**工作台**(概览、会话、用量、宠物、多账号)和**通用**(提醒、设置);诊断放在最底下,有问题要处理时带角标。窗口有自己的一套视觉:青色强调色、偏冷的中性底色上的卡片,状态色只用来表达状态,深浅色都适配。
|
|
33
|
+
- **概览**页:宠物和它此刻在做什么,今日总用量和输入、输出、缓存输入、请求数,诊断发现问题时的提醒,以及所有已登记 Claude / Codex 账号的简洁卡片,不再只展示悬停面板轮播中选中的账号。卡片与悬停面板使用同一份数据,用量和在线状态变化时同步刷新。订阅模式展示 5 小时和本周的剩余额度环、重置时间与本周节奏;API 模式展示本月调用和 Token 总量,并补充日均调用及输入/输出 Token。卡片按两列排列,API 与订阅卡片统一高度。
|
|
34
|
+
- **会话**页:此刻在线的 Agent 会话,等审批的置顶,每行可「跳到终端」;以及卡在信箱里待投递、最近送达的 CC Bridge 消息。只显示谁发给了谁,不显示正文。
|
|
35
|
+
- **用量**页:本机 Claude Code / Codex 最近 7、30、90 天的 Token 用量。顶部和概览同一套五格指标:所选来源和区间的总用量(输入 + 缓存写 + 输出 + 缓存输入)、输入、输出、缓存输入(附命中率)和请求数。每日柱状图按模型分色堆叠,颜色固定跟着模型走(色盲安全的色板,第 9 个模型起合并为「其他」),可以切换总用量 / 输入 / 输出 / 缓存输入 / 请求;点图例或表格里的模型只看它,鼠标移到柱子上看当天各模型的数值和合计。四栏统一成互不重叠的口径(Codex 的缓存命中已从它的输入里扣除)。在后台队列计算,数据来自本机会话日志,用自己的缓存和按日归档,Claude Code 清理旧转录后历史仍然保留。悬停面板的数字和缓存不受影响。升级后第一次会把会话摘要重读一遍。
|
|
36
|
+
- **宠物**、**提醒**、**设置**三页:桌宠的全部设置拆成三页(宠物页放选宠物、大小、碎碎念、点击互动和导入 Codex 素材;提醒页放系统通知、桌面状态卡和系统状态;设置页放语言、面板外观和素材目录),另有更细的项(比如连击阈值)。所有设置统一走同一层偏好读写,桌面上的宠物、右键菜单和窗口保持同步。会改写 Claude Code / Codex 配置的选项(启用 CC Bridge、免审批)仍留在右键菜单里。
|
|
37
|
+
- 右键菜单精简为最常用的几项:管理桌宠、宠物大小、显示消息气泡、用量展示模式、面板主题、CC Bridge、帮助、主菜单 和退出桌宠。导入 Codex 素材、系统通知、连击互动、系统状态、碎碎念和语言移到主菜单的宠物、提醒、设置页。
|
|
38
|
+
- 全屏或 zoom 铺满屏幕时,侧边栏加宽 10pt、内容右移 5pt,菜单项的图标与文字、中文字与字之间也更宽松;全屏时名片不再贴着屏幕顶边。
|
|
39
|
+
- 玻璃压暗改为 0–45% 连续可调,在「设置」页用滑块调;右键菜单仍是四档,勾选最接近当前值的一档。额度卡片的衬底跟着平滑变化。
|
|
40
|
+
- 主菜单可独立选择跟随系统、浅色或深色外观,控件统一使用青色强调色;桌宠面板继续使用各自的外观偏好。
|
|
41
|
+
- **诊断**页:和 `cc-pets doctor` 同一套检查,要处理的问题置顶并带修复命令和「复制命令」,正常项折叠成一行,另有「重新检查」和「复制报告」。已登记账号的 Hooks 和 Claude status line 问题新增「自动修复」与「全部修复」:修改前备份配置及相关脚本,通过清单记录原路径和权限,完成后自动重新检查,并在页面显示备份位置和失败原因。其他问题仍保留手动修复命令。PATH 顺序那一项在主菜单里只提示去终端运行 `cc-pets doctor`,因为桌宠进程自己的 PATH 不是终端的。
|
|
42
|
+
- 新增 `cc-pets doctor --repair-profile <profile-id>`,仅修复指定已登记账号的 Hooks 和 Claude status line,无需重装 App 或修改 shell 配置。普通 `cc-pets doctor` 仍保持只读。
|
|
43
|
+
- 新增 `cc-pets open [page]`:桌宠在运行时请它开窗,否则启动 App 并开窗。终端里启动 Claude Code / Codex 不会弹出主菜单。
|
|
44
|
+
- 在安装版 App 里运行时,`cc-pets doctor` 也能找到 npm 包目录了:靠 `cc-pets install` 在应用数据目录里留下的 `package-dir` 记号。升级后请运行一次 `cc-pets install`。
|
|
45
|
+
- 行为变化:台词编辑器在前台时 ⌘Q 现在会退出桌宠(以前没有反应),编辑器里未保存的内容会丢失;说话气泡不再随 App 失焦隐藏,与桌宠、状态卡一致;碎碎念频率只接受 `low` / `normal` / `high` / `chatty`,其他值写入时规整为 `normal`(读取效果不变)。
|
|
46
|
+
|
|
47
|
+
### 宠物
|
|
48
|
+
|
|
49
|
+
- 内置宠物改名为 **ByteMochi**(原文件名 `默认.webp`)。升级后仍保持选中,为它写的专属台词会从 `builtin-默认.txt` 移到 `builtin-ByteMochi.txt`;已存在的 `builtin-ByteMochi.txt` 不会被覆盖。
|
|
50
|
+
|
|
51
|
+
### 修复
|
|
52
|
+
|
|
53
|
+
- 修复宠物缩放后状态卡与说话气泡的裁剪,并同步说话气泡的点击区域。
|
|
54
|
+
- 保持多账号下的终端聚焦;同一终端启动新会话时会清理前一个账号遗留的记录,避免会话列表残留「正在启动」。
|
|
55
|
+
- CLI 文案中带下划线的占位符现在会被正确替换;此前 `cc-pets bridge enable` 输出的是 `{MCP_NAME}` 而不是 `cc-bridge`。
|
|
56
|
+
- 账号没有额度数据或历史时,悬停面板和概览不再借用其他账号的缓存。
|
|
57
|
+
- 概览中的「查看诊断」移至账号名称后,仅在该账号确实有诊断警告或失败项时显示;暂未采集到额度不再触发提示。
|
|
58
|
+
- 另一个账号仍在适配时,对账号执行修复、重命名、重新定位或移除会给出提示,不再静默无反应(此前移除会先弹确认,确认后却什么也不做)。
|
|
59
|
+
- `cc-pets doctor` 中没有已登记账号时的那一节,标题改为「Agent 配置」,不再沿用主菜单的页面名。
|
|
60
|
+
- 重装或修复账号时,指向 `CC Pets.app` 包内程序的宠物 Hooks(从 App 里修复账号时写入)现在也会被一并替换。此前它们不被识别为自家条目,每修复一次就多一份,每个事件都会重复运行好几次宠物 hook。`cc-pets doctor` 现在会把这类残留标为过期;运行一次 `cc-pets profile repair --id <profile-id>`(或在「多账号」页点「修复集成」)即可清掉。
|
|
61
|
+
- 添加或重新定位账号时,按 Provider 专属文件校验 Home,避免因 Claude Home 也有 `sessions/` 目录而将其误认作 Codex Home、写入 Codex 配置。
|
|
62
|
+
- 月度 Token 聚合及缓存改为跟随每个账号实际生效的展示模式;切换到 API 用量后重新汇总月度数据,不再复用订阅模式较短统计区间的数据。
|
|
63
|
+
- 右键菜单的用量展示按钮统一靠右对齐,不再受账号名称长度影响;长名称可悬停查看,API 账号禁用的胶囊按钮使用单独的视觉状态。
|
|
64
|
+
|
|
65
|
+
### 开发
|
|
66
|
+
|
|
67
|
+
- 原生源码按模块拆入子目录,并拆分较大的宠物、用量和额度 UI 实现。构建与测试脚本递归发现源码和头文件,npm 打包检查覆盖新的目录结构。
|
|
68
|
+
|
|
9
69
|
## [2.2.1] - 2026-10-11
|
|
10
70
|
|
|
11
71
|
### 宠物大小与渲染
|
package/CONTRIBUTING.md
CHANGED
|
@@ -21,7 +21,7 @@ Install preview builds explicitly; the automatic updater accepts stable versions
|
|
|
21
21
|
`main` is reserved for stable releases, including the stable GitHub Release and tag.
|
|
22
22
|
Complete implementation, documentation, screenshots, and validation on `publish`
|
|
23
23
|
before submitting to `main`; repeat integration checks there before a stable release.
|
|
24
|
-
The latest stable GitHub release is **v2.
|
|
24
|
+
The latest stable GitHub release is **v2.3.0**, covering the Main menu, multiple accounts, token usage by model, and the native runtime.
|
|
25
25
|
See [release status](docs/release-status.md) for validation and handoff details.
|
|
26
26
|
|
|
27
27
|
## Localization
|
|
@@ -29,14 +29,18 @@ See [release status](docs/release-status.md) for validation and handoff details.
|
|
|
29
29
|
UI text is written in English in the source, and that text is the key into every
|
|
30
30
|
other language's table:
|
|
31
31
|
|
|
32
|
-
- Objective-C: wrap user-visible strings in `L(@"…")` (`Sources/CCPets/CCPetsL10n.h`).
|
|
33
|
-
Use `%1$@` / `%2$@` when a translation needs a different argument order.
|
|
34
|
-
|
|
35
|
-
- zsh: use `cc_pets_t "…" name="$value"` from `scripts/i18n.zsh
|
|
36
|
-
|
|
32
|
+
- Objective-C: wrap user-visible strings in `L(@"…")` (`Sources/CCPets/Support/CCPetsL10n.h`).
|
|
33
|
+
Use `%1$@` / `%2$@` when a translation needs a different argument order. Command-line
|
|
34
|
+
output can instead use `{name}` placeholders filled by `CCPetsInterpolate(L(@"…"), @{…})`.
|
|
35
|
+
- zsh: use `cc_pets_t "…" name="$value"` from `scripts/i18n.zsh`, which looks the text up
|
|
36
|
+
through the native `cc-pets --localize`. The text must be a literal; put variables in
|
|
37
|
+
`{name}` placeholders, never directly in the text.
|
|
38
|
+
|
|
39
|
+
The app, the command-line tools and the zsh scripts share one table per language:
|
|
40
|
+
`Resources/<language>.lproj/Localizable.strings`.
|
|
37
41
|
|
|
38
42
|
When you add or change an English string, update its key in every table.
|
|
39
|
-
`node
|
|
43
|
+
`node tests/check-l10n.mjs` (also part of `npm test`) reports missing, stale and
|
|
40
44
|
mismatched-placeholder entries for each language.
|
|
41
45
|
|
|
42
46
|
### Adding a language
|
|
@@ -50,11 +54,10 @@ Adding a language only adds files; no code changes are needed. For a language `x
|
|
|
50
54
|
heading of that language's section in GitHub release notes; separate alternatives
|
|
51
55
|
with `|`).
|
|
52
56
|
2. `Resources/xx.lproj/InfoPlist.strings`: translate `NSAppleEventsUsageDescription`.
|
|
53
|
-
3. `
|
|
54
|
-
4. Optional: `Resources/phrases.default.xx.txt` with default pet lines, translated from
|
|
57
|
+
3. Optional: `Resources/phrases.default.xx.txt` with default pet lines, translated from
|
|
55
58
|
`phrases.default.en.txt`. Without it the pet falls back to the English lines.
|
|
56
59
|
|
|
57
|
-
`node
|
|
60
|
+
`node tests/check-l10n.mjs --missing xx` lists the keys still to translate. The app
|
|
58
61
|
discovers languages from the `.lproj` directories, `build.sh` writes
|
|
59
62
|
`CFBundleLocalizations` from them, and `package.json` already includes them by pattern.
|
|
60
63
|
|
package/CONTRIBUTING.zh-CN.md
CHANGED
|
@@ -19,20 +19,22 @@ prerelease,并使用如 `2.2.1-rc.1` 的预发布版本号。`main` 仅负责
|
|
|
19
19
|
GitHub Release 和 tag。提交到 `main` 前,代码、文档、截图与验证必须全部完成;
|
|
20
20
|
在 `main` 完成集成验证后才能发布正式版本。
|
|
21
21
|
测试版本需显式安装,自动更新器只接受正式版本号。
|
|
22
|
-
当前 GitHub 正式版本为 **v2.
|
|
22
|
+
当前 GitHub 正式版本为 **v2.3.0**,包含主菜单、多账号、按模型统计 Token 用量与原生运行时。
|
|
23
23
|
验证和交接状态见[发布状态](docs/release-status.md)。
|
|
24
24
|
|
|
25
25
|
## 多语言
|
|
26
26
|
|
|
27
27
|
界面文案在源码里写英文原文,这段原文就是其他各语言表的 key:
|
|
28
28
|
|
|
29
|
-
- Objective-C:用户可见的字符串包在 `L(@"…")` 里(见 `Sources/CCPets/CCPetsL10n.h`)。
|
|
30
|
-
译文需要调换参数顺序时用 `%1$@` / `%2
|
|
31
|
-
|
|
32
|
-
- zsh:用 `scripts/i18n.zsh` 的 `cc_pets_t "…" name="$value"
|
|
33
|
-
|
|
29
|
+
- Objective-C:用户可见的字符串包在 `L(@"…")` 里(见 `Sources/CCPets/Support/CCPetsL10n.h`)。
|
|
30
|
+
译文需要调换参数顺序时用 `%1$@` / `%2$@`;命令行输出也可以写 `{name}` 占位,
|
|
31
|
+
用 `CCPetsInterpolate(L(@"…"), @{…})` 填参数。
|
|
32
|
+
- zsh:用 `scripts/i18n.zsh` 的 `cc_pets_t "…" name="$value"`,查表交给原生的
|
|
33
|
+
`cc-pets --localize`。原文必须是字面量,变量一律写成 `{name}` 占位,不能直接拼进原文。
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
App、命令行工具和 zsh 脚本共用每种语言的一张表:`Resources/<语言>.lproj/Localizable.strings`。
|
|
36
|
+
|
|
37
|
+
新增或修改英文原文时,要同步更新每张表里的 key。`node tests/check-l10n.mjs`(`npm test`
|
|
36
38
|
也会跑)会逐个语言报出缺翻译、多余条目和占位符不一致。
|
|
37
39
|
|
|
38
40
|
### 新增一种语言
|
|
@@ -43,11 +45,10 @@ GitHub Release 和 tag。提交到 `main` 前,代码、文档、截图与验
|
|
|
43
45
|
填好两条元信息:`"Language Name"`(「语言」菜单里显示的名字,用该语言自己的写法)和
|
|
44
46
|
`"Release Notes Section"`(GitHub Release 说明里该语言段落的标题,多种写法用 `|` 隔开)。
|
|
45
47
|
2. `Resources/xx.lproj/InfoPlist.strings`:翻译 `NSAppleEventsUsageDescription`。
|
|
46
|
-
3.
|
|
47
|
-
4. 可选:`Resources/phrases.default.xx.txt`,从 `phrases.default.en.txt` 翻译默认台词;
|
|
48
|
+
3. 可选:`Resources/phrases.default.xx.txt`,从 `phrases.default.en.txt` 翻译默认台词;
|
|
48
49
|
没有的话桌宠退回英文台词。
|
|
49
50
|
|
|
50
|
-
`node
|
|
51
|
+
`node tests/check-l10n.mjs --missing xx` 会列出还没翻译的 key。App 按 `.lproj` 目录发现语言,
|
|
51
52
|
`build.sh` 据此生成 `CFBundleLocalizations`,`package.json` 已按通配符包含这些文件。
|
|
52
53
|
|
|
53
54
|
### GitHub Release 说明
|
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
|
+
<img src="docs/images/cover.png" alt="CC Pets v2.3.0: Main menu, multiple accounts and token usage by model">
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
# CC Pets
|
|
@@ -13,24 +13,24 @@ 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.
|
|
16
|
+
## What's new in v2.3.0
|
|
17
17
|
|
|
18
|
-
- **
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
- **
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
- **Main menu** — open Overview, Sessions, Usage, Pet, Multi-Account, Alerts,
|
|
19
|
+
Settings and Diagnostics from the menu or `cc-pets open`. See live sessions, jump to their
|
|
20
|
+
terminals and manage settings in one place.
|
|
21
|
+
- **Multiple accounts and model usage** — manage Claude / Codex Homes from the
|
|
22
|
+
Multi-Account page, with isolated quota, history and live state. Filter 7-, 30- and 90-day token charts
|
|
23
|
+
by account and model, with per-account quota or API usage display.
|
|
24
|
+
- **Native runtime and diagnostic repairs** — hooks, CC Bridge and CLI tools run
|
|
25
|
+
without Node.js. Repair registered accounts' hooks and Claude status lines
|
|
26
|
+
from Diagnostics, with configuration backups before changes.
|
|
25
27
|
|
|
26
|
-
See the [changelog](./CHANGELOG.md) and [release notes](./docs/release-notes-v2.
|
|
28
|
+
See the [changelog](./CHANGELOG.md) and [release notes](./docs/release-notes-v2.3.0.md) for the full list.
|
|
27
29
|
|
|
28
30
|
## Screenshots
|
|
29
31
|
|
|
30
|
-
English — v2.2.0 quota panel and Language menu:
|
|
31
|
-
|
|
32
32
|
<p align="center">
|
|
33
|
-
<img src="docs/images/liquid-glass-panel.en.png" width="45%" alt="English Agent Usage panel
|
|
33
|
+
<img src="docs/images/liquid-glass-panel.en.png" width="45%" alt="English Agent Usage panel with quota, tokens, trends, and system status">
|
|
34
34
|
<img src="docs/images/liquid-glass-menu.en.png" width="45%" alt="English right-click menu with English selected in the Language submenu">
|
|
35
35
|
</p>
|
|
36
36
|
|
|
@@ -56,12 +56,14 @@ English — v2.2.0 quota panel and Language menu:
|
|
|
56
56
|
override shared sections; default lines use only the editable shared speech file. The
|
|
57
57
|
selection persists across pet changes and restarts, with pet-specific lines selected initially.
|
|
58
58
|
- Includes one original pet and can download compatible assets from PetDex.
|
|
59
|
+
- 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
60
|
- Uses native AppKit with no Electron runtime.
|
|
60
61
|
|
|
61
62
|
## Requirements
|
|
62
63
|
|
|
63
64
|
- macOS 13 or later
|
|
64
|
-
- Node.js 18 or later
|
|
65
|
+
- Node.js 18 or later, for npm only: it installs and updates CC Pets, while the app and
|
|
66
|
+
its `cc-pets` commands, hooks and CC Bridge run natively
|
|
65
67
|
- Codex CLI and/or Claude Code CLI installed and signed in
|
|
66
68
|
- zsh
|
|
67
69
|
- Xcode Command Line Tools (`xcode-select --install`)
|
|
@@ -140,6 +142,21 @@ export CLAUDE_REAL_BIN=/absolute/path/to/claude
|
|
|
140
142
|
The wrappers pass the current terminal environment through unchanged. They do not
|
|
141
143
|
load or execute `.env` files.
|
|
142
144
|
|
|
145
|
+
## Multi-Account
|
|
146
|
+
|
|
147
|
+
CC Pets automatically detects and integrates the official `~/.claude` and
|
|
148
|
+
`~/.codex` Homes. Custom Homes such as `~/.claude-x` or `~/.codex-work` are never
|
|
149
|
+
scanned automatically: add them explicitly from **Main menu → Multi-Account**.
|
|
150
|
+
The folder name is used as the account name by default and is preserved exactly;
|
|
151
|
+
you can rename an account from its Manage menu on the same page. Each provider has its own
|
|
152
|
+
circular quota-card carousel, and the Usage page can filter local token history
|
|
153
|
+
by account.
|
|
154
|
+
|
|
155
|
+
Pet Hooks and usage collection are configured when an account is added. If CC
|
|
156
|
+
Bridge is already enabled, its Hooks, permissions, and MCP registration are also
|
|
157
|
+
configured immediately; otherwise they are added automatically when CC Bridge is
|
|
158
|
+
enabled later.
|
|
159
|
+
|
|
143
160
|
## Commands
|
|
144
161
|
|
|
145
162
|
```bash
|
|
@@ -151,6 +168,7 @@ cc-pets --status # Print parsed Codex quota data.
|
|
|
151
168
|
cc-pets --history # Print local quota history as JSON.
|
|
152
169
|
cc-pets clean # Remove rebuildable state and caches.
|
|
153
170
|
cc-pets doctor # Check the installation and integrations, with fixes.
|
|
171
|
+
cc-pets open [page] # Open the Main menu (pages: overview, sessions, usage, pet, accounts, alerts, general, diagnostics).
|
|
154
172
|
cc-pets paths # List where settings, caches and data are stored.
|
|
155
173
|
|
|
156
174
|
cc-pets pet search otter # Search the configured asset source.
|
|
@@ -199,6 +217,75 @@ printf '%s' '{"schemaVersion":1,"provider":"MyAgent","state":"thinking"}' \
|
|
|
199
217
|
See [Provider protocol](./PROVIDER_PROTOCOL.md). The protocol does not accept
|
|
200
218
|
prompts, command text, file contents, or model output.
|
|
201
219
|
|
|
220
|
+
## Main menu
|
|
221
|
+
|
|
222
|
+
Besides the right-click menu and the hover quota panel, CC Pets has a regular app
|
|
223
|
+
window for your sessions, usage and settings. Open it from the right-click menu
|
|
224
|
+
(**Main menu**), the app menu, or the terminal:
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
cc-pets open # the page you used last
|
|
228
|
+
cc-pets open overview
|
|
229
|
+
cc-pets open sessions
|
|
230
|
+
cc-pets open usage
|
|
231
|
+
cc-pets open accounts
|
|
232
|
+
cc-pets open general # also: pet, accounts, alerts, diagnostics
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
<p align="center">
|
|
236
|
+
<img src="docs/images/main-menu-overview.en.png" width="45%" alt="Main menu Overview page with the pet, today's token usage and quota cards for each account">
|
|
237
|
+
<img src="docs/images/main-menu-usage.en.png" width="45%" alt="Main menu Usage page with a 30-day daily chart stacked by model and a per-model table">
|
|
238
|
+
</p>
|
|
239
|
+
|
|
240
|
+
- **Sidebar** — the current pet, animated, with its status, then two groups: **Workbench**
|
|
241
|
+
(Overview, Sessions, Usage, Pet, Multi-Account) and **General** (Alerts,
|
|
242
|
+
Settings). Diagnostics sits at the bottom with a badge when something needs fixing.
|
|
243
|
+
- **Overview** — the pet and what it is doing, today's total usage with input, output, cached input and requests,
|
|
244
|
+
a notice when diagnostics found problems, and compact account cards using the hover
|
|
245
|
+
panel's data. Plan mode shows 5-hour and weekly quota rings, reset times and weekly pace.
|
|
246
|
+
API mode shows monthly calls and total tokens, with daily call averages and input/output
|
|
247
|
+
tokens underneath. Every registered account has its own card in a two-column grid.
|
|
248
|
+
**Check Diagnostics** sits next to the account name only when that account has a
|
|
249
|
+
diagnostic warning or failure; missing quota data alone does not trigger it.
|
|
250
|
+
Existing Plan/API pills remain available per registered account, inheriting the old
|
|
251
|
+
provider preference until customized. Accounts identified as API authentication are
|
|
252
|
+
fixed to API usage and cannot switch; subscription accounts can still choose either
|
|
253
|
+
display. Unknown authentication keeps manual switching available. Detection runs in the
|
|
254
|
+
background without retaining keys or authentication command output.
|
|
255
|
+
- **Sessions** — the Agent sessions online right now (sessions waiting for
|
|
256
|
+
approval first, each with **Go to Terminal**) and CC Bridge traffic: messages waiting in
|
|
257
|
+
an inbox and recent deliveries. Only who sent what to whom is shown, never the message.
|
|
258
|
+
- **Usage** — local Claude Code and Codex token usage for the last 7, 30 or 90 days. The same
|
|
259
|
+
five numbers as the overview lead the page: total usage (input + cache write + output +
|
|
260
|
+
cached input), input, output, cached input with its hit rate, and requests. The daily bar
|
|
261
|
+
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
|
|
262
|
+
model, and hover a bar for that day's numbers. Everything is counted from local session
|
|
263
|
+
logs; nothing is sent anywhere. A per-day archive keeps history after Claude Code prunes
|
|
264
|
+
old transcripts.
|
|
265
|
+
- **Multi-Account** — add Claude / Codex Homes, view paths and integration status, and manage repairs, names, relocation and removal of custom Home integrations.
|
|
266
|
+
- **Pet / Alerts / Settings** — every pet setting, split into three short pages (Pet:
|
|
267
|
+
picker, size, chatter, click reactions and Codex import; Alerts: notifications, the status
|
|
268
|
+
card and system status; Settings: language, panel appearance and the pet sprites folder), plus finer controls such as the click-reaction thresholds and a
|
|
269
|
+
continuous glass dimming slider (the menu keeps its four presets). Changes apply to the
|
|
270
|
+
desktop pet immediately, and changes made in the menu show up here. Options that rewrite
|
|
271
|
+
Claude Code / Codex configuration (enabling CC Bridge, auto-approve) stay in the
|
|
272
|
+
right-click menu. The right-click menu keeps only the everyday items: Pets, Pet Size,
|
|
273
|
+
Show Status Card, Usage Display, Panel Theme and CC Bridge.
|
|
274
|
+
- **Diagnostics** — the same checks as `cc-pets doctor`, problems first: each with its area,
|
|
275
|
+
the suggested fix command and a copy button. Passing checks fold into one line. The PATH
|
|
276
|
+
order check only points you to `cc-pets doctor` in a terminal, since the pet's own PATH
|
|
277
|
+
isn't your terminal's.
|
|
278
|
+
**Re-check** and **Copy Report** (paths are shown as `~`, so it is safe to paste into an
|
|
279
|
+
issue). Registered accounts' Hooks and Claude status line issues offer **Auto-fix** and
|
|
280
|
+
**Fix All**. Configuration and affected scripts are backed up before changes, then checks
|
|
281
|
+
run again automatically. The page shows backup locations and any failures; each backup's
|
|
282
|
+
`manifest.json` records original paths, permissions and backup files. Other issues retain
|
|
283
|
+
their manual commands. Plain `cc-pets doctor` remains read-only.
|
|
284
|
+
|
|
285
|
+
The window is created when you open it and released when you close it, and nothing runs in
|
|
286
|
+
the background while it is closed. The Dock icon and menu bar appear only while it is open;
|
|
287
|
+
clicking the Dock icon brings a minimized window back.
|
|
288
|
+
|
|
202
289
|
## Pet interaction
|
|
203
290
|
|
|
204
291
|
| Interaction | Response |
|
|
@@ -209,7 +296,7 @@ prompts, command text, file contents, or model output.
|
|
|
209
296
|
| Hover on either body side | Directional interaction animation |
|
|
210
297
|
| Click | Playful response animation |
|
|
211
298
|
| Drag left or right | Directional drag animation |
|
|
212
|
-
| Right-click |
|
|
299
|
+
| Right-click | Pets, size, status card, usage display, panel theme, CC Bridge, Help, open the window, and quit |
|
|
213
300
|
|
|
214
301
|
**Pet Size** in the right-click menu offers a 50%–200% slider with a live percentage
|
|
215
302
|
and **Reset Size** to return to 100%. The pet scales around its feet, and its size
|
|
@@ -228,7 +315,7 @@ look more transparent; higher levels keep text readable over light backgrounds.
|
|
|
228
315
|
|
|
229
316
|
### Language
|
|
230
317
|
|
|
231
|
-
The **Language**
|
|
318
|
+
The **Language** option on the window's **Settings** page offers **System Default** plus every bundled language,
|
|
232
319
|
currently **English** and **简体中文**. System Default follows the first supported
|
|
233
320
|
entry in macOS's preferred languages and falls back to English. Menus and panels switch right away; system
|
|
234
321
|
buttons in dialogs follow after the next launch. The choice is written to
|
|
@@ -240,7 +327,7 @@ language, see [Adding a language](./CONTRIBUTING.md#adding-a-language).
|
|
|
240
327
|
|
|
241
328
|
The pet switcher scans only built-in assets and `~/.cc-pets/pets/`. It does not
|
|
242
329
|
scan `~/.petdex/pets/` or `~/.codex/pets/`. To use assets installed by Codex,
|
|
243
|
-
enable **Import Codex
|
|
330
|
+
enable **Import Codex Pets** on the window's **Pet** page; CC Pets copies valid
|
|
244
331
|
assets into its own directory without overwriting names already present.
|
|
245
332
|
|
|
246
333
|
External assets use their directory name in the menu. The app caches the list and
|
|
@@ -288,8 +375,8 @@ days, and records at most once every 15 minutes.
|
|
|
288
375
|
|
|
289
376
|
## Speech
|
|
290
377
|
|
|
291
|
-
The pet's speech comes from `~/.cc-pets/speech.txt`. Open **
|
|
292
|
-
|
|
378
|
+
The pet's speech comes from `~/.cc-pets/speech.txt`. Open **Chatter → Edit Lines…**
|
|
379
|
+
on the window's **Pet** page to edit, validate, preview, or restore it. Lines are grouped
|
|
293
380
|
under stable situation tags such as `[idle]`, `[done]`, and `[state_thinking]`.
|
|
294
381
|
Each line is limited to 30 characters if it contains Chinese, Japanese, or Korean
|
|
295
382
|
text, and to 40 characters otherwise.
|
|
@@ -299,7 +386,7 @@ Supported live placeholders are `{quota5h}`, `{resetTime}`, `{toolName}`,
|
|
|
299
386
|
is unavailable.
|
|
300
387
|
|
|
301
388
|
Per-pet overrides live at `~/.cc-pets/speech/<pet-name>.txt` (the built-in asset
|
|
302
|
-
uses `builtin
|
|
389
|
+
uses `builtin-ByteMochi.txt`). A missing section falls back to global speech; a present
|
|
303
390
|
section replaces that global section; an empty present section keeps the pet silent
|
|
304
391
|
for that situation.
|
|
305
392
|
|
|
@@ -321,7 +408,7 @@ defaults delete com.universewang.cc-pets CCPetsSpeechCooldown
|
|
|
321
408
|
## Pet assets
|
|
322
409
|
|
|
323
410
|
This project does not operate an asset registry. The repository and npm package
|
|
324
|
-
contain one original built-in asset, ByteMochi (
|
|
411
|
+
contain one original built-in asset, ByteMochi (`ByteMochi.webp`), distributed under the
|
|
325
412
|
MIT License. All other assets are downloaded by the user to
|
|
326
413
|
`~/.cc-pets/pets/<name>/` and are not part of this repository or npm package.
|
|
327
414
|
|
|
@@ -332,7 +419,7 @@ licenses, copyrights, and terms remain with their respective authors and platfor
|
|
|
332
419
|
|
|
333
420
|
```bash
|
|
334
421
|
cc-pets pet search otter
|
|
335
|
-
cc-pets pet add boba
|
|
422
|
+
cc-pets pet add boba otterumells
|
|
336
423
|
cc-pets pet add petdex:boba --as boba-petdex
|
|
337
424
|
cc-pets pet list
|
|
338
425
|
cc-pets pet remove boba
|
|
@@ -347,8 +434,8 @@ consecutive `..` sequences.
|
|
|
347
434
|
|
|
348
435
|
### Importing Codex assets
|
|
349
436
|
|
|
350
|
-
CC Pets never renders directly from `~/.codex/pets/`. Enable **Import Codex
|
|
351
|
-
to copy assets containing `spritesheet.webp` or `spritesheet.png` into
|
|
437
|
+
CC Pets never renders directly from `~/.codex/pets/`. Enable **Import Codex Pets** on the
|
|
438
|
+
window's **Pet** page to copy assets containing `spritesheet.webp` or `spritesheet.png` into
|
|
352
439
|
`~/.cc-pets/pets/`. Existing names are skipped, imports are idempotent, and disabling
|
|
353
440
|
the option does not delete previously copied files.
|
|
354
441
|
|
|
@@ -365,6 +452,8 @@ external assets.
|
|
|
365
452
|
## Privacy
|
|
366
453
|
|
|
367
454
|
- 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.
|
|
455
|
+
- 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.
|
|
456
|
+
- 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
457
|
- Hooks write only redacted state events and quota cache files to the current user's temporary directory.
|
|
369
458
|
- Local quota history is disabled by default and retains seven days when enabled.
|
|
370
459
|
- Status cards and notifications show only provider, state, and redacted tool category.
|