@restregular/dsh-powerup 0.5.1 → 0.6.1

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
@@ -2,7 +2,7 @@
2
2
 
3
3
  Small, opt-in upgrades for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness).
4
4
  The upgrades include a **right-click action menu in the Trajectory view**, an
5
- optional **stop reason for background jobs**, and an in-place **plugin updater**.
5
+ optional **stop reason for background jobs**, and an in-place **plugin installer**.
6
6
 
7
7
  ## Install
8
8
 
@@ -31,7 +31,7 @@ Right-click empty space in the ledger:
31
31
 
32
32
  The sidebar **Power-Up** page turns the menu on or off and lists the available
33
33
  actions. The setting is stored in the browser. It also holds the defaults for
34
- **one-click update** (auto-enable and auto-restart), which the plugin updater
34
+ **one-click install** (auto-enable and auto-restart), which the plugin installer
35
35
  uses.
36
36
 
37
37
  ### Stop a background job with a reason
@@ -44,8 +44,7 @@ and is not clipped by any slot's stacking context; its colors come only from
44
44
  `--dsw-alias-*` tokens, so light and dark themes both work.
45
45
 
46
46
  - The reason field is optional; an empty field keeps the host's default
47
- `cancelled by the user` reason. A live character counter shows the 200-character
48
- limit, and `Enter` confirms while `Esc` cancels.
47
+ `cancelled by the user` reason. `Enter` confirms while `Esc` cancels.
49
48
  - Confirming stops the job through the Host route, which records
50
49
  `cancelled by the user: <reason>`. The completion notice injected into the
51
50
  session and the shell tool's result therefore carry the reason.
@@ -56,30 +55,33 @@ and is not clipped by any slot's stacking context; its colors come only from
56
55
 
57
56
  `↑` / `↓` move, `Home` / `End` jump, `Enter` runs, `Esc` closes.
58
57
 
59
- ## Update a plugin
58
+ ## Install a plugin
60
59
 
61
60
  Open the built-in **Plugins** page. Every third-party card under **Installed
62
- plugins** gains a small update icon in its action area. Clicking it opens the
63
- update dialog:
61
+ plugins** gains a small install icon in its action area. Clicking it opens the
62
+ install dialog:
64
63
 
65
64
  1. The dialog reads the package's published versions from the Host's configured
66
65
  registries — the same list the **Add plugin** dialog offers, including the
67
- npmmirror fallback. Star any registry to make it Power-Up's default for
68
- later updates; otherwise the list starts from the Add dialog's remembered
69
- choice.
70
- 2. Type a version or pick one from the floating version list. The current
71
- installed version is tagged **Current**; the newest is tagged **latest**, and
72
- a version that is both uses one **Current · latest** tag.
73
- 3. **One-click update** installs the newest version and skips both questions:
74
- by default the new copy is enabled and DSH restarts automatically. The
75
- Power-Up page can turn either default off. With auto-enable off, the new
66
+ npmmirror fallback. It stays on its loading state until that list has settled
67
+ (loaded or failed) and only then shows the chooser. Star any registry to make
68
+ it Power-Up's default for later installs; otherwise the list starts from the
69
+ Add dialog's remembered choice.
70
+ 2. Type a version or pick one from the floating version list. The version in the
71
+ input is authoritative: both install actions install exactly that version, so
72
+ reinstalling or downgrading works. The installed version is tagged
73
+ **Current**; the newest is tagged **latest**, and a version that is both uses
74
+ one **Current · latest** tag.
75
+ 3. **One-click install** installs the version in the input and skips both
76
+ questions: by default the new copy is enabled and DSH restarts automatically.
77
+ The Power-Up page can turn either default off. With auto-enable off, the new
76
78
  version is left disabled and nothing restarts. With auto-restart off (or when
77
79
  the current runtime cannot restart itself), the completion panel closes
78
80
  itself after a few seconds instead of staying on screen. Power-Up's own
79
- update keeps its background handoff and does not offer one-click.
80
- 4. Otherwise, confirming removes the installed copy, checks the new spec the
81
- way **Add plugin** does, and installs the selected version without enabling
82
- it. Because the old copy is already gone at that point, a refused check or a
81
+ install keeps its background handoff and does not offer one-click.
82
+ 4. Otherwise, confirming removes the installed copy, checks the spec the way
83
+ **Add plugin** does, and installs the selected version without enabling it.
84
+ Because the old copy is already gone at that point, a refused check or a
83
85
  failed install automatically re-installs the removed version with its
84
86
  previous enabled state; the dialog reports both the failure and the rollback
85
87
  result.
@@ -93,11 +95,11 @@ update dialog:
93
95
  plugins** heading. The heading bar is always present — with **No plugins need
94
96
  a restart** and the restart button when nothing is pending — and a **Restart
95
97
  DSH** button confirms and performs the same restart. The Host also audits
96
- profile bundle directories written after it started, so updates made through
97
- the built-in **Add plugin** / **Update** UI, or before this page loaded, are
98
+ profile bundle directories written after it started, so installs made through
99
+ the built-in **Add plugin** / **Install** UI, or before this page loaded, are
98
100
  marked too.
99
101
 
