@sonicloud/dsh-sonicloud-device 0.1.1 → 0.1.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.
Files changed (53) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/CHANGELOG.zh.md +44 -0
  3. package/README.md +81 -86
  4. package/README.zh.md +135 -0
  5. package/dist/build.json +1 -1
  6. package/dist/client.js +202 -28
  7. package/docs/contributing/development.md +51 -28
  8. package/docs/images/plugin-install.png +0 -0
  9. package/docs/images/sonicloud-device.png +0 -0
  10. package/docs/specs/ci-cd.md +24 -37
  11. package/docs/specs/mouse-settings.md +7 -34
  12. package/docs/specs/smart-mouse-plugin.md +51 -32
  13. package/native/README.md +4 -0
  14. package/native/desktop/VOICE_SOURCE.json +16 -0
  15. package/native/desktop/VoicePanel.cs +191 -59
  16. package/native/desktop/VoicePanel.swift +27 -0
  17. package/native/desktop/darwin-arm64/Sonicloud Voice.app/Contents/MacOS/sonicloud-voice +0 -0
  18. package/native/desktop/darwin-arm64/Sonicloud Voice.app/Contents/_CodeSignature/CodeResources +115 -0
  19. package/native/desktop/typer.dll +0 -0
  20. package/native/desktop/windows.ps1 +1 -1
  21. package/native/screenshot/README.md +34 -0
  22. package/native/screenshot/SOURCE.json +218 -0
  23. package/native/screenshot/darwin-arm64/screentool-macos-1.2.2.zip +0 -0
  24. package/native/screenshot/patches/hide-cloud-actions.patch +202 -0
  25. package/native/screenshot/patches/mac-permissions.patch +545 -0
  26. package/native/screenshot/patches/upstream-files.json +22 -0
  27. package/native/screenshot/win32-x64/PixPinScrollCapture.dll +0 -0
  28. package/native/screenshot/win32-x64/Qt5Core.dll +0 -0
  29. package/native/screenshot/win32-x64/Qt5Gui.dll +0 -0
  30. package/native/screenshot/win32-x64/Qt5Network.dll +0 -0
  31. package/native/screenshot/win32-x64/Qt5Svg.dll +0 -0
  32. package/native/screenshot/win32-x64/Qt5Widgets.dll +0 -0
  33. package/native/screenshot/win32-x64/iconengines/qsvgicon.dll +0 -0
  34. package/native/screenshot/win32-x64/imageformats/qjpeg.dll +0 -0
  35. package/native/screenshot/win32-x64/imageformats/qsvg.dll +0 -0
  36. package/native/screenshot/win32-x64/libcrypto-1_1-x64.dll +0 -0
  37. package/native/screenshot/win32-x64/libssl-1_1-x64.dll +0 -0
  38. package/native/screenshot/win32-x64/msvcp140.dll +0 -0
  39. package/native/screenshot/win32-x64/platforms/qwindows.dll +0 -0
  40. package/native/screenshot/win32-x64/qwindowsvistastyle.dll +0 -0
  41. package/native/screenshot/win32-x64/screenhelper.exe +0 -0
  42. package/native/screenshot/win32-x64/screentool.dll +0 -0
  43. package/native/screenshot/win32-x64/vcruntime140.dll +0 -0
  44. package/native/screenshot/win32-x64/vcruntime140_1.dll +0 -0
  45. package/package.json +2 -1
  46. package/src/desktop/presentation.mjs +18 -4
  47. package/src/desktop/screenshot-worker.mjs +225 -0
  48. package/src/desktop/screenshot.mjs +185 -0
  49. package/src/devices/actions.mjs +7 -1
  50. package/src/devices/manager.mjs +145 -81
  51. package/src/host/index.mjs +5 -1
  52. package/src/shared/remote.mjs +5 -0
  53. /package/{src/client/assets → docs/images}/contact-wechat.jpg +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,50 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ### Added
