@sususgh/gamer-dsh-plugin 1.0.2 → 1.0.4
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 +20 -1
- package/desktop-runtime/engine/safety-gate.js +51 -0
- package/desktop-runtime/server.js +1 -1
- package/desktop-ui/app.js +68 -35
- package/dsh/client.js +7 -2
- package/dsh/index.js +94 -31
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -19,10 +19,29 @@ 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
|
|
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
23
|
|
|
24
24
|
---
|
|
25
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
|
|
40
|
+
|
|
41
|
+
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
|
+
|
|
43
|
+
This confirms model-registry discovery, not phone gameplay. The active conversation model can call Gamer tools because they are registered through `ctx.tools`; however, authenticated Android transport, screen capture, vision inference, and device input adapters must all be implemented and validated before the model can actually play a phone game. The plugin must report those capabilities as unavailable until they pass runtime checks.
|
|
44
|
+
|
|
26
45
|
## 1. What the project does
|
|
27
46
|
|
|
28
47
|
Gamer is designed to let an AI agent play supported games through a closed feedback loop:
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
const ACTIONS = new Set(['tap', 'swipe', 'key', 'wait']);
|
|
2
|
+
|
|
3
|
+
export class SafetyGate {
|
|
4
|
+
#stopped = true;
|
|
5
|
+
#paired = false;
|
|
6
|
+
#permissions = new Set();
|
|
7
|
+
|
|
8
|
+
setPaired(value) { this.#paired = value === true; }
|
|
9
|
+
grant(permission) { this.#permissions.add(permission); }
|
|
10
|
+
revoke(permission) { this.#permissions.delete(permission); }
|
|
11
|
+
stop() { this.#stopped = true; }
|
|
12
|
+
arm() {
|
|
13
|
+
if (!this.#paired) throw new Error('DEVICE_NOT_PAIRED');
|
|
14
|
+
if (!this.#permissions.has('input')) throw new Error('INPUT_PERMISSION_REQUIRED');
|
|
15
|
+
this.#stopped = false;
|
|
16
|
+
}
|
|
17
|
+
get stopped() { return this.#stopped; }
|
|
18
|
+
|
|
19
|
+
validate(action) {
|
|
20
|
+
if (this.#stopped) throw new Error('AGENT_STOPPED');
|
|
21
|
+
if (!this.#paired) throw new Error('DEVICE_NOT_PAIRED');
|
|
22
|
+
if (!action || typeof action !== 'object' || !ACTIONS.has(action.type)) {
|
|
23
|
+
throw new Error('ACTION_TYPE_NOT_ALLOWED');
|
|
24
|
+
}
|
|
25
|
+
if (action.type === 'tap') {
|
|
26
|
+
for (const key of ['x', 'y']) {
|
|
27
|
+
if (!Number.isFinite(action[key]) || action[key] < 0 || action[key] > 1) {
|
|
28
|
+
throw new Error('INVALID_NORMALIZED_COORDINATE');
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
} else if (action.type === 'swipe') {
|
|
32
|
+
for (const key of ['x1', 'y1', 'x2', 'y2']) {
|
|
33
|
+
if (!Number.isFinite(action[key]) || action[key] < 0 || action[key] > 1) {
|
|
34
|
+
throw new Error('INVALID_NORMALIZED_COORDINATE');
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
if (!Number.isInteger(action.durationMs) || action.durationMs < 50 || action.durationMs > 3000) {
|
|
38
|
+
throw new Error('INVALID_ACTION_DURATION');
|
|
39
|
+
}
|
|
40
|
+
} else if (action.type === 'key') {
|
|
41
|
+
if (typeof action.key !== 'string' || !/^[A-Z0-9_]{1,24}$/.test(action.key)) {
|
|
42
|
+
throw new Error('INVALID_KEY');
|
|
43
|
+
}
|
|
44
|
+
} else if (action.type === 'wait') {
|
|
45
|
+
if (!Number.isInteger(action.durationMs) || action.durationMs < 0 || action.durationMs > 5000) {
|
|
46
|
+
throw new Error('INVALID_ACTION_DURATION');
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return Object.freeze({ ...action });
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -173,7 +173,7 @@ async function handle(req, res) {
|
|
|
173
173
|
if (url.pathname === '/pair' && req.method === 'GET') {
|
|
174
174
|
const valid = url.searchParams.get('protocol') === 'gamer-runtime/1'
|
|
175
175
|
&& url.searchParams.get('instance_id') === manager.instanceId
|
|
176
|
-
&& manager.verify(url.searchParams.get('token'));
|
|
176
|
+
&& manager.verify(url.searchParams.get('token'), { consume: true });
|
|
177
177
|
res.writeHead(valid ? 200 : 410, {
|
|
178
178
|
'content-type': 'text/html; charset=utf-8',
|
|
179
179
|
'cache-control': 'no-store',
|
package/desktop-ui/app.js
CHANGED
|
@@ -19,23 +19,67 @@ const pairHostSelect=$('pairHostSelect');
|
|
|
19
19
|
const pairRefresh=$('pairRefresh');
|
|
20
20
|
const pairStop=$('pairStop');
|
|
21
21
|
let pairExpiryTimer=null;
|
|
22
|
+
let pairGenerating=false;
|
|
23
|
+
let lastPairHost='';
|
|
22
24
|
|
|
23
25
|
function setPairState(text){$('pairState').textContent=text;}
|
|
24
26
|
function clearPairQr(){
|
|
25
27
|
if(pairQrImage){pairQrImage.hidden=true;pairQrImage.removeAttribute('src');}
|
|
26
28
|
if(pairQrEmpty)pairQrEmpty.hidden=false;
|
|
27
|
-
$('pairQrCaption').textContent='
|
|
29
|
+
$('pairQrCaption').textContent='正在等待自动生成…';
|
|
28
30
|
$('pairExpires').textContent='5 分钟 · 未生成';
|
|
29
31
|
if(pairStop)pairStop.disabled=true;
|
|
30
32
|
if(pairExpiryTimer){clearInterval(pairExpiryTimer);pairExpiryTimer=null;}
|
|
31
33
|
}
|
|
32
|
-
async function
|
|
34
|
+
async function generatePairQr({automatic=false}={}){
|
|
35
|
+
if(pairGenerating||!pairHostSelect?.value)return;
|
|
36
|
+
pairGenerating=true;
|
|
37
|
+
try{
|
|
38
|
+
pairRefresh.disabled=true;
|
|
39
|
+
setPairState(automatic?'正在自动生成安全二维码…':'正在生成安全二维码…');
|
|
40
|
+
const response=await fetch('/api/pairing/start',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({host:pairHostSelect.value}),cache:'no-store'});
|
|
41
|
+
const data=await response.json();
|
|
42
|
+
if(!response.ok)throw new Error(data.error||'HTTP '+response.status);
|
|
43
|
+
if(!data.qrDataUrl||!Number.isFinite(data.expiresAt))throw new Error('二维码服务返回数据不完整');
|
|
44
|
+
pairQrImage.src=data.qrDataUrl;pairQrImage.hidden=false;pairQrEmpty.hidden=true;
|
|
45
|
+
$('pairQrCaption').textContent='真实二维码 · 手机扫码';
|
|
46
|
+
$('pairHost').textContent=data.host+':'+data.port;
|
|
47
|
+
$('pairExpires').textContent='05:00';
|
|
48
|
+
setPairState('二维码已自动生成 · 等待手机扫码');
|
|
49
|
+
pairStop.disabled=false;
|
|
50
|
+
if(pairExpiryTimer)clearInterval(pairExpiryTimer);
|
|
51
|
+
const expiresAt=data.expiresAt;
|
|
52
|
+
pairExpiryTimer=setInterval(()=>{
|
|
53
|
+
const remaining=Math.max(0,expiresAt-Date.now());
|
|
54
|
+
const mm=String(Math.floor(remaining/60000)).padStart(2,'0');
|
|
55
|
+
const ss=String(Math.floor((remaining%60000)/1000)).padStart(2,'0');
|
|
56
|
+
$('pairExpires').textContent=mm+':'+ss;
|
|
57
|
+
if(remaining<=0){
|
|
58
|
+
clearInterval(pairExpiryTimer);pairExpiryTimer=null;clearPairQr();
|
|
59
|
+
setPairState('二维码已过期,正在自动刷新…');
|
|
60
|
+
log('配对二维码已过期,正在自动生成新二维码。');
|
|
61
|
+
setTimeout(()=>generatePairQr({automatic:true}),1200);
|
|
62
|
+
}
|
|
63
|
+
},250);
|
|
64
|
+
log((automatic?'自动':'手动')+'生成电脑端安全二维码:'+data.host+':'+data.port+',有效期 5 分钟。');
|
|
65
|
+
}catch(error){
|
|
66
|
+
setPairState('生成失败:'+error.message);
|
|
67
|
+
$('pairQrCaption').textContent='生成失败,请点击重新生成';
|
|
68
|
+
log('二维码生成失败:'+error.message);
|
|
69
|
+
}finally{
|
|
70
|
+
pairGenerating=false;
|
|
71
|
+
pairRefresh.disabled=!pairHostSelect?.value;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
async function loadPairNetworks({autoGenerate=false}={}){
|
|
33
75
|
try{
|
|
34
76
|
const response=await fetch('/api/network/interfaces',{cache:'no-store'});
|
|
35
77
|
if(!response.ok)throw new Error('HTTP '+response.status);
|
|
36
78
|
const data=await response.json();
|
|
79
|
+
const addresses=data.addresses||[];
|
|
80
|
+
const previous=pairHostSelect.value;
|
|
37
81
|
pairHostSelect.replaceChildren();
|
|
38
|
-
for(const item of
|
|
82
|
+
for(const item of addresses){
|
|
39
83
|
const option=document.createElement('option');
|
|
40
84
|
option.value=item.address;option.textContent=item.name+' · '+item.address;
|
|
41
85
|
pairHostSelect.append(option);
|
|
@@ -45,10 +89,18 @@ async function loadPairNetworks(){
|
|
|
45
89
|
$('pairHost').textContent='未发现局域网地址';
|
|
46
90
|
setPairState('请连接 Wi-Fi 或检查网络');
|
|
47
91
|
pairRefresh.disabled=true;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
if(addresses.some(item=>item.address===previous))pairHostSelect.value=previous;
|
|
95
|
+
const host=pairHostSelect.value;
|
|
96
|
+
$('pairHost').textContent=host;
|
|
97
|
+
pairRefresh.disabled=false;
|
|
98
|
+
if(autoGenerate||host!==lastPairHost){
|
|
99
|
+
lastPairHost=host;
|
|
100
|
+
await generatePairQr({automatic:true});
|
|
101
|
+
}else if(!pairQrImage.src||pairQrImage.hidden){
|
|
102
|
+
setPairState('配对服务已就绪,正在自动生成二维码…');
|
|
103
|
+
await generatePairQr({automatic:true});
|
|
52
104
|
}
|
|
53
105
|
}catch(error){
|
|
54
106
|
pairHostSelect.replaceChildren();
|
|
@@ -58,41 +110,22 @@ async function loadPairNetworks(){
|
|
|
58
110
|
log('无法连接桌面配对服务:'+error.message+'。请勿直接双击 index.html。');
|
|
59
111
|
}
|
|
60
112
|
}
|
|
61
|
-
pairHostSelect?.addEventListener('change',()=>{
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
const response=await fetch('/api/pairing/start',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({host:pairHostSelect.value})});
|
|
66
|
-
const data=await response.json();
|
|
67
|
-
if(!response.ok)throw new Error(data.error||'HTTP '+response.status);
|
|
68
|
-
pairQrImage.src=data.qrDataUrl;pairQrImage.hidden=false;pairQrEmpty.hidden=true;
|
|
69
|
-
$('pairQrCaption').textContent='真实二维码 · 手机扫码';
|
|
70
|
-
$('pairHost').textContent=data.host+':'+data.port;
|
|
71
|
-
$('pairExpires').textContent='05:00';
|
|
72
|
-
setPairState('二维码已生成 · 等待手机扫码');
|
|
73
|
-
pairStop.disabled=false;
|
|
74
|
-
if(pairExpiryTimer)clearInterval(pairExpiryTimer);
|
|
75
|
-
const expiresAt=data.expiresAt;
|
|
76
|
-
pairExpiryTimer=setInterval(()=>{
|
|
77
|
-
const remaining=Math.max(0,expiresAt-Date.now());
|
|
78
|
-
const mm=String(Math.floor(remaining/60000)).padStart(2,'0');
|
|
79
|
-
const ss=String(Math.floor((remaining%60000)/1000)).padStart(2,'0');
|
|
80
|
-
$('pairExpires').textContent=mm+':'+ss;
|
|
81
|
-
if(remaining<=0){clearInterval(pairExpiryTimer);pairExpiryTimer=null;clearPairQr();setPairState('二维码已过期,请重新生成');log('手机配对二维码已过期。');}
|
|
82
|
-
},250);
|
|
83
|
-
log('电脑端已生成真实配对二维码:'+data.host+':'+data.port+',有效期 5 分钟。');
|
|
84
|
-
}catch(error){
|
|
85
|
-
setPairState('生成失败:'+error.message);log('二维码生成失败:'+error.message);
|
|
86
|
-
}finally{pairRefresh.disabled=!pairHostSelect.value;}
|
|
113
|
+
pairHostSelect?.addEventListener('change',()=>{
|
|
114
|
+
$('pairHost').textContent=pairHostSelect.value||'未选择';
|
|
115
|
+
lastPairHost=pairHostSelect.value;
|
|
116
|
+
generatePairQr({automatic:true});
|
|
87
117
|
});
|
|
118
|
+
pairRefresh?.addEventListener('click',()=>generatePairQr());
|
|
88
119
|
pairStop?.addEventListener('click',async()=>{
|
|
89
120
|
try{
|
|
90
|
-
const response=await fetch('/api/pairing/stop',{method:'POST'});
|
|
121
|
+
const response=await fetch('/api/pairing/stop',{method:'POST',cache:'no-store'});
|
|
91
122
|
if(!response.ok)throw new Error('HTTP '+response.status);
|
|
92
123
|
clearPairQr();setPairState('二维码已撤销');log('电脑端配对二维码已撤销。');
|
|
93
124
|
}catch(error){setPairState('撤销失败:'+error.message);log('撤销二维码失败:'+error.message);}
|
|
94
125
|
});
|
|
95
|
-
loadPairNetworks();
|
|
126
|
+
loadPairNetworks({autoGenerate:true});
|
|
127
|
+
window.addEventListener('online',()=>loadPairNetworks({autoGenerate:true}));
|
|
128
|
+
setInterval(()=>loadPairNetworks(),30000);
|
|
96
129
|
|
|
97
130
|
|
|
98
131
|
$('visionTestBtn')?.addEventListener('click',()=>{log('视觉自检请求已记录;当前仓库尚未接入帧采集、OCR 或目标检测运行时。');$('visionEngineState').textContent='运行时未接入';});
|
package/dsh/client.js
CHANGED
|
@@ -116,8 +116,13 @@ window.__ModuleLoader__.load({
|
|
|
116
116
|
}, [qr, remaining > 0]);
|
|
117
117
|
|
|
118
118
|
React.useEffect(() => {
|
|
119
|
-
if (qr && remaining === 0) {
|
|
120
|
-
|
|
119
|
+
if (qr && remaining === 0) {
|
|
120
|
+
setQr('');
|
|
121
|
+
setPairState('二维码已过期,正在自动刷新…');
|
|
122
|
+
const address = host.split(':')[0];
|
|
123
|
+
if (address) generateQr(address);
|
|
124
|
+
}
|
|
125
|
+
}, [remaining, qr, host, generateQr]);
|
|
121
126
|
|
|
122
127
|
const revoke = async () => {
|
|
123
128
|
try {
|
package/dsh/index.js
CHANGED
|
@@ -1,54 +1,118 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Gamer DSH Plugin — native
|
|
2
|
+
* Gamer DSH Plugin — model-aware native Harness integration.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* paired by this plugin yet.
|
|
4
|
+
* The plugin reads the registered DSH model routes through ctx.llm and exposes
|
|
5
|
+
* that inventory as a model-callable tool. It does not claim gameplay control
|
|
6
|
+
* until an authenticated desktop/Android runtime is connected.
|
|
8
7
|
*/
|
|
9
|
-
|
|
10
8
|
export const name = 'gamer-dsh-plugin';
|
|
11
|
-
export const inject = ['tools'];
|
|
9
|
+
export const inject = ['tools', 'llm'];
|
|
12
10
|
|
|
13
|
-
const
|
|
11
|
+
const EMPTY_SCHEMA = {
|
|
14
12
|
type: 'object',
|
|
15
13
|
properties: {},
|
|
16
14
|
additionalProperties: false,
|
|
17
15
|
};
|
|
18
16
|
|
|
19
|
-
|
|
17
|
+
const JSON_OUTPUT = {
|
|
18
|
+
schema: {
|
|
19
|
+
type: 'object',
|
|
20
|
+
properties: {
|
|
21
|
+
status: { type: 'string' },
|
|
22
|
+
providers: { type: 'array', items: { type: 'object' } },
|
|
23
|
+
count: { type: 'integer' },
|
|
24
|
+
message: { type: 'string' },
|
|
25
|
+
},
|
|
26
|
+
required: ['status', 'providers', 'count', 'message'],
|
|
27
|
+
additionalProperties: false,
|
|
28
|
+
},
|
|
29
|
+
render: (_args, value) => [{
|
|
30
|
+
type: 'text',
|
|
31
|
+
text: JSON.stringify(value, null, 2),
|
|
32
|
+
}],
|
|
33
|
+
presentationMeta: () => ({}),
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
function register(ctx, definition) {
|
|
20
37
|
if (typeof ctx?.tools?.register !== 'function') {
|
|
21
|
-
|
|
38
|
+
throw new Error('DSH_TOOLS_SERVICE_UNAVAILABLE');
|
|
39
|
+
}
|
|
40
|
+
ctx.tools.register(definition);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function apply(ctx) {
|
|
44
|
+
if (!ctx?.llm || typeof ctx.llm.listProviders !== 'function'
|
|
45
|
+
|| typeof ctx.llm.listModels !== 'function') {
|
|
46
|
+
console.error('[gamer-dsh-plugin] DSH llm service unavailable; model discovery tool was not registered.');
|
|
22
47
|
return;
|
|
23
48
|
}
|
|
24
49
|
|
|
25
|
-
|
|
50
|
+
register(ctx, {
|
|
51
|
+
name: 'gamer_list_ai_models',
|
|
52
|
+
description:
|
|
53
|
+
'List AI model providers and models currently registered in this DeepSeek Harness instance. Use this before selecting a model for Gamer gameplay. This reads the Harness model registry; it does not expose API keys or secrets.',
|
|
54
|
+
parameters: EMPTY_SCHEMA,
|
|
55
|
+
output: JSON_OUTPUT,
|
|
56
|
+
async execute() {
|
|
57
|
+
const providers = await ctx.llm.listProviders();
|
|
58
|
+
const inventory = await Promise.all(providers.map(async provider => {
|
|
59
|
+
try {
|
|
60
|
+
const models = await ctx.llm.listModels(provider.id);
|
|
61
|
+
return {
|
|
62
|
+
provider: provider.id,
|
|
63
|
+
providerName: provider.name,
|
|
64
|
+
models: models.map(model => ({
|
|
65
|
+
id: model.id,
|
|
66
|
+
name: model.name ?? model.id,
|
|
67
|
+
...(model.contextWindow ? { contextWindow: model.contextWindow } : {}),
|
|
68
|
+
})),
|
|
69
|
+
available: true,
|
|
70
|
+
};
|
|
71
|
+
} catch (error) {
|
|
72
|
+
return {
|
|
73
|
+
provider: provider.id,
|
|
74
|
+
providerName: provider.name,
|
|
75
|
+
models: [],
|
|
76
|
+
available: false,
|
|
77
|
+
error: error?.message || 'MODEL_DISCOVERY_FAILED',
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
}));
|
|
81
|
+
const count = inventory.reduce((sum, item) => sum + item.models.length, 0);
|
|
82
|
+
return {
|
|
83
|
+
status: inventory.length ? 'providers_found' : 'no_provider_registered',
|
|
84
|
+
providers: inventory,
|
|
85
|
+
count,
|
|
86
|
+
message: inventory.length
|
|
87
|
+
? 'Model registry read from DSH. The model calling this tool remains the active conversation model; API credentials were not returned.'
|
|
88
|
+
: 'No active LLM provider adapter is registered in DSH. Configure and enable a provider before starting Gamer.',
|
|
89
|
+
};
|
|
90
|
+
},
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
register(ctx, {
|
|
26
94
|
name: 'gamer_project_status',
|
|
27
95
|
description:
|
|
28
|
-
'Return
|
|
29
|
-
parameters:
|
|
96
|
+
'Return verified Gamer runtime status. Distinguish model discovery from an authenticated Android connection and real gameplay control.',
|
|
97
|
+
parameters: EMPTY_SCHEMA,
|
|
30
98
|
output: {
|
|
31
99
|
schema: {
|
|
32
100
|
type: 'object',
|
|
33
101
|
properties: {
|
|
34
102
|
project: { type: 'string' },
|
|
35
103
|
version: { type: 'string' },
|
|
36
|
-
|
|
37
|
-
pluginLoaded: { type: 'boolean' },
|
|
38
|
-
desktopUi: { type: 'string' },
|
|
104
|
+
modelDiscovery: { type: 'string' },
|
|
39
105
|
androidCompanion: { type: 'string' },
|
|
40
106
|
visionRuntime: { type: 'string' },
|
|
41
107
|
gameControlRuntime: { type: 'string' },
|
|
42
|
-
qrPairing: { type: 'string' },
|
|
43
108
|
canControlGames: { type: 'boolean' },
|
|
44
109
|
nextStep: { type: 'string' },
|
|
45
110
|
repository: { type: 'string' },
|
|
46
|
-
release: { type: 'string' },
|
|
47
111
|
},
|
|
48
112
|
required: [
|
|
49
|
-
'project', 'version', '
|
|
50
|
-
'
|
|
51
|
-
'
|
|
113
|
+
'project', 'version', 'modelDiscovery', 'androidCompanion',
|
|
114
|
+
'visionRuntime', 'gameControlRuntime', 'canControlGames',
|
|
115
|
+
'nextStep', 'repository',
|
|
52
116
|
],
|
|
53
117
|
additionalProperties: false,
|
|
54
118
|
},
|
|
@@ -59,21 +123,20 @@ export function apply(ctx) {
|
|
|
59
123
|
presentationMeta: () => ({}),
|
|
60
124
|
},
|
|
61
125
|
async execute() {
|
|
126
|
+
const providers = await ctx.llm.listProviders();
|
|
62
127
|
return {
|
|
63
128
|
project: 'Gamer-DSH-Plugin',
|
|
64
|
-
version: '1.0.
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
androidCompanion: 'not
|
|
129
|
+
version: '1.0.2-dev',
|
|
130
|
+
modelDiscovery: providers.length
|
|
131
|
+
? providers.map(item => item.name || item.id).join(', ')
|
|
132
|
+
: 'No registered model provider',
|
|
133
|
+
androidCompanion: 'not authenticated; Android handshake not implemented',
|
|
69
134
|
visionRuntime: 'not implemented',
|
|
70
|
-
gameControlRuntime: 'not
|
|
71
|
-
qrPairing: 'not implemented',
|
|
135
|
+
gameControlRuntime: 'not connected; no game actions can be executed',
|
|
72
136
|
canControlGames: false,
|
|
73
|
-
nextStep: 'Complete
|
|
137
|
+
nextStep: 'Complete authenticated desktop-to-Android session transport, screen capture, vision inference and input adapters; run device acceptance tests.',
|
|
74
138
|
repository: 'https://github.com/sususgh/Gamer-DSH-Plugin',
|
|
75
|
-
release: 'https://github.com/sususgh/Gamer-DSH-Plugin/releases/tag/v1.0.1'
|
|
76
139
|
};
|
|
77
|
-
}
|
|
140
|
+
},
|
|
78
141
|
});
|
|
79
142
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sususgh/gamer-dsh-plugin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Native DeepSeek Harness plugin with automatic desktop QR pairing and Gamer runtime UI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"test": "node --test",
|
|
55
|
-
"check": "node --check dsh/index.js && node --check dsh/client.js && node --check desktop-runtime/pairing.js && node --check desktop-runtime/server.js && node --check desktop-ui/app.js",
|
|
55
|
+
"check": "node --check dsh/index.js && node --check dsh/client.js && node --check desktop-runtime/pairing.js && node --check desktop-runtime/server.js && node --check desktop-ui/app.js && node --check desktop-runtime/engine/safety-gate.js",
|
|
56
56
|
"desktop": "node desktop-runtime/server.js",
|
|
57
57
|
"start:desktop": "node desktop-runtime/server.js"
|
|
58
58
|
},
|