100
- Power-Up updates itself through the same dialog (the one-click action is hidden
102
+ Power-Up installs itself through the same dialog (the one-click action is hidden
101
103
  for itself). Because removing the plugin unloads this panel, the Host answers
102
104
  first and then hands `removeBundle` → `inspect` → `installBundle(enabled: true)`
103
105
  to the built-in manager service, which keeps running after the Power-Up Host
@@ -128,23 +130,25 @@ fiber is unloaded. The panel closes; refresh the page when the install finishes.
128
130
  The typed reason goes to `POST /dsh-powerup/api/job-kill`, which calls the
129
131
  registry's `kill(id, session, reason)` — the same admission the built-in
130
132
  Remote uses, with the reason settlement merges into the job's `detail` line.
131
- - **The update entry uses the built-in page's contracts.** The Plugins page has
133
+ - **The install entry uses the built-in page's contracts.** The Plugins page has
132
134
  no per-card slot, so the overlay injects one button into every
133
135
  `[data-plugin-group="bundles"] [data-plugin-package]` card and re-asserts it
134
136
  after React renders. Version listing is a plain registry `GET`; removal and
135
137
  installation use the same `remote.pluginManager` calls as **Add plugin**. The
136
138
  Host adds two loopback-only routes: `/dsh-powerup/api/restart` for the
137
- process restart, and `/dsh-powerup/api/self-update` for the self-update
139
+ process restart, and `/dsh-powerup/api/self-update` for the self-install
138
140
  handoff.
139
- - **Self-update outlives its own unload.** The Host route sends its answer, then
140
- a timer starts `removeBundle` → `inspect` → `installBundle(enabled: true)`
141
- through the built-in manager service. Removing the bundle unloads Power-Up's
142
- own Host fiber, but the manager service and the pending promise stay in the
143
- Host process, so the reinstall finishes; failures are appended to
144
- `~/.dsh/powerup/self-update.log`. The Host captures the version it was loaded
145
- from before removal and re-installs that version if the check or install
146
- fails, so a failed self-update does not leave Power-Up missing.
147
- - **One-click update is a client-side decision.** The newest version and both
141
+ - **Power-Up's own install outlives its unload.** The Host route sends its
142
+ answer, then a timer starts `removeBundle` → `inspect` →
143
+ `installBundle(enabled: true)` through the built-in manager service. Removing
144
+ the bundle unloads Power-Up's own Host fiber, but the manager service and the
145
+ pending promise stay in the Host process, so the reinstall finishes; failures
146
+ are appended to `~/.dsh/powerup/self-update.log`. The Host captures the
147
+ version it was loaded from before removal and re-installs that version if the
148
+ check or install fails, so a failed self-install does not leave Power-Up
149
+ missing.
150
+ - **One-click install is a client-side decision.** Both install actions use the
151
+ version in the dialog input (so reinstall and downgrade are allowed) and both
148
152
  defaults live in the shared settings store (`dsh-powerup:settings:v1`), so the
149
153
  Power-Up page and an open dialog agree without a reload. A one-click run
150
154
  installs disabled — the same shape as **Add plugin** — then enables through
@@ -152,18 +156,21 @@ fiber is unloaded. The panel closes; refresh the page when the install finishes.
152
156
  auto-enable off the new copy stays disabled and nothing restarts. When no
153
157
  restart happens the completion panel closes on a timer; install, enable, and
154
158
  restart failures stay on screen with their reason instead.
155
- - **The stop dialog is a body portal.** `shell.overlay` is an absolute layer at
156
- `z-index: 20`, and the host jobs menu is a `document.body` portal at
157
- `z-index: 100`; a high z-index inside the overlay layer therefore still loses.
158
- The reason popover is rendered through `react-dom`'s `createPortal` into
159
- `document.body`, uses `z-index: 1400`, and draws its icon chip, input, error
160
- strip, and solid confirm button from host tokens, so it stays readable in both
161
- themes. Without `react-dom` it falls back to in-place rendering.
159
+ - **The stop dialog is a body portal with host-dialog chrome.** `shell.overlay`
160
+ is an absolute layer at `z-index: 20`, and the host jobs menu is a
161
+ `document.body` portal at `z-index: 100`; a high z-index inside the overlay
162
+ layer therefore still loses. The reason popover is rendered through
163
+ `react-dom`'s `createPortal` into `document.body` and uses `z-index: 1400`.
164
+ Its surface (`--dsw-alias-bg-layer-2`, `--dsw-radius-panel`,
165
+ `--dsw-elevation-prominent`), 34px input, and buttons mirror the host dialog
166
+ and menu primitives; the confirm button reuses the host's armed-stop
167
+ treatment (red border, 12% red fill, red text) instead of inventing a solid
168
+ danger style. Without `react-dom` it falls back to in-place rendering.
162
169
  - **Restart status lives in this browser session.** A management result that
163
170
  says `restart-required` is written to `sessionStorage`; the card gets a
164
171
  **Restart needed** tag and the group heading gets a count plus a restart
165
172
  button. The Client also wraps the shared `remote.pluginManager` methods so an
166
- update started from the built-in Add plugin/Update dialogs is observed, and
173
+ install started from the built-in Add plugin/Install dialogs is observed, and
167
174
  asks the Host audit route for profile bundles whose files are newer than the
168
175
  Host process. A real app restart clears the session, while a page refresh
169
176
  keeps the markers.
package/client.js CHANGED
@@ -69,7 +69,7 @@
69
69
 
70
70
  const NS = 'dsh-powerup';
71
71
  const SETTINGS_KEY = 'dsh-powerup:settings:v1';
72
- const VERSION = '0.5.1';
72
+ const VERSION = '0.6.1';
73
73
  const MENU_GAP = 8;
74
74
  const MENU_WIDTH = 248;
75
75
  /** How long a one-click update's completion panel stays open when nothing restarts. */
@@ -92,15 +92,15 @@
92
92
  'page.how1': '打开任意会话,切到顶部的「轨迹」视图。',
93
93
  'page.how2': '在记录行上右键;在空白处右键可执行会话级操作。',
94
94
  'page.how3': '菜单支持 ↑ / ↓ 选择、Enter 执行、Esc 关闭。',
95
- 'page.updateTitle': '插件自更新',
96
- 'page.updateDesc': '在插件页为每个第三方已安装插件提供更新入口:从安装源选版本、卸载旧版、按「添加插件」流程重装,并可立即启用与重启 DSH;也可以一键更新到最新版。',
97
- 'page.updateHow': '打开侧边栏的「插件」页,在「已安装插件」分组中点击卡片右侧的更新图标;在更新面板里点「一键更新」即可安装最新版,并按下面的默认行为处理。',
98
- 'page.oneClickTitle': '一键更新',
99
- 'page.oneClickDesc': '在更新面板里点「一键更新」时,直接安装最新版本,跳过「是否启用」和「是否重启」的询问。',
95
+ 'page.updateTitle': '插件安装',
96
+ 'page.updateDesc': '在插件页为每个第三方已安装插件提供安装入口:从安装源读取版本,按输入框中的版本卸载旧版并按「添加插件」流程安装,完成后可立即启用并选择是否重启 DSH;也可以一键安装。',
97
+ 'page.updateHow': '打开侧边栏的「插件」页,在「已安装插件」分组中点击卡片右侧的安装图标;在面板里输入或选择版本后点「一键安装」即可,并按下面的默认行为处理。',
98
+ 'page.oneClickTitle': '一键安装',
99
+ 'page.oneClickDesc': '在安装面板里点「一键安装」时,直接安装输入框中的版本,跳过「是否启用」和「是否重启」的询问。',
100
100
  'page.oneClickEnable': '自动启用新版本',
101
- 'page.oneClickEnableHint': '关闭后,一键更新只安装新版本,保持停用,也不自动重启。',
101
+ 'page.oneClickEnableHint': '关闭后,一键安装只安装版本,保持停用,也不自动重启。',
102
102
  'page.oneClickRestart': '自动重启 DSH',
103
- 'page.oneClickRestartHint': '关闭后,更新完成的提示会自动关闭。',
103
+ 'page.oneClickRestartHint': '关闭后,安装完成的提示会自动关闭。',
104
104
  'page.jobStopTitle': '后台任务停止原因',
105
105
  'page.jobStopDesc': '在会话顶部的后台任务面板里点停止按钮时,可以顺手填写停止原因;原因会附加在任务结束后注入会话的提示里。',
106
106
  'page.jobStopHow': '打开任意会话,点顶部的「后台任务」面板,在运行中的任务右侧点停止,填写原因(可留空)后确认。',
@@ -151,7 +151,6 @@
151
151
  'jobStop.title': '停止后台任务',
152
152
  'jobStop.subtitle': '停止后无法恢复,正在运行的工作会中断。',
153
153
  'jobStop.close': '关闭',
154
- 'jobStop.hint': 'Enter 确认 · Esc 取消',
155
154
  'jobStop.reasonLabel': '停止原因(可选)',
156
155
  'jobStop.reasonPlaceholder': '例如:已经不需要这个结果了',
157
156
  'jobStop.reasonNote': '原因会附加在任务结束后注入会话的提示里。',
@@ -159,14 +158,14 @@
159
158
  'jobStop.confirm': '停止任务',
160
159
  'jobStop.stopping': '正在停止…',
161
160
  'jobStop.failed': '停止失败:{message}',
162
- 'update.button': '更新版本',
163
- 'update.title': '更新插件',
164
- 'update.subtitle': '选择版本后自动卸载旧版并安装新版本。',
161
+ 'update.button': '安装',
162
+ 'update.title': '安装插件',
163
+ 'update.subtitle': '按输入框中的版本安装;已安装的副本会先移除。',
165
164
  'update.current': '当前版本',
166
165
  'update.versionLabel': '版本号',
167
166
  'update.versionPlaceholder': '输入版本号,或从列表选择',
168
167
  'update.loadingVersions': '正在从安装源读取版本…',
169
- 'update.loading': '正在读取插件信息…',
168
+ 'update.loading': '正在读取插件和版本列表…',
170
169
  'update.chooseVersion': '选择版本',
171
170
  'update.hideVersions': '收起列表',
172
171
  'update.versionsCount': '共 {count} 个版本',
@@ -181,7 +180,7 @@
181
180
  'update.registryMirror': '中国大陆镜像源',
182
181
  'update.registryCustom': '自定义地址',
183
182
  'update.registryFrom': '版本列表来自 {registry}',
184
- 'update.start': '开始更新',
183
+ 'update.start': '开始安装',
185
184
  'update.cancel': '取消',
186
185
  'update.close': '关闭',
187
186
  'update.step.checking': '正在校验版本…',
@@ -202,14 +201,14 @@
202
201
  'update.restartUnsupported': '当前运行方式无法自动重启:{reason}',
203
202
  'update.restarting': 'DSH 正在重启,窗口即将关闭…',
204
203
  'update.restartFailed': '重启请求失败:{message}',
205
- 'update.selfUpdateWarning': '更新 Power-Up 会在后台卸载并安装新版本;本面板会关闭,完成后刷新页面。',
206
- 'update.selfUpdating': 'Power-Up 正在后台更新…',
204
+ 'update.selfUpdateWarning': '安装 Power-Up 会在后台卸载并安装所选版本;本面板会关闭,完成后刷新页面。',
205
+ 'update.selfUpdating': 'Power-Up 正在后台安装…',
207
206
  'update.selfRefresh': '完成后请刷新页面。',
208
207
  'update.setDefault': '设为默认',
209
208
  'update.defaultTag': '默认',
210
- 'update.defaultHint': '更新列表默认使用此安装源',
209
+ 'update.defaultHint': '安装列表默认使用此安装源',
211
210
  'restart.tag': '需重启',
212
- 'restart.tagHint': '该插件已更新,重启 DSH 后生效',
211
+ 'restart.tagHint': '该插件已安装新版本,重启 DSH 后生效',
213
212
  'restart.pending': '{count} 个插件待重启',
214
213
  'restart.none': '暂无插件需要重启',
215
214
  'restart.action': '重启 DSH',
@@ -217,41 +216,40 @@
217
216
  'restart.desc': '重启会关闭并重新打开 DSH,正在运行的任务会中断。',
218
217
  'restart.cancel': '取消',
219
218
  'restart.confirm': '立即重启',
220
- 'update.doneTitle': '更新完成',
221
- 'update.doneInstalled': '{name} 已更新到 {version}。',
219
+ 'update.doneTitle': '安装完成',
220
+ 'update.doneInstalled': '{name} 已安装 {version}。',
222
221
  'update.doneDisabled': '{name} 已安装 {version},尚未启用。',
223
222
  'update.doneEnabled': '新版本已启用。',
224
223
  'update.doneRestart': '部分更改需要重启 DSH 后生效。',
225
224
  'update.doneAutoClose': '完成面板将在 {seconds} 秒后自动关闭。',
226
225
  'update.doneButton': '完成',
227
- 'update.oneClick': '一键更新',
228
- 'update.oneClickTitle': '一键更新',
229
- 'update.oneClickHint': '安装最新版本 {version},跳过「是否启用」和「是否重启」的询问。',
226
+ 'update.oneClick': '一键安装',
227
+ 'update.oneClickTitle': '一键安装',
228
+ 'update.oneClickHint': '安装输入框中的版本 {version},跳过「是否启用」和「是否重启」的询问。',
230
229
  'update.oneClickDefaults': '自动启用:{enable} · 自动重启:{restart}。可在侧边栏 Power-Up 页面修改。',
231
230
  'update.on': '开',
232
231
  'update.off': '关',
233
- 'update.oneClickNoLatest': '暂时读不到最新版本,请重试或手动选择版本。',
234
- 'update.oneClickUpToDate': '已经是最新版本,无需更新。',
232
+ 'update.oneClickNoVersion': '请先输入或选择要安装的版本。',
235
233
  'update.oneClickEnableFailed': '新版本已安装,但自动启用失败。请到「插件」页手动启用。',
236
234
  'update.oneClickSkippedEnable': '已按设置保持停用;需要时到「插件」页启用。',
237
- 'update.errorTitle': '更新失败',
235
+ 'update.errorTitle': '安装失败',
238
236
  'update.rollbackOkTitle': '已恢复旧版本',
239
- 'update.rollbackOkDesc': '更新失败,{name} 已自动回滚到 {version},仍可继续使用。',
237
+ 'update.rollbackOkDesc': '安装失败,{name} 已自动回滚到 {version},仍可继续使用。',
240
238
  'update.rollbackFailedTitle': '旧版本恢复失败',
241
239
  'update.rollbackFailedDesc': '自动回滚失败:{message}。请到「插件」页用「添加插件」重新安装。',
242
240
  'update.rollbackUnavailable': '无法确定旧版本号,未能自动回滚。请到「插件」页重新安装。',
243
- 'update.selfTitle': '请用「添加插件」更新 Power-Up 自身',
244
- 'update.selfDesc': '更新 Power-Up 会先卸载本插件,更新流程会随之中断。',
245
- 'update.notRemovable': '该插件受 DSH 管理,不能在这里更新。',
241
+ 'update.selfTitle': '请用「添加插件」安装 Power-Up 自身',
242
+ 'update.selfDesc': '安装 Power-Up 会先卸载本插件,安装流程会随之中断。',
243
+ 'update.notRemovable': '该插件受 DSH 管理,不能在这里安装。',
246
244
  'update.notBundle': '该包不是 DSH 插件包。',
247
245
  'update.alreadyInstalled': '该包已安装,请先卸载旧版本。',
248
246
  'update.notFound': '安装源里找不到这个版本。',
249
- 'update.cancelled': '更新已取消。',
247
+ 'update.cancelled': '安装已取消。',
250
248
  'update.installedChip': '未安装',
251
249
  'update.unknown': '未知错误',
252
250
  'update.invalidVersion': '请输入有效版本号(例如 1.2.3)',
253
251
  'update.stopProfile': '当前 profile 不能热卸载该插件,请重启 DSH 后再试。',
254
- 'update.unsupportedTitle': '无法自动更新',
252
+ 'update.unsupportedTitle': '无法自动安装',
255
253
  },