6
+
7
+ - Check macOS typing and screenshot permissions on initial activation and reconnection, with separate Sonicloud Voice and screenhelper authorization and recheck guidance in Sonicloud Devices; system permission confirmation remains manual.
8
+ - Integrate standalone screenshot processes for Windows x64 and macOS ARM64, triggered by the mouse capture button or Start Screenshot in Sonicloud Devices, with region selection, annotation, copying, saving, pinning, and scrolling capture; report repeated triggers and startup failures, and close capture and pinned windows when the plugin is disabled.
9
+
10
+ ### Changed
11
+
12
+ - Sign macOS Sonicloud Voice with a Developer ID; existing Accessibility grants from older versions may need to be confirmed again as prompted by the system.
13
+ - Move the screenshot controls to the bottom of the Sonicloud Devices page.
14
+
15
+ ### Fixed
16
+
17
+ - Check macOS Screen Recording permission in both the host and native screenshot process before showing the overlay, preventing it from covering system permission prompts; missing Accessibility permission does not block regular screenshots or manual scrolling.
18
+ - Restore macOS voice helper execution permissions lost during cross-platform packaging so packages built on Windows can start Sonicloud Voice.
19
+ - Hide unsupported image translation and scrolling OCR/Word export actions in both Windows and macOS screenshot processes while keeping scrolling capture available; retain the original Developer ID identity for the macOS package.
20
+ - Parse Windows tar line endings correctly during package checks so complete packages are not reported as missing files.
21
+
22
+ ## 0.1.2 - 2026-11-12
23
+
24
+ ### Added
25
+
26
+ - Add a Sonicloud Devices panel to the left navigation bar with the same device management UI as the settings page; shown by default, with a settings-page switch to hide or restore it without affecting the settings page.
27
+ - Switch Windows voice typing and translation to the typer injection library: text is typed live into the focused window character by character while speaking, with automatic backspace corrections, and finalized on release; translation types only the final translated text. Character injection never reads from or writes to the clipboard; password fields, a missing library, or rejected injection (for example, elevated windows) keep the result available to copy.
28
+ - Restore the Harness window for the AI button on Windows: activation now restores minimized windows directly, and for tray-hidden windows launches a second instance of the running app (stripping node-mode Electron environment overrides) handled by its single-instance handler; an activation failure alone no longer blocks filling the conversation draft.
29
+ - Offer one-click submit on Windows when the AI conversation cannot be filled: the overlay keeps the recognized text, prompts to open a target input, and types it into the focused window through the typer library when clicked.
30
+
31
+ ### Changed
32
+
33
+ - Sign macOS Sonicloud Voice with a Developer ID; existing Accessibility grants from older versions may need to be confirmed again as prompted by the system.
34
+ - Move the screenshot controls to the bottom of the Sonicloud Devices page.
35
+ - Provide an English-default user guide with a Chinese version, UI installation, update, and removal instructions, and screenshots.
36
+ - Refactor device and speech handling and share retry logic, preserving functionality and UI.
37
+ - Streamline specifications and development docs, consolidating CI/CD configuration and release verification records.
38
+ - Standardize on npm and remove outdated pnpm lockfile and configuration.
39
+ - Relax release-notes rules: publishing falls back to the Unreleased section when the changelog has no section for the current version, so merging dev directly can ship.
40
+ - Accept fully folded changelogs in release checks: an Unreleased section must stay at the top when present, and a fully folded changelog (version sections only) publishes from the current version section.
41
+
42
+ ### Fixed
43
+
44
+ - Check macOS Screen Recording permission in both the host and native screenshot process before showing the overlay, preventing it from covering system permission prompts; missing Accessibility permission does not block regular screenshots or manual scrolling.
45
+ - Restore macOS voice helper execution permissions lost during cross-platform packaging so packages built on Windows can start Sonicloud Voice.
46
+ - Hide unsupported image translation and scrolling OCR/Word export actions in both Windows and macOS screenshot processes while keeping scrolling capture available; retain the original Developer ID identity for the macOS package.
47
+ - Parse Windows tar line endings correctly during package checks so complete packages are not reported as missing files.
48
+
5
49
  ## 0.1.1 - 2026-11-09
6
50
 
7
51
  ### Added
package/CHANGELOG.zh.md CHANGED
@@ -2,6 +2,50 @@
2
2
 
3
3
  ## 未发布
4
4
 
5
+ ### 新增
6
+
7
+ - macOS 首次启用或重新连接时检查打字和截图权限,在“声云设备”中分别引导 Sonicloud Voice 与 screenhelper 授权并重新检查;系统授权由用户手动确认。
8
+ - 集成 Windows x64 与 macOS ARM64 独立截图进程,支持鼠标截图键及“声云设备”的“开始截图”按钮,提供选区、标注、复制、保存、贴图和滚动截图;截图重复触发及启动失败会提示,禁用插件时关闭截图和贴图窗口。
9
+
10
+ ### 变更
11
+
12
+ - macOS Sonicloud Voice 改用 Developer ID 签名;旧版本的辅助功能授权可能需要按系统提示重新确认。
13
+ - 将“声云设备”页面的截图操作行移至最底部。
14
+
15
+ ### 修复
16
+
17
+ - macOS 截图在宿主和原生进程两层检查屏幕录制权限,缺权限时不显示蒙层,避免遮挡系统授权弹窗;辅助功能缺失不阻止普通截图和手动滚动。
18
+ - 恢复跨平台打包丢失的 macOS 语音组件执行权限,避免从 Windows 生成的安装包无法启动 Sonicloud Voice。
19
+ - Windows、macOS 截图进程统一隐藏未接入的图片翻译及滚动 OCR/Word 导出入口,保留滚动截图;macOS 包沿用原 Developer ID 签名。
20
+ - 修正 Windows 上安装包检查对 tar 换行的解析,避免完整安装包被误判缺少文件。
21
+
22
+ ## 0.1.2 - 2026-11-12
23
+
24
+ ### 新增
25
+
26
+ - 左侧导航栏新增「声云设备」面板,与设置页提供同样的设备管理界面;默认显示,可在设置页开关手动隐藏或恢复,隐藏不影响设置页功能。
27
+ - Windows 语音打字与语音翻译改用 typer 标准注入库:说话期间文字实时逐字填入当前焦点窗口并自动退格更正,松手完成收尾;翻译仅逐字打出最终译文。逐字注入不读取、不占用剪贴板;密码框、组件缺失或注入被拒(如提权窗口)时保留结果供复制。
28
+ - AI 键支持唤回 Harness 窗口:Windows 直接还原最小化窗口,托盘隐藏时剥离 node 模式环境变量后二次启动运行中的程序、由单实例还原或重建窗口;唤起失败不再阻断对话草稿填充。
29
+ - Windows 上 AI 对话无法填充时提供“一键提交”回退:浮层保留识别文本并提示打开目标输入界面,点击后经 typer 逐字注入当前焦点窗口。
30
+
31
+ ### 变更
32
+
33
+ - macOS Sonicloud Voice 改用 Developer ID 签名;旧版本的辅助功能授权可能需要按系统提示重新确认。
34
+ - 将“声云设备”页面的截图操作行移至最底部。
35
+ - 提供默认英文、可切换中文的用户指南,补充界面安装、更新、卸载说明及截图。
36
+ - 重构设备与语音处理、复用重连逻辑,保持功能和界面不变。
37
+ - 精简规格与开发文档,汇总 CI/CD 配置及发布验证记录。
38
+ - 统一使用 npm,移除过时的 pnpm 锁文件与配置。
39
+ - 放宽发布说明规则:更新日志缺少当前版本章节时正式发布自动回退采用未发布章节内容,dev 分支直接合并即可发布。
40
+ - 发布校验兼容完全折叠的更新日志:未发布章节存在时仍须置顶,完全折叠(仅版本章节、无未发布章节)时正式发布直接采用当前版本章节。
41
+
42
+ ### 修复
43
+
44
+ - macOS 截图在宿主和原生进程两层检查屏幕录制权限,缺权限时不显示蒙层,避免遮挡系统授权弹窗;辅助功能缺失不阻止普通截图和手动滚动。
45
+ - 恢复跨平台打包丢失的 macOS 语音组件执行权限,避免从 Windows 生成的安装包无法启动 Sonicloud Voice。
46
+ - Windows、macOS 截图进程统一隐藏未接入的图片翻译及滚动 OCR/Word 导出入口,保留滚动截图;macOS 包沿用原 Developer ID 签名。
47
+ - 修正 Windows 上安装包检查对 tar 换行的解析,避免完整安装包被误判缺少文件。
48
+
5
49
  ## 0.1.1 - 2026-11-09
