dsh-quiet-windows 0.2.2 → 0.2.3
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 -21
- package/README.md +47 -47
- package/cordis.patch.yml +11 -11
- package/icon.svg +19 -19
- package/index.js +571 -571
- package/package.json +53 -44
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 dsh-quiet-windows contributors
|
|
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.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 dsh-quiet-windows contributors
|
|
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
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
# dsh-quiet-windows
|
|
2
|
-
|
|
3
|
-
让 agent 在屏幕上「看不见的地方」启动并操作 Windows 图形界面。
|
|
4
|
-
|
|
5
|
-
窗口从创建起就停在所有显示器之外,agent 用 UI Automation 读控件、点控件,用 PrintWindow 截图——不吃遮挡、不怕离屏,并尽量避免抢键盘焦点。
|
|
6
|
-
|
|
7
|
-
## 工具
|
|
8
|
-
|
|
9
|
-
| 工具 | 作用 |
|
|
10
|
-
|---|---|
|
|
11
|
-
| `quiet_launch` | 屏幕外启动程序,返回 `hwnd`;浏览器默认开独立 profile |
|
|
12
|
-
| `quiet_windows` | 列出屏幕外窗口,附显示器布局与 DPI |
|
|
13
|
-
| `quiet_shot` | 截图(窗口在屏幕外或完全被遮挡都拿得到) |
|
|
14
|
-
| `quiet_tree` | 读 UI Automation 控件树 |
|
|
15
|
-
| `quiet_act` | 按控件执行 invoke / set / select / toggle / expand |
|
|
16
|
-
| `quiet_close` | 收尾关闭;共享进程的窗口不会被强杀 |
|
|
17
|
-
|
|
18
|
-
## 安装
|
|
19
|
-
|
|
20
|
-
```json
|
|
21
|
-
plugin_manager install_bundle target: "<tgz 的绝对路径>"
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
装完重启 DSH,新会话即可在工具列表里看到 `quiet_*`。
|
|
25
|
-
|
|
26
|
-
## 依赖
|
|
27
|
-
|
|
28
|
-
- Windows 10/11
|
|
29
|
-
- Python 3,且装有 `pywin32`、`uiautomation`、`comtypes`、`Pillow`
|
|
30
|
-
(插件会自动探测解释器;DSH 自带的运行时 Python 没有 pywin32,不能直接用)
|
|
31
|
-
|
|
32
|
-
## 测试
|
|
33
|
-
|
|
34
|
-
```powershell
|
|
35
|
-
python -m unittest discover -s tests -p "test_*.py" # 不碰桌面
|
|
36
|
-
node --test tests/tools.test.mjs # 不碰桌面
|
|
37
|
-
python tests/regress_browser.py --run # 会真的拉起浏览器
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## 限制
|
|
41
|
-
|
|
42
|
-
- 只走控件模式:坐标点击在屏幕外不可用。
|
|
43
|
-
- 少数应用在屏幕外停止绘制,此时截图会报 `looks_blank`。
|
|
44
|
-
- 焦点是「尽量避免并自动恢复」,不是零干扰保证。
|
|
45
|
-
- 仅 Windows。
|
|
46
|
-
|
|
47
|
-
详细说明与设计取舍见 [docs/DETAIL.md](docs/DETAIL.md)。
|
|
1
|
+
# dsh-quiet-windows
|
|
2
|
+
|
|
3
|
+
让 agent 在屏幕上「看不见的地方」启动并操作 Windows 图形界面。
|
|
4
|
+
|
|
5
|
+
窗口从创建起就停在所有显示器之外,agent 用 UI Automation 读控件、点控件,用 PrintWindow 截图——不吃遮挡、不怕离屏,并尽量避免抢键盘焦点。
|
|
6
|
+
|
|
7
|
+
## 工具
|
|
8
|
+
|
|
9
|
+
| 工具 | 作用 |
|
|
10
|
+
|---|---|
|
|
11
|
+
| `quiet_launch` | 屏幕外启动程序,返回 `hwnd`;浏览器默认开独立 profile |
|
|
12
|
+
| `quiet_windows` | 列出屏幕外窗口,附显示器布局与 DPI |
|
|
13
|
+
| `quiet_shot` | 截图(窗口在屏幕外或完全被遮挡都拿得到) |
|
|
14
|
+
| `quiet_tree` | 读 UI Automation 控件树 |
|
|
15
|
+
| `quiet_act` | 按控件执行 invoke / set / select / toggle / expand |
|
|
16
|
+
| `quiet_close` | 收尾关闭;共享进程的窗口不会被强杀 |
|
|
17
|
+
|
|
18
|
+
## 安装
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
plugin_manager install_bundle target: "<tgz 的绝对路径>"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
装完重启 DSH,新会话即可在工具列表里看到 `quiet_*`。
|
|
25
|
+
|
|
26
|
+
## 依赖
|
|
27
|
+
|
|
28
|
+
- Windows 10/11
|
|
29
|
+
- Python 3,且装有 `pywin32`、`uiautomation`、`comtypes`、`Pillow`
|
|
30
|
+
(插件会自动探测解释器;DSH 自带的运行时 Python 没有 pywin32,不能直接用)
|
|
31
|
+
|
|
32
|
+
## 测试
|
|
33
|
+
|
|
34
|
+
```powershell
|
|
35
|
+
python -m unittest discover -s tests -p "test_*.py" # 不碰桌面
|
|
36
|
+
node --test tests/tools.test.mjs # 不碰桌面
|
|
37
|
+
python tests/regress_browser.py --run # 会真的拉起浏览器
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## 限制
|
|
41
|
+
|
|
42
|
+
- 只走控件模式:坐标点击在屏幕外不可用。
|
|
43
|
+
- 少数应用在屏幕外停止绘制,此时截图会报 `looks_blank`。
|
|
44
|
+
- 焦点是「尽量避免并自动恢复」,不是零干扰保证。
|
|
45
|
+
- 仅 Windows。
|
|
46
|
+
|
|
47
|
+
详细说明与设计取舍见 [docs/DETAIL.md](docs/DETAIL.md)。
|
package/cordis.patch.yml
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# dsh-quiet-windows:把「安静窗口」工具行插入 profile。
|
|
2
|
-
# 可选配置(覆盖本行 config 时整块替换):
|
|
3
|
-
# - id: quiet-windows
|
|
4
|
-
# name: 'dsh-quiet-windows'
|
|
5
|
-
# config:
|
|
6
|
-
# pythonPath: C:\Python312\python.exe # 非 PATH 时显式指定
|
|
7
|
-
# timeoutMs: 120000 # 单次操作超时
|
|
8
|
-
# launchTimeoutMs: 180000 # 启动等待窗口的上限
|
|
9
|
-
- insert:
|
|
10
|
-
- id: quiet-windows
|
|
11
|
-
name: 'dsh-quiet-windows'
|
|
1
|
+
# dsh-quiet-windows:把「安静窗口」工具行插入 profile。
|
|
2
|
+
# 可选配置(覆盖本行 config 时整块替换):
|
|
3
|
+
# - id: quiet-windows
|
|
4
|
+
# name: 'dsh-quiet-windows'
|
|
5
|
+
# config:
|
|
6
|
+
# pythonPath: C:\Python312\python.exe # 非 PATH 时显式指定
|
|
7
|
+
# timeoutMs: 120000 # 单次操作超时
|
|
8
|
+
# launchTimeoutMs: 180000 # 启动等待窗口的上限
|
|
9
|
+
- insert:
|
|
10
|
+
- id: quiet-windows
|
|
11
|
+
name: 'dsh-quiet-windows'
|
package/icon.svg
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128" width="128" height="128" role="img" aria-label="Quiet windows">
|
|
2
|
-
<defs>
|
|
3
|
-
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
|
|
4
|
-
<stop offset="0" stop-color="#1f2937"/>
|
|
5
|
-
<stop offset="1" stop-color="#0b1220"/>
|
|
6
|
-
</linearGradient>
|
|
7
|
-
</defs>
|
|
8
|
-
<rect width="128" height="128" rx="28" fill="url(#bg)"/>
|
|
9
|
-
<!-- the user's screen -->
|
|
10
|
-
<rect x="18" y="34" width="62" height="46" rx="6" fill="none" stroke="#6b7a90" stroke-width="4"/>
|
|
11
|
-
<path d="M46 92h14M53 80v12" stroke="#6b7a90" stroke-width="4" stroke-linecap="round"/>
|
|
12
|
-
<path d="M28 46h42" stroke="#3d4b60" stroke-width="4" stroke-linecap="round"/>
|
|
13
|
-
<!-- the window that lives outside the screen -->
|
|
14
|
-
<rect x="76" y="22" width="40" height="30" rx="5" fill="#111827" stroke="#38bdf8" stroke-width="4" stroke-dasharray="6 5"/>
|
|
15
|
-
<path d="M84 32h18" stroke="#38bdf8" stroke-width="3.5" stroke-linecap="round"/>
|
|
16
|
-
<path d="M84 40h11" stroke="#38bdf8" stroke-width="3.5" stroke-linecap="round" opacity="0.75"/>
|
|
17
|
-
<!-- off-screen direction -->
|
|
18
|
-
<path d="M70 58l14-14" stroke="#38bdf8" stroke-width="3" stroke-linecap="round" stroke-dasharray="5 4" opacity="0.8"/>
|
|
19
|
-
</svg>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128" width="128" height="128" role="img" aria-label="Quiet windows">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
|
|
4
|
+
<stop offset="0" stop-color="#1f2937"/>
|
|
5
|
+
<stop offset="1" stop-color="#0b1220"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
<rect width="128" height="128" rx="28" fill="url(#bg)"/>
|
|
9
|
+
<!-- the user's screen -->
|
|
10
|
+
<rect x="18" y="34" width="62" height="46" rx="6" fill="none" stroke="#6b7a90" stroke-width="4"/>
|
|
11
|
+
<path d="M46 92h14M53 80v12" stroke="#6b7a90" stroke-width="4" stroke-linecap="round"/>
|
|
12
|
+
<path d="M28 46h42" stroke="#3d4b60" stroke-width="4" stroke-linecap="round"/>
|
|
13
|
+
<!-- the window that lives outside the screen -->
|
|
14
|
+
<rect x="76" y="22" width="40" height="30" rx="5" fill="#111827" stroke="#38bdf8" stroke-width="4" stroke-dasharray="6 5"/>
|
|
15
|
+
<path d="M84 32h18" stroke="#38bdf8" stroke-width="3.5" stroke-linecap="round"/>
|
|
16
|
+
<path d="M84 40h11" stroke="#38bdf8" stroke-width="3.5" stroke-linecap="round" opacity="0.75"/>
|
|
17
|
+
<!-- off-screen direction -->
|
|
18
|
+
<path d="M70 58l14-14" stroke="#38bdf8" stroke-width="3" stroke-linecap="round" stroke-dasharray="5 4" opacity="0.8"/>
|
|
19
|
+
</svg>
|