256
254
  en: {
257
255
  'panel.title': 'Power-Up',
@@ -266,15 +264,15 @@
266
264
  'page.how1': 'Open a session and switch to the Trajectory view.',
267
265
  'page.how2': 'Right-click a record row; right-click empty space for session actions.',
268
266
  'page.how3': 'Use ↑ / ↓ to move, Enter to run, Esc to close.',
269
- 'page.updateTitle': 'Update plugins',
270
- 'page.updateDesc': 'Every third-party plugin on the Plugins page gains an update entry: pick a version from a registry, remove the old copy, reinstall through the Add plugin path, then enable and restart DSH — or update to the newest version in one click.',
271
- 'page.updateHow': 'Open Plugins in the sidebar and click the update icon at the right of a card under Installed plugins; in the update panel, One-click update installs the newest version using the defaults below.',
272
- 'page.oneClickTitle': 'One-click update',
273
- 'page.oneClickDesc': 'One-click update installs the newest version and skips both the enable and the restart questions.',
267
+ 'page.updateTitle': 'Install plugins',
268
+ 'page.updateDesc': 'Every third-party plugin on the Plugins page gains an install entry: read versions from a registry, install the version in the input through the Add plugin path (removing the old copy first), then enable and optionally restart DSH — or use one-click install.',
269
+ 'page.updateHow': 'Open Plugins in the sidebar and click the install icon at the right of a card under Installed plugins; in the panel, type or choose a version and press One-click install to use the defaults below.',
270
+ 'page.oneClickTitle': 'One-click install',
271
+ 'page.oneClickDesc': 'One-click install installs the version in the input and skips both the enable and the restart questions.',
274
272
  'page.oneClickEnable': 'Enable the new version automatically',
275
- 'page.oneClickEnableHint': 'When off, one-click update only installs it, leaves it disabled, and does not restart.',
273
+ 'page.oneClickEnableHint': 'When off, one-click install only installs the version, leaves it disabled, and does not restart.',
276
274
  'page.oneClickRestart': 'Restart DSH automatically',
277
- 'page.oneClickRestartHint': 'When off, the completion panel closes itself.',
275
+ 'page.oneClickRestartHint': 'When off, the install-complete panel closes itself.',
278
276
  'page.jobStopTitle': 'Background job stop reason',
279
277
  'page.jobStopDesc': 'When you stop a running job from the background jobs panel in the session header, you can leave a reason; the reason is appended to the notice injected into the session when the job settles.',
280
278
  'page.jobStopHow': 'Open a session, expand the background jobs panel, press stop on a running job, type a reason (optional), then confirm.',
@@ -325,7 +323,6 @@
325
323
  'jobStop.title': 'Stop background job',
326
324
  'jobStop.subtitle': 'This cannot be undone; running work will be interrupted.',
327
325
  'jobStop.close': 'Close',
328
- 'jobStop.hint': 'Enter to confirm · Esc to cancel',
329
326
  'jobStop.reasonLabel': 'Stop reason (optional)',
330
327
  'jobStop.reasonPlaceholder': 'e.g. the result is no longer needed',
331
328
  'jobStop.reasonNote': 'The reason is appended to the notice injected into the session when the job settles.',
@@ -333,14 +330,14 @@
333
330
  'jobStop.confirm': 'Stop job',
334
331
  'jobStop.stopping': 'Stopping…',
335
332
  'jobStop.failed': 'Could not stop the job: {message}',
336
- 'update.button': 'Update version',
337
- 'update.title': 'Update plugin',
338
- 'update.subtitle': 'Choose a version; the old one is removed and the new one installed.',
333
+ 'update.button': 'Install',
334
+ 'update.title': 'Install plugin',
335
+ 'update.subtitle': 'Install the version in the input; the installed copy is removed first.',
339
336
  'update.current': 'Current version',
340
337
  'update.versionLabel': 'Version',
341
338
  'update.versionPlaceholder': 'Type a version or pick one from the list',
342
339
  'update.loadingVersions': 'Reading versions from the registry…',
343
- 'update.loading': 'Reading the plugin…',
340
+ 'update.loading': 'Reading the plugin and its versions…',
344
341
  'update.chooseVersion': 'Choose',
345
342
  'update.hideVersions': 'Hide list',
346
343
  'update.versionsCount': '{count} versions',
@@ -355,7 +352,7 @@
355
352
  'update.registryMirror': 'Mainland China mirror',
356
353
  'update.registryCustom': 'Custom address',
357
354
  'update.registryFrom': 'Versions came from {registry}',
358
- 'update.start': 'Update',
355
+ 'update.start': 'Install',
359
356
  'update.cancel': 'Cancel',
360
357
  'update.close': 'Close',
361
358
  'update.step.checking': 'Checking the version…',
@@ -376,14 +373,14 @@
376
373
  'update.restartUnsupported': 'This runtime cannot restart itself: {reason}',
377
374
  'update.restarting': 'DSH is restarting; this window will close…',
378
375
  'update.restartFailed': 'Restart request failed: {message}',
379
- 'update.selfUpdateWarning': 'Updating Power-Up removes and reinstalls it in the background; this panel closes, then refresh the page.',
380
- 'update.selfUpdating': 'Power-Up is updating in the background…',
376
+ 'update.selfUpdateWarning': 'Installing Power-Up removes and reinstalls it in the background; this panel closes, then refresh the page.',
377
+ 'update.selfUpdating': 'Power-Up is installing in the background…',
381
378
  'update.selfRefresh': 'Refresh the page when it finishes.',
382
379
  'update.setDefault': 'Set as default',
383
380
  'update.defaultTag': 'Default',
384
- 'update.defaultHint': 'The update list starts from this registry',
381
+ 'update.defaultHint': 'The install list starts from this registry',
385
382
  'restart.tag': 'Restart needed',
386
- 'restart.tagHint': 'Updated; restart DSH to apply',
383
+ 'restart.tagHint': 'Installed; restart DSH to apply',
387
384
  'restart.pending': '{count} plugins need a restart',
388
385
  'restart.none': 'No plugins need a restart',
389
386
  'restart.action': 'Restart DSH',
@@ -391,41 +388,40 @@
391
388
  'restart.desc': 'Restarting closes and reopens DSH; running tasks are interrupted.',
392
389
  'restart.cancel': 'Cancel',
393
390
  'restart.confirm': 'Restart now',
394
- 'update.doneTitle': 'Update complete',
395
- 'update.doneInstalled': '{name} is now on {version}.',
391
+ 'update.doneTitle': 'Install complete',
392
+ 'update.doneInstalled': '{name} installed {version}.',
396
393
  'update.doneDisabled': '{name} {version} is installed but not enabled.',
397
394
  'update.doneEnabled': 'The new version is enabled.',
398
395
  'update.doneRestart': 'Some changes apply only after DSH restarts.',
399
396
  'update.doneAutoClose': 'This panel closes itself in {seconds} seconds.',
400
397
  'update.doneButton': 'Done',
401
- 'update.oneClick': 'One-click update',
402
- 'update.oneClickTitle': 'One-click update',
403
- 'update.oneClickHint': 'Installs the newest version ({version}) and skips the enable and restart questions.',
398
+ 'update.oneClick': 'One-click install',
399
+ 'update.oneClickTitle': 'One-click install',
400
+ 'update.oneClickHint': 'Installs the version in the input ({version}) and skips the enable and restart questions.',
404
401
  'update.oneClickDefaults': 'Auto-enable: {enable} · Auto-restart: {restart}. Change these on the Power-Up page.',
405
402
  'update.on': 'on',
406
403
  'update.off': 'off',
407
- 'update.oneClickNoLatest': 'The newest version is not available yet. Retry or pick a version manually.',
408
- 'update.oneClickUpToDate': 'Already up to date.',
409
- 'update.oneClickEnableFailed': 'The new version is installed but could not be enabled. Enable it on the Plugins page.',
404
+ 'update.oneClickNoVersion': 'Type or choose a version to install first.',
405
+ 'update.oneClickEnableFailed': 'The version is installed but could not be enabled. Enable it on the Plugins page.',
410
406
  'update.oneClickSkippedEnable': 'Left disabled as configured; enable it on the Plugins page when ready.',
411
- 'update.errorTitle': 'Update failed',
407
+ 'update.errorTitle': 'Install failed',
412
408
  'update.rollbackOkTitle': 'Previous version restored',
413
- 'update.rollbackOkDesc': 'The update failed, so {name} was rolled back to {version} and is ready to use.',
409
+ 'update.rollbackOkDesc': 'The install failed, so {name} was rolled back to {version} and is ready to use.',
414
410
  'update.rollbackFailedTitle': 'Could not restore the previous version',
415
411
  'update.rollbackFailedDesc': 'Automatic rollback failed: {message}. Reinstall it from the Plugins page with “Add plugin”.',
416
412
  'update.rollbackUnavailable': 'The previous version is unknown, so no automatic rollback was possible. Reinstall it from the Plugins page.',
417
- 'update.selfTitle': 'Update Power-Up with Add plugin',
418
- 'update.selfDesc': 'Updating Power-Up removes this plugin first, which interrupts this flow.',
419
- 'update.notRemovable': 'DSH manages this plugin; it cannot be updated here.',
413
+ 'update.selfTitle': 'Install Power-Up with Add plugin',
414
+ 'update.selfDesc': 'Installing Power-Up removes this plugin first, which interrupts this flow.',
415
+ 'update.notRemovable': 'DSH manages this plugin; it cannot be installed here.',
420
416
  'update.notBundle': 'This package is not a DSH plugin bundle.',
421
417
  'update.alreadyInstalled': 'This package is already installed; remove the old version first.',
422
418
  'update.notFound': 'That version is not available from the registry.',
423
- 'update.cancelled': 'The update was cancelled.',
419
+ 'update.cancelled': 'The install was cancelled.',
424
420
  'update.installedChip': 'Not installed',
425
421
  'update.unknown': 'Unknown error',
426
422
  'update.invalidVersion': 'Enter a valid version, for example 1.2.3.',
427
423
  'update.stopProfile': 'This profile cannot hot-remove the plugin; restart DSH and try again.',
428
- 'update.unsupportedTitle': 'Cannot update automatically',
424
+ 'update.unsupportedTitle': 'Cannot install automatically',
429
425
  },