6
50
 
7
51
  ### 新增
package/README.md CHANGED
@@ -1,140 +1,135 @@
1
- # 声云智能鼠标插件
1
+ # Sonicloud Smart Mouse Plugin
2
2
 
3
- 使用声云智能鼠标在桌面应用中进行语音输入、翻译和搜索,并通过 DeepSeek Harness 管理鼠标按键和灵敏度。安装后,可在 Harness 设置中的“声云设备”查看和配置鼠标。
3
+ <p align="center">English | <a href="README.zh.md">简体中文</a></p>
4
4
 
5
- ## 你可以做什么
5
+ Use your Sonicloud smart mouse to dictate, translate, and search in desktop apps, or enter text directly into an AI conversation in DeepSeek Harness. Sonicloud Devices lets you save language, button, and sensitivity settings separately for each mouse.
6
6
 
7
- - **语音打字**:按住鼠标语音键说话,松开后将识别文字填入按键时聚焦的可编辑输入框,不自动发送。
8
- - **语音翻译**:设置源语言和目标语言,将语音键或 M 键设为语音翻译,松开后回填译文。
9
- - **语音搜索**:将 M 键设为语音搜索,说出关键词后使用所选搜索引擎搜索。
10
- - **自定义按键**:为 M 键选择回车、后退、一键链接等动作;长按 AI 键可唤起 Harness 并向 AI 对话输入框填入语音文字,默认自动发送,可在设备设置关闭。
11
- - **管理多台鼠标**:查看连接方式、电量和设备序列号,分别保存每台鼠标的语言、按键和灵敏度设置。
7
+ **Purchase a Sonicloud mouse to use speech recognition and voice translation for free.**
12
8
 
13
- 插件根据当前鼠标身份自动接入服务,无需手填鉴权配置。
9
+ ## Requirements
14
10
 
15
- ## 使用前准备
11
+ - DeepSeek Harness **0.2.1-rc.5 or later**.
12
+ - A supported Sonicloud smart mouse connected via Bluetooth or a 2.4 GHz USB receiver.
13
+ - Network access to the speech service.
16
14
 
17
- - DeepSeek Harness **0.2.1-rc.5 或更高版本**。
18
- - 支持本插件的声云智能鼠标,通过蓝牙或 2.4G USB 接收器连接。
19
- - 插件安装包(`.tgz` 文件),以及可访问语音服务的网络。
15
+ Supports Apple silicon Macs and Windows x64. The plugin identifies your mouse and connects to the services automatically, with no authentication details to enter.
20
16
 
21
- 安装包包含 Apple 芯片 Mac 和 Windows x64 所需的设备组件。维护者已确认完成 0.1.0 的实机验收;其他系统暂不保证可用。
17
+ ## Installation and activation
22
18
 
23
- ## 安装与启用
19
+ 1. Open DeepSeek Harness and select **Plugins (插件)** in the sidebar.
20
+ 2. Click **Add Plugin (添加插件)** in the upper-right corner.
21
+ 3. Enter **@sonicloud/dsh-sonicloud-device** and click **Install (安装)**.
22
+ 4. Once installed, enable the plugin and open **Settings → Sonicloud Devices (设置 → 声云设备)** to view and configure your mouse.
24
23
 
