@promptctl/cc-candybar 1.223.0 → 1.225.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/README.md CHANGED
@@ -43,13 +43,13 @@ Restart Claude Code. The statusline appears with the bundled default layout —
43
43
  Drop a `.cc-candybar.json5` (or `.cc-candybar.json` — both extensions are accepted) at any of these locations:
44
44
 
45
45
  1. `$CC_CANDYBAR_CONFIG` in the statusline command's environment (`~` is expanded, and a relative path is relative to the directory Claude Code runs the statusline in). It is read by the client on every render and carried to the daemon, so it can differ per session. A path that names no file renders the bundled default under a `Config file not found` warning, and one the daemon cannot stat (behind an unsearchable directory, say) under `Config file could not be read` with the error — either way the bar stays live and loads the file once it can.
46
- 2. `<project>/.cc-candybar.json5` (then `.json` at the same location)
47
- 3. `<cwd>/.cc-candybar.json5` (then `.json`)
46
+ 2. `<project>/.cc-candybar.local.json5` (then `.json`): your own settings for this project, which version control never sees
47
+ 3. `<project>/.cc-candybar.json5` (then `.json` at the same location)
48
48
  4. `$XDG_CONFIG_HOME/cc-candybar/config.json5` (then `.json`; defaults to `~/.config/cc-candybar/config.json5`)
49
49
 
50
- Without `$CC_CANDYBAR_CONFIG`, every file found is a layer: your user file merges over the bundled default, the cwd's over that, and the project's on top. So a project file declares only what that project adds or changes — a segment placed in a row, a plugin listed — and keeps the rest of your own config. `$CC_CANDYBAR_CONFIG` names the one file the session loads, and the others are not read. A change made from the bar (a theme picked and saved, a segment added in edit mode) is written to your user file, never to a project's; when a project file sets the same value, the click is refused and names that file.
50
+ Without `$CC_CANDYBAR_CONFIG`, every file found is a layer: your user file merges over the bundled default, the project's over that, and the project's local file on top. So a project file declares only what that project adds or changes — a segment placed in a row, a plugin listed — and keeps the rest of your own config. `$CC_CANDYBAR_CONFIG` names the one file the session loads, and the others are not read. A change made from the bar (a theme picked and saved, a segment added in edit mode) is written to the layer its action names: your user file, the project's file to share it with everyone who clones the project, or the project's local file to keep it to yourself there, which the bar adds to the repository's `info/exclude` so git never sees it. The bundled save offers each layer the session can write; when a layer above sets the same value, the click is refused and names that file.
51
51
 
52
- A project or cwd file, and a repository's own plugins (`.cc-candybar/plugins/`), come from somebody's repository, and a config can run commands. So the first time a session works in a directory holding one, the bar asks — `a cc-candybar config for <dir> — run it? [approve] [decline]` — and until you answer, it draws your own config and runs nothing from that directory. The answer is kept per directory of the repository and covers that directory in every linked worktree `git worktree add` made from its checkout, so a new worktree never asks again. (A checkout whose `.git` is kept elsewhere, such as a submodule, answers apart from its worktrees.) It is kept in `$XDG_STATE_HOME/cc-candybar/repo-configs/repo-configs.json` (default `~/.local/state/cc-candybar/`) and holds across later edits of the files, as Claude Code's answer for a project's MCP servers does. Remove a directory's entry there to be asked again. `cc-candybar check` names a directory still awaiting an answer and runs nothing from it.
52
+ A project's file, its local file, and a repository's own plugins (`.cc-candybar/plugins/`), come from somebody's repository, and a config can run commands. So the first time a session works in a directory holding one, the bar asks — `a cc-candybar config for <dir> — run it? [approve] [decline]` — and until you answer, it draws your own config and runs nothing from that directory. The answer is kept per directory of the repository and covers that directory in every linked worktree `git worktree add` made from its checkout, so a new worktree never asks again. (A checkout whose `.git` is kept elsewhere, such as a submodule, answers apart from its worktrees.) It is kept in `$XDG_STATE_HOME/cc-candybar/repo-configs/repo-configs.json` (default `~/.local/state/cc-candybar/`) and holds across later edits of the files, as Claude Code's answer for a project's MCP servers does. Remove a directory's entry there to be asked again. `cc-candybar check` names a directory still awaiting an answer and runs nothing from it.
53
53
 
54
54
  JSON is a strict subset of JSON5, so the same parser handles both — `.json5` is the documented format (supports inline comments, trailing commas, unquoted keys), `.json` is the legacy/compat extension. When both exist at the same location, `.json5` wins and the bar shows a persistent warning so you can remove the shadowed duplicate.
55
55
 
@@ -91,7 +91,7 @@ Saving the file triggers a hot-reload of every active session.
91
91
 
92
92
  - **Daemon** (`src/daemon/`) — long-lived background process. One per user. Caches git state via filesystem watchers, usage data, and per-session key/value state. Runs until it exits on a memory backstop — on what the platform charges the process: `phys_footprint` on macOS, RSS on Linux (default 1024 MB via `CC_CANDYBAR_RSS_LIMIT_MB`; the V8 heap cap the spawner passes is twice that, a margin wide enough that the graceful backstop fires first under any growth its 60 s poll can see) or the host restarts; there is no idle or age timeout.
93
93
  - **Client** (`rust-client/src/main.rs`) — the Rust binary installed as `bin/cc-candybar`, and the only thing on the per-render path: it connects to the daemon, sends the hook JSON, and prints the ANSI response. On a daemon miss it spawns one detached and prints an empty line, so the next refresh finds a warm daemon. Every subcommand (`install`, `daemon`, `check`, `doctor`, …) execs the Node bundle at `dist/index.mjs`, which carries a socket relay of its own (`src/daemon/client.ts`) as the fallback when no native binary is staged.
94
- - **Renderer** (`src/dsl/render.ts`) — `drawDsl` is the single render path; the daemon, the demo and the tests all call it. It walks the config's layout tree, evaluates each segment's templates against the daemon's payload, and hands the styled cells to `src/render/` (strip and joiner selection, pickers and menus, the diagnostics viewer). The payload's data comes from the providers in `src/segments/` — git, session, context, metrics, tmux, pricing.
94
+ - **Renderer** (`src/dsl/render.ts`) — `drawDsl` is the single render path; the daemon, `check` and the tests all call it. It walks the config's layout tree, evaluates each segment's templates against the daemon's payload, and hands the styled cells to `src/render/` (strip and joiner selection, pickers and menus, the diagnostics viewer). The payload's data comes from the providers in `src/segments/` — git, session, context, metrics, tmux, pricing.
95
95
  - **Themes** (`src/themes/`) — palette construction plus name policy (which theme, style, variation, endcaps and colour depth names resolve to what). The colour arithmetic itself — blending, contrast, OKLCH transposition — lives in the separate `rich-js` package; this repo does none of it.
96
96
 
97
97
  ## Segments