430
426
  };
431
427
 
@@ -838,36 +834,35 @@
838
834
  .dsh-powerup-menu-foot-id{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--dsw-font-family-code,ui-monospace,SFMono-Regular,Consolas,monospace)}
839
835
  .dsh-powerup-toast{position:fixed;left:50%;bottom:30px;transform:translateX(-50%);z-index:1001;max-width:min(440px,calc(100vw - 32px));padding:7px 12px;border:1px solid var(--dsw-alias-border-l2);border-radius:8px;background:var(--dsw-alias-bg-overlay,var(--dsw-alias-bg-layer-1));color:var(--dsw-alias-label-primary);box-shadow:var(--dsw-elevation-lv2,0 8px 24px rgba(15,23,42,.18));font-size:12px;line-height:1.45;pointer-events:none;animation:dsh-powerup-toast-in .14s ease-out}
840
836
  @keyframes dsh-powerup-toast-in{from{opacity:0;transform:translate(-50%,5px)}to{opacity:1;transform:translate(-50%,0)}}
841
- .dsh-powerup-jobstop{position:fixed;z-index:1400;box-sizing:border-box;display:flex;flex-direction:column;gap:12px;padding:14px;border:.5px solid var(--dsw-alias-border-l2);border-radius:14px;background:var(--dsw-alias-bg-overlay,var(--dsw-alias-bg-layer-1));box-shadow:var(--dsw-elevation-prominent,0 18px 44px rgba(15,23,42,.26),0 2px 8px rgba(15,23,42,.12));color:var(--dsw-alias-label-primary);font-size:13px;line-height:1.5;pointer-events:auto;overflow-y:auto;--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);animation:dsh-powerup-jobstop-in .16s cubic-bezier(.2,.8,.3,1)}
842
- @keyframes dsh-powerup-jobstop-in{from{opacity:0;transform:translateY(4px) scale(.99)}to{opacity:1;transform:none}}
843
- .dsh-powerup-jobstop-head{display:flex;align-items:flex-start;gap:10px}
844
- .dsh-powerup-jobstop-icon{flex:none;display:flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:9px;background:color-mix(in srgb,var(--dsw-alias-state-error-primary) 12%,transparent);color:var(--dsw-alias-state-error-primary)}
845
- .dsh-powerup-jobstop-heading{display:flex;flex:1 1 auto;flex-direction:column;gap:1px;min-width:0}
846
- .dsh-powerup-jobstop-title{color:var(--dsw-alias-label-primary);font-size:13.5px;line-height:19px;font-weight:600}
847
- .dsh-powerup-jobstop-subtitle{color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:16px}
848
- .dsh-powerup-jobstop-close{flex:none;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;margin:-3px -3px 0 0;padding:0;border:0;border-radius:6px;background:transparent;color:var(--dsw-alias-label-tertiary);font:inherit;font-size:16px;line-height:1;cursor:pointer}
849
- .dsh-powerup-jobstop-close:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover,var(--dsw-alias-bg-layer-2));color:var(--dsw-alias-label-primary)}
850
- .dsh-powerup-jobstop-label{display:flex;align-items:center;gap:8px;min-width:0;margin:0;padding:7px 10px;border:.5px solid var(--dsw-alias-border-l1);border-radius:9px;background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-secondary);font-family:var(--dsw-font-family-code,ui-monospace,SFMono-Regular,Consolas,monospace);font-size:11.5px;line-height:17px}
851
- .dsh-powerup-jobstop-dot{flex:none;width:7px;height:7px;border-radius:50%;background:var(--dsw-alias-state-success-primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--dsw-alias-state-success-primary) 14%,transparent)}
852
- .dsh-powerup-jobstop-label-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
837
+ .dsh-powerup-jobstop{position:fixed;z-index:1400;box-sizing:border-box;display:flex;flex-direction:column;padding:0 0 16px;border:0;border-radius:var(--dsw-radius-panel);background:var(--dsw-alias-bg-layer-2);box-shadow:var(--dsw-elevation-prominent);--dsw-elevation-stroke-color:var(--dsw-alias-border-l2);color:var(--dsw-alias-label-primary);font-size:12px;line-height:18px;pointer-events:auto;overflow-y:auto;--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);animation:dsh-powerup-jobstop-in .16s ease-out}
838
+ @keyframes dsh-powerup-jobstop-in{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
839
+ .dsh-powerup-jobstop-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;padding:18px 12px 6px 20px}
840
+ .dsh-powerup-jobstop-heading{display:flex;flex-direction:column;gap:2px;min-width:0}
841
+ .dsh-powerup-jobstop-title{color:var(--dsw-alias-label-primary);font-size:16px;line-height:24px;font-weight:500}
842
+ .dsh-powerup-jobstop-subtitle{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}
843
+ .dsh-powerup-jobstop-close{flex:none;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;margin:-4px -2px 0 0;padding:0;border:0;border-radius:var(--dsw-radius-sm);background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:18px;line-height:1;cursor:pointer}
844
+ .dsh-powerup-jobstop-close:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
845
+ .dsh-powerup-jobstop-label{display:flex;align-items:center;gap:6px;min-width:0;margin:6px 20px 0;font-size:11.5px;line-height:18px}
846
+ .dsh-powerup-jobstop-dot{flex:none;width:6px;height:6px;border-radius:50%;background:var(--dsw-alias-state-success-primary)}
847
+ .dsh-powerup-jobstop-kind{flex:none;padding:0 5px;border-radius:var(--dsw-radius-xs);background:var(--dsw-specific-menu);color:var(--dsw-alias-label-tertiary);font-family:var(--dsw-font-family-code,ui-monospace,SFMono-Regular,Consolas,monospace);font-size:10.5px;line-height:16px}
848
+ .dsh-powerup-jobstop-label-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-primary);font-family:var(--dsw-font-family-code,ui-monospace,SFMono-Regular,Consolas,monospace);font-size:11.5px;line-height:18px}
849
+ .dsh-powerup-jobstop-body{display:flex;flex-direction:column;gap:12px;margin-top:12px;padding:0 20px}
853
850
  .dsh-powerup-jobstop-field{display:flex;flex-direction:column;gap:6px;min-width:0}
