@mars-sea/dsh-commandcode-provider 0.10.2 → 0.10.3

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 CHANGED
@@ -4,7 +4,25 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
- ## [Unreleased]
7
+ ## [0.10.3] - 2026-09-10
8
+
9
+ ### Changed
10
+
11
+ - **Synced with the official command-code@1.53.0 CLI** (2026-09-10: "Add new deepseek/deepseek-v4.1-flash model"). `COMMAND_CODE_CLI_VERSION` is now `1.53.0`. The only catalog change is the new DeepSeek V4.1 Flash (Go-tier, Vision, 1M context, selectable `low` / `high` / `max` reasoning efforts, same hourly schedule as the other DeepSeek models: $0.15/$0.60 off-peak, $0.30/$1.20 peak, 01–04 & 06–10 UTC Mon–Fri). Wire protocol, endpoints, subscription plan maps, every other plan tier, and every deal are unchanged; `gpt-6-astra` remains a CLI/pricing/docs-only model (absent from the public Provider catalog, as before) and was deliberately kept.
12
+ - **DeepSeek V4.1 Flash is now selectable** — a Go-tier Vision model (1M context) with the `Peak`/`Half` hourly marker and the `Image` badge in the picker.
13
+ - **Synced with the official command-code@1.52.0 CLI** (2026-09-10). `COMMAND_CODE_CLI_VERSION` is now `1.52.0`. Upstream moved 1.51.3 → 1.52.0 the same day; the CLI changelog page still stops at 1.51.0, so the snapshot was read from the bundled model table. The only catalog change is the new free `inclusionai/ling-3.0-flash-sante:free` (Ling 3.0 Flash Sante, 262K context, text-only, automatic reasoning, 100 requests/day). Wire protocol, endpoints, effort map, subscription plan maps, peak/off-peak membership and schedule, and every other deal are unchanged; `gpt-6-astra` remains a CLI/pricing/docs-only model (absent from the public Provider catalog, as before) and was deliberately kept.
14
+ - **Ling 3.0 Flash Sante is now selectable** — a free Go-tier model on every plan (262K context, text-only, reasons automatically), shown with the `FREE` badge at the top of the picker. It succeeds the retired `inclusionai/ling-3.0-flash-free` promo.
15
+ - **Synced with the official command-code@1.51.3 CLI** (2026-09-09). `COMMAND_CODE_CLI_VERSION` is now `1.51.3`. Upstream moved 1.50.0 → 1.50.1 (CLI-local changes only: stable process title, UNIX-socket idle/working/blocked status) → 1.51.0 (briefly added DeepSeek V4.1 Flash Beta behind a 2026-09-10 expiry gate) → 1.51.2 (removed the beta model from the bundle entirely, so no snapshot entry is needed) → 1.51.3 (see below). Re-verified against the official sources: wire protocol (both the `/alpha/generate` CLI transport and the `/provider/v1/chat/completions` Provider transport), endpoints, auth flow, model catalog, plan tiers, subscription plan maps, and deals are all identical to 1.50.0; the peak/off-peak *hours* are unchanged, but the same page now also restricts them to weekdays — see Fixed. There is no CLI changelog entry for 1.51.1–1.51.3 yet, so the 1.51.3 snapshot was read from the bundled model table.
16
+ - **MiniMax M3 now offers selectable reasoning effort** (`low` / `medium` / `high`). The official 1.51.3 bundle gave the model effort levels where it previously let Command Code choose the depth automatically, so the picker's effort selector now lists them (its hidden free sibling gained the same set in the bundle).
17
+ - **The "Visible models" card is now "Model allowlist".** The label and hint on the settings page (zh/en) and in both READMEs say what the card does — checked models are the only ones the picker lists, and checking nothing shows everything — instead of relying on the word "visible". The stored `visibleModels` config key is unchanged, so existing allowlists keep working with no migration.
18
+ - **Per-release compatibility now covers dsh `0.1.5-alpha.1`.** `dsh.compatibility.dshReleases` declares it `compatible` alongside `0.1.2-rc.1`, `0.1.3-alpha.1` and `0.1.3-alpha.2`, so the DSH STORE can list the plugin for the current Harness release.
19
+ - **The build config uses the current tsdown option shape** (`outExtensions` and `deps.neverBundle` instead of the removed `outExtension` / `external`). The external set is byte-for-byte the same list as before, so the published `lib/` output is unchanged in behavior; the change only silences the deprecated-option path on current tsdown.
20
+
21
+ ### Fixed
22
+
23
+ - **The usage report no longer prints a raw success-rate float.** `/commandcode` and the settings page's Account usage card rendered the upstream value verbatim, so a rate of `99.965552876334` showed up as a wall of digits. Both the Host command and the browser card now round to at most two decimals and trim trailing zeros — `99.97`, `100`, `97.6` — through one shared formatting rule on each side.
24
+ - **DeepSeek peak/off-peak pricing now follows the official weekday rule.** Peak rates (01:00–04:00 and 06:00–10:00 UTC, full price) apply **Monday to Friday only** — Saturday and Sunday are charged completely off-peak for all 24 hours. The picker previously derived `Peak`/`Half` from the UTC hour alone, so it showed `Peak` on weekend mornings when the model actually billed at half price. Peak hours are now 35 per week (7 per weekday, 0 on weekends).
25
+ - **DeepSeek V4 Flash Fast no longer shows a bogus `Peak`/`Half` marker.** Its official pricing row is flat ($0.28/$0.56/$0.07) with no `timeOfDay` block, so it is not billed by the hour; the picker now shows just `Go · 1M`. The hourly-priced set is DeepSeek V4 Pro, V4 Flash, V4 Flash Vision (exp), and — from command-code@1.53.0 — V4.1 Flash. The upstream snapshot procedure was tightened to read the pricing page's embedded model JSON instead of the rendered rows, whose annotations sit one row off when flattened to text.
8
26
 
