cc-pets 2.2.0 → 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 +85 -0
- package/CHANGELOG.zh-CN.md +85 -0
- package/CONTRIBUTING.md +28 -11
- package/CONTRIBUTING.zh-CN.md +23 -11
- package/README.md +127 -27
- package/README.zh-CN.md +104 -30
- package/Resources/zh-Hans.lproj/Localizable.strings +573 -17
- package/Sources/CCPets/{CCPetsAppDelegate+AgentEvents.m → App/CCPetsAppDelegate+AgentEvents.m} +15 -5
- package/Sources/CCPets/{CCPetsAppDelegate+AgentStatus.m → App/CCPetsAppDelegate+AgentStatus.m} +89 -31
- package/Sources/CCPets/{CCPetsAppDelegate+Bridge.m → App/CCPetsAppDelegate+Bridge.m} +35 -24
- package/Sources/CCPets/{CCPetsAppDelegate+Pets.m → App/CCPetsAppDelegate+Pets.m} +18 -4
- package/Sources/CCPets/{CCPetsAppDelegate+Private.h → App/CCPetsAppDelegate+Private.h} +90 -21
- package/Sources/CCPets/App/CCPetsAppDelegate+Profiles.m +238 -0
- package/Sources/CCPets/{CCPetsAppDelegate+Quota.m → App/CCPetsAppDelegate+Quota.m} +47 -32
- package/Sources/CCPets/App/CCPetsAppDelegate+Settings.m +269 -0
- package/Sources/CCPets/{CCPetsAppDelegate+Speech.m → App/CCPetsAppDelegate+Speech.m} +13 -7
- package/Sources/CCPets/{CCPetsAppDelegate+Update.m → App/CCPetsAppDelegate+Update.m} +71 -47
- package/Sources/CCPets/App/CCPetsAppDelegate+Workbench.m +139 -0
- package/Sources/CCPets/{CCPetsAppDelegate.h → App/CCPetsAppDelegate.h} +16 -2
- package/Sources/CCPets/{CCPetsAppDelegate.m → App/CCPetsAppDelegate.m} +110 -12
- 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/CCPetsImageLoader.h +5 -0
- package/Sources/CCPets/{CCPetsImageLoader.m → Pet/CCPetsImageLoader.m} +10 -2
- package/Sources/CCPets/Pet/CCPetsPetSize.h +10 -0
- package/Sources/CCPets/Pet/CCPetsPetSize.m +21 -0
- package/Sources/CCPets/Pet/CCPetsPetStore.h +12 -0
- package/Sources/CCPets/Pet/CCPetsPetStore.m +476 -0
- package/Sources/CCPets/{CCPetsPhrases.h → Pet/CCPetsPhrases.h} +18 -2
- package/Sources/CCPets/{CCPetsPhrases.m → Pet/CCPetsPhrases.m} +53 -22
- package/Sources/CCPets/{CCPetsPhrasesEditor.m → Pet/CCPetsPhrasesEditor.m} +42 -2
- 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/{MenuChoiceRow.m → UI/MenuChoiceRow.m} +3 -0
- package/Sources/CCPets/UI/MenuPetSizeView.h +5 -0
- package/Sources/CCPets/UI/MenuPetSizeView.m +73 -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/CCPetsAppDelegate+Settings.m +0 -226
- package/Sources/CCPets/CCPetsEvents.h +0 -10
- package/Sources/CCPets/CCPetsImageLoader.h +0 -4
- package/Sources/CCPets/CCPetsUsage.h +0 -36
- package/Sources/CCPets/CCPetsUsage.m +0 -2069
- package/Sources/CCPets/PetView.m +0 -1806
- 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/{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/{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/{MenuHintView.h → UI/MenuHintView.h} +0 -0
- /package/Sources/CCPets/{MenuHintView.m → UI/MenuHintView.m} +0 -0
- /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
|
+
<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,25 +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
|
-
|
|
25
|
-
|
|
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.
|
|
26
27
|
|
|
27
|
-
See the [changelog](./CHANGELOG.md) for the full list.
|
|
28
|
+
See the [changelog](./CHANGELOG.md) and [release notes](./docs/release-notes-v2.3.0.md) for the full list.
|
|
28
29
|
|
|
29
30
|
## Screenshots
|
|
30
31
|
|
|
31
|
-
English — v2.2.0 quota panel and Language menu:
|
|
32
|
-
|
|
33
32
|
<p align="center">
|
|
34
|
-
<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">
|
|
35
34
|
<img src="docs/images/liquid-glass-menu.en.png" width="45%" alt="English right-click menu with English selected in the Language submenu">
|
|
36
35
|
</p>
|
|
37
36
|
|
|
@@ -53,13 +52,18 @@ English — v2.2.0 quota panel and Language menu:
|
|
|
53
52
|
- Supports optional local quota history and macOS notifications.
|
|
54
53
|
- Supports third-party CLI agents through a provider event protocol.
|
|
55
54
|
- Includes editable global and per-pet speech.
|
|
55
|
+
- Offers **Chatter → Line Source → Pet-specific Lines / Default Lines**. Pet-specific lines
|
|
56
|
+
override shared sections; default lines use only the editable shared speech file. The
|
|
57
|
+
selection persists across pet changes and restarts, with pet-specific lines selected initially.
|
|
56
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)).
|
|
57
60
|
- Uses native AppKit with no Electron runtime.
|
|
58
61
|
|
|
59
62
|
## Requirements
|
|
60
63
|
|
|
61
64
|
- macOS 13 or later
|
|
62
|
-
- 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
|
|
63
67
|
- Codex CLI and/or Claude Code CLI installed and signed in
|
|
64
68
|
- zsh
|
|
65
69
|
- Xcode Command Line Tools (`xcode-select --install`)
|
|
@@ -138,6 +142,21 @@ export CLAUDE_REAL_BIN=/absolute/path/to/claude
|
|
|
138
142
|
The wrappers pass the current terminal environment through unchanged. They do not
|
|
139
143
|
load or execute `.env` files.
|
|
140
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
|
+
|
|
141
160
|
## Commands
|
|
142
161
|
|
|
143
162
|
```bash
|
|
@@ -149,6 +168,7 @@ cc-pets --status # Print parsed Codex quota data.
|
|
|
149
168
|
cc-pets --history # Print local quota history as JSON.
|
|
150
169
|
cc-pets clean # Remove rebuildable state and caches.
|
|
151
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).
|
|
152
172
|
cc-pets paths # List where settings, caches and data are stored.
|
|
153
173
|
|
|
154
174
|
cc-pets pet search otter # Search the configured asset source.
|
|
@@ -171,7 +191,10 @@ claude-with-pet # Start the pet and enter Claude Code CLI.
|
|
|
171
191
|
|
|
172
192
|
`package.json` is the single version source. Use `npm version patch`, `minor`, or
|
|
173
193
|
`major` for a future release; npm runs the test suite and the build writes the
|
|
174
|
-
version into the generated app's `Info.plist`.
|
|
194
|
+
version into the generated app's `Info.plist`. Every release also updates both
|
|
195
|
+
READMEs, both changelogs, the cover version, and [release status](./docs/release-status.md).
|
|
196
|
+
Commit the bilingual `docs/release-notes-vX.Y.Z.md` before tagging; follow the
|
|
197
|
+
[Release notes rules](./CONTRIBUTING.md#github-release-notes).
|
|
175
198
|
|
|
176
199
|
## Agent integration
|
|
177
200
|
|
|
@@ -194,6 +217,75 @@ printf '%s' '{"schemaVersion":1,"provider":"MyAgent","state":"thinking"}' \
|
|
|
194
217
|
See [Provider protocol](./PROVIDER_PROTOCOL.md). The protocol does not accept
|
|
195
218
|
prompts, command text, file contents, or model output.
|
|
196
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
|
+
|
|
197
289
|
## Pet interaction
|
|
198
290
|
|
|
199
291
|
| Interaction | Response |
|
|
@@ -204,7 +296,13 @@ prompts, command text, file contents, or model output.
|
|
|
204
296
|
| Hover on either body side | Directional interaction animation |
|
|
205
297
|
| Click | Playful response animation |
|
|
206
298
|
| Drag left or right | Directional drag animation |
|
|
207
|
-
| Right-click |
|
|
299
|
+
| Right-click | Pets, size, status card, usage display, panel theme, CC Bridge, Help, open the window, and quit |
|
|
300
|
+
|
|
301
|
+
**Pet Size** in the right-click menu offers a 50%–200% slider with a live percentage
|
|
302
|
+
and **Reset Size** to return to 100%. The pet scales around its feet, and its size
|
|
303
|
+
persists across pet changes and restarts.
|
|
304
|
+
Hook status cards and speech bubbles shrink with the pet below 100%, including
|
|
305
|
+
their text, icons, and click targets. At 100% and above they keep their original size.
|
|
208
306
|
|
|
209
307
|
The **Panel theme** submenu offers **Classic** and **Liquid Glass**. Classic is the
|
|
210
308
|
default. Changes apply immediately to the quota panel, status card, and speech
|
|
@@ -217,7 +315,7 @@ look more transparent; higher levels keep text readable over light backgrounds.
|
|
|
217
315
|
|
|
218
316
|
### Language
|
|
219
317
|
|
|
220
|
-
The **Language**
|
|
318
|
+
The **Language** option on the window's **Settings** page offers **System Default** plus every bundled language,
|
|
221
319
|
currently **English** and **简体中文**. System Default follows the first supported
|
|
222
320
|
entry in macOS's preferred languages and falls back to English. Menus and panels switch right away; system
|
|
223
321
|
buttons in dialogs follow after the next launch. The choice is written to
|
|
@@ -229,7 +327,7 @@ language, see [Adding a language](./CONTRIBUTING.md#adding-a-language).
|
|
|
229
327
|
|
|
230
328
|
The pet switcher scans only built-in assets and `~/.cc-pets/pets/`. It does not
|
|
231
329
|
scan `~/.petdex/pets/` or `~/.codex/pets/`. To use assets installed by Codex,
|
|
232
|
-
enable **Import Codex
|
|
330
|
+
enable **Import Codex Pets** on the window's **Pet** page; CC Pets copies valid
|
|
233
331
|
assets into its own directory without overwriting names already present.
|
|
234
332
|
|
|
235
333
|
External assets use their directory name in the menu. The app caches the list and
|
|
@@ -277,8 +375,8 @@ days, and records at most once every 15 minutes.
|
|
|
277
375
|
|
|
278
376
|
## Speech
|
|
279
377
|
|
|
280
|
-
The pet's speech comes from `~/.cc-pets/speech.txt`. Open **
|
|
281
|
-
|
|
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
|
|
282
380
|
under stable situation tags such as `[idle]`, `[done]`, and `[state_thinking]`.
|
|
283
381
|
Each line is limited to 30 characters if it contains Chinese, Japanese, or Korean
|
|
284
382
|
text, and to 40 characters otherwise.
|
|
@@ -288,7 +386,7 @@ Supported live placeholders are `{quota5h}`, `{resetTime}`, `{toolName}`,
|
|
|
288
386
|
is unavailable.
|
|
289
387
|
|
|
290
388
|
Per-pet overrides live at `~/.cc-pets/speech/<pet-name>.txt` (the built-in asset
|
|
291
|
-
uses `builtin
|
|
389
|
+
uses `builtin-ByteMochi.txt`). A missing section falls back to global speech; a present
|
|
292
390
|
section replaces that global section; an empty present section keeps the pet silent
|
|
293
391
|
for that situation.
|
|
294
392
|
|
|
@@ -310,7 +408,7 @@ defaults delete com.universewang.cc-pets CCPetsSpeechCooldown
|
|
|
310
408
|
## Pet assets
|
|
311
409
|
|
|
312
410
|
This project does not operate an asset registry. The repository and npm package
|
|
313
|
-
contain one original built-in asset, ByteMochi (
|
|
411
|
+
contain one original built-in asset, ByteMochi (`ByteMochi.webp`), distributed under the
|
|
314
412
|
MIT License. All other assets are downloaded by the user to
|
|
315
413
|
`~/.cc-pets/pets/<name>/` and are not part of this repository or npm package.
|
|
316
414
|
|
|
@@ -321,7 +419,7 @@ licenses, copyrights, and terms remain with their respective authors and platfor
|
|
|
321
419
|
|
|
322
420
|
```bash
|
|
323
421
|
cc-pets pet search otter
|
|
324
|
-
cc-pets pet add boba
|
|
422
|
+
cc-pets pet add boba otterumells
|
|
325
423
|
cc-pets pet add petdex:boba --as boba-petdex
|
|
326
424
|
cc-pets pet list
|
|
327
425
|
cc-pets pet remove boba
|
|
@@ -336,8 +434,8 @@ consecutive `..` sequences.
|
|
|
336
434
|
|
|
337
435
|
### Importing Codex assets
|
|
338
436
|
|
|
339
|
-
CC Pets never renders directly from `~/.codex/pets/`. Enable **Import Codex
|
|
340
|
-
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
|
|
341
439
|
`~/.cc-pets/pets/`. Existing names are skipped, imports are idempotent, and disabling
|
|
342
440
|
the option does not delete previously copied files.
|
|
343
441
|
|
|
@@ -354,11 +452,13 @@ external assets.
|
|
|
354
452
|
## Privacy
|
|
355
453
|
|
|
356
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.
|
|
357
457
|
- Hooks write only redacted state events and quota cache files to the current user's temporary directory.
|
|
358
458
|
- Local quota history is disabled by default and retains seven days when enabled.
|
|
359
459
|
- Status cards and notifications show only provider, state, and redacted tool category.
|
|
360
460
|
- CC Pets contains no telemetry and uploads no conversations, quotas, credentials, or usage statistics.
|
|
361
|
-
- On launch, and when a CLI reopens the running pet, CC Pets asks the npm registry for the latest version (at most once every 10 minutes per run); only when a newer version exists does it read that version's release notes from the GitHub API. These requests carry no account or usage data.
|
|
461
|
+
- On launch, and when a CLI reopens the running pet, CC Pets asks the npm registry for the latest version (at most once every 10 minutes per run); only when a newer version exists does it read that version's committed release notes from the tag through raw.githubusercontent.com, then jsDelivr, with the GitHub Release API as a fallback. These requests carry no account or usage data.
|
|
362
462
|
- Exiting the pet or running `cc-pets uninstall` leaves no background daemon running.
|
|
363
463
|
- [CC Bridge](./CC_BRIDGE.md) is off by default. When enabled, messages between sessions are stored
|
|
364
464
|
in the current user's temporary directory (owner-only, 24-hour expiry); it is the only feature
|
package/README.zh-CN.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:主菜单、多账号与按模型统计 Token 用量">
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
# CC Pets
|
|
@@ -9,21 +9,19 @@
|
|
|
9
9
|
一个不依赖 Codex/Claude 桌面端的 macOS 原生桌宠。直接启动桌面端,或启动 Codex CLI / Claude Code CLI 时自动出现,
|
|
10
10
|
并通过 Codex App Server 官方接口与 Claude Code 官方 status line 数据读取 5 小时额度、周额度和周重置时间。
|
|
11
11
|
|
|
12
|
-
## v2.
|
|
12
|
+
## v2.3.0 新功能
|
|
13
13
|
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
-
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
|
|
14
|
+
- **主菜单**:从菜单或 `cc-pets open` 打开概览、会话、用量、宠物、多账号、提醒、设置和诊断,
|
|
15
|
+
集中查看在线会话、跳转终端和管理桌宠设置。
|
|
16
|
+
- **多账号与模型用量**:在「多账号」页管理 Claude / Codex Home,按账号隔离额度、历史和在线状态;
|
|
17
|
+
查看最近 7、30、90 天的 Token 图表,按账号和模型筛选,独立设置订阅额度或 API 用量展示。
|
|
18
|
+
- **原生运行时与诊断修复**:Hooks、CC Bridge 和 CLI 工具运行时无需 Node.js;
|
|
19
|
+
诊断页可修复已登记账号的 Hooks 和 Claude status line,修改前自动备份配置。
|
|
20
20
|
|
|
21
|
-
完整改动见 [更新记录](./CHANGELOG.zh-CN.md)。
|
|
21
|
+
完整改动见 [更新记录](./CHANGELOG.zh-CN.md) 和 [Release Note](./docs/release-notes-v2.3.0.md)。
|
|
22
22
|
|
|
23
23
|
## 界面预览
|
|
24
24
|
|
|
25
|
-
简体中文:额度面板与右键菜单。
|
|
26
|
-
|
|
27
25
|
<p align="center">
|
|
28
26
|
<img src="docs/images/liquid-glass-panel.png" width="45%" alt="Liquid Glass 主题下的中文额度面板">
|
|
29
27
|
<img src="docs/images/liquid-glass-menu.png" width="45%" alt="中文右键菜单与面板主题子菜单">
|
|
@@ -52,8 +50,51 @@
|
|
|
52
50
|
- 可选记录最近 7 天的本地额度历史,并在额度卡片中显示趋势
|
|
53
51
|
- 可分别启用任务完成、失败、等待审批和响应超时的 macOS 系统通知
|
|
54
52
|
- 内置一个原创素材,更多桌宠可从兼容 PetDex 的素材源按需下载到本机
|
|
53
|
+
- 提供普通的主菜单:概览、会话与 CC Bridge 消息、按模型的 Token 用量、全部设置和内置诊断(见[主菜单](#主菜单))
|
|
55
54
|
- 使用原生 AppKit,运行时不依赖 Electron
|
|
56
55
|
|
|
56
|
+
## 主菜单
|
|
57
|
+
|
|
58
|
+
除了右键菜单和悬停额度面板,CC Pets 还有一个普通的 App 窗口,集中看会话、用量和设置。
|
|
59
|
+
从右键菜单(**主菜单**)、应用菜单或终端都能打开:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
cc-pets open # 上次看的页面
|
|
63
|
+
cc-pets open overview
|
|
64
|
+
cc-pets open sessions
|
|
65
|
+
cc-pets open usage
|
|
66
|
+
cc-pets open accounts
|
|
67
|
+
cc-pets open general # 还有 pet、accounts、alerts、diagnostics
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
<p align="center">
|
|
71
|
+
<img src="docs/images/main-menu-overview.png" width="45%" alt="主菜单概览页:宠物、今日 Token 用量和各账号额度卡片">
|
|
72
|
+
<img src="docs/images/main-menu-usage.png" width="45%" alt="主菜单用量页:按模型堆叠的近 30 天每日用量图和模型明细表">
|
|
73
|
+
</p>
|
|
74
|
+
|
|
75
|
+
- **侧边栏**:顶部是会动的当前宠物和它的状态,下面分两组:**工作台**(概览、会话、用量、宠物、多账号)
|
|
76
|
+
和**通用**(提醒、设置)。诊断放在最底下,有问题要处理时带角标。
|
|
77
|
+
- **概览**:宠物和它此刻在做什么,今日总用量和输入、输出、缓存输入、请求数,诊断发现问题时的提醒,
|
|
78
|
+
以及 Claude / Codex 的简洁账号卡片:订阅模式展示 5 小时和本周的剩余额度环、重置时间与本周节奏;API 模式展示本月调用、Token 总量,并补充日均调用及输入/输出 Token。数据与悬停面板同源。每个已登记账号独立显示一张卡片,两列排列;「查看诊断」位于名称后,仅在该账号确实有诊断问题时出现。暂未采集到额度不视为配置异常。
|
|
79
|
+
- **会话**:此刻在线的 Agent 会话(等审批的置顶,每行可「跳到终端」),以及 CC Bridge 的
|
|
80
|
+
消息往来:卡在信箱里待投递的、最近送达的。仅显示消息交互,无消息正文。
|
|
81
|
+
- **用量**:本机 Claude Code / Codex 最近 7、30、90 天的 Token 用量。顶部和概览同一套五格:总用量
|
|
82
|
+
(输入 + 缓存写 + 输出 + 缓存输入)、输入、输出、缓存输入(附命中率)、请求数。每日柱状图按模型分色堆叠,
|
|
83
|
+
颜色固定跟着模型走,可以在这五项之间切换;点图例或表格里的模型只看它,鼠标移到柱子上看当天各模型的数值。
|
|
84
|
+
数据全部来自本机会话日志,不会发送到任何地方;按日归档让 Claude Code 清理旧转录之后,历史仍然留得住。
|
|
85
|
+
- **多账号**:添加 Claude / Codex Home,查看账号的目录与集成状态,并通过“管理”菜单修复、重命名、重新定位或移除自定义 Home 的集成。
|
|
86
|
+
- **宠物 / 提醒 / 设置**:桌宠的全部设置拆成三页(宠物:选宠物、大小、碎碎念、点击互动、导入 Codex 素材;提醒:系统通知、桌面状态卡和系统状态;
|
|
87
|
+
设置:语言、面板外观和素材目录),另有更细的项(比如连击阈值、可以连续调节的玻璃压暗,菜单里仍是四档)。
|
|
88
|
+
右键菜单只留最常用的几项:管理桌宠、宠物大小、显示消息气泡、用量展示模式、面板主题和 CC Bridge,其余都到这里改。改动会立刻作用到桌面上的宠物,在菜单里改的也会同步显示在这里。
|
|
89
|
+
会改写 Claude Code / Codex 配置的选项(启用 CC Bridge、免审批)仍只在右键菜单里。
|
|
90
|
+
- **诊断**:和 `cc-pets doctor` 同一套检查,要处理的问题置顶,每条带所属模块、修复命令和「复制命令」;
|
|
91
|
+
正常项折叠成一行。还有「重新检查」和「复制报告」(路径显示为 `~`,可以直接贴进 issue)。
|
|
92
|
+
已登记账号的 Hooks 和 Claude status line 问题可点「自动修复」或「全部修复」,修复前备份配置及相关脚本,完成后自动重新检查。备份路径显示在页面上,其中 `manifest.json` 记录原文件路径、权限及备份文件;修复失败时显示原因,其他问题仍需复制命令执行。普通 `cc-pets doctor` 仍然只读。PATH 顺序那一项在这里只提示去终端运行 `cc-pets doctor`:
|
|
93
|
+
桌宠进程自己的 PATH 不是你终端的 PATH。
|
|
94
|
+
|
|
95
|
+
窗口在打开时才创建,关闭即释放,关着的时候没有任何后台任务。Dock 图标和菜单栏只在窗口打开期间出现,
|
|
96
|
+
窗口最小化后点 Dock 图标可以恢复。
|
|
97
|
+
|
|
57
98
|
## 互动方式
|
|
58
99
|
|
|
59
100
|
### Agent 工作状态
|
|
@@ -104,7 +145,12 @@ JetBrains IDE、Warp、WezTerm、Ghostty 等在不安装扩展的模式下仅激
|
|
|
104
145
|
| 按住并向右拖动 | 播放向右拖行动画,同时移动桌宠 |
|
|
105
146
|
| 按住并向左拖动 | 播放向左拖行动画,同时移动桌宠 |
|
|
106
147
|
| 鼠标移开或拖动结束 | 恢复默认待机动画 |
|
|
107
|
-
| 右键桌宠 |
|
|
148
|
+
| 右键桌宠 | 切换桌宠、调大小、消息气泡、用量展示模式、面板主题、CC Bridge、「帮助」、打开主菜单、退出 |
|
|
149
|
+
|
|
150
|
+
右键菜单「宠物大小」提供 50%~200% 的滑动条,拖动时实时缩放并显示百分比,
|
|
151
|
+
点击「恢复默认」回到 100%。大小会自动保存,切换桌宠或重启后保留;缩放时脚底位置固定。
|
|
152
|
+
Hook 状态卡和消息气泡在宠物小于 100% 时同比例缩小,文字、图标和点击区域一起缩放;
|
|
153
|
+
宠物放大到 100% 以上时,状态卡与气泡保持原尺寸。
|
|
108
154
|
|
|
109
155
|
右键菜单「面板主题」提供「经典」和「Liquid Glass」,默认使用经典样式。
|
|
110
156
|
选择后立即应用于额度面板、状态条和说话气泡,并在重启后保留。Liquid Glass 使用系统原生玻璃,
|
|
@@ -114,16 +160,16 @@ JetBrains IDE、Warp、WezTerm、Ghostty 等在不安装扩展的模式下仅激
|
|
|
114
160
|
|
|
115
161
|
### 界面语言
|
|
116
162
|
|
|
117
|
-
|
|
163
|
+
主菜单「设置」页的「语言」提供「跟随系统」和所有已打包的语言,目前是「English」「简体中文」。
|
|
118
164
|
跟随系统时,取 macOS 首选语言里第一个支持的语言,都不支持就用英文。菜单和面板立即切换;对话框里的系统按钮在下次启动后跟上。
|
|
119
165
|
选择会写入 `~/.cc-pets/language`,`cc-pets` 命令、hooks 和 CC Bridge 消息因此使用同一种语言;
|
|
120
166
|
单次命令可以用 `CC_PETS_LANGUAGE=en` 或 `zh-Hans` 覆盖。如果从没改过 `~/.cc-pets/speech.txt`,
|
|
121
167
|
它会换成新语言的默认台词;改过的台词保持不动。想贡献其他语言的翻译,
|
|
122
168
|
见 [新增一种语言](./CONTRIBUTING.zh-CN.md#新增一种语言)。
|
|
123
169
|
|
|
124
|
-
|
|
170
|
+
右键菜单中的「管理桌宠」只扫描 `~/.cc-pets/pets/`(见 [素材管理](#素材管理))和包内素材,
|
|
125
171
|
**不会**去读 `~/.petdex/pets/` 和 `~/.codex/pets/`——那两个目录由 PetDex CLI 和 Codex 写入,
|
|
126
|
-
混在一起就找不到自己装的宠物了。要用 Codex
|
|
172
|
+
混在一起就找不到自己装的宠物了。要用 Codex 那边的素材,打开主菜单「宠物」页的“导入 Codex
|
|
127
173
|
素材”开关,它们会被复制进你自己的目录(见 [导入 Codex 素材](#导入-codex-素材))。
|
|
128
174
|
|
|
129
175
|
外部桌宠使用目录名作为菜单名称,内置桌宠使用素材文件名(不显示扩展名)。选择后立即
|
|
@@ -156,7 +202,7 @@ Agent 状态动画会优先播放。
|
|
|
156
202
|
|
|
157
203
|
右键菜单中的“记录本地额度历史”默认关闭。启用后只在本机
|
|
158
204
|
`~/Library/Application Support/CC Pets/quota-history.json` 保存最近 7 天的数据,
|
|
159
|
-
每 15
|
|
205
|
+
每 15 分钟最多记录一次。系统通知也默认关闭,可在主菜单「提醒」页分别启用任务完成、
|
|
160
206
|
任务失败、等待审批和响应超时通知。最后一项在 Agent 停在等待审批超过 2 分钟、
|
|
161
207
|
或停在思考态超过 5 分钟时提醒一次;该会话有新事件后重新武装,下次卡住会再提醒。
|
|
162
208
|
|
|
@@ -169,7 +215,12 @@ Provider、脱敏状态和通用说明,不提供消息输入,也不会显示
|
|
|
169
215
|
## 碎碎念
|
|
170
216
|
|
|
171
217
|
桌宠会以自己的口吻讲话:Agent 干活时讲的话直接写在状态卡副行上,闲着的时候单独冒气泡。
|
|
172
|
-
|
|
218
|
+
主菜单「宠物」页的「碎碎念」里可以整体开关、调频率、选择台词来源、改台词。
|
|
219
|
+
|
|
220
|
+
「台词来源」里可单选 **专属台词** 或 **默认台词**:专属台词优先使用当前宠物的
|
|
221
|
+
词库,缺少的小节沿用通用词库;默认台词只使用 `~/.cc-pets/speech.txt` 中的通用台词,
|
|
222
|
+
包括你对这份词库的修改。初始选择为专属台词,保持原有行为;选择全局生效,切换宠物和
|
|
223
|
+
重启后仍保留,不会覆盖任何台词文件。
|
|
173
224
|
|
|
174
225
|
### 频率
|
|
175
226
|
|
|
@@ -188,7 +239,7 @@ Agent **正在干活**时(思考、调用工具、等待审批、子 Agent 工
|
|
|
188
239
|
|
|
189
240
|
### 编辑台词
|
|
190
241
|
|
|
191
|
-
|
|
242
|
+
主菜单「宠物」页「碎碎念」里的「编辑台词…」打开内置编辑器。桌宠说的**所有**话都在
|
|
192
243
|
`~/.cc-pets/speech.txt` 里,代码里没有第二份词库——首次启动时从 app 内的默认词库
|
|
193
244
|
拷一份出来,之后就只认这个文件。
|
|
194
245
|
|
|
@@ -222,7 +273,7 @@ Agent **正在干活**时(思考、调用工具、等待审批、子 Agent 工
|
|
|
222
273
|
|
|
223
274
|
上面那份 `speech.txt` 是**所有**宠物的通用台词。想让某一只换个口吻,编辑器顶部有一个
|
|
224
275
|
「**通用** / **当前宠物 · ×××**」的切换——切到右边,写的就只属于当前这只宠物,
|
|
225
|
-
存在 `~/.cc-pets/speech/<宠物名>.txt`(内置素材是 `builtin
|
|
276
|
+
存在 `~/.cc-pets/speech/<宠物名>.txt`(内置素材是 `builtin-ByteMochi.txt`)。
|
|
226
277
|
|
|
227
278
|
这一页**初次打开是空白的,这是正常的**:空白 = 这只宠物全部沿用通用台词。
|
|
228
279
|
不知道能写什么就点右上角 **填入默认模板**,它会把整份默认台词以**注释状态**填进来
|
|
@@ -232,10 +283,10 @@ Agent **正在干活**时(思考、调用工具、等待审批、子 Agent 工
|
|
|
232
283
|
手写的话,**只写想改的小节**就行:
|
|
233
284
|
|
|
234
285
|
```
|
|
235
|
-
# ~/.cc-pets/speech/external
|
|
286
|
+
# ~/.cc-pets/speech/external-团子.txt
|
|
236
287
|
[idle]
|
|
237
|
-
|
|
238
|
-
|
|
288
|
+
想吃糯米团…
|
|
289
|
+
兜里好像有点东西。
|
|
239
290
|
|
|
240
291
|
[done]
|
|
241
292
|
诺,任意门给你。
|
|
@@ -303,7 +354,8 @@ defaults delete com.universewang.cc-pets CCPetsSpeechCooldown # 交
|
|
|
303
354
|
## 系统要求
|
|
304
355
|
|
|
305
356
|
- macOS 13 或更高版本
|
|
306
|
-
- Node.js 18
|
|
357
|
+
- Node.js 18 或更高版本,仅供 npm 安装与升级使用;桌宠本身以及 `cc-pets` 命令、Hooks、
|
|
358
|
+
CC Bridge 都是原生程序,运行时不依赖 Node
|
|
307
359
|
- 已安装并登录 Codex CLI 和/或 Claude Code CLI
|
|
308
360
|
- zsh
|
|
309
361
|
- Xcode Command Line Tools,可通过 `xcode-select --install` 安装
|
|
@@ -364,6 +416,17 @@ npm 的安装后脚本会自动构建原生应用、安装两套 Agent Hooks,
|
|
|
364
416
|
`codex` 与 `claude` 软链,再向 `~/.zshrc` 追加带明确标记的一行把该目录前置到 `PATH`,不会覆盖真实的 CLI 二进制。
|
|
365
417
|
用 shim 而不是 alias,是因为 alias 名区分大小写而 macOS 文件系统默认不区分:`Claude`、`CODEX` 这类写法
|
|
366
418
|
匹配不到 alias,会直接命中真二进制,桌宠不会被拉起。shim 让任意大小写写法都落到同一个文件上。
|
|
419
|
+
|
|
420
|
+
### 多账号
|
|
421
|
+
|
|
422
|
+
CC Pets 会自动发现并集成官方 `~/.claude` 和 `~/.codex` Home。`~/.claude-x`、
|
|
423
|
+
`~/.codex-work` 等自定义 Home 不会被自动扫描,必须从「主菜单 → 多账号」(位于“宠物”下方)手动添加。
|
|
424
|
+
默认使用文件夹名作为账号名称并保持原样,也可以在该页的“管理”菜单中重命名。每个 Provider
|
|
425
|
+
拥有独立的循环额度卡片,用量页也可以按账号筛选本机会话 Token 历史。
|
|
426
|
+
|
|
427
|
+
添加账号时会配置 Pet Hooks 和用量采集。若 CC Bridge 已开启,会同时配置它的 Hooks、
|
|
428
|
+
权限与 MCP;若尚未开启,之后启用 CC Bridge 时会自动为所有已登记账号补齐。
|
|
429
|
+
|
|
367
430
|
首次安装需要新开终端让 `PATH` 生效;以后升级只需执行 npm 命令。
|
|
368
431
|
同时会将标准 macOS 应用安装到 `~/Applications/CC Pets.app`,可从 Finder 或 Launchpad 启动,
|
|
369
432
|
不需要管理员权限。npm 升级时会同步更新该应用。
|
|
@@ -418,6 +481,9 @@ cc-pets clean
|
|
|
418
481
|
# 检查安装、Hooks、status line、shim 与 CC Bridge 是否正常,并给出修复建议;输出已脱敏,可直接贴进 issue
|
|
419
482
|
cc-pets doctor
|
|
420
483
|
|
|
484
|
+
# 打开主菜单并定位到页面(overview / sessions / usage / pet / accounts / alerts / general / diagnostics,省略则打开上次看的页面)
|
|
485
|
+
cc-pets open [page]
|
|
486
|
+
|
|
421
487
|
# 列出偏好、桌宠素材、台词、缓存与运行时状态的存放位置和大小(--json 输出机器可读格式)
|
|
422
488
|
cc-pets paths
|
|
423
489
|
|
|
@@ -459,7 +525,10 @@ claude-with-pet
|
|
|
459
525
|
|
|
460
526
|
项目版本以 `package.json` 为唯一来源。发布新版本时执行 `npm version patch`、
|
|
461
527
|
`npm version minor` 或 `npm version major`;npm 会自动运行完整测试,构建过程会将新版本写入
|
|
462
|
-
生成的 App `Info.plist`,无需手动修改 `Resources/Info.plist
|
|
528
|
+
生成的 App `Info.plist`,无需手动修改 `Resources/Info.plist`。每次发版同时更新双语 README、
|
|
529
|
+
双语 CHANGELOG、封面版本文字与[发布状态](./docs/release-status.md)。双语正文
|
|
530
|
+
`docs/release-notes-vX.Y.Z.md` 须先提交再打 tag,遵循
|
|
531
|
+
[Release Note 规则](./CONTRIBUTING.zh-CN.md#github-release-说明)。
|
|
463
532
|
|
|
464
533
|
## 用量数据
|
|
465
534
|
|
|
@@ -514,7 +583,10 @@ Codex 侧同理:桌宠固定只统计 `~/.codex`,不读继承来的 `CODEX_H
|
|
|
514
583
|
自然日窗口(今日 = 本机零点至今,最近 7 天 = 含今天在内的 7 个自然日),因为两家的
|
|
515
584
|
`resets_at` 并不一致,按各自订阅窗口算出的数不在同一区间上,相加没有意义。每个 Agent 卡片按 5 小时和 7 天两列
|
|
516
585
|
展示官方剩余百分比(主值)、本机 Token 用量和重置时间,右侧是近 7 天额度趋势。右键菜单的
|
|
517
|
-
|
|
586
|
+
“用量展示模式”保留原有切换控件,按已登记账号分别设置,旧的平台设置作为未单独设置账号的默认值。
|
|
587
|
+
明确识别为 API 认证时,固定显示 API 用量并禁用切换;订阅认证仍可在“订阅额度”和“API 用量”之间切换。
|
|
588
|
+
认证类型不明时保留手动切换;缺少额度数据不会被当作 API 认证的证据。认证类型在后台刷新,不记录密钥或 CLI 认证输出。
|
|
589
|
+
API 用量模式只替换对应
|
|
518
590
|
卡片内部,展示本月调用次数、本月输入/输出 Token、较上月同期变化和本月按日 Token 趋势。
|
|
519
591
|
“调用次数”来自本机会话记录:Claude 按请求标识去重,Codex 按去重后的累计 Token 快照计数。
|
|
520
592
|
某个窗口
|
|
@@ -543,7 +615,7 @@ Codex 侧同理:桌宠固定只统计 `~/.codex`,不读继承来的 `CODEX_H
|
|
|
543
615
|
|
|
544
616
|
## 素材与版权
|
|
545
617
|
|
|
546
|
-
**本项目不自建素材仓库。** 仓库和 npm 包里只有一个内置素材
|
|
618
|
+
**本项目不自建素材仓库。** 仓库和 npm 包里只有一个内置素材 `ByteMochi.webp`(原创角色
|
|
547
619
|
ByteMochi,随代码按 MIT License 分发)。其余桌宠素材一律**由用户自己从素材源按需下载**
|
|
548
620
|
到本机 `~/.cc-pets/pets/`,既不进仓库,也不进 npm 发布包。
|
|
549
621
|
|
|
@@ -568,7 +640,7 @@ v2(`1536×2288`、`8×11`),单元格均为 `192×208`,前九行遵循相
|
|
|
568
640
|
```bash
|
|
569
641
|
cc-pets pet search otter # 搜索可用素材(不带关键词就列全部)
|
|
570
642
|
cc-pets pet add boba # 下载到 ~/.cc-pets/pets/boba/
|
|
571
|
-
cc-pets pet add boba
|
|
643
|
+
cc-pets pet add boba otterumells # 一次装多个
|
|
572
644
|
cc-pets pet list # 列出已安装的素材,按来源分组
|
|
573
645
|
cc-pets pet remove boba # 删除
|
|
574
646
|
cc-pets pet source # 列出可用的素材源
|
|
@@ -586,7 +658,7 @@ cc-pets pet search petdex:otter
|
|
|
586
658
|
```
|
|
587
659
|
|
|
588
660
|
一个源的完整定义就是清单地址、资源 host 白名单和 Referer 三项,集中在
|
|
589
|
-
`
|
|
661
|
+
`Sources/CCPets/Pet/CCPetsPetStore.m` 的 `Sources()` 表里。以后接自建 registry 时在表里加一行即可,
|
|
590
662
|
命令、目录结构和桌宠端都不用改。默认源用 `CC_PETS_SOURCE` 切换。
|
|
591
663
|
|
|
592
664
|
来源记录在宠物目录内的 `.source.json`(`{ "source", "slug", "installedAt" }`),下载来的
|
|
@@ -607,7 +679,7 @@ cc-pets pet add boba --as 波霸
|
|
|
607
679
|
|
|
608
680
|
#### 导入 Codex 素材
|
|
609
681
|
|
|
610
|
-
桌宠不读 `~/.codex/pets/`。如果你在 Codex
|
|
682
|
+
桌宠不读 `~/.codex/pets/`。如果你在 Codex 桌面端已经装了一批素材,打开主菜单「宠物」页的
|
|
611
683
|
**“导入 Codex 素材”** 开关,桌宠会把那里的素材**复制**进 `~/.cc-pets/pets/`:开关打开的
|
|
612
684
|
当下导入一次,之后每次启动再导入一次。
|
|
613
685
|
|
|
@@ -641,11 +713,13 @@ PetDex 官方 CLI(`npx petdex install <slug>`)会把素材放在 `~/.petdex/
|
|
|
641
713
|
|
|
642
714
|
- Codex 额度通过本机 Codex CLI 启动的官方 App Server 读取,沿用 Codex CLI 自身的登录状态;Codex Token 只从本机 `~/.codex/sessions` 读取(可用 `CC_PETS_CODEX_HOME` 覆盖)。
|
|
643
715
|
- Claude 额度只从 Claude Code 传给本机 status line 的 `rate_limits` 字段读取。
|
|
716
|
+
- 为区分 API 账号和订阅账号,CC Pets 会读取各已登记 Home 中的认证配置(Claude 的 `settings.json`;Codex 的 `auth.json` 和 `config.toml`),并可能在本机运行该 Home 的 `claude auth status` / `codex login status`。只在内存中保留识别出的模式,不保存密钥、邮箱或命令输出。
|
|
717
|
+
- 诊断页修复前,会把受影响的配置文件和脚本备份到 `~/Library/Application Support/CC Pets/diagnostic-backups/`(仅本人可读),备份只保存在本机。
|
|
644
718
|
- Agent Hooks 只向当前用户的临时目录写入桌宠事件和额度缓存。
|
|
645
719
|
- 额度历史默认关闭;启用后只在本机保留最近 7 天的剩余比例快照。
|
|
646
720
|
- 状态气泡和通知只显示 Provider、状态及脱敏工具类别,不显示会话正文。
|
|
647
721
|
- 项目不上传会话内容、额度、凭据或使用统计,也不包含遥测服务。
|
|
648
|
-
- 桌宠启动时及 CLI 再次唤起桌宠时会向 npm Registry 查询最新版本号(同一次运行内最多每 10
|
|
722
|
+
- 桌宠启动时及 CLI 再次唤起桌宠时会向 npm Registry 查询最新版本号(同一次运行内最多每 10 分钟一次);仅在有新版本时再读取该版本 tag 中已提交的 Release Note,依次尝试 raw.githubusercontent.com、jsDelivr,最后回退到 GitHub Release API。请求不携带任何账号或使用数据。
|
|
649
723
|
- 右键“退出桌宠”或执行 `cc-pets uninstall` 后,不会继续运行后台守护进程。
|
|
650
724
|
- [CC Bridge](./CC_BRIDGE.zh-CN.md) 默认关闭;开启后,会话之间的消息正文会保存在当前用户的临时目录
|
|
651
725
|
(仅本人可读,24 小时过期),这是本项目唯一会保存正文的功能。
|