@sususgh/gamer-dsh-plugin 1.0.5 → 1.0.6

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 CHANGED
@@ -19,24 +19,51 @@ The phone is not expected to host a large language model. It can perform lightwe
19
19
  - **Desktop role:** main processing, local game control, model routing, device bridge and telemetry
20
20
  - **Android role:** mobile game runtime, screen/audio/sensor observations when permitted, touch execution and acknowledgements
21
21
 
22
- > **Project status:** This repository is being bootstrapped. The DSH plugin page now attempts to connect to the local desktop pairing service at `127.0.0.1:8765` and automatically generates a short-lived QR code when that service is running. The desktop server provides QR generation and a scan landing page; Android companion authentication is not yet implemented. Network values, model health and device status are not real until their runtime adapters are connected and tested. This README describes the intended architecture and integration contract; it does not claim that every planned feature is already implemented.
23
-
24
- ---
25
-
26
- ## Start the desktop QR pairing service
27
-
28
- Requirements: Node.js 22.13 or newer.
29
-
30
- ```bash
31
- npm install
32
- npm run desktop
33
- ```
34
-
35
- The desktop service listens on port 8765 and prints the computer's private LAN IPv4 address. Keep it running while using the DSH plugin page. The plugin page connects to `http://127.0.0.1:8765`, discovers a private LAN address and requests a fresh QR code automatically. On Windows, run the same commands in PowerShell or Command Prompt.
36
-
37
- If the browser blocks local-network access, allow the DSH application to access the local network and retry. The local API accepts browser origins from `deepseek.com` subdomains and localhost only. QR tokens expire after five minutes. Scanning the QR currently validates the one-time token and opens a landing page; it does **not** complete Android authentication or establish a connected companion session.
38
-
39
- ## DSH model registry integration
22
+ > **项目状态 / Project status:** DSH 插件页通过本机回环地址连接 Gamer 桌面配对服务。默认端口为 `8765`,可在启动脚本中自定义;插件页的“桌面服务端口”必须填写相同端口。二维码令牌有效 5 分钟。配对认证、屏幕采集、触控和游戏推理能力请以各模块实际状态为准,不会将未接入功能标记为已完成。
23
+ >
24
+ > The DSH plugin connects to the local Gamer desktop pairing service. The default port is `8765`; choose a custom port in the startup script and enter the same value in the plugin's Desktop port field. QR tokens expire after five minutes. Capabilities are reported only when their runtime adapters are implemented and tested.
25
+ >
26
+ > ---
27
+ >
28
+ > ## 启动电脑端配对服务 / Start the desktop pairing service
29
+ >
30
+ > 要求 / Requirements: Node.js 22.13 or newer.
31
+ >
32
+ > **Windows:** 双击仓库根目录的 `start-windows.bat`,按提示输入端口(直接回车使用 8765)。脚本会自动安装桌面运行时依赖并启动服务。
33
+ >
34
+ > **Linux / Debian / Ubuntu:**
35
+ >
36
+ > ```bash
37
+ > bash start-linux.sh
38
+ > ```
39
+ >
40
+ > 按提示输入端口(默认 8765)。脚本会自动安装依赖并启动服务。
41
+ >
42
+ > **手动启动 / Manual start:**
43
+ >
44
+ > ```bash
45
+ > cd desktop-runtime
46
+ > npm install
47
+ > ```
48
+ >
49
+ > Windows PowerShell:
50
+ >
51
+ > ```powershell
52
+ > $env:GAMER_PORT = "8765"
53
+ > npm start
54
+ > ```
55
+ >
56
+ > Linux:
57
+ >
58
+ > ```bash
59
+ > GAMER_PORT=8765 npm start
60
+ > ```
61
+ >
62
+ > 将 `8765` 替换为 1–65535 范围内未被占用的端口。启动后保持终端窗口运行。打开 DSH 插件页,在“桌面服务端口 / Desktop port”填写相同端口并点击“应用端口并重连”。电脑和手机需处于同一可信任局域网。
63
+ >
64
+ > 若页面显示 `Failed to fetch`,请依次检查:① 启动脚本窗口是否仍在运行;② 插件页端口与启动端口是否一致;③ 端口是否被其他程序占用或被防火墙拦截;④ DSH 是否允许本地网络访问。不要直接双击 `desktop-ui/index.html`,必须由桌面服务提供页面。不要将此 HTTP 服务或端口映射到公网。
65
+ >
66
+ > ## DSH model registry integration
40
67
 
