aram-mayhem-dsh 0.4.2 → 0.4.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.
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. 需要桌面图标时再点 **「桌面图标 开」**;点图标展开,点「收起」或按 `Esc` 缩回;
40
+ 2. 启动服务后会自动显示桌面图标;不需要时点 **「桌面图标 关」**,点图标展开,点「收起」或按 `Esc` 缩回;
41
41
  3. 不用时点 **「服务 关」**,Python 服务会立即停止;桌面图标也会一并关闭;
42
42
  4. 新开会话后,模型即可使用 `aram_*` 工具;工具需要服务处于开启状态,也可以让 Agent 调用 `aram_service start`。
43
43
 
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, marginTop: 10 } },
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.2",
3
+ "version": "0.4.3",
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",
@@ -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.2"
68
+ VERSION = "0.4.3"
69
69
  IN_GAME_PHASES = {"InProgress", "Reconnect"}
70
70
 
71
71