@alexpeng/dsh-custom-plugin 0.6.0 → 0.7.1

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,498 +1,686 @@
1
- # Changelog
2
-
3
- All notable changes to this project are documented here. The format loosely
4
- follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versions
5
- follow [Semantic Versioning](https://semver.org/).
6
-
7
- ## 0.6.0 — not yet published
8
-
9
- ### Changed
10
-
11
- - **Built against dsh 0.2.0-rc.2, and the declared range now names it.** Every
12
- `@deepseek-ai/dsh-*` devDependency moved to 0.2.0-rc.2 and the source
13
- type-checked against that release's own published types with no source
14
- changes. The gate-relevant peer became
15
- `@deepseek-ai/dsh-tools >=0.1.7-rc.2 <0.2.0-0 || >=0.2.0-rc.2 <0.2.0-rc.3`,
16
- and `engines.dsh` was set to the same range. That spelling is load-bearing:
17
- `^0.1.7-rc.2` desugars to `>=0.1.7-rc.2 <0.2.0-0`, and every `0.2.0-rc.N`
18
- sorts above `0.2.0-0`, so no caret form can admit a verified prerelease — and
19
- `^0.2.0-rc.2` would additionally admit 0.2.0 stable plus every later 0.2.x,
20
- which is exactly the unverified support this range exists to withhold.
21
- 0.2.0-rc.1 is left out on purpose: the bundle is now built for rc.2.
22
- - `pnpm smoke`'s two range checks were rewritten, because both encoded the old
23
- premise that a peer range is a single caret pin. They now assert what is
24
- actually load-bearing: the installed build target must **satisfy** the peer
25
- range (same comparator and `includePrerelease` semantics dsh's own gate uses),
26
- a range that admits every version is rejected as stating no support at all,
27
- and `engines.dsh` must admit the same versions as the peer range across ten
28
- probed releases. `semver` became a devDependency to make the first check
29
- possible. Verified by mutation: a stale range, a `*` range, and a diverging
30
- `engines.dsh` each turn the gate red.
31
- - The desktop release line pins its shell and runtime together, so dsh Desktop
32
- always ships one exact dsh version — this is why 0.2.0-rc.2 stopped being a
33
- speculative target: any Desktop install *is* that runtime.
34
-
35
- ### Added
36
-
37
- - `tests/loopback.spec.ts`: the request-level fence had never had a unit test —
38
- only the live probe script exercised it. Twelve tests now pin the two header
39
- shapes dsh Desktop's shell produces (`web-document.ts` deletes `host`,
40
- `origin`, `cookie` and `sec-fetch-site` before forwarding; the WebSocket
41
- upgrade rewrites `Origin` to the Host authority), plus the rejections a
42
- forged Origin, a cross-site marker, and a non-loopback socket must still get.
43
- - README (both languages) gained an "On dsh Desktop" section: how the shell
44
- routes requests, why the profile is managed by Desktop's own `dsh` command,
45
- and which part still needs a window and a login.
46
-
47
- ### Fixed
48
-
49
- - **A second dsh host could read a half-written state document.** The atomic
50
- replace wrote to one shared temp name, `custom-plugin-state.json.tmp`, while
51
- the queue that serializes saves lives inside a single process. dsh Desktop
52
- owns `$DSH_HOME/profiles/desktop` and the Web profile owns `profiles/web`,
53
- but both hosts read and write the same
54
- `$DSH_HOME/custom-plugin-state.json`, so two hosts saving at the same moment
55
- wrote and renamed that one temp file against each other — the Windows
56
- EPERM/EBUSY shape this queue was built to stop, reachable across processes.
57
- Temp names are now qualified by the writing pid (both the state document and
58
- the pre-import recovery backup), and a failed turn deletes its own temp
59
- instead of leaving a per-pid file behind. Building that cleanup surfaced a
60
- second bug: `rm` was used in the new `catch` but never imported, so a failed
61
- save reported `ReferenceError` instead of the real rename error and left the
62
- temp file on disk.
63
-
64
- ### Verified
65
-
66
- - **dsh 0.2.0-rc.2, the version Desktop ships.** Confirmed from the installed
67
- app's own bytes, not the repository: `resources/app.asar/dsh/desktop-runtime.json`
68
- records `release.version 0.2.0-rc.2`, `node 24.18.1`, `pnpm 11.7.0`, and lists
69
- `@deepseek-ai/dsh 0.2.0-rc.2` with `@deepseek-ai/cordis 4.0.4` (the version
70
- this package's cordis peer already names) among its shared packages.
71
- - 0.5.0 on that runtime behaved as predicted: `dsh plugin --profile web add`
72
- refused it, naming `peerDependencies {"@deepseek-ai/dsh-tools":"^0.1.7-rc.2"}`,
73
- and rolled the profile back. With the exemption granted, 18 of 19 live host
74
- probes passed, 0 failed.
75
- - **0.6.0 installs on 0.2.0-rc.2 with no exemption at all** (`plugin add` exit
76
- 0, profile kept), and the same 18-pass/1-skip/0-fail result holds there and on
77
- 0.1.7-rc.2 — boot graph 66 module rows on 0.2.0-rc.2 and 65 on 0.1.7-rc.2, our
78
- row served, all
79
- five `dsh.client.inject` targets present, Mermaid engine loaded locally, UTF-8
80
- state round trip restored. The single skip is the session-dependent probe; a
81
- credential-free scratch home holds no session.
82
- - The rebuild of `pnpm-lock.yaml` (required: the old lockfile cached a
83
- `minimumReleaseAge` policy snapshot that no longer matched the allow-list, so
84
- every install was rejected) also moved the dev tree's `mermaid` from 11.17.0
85
- to 11.17.2. That is inside the declared `^11.6.0`, and the scratch profiles
86
- used for the live probes resolved 11.17.2 themselves, so the measured Mermaid
87
- engine is the version an installing user gets.
88
- - The installed `lib/client.js` is byte-identical to the repository build
89
- (207762 bytes, sha256 prefix `f559cd7f1bd8a49a`). The *served* bundle is 49
90
- bytes larger because dsh's composite `/plugins/??…` route joins modules with
91
- `;\n` and rewrites the `sourceMappingURL` — so byte identity is asserted at
92
- the installed file, never at the HTTP response.
93
- - 126 unit tests pass, typecheck is clean, `pnpm smoke` and `check:readme` are
94
- green. Not verified: opening the plugin inside a real Desktop window (needs a
95
- login), the desktop profile's own composition, and the per-turn chips.
96
-
97
- ## 0.5.0 — 2026-09-28
98
-
99
- ### Changed
100
-
101
- - **Target dsh 0.1.7-rc.2.** All `@deepseek-ai/dsh-*` dependencies, the
102
- `@deepseek-ai/dsh-tools` peer range, and `@deepseek-ai/cordis` moved to the
103
- versions that release ships, and `engines.dsh` now states the supported range.
104
- dsh checks a bundle's `@deepseek-ai/dsh-*` peer ranges against its own runtime
105
- version at install and startup and skips a bundle that does not match. The
106
- declared floor is the release this package was built and verified against;
107
- `^0.1.7-rc.2` additionally admits later 0.1.x releases that have not been
108
- re-verified, and `engines.dsh` is declarative — no part of dsh reads it.
109
- - The browser half declares `dsh.client.inject` as the five packages that own
110
- the slots it registers into, replacing the retired
111
- `@deepseek-ai/dsh-client-runtime` row.
112
- - Slot-provided data shapes (`SessionListState`, `WorkspaceListState`,
113
- `TurnLocation`) are now declared locally instead of imported from harness
114
- controller packages that rename across releases; only `SnapshotSelectorHook`
115
- still comes from the slot SDK.
116
- - In-session search uses dsh's event index when the deployment opens one and
117
- otherwise scans the session log it already read, reporting which path answered
118
- in the panel. dsh's shipped `web` profile configures the index with
119
- `openAt: never`, so the indexed route was unavailable on a default install.
120
- - Plugin Manager cards, bundle details, and the settings inventory now show a
121
- real name and icon: `locale/en.json`, `locale/zh.json`, and `icon.svg`.
122
-
123
- ### Fixed
124
-
125
- - **The timeline rail, export, and quote features lost the current session.**
126
- The session list snapshot has had no `current` field since dsh
127
- 0.1.6-alpha.2 (view selection moved to the Workspace browser), so the rail
128
- tracked nothing. The viewed session now comes from the standard `sessionId`
129
- prop every session-scoped slot entry receives.
130
- - **Opening a session or a workspace failed silently.** `ctx.sessions.open` is
131
- gone; navigation goes through `ctx.uiWorkspace.openSession()` /
132
- `connectWorkspace()`. Branching and full-text search go through
133
- `ctx.remote.session.fork()` / `.search()` — `ctx.sessions` still declares
134
- those two, but the remote namespace is the documented surface — each with an
135
- honest failure message when the service is absent.
136
- - **Exports lost tool results and the new model-visible messages.** The
137
- `tool-result` content block was replaced by a tool-role message whose call id
138
- now sits on the message (`toolCallId`, still falling back to `source.callId`
139
- for older logs); `system/message` and `developer/message` are exported as
140
- injected context; and `file`, `tool-addition`, `tool-removal`, and offloaded
141
- `image` blocks are named instead of dropped.
142
- - `conversation.chat.turnTail` changed from a chain slot to a list slot, so its
143
- `select` registration option no longer applies and was replaced by an id and
144
- order.
145
- - Client diagnostics are throttled per message kind. The previous single shared
146
- window let the frequently emitted rail line swallow the one-shot timeline
147
- result line, which made a successful timeline fetch look like zero turns.
148
- - `pnpm smoke` now checks the manifest fields dsh reads before it activates a
149
- bundle (client platform and `./client` export, patch path, icon size, locale
150
- display metadata, and peer ranges agreeing with the build target), so an
151
- unsupported or stale declaration fails the local gate instead of being skipped
152
- silently in a user's profile. The peer check refuses to read a range form it
153
- cannot interpret, and every `files` entry must resolve to something in the tree
154
- — an entry matching nothing used to publish a bundle missing that piece. Both
155
- new rules were confirmed red by breaking them on purpose. The
156
- `dsh.client.inject` rows are counted, not resolved: only a running shell knows
157
- which module ids it serves, so a retired name there is caught by the live
158
- boot-graph probe below, not by this gate.
159
- - A search excerpt now extends its window so a pasted query longer than two
160
- thirds of the excerpt is still shown whole. Measured first: the previous
161
- centering already covered ordinary queries, including a hit at the very end of
162
- a long message, so only the long-query case was affected — the fix is narrow,
163
- and the added test fails against the old formula.
164
- - Exports no longer fail outright on a `tool/result` event whose `message` is
165
- absent, and the scan fallback reads each event shape through its own typed
166
- case instead of a cast that hid real field drift.
167
- - When cross-session full-text search is unavailable, the palette says what still
168
- works (title matching over sessions and workspaces) instead of showing a bare
169
- error.
170
- - Added `scripts/live-dsh-check.sh`: a manual probe that runs against a *running*
171
- isolated dsh profile and exercises the host half on real session data
172
- (timeline, the three export formats, the search scan path, usage scan, backup,
173
- a UTF-8 state round trip, the Mermaid engine route, the client→host diagnostic
174
- ring, both fences, and the boot graph the shell serves), exiting non-zero on
175
- any failure. CI has no harness to talk to, so this is the check to run when a
176
- dsh release lands. Verified against 0.1.7-rc.2 with 19 probes green; the
177
- session-dependent ones `SKIP` — and the closing line counts them instead of
178
- claiming a clean sweep — when the scratch home holds no session, and the UTF-8
179
- probe was shown to distinguish a correct write from the mangled-bytes write it
180
- guards against.
181
- - The live check itself was then tested against a dead endpoint and found two of
182
- its own probes green-by-absence; the restore probe now refuses to pass when the
183
- append it restores never landed. Running it against a real profile exposed five
184
- more defects in the tool, all fixed: restoring the prompt library through
185
- `curl -d "$var"` mangled non-ASCII to U+FFFD (Git Bash re-encodes non-ASCII
186
- argv for `curl.exe`), so bodies are now written by node and sent with
187
- `--data-binary @file`; the script checked out with CRLF endings (the stored
188
- blobs were already LF — `core.autocrlf` was rewriting them on checkout, now
189
- pinned by `.gitattributes`); its search probe read the query word with a greedy
190
- `sed` that needed *some* six-letter run anywhere after the last `"text":"`, so
191
- it silently `SKIP`ped the one probe covering the scan path; it looked for
192
- sessions under `<state file>/../sessions`, which only finds anything because
193
- Windows folds the path lexically and would see nothing on a POSIX shell; and
194
- the real-home guard missed a `DSH_HOME` written with a trailing separator,
195
- which is exactly the spelling that would have probed a developer's own harness
196
- home.
197
- - The READMEs add a plugin-to-dsh compatibility table. A mismatched pair is not
198
- silent — dsh logs `disabling profile plugin …` on stderr, rejects the install,
199
- and models the state as `incompatible` in the plugin manager — but none of that
200
- reaches the page a user is looking at, so the supported window belongs in the
201
- README.
202
-
203
- ### Verified by independent review
204
-
205
- Four reviewers were dispatched against `30e025b..HEAD` with separate charters
206
- (code correctness, claims-vs-evidence, contract-vs-installed-runtime, and a
207
- deep re-audit pinned to the previous commit). Their findings were each
208
- re-verified before being acted on; three of their "critical" items were
209
- refuted by measurement and are recorded below so nobody re-litigates them.
210
-
211
- - Fixed: `package.json` declared `"icon"` twice. `JSON.parse` keeps the last
212
- value, so every gate stayed green on a manifest npm would warn about. `pnpm
213
- smoke` now counts top-level keys in the file text and compares them with what
214
- survived parsing, and separately checks that `engines.dsh`'s floor names the
215
- installed dsh-tools release (nothing in dsh reads `engines.dsh`, so this is
216
- the only place that keeps it honest).
217
- - Fixed: the session probes looked under `<state file>/../sessions`, which only
218
- resolves because Windows folds the path lexically; they now use the home
219
- directory directly. Skips are counted and named in the closing line, a missing
220
- boot-graph URL line fails instead of vanishing, the Mermaid probe reads
221
- `mermaidSource` rather than inferring "local" from a byte count, and a
222
- rejected state write now carries the host's own error text.
223
- - Fixed: the restore probe was vacuously green — it never checked that the
224
- append it restores had landed. It now refuses to pass when the write failed,
225
- verified by mutating the write condition and watching exactly that line go
226
- red.
227
- - Fixed: the client's last-holder clear left `turns` and the rail positions
228
- behind with no session identity, and a holder whose `sessionId` prop flipped to
229
- null could wipe the identity other holders were still rendering. A null holder
230
- now claims nothing at all.
231
- - Fixed: `slots.inject`'s callback registered the component outside the
232
- surrounding `try`, so a rejected registration would take a surface down
233
- silently while the diagnostic ring still read green; the deferred `register`
234
- has its own guard now, and the summary line reports how many injection
235
- requests it actually submitted rather than asserting "8 / 7" — dsh defers the
236
- callback until a slot is declared, so no line printed at install time can
237
- claim a surface materialized; the per-slot `ok` / `register` lines do that.
238
- - Fixed: the search request was passed as `as never`, which hid that `values`
239
- must be `keyof SessionEventMap` rather than `string`; typed, the compiler
240
- caught it immediately. A synchronous throw from `searchEvents` now degrades to
241
- the scan path like a rejection does, a log with exactly 100 hits no longer
242
- claims there are more, and the scan's role filter is exercised by a fixture
243
- that only it can exclude. Each of the three is pinned by a test that fails
244
- against the code it replaces (verified by reverting one at a time).
245
- - Fixed: the sidebar footer button ignored the `wide` prop the host supplies, so
246
- its label wrapped into a vertical stack inside the 56px rail — measured both
247
- ways on a live profile: 36px icon-only when collapsed, "项目" again at 280px.
248
- - Added `scripts/check-boot-graph.mjs`, run by the live check: the served
249
- `__DSH_BOOT__` graph must contain our row, every `dsh.client.inject` target,
250
- and reachable client bytes. This is the only gate that can see the failure
251
- shape that started this whole upgrade — a manifest naming a module the shell no
252
- longer serves — and it was confirmed red by pointing the inject list at the
253
- retired `@deepseek-ai/dsh-client-runtime`.
254
- - Measured against dsh 0.2.0-rc.1 (published the day after this release):
255
- `dsh plugin add` rejects the bundle and rolls the profile back; with the
256
- exact-version exemption granted, the source typechecks against 0.2's own
257
- types, 111/111 unit tests pass, 19/19 live probes pass, and the browser
258
- behaves as on 0.1.7 — eight slot registrations, the rail, prompt insertion,
259
- the `Ctrl+K` palette with title search, and quote-reply. The peer range is
260
- deliberately not widened: `^0.2.0-rc.1` would silently admit every 0.2.x
261
- release, including a stable nobody has reviewed — the very failure this
262
- upgrade exists to prevent. What stays unverified there (branch / Mermaid /
263
- LaTeX chips) is unverified here too: those need a real model reply.
264
- - Accepted and published: a human walked the isolated 0.1.7-rc.2 profile in a
265
- browser (personalization panel, prompts into the composer, project folders, the
266
- timeline rail, quote reply, export entries, `Ctrl+K`) and reported it behaving.
267
- The same person then ran 0.5.0 on their own machine — dsh upgraded to
268
- 0.1.7-rc.2, plugin updated through the in-app market — and reported it
269
- behaving there too. That install's `lib/client.js` is md5
270
- `6639a0aebbe7d0eed32b0c2c5c50c544`, 207762 bytes: byte-identical to the repo
271
- build this section describes, so the chain "what was verified = what was
272
- published = what a user runs" is closed at both ends.
273
- Not covered by either pass, in this or any release until someone runs it with a
274
- key: the per-turn chips (branch, Mermaid render, LaTeX/MathML) and the real
275
- balance figures, all of which need an actual model reply. `0.5.0` was then
276
- published to npm, and the tarball pulled back from the registry was verified
277
- byte-identical to the `lib/` this section describes (34 files, 215634 B).
278
- - Retracted after re-measurement, so the record does not carry them: "the
279
- `slots.inject(key, fn)` service method does not exist in 0.1.7" (it is
280
- declared at `dsh-client-ui-renderer`'s registry interface, and all eight
281
- surfaces materialize in a live browser); "`data-chat-flow-kind` is gone, so the
282
- rail has no anchors" (the reading was taken while the host's trajectory tab had
283
- the chat flow unmounted); "`WorkspaceSnapshot.state` was renamed to `phase`"
284
- (both axes ship side by side). Corrected in place: `ctx.sessions` still
285
- declares `fork()` and `search()` (only `open` is gone), the `current` field and
286
- the turnTail kind change both landed in 0.1.6-alpha.2 rather than 0.1.7, and
287
- the bilingual README gate enforces hash freshness, not content parity.
288
-
289
- ## 0.4.2 — 2026-09-12
290
-
291
- ### Fixed
292
-
293
- - **Exports fail on forked/resumed sessions with "读取会话失败: seeded
294
- session constructor seed must equal its inherited prefix".** Newer dsh
295
- builds replay-validate inside `sessionQuery.readSession()` through a
296
- snapshot-mode constructor that rejects any seeded (forked or resumed) session
297
- whose log outgrew its seed boundary, so timeline, export, in-session
298
- search, and usage scans all failed on those sessions. Every read now goes
299
- through a shared helper that falls back to `observeSession()` (the live and
300
- restore paths dsh's own session page uses) when `readSession()` rejects, and
301
- surfaces the original error only when no fallback exists.
302
- - **The "PDF(含图片)" export button produced an `.html` file.** The button and
303
- its description now say what actually lands on disk: "HTML(含图片)", a
304
- print-ready HTML document you turn into a PDF via the browser print dialog.
305
- - **Weather FX are invisible on light backgrounds.** Snow, rain, and sakura
306
- colors were tuned for the dark theme only — pure-white flakes, 6%-alpha pale
307
- rain, and 90%-lightness pink petals all vanish over the near-white palette
308
- backgrounds. The FX canvas now picks a darker particle palette (cool slate
309
- snow, steel-blue rain, deeper rose petals, each with a lifted alpha floor)
310
- whenever the resolved theme is light or the saturated aurora background is
311
- active, and swaps palettes live on theme/background changes without
312
- rebuilding the particle field.
313
-
314
- ## 0.4.1 — 2026-09-09
315
-
316
- ### Fixed
317
-
318
- - **Fresh installs show nothing after a "successful" install.** `keytar` (a
319
- native optional dependency) tripped pnpm 11's strict build-script gate, so
320
- `dsh plugin add` exited non-zero and the harness never reconciled the bundle
321
- layer — the package sat inert in `dependencies` with no host half and no
322
- browser half. `keytar` is no longer a dependency: the OS-keyring adapter
323
- still detects a `keytar` module present in the profile's `node_modules`, and
324
- users who want the OS keyring can add it themselves
325
- (`dsh plugin --profile web add keytar`).
326
- - The browser half now waits for the `slots` service (a child fiber) before
327
- mounting its surfaces instead of reading it synchronously: newer dsh builds
328
- activate the slots provider after this plugin's entry, and the synchronous
329
- read lost that race every time, logging "slots service unavailable" and
330
- skipping all UI. The mount stays fail-soft — the GUI boots even when the
331
- service never appears.
332
-
333
- ## 0.4.0 — 2026-09-03
334
-
335
- ### Added
336
-
337
- - 7 / 30 / 90-day usage trends, per-model summaries, CSV export, and local monthly CNY budget warnings.
338
- - Versioned, secret-free state backup with previewed merge/replace import and automatic recovery copies.
339
- - Editable, tagged, sortable favorite prompts with usage recency, `{{variable}}` templates, and JSON / Markdown portability.
340
- - Indexed current-session search and a Ctrl/Cmd+K command palette backed by DSH's official search APIs.
341
-
342
- ### Changed
343
-
344
- - Batch archive skips running sessions and reports separate success and failure counts.
345
- - Existing prompt and config documents are normalized for the new optional fields.
346
-
347
- ### Fixed
348
-
349
- - State-dependent routes now wait for the initial local state load; usage events
350
- arriving during an import, edit, or usage scan are queued and persisted instead
351
- of racing a stale snapshot.
352
- - Backup imports reject malformed counters/configuration, honor imported folder
353
- parents and sibling order, and keep the 5 MiB document boundary distinct from
354
- the JSON request envelope.
355
- - Search hits carry their session id and archive batches retain per-item errors;
356
- stale cross-session clicks and swallowed archive failures now surface clearly.
357
- - Malformed persisted peak counters, invalid calendar buckets, failed usage
358
- rebuilds, and partial state edits are handled without presenting or keeping
359
- a misleading snapshot; backup requests now validate their envelope fields.
360
-
361
- ### Security
362
-
363
- - Backups exclude API keys and credential metadata; imports preserve the active credential.
364
- - Archive restore remains deferred until DSH exposes an official API.
365
-
366
- ## 0.1.6 — 2026-09-02
367
-
368
- ### Fixed
369
-
370
- - Usage scans now preserve the live ledger when a session read fails or new
371
- usage arrives during replay, and return the replayed Beijing day so a
372
- midnight-crossing scan cannot relabel its result.
373
- - Legacy API-key migration no longer overwrites an existing system credential;
374
- failed system-key deletion is reported instead of being treated as success.
375
- - Legacy usage rows without a recoverable peak/off-peak split are marked as
376
- inexact and are no longer shown with a misleading cost estimate.
377
- - DeepSeek peak/off-peak cost estimates now treat only Beijing Monday-Friday
378
- 09:00–12:00 / 14:00–18:00 as peak; weekends are off-peak.
379
- - The browser usage panel now uses the same Beijing-time day bucket as the
380
- Host, including when the desktop host runs outside UTC+8.
381
- - Client state snapshots are serialized in invocation order so rapid settings
382
- changes cannot be overwritten by an older save completing later.
383
- - Timeline refreshes ignore stale session/request responses and follow live
384
- conversation running-state changes.
385
- - Mermaid modal changes reload correctly, while concurrent CDN loads share one
386
- in-flight request; the balance hover panel also remains reachable across its
387
- trigger gap.
388
-
389
- ### Changed
390
-
391
- - Centralized the cost formula, added explicit `deepseek-v4-flash-vision-exp`
392
- pricing, and covered the rule with unit tests.
393
- - Usage history is pruned to 90 Beijing calendar days; usage scans use four
394
- concurrent reads and share one in-flight scan instead of duplicating work.
395
- - The balance panel now shows the peak/off-peak token and cost split, pricing
396
- source link, and the built-in rule check date.
397
- - Saved panel keys prefer the optional OS credential store, migrate legacy
398
- state-file keys when possible, and no longer cross the browser state boundary.
399
- - Light/dark root theme styles now take precedence over the host OS preference,
400
- and the build uses the current tsdown dependency configuration without
401
- deprecation warnings.
402
-
403
- ### Added
404
-
405
- - Regression coverage for ordered state saves and shared in-flight Mermaid
406
- loading.
407
-
408
- ## 0.1.3 — 2026-08-23
409
-
410
- ### Fixed
411
-
412
- - Concurrent state saves are serialized per state file: two racing saves could
413
- collide on the shared `.tmp` file and fail the rename on Windows; a failed
414
- debounced save now surfaces in the status-tool diagnostics instead of being
415
- swallowed silently.
416
-
417
- ### Added
418
-
419
- - CI: bilingual README hash consistency check (`node scripts/check-readme-i18n.mjs`)
420
- — editing one language without the other, or forgetting to re-record the
421
- hashes in `README.i18n.yaml`, now fails the build instead of drifting silently.
422
- - CI: Dependabot with monthly schedules (GitHub Actions and grouped npm
423
- minor/patch bumps); workflow actions upgraded to current majors.
424
- - `pnpm smoke` — post-build smoke script: headless Edge loads `lib/client.js`
425
- against a stubbed module loader and asserts the registration handshake, plus
426
- artifact contract checks (loader banner/footer, node-half ESM import,
427
- patch row, local Mermaid engine).
428
- - Tests: the balance key resolution chain (panel → environment → DSH
429
- credentials, via a new credential-reader seam), state merge edge cases, and
430
- concurrent-save serialization.
431
- - Docs: the security section now states explicitly that the panel-pasted key
432
- is stored in plaintext in the state file (same trust domain as DSH's own
433
- credentials).
434
- - This changelog (also shipped in the npm tarball).
435
-
436
- ## 0.1.2 — 2026-08-23
437
-
438
- ### Fixed
439
-
440
- - **Mermaid diagrams in assistant replies now render in place.** The rendering
441
- entry previously hooked only user messages, so assistant-generated diagrams —
442
- mindmaps in particular — never got an entry point. A `MutationObserver` now
443
- scans GUI code blocks and renders ```mermaid``` fences where they are
444
- (`MermaidInPlace`), without moving any React-owned nodes.
445
-
446
- ### Changed
447
-
448
- - Mermaid engine is a local runtime dependency served by the host; the CDN
449
- mirrors are a fallback only. The source (`local` / `cdn`) is visible in the
450
- status tool diagnostics.
451
-
452
- ### Added (repository-side)
453
-
454
- - GitHub Actions CI (Node 22 + pnpm 11: typecheck / test / build), README
455
- badges, and a bilingual screenshot gallery under `docs/`.
456
-
457
- ## 0.1.1 — 2026-08-22
458
-
459
- ### Security
460
-
461
- - Mermaid rendering hardened: `securityLevel: strict` (was `loose`), and the
462
- `/custom-plugin/mermaid.js` engine route is behind the same loopback trust
463
- fence as every other route.
464
-
465
- ### Fixed
466
-
467
- - Peak/off-peak pricing and daily usage buckets are computed in Beijing time
468
- (UTC+8) regardless of the host machine's timezone; tests are
469
- timezone-independent.
470
-
471
- ### Changed
472
-
473
- - `@deepseek-ai/dsh-tools` moved to `peerDependencies` and externalized from
474
- the bundle — `lib/index.js` shrinks from ~245 KB to ~45 KB and shares the
475
- harness instance at runtime.
476
- - Dead code removed: unused `afterSeq` incremental timeline protocol and cache,
477
- unused type re-exports, dead client state fields, unconditional startup log.
478
-
479
- ### Added
480
-
481
- - Self-contained `prepare` script — GitHub source installs build themselves
482
- (pnpm ≥ 10 users: allowlist the build script, see README).
483
- - Package metadata: `repository`, `author`, `bugs`, `homepage`,
484
- `engines` (Node ≥ 22); LICENSE copyright line filled in.
485
-
486
- ## 0.1.0 — 2026-08-22
487
-
488
- Initial release: a personalization suite for the DSH web GUI, mounted through
489
- the official profile mechanism without touching DSH source.
490
-
491
- - Appearance: background palettes, liquid glass, weather effects
492
- (rain / sakura / snow).
493
- - Per-user-message timeline rail with stars and branching.
494
- - Multi-level project folders; prompt library.
495
- - Conversation export (JSON / Markdown / PDF with images).
496
- - Mermaid rendering; quote reply.
497
- - DeepSeek balance and daily token usage (peak/off-peak aware).
498
- - `custom_plugin_status` agent-facing diagnostic tool.
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented here. The format loosely
4
+ follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versions
5
+ follow [Semantic Versioning](https://semver.org/).
6
+
7
+ ## 0.7.1 — 2026-10-03
8
+
9
+ 数据安全与健壮性加固版:封住两条不可恢复配置丢失路径与一条跨宿主丢更新路径,装上浏览器提交的形状门,补齐卸载回收与凭据状态缓存;测试从 143 增至 185。
10
+
11
+ ### Fixed
12
+
13
+ - **宿主读档失败不再静默用默认值覆盖状态文件**:此前 `loadStateFile` 把
14
+ `ENOENT`、瞬态占用(Windows 杀毒扫描 / 同步盘 / 与桌面宿主的 rename 竞争)
15
+ 与 JSON 损坏一律折叠成「无文件」,随后启动流程立即把默认文档写入真实路径——
16
+ folders / prompts / stars / 用量台账被无条件清空且不留副本。现在:瞬态错误按
17
+ 1.5s/3s/6s 重试(与客户端重试梯子同节奏);重试耗尽或 JSON 损坏时先以
18
+ pid 后缀名将原文件改名隔离(`.corrupt-<pid>`,两个宿主共享一个
19
+ `$DSH_HOME` 也不会互相抢占恢复名)再采用默认值;仅当原文件既读不出又移不走
20
+ 时 loader 才 reject,宿主转入只读模式(抑制一切保存)而不是销毁可能完好的
21
+ 文档。启动后的首次规范化保存失败也不再误入加载失败分支。
22
+ - **客户端重试耗尽后不再把出厂空配置写回宿主**:桌面壳页面可能先于宿主路由
23
+ 就绪,客户端重试梯子(约 10.5 秒)耗尽后停在出厂默认值;此后用户切换任何
24
+ 开关都会触发一次全量 POST,把已存 folders / prompts / stars 整组替换为空。
25
+ 现在 `saveCfg` 以「曾成功读取过状态」为门槛:未加载成功一律改为重新读取并
26
+ 提示「配置尚未读取完成,已重新加载,请重试」。
27
+ - **插件停用/重声明后全局副作用全部回收**:卸载清理器此前只注销插槽并移除动
28
+ 态样式,`theme.overrideTokens` 的设计令牌覆盖(停用后 GUI 配色仍被插件锁
29
+ 死)、`<html>` 上的 `vx-liquid/vx-dark/vx-light` 类、液态玻璃 SVG 滤镜节点、
30
+ 待触发的余额重试定时器(会继续外呼最多 3 次)全部残留。现在清理器逐一还原。
31
+ - **共享 `$DSH_HOME` 的两个宿主不再互相清空对方的写入**(Web 与 Desktop 各自持有整份内存文档、整文件回写,最后写者赢):现在每次保存前先用 stat 身份(mtime+size)对比本进程上次读/写看到的文件,发现外部变更就回读并做三方合并——本进程未动过的配置段(cfg/folders/prompts/stars)采纳外部版本,动过的保留本地版本,用量台账按计数器做 `对方 + 本地 − 共同基线` 的精确并集(两个宿主的会话流来自不同 profile、天然不重叠)。启动加载也改用同一文件句柄做 fstat+read,基线与合并字节描述同一份文档。
32
+ - **`POST /state` 形状门**:浏览器提交的 folders / stars 此前未经校验直接落
33
+ state——畸形深层嵌套可让此后每次保存的 `JSON.stringify` 抛 `RangeError`,
34
+ 保存从此持续失败需手改状态文件。现在 `normalizeFolders`(唯一 id、纯字符
35
+ 串 id 列表、深度 ≤32、节点 ≤2000)与 `normalizeStars`(安全对象键、纯数字
36
+ 序号、`true` 值、总量 ≤10000)把关,违规整笔拒绝(400「文件夹数据无效」/
37
+ 「星标数据无效」),绝不截断——客户端持有全量文档,静默丢段等于丢数据。
38
+ - **缓冲用量回放不再把宿主已学到的模型覆盖为 `unknown`**:启动缓冲的
39
+ `session/event` 用量回放时,`null` 模型改为传 `undefined`,让宿主回退到自己
40
+ 在加载期间学到的 session 模型映射。
41
+ - **用量重扫不再白付全量代价后必然失败**:流式对话期间触发重扫时,revision 检查从「全部 I/O 完成后查一次」改为每个会话读取前检查,已注定作废的扫描会立即停止读取剩余会话日志。
42
+ - **Mermaid CDN 兜底不再被 200-HTML 投毒**:绑架门户/镜像异常返回的 200 HTML 页此前会被缓存为「引擎」且宿主生命周期内不再重取;现在要求载荷是 ≥1000 字节、不以 `<` 开头的脚本形态,否则记为该镜像失败并继续尝试下一个。
43
+ - **客户端脚本加载挂起不再无限等待**:`ensureMermaid` 的 120ms 轮询等待没有出口,网络黑洞(onload/onerror 都不触发)会让每个流式新代码块再挂一个永久等待者、「预加载」按钮永远「加载中」;现在 30 秒看门狗翻到 failed 并移除 script 标签,重试可重新插入。
44
+ - **GUI 主题与 OS 配色不一致时玻璃/面板不再用错颜色**:深色 GUI + 浅色 OS 下余额悬浮卡、面板、模态保持浅色磨砂(反之亦然)——这些规则此前只跟 `prefers-color-scheme` 走;现在按客户端镜像到 `<html>` 的 `vx-dark/vx-light` 类选择,媒体查询降级为类就绪前的启动兜底(液态玻璃规则本就按此模式工作,磨砂路径对齐)。
45
+
46
+ ### Changed
47
+
48
+ - **凭据状态短 TTL 缓存**:`credentialStatus` 每次 `/state` GET 与保存响应都
49
+ 打一次 OS keychain + 读凭据文件;现在对「来源判定」结果缓存 5 秒(从不缓
50
+ 存键值本身),`applyEdit` 与遗留迁移立即失效,保存响应永远如实反映刚应用
51
+ 的编辑。
52
+ - **长会话交互开销**:`TurnTailEntry`(每条消息一个)对轮次数据的查找从每次 store 变更 O(轮数) 线性扫描改为 fetch 时构建的 `seq → item` Map O(1) 查表;选中拖拽时 `selectionchange` 以 60Hz 触发 `setS`,现在文本与坐标未变(<1px)时跳过发布;用量面板的 90 天汇总/按天/按模型统计改为 `useMemo`(预算输入每次击键不再重算全部统计);面板拖拽改为 mousemove 直写 DOM、mouseup 才落 store;预算状态判定复用 `productivity.budgetState`(此前为生产死代码,客户端内联了一份会漂移的副本)。
53
+ - **死代码清理**:六个无引用 ICONS 条目(clock/fork/arrowUp/arrowDown/moon/
54
+ sun)、两条无匹配死规则(`.vx-swatch:disabled`、`.vx-textarea`)移除;
55
+ `hexToRgb` 收敛到 palette.ts 单一导出实现。
56
+ - **smoke 收紧**:未构建即跑 smoke 给出明确「先 pnpm build」报错而非裸 ENOENT 堆栈;新增 bundle `require()` 字面量 ⊆ `PLATFORM_MODULES` 交叉校验(防未声明外部化导致的静默消失类断裂);`lib/client.js` 落后于 `src/client` 或 `tsdown.config.ts` 时判红(防对过期产物盖章);Windows 下 PATH 探测补 `.exe` 后缀。
57
+ - **typecheck 收编构建配置**:`tsdown.config.ts`、`vitest.config.ts` 进入 `pnpm typecheck` 范围。
58
+ - **CI 补浏览器段**:`setup-chrome` 后跑全量 `pnpm smoke`——客户端注册握手
59
+ (bundle 必须注册 {id, factory} 且不物化、无页面错误)首次进入 CI,此前只
60
+ 在本机跑。
61
+
62
+ ### Tests
63
+
64
+ 测试从 143 增至 185。
65
+
66
+ - **路由错误面**(信任边界此前只测了围栏与备份校验):全部路由的 405、坏
67
+ JSON → 400、流级超限 → 413、timeline/export 缺 `sessionId` → 400、kinds
68
+ 数组内单项非法 → 400、`POST /state` 成功路径与 `applyEdit` 失败 → 400 映射、
69
+ Mermaid 脚本路由引擎未就绪 → 503 及其围栏 403。
70
+ - **状态加载失败处理**:损坏文档隔离、重试耗尽后隔离、瞬态故障恢复后正常合
71
+ 并、隔离失败时 reject 且原文件字节不动。
72
+ - **跨宿主同步合并**:外部写入按段采纳/保留、同一用量行两宿主并发累加的精确
73
+ 并集、全新安装保存不触发合并。
74
+ - **形状门**:合法树/星标通过、重复 id 与非字符串成员拒绝、超深树拒绝、不安
75
+ 全对象键(`JSON.parse` 产生的自有 `__proto__`)拒绝。
76
+ - **装载入口集成测试**(`src/index.ts` 此前零覆盖):全路由与状态工具注册、
77
+ 启动规范化落盘、`stateReady` 前的用量缓冲、500ms 防抖合并为一次写入、损坏
78
+ 文档隔离后继续写入、隔离失败转只读(诊断含 read-only、内存台账仍在、磁盘
79
+ 无写入)、fiber 卸载回收路由/工具并重新武装单例守卫。
80
+ - **单例守卫 / 家目录 / 凭据存储零覆盖补齐**:`mountOnce` 首挂生效、重挂静默、
81
+ fiber 卸载后重武装(effect 须「返回」解标记的契约被锁死);`resolveDshHome`
82
+ 的 `~` 展开与相对路径锚定;keytar 缺席时 `SystemCredentialStore` 全操作软
83
+ 失败(本仓库与最小安装实际走的路径)。
84
+ - **凭据缓存**:TTL 窗口内命中缓存、编辑后失效重解析。
85
+ - **样式不变量**(`styles.spec.ts`):把 0.7.0 的实发 bug 类锁死为断言
86
+ ——`.vx-liquid` 永不出现在 `.vx-root` 之后(死规则类)、磨砂/液态玻璃与余
87
+ 额卡必须按 `:root.vx-dark/vx-light` 主题类出规则、无退役类名(vx-dots /
88
+ vx-timeline)、花括号平衡。测试首次落地就抓出一个存量孤儿 `}`(历史上删
89
+ 媒体块残留,浏览器静默忽略),已清除。
90
+ - **Mermaid 载荷校验**:200-HTML 拒收并落到下一镜像、全部镜像 HTML 时不投毒
91
+ 缓存、过小 200 体拒收。
92
+ - **用量重扫提前中止**:扫描进行中来新用量时,剩余会话不再被读取即返回重试
93
+ 错误。
94
+
95
+ ## 0.7.0 — 2026-09-30
96
+
97
+ 桌面版适配修复版。0.6.0 及之前的产物在 dsh Desktop 里几乎全部功能失效——本版
98
+ 定位根因、修复围栏,并按桌面版重新校准了外观与额度两个界面。
99
+
100
+ ### Fixed
101
+
102
+ - **桌面版全线 `forbidden` 的根因**:插件的访问围栏在回环判定之外额外要求一个
103
+ 浏览器同源标记(`sec-fetch-site: same-origin` 或 `origin` 头),而桌面版
104
+ Electron 壳把渲染进程请求转发给它自己的 Host 之前会删掉 `host`、`origin`、
105
+ `sec-fetch-site`、`cookie`——于是每个 `/api/custom-plugin/*` 路由和
106
+ `/custom-plugin/mermaid.js` 都被误拒为 403 `forbidden`:三种导出、会话搜索、
107
+ Mermaid 引擎预加载与就地渲染(连带 mermaid.live 按钮不出现)、余额与用量、
108
+ 以及**一切静默失败的状态保存**(主题、玻璃模式、项目文件夹、提示词库在桌面
109
+ 版从未真正持久化过)。0.7.0 起围栏对齐官方 API 围栏的信任语义:回环套接字 +
110
+ 回环 Host、非 `cross-site`、`origin` 缺省或与 Host 一致即放行;异源与跨站
111
+ 仍然 403。新增 guard 级单测(桌面转发形状、桌面 WS 形状、异源、跨站、非法
112
+ origin、非回环 Host)与 `scripts/desktop-shape-probe.mjs` 活体探针;并在
113
+ 真实桌面安装(F:\DSH,dsh 0.2.0-rc.2)上实测:11 项通过 / 0 失败。
114
+ - **客户端不再静默吞错**:`loadCfg` / `saveCfg` 失败现在 toast + 上报客户端
115
+ 诊断,「看起来生效其实没存上」从此不可复现。
116
+ - **余额「额度?」的间歇性根因**:宿主对 `api.deepseek.com` 的外呼与桌面版
117
+ GUI 一样走本机直连,而本机代理/安全软件按规则间歇性对 443 做 TLS 解密——
118
+ 被接管的时刻 Node 校验不了其自签名证书(`SELF_SIGNED_CERT_IN_CHAIN`),
119
+ 于是登录时首次查询失败、稍后手动刷新又成功,顶栏停在 `额度?` 上。0.7.0 起
120
+ 宿主把这类连接层失败(TLS 拦截 / DNS / 连接超时)翻译成可读的中文原因,
121
+ 客户端失败后按 8s/30s/30s 自动重试(60 秒轮询继续兜底),顶栏悬停即可看到
122
+ 真实原因。失败态顶栏文案按反馈只显示「额度」两字,不带问号。
123
+
124
+ ### Removed
125
+
126
+ - **极光背景预设**:与整体配色不再协调,从色板中移除;旧存档的 `bg: 'aurora'`
127
+ 在宿主归一化与客户端加载两侧自动迁移为 `default`。
128
+ - **消息时间线轨道**(系统已内置对话时间线):轨道、悬停卡(跳转/星标/分支/
129
+ 全文)、「显示时间线 / 时间线在左侧 / 仅显示星标」三个开关与时间线标签页
130
+ 全部移除;`timeline` / `timelineLeft` / `starsOnly` 配置键退役(旧状态文件
131
+ 里的残留键会被宿主归一化丢弃)。保留:消息尾部的 LaTeX / MathML / Mermaid
132
+ 芯片(其数据链 `/timeline` 原样保留,会话运行期间由 OverlayRoot 每 3 秒
133
+ 轮询驱动)、星标数据字段(备份兼容)与搜索定位跳转。
134
+
135
+ ### Changed
136
+
137
+ - **色板适配深色模式**:20 组色系在深色下不再禁用——按同色系自动派生深色
138
+ 变体(保留色相与低饱和,明度落到深色档,饱和度压缩至 0.55 倍,避免暖色系
139
+ 在深底上抢眼),色板预览即当前模式的实际效果;「深色强制重置背景」的旧
140
+ 逻辑随之移除,主题翻转只重新着色。
141
+ - **头部入口交互统一**:个性化 / 提示词 / 额度三张卡片统一为「点一下显示、
142
+ 再点一下关闭」——额度卡片移除悬停即开与固定/取消固定的混合逻辑,提示词
143
+ 浮层重复点击按钮即可关闭;四个浮层表面(含项目文件夹侧栏)互斥,打开一个
144
+ 自动收起其它。
145
+ - **液态玻璃**:删除「在 Chromium 启用液态玻璃…」的桌面端无关文案;位移折射
146
+ 链上轻微模糊与饱和(`url(#vx-lg) blur(2.5px) saturate(1.12)`),大面积面板
147
+ 中部文字清晰、玻璃可感知;液态模式下「全局浮层玻璃」把同样的位移链延伸到
148
+ 弹窗 / 菜单 / 提示框 / 下拉框与系统设置窗(`CSS.supports` 门控,不支持
149
+ SVG 位移滤镜的引擎回退毛玻璃)。并修复了一个让面板「看起来没有液态」的
150
+ 作用域缺陷:主题毛玻璃底色(64% 白底)特异性压过 10% 液态底色,而本应翻盘
151
+ 的选择器要求 `vx-liquid` 出现在 `.vx-root` 内部(它实际挂在 `<html>` 上),
152
+ 从未匹配——只有不在 `.vx-root` 里的额度浮层是真液态。现以 `:root.vx-liquid`
153
+ 作用域重写液态底色,并把主题类镜像到 `<html>`,所有玻璃表面统一。
154
+ - **点阵背景全局移除**:所有玻璃表面不再渲染滚动的点阵纹理。
155
+ - **额度区改版**:顶栏胶囊在未配置 Key 时显示本机费用估算(`≈¥0.42 · 今日
156
+ N 次`,按官方价目表折算,不用 Key、不联网);配置了 Key 照旧显示真实余额。
157
+ 面板默认区只放用量趋势 / 预算 / 今日明细 / 扫描按钮;「余额查询」收为可折
158
+ 叠可选项(配置过 Key 默认展开),未配置时不再显示任何报错。
159
+ - **价目表更新**(2026-09-30 核对官方页):`deepseek-flash` 峰时输入 ¥2 / 输出
160
+ ¥8 / 缓存命中 ¥0.04(旧名 `deepseek-v4-flash` / `-vision-exp` 仍按 Flash 计
161
+ 价路由),`deepseek-v4-pro` ¥9 / ¥27 不变;闲时一律半价。
162
+
163
+ ## 0.6.0 — 2026-09-30
164
+
165
+ ### Published
166
+
167
+ - `npm publish` went out at 2026-09-29T17:26:16Z — 01:26 local on 2026-09-30, which is
168
+ why this entry is dated 09-30 — and registry `dist-tags.latest` is now `0.6.0`.
169
+ The first `PUT` returned 401, npm opened its browser sign-in flow, and
170
+ the retried `PUT` returned **202 Accepted** — npm then keeps the version
171
+ processing for a few minutes, during which the registry still reads
172
+ `latest: 0.5.0`. Anyone re-checking too early will see "not published"; check
173
+ `time["0.6.0"]` before re-running `npm publish`, because a second publish of an
174
+ accepted-but-processing version fails on the version already existing.
175
+ - The published tarball was unpacked and compared to the repository build:
176
+ `lib/client.js` 207762 B (sha256 `f559cd7f1bd8a49a`), `lib/index.js` 81224 B,
177
+ `package.json`, `cordis.patch.yml`, `icon.svg`, `README.md` — all byte-identical.
178
+ - That registry artifact was then installed into a fresh scratch profile on
179
+ dsh 0.2.0-rc.2 — dsh Desktop's exact bundled version — and scored the same
180
+ 18 pass / 1 skip / 0 fail as the locally packed one.
181
+ - **Install it by exact version for now.** A bare `dsh plugin … add
182
+ @alexpeng/dsh-custom-plugin` resolved `0.4.2` on this machine minutes after
183
+ the publish: the plugin manager reads a cached packument whose `latest` was
184
+ still stale. `@alexpeng/dsh-custom-plugin@0.6.0` installs cleanly. Use
185
+ `npm view @alexpeng/dsh-custom-plugin dist-tags --prefer-online` to read the
186
+ real tag instead of the cached one.
187
+
188
+ ### Changed
189
+
190
+ - **Built against dsh 0.2.0-rc.2, and the declared range now names it.** Every
191
+ `@deepseek-ai/dsh-*` devDependency moved to 0.2.0-rc.2 and the source
192
+ type-checked against that release's own published types with no source
193
+ changes. The gate-relevant peer became
194
+ `@deepseek-ai/dsh-tools >=0.1.7-rc.2 <0.2.0-0 || >=0.2.0-rc.2 <0.2.0-rc.3`,
195
+ and `engines.dsh` was set to the same range. That spelling is load-bearing:
196
+ `^0.1.7-rc.2` desugars to `>=0.1.7-rc.2 <0.2.0-0`, and every `0.2.0-rc.N`
197
+ sorts above `0.2.0-0`, so no caret form can admit a verified prerelease — and
198
+ `^0.2.0-rc.2` would additionally admit 0.2.0 stable plus every later 0.2.x,
199
+ which is exactly the unverified support this range exists to withhold.
200
+ 0.2.0-rc.1 is left out on purpose: the bundle is now built for rc.2.
201
+ - `pnpm smoke`'s two range checks were rewritten, because both encoded the old
202
+ premise that a peer range is a single caret pin. They now assert what is
203
+ actually load-bearing: the installed build target must **satisfy** the peer
204
+ range (same comparator and `includePrerelease` semantics dsh's own gate uses),
205
+ a range that admits every version is rejected as stating no support at all,
206
+ and `engines.dsh` must admit the same versions as the peer range across ten
207
+ probed releases. `semver` became a devDependency to make the first check
208
+ possible. Verified by mutation: a stale range, a `*` range, and a diverging
209
+ `engines.dsh` each turn the gate red.
210
+ - The desktop release line pins its shell and runtime together, so dsh Desktop
211
+ always ships one exact dsh version — this is why 0.2.0-rc.2 stopped being a
212
+ speculative target: any Desktop install *is* that runtime.
213
+
214
+ ### Added
215
+
216
+ - `tests/loopback.spec.ts`: the request-level fence had never had a unit test —
217
+ only the live probe script exercised it. Twelve tests now pin the two header
218
+ shapes dsh Desktop's shell produces (`web-document.ts` deletes `host`,
219
+ `origin`, `cookie` and `sec-fetch-site` before forwarding; the WebSocket
220
+ upgrade rewrites `Origin` to the Host authority), plus the rejections a
221
+ forged Origin, a cross-site marker, and a non-loopback socket must still get.
222
+ - `scripts/desktop-runtime.mjs`: reads which dsh version an **installed** dsh
223
+ Desktop carries, straight out of `resources/app.asar/dsh/desktop-runtime.json`,
224
+ and prints whether the peer range declared here admits it. Promoted from a
225
+ throwaway probe because Desktop pins shell and runtime together, so "what does
226
+ this installer actually run" is a question every future Desktop release
227
+ re-asks and the repository cannot answer. Read-only; takes the installation
228
+ directory or the archive path. Verified in both directions: on this machine's
229
+ install it reports `0.2.0-rc.2 / ADMITTED`, and with the peer range temporarily
230
+ reverted to `^0.1.7-rc.2` the same run reports `REFUSED`.
231
+ - README (both languages) gained an "On dsh Desktop" section: how the shell
232
+ routes requests, why the profile is managed by Desktop's own `dsh` command,
233
+ and which part still needs a window and a login.
234
+
235
+ ### Fixed
236
+
237
+ - **A second dsh host could read a half-written state document.** The atomic
238
+ replace wrote to one shared temp name, `custom-plugin-state.json.tmp`, while
239
+ the queue that serializes saves lives inside a single process. dsh Desktop
240
+ owns `$DSH_HOME/profiles/desktop` and the Web profile owns `profiles/web`,
241
+ but both hosts read and write the same
242
+ `$DSH_HOME/custom-plugin-state.json`, so two hosts saving at the same moment
243
+ wrote and renamed that one temp file against each other — the Windows
244
+ EPERM/EBUSY shape this queue was built to stop, reachable across processes.
245
+ Temp names are now qualified by the writing pid (both the state document and
246
+ the pre-import recovery backup), and a failed turn deletes its own temp
247
+ instead of leaving a per-pid file behind. Building that cleanup surfaced a
248
+ second bug: `rm` was used in the new `catch` but never imported, so a failed
249
+ save reported `ReferenceError` instead of the real rename error and left the
250
+ temp file on disk.
251
+
252
+ ### Verified
253
+
254
+ - **dsh 0.2.0-rc.2, the version Desktop ships.** Confirmed from the installed
255
+ app's own bytes, not the repository: `resources/app.asar/dsh/desktop-runtime.json`
256
+ records `release.version 0.2.0-rc.2`, `node 24.18.1`, `pnpm 11.7.0`, and lists
257
+ `@deepseek-ai/dsh 0.2.0-rc.2` with `@deepseek-ai/cordis 4.0.4` (the version
258
+ this package's cordis peer already names) among its shared packages.
259
+ - 0.5.0 on that runtime behaved as predicted: `dsh plugin --profile web add`
260
+ refused it, naming `peerDependencies {"@deepseek-ai/dsh-tools":"^0.1.7-rc.2"}`,
261
+ and rolled the profile back. With the exemption granted, 18 of 19 live host
262
+ probes passed, 0 failed.
263
+ - **0.6.0 installs on 0.2.0-rc.2 with no exemption at all** (`plugin add` exit
264
+ 0, profile kept), and the same 18-pass/1-skip/0-fail result holds there and on
265
+ 0.1.7-rc.2 — boot graph 66 module rows on 0.2.0-rc.2 and 65 on 0.1.7-rc.2, our
266
+ row served, all
267
+ five `dsh.client.inject` targets present, Mermaid engine loaded locally, UTF-8
268
+ state round trip restored. The single skip is the session-dependent probe; a
269
+ credential-free scratch home holds no session.
270
+ - The rebuild of `pnpm-lock.yaml` (required: the old lockfile cached a
271
+ `minimumReleaseAge` policy snapshot that no longer matched the allow-list, so
272
+ every install was rejected) also moved the dev tree's `mermaid` from 11.17.0
273
+ to 11.17.2. That is inside the declared `^11.6.0`, and the scratch profiles
274
+ used for the live probes resolved 11.17.2 themselves, so the measured Mermaid
275
+ engine is the version an installing user gets.
276
+ - The installed `lib/client.js` is byte-identical to the repository build
277
+ (207762 bytes, sha256 prefix `f559cd7f1bd8a49a`). The *served* bundle is 49
278
+ bytes larger because dsh's composite `/plugins/??…` route joins modules with
279
+ `;\n` and rewrites the `sourceMappingURL` — so byte identity is asserted at
280
+ the installed file, never at the HTTP response.
281
+ - 126 unit tests pass, typecheck is clean, `pnpm smoke` and `check:readme` are
282
+ green. Not verified: opening the plugin inside a real Desktop window (needs a
283
+ login), the desktop profile's own composition, and the per-turn chips.
284
+
285
+ ## 0.5.0 — 2026-09-28
286
+
287
+ ### Changed
288
+
289
+ - **Target dsh 0.1.7-rc.2.** All `@deepseek-ai/dsh-*` dependencies, the
290
+ `@deepseek-ai/dsh-tools` peer range, and `@deepseek-ai/cordis` moved to the
291
+ versions that release ships, and `engines.dsh` now states the supported range.
292
+ dsh checks a bundle's `@deepseek-ai/dsh-*` peer ranges against its own runtime
293
+ version at install and startup and skips a bundle that does not match. The
294
+ declared floor is the release this package was built and verified against;
295
+ `^0.1.7-rc.2` additionally admits later 0.1.x releases that have not been
296
+ re-verified, and `engines.dsh` is declarative — no part of dsh reads it.
297
+ - The browser half declares `dsh.client.inject` as the five packages that own
298
+ the slots it registers into, replacing the retired
299
+ `@deepseek-ai/dsh-client-runtime` row.
300
+ - Slot-provided data shapes (`SessionListState`, `WorkspaceListState`,
301
+ `TurnLocation`) are now declared locally instead of imported from harness
302
+ controller packages that rename across releases; only `SnapshotSelectorHook`
303
+ still comes from the slot SDK.
304
+ - In-session search uses dsh's event index when the deployment opens one and
305
+ otherwise scans the session log it already read, reporting which path answered
306
+ in the panel. dsh's shipped `web` profile configures the index with
307
+ `openAt: never`, so the indexed route was unavailable on a default install.
308
+ - Plugin Manager cards, bundle details, and the settings inventory now show a
309
+ real name and icon: `locale/en.json`, `locale/zh.json`, and `icon.svg`.
310
+
311
+ ### Fixed
312
+
313
+ - **The timeline rail, export, and quote features lost the current session.**
314
+ The session list snapshot has had no `current` field since dsh
315
+ 0.1.6-alpha.2 (view selection moved to the Workspace browser), so the rail
316
+ tracked nothing. The viewed session now comes from the standard `sessionId`
317
+ prop every session-scoped slot entry receives.
318
+ - **Opening a session or a workspace failed silently.** `ctx.sessions.open` is
319
+ gone; navigation goes through `ctx.uiWorkspace.openSession()` /
320
+ `connectWorkspace()`. Branching and full-text search go through
321
+ `ctx.remote.session.fork()` / `.search()` — `ctx.sessions` still declares
322
+ those two, but the remote namespace is the documented surface — each with an
323
+ honest failure message when the service is absent.
324
+ - **Exports lost tool results and the new model-visible messages.** The
325
+ `tool-result` content block was replaced by a tool-role message whose call id
326
+ now sits on the message (`toolCallId`, still falling back to `source.callId`
327
+ for older logs); `system/message` and `developer/message` are exported as
328
+ injected context; and `file`, `tool-addition`, `tool-removal`, and offloaded
329
+ `image` blocks are named instead of dropped.
330
+ - `conversation.chat.turnTail` changed from a chain slot to a list slot, so its
331
+ `select` registration option no longer applies and was replaced by an id and
332
+ order.
333
+ - Client diagnostics are throttled per message kind. The previous single shared
334
+ window let the frequently emitted rail line swallow the one-shot timeline
335
+ result line, which made a successful timeline fetch look like zero turns.
336
+ - `pnpm smoke` now checks the manifest fields dsh reads before it activates a
337
+ bundle (client platform and `./client` export, patch path, icon size, locale
338
+ display metadata, and peer ranges agreeing with the build target), so an
339
+ unsupported or stale declaration fails the local gate instead of being skipped
340
+ silently in a user's profile. The peer check refuses to read a range form it
341
+ cannot interpret, and every `files` entry must resolve to something in the tree
342
+ — an entry matching nothing used to publish a bundle missing that piece. Both
343
+ new rules were confirmed red by breaking them on purpose. The
344
+ `dsh.client.inject` rows are counted, not resolved: only a running shell knows
345
+ which module ids it serves, so a retired name there is caught by the live
346
+ boot-graph probe below, not by this gate.
347
+ - A search excerpt now extends its window so a pasted query longer than two
348
+ thirds of the excerpt is still shown whole. Measured first: the previous
349
+ centering already covered ordinary queries, including a hit at the very end of
350
+ a long message, so only the long-query case was affected — the fix is narrow,
351
+ and the added test fails against the old formula.
352
+ - Exports no longer fail outright on a `tool/result` event whose `message` is
353
+ absent, and the scan fallback reads each event shape through its own typed
354
+ case instead of a cast that hid real field drift.
355
+ - When cross-session full-text search is unavailable, the palette says what still
356
+ works (title matching over sessions and workspaces) instead of showing a bare
357
+ error.
358
+ - Added `scripts/live-dsh-check.sh`: a manual probe that runs against a *running*
359
+ isolated dsh profile and exercises the host half on real session data
360
+ (timeline, the three export formats, the search scan path, usage scan, backup,
361
+ a UTF-8 state round trip, the Mermaid engine route, the client→host diagnostic
362
+ ring, both fences, and the boot graph the shell serves), exiting non-zero on
363
+ any failure. CI has no harness to talk to, so this is the check to run when a
364
+ dsh release lands. Verified against 0.1.7-rc.2 with 19 probes green; the
365
+ session-dependent ones `SKIP` — and the closing line counts them instead of
366
+ claiming a clean sweep — when the scratch home holds no session, and the UTF-8
367
+ probe was shown to distinguish a correct write from the mangled-bytes write it
368
+ guards against.
369
+ - The live check itself was then tested against a dead endpoint and found two of
370
+ its own probes green-by-absence; the restore probe now refuses to pass when the
371
+ append it restores never landed. Running it against a real profile exposed five
372
+ more defects in the tool, all fixed: restoring the prompt library through
373
+ `curl -d "$var"` mangled non-ASCII to U+FFFD (Git Bash re-encodes non-ASCII
374
+ argv for `curl.exe`), so bodies are now written by node and sent with
375
+ `--data-binary @file`; the script checked out with CRLF endings (the stored
376
+ blobs were already LF — `core.autocrlf` was rewriting them on checkout, now
377
+ pinned by `.gitattributes`); its search probe read the query word with a greedy
378
+ `sed` that needed *some* six-letter run anywhere after the last `"text":"`, so
379
+ it silently `SKIP`ped the one probe covering the scan path; it looked for
380
+ sessions under `<state file>/../sessions`, which only finds anything because
381
+ Windows folds the path lexically and would see nothing on a POSIX shell; and
382
+ the real-home guard missed a `DSH_HOME` written with a trailing separator,
383
+ which is exactly the spelling that would have probed a developer's own harness
384
+ home.
385
+ - The READMEs add a plugin-to-dsh compatibility table. A mismatched pair is not
386
+ silent — dsh logs `disabling profile plugin …` on stderr, rejects the install,
387
+ and models the state as `incompatible` in the plugin manager — but none of that
388
+ reaches the page a user is looking at, so the supported window belongs in the
389
+ README.
390
+
391
+ ### Verified by independent review
392
+
393
+ Four reviewers were dispatched against `30e025b..HEAD` with separate charters
394
+ (code correctness, claims-vs-evidence, contract-vs-installed-runtime, and a
395
+ deep re-audit pinned to the previous commit). Their findings were each
396
+ re-verified before being acted on; three of their "critical" items were
397
+ refuted by measurement and are recorded below so nobody re-litigates them.
398
+
399
+ - Fixed: `package.json` declared `"icon"` twice. `JSON.parse` keeps the last
400
+ value, so every gate stayed green on a manifest npm would warn about. `pnpm
401
+ smoke` now counts top-level keys in the file text and compares them with what
402
+ survived parsing, and separately checks that `engines.dsh`'s floor names the
403
+ installed dsh-tools release (nothing in dsh reads `engines.dsh`, so this is
404
+ the only place that keeps it honest).
405
+ - Fixed: the session probes looked under `<state file>/../sessions`, which only
406
+ resolves because Windows folds the path lexically; they now use the home
407
+ directory directly. Skips are counted and named in the closing line, a missing
408
+ boot-graph URL line fails instead of vanishing, the Mermaid probe reads
409
+ `mermaidSource` rather than inferring "local" from a byte count, and a
410
+ rejected state write now carries the host's own error text.
411
+ - Fixed: the restore probe was vacuously green — it never checked that the
412
+ append it restores had landed. It now refuses to pass when the write failed,
413
+ verified by mutating the write condition and watching exactly that line go
414
+ red.
415
+ - Fixed: the client's last-holder clear left `turns` and the rail positions
416
+ behind with no session identity, and a holder whose `sessionId` prop flipped to
417
+ null could wipe the identity other holders were still rendering. A null holder
418
+ now claims nothing at all.
419
+ - Fixed: `slots.inject`'s callback registered the component outside the
420
+ surrounding `try`, so a rejected registration would take a surface down
421
+ silently while the diagnostic ring still read green; the deferred `register`
422
+ has its own guard now, and the summary line reports how many injection
423
+ requests it actually submitted rather than asserting "8 / 7" — dsh defers the
424
+ callback until a slot is declared, so no line printed at install time can
425
+ claim a surface materialized; the per-slot `ok` / `register` lines do that.
426
+ - Fixed: the search request was passed as `as never`, which hid that `values`
427
+ must be `keyof SessionEventMap` rather than `string`; typed, the compiler
428
+ caught it immediately. A synchronous throw from `searchEvents` now degrades to
429
+ the scan path like a rejection does, a log with exactly 100 hits no longer
430
+ claims there are more, and the scan's role filter is exercised by a fixture
431
+ that only it can exclude. Each of the three is pinned by a test that fails
432
+ against the code it replaces (verified by reverting one at a time).
433
+ - Fixed: the sidebar footer button ignored the `wide` prop the host supplies, so
434
+ its label wrapped into a vertical stack inside the 56px rail — measured both
435
+ ways on a live profile: 36px icon-only when collapsed, "项目" again at 280px.
436
+ - Added `scripts/check-boot-graph.mjs`, run by the live check: the served
437
+ `__DSH_BOOT__` graph must contain our row, every `dsh.client.inject` target,
438
+ and reachable client bytes. This is the only gate that can see the failure
439
+ shape that started this whole upgrade — a manifest naming a module the shell no
440
+ longer serves — and it was confirmed red by pointing the inject list at the
441
+ retired `@deepseek-ai/dsh-client-runtime`.
442
+ - Measured against dsh 0.2.0-rc.1 (published the day after this release):
443
+ `dsh plugin add` rejects the bundle and rolls the profile back; with the
444
+ exact-version exemption granted, the source typechecks against 0.2's own
445
+ types, 111/111 unit tests pass, 19/19 live probes pass, and the browser
446
+ behaves as on 0.1.7 — eight slot registrations, the rail, prompt insertion,
447
+ the `Ctrl+K` palette with title search, and quote-reply. The peer range is
448
+ deliberately not widened: `^0.2.0-rc.1` would silently admit every 0.2.x
449
+ release, including a stable nobody has reviewed — the very failure this
450
+ upgrade exists to prevent. What stays unverified there (branch / Mermaid /
451
+ LaTeX chips) is unverified here too: those need a real model reply.
452
+ - Accepted and published: a human walked the isolated 0.1.7-rc.2 profile in a
453
+ browser (personalization panel, prompts into the composer, project folders, the
454
+ timeline rail, quote reply, export entries, `Ctrl+K`) and reported it behaving.
455
+ The same person then ran 0.5.0 on their own machine — dsh upgraded to
456
+ 0.1.7-rc.2, plugin updated through the in-app market — and reported it
457
+ behaving there too. That install's `lib/client.js` is md5
458
+ `6639a0aebbe7d0eed32b0c2c5c50c544`, 207762 bytes: byte-identical to the repo
459
+ build this section describes, so the chain "what was verified = what was
460
+ published = what a user runs" is closed at both ends.
461
+ Not covered by either pass, in this or any release until someone runs it with a
462
+ key: the per-turn chips (branch, Mermaid render, LaTeX/MathML) and the real
463
+ balance figures, all of which need an actual model reply. `0.5.0` was then
464
+ published to npm, and the tarball pulled back from the registry was verified
465
+ byte-identical to the `lib/` this section describes (34 files, 215634 B).
466
+ - Retracted after re-measurement, so the record does not carry them: "the
467
+ `slots.inject(key, fn)` service method does not exist in 0.1.7" (it is
468
+ declared at `dsh-client-ui-renderer`'s registry interface, and all eight
469
+ surfaces materialize in a live browser); "`data-chat-flow-kind` is gone, so the
470
+ rail has no anchors" (the reading was taken while the host's trajectory tab had
471
+ the chat flow unmounted); "`WorkspaceSnapshot.state` was renamed to `phase`"
472
+ (both axes ship side by side). Corrected in place: `ctx.sessions` still
473
+ declares `fork()` and `search()` (only `open` is gone), the `current` field and
474
+ the turnTail kind change both landed in 0.1.6-alpha.2 rather than 0.1.7, and
475
+ the bilingual README gate enforces hash freshness, not content parity.
476
+
477
+ ## 0.4.2 — 2026-09-12
478
+
479
+ ### Fixed
480
+
481
+ - **Exports fail on forked/resumed sessions with "读取会话失败: seeded
482
+ session constructor seed must equal its inherited prefix".** Newer dsh
483
+ builds replay-validate inside `sessionQuery.readSession()` through a
484
+ snapshot-mode constructor that rejects any seeded (forked or resumed) session
485
+ whose log outgrew its seed boundary, so timeline, export, in-session
486
+ search, and usage scans all failed on those sessions. Every read now goes
487
+ through a shared helper that falls back to `observeSession()` (the live and
488
+ restore paths dsh's own session page uses) when `readSession()` rejects, and
489
+ surfaces the original error only when no fallback exists.
490
+ - **The "PDF(含图片)" export button produced an `.html` file.** The button and
491
+ its description now say what actually lands on disk: "HTML(含图片)", a
492
+ print-ready HTML document you turn into a PDF via the browser print dialog.
493
+ - **Weather FX are invisible on light backgrounds.** Snow, rain, and sakura
494
+ colors were tuned for the dark theme only — pure-white flakes, 6%-alpha pale
495
+ rain, and 90%-lightness pink petals all vanish over the near-white palette
496
+ backgrounds. The FX canvas now picks a darker particle palette (cool slate
497
+ snow, steel-blue rain, deeper rose petals, each with a lifted alpha floor)
498
+ whenever the resolved theme is light or the saturated aurora background is
499
+ active, and swaps palettes live on theme/background changes without
500
+ rebuilding the particle field.
501
+
502
+ ## 0.4.1 — 2026-09-09
503
+
504
+ ### Fixed
505
+
506
+ - **Fresh installs show nothing after a "successful" install.** `keytar` (a
507
+ native optional dependency) tripped pnpm 11's strict build-script gate, so
508
+ `dsh plugin add` exited non-zero and the harness never reconciled the bundle
509
+ layer — the package sat inert in `dependencies` with no host half and no
510
+ browser half. `keytar` is no longer a dependency: the OS-keyring adapter
511
+ still detects a `keytar` module present in the profile's `node_modules`, and
512
+ users who want the OS keyring can add it themselves
513
+ (`dsh plugin --profile web add keytar`).
514
+ - The browser half now waits for the `slots` service (a child fiber) before
515
+ mounting its surfaces instead of reading it synchronously: newer dsh builds
516
+ activate the slots provider after this plugin's entry, and the synchronous
517
+ read lost that race every time, logging "slots service unavailable" and
518
+ skipping all UI. The mount stays fail-soft — the GUI boots even when the
519
+ service never appears.
520
+
521
+ ## 0.4.0 — 2026-09-03
522
+
523
+ ### Added
524
+
525
+ - 7 / 30 / 90-day usage trends, per-model summaries, CSV export, and local monthly CNY budget warnings.
526
+ - Versioned, secret-free state backup with previewed merge/replace import and automatic recovery copies.
527
+ - Editable, tagged, sortable favorite prompts with usage recency, `{{variable}}` templates, and JSON / Markdown portability.
528
+ - Indexed current-session search and a Ctrl/Cmd+K command palette backed by DSH's official search APIs.
529
+
530
+ ### Changed
531
+
532
+ - Batch archive skips running sessions and reports separate success and failure counts.
533
+ - Existing prompt and config documents are normalized for the new optional fields.
534
+
535
+ ### Fixed
536
+
537
+ - State-dependent routes now wait for the initial local state load; usage events
538
+ arriving during an import, edit, or usage scan are queued and persisted instead
539
+ of racing a stale snapshot.
540
+ - Backup imports reject malformed counters/configuration, honor imported folder
541
+ parents and sibling order, and keep the 5 MiB document boundary distinct from
542
+ the JSON request envelope.
543
+ - Search hits carry their session id and archive batches retain per-item errors;
544
+ stale cross-session clicks and swallowed archive failures now surface clearly.
545
+ - Malformed persisted peak counters, invalid calendar buckets, failed usage
546
+ rebuilds, and partial state edits are handled without presenting or keeping
547
+ a misleading snapshot; backup requests now validate their envelope fields.
548
+
549
+ ### Security
550
+
551
+ - Backups exclude API keys and credential metadata; imports preserve the active credential.
552
+ - Archive restore remains deferred until DSH exposes an official API.
553
+
554
+ ## 0.1.6 — 2026-09-02
555
+
556
+ ### Fixed
557
+
558
+ - Usage scans now preserve the live ledger when a session read fails or new
559
+ usage arrives during replay, and return the replayed Beijing day so a
560
+ midnight-crossing scan cannot relabel its result.
561
+ - Legacy API-key migration no longer overwrites an existing system credential;
562
+ failed system-key deletion is reported instead of being treated as success.
563
+ - Legacy usage rows without a recoverable peak/off-peak split are marked as
564
+ inexact and are no longer shown with a misleading cost estimate.
565
+ - DeepSeek peak/off-peak cost estimates now treat only Beijing Monday-Friday
566
+ 09:00–12:00 / 14:00–18:00 as peak; weekends are off-peak.
567
+ - The browser usage panel now uses the same Beijing-time day bucket as the
568
+ Host, including when the desktop host runs outside UTC+8.
569
+ - Client state snapshots are serialized in invocation order so rapid settings
570
+ changes cannot be overwritten by an older save completing later.
571
+ - Timeline refreshes ignore stale session/request responses and follow live
572
+ conversation running-state changes.
573
+ - Mermaid modal changes reload correctly, while concurrent CDN loads share one
574
+ in-flight request; the balance hover panel also remains reachable across its
575
+ trigger gap.
576
+
577
+ ### Changed
578
+
579
+ - Centralized the cost formula, added explicit `deepseek-v4-flash-vision-exp`
580
+ pricing, and covered the rule with unit tests.
581
+ - Usage history is pruned to 90 Beijing calendar days; usage scans use four
582
+ concurrent reads and share one in-flight scan instead of duplicating work.
583
+ - The balance panel now shows the peak/off-peak token and cost split, pricing
584
+ source link, and the built-in rule check date.
585
+ - Saved panel keys prefer the optional OS credential store, migrate legacy
586
+ state-file keys when possible, and no longer cross the browser state boundary.
587
+ - Light/dark root theme styles now take precedence over the host OS preference,
588
+ and the build uses the current tsdown dependency configuration without
589
+ deprecation warnings.
590
+
591
+ ### Added
592
+
593
+ - Regression coverage for ordered state saves and shared in-flight Mermaid
594
+ loading.
595
+
596
+ ## 0.1.3 — 2026-08-23
597
+
598
+ ### Fixed
599
+
600
+ - Concurrent state saves are serialized per state file: two racing saves could
601
+ collide on the shared `.tmp` file and fail the rename on Windows; a failed
602
+ debounced save now surfaces in the status-tool diagnostics instead of being
603
+ swallowed silently.
604
+
605
+ ### Added
606
+
607
+ - CI: bilingual README hash consistency check (`node scripts/check-readme-i18n.mjs`)
608
+ — editing one language without the other, or forgetting to re-record the
609
+ hashes in `README.i18n.yaml`, now fails the build instead of drifting silently.
610
+ - CI: Dependabot with monthly schedules (GitHub Actions and grouped npm
611
+ minor/patch bumps); workflow actions upgraded to current majors.
612
+ - `pnpm smoke` — post-build smoke script: headless Edge loads `lib/client.js`
613
+ against a stubbed module loader and asserts the registration handshake, plus
614
+ artifact contract checks (loader banner/footer, node-half ESM import,
615
+ patch row, local Mermaid engine).
616
+ - Tests: the balance key resolution chain (panel → environment → DSH
617
+ credentials, via a new credential-reader seam), state merge edge cases, and
618
+ concurrent-save serialization.
619
+ - Docs: the security section now states explicitly that the panel-pasted key
620
+ is stored in plaintext in the state file (same trust domain as DSH's own
621
+ credentials).
622
+ - This changelog (also shipped in the npm tarball).
623
+
624
+ ## 0.1.2 — 2026-08-23
625
+
626
+ ### Fixed
627
+
628
+ - **Mermaid diagrams in assistant replies now render in place.** The rendering
629
+ entry previously hooked only user messages, so assistant-generated diagrams —
630
+ mindmaps in particular — never got an entry point. A `MutationObserver` now
631
+ scans GUI code blocks and renders ```mermaid``` fences where they are
632
+ (`MermaidInPlace`), without moving any React-owned nodes.
633
+
634
+ ### Changed
635
+
636
+ - Mermaid engine is a local runtime dependency served by the host; the CDN
637
+ mirrors are a fallback only. The source (`local` / `cdn`) is visible in the
638
+ status tool diagnostics.
639
+
640
+ ### Added (repository-side)
641
+
642
+ - GitHub Actions CI (Node 22 + pnpm 11: typecheck / test / build), README
643
+ badges, and a bilingual screenshot gallery under `docs/`.
644
+
645
+ ## 0.1.1 — 2026-08-22
646
+
647
+ ### Security
648
+
649
+ - Mermaid rendering hardened: `securityLevel: strict` (was `loose`), and the
650
+ `/custom-plugin/mermaid.js` engine route is behind the same loopback trust
651
+ fence as every other route.
652
+
653
+ ### Fixed
654
+
655
+ - Peak/off-peak pricing and daily usage buckets are computed in Beijing time
656
+ (UTC+8) regardless of the host machine's timezone; tests are
657
+ timezone-independent.
658
+
659
+ ### Changed
660
+
661
+ - `@deepseek-ai/dsh-tools` moved to `peerDependencies` and externalized from
662
+ the bundle — `lib/index.js` shrinks from ~245 KB to ~45 KB and shares the
663
+ harness instance at runtime.
664
+ - Dead code removed: unused `afterSeq` incremental timeline protocol and cache,
665
+ unused type re-exports, dead client state fields, unconditional startup log.
666
+
667
+ ### Added
668
+
669
+ - Self-contained `prepare` script — GitHub source installs build themselves
670
+ (pnpm ≥ 10 users: allowlist the build script, see README).
671
+ - Package metadata: `repository`, `author`, `bugs`, `homepage`,
672
+ `engines` (Node ≥ 22); LICENSE copyright line filled in.
673
+
674
+ ## 0.1.0 — 2026-08-22
675
+
676
+ Initial release: a personalization suite for the DSH web GUI, mounted through
677
+ the official profile mechanism without touching DSH source.
678
+
679
+ - Appearance: background palettes, liquid glass, weather effects
680
+ (rain / sakura / snow).
681
+ - Per-user-message timeline rail with stars and branching.
682
+ - Multi-level project folders; prompt library.
683
+ - Conversation export (JSON / Markdown / PDF with images).
684
+ - Mermaid rendering; quote reply.
685
+ - DeepSeek balance and daily token usage (peak/off-peak aware).
686
+ - `custom_plugin_status` agent-facing diagnostic tool.