dsh-open-desktop 0.4.0 → 0.4.2
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/LICENSE +21 -0
- package/README.md +72 -0
- package/package.json +10 -11
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Howell5
|
|
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/README.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Open Desktop
|
|
2
|
+
|
|
3
|
+
把 DeepSeek Harness 的中栏变成**可拖拽的数据卡片墙**。
|
|
4
|
+
|
|
5
|
+
每张卡片不是静态组件,而是**一条真实 session 的持久展示位**:agent 在卡片目录里写代码(取数脚本、服务、前端),内容用 `view/` 里的 HTML/CSS/JS 在沙箱 iframe 中渲染。
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
## 安装
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
dsh plugin --profile desktop add dsh-open-desktop
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
要求 DSH `>=0.2.2-rc.3`。装完重启一次 DSH,侧栏出现「小组件」。
|
|
16
|
+
|
|
17
|
+
## 它解决什么
|
|
18
|
+
|
|
19
|
+
- **会话用完就沉底** → 卡片把结果留在板上,一眼能看到今天的数据。
|
|
20
|
+
- **dashboard 要手写** → 用一句话 + 模板新建,agent 在卡片自己的会话里把视图做出来。
|
|
21
|
+
- **看板容易假** → 每张卡有真实的数据年龄、失败状态和刷新节奏,不是静态截图。
|
|
22
|
+
|
|
23
|
+
## 特性
|
|
24
|
+
|
|
25
|
+
- **Bento 板面**:12 列网格,拖拽排序、拖右下角改尺寸;虚线占位表示目标位置,松手换位。
|
|
26
|
+
- **每卡独立刷新**:`template` / `command` / `file` / `url` 四种数据源,或每天固定时刻;属性弹窗里直接改频率。
|
|
27
|
+
- **唯一渲染路径**:`view/index.html + style.css + view.js`,沙箱 iframe + CSP,外链资源会被门禁打回。
|
|
28
|
+
- **设计系统注入**:`--od-*` token、`od-*` 组件类、`window.od` 运行时;卡片只写内容,不重画外壳。
|
|
29
|
+
- **30 张模板**:今天 / 工作 / 钱 / 信息 / 生活 / 数字资产,每类 5 张。
|
|
30
|
+
- **原生会话**:点「修改」进入卡片自己的 DSH 会话,顶部可预览卡片或返回板面。
|
|
31
|
+
|
|
32
|
+
## 交互
|
|
33
|
+
|
|
34
|
+
拖拽时目标格子留出同尺寸虚线占位,其余卡片实时让位;支持触屏长按和键盘(空格拿起 / 方向键移动 / 空格放下 / Escape 取消)。
|
|
35
|
+
|
|
36
|
+

|
|
37
|
+
|
|
38
|
+
卡片 `⋯ → 属性…` 可以改标题、尺寸和刷新频率;选「每天」时时间下拉固定在第二行,不会挤动「更多」。
|
|
39
|
+
|
|
40
|
+

|
|
41
|
+
|
|
42
|
+
## 卡片模型
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
$DSH_HOME/open-desktop/
|
|
46
|
+
cards/<id>/card.json # 标题/尺寸/顺序/刷新约定
|
|
47
|
+
cards/<id>/view/ # 唯一渲染源:index.html + style.css + view.js
|
|
48
|
+
cards/<id>/data/ # 数据文件(agent 自由写入)
|
|
49
|
+
cards/<id>/... # 其它任何代码
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
发布前 `card_finish` 会跑静态门禁:裸色值、外链资源、小于 11px 字号、直接 `fetch`、`window.open`、JS 语法错误都会被打回。
|
|
53
|
+
|
|
54
|
+
## 开发
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
npm install
|
|
58
|
+
npm run build # src/client/ → client.js(esbuild,react 由宿主注入)
|
|
59
|
+
npm test # 214 条测试
|
|
60
|
+
npm run harness # 可选:普通浏览器里的拖拽验证台
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
`client.js` 是构建产物,不要直接改;改 `src/client/`。Host 代码在 `host/`。
|
|
64
|
+
|
|
65
|
+
## 兼容性
|
|
66
|
+
|
|
67
|
+
- DSH `>=0.2.2-rc.3 <0.3.0-0`
|
|
68
|
+
- 已验证:macOS desktop profile,DSH `0.2.2-rc.3`
|
|
69
|
+
|
|
70
|
+
## License
|
|
71
|
+
|
|
72
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-open-desktop",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "把 DSH 的中栏变成可拖拽的数据卡片墙:每张卡片是一条真实会话,用 view/ 里的前端代码渲染,自带刷新节奏。",
|
|
6
6
|
"keywords": [
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
".": "./index.js",
|
|
25
25
|
"./client": "./client.js",
|
|
26
26
|
"./locale/*.json": "./locale/*.json",
|
|
27
|
-
"./icon": "./icon.svg"
|
|
27
|
+
"./icon": "./icon.svg",
|
|
28
|
+
"./package.json": "./package.json"
|
|
28
29
|
},
|
|
29
30
|
"files": [
|
|
30
31
|
"index.js",
|
|
@@ -48,27 +49,25 @@
|
|
|
48
49
|
]
|
|
49
50
|
}
|
|
50
51
|
},
|
|
51
|
-
"
|
|
52
|
+
"devDependencies": {
|
|
52
53
|
"@dnd-kit/core": "^6.3.1",
|
|
53
54
|
"@dnd-kit/modifiers": "^9.0.0",
|
|
54
55
|
"@dnd-kit/sortable": "^10.0.0",
|
|
55
|
-
"@dnd-kit/utilities": "^3.2.2"
|
|
56
|
-
},
|
|
57
|
-
"devDependencies": {
|
|
56
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
58
57
|
"esbuild": "^0.28.2",
|
|
59
58
|
"react": "^19.3.1",
|
|
60
59
|
"react-dom": "^19.3.1"
|
|
61
60
|
},
|
|
62
|
-
"homepage": "https://github.com/Howell5/
|
|
61
|
+
"homepage": "https://github.com/Howell5/dsh-open-desktop#readme",
|
|
63
62
|
"repository": {
|
|
64
63
|
"type": "git",
|
|
65
|
-
"url": "git+https://github.com/Howell5/
|
|
66
|
-
"directory": "plugin"
|
|
64
|
+
"url": "git+https://github.com/Howell5/dsh-open-desktop.git"
|
|
67
65
|
},
|
|
68
66
|
"bugs": {
|
|
69
|
-
"url": "https://github.com/Howell5/
|
|
67
|
+
"url": "https://github.com/Howell5/dsh-open-desktop/issues"
|
|
70
68
|
},
|
|
71
69
|
"engines": {
|
|
72
70
|
"dsh": ">=0.2.2-rc.3 <0.3.0-0"
|
|
73
|
-
}
|
|
71
|
+
},
|
|
72
|
+
"author": "Howell5"
|
|
74
73
|
}
|