25
- 1. 启动一次 Harness,完成初始化,然后完全退出应用。
26
- 2. 在终端执行以下命令,将路径替换为你取得的安装包的完整路径:
24
+ On macOS, initial activation and reconnection check typing and screenshot permissions. Sonicloud Devices keeps the setup guidance available; see [first-time permissions](#first-time-permissions-on-macos).
27
25
 
28
- ```sh
29
- dsh plugin --profile desktop add "/绝对路径/sonicloud-dsh-sonicloud-device-0.1.1.tgz"
30
- ```
26
+ ![Add the plugin in Harness by entering @sonicloud/dsh-sonicloud-device and clicking Install](docs/images/plugin-install.png)
31
27
 
32
- 文件名以实际安装包为准。Mac 如果提示找不到 `dsh`,可使用:
28
+ ## Features
33
29
 
34
- ```sh
35
- "/Applications/DeepSeek Harness.app/Contents/Resources/runtime/cli/bin/dsh" plugin --profile desktop add "/绝对路径/sonicloud-dsh-sonicloud-device-0.1.1.tgz"
36
- ```
37
-
38
- 3. 重新启动 Harness,在插件管理中启用 `dsh-sonicloud-device`。
39
- 4. 打开设置,进入侧栏的“声云设备”。
30
+ | Feature | How to use it |
31
+ | --- | --- |
32
+ | Voice typing | Assign Voice Typing to the voice or M button. Hold to speak, then release to insert text into the current app's input field without sending it |
33
+ | Voice translation | Choose source and target languages and assign Voice Translation to the voice or M button. Hold to speak, then release to insert the translation |
34
+ | Voice search | Assign Voice Search to the M button and choose Baidu, Bing, or Google. Speak your query and release to search |
35
+ | AI conversations | Hold the AI button to speak, then release to fill a Harness conversation. Auto-send is enabled by default and can be turned off in settings |
36
+ | Screenshots | Press the mouse capture button or click Start Screenshot in Sonicloud Devices, then select a region to annotate, copy, save, pin, or capture scrolling content |
37
+ | Buttons and sensitivity | Assign Enter, Backspace, Open Link, or other actions to the M button, and adjust mouse DPI |
38
+ | Multiple mice | View each mouse's connection, battery level, and serial number, and save its language, button, and sensitivity settings separately |
40
39
 
41
- 正式版也可按确切版本从 npm 安装:
40
+ Manage these options in **Settings → Sonicloud Devices (设置 → 声云设备)**. Changes save automatically. **Restore Defaults (恢复默认)** resets only the current mouse, and reconnecting restores its saved settings. The left navigation bar also shows a **Sonicloud Devices (声云设备)** panel with the same device management UI by default; use the Sidebar (侧边栏) switch on the Sonicloud Devices title row to hide or restore it. Hiding the panel does not affect the settings page.
42
41
 
43
- ```sh
44
- dsh plugin --profile desktop add @sonicloud/dsh-sonicloud-device@0.1.1
45
- ```
42
+ ![Sonicloud Devices settings showing mouse information, voice typing, translation, and DPI options](docs/images/sonicloud-device.png)
46
43
 
47
- 若安装提示 `ERR_PNPM_IGNORED_BUILDS` 且指向 `koffi`,在该 profile 的 `pnpm-workspace.yaml` 中补充以下配置,替换为报错中的确切版本后重试;保留已有配置,仅批准这一原生依赖:
44
+ ## Getting started
48
45
 
49
- ```yaml
50
- allowBuilds:
51
- "koffi@<报错中的版本>": true
52
- ```
46
+ ### First-time permissions on macOS
53
47
 
54
- 从旧包迁移时,完全退出 Harness,先运行 `dsh plugin --profile desktop remove dsh-sonicloud-device`,再安装新包。插件实例 ID 仍为 `dsh-sonicloud-device`,按 SN 保存的设备偏好继续使用原存储键;不要删除 profile 数据。
48
+ After enabling the plugin, open **Sonicloud Devices (声云设备)** and grant the permissions you need:
55
49
 
56
- 测试包从 [Actions](https://github.com/SonicloudTech/dsh-sonicloud-device/actions/workflows/release.yml) 的运行摘要下载,保留 30 天;下载需要登录 GitHub,解压外层归档后安装其中的 `.tgz`。
50
+ | Component | Permission and purpose |
51
+ | --- | --- |
52
+ | Sonicloud Voice | Accessibility: insert recognized text into desktop apps; recognition and copying remain available without it |
53
+ | screenhelper | Screen Recording: required for screenshots; the capture overlay stays closed until permission is granted |
54
+ | screenhelper | Accessibility: optional for automatic scrolling; regular screenshots and manual scrolling remain available |
57
55
 
58
- ## 开始使用
56
+ Click the corresponding **Authorize (授权)** button to let that component request permission. Confirm manually in the system prompt or **System Settings → Privacy & Security**, then click **Authorized, Check Again (已授权,重新检查)**. If a component is missing from the list, expand its location in the page and add it by that path. The plugin checks and guides setup; it never confirms system permissions for you.
59
57
 
60
- ### 连接与设置鼠标
58
+ Sonicloud Voice now uses a Developer ID signature. If an older version is already checked but the plugin still reports missing permission, follow the system prompts to authorize it again and restart Harness, then recheck.
61
59
 
62
- 打开鼠标电源,选择蓝牙或 2.4G 模式并完成连接。在“声云设备”中选中鼠标,即可查看电量、连接方式和序列号(SN)。
60
+ ### Voice typing and translation
63
61
 
64
- 你可以调整语音识别语言、是否保留标点、鼠标灵敏度(DPI)以及按键动作。更改后自动保存,无需点击保存按钮。“恢复默认”只重置当前鼠标;重新连接同一台鼠标时会恢复已保存的设置。
62
+ 1. Turn on your mouse, select Bluetooth or 2.4 GHz mode, and connect it.
63
+ 2. Set the button action and language in Sonicloud Devices. For translation, choose different source and target languages.
64
+ 3. Place the cursor in an editable field in the target app, then hold the assigned button to speak.
65
+ 4. Release the button, wait for the text or translation to appear, and review it before sending.
65
66
 
66
- ### 语音输入
67
+ Audio comes from the mouse. Recognized text and processing status appear in a separate overlay at the bottom of the screen without taking input focus. Click the overlay's close button or disconnect the mouse to cancel. Multiple mice can be connected, but only one voice operation can run at a time.
67
68
 
68
- 1. 在“声云设备”中,将“语音键”设为“语音打字”,选择识别语言。
69
- 2. 在目标应用的可编辑输入框中放置光标;不必打开 Harness 对话。
70
- 3. 按住鼠标语音键说话,松开后等待识别完成。
71
- 4. 检查输入框中的文字,再自行发送。
69
+ Keep the target window, document, and input position unchanged during recording, and avoid typing, clicking, or scrolling. If the target changes or the app does not support automatic insertion, the overlay keeps the result available to copy. If translation fails, you can copy the recognized source text.
72
70
 
73
- 录音来自鼠标。识别中间文字、整理和翻译状态显示在鼠标所在屏幕底部居中的独立浮层,不抢占输入焦点。Harness 主窗口最小化、隐藏或切换页面不会取消会话;插件后台仍须运行,完全退出 Harness 后不可用。
71
+ For macOS insertion permissions, see [first-time permissions](#first-time-permissions-on-macos). Insertion temporarily uses the clipboard, then restores its previous contents while preserving anything newly copied in the meantime.
74
72
 
75
- 点击浮层叉号按钮或断开鼠标可取消会话。输入目标、内容或选区发生变化,或应用不支持安全回填时,浮层保留结果供复制。macOS 自动回填需要在“系统设置 → 隐私与安全性 → 辅助功能”中允许 Sonicloud Voice;没有权限仍可识别并复制结果。Windows 对不提供可编辑 UI Automation 文本接口的输入框保留结果供复制。
73
+ On Windows, recognized text is typed live into the focused field character by character through the typer injection library, with automatic corrections while you speak; translation types only the final translated text. Character injection never touches the clipboard. Password fields and windows that reject simulated input (for example, elevated apps) keep the result available to copy instead.
76
74
 
77
- macOS 默认使用兼容粘贴回填,支持 Zed 等未提供辅助功能写入接口的应用。录音期间保持目标窗口和文档,不进行键盘编辑、鼠标点击或滚动;可读取内容与选区时也会检查是否变化。回填临时使用剪贴板并恢复原内容,不覆盖期间的新复制内容;检测到目标或输入活动变化时保留结果供复制。
75
+ ### Using the AI button
78
76
 
79
- ### 按键与搜索
77
+ Holding the AI button brings Harness to the foreground, even when it is minimized or hidden in the tray. If you are on an AI conversation page, it uses that conversation; otherwise, it creates one. You do not need to focus the input field. Recognized text is appended to the existing draft.
80
78
 
81
- | 按键 | 使用方式 |
82
- | --- | --- |
83
- | 语音键 | 选择语音打字或语音翻译,按住说话、松开结束 |
84
- | M 键 | 可选回车、后退、语音打字、语音翻译、语音搜索、一键链接等动作;语音动作按住说话,其他动作在松键时执行 |
85
- | AI 键 | 长按说话、松开结束;Harness 不在前台时自动唤起,在 AI 对话页时填充当前对话,否则新建对话并填充;无需输入框焦点;“自动发送”默认开启,关闭时仅填充 |
79
+ With **Auto-send (自动发送)** enabled, the complete draft and attachments are submitted. Turn it off to review and send the text manually. This setting is saved per mouse, and each recording uses the setting captured when the button was pressed. If you switch pages or conversations during recording, the result still goes to the captured conversation. If conversation creation or insertion fails, the overlay keeps the result available to copy; on Windows it also shows a one-click submit button — open the target input and click it to type the text into the focused field.
86
80
 
87
- AI 键仅作用于 DeepSeek Harness,沿用当前鼠标的识别语言与标点配置。识别结果追加到已有草稿末尾;“自动发送”开启时提交完整草稿及附件,关闭时保留供手动发送。开关按设备保存,录音使用按下时的设置;录音期间切换页面或对话,完成后仍回到本次目标对话并填充。唤起、创建或填充失败时,浮层保留结果供复制。宿主和插件须已运行,完全退出后不可用。
81
+ ### Search and Open Link
88
82
 
89
- 使用语音搜索时,在设置中选择百度、Bing 或 Google。使用一键链接时,先填写网址并点击“确认”;`https://` 或 `http://` 可省略,保存和打开时保留原地址。搜索和打开链接无需先选中对话输入框。
83
+ Voice search uses the current mouse's recognition language and selected search engine. For **Open Link (一键链接)**, enter a URL and click **Confirm (确认)**; you can omit `https://` or `http://`. Searching and opening links do not require a focused input field. Non-voice M button actions run when you release the button.
90
84
 
91
- 多台鼠标可同时连接、分别设置,但同一时间只能进行一次语音操作。
85
+ ### Screenshots
92
86
 
93
- ## 常见问题
87
+ Press the mouse capture button or click **Start Screenshot (开始截图)** at the bottom of **Sonicloud Devices (声云设备)**, then select a region in the separate capture UI. The capture process is bundled. The UI button also works without a connected mouse. Repeated triggers while capturing report that a capture is already in progress. Press `Esc` to leave region selection. Disabling the plugin or quitting Harness closes the capture process and pinned image windows.
94
88
 
95
- ### 接收器已插入但没有设备
89
+ On macOS, complete [first-time permissions](#first-time-permissions-on-macos) before taking a screenshot. Cloud service integration for OCR, image translation, and Word export is outside this integration.
96
90
 
97
- 先确认鼠标已开机、切到 2.4G 模式并已唤醒。如果正在运行 ClawMouse 等鼠标管理软件,请完全退出后再试,它们可能占用连接。普通光标能够移动,并不代表语音功能已经连接成功。
91
+ ## Update or uninstall
98
92
 
99
- Mac 上请留意“声云设备”中的占用提示。若显示“已检测到 2.4G 接收器,正在等待鼠标响应”,请再次检查鼠标的电源和连接模式。
93
+ Find the Sonicloud smart mouse plugin under **Plugins → Installed (插件 → 已安装)** in Harness.
100
94
 
101
- ### 语音或翻译失败
95
+ - **Update**: Select **Update (更新)** from the plugin's actions menu and follow the confirmation prompts.
96
+ - **Uninstall**: Select **Uninstall (卸载)** from the plugin's actions menu and follow the confirmation prompts.
102
97
 
103
- 先确认鼠标身份已识别、网络可用,翻译源语言和目标语言不同。鉴权失效会自动重试一次,仍失败时弹出提示;翻译失败可复制识别原文。
98
+ ## Troubleshooting
104
99
 
105
- ### 设置或按键没有生效
100
+ ### Receiver connected but no device appears
106
101
 
107
- - DPI 提示应用失败时,重新选择后重试。
108
- - Mac 上的回车、后退等系统按键动作可能需要为 Harness 授予辅助功能权限。
109
- - 如果提示原语言选项已不再支持,请重新选择语言。
102
+ Make sure the mouse is powered on, in 2.4 GHz mode, and awake. Quit other mouse management apps, such as ClawMouse, which may hold the connection. Normal cursor movement does not mean the voice connection is working.
110
103
 
111
- ### 如何更新或卸载
104
+ On a Mac, check Sonicloud Devices for connection ownership warnings. If it reports that the receiver was detected and is waiting for the mouse to respond, check the mouse's power and connection mode again.
112
105
 
113
- 更新时,完全退出 Harness,用安装命令安装新版本的 `.tgz` 文件,再重新启动。
106
+ ### Voice recognition or translation fails
114
107
 
115
- 卸载时,完全退出 Harness 后执行:
108
+ Make sure the mouse has been recognized, the network is available, and the translation source and target languages differ. Authentication failures trigger one automatic retry, with a message if it still fails. Results that cannot be inserted automatically remain available to copy from the overlay.
116
109
 
117
- ```sh
118
- dsh plugin --profile desktop remove @sonicloud/dsh-sonicloud-device
119
- ```
110
+ ### Settings or buttons do not take effect
120
111
 
121
- Mac 如果找不到 `dsh`,使用安装步骤中的完整命令路径。
112
+ - If applying DPI fails, select the value again to retry.
113
+ - On a Mac, system key actions such as Enter and Backspace may require Accessibility permission for Harness.
114
+ - If a saved language is no longer supported, select another language.
115
+ - Open Link changes take effect only after you click **Confirm**.
122
116
 
123
- ## 联系方式
117
+ ### Does Harness need to stay open?
124
118
 
125
- 如需商务合作、技术支持或购买鼠标硬件,欢迎通过以下方式联系我们:
119
+ Harness and the plugin must remain running. Minimizing or hiding the main window does not interrupt voice processing, but quitting Harness completely stops mouse voice features. The AI button cannot launch Harness after it has quit.
126
120
 
127
- - 邮箱:[xu_heng_yu@sinicloud.com](mailto:xu_heng_yu@sinicloud.com)
128
- - 微信:扫描下方二维码联系。
121
+ ## Contact
129
122
 
130
- <img src="src/client/assets/contact-wechat.jpg" alt="商务合作、技术支持与鼠标硬件购买微信联系二维码" width="300" />
123
+ For business partnerships, technical support, or mouse hardware purchases:
131
124
 
132
- ## 参与贡献
125
+ - Email: [xu_heng_yu@sinicloud.com](mailto:xu_heng_yu@sinicloud.com)
126
+ - WeChat: Scan the QR code below.
133
127
 
134
- 想修改插件或贡献代码,请阅读[本地开发与代码贡献指南](docs/contributing/development.md),了解环境准备、调试、测试和提交流程。
128
+ <img src="docs/images/contact-wechat.jpg" alt="WeChat contact QR code for business partnerships, technical support, and mouse hardware purchases" width="300" />
135
129
 
136
- 版本变更见[更新日志](CHANGELOG.zh.md)。
130
+ ## More information
137
131
 
138
- ## 许可
132
+ - [Changelog](CHANGELOG.md)
133
+ - [Development and contribution guide](docs/contributing/development.md) (in Chinese)
139
134
 
140
- 项目代码使用 [MIT 许可](LICENSE)。随包原生 SDK 和第三方库保留各自许可,见 [组件声明](native/THIRD_PARTY_LICENSES.txt)。
135
+ Project code is licensed under the [MIT License](LICENSE). Bundled native SDKs and third-party libraries retain their own licenses; see the [component notices](native/THIRD_PARTY_LICENSES.txt).
package/README.zh.md ADDED
@@ -0,0 +1,135 @@
1
+ # 声云智能鼠标插件
2
+
3
+ <p align="center"><a href="README.md">English</a> | 简体中文</p>
4
+
5
+ 用声云智能鼠标在桌面应用中语音打字、翻译和搜索,也可以直接向 DeepSeek Harness 的 AI 对话输入文字。在“声云设备”中,可为每台鼠标分别设置语言、按键和灵敏度。
6
+
7
+ **购买声云鼠标硬件,即可免费使用语音识别和语音翻译功能。**
8
+
9
+ ## 使用前准备
10
+
11
+ - DeepSeek Harness **0.2.1-rc.5 或更高版本**。
12
+ - 支持本插件的声云智能鼠标,通过蓝牙或 2.4G USB 接收器连接。
13
+ - 可访问语音服务的网络。
14
+
15
+ 支持 Apple 芯片 Mac 和 Windows x64。插件会自动识别鼠标并接入服务,无需填写鉴权信息。
16
+
17
+ ## 安装与启用
18
+
19
+ 1. 打开 DeepSeek Harness,进入左侧的**插件**页面。
20
+ 2. 点击右上角的**添加插件**。
21
+ 3. 输入 **@sonicloud/dsh-sonicloud-device**,点击**安装**。
22
+ 4. 安装完成后启用插件,打开**设置 → 声云设备**,即可查看和配置鼠标。
23
+
24
+ macOS 首次启用或重新连接插件时会检查打字和截图权限,并在“声云设备”中保留授权引导;操作见[首次授权](#macos-首次授权)。
25
+
26
+ ![在 Harness 插件页面点击“添加插件”,输入 @sonicloud/dsh-sonicloud-device 后安装](docs/images/plugin-install.png)
27
+
28
+ ## 你可以做什么
29
+
30
+ | 功能 | 使用方式 |
31
+ | --- | --- |
32
+ | 语音打字 | 将语音键或 M 键设为“语音打字”,按住说话,松开后将文字填入当前应用的输入框,不自动发送 |
33
+ | 语音翻译 | 选择源语言和目标语言,将语音键或 M 键设为“语音翻译”,按住说话,松开后填入译文 |
34
+ | 语音搜索 | 将 M 键设为“语音搜索”,选择百度、Bing 或 Google,说出关键词后松开即可搜索 |
35
+ | AI 对话 | 按住 AI 键说话,松开后填入 Harness 对话;“自动发送”默认开启,可在设置中关闭 |
36
+ | 截图 | 按鼠标截图键,或在“声云设备”中点击“开始截图”,框选后标注、复制、保存、贴图或滚动截图 |
37
+ | 自定义按键与灵敏度 | 为 M 键选择回车、后退或一键链接等动作,并调整鼠标 DPI |
38
+ | 多设备管理 | 查看每台鼠标的连接方式、电量和序列号,分别保存语言、按键和灵敏度设置 |
39
+
40
+ 在**设置 → 声云设备**中集中管理这些选项。修改后自动保存;“恢复默认”只重置当前鼠标,重新连接后会恢复已保存的设置。左侧导航栏默认显示**声云设备**面板,提供同样的设备管理界面;可通过「声云设备」标题行的“侧边栏”开关手动隐藏或恢复,隐藏面板不影响设置页功能。
41
+
42
+ ![声云设备设置页:查看鼠标信息并设置语音打字、翻译和 DPI](docs/images/sonicloud-device.png)
43
+
44
+ ## 开始使用
45
+
46
+ ### macOS 首次授权
47
+
48
+ 安装后启用插件,打开**声云设备**,按需要为以下组件授权:
49
+
50
+ | 组件 | 权限与用途 |
51
+ | --- | --- |
52
+ | Sonicloud Voice | 辅助功能:将识别文字自动填入桌面应用;未授权仍可识别并复制文字 |
53
+ | screenhelper | 屏幕录制:截图必需;未授权时不会显示截图蒙层 |
54
+ | screenhelper | 辅助功能:自动滚动可选,普通截图和手动滚动不受影响 |
55
+
56
+ 点击对应的**授权**按钮后,由该组件向系统申请权限;在系统弹窗或**系统设置 → 隐私与安全性**中手动确认,再点击**已授权,重新检查**。找不到组件时,可展开页面中的组件位置,按路径手动添加。插件只检查和引导,不会自动确认系统授权。
57
+
58
+ Sonicloud Voice 已改用 Developer ID 签名。若旧版本已勾选,但插件仍显示待授权,请按系统提示重新授权并重启 Harness,再重新检查。
59
+
60
+ ### 语音输入与翻译
61
+
62
+ 1. 打开鼠标电源,选择蓝牙或 2.4G 模式并完成连接。
63
+ 2. 在“声云设备”中设置按键动作和语言;翻译时选择不同的源语言和目标语言。
64
+ 3. 在目标应用的可编辑输入框中放置光标,按住对应按键说话。
65
+ 4. 松开按键,等待文字或译文填入,检查后自行发送。
66
+
67
+ 录音来自鼠标。识别文字和处理状态显示在屏幕底部的独立浮层,不抢占输入焦点。点击浮层叉号或断开鼠标可取消。多台鼠标可以同时连接,但同一时间只能进行一次语音操作。
68
+
69
+ 录音期间请保持目标窗口、文档和输入位置,不进行键盘编辑、鼠标点击或滚动。目标发生变化或应用不支持自动填入时,浮层会保留结果供复制;翻译失败时可复制识别原文。
70
+
71
+ macOS 自动填入所需权限见[首次授权](#macos-首次授权)。填入文字时会临时使用剪贴板,随后恢复原内容,并保留期间新复制的内容。
72
+
73
+ Windows 通过 typer 标准注入库逐字打字:说话期间文字实时填入当前焦点输入框并自动更正,全程不占用剪贴板;翻译在译文就绪后逐字打出。目标为密码框或注入被拒(如管理员窗口)时保留结果供复制。
74
+
75
+ ### 使用 AI 键
76
+
77
+ 按住 AI 键说话时,Harness 会切到前台:当前在 AI 对话页时使用该对话,否则新建对话;窗口最小化或藏到托盘时也会被重新唤出。无需先点击输入框,识别文字会追加到已有草稿末尾。
78
+
79
+ **自动发送**开启时,会提交完整草稿及附件;关闭时只填入文字,供你检查后手动发送。开关按鼠标分别保存,每次录音使用按下时的设置。录音期间切换页面或对话,完成后仍填入本次目标对话;无法创建或填入时,结果保留在浮层供复制,Windows 上还会显示“一键提交”按钮——打开目标输入界面后点击,文字即逐字打进当前焦点所在的输入框。
80
+
81
+ ### 搜索与一键链接
82
+
83
+ 语音搜索使用当前鼠标的识别语言和所选搜索引擎。使用一键链接时,先填写网址并点击**确认**;可以省略 `https://` 或 `http://`。搜索和打开链接无需先选中输入框,非语音的 M 键动作在松键时执行。
84
+
85
+ ### 截图
86
+
87
+ 按鼠标截图键,或点击**声云设备**页面底部的**开始截图**,在独立截图界面中选择区域后操作。截图进程随插件提供,界面按钮无需连接鼠标。截图期间重复触发会提示正在进行,按 `Esc` 可退出选区。插件禁用或 Harness 退出时,截图进程和贴图窗口一并关闭。
88
+
89
+ macOS 请先完成[首次授权](#macos-首次授权),再开始截图。OCR、图片翻译和 Word 导出所需的云服务接入不包含在本次集成中。
90
+
91
+ ## 更新与卸载
92
+
93
+ 在 Harness 的**插件 → 已安装**中找到声云智能鼠标插件。
94
+
95
+ - **更新**:在插件的操作菜单中选择**更新**,按界面提示确认。
96
+ - **卸载**:在插件的操作菜单中选择**卸载**,按界面提示确认。
97
+
98
+ ## 常见问题
99
+
100
+ ### 接收器已插入但没有设备
101
+
102
+ 确认鼠标已开机、切到 2.4G 模式并已唤醒。若正在运行 ClawMouse 等鼠标管理软件,请完全退出后重试,它们可能占用连接。普通光标能够移动,不代表语音功能已连接。
103
+
104
+ Mac 上可查看“声云设备”中的占用提示。若提示已检测到接收器、正在等待鼠标响应,请再次检查鼠标电源和连接模式。
105
+
106
+ ### 语音或翻译失败
107
+
108
+ 确认鼠标已被识别、网络可用,且翻译源语言和目标语言不同。鉴权失效时会自动重试一次,仍失败时显示提示。无法自动填入的结果可从浮层复制。
109
+
110
+ ### 设置或按键没有生效
111
+
112
+ - DPI 应用失败时,重新选择后重试。
113
+ - Mac 上的回车、后退等系统按键动作可能需要为 Harness 授予辅助功能权限。
114
+ - 提示原语言不再支持时,请重新选择语言。
115
+ - 一键链接需要点击**确认**后才生效。
116
+
117
+ ### Harness 需要一直打开吗?
118
+
119
+ 需要保持 Harness 和插件运行。主窗口最小化或隐藏不影响语音处理,但完全退出 Harness 后无法使用鼠标语音功能,AI 键也不能启动已退出的宿主。
120
+
121
+ ## 联系方式
122
+
123
+ 商务合作、技术支持或购买鼠标硬件,请通过以下方式联系我们:
124
+
125
+ - 邮箱:[xu_heng_yu@sinicloud.com](mailto:xu_heng_yu@sinicloud.com)
126
+ - 微信:扫描下方二维码。
127
+
128
+ <img src="docs/images/contact-wechat.jpg" alt="商务合作、技术支持与鼠标硬件购买微信联系二维码" width="300" />
129
+
130
+ ## 更多信息
131
+
132
+ - [更新日志](CHANGELOG.zh.md)
133
+ - [开发与贡献指南](docs/contributing/development.md)
134
+
135
+ 项目代码使用 [MIT 许可](LICENSE)。随包原生 SDK 和第三方库保留各自许可,见[组件声明](native/THIRD_PARTY_LICENSES.txt)。
package/dist/build.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "plugin": "dsh-sonicloud-device",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "harness": "0.2.1-rc.5"
5
5
  }