dsh-any-background 0.2.4 → 0.2.5

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
@@ -70,24 +70,33 @@ A **DeepSeek Harness** appearance plugin that lets you fully customize the Web U
70
70
  - **Per-part Interface Blur** — Frosted-glass `backdrop-filter` blur (0–60 px) for each interface part, including a real backdrop on the composer and Cordis panel via stable host selectors.
71
71
  - **Conversation View Cards** — The message list is wrapped in a translucent card automatically, and the trajectory page gets whole-page opacity & blur controls, letting the wallpaper shine through the content.
72
72
  - **Theme Export / Import** — One-click export to a self-contained `dsh-any-theme.json` (config + wallpaper, video embedded as a data URL) and import to restore it anywhere.
73
+ - **Appearance Presets & Profiles** — Six one-click presets (Default / Frosted glass / Minimal / Midnight / Cyber / Warm daylight) plus named profiles: save the current look and re-apply it anytime. A two-step confirm guards deletion.
74
+ - **Wallpaper Rotation** — Add images to a rotation pool (thumbnail picker included) and let the wallpaper change by shuffle or order on every refresh, daily, or weekly. Advancing copies the chosen image into the active wallpaper slot, so export/import and color extraction keep working unchanged.
75
+ - **Day/Night Auto Switch** — Assign a day profile and a night profile; the plugin switches automatically at fixed clock times or by following the OS dark mode.
76
+ - **Forced Interface Scheme** — Force light or dark token palettes regardless of the accent color's lightness; in `Auto` both the surface and font directions follow the accent's lightness (dark pick → light fonts, light pick → dark fonts), falling back to the wallpaper's perceived brightness when no color is picked.
77
+ - **Scheme detection fix** — The scheme is now derived from the wallpaper's actual brightness (analyzed once per wallpaper frame) even when no theme color is picked, fixing light wallpapers showing with the host's dark-theme white fonts; forcing light/dark without a picked color now builds a neutral palette instead of doing nothing.
73
78
  - **File-based Persistence** — All settings are stored on the filesystem under `~/.dsh/.dsh-any-background-data/`, not `localStorage`.
74
79
  - **Bilingual** — Full Chinese / English UI with automatic locale detection.
75
80
  - **Theme Watchdog** — Re-asserts the custom theme if the host resets it.
76
81
 
77
82
  ## Recent Optimizations
78
83
 
79
- ### v0.2.4
84
+ ### v0.2.5
80
85
 