854
- .dsh-powerup-jobstop-field-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
855
851
  .dsh-powerup-jobstop-field-label{color:var(--dsw-alias-label-secondary);font-size:11.5px;line-height:17px}
856
- .dsh-powerup-jobstop-count{color:var(--dsw-alias-label-caption);font-size:10.5px;line-height:16px;font-variant-numeric:tabular-nums}
857
- .dsh-powerup-jobstop-input{box-sizing:border-box;width:100%;height:36px;padding:0 11px;border:.5px solid var(--dsw-alias-border-l2);border-radius:9px;background:var(--dsw-alias-bg-layer-3);color:var(--dsw-alias-label-primary);font:inherit;font-size:13px;line-height:20px;outline:none;transition:border-color .14s ease,box-shadow .14s ease}
858
- .dsh-powerup-jobstop-input::placeholder{color:var(--dsw-alias-label-caption)}
859
- .dsh-powerup-jobstop-input:focus{border-color:var(--dsw-alias-state-business-primary);box-shadow:inset 0 0 0 .5px var(--dsw-alias-state-business-primary)}
852
+ .dsh-powerup-jobstop-input{box-sizing:border-box;width:100%;height:34px;padding:0 12px;border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-3);color:var(--dsw-alias-label-primary);font:inherit;font-size:13px;line-height:1.5;outline:none;transition:border-color .14s ease}
853
+ .dsh-powerup-jobstop-input::placeholder{color:var(--dsw-alias-label-dimmed)}
854
+ .dsh-powerup-jobstop-input:focus-visible{outline:none;border-color:var(--dsw-alias-state-business-primary)}
855
+ .dsh-powerup-jobstop-input:disabled{color:var(--dsw-alias-label-tertiary);cursor:default}
860
856
  .dsh-powerup-jobstop-note{margin:0;color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:16px}
