@iasiv5/dsh-skins 1.5.7 → 1.5.9

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.en.md CHANGED
@@ -42,6 +42,13 @@ dsh plugin --profile web remove @iasiv5/dsh-skins # uninstall
42
42
 
43
43
  With the [dsh-m](https://github.com/iasiv5/dsh-m) plugin marketplace installed, you can also install / uninstall this plugin with one click inside the DSH Web UI.
44
44
 
45
+ **Pick the plugin version for your DSH version**:
46
+
47
+ | Your DSH version | Plugin version |
48
+ |---|---|
49
+ | `0.2.0-rc.1` and later (Web and Desktop alike) | `@latest` (1.5.9+) |
50
+ | `0.1.x` | `1.5.7` (last release supporting that line) |
51
+
45
52
  <details>
46
53
  <summary>Hand the install to your Agent (prompt install)</summary>
47
54
 
@@ -107,7 +114,9 @@ Every skin's key visuals are open to adjustment. Click the gear button on a skin
107
114
  |---|---|---|
108
115
  | **Wallpaper** | Pick from the skin's built-in artwork, or upload your own images into a personal library | Each skin's default artwork |
109
116
  | **Slogan** | The new-session guidance line, one Chinese and one English copy | The skin's factory slogan |
110
- | **Translucency** | 0–100%, one value driving three visual layers: panel tint, wallpaper scrim and blur. 0% is pure, fully visible wallpaper; 100% hides it completely | meirenzhi: Web 35%, Desktop 55%; openbmc / uefi-harness: 55% in both |
117
+ | **Translucency** | 0–100%, one value driving three visual layers: panel tint, wallpaper scrim and blur. 0% is pure, fully visible wallpaper; 100% hides it completely | meirenzhi: Web 35%, Desktop 66%; openbmc / uefi-harness: Web 55%, Desktop 66% |
118
+
119
+ > meirenzhi ships zero wallpaper blur and no global glass at or below its Web factory value (35%) (ADR-0010) — the wallpaper stays native-crisp; blur ramps smoothly above 35% up to 12px at 100%.
111
120
 
112
121
  > **Desktop profile**: the shell is the solid skin base color and the wallpaper shows only inside the conversation area — see "The Desktop profile" below.
113
122
 
@@ -140,7 +149,7 @@ In the **DSH Desktop app**, the shell chrome — sidebar, caption strip, right p
140
149
 
141
150
  ![Desktop profile — solid chrome + wallpaper in the conversation area (meirenzhi · dark)](docs/assets/preview-desktop-1.webp)
142
151
 
143
- - Verified with dsh Desktop `0.2.0-rc.2` (Windows); macOS / Linux Desktop currently follow the Web form and will be adapted in a later release.
152
+ - Verified with dsh Desktop `0.2.1-rc.2` (Windows); macOS / Linux Desktop currently follow the Web form and will be adapted in a later release.
144
153
  - The right panel in fullscreen is the solid skin base color; the wallpaper is not shown through it.
145
154
 
146
155
  ## The skin switcher
@@ -173,10 +182,10 @@ Pick "DeepSeek Harness (Official)" in the skin switcher, or open `/?skin=officia
173
182
  Update duty has moved to the dsh-m marketplace and the DSH CLI (ADR-0008); the skin switcher only handles skins and personalization.
174
183
 
175
184
  **Which DSH Web versions are supported?**
176
- Verified with DSH Web `0.2.0-rc.2`. Later rc builds of the same series are expected to work, but unverified versions carry no promise.
185
+ Verified with DSH Web `0.2.0-rc.2`. Later rc builds of the same series are expected to work, but unverified versions carry no promise. Requires DSH `0.2.0-rc.1` or later; older DSH versions are blocked from upgrading to 1.5.8+ by the peer dependency floor.
177
186
 
178
187
  **Is the Desktop profile supported?**
179
- Yes. The DSH Desktop app and the Web profile are installed independently and do not affect each other; the desktop form (solid chrome + wallpaper in the conversation area) is described under "The Desktop profile". Verified with dsh Desktop `0.2.0-rc.2` (Windows).
188
+ Yes. The DSH Desktop app and the Web profile are installed independently and do not affect each other; the desktop form (solid chrome + wallpaper in the conversation area) is described under "The Desktop profile". Verified with dsh Desktop `0.2.1-rc.2` (Windows).
180
189
 
181
190
  **Does my appearance preference sync across browsers?**
182
191
  In the browser on the DSH host machine (loopback), the preference is persisted by the DSH Host and shared naturally. Other remote browsers keep the preference in their own `localStorage` — independent per browser, never overwritten.
package/README.i18n.yaml CHANGED
@@ -2,5 +2,5 @@
2
2
  # last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # node scripts/verify-readme-pairing.mjs --write
5
- README.md: 00a34bf2d930204da3aff8299779b931719ee5cd
6
- README.en.md: d741fa3991323516fe07e4b81c4f6862c6800456
5
+ README.md: 9e6c72d86ec8ca1ee7cb82212db3084ad322947f
6
+ README.en.md: e3f96d92d2dd77bb114b336121e2c380ae8613e7
package/README.md CHANGED
@@ -42,6 +42,13 @@ dsh plugin --profile web remove @iasiv5/dsh-skins # 卸载
42
42
 
43
43
  安装了 [dsh-m](https://github.com/iasiv5/dsh-m) 插件市场的话,也可以直接在 DSH Web 界面里一键安装 / 卸载本插件。
44
44
 
45
+ **按 DSH 版本选插件版本**:
46
+
47
+ | 你的 DSH 版本 | 插件版本 |
48
+ |---|---|
49
+ | `0.2.0-rc.1` 及以上(web 与 Desktop 通用) | `@latest`(1.5.9+) |
50
+ | `0.1.x` | `1.5.7`(该线的最后支持版) |
51
+
45
52
  <details>
46
53
  <summary>把安装交给 Agent(提示词安装法)</summary>
47
54
 
@@ -107,7 +114,9 @@ dsh plugin --profile web remove @iasiv5/dsh-skins # 卸载
107
114
  |---|---|---|
108
115
  | **壁纸** | 从皮肤自带的「内置精选」里挑,或上传自己的图片进「个人图库」 | 各皮肤的默认画作 |
109
116
  | **标语** | 新会话页的引导语,中文、英文各一份 | 皮肤出厂标语 |
110
- | **通透度** | 0–100% 单值联动三个视觉层:面板底色、壁纸遮罩、模糊。0% 纯壁纸完全透出,100% 完全遮蔽 | 美人志:Web 35%、Desktop 55%;openbmc / uefi-harness:两端均 55% |
117
+ | **通透度** | 0–100% 单值联动三个视觉层:面板底色、壁纸遮罩、模糊。0% 纯壁纸完全透出,100% 完全遮蔽 | 美人志:Web 35%、Desktop 66%;openbmc / uefi-harness:Web 55%、Desktop 66% |
118
+
119
+ > 美人志在 Web 出厂值(35%)及以下不引入任何壁纸模糊与全局玻璃(ADR-0010),壁纸保持原生锐度;模糊自 35% 以上沿铰链曲线平滑爬升,100% 到顶 12px。
111
120
 
112
121
  > **Desktop profile**:外壳为实色皮肤本色、壁纸只在会话区显露——详见下方「Desktop profile 上的形态」。
113
122
 
@@ -140,7 +149,7 @@ dsh plugin --profile web remove @iasiv5/dsh-skins # 卸载
140
149
 
141
150
  ![Desktop profile — 实色外壳 + 会话区壁纸(美人志 · 深色)](docs/assets/preview-desktop-1.webp)
142
151
 
143
- - 已在 dsh Desktop `0.2.0-rc.2`(Windows)验证;macOS / Linux Desktop 当前跟随 Web 形态,后续版本适配。
152
+ - 已在 dsh Desktop `0.2.1-rc.2`(Windows)验证;macOS / Linux Desktop 当前跟随 Web 形态,后续版本适配。
144
153
  - 右栏面板全屏时为实色皮肤底、不透出壁纸;面板「收起/关闭」后的空轨道行为属宿主布局。
145
154
 
146
155
  ## 皮肤切换器
@@ -173,10 +182,10 @@ URL 也能切皮肤:`/?skin=official`、`/?skin=openbmc`、`/?skin=uefi-harnes
173
182
  更新职责已移交 dsh-m 市场与 DSH CLI(ADR-0008);皮肤切换器只负责换肤与个性化。
174
183
 
175
184
  **支持哪些 DSH Web 版本?**
176
- 已使用 DSH Web `0.2.0-rc.2` 验证。同系列 rc 版本理论上兼容,未经验证的版本不作承诺。
185
+ 已使用 DSH Web `0.2.0-rc.2` 验证。同系列 rc 版本理论上兼容,未经验证的版本不作承诺。最低支持 DSH `0.2.0-rc.1`:更旧的 DSH 版本会被 peer 依赖门槛挡住,无法升级到 1.5.8+。
177
186
 
178
187
  **支持 Desktop profile 吗?**
179
- 支持。DSH Desktop 应用与 Web profile 各自独立安装、互不影响;桌面形态(实色外壳 + 会话区壁纸)见「Desktop profile 上的形态」。已使用 dsh Desktop `0.2.0-rc.2`(Windows)验证。
188
+ 支持。DSH Desktop 应用与 Web profile 各自独立安装、互不影响;桌面形态(实色外壳 + 会话区壁纸)见「Desktop profile 上的形态」。已使用 dsh Desktop `0.2.1-rc.2`(Windows)验证。
180
189
 
181
190
  **外观偏好在不同的浏览器间同步吗?**
182
191
  在 DSH 所在机器的浏览器(loopback)上,偏好由 DSH Host 持久化,天然共享。其他远程浏览器由插件将偏好存入本地 `localStorage`,各浏览器独立、互不覆盖。
package/lib/client.js CHANGED
@@ -128,7 +128,7 @@
128
128
  function getSkinSchema(skinId, profile = "web") {
129
129
  const entry = SKINS[skinId];
130
130
  if (entry === void 0) return null;
131
- const fields = profile === "desktop" && skinId === "meirenzhi" ? entry.fields.map((field) => field.key === "panelOpacity" ? { ...field, default: 55 } : field) : entry.fields;
131
+ const fields = profile === "desktop" ? entry.fields.map((field) => field.key === "panelOpacity" ? { ...field, default: 66 } : field) : entry.fields;
132
132
  return { skinId, fields, builtinAssets: entry.builtinAssets };
133
133
  }
134
134
  function getField(skinId, key) {
@@ -2716,7 +2716,7 @@ ${names}`,
2716
2716
  const s = (Math.round(30 * t * t) / 100).toFixed(3);
2717
2717
  const scrimLight = `linear-gradient(rgba(252, 250, 246, ${s}) 0%, rgba(252, 250, 246, ${s}) 100%)`;
2718
2718
  const scrimDark = `linear-gradient(rgba(16, 16, 26, ${s}) 0%, rgba(16, 16, 26, ${s}) 100%)`;
2719
- const blurPx = Math.round(12 * t * t);
2719
+ const blurPx = t > 0.35 ? Math.round(12 * ((t - 0.35) / 0.65) ** 2) : 0;
2720
2720
  const desktopBlurPx = Math.min(24, blurPx + values.panelOpacity / 55);
2721
2721
  const wallpaperUrl = assets?.wallpaper?.url ?? null;
2722
2722
  const imageLight = wallpaperUrl === null ? null : `url("${wallpaperUrl}")`;
package/lib/index.js CHANGED
@@ -281,7 +281,7 @@ var SKINS = {
281
281
  function getSkinSchema(skinId, profile = "web") {
282
282
  const entry = SKINS[skinId];
283
283
  if (entry === void 0) return null;
284
- const fields = profile === "desktop" && skinId === "meirenzhi" ? entry.fields.map((field) => field.key === "panelOpacity" ? { ...field, default: 55 } : field) : entry.fields;
284
+ const fields = profile === "desktop" ? entry.fields.map((field) => field.key === "panelOpacity" ? { ...field, default: 66 } : field) : entry.fields;
285
285
  return { skinId, fields, builtinAssets: entry.builtinAssets };
286
286
  }
287
287
  function getField(skinId, key) {
@@ -1065,7 +1065,7 @@ function mountPersonalizationRoutes(host, options) {
1065
1065
  const { store, assetsBasePath = "/dsh-skins/assets", trustedHosts = [] } = options;
1066
1066
  const disposers = [];
1067
1067
  const fence = (request, response) => {
1068
- if (isTrustedRequest(request, trustedHosts)) return true;
1068
+ if (isTrustedRequest(request, typeof trustedHosts === "function" ? trustedHosts() : trustedHosts)) return true;
1069
1069
  sendJson(response, 403, { error: "trusted DSH Web request required" });
1070
1070
  return false;
1071
1071
  };
@@ -1182,6 +1182,20 @@ function mountPersonalizationRoutes(host, options) {
1182
1182
  };
1183
1183
  }
1184
1184
 
1185
+ // src/host/trusted-hosts.js
1186
+ function resolveTrustedHosts(ctx) {
1187
+ let startup, runtime;
1188
+ try {
1189
+ startup = ctx?.get?.("webStartup");
1190
+ } catch {
1191
+ }
1192
+ try {
1193
+ runtime = ctx?.get?.("webRuntime");
1194
+ } catch {
1195
+ }
1196
+ return startup?.trustedHosts ?? runtime?.trustedHosts ?? [];
1197
+ }
1198
+
1185
1199
  // src/index.js
1186
1200
  var name = "@iasiv5/dsh-skins";
1187
1201
  function expandHomePath(path) {
@@ -1218,7 +1232,7 @@ function dataDirForProfile(root, profile) {
1218
1232
  return desktop;
1219
1233
  }
1220
1234
  function apply(ctx) {
1221
- ctx.inject(["webServer", "webRuntime"], (hostContext) => {
1235
+ ctx.inject(["webServer"], (hostContext) => {
1222
1236
  const root = dshHome();
1223
1237
  const profile = hostProfileFor(root);
1224
1238
  const personalization = createPersonalizationStore({
@@ -1228,7 +1242,7 @@ function apply(ctx) {
1228
1242
  hostContext.effect(() => {
1229
1243
  return mountPersonalizationRoutes(hostContext, {
1230
1244
  store: personalization,
1231
- trustedHosts: hostContext.webRuntime.trustedHosts
1245
+ trustedHosts: () => resolveTrustedHosts(ctx)
1232
1246
  });
1233
1247
  }, "dsh-skins: personalization routes");
1234
1248
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@iasiv5/dsh-skins",
3
3
  "description": "DSH Web 皮肤插件:多套品牌皮肤侧栏热切换。",
4
- "version": "1.5.7",
4
+ "version": "1.5.9",
5
5
  "homepage": "https://github.com/iasiv5/dsh-skins#readme",
6
6
  "repository": {
7
7
  "type": "git",
@@ -55,26 +55,28 @@
55
55
  },
56
56
  "peerDependencies": {
57
57
  "@deepseek-ai/cordis": "^4.0.1",
58
- "@deepseek-ai/dsh-client-connection": ">=0.1.1-rc.2",
59
- "@deepseek-ai/dsh-client-locale": ">=0.1.1-rc.2",
60
- "@deepseek-ai/dsh-client-runtime": ">=0.1.1-rc.2",
61
- "@deepseek-ai/dsh-client-ui-conversation": ">=0.1.1-rc.2",
62
- "@deepseek-ai/dsh-client-ui-sidebar": ">=0.1.1-rc.2",
63
- "@deepseek-ai/dsh-client-ui-theme": ">=0.1.1-rc.2"
58
+ "@deepseek-ai/dsh-client-connection": ">=0.2.0-rc.1 || >=0.2.1-rc.1",
59
+ "@deepseek-ai/dsh-client-locale": ">=0.2.0-rc.1 || >=0.2.1-rc.1",
60
+ "@deepseek-ai/dsh-client-runtime": ">=0.2.0-rc.1 || >=0.2.1-rc.1",
61
+ "@deepseek-ai/dsh-client-ui-conversation": ">=0.2.0-rc.1 || >=0.2.1-rc.1",
62
+ "@deepseek-ai/dsh-client-ui-sidebar": ">=0.2.0-rc.1 || >=0.2.1-rc.1",
63
+ "@deepseek-ai/dsh-client-ui-theme": ">=0.2.0-rc.1 || >=0.2.1-rc.1"
64
64
  },
65
65
  "license": "MIT",
66
66
  "devDependencies": {
67
67
  "@deepseek-ai/cordis": "^4.0.4",
68
68
  "esbuild": "^0.28.2",
69
- "playwright-core": "1.62.1"
69
+ "playwright-core": "1.62.1",
70
+ "semver": "^7.8.5"
70
71
  },
71
72
  "scripts": {
72
73
  "build": "node scripts/build-client.mjs",
73
74
  "watch": "node scripts/build-client.mjs --watch",
75
+ "check:lockfile": "pnpm install --frozen-lockfile --lockfile-only",
74
76
  "test": "pnpm run build && node smoke-test.cjs && node --test tests/*.test.mjs",
75
77
  "verify:readme": "node scripts/verify-readme-pairing.mjs",
76
78
  "verify:bundle": "node scripts/verify-bundle-guard.mjs",
77
79
  "verify:hooks": "node scripts/verify-upstream-hooks.mjs",
78
- "check": "pnpm run build && node --check lib/client.js && node --check lib/index.js && pnpm run test && pnpm run verify:readme && pnpm run verify:bundle && pnpm run verify:hooks"
80
+ "check": "pnpm run check:lockfile && pnpm run build && node --check lib/client.js && node --check lib/index.js && pnpm run test && pnpm run verify:readme && pnpm run verify:bundle && pnpm run verify:hooks"
79
81
  }
80
82
  }