81
- - **dsh 0.1.5 persistence fixed** — The theme/wallpaper RPC channel is now registered directly in the plugin's own `webServer` scope as a prefix route (keeping the same Host/Origin auth fence), instead of through `connection.rpc.handle`, whose effect binds to the connection service's context and never mounted on some 0.1.5 hosts — requests that previously dropped to the SPA fallback with 405 and never reached the disk now persist again. Verified working on both 0.1.2 and 0.1.5.
82
- - **Host compatibility declared** — Added `engines.dsh: ">=0.1.2-rc.1"` to declare which DeepSeek Harness host versions the plugin supports.
83
- - **Dark badge tokens fixed (issue #9)** — In the dark preset, the `*-tertiary` badge surfaces (trajectory tool/context badges, connection pill, plan chip) were tinted nearly the same as their background, making light label text unreadable. They now use the native dark 800/900 steps, so bright text sits on a properly dark badge.
86
+ - **Wallpaper MIME fixed — GIF/APNG wallpapers now work** — `readWallpaper` unconditionally re-declared every stored image as `image/jpeg`, even though URL-fetched PNG/WebP/GIF bytes are written under the same file. The real format is now sniffed from the magic bytes on every read, so animated GIF wallpapers (and PNG/WebP color profiles) survive refreshes correctly.
87
+ - **Appearance presets** — Six built-in one-click looks (Default, Frosted glass, Minimal, Midnight, Cyber, Warm daylight) on the Profile page, each bundling the theme color, per-part opacities, blurs and tints — never touching your wallpaper.
88
+ - **Saved profiles** — Save the current appearance as a named profile, apply/delete with a two-step confirm, and let the day/night schedule (below) swap between them.
89
+ - **Wallpaper rotation** — A rotation pool on the Background page: add images (thumbnail strip), choose shuffle/in-order and every-refresh/daily/weekly cadence, or hit "Switch now". The chosen image is copied into the active wallpaper slot server-side, so all existing pipelines (boot restore, export, color extraction) work unchanged.
90
+ - **Day/night auto switch** — Pick a day and a night profile and a trigger — fixed clock times or the OS `prefers-color-scheme` — and the plugin applies the matching profile automatically (checked every 30 s; appearance only, wallpaper untouched).
91
+ - **Forced interface scheme** — A Light/Dark/Auto segmented control on the Color page regenerates the whole token palette in the forced direction instead of deriving it from the accent lightness.
84
92
 
85
- ### v0.2.3
93
+ ### v0.2.5 fixes & polish
86
94
 
87
- - **Wide tables stay in the column** — When the chat region opacity/blur is raised (which makes the chat border visible), wide markdown tables are pulled back inside the text column and scroll horizontally at the border instead of bleeding past it. Left untouched while the border is invisible, preserving DSH's default behavior.
88
- - **Network URL wallpaper** — Paste an image URL and the plugin downloads it and writes it to the local wallpaper file (replacing the previous image). Because the remote source lands as a local persisted file, theme export/import keep working with no extra steps: an exported theme embeds the image data, and the receiving side never needs access to the original URL.
89
- - **Editor confirm button visible in dark mode** — The background-editor "Confirm" button now matches the Cancel/Reset buttons (solid surface with a clear frame and legible label) instead of a translucent primary tint, so it no longer disappears in dark themes.
90
- - **Maintenance cleanup** — Removed an unused `@deepseek-ai/dsh-client-ui-renderer` entry from the client inject list and aligned self-owned RPC error codes with the new harness convention.
95
+ - **Forced light/dark now actually differ — truthiness bug in the scheme check** — `buildTokens` derived the direction with `scheme ?? lit < 0.55`; a `scheme='light'` string is truthy, so both forced directions rendered the dark branch. The comparison is now explicit and the two token sets (78 of 79 entries) differ correctly.
96
+ - **Accent lightness remapping under a forced scheme** — When the forced direction contradicts the pick's band (a light accent under forced dark), the lightness is mirrored into the target band (dark 0.14–0.44 / light 0.6–0.88) before building tokens; hue and saturation carry over and the stored pick itself is untouched.
97
+ - **Auto-mode light/dark rules rebuilt** — With a picked color, the font and surface directions both follow the accent lightness (very dark → white fonts, very light → black fonts; no more fighting the wallpaper verdict). Without a pick, the font direction follows the wallpaper's perceived (Rec.709) brightness, and the global scheme flag (native controls, `color-scheme`) stays aligned with the palette direction.
98
+ - **Auto color-extraction pipeline completed** — A wallpaper-extracted theme color used to land in the in-memory config only: the host skin was never re-registered (and never would be again), the pick was never persisted, and the editor wheel never synced. The auto path now performs the full adaptation, and extraction measures brightness with the same Rec.709 luma as the wallpaper verdict so both always agree on one image.
99
+ - **Flash-free wallpaper rotation** — A due rotation now advances server-side during the refresh itself (the `read` handler advances the pool before returning the wallpaper), so the first paint already shows the new picture — no more "old wallpaper flashes, then suddenly switches". The client re-extracts the theme color from the new picture and persists it; the client-side advance remains as a fallback.
91
100
 
92
101
  ## Installation
93
102
 
package/README.zh.md CHANGED
@@ -70,24 +70,33 @@
70
70
  - **分部位界面模糊度** — 每个界面部位可独立调整毛玻璃 `backdrop-filter` 模糊(0–60 px),并通过宿主的稳定选择器为发送框与 Cordis 面板提供真实背景模糊。
71
71
  - **对话视图卡片** — 消息列表自动包裹为半透明卡片,轨迹页可整页调节透明度与模糊,让壁纸从内容后方透出来。
72
72
  - **主题导出 / 导入** — 一键导出为自包含的 `dsh-any-theme.json`(配置 + 壁纸,视频以 data URL 内嵌),可随时导入还原。
73
+ - **外观预设与配置档案** — 六套一键预设(默认 / 毛玻璃 / 极简白 / 暗夜紫 / 赛博 / 暖阳),外加自定义命名档案:随时保存当前观感、随时套回,删除有二次确认保护。
74
+ - **壁纸轮换** — 把多张图片加入轮换池(缩略图选择器),按随机或顺序、每次刷新 / 每天 / 每周的频率自动更换;切换时服务端把所选图片复制进当前壁纸槽,导出/导入与取色管线完全不用改。
75
+ - **昼夜自动切换** — 指定日间与夜间两套配置,按固定时段或跟随系统深色模式自动切换。
76
+ - **强制界面明暗** — 无论主题色明暗如何,都能强制生成亮色/暗色整套令牌;「自动」下配色与字体方向由主题色明度驱动(深色 → 浅字,浅色 → 深字),未选主题色时按壁纸画面亮度判断。
77
+ - **明暗判断修复** — 即使未选主题色,界面明暗现在也会依据壁纸画面的实际亮度(每张壁纸分析一次)自动判断,修复浅色壁纸配宿主深色主题导致的全白字体;未选主题色时强制亮色/暗色也会生成中性灰配色,而不再完全无效。
73
78
  - **文件持久化** — 所有设置保存到文件系统 `~/.dsh/.dsh-any-background-data/`,不再依赖 `localStorage`。
74
79
  - **中英双语** — 完整的中英文界面,自动跟随语言设置。
75
80
  - **主题守护** — 宿主重置主题后自动重新激活自定义主题。
76
81
 
77
82
  ## 近期优化
78
83
 
79
- ### v0.2.4
84
+ ### v0.2.5
80
85
 
81
- - **修复 dsh 0.1.5 持久化失效** — 主题/背景图的 RPC 通道改为在插件自身 `webServer` 作用域内直接注册为 prefix 路由(保留 Host/Origin 鉴权围墙),不再经由 `connection.rpc.handle`(其 effect 绑定到 connection 服务上下文,导致部分 0.1.5 宿主挂载失败)。此前请求落到 SPA 兜底并返回 405、从未写入磁盘的设置,现可正常持久化(0.1.2 与 0.1.5 均已验证)。
82
- - **声明宿主版本兼容** — 新增 `engines.dsh: ">=0.1.2-rc.1"`,声明插件所支持的 DeepSeek Harness 宿主版本范围。
83
- - **修复深色徽章令牌(issue #9)** — 深色预设下 `*-tertiary` 徽章表面(轨迹工具/上下文徽章、连接胶囊、计划 chip)与背景色过于接近,浅色标签文字不可读;现已对齐原生深色 800/900 阶令牌,亮色文字落在正确深色徽章上。
86
+ - **修复壁纸 MIME 错标 — GIF/APNG 壁纸可用了** — `readWallpaper` 此前无条件把所有图片按 `image/jpeg` 回读,而经网址抓取的 PNG/WebP/GIF 字节都写在同一个文件里。现在每次读取都从文件头嗅探真实格式,动图 GIF 壁纸(以及 PNG/WebP 的色彩配置)在刷新后可以正确保留。
87
+ - **外观预设** — 「配置」页新增六套一键预设(默认、毛玻璃、极简白、暗夜紫、赛博、暖阳),每套打包主题色、分部位透明度、模糊度与色彩叠加——绝不动你的壁纸。
88
+ - **配置档案** — 可将当前外观保存为命名档案,一键套用/删除(删除有二次确认),并可供昼夜调度(见下)自动切换。
89
+ - **壁纸轮换** — 「背景」页新增轮换池:添加图片(缩略图条)、选择随机/顺序与每次刷新/每天/每周频率,或点「立即切换」。服务端把所选图片复制进当前壁纸槽,启动还原、主题导出、取色等既有管线零改动。
90
+ - **昼夜自动切换** — 选定日间/夜间两套档案与触发方式(固定时段或系统 `prefers-color-scheme`),插件自动套用匹配的档案(每 30 秒检查一次;只切换外观,不动壁纸)。
91
+ - **强制界面明暗** — 「色彩」页新增亮色/暗色/自动分段控件,强制后整套配色令牌按所选方向重新生成,而不再依据主题色明度推导。
84
92
 
85
- ### v0.2.3
93
+ ### v0.2.5 修复与体验优化
86
94
 
87
- - **宽表格收进文本栏** — 当对话区透明度/模糊度被调大(边框因此可见)时,宽 Markdown 表格被收回文本栏宽度内、在边框处横向滚动,不再向右溢出裁切;边框不可见时不干预,保留 DSH 官方默认外扩行为。
88
- - **网络 URL 壁纸** — 填入图片网址即可直接作为壁纸:插件下载图片并写入本地壁纸文件(替换原有持久化图片)。由于远程来源最终落到本地持久化文件,主题导出/导入无需任何额外适配:导出主题时内嵌图片数据,接收方无需访问原始网址也能还原。
89
- - **深色主题下编辑器确认按钮清晰可见** — 背景编辑器「确认」按钮改为与「取消/重置」一致的实色表面 + 清晰边框 + 可读文字,不再使用半透明的主题色淡染,深色主题下不再看不清。
90
- - **维护性清理** — 移除 `dsh.client.inject` 中未使用的 `@deepseek-ai/dsh-client-ui-renderer` 条目,并将插件自有 RPC 错误码对齐新版 harness 的命名规范。
95
+ - **修复强制亮/暗无差别 — 方向判定真值 bug** — `buildTokens` 此前用 `scheme ?? lit < 0.55` 推导方向,`scheme='light'` 时字符串真值导致亮色/暗色都走深色分支。现改为显式比较,两套令牌(79 项中 78 项)正确区分。
96
+ - **强制方向自动重映射主题色明度** — 强制方向与主题色明度冲突时(如浅色主题色 + 强制暗色),把明度镜像映射进目标区间(深色带 0.14–0.44 / 亮色带 0.6–0.88)再构建令牌,色相与饱和度保留,保存的主题色本身不变。
97
+ - **自动模式明暗规则重构** — 有主题色时字体与表面方向统一由主题色明度驱动(过深 → 白字,过浅 → 黑字,与壁纸判定结果不再打架);未选主题色时按壁纸感知亮度(Rec.709)判断字体方向;全局明暗标志(`color-scheme`、原生控件)与配色方向保持一致。
98
+ - **自动提取主题色的链路补全** — 无保存主题色时从壁纸自动提取的结果,此前只写入内存配置:不注册宿主皮肤(且此后永久不再更新)、不落盘、不同步取色轮盘。现补全为完整自适应(注册皮肤 + 持久化 + UI 同步),并把提取时的亮度度量统一为 Rec.709,与壁纸判定对同一张图永远给出一致方向。
99
+ - **壁纸轮换零闪现** — 到期的轮换改在刷新阶段由服务端直接完成(读取配置时先推进轮换池再返回壁纸),首次上屏即新壁纸,消除「旧壁纸闪现后突然切换」;客户端随后自动从新壁纸重提取主题色并持久化,配色跟随轮换。客户端推进逻辑保留作兜底。
91
100
 
92
101
  ## 安装
93
102