861
- .dsh-powerup-jobstop-error{margin:0;padding:7px 9px;border:.5px solid color-mix(in srgb,var(--dsw-alias-state-error-primary) 32%,transparent);border-radius:8px;background:color-mix(in srgb,var(--dsw-alias-state-error-primary) 8%,transparent);color:var(--dsw-alias-state-error-primary);font-size:11.5px;line-height:17px;overflow-wrap:anywhere}
862
- .dsh-powerup-jobstop-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;padding-top:2px}
863
- .dsh-powerup-jobstop-hint{color:var(--dsw-alias-label-tertiary);font-size:10.5px;line-height:16px;white-space:nowrap}
864
- .dsh-powerup-jobstop-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px}
865
- .dsh-powerup-jobstop-cancel{height:32px;padding:0 12px;border:0;border-radius:8px;background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:12.5px;line-height:18px;cursor:pointer}
866
- .dsh-powerup-jobstop-cancel:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover,var(--dsw-alias-bg-layer-2));color:var(--dsw-alias-label-primary)}
867
- .dsh-powerup-jobstop-confirm{height:32px;padding:0 13px;border:0;border-radius:8px;background:var(--dsw-alias-state-error-primary);color:var(--dsw-alias-label-primary-foreground);font:inherit;font-size:12.5px;line-height:18px;font-weight:500;cursor:pointer;transition:background .14s ease,opacity .14s ease}
868
- .dsh-powerup-jobstop-confirm:hover:not(:disabled){background:color-mix(in srgb,var(--dsw-alias-state-error-primary) 86%,var(--dsw-alias-label-primary))}
869
- .dsh-powerup-jobstop-confirm:disabled,.dsh-powerup-jobstop-cancel:disabled,.dsh-powerup-jobstop-close:disabled{opacity:.55;cursor:default}
870
- .dsh-powerup-jobstop-cancel:focus-visible,.dsh-powerup-jobstop-confirm:focus-visible,.dsh-powerup-jobstop-close:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:1px}
857
+ .dsh-powerup-jobstop-error{margin:0;color:var(--dsw-alias-state-error-primary);font-size:11.5px;line-height:17px;overflow-wrap:anywhere}
858
+ .dsh-powerup-jobstop-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:14px 20px 0}
859
+ .dsh-powerup-jobstop-cancel{height:36px;padding:0 14px;border:0;border-radius:var(--dsw-radius-md);background:transparent;color:var(--dsw-alias-label-primary);font:inherit;font-size:14px;line-height:22px;cursor:pointer}
860
+ .dsh-powerup-jobstop-cancel:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}
861
+ .dsh-powerup-jobstop-cancel:active:not(:disabled){background:var(--dsw-alias-interactive-bg-active)}
862
+ .dsh-powerup-jobstop-confirm{height:36px;padding:0 14px;border:.5px solid color-mix(in srgb,var(--dsw-alias-state-error-primary) 45%,transparent);border-radius:var(--dsw-radius-md);background:color-mix(in srgb,var(--dsw-alias-state-error-primary) 12%,transparent);color:var(--dsw-alias-state-error-primary);font:inherit;font-size:14px;line-height:22px;cursor:pointer;transition:background .14s ease}
863
+ .dsh-powerup-jobstop-confirm:hover:not(:disabled){background:color-mix(in srgb,var(--dsw-alias-state-error-primary) 18%,transparent)}
864
+ .dsh-powerup-jobstop-confirm:disabled,.dsh-powerup-jobstop-cancel:disabled,.dsh-powerup-jobstop-close:disabled{opacity:.4;cursor:not-allowed}
865
+ .dsh-powerup-jobstop-cancel:focus-visible,.dsh-powerup-jobstop-confirm:focus-visible,.dsh-powerup-jobstop-close:focus-visible,.dsh-powerup-jobstop-input:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:1px}
871
866
  @media (prefers-reduced-motion:reduce){.dsh-powerup-jobstop{animation:none}}
872
867
  .dsh-powerup-update-button{flex:none;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:0;border-radius:var(--dsw-radius-sm,6px);background:transparent;color:var(--dsw-alias-label-caption);cursor:pointer}
873
868
  .dsh-powerup-update-button:hover{background:var(--dsw-alias-interactive-bg-hover,var(--dsw-alias-bg-layer-2));color:var(--dsw-alias-label-secondary)}
@@ -1734,30 +1729,14 @@
1734
1729
  }
1735
1730
 
1736
1731
  /**
1737
- * The version a one-click update targets: the registry's `latest` tag,
1738
- * falling back to the first row of the already sorted version list.
1739
- * @param {{ latest?: unknown, versions?: unknown }} view
1740
- * @returns {string} a concrete version, or '' when none is known yet.
1732
+ * The version both install paths target: whatever is in the dialog's
1733
+ * version input. One-click install reads the same input instead of the
1734
+ * registry's newest version, so it can also reinstall or downgrade.
1735
+ * @param {{ version?: unknown }} view
1736
+ * @returns {string} a concrete version, or '' when the input is invalid.
1741
1737
  */
1742
- function oneClickVersion(view) {
1743
- const declared = normalizeVersionInput(view?.latest);
1744
- if (declared !== '') return declared;
1745
- const first = Array.isArray(view?.versions) ? view.versions[0] : null;
1746
- return normalizeVersionInput(first);
1747
- }
1748
-
1749
- /**
1750
- * Whether a target version is strictly newer than the installed one.
1751
- * @param {unknown} target
1752
- * @param {unknown} current
1753
- * @returns {boolean}
1754
- */
1755
- function isUpdateAvailable(target, current) {
1756
- const version = normalizeVersionInput(target);
1757
- if (version === '') return false;
1758
- const installed = normalizeVersionInput(current);
1759
- if (installed === '') return true;
1760
- return compareVersionsDesc(version, installed) < 0;
1738
+ function installVersion(view) {
1739
+ return normalizeVersionInput(view?.version);
1761
1740
  }
1762
1741
 
1763
1742
  /** A display title for a bundle, following the page's locale fallback. */
@@ -2308,7 +2287,7 @@
2308
2287
  };
2309
2288
 
2310
2289
  if (target === null) return null;
