dsh-ccx 0.0.0-stage → 0.8.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.
Files changed (52) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE +23 -0
  3. package/README.md +142 -2
  4. package/assets/icon.svg +27 -0
  5. package/assets/preview-home.png +0 -0
  6. package/assets/preview-market.png +0 -0
  7. package/assets/preview-milkyway.png +0 -0
  8. package/assets/preview-mountain.png +0 -0
  9. package/assets/preview-settings.png +0 -0
  10. package/assets/preview-surface.png +0 -0
  11. package/assets/scene-aurora-ionosphere.png +0 -0
  12. package/assets/scene-black-hole.png +0 -0
  13. package/assets/scene-blinking-squares.png +0 -0
  14. package/assets/scene-cloud-train.png +0 -0
  15. package/assets/scene-glow-horizon.png +0 -0
  16. package/assets/scene-heavenly-cloud.png +0 -0
  17. package/assets/scene-milky-way.png +0 -0
  18. package/assets/scene-mountain.png +0 -0
  19. package/assets/scene-particle-image.png +0 -0
  20. package/assets/scene-pixel-sculpt.png +0 -0
  21. package/cordis.patch.yml +16 -0
  22. package/lib/client.js +2244 -0
  23. package/lib/index.js +512 -0
  24. package/lib/vendor/code-codex/aurora-ionosphere.js +441 -0
  25. package/lib/vendor/code-codex/black-hole.js +640 -0
  26. package/lib/vendor/code-codex/blinking-squares.js +408 -0
  27. package/lib/vendor/code-codex/cloud-train.js +626 -0
  28. package/lib/vendor/code-codex/galleries.json +101 -0
  29. package/lib/vendor/code-codex/glow-horizon.js +260 -0
  30. package/lib/vendor/code-codex/heavenly-cloud.js +358 -0
  31. package/lib/vendor/code-codex/milky-way.js +303 -0
  32. package/lib/vendor/code-codex/mountain.js +335 -0
  33. package/lib/vendor/code-codex/particle-image/media/CodeCodex-background-particle-image-image-098c5fbaa5c415ec.png +0 -0
  34. package/lib/vendor/code-codex/particle-image/media/CodeCodex-background-particle-image-image-39894de0da1fa952.png +0 -0
  35. package/lib/vendor/code-codex/particle-image/media/CodeCodex-background-particle-image-image-6447780fc6368ce2.png +0 -0
  36. package/lib/vendor/code-codex/particle-image/media/CodeCodex-background-particle-image-image-746ff537a0eca39e.png +0 -0
  37. package/lib/vendor/code-codex/particle-image/media/CodeCodex-background-particle-image-image-89d064cef83721eb.png +0 -0
  38. package/lib/vendor/code-codex/particle-image/media/CodeCodex-background-particle-image-image-e1c658aa459cfcef.png +0 -0
  39. package/lib/vendor/code-codex/particle-image/media/CodeCodex-background-particle-image-thumbnail-098c5fbaa5c415ec.png +0 -0
  40. package/lib/vendor/code-codex/particle-image/media/CodeCodex-background-particle-image-thumbnail-39894de0da1fa952.png +0 -0
  41. package/lib/vendor/code-codex/particle-image/media/CodeCodex-background-particle-image-thumbnail-6447780fc6368ce2.png +0 -0
  42. package/lib/vendor/code-codex/particle-image/media/CodeCodex-background-particle-image-thumbnail-746ff537a0eca39e.png +0 -0
  43. package/lib/vendor/code-codex/particle-image/media/CodeCodex-background-particle-image-thumbnail-89d064cef83721eb.png +0 -0
  44. package/lib/vendor/code-codex/particle-image/media/CodeCodex-background-particle-image-thumbnail-e1c658aa459cfcef.png +0 -0
  45. package/lib/vendor/code-codex/particle-image.js +678 -0
  46. package/lib/vendor/code-codex/pixel-sculpt/media/CodeCodex-background-pixel-sculpt-image-079ae375628c240b.png +0 -0
  47. package/lib/vendor/code-codex/pixel-sculpt/media/CodeCodex-background-pixel-sculpt-image-0e0ec1222ff7a1bc.png +0 -0
  48. package/lib/vendor/code-codex/pixel-sculpt/media/CodeCodex-background-pixel-sculpt-image-3fde0595509bc4d5.png +0 -0
  49. package/lib/vendor/code-codex/pixel-sculpt.js +358 -0
  50. package/lib/vendor/code-codex/scene-defaults.json +215 -0
  51. package/lib/vendor/code-codex/scene-schemas.json +1957 -0
  52. package/package.json +57 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Witherwithwinter
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/NOTICE ADDED
@@ -0,0 +1,23 @@
1
+ dsh-ccx
2
+ Copyright (c) 2026 Witherwithwinter
3
+
4
+ This project includes third-party materials, used under the MIT License:
5
+
6
+ 1. Code-Codex background renderers
7
+ Source: https://github.com/Rice-dog/code-codex
8
+ Files: lib/vendor/code-codex/ (scene renderer bundles, default gallery
9
+ images, scene schemas/defaults)
10
+ Copyright (c) Rice-dog and Code-Codex contributors, MIT License.
11
+ The renderer bundles are included unmodified (minified build artifacts);
12
+ their embedded license headers and third-party notices are preserved in
13
+ the bundle files. The bundled default gallery images are the originals
14
+ distributed by that project.
15
+
16
+ 2. DeepSeek Harness UI reproductions
17
+ The settings-panel UI (market popover, settings popover, sliders, toolbars,
18
+ tokens) reproduces the visual design of DeepSeek Harness (@deepseek-ai/dsh,
19
+ MIT License, Copyright (c) 2026 DeepSeek). This plugin is not affiliated
20
+ with or endorsed by DeepSeek.
21
+
22
+ Both upstream projects are licensed under the MIT License; their original
23
+ copyright and license statements are reproduced here as required.
package/README.md CHANGED
@@ -1,3 +1,143 @@
1
- # Temporary Holding Version
1
+ <p align="center">
2
+ <img src="./assets/icon.svg" width="128" alt="dsh-ccx" />
3
+ </p>
2
4
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
5
+ <h1 align="center">dsh-ccx</h1>
6
+
7
+ <p align="center">
8
+ <a href="https://www.npmjs.com/package/dsh-ccx"><img src="https://img.shields.io/npm/v/dsh-ccx" alt="npm Version" /></a>
9
+ <a href="https://github.com/deepseek-ai/deepseek-harness"><img src="https://img.shields.io/badge/DSH-0.2.1--rc.2%2B-blue" alt="DSH Version" /></a>
10
+ <a href="https://github.com/Witherwithwinter/dsh-ccx/stargazers"><img src="https://img.shields.io/github/stars/Witherwithwinter/dsh-ccx" alt="GitHub Stars" /></a>
11
+ <a href="./LICENSE"><img src="https://img.shields.io/github/license/Witherwithwinter/dsh-ccx" alt="License" /></a>
12
+ </p>
13
+
14
+ <p align="center">给 DeepSeek Harness 桌面版换上动态背景:10 种场景渲染器、壁纸素材库、UI 表面分区透明,外加一个逐像素复刻的 Appearance 设置面板。</p>
15
+
16
+ <table>
17
+ <tr>
18
+ <td width="50%"><img src="./assets/preview-home.png" alt="层峦 · 新会话" /><br /><sub>层峦(Layered Mountain)· 新会话页</sub></td>
19
+ <td width="50%"><img src="./assets/preview-mountain.png" alt="层峦 · 对话页" /><br /><sub>层峦 · 对话页(表面分区透明 + 输入面板)</sub></td>
20
+ </tr>
21
+ <tr>
22
+ <td width="50%"><img src="./assets/preview-milkyway.png" alt="银河光场 · 对话页" /><br /><sub>银河光场(Milky Way)· 对话页</sub></td>
23
+ <td width="50%"><img src="./assets/preview-market.png" alt="Appearance 面板" /><br /><sub>Appearance 面板(dsh-ccx 弹层,卡片式外观列表)</sub></td>
24
+ </tr>
25
+ <tr>
26
+ <td width="50%"><img src="./assets/preview-settings.png" alt="场景设置" /><br /><sub>场景设置 popover(预设档 / 分组滑杆 / 调色板)</sub></td>
27
+ <td width="50%"><img src="./assets/preview-surface.png" alt="UI Surface Opacity" /><br /><sub>UI Surface Opacity —— 分区不透明度滑杆</sub></td>
28
+ </tr>
29
+ </table>
30
+
31
+ ## 特性
32
+
33
+ **10 种动态场景**——渲染器 1:1 来自 [Rice-dog/code-codex](https://github.com/Rice-dog/code-codex) 的 Appearance 系列(MIT,见[第三方归属](#第三方归属)):
34
+
35
+ | 效果 | 场景 | 说明 |
36
+ | --- | --- | --- |
37
+ | <img src="./assets/scene-milky-way.png" width="160" /> | 银河光场 Milky Way | 旋转星系 + 五色调色板 + 开场动画 |
38
+ | <img src="./assets/scene-glow-horizon.png" width="160" /> | 辉光地平线 Glow Horizon | 地平线辉光,方向四选、滚轮惯性 |
39
+ | <img src="./assets/scene-mountain.png" width="160" /> | 层峦 Layered Mountain | 视差山脊 + 日照着色,渲染比例可调 |
40
+ | <img src="./assets/scene-heavenly-cloud.png" width="160" /> | 云穹 Heavenly Cloud | 云层穹顶,三档渲染质量 |
41
+ | <img src="./assets/scene-aurora-ionosphere.png" width="160" /> | 极光电离层 Aurora | 极光帘 + 电离层波动 |
42
+ | <img src="./assets/scene-black-hole.png" width="160" /> | 黑洞 Black Hole | 吸积盘/光线/渲染器分组,影院/透镜/余烬三预设 |
43
+ | <img src="./assets/scene-cloud-train.png" width="160" /> | 云列车 Cloud Train | 列车车窗视角的云海,三染色可调 |
44
+ | <img src="./assets/scene-particle-image.png" width="160" /> | 粒子成像 Particle Image | 把图片采样成 56 万粒子,支持本地图库、自动轮播、鼠标交互、开场汇聚 |
45
+ | <img src="./assets/scene-pixel-sculpt.png" width="160" /> | 像素雕塑 Pixel Sculpt | WebGL2 实例化浮雕方块,图片高度场 + 指针涟漪,自带完整参数面板 |
46
+ | <img src="./assets/scene-blinking-squares.png" width="160" /> | 闪烁方块 Blinking Squares | 方块矩阵闪烁波纹,方向四选、键盘随机波纹 |
47
+
48
+ - **壁纸 / 视频素材库**:导入图片或 MP4/WebM,铺满 / 完整显示 / 平铺三种适配,与场景互斥切换。
49
+ - **实时生效**:所有参数调整直接推给运行中的渲染器(上游 `updateSettings` 同语义)——不重建舞台、不重播开场动画。
50
+ - **UI Surface Opacity**:通配透明让界面底色让位给背景,四个分区(会话侧栏 / 对话区 / 消息输入区 / 右侧栏)独立滑杆调节不透明度,外加背景压暗与模糊;**停用后输入框恢复原生样式**,圆角交界的缺口自动补齐,输入卡片周边的原生阴影与座位渐变也一并清理(透明背景下不会显出灰框);**DSH 自己的设置页不受影响**——设置面板保持宿主原生样式,背景照常透出。
51
+ - **Appearance 面板**:左下角齿轮弹出——12 张外观卡片(10 场景 + 壁纸 + 表面蒙版)+ 场景设置 popover,结构对齐 code-codex 0.5.7 真实 UI;启用某外观时已打开的设置面板自动关闭(上游交互语义)。
52
+ - **设置双端同步**:全部状态落宿主 `state.json`,多窗口 / 重启后一致;场景参数只存增量,渲染器内嵌默认值始终是真值。
53
+
54
+ ## 安装
55
+
56
+ 要求:DeepSeek Harness **桌面版**(版本见[兼容性](#兼容性))。仓库自带构建产物 `lib/`,所有安装方式都**不需要本地构建**。
57
+
58
+ ### 方法 A:让 DSH 安装 npm 包
59
+
60
+ 在 DSH 桌面版的会话里直接让它安装:
61
+
62
+ ```text
63
+ 安装 npm 包 dsh-ccx
64
+ ```
65
+
66
+ DSH 的 plugin_manager 会解析包的 `dsh.bundle` 元数据并装配进 desktop profile。装完**重启 DSH 桌面版**生效。
67
+
68
+ ### 方法 B:GitHub 源码
69
+
70
+ ```text
71
+ 安装 github:Witherwithwinter/dsh-ccx
72
+ ```
73
+
74
+ 同样重启生效。
75
+
76
+ ### 方法 C:手工编辑 profile(等价于方法 A)
77
+
78
+ 编辑 `~/.dsh/profiles/desktop/package.json`:
79
+
80
+ ```jsonc
81
+ {
82
+ "dependencies": {
83
+ "dsh-ccx": "^0.8.9" // 本地开发用 "link:/abs/path/to/dsh-ccx"
84
+ },
85
+ "dsh": {
86
+ "profile": {
87
+ "bundles": [
88
+ // ...既有 bundles...
89
+ "dsh-ccx" // ← 追加在最后
90
+ ]
91
+ }
92
+ }
93
+ }
94
+ ```
95
+
96
+ 然后在 profile 目录里 `pnpm install`,重启 DSH 桌面版。
97
+
98
+ > 桌面 profile 没有 web 端的 `patchReload: live` 热装配,**改配置、升级插件都需要重启 DSH**。升级插件代码本身(`lib/client.js`)后仅强刷页面不够——客户端按包版本号缓存,需要重启 DSH 或升版本号。
99
+
100
+ 左下角齿轮 ⚙ 弹出 Appearance 面板。
101
+
102
+ ## 兼容性
103
+
104
+ | 宿主 | 状态 |
105
+ | --- | --- |
106
+ | DSH 桌面版(Electron,`0.2.1-rc.2`) | ✅ 实机长期使用,全部功能端到端验证 |
107
+
108
+ 插件对宿主内部结构有依赖(`data-slot` 布局锚点及其父级容器、宿主 webserver 路由、`state.json` 存储契约),已做 `typeof` / `try/catch` 降级,但宿主大版本升级仍可能失效。与宿主主题 / 皮肤插件的关系:本插件通过 `@layer` 级联 + CSS 变量控制表面底色,不覆写 `--dsw-*` token,皮肤插件改 token 不会与它冲突。
109
+
110
+ 与 [DSH-Codinput](https://github.com/Witherwithwinter/DSH-Codinput) 协作:安装 Codinput 后,「消息输入区」蒙版精确命中它的编辑器卡片(`[data-composer-card]`),普通 / 悬浮 / 侧栏三种形态都跟随;未安装 Codinput 时输入区由对话区蒙版兜底。
111
+
112
+ ## 已知限制
113
+
114
+ - **原生菜单栏(应用 / 编辑)不参与透明化**:它是 Electron 非客户区,页面 CSS、bundle 进程、desktop-host 都不可达——背景从窗口内容区顶部开始,不含 OS 菜单条。需要 DSH 本体配合(不设应用菜单或 `win.setMenu(null)`)。
115
+ - **窗口完全遮挡 / 最小化到托盘时场景暂停渲染**:Chromium 原生遮挡检测让页面进入 hidden,渲染器停帧(上游 code-codex 同语义);窗口恢复可见即继续。刚唤出的一瞬可能看到合成残影,属显示层暂态。
116
+ - **Particle Image 首次启用需要图库**:默认图库自动播种到 IndexedDB;若「图库未就绪」,重启一次 DSH 让播种完成即可。
117
+ - **Pixel Sculpt 的设置在未启用时也可调**(实时写入并持久化,下次启用生效),「暂停动画」开关仅在场景启用中可用——与上游面板行为一致。
118
+ - 变形曲线(Particle Image 的 morph curve)以数值行呈现,未实现上游的曲线编辑器;开机恢复的上架过渡动画(startup transition)未移植。
119
+ - web 端 DSH 未适配、未测试。
120
+
121
+ ## 开发
122
+
123
+ ```bash
124
+ npm install
125
+ node test/host-smoke.test.mjs # 宿主半侧冒烟:路由、schema 真值锚点、设置规整
126
+ ```
127
+
128
+ - `lib/index.js` 是宿主半边(cordis 插件,注册 `/dsh-ccx` 与 `/dsh-appearances/*` 数据路由:状态读写、壁纸上传删除、vendor 场景脚本与图库媒体下发)。
129
+ - `lib/client.js` 是客户端半边(注入页面):背景层与场景生命周期、通配透明 + 分区蒙版、Appearance 面板(Shadow DOM)、设置保存与轮询。
130
+ - `lib/vendor/code-codex/` 是上游场景渲染器的构建产物与默认图库,**原样包含、不做修改**(`tools/gen-scene-schemas.cjs` 从上游源码机械提取字段真值)。
131
+ - `tools/` 是开发辅助脚本:CDP 面板/场景采集、上下游逐帧对比(pixelmatch)、宿主窗口恢复等;`tools/cdp.cjs` 是调试用 CDP 助手(宿主需带 `--remote-debugging-port=9222` 启动)。
132
+ - `tmp-code-codex/`(上游完整克隆,调试对照用)不入库。
133
+
134
+ ## 第三方归属
135
+
136
+ - **场景渲染器**(`lib/vendor/code-codex/`,含默认图库图片与字段真值):来自 [Rice-dog/code-codex](https://github.com/Rice-dog/code-codex)(MIT License),按原样分发,构建产物内嵌的许可与第三方声明已保留。
137
+ - **视觉复刻**:设置面板与表面样式复刻 DeepSeek Harness(`@deepseek-ai/dsh`,MIT License,Copyright (c) 2026 DeepSeek)的真实 UI。本项目与 DeepSeek、code-codex 均无隶属或背书关系。
138
+
139
+ 以上原始版权与许可声明见 [NOTICE](./NOTICE)。
140
+
141
+ ## 许可
142
+
143
+ [MIT](./LICENSE)
@@ -0,0 +1,27 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
2
+ <defs>
3
+ <linearGradient id="sky" x1="0" y1="0" x2="0" y2="1">
4
+ <stop offset="0" stop-color="#0b1026"/>
5
+ <stop offset="1" stop-color="#101a33"/>
6
+ </linearGradient>
7
+ <linearGradient id="aurora" x1="0" y1="0" x2="0" y2="1">
8
+ <stop offset="0" stop-color="#37d2a4" stop-opacity="0"/>
9
+ <stop offset="0.5" stop-color="#37d2a4" stop-opacity="0.9"/>
10
+ <stop offset="1" stop-color="#7c5cff" stop-opacity="0.15"/>
11
+ </linearGradient>
12
+ <linearGradient id="aurora2" x1="0" y1="0" x2="0" y2="1">
13
+ <stop offset="0" stop-color="#38bdf8" stop-opacity="0"/>
14
+ <stop offset="0.55" stop-color="#38bdf8" stop-opacity="0.75"/>
15
+ <stop offset="1" stop-color="#38bdf8" stop-opacity="0"/>
16
+ </linearGradient>
17
+ </defs>
18
+ <rect x="2" y="2" width="60" height="60" rx="14" fill="url(#sky)"/>
19
+ <circle cx="14" cy="15" r="1.4" fill="#cfe3ff" opacity="0.9"/>
20
+ <circle cx="24" cy="9" r="1" fill="#cfe3ff" opacity="0.7"/>
21
+ <circle cx="44" cy="12" r="1.2" fill="#cfe3ff" opacity="0.8"/>
22
+ <circle cx="53" cy="20" r="0.9" fill="#cfe3ff" opacity="0.6"/>
23
+ <path d="M4 40 C 14 22, 22 26, 30 34 C 40 44, 50 38, 60 24 L 60 58 L 4 58 Z" fill="url(#aurora)"/>
24
+ <path d="M4 46 C 16 32, 30 38, 42 32 C 50 28, 56 30, 60 34 L 60 58 L 4 58 Z" fill="url(#aurora2)" opacity="0.8"/>
25
+ <rect x="17" y="44" width="30" height="9" rx="4.5" fill="#0d1322" opacity="0.85"/>
26
+ <rect x="20" y="47" width="17" height="3" rx="1.5" fill="#5b8af5" opacity="0.9"/>
27
+ </svg>
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,16 @@
1
+ # ============================================================================
2
+ # dsh-ccx —— DSH bundle patch
3
+ # ============================================================================
4
+ # 插件的"挂载声明"。DSH 装配 bundle 层栈时把本行插入 profile 配置树:
5
+ # - 宿主半侧(lib/index.js):注册 /dsh-appearances/* 路由(设置读写、壁纸上传/服务)。
6
+ # - 浏览器半侧(lib/client.js):由 package.json 的 dsh.client + exports["./client"]
7
+ # 声明,DSH 客户端模块系统自动通过 /plugins/<id>/client.js 加载,无需 index 注入。
8
+ #
9
+ # 安装(官方桌面端):profile 的 dsh.profile.bundles 加入 "dsh-ccx",
10
+ # 依赖写 "link:<本目录绝对路径>"(或交给桌面端会话里的 plugin_manager 安装)。
11
+ # ============================================================================
12
+
13
+ - insert:
14
+ - id: dsh-ccx
15
+ name: dsh-ccx
16
+ config: {}