deepseek-harness-background 0.5.2 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -50,12 +50,21 @@ The look (fixed wallpaper layer + theme-aware scrim + translucent glass panels d
50
50
  - **Frosted glass (whitelisted)** — while a background is active, only the surfaces that float as small cards over the wallpaper turn into translucent glass (specular sheen + `backdrop-filter`): the composer card and message bubbles, code blocks / terminal / diff / tool-IO cards / skill & MCP call cards and inline code, the agent task strips and their takeover panels (approval / question / plan review), the chrome buttons (new session, composer plus, scroll-to-bottom), the load-earlier history button, the subagent lineage popover, the sidebar build badge, and the home hero "preview" badge — every glassed surface carries the full recipe (fill + sheen + blur), never translucency without frost. Reading surfaces — dialogs, the settings UI, menus, tooltips, toasts, hover fills and every accent (the send button stays blue) — keep their **official opaque paints** so nothing legible turns washy (the one documented exception: the turn rail's hover preview, which is rail chrome over the art and joins the glass sheet). The blur radius is driven by the glass-blur slider; `panelOpacity` at 100% restores the official paints on the whitelisted list too.
51
51
  - **Third-party glass registry** — any plugin can register its own panels into the same frosted-glass system through the published bridge (`window.__DSH_BACKGROUND_GLASS__` global + the `dsh-background-glass:ready` event): *token* mode adds the missing sheen + blur chain when the panel already fills with an overridden `--dsw-*` token, *fill* mode takes the fill over as well; every rule sits under the `data-dsh-bg-glass` gate so it toggles with the glass automatically. Consumers take zero dependencies and degrade gracefully when this plugin is absent; the whole bridge tears down with it. See [docs/GLASS_API.md](docs/GLASS_API.md).
52
52
  - **Conversation timeline** — the DeepSeek-web turn-navigation rail at the right edge of long conversations, one tick per question, with a hover/focus preview of that turn's prompt. Two frontends, one backend, chosen by what the running kernel supports:
53
- - **dsh ≥ 0.1.2 (enhancement)** — the kernel ships this rail already, so the plugin renders nothing of its own and only fixes its behaviour, scoped to what the running rail still lacks (a capability check on the rail's own published metrics, never a version compare). Clicks on a **loaded** mark become a **smooth glide** instead of the stock instant jump (ease-in-out, distance-paced, cancelled the moment the reader scrolls, `prefers-reduced-motion` places directly). On **0.1.2-alpha.1/2** the rail lists only loaded turns, so reaching for it also pages older history in — turns behind "load earlier" get a tick and become reachable, stopping at the rail's own uncompressed capacity, past which the official stylesheet would squeeze the marks into an unaimable bar. On **0.1.2-alpha.3+** the official rail rebuilt itself (fixed-pitch marks scrolling inside a frame, fed by the whole-log turn outline: every turn renders, unloaded ones page on demand), so the plugin narrows to the smooth glide alone — click indexes are resolved against the same merged ladder the kernel renders, marks outside the loaded window are left to the kernel's own jump, and the warm-up does not run. Because the official hover preview card paints an opaque fill, it joins the glass sheet under the wallpaper gate instead (same explicit-fill recipe as the composer card, driven by the glass-blur slider). The rail's active-mark state stays the kernel's own — the glide scrolls the real scrollport, so the stock scroll handler keeps updating it and the persisted scroll position.
54
- - **dsh ≤ 0.1.1 (ported rail)** — no official rail exists, so the plugin renders its own port of it (identical metrics, plus the same glass treatment), fed by the same backend.
55
- In both cases the bottom-follow state is detached one frame before the glide (streaming growth / turn-end re-renders cannot yank it back to the floor), messages withdrawn by a rewind are dropped automatically (the target parser accepts `seq 42` / `#42` / english-chinese verb forms plus structured fields, and recognizes third-party `data-dsh-rewind-hidden` node markers), and wherever this plugin pages history itself (the ported rail and the alpha.1/2 rail) every page compensates the prepended height so the reader's view never moves. Toggle it off with the timeline switch in the row.
53
+ - **dsh ≥ 0.1.2-rc.1 (enhancement)** — the kernel ships this rail already, so the plugin renders nothing of its own and only fixes its behaviour (a capability check on the rail's own published metrics, never a version compare). Clicks on a **loaded** mark become a **smooth glide** instead of the stock instant jump (ease-in-out, distance-paced, cancelled the moment the reader scrolls, `prefers-reduced-motion` places directly). The rail's full ladder (`turnOutline` outline + loaded window) leaves **unloaded** marks to the kernel's own loadThrough jump — and while one of those kernel jumps is still paging (the mark pulses `aria-busy`) the plugin stands down entirely. Because the official hover preview card paints an opaque fill, it joins the glass sheet under the wallpaper gate instead (same explicit-fill recipe as the composer card, driven by the glass-blur slider); the tick column carries the DeepSeek-web edge dissolve (paint layer only, hit-testing untouched). The rail's active-mark state stays the kernel's own — the glide scrolls the real scrollport, so the stock scroll handler keeps updating it and the persisted scroll position. The bottom-follow state is detached one frame before the glide (streaming growth / turn-end re-renders cannot yank it back to the floor). Toggle it off with the timeline switch in the row.
56
54
  - **Persisted in the official settings document** (`$DSH_HOME/settings.yaml`), waits out restarts.
57
55
  - **Clean teardown** — disabling, clearing or uninstalling restores the original background exactly; the plugin only ever removes what it wrote.
58
56
 
57
+ ## Version compatibility
58
+
59
+ | Plugin release | Supported dsh versions |
60
+ | --- | --- |
61
+ | **Current (≥ 0.5.3)** | **dsh ≥ 0.1.2-rc.1** |
62
+ | 0.5.2 | dsh 0.1.1-rc.2 and 0.1.2-alpha.1 ~ alpha.5 |
63
+
64
+ ⚠️ **On older dsh (0.1.1-rc.2, 0.1.2-alpha.x or earlier) install an older
65
+ plugin release** (`dsh plugin --profile web add deepseek-harness-background@0.5.2`);
66
+ this plugin no longer adapts to the pre-rc.1 kernels.
67
+
59
68
  ## Install
60
69
 
61
70
  The plugin is a standard out-of-tree dsh bundle, published on npm:
@@ -103,7 +112,7 @@ dsh --profile web
103
112
  | 毛玻璃模糊 / Glass blur | `0..40px` `backdrop-filter` blur on the translucent surfaces (1px steps). |
104
113
  | 壁纸模糊 / Wallpaper blur | `0..60px` blur of the wallpaper image itself (2px steps). |
105
114
  | 填充方式 / Fit | `cover` or `contain`. |
106
- | 会话时间线 / Timeline | on/off switch for the conversation timeline (default on). On dsh ≥ 0.1.2 the row is labelled 会话时间线增强 / *enhancement*: the official rail stays and this only improves its behaviour; turning it off restores stock behaviour. The copy follows the kernel generation — full enhancement on alpha.1/2, smooth-jump-only on alpha.3+. On older kernels the row is 会话时间线 / *timeline* and the switch controls the plugin's own ported rail. |
115
+ | 会话时间线 / Timeline | on/off switch for the conversation timeline (default on). On dsh ≥ 0.1.2-rc.1 the row is labelled 会话时间线增强 / *enhancement*: the official rail stays and this only improves its behaviour (smooth jumps for loaded turns); turning it off restores stock behaviour. |
107
116
 
108
117
  5. **清除背景** removes the background and restores the stock look.
109
118
 
@@ -112,7 +121,7 @@ dsh --profile web
112
121
  - The **settings row** lives in the official General settings section (`settings.general.item` slot), next to the Appearance row. Its chrome uses only `--dsw-alias-*` design tokens (buttons / pills / segmented control / slider track match the official shell); sliders are native `input[type=range]` with 5% / 1–2px steps and release-commit.
113
122
  - The plugin's own host routes (`/api/bg-wallpaper/*`: `settings`, `upload`, `image/<id>`) read/write the section and serve uploads with same-origin + size caps + MIME/signature checks + a path-escape fence. A custom route family is used because the api-proxy settings allowlist does not expose third-party namespaces over the settings RPC.
114
123
  - The background is drawn as a fixed `z-index:-2` wallpaper layer plus a `z-index:-1` scrim on `body`, toggled by the `data-dsh-bg` attribute; the scrim switches white/black by `data-ds-dark-theme` in the injected stylesheet. Frosted glass is whitelist-scoped: only the whitelisted surfaces get `--dsw-*` surface-token overrides, while everything else is painted by explicit `data-dsh-bg-glass`-gated rules carrying the FULL recipe (fill + sheen + blur chain): the three chrome buttons, the load-earlier history button, the composer dock family (agent task strips TodoPanel / GoalBar / QueueDock and their takeover panels — approval, question, plan review — whose tokens turn translucent and need the blur added), the subagent lineage popover, the home hero preview badge and the sidebar build badge — every other official token and reading surface (menus, dialogs, tooltips, toasts) stays untouched.
115
- - The **timeline** is registered into the `conversation.input.dock` slot (per-session lifecycle). Mode detection is a capability check on the slot props rather than a version compare: the official rail is rendered from the very index `ui-chat` publishes as a session hook (`useChat(s => s.navigation.items())`, dsh >= 0.1.2), so the presence of that hook *is* the presence of the official rail — and it survives pre-releases, forks and deployments that mount a different conversation target. With the hook the plugin renders nothing and intercepts the official rail clicks in the **capture** phase (React 18 dispatches `onClick` from the root container during the bubble phase, so a capture listener on the rail runs first and `stopImmediatePropagation()` keeps the stock handler from ever firing) — resolving the click index against the ladder the kernel actually renders: the loaded items alone on the compressing alpha.1/2 rail, and on the alpha.3 frame-style rail the same outline-plus-loaded merge the kernel renders, with marks outside the loaded window (no anchor key) left to the kernel's own load-through jump — and while one of those kernel jumps is still paging (a mark pulses `aria-busy`) the plugin stands down entirely, because the kernel's loaded branch cancels its own pending jump before landing and an interception would bypass that cancellation; without the hook the plugin renders its own port of the rail, portaled to `body`. Both run the same jump engine. Data comes, fastest first, from a host-side session projection (`bgTimeline`, registered in `src/projection.ts`) that enumerates every user message of the whole session — including turns the conversation has not paged in yet — with the loaded chat-node window as fallback; that window is read duck-typed across both kernel generations, because 0.1.2 moved the Chat snapshot from `session.getSnapshot().chat` to `useChat()`, the one breaking change for this plugin. History warm-up runs only when the reader reaches for the rail — and only where it is still wanted: the compressing alpha.1/2 rail and the ported one, stopping at the rail uncompressed tick capacity (`floor((height - 12) / 10) + 1`); the alpha.3 frame-style rail lists every turn already and pages on demand itself, so warming would only fight the kernel's pager. Every page compensates the prepended height, because the host own prepend anchor is unreachable from outside. The ported rail carries the same **glass treatment as the enhanced official one** — the hover preview joins the frosted-glass sheet under the wallpaper gate (same explicit-fill recipe as the composer card) — so both frontends look identical to the reader.
124
+ - The **timeline** is registered into the `conversation.input.dock` slot (per-session lifecycle). Detection is a capability check on the slot props rather than a version compare: the official rail is rendered from the very index `ui-chat` publishes as a session hook (`useChat(s => s.navigation.items())`, dsh >= 0.1.2), so the presence of that hook *is* the presence of the official rail — and it survives pre-releases, forks and deployments that mount a different conversation target. With the hook the plugin renders nothing and intercepts clicks on the official rail's **loaded** marks in the **capture** phase (React 18 dispatches `onClick` from the root container during the bubble phase, so a capture listener on the rail runs first and `stopImmediatePropagation()` keeps the stock handler from ever firing) — resolving the click index against the merged ladder the kernel actually renders (`turnOutline` outline + loaded window, mirroring `mergeTurnRailItems` in ui-chat), with marks outside the loaded window (no anchor key) left to the kernel's own load-through jump — and while one of those kernel jumps is still paging (a mark pulses `aria-busy`) the plugin stands down entirely, because the kernel's loaded branch cancels its own pending jump before landing and an interception would bypass that cancellation. The official hover preview joins the glass sheet under the wallpaper gate (same explicit fill recipe as the composer card), and the tick column carries the DeepSeek-web edge dissolve. Supported baseline: dsh >= `0.1.2-rc.1`; older dsh (0.1.2-alpha.x and 0.1.1-rc.2 or earlier) installs an older plugin release (see Version compatibility).
116
125
  - The **third-party glass registry** (`src/client/glass-registry.ts`) publishes its bridge on client apply — before any repaint can race it: `register({ plugin, selectors, mode })` is idempotent per (plugin, mode, selector) triple and synthesizes explicit `body[data-dsh-bg-glass]`-gated recipe rules into a dedicated `<style data-plugin-css>` tag; selectors are structurally validated first (no `{ } ; @ < > ,`, no backslashes, 500-char cap) with per-selector warn-and-drop that never blocks valid siblings; disposing the client fiber retracts the whole bridge (stylesheet, entries, window key). Contract docs in `docs/GLASS_API.md` / `GLASS_API.zh.md`; behavior locked by `tests/glass-registry.spec.ts`.
117
126
  - Uploads live under `$DSH_HOME/deepseek-harness-background/` (content-addressed ids). Switching to a new image or clearing the background deletes the superseded upload file, so the directory does not accumulate dead images in normal use. (An upload that is never saved into the section — e.g. the tab closes right after an upload — can leave one orphaned file behind.) Disable / uninstall leaves nothing behind.
118
127
 
@@ -135,22 +144,17 @@ deepseek-harness-background/ # the plugin repo (package name stays the
135
144
  │ ├── routes.ts # /api/bg-wallpaper/{settings,upload,image/<id>}
136
145
  │ ├── schema.ts # host-side schemastery schema
137
146
  │ ├── settings.ts # constants/types shared with the client
138
- │ ├── projection.ts # bgTimeline session projection (full user-message index for the rail)
139
147
  │ ├── harness-home.ts # $DSH_HOME / ~/.dsh resolution
140
148
  │ └── client/
141
149
  │ ├── index.ts # painter lifecycle + settings row registration
142
150
  │ ├── backdrop.ts # fixed wallpaper layer + scrim + glass surface + preview vars
143
- │ ├── background-css.ts # injected stylesheet (layers, glass, light/dark scrim, variables)
151
+ │ ├── background-css.ts # injected stylesheet (layers, glass, light/dark scrim, variables, read_image card)
144
152
  │ ├── glass-registry.ts # third-party glass registry (window bridge + gated rule synthesis)
145
153
  │ ├── timeline/
146
- │ │ ├── index.tsx # dock entry: mode dispatch + re-exports
147
- │ │ ├── official-enhance.tsx # dsh>=0.1.2: smooth-jump interception (+ warm-up on the alpha.1/2 rail)
148
- │ │ ├── legacy-rail.tsx # dsh<=0.1.1: ported official turn rail
149
- │ │ ├── legacy-rail-css.ts # rail stylesheet (dsbt- prefixed, official metrics)
150
- │ │ ├── jump.ts # shared jump engine (paging + glide + compensation)
151
- │ │ ├── source.ts # shared data source (projection + node window)
152
- │ │ ├── rail-pointer.ts # tick geometry & capacity (official metrics)
153
- │ │ ├── mode-store.ts # detected mode, for the settings row
154
+ │ │ ├── index.tsx # dock entry: official-rail capability probe + re-exports
155
+ │ │ ├── official-enhance.tsx # dsh>=0.1.2-rc.1: smooth-jump interception for loaded marks
156
+ │ │ ├── jump.ts # shared jump engine (paging + glide)
157
+ │ │ ├── rail-pointer.ts # frame-rail tick geometry & full-ladder merge
154
158
  │ │ └── types.ts # shared shapes
155
159
  │ ├── SettingsRow.tsx # the General-settings row (preview surface + stepped sliders)
156
160
  │ ├── SettingsRow.module.css # row styles (official tokens)
package/README.zh.md CHANGED
@@ -49,10 +49,20 @@
49
49
  - **主题自适应遮罩** —— 浅色主题用白色纱帘(把图片提亮保持深色文字对比度),深色主题自动换成黑色纱帘(压暗图片保持浅色文字对比度)。
50
50
  - **毛玻璃(白名单制)** —— 启用背景后,只有以小卡片/小按钮形态悬浮在壁纸上的表面才会变成半透明玻璃(顶部白色高光渐变 + `backdrop-filter`):输入框卡片与消息气泡、代码块 / 终端 / diff / 工具 IO 卡 / 技能与 MCP 调用卡与行内代码、agent 任务条及其接管面板(审批 / 提问 / 计划评审)、三个铬件按钮(新会话、输入框加号、回到底部)、「加载更早」历史按钮、标题栏展开的子代理列表面板、侧栏构建徽标,以及首页右上角的「预览版」徽标——每块玻璃面都带完整配方(填充 + 高光 + 模糊),绝无"只透明不磨砂"的残缺面。阅读型表面——对话框、设置界面、菜单、Tooltip、Toast、悬停填充与所有强调色(发送键保持品牌蓝)——一律保留**官方不透明样式**,保证可读性(唯一例外:时间线导航轨的悬浮预览卡,它是画在壁纸上的导航铬件,加入玻璃配方)。模糊半径由「毛玻璃模糊」滑块驱动;「面板不透明度」调至 100% 时白名单表面也恢复官方原样。
51
51
  - **第三方毛玻璃接口** —— 内置毛玻璃注册表(`window.__DSH_BACKGROUND_GLASS__` 全局 + `dsh-background-glass:ready` 事件):任何插件都可把自家面板的选择器注册进来,套上与内置表面完全一致的配方——`token` 模式为已使用被覆盖 `--dsw-*` 填充的面板补齐高光+模糊链,`fill` 模式连填充一并接管;规则统一挂在 `data-dsh-bg-glass` 门控下随玻璃自动开关。消费方零依赖、未安装本插件时优雅降级,本插件卸载时整桥拆除。详见 [docs/GLASS_API.zh.md](docs/GLASS_API.zh.md)。
52
- - **会话时间线** —— 长会话右缘的 DeepSeek 官网风格轮次导航轨:每一轮一个刻度,悬停或聚焦时预览该轮的问题。 两套前端、同一套后端,按当前内核支持的能力自动选择: - **dsh ≥ 0.1.2(增强)** —— 内核已经自带这条导航轨,因此插件不渲染任何自己的界面,只修正它仍欠缺的行为(按导航轨自己发布的度量做能力探测,绝不比较版本号): 对**已加载**轮次的点击由官方的瞬时跳转改为**平滑滑动**(缓入缓出、按距离定时长、读者一滚动立刻接管、`prefers-reduced-motion` 下直接定位)。 在 **0.1.2-alpha.1/2** 上导航轨只列出已加载的轮次,因此读者把手伸向导航轨时还会自动往回翻页加载历史,让“需要点加载更多才出现”的轮次也长出刻度、可以直接跳转 —— 补到导航轨自身不压缩的刻度上限为止(再往后官方样式表会把刻度挤成无法瞄准的实心条)。 在 **0.1.2-alpha.3+** 上官方重构了导航轨(固定间距刻度在框内滚动,数据来自全会话轮次大纲:每一轮都在轨上,未加载的轮次由内核自行翻页),插件相应收窄为只保留平滑滑动 —— 点击索引按内核渲染的同一份合并阶梯解析,已加载窗口之外的刻度交给内核自己的跳转机器,历史预热不再运行。官方悬浮预览卡是实心底,在壁纸门控下改为与输入卡同配方的毛玻璃(受「毛玻璃模糊」滑块驱动);刻度列加上 DeepSeek 网页版式的上下渐隐(仅绘制层,不影响命中测试)。导航轨的高亮状态仍归内核自己维护——滑动走的是真实滚动容器,官方滚动处理会持续更新活动轮次与持久化滚动位置。 - **dsh ≤ 0.1.1(移植版)** —— 没有官方导航轨,插件渲染自己移植的同一套界面(完全相同的尺寸,同样带上玻璃 + 上下渐隐), 数据来自同一套后端。 两种情况下,滑动前都会先解除宿主的底部跟随状态(流式增长、轮次结束重渲染都不会把视图拽回底部);被 rewind 撤回的消息自动从轨道剔除; 凡插件自己翻页加载历史的地方(移植轨与 alpha.1/2 轨),每一页都会补偿前置内容的高度,读者视野纹丝不动。用设置行里的时间线开关可关闭。
52
+ - **会话时间线** —— 长会话右缘的 DeepSeek 官网风格轮次导航轨:每一轮一个刻度,悬停或聚焦时预览该轮的问题。 本插件**不渲染任何自己的界面**——从 dsh 0.1.2-rc.1 起内核自带官方导航轨,插件只增强其行为(按导航轨自己发布的度量做能力探测,绝不比较版本号): 对**已加载**轮次的点击由官方的瞬时跳转改为**平滑滑动**(缓入缓出、按距离定时长、读者一滚动立刻接管、`prefers-reduced-motion` 下直接定位); 官方轨的全量阶梯(`turnOutline` 大纲 + 已加载窗口)中,**未加载**轮次的刻度交给内核自己的穿越加载跳转,且当内核跳转仍在翻页(`aria-busy` 脉冲)时插件整体让位; 官方悬浮预览卡是实心底,在壁纸门控下改为与输入卡同配方的毛玻璃(受「毛玻璃模糊」滑块驱动); 刻度列加上 DeepSeek 网页版式的上下渐隐(仅绘制层,不影响命中测试)。 导航轨的高亮状态仍归内核自己维护——滑动走的是真实滚动容器,官方滚动处理会持续更新活动轮次与持久化滚动位置; 滑动前都会先解除宿主的底部跟随状态(流式增长、轮次结束重渲染都不会把视图拽回底部)。用设置行里的时间线开关可关闭。
53
53
  - **持久化到官方设置文档** —— 存于 `$DSH_HOME/settings.yaml`,跨重启保留。
54
54
  - **干净卸载** —— 关闭、清除或卸载后完整恢复原背景;插件只移除自己写过的内容。
55
55
 
56
+ ## 版本兼容
57
+
58
+ | 本插件版本 | 支持的 dsh 版本 |
59
+ | --- | --- |
60
+ | **当前版本(≥ 0.5.3)** | **dsh ≥ 0.1.2-rc.1** |
61
+ | 0.5.2 | dsh 0.1.1-rc.2 与 0.1.2-alpha.1 ~ alpha.5 |
62
+
63
+ ⚠️ **使用旧版 dsh(0.1.1-rc.2、0.1.2-alpha.x 或更早)请安装本插件的旧版本**
64
+ (`dsh plugin --profile web add deepseek-harness-background@0.5.2`),本插件已停止对旧内核的适配。
65
+
56
66
  ## 安装
57
67
 
58
68
  这是一个标准的 out-of-tree dsh bundle,已发布到 npm:
@@ -100,14 +110,14 @@ dsh --profile web
100
110
  | 毛玻璃模糊 | `0..40px` 半透明表面上的 `backdrop-filter` 模糊(1px 步进)。 |
101
111
  | 壁纸模糊 | `0..60px` 壁纸图片本身的模糊(2px 步进)。 |
102
112
  | 填充方式 | `cover`(铺满)或 `contain`(完整)。 |
103
- | 会话时间线 | 会话时间线的开关(默认开启)。dsh ≥ 0.1.2 上该项显示为**会话时间线增强**:官方导航轨保留,插件只优化其行为,关掉即恢复官方原样(说明文案随内核代际分两版——alpha.1/2 完整增强,alpha.3+ 仅平滑跳转);旧内核上该项为**会话时间线**,开关控制插件自己移植的导航轨。 |
113
+ | 会话时间线 | 会话时间线的开关(默认开启)。dsh ≥ 0.1.2-rc.1 上该项显示为**会话时间线增强**:官方导航轨保留,插件只优化其行为(已加载轮次的平滑跳转),关掉即恢复官方原样。 |
104
114
 
105
115
  5. 点 **清除背景** 移除背景,恢复默认外观。
106
116
 
107
117
  ## 原理
108
118
 
109
119
  - **设置行**位于官方「通用」设置分区的 `settings.general.item` 槽中,紧挨「外观」行。控件样式全部使用 `--dsw-alias-*` 设计 token(按钮 / 胶囊 / 分段控件 / 滑块轨道与官方 chrome 一致),滑块为原生 `input[type=range]` 的 5% / 1–2px 步进 + 松手提交。
110
- - **会话时间线**注册进 `conversation.input.dock` 槽位(绑定每会话生命周期)。模式判定是对槽位 props 的能力探测,而不是比较版本号: 官方导航轨正是由 `ui-chat` 以会话 hook 形式发布的同一份索引渲染的(`useChat(s => s.navigation.items())`,dsh ≥ 0.1.2), 所以这个 hook 存在**就是**官方导航轨存在 —— 而且它能扛住预发布版、fork 以及挂载了其它会话目标的部署。 hook 存在时插件什么都不渲染,只在**捕获阶段**拦截官方导航轨的点击(React 18 在冒泡阶段由根容器派发 `onClick`, 所以导航轨上的捕获监听先执行,`stopImmediatePropagation()` 让官方处理器根本收不到事件)——点击索引按内核实际渲染的阶梯解析:压缩式 alpha.1/2 轨上是已加载条目本身,alpha.3 帧式轨上则是与内核同构的「大纲 + 已加载」合并阶梯,已加载窗口之外(无锚键)的刻度交给内核自己的穿越加载跳转——且当内核跳转仍在翻页(标记以 `aria-busy` 脉冲)时插件整体让位:内核的已加载分支落点前会先取消自己的在途跳转,拦截会绕过这一取消;hook 不存在时插件渲染自己移植的导航轨,portal 到 `body`。 两者跑同一个跳转引擎。数据最快的来源是宿主侧会话投影(`bgTimeline`,注册于 `src/projection.ts`), 它枚举整个会话的每一条用户消息(含会话视图尚未分页载人的轮次),已加载的 chat 节点窗口作为兜底; 该窗口以鸭子类型同时兼容两代内核,因为 0.1.2 把 Chat 快照从 `session.getSnapshot().chat` 迁到了 `useChat()` —— 这是本插件唯一一处破坏性变更。 历史预热只在读者把手伸向导航轨时运行——而且只在其仍有意义的地方运行:压缩式 alpha.1/2 轨与移植轨,并停在导航轨不压缩的刻度上限(`floor((高度 - 12) / 10) + 1`); alpha.3 帧式轨已列出每一轮并自行按需翻页,预热只会与内核的翻页器相互踩踏,故不运行。 每一页都补偿前置内容的高度,因为宿主的 prepend 锚点在插件侧无法触及。移植版导航轨与增强后的官方轨采用完全一致的**玻璃 + 上下渐隐处理** —— 悬浮预览在壁纸门控下加入毛玻璃配方(与输入卡片同一显式填充配方),刻度列带 DeepSeek 网页版式上下渐隐,两个前端对读者的视觉完全一致。
120
+ - **会话时间线**注册进 `conversation.input.dock` 槽位(绑定每会话生命周期)。判定是对槽位 props 的能力探测,而不是比较版本号: 官方导航轨正是由 `ui-chat` 以会话 hook 形式发布的同一份索引渲染的(`useChat(s => s.navigation.items())`,dsh ≥ 0.1.2), 所以这个 hook 存在**就是**官方导航轨存在 —— 而且它能扛住预发布版、fork 以及挂载了其它会话目标的部署。 hook 存在时插件什么都不渲染,只在**捕获阶段**拦截官方导航轨**已加载刻度**的点击(React 18 在冒泡阶段由根容器派发 `onClick`, 所以导航轨上的捕获监听先执行,`stopImmediatePropagation()` 让官方处理器根本收不到事件)——点击索引按内核实际渲染的合并阶梯解析(`turnOutline` 大纲 + 已加载窗口,与 `ui-chat` 的 `mergeTurnRailItems` 同构),已加载窗口之外(无锚键)的刻度交给内核自己的穿越加载跳转——且当内核跳转仍在翻页(标记以 `aria-busy` 脉冲)时插件整体让位:内核的已加载分支落点前会先取消自己的在途跳转,拦截会绕过这一取消。 官方导航轨的悬浮预览在壁纸门控下加入毛玻璃配方(与输入卡片同一显式填充配方),刻度列带 DeepSeek 网页版式上下渐隐。 支持基线为 dsh ≥ `0.1.2-rc.1`;更旧的 dsh(0.1.2-alpha.x 与 0.1.1-rc.2 及更早)请安装本插件旧版本(见「版本兼容」)。
111
121
  - 插件自有的 host 路由(`/api/bg-wallpaper/*`:`settings`、`upload`、`image/<id>`)负责读写设置与提供上传图片,带同源校验、大小上限、MIME/签名校验与路径穿越防护。使用自定义路由族,是因为 api-proxy 的 settings 白名单不向第三方命名空间开放 settings RPC。
112
122
  - 背景以 `body` 上一张固定的 `z-index:-2` 壁纸层 + `z-index:-1` 遮罩绘制,由 `data-dsh-bg` 属性开关;遮罩在注入样式表里按 `data-ds-dark-theme` 切换白/黑纱帘。毛玻璃为白名单制:仅对输入/气泡/代码/任务条等白名单表面覆盖 `--dsw-*` surface token,其余表面通过 `data-dsh-bg-glass` 门控的显式规则补齐整套配方(填充 + 高光 + 模糊滤镜链):三个 chrome 按钮、「加载更早」历史按钮、composer 坞列家族——agent 任务条(TodoPanel / GoalBar / QueueDock)与接管面板(审批 / 提问 / 计划评审,token 变半透明后由这里补上模糊)、子代理列表弹出层、首页「预览版」徽标、侧栏构建徽章——全部官方 token 与阅读型界面(菜单/对话框/tooltip/toast)保持原样。
113
123
  - **第三方玻璃注册表**(`src/client/glass-registry.ts`):客户端 apply 时即在 `window.__DSH_BACKGROUND_GLASS__` 发布注册 api 并派发 `dsh-background-glass:ready`;`register({ plugin, selectors, mode })` 按 `(plugin, mode, selector)` 三元组幂等登记,把 `body[data-dsh-bg-glass]` 门控的显式配方规则合成进独立的 `<style data-plugin-css>` 标签;选择器先做结构性校验(禁 `{} ; @ < > ,` 与反斜杠、500 字符上限),违规条目逐条警告并丢弃、不影响兄弟条目;fiber dispose 时整桥拆除(样式表、条目、window 键全清)。契约文档见 `docs/GLASS_API.md` / `GLASS_API.zh.md`,行为由 `tests/glass-registry.spec.ts` 锁定。
@@ -132,28 +142,23 @@ deepseek-harness-background/ # 插件仓库(包名保留 npm 风格 i
132
142
  │ ├── routes.ts # /api/bg-wallpaper/{settings,upload,image/<id>}
133
143
  │ ├── schema.ts # host 侧 schemastery schema
134
144
  │ ├── settings.ts # 两端共享的常量/类型
135
- │ ├── projection.ts # bgTimeline 会话投影(时间线的全量用户消息索引)
136
145
  │ ├── harness-home.ts # $DSH_HOME / ~/.dsh 解析
137
146
  │ └── client/
138
147
  │ ├── index.ts # painter 生命周期 + 设置行注册
139
148
  │ ├── backdrop.ts # 固定壁纸层 + 遮罩 + 玻璃表面 + 预览变量
140
- │ ├── background-css.ts # 注入的样式表(层、玻璃、明暗遮罩、变量)
149
+ │ ├── background-css.ts # 注入的样式表(层、玻璃、明暗遮罩、变量、read_image 卡)
141
150
  │ ├── glass-registry.ts # 第三方毛玻璃注册表(window 桥 + 门控规则合成)
142
151
  │ ├── timeline/
143
- │ │ ├── index.tsx # 停靠入口:模式分发与再导出
144
- │ │ ├── official-enhance.tsx # dsh>=0.1.2:平滑跳转拦截(+ alpha.1/2 轨历史预热)
145
- │ │ ├── legacy-rail.tsx # dsh<=0.1.1:移植的官方轮次导航轨
146
- │ │ ├── legacy-rail-css.ts # 导航轨样式(dsbt- 前缀,官方尺寸)
147
- │ │ ├── jump.ts # 共享跳转引擎(翻页 + 滑动 + 补偿)
148
- │ │ ├── source.ts # 共享数据源(投影 + 节点窗口)
149
- │ │ ├── rail-pointer.ts # 刻度几何与容量(官方尺寸)
150
- │ │ ├── mode-store.ts # 探测到的模式,供设置行读取
151
- │ │ └── types.ts # 共享类型
152
+ │ │ ├── index.tsx # 停靠入口:官方轨能力探测与再导出
153
+ │ │ ├── official-enhance.tsx # dsh>=0.1.2-rc.1:已加载刻度平滑跳转拦截
154
+ │ │ ├── jump.ts # 共享跳转引擎(翻页 + 滑动)
155
+ │ │ ├── rail-pointer.ts # 帧式刻度几何与全量阶梯合并
156
+ │ │ └── types.ts # 共享类型契约
152
157
  │ ├── SettingsRow.tsx # 通用设置中的设置行(预览卡 + 阻尼滑块)
153
158
  │ ├── SettingsRow.module.css # 设置行样式(官方 token)
154
159
  │ ├── settings-client.ts# fetch 传输层(读/写/上传)
155
160
  │ └── locales.ts # 中/英文案
156
- └── tests/ # 契约测试(schema、routes、apply/painter、设置行)
161
+ └── tests/ # 契约测试(schema、routes、apply/painter、设置行、时间线)
157
162
  ```
158
163
 
159
164
  ## Activity