dsh-convenient-window 0.2.0-beta.3 → 0.2.0
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 +117 -26
- package/host/assets.js +33 -33
- package/host/helper.js +214 -214
- package/host/native-service.js +156 -156
- package/host/panel-controller.js +493 -493
- package/host/settings.js +98 -98
- package/lib/client.js +1 -1
- package/lib/cw-dsh-native.exe +0 -0
- package/lib/model.mjs +651 -540
- package/lib/native-identity.json +1 -1
- package/lib/panel.html +14 -14
- package/lib/panel.js +51 -51
- package/package.json +79 -79
- package/payload/magic-corners-helper.exe +0 -0
- package/runtime-assets.json +29 -29
package/README.md
CHANGED
|
@@ -1,23 +1,109 @@
|
|
|
1
1
|
# dsh-convenient-window · 便捷窗口
|
|
2
2
|
|
|
3
|
-
在
|
|
3
|
+
在 DeepSeek Harness 侧栏集中管理 Windows 窗口:把暂时不用的窗口藏到屏幕边缘,鼠标移近即可唤回;为屏幕边角设置快捷动作,用鼠标手势执行常用操作,并保存和恢复窗口布局。还支持窗口置顶、拖拽缩放、区域截图、截图贴图与文字识别。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## 功能预览
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
### 贴边隐藏:需要时展开,不用时收起
|
|
8
|
+
|
|
9
|
+

|
|
10
|
+
|
|
11
|
+
### 触发角:把屏幕边角变成快捷操作入口
|
|
12
|
+
|
|
13
|
+

|
|
14
|
+
|
|
15
|
+
### 鼠标手势:画出轨迹,执行常用操作
|
|
16
|
+
|
|
17
|
+

