@promptctl/cc-candybar 1.159.0 → 1.160.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +2 -0
  2. package/dist/index.mjs +121 -121
  3. package/package.json +6 -5
package/README.md CHANGED
@@ -49,6 +49,8 @@ Drop a `.cc-candybar.json5` (or `.cc-candybar.json` — both extensions are acce
49
49
 
50
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.
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 — `<dir> has a cc-candybar config — 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 in `$XDG_STATE_HOME/cc-candybar/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
+
52
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.
53
55
 
54
56
  The file **merges onto the bundled default**, so it declares only what differs. `globals` merge per field; the named sections (`variables`, `segments`, `actions`, `helpers`, …) merge by name, your entry winning; `root` merges per named row (`identity` and `status` in the bundled default; a whole tree at `root` replaces every row). The bundled default is `src/config/default-dsl-config.ts`, and fuller starting points live under `examples/`. Run `cc-candybar check <path>` to load a file exactly as the daemon will: exit 0 means it renders, exit 1 prints the error with the path and line to fix. Add `--render` and it prints the bar it rendered, so you can read a config's result without installing it.