@sligqoer/dsh-usage-stats 0.1.2 → 0.2.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 CHANGED
@@ -1,5 +1,69 @@
1
1
  # Changelog / 更新日志
2
2
 
3
+ ## 0.2.0 - 2026-10-05
4
+
5
+ <a id="v020-zh"></a>
6
+ **简体中文** · [English](#v020-en)
7
+
8
+ ### ✨ 新增功能
9
+
10
+ - 新增「匹配」页面,跟随当前会话的模型与推理设置,结合已有响应提示与行为指纹检测评估模型匹配情况。
11
+ - 支持 28 份公开行为参考、完整检测或随机抽样、KBF JSON 导入/导出,以及通过可信供应商建立本地参考;新增 16 项能力测试,用于对照本地基线检查能力下降。
12
+ - 检测完成后显示 0–100 的「参考接近度」,并给出「未发现明显异常」「疑似不匹配」「疑似能力下降」或「无法判定」的结果。接近度按有效回答的一致率计算;取消、中断及证据不足时不评分。
13
+ - 新增「token输出速度」,按供应商与模型的 TPS 从高到低排列,同时显示平均 TTFT。TPS 使用 DSH 的累计输出 Token/累计解码耗时口径;缺少有效时间记录的样本不参与排名。
14
+ - 概览展开后新增缓存命中率、历史单日 Token 峰值、最长单轮任务时长、当前连续天数、最长连续使用天数,以及最近 7 天最常用的一个模型。同名模型跨供应商合并,任务时长排除轮次之间的等待。
15
+ - 控制页新增「检测模型匹配」和「token输出速度」开关,分别默认关闭、开启,保存后重启仍生效。
16
+
17
+ ### 🐛 问题修复
18
+
19
+ - 修复分叉会话把继承记录的 Token、速度样本与任务时长重复计入的问题,升级后重读可用的会话日志;防止延迟返回的旧设置覆盖刚保存的开关状态。
20
+ - 修复检测消耗未纳入用量统计的问题,逐次保存已上报的 Token,纳入概览、图表、模型分布与 TPS/TTFT;失败、取消及重启恢复时保留已发生消耗,避免重复计入。
21
+ - 修复检测完成后结果不明确、切换会话后结果消失的问题。保留最近 10 次检测结果;无能力基线时明确说明无法判断下降,宿主重启中断的检测显示「无法判定」。
22
+ - 配额查询失败时持久保留最近成功的数据和获取时间,显示安全的失败提示;单张卡片仅刷新对应供应商,较旧的全部刷新结果不覆盖较新的单供应商结果。
23
+ - 修复合并同名模型后的供应商搜索,保留供应商与标签页切换时的查询草稿,并在升级时重读现有日志补齐 TPS/TTFT 时间记录。
24
+
25
+ ### 🎨 体验优化
26
+
27
+ - 检测结果置于表单上方,保留分数、结论、模型与消耗;参数、中间验证过程、统计检验和通道表现收进默认折叠的「检测详情」。
28
+ - 概览指标居中对齐顶部摘要,移除 Token 分项与会话明细区域;速度列表仅保留供应商小字,统一图表颜色并补充精确数值提示。
29
+ - 独立检测先预览预算,再由用户手动启动,支持取消、请求超时与已上报 Token 预算控制;默认读取已有响应时不发起模型请求。
30
+
31
+ ### ⚠️ 其他变更
32
+
33
+ - 继续仅适配 DSH Desktop,保留现有设置与统计数据。随包提供公开参考资料的来源、校验值与 Apache 2.0 许可。
34
+ - 展示截图与测试样例改用模拟数据,补齐私人检测记录的忽略规则;发布包增加版本一致性与隐私文件检查。
35
+
36
+ <a id="v020-en"></a>
37
+ **English** · [简体中文](#v020-zh)
38
+
39
+ ### ✨ New Features
40
+
41
+ - Add a Match tab that follows the current conversation's model and reasoning settings, combining existing response hints with behavioral fingerprint audits.
42
+ - Include 28 public behavioral references, full or randomly sampled audits, KBF JSON import/export, and private reference calibration through a trusted provider. Add 16 capability tasks to compare against a local baseline.
43
+ - Show a 0–100 reference similarity score and a clear verdict after auditing. Scores measure valid-answer agreement; cancelled, interrupted and insufficient-evidence runs remain unscored.
44
+ - Add Token output speed, ranking provider/model pairs by descending TPS with average TTFT. TPS uses DSH's cumulative output tokens divided by cumulative decode time; samples without valid timing are excluded.
45
+ - Expand the overview with cache hit rate, historical daily token peak, longest completed user round, current and longest usage streaks, and the most-called model in the last seven days. Merge model names across providers and exclude idle gaps between rounds.
46
+ - Add persistent visibility switches: Detect model match defaults off, and Token output speed defaults on.
47
+
48
+ ### 🐛 Bug Fixes
49
+
50
+ - Exclude inherited fork history from billed tokens, speed samples and task durations, rescanning available session logs on upgrade. Prevent delayed settings responses from undoing newly saved switches.
51
+ - Count reported audit tokens in overview, charts, model distribution and TPS/TTFT after each call. Preserve incurred usage after failures, cancellation and restarts without double counting restored results.
52
+ - Make completed results explicit and retain the last ten audits across conversation changes. Explain missing capability baselines and mark host-interrupted runs inconclusive.
53
+ - Persist the last successful quota data and fetch time after failed refreshes with safe diagnostics. Refresh individual providers and prevent older full refreshes from overwriting newer card results.
54
+ - Fix provider search in merged model rows, retain query drafts across provider/tab changes, and rescan available logs on upgrade to recover TPS/TTFT timing.
55
+
56
+ ### 🎨 Improvements
57
+
58
+ - Show results above the form with the score, verdict, model and usage. Collapse parameters, intermediate validation, statistical checks and channel performance under Audit details by default.
59
+ - Center overview metrics with the summary, remove token categories and session details, simplify speed rows to provider-only subtext, and align chart colors and exact-value tooltips.
60
+ - Preview the budget before manually starting an independent audit, with cancellation, request timeouts and reported-token limits. Reading existing responses does not run a model.
61
+
62
+ ### ⚠️ Other Changes
63
+
64
+ - Keep DSH Desktop support and existing settings/statistics. Include provenance, checksums and Apache 2.0 licensing for the public references.
65
+ - Use synthetic screenshots and test fixtures, exclude private audit records from Git, and add release checks for version consistency and private files.
66
+
3
67
  ## 0.1.2 - 2026-10-01
4
68
 
5
69
  ### 中文
package/README.md CHANGED
@@ -30,7 +30,7 @@
30
30
  <a href="screenshots/usage.png"><img src="screenshots/usage.png" alt="Usage dashboard with totals, hourly tokens and a calendar heatmap" width="800"></a>
31
31
  </p>
32
32
 
33
- <p align="center"><sub>Today's usage, lifetime totals, and the patterns behind them.</sub></p>
33
+ <p align="center"><sub>Today's usage, lifetime totals, and the patterns behind them. Screenshot versions and values have been edited for this release and use synthetic data.</sub></p>
34
34
 
35
35
  <table align="center">
36
36
  <thead>
@@ -48,17 +48,37 @@
48
48
  </tbody>
49
49
  </table>
50
50
 
51
+ <table align="center">
52
+ <thead>
53
+ <tr><th align="center">Token output speed · token输出速度</th><th align="center">Model match · 模型匹配</th></tr>
54
+ </thead>
55
+ <tbody>
56
+ <tr>
57
+ <td align="center"><a href="screenshots/token-speed.png"><img src="screenshots/token-speed.png" alt="Models ranked by TPS with average TTFT" width="400"></a></td>
58
+ <td align="center"><a href="screenshots/match.png"><img src="screenshots/match.png" alt="Reference similarity score, audit verdict and collapsed details" width="400"></a></td>
59
+ </tr>
60
+ <tr>
61
+ <td align="center">Compare output speed and first-token wait across providers.</td>
62
+ <td align="center">Review the score, verdict and counted audit usage.</td>
63
+ </tr>
64
+ </tbody>
65
+ </table>
66
+
51
67
  ## Features
52
68
 
53
69
  | Tab | What you can do |
54
70
  | --- | --- |
55
- | **Usage · 用量** | View today's and lifetime tokens, active days, hourly calls, a daily/weekly heatmap, and model breakdowns. |
71
+ | **Usage · 用量** | View today's and lifetime tokens, active days, hourly calls, a daily/weekly heatmap, model breakdowns, and token output speed. |
56
72
  | **Quotas · 配额** | Check configured account balances, subscription windows, and optional WorkBuddy / WorkBuddy AI credits. |
57
- | **Controls · 控制** | Choose a refresh interval, configure custom quota queries, and enable model details or the advanced model selector. |
73
+ | **Match · 匹配** | Enable Detect model match in Controls to show this tab (off by default). Analyze the current session's request settings and response-declared model; optionally run cancellable independent tests. |
74
+ | **Controls · 控制** | Choose a refresh interval, configure custom quota queries, and toggle model details, model matching, token output speed, or the advanced model selector. |
58
75
 
59
- - **Follow your usage:** filter historical charts by 7 / 30 / 365 days or all history, and compare providers and models.
76
+ - **Follow your usage:** switch the trend between 7 and 30 days, page through daily or weekly history, and compare providers and models.
60
77
  - **Keep quotas together:** use built-in readers or map a custom provider's JSON response.
61
78
  - **Refresh on your terms:** fetch manually or enable scheduled queries. Automatic quota refresh is off by default.
79
+ - **Inspect overview metrics:** expand the overview for cache hit rate, historical daily token peak, longest completed user round, current and longest usage streaks, and the most-called model in the last seven days. Same model names merge across providers. Round timing requires complete start/end records and excludes idle gaps between messages; today's streak continues through yesterday until a full unused day. Retained historical totals stay included.
80
+ - **Compare output speed:** Token output speed is on by default, sorting provider/model pairs by DSH TPS: cumulative output tokens divided by cumulative first-nonempty-output-to-response-completion time, in tok/s. TTFT shows the average time from call start to first non-empty token for completed timed calls, in seconds; missing records show a dash. Samples without valid decode timing are excluded from the ranking. Hide it in Controls.
81
+ - **Keep successful results:** failed quota refreshes retain amounts and timestamps with safe diagnostics. Card refreshes query only their provider; query drafts survive tab changes.
62
82
  - **Choose models faster:** opt into a model/reasoning panel with an effort slider; disabling it restores the official selector.
63
83
  - **Fit the desktop:** light/dark themes, responsive charts, pinned tabs, and a keyboard-operable provider picker.
64
84
  - **Follow your language:** Chinese, English, and Japanese UI text updates with DSH's selected language. User-defined names and quota labels stay as configured.
@@ -88,10 +108,10 @@ Usage statistics load from your local DSH sessions. Open **配额** and click a
88
108
  <details>
89
109
  <summary>Install a specific version or a downloaded archive</summary>
90
110
 
91
- To install version `0.1.2`, enter this in the same installer:
111
+ To install version `0.2.0`, enter this in the same installer:
92
112
 
93
113
  ```text
94
- @sligqoer/dsh-usage-stats@0.1.2
114
+ @sligqoer/dsh-usage-stats@0.2.0
95
115
  ```
96
116
 
97
117
  You can also manually install a [Release archive](https://github.com/Jockjrop/dsh-usage-stats/releases/latest). Enter the URL below, or download the `.tgz` and `SHA256SUMS`, verify the hash, and enter the archive's local absolute path. Do not extract it before installing.
@@ -101,7 +121,7 @@ https://github.com/Jockjrop/dsh-usage-stats/releases/latest/download/dsh-usage-s
101
121
  ```
102
122
 
103
123
  ```powershell
104
- Get-FileHash ./sligqoer-dsh-usage-stats-0.1.2.tgz -Algorithm SHA256
124
+ Get-FileHash ./sligqoer-dsh-usage-stats-0.2.0.tgz -Algorithm SHA256
105
125
  ```
106
126
 
107
127
  </details>
@@ -169,6 +189,8 @@ npm run build
169
189
  | Automatic quota refresh | Off |
170
190
  | Refresh interval | 1 hour; also supports 10 minutes, 5 hours, or daily |
171
191
  | Model details | On |
192
+ | Detect model match | Off |
193
+ | Token output speed | On |
172
194
  | Advanced model selector | Off |
173
195
 
174
196
  Enabling automatic queries asks you to acknowledge possible query costs. The schedule continues while the settings page is closed. Opening the quota page normally reads cached results.
@@ -231,19 +253,33 @@ Editing invalidates the test; successful tests expire after 15 minutes. A confir
231
253
 
232
254
  ## Privacy
233
255
 
234
- Usage aggregation runs locally. The plugin saves counts, model identifiers and usage timestamps, without conversation text. Credentials are resolved on the host and are not returned to the renderer.
256
+ Usage aggregation runs locally. The plugin saves counts, model identifiers, usage timestamps, explicit session titles and working directories, and at most 30 bounded model-evidence records per session. It does not keep conversation bodies, private replay blocks or credentials. Credentials are resolved on the host and are not returned to the renderer. Independent tests persist reported usage and the most recent 10 results without prompts or raw responses.
257
+
258
+ The Match tab follows the current session. Metadata declarations provide weak hints only. Reading logs, references and budget previews makes no inference calls.
259
+
260
+ Behavioral auditing uses [KBF](https://github.com/Ooo0ption/KBF)-compatible knowledge-boundary fingerprints, including consistent wrong answers. The package includes 28 references and 10,327 probes with dates, deployment provenance and original-file SHA-256 hashes. Some references use third-party deployments; DeepSeek V4.1 Flash uses Novita. Import KBF JSON or create a reference through a trusted configured provider for additional models. Custom calibration filters three consensus passes and performs an independent self-test on the retained set. It does not reproduce the paper's full contrast-model screening experiment.
261
+
262
+ Use the reference's CP99 upper error bound and a one-sided binomial test (p < 0.05), with at least 64 valid answers and 80% coverage on both sides. Recalibration is required when the reference's noise bound exceeds 30%. Results indicate significant difference, no significant difference, or insufficient evidence. A p-value is not the probability of model authenticity. Public references use temperature zero and suppressed reasoning; unsupported models need references calibrated with matching parameters. Behavioral changes may reflect versions, prompts or deployment configuration.
263
+
264
+ Completed behavioral audits show a 0–100 reference similarity score: matching answers divided by valid answers, multiplied by 100. This is answer agreement, not an authenticity probability. Cancelled, interrupted or insufficient-evidence audits remain unscored. Saved results receive scores without another test. Audit details starts collapsed and contains the parameters, validation process, statistical test and channel measurements.
265
+
266
+ Sixteen seeded capability tasks cover code tracing, path reasoning, context retrieval and constraint optimization. Custom references can retain their scores for paired decline tests under matching reasoning settings. Without a capability reference, results describe this run only. TPS/TTFT remain performance measurements.
267
+
268
+ Select **Preview test budget** to inspect the actual parameters, call limit, input estimate, output cap and reported-token budget, then **Start audit (uses tokens)**. Quotes expire after five minutes and are single-use. Runs are cancellable with a 60-second per-call timeout; reported-token budgets stop subsequent calls. Reasoning, unreported usage and provider retries follow channel billing, so this is not an absolute invoice cap. Tests do not use conversation content or modify the session; each call's reported usage enters the statistics, including failed or cancelled calls. Store up to 20 private references atomically in `storages/usage-stats-model-baselines.json`; save usage and the last 10 results in `storages/usage-stats-model-tests.json`. A verdict above the form explains behavior, capability decline or an inconclusive result. Host-interrupted tests remain inconclusive. After switching or deleting the original conversation, the previous result stays available and applies only to its listed model and settings.
235
269
 
236
270
  Quota tests and refreshes contact the selected platform. There is no analytics or telemetry endpoint.
237
271
 
238
272
  <details>
239
273
  <summary>Storage and request safeguards</summary>
240
274
 
241
- Both files live under `<DSH_HOME>/storages/`, or the current user's `.dsh/storages/` when `DSH_HOME` is unset:
275
+ Local files live under `<DSH_HOME>/storages/`, or the current user's `.dsh/storages/` when `DSH_HOME` is unset:
242
276
 
243
277
  | File | Contents |
244
278
  | --- | --- |
245
279
  | `usage-stats-corpus.json` | Per-session usage contributions |
246
280
  | `usage-stats-controls.json` | Controls, custom templates and quota snapshots |
281
+ | `usage-stats-model-baselines.json` | Private behavioral and capability references |
282
+ | `usage-stats-model-tests.json` | Reported audit usage and the last ten results |
247
283
 
248
284
  These are private local files, excluded from Git along with credentials, environment files, databases, logs, backups and previews.
249
285
 
@@ -306,6 +342,9 @@ Routes use the `/api/dsh-usage-stats/` prefix:
306
342
  | `controls` | GET / POST | Read/update controls; writes require JSON |
307
343
  | `quota-providers` | GET | Configured providers and credential-free templates |
308
344
  | `quota-test` | POST | Test a template and return an expiring confirmation ID |
345
+ | `model-match` | GET | Existing response hints and the current/previous audit result |
346
+ | `model-test` | POST | Preview a budget, start or cancel an audit |
347
+ | `model-baselines` | GET / POST | List, import, export or remove behavioral references |
309
348
 
310
349
  The corpus refreshes every 30 seconds. Requests wait up to 1500 ms and may return `stale: true`/`partial: true`. SQLite fingerprints require `node:sqlite`; otherwise sessions are reread. Timezone changes re-bucket stored events, with possible approximation for old hourly-only history at fractional-hour boundaries.
311
350
 
package/README.zh-CN.md CHANGED
@@ -30,7 +30,7 @@
30
30
  <a href="screenshots/usage.png"><img src="screenshots/usage.png" alt="用量面板:概览指标、今日图表与使用量热力图" width="800"></a>
31
31
  </p>
32
32
 
33
- <p align="center"><sub>从今天用了多少,到长期使用趋势,一眼看清。</sub></p>
33
+ <p align="center"><sub>从今天用了多少,到长期使用趋势,一眼看清。展示截图的版本与数值已替换为本次发布的模拟数据。</sub></p>
34
34
 
35
35
  <table align="center">
36
36
  <thead>
@@ -48,17 +48,37 @@
48
48
  </tbody>
49
49
  </table>
50
50
 
51
+ <table align="center">
52
+ <thead>
53
+ <tr><th align="center">token输出速度</th><th align="center">模型匹配</th></tr>
54
+ </thead>
55
+ <tbody>
56
+ <tr>
57
+ <td align="center"><a href="screenshots/token-speed.png"><img src="screenshots/token-speed.png" alt="按 TPS 排序的模型列表与平均 TTFT" width="400"></a></td>
58
+ <td align="center"><a href="screenshots/match.png"><img src="screenshots/match.png" alt="参考接近度、检测结论与折叠详情" width="400"></a></td>
59
+ </tr>
60
+ <tr>
61
+ <td align="center">比较不同供应商的输出速度和首 Token 等待时间。</td>
62
+ <td align="center">直接查看分数、结论与已计入统计的检测用量。</td>
63
+ </tr>
64
+ </tbody>
65
+ </table>
66
+
51
67
  ## 功能
52
68
 
53
69
  | 页面 | 你可以做什么 |
54
70
  | --- | --- |
55
- | **用量** | 查看今日与累计 Token、使用天数、小时调用次数、每日/每周热力图和模型明细。 |
71
+ | **用量** | 查看今日与累计 Token、使用天数、小时调用次数、每日/每周热力图、模型明细与 token输出速度。 |
56
72
  | **配额** | 集中查看已配置平台的余额、订阅额度窗口,以及 WorkBuddy/WorkBuddy AI 积分。 |
57
- | **控制** | 调整查询间隔、设置自定义配额接口、切换模型明细和高级模型选择器。 |
73
+ | **匹配** | 在控制页开启「检测模型匹配」后显示(默认关闭),分析当前会话的请求设置与响应声明模型,按需运行可取消的独立测试。 |
74
+ | **控制** | 调整查询间隔、设置自定义配额接口、切换模型明细、检测模型匹配、token输出速度和高级模型选择器。 |
58
75
 
59
- - **看清使用趋势**:历史图表支持 7/30/365 天和全部,按供应商、模型查看用量。
76
+ - **看清使用趋势**:趋势图切换 7/30 天,热力图按日/周查看历史,按供应商、模型查看用量。
60
77
  - **汇总账户配额**:使用内置读取器,也能为自定义供应商映射 JSON 响应。
61
78
  - **按需刷新**:手动获取或开启定时查询;自动查询默认关闭。
79
+ - **查看概览指标**:展开后显示缓存命中率、历史单日 Token 峰值、最长已完成单轮任务、当前连续天数、历史最长连续使用天数和最近 7 天调用最多的一个模型。同名模型跨供应商合并;任务耗时要求完整起止记录,排除消息之间的空闲时间;今日尚未使用时连续记录延续至昨日,完整空闲一天后归零。已删除会话的历史汇总继续保留。
80
+ - **比较输出速度**:默认显示「token输出速度」,按供应商+模型的 TPS 排名;沿用 DSH TPS,以累计输出 Token 除以首个非空输出到响应完成的累计时间,单位为 tok/s。TTFT 列显示完成调用从开始到首个非空 Token 的平均耗时,单位为秒,缺少记录时显示「—」。无有效解码时间的样本不参与排名,可在控制页关闭显示。
81
+ - **保留刷新结果**:配额失败时保留上次成功的数据和时间并提示原因;卡片刷新只查询对应供应商,查询草稿跨标签页保留。
62
82
  - **更快选择模型**:可开启模型与推理强度面板,拖动滑条调整;关闭后恢复官方选择器。
63
83
  - **融入桌面界面**:适配浅色/深色主题,图表自适应宽度,标签页固定,供应商选择支持键盘。
64
84
  - **跟随应用语言**:支持中文、英语和日语,随 DSH 所选语言即时切换;用户自定义名称与配额标签保持原样。
@@ -88,10 +108,10 @@
88
108
  <details>
89
109
  <summary>安装指定版本或已下载的压缩包</summary>
90
110
 
91
- 要安装指定版本 `0.1.2`,在同一安装入口填入:
111
+ 要安装指定版本 `0.2.0`,在同一安装入口填入:
92
112
 
93
113
  ```text
94
- @sligqoer/dsh-usage-stats@0.1.2
114
+ @sligqoer/dsh-usage-stats@0.2.0
95
115
  ```
96
116
 
97
117
  也可以手动安装 [Release 压缩包](https://github.com/Jockjrop/dsh-usage-stats/releases/latest),在安装入口填入以下地址,或下载 `.tgz` 与 `SHA256SUMS` 后填写压缩包的本地绝对路径。安装前无需解压。
@@ -101,7 +121,7 @@ https://github.com/Jockjrop/dsh-usage-stats/releases/latest/download/dsh-usage-s
101
121
  ```
102
122
 
103
123
  ```powershell
104
- Get-FileHash ./sligqoer-dsh-usage-stats-0.1.2.tgz -Algorithm SHA256
124
+ Get-FileHash ./sligqoer-dsh-usage-stats-0.2.0.tgz -Algorithm SHA256
105
125
  ```
106
126
 
107
127
  </details>
@@ -162,6 +182,18 @@ npm run build
162
182
 
163
183
  **配额**展示平台接口返回的数据。已配置但尚未查询的余额可能显示 **未查询**;卡片是否可用取决于凭据和账户权限。
164
184
 
185
+ **匹配**读取当前会话的供应商、模型与推理强度。已有响应的名称声明仅作辅助提示,读取日志和参考列表不调用模型。开启控制页「检测模型匹配」后才能看到此页,默认关闭。
186
+
187
+ **行为指纹检测**对照 [KBF](https://github.com/Ooo0ption/KBF) 的知识边界回答模式,包含稳定的错误回答。插件附带 28 份公开参考、10,327 个探针,记录参考通道、日期、原始文件 SHA-256 与来源。公开参考可能来自第三方部署;例如 DeepSeek V4.1 Flash 的参考来自 Novita。没有对应参考的模型可导入 KBF JSON,或选择可信供应商建立本地参考。自建参考从候选池筛选三轮稳定回答,再单独自测校准;这属于自建行为基线,尚未复现论文完整的对比模型筛选实验。
188
+
189
+ 自测误差的 Clopper–Pearson 99% 上界作为噪声基线,使用单侧二项检验(p < 0.05)判断差异。至少需要 64 个有效回答、目标与参考均达到 80% 覆盖率;参考噪声上界超过 30% 时要求重新校准。结果为「发现显著差异」「未发现显著差异」或「样本不足或测试未完成」。p 值不表示模型为真的概率。版本、推理设置、提示词或部署变化也可能产生差异;未发现显著差异仅描述本次测试。公开参考使用温度 0、关闭推理,宿主不支持关闭时需自建相同推理参数的参考。
190
+
191
+ 完成的行为检测显示 0–100 的「参考接近度」:一致回答数 ÷ 有效回答数 × 100。分数表示回答一致率,不表示模型为真的概率;取消、中断或证据不足时显示「无法评分」。已有结果自动计算分数,无需重新测试。参数、验证过程、统计检验和通道表现收进默认折叠的「检测详情」。
192
+
193
+ **能力测试**运行 16 项可复用随机种子的代码推演、路径推理、上下文检索与约束优化。自建参考保存有效的能力成绩,后续在相同推理强度下用成对单侧检验检查下降。没有能力参考时仅显示当前成绩,不据此识别模型或量化级别。TPS 与 TTFT 单列表示测试通道表现。
194
+
195
+ 先点击 **查看测试预算**,核对实际参数、最多请求次数、输入估算、输出上限与已上报 Token 预算,再点击 **开始检测(会消耗 Token)**。预算五分钟有效且仅可使用一次。测试可取消、每次超时 60 秒;达到已上报预算时停止后续请求。推理、未上报用量与供应商重试按通道规则计费,因此已上报预算不等同于绝对账单上限。测试不使用会话正文、不改写当前会话,已上报用量逐次计入用量统计;失败或取消的消耗也保留。基线原子保存到 `storages/usage-stats-model-baselines.json`,最多 20 份;检测用量及最近 10 次结果保存到 `storages/usage-stats-model-tests.json`。结果卡片在表单上方显示「未发现明显异常」「疑似不匹配」「疑似能力下降」或「无法判定」及具体原因,宿主重启中断的测试保持无法判定。切换或删除原会话后仍可查看「上次检测结果」,其结论仅对应卡片列出的模型和参数。
196
+
165
197
  **控制**管理显示与刷新方式:
166
198
 
167
199
  | 设置 | 默认值 |
@@ -169,6 +201,8 @@ npm run build
169
201
  | 自动获取配额 | 关闭 |
170
202
  | 查询间隔 | 1 小时;也可选 10 分钟、5 小时、每天 |
171
203
  | 模型明细与分布 | 开启 |
204
+ | 检测模型匹配 | 关闭 |
205
+ | token输出速度 | 开启 |
172
206
  | 高级模型选择器 | 关闭 |
173
207
 
174
208
  开启自动查询前需要确认可能产生的查询成本。关闭设置页后,宿主仍按间隔执行;平时打开配额页只读取缓存。
@@ -231,19 +265,21 @@ WorkBuddy 与 WorkBuddy AI 依赖可选的 `dsh-workbuddy-connect` 适配器,
231
265
 
232
266
  ## 隐私
233
267
 
234
- 用量统计在本机完成。插件保存统计数、模型标识和用量时间记录,不保存对话正文;凭据只在宿主读取,不返回渲染进程。
268
+ 用量统计在本机完成。插件保存统计数、模型标识、用量时间、显式会话标题和工作目录,以及每个会话最多 30 条模型证据摘要;不保存对话正文、私有 replay blocks 或凭据。凭据只在宿主读取,不返回渲染进程。独立测试持久化已上报用量及最近 10 组结果,不保存问题或生成原文。
235
269
 
236
270
  测试查询与刷新会访问对应平台的配额服务。插件不含分析上报或遥测接口。
237
271
 
238
272
  <details>
239
273
  <summary>本地存储与请求保护</summary>
240
274
 
241
- 两个文件位于 `<DSH_HOME>/storages/`;未设置 `DSH_HOME` 时使用当前用户的 `.dsh/storages/`:
275
+ 本地文件位于 `<DSH_HOME>/storages/`;未设置 `DSH_HOME` 时使用当前用户的 `.dsh/storages/`:
242
276
 
243
277
  | 文件 | 内容 |
244
278
  | --- | --- |
245
279
  | `usage-stats-corpus.json` | 按会话保存的用量贡献 |
246
280
  | `usage-stats-controls.json` | 控制设置、自定义模板与配额快照 |
281
+ | `usage-stats-model-baselines.json` | 私人行为与能力参考 |
282
+ | `usage-stats-model-tests.json` | 已上报检测用量与最近 10 次结果 |
247
283
 
248
284
  这些是私人的本地数据,与凭据、环境文件、数据库、日志、备份和预览一起排除在 Git 之外。
249
285
 
@@ -306,6 +342,9 @@ npm run release
306
342
  | `controls` | GET/POST | 读取/修改设置,写入要求 JSON |
307
343
  | `quota-providers` | GET | 已有供应商与无凭据模板 |
308
344
  | `quota-test` | POST | 测试模板并返回限时确认 ID |
345
+ | `model-match` | GET | 已有响应提示与当前/上次检测结果 |
346
+ | `model-test` | POST | 查看预算、开始或取消检测 |
347
+ | `model-baselines` | GET/POST | 列出、导入、导出或移除行为参考 |
309
348
 
310
349
  语料库每 30 秒刷新;接口最多等待 1500 ms,可能返回 `stale: true`/`partial: true`。SQLite 指纹要求 `node:sqlite`,否则回退为重读会话。时区变化时按已存事件重新分桶,逐小时保存的旧历史在半小时时区边界上可能存在近似。
311
350