41
68
  The plugin now injects the Harness `llm` service and registers the model-callable tool `gamer_list_ai_models`. When invoked by the active DSH model, it reads currently registered provider routes with `ctx.llm.listProviders()` and each provider's advertised models with `ctx.llm.listModels(provider)`. It returns provider/model identifiers and availability only; it never returns API keys or secret values.
42
69
 
@@ -19,26 +19,19 @@ Gamer 是 DSH 原生插件包,不是独立的 Windows EXE,也不是直接从
19
19
 
20
20
  要求:Node.js 22.13 或更高版本。电脑和手机需要连接同一个可信任的局域网。
21
21
 
22
- **Windows PowerShell:**
22
+ **Windows:** 克隆仓库后,双击根目录 `start-windows.bat`,按提示输入端口(默认 8765)。
23
23
 
24
- ```powershell
25
- git clone https://github.com/sususgh/Gamer-DSH-Plugin.git
26
- cd Gamer-DSH-Plugin\desktop-runtime
27
- npm install
28
- npm start
29
- ```
30
-
31
- **Linux(Debian / Ubuntu 等):**
24
+ **Linux(Debian / Ubuntu):**
32
25
 
33
26
  ```bash
34
27
  git clone https://github.com/sususgh/Gamer-DSH-Plugin.git
35
- cd Gamer-DSH-Plugin/desktop-runtime
36
- npm install
37
- npm start
28
+ cd Gamer-DSH-Plugin
29
+ bash start-linux.sh
38
30
  ```
39
31
 
40
- 启动后在电脑浏览器打开 `http://127.0.0.1:8765`,选择手机能够访问的电脑局域网地址,点击 **生成二维码**。二维码有效期为 5 分钟,可手动撤销。Windows 防火墙如弹出提示,只允许在可信的专用网络中访问。
32
+ 也可以手动启动:进入 `desktop-runtime`,执行 `npm install`,然后设置环境变量 `GAMER_PORT=8765` 并运行 `npm start`。端口可改为 1–65535 之间未被占用的端口。
41
33
 
34
+ 打开 DSH 插件页,在“桌面服务端口 / Desktop port”填写与启动脚本相同的端口,点击“应用端口并重连”。电脑与手机需处于同一可信任局域网。若出现 `Failed to fetch`,检查启动窗口、端口一致性、本机防火墙和 DSH 本地网络权限。Windows 防火墙只允许在可信的专用网络中访问。
42
35
  手机相机扫码后会打开电脑的配对验证页。当前阶段实现的是**电脑端真实二维码生成与扫码落地页验证**;Android Companion 尚未实现设备身份提交、双端认证和会话握手,因此扫码成功不代表设备已连接,也不能开始游戏控制。不要将该 HTTP 服务或端口映射到公网。
43
36
 
44
37
  ## 当前功能状态
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sususgh/gamer-dsh-plugin",
3
- "version": "1.0.5",
4
- "description": "Gamer 游戏智能体:PC 游戏控制中心与 Android 手机伴侣,支持本地配对服务和自定义端口。 | Gamer AI game agent for PC and Android with local QR pairing and a configurable desktop port.",
3
+ "version": "1.0.6",
4
+ "description": "Gamer 游戏智能体:PC 控制中心 + Android 手机伴侣。启动:Windows 双击 start-windows.bat;Linux 执行 bash start-linux.sh。端口可自定义。 | Gamer AI agent for PC + Android. Start: Windows start-windows.bat; Linux bash start-linux.sh. Custom port supported.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
7
7
  "author": "sususgh",