cvc-catalog-sync-plugin 1.0.0 → 2.0.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/CHANGELOG.md ADDED
@@ -0,0 +1,182 @@
1
+ # Changelog
2
+
3
+ All notable changes to this plugin are documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ The package name, the composition row id (`cvc-catalog-sync`) and the locale
9
+ namespace stay the same across the major versions, because a profile refers to
10
+ them by name. Everything else about the configuration surface is versioned: the
11
+ row config moved from a flat list of keys to groups, and the HTTP routes moved
12
+ under one prefix.
13
+
14
+ ## [Unreleased]
15
+
16
+ Nothing yet.
17
+
18
+ ## [2.0.0] - 2026-11-21
19
+
20
+ The plugin stops being "catalog sync with a settings page" and becomes three
21
+ functions in one package: catalog sync, price coefficients, and balance. Each
22
+ function has its own switch in the settings page, and none of them is mounted
23
+ while its switch is off — no HTTP route, no timer, no tool, no UI element.
24
+
25
+ The release also replaces two separately installed plugins. Users who had
26
+ `cvc-model-coeff-plugin` and `cvc-balance-plugin` in their profile no longer need
27
+ them; the functions they provided are part of this package, and the two
28
+ repositories are archived. The originals stay in their own git history and are
29
+ still reachable for anyone reading old profiles.
30
+
31
+ See [docs/UPGRADING.md](docs/UPGRADING.md) for the steps.
32
+
33
+ ### Added
34
+
35
+ - Three function switches — `features.catalogSync`, `features.coefficients`,
36
+ `features.balance` — all on by default, all applied without a restart. The
37
+ plugin declares every configuration field as volatile, so DSH reloads the row
38
+ through `loader/volatile-update` and the browser half mounts or unmounts the
39
+ function in the running page.
40
+ - A price-multiplier badge (`×0.1` … `×10`) beside every model of the
41
+ CheapVibeCode route in the composer's model menu and on the current-model
42
+ button. The colour follows the host theme and the tooltip names the fast-mode
43
+ multiplier when it differs. A model without a multiplier in the catalog gets
44
+ no badge, and models with the same id under other providers stay undecorated.
45
+ - A **CVC balance** button in the sidebar footer with a status dot (all
46
+ providers answered / only some / none), and a draggable panel with one card per
47
+ route: display name, route key, `baseURL`, the credential name and whether the
48
+ key was found, the balance in provider units, and the spend since the previous
49
+ reading. The panel position is remembered in `localStorage` under
50
+ `cvc:panel-pos`; the panel offers **Refresh** and **Reset position**.
51
+ - The `cvc_balance` tool for the agent: `status` returns the last snapshot in
52
+ this process without spending a request.
53
+ - One shared catalog cache for the three functions. A catalog fetch serves both
54
+ the model list written into the patch and the badges, so a badge refresh does
55
+ not add a second request while the cache is fresh.
56
+ - HTTP routes under a single prefix, `/cvc`: `GET /cvc/state`, `PUT
57
+ /cvc/config`, `POST /cvc/run`, `GET /cvc/coefficients`, `GET /cvc/balance`,
58
+ `GET /cvc/health`. The routes reject cross-site requests (`403`), a `PUT`
59
+ without `application/json` (`415`) and a body over 64 KB (`413`).
60
+ - A `Config` schema on `@deepseek-ai/schemastery` with the groups `features`,
61
+ `providers`, `catalog`, `coefficients` and `balance`, plus validation for
62
+ values written from the settings page (a `400` answer carries the offending
63
+ field names).
64
+ - `GET /cvc/state` reports `configShape`, so a configuration left in the 1.x
65
+ shape is visibly marked as `legacy` and the settings page offers to save once
66
+ to convert it.
67
+ - The settings page gains the switch block and the parameter groups **Catalog**,
68
+ **Coefficients**, **Balance** and **Advanced**, with the unsaved-changes marker
69
+ and the last-run summary kept from 1.0.0 (counts, level source, added /
70
+ removed / changed models, allowlist changes, warnings, patch path).
71
+ - `README.ru.md` as a full Russian counterpart of `README.md`, `CHANGELOG.md`,
72
+ and the documents `docs/ARCHITECTURE.md`, `docs/UPGRADING.md`,
73
+ `docs/COMPATIBILITY.md`, and a one-picture detail page `docs/DETAIL.md` with
74
+ `docs/preview.svg`.
75
+
76
+ ### Changed
77
+
78
+ - The row config is grouped: `features.*`, `providers.*` (`match`, `entryId`,
79
+ `apiKeyEnv`, `baseURL`, `timeoutMs`), `catalog.*` (`provider`, `autoSync`,
80
+ `intervalHours`, `startupDelayMs`, `minModelRatio`, `keepModels`,
81
+ `installerUrls`, `syncAllowlist`, `allowlistEntryId`, `levelsCacheMinutes`),
82
+ `coefficients.*` (`refreshMinutes`, `showFast`) and `balance.*`
83
+ (`refreshSeconds`, `showDelta`).
84
+ - Providers are found by the host names in `providers.match` (default
85
+ `cheapvibecode.ru`) instead of a single hard-coded host, so a route pointing at
86
+ another CVC host is picked up as well.
87
+ - The browser half is compiled from `src/client/**` into `client.js` by
88
+ `tools/build-client.mjs`, and the compiled file is committed. The package
89
+ installs from npm and from git without running a build on the user's machine,
90
+ and no `allowBuilds` permission is needed. CI rebuilds the file and fails when
91
+ the committed copy differs from the sources.
92
+ - The host half uses the global `fetch` of the DSH process for every provider
93
+ request; the plugin spawns no process and needs no `ctx.shell`.
94
+ - `SECURITY.md` describes the threat model of all three functions, not just the
95
+ catalog.
96
+ - The test suite is grouped by module and runs through `node --test test/*.mjs`;
97
+ every one of the 32 test scenarios of 1.0.0 is carried over rather than dropped.
98
+
99
+ ### Fixed
100
+
101
+ - Invalid values coming from the settings form are now rejected with a `400` and
102
+ the offending field names instead of being folded into defaults by
103
+ normalisation alone.
104
+ - The provider lookup is one module for all three functions. Before, a route added
105
+ under a renamed key worked in one surface and not in the others, because each
106
+ plugin had its own copy of the discovery code.
107
+ - The installer parser no longer scans the downloaded text with a backtracking
108
+ regular expression; it finds the `const reasoningLevels = {…}` literal
109
+ linearly. The change was first shipped in 1.0.0 after a review of the input
110
+ parsing; it is repeated here because the code was moved.
111
+
112
+ ### Removed
113
+
114
+ - The old HTTP prefixes `/cvc-catalog-sync`, `/cvc-model-coeff` and
115
+ `/cvc-balance` are no longer served. A browser tab or a script that still calls
116
+ them gets `404`.
117
+ - The client occupies only the slots it owns: `conversation.input.model.label`
118
+ stays with its owner, never used by this plugin. The balance function uses
119
+ `sidebar.footer.action`, and the settings page uses `settings.section`,
120
+ `settings.section.icon` and `plugins.bundle.config`.
121
+ - The `prepare`-based local build is gone with the two private plugins: this
122
+ package ships its compiled client half and does not run a build script on
123
+ install.
124
+ - `cvc-model-coeff-plugin` and `cvc-balance-plugin` are archived; their
125
+ repositories stay online, read-only.
126
+
127
+ ### Upgrading from 1.0.0 / from 1.1.0 of the private plugins
128
+
129
+ The short version: keep the package name and the row id, let the old flat
130
+ configuration load as it is, remove the two old rows from the profile, and save
131
+ the settings page once to convert the configuration to the grouped shape.
132
+
133
+ 1. Install or update the package to `2.0.0`. The profile does not need a new row:
134
+ the package name `cvc-catalog-sync-plugin` and the row id `cvc-catalog-sync`
135
+ are unchanged, and the bundle patch of the package inserts the row with the
136
+ three switches turned on.
137
+ 2. A flat 1.x configuration in the row keeps working. It is normalised into the
138
+ groups on load, and `GET /cvc/state` reports `configShape: 'legacy'`. The
139
+ settings page shows a hint; pressing **Save** once rewrites the row in the
140
+ grouped shape.
141
+ 3. If `cvc-balance-plugin` is installed, remove its row from the profile patch
142
+ (id `cvc-balance`) and remove the package from `dsh.profile.bundles`. The
143
+ balance function of 2.0.0 reads the same routes and shows the same numbers
144
+ under `GET /cvc/balance`; the old browser half would keep its own button next
145
+ to the new one.
146
+ 4. If `cvc-model-coeff-plugin` is installed, remove its row (id `cvc-model-coeff`)
147
+ and the package from `dsh.profile.bundles` the same way. The old badge and the
148
+ new badge would both be drawn on the same model rows.
149
+ 5. Remove the `allowBuilds` entries those two packages needed. This package has
150
+ no install-time build script, so it does not ask for such a permission.
151
+ 6. Restart DSH once after editing the profile by hand, then hard-reload the tab.
152
+ Later changes of the switches do not need a restart.
153
+ 7. Check the result: `GET /cvc/health` answers
154
+ `{"ok":true,"version":"2.0.0"}`; the settings page shows three switches on;
155
+ `docs/UPGRADING.md` has the same steps with the commands.
156
+
157
+ ## [1.0.0] - 2026-11-20
158
+
159
+ First public release.
160
+
161
+ ### Added
162
+
163
+ - Catalog sync: `GET {baseURL}/models` plus the `reasoningLevels` map of the
164
+ official installer, built into `llm-pi-ai.providers.<provider>.models` by the
165
+ installer's own rules, written through `ctx.configEditor.edit()` and applied
166
+ by `dsh-hmr`.
167
+ - The `subagent-model-selection-settings.allowedModels` sync.
168
+ - The shrink guard `minModelRatio` and the `keepModels` list.
169
+ - The `cvc_catalog` tool with `status`, `plan` and `apply` (and `force`).
170
+ - The settings page in two seats, **Settings → CVC** and the bundle page in
171
+ **Plugins**, with Save / Check / Apply / Reset.
172
+ - A timer for the automatic run: startup delay and interval.
173
+
174
+ ### Changed
175
+
176
+ - Input parsing was hardened in the same release: the installer text is scanned
177
+ linearly, slash trimming no longer uses a regular expression, and the settings
178
+ routes were narrowed to the ones the page needs.
179
+
180
+ [Unreleased]: https://github.com/mikel38487/cvc-catalog-sync-plugin/compare/v2.0.0...HEAD
181
+ [2.0.0]: https://github.com/mikel38487/cvc-catalog-sync-plugin/compare/v1.0.0...v2.0.0
182
+ [1.0.0]: https://github.com/mikel38487/cvc-catalog-sync-plugin/releases/tag/v1.0.0