2311
- const placement = popoverPlacement({ getBoundingClientRect: () => target.rect }, 340, 260);
2290
+ const placement = popoverPlacement({ getBoundingClientRect: () => target.rect }, 340, 300);
2312
2291
  // The body portal escapes every slot's stacking context, so the same
2313
2292
  // panel is above the host jobs menu (z-index 100) in both themes.
2314
2293
  return renderInBody(h('div', {
@@ -2339,7 +2318,6 @@
2339
2318
  },
2340
2319
  },
2341
2320
  h('div', { className: 'dsh-powerup-jobstop-head' },
2342
- h('div', { className: 'dsh-powerup-jobstop-icon' }, h(StopIcon, { size: 14 })),
2343
2321
  h('div', { className: 'dsh-powerup-jobstop-heading' },
2344
2322
  h('span', { className: 'dsh-powerup-jobstop-title' }, t('jobStop.title')),
2345
2323
  h('span', { className: 'dsh-powerup-jobstop-subtitle' }, t('jobStop.subtitle')),
@@ -2355,42 +2333,41 @@
2355
2333
  ),
2356
2334
  h('div', { className: 'dsh-powerup-jobstop-label', title: target.job.label },
2357
2335
  h('span', { className: 'dsh-powerup-jobstop-dot', 'aria-hidden': 'true' }),
2336
+ typeof target.job.kind === 'string' && target.job.kind !== ''
2337
+ ? h('span', { className: 'dsh-powerup-jobstop-kind' }, target.job.kind)
2338
+ : null,
2358
2339
  h('span', { className: 'dsh-powerup-jobstop-label-text' }, target.job.label),
2359
2340
  ),
2360
- h('label', { className: 'dsh-powerup-jobstop-field' },
2361
- h('span', { className: 'dsh-powerup-jobstop-field-head' },
2341
+ h('div', { className: 'dsh-powerup-jobstop-body' },
2342
+ h('label', { className: 'dsh-powerup-jobstop-field' },
2362
2343
  h('span', { className: 'dsh-powerup-jobstop-field-label' }, t('jobStop.reasonLabel')),
2363
- h('span', { className: 'dsh-powerup-jobstop-count' }, `${reason.length}/${JOB_STOP_REASON_MAX}`),
2364
- ),
2365
- h('input', {
2366
- ref: inputRef,
2367
- className: 'dsh-powerup-jobstop-input',
2368
- type: 'text',
2369
- value: reason,
2370
- maxLength: JOB_STOP_REASON_MAX,
2371
- placeholder: t('jobStop.reasonPlaceholder'),
2372
- disabled: pending,
2373
- onChange: (event) => setReason(event.target.value),
2374
- }),
2375
- ),
2376
- h('p', { className: 'dsh-powerup-jobstop-note' }, t('jobStop.reasonNote')),
2377
- error === null ? null : h('p', { className: 'dsh-powerup-jobstop-error', role: 'alert' }, error),
2378
- h('div', { className: 'dsh-powerup-jobstop-foot' },
2379
- h('span', { className: 'dsh-powerup-jobstop-hint' }, t('jobStop.hint')),
2380
- h('div', { className: 'dsh-powerup-jobstop-actions' },
2381
- h('button', {
2382
- type: 'button',
2383
- className: 'dsh-powerup-jobstop-cancel',
2384
- disabled: pending,
2385
- onClick: close,
2386
- }, t('jobStop.cancel')),
2387
- h('button', {
2388
- type: 'button',
2389
- className: 'dsh-powerup-jobstop-confirm',
2344
+ h('input', {
2345
+ ref: inputRef,
2346
+ className: 'dsh-powerup-jobstop-input',
2347
+ type: 'text',
2348
+ value: reason,
2349
+ maxLength: JOB_STOP_REASON_MAX,
2350
+ placeholder: t('jobStop.reasonPlaceholder'),
2390
2351
  disabled: pending,
2391
- onClick: () => { void submit(); },
2392
- }, pending ? t('jobStop.stopping') : t('jobStop.confirm')),
2352
+ onChange: (event) => setReason(event.target.value),
2353
+ }),
2393
2354
  ),
2355
+ h('p', { className: 'dsh-powerup-jobstop-note' }, t('jobStop.reasonNote')),
2356
+ error === null ? null : h('p', { className: 'dsh-powerup-jobstop-error', role: 'alert' }, error),
2357
+ ),
2358
+ h('div', { className: 'dsh-powerup-jobstop-actions' },
2359
+ h('button', {
2360
+ type: 'button',
2361
+ className: 'dsh-powerup-jobstop-cancel',
2362
+ disabled: pending,
2363
+ onClick: close,
2364
+ }, t('jobStop.cancel')),
2365
+ h('button', {
2366
+ type: 'button',
2367
+ className: 'dsh-powerup-jobstop-confirm',
2368
+ disabled: pending,
2369
+ onClick: () => { void submit(); },
2370
+ }, pending ? t('jobStop.stopping') : t('jobStop.confirm')),
2394
2371
  )));
2395
2372
  }
2396
2373
 
@@ -2679,13 +2656,16 @@
2679
2656
  currentVersion: pkg.version ?? null,
2680
2657
  installed: pkg.installed === true,
2681
2658
  enabled: pkg.enabled !== false,
2682
- phase: 'choose',
2683
2659
  choices,
2684
2660
  registryKey: choice.key,
2685
2661
  defaultRegistryKey: starred === undefined ? null : starred.key,
2686
2662
  versionsState: 'loading',
2687
2663
  });
2664
+ // Keep the loading spinner until the mirror's version list has
2665
+ // settled, so the chooser never flashes with an empty list.
2688
2666
  await loadVersions(token, name, choice, choices, false);
2667
+ if (tokenRef.current !== token) return;
2668
+ patch(token, { phase: 'choose' });
2689
2669
  } catch (error) {
2690
2670
  patch(token, { phase: 'error', error: errorText(error) || t('update.unknown') });
2691
2671
  }
@@ -2926,20 +2906,16 @@
2926
2906
  if (token === null || current === null || current.phase !== 'choose') return;
2927
2907
  const t = tRef.current;
2928
2908
  const oneClick = options?.oneClick === true;
2929
- // One-click installs the registry's newest version; the manual path
2930
- // uses what the user typed or picked.
2931
- const version = oneClick ? oneClickVersion(current) : normalizeVersionInput(current.version);
2909
+ // Both paths install the version in the input. One-click only skips
2910
+ // the enable/restart questions, so reinstalling or downgrading works.
2911
+ const version = installVersion(current);
2932
2912
  if (version === '') {
2933
2913
  setView((state) => state === null ? state : {
2934
2914
  ...state,
2935
- formError: t(oneClick ? 'update.oneClickNoLatest' : 'update.invalidVersion'),
2915
+ formError: t(oneClick ? 'update.oneClickNoVersion' : 'update.invalidVersion'),
2936
2916
  });
2937
2917
  return;
2938
2918
  }
2939
- if (oneClick && isUpdateAvailable(version, current.currentVersion) !== true) {
2940
- setView((state) => state === null ? state : { ...state, formError: t('update.oneClickUpToDate') });
2941
- return;
2942
- }
2943
2919
  const choice = current.choices.find((item) => item.key === current.registryKey) ?? current.choices[0];
2944
2920
  const registry = registryValue(choice);
2945
2921
  const spec = `${current.name}@${version}`;
@@ -3235,12 +3211,9 @@
3235
3211
  const canClose = !busy;
3236
3212
  const title = view.title === undefined || view.title === '' ? view.name : view.title;
3237
3213
  const showVersions = view.phase === 'choose' && view.listOpen === true;
