dsh-wallpaper_share 26.9.10 → 26.9.13
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 +74 -18
- package/README.zh-CN.md +20 -10
- package/bin/we-floater.exe +0 -0
- package/docs/encoding-and-release.md +33 -0
- package/lib/client.js +1522 -423
- package/lib/client.js.map +1 -1
- package/lib/index.js +1207 -365
- package/package.json +11 -5
- package/tools/check-package.mjs +28 -0
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# dsh-wallpaper_share
|
|
2
|
-
已适配 harness 0.1.
|
|
2
|
+
已适配 harness 0.1.5
|
|
3
3
|
<!-- Hero -->
|
|
4
4
|
<div align="center">
|
|
5
5
|
<b style="font-size: 1.15em;">把 Wallpaper Engine 的壁纸实时同步为 DSH Web 界面背景,并支持应用挂载和自定义壁纸导入</b><br /><br />
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<a href="https://www.npmjs.com/package/dsh-wallpaper_share"><img alt="npm downloads" src="https://img.shields.io/npm/dm/dsh-wallpaper_share" /></a>
|
|
8
8
|
<a href="https://github.com/YRN-playmaker/dsh-wallpaper_share/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/YRN-playmaker/dsh-wallpaper_share" /></a>
|
|
9
9
|
<a href="https://opensource.org/licenses/GPL-3.0"><img alt="License: GPL-3.0" src="https://img.shields.io/badge/License-GPL--3.0-blue.svg" /></a>
|
|
10
|
-
<a href="https://github.com/YRN-playmaker/dsh-wallpaper_share/releases"><img alt="插件版本 v26.9.
|
|
10
|
+
<a href="https://github.com/YRN-playmaker/dsh-wallpaper_share/releases"><img alt="插件版本 v26.9.13" src="https://img.shields.io/badge/v26.9.13-4d6bfe" /></a><br /><br />
|
|
11
11
|
<img alt="壁纸同步" src="https://img.shields.io/badge/-%E5%A3%81%E7%BA%B8%E5%90%8C%E6%AD%A5-4d6bfe" /> <img alt="场景渲染" src="https://img.shields.io/badge/-%E5%9C%BA%E6%99%AF%E6%B8%B2%E6%9F%93-4d6bfe" /> <img alt="DWP 市场" src="https://img.shields.io/badge/-DWP%20%E5%B8%82%E5%9C%BA-4d6bfe" /> <img alt="眼动追踪" src="https://img.shields.io/badge/-%E7%9C%BC%E5%8A%A8%E8%BF%BD%E8%B8%AA-4d6bfe" /> <img alt="专注模式" src="https://img.shields.io/badge/-%E4%B8%93%E6%B3%A8%E6%A8%A1%E5%BC%8F-4d6bfe" /> <img alt="多显示器" src="https://img.shields.io/badge/-%E5%A4%9A%E6%98%BE%E7%A4%BA%E5%99%A8-4d6bfe" /><br /><br />
|
|
12
12
|
</div>
|
|
13
13
|
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
- [🖼️ Scene 渲染与回退](#-scene-渲染与回退)
|
|
35
35
|
- [🔍 专注模式与眼动追踪](#-专注模式与眼动追踪)
|
|
36
36
|
- [🌌 沉浸模式与任务指示](#-沉浸模式与任务指示)
|
|
37
|
+
- [🪟 桌面悬浮球](#-桌面悬浮球)
|
|
37
38
|
- [🚀 安装](#-安装)
|
|
38
39
|
- [⚙️ 配置](#-配置)
|
|
39
40
|
- [📈 性能与已知限制](#-性能与已知限制)
|
|
@@ -65,10 +66,12 @@ dsh plugin --profile web add dsh-wallpaper_share # 或见下方「安装」选
|
|
|
65
66
|
|
|
66
67
|
- **侧边栏沉浸模式**:一键隐去会话头部、正文与输入栏,让壁纸独占视野;网页 / 应用类壁纸在沉浸下可直接鼠标交互(详见[沉浸模式](#-沉浸模式与任务指示))
|
|
67
68
|
|
|
69
|
+
- **桌面悬浮球**(Windows,默认关):开启后,当你切走页签 / 最小化浏览器 / 切到别的应用时,桌面出现一个与侧边栏状态灯同款的环形按钮(颜色同步:绿空闲 / 蓝进行中 / 黄待授权),**单击即把 `http://127.0.0.1:3080/` 页面带回前台**(同窗口切到别的页签也能精确切回该页签);可拖动记忆位置,右键 / 双击临时收起(详见[桌面悬浮球](#-桌面悬浮球))
|
|
70
|
+
|
|
68
71
|
- **专注模式**:叠加一个圆心清晰、圆外模糊的阅读窗,以专注于任务,提升文字可读性;默认跟随鼠标,也可用摄像头推断注视点让透镜跟随视线;9 点校准、文字吸附、抗抖动
|
|
69
72
|
<img width="426" height="240" alt="Video Project 29" src="https://github.com/user-attachments/assets/57daf64c-ff2b-40c7-aeef-73cac46c4c2b" />
|
|
70
73
|
|
|
71
|
-
- **壁纸库**:按**本地**/**市场**/**应用启动器**分类。本地一栏管理已装内容——`dwp壁纸`(点击即挂载为全局背景,已挂载再点取消)与 `we
|
|
74
|
+
- **壁纸库**:按**本地**/**市场**/**应用启动器**分类。本地一栏管理已装内容——`dwp壁纸`(点击即挂载为全局背景,已挂载再点取消)与 `应用`(**大类**,下分 `we应用` 与 `应用`;点击卡片即启动,每次启动弹确认),带标题搜索、缩略图与计数;搜索框右侧的**「管理」**开关进入管理模式:卡片整体轻微晃动,**点卡片即多选**(选中项停住晃动、背景转蓝并打勾),选择条给出「已选 N / 卸载选中 / 清空选择」,可跨 `dwp壁纸` 与 `应用` 一次选完再统一卸载(确认弹层列出全部将被删除的项);每张卡仍保留「打开源文件 / 卸载」单项操作,dwp 的「打开源文件」会在资源管理器里定位包文件——**卸载只对 dwp 壁纸与启动器装的应用开放**,WE 工坊内容点了只给提示、不参与多选(绝不删 Steam 内容);市场一栏浏览 `dwp-registry` 目录,支持名称 / 作者搜索、标签筛选与安装 / 更新 / 卸载;**应用启动器**:支持用户粘贴 `http(s)` 直链(`.zip`/`.7z`/`.exe`,**加密压缩包填解压密码**)或部分**云盘分享链接**(如`yun.139.com/shareweb/#/w/i/…`,提取码填在提取码框),唤醒DSH 自动下载,解包并封装成**类 app 格式**(自动生成 `project.json` + 预览图卡片)入库;卡片只留「详细」按钮(安装时间 / 地址 / exe 文件,另含来源、SHA512、更新预览与多入口切换)——启动与卸载统一到「本地 → 应用」里做。不依赖 WE 运行、不受新版 WE 取消应用类壁纸影响。、
|
|
72
75
|
<img width="737" height="675" alt="image" src="https://github.com/user-attachments/assets/7567c226-7ea4-4fcb-a3b7-11190ee681ff" />
|
|
73
76
|
|
|
74
77
|
|
|
@@ -77,7 +80,7 @@ dsh plugin --profile web add dsh-wallpaper_share # 或见下方「安装」选
|
|
|
77
80
|
| 卡片 | 内容 |
|
|
78
81
|
| --- | --- |
|
|
79
82
|
| **壁纸状态** | 壁纸名(标题行**右缘为插件版本号**,点击直达 GitHub 仓库);下方副标题只承载诊断信息——scene 壁纸显示当前渲染通路(`场景 · 预览图 / 捕获 live 30fps / 浏览器模型渲染 / 回退:<原因>`),未应用壁纸时显示引导文案,其余类型整行不占;多显示器时出现「背景显示器」下拉;`⏻ 同步开启 / 关闭 / 暂停(DWP)` 三态按钮 |
|
|
80
|
-
| **视觉效果** |
|
|
83
|
+
| **视觉效果** | 三档渲染模式分段按钮;「桌面悬浮球」开关(在专注模式左侧,默认关;非 Windows 或缺 `bin/we-floater.exe` 时置灰);「专注模式」及其展开条(眼动追踪 / 校准视线 / 文字吸附 / 实时状态);透明度 · 模糊 · 阴影三个滑块(**专注开启时滑块隐藏**,改由任务态与透镜接管) |
|
|
81
84
|
|
|
82
85
|
<img width="841" height="667" alt="image" src="https://github.com/user-attachments/assets/7d652c07-8344-4de3-abbd-75620375c0b6" />
|
|
83
86
|
|
|
@@ -143,9 +146,25 @@ scene 壁纸在捕获 / 完整档下的渲染优先级与回退链:
|
|
|
143
146
|
- **沉浸下壁纸可交互**:网页 / 应用类壁纸的 iframe 被提到最前并接收鼠标事件,左缘保留 56px 给侧边栏 rail,因此侧边栏与圆灯仍可点。
|
|
144
147
|
- **退出方式**:再点圆灯、按 `Esc`、或点击侧边栏内任意按钮。沉浸是临时视图态,**不写入持久化**——刷新后回到正常布局,不会"醒来发现聊天框不见了"。
|
|
145
148
|
|
|
149
|
+
## 🪟 桌面悬浮球
|
|
150
|
+
|
|
151
|
+
「视觉效果」卡片里的 **桌面悬浮球** 开关(Windows 专属,默认关,位于专注模式按钮左侧)。开启后,当 3080 页面不在前台时,桌面出现一个环形按钮:
|
|
152
|
+
|
|
153
|
+
- **外观与侧边栏状态灯一致**:深色圆盘 + 3px 状态色环(绿 `#22c55e` 空闲 / 蓝 `#3b82f6` 有任务在跑 / 黄 `#eab308` 等待授权),随任务状态实时变色;尺寸随系统 DPI 缩放(100% 缩放下 40px,与侧边栏球同款观感)。
|
|
154
|
+
- **单击即切回页面**:原生层用 UI Automation 在浏览器窗口里按标题匹配页签并 `SelectionItemPattern.Select()`,因此**同一个窗口里切到了别的页签**也能精确切回该页签,再把窗口带回前台。最小化的窗口会还原,**最大化的窗口保持最大化**(不会把窗口"强行窗口化")。
|
|
155
|
+
- **不打扰**:`WS_EX_TOOLWINDOW`(不进任务栏 / Alt+Tab 列表)、圆形 region + 分层透明、显示用 `SW_SHOWNOACTIVATE`(不抢焦点)、指针为手型。
|
|
156
|
+
- **拖动记忆位置**:拖到哪存到哪(`~/.dsh/storages/we-sync-floater-pos.json`),下次直接出现在原位。
|
|
157
|
+
- **主动收起**:右键或双击 = 临时收起,直到你下次回到 3080 页面才会重新出现(离开期间不会反复弹)。
|
|
158
|
+
|
|
159
|
+
**实现方式**:新增原生程序 `bin/we-floater.exe`(约 310KB,Windows-only,Rust 源码 `native/we-capture/src/bin/we-floater.rs`,可用 `cargo build --release --bin we-floater` 重建)。进程由 node 半边**按需拉起**:页面隐藏才起进程挂球,回到前台 / 关闭页面立即收球并停进程(不常驻、不留桌面痕迹);通信走 stdin 行协议(`show` / `hide` / `color` / `title` / `quit`),父进程退出即自毁,不留孤儿窗。页面侧经 `/we-sync/floater` 上报「开关 / 前后台 / 标题 / 状态色」,服务端按**页签 id 记账**(同一浏览器开多个 3080 页签时各自上报互不踩踏,有任一页签在前台就不挂球)。
|
|
160
|
+
|
|
161
|
+
**「切到后台」的判定**:页签被切走或浏览器最小化(`visibilitychange`),以及整个窗口被其他应用压住 / Alt+Tab 走开(`window blur`,400ms 防抖以避免系统小提示条抢焦点时闪一下);回到前台(页签转可见 / 窗口重新获得焦点)即时收球。
|
|
162
|
+
|
|
163
|
+
**已知限制**:仅 Windows;依赖浏览器窗口类与页签标题可被 UIA 读到(Chrome / Edge / Firefox 实测可用)。
|
|
164
|
+
|
|
146
165
|
## 🚀 安装
|
|
147
166
|
|
|
148
|
-
> 前置:兼容 DSH Web `0.1.0-rc.6` 及以上(已在 `0.1.
|
|
167
|
+
> 前置:兼容 DSH Web `0.1.0-rc.6` 及以上(已在 `0.1.5` 验证,0.1.2 的破坏性变更已适配,剩余限制见下方「已知问题」),以 `dsh --profile web` 运行。
|
|
149
168
|
|
|
150
169
|
### 🎯 分档安装(按需选择)
|
|
151
170
|
|
|
@@ -155,6 +174,8 @@ scene 壁纸在捕获 / 完整档下的渲染优先级与回退链:
|
|
|
155
174
|
| 🔵 **rc(稳定版本)** | 适配 harness 为 rc 架构的推荐版本,新功能适配较慢 | `dsh plugin --profile web add dsh-wallpaper_share@rc010` |
|
|
156
175
|
| 🟡 **test(测试版本)** | 用于测试的版本,可能有未完成功能 | `dsh plugin --profile web add dsh-wallpaper_share@test` |
|
|
157
176
|
|
|
177
|
+
> 当前版本:**`26.9.13`**(GitHub `main` 分支)。本次带来 **桌面悬浮球**(Windows:页面切到后台 / 浏览器最小化时,桌面出现一个与侧边栏状态灯同款的环形按钮,单击即切回 3080 页面,可拖动记忆位置);近期版本还带来:壁纸库「管理」多选批量卸载、应用启动器卡片化简为「详细」、面板三页滚动(含占位的「dwp创作」)、宿主输入框按页显隐、**DWP 时钟变量**与**纹理分档**(预览/捕获用低清、增强/完整用高清);`26.9.12-rc` 移除百度网盘分享链接支持(云盘分享仅保留 139)并适配 harness `0.1.5`。
|
|
178
|
+
|
|
158
179
|
### 🔧 其他安装方式
|
|
159
180
|
|
|
160
181
|
```bash
|
|
@@ -176,10 +197,10 @@ dsh plugin --profile web add github:YRN-playmaker/dsh-wallpaper_share
|
|
|
176
197
|
# 从 GitHub 安装(仓库自带预构建 lib/,不需要构建许可;main = 最新档)
|
|
177
198
|
dsh plugin --profile web add dsh-wallpaper_share
|
|
178
199
|
# 从 npm 安装(默认 = latest 最新档)
|
|
179
|
-
dsh plugin --profile web add ./dsh-wallpaper_share-26.9.
|
|
180
|
-
# 本地 tarball 安装(26.9.
|
|
200
|
+
dsh plugin --profile web add ./dsh-wallpaper_share-26.9.13.tgz
|
|
201
|
+
# 本地 tarball 安装(26.9.13)
|
|
181
202
|
dsh plugin --profile web add github:YRN-playmaker/dsh-wallpaper_share#test
|
|
182
|
-
# 从 GitHub 安装 test
|
|
203
|
+
# 从 GitHub 安装 test 分支(测试档,功能最新但不稳定;正式取 main)
|
|
183
204
|
```
|
|
184
205
|
|
|
185
206
|
```bash
|
|
@@ -247,10 +268,13 @@ dsh plugin --profile web add github:YRN-playmaker/dsh-wallpaper_share#test
|
|
|
247
268
|
|
|
248
269
|
- `src/index.ts` — Node 半:WE 状态轮询、HTTP 路由、scene renderer 子进程管理、壁纸库扫描
|
|
249
270
|
- `src/scene/` — SceneAdapter 模块(协议 / 能力探测 / renderer 进程 / WebSocket / 回退 / PKGV0001 解析 / SceneModel 图层模型 / .tex 解码 / puppet mdl 解析)
|
|
250
|
-
- `src/client/` — 浏览器半(主题覆盖 / 背景层 / SceneCanvas / SceneModelRenderer 子集渲染器 / ParticleRuntime / GazeLens 眼动 / 专注透镜 / 沉浸模式 / wallpaper_share
|
|
271
|
+
- `src/client/` — 浏览器半(主题覆盖 / 背景层 / SceneCanvas / SceneModelRenderer 子集渲染器 / ParticleRuntime / GazeLens 眼动 / 专注透镜 / 沉浸模式 / wallpaper_share 面板 / library-model.ts 壁纸库分类与详情格式化 / floater-report.ts 桌面悬浮球上报)
|
|
251
272
|
- `src/workspace/` — 工作区脉搏(文件系统快照差分 + 内置 DWP 组包器;`_dev/make-workspace-pulse.mjs` 为手动打包脚本)
|
|
252
|
-
- `
|
|
273
|
+
- `src/daynight/` — 「DeepSeek 日夜」组包器(两张全画布 PNG + `$night_alpha` 分层;`_dev/make-daynight-dwp.mjs` 打包并装入本地市场,`_dev/verify-daynight-dwp.mjs` 静态校验 + 昼夜链路自检)
|
|
274
|
+
- `src/floater/` — 桌面悬浮球 Node 半(`hub.ts` 多页签状态机 / `manager.ts` 子进程管理 / `routes.ts` `/we-sync/floater`)
|
|
275
|
+
- `native/we-capture/` — Rust 原生源码(`main.rs` Windows Graphics Capture → JPEG;`src/bin/we-floater.rs` 桌面悬浮球窗口)
|
|
253
276
|
- `bin/we-capture.exe` — 随包发布的原生捕获器(Windows-only)
|
|
277
|
+
- `bin/we-floater.exe` — 随包发布的桌面悬浮球(Windows-only,按需拉起)
|
|
254
278
|
- `docs/` — 格式规范与技术文档(`scene-format.md` / `scene-fallback.md` / `tex-format-findings.md` / `mdl-skinning-findings.md`)
|
|
255
279
|
- `tools/scene-renderer/` — 内置参考 renderer(实现协议契约;真·原生 renderer 以同协议替换之)
|
|
256
280
|
- `lib/` — 预构建产物(用户侧零构建)
|
|
@@ -262,6 +286,7 @@ dsh plugin --profile web add github:YRN-playmaker/dsh-wallpaper_share#test
|
|
|
262
286
|
### 环境限制
|
|
263
287
|
|
|
264
288
|
- **预览图不显示**:市场卡片缩略图指向 `raw.githubusercontent.com`,当前环境不可达。图片加载失败后 `onError` 隐藏显示。
|
|
289
|
+
- **桌面悬浮球仅 Windows**:需要 Windows 宿主且随包携带 `bin/we-floater.exe`(非 Windows 或缺文件时面板开关自动置灰)。
|
|
265
290
|
- **WE 安装目录不存在**:自动检测到目录但不存在时壁纸同步不可用(市场功能不受影响),可在 `CONFIG.wallpaperEngineDir` 手动指定。
|
|
266
291
|
|
|
267
292
|
## 📄 License
|
|
@@ -281,6 +306,7 @@ GPL-3.0
|
|
|
281
306
|
- [🖼️ Scene Rendering & Fallback](#-scene-rendering--fallback)
|
|
282
307
|
- [🔍 Focus Mode & Eye Tracking](#-focus-mode--eye-tracking)
|
|
283
308
|
- [🌌 Immersive Mode & Task Indicator](#-immersive-mode--task-indicator)
|
|
309
|
+
- [🪟 Desktop Orb](#-desktop-orb)
|
|
284
310
|
- [🚀 Installation](#-installation)
|
|
285
311
|
- [⚙️ Configuration](#-configuration)
|
|
286
312
|
- [📈 Performance & Known Limitations](#-performance--known-limitations)
|
|
@@ -317,10 +343,12 @@ WE must be running with a wallpaper applied; otherwise the background stays empt
|
|
|
317
343
|
|
|
318
344
|
- **Sidebar immersive mode**: one click hides the session header, transcript and composer so the wallpaper owns the view; web / app wallpapers become directly mouse-interactive under immersion (see [Immersive Mode](#-immersive-mode--task-indicator))
|
|
319
345
|
|
|
346
|
+
- **Desktop orb** (Windows, off by default): when enabled, a ring button matching the sidebar status light appears on the desktop whenever you switch away from the tab, minimize the browser, or move to another app (colour synced: green idle / blue running / yellow awaiting approval); **a single click brings the `http://127.0.0.1:3080/` page back to the front** (it even selects the exact tab when you switched tabs inside the same window); drag to move it and the position is remembered, right-click / double-click to dismiss temporarily (see [Desktop Orb](#-desktop-orb))
|
|
347
|
+
|
|
320
348
|
- **Focus mode**: overlays a center-clear, edge-blurred reading window on the wallpaper to focus on the task and improve text readability; follows the mouse by default, or uses the webcam to infer the gaze point so the lens follows your eyes; 9-point calibration, text-line snap, anti-jitter
|
|
321
349
|
<img width="426" height="240" alt="Video Project 29" src="https://github.com/user-attachments/assets/57daf64c-ff2b-40c7-aeef-73cac46c4c2b" />
|
|
322
350
|
|
|
323
|
-
- **Wallpaper library**: grouped into **Local** / **Market** / **App Launcher**. Local manages what's installed — `dwp wallpapers` (click to mount as the global background, click again to unmount) and `
|
|
351
|
+
- **Wallpaper library**: grouped into **Local** / **Market** / **App Launcher**. Local manages what's installed — `dwp wallpapers` (click to mount as the global background, click again to unmount) and `apps` (a top category split into `WE app` and `App`; click a card to launch, with a confirm dialog each time), with title search, thumbnails and counts; the **Manage** toggle next to the search box puts the cards into an edit state — they jiggle, **clicking a card multi-selects it** (selected cards stop jiggling, turn blue and get a check mark), and the selection bar offers "selected N / uninstall selected / clear" so you can pick across `dwp wallpapers` and `apps` and uninstall them in one go (the confirm dialog lists everything that will be deleted); each card also keeps a per-item "open source file / uninstall" row — **uninstall is only offered for DWP wallpapers and launcher-installed apps**, WE Workshop content just shows a hint and cannot be selected (Steam content is never deleted); Market browses the `dwp-registry` catalog with name / author search, tag filters and **install / update / uninstall**; **App Launcher** only installs: it accepts pasted `http(s)` direct links (`.zip` / `.7z` / `.exe`, **fill the archive password for encrypted archives**) or some **cloud-drive share links** (e.g. `yun.139.com/shareweb/#/w/i/…`, passcode in the passcode field), wakes DSH to download automatically, unpacks and wraps them into **WE-app-style entries** (auto-generated `project.json` + preview card) in the library; each card keeps a "Details" button (install time / location / executable, plus source, SHA512, update preview and entry switching) — launching and uninstalling happen in Local → Apps. It does not require WE to run and is unaffected by newer WE versions dropping application wallpapers.
|
|
324
352
|
<img width="737" height="675" alt="image" src="https://github.com/user-attachments/assets/7567c226-7ea4-4fcb-a3b7-11190ee681ff" />
|
|
325
353
|
|
|
326
354
|
**Settings page↓**
|
|
@@ -328,7 +356,7 @@ WE must be running with a wallpaper applied; otherwise the background stays empt
|
|
|
328
356
|
| Card | Contents |
|
|
329
357
|
| --- | --- |
|
|
330
358
|
| **Wallpaper status** | Wallpaper name (the **plugin version sits at the right edge of the title row** and links to the GitHub repo); the subtitle below carries diagnostics only — for scene wallpapers it shows the active render path (`Scene · preview image / capture live 30fps / browser model render / fallback: <reason>`), a hint when no wallpaper is applied, and takes no row at all for other types; a "background monitor" dropdown appears with multiple monitors; the `⏻` button has three states — sync on / off / paused (DWP) |
|
|
331
|
-
| **Visual effects** | The 3-mode segmented control; the focus-mode button with its flyout (eye tracking / calibrate gaze / text-line snap / live status); opacity · blur · shadow sliders (**hidden while focus mode is on** — task state and the lens take over) |
|
|
359
|
+
| **Visual effects** | The 3-mode segmented control; the **Desktop orb** toggle (left of the focus button, off by default; greyed out on non-Windows or when `bin/we-floater.exe` is missing); the focus-mode button with its flyout (eye tracking / calibrate gaze / text-line snap / live status); opacity · blur · shadow sliders (**hidden while focus mode is on** — task state and the lens take over) |
|
|
332
360
|
|
|
333
361
|
<img width="841" height="667" alt="image" src="https://github.com/user-attachments/assets/7d652c07-8344-4de3-abbd-75620375c0b6" />
|
|
334
362
|
|
|
@@ -336,6 +364,8 @@ Other features:
|
|
|
336
364
|
|
|
337
365
|
- **Workspace Pulse (built-in DWP)**: a new built-in dynamic wallpaper `workspace-pulse` — shows **recently changed files in your workspace** as up to 3 floating bubbles on the background, each with a green `+` / red `−` badge at its top-right marking whether the file is growing or shrinking (covers additions / deletions too). No git dependency (unsaved and binary files are caught as well); updates live once mounted, with a breathing hint when idle. Auto-installed into the library on first startup — see Wallpaper library → Local → dwp wallpapers
|
|
338
366
|
- **DWP wallpapers & global-background rendering**: `dwp/1.0` protocol packages (text / solid / particle / mesh layers + 12 blend modes + 3 animations + 11 effects, deterministic rendering); mounting renders them as the DSH global background via WebGL2 (Canvas2D fallback on weak GPUs) while pausing WE sync to avoid conflicts, auto-restored after a refresh
|
|
367
|
+
- **DWP clock variables (a generic capability for wallpaper authors)**: every 2.5s the plugin feeds `hour` / `night_alpha` / `night_on` / `day_on` into **whatever scene is mounted** (`Handle.setParams` overwrites key by key, so it never clashes with the built-in Workspace Pulse variables); declare them in `variables` and reference them — the market package **"DeepSeek Day & Night"** uses `$night_alpha` to swap in a night image from 18:00 to 06:00 and back, with a 10-minute linear crossfade at both boundaries
|
|
368
|
+
- **DWP texture tiers (one wallpaper, two resolutions)**: `hd_on` / `night_sd` / `night_hd` are fed too, and the render mode picks the tier — **Eco / Perf = low, Enhanced = high**; a package lists what only the high tier needs in the scene-level extension field `dsh.hdAssets`, and the consumer stubs those with a 1×1 placeholder in the low tier, so the high-res textures are **never fetched or decoded** there ("DeepSeek Day & Night" 1.1.0 ships 1920×1080 / 7680×4320 tiers; switching tiers remounts with the new asset set)
|
|
339
369
|
- **Settings persistence**: sync toggle, render mode, monitor lock, the three visual sliders, focus / eye-tracking preferences are written to `localStorage` (key `we-sync.settings`) and restored after a refresh or DSH restart; transient view state such as immersive mode and task flags are deliberately not persisted
|
|
340
370
|
- **Self-diagnostic route** `/we-sync/diag` (localhost only; scene renderer status & texture extraction results)
|
|
341
371
|
|
|
@@ -395,9 +425,25 @@ When the sidebar is **collapsed**, a 34px round light appears on the left edge (
|
|
|
395
425
|
- **The wallpaper becomes interactive**: web / app wallpaper iframes are raised and take pointer events, while the leftmost 56px stays free for the sidebar rail, so the sidebar and the lamp remain clickable.
|
|
396
426
|
- **Exiting**: click the lamp again, press `Esc`, or click any button inside the sidebar. Immersive is transient view state and is **never persisted** — a refresh returns to a normal layout instead of hiding your chat box.
|
|
397
427
|
|
|
428
|
+
## 🪟 Desktop Orb
|
|
429
|
+
|
|
430
|
+
The **Desktop orb** toggle in the "Visual effects" card (Windows only, off by default, sitting to the left of the focus-mode button). Once enabled, a ring button shows up on the desktop whenever the 3080 page is not in the foreground:
|
|
431
|
+
|
|
432
|
+
- **Looks like the sidebar status light**: a dark disc plus a 3px status ring (green `#22c55e` idle / blue `#3b82f6` running / yellow `#eab308` awaiting approval) that recolours live with task state; it scales with the system DPI (40px at 100%).
|
|
433
|
+
- **One click returns to the page**: natively it matches the tab by title through UI Automation and calls `SelectionItemPattern.Select()`, so it lands on the right tab **even when you switched to another tab in the same window**, then raises the window. A minimized window is restored; **a maximized window stays maximized** (it never forces the browser back into windowed mode).
|
|
434
|
+
- **Unobtrusive**: `WS_EX_TOOLWINDOW` (no taskbar / Alt+Tab entry), circular region with layered alpha, shown via `SW_SHOWNOACTIVATE` so it never steals focus, hand cursor on hover.
|
|
435
|
+
- **Remembers where you dragged it** (`~/.dsh/storages/we-sync-floater-pos.json`).
|
|
436
|
+
- **Dismiss on purpose**: right-click or double-click hides it until you next return to the 3080 page (it will not keep popping up while you are away).
|
|
437
|
+
|
|
438
|
+
**How it works**: a native helper `bin/we-floater.exe` (~310KB, Windows-only; Rust source in `native/we-capture/src/bin/we-floater.rs`, rebuildable with `cargo build --release --bin we-floater`). The node half spawns it **on demand**: the process only exists while the page is in the background — it starts, shows the orb, and is torn down as soon as you come back or close the page (nothing resident, no desktop leftovers). They talk over a stdin line protocol (`show` / `hide` / `color` / `title` / `quit`), and the helper self-destructs when its parent exits, so no orphan windows are left behind. The page reports "toggle / foreground state / title / status colour" to `/we-sync/floater`, and the server keeps **one record per tab id** — multiple 3080 tabs report independently without stomping on each other, and the orb only appears when *every* tab is in the background.
|
|
439
|
+
|
|
440
|
+
**"Went to the background" means**: the tab was switched away or the browser was minimized (`visibilitychange`), or the whole window was covered by another app / you Alt-Tabbed away (`window blur`, debounced by 400ms so a transient focus steal does not flash the orb). Coming back (tab visible again, or the window regains focus) retracts it immediately.
|
|
441
|
+
|
|
442
|
+
**Known limits**: Windows only; requires the browser window class and tab titles to be readable via UIA (verified with Chrome / Edge / Firefox).
|
|
443
|
+
|
|
398
444
|
## 🚀 Installation
|
|
399
445
|
|
|
400
|
-
> Requires DSH Web `0.1.0-rc.6` or newer (verified on `0.1.
|
|
446
|
+
> Requires DSH Web `0.1.0-rc.6` or newer (verified on `0.1.5`; the 0.1.2 breaking changes are adapted — remaining limits are listed in the "Known Issues" section below), run with `dsh --profile web`.
|
|
401
447
|
|
|
402
448
|
### 🎯 Pick your tier (install by need)
|
|
403
449
|
|
|
@@ -407,6 +453,8 @@ When the sidebar is **collapsed**, a 34px round light appears on the left edge (
|
|
|
407
453
|
| 🔵 **rc (stable)** | Recommended build for a Harness on the rc architecture; new features are adapted more slowly | `dsh plugin --profile web add dsh-wallpaper_share@rc010` |
|
|
408
454
|
| 🟡 **test (testing)** | For testing only; may contain unfinished features | `dsh plugin --profile web add dsh-wallpaper_share@test` |
|
|
409
455
|
|
|
456
|
+
> Current version: **`26.9.13`** (GitHub `main` branch). This release adds the **Desktop orb** (Windows: a ring button matching the sidebar status light appears when the page goes to the background or the browser is minimized — one click returns to the 3080 page, drag to move and it is remembered). Recent releases also brought: library "Manage" multi-select bulk uninstall, launcher cards reduced to a "Details" button, a third scrolling page (a placeholder "DWP Studio"), the host composer hidden per page, plus **DWP clock variables** and **texture tiers** (Eco/Perf = low-res, Enhanced = high-res). `26.9.12-rc` removed Baidu Netdisk share-link support (cloud-drive shares are 139-only) and adapted to harness `0.1.5`.
|
|
457
|
+
|
|
410
458
|
### 🔧 Other install methods
|
|
411
459
|
|
|
412
460
|
```bash
|
|
@@ -428,10 +476,10 @@ dsh plugin --profile web add github:YRN-playmaker/dsh-wallpaper_share
|
|
|
428
476
|
# install from GitHub (repo ships prebuilt lib/, no build permission needed; main = latest tier)
|
|
429
477
|
dsh plugin --profile web add dsh-wallpaper_share
|
|
430
478
|
# install from npm (default = latest tier)
|
|
431
|
-
dsh plugin --profile web add ./dsh-wallpaper_share-26.9.
|
|
432
|
-
# install from a local tarball (26.9.
|
|
479
|
+
dsh plugin --profile web add ./dsh-wallpaper_share-26.9.13.tgz
|
|
480
|
+
# install from a local tarball (26.9.13)
|
|
433
481
|
dsh plugin --profile web add github:YRN-playmaker/dsh-wallpaper_share#test
|
|
434
|
-
# install the test branch from GitHub (test tier,
|
|
482
|
+
# install the test branch from GitHub (test tier — newest features, may be unstable; use main for the release)
|
|
435
483
|
```
|
|
436
484
|
|
|
437
485
|
```bash
|
|
@@ -499,10 +547,13 @@ dsh plugin --profile web add github:YRN-playmaker/dsh-wallpaper_share#test
|
|
|
499
547
|
|
|
500
548
|
- `src/index.ts` — node half: WE polling, HTTP routes, scene renderer subprocess, library scan
|
|
501
549
|
- `src/scene/` — SceneAdapter modules (protocol / capability probe / renderer process / WebSocket / fallback / PKGV0001 parsing / SceneModel layer model / .tex decoding / puppet mdl parsing)
|
|
502
|
-
- `src/client/` — browser half (theme overrides / background layers / SceneCanvas / SceneModelRenderer / ParticleRuntime / GazeLens / focus lens / immersive mode / wallpaper_share panel)
|
|
550
|
+
- `src/client/` — browser half (theme overrides / background layers / SceneCanvas / SceneModelRenderer / ParticleRuntime / GazeLens / focus lens / immersive mode / wallpaper_share panel / library-model.ts library categories & detail formatting / floater-report.ts desktop-orb reporting)
|
|
503
551
|
- `src/workspace/` — Workspace Pulse (filesystem snapshot diffing + built-in DWP packer; `_dev/make-workspace-pulse.mjs` is the manual packing script)
|
|
504
|
-
- `
|
|
552
|
+
- `src/daynight/` — "DeepSeek Day & Night" packer (two full-canvas PNGs layered by `$night_alpha`; `_dev/make-daynight-dwp.mjs` packs + installs into the local market, `_dev/verify-daynight-dwp.mjs` static validation + day/night chain self-check)
|
|
553
|
+
- `src/floater/` — desktop orb node half (`hub.ts` multi-tab state machine / `manager.ts` subprocess management / `routes.ts` `/we-sync/floater`)
|
|
554
|
+
- `native/we-capture/` — Rust native source (`main.rs` Windows Graphics Capture → JPEG; `src/bin/we-floater.rs` desktop orb window)
|
|
505
555
|
- `bin/we-capture.exe` — shipped native capture renderer (Windows-only)
|
|
556
|
+
- `bin/we-floater.exe` — shipped desktop orb (Windows-only, spawned on demand)
|
|
506
557
|
- `docs/` — format & implementation docs (`scene-format.md` / `scene-fallback.md` / `tex-format-findings.md` / `mdl-skinning-findings.md`)
|
|
507
558
|
- `tools/scene-renderer/` — built-in reference renderer (implements the protocol contract; real renderers replace it)
|
|
508
559
|
- `lib/` — prebuilt artifacts (zero build for users)
|
|
@@ -515,7 +566,12 @@ dsh plugin --profile web add github:YRN-playmaker/dsh-wallpaper_share#test
|
|
|
515
566
|
|
|
516
567
|
- **Market thumbnails do not load**: catalog thumbnails point at `raw.githubusercontent.com`, unreachable in some environments; the `onError` handler hides them.
|
|
517
568
|
- **Wallpaper Engine directory missing**: when auto-detection resolves to a non-existent directory, wallpaper sync is unavailable (the market is unaffected) — set `CONFIG.wallpaperEngineDir` manually.
|
|
569
|
+
- **Desktop orb is Windows-only**: it needs a Windows host plus the bundled `bin/we-floater.exe`; elsewhere (or when the file is missing) the panel toggle greys itself out.
|
|
518
570
|
|
|
519
571
|
## 📄 License
|
|
520
572
|
|
|
521
573
|
GPL-3.0
|
|
574
|
+
|
|
575
|
+
## Development encoding rules / 开发编码规范
|
|
576
|
+
|
|
577
|
+
AI agents and contributors must follow [AGENTS.md](AGENTS.md) and [编码与发布规范](docs/encoding-and-release.md). Run `npm run check:package` before packaging.
|
package/README.zh-CN.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<div align="center">
|
|
6
6
|
<a href="https://www.npmjs.com/package/dsh-wallpaper_share"><img alt="npm version" src="https://img.shields.io/npm/v/dsh-wallpaper_share" /></a>
|
|
7
7
|
<a href="https://opensource.org/licenses/GPL-3.0"><img alt="License: GPL-3.0" src="https://img.shields.io/badge/License-GPL--3.0-blue.svg" /></a>
|
|
8
|
-
<a href="https://github.com/YRN-playmaker/dsh-wallpaper_share/releases"><img alt="插件版本 v26.9.
|
|
8
|
+
<a href="https://github.com/YRN-playmaker/dsh-wallpaper_share/releases"><img alt="插件版本 v26.9.12-rc" src="https://img.shields.io/badge/v26.9.12--rc-4d6bfe" /></a>
|
|
9
9
|
</div>
|
|
10
10
|
|
|
11
11
|
[中文](README.zh-CN.md) | [English → README.md](README.md#english)
|
|
@@ -63,8 +63,10 @@ dsh plugin --profile web add dsh-wallpaper_share # 或见下方「安装」选
|
|
|
63
63
|
- **原生 scene 捕获渲染器**:随包内置 Rust 编写的 `we-capture.exe`,用 Windows Graphics Capture 抓取 WE 正在渲染的桌面,镜像 WE 自身输出 → GLSL / SceneScript / 关键帧 / 粒子等**所有 WE 效果天然全覆盖**
|
|
64
64
|
- **专注透镜**:叠加一个圆心清晰、圆外模糊的阅读窗;默认跟随鼠标,开专注即生效
|
|
65
65
|
- **眼动追踪(实验)**:可选,用摄像头推断注视点让透镜跟随视线;9 点校准、文字吸附、抗抖动
|
|
66
|
-
- **壁纸库 · 本地 / 市场**:按**本地**与**市场**两大分类浏览。本地一栏管理已装内容——`dwp壁纸`(点击即挂载为全局背景,已挂载再点取消)与 `we
|
|
66
|
+
- **壁纸库 · 本地 / 市场**:按**本地**与**市场**两大分类浏览。本地一栏管理已装内容——`dwp壁纸`(点击即挂载为全局背景,已挂载再点取消)与 `应用`(**大类**,下分 `we应用` 与 `应用`;点击卡片即启动,每次启动弹确认),带标题搜索、缩略图与计数;搜索框右侧的**「管理」**开关进入管理模式:卡片整体轻微晃动,**点卡片即多选**(选中项停住晃动、背景转蓝并打勾),选择条给出「已选 N / 卸载选中 / 清空选择」,可跨 `dwp壁纸` 与 `应用` 一次选完再统一卸载(确认弹层列出全部将被删除的项);每张卡仍保留「打开源文件 / 卸载」单项操作,dwp 的「打开源文件」会在资源管理器里定位包文件——**卸载只对 dwp 壁纸与启动器装的应用开放**,WE 工坊内容点了只给提示、不参与多选(绝不删 Steam 内容);市场一栏浏览 `dwp-registry` 目录,支持名称 / 作者搜索、标签筛选与**安装 / 更新 / 卸载**
|
|
67
67
|
- **DWP 壁纸与全局背景渲染**:`dwp/1.0` 协议包(纯文本 / solid / 粒子 / mesh 图层 + 12 种混合模式 + 3 种动画 + 11 种效果,确定性渲染);挂载后经 WebGL2 真实渲染为 DSH 全局背景(低配 Canvas2D 降级),同时暂停 WE 同步避免冲突,刷新后自动恢复
|
|
68
|
+
- **DWP 时钟变量(给壁纸作者的通用能力)**:插件每 2.5s 向**挂载中的任何场景**喂 `hour` / `night_alpha` / `night_on` / `day_on` 四个变量(`Handle.setParams` 逐键覆写,与内置包「工作区脉搏」的变量互不干扰);场景在 `variables` 里声明后即可引用——市场包 **「DeepSeek 日夜」** 就是用它做 18:00–06:00 自动换成夜景图、其余时间日景图,边界前后各 10 分钟线性过渡
|
|
69
|
+
- **DWP 纹理分档(同一张壁纸两档清晰度)**:另喂 `hd_on` / `night_sd` / `night_hd` 三个变量,由渲染模式决定档位——**「预览 / 捕获」= 低档,「增强 / 完整」= 高档**;包在 scene 顶层用扩展字段 `dsh.hdAssets` 声明"只在高档位需要的资源",低档位消费端把它们换成 1×1 占位图,因而**根本不下载、不解码**高分纹理(「DeepSeek 日夜」1.1.0 即 1920×1080 / 7680×4320 两档,切档位会按新档重新挂载)
|
|
68
70
|
- **沉浸模式**:一键隐去会话头部、正文与输入栏,让壁纸独占视野;网页 / 应用类壁纸在沉浸下可直接鼠标交互(详见[沉浸模式](#-沉浸模式与任务指示))
|
|
69
71
|
- **视觉效果滑块**:面板透明度 0–100% / 背景模糊 0–30px / 阴影深度 0–100%,即时生效
|
|
70
72
|
- **后台任务可视化**:收纳侧边栏时,用圆形指示感知任务进度(绿 = 空闲 / 蓝 = 进行中 / 黄 = 等待授权)
|
|
@@ -74,17 +76,19 @@ dsh plugin --profile web add dsh-wallpaper_share # 或见下方「安装」选
|
|
|
74
76
|
|
|
75
77
|
## 🧭 面板导览
|
|
76
78
|
|
|
77
|
-
`wallpaper_share`
|
|
79
|
+
`wallpaper_share` 标签页采用**三页虚拟滚动**:「设置 ⇄ 壁纸库 ⇄ dwp创作」三页纵向叠放、页间留断层,一套滚轮全接管——页内跟手滚动 + 惯性阻尼,滚到页界继续滚即**蓄力翻页**(250ms 无输入弹回防误触),右缘三个页签显示当前页(黄色高亮)与蓄力进度,点击可直达;所有操作即时生效、无需保存:
|
|
78
80
|
|
|
79
81
|
| 卡片 | 内容 |
|
|
80
82
|
| --- | --- |
|
|
81
83
|
| **壁纸状态** | 壁纸名(标题行**右缘为插件版本号**,一键整段选中便于反馈问题);下方副标题只承载诊断信息——scene 壁纸显示当前渲染通路(`场景 · 预览图 / 捕获 live 30fps / 浏览器模型渲染 / 回退:<原因>`),未应用壁纸时显示引导文案,其余类型整行不占;多显示器时出现「背景显示器」下拉;`⏻ 同步开启 / 关闭 / 暂停(DWP)` 三态按钮 |
|
|
82
84
|
| **视觉效果** | 三档渲染模式分段按钮;「专注模式」及其展开条(眼动追踪 / 校准视线 / 文字吸附 / 实时状态);透明度 · 模糊 · 阴影三个滑块(**专注开启时滑块隐藏**,改由任务态与透镜接管) |
|
|
83
|
-
| **壁纸库** | 「壁纸读取位置」可添加自定义壁纸目录(指向单个壁纸目录或集合文件夹),启动器安装位置也并入这里(带「(启动器安装位置)」标记,可更改 / 迁移);「本地 / 市场 / 应用启动器」三栏切换,本地按 `dwp壁纸` / `we
|
|
85
|
+
| **壁纸库** | 「壁纸读取位置」可添加自定义壁纸目录(指向单个壁纸目录或集合文件夹),启动器安装位置也并入这里(带「(启动器安装位置)」标记,可更改 / 迁移);「本地 / 市场 / 应用启动器」三栏切换,本地按 `dwp壁纸` / `应用`(下分 `we应用` 与 `应用`)筛选 + 标题搜索 + **「管理」**(卡片晃动 → 点卡片多选变蓝 → 「卸载选中」批量卸载,可跨分类累计;每张卡另有「打开源文件 / 卸载」)+ 分页(显示更多 +60),市场支持安装 / 更新 / 卸载,**应用启动器**只负责安装:支持直链安装(`.zip`/`.7z`/`.exe`,加密包可填解压密码)与 **139 分享链接**(提取码填提取码框;原始文件下载需粘贴一次 Authorization 登录态),自动封装类 WE app(json + 预览图),卡片「详细」可查安装时间 / 地址 / exe 文件;启动与卸载统一在「本地 → 应用」里做(每次启动弹确认) |
|
|
86
|
+
| **dwp创作** | 本轮为占位页:滚到这一页时宿主输入框重新出现(「设置」「壁纸库」两页会自动收起它,避免挡住卡片又可点),页面内容下一轮填充 |
|
|
84
87
|
|
|
85
88
|
两点与宿主 UI 的约定:
|
|
86
89
|
|
|
87
90
|
- **本标签页禁用正文宽度拖拽**:会话正文两侧那对拖拽把手在 `wallpaper_share`(与「轨迹」页一样)不出现,切回「对话记录」仍可用。
|
|
91
|
+
- **宿主输入框按页显隐**:「设置」「壁纸库」两页自动收起宿主输入框(opacity + `pointer-events:none`,不改布局),只有「dwp创作」页显示它——输入框是 sticky 常驻条(实测占 126px),既会挡住卡片底部行,也会吞掉那片区域的点击(压在它下面的按钮点不到);收起后两页的面板高度直接吃到视口底部,dwp创作页则按实测高度让开输入框。
|
|
88
92
|
- 标签页是 session 作用域插槽,切换会话会重挂载面板;语言与开关状态从模块级 store 恢复,不会"弹回英语"。
|
|
89
93
|
|
|
90
94
|
## 🎨 渲染模式与兼容矩阵
|
|
@@ -147,7 +151,7 @@ scene 壁纸在捕获 / 完整档下的渲染优先级与回退链:
|
|
|
147
151
|
|
|
148
152
|
## 🚀 安装
|
|
149
153
|
|
|
150
|
-
> 前置:兼容 DSH Web `0.1.0-rc.6` 及以上(已在 `0.1.
|
|
154
|
+
> 前置:兼容 DSH Web `0.1.0-rc.6` 及以上(已在 `0.1.5` 验证,0.1.2 的破坏性变更已适配,剩余限制见下方「已知问题」),以 `dsh --profile web` 运行。
|
|
151
155
|
|
|
152
156
|
### 🎯 分档安装(按需选择)
|
|
153
157
|
|
|
@@ -158,6 +162,8 @@ scene 壁纸在捕获 / 完整档下的渲染优先级与回退链:
|
|
|
158
162
|
| 🟣 **alpha(新版本)** | 适配 harness 为 alpha 架构的推荐版本 | `dsh plugin --profile web add dsh-wallpaper_share@alpha` |
|
|
159
163
|
| 🟡 **test(测试版本)** | 用于测试的版本,可能有未完成功能 | `dsh plugin --profile web add dsh-wallpaper_share@test` |
|
|
160
164
|
|
|
165
|
+
> 当前版本:**`26.9.12-rc`**(GitHub `main` 分支)。近期版本带来:壁纸库「管理」多选批量卸载、应用启动器卡片化简为「详细」、面板三页滚动(含占位的「dwp创作」)、宿主输入框按页显隐、**DWP 时钟变量**与**纹理分档**(预览/捕获用低清、增强/完整用高清);本 rc 移除百度网盘分享链接支持(云盘分享仅保留 139)并适配 harness `0.1.5`。
|
|
166
|
+
|
|
161
167
|
### 🔧 其他安装方式
|
|
162
168
|
|
|
163
169
|
```bash
|
|
@@ -179,10 +185,10 @@ dsh plugin --profile web add github:YRN-playmaker/dsh-wallpaper_share
|
|
|
179
185
|
# 从 GitHub 安装(仓库自带预构建 lib/,不需要构建许可;main = 最新档)
|
|
180
186
|
dsh plugin --profile web add dsh-wallpaper_share
|
|
181
187
|
# 从 npm 安装(默认 = latest 最新档)
|
|
182
|
-
dsh plugin --profile web add ./dsh-wallpaper_share-26.9.
|
|
183
|
-
# 本地 tarball 安装(26.9.
|
|
188
|
+
dsh plugin --profile web add ./dsh-wallpaper_share-26.9.12-rc.tgz
|
|
189
|
+
# 本地 tarball 安装(26.9.12-rc)
|
|
184
190
|
dsh plugin --profile web add github:YRN-playmaker/dsh-wallpaper_share#test
|
|
185
|
-
# 从 GitHub 安装 test
|
|
191
|
+
# 从 GitHub 安装 test 分支(测试档,功能最新但不稳定;正式取 main)
|
|
186
192
|
```
|
|
187
193
|
|
|
188
194
|
```bash
|
|
@@ -247,7 +253,7 @@ dsh plugin --profile web add github:YRN-playmaker/dsh-wallpaper_share#test
|
|
|
247
253
|
|
|
248
254
|
- `src/index.ts` — Node 半:WE 状态轮询、HTTP 路由、scene renderer 子进程管理、壁纸库扫描
|
|
249
255
|
- `src/scene/` — SceneAdapter 模块(协议 / 能力探测 / renderer 进程 / WebSocket / 回退 / PKGV0001 解析 / SceneModel 图层模型 / .tex 解码 / puppet mdl 解析)
|
|
250
|
-
- `src/client/` — 浏览器半(主题覆盖 / 背景层 / SceneCanvas / SceneModelRenderer 子集渲染器 / ParticleRuntime / GazeLens 眼动 / 专注透镜 / 沉浸模式 / wallpaper_share
|
|
256
|
+
- `src/client/` — 浏览器半(主题覆盖 / 背景层 / SceneCanvas / SceneModelRenderer 子集渲染器 / ParticleRuntime / GazeLens 眼动 / 专注透镜 / 沉浸模式 / wallpaper_share 面板 / library-model.ts 壁纸库分类与详情格式化)
|
|
251
257
|
- `native/we-capture/` — Rust 原生捕获器源码(Windows Graphics Capture → JPEG)
|
|
252
258
|
- `bin/we-capture.exe` — 随包发布的原生捕获器(Windows-only)
|
|
253
259
|
- `docs/` — 格式规范与技术文档(`scene-format.md` / `scene-fallback.md` / `tex-format-findings.md` / `mdl-skinning-findings.md`)
|
|
@@ -258,7 +264,7 @@ dsh plugin --profile web add github:YRN-playmaker/dsh-wallpaper_share#test
|
|
|
258
264
|
|
|
259
265
|
## 🆕 已知问题
|
|
260
266
|
|
|
261
|
-
> 适用版本:插件 `v26.9.
|
|
267
|
+
> 适用版本:插件 `v26.9.12-rc` / Harness `0.1.5`。
|
|
262
268
|
|
|
263
269
|
### 兼容性(Harness 0.1.2 破坏性变更 · 已适配)
|
|
264
270
|
|
|
@@ -283,3 +289,7 @@ dsh plugin --profile web add github:YRN-playmaker/dsh-wallpaper_share#test
|
|
|
283
289
|
## 📄 License
|
|
284
290
|
|
|
285
291
|
GPL-3.0
|
|
292
|
+
|
|
293
|
+
## Development encoding rules / 开发编码规范
|
|
294
|
+
|
|
295
|
+
AI agents and contributors must follow [AGENTS.md](AGENTS.md) and [编码与发布规范](docs/encoding-and-release.md). Run `npm run check:package` before packaging.
|
|
Binary file
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# 编码与发布规范
|
|
2
|
+
|
|
3
|
+
## 事故来源
|
|
4
|
+
|
|
5
|
+
2026-09-11 06:10:00 的开发会话为升级到 26.9.11-T,使用 Get-Content / -replace / Set-Content -NoNewline -Encoding UTF8 改写 package.json。Windows PowerShell 5.1 的该编码选项会写入 UTF-8 BOM。06:10:36 的提交 4c98286 将版本号变化和 BOM 一起提交;前一个版本没有 BOM。
|
|
6
|
+
|
|
7
|
+
BOM 不是插件功能或中文支持的需要。harness 的部分清单读取直接使用 JSON.parse:后端可能启动失败,前端可能吞掉解析异常并跳过插件。显式 link 依赖解释了外部目录的加载,不应将问题误判为 SceneRenderer 污染模块路径。
|
|
8
|
+
|
|
9
|
+
## 文件写入规则
|
|
10
|
+
|
|
11
|
+
- package.json 和供 Node.js 直接解析的 JSON 必须保存为 UTF-8 无 BOM。
|
|
12
|
+
- 优先使用 Node.js fs.writeFileSync(path, text, 'utf8');已有 BOM 可在明确修复流程中去除,但发布检查必须拒绝它,不能静默掩盖。
|
|
13
|
+
- 更新版本号:npm version <版本号> --no-git-tag-version。该操作可能同步更新 npm 锁文件;若存在 pnpm 锁文件,也需核对其一致性。
|
|
14
|
+
- PowerShell 5.1 必须写 JSON 时,使用 [IO.File]::WriteAllText(path, text, [Text.UTF8Encoding]::new($false))。读取 UTF-8 文件也应显式指定编码。
|
|
15
|
+
- PowerShell 7 可显式使用 utf8NoBOM;不能假定名为 pwsh 的工具实际运行的是 PowerShell 7。
|
|
16
|
+
- 不对 .ps1 执行批量去 BOM。Windows PowerShell 5.1 对含中文脚本的识别另有要求。
|
|
17
|
+
- .editorconfig 仅辅助编辑器;最终以自动检查结果为准。
|
|
18
|
+
|
|
19
|
+
## 检查与发布
|
|
20
|
+
|
|
21
|
+
1. 修改清单后运行 npm run check:package 和 npm run test:package。
|
|
22
|
+
2. npm run build / npm run bundle 会先检查清单。构建版本必须与清单一致。
|
|
23
|
+
3. npm pack / npm publish 的 prepack 会再次检查;发布工作流还会显式运行检查及回归测试,不需要安装依赖。
|
|
24
|
+
4. 打包后解开实际 tarball,核对 package/package.json 无 BOM 且 host/client 入口存在。不要仅检查开发目录。
|
|
25
|
+
5. 在干净 checkout、独立 DSH_HOME 中安装实际包,验证启动、新会话和 wallpaper_share 标签页。不得用开发机 link 安装成功代替发布包验证。
|
|
26
|
+
6. 记录测试使用的 harness 版本、Node 版本和操作系统;至少覆盖 Windows 与发布 CI 的 Linux。
|
|
27
|
+
7. 确认后再由维护者选择新版本发布。不要覆盖已发布版本,不要仅修本地而忘记提交。
|
|
28
|
+
|
|
29
|
+
## 故障排查
|
|
30
|
+
|
|
31
|
+
已挂载但不显示时,分别检查 host 与 client:清单编码、前端加载列表、浏览器错误、构建产物、插槽依赖。不要先要求用户重装 harness 或删除历史会话。会话序号损坏是独立问题;没有证据时不能归因于壁纸插件。
|
|
32
|
+
|
|
33
|
+
参考:https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_character_encoding
|