dsh-screen-automation 0.1.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 ADDED
@@ -0,0 +1,174 @@
1
+ # dsh-screen-automation
2
+
3
+ 把本地「屏幕自动化小助手」(Screen Automation Helper) 桌面端桥接成 **DeepSeek Harness (dsh)** 的 Agent 工具插件。
4
+ 让 dsh 里的 Agent 能直接确认平台状态、截图与本地识别、驱动本机鼠标键盘、管理自动化流程——
5
+ 而真正的本地屏幕观察与执行,仍由你自己的小助手完成。
6
+
7
+ > 这不是重写屏幕自动化,而是**桥接**:dsh 负责 Agent 编排,小助手负责本地执行。
8
+
9
+ ## 设计原则
10
+
11
+ - **桥接而非重实现**:dsh 插件只做「定位二进制 → 调 CLI → 解析 JSON → 回传」,智能只写在后端。
12
+ - **全能力桥接**:不人为限制 Agent。workflow 全生命周期、本机输入控制、各类识别原语、
13
+ 以及把截图喂给 dsh 视觉模型的 `screen_automation_understand` 全部暴露。小助手就是 Agent 在本地延伸的手和眼。
14
+ - **识别阶梯(廉价本地优先)**:OCR / 模板匹配 / 颜色区域 / 轮廓这些**免费本地方法作为一等公民**,能解决就不升到 VLM,省 API 费用。VLM 是按需升层,不是默认路径。
15
+ - **本地算力**:所谓「本地」包含本地算力。想免费推理时,把本机视觉模型(Ollama / llama.cpp + Qwen-VL / DeepSeek-VL)注册成 dsh 的一个 provider,再传给 `understand` 即可。
16
+
17
+ ## 架构
18
+
19
+ ```
20
+ dsh Agent
21
+ │ 工具调用 (screen_automation_*)
22
+ ▼
23
+ dsh-screen-automation (Host 插件, Node/TS)
24
+ │ spawn 二进制 + `cli <subcommand>`(JSON 接口)
25
+ ▼
26
+ 屏幕自动化小助手 (.exe on Windows / .app on macOS)
27
+ │ 本地屏幕识别、鼠标键盘、workflow 运行、结果保存
28
+ ▼
29
+ 结构化 JSON 结果 ──回传──▶ Agent
30
+ ```
31
+
32
+ 平台 CLI 与 Windows/macOS 共用同一套命令,且标准输出为 JSON,因此桥接层只需要:
33
+ **定位二进制 → 调 CLI → 解析 JSON → 回传**。
34
+
35
+ ## 暴露的工具(共 30 个)
36
+
37
+ ### 1. 平台自检与流程生命周期
38
+
39
+ | 工具 | 映射的 CLI | 说明 |
40
+ |---|---|---|
41
+ | `screen_automation_status` | `cli status` | 平台是否可用、版本等自检 |
42
+ | `screen_automation_capabilities` | `cli capabilities` | 平台能力清单 |
43
+ | `screen_automation_list_workflows` | `cli workflow list` | 已安装流程 |
44
+ | `screen_automation_run_workflow` | `cli start-workflow <id>` | 运行流程(支持 `count` / `dry_run`) |
45
+ | `screen_automation_stop_run` | `cli stop --run-id <id>` | 停止某次运行 |
46
+ | `screen_automation_list_runs` | `cli runs list` | 当前运行实例 |
47
+ | `screen_automation_health` | `cli health --workflow <id>` | 运行前健康检查 |
48
+ | `screen_automation_capture` | `cli screen capture` | 截图(可选 `region` / `output`) |
49
+
50
+ ### 2. 本地识别原语(免费、本地,省 VLM 费用)
51
+
52
+ | 工具 | 映射的 CLI | 说明 |
53
+ |---|---|---|
54
+ | `screen_automation_recognize_text` | `cli screen recognize` | OCR 全文识别,返回文字与区域框 |
55
+ | `screen_automation_locate_text` | `cli screen find --text <t>` | 按文字定位,返回坐标("点提交按钮"类任务优先用) |
56
+ | `screen_automation_color_regions` | `cli screen color-regions` | HSV 颜色区域检测("按钮变绿再点"类检查) |
57
+ | `screen_automation_match_template` | `cli screen match --template <p>` | 模板匹配(按图找图标/Logo) |
58
+ | `screen_automation_contours` | `cli screen contours` | 轮廓/形状检测(按形状/尺寸定位元素) |
59
+ | `screen_automation_wait_text` | `cli screen wait --text <t>` | 轮询等待文字出现(廉价的状态等待原语) |
60
+
61
+ ### 3. 本机输入控制
62
+
63
+ | 工具 | 映射的 CLI | 说明 |
64
+ |---|---|---|
65
+ | `screen_automation_click` | `cli click` | 鼠标点击(点格式 `"x,y"`,可选 `button`) |
66
+ | `screen_automation_drag` | `cli drag` | 拖拽(`start`→`end`,可选 `duration` / `button`) |
67
+ | `screen_automation_scroll` | `cli scroll` | 在指定点滚动(`amount` 正下负上) |
68
+ | `screen_automation_long_press` | `cli long-press` | 长按(可选 `duration` / `button`) |
69
+ | `screen_automation_type_text` | `cli type` | 向焦点元素输入文字(可选 `interval`) |
70
+ | `screen_automation_hotkey` | `cli hotkey` | 组合键,如 `"ctrl c"` / `"win v"` |
71
+
72
+ ### 4. 工作流全生命周期(安装 / 校验 / 移除)
73
+
74
+ | 工具 | 映射的 CLI | 说明 |
75
+ |---|---|---|
76
+ | `screen_automation_workflow_validate` | `cli workflow validate <id>` | 校验已安装 workflow |
77
+ | `screen_automation_workflow_install` | `cli workflow install <source>` | 从本地源(目录/压缩包)安装 workflow |
78
+ | `screen_automation_workflow_remove` | `cli workflow remove <id>` | 移除已安装 workflow |
79
+
80
+ ### 5. 任务会话(绑定窗口,后续控制/识别在该窗口内生效)
81
+
82
+ | 工具 | 映射的 CLI | 说明 |
83
+ |---|---|---|
84
+ | `screen_automation_task_begin` | `cli task begin` | 开始任务会话,可按 `title` / `process` / `handle` 绑定窗口 |
85
+ | `screen_automation_task_status` | `cli task status` | 报告当前任务会话目标窗口 |
86
+ | `screen_automation_task_end` | `cli task end` | 结束当前任务会话 |
87
+
88
+ ### 6. 工作流只读信息
89
+
90
+ | 工具 | 映射的 CLI | 说明 |
91
+ |---|---|---|
92
+ | `screen_automation_workflow_show` | `cli workflow show <id>` | 查看已安装 workflow 的配置/清单 |
93
+ | `screen_automation_workflow_describe` | `cli workflow describe <id>` | 获取 workflow 的可读说明/元数据 |
94
+ | `screen_automation_workflow_inspect` | `cli workflow inspect <source>` | 检查未安装的 workflow 源(返回清单) |
95
+
96
+ ### 7. 视觉理解(识别阶梯最高层:VLM)
97
+
98
+ `screen_automation_understand` 把小助手截图喂给 dsh 的视觉模型:
99
+
100
+ ```
101
+ screen capture 拿图 → ctx.attachments.saveImage 登记为不可变图片引用
102
+ → 拼 [文字提问 + image block] 的 user 消息 → ctx.llm.stream 多模态推理 → 收集 text-delta
103
+ ```
104
+
105
+ - 这是「按需升层」:OCR/模板/颜色能解决就别调它,省 API 钱;**开放任务**("这屏在干嘛、哪出错了")才升到 VLM。
106
+ - 模型走 dsh 当前 profile 配置的 `provider` / `model`。**想免费本地推理**:把本机视觉模型(Ollama / llama.cpp + Qwen-VL / DeepSeek-VL)
107
+ 注册成 dsh 的一个 provider,再把 `provider` / `model` 传进工具即可——本地算力,不烧远程 VLM。
108
+ - 依赖 dsh 运行时的 `ctx.llm`(视觉模型服务)与 `ctx.attachments`(图片登记服务);任一不可用,工具会抛出明确错误。
109
+
110
+ ## 二进制发现(按优先级)
111
+
112
+ 1. 环境变量 `SCREEN_AUTOMATION_BIN`(最高优先级,直接指向可执行文件)
113
+ 2. macOS:`SCREEN_AUTOMATION_MAC_APP` → 其下 `Contents/MacOS/screen-automation-helper`
114
+ 或 `/Applications/Screen Automation Helper.app/...`、 `$HOME/Applications/Screen Automation Helper.app/...`
115
+ 3. Windows:`SCREEN_AUTOMATION_WIN_EXE` → `%ProgramFiles%\Xiaozs\ScreenAutomationHelper\...`
116
+
117
+ 都找不到时,工具会抛出带官网下载链接的明确错误。
118
+
119
+ ## 安装与构建
120
+
121
+ ```sh
122
+ # 1) 安装依赖并编译(产出 lib/,即插件运行入口)
123
+ cd dsh-screen-automation
124
+ npm install
125
+ npm run build # 需要 typescript(已列入 devDependencies)
126
+
127
+ # 2) 开发调试(最快看到效果,直接挂载 TypeScript 源)
128
+ # 在 deepseek-harness 仓库内:
129
+ pnpm dsh web --patch ./cordis.yml
130
+ # 控制台出现 [screen-automation] loaded 即成功(cordis.yml 指向 ./src/index.ts)
131
+
132
+ # 3) 通过 dsh 一键安装(需先 `npm publish`,见下「发布到 npm」)
133
+ dsh plugin --profile web add dsh-screen-automation && dsh restart web
134
+ # 安装后 package.json 的 dsh.bundle.patch (./cordis.patch.yml) 自动把插件行插入 web profile,
135
+ # 加载编译产物 ./lib/index.js,30 个工具即注册完毕。
136
+ ```
137
+
138
+ > 两个挂载文件分工:
139
+ > - `cordis.yml`:`path` 指向 `./src/index.ts`,仅**开发期**热加载(`pnpm dsh web --patch ./cordis.yml`)。
140
+ > - `cordis.patch.yml`:发布的 bundle patch,`dsh plugin add` 安装时自动插入插件行,加载编译产物 `./lib/index.js`。
141
+ > cordis patch 的具体字段名可能随 dsh 版本变化,若加载报错请对照 `pnpm dsh --help` / 官方 cordis 配置文档调整。
142
+
143
+ ## 发布到 npm(让 `dsh plugin add` 可用)
144
+
145
+ 仓库已加 GitHub `dsh-plugin` 话题(官方发现聚合渠道,搜该话题即可找到)。要让人能
146
+ `dsh plugin --profile web add dsh-screen-automation` 一键安装,还需发到 npm:
147
+
148
+ ```sh
149
+ npm login # 用你的 npm 账号登录
150
+ npm publish # package.json 已设 files=[lib, README.md, cordis.patch.yml],自动排除 src/node_modules
151
+ ```
152
+
153
+ 发布前确认:`peerDependencies` 已声明 harness 包(与宿主 dsh 共用同一份实例,避免拉第二份 cordis 副本);
154
+ `dsh.bundle.patch` 指向 `cordis.patch.yml`(install 时自动插入插件行)。
155
+
156
+ ## 扩展
157
+
158
+ - 想加更多能力:在小助手的 `runtime/cli.py` 已有的子命令里挑,照 `cliTool({...})` 模式加一个工具即可。
159
+ - 想接 IPC(比 CLI 更实时):把 `runCli` 换成对小助手 `~/Library/Application Support/Screen Automation Helper/ipc/`
160
+ 端点(endpoint.json + token)的调用,工具签名不变。
161
+ - 想暴露「运行后读取结果文件」:在 `screen_automation_run_workflow` 的 `output` 之后,加一个读 `runs/<run_id>` 结果目录的工具。
162
+
163
+ ## 验证状态
164
+
165
+ - **依赖完整性**:原 `package.json` 缺 `typescript`,已补入 `devDependencies`;`npm install && npm run build` 现在可稳定产出 `lib/index.js` + `lib/index.d.ts`。
166
+ - **类型层**:对照真实发布的 `@deepseek-ai/dsh-tools` / `@deepseek-ai/dsh-llm` / `@deepseek-ai/dsh-attachment` 编译通过。
167
+ - **运行时层**:用桩二进制(写一张 PNG 到 `--output`)+ mock `ctx.llm.stream` / `ctx.attachments.saveImage` 验证全链路——
168
+ 30 个工具注册成功,`screen_automation_understand` 正确执行 `cli screen capture --output`、读字节、登记 attachment、
169
+ 把 image block 塞进 `llm.stream` 的消息、并累积 text-delta 成结果。
170
+ - 真机端到端需在已安装小助手 `.app`/`.exe` 且 dsh profile 配置了视觉模型的机器上跑(本仓库不携带该二进制)。
171
+
172
+ ## License
173
+
174
+ MIT
@@ -0,0 +1,6 @@
1
+ # DeepSeek Harness bundle patch — applied automatically when installed via:
2
+ # dsh plugin --profile web add dsh-screen-automation
3
+ # Inserts the screen-automation host plugin row so its 30 tools auto-register.
4
+ insert:
5
+ id: screen-automation
6
+ name: dsh-screen-automation
package/lib/index.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ import type { Context } from '@deepseek-ai/cordis';
2
+ export declare const name = "screen-automation";
3
+ export declare const inject: string[];
4
+ export declare function apply(ctx: Context): void;
package/lib/index.js ADDED
@@ -0,0 +1,655 @@
1
+ import * as fs from 'node:fs';
2
+ import * as os from 'node:os';
3
+ import * as path from 'node:path';
4
+ import { execFile } from 'node:child_process';
5
+ import { defineTool } from '@deepseek-ai/dsh-tools';
6
+ // 把截图喂给 dsh 的视觉模型所需类型与工厂:
7
+ // - MessageId 构造带 brand 的消息 id;Message/ContentBlock/ImageBlock 是多模态消息的结构
8
+ // - ImageAttachmentRef/SaveImageAttachment/ImageMediaType 是 attachment 服务的写入契约
9
+ import { MessageId } from '@deepseek-ai/dsh-llm';
10
+ // 插件身份:name 是插件在配置树里的稳定 id;inject 声明本插件依赖的
11
+ // Harness 服务(工具注册表 tools)。Cordis 会等 tools 就绪后再调用 apply。
12
+ export const name = 'screen-automation';
13
+ export const inject = ['tools'];
14
+ /**
15
+ * 这个插件把本地「屏幕自动化小助手」(Screen Automation Helper) 桌面端桥接进
16
+ * DeepSeek Harness 的 Agent 工具系统。
17
+ *
18
+ * 架构(桥接而非重实现):
19
+ * dsh Agent ──工具调用──▶ 本插件(Host, Node/TS) ──spawn CLI(JSON)──▶ 屏幕自动化小助手(.exe/.app)
20
+ * 负责编排/规划 负责把能力暴露成工具 负责本地屏幕观察与执行
21
+ *
22
+ * 小助手通过 `cli <subcommand>` 暴露 JSON 接口(与 Windows/macOS 同一套命令),
23
+ * 本插件只做三件事:定位二进制、调用 CLI、把 JSON 结果回传给 Agent。
24
+ *
25
+ * 设计原则(全能力桥接 + 识别阶梯):
26
+ * - 不人为限制 Agent 能力:workflow 全生命周期、本机输入控制、各类识别原语都暴露。
27
+ * - 廉价本地识别优先:OCR / 模板匹配 / 颜色区域 / 轮廓 这些免费本地方法作为一等公民,
28
+ * 能解决就不升到 VLM,省 API 调用(钱)。VLM 是按需升层,非默认路径。
29
+ * - "本地"含本地算力,故 VLM 应下沉到小助手后端用本机推理,而非默认远程端点。
30
+ */
31
+ /** 在多个候选路径里找到已安装的屏幕自动化小助手二进制。优先级:环境变量 > 平台默认位置。 */
32
+ function resolveBinary() {
33
+ const env = process.env;
34
+ if (env.SCREEN_AUTOMATION_BIN && fs.existsSync(env.SCREEN_AUTOMATION_BIN)) {
35
+ return env.SCREEN_AUTOMATION_BIN;
36
+ }
37
+ if (process.platform === 'darwin') {
38
+ const macApp = env.SCREEN_AUTOMATION_MAC_APP;
39
+ const candidates = [
40
+ macApp ? `${macApp}/Contents/MacOS/screen-automation-helper` : null,
41
+ '/Applications/Screen Automation Helper.app/Contents/MacOS/screen-automation-helper',
42
+ `${env.HOME}/Applications/Screen Automation Helper.app/Contents/MacOS/screen-automation-helper`,
43
+ ].filter(Boolean);
44
+ for (const c of candidates)
45
+ if (fs.existsSync(c))
46
+ return c;
47
+ return null;
48
+ }
49
+ if (process.platform === 'win32') {
50
+ const win = env.SCREEN_AUTOMATION_WIN_EXE;
51
+ if (win && fs.existsSync(win))
52
+ return win;
53
+ const pf = env.ProgramFiles;
54
+ const guess = pf ? `${pf}\\Xiaozs\\ScreenAutomationHelper\\ScreenAutomationHelper.exe` : null;
55
+ if (guess && fs.existsSync(guess))
56
+ return guess;
57
+ return null;
58
+ }
59
+ return null;
60
+ }
61
+ /** 调用小助手 CLI(统一前缀 `cli`),解析 JSON 标准输出,返回结构化结果。 */
62
+ async function runCli(args, timeoutMs = 30000) {
63
+ const bin = resolveBinary();
64
+ if (!bin) {
65
+ throw new Error('Screen Automation Helper binary not found. Install it from ' +
66
+ 'https://www.xiaozs.com/sah/downloads/ (Windows/macOS), or set one of: ' +
67
+ 'SCREEN_AUTOMATION_BIN, SCREEN_AUTOMATION_MAC_APP, SCREEN_AUTOMATION_WIN_EXE.');
68
+ }
69
+ const command = `cli ${args.join(' ')}`;
70
+ return new Promise((resolve, reject) => {
71
+ execFile(bin, ['cli', ...args], { timeout: timeoutMs, maxBuffer: 64 * 1024 * 1024 }, (err, stdout, stderr) => {
72
+ const raw = (stdout || '').toString();
73
+ let data = null;
74
+ try {
75
+ data = JSON.parse(raw);
76
+ }
77
+ catch {
78
+ data = null;
79
+ }
80
+ if (err) {
81
+ const msg = err instanceof Error ? err.message : String(err);
82
+ reject(new Error(`screen_automation CLI failed (${command}): ${msg}\n--- stdout ---\n${raw}\n--- stderr ---\n${stderr || ''}`));
83
+ return;
84
+ }
85
+ resolve({ ok: true, command, raw, data });
86
+ });
87
+ });
88
+ }
89
+ /** 把一个 CLI 子命令包装成一个 dsh 工具:注册 → 调用 CLI → 透传 JSON 结果。 */
90
+ function cliTool(opts) {
91
+ return defineTool({
92
+ name: opts.name,
93
+ description: opts.description,
94
+ parameters: opts.parameters,
95
+ output: {
96
+ schema: {
97
+ type: 'object',
98
+ additionalProperties: true,
99
+ properties: {
100
+ ok: { type: 'boolean', required: true },
101
+ command: { type: 'string', required: true },
102
+ raw: { type: 'string', required: true },
103
+ },
104
+ },
105
+ render: (_args, value) => {
106
+ const v = value;
107
+ const body = typeof v.raw === 'string' && v.raw.trim().length > 0 ? v.raw : JSON.stringify(v.data ?? null, null, 2);
108
+ return [{ type: 'text', text: `${opts.name}\n${body}` }];
109
+ },
110
+ },
111
+ async execute(args) {
112
+ return await runCli(opts.buildArgs(args));
113
+ },
114
+ });
115
+ }
116
+ export function apply(ctx) {
117
+ // 1) 平台自检
118
+ ctx.tools.register(cliTool({
119
+ name: 'screen_automation_status',
120
+ description: 'Check whether the local Screen Automation Helper desktop platform is available and report its status as JSON. ' +
121
+ 'Call this first to confirm the bridge works before running workflows.',
122
+ parameters: {},
123
+ buildArgs: () => ['status'],
124
+ }));
125
+ // 2) 能力清单
126
+ ctx.tools.register(cliTool({
127
+ name: 'screen_automation_capabilities',
128
+ description: 'List the capabilities the local Screen Automation Helper platform exposes (CLI / IPC features).',
129
+ parameters: {},
130
+ buildArgs: () => ['capabilities'],
131
+ }));
132
+ // 3) 列出已安装 workflow
133
+ ctx.tools.register(cliTool({
134
+ name: 'screen_automation_list_workflows',
135
+ description: 'List automation workflows installed in the local Screen Automation Helper platform.',
136
+ parameters: {},
137
+ buildArgs: () => ['workflow', 'list'],
138
+ }));
139
+ // 4) 运行 workflow(核心能力)
140
+ ctx.tools.register(cliTool({
141
+ name: 'screen_automation_run_workflow',
142
+ description: 'Run an installed automation workflow by id on the local Screen Automation Helper platform. ' +
143
+ 'Returns run status/result JSON. Prefer this over raw screen control.',
144
+ parameters: {
145
+ workflow_id: { type: 'string', required: true, description: 'Installed workflow id, e.g. ark-afp-usage-monitor' },
146
+ count: { type: 'number', description: 'Number of times to run (default 1).' },
147
+ dry_run: { type: 'boolean', description: 'Validate the workflow without executing.' },
148
+ },
149
+ buildArgs: (a) => {
150
+ const args = ['start-workflow', String(a.workflow_id)];
151
+ if (typeof a.count === 'number')
152
+ args.push('--count', String(a.count));
153
+ if (a.dry_run)
154
+ args.push('--dry-run');
155
+ return args;
156
+ },
157
+ }));
158
+ // 5) 停止某个运行
159
+ ctx.tools.register(cliTool({
160
+ name: 'screen_automation_stop_run',
161
+ description: 'Stop a running automation workflow instance by its run id.',
162
+ parameters: {
163
+ run_id: { type: 'string', required: true, description: 'Run id returned by screen_automation_run_workflow.' },
164
+ },
165
+ buildArgs: (a) => ['stop', '--run-id', String(a.run_id)],
166
+ }));
167
+ // 6) 列出当前运行
168
+ ctx.tools.register(cliTool({
169
+ name: 'screen_automation_list_runs',
170
+ description: 'List current automation workflow runs on the local platform.',
171
+ parameters: {},
172
+ buildArgs: () => ['runs', 'list'],
173
+ }));
174
+ // 7) 运行前健康检查
175
+ ctx.tools.register(cliTool({
176
+ name: 'screen_automation_health',
177
+ description: 'Run a pre-flight health check for a workflow id on the local platform before running it.',
178
+ parameters: {
179
+ workflow_id: { type: 'string', required: true, description: 'Workflow id to health-check.' },
180
+ },
181
+ buildArgs: (a) => ['health', '--workflow', String(a.workflow_id)],
182
+ }));
183
+ // 8) 屏幕截图 / 识别
184
+ ctx.tools.register(cliTool({
185
+ name: 'screen_automation_capture',
186
+ description: 'Capture the current screen (or a region) via the local platform and return the image path / ' +
187
+ 'recognized text as JSON.',
188
+ parameters: {
189
+ region: { type: 'string', description: 'Optional region spec, e.g. "0,0,800,600".' },
190
+ output: { type: 'string', description: 'Optional output file path for the screenshot.' },
191
+ },
192
+ buildArgs: (a) => {
193
+ const args = ['screen', 'capture'];
194
+ if (typeof a.region === 'string')
195
+ args.push('--region', a.region);
196
+ if (typeof a.output === 'string')
197
+ args.push('--output', a.output);
198
+ return args;
199
+ },
200
+ }));
201
+ // ===== 廉价本地识别层(识别阶梯:OCR / 模板 / 颜色 / 轮廓,免费、本地、省 VLM API) =====
202
+ // 9) OCR 全文识别(返回文字与区域)
203
+ ctx.tools.register(cliTool({
204
+ name: 'screen_automation_recognize_text',
205
+ description: 'Run local OCR on the screen (or a region) via the helper and return recognized text with ' +
206
+ 'bounding boxes as JSON. Free, local, no VLM. Use before spending VLM calls.',
207
+ parameters: {
208
+ region: { type: 'string', description: 'Optional region "x,y,w,h" in pixels.' },
209
+ lang: { type: 'string', description: 'Optional OCR language hint, e.g. "ch" or "en".' },
210
+ text_only: { type: 'boolean', description: 'Return only text without layout boxes.' },
211
+ },
212
+ buildArgs: (a) => {
213
+ const args = ['screen', 'recognize'];
214
+ if (typeof a.region === 'string')
215
+ args.push('--region', a.region);
216
+ if (typeof a.lang === 'string')
217
+ args.push('--lang', a.lang);
218
+ if (a.text_only)
219
+ args.push('--text-only');
220
+ return args;
221
+ },
222
+ }));
223
+ // 10) 按文字定位(返回坐标)
224
+ ctx.tools.register(cliTool({
225
+ name: 'screen_automation_locate_text',
226
+ description: 'Find a specific text string on screen via local OCR and return its location/box as JSON. ' +
227
+ 'Free, local. Prefer this over VLM for "click the X button" style tasks.',
228
+ parameters: {
229
+ text: { type: 'string', required: true, description: 'Text to locate, e.g. "提交".' },
230
+ region: { type: 'string', description: 'Optional region "x,y,w,h".' },
231
+ lang: { type: 'string', description: 'Optional OCR language hint.' },
232
+ min_confidence: { type: 'number', description: 'Minimum match confidence (0..1).' },
233
+ },
234
+ buildArgs: (a) => {
235
+ const args = ['screen', 'find', '--text', String(a.text)];
236
+ if (typeof a.region === 'string')
237
+ args.push('--region', a.region);
238
+ if (typeof a.lang === 'string')
239
+ args.push('--lang', a.lang);
240
+ if (typeof a.min_confidence === 'number')
241
+ args.push('--min-confidence', String(a.min_confidence));
242
+ return args;
243
+ },
244
+ }));
245
+ // 11) 颜色区域(HSV 区间)
246
+ ctx.tools.register(cliTool({
247
+ name: 'screen_automation_color_regions',
248
+ description: 'Find screen regions matching a color range (HSV lower/upper) via local CV. Free, local. ' +
249
+ 'Use for "wait until the button turns green" style checks.',
250
+ parameters: {
251
+ lower_hsv: { type: 'string', required: true, description: 'HSV lower bound "h,s,v" (0-255).' },
252
+ upper_hsv: { type: 'string', required: true, description: 'HSV upper bound "h,s,v" (0-255).' },
253
+ region: { type: 'string', description: 'Optional region "x,y,w,h".' },
254
+ min_area: { type: 'number', description: 'Minimum region area in pixels.' },
255
+ max_area: { type: 'number', description: 'Maximum region area in pixels.' },
256
+ },
257
+ buildArgs: (a) => {
258
+ const args = ['screen', 'color-regions', '--lower-hsv', String(a.lower_hsv), '--upper-hsv', String(a.upper_hsv)];
259
+ if (typeof a.region === 'string')
260
+ args.push('--region', a.region);
261
+ if (typeof a.min_area === 'number')
262
+ args.push('--min-area', String(a.min_area));
263
+ if (typeof a.max_area === 'number')
264
+ args.push('--max-area', String(a.max_area));
265
+ return args;
266
+ },
267
+ }));
268
+ // 12) 模板匹配(按图找图)
269
+ ctx.tools.register(cliTool({
270
+ name: 'screen_automation_match_template',
271
+ description: 'Match an image template against the screen via local template matching. Free, local. ' +
272
+ 'Use for locating icons/logos by image instead of text.',
273
+ parameters: {
274
+ template: { type: 'string', required: true, description: 'Path to template image file.' },
275
+ region: { type: 'string', description: 'Optional region "x,y,w,h".' },
276
+ threshold: { type: 'number', description: 'Match threshold (0..1, default 0.8).' },
277
+ max_results: { type: 'number', description: 'Max number of matches to return.' },
278
+ },
279
+ buildArgs: (a) => {
280
+ const args = ['screen', 'match', '--template', String(a.template)];
281
+ if (typeof a.region === 'string')
282
+ args.push('--region', a.region);
283
+ if (typeof a.threshold === 'number')
284
+ args.push('--threshold', String(a.threshold));
285
+ if (typeof a.max_results === 'number')
286
+ args.push('--max-results', String(a.max_results));
287
+ return args;
288
+ },
289
+ }));
290
+ // 13) 轮廓 / 形状检测
291
+ ctx.tools.register(cliTool({
292
+ name: 'screen_automation_contours',
293
+ description: 'Detect contours/shapes on screen via local edge detection (CV). Free, local. ' +
294
+ 'Use for locating UI elements by shape/size rather than text.',
295
+ parameters: {
296
+ region: { type: 'string', description: 'Optional region "x,y,w,h".' },
297
+ min_width: { type: 'number', description: 'Minimum contour width.' },
298
+ max_width: { type: 'number', description: 'Maximum contour width.' },
299
+ min_height: { type: 'number', description: 'Minimum contour height.' },
300
+ max_height: { type: 'number', description: 'Maximum contour height.' },
301
+ min_area: { type: 'number', description: 'Minimum contour area.' },
302
+ max_area: { type: 'number', description: 'Maximum contour area.' },
303
+ },
304
+ buildArgs: (a) => {
305
+ const args = ['screen', 'contours'];
306
+ if (typeof a.region === 'string')
307
+ args.push('--region', a.region);
308
+ if (typeof a.min_width === 'number')
309
+ args.push('--min-width', String(a.min_width));
310
+ if (typeof a.max_width === 'number')
311
+ args.push('--max-width', String(a.max_width));
312
+ if (typeof a.min_height === 'number')
313
+ args.push('--min-height', String(a.min_height));
314
+ if (typeof a.max_height === 'number')
315
+ args.push('--max-height', String(a.max_height));
316
+ if (typeof a.min_area === 'number')
317
+ args.push('--min-area', String(a.min_area));
318
+ if (typeof a.max_area === 'number')
319
+ args.push('--max-area', String(a.max_area));
320
+ return args;
321
+ },
322
+ }));
323
+ // 14) 等待文字出现(廉价状态等待原语)
324
+ ctx.tools.register(cliTool({
325
+ name: 'screen_automation_wait_text',
326
+ description: 'Poll the screen locally until a specific text appears (or timeout). Free, local. ' +
327
+ 'Cheap alternative to a VLM "is the dialog ready?" check.',
328
+ parameters: {
329
+ text: { type: 'string', required: true, description: 'Text to wait for.' },
330
+ region: { type: 'string', description: 'Optional region "x,y,w,h".' },
331
+ timeout: { type: 'number', description: 'Max seconds to wait (default 10).' },
332
+ interval: { type: 'number', description: 'Poll interval seconds (default 0.8).' },
333
+ min_confidence: { type: 'number', description: 'Minimum match confidence (0..1).' },
334
+ },
335
+ buildArgs: (a) => {
336
+ const args = ['screen', 'wait', '--text', String(a.text)];
337
+ if (typeof a.region === 'string')
338
+ args.push('--region', a.region);
339
+ if (typeof a.timeout === 'number')
340
+ args.push('--timeout', String(a.timeout));
341
+ if (typeof a.interval === 'number')
342
+ args.push('--interval', String(a.interval));
343
+ if (typeof a.min_confidence === 'number')
344
+ args.push('--min-confidence', String(a.min_confidence));
345
+ return args;
346
+ },
347
+ }));
348
+ // ===== 全控制层(workflow 生命周期 + 本机输入/鼠标,识别阶梯之上的"动手"能力) =====
349
+ // 15) 鼠标点击
350
+ ctx.tools.register(cliTool({
351
+ name: 'screen_automation_click',
352
+ description: 'Click at a screen point via the local helper. Point format "x,y" in pixels.',
353
+ parameters: {
354
+ point: { type: 'string', required: true, description: 'Click point as "x,y".' },
355
+ button: { type: 'string', description: 'Mouse button: left | right | middle (default left).' },
356
+ },
357
+ buildArgs: (a) => {
358
+ const args = ['task', 'click', '--point', String(a.point)];
359
+ if (typeof a.button === 'string')
360
+ args.push('--button', a.button);
361
+ return args;
362
+ },
363
+ }));
364
+ // 16) 拖拽
365
+ ctx.tools.register(cliTool({
366
+ name: 'screen_automation_drag',
367
+ description: 'Drag from one point to another via the local helper. Point format "x,y".',
368
+ parameters: {
369
+ start: { type: 'string', required: true, description: 'Drag start point "x,y".' },
370
+ end: { type: 'string', required: true, description: 'Drag end point "x,y".' },
371
+ duration: { type: 'number', description: 'Drag duration seconds (default 0.5).' },
372
+ button: { type: 'string', description: 'Mouse button: left | right | middle (default left).' },
373
+ },
374
+ buildArgs: (a) => {
375
+ const args = ['task', 'drag', '--start', String(a.start), '--end', String(a.end)];
376
+ if (typeof a.duration === 'number')
377
+ args.push('--duration', String(a.duration));
378
+ if (typeof a.button === 'string')
379
+ args.push('--button', a.button);
380
+ return args;
381
+ },
382
+ }));
383
+ // 17) 滚动
384
+ ctx.tools.register(cliTool({
385
+ name: 'screen_automation_scroll',
386
+ description: 'Scroll at a screen point via the local helper.',
387
+ parameters: {
388
+ point: { type: 'string', required: true, description: 'Scroll point "x,y".' },
389
+ amount: { type: 'number', required: true, description: 'Scroll amount (positive down, negative up).' },
390
+ },
391
+ buildArgs: (a) => {
392
+ return ['task', 'scroll', '--point', String(a.point), '--amount', String(a.amount)];
393
+ },
394
+ }));
395
+ // 18) 长按
396
+ ctx.tools.register(cliTool({
397
+ name: 'screen_automation_long_press',
398
+ description: 'Long-press at a screen point via the local helper.',
399
+ parameters: {
400
+ point: { type: 'string', required: true, description: 'Press point "x,y".' },
401
+ duration: { type: 'number', description: 'Hold seconds (default 1.0).' },
402
+ button: { type: 'string', description: 'Mouse button: left | right | middle (default left).' },
403
+ },
404
+ buildArgs: (a) => {
405
+ const args = ['task', 'long-press', '--point', String(a.point)];
406
+ if (typeof a.duration === 'number')
407
+ args.push('--duration', String(a.duration));
408
+ if (typeof a.button === 'string')
409
+ args.push('--button', a.button);
410
+ return args;
411
+ },
412
+ }));
413
+ // 19) 键入文本
414
+ ctx.tools.register(cliTool({
415
+ name: 'screen_automation_type_text',
416
+ description: 'Type text into the focused element via the local helper keyboard.',
417
+ parameters: {
418
+ text: { type: 'string', required: true, description: 'Text to type.' },
419
+ interval: { type: 'number', description: 'Seconds between keystrokes (default 0.0).' },
420
+ },
421
+ buildArgs: (a) => {
422
+ const args = ['keyboard', 'write', '--text', String(a.text)];
423
+ if (typeof a.interval === 'number')
424
+ args.push('--interval', String(a.interval));
425
+ return args;
426
+ },
427
+ }));
428
+ // 20) 组合热键
429
+ ctx.tools.register(cliTool({
430
+ name: 'screen_automation_hotkey',
431
+ description: 'Press a hotkey combination via the local helper, e.g. "ctrl c" or "win v".',
432
+ parameters: {
433
+ keys: { type: 'string', required: true, description: 'Space-separated keys, e.g. "ctrl c".' },
434
+ },
435
+ buildArgs: (a) => {
436
+ const keys = String(a.keys).trim().split(/\s+/).filter(Boolean);
437
+ return ['keyboard', 'hotkey', ...keys];
438
+ },
439
+ }));
440
+ // 21) 校验已安装 workflow
441
+ ctx.tools.register(cliTool({
442
+ name: 'screen_automation_workflow_validate',
443
+ description: 'Validate an installed workflow by id via the local helper CLI.',
444
+ parameters: {
445
+ workflow_id: { type: 'string', required: true, description: 'Installed workflow id.' },
446
+ },
447
+ buildArgs: (a) => ['workflow', 'validate', String(a.workflow_id)],
448
+ }));
449
+ // 22) 安装 workflow(从本地源路径)
450
+ ctx.tools.register(cliTool({
451
+ name: 'screen_automation_workflow_install',
452
+ description: 'Install a workflow into the local helper from a source path (directory or archive).',
453
+ parameters: {
454
+ source: { type: 'string', required: true, description: 'Path to workflow source (dir/archive).' },
455
+ },
456
+ buildArgs: (a) => ['workflow', 'install', String(a.source)],
457
+ }));
458
+ // 23) 移除已安装 workflow
459
+ ctx.tools.register(cliTool({
460
+ name: 'screen_automation_workflow_remove',
461
+ description: 'Remove an installed workflow from the local helper by id.',
462
+ parameters: {
463
+ workflow_id: { type: 'string', required: true, description: 'Installed workflow id to remove.' },
464
+ },
465
+ buildArgs: (a) => ['workflow', 'remove', String(a.workflow_id)],
466
+ }));
467
+ // ===== 任务会话(task begin/status/end,把后续控制/识别绑定到一个可见任务窗口) =====
468
+ // 24) 开始任务会话
469
+ ctx.tools.register(cliTool({
470
+ name: 'screen_automation_task_begin',
471
+ description: 'Begin a task session on the local helper, optionally binding to a window by title/process/handle. ' +
472
+ 'Later click/write/find/wait act within this task target. Returns the resolved target as JSON.',
473
+ parameters: {
474
+ title: { type: 'string', description: 'Target window title to match (optional).' },
475
+ process: { type: 'string', description: 'Target process name to match (optional).' },
476
+ handle: { type: 'number', description: 'Target window handle (integer); platform-specific (optional).' },
477
+ },
478
+ buildArgs: (a) => {
479
+ const args = ['task', 'begin'];
480
+ if (typeof a.title === 'string' && a.title.length > 0)
481
+ args.push('--title', String(a.title));
482
+ if (typeof a.process === 'string' && a.process.length > 0)
483
+ args.push('--process', String(a.process));
484
+ if (typeof a.handle === 'number')
485
+ args.push('--handle', String(a.handle));
486
+ return args;
487
+ },
488
+ }));
489
+ // 25) 任务会话状态
490
+ ctx.tools.register(cliTool({
491
+ name: 'screen_automation_task_status',
492
+ description: 'Report the current task session target (window) on the local helper as JSON.',
493
+ parameters: {},
494
+ buildArgs: () => ['task', 'status'],
495
+ }));
496
+ // 26) 结束任务会话
497
+ ctx.tools.register(cliTool({
498
+ name: 'screen_automation_task_end',
499
+ description: 'End the current task session on the local helper.',
500
+ parameters: {},
501
+ buildArgs: () => ['task', 'end'],
502
+ }));
503
+ // ===== workflow 只读信息工具(show / describe / inspect,无需执行) =====
504
+ // 27) 查看已安装 workflow 详情
505
+ ctx.tools.register(cliTool({
506
+ name: 'screen_automation_workflow_show',
507
+ description: 'Show the resolved configuration/manifest of an installed workflow by id (read-only).',
508
+ parameters: {
509
+ workflow_id: { type: 'string', required: true, description: 'Installed workflow id.' },
510
+ },
511
+ buildArgs: (a) => ['workflow', 'show', String(a.workflow_id)],
512
+ }));
513
+ // 28) 获取 workflow 说明
514
+ ctx.tools.register(cliTool({
515
+ name: 'screen_automation_workflow_describe',
516
+ description: 'Return the human-readable description/metadata of an installed workflow by id (read-only).',
517
+ parameters: {
518
+ workflow_id: { type: 'string', required: true, description: 'Installed workflow id.' },
519
+ },
520
+ buildArgs: (a) => ['workflow', 'describe', String(a.workflow_id)],
521
+ }));
522
+ // 29) 检查 workflow 源(未安装也能看)
523
+ ctx.tools.register(cliTool({
524
+ name: 'screen_automation_workflow_inspect',
525
+ description: 'Inspect a workflow source (directory/archive) without installing it; returns its manifest as JSON.',
526
+ parameters: {
527
+ source: { type: 'string', required: true, description: 'Path to workflow source (dir/archive).' },
528
+ },
529
+ buildArgs: (a) => ['workflow', 'inspect', String(a.source)],
530
+ }));
531
+ // 30) 把小助手截图喂给 dsh 的视觉模型(识别阶梯的最高层:VLM 理解屏幕)
532
+ // 流程:screen capture 拿图 → ctx.attachments 登记为不可变图片引用 →
533
+ // 拼一个含 image block 的 user 消息 → ctx.llm.stream 多模态推理 → 收集 text-delta。
534
+ // 注意:模型走的是 dsh 当前 profile 配置的 provider;若你想免费本地推理,
535
+ // 把本机视觉模型注册成 dsh 的一个 provider,然后把 provider/model 传进来即可。
536
+ ctx.tools.register(defineTool({
537
+ name: 'screen_automation_understand',
538
+ description: 'Capture the screen via the local helper and feed the screenshot to the dsh vision model. ' +
539
+ 'Returns the model\'s natural-language understanding of what is on screen. ' +
540
+ 'Use this for open-ended tasks OCR/template/color cannot solve (e.g. "what is this screen doing", "where did it error").',
541
+ parameters: {
542
+ prompt: { type: 'string', description: 'What to ask about the screenshot. Defaults to a general description request.' },
543
+ target: { type: 'string', description: 'Capture target: foreground | virtual-screen | work-area | task. Default foreground.' },
544
+ region: { type: 'string', description: 'Optional capture region in helper format (e.g. "0,0,800,600").' },
545
+ provider: { type: 'string', description: 'dsh LLM provider route (e.g. deepseek / a local ollama provider). Defaults to deepseek.' },
546
+ model: { type: 'string', description: 'Model id registered under the provider. Defaults to deepseek-chat.' },
547
+ system: { type: 'string', description: 'Optional system prompt for the vision call.' },
548
+ },
549
+ output: {
550
+ schema: {
551
+ type: 'object',
552
+ additionalProperties: true,
553
+ properties: {
554
+ ok: { type: 'boolean', required: true },
555
+ text: { type: 'string', required: true },
556
+ provider: { type: 'string', required: true },
557
+ model: { type: 'string', required: true },
558
+ attachmentId: { type: 'string', required: true },
559
+ imageBytes: { type: 'number', required: true },
560
+ captureCommand: { type: 'string', required: true },
561
+ },
562
+ },
563
+ render: (_args, value) => {
564
+ const v = value;
565
+ const head = `[${v.provider ?? '?'} / ${v.model ?? '?'}]`;
566
+ return [{ type: 'text', text: `${head}\n${v.text ?? ''}` }];
567
+ },
568
+ },
569
+ async execute(args) {
570
+ const bin = resolveBinary();
571
+ if (!bin) {
572
+ throw new Error('screen-automation binary not found. Set SCREEN_AUTOMATION_BIN (or install Screen Automation Helper).');
573
+ }
574
+ if (!ctx.llm) {
575
+ throw new Error('dsh LLM service (ctx.llm) is unavailable in this profile; cannot run vision understanding.');
576
+ }
577
+ if (!ctx.attachments) {
578
+ throw new Error('dsh attachment service (ctx.attachments) is unavailable in this profile; cannot register the screenshot.');
579
+ }
580
+ // 1) 让小助手截图,输出到我们可控的临时文件
581
+ const target = typeof args.target === 'string' && args.target.trim() ? args.target.trim() : 'foreground';
582
+ const region = typeof args.region === 'string' && args.region.trim() ? args.region.trim() : undefined;
583
+ const outPath = path.join(os.tmpdir(), `dsh-sa-capture-${process.pid}-${Date.now()}.png`);
584
+ const capArgs = ['screen', 'capture', '--target', target, '--output', outPath];
585
+ if (region)
586
+ capArgs.push('--region', region);
587
+ const cap = await runCli(capArgs);
588
+ // 截图可能写到 outPath,也可能在 JSON 里回一个路径;谁存在用谁
589
+ let imgPath = outPath;
590
+ if (!fs.existsSync(imgPath)) {
591
+ const reported = (cap.data && (cap.data.path || cap.data.output || cap.data.file));
592
+ if (reported && fs.existsSync(reported))
593
+ imgPath = reported;
594
+ }
595
+ if (!fs.existsSync(imgPath)) {
596
+ throw new Error(`screenshot capture produced no file (cmd: ${cap.command}; raw: ${cap.raw.slice(0, 200)})`);
597
+ }
598
+ // 2) 读字节 + 推断媒体类型
599
+ const buf = fs.readFileSync(imgPath);
600
+ const lower = imgPath.toLowerCase();
601
+ const mediaType = lower.endsWith('.jpg') || lower.endsWith('.jpeg')
602
+ ? 'image/jpeg'
603
+ : lower.endsWith('.webp')
604
+ ? 'image/webp'
605
+ : 'image/png';
606
+ // 3) 登记为 attachment 服务里的不可变图片引用(dsh 契约要求走 attachment,而非裸 base64)
607
+ const ref = await ctx.attachments.saveImage({
608
+ data: new Uint8Array(buf),
609
+ mediaType,
610
+ name: 'screen-capture',
611
+ });
612
+ // 4) 拼多模态 user 消息:文字提问 + 图片块
613
+ const promptText = typeof args.prompt === 'string' && args.prompt.trim()
614
+ ? args.prompt.trim()
615
+ : 'Describe what is shown in this screenshot, focusing on actionable UI elements.';
616
+ const userContent = [
617
+ { type: 'text', text: promptText },
618
+ { type: 'image', attachment: ref },
619
+ ];
620
+ const userMessage = {
621
+ id: MessageId(`screen-understand-${Date.now()}`),
622
+ role: 'user',
623
+ content: userContent,
624
+ source: { kind: 'user' },
625
+ };
626
+ // 5) 走 dsh 当前 profile 的视觉模型(可传 provider/model 指向本地模型)
627
+ const provider = typeof args.provider === 'string' && args.provider.trim() ? args.provider.trim() : 'deepseek';
628
+ const model = typeof args.model === 'string' && args.model.trim() ? args.model.trim() : 'deepseek-chat';
629
+ let text = '';
630
+ for await (const chunk of ctx.llm.stream({
631
+ provider,
632
+ model,
633
+ messages: [userMessage],
634
+ system: typeof args.system === 'string' && args.system.trim() ? args.system.trim() : undefined,
635
+ })) {
636
+ if (chunk.type === 'text-delta')
637
+ text += chunk.text;
638
+ }
639
+ return {
640
+ ok: true,
641
+ text,
642
+ provider,
643
+ model,
644
+ attachmentId: ref.attachmentId,
645
+ imageBytes: buf.length,
646
+ captureCommand: cap.command,
647
+ };
648
+ },
649
+ }));
650
+ console.log('[screen-automation] loaded; bridged tools: status, capabilities, list/run/stop workflows, runs, health, capture, ' +
651
+ 'recognize_text, locate_text, color_regions, match_template, contours, wait_text, ' +
652
+ 'click, drag, scroll, long_press, type_text, hotkey, ' +
653
+ 'workflow_validate/install/remove/show/describe/inspect, task_begin/status/end, ' +
654
+ 'understand(vlm)');
655
+ }
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "dsh-screen-automation",
3
+ "version": "0.1.0",
4
+ "description": "DeepSeek Harness (dsh) plugin that bridges the local 'Screen Automation Helper' desktop platform (Windows/macOS) into the Agent tool system. Exposes status, capabilities, workflow list/run/stop, run management, screen capture, local recognition primitives, input control, workflow lifecycle, task sessions and VLM understanding as dsh tools that shell out to the helper's CLI (JSON interface).",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "keywords": [
8
+ "deepseek-harness",
9
+ "dsh",
10
+ "dsh-plugin",
11
+ "screen-automation",
12
+ "agent",
13
+ "tool",
14
+ "computer-use"
15
+ ],
16
+ "main": "./lib/index.js",
17
+ "types": "./lib/index.d.ts",
18
+ "files": [
19
+ "lib",
20
+ "README.md",
21
+ "cordis.patch.yml"
22
+ ],
23
+ "dsh": {
24
+ "bundle": {
25
+ "patch": "./cordis.patch.yml"
26
+ }
27
+ },
28
+ "scripts": {
29
+ "build": "tsc -p tsconfig.json",
30
+ "watch": "tsc -p tsconfig.json --watch"
31
+ },
32
+ "peerDependencies": {
33
+ "@deepseek-ai/cordis": "*",
34
+ "@deepseek-ai/dsh-tools": "*",
35
+ "@deepseek-ai/dsh-llm": "*",
36
+ "@deepseek-ai/dsh-attachment": "*"
37
+ },
38
+ "devDependencies": {
39
+ "@deepseek-ai/cordis": "*",
40
+ "@deepseek-ai/dsh-tools": "*",
41
+ "@deepseek-ai/dsh-llm": "*",
42
+ "@deepseek-ai/dsh-attachment": "*",
43
+ "@types/node": "^22.0.0",
44
+ "typescript": "^5.5.0"
45
+ },
46
+ "repository": {
47
+ "type": "git",
48
+ "url": "https://github.com/xiaozs-com/dsh-screen-automation.git"
49
+ },
50
+ "homepage": "https://github.com/xiaozs-com/dsh-screen-automation#readme",
51
+ "bugs": "https://github.com/xiaozs-com/dsh-screen-automation/issues"
52
+ }