|
|
18
|
+
|
|
19
|
+
首图为 DSH 实际页签;后两图复用桌面版共享设置页的浅色截图,具体排版以当前插件为准。
|
|
20
|
+
|
|
21
|
+
## 版本与使用环境
|
|
22
|
+
|
|
23
|
+
设置页直接复用独立桌面版,Windows 助手已装在插件包里,无需再下载一次。
|
|
24
|
+
|
|
25
|
+
| 插件 | 内置窗口引擎 | 已验收环境 |
|
|
26
|
+
| --- | --- | --- |
|
|
27
|
+
| **0.2.0** | **0.6.12** | Windows 11 x64、DSH **0.2.2-rc.5** |
|
|
28
|
+
|
|
29
|
+
[查看发布与下载](https://github.com/ximizhou/convenient_window_free/releases/tag/dsh-v0.2.0) · [项目首页](../../README.zh-CN.md) · [反馈问题](https://github.com/ximizhou/convenient_window_free/issues/new/choose)
|
|
30
|
+
|
|
31
|
+
## 安装
|
|
32
|
+
|
|
33
|
+
### 从 npm 安装(本版在 npm 上线后)
|
|
34
|
+
|
|
35
|
+
1. 先打开一次 DSH,让它创建 `desktop` 配置,然后从系统托盘**退出 DSH**。
|
|
36
|
+
2. 打开 PowerShell,粘贴下面的命令并回车。安装时保持联网。
|
|
10
37
|
|
|
11
38
|
```powershell
|
|
12
|
-
|
|
13
|
-
dsh plugin --profile desktop add "file:$pkg" --ignore-scripts
|
|
39
|
+
dsh plugin --profile desktop add dsh-convenient-window@0.2.0 --ignore-scripts --registry=https://registry.npmjs.org/
|
|
14
40
|
```
|
|
15
41
|
|
|
16
|
-
|
|
42
|
+
3. 安装成功后重新打开 DSH,点击左侧 **dsh-convenient-window**。
|
|
43
|
+
4. 按需开启右上角的功能总开关,再打开需要的功能。首次安装默认关闭总开关。
|
|
44
|
+
|
|
45
|
+
上面的命令固定本版,只有 npm 已提供 `0.2.0` 后才可用。GitHub 预发布、npm 发布和市场索引是独立状态;如果 npm 尚未提供本版,先按下方 GitHub 下载包方式安装。不要把 `latest` 或 `beta` 默认当成本版,也不要仅凭包号判断已经转正式,具体状态以对应发布页为准。
|
|
46
|
+
|
|
47
|
+
<details>
|
|
48
|
+
<summary><strong>PowerShell 提示找不到 dsh,怎么办?</strong></summary>
|
|
17
49
|
|
|
18
|
-
|
|
50
|
+
找到 DSH 的安装目录,再打开其中的 `resources\runtime\cli\bin` 文件夹,找到 `dsh.cmd`。在 PowerShell 中用其完整路径替换命令开头的 `dsh`。下面的路径是占位示例,需要换成你自己的安装位置:
|
|
51
|
+
|
|
52
|
+
```powershell
|
|
53
|
+
& "你的 DSH 安装目录\resources\runtime\cli\bin\dsh.cmd" plugin --profile desktop add dsh-convenient-window@0.2.0 --ignore-scripts --registry=https://registry.npmjs.org/
|
|
54
|
+
```
|
|
19
55
|
|
|
20
|
-
|
|
56
|
+
</details>
|
|
57
|
+
|
|
58
|
+
### 也可以安装 GitHub 下载包
|
|
59
|
+
|
|
60
|
+
从[本版 Release](https://github.com/ximizhou/convenient_window_free/releases/tag/dsh-v0.2.0)下载 `dsh-convenient-window-0.2.0.tgz`。退出 DSH,在下载目录打开 PowerShell:
|
|
61
|
+
|
|
62
|
+
```powershell
|
|
63
|
+
$pkg = (Resolve-Path -LiteralPath '.\dsh-convenient-window-0.2.0.tgz').Path
|
|
64
|
+
dsh plugin --profile desktop add "file:$pkg" --ignore-scripts
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
保留这个文件,便于重装或回退。npm 发布必须使用这份同一验收包;已上线时可核对两边哈希。日常安装不加 `--offline`,因为 DSH 可能还需核对当前配置中其他插件的依赖。
|
|
68
|
+
|
|
69
|
+
## 升级、旧名称迁移和卸载
|
|
70
|
+
|
|
71
|
+
**已经是新名称:** 安装前退出 DSH,再执行目标版本的安装命令;使用同一个 profile 保留设置。先阅读目标版本的兼容与迁移说明。
|
|
72
|
+
|
|
73
|
+
**装过旧名 `dsh-plugin-convenient-window`:**
|
|
74
|
+
|
|
75
|
+
1. 如果开过旧插件的登录自启,先在旧页签运行中心关闭它。
|
|
76
|
+
2. 从托盘退出 DSH,再移除旧包:
|
|
77
|
+
|
|
78
|
+
```powershell
|
|
79
|
+
dsh plugin --profile desktop remove dsh-plugin-convenient-window
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
3. 确认移除成功,再按上面的 npm 或 GitHub 方式安装新名称。
|
|
83
|
+
4. 重开后检查设置,并按需重新开启登录自启。最早的 `0.1.0-beta.1` 迁移时,总开关默认关闭。
|
|
84
|
+
|
|
85
|
+
旧名和新名共用当前 profile 的 `convenient-window/` 数据目录;配置、窗口布局与界面偏好在更名验收中保留。配置导出可作为额外备份,但不等于完整备份窗口布局和所有宿主偏好。
|
|
86
|
+
|
|
87
|
+
**卸载:** 先在插件里关闭登录自启(如果开启),从托盘退出 DSH,然后运行:
|
|
88
|
+
|
|
89
|
+
```powershell
|
|
90
|
+
dsh plugin --profile desktop remove dsh-convenient-window
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
卸载保留 profile 中的设置。回退到保存的旧版包时,先移除当前包,再安装旧包;旧版本未必能读取将来的配置格式,不把回退当成无条件兼容。
|
|
94
|
+
|
|
95
|
+
## 常见问题
|
|
96
|
+
|
|
97
|
+
- **安装成功但没有页签:** 确认安装到正在使用的 `desktop` profile,并从托盘完全退出后重开 DSH。
|
|
98
|
+
- **助手被占用:** 桌面版、uTools 和 DSH 共用单实例窗口引擎。先在原宿主正常关闭助手,再启用这里的总开关。
|
|
99
|
+
- **DSH 升级后不兼容:** 本版只声明已验收的 `0.2.2-rc.5`。记录两边版本并反馈,不要通过删除兼容限制强行启用。
|
|
100
|
+
- **部分功能入口没显示:** 在右上角齿轮里的功能入口设置中调整。底部空间有限,并非功能被删除。
|
|
101
|
+
- **切页后还能工作吗:** 开启后,切换页签和最小化不停止助手;退出 DSH 会停止本插件拥有的进程。
|
|
102
|
+
- **能和桌面版互相同步吗:** 两边配置独立保存,不自动同步。
|
|
103
|
+
- **没有找到市场条目:** npm 发布、目录审核和市场可搜索是不同状态。未查到时可先用本页固定版本命令,不要安装名称相近的包。
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
## 功能范围
|
|
21
107
|
|
|
22
108
|
| 桌面功能 | DSH 本版 |
|
|
23
109
|
| --- | --- |
|
|
@@ -34,7 +120,7 @@
|
|
|
34
120
|
|
|
35
121
|
底部放不下的入口在右上齿轮的功能入口设置里。贴边体验请用未最大化的普通窗口;多屏 DPI、手势手感、截图/OCR 和任务栏实际效果需在目标机器分别体验,自动化的“设置已应用”不能代替真人验收。
|
|
36
122
|
|
|
37
|
-
|
|
123
|
+
## 维护者
|
|
38
124
|
|
|
39
125
|
```text
|
|
40
126
|
DSH 侧栏 → 独立文档内的桌面 App.svelte + styles.css(同一份源文件)
|
|
@@ -44,27 +130,25 @@ DSH 侧栏 → 独立文档内的桌面 App.svelte + styles.css(同一份源
|
|
|
44
130
|
```
|
|
45
131
|
|
|
46
132
|
- `src/client.js` 只注册 DSH 插槽;隔离文档避免桌面样式、事件和主题污染 DSH。`src/panel.ts` 接宿主功能;`src/globals.js` 仅对本次构建注入传输和偏好适配,不替换 DSH 的全局对象。构建检查桌面组件确实进入成品,拒绝打入 Tauri 渲染 API。
|
|
47
|
-
- `host/panel-controller.js` 复用构建自桌面源码的模型,对写入核对 session/revision,确认回执才显示已应用;不向页面发助手 token,不开放计算任意命令或访问任意文件的接口。旧设置仅用于首次迁移。两个版本使用同一个 Rust helper
|
|
48
|
-
- 产品/助手 **0.6.
|
|
133
|
+
- `host/panel-controller.js` 复用构建自桌面源码的模型,对写入核对 session/revision,确认回执才显示已应用;不向页面发助手 token,不开放计算任意命令或访问任意文件的接口。旧设置仅用于首次迁移。两个版本使用同一个 Rust helper 源码;本包同步已发布的 0.6.12 引擎,桌面版与 uTools 无需随此版重发。
|
|
134
|
+
- 产品/助手 **0.6.12**,DSH 适配包 **0.2.0**;只声明已验证的 Windows DSH **0.2.2-rc.5**。仅 DSH 变化,先改宿主适配并升级适配包号。不要改已发布的产品版本或 stable 资产。
|
|
49
135
|
- 在 `apps/dsh-plugin` 运行 `npm ci`、`npm test`。按 `runtime-assets.json` 准备正式资产后执行 `npm run stage:helper -- <解压目录>`。使用 native 工具链执行 `npm run build:native -- <与桌面 Cargo.lock 对应的 THIRD-PARTY-NOTICES.txt>`,再执行 `npm run test:native`;测试不抢占其他助手。`npm pack` 生成单包。`npm run test:desktop -- "<DSH.exe>" "<新版.tgz>" ["<已验收的旧版.tgz>"]` 在隔离配置验最终包(可验证升级);同时保留日常有其他插件时不加 `--offline` 的安装回归。测试不替用户修改登录设置、操作真实窗口布局或自动发布。
|
|
50
136
|
|
|
51
|
-
|
|
137
|
+
## 发布与市场收录
|
|
52
138
|
|
|
53
|
-
|
|
139
|
+
为已验收的插件提交创建 `dsh-v<插件版本>` Tag,并将实装验收通过的 `.tgz` 附在 GitHub Pre-release 中。桌面和 DSH 插件共用[产品 Releases 入口](https://github.com/ximizhou/convenient_window_free/releases)。
|
|
54
140
|
|
|
55
|
-
|
|
141
|
+
将同一个 `.tgz` 发布到所选 npm 渠道。候选需要测试分发时用 `beta`;转正式后由发布者将已验收的同一包发布到 `latest`。先预览包名、版本和文件清单,再由发布者在自己的终端执行发布;不要在转正式时重打包。下面为候选频道示例,正式发布时改用 `--tag latest`。将路径换成本次验收文件。
|
|
56
142
|
|
|
57
143
|
```powershell
|
|
58
|
-
|
|
59
|
-
$pkg
|
|
60
|
-
npm.cmd publish "$pkg" --
|
|
61
|
-
npm.cmd publish "$pkg" --access public --tag beta --registry=https://registry.npmjs.org
|
|
62
|
-
npm.cmd view dsh-convenient-window@beta version dist.integrity --registry=https://registry.npmjs.org
|
|
144
|
+
$pkg = (Resolve-Path -LiteralPath '<本轮验收的 .tgz>').Path
|
|
145
|
+
npm.cmd publish "$pkg" --dry-run --access public --tag beta --registry=https://registry.npmjs.org/
|
|
146
|
+
npm.cmd publish "$pkg" --access public --tag beta --registry=https://registry.npmjs.org/
|
|
63
147
|
```
|
|
64
148
|
|
|
65
|
-
|
|
149
|
+
发布者按 npm 提示完成登录和双重验证。发布后查询所选标签的实际指向,匿名下载 npm 和 GitHub 两边的包,核对大小及 SHA-256,再在全新的 DSH `desktop` 配置按发布页命令试装。`npm publish --dry-run` 只预览,不代表已经发布。见 [npm 发布说明](https://docs.npmjs.com/cli/v11/commands/npm-publish/)。
|
|
66
150
|
|
|
67
|
-
要进入社区 `dshmarket`
|
|
151
|
+
要进入社区 `dshmarket` 搜索列表,先确认下方条目的 `main/apps/dsh-plugin` 链接可访问,给公开仓库添加 `dsh-plugin` topic,再向 `awesome-dsh-plugin` 提交子目录条目。填写带具体标签的 GitHub Release 附件地址,审核合并后在市场搜索并试装。[市场投稿说明](https://github.com/dsh-market/dsh-market/blob/main/README.zh.md) · [子目录与条目格式](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin/blob/main/contributing.md)。
|
|
68
152
|
|
|
69
153
|
使用 DSH 自带「插件 → 发现」的用户可以在「索引源」中添加社区目录 `https://cdn.jsdelivr.net/npm/dsh-plugin-catalog/index.json`。目录收录并更新后,可以搜索英文包名或中文描述中的「便捷窗口」。[DSH 发现页与索引说明](https://github.com/deepseek-ai/deepseek-harness/blob/dsh-v0.2.2-rc.5/packages/boot/plugin-market/README.zh.md)。
|
|
70
154
|
|
|
@@ -75,7 +159,14 @@ url: https://github.com/ximizhou/convenient_window_free/tree/main/apps/dsh-plugi
|
|
|
75
159
|
name: ximizhou/convenient_window_free#dsh-convenient-window
|
|
76
160
|
category: tools
|
|
77
161
|
description:
|
|
78
|
-
en:
|
|
79
|
-
zh: 在 DeepSeek Harness
|
|
80
|
-
|
|
162
|
+
en: Manage Windows windows from the DeepSeek Harness sidebar with edge hiding and hover-to-reveal, hot corners and screen-edge actions, mouse gestures, saved window layouts, window pinning, dragging and resizing, region screenshots, pinned images and OCR.
|
|
163
|
+
zh: 在 DeepSeek Harness 侧栏集中管理 Windows 窗口:将窗口贴边收起、鼠标移近唤回,为屏幕边角设置快捷动作,用鼠标手势执行常用操作,保存并恢复窗口布局;还支持窗口置顶、拖拽缩放、区域截图、截图贴图与文字识别。
|
|
164
|
+
icon: https://raw.githubusercontent.com/ximizhou/convenient_window_free/main/docs/images/app-icon.png
|
|
165
|
+
tarball: https://github.com/ximizhou/convenient_window_free/releases/download/dsh-v0.2.0/dsh-convenient-window-0.2.0.tgz
|
|
81
166
|
```
|
|
167
|
+
|
|
168
|
+
另一个 [2BingLing/dsh-market](https://github.com/2BingLing/dsh-market/blob/master/CONTRIBUTING.md) 支持 topic 扫描及插件申请 Issue。填写源码子目录、插件类型 `cordis-plugin`、已验收宿主版本、固定安装包和带版本的安装命令;收录后检查它生成的命令是否错误地指向仓库根目录或无版本 npm 包。
|
|
169
|
+
|
|
170
|
+
上面的目录条目固定到本版附件。后续发版须更新条目并复核市场实际安装目标;审核通过、索引更新、搜索可见和安装成功分别确认。npm 页面中的 README 来自发布包,仓库文档更新不会回写已发布 npm 包;只改介绍时不重打同版本包。GitHub Release 正文以 [版本说明](../../docs/release-notes/dsh-0.2.0.md) 为准。
|
|
171
|
+
|
|
172
|
+
市场截图通过本目录的 `screenshots.json` 声明,按顺序展示 DSH 页签、触发角和鼠标手势。复用仓库已有浅色图的 GitHub HTTPS 地址,不复制图片,不用越出插件目录的相对路径。声明合入默认分支后等待目录采集;简介改动则更新上面的社区 YAML 条目并提交 PR。展示资料更新无需发布新的插件包。
|
package/host/assets.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { readFile, lstat, readdir } from 'node:fs/promises';
|
|
2
|
-
import { createHash } from 'node:crypto';
|
|
3
|
-
import { join } from 'node:path';
|
|
4
|
-
import { fileURLToPath } from 'node:url';
|
|
5
|
-
|
|
6
|
-
export const root = fileURLToPath(new URL('../', import.meta.url));
|
|
7
|
-
export const assets = JSON.parse(
|
|
8
|
-
await readFile(join(root, 'runtime-assets.json'), 'utf8'),
|
|
9
|
-
);
|
|
10
|
-
export const metadata = JSON.parse(
|
|
11
|
-
await readFile(join(root, 'package.json'), 'utf8'),
|
|
12
|
-
);
|
|
13
|
-
// The release manifest is a pinned build input, not a remotely refreshable download policy.
|
|
14
|
-
export async function verifyPayload(dir = join(root, 'payload'), exact = true) {
|
|
15
|
-
const names = assets.files.map((f) => f.name).sort();
|
|
16
|
-
if (
|
|
17
|
-
exact &&
|
|
18
|
-
JSON.stringify((await readdir(dir)).sort()) !== JSON.stringify(names)
|
|
19
|
-
)
|
|
20
|
-
throw Error('payload-invalid');
|
|
21
|
-
for (const f of assets.files) {
|
|
22
|
-
const file = join(dir, f.name),
|
|
23
|
-
stat = await lstat(file);
|
|
24
|
-
if (
|
|
25
|
-
!stat.isFile() ||
|
|
26
|
-
stat.size !== f.bytes ||
|
|
27
|
-
createHash('sha256')
|
|
28
|
-
.update(await readFile(file))
|
|
29
|
-
.digest('hex') !== f.sha256
|
|
30
|
-
)
|
|
31
|
-
throw Error('payload-invalid');
|
|
32
|
-
}
|
|
33
|
-
}
|
|
1
|
+
import { readFile, lstat, readdir } from 'node:fs/promises';
|
|
2
|
+
import { createHash } from 'node:crypto';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
|
|
6
|
+
export const root = fileURLToPath(new URL('../', import.meta.url));
|
|
7
|
+
export const assets = JSON.parse(
|
|
8
|
+
await readFile(join(root, 'runtime-assets.json'), 'utf8'),
|
|
9
|
+
);
|
|
10
|
+
export const metadata = JSON.parse(
|
|
11
|
+
await readFile(join(root, 'package.json'), 'utf8'),
|
|
12
|
+
);
|
|
13
|
+
// The release manifest is a pinned build input, not a remotely refreshable download policy.
|
|
14
|
+
export async function verifyPayload(dir = join(root, 'payload'), exact = true) {
|
|
15
|
+
const names = assets.files.map((f) => f.name).sort();
|
|
16
|
+
if (
|
|
17
|
+
exact &&
|
|
18
|
+
JSON.stringify((await readdir(dir)).sort()) !== JSON.stringify(names)
|
|
19
|
+
)
|
|
20
|
+
throw Error('payload-invalid');
|
|
21
|
+
for (const f of assets.files) {
|
|
22
|
+
const file = join(dir, f.name),
|
|
23
|
+
stat = await lstat(file);
|
|
24
|
+
if (
|
|
25
|
+
!stat.isFile() ||
|
|
26
|
+
stat.size !== f.bytes ||
|
|
27
|
+
createHash('sha256')
|
|
28
|
+
.update(await readFile(file))
|
|
29
|
+
.digest('hex') !== f.sha256
|
|
30
|
+
)
|
|
31
|
+
throw Error('payload-invalid');
|
|
32
|
+
}
|
|
33
|
+
}
|