9
27
  ## [0.10.2] - 2026-09-08
10
28
 
package/README.md CHANGED
@@ -23,7 +23,7 @@ Unofficial [DeepSeek Harness](https://deepseek-harness.github.io/deepseek-harnes
23
23
  - **Multi-account rotation** — when one account hits its usage limit, requests switch to the next account automatically. See [Account rotation](#account-rotation).
24
24
  - **Flexible API key setup** — via the settings page, an environment variable, or the official CLI login file.
25
25
  - **Model-picker annotations** — minimum plan, active deal or `FREE` badge, peak/off-peak state, image support, and context window; free models listed first.
26
- - **Plan-aware picker** — models above your subscription tier are hidden by default (toggleable); an optional **Visible models** allowlist keeps only your favorites in the picker.
26
+ - **Plan-aware picker** — models above your subscription tier are hidden by default (toggleable); an optional **Model allowlist** keeps only your favorites in the picker.
27
27
  - **Reasoning-effort support** — models with selectable reasoning effort levels expose them in the picker.
28
28
  - **Image input** — Vision-capable models accept images.
29
29
  - **Web search** — the dsh `web_search` tool is backed by the Command Code Provider API (`/alpha/web-search`) with the same key/endpoint as chat, so no separate search key or base URL is needed. See [Web search](#web-search).
@@ -95,7 +95,7 @@ With several Command Code subscriptions, the plugin **switches to the next accou
95
95
  - **Setup** — use the **Account rotation** card at Settings → **Command Code** to add accounts with a label and API key; the top-level key always serves first as the `default` account.
96
96
  - **Manual switching** — the **Active account** dropdown pins a preferred account; if it is exhausted, requests fall back to other accounts and return once its window resets.
97
97
  - **Route models to accounts** — the **Route models to accounts** card picks catalog models (multi-select, fetched from the live catalog) and routes them to an account. A request whose model is in a rule serves from that account while it is usable; an exhausted or invalid routed account falls back to the normal rotation. Rules match in list order — the first hit wins.
98
- - **Show only favorite models** — the **Visible models** card keeps only the checked models in the model picker; unchecked shows all (the default).
98
+ - **Show only favorite models** — the **Model allowlist** card keeps only the checked models in the model picker; unchecked shows all (the default).
99
99
  - **Status** — the **Account usage** card and `/commandcode` report per-account state.
100
100
 
101
101
  The equivalent YAML (`$DSH_HOME/settings.yaml` or composition config):
package/README.zh-CN.md CHANGED
@@ -23,7 +23,7 @@
23
23
  - **多账户轮换**:一个账户用量打满后,请求自动切换到下一个账户。详见[多账户轮换](#多账户轮换)。
24
24
  - **key 配置灵活**:设置页填写、环境变量或官方 CLI 登录文件均可。
25
25
  - **模型选择器标注**:每个模型标注最低套餐、折扣/FREE 徽章、峰谷时段、图片支持与上下文长度,免费模型置顶。
26
- - **按套餐过滤**:默认隐藏超出订阅套餐的模型,可一键关闭;「显示的模型」白名单可进一步只保留常用模型。
26
+ - **按套餐过滤**:默认隐藏超出订阅套餐的模型,可一键关闭;「模型白名单」可进一步只保留常用模型。
27
27
  - **推理强度支持**:支持推理强度的模型可在选择器中选择档位。
28
28
  - **图片输入**:Vision 模型支持发送图片。
29
29
  - **联网搜索**:dsh 的 `web_search` 工具由 Command Code Provider API(`/alpha/web-search`)承载,复用聊天同一个 key 与端点,无需单独配置搜索 key 或地址。详见[联网搜索](#联网搜索)。
@@ -93,7 +93,7 @@ cmd login # macOS/Linux;Windows 原生版:cmdc login
93
93
  - **配置**:在 **设置 → Command Code** 的「多账户轮换」卡片添加账户并填写备注名与 API key;顶层 key 始终是第一顺位的 `default` 账户。
94
94
  - **手动切换**:卡片上的「当前使用账户」下拉框可指定优先账户;所选账户耗尽时自动回落到其他账户,窗口重置后自动恢复。
95
95
  - **按模型切换账户**:在「按模型切换账户」卡片从实时模型目录**多选**模型并固定到某个账户。请求的模型在规则列表中且该账户可用时使用该账户;账户耗尽或密钥失效时自动回落到常规轮换。规则按列表顺序匹配,第一条命中生效。
96
- - **只显示常用模型**:在「显示的模型」卡片勾选要保留的模型,模型选择器只列出这些;不勾选则显示全部(默认行为不变)。
96
+ - **只显示常用模型**:在「模型白名单」卡片勾选要保留的模型,模型选择器只列出这些;不勾选则显示全部(默认行为不变)。
97
97
  - **状态展示**:「账户用量」卡片与 `/commandcode` 均按账户分别显示状态。
98
98
 
99
99
  等价的 YAML(`$DSH_HOME/settings.yaml` 或组合配置):
package/lib/client.js CHANGED
@@ -1260,6 +1260,16 @@ window.__ModuleLoader__.load({
1260
1260
  if (value >= 1e3) return `${(value / 1e3).toFixed(1)}K`;
1261
1261
  return String(value);
1262
1262
  }
1263
+ /**
1264
+ * Format a success-rate percentage (already in percent units, e.g. 99.96):
1265
+ * at most two decimals, trailing zeros trimmed — `100` stays `100`, not
1266
+ * `100.00`, and the raw upstream float `99.965552876334` becomes `99.97`.
1267
+ * The `%` suffix is appended by the caller (the card and the dashboard line
1268
+ * both compose it).
1269
+ */
1270
+ function formatSuccessRate(value) {
1271
+ return String(Number(value.toFixed(2)));
1272
+ }
1263
1273
  /** One window's fill ratio in [0, 1]; 0 when uncapped. */
1264
1274
  function windowRatio(used, cap) {
1265
1275
  if (cap <= 0) return 0;
@@ -1958,7 +1968,7 @@ window.__ModuleLoader__.load({
1958
1968
  }
1959
1969
  //#endregion
1960
1970
  //#region package.json
1961
- var version = "0.10.2";
1971
+ var version = "0.10.3";
1962
1972
  var repository = {
1963
1973
  "type": "git",
1964
1974
  "url": "git+https://github.com/Mars-Sea/dsh-commandcode-provider.git"
@@ -2605,7 +2615,7 @@ window.__ModuleLoader__.load({
2605
2615
  }),
2606
2616
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(UsageStat, {
2607
2617
  label: t("usageSuccessRate"),
2608
- value: `${report.usage.successRate}%`
2618
+ value: `${formatSuccessRate(report.usage.successRate)}%`
2609
2619
  }),
2610
2620
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(UsageStat, {
2611
2621
  label: t("usageCost"),
@@ -3683,9 +3693,9 @@ window.__ModuleLoader__.load({
3683
3693
  modelSearchPlaceholder: "搜索模型…",
3684
3694
  modelSearchEmpty: "没有匹配的模型。",
3685
3695
  modelStale: "已下架",
3686
- visibleModelsTitle: "显示的模型",
3687
- visibleModelsHint: "只在模型选择器中显示勾选的模型;不勾选则显示全部。保存后下次打开选择器即生效。",
3688
- visibleModelsPick: "选择要显示的模型…",
3696
+ visibleModelsTitle: "模型白名单",
3697
+ visibleModelsHint: "勾选要保留的模型,模型选择器就只列出这些;一个都不勾选时则显示全部模型。保存后,下次打开模型选择器生效。",
3698
+ visibleModelsPick: "选择要保留的模型…",
3689
3699
  visibleModelsCount: "已选 {count} 个模型",
3690
3700
  visibleModelsShowAll: "显示全部",
3691
3701
  visibleModelsStaleHint: "有 {count} 个已选模型在目录中找不到了(可能已下架),不影响其他模型;可清理或保留。",
@@ -3815,9 +3825,9 @@ window.__ModuleLoader__.load({
3815
3825
  modelSearchPlaceholder: "Search models…",
3816
3826
  modelSearchEmpty: "No matching models.",
3817
3827
  modelStale: "Retired",
3818
- visibleModelsTitle: "Visible models",
3819
- visibleModelsHint: "Show only the checked models in model pickers; unchecked shows all. Applies the next time a picker opens after saving.",
3820
- visibleModelsPick: "Select models to show…",
3828
+ visibleModelsTitle: "Model allowlist",
3829
+ visibleModelsHint: "Check the models you want to keep, and model pickers will list only those. If nothing is checked, every model is shown. After saving, the change applies the next time you open a model picker.",
3830
+ visibleModelsPick: "Select models to keep…",
3821
3831
  visibleModelsCount: "{count} model(s) selected",
3822
3832
  visibleModelsShowAll: "Show all",
3823
3833
  visibleModelsStaleHint: "{count} selected model(s) are no longer in the catalog (possibly retired); other models are unaffected. Clean them up or keep them.",