@sususgh/gamer-dsh-plugin 1.0.0 → 1.0.2
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 +7 -5
- package/desktop-runtime/package.json +17 -0
- package/desktop-runtime/pairing.js +75 -0
- package/desktop-runtime/server.js +231 -0
- package/desktop-runtime/start-linux.sh +11 -0
- package/desktop-runtime/start-windows.bat +26 -0
- package/desktop-ui/app.js +133 -0
- package/desktop-ui/index.html +141 -0
- package/desktop-ui/style.css +150 -0
- package/docs/DSH-INSTALL.zh-CN.md +32 -3
- package/docs/runtime-protocol-v1.md +266 -0
- package/dsh/client.js +175 -71
- package/dsh/index.js +35 -4
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +19 -7
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="zh-CN">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
6
|
+
<meta name="theme-color" content="#eaf3f8">
|
|
7
|
+
<title>Gamer · 派蒙星光控制中心</title>
|
|
8
|
+
<link rel="stylesheet" href="style.css">
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<div class="sky-glow"></div>
|
|
12
|
+
<header class="topbar">
|
|
13
|
+
<div class="brand"><div class="brand-mark">✧</div><div><b>GAMER</b><small>PAIMON STARLIGHT CONTROL</small></div></div>
|
|
14
|
+
<div class="top-status"><span class="pulse"></span><span id="globalState">等待设备连接</span><span class="tag">DESKTOP</span></div>
|
|
15
|
+
<button class="icon-btn" aria-label="设置">⚙</button>
|
|
16
|
+
</header>
|
|
17
|
+
|
|
18
|
+
<main class="layout">
|
|
19
|
+
<section class="hero panel">
|
|
20
|
+
<div class="hero-copy">
|
|
21
|
+
<div class="eyebrow">PAIMON COMPANION / ADVENTURE SYSTEM</div>
|
|
22
|
+
<h1>旅行者,派蒙陪你开启下一场冒险!</h1>
|
|
23
|
+
<p>星光连接 · 画面感知 · AI 思考 · 安全执行</p>
|
|
24
|
+
<div class="hero-actions"><button class="primary" id="connectBtn">连接设备</button><button class="soft" id="stopBtn">停止自动操作</button></div>
|
|
25
|
+
</div>
|
|
26
|
+
<div class="orb-wrap"><div class="orb"><span>✧</span></div><i class="orbit orbit-a"></i><i class="orbit orbit-b"></i><div class="orb-caption">PAIMON COMPANION · LOCAL AI</div></div>
|
|
27
|
+
<div class="hero-foot"><span>✦ 设备桥接 <b id="deviceBadge">未连接</b></span><span>✦ 推理服务 <b id="inferenceBadge">未连接</b></span><span class="prototype">UI 原型 · 等待真实运行时</span></div>
|
|
28
|
+
</section>
|
|
29
|
+
|
|
30
|
+
<section class="panel pairing-panel">
|
|
31
|
+
<div class="section-head"><div><div class="eyebrow">CROSS-DEVICE PAIRING</div><h2>手机 · 电脑 · AI 模型配对</h2></div><span class="tag pale">ONE ACCOUNT · TWO SCREENS</span></div>
|
|
32
|
+
<div class="pairing-layout">
|
|
33
|
+
<div class="qr-frame">
|
|
34
|
+
<div class="qr-placeholder" id="pairQrEmpty" aria-label="尚未生成二维码"><div class="qr-corner tl"></div><div class="qr-corner tr"></div><div class="qr-center">✦<small>READY</small></div><div class="qr-corner bl"></div><div class="qr-corner br"></div></div>
|
|
35
|
+
<img id="pairQrImage" class="pair-qr-image" alt="电脑生成的 Gamer 手机配对二维码" hidden>
|
|
36
|
+
<small id="pairQrCaption">点击生成二维码</small>
|
|
37
|
+
</div>
|
|
38
|
+
<div class="pairing-copy">
|
|
39
|
+
<h3>手机扫描电脑二维码</h3>
|
|
40
|
+
<p>电脑生成一次性配对二维码,手机与电脑需处于同一局域网。二维码只包含短期配对凭证和电脑地址,不包含模型 API Key。</p>
|
|
41
|
+
<div class="pairing-meta"><span>配对状态</span><b id="pairState">服务尚未启动</b></div>
|
|
42
|
+
<div class="pairing-meta"><span>电脑地址</span><b id="pairHost">等待选择网络</b></div>
|
|
43
|
+
<div class="pairing-meta"><span>二维码有效期</span><b id="pairExpires">5 分钟 · 未生成</b></div>
|
|
44
|
+
<label class="pair-host-label" for="pairHostSelect">选择手机可访问的电脑网络</label>
|
|
45
|
+
<select id="pairHostSelect" class="pair-host-select"><option value="">正在检测局域网地址…</option></select>
|
|
46
|
+
<div class="pairing-buttons"><button class="primary" id="pairRefresh" disabled>正在检测网络…</button><button class="soft" id="pairStop" disabled>撤销二维码</button></div>
|
|
47
|
+
<p class="pair-mobile-note">说明:当前版本已实现电脑端真实二维码生成和扫码落地页;Android Companion 尚未接入,扫码识别不等于手机已配对。</p>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
<p class="hint">二维码 5 分钟后过期,可随时撤销并重新生成。配对控制接口仅允许电脑本机访问,手机只能访问配对落地页。</p>
|
|
51
|
+
</section>
|
|
52
|
+
|
|
53
|
+
<section class="stats-grid">
|
|
54
|
+
<article class="panel stat"><label>TCP 延迟</label><strong id="tcpLatency">—</strong><small>RTT · 等待采样</small><div class="mini-line"></div></article>
|
|
55
|
+
<article class="panel stat"><label>UDP 丢包率</label><strong id="udpLoss">—</strong><small>独立 UDP 统计</small><div class="mini-line alt"></div></article>
|
|
56
|
+
<article class="panel stat"><label>上行速率</label><strong id="uploadRate">—</strong><small>手机 / PC → 对端</small></article>
|
|
57
|
+
<article class="panel stat"><label>下行速率</label><strong id="downloadRate">—</strong><small>对端 → 手机 / PC</small></article>
|
|
58
|
+
</section>
|
|
59
|
+
|
|
60
|
+
<section class="panel flow-panel">
|
|
61
|
+
<div class="section-head"><div><div class="eyebrow">LIVE TRANSMISSION</div><h2>实时数据流</h2></div><span class="waiting"><i></i> 尚未接入真实数据</span></div>
|
|
62
|
+
<div class="flow-legend"><span><i class="dot cyan"></i> TCP 通道</span><span><i class="dot violet"></i> UDP 通道</span><span class="right">动态波形为视觉预览,不代表实际流量</span></div>
|
|
63
|
+
<canvas id="flowCanvas" height="150"></canvas>
|
|
64
|
+
<div class="flow-bottom"><span>TCP <b>DISCONNECTED</b></span><span>UDP <b>DISCONNECTED</b></span><span>最后采样 <b id="lastSample">暂无</b></span></div>
|
|
65
|
+
</section>
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
<section class="panel intelligence-panel">
|
|
69
|
+
<div class="section-head"><div><div class="eyebrow">PERCEPTION · RESEARCH · MEMORY</div><h2>游戏智能核心</h2></div><span class="tag pale">LOCAL-FIRST AI</span></div>
|
|
70
|
+
<div class="intelligence-grid">
|
|
71
|
+
<article class="intel-card"><div class="intel-icon">◉</div><div class="intel-title">视觉识别引擎</div><p>画面采集 → 场景识别 → OCR → 目标检测 → 游戏状态结构化</p><div class="intel-status"><i></i><b id="visionEngineState">等待视觉运行时</b></div><div class="intel-meta">帧时间戳 · 识别置信度 · 画面新鲜度</div><button class="soft" id="visionTestBtn">视觉模块自检</button></article>
|
|
72
|
+
<article class="intel-card"><div class="intel-icon">⌕</div><div class="intel-title">联网攻略研究</div><p>按游戏、任务、区域或 BOSS 搜索资料,提取步骤并核对当前版本。</p><div class="intel-status"><i></i><b id="researchState">等待搜索服务</b></div><div class="intel-meta">来源链接 · 更新时间 · 可信度 · 版本匹配</div><button class="soft" id="researchBtn">检查攻略检索</button></article>
|
|
73
|
+
<article class="intel-card"><div class="intel-icon">⌘</div><div class="intel-title">游戏经验记忆</div><p>记录动作、结果、失败原因和有效策略;按游戏配置隔离保存。</p><div class="intel-status"><i></i><b id="memoryState">等待本地记忆库</b></div><div class="intel-meta">成功率 · 最近经验 · 可查看与清除</div><button class="soft" id="memoryBtn">检查经验记忆</button></article>
|
|
74
|
+
</div>
|
|
75
|
+
<p class="hint">当前为控制台功能入口与状态展示。视觉推理、联网检索和持久化记忆须由真实运行时接入后才会启用;未接入时不会伪造识别结果或攻略结论。</p>
|
|
76
|
+
</section>
|
|
77
|
+
<section class="panel game-profile-panel">
|
|
78
|
+
<div class="section-head"><div><div class="eyebrow">GAME ADAPTERS</div><h2>游戏配置与兼容性</h2></div><span class="tag pale">PROFILE-BASED</span></div>
|
|
79
|
+
<div class="profile-grid">
|
|
80
|
+
<div class="profile-item"><div><b>Minecraft</b><small>目标适配 · 生存 / 创造 / 建造</small></div><span class="status-pill neutral">待测试</span></div>
|
|
81
|
+
<div class="profile-item"><div><b>原神</b><small>目标适配 · 探索 / 任务 / 战斗</small></div><span class="status-pill neutral">待测试</span></div>
|
|
82
|
+
<div class="profile-item"><div><b>其他游戏</b><small>通过独立视觉与控制配置扩展</small></div><span class="status-pill neutral">可扩展</span></div>
|
|
83
|
+
</div>
|
|
84
|
+
<div class="profile-note">每款游戏需要独立的 UI 识别规则、坐标校准、动作映射、任务状态和回归测试。游戏名称出现在列表中不代表已经兼容。</div>
|
|
85
|
+
</section>
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
<section class="panel voice-panel">
|
|
89
|
+
<div class="section-head"><div><div class="eyebrow">OPTIONAL COMMUNITY TTS</div><h2>派蒙语音助手</h2></div><span class="tag pale">USER-OPT-IN</span></div>
|
|
90
|
+
<div class="voice-layout">
|
|
91
|
+
<div class="voice-avatar">✧</div>
|
|
92
|
+
<div class="voice-settings">
|
|
93
|
+
<div class="voice-title">社区训练的派蒙音色(可选)</div>
|
|
94
|
+
<p>可连接网友制作的 Paimon VITS / TTS 服务,让 AI 游戏助手用语音播报任务、攻略摘要、战斗提醒和操作结果。</p>
|
|
95
|
+
<label for="ttsEndpoint">本地 TTS 服务地址</label>
|
|
96
|
+
<input id="ttsEndpoint" type="url" placeholder="http://127.0.0.1:8020" value="http://127.0.0.1:8020">
|
|
97
|
+
<label for="ttsText">试听文本</label>
|
|
98
|
+
<input id="ttsText" type="text" maxlength="240" value="旅行者,前面好像有新的任务!">
|
|
99
|
+
<div class="voice-actions"><button class="soft" id="ttsHealthBtn">检测语音服务</button><button class="primary" id="ttsPreviewBtn">试听派蒙语音</button></div>
|
|
100
|
+
<div class="intel-status"><i></i><b id="ttsState">尚未连接语音服务</b></div>
|
|
101
|
+
<audio id="ttsAudio" controls preload="none"></audio>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
<p class="hint">此处只接入可选 TTS 服务,不在 Gamer 仓库内分发第三方音色权重。社区模型的授权、用途限制和来源请以原作者说明为准;已知示例模型仅允许个人非商业用途。请将服务限制在本机或可信局域网,不要公开暴露。</p>
|
|
105
|
+
<p class="voice-source">参考社区项目:<a href="https://github.com/gaaiyun/ai-paimon" target="_blank" rel="noopener noreferrer">gaaiyun/ai-paimon</a> · TTS 引擎:<a href="https://github.com/RVC-Boss/GPT-SoVITS" target="_blank" rel="noopener noreferrer">GPT-SoVITS</a></p>
|
|
106
|
+
</section>
|
|
107
|
+
|
|
108
|
+
<div class="two-col">
|
|
109
|
+
<section class="panel model-panel">
|
|
110
|
+
<div class="section-head"><div><div class="eyebrow">MODEL ORCHESTRATION</div><h2>AI 模型管理</h2></div><span class="tag pale">AUTO ROUTER</span></div>
|
|
111
|
+
<div class="model-select-head"><b>已发现的本地模型</b><button class="text-btn" id="selectAllModels">全选</button></div>
|
|
112
|
+
<div id="modelChoices" class="model-choices"><div class="empty-models">尚未连接本地模型管理服务<br><small>接入后自动扫描已安装模型,并显示视觉识别 / 推理能力</small></div></div>
|
|
113
|
+
<div class="model-select-foot"><span id="selectedModelCount">已选择 0 个模型</span><span>故障时按优先级自动尝试下一个健康模型</span></div>
|
|
114
|
+
<div class="model-active"><div class="model-icon">✧</div><div class="model-info"><small>当前主模型</small><b id="activeModel">尚未检测</b><span id="modelState">请配置本地模型运行时</span></div><span class="status-pill neutral" id="modelPill">未连接</span></div>
|
|
115
|
+
<div class="model-row"><span>备用模型</span><b id="fallbackModel">尚未配置</b></div>
|
|
116
|
+
<div class="model-row"><span>视觉识别能力</span><b id="visionState">待检测</b></div>
|
|
117
|
+
<div class="model-row"><span>自动故障切换</span><b class="enabled">策略待接入</b></div>
|
|
118
|
+
<div class="model-actions"><button class="soft" id="probeBtn">检查模型</button><button class="soft" id="modelConfigBtn">模型配置</button></div>
|
|
119
|
+
<p class="hint">模型进程存在不等于推理可用。上线后将执行真实健康检查与推理探针,备用模型验证成功后才切换。</p>
|
|
120
|
+
</section>
|
|
121
|
+
|
|
122
|
+
<section class="panel device-panel">
|
|
123
|
+
<div class="section-head"><div><div class="eyebrow">DEVICE LINK</div><h2>设备与网络</h2></div><span class="tag pale">USB / WI-FI</span></div>
|
|
124
|
+
<div class="device-choice"><button class="choice selected" data-mode="USB">⌁ USB 连接</button><button class="choice" data-mode="Wi-Fi">◉ Wi-Fi 连接</button></div>
|
|
125
|
+
<div class="device-state"><div class="phone-icon">▯</div><div><b id="deviceName">尚未发现 Android 设备</b><small id="deviceDetail">连接手机后显示设备信息</small></div></div>
|
|
126
|
+
<div class="model-row"><span>传输协议</span><b id="transportMode">USB / ADB</b></div>
|
|
127
|
+
<div class="model-row"><span>TCP 状态</span><b class="muted">未连接</b></div>
|
|
128
|
+
<div class="model-row"><span>UDP 状态</span><b class="muted">未连接</b></div>
|
|
129
|
+
<p class="hint">Wi-Fi 模式仅用于受信任的本地网络;不会将 ADB 调试端口暴露到公网。</p>
|
|
130
|
+
</section>
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
<section class="panel log-panel">
|
|
134
|
+
<div class="section-head"><div><div class="eyebrow">SYSTEM EVENTS</div><h2>运行日志</h2></div><button class="text-btn" id="clearLog">清空</button></div>
|
|
135
|
+
<div id="eventLog" class="event-list"><div class="event"><time>--:--:--</time><span class="event-dot"></span><p>控制中心已启动,等待设备桥接与本地推理服务。</p></div></div>
|
|
136
|
+
</section>
|
|
137
|
+
<footer>GAMER · BUILT FOR YOUR NEXT ADVENTURE <span>本地优先 · 用户可控 · 状态透明</span></footer>
|
|
138
|
+
</main>
|
|
139
|
+
<script src="app.js"></script>
|
|
140
|
+
</body>
|
|
141
|
+
</html>
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Noto+Sans+SC:wght@400;500;600;700;800&display=swap');
|
|
2
|
+
:root{--ink:#26394a;--muted:#8295a5;--blue:#6b9fc0;--cyan:#65c9d1;--violet:#a89bda;--line:#dce8ee;--glass:rgba(255,255,255,.78);--shadow:0 16px 48px rgba(71,105,128,.10)}
|
|
3
|
+
*{box-sizing:border-box}body{margin:0;min-height:100vh;background:linear-gradient(145deg,#edf5f8 0%,#e7f0f5 46%,#f4f1ec 100%);color:var(--ink);font-family:Manrope,'Noto Sans SC',sans-serif}.sky-glow{position:fixed;inset:0;pointer-events:none;background:radial-gradient(ellipse at 78% 7%,rgba(164,204,225,.42),transparent 35%),radial-gradient(ellipse at 8% 38%,rgba(209,220,246,.4),transparent 30%);z-index:-1}.topbar{height:76px;padding:0 max(calc((100vw - 1180px)/2),24px);display:flex;align-items:center;gap:22px;border-bottom:1px solid rgba(190,211,223,.65);background:rgba(250,253,254,.58);backdrop-filter:blur(18px)}.brand{display:flex;align-items:center;gap:11px;min-width:220px}.brand-mark{width:40px;height:40px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(145deg,#8cc4d2,#7898c7);color:white;font-size:24px;box-shadow:0 6px 16px #91b8ca66}.brand b{display:block;letter-spacing:.18em;font-size:15px}.brand small{display:block;color:#91a5b2;font-size:9px;letter-spacing:.22em;margin-top:3px}.top-status{margin-left:auto;display:flex;align-items:center;gap:9px;color:#748a99;font-size:12px}.pulse,.waiting i{width:8px;height:8px;border-radius:50%;background:#d3a86c;box-shadow:0 0 0 4px #d3a86c22}.icon-btn,.soft,.primary,.choice{border:0;cursor:pointer;font:inherit}.icon-btn{width:38px;height:38px;border-radius:12px;background:#fff9;color:#607b8e;font-size:19px}.tag{font-size:9px;letter-spacing:.14em;border-radius:20px;padding:6px 9px;background:#e5eef3;color:#7793a5}.layout{max-width:1180px;margin:28px auto;padding:0 22px 36px}.panel{background:var(--glass);border:1px solid rgba(255,255,255,.9);border-radius:22px;box-shadow:var(--shadow);backdrop-filter:blur(16px)}.hero{min-height:260px;padding:30px 36px;position:relative;overflow:hidden;background:linear-gradient(112deg,rgba(255,255,255,.92),rgba(226,240,246,.78) 58%,rgba(227,229,245,.75))}.hero:after{content:"";position:absolute;inset:auto -8% -125px 28%;height:210px;border:1px solid #a9cbd8;border-radius:50%;transform:rotate(-8deg);opacity:.32}.hero-copy{position:relative;z-index:2}.eyebrow{font-size:9px;letter-spacing:.2em;color:#8ca9b9;font-weight:800}.hero h1{font-size:clamp(24px,3vw,35px);letter-spacing:.02em;margin:13px 0 8px;color:#30495d}.hero p{margin:0;color:#8298a7;font-size:13px}.hero-actions{display:flex;gap:10px;margin-top:24px}.primary{padding:11px 20px;border-radius:12px;color:white;background:linear-gradient(110deg,#6eaec0,#829dcc);box-shadow:0 7px 16px #86b5c544;font-weight:700;font-size:12px}.soft{padding:10px 15px;border-radius:11px;background:#edf4f7;color:#668398;font-weight:700;font-size:11px;border:1px solid #e0ebef}.soft:hover,.choice:hover{filter:brightness(.98);transform:translateY(-1px)}.orb-wrap{position:absolute;right:12%;top:15px;width:240px;height:220px;display:grid;place-items:center}.orb{width:118px;height:118px;border-radius:50%;display:grid;place-items:center;color:#fff;font-size:47px;background:radial-gradient(circle at 35% 28%,#fff 0%,#b8e0e3 22%,#91b5d4 52%,#9e9bcf 78%,#d9e4ee 100%);box-shadow:inset -12px -14px 25px #637ca533,0 0 48px #a6d6df77;animation:float 5s ease-in-out infinite}.orbit{position:absolute;border:1px solid #9bbdce88;border-radius:50%;width:210px;height:80px;transform:rotate(-25deg);animation:spin 18s linear infinite}.orbit-b{width:190px;height:110px;transform:rotate(60deg);animation-direction:reverse}.orb-caption{position:absolute;bottom:2px;color:#91a9b7;font-size:8px;letter-spacing:.18em}@keyframes float{50%{transform:translateY(-8px)}}@keyframes spin{to{rotate:360deg}}.hero-foot{position:absolute;bottom:18px;left:36px;display:flex;gap:22px;color:#8ba0ae;font-size:10px}.hero-foot b{color:#a17e52;margin-left:5px}.prototype{color:#a2aeba}.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:16px 0}.stat{padding:17px 19px;min-height:112px;position:relative;overflow:hidden}.stat label{display:block;color:#8ba0ad;font-size:11px}.stat strong{display:block;font-size:25px;margin:8px 0 3px;color:#405d70}.stat small{font-size:9px;color:#a2b1bb}.mini-line{position:absolute;right:16px;bottom:20px;width:52px;height:19px;border-bottom:2px solid #8dc9cf;border-radius:50%;transform:rotate(-12deg);opacity:.7}.mini-line.alt{border-color:#b0a4d8}.flow-panel,.model-panel,.device-panel,.log-panel{padding:21px 23px}.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.section-head h2{font-size:17px;margin:5px 0 0;color:#385267}.waiting{display:flex;align-items:center;gap:8px;color:#a28a69;font-size:10px}.waiting i{background:#d3aa71}.flow-legend{display:flex;align-items:center;gap:18px;margin-top:17px;color:#8398a7;font-size:10px}.dot{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:6px}.cyan{background:#70cbd0}.violet{background:#a99bda}.right{margin-left:auto;color:#aab7bf;font-size:9px}canvas{width:100%;height:150px;display:block;margin-top:6px}.flow-bottom{display:flex;gap:24px;border-top:1px solid #e6eef1;padding-top:12px;color:#91a3ae;font-size:9px}.flow-bottom b{color:#b18e66;margin-left:5px}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:16px}.tag.pale{background:#edf1f8;color:#8d91b4}.model-active{display:flex;align-items:center;gap:12px;padding:15px 0;border-bottom:1px solid #e7eef1}.model-icon{width:43px;height:43px;border-radius:14px;background:linear-gradient(145deg,#d8eaf0,#e9e4f6);display:grid;place-items:center;font-size:22px;color:#789fba}.model-info{flex:1}.model-info small,.model-info span{display:block;color:#9aabb5;font-size:9px}.model-info b{display:block;margin:3px 0;font-size:13px}.status-pill{border-radius:20px;padding:6px 9px;font-size:9px}.neutral{background:#f4eee5;color:#a78b68}.model-row{display:flex;justify-content:space-between;padding:10px 1px;border-bottom:1px solid #edf1f3;color:#91a2ad;font-size:10px}.model-row b{color:#647f91;font-weight:700}.enabled{color:#82a99c!important}.model-actions{display:flex;gap:9px;margin-top:14px}.hint{font-size:9px;line-height:1.7;color:#9babb5;margin:13px 0 0}.device-choice{display:flex;gap:8px;margin:17px 0}.choice{flex:1;padding:10px;border-radius:10px;background:#f1f5f7;color:#8da1ad;font-size:10px}.choice.selected{background:#e2eff3;color:#5e91a3;box-shadow:inset 0 0 0 1px #c9e0e6}.device-state{display:flex;align-items:center;gap:12px;padding:11px 0 14px}.phone-icon{width:42px;height:48px;border:2px solid #b6cbd4;border-radius:10px;display:grid;place-items:center;color:#8baebc;font-size:23px}.device-state b,.device-state small{display:block}.device-state b{font-size:12px}.device-state small{font-size:9px;color:#a0b0b9;margin-top:4px}.muted{color:#a7b3bb!important}.log-panel{margin-top:16px}.text-btn{border:0;background:none;color:#8ea5b3;font-size:10px;cursor:pointer}.event-list{margin-top:13px}.event{display:flex;align-items:center;gap:11px;padding:9px 2px;border-top:1px solid #edf1f3;font-size:10px;color:#8095a4}.event time{font-variant-numeric:tabular-nums;color:#a9b6be}.event-dot{width:6px;height:6px;border-radius:50%;background:#9cc8c8}.event p{margin:0}footer{display:flex;justify-content:space-between;padding:22px 5px;color:#a6b4bd;font-size:8px;letter-spacing:.13em}footer span{letter-spacing:0}@media(max-width:760px){.layout{padding:0 13px}.topbar{padding:0 15px}.brand{min-width:0}.top-status{font-size:0}.top-status .tag{font-size:8px}.hero{padding:24px 22px;min-height:280px}.orb-wrap{right:-30px;top:30px;opacity:.38}.hero-foot{left:22px;right:16px;gap:9px;flex-wrap:wrap}.stats-grid{grid-template-columns:repeat(2,1fr);gap:9px}.two-col{grid-template-columns:1fr}.flow-panel,.model-panel,.device-panel,.log-panel{padding:18px}.right{display:none}footer{gap:12px;line-height:1.6}}
|
|
4
|
+
/* Shared mobile/desktop visual language: airy blue glass, rounded white cards */
|
|
5
|
+
.pairing-panel{padding:21px 23px;margin:16px 0;background:linear-gradient(120deg,rgba(255,255,255,.88),rgba(226,241,249,.86))}
|
|
6
|
+
.pairing-layout{display:flex;align-items:center;gap:22px;margin-top:17px}
|
|
7
|
+
.qr-placeholder{width:142px;height:142px;flex:0 0 142px;position:relative;border:1px dashed #9dbbc9;border-radius:17px;background:repeating-linear-gradient(45deg,#f7fbfd,#f7fbfd 8px,#edf5f8 8px,#edf5f8 16px);display:grid;place-items:center;color:#88a9b9}
|
|
8
|
+
.qr-center{width:54px;height:54px;border-radius:15px;background:#dcecf2;display:grid;place-content:center;text-align:center;font-size:22px;color:#6d9eb1}.qr-center small{font-size:8px;letter-spacing:.18em}
|
|
9
|
+
.qr-corner{position:absolute;width:18px;height:18px;border:3px solid #86aebd}.tl{top:10px;left:10px;border-right:0;border-bottom:0}.tr{top:10px;right:10px;border-left:0;border-bottom:0}.bl{bottom:10px;left:10px;border-right:0;border-top:0}.br{bottom:10px;right:10px;border-left:0;border-top:0}
|
|
10
|
+
.pairing-copy{flex:1}.pairing-copy h3{margin:0 0 7px;font-size:16px}.pairing-copy p{margin:0 0 12px;max-width:650px;color:#879ba9;font-size:11px;line-height:1.8}.pairing-meta{display:inline-flex;gap:8px;margin:0 17px 10px 0;font-size:10px;color:#91a4b0}.pairing-meta b{color:#66889b}.model-select-head{display:flex;justify-content:space-between;align-items:center;margin:13px 0 8px;color:#6e899a;font-size:11px}.model-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.empty-models{grid-column:1/-1;padding:13px;border:1px dashed #d3e1e8;border-radius:12px;text-align:center;color:#8da3b0;font-size:10px;line-height:1.8}.empty-models small{color:#a5b4bd}.model-select-foot{display:flex;justify-content:space-between;gap:10px;margin-top:9px;color:#9aabb5;font-size:9px}
|
|
11
|
+
@media(max-width:760px){.pairing-layout{align-items:flex-start;gap:13px}.qr-placeholder{width:104px;height:104px;flex-basis:104px}.pairing-copy h3{font-size:13px}.pairing-meta{display:flex}.model-choices{grid-template-columns:1fr}.model-select-foot{flex-direction:column}}
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
/* Vision, online research and learning-memory dashboard modules */
|
|
15
|
+
.intelligence-panel,.game-profile-panel{padding:21px 23px;margin-top:16px}
|
|
16
|
+
.intelligence-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:17px}
|
|
17
|
+
.intel-card{padding:16px;border:1px solid #e3edf1;border-radius:16px;background:rgba(248,252,253,.82);min-width:0}
|
|
18
|
+
.intel-icon{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:linear-gradient(145deg,#e0f0f2,#ebe8f7);color:#709eb0;font-size:21px}
|
|
19
|
+
.intel-title{font-size:13px;font-weight:800;color:#49677a;margin-top:11px}
|
|
20
|
+
.intel-card p{min-height:48px;color:#8da1ad;font-size:10px;line-height:1.8}
|
|
21
|
+
.intel-status{display:flex;align-items:center;gap:7px;color:#9c8b6d;font-size:10px}
|
|
22
|
+
.intel-status i{width:7px;height:7px;border-radius:50%;background:#d3aa71}
|
|
23
|
+
.intel-meta{font-size:9px;color:#a3b1b9;margin:8px 0 12px}
|
|
24
|
+
.profile-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:15px}
|
|
25
|
+
.profile-item{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:13px;border:1px solid #e5edf1;border-radius:13px;background:#fafcfd}
|
|
26
|
+
.profile-item b,.profile-item small{display:block}.profile-item b{font-size:11px;color:#526f81}.profile-item small{font-size:9px;color:#9aabb5;margin-top:4px}
|
|
27
|
+
.profile-note{margin-top:12px;padding:11px 13px;border-radius:11px;background:#f0f5f7;color:#8da1ad;font-size:9px;line-height:1.8}
|
|
28
|
+
@media(max-width:760px){.intelligence-grid,.profile-grid{grid-template-columns:1fr}.intel-card p{min-height:0}}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
/* Optional community Paimon TTS panel */
|
|
32
|
+
.voice-panel{padding:21px 23px;margin-top:16px}
|
|
33
|
+
.voice-layout{display:grid;grid-template-columns:104px minmax(0,1fr);gap:20px;margin-top:17px}
|
|
34
|
+
.voice-avatar{width:88px;height:88px;border-radius:26px;display:grid;place-items:center;background:radial-gradient(circle at 35% 25%,#fff,#d7e9f2 48%,#c9c4e7);color:#829bc6;font-size:48px;box-shadow:0 10px 24px #a5bfd033}
|
|
35
|
+
.voice-title{font-size:13px;font-weight:800;color:#49677a}
|
|
36
|
+
.voice-settings p{font-size:10px;line-height:1.8;color:#8da1ad;margin:7px 0 12px}
|
|
37
|
+
.voice-settings label{display:block;font-size:10px;color:#7e96a6;margin:10px 0 5px}
|
|
38
|
+
.voice-settings input{width:100%;padding:10px 12px;border:1px solid #dfe9ee;border-radius:10px;background:#fbfdfe;color:#526b7b;font:inherit;font-size:11px;outline:none}
|
|
39
|
+
.voice-actions{display:flex;gap:9px;flex-wrap:wrap;margin:12px 0}
|
|
40
|
+
#ttsAudio{display:block;width:min(100%,440px);height:34px;margin-top:9px}
|
|
41
|
+
.voice-source{font-size:9px;color:#9aabb5;margin:10px 0 0}.voice-source a{color:#719bb1;text-decoration:none}.voice-source a:hover{text-decoration:underline}
|
|
42
|
+
@media(max-width:600px){.voice-layout{grid-template-columns:1fr}.voice-avatar{width:64px;height:64px;font-size:34px}}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
/* Paimon-inspired starlight theme: visual styling only; no runtime capability is implied. */
|
|
46
|
+
:root{
|
|
47
|
+
--ink:#283d58;--muted:#879bb1;--blue:#77b9df;--cyan:#83d9e3;--violet:#aaa0db;
|
|
48
|
+
--line:#e6dfd1;--glass:rgba(255,253,247,.84);--shadow:0 18px 50px rgba(80,113,151,.13);
|
|
49
|
+
}
|
|
50
|
+
body{
|
|
51
|
+
background:
|
|
52
|
+
radial-gradient(ellipse at 82% 4%,rgba(255,226,158,.42),transparent 26%),
|
|
53
|
+
radial-gradient(ellipse at 8% 18%,rgba(153,213,244,.34),transparent 30%),
|
|
54
|
+
linear-gradient(145deg,#f8f6ef 0%,#eaf5fb 48%,#f2effa 100%);
|
|
55
|
+
}
|
|
56
|
+
.sky-glow{
|
|
57
|
+
background:
|
|
58
|
+
radial-gradient(circle at 14% 12%,#fff8d8 0 2px,transparent 3px),
|
|
59
|
+
radial-gradient(circle at 72% 18%,#fff 0 2px,transparent 3px),
|
|
60
|
+
radial-gradient(circle at 88% 42%,#fff1c8 0 2px,transparent 3px),
|
|
61
|
+
radial-gradient(ellipse at 78% 7%,rgba(255,218,139,.34),transparent 34%),
|
|
62
|
+
radial-gradient(ellipse at 8% 38%,rgba(183,218,249,.42),transparent 32%);
|
|
63
|
+
}
|
|
64
|
+
.topbar{
|
|
65
|
+
background:rgba(255,253,247,.72);
|
|
66
|
+
border-bottom-color:rgba(224,211,183,.72);
|
|
67
|
+
}
|
|
68
|
+
.brand-mark{
|
|
69
|
+
background:linear-gradient(145deg,#f5d98d,#8fc9e7 58%,#a9a0d8);
|
|
70
|
+
color:#fffdf5;box-shadow:0 7px 20px rgba(190,164,103,.28);
|
|
71
|
+
}
|
|
72
|
+
.brand b{color:#344c68}
|
|
73
|
+
.brand small{color:#a18e68}
|
|
74
|
+
.top-status{color:#7f91a5}
|
|
75
|
+
.pulse,.waiting i{background:#d7b76f;box-shadow:0 0 0 4px rgba(215,183,111,.18)}
|
|
76
|
+
.tag{background:#f4edda;color:#a18b5f}
|
|
77
|
+
.panel{
|
|
78
|
+
border-color:rgba(255,255,255,.94);
|
|
79
|
+
box-shadow:0 18px 50px rgba(83,111,145,.12);
|
|
80
|
+
}
|
|
81
|
+
.hero{
|
|
82
|
+
background:
|
|
83
|
+
radial-gradient(circle at 82% 26%,rgba(255,255,255,.86),transparent 22%),
|
|
84
|
+
linear-gradient(112deg,rgba(255,254,248,.96),rgba(224,243,250,.88) 58%,rgba(238,232,249,.86));
|
|
85
|
+
}
|
|
86
|
+
.hero:after{border-color:#d9bd7d;opacity:.34}
|
|
87
|
+
.eyebrow{color:#a18c63}
|
|
88
|
+
.hero h1{color:#334b68}
|
|
89
|
+
.hero p{color:#8197ad}
|
|
90
|
+
.primary{
|
|
91
|
+
background:linear-gradient(110deg,#75b9df,#8f9fd2 72%,#b5a2d8);
|
|
92
|
+
box-shadow:0 8px 18px rgba(119,167,206,.3);
|
|
93
|
+
}
|
|
94
|
+
.soft{
|
|
95
|
+
background:linear-gradient(135deg,#fffdf7,#edf6fa);
|
|
96
|
+
color:#66839c;border-color:#e8e1d3;
|
|
97
|
+
}
|
|
98
|
+
.soft:hover,.choice:hover{box-shadow:0 7px 18px rgba(120,151,183,.12)}
|
|
99
|
+
.orb{
|
|
100
|
+
background:radial-gradient(circle at 35% 25%,#fff 0%,#fff4d5 17%,#c9e8f4 43%,#8fc5e4 66%,#b6a9dc 88%,#f8e9c9 100%);
|
|
101
|
+
box-shadow:inset -12px -14px 25px rgba(86,112,151,.16),0 0 52px rgba(153,207,229,.48);
|
|
102
|
+
}
|
|
103
|
+
.orbit{border-color:rgba(210,181,115,.58)}
|
|
104
|
+
.orb-caption{color:#9a8b6c}
|
|
105
|
+
.hero-foot{color:#8c9db0}
|
|
106
|
+
.hero-foot b{color:#a8874f}
|
|
107
|
+
.stat strong{color:#425d7d}
|
|
108
|
+
.section-head h2{color:#3e5877}
|
|
109
|
+
.tag.pale{background:#f1eef8;color:#8f83b7}
|
|
110
|
+
.flow-panel,.model-panel,.device-panel,.log-panel,
|
|
111
|
+
.pairing-panel,.intelligence-panel,.game-profile-panel,.voice-panel{
|
|
112
|
+
border-color:rgba(255,255,255,.96);
|
|
113
|
+
}
|
|
114
|
+
.pairing-panel{background:linear-gradient(120deg,rgba(255,254,248,.94),rgba(226,243,250,.9))}
|
|
115
|
+
.qr-placeholder{
|
|
116
|
+
border-color:#cdb77f;
|
|
117
|
+
background:repeating-linear-gradient(45deg,#fffdf7,#fffdf7 8px,#f0f7fa 8px,#f0f7fa 16px);
|
|
118
|
+
}
|
|
119
|
+
.qr-center{background:#e5f1f5;color:#8e83b8}
|
|
120
|
+
.qr-corner{border-color:#c5a96c}
|
|
121
|
+
.intel-card{background:rgba(255,254,249,.88);border-color:#eee6d6}
|
|
122
|
+
.intel-icon,.model-icon{background:linear-gradient(145deg,#fff0ca,#dff1f7 58%,#eee8f8);color:#8d91bf}
|
|
123
|
+
.profile-item{background:#fffdf8;border-color:#eee7d9}
|
|
124
|
+
.profile-note{background:#f7f3e9}
|
|
125
|
+
.voice-avatar{
|
|
126
|
+
background:radial-gradient(circle at 35% 25%,#fffdf1,#e5f5fa 48%,#d7ccef);
|
|
127
|
+
color:#8c91c5;box-shadow:0 12px 26px rgba(165,157,205,.2);
|
|
128
|
+
}
|
|
129
|
+
.voice-settings input{background:#fffefa;border-color:#e8e2d5}
|
|
130
|
+
.choice{background:#f5f2e9;color:#8998a9}
|
|
131
|
+
.choice.selected{background:#e8f3f6;color:#648ea4;box-shadow:inset 0 0 0 1px #c9e0e6}
|
|
132
|
+
.event{border-top-color:#eee9df}
|
|
133
|
+
.event-dot{background:#d6b66e}
|
|
134
|
+
footer{color:#a69a80}
|
|
135
|
+
@media(max-width:760px){
|
|
136
|
+
.hero{background:linear-gradient(130deg,rgba(255,254,248,.96),rgba(226,243,250,.9) 62%,rgba(238,232,249,.88))}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
/* Real desktop-generated QR pairing controls */
|
|
141
|
+
.qr-frame{width:190px;flex:0 0 190px;display:flex;flex-direction:column;align-items:center;gap:8px}
|
|
142
|
+
.qr-frame .qr-placeholder{width:180px;height:180px;flex:none}
|
|
143
|
+
.pair-qr-image{width:180px;height:180px;object-fit:contain;padding:7px;border-radius:15px;background:#fff;box-shadow:0 8px 26px rgba(67,93,125,.13)}
|
|
144
|
+
.pair-qr-image[hidden],.qr-placeholder[hidden]{display:none}
|
|
145
|
+
#pairQrCaption{font-size:10px;color:#8da2b1}
|
|
146
|
+
.pair-host-label{display:block;margin:10px 0 5px;color:#8196a6;font-size:10px}
|
|
147
|
+
.pair-host-select{width:min(100%,360px);padding:9px 11px;border:1px solid #dfe9ee;border-radius:10px;background:#fffefa;color:#526b7b;font:inherit;font-size:11px}
|
|
148
|
+
.pairing-buttons{display:flex;gap:9px;flex-wrap:wrap;margin-top:12px}
|
|
149
|
+
.pair-mobile-note{margin-top:10px!important;font-size:9px!important;color:#a18b68!important}
|
|
150
|
+
@media(max-width:600px){.pairing-layout{flex-direction:column}.qr-frame{width:100%;flex-direction:row;justify-content:center}.qr-frame .qr-placeholder,.pair-qr-image{width:150px;height:150px}.qr-frame .qr-placeholder{flex-basis:150px}}
|
|
@@ -10,18 +10,47 @@ Gamer 是 DSH 原生插件包,不是独立的 Windows EXE,也不是直接从
|
|
|
10
10
|
3. 点击 **Add plugin(添加插件)**。
|
|
11
11
|
4. 输入 npm 包名:`@sususgh/gamer-dsh-plugin`。
|
|
12
12
|
5. 安装完成后重启 DSH。
|
|
13
|
-
6.
|
|
13
|
+
6. 在侧边栏打开 **插件(Plugins)**,进入 **已安装插件(Installed plugins)**,选择 **Gamer 游戏智能体**,即可看到插件配置页。页面右上角可切换简体中文和 English。
|
|
14
14
|
|
|
15
15
|
不要填写 GitHub 仓库 URL。DSH 插件包通过 npm 分发,GitHub 仓库用于源码和开发。
|
|
16
16
|
|
|
17
|
+
|
|
18
|
+
## 启动电脑端二维码生成器(Windows / Linux)
|
|
19
|
+
|
|
20
|
+
要求:Node.js 22.13 或更高版本。电脑和手机需要连接同一个可信任的局域网。
|
|
21
|
+
|
|
22
|
+
**Windows PowerShell:**
|
|
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 等):**
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
git clone https://github.com/sususgh/Gamer-DSH-Plugin.git
|
|
35
|
+
cd Gamer-DSH-Plugin/desktop-runtime
|
|
36
|
+
npm install
|
|
37
|
+
npm start
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
启动后在电脑浏览器打开 `http://127.0.0.1:8765`,选择手机能够访问的电脑局域网地址,点击 **生成二维码**。二维码有效期为 5 分钟,可手动撤销。Windows 防火墙如弹出提示,只允许在可信的专用网络中访问。
|
|
41
|
+
|
|
42
|
+
手机相机扫码后会打开电脑的配对验证页。当前阶段实现的是**电脑端真实二维码生成与扫码落地页验证**;Android Companion 尚未实现设备身份提交、双端认证和会话握手,因此扫码成功不代表设备已连接,也不能开始游戏控制。不要将该 HTTP 服务或端口映射到公网。
|
|
43
|
+
|
|
17
44
|
## 当前功能状态
|
|
18
45
|
|
|
19
46
|
当前包提供:
|
|
20
47
|
- DSH 原生 Bundle 清单与插件入口。
|
|
21
|
-
-
|
|
48
|
+
- 插件详情页配置界面(简体中文 / English 切换)。
|
|
49
|
+
- 独立电脑端配对服务:可在 Windows / Linux 上启动本地服务并生成真实二维码(见下方步骤)。
|
|
22
50
|
- `gamer_project_status` 状态查询工具。
|
|
23
51
|
|
|
24
52
|
当前尚未提供:
|
|
53
|
+
- Android Companion 的扫码客户端、设备身份提交与双端认证。
|
|
25
54
|
- Windows 游戏控制运行时。
|
|
26
55
|
- Android APK 与二维码配对服务。
|
|
27
56
|
- 实际屏幕采集、OCR、目标检测和视觉模型管线。
|
|
@@ -35,7 +64,7 @@ Gamer 是 DSH 原生插件包,不是独立的 Windows EXE,也不是直接从
|
|
|
35
64
|
对于由 CLI 管理的 profile,可运行:
|
|
36
65
|
|
|
37
66
|
```bash
|
|
38
|
-
npx -y @deepseek-ai/dsh plugin --profile web add @sususgh/gamer-dsh-plugin@1.0.
|
|
67
|
+
npx -y @deepseek-ai/dsh plugin --profile web add @sususgh/gamer-dsh-plugin@1.0.1
|
|
39
68
|
```
|
|
40
69
|
|
|
41
70
|
桌面版 DSH 的 desktop profile 应在应用内 Plugins → Add plugin 安装。
|