aram-mayhem-dsh 0.4.2 → 0.4.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/INSTALL.zh-CN.txt +1 -1
- package/README.md +3 -3
- package/client.js +6 -2
- package/index.js +10 -0
- package/package.json +1 -1
- package/scripts/desktop_overlay.py +4 -2
- package/scripts/dsh_service.py +1 -1
package/INSTALL.zh-CN.txt
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
--------
|
|
33
33
|
- 服务不会自动启动。打开「海斗助手」页面,先点右上角 **「服务 开」**;
|
|
34
34
|
不用时点 **「服务 关」**,Python 进程会立即停止。
|
|
35
|
-
-
|
|
35
|
+
- 启动服务后会自动显示桌面图标;不需要时点「桌面图标 关」;服务关闭时图标会一并停止。
|
|
36
36
|
- 点击图标展开:英雄 / 推荐海克斯 / 出装;点「收起」、按 Esc 或点击游戏
|
|
37
37
|
会自动缩回右侧小图标。
|
|
38
38
|
- 游戏内必须使用「无边框」或「窗口化」。独占全屏会遮挡图标和 OCR。
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
把《英雄联盟》**海克斯大乱斗**(ARAM: Mayhem)的选人、推荐海克斯和出装数据搬进 DeepSeek Harness。
|
|
9
9
|
|
|
10
|
-
-
|
|
10
|
+
- **屏幕置顶小图标**:点击页面 **「服务 开」** 启动服务时会一并显示;也可用 **「桌面图标 开/关」** 单独关闭/重开。点击图标展开英雄、推荐海克斯和出装。窗口置顶、可拖动、记住位置。
|
|
11
11
|
- **DSH 侧边栏页面**:完整的「海斗助手」页面(选人 / 推荐海克斯 / 出装),右上角有 **「服务 开/关」** 和 **「桌面图标 开/关」** 两个独立开关。
|
|
12
12
|
- **九个 `aram_*` 工具**:让模型查询英雄胜率、海克斯推荐分、出装、当前 LCU 状态,并启动/停止服务、打开/关闭桌面图标。
|
|
13
13
|
- **本地 Python 服务**:复用统计、LCU、OCR 模块,不依赖 Qt 的页面通过 DSH Host 的 `/aram-api` 同源代理访问;桌面图标直接访问本地服务。**服务不会自动启动**,关闭后释放 Python 进程。
|
|
@@ -37,7 +37,7 @@ python -m pip install -r requirements-dsh.txt
|
|
|
37
37
|
也可以直接运行 `.\install.ps1`(完整依赖),或 `.\install.ps1 -Minimal`(只装图标/页面/LCU,不装 OCR);不熟悉 PowerShell 的话双击 `install.bat` 即可。桌面图标需要 **PySide6**(已包含在依赖中)。然后在 DSH 的 **Plugins** 里用 **Add plugin** 安装本目录(或由 Agent 用 `plugin_manager install_bundle` 安装)。安装后:
|
|
38
38
|
|
|
39
39
|
1. 打开侧边栏「海斗助手」页面,点击右上角 **「服务 开」**;服务不会随插件自动启动;
|
|
40
|
-
2.
|
|
40
|
+
2. 启动服务后会自动显示桌面图标;不需要时点 **「桌面图标 关」**,点图标展开,点「收起」或按 `Esc` 缩回;
|
|
41
41
|
3. 不用时点 **「服务 关」**,Python 服务会立即停止;桌面图标也会一并关闭;
|
|
42
42
|
4. 新开会话后,模型即可使用 `aram_*` 工具;工具需要服务处于开启状态,也可以让 Agent 调用 `aram_service start`。
|
|
43
43
|
|
|
@@ -78,7 +78,7 @@ powershell -ExecutionPolicy Bypass -File .\scripts\package_share.ps1
|
|
|
78
78
|
|
|
79
79
|
## 桌面图标
|
|
80
80
|
|
|
81
|
-
- 默认停靠主屏右边缘并**半隐藏**:只露出约
|
|
81
|
+
- 默认停靠主屏右边缘并**半隐藏**:只露出约 30% 宽度,透明度约 0.62;鼠标移入平滑滑出完整图标,移出 400ms 后缩回。
|
|
82
82
|
- 点击展开:英雄 / 推荐海克斯 / 出装三个页签;功能菜单打开或主面板展开时不会缩回。
|
|
83
83
|
- 点标题栏「收起」、按 `Esc`,或点击游戏/其他窗口时自动缩回半隐藏图标,减少对视野的遮挡。
|
|
84
84
|
- **游戏必须使用「无边框」或「窗口化」**:独占全屏会盖住所有 Windows 置顶窗口,图标和 OCR 都无法显示/截图。游戏内按 Esc → 视频 → 窗口模式 → 无边框。
|
package/client.js
CHANGED
|
@@ -627,6 +627,10 @@ window.__ModuleLoader__.load({
|
|
|
627
627
|
if (data.running) throw new Error(data.error || '服务关闭失败')
|
|
628
628
|
} else if (data.running || data.starting) {
|
|
629
629
|
setServiceOn(true)
|
|
630
|
+
try {
|
|
631
|
+
const overlay = await get('/overlay/status', 4000)
|
|
632
|
+
setOverlayOn(!!overlay.running)
|
|
633
|
+
} catch { /* status poll will catch up */ }
|
|
630
634
|
} else {
|
|
631
635
|
throw new Error(data.error || '服务启动失败')
|
|
632
636
|
}
|
|
@@ -727,8 +731,8 @@ window.__ModuleLoader__.load({
|
|
|
727
731
|
onClick: toggleService,
|
|
728
732
|
}, serviceBusy ? '启动中…' : '启动服务')),
|
|
729
733
|
serviceError ? h('div', { style: { ...S.error, marginTop: 10 } }, serviceError) : null,
|
|
730
|
-
h('div', { style: { ...S.muted,
|
|
731
|
-
'
|
|
734
|
+
h('div', { style: { ...S.muted }, 'data-testid': 'service-note' },
|
|
735
|
+
'启动服务时会一并显示桌面图标;图标可在右上角单独关闭,服务关闭时会一并停止。')),
|
|
732
736
|
h('div', { style: S.muted },
|
|
733
737
|
'数据依赖本地 Python 服务(127.0.0.1:8123)。'))
|
|
734
738
|
}
|
package/index.js
CHANGED
|
@@ -152,6 +152,16 @@ export function apply(ctx, config = {}) {
|
|
|
152
152
|
} finally {
|
|
153
153
|
starting = null
|
|
154
154
|
}
|
|
155
|
+
// A fresh service start is an explicit user action; show the icon as well.
|
|
156
|
+
// The icon remains independently switchable, and stopService closes it.
|
|
157
|
+
try {
|
|
158
|
+
await fetch(`${base}/overlay/start`, {
|
|
159
|
+
method: 'POST',
|
|
160
|
+
headers: { 'content-type': 'application/json' },
|
|
161
|
+
body: JSON.stringify({ persist: true }),
|
|
162
|
+
signal: AbortSignal.timeout(12_000),
|
|
163
|
+
})
|
|
164
|
+
} catch { /* service is still usable without PySide6/icon */ }
|
|
155
165
|
return serviceInfo()
|
|
156
166
|
}
|
|
157
167
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aram-mayhem-dsh",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "ARAM: Mayhem companion for DSH: an on-demand local service, screen-top desktop icon, sidebar page with LCU state, champion/augment statistics, builds and screen OCR, with nine agent tools.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -645,8 +645,10 @@ class FloatingOverlay(QWidget):
|
|
|
645
645
|
return self.x()
|
|
646
646
|
area = screen.availableGeometry()
|
|
647
647
|
if peek:
|
|
648
|
-
|
|
649
|
-
|
|
648
|
+
# Keep only 30% of the icon on screen; the rest stays outside the
|
|
649
|
+
# right edge until the mouse enters the visible sliver.
|
|
650
|
+
ratio = 0.70
|
|
651
|
+
visible = max(18, round(self.width() * (1.0 - ratio)))
|
|
650
652
|
return area.right() - visible
|
|
651
653
|
return area.right() - self.width() + 1
|
|
652
654
|
|
package/scripts/dsh_service.py
CHANGED
|
@@ -65,7 +65,7 @@ from src.lcu.listener import parse_champ_select, parse_queue_info
|
|
|
65
65
|
log = logging.getLogger("aram-dsh-service")
|
|
66
66
|
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
|
67
67
|
|
|
68
|
-
VERSION = "0.4.
|
|
68
|
+
VERSION = "0.4.4"
|
|
69
69
|
IN_GAME_PHASES = {"InProgress", "Reconnect"}
|
|
70
70
|
|
|
71
71
|
|