3238
- // The newest version a one-click update would install right now.
3239
- const quickVersion = oneClickVersion(view);
3240
- const quickAvailable = view.self !== true
3241
- && view.versionsState === 'ready'
3242
- && quickVersion !== ''
3243
- && isUpdateAvailable(quickVersion, view.currentVersion);
3214
+ // One-click install uses exactly what the version input holds.
3215
+ const quickVersion = installVersion(view);
3216
+ const quickAvailable = view.self !== true && quickVersion !== '';
3244
3217
 
3245
3218
  const footer = (() => {
3246
3219
  if (view.phase === 'choose') {
@@ -3255,16 +3228,14 @@
3255
3228
  disabled: !quickAvailable,
3256
3229
  title: quickAvailable
3257
3230
  ? t('update.oneClickHint', { version: quickVersion })
3258
- : quickVersion === ''
3259
- ? t('update.oneClickNoLatest')
3260
- : t('update.oneClickUpToDate'),
3231
+ : t('update.oneClickNoVersion'),
3261
3232
  onClick: () => startUpdate({ oneClick: true }),
3262
3233
  }, h(QuickIcon, { size: 13 }), t('update.oneClick')),
3263
3234
  h('button', {
3264
3235
  key: 'start',
3265
3236
  type: 'button',
3266
3237
  className: 'dsh-powerup-update-primary',
3267
- disabled: view.versionsState === 'loading' || String(view.version ?? '').trim() === '',
3238
+ disabled: quickVersion === '',
3268
3239
  onClick: () => startUpdate(),
3269
3240
  }, t('update.start')),
3270
3241
  ].filter(Boolean);
@@ -3438,9 +3409,7 @@
3438
3409
  ),
3439
3410
  h('p', { className: 'dsh-powerup-update-note' }, quickAvailable
3440
3411
  ? t('update.oneClickHint', { version: quickVersion })
3441
- : quickVersion === ''
3442
- ? t('update.oneClickNoLatest')
3443
- : t('update.oneClickUpToDate')),
3412
+ : t('update.oneClickNoVersion')),
3444
3413
  quickAvailable
3445
3414
  ? h('p', { className: 'dsh-powerup-update-note' }, t('update.oneClickDefaults', {
3446
3415
  enable: getSettings().oneClickEnable === false ? t('update.off') : t('update.on'),
@@ -4106,8 +4075,7 @@
4106
4075
  readRememberedRegistry,
4107
4076
  packageDisplayTitle,
4108
4077
  normalizeVersionInput,
4109
- oneClickVersion,
4110
- isUpdateAvailable,
4078
+ installVersion,
4111
4079
  readSettings,
4112
4080
  getSettings,
4113
4081
  setSettings,
package/locale/en.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "Power-Up",
4
- "description": "Adds a right-click action menu to the Trajectory ledger: copy a record, copy a Markdown quote, quote it into the composer, open the record inspector, fork the session at that record, export the trajectory snapshot, and copy the session ID. The session header's background jobs panel gains an optional stop reason when a job is stopped by hand; the reason is appended to the completion notice injected into the session. The Plugins page gains an update control on every third-party installed plugin: choose a version from the registry, uninstall the old copy, reinstall through the Add plugin path, then enable and optionally restart DSH. The update panel also offers a one-click update that installs the newest version without the enable and restart questions, enabling and restarting automatically by default; both defaults are configurable on the Power-Up page."
4
+ "description": "Adds a right-click action menu to the Trajectory ledger: copy a record, copy a Markdown quote, quote it into the composer, open the record inspector, fork the session at that record, export the trajectory snapshot, and copy the session ID. The session header's background jobs panel gains an optional stop reason when a job is stopped by hand; the reason is appended to the completion notice injected into the session. The Plugins page gains an install control on every third-party installed plugin: read versions from the registry, install the version in the input through the Add plugin path (removing the old copy first), then enable and optionally restart DSH. The install panel also offers a one-click install that installs the input version without the enable and restart questions, enabling and restarting automatically by default; both defaults are configurable on the Power-Up page."
5
5
  }
6
6
  }
package/locale/zh.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "Power-Up",
4
- "description": "在轨迹页面为记录增加右键操作菜单:复制内容、复制 Markdown 引用、引用到输入框、查看记录详情、从该记录 Fork 会话、导出轨迹快照、复制会话 ID。在会话顶部的后台任务面板手动停止任务时可以填写停止原因,原因会附加在任务结束后注入会话的提示里。插件页为每个第三方已安装插件增加更新按钮:从安装源选择版本,先卸载旧版再按「添加插件」流程安装,完成后可立即启用并选择是否重启 DSH。插件更新面板还提供「一键更新」:安装最新版本并跳过启用与重启的询问,默认自动启用并重启,可在 Power-Up 页面调整默认行为。"
4
+ "description": "在轨迹页面为记录增加右键操作菜单:复制内容、复制 Markdown 引用、引用到输入框、查看记录详情、从该记录 Fork 会话、导出轨迹快照、复制会话 ID。在会话顶部的后台任务面板手动停止任务时可以填写停止原因,原因会附加在任务结束后注入会话的提示里。插件页为每个第三方已安装插件增加安装按钮:从安装源读取版本,按输入框中的版本先卸载旧版再按「添加插件」流程安装,完成后可立即启用并选择是否重启 DSH。安装面板还提供「一键安装」:按输入框版本安装并跳过启用与重启的询问,默认自动启用并重启,可在 Power-Up 页面调整默认行为。"
5
5
  }
6
6
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@restregular/dsh-powerup",
3
- "version": "0.5.1",
4
- "description": "Power-Up — small, opt-in upgrades for DeepSeek Harness. Adds a right-click action menu to the Trajectory ledger, an optional stop reason in the session header's background jobs panel (appended to the injected completion notice), and an update control for third-party plugins installed from the Plugins page, with version lookup from the configured registries, a starred default source, uninstall-and-reinstall through the Add plugin path, restart-needed markers, a background self-update, and an optional DSH restart, plus a one-click update that installs the newest version and can enable and restart automatically. · 为 DeepSeek Harness 提供小型增强:在轨迹页面右键记录即可复制、引用、查看详情或从该记录 Fork;在会话顶部的后台任务面板手动停止任务时可填写停止原因,原因会附加到任务结束后的会话提示;并在插件页为已安装插件提供带版本查询的更新按钮,安装源可设默认,沿用「添加插件」的安装流程,支持待重启标记、后台自更新与一键重启;插件更新面板提供「一键更新」,默认安装最新版后自动启用并重启,可在 Power-Up 页面调整默认行为。",
3
+ "version": "0.6.1",
4
+ "description": "Power-Up — small, opt-in upgrades for DeepSeek Harness. Adds a right-click action menu to the Trajectory ledger, an optional stop reason in the session header's background jobs panel (appended to the injected completion notice), and an install control for third-party plugins from the Plugins page: read versions from the configured registries, install the version in the input through the Add plugin path (removing the old copy first), mark restart-needed installs, hand Power-Up's own install to the background, and optionally restart DSH. One-click install skips the enable and restart questions and can apply those actions automatically with configurable defaults. · 为 DeepSeek Harness 提供小型增强:在轨迹页面右键记录即可复制、引用、查看详情或从该记录 Fork;在会话顶部的后台任务面板手动停止任务时可填写停止原因,原因会附加到任务结束后的会话提示;并在插件页为第三方已安装插件提供安装按钮,从安装源读取版本,按输入框中的版本沿用「添加插件」流程安装(先卸载旧版),支持待重启标记、Power-Up 自身后台安装与可选重启;安装面板提供「一键安装」,按输入框版本安装并跳过启用/重启询问,默认自动启用并重启,可在 Power-Up 页面调整默认行为。",
5
5
  "icon": "./icon.svg",
6
6
  "type": "module",
7
7
  "main": "index.js",