@restregular/dsh-powerup
Power-Up — small, opt-in upgrades for DeepSeek Harness. Adds a right-click action menu to the Trajectory ledger 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. · 为 DeepSeek Harness 提供小型增强:在轨迹页面右键记录即可复制、引用、查看详情或从该记录 Fork;并在插件页为已安装插件提供带版本查询的更新按钮,安装源可设默认,沿用「添加插件」的安装流程,支持待重启标记、后台自更新与一键重启。 适合需要便捷操作轨迹记录及高效管理第三方插件的进阶用户。
インストール
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:RestRegular/dsh-powerupドキュメント
README 全文を読む ↗Power-Up
Small, opt-in upgrades for DeepSeek Harness. The first upgrade is a right-click action menu in the Trajectory view.
Install
dsh plugin --profile web add @restregular/dsh-powerup
Then open a session, switch to Trajectory, and right-click a record row.
What it does
Right-click a trajectory record:
- Copy content — copy the full text of the record.
- Copy as quote — produce a Markdown blockquote with the record kind.
- Quote in composer — insert that quote into the current input box.
- Open record details — open the host's record inspector.
- Fork from here — fork the session at that record (inclusive).
- Copy session ID.
Right-click empty space in the ledger:
- Export trajectory JSON — save the current trajectory snapshot.
- Copy session ID.
- Open the Power-Up page — the sidebar control panel.
The sidebar Power-Up page turns the menu on or off and lists the available actions. The setting is stored in the browser.
Menu keys
↑ / ↓ move, Home / End jump, Enter runs, Esc closes.
Update a plugin
Open the built-in Plugins page. Every third-party card under Installed plugins gains a small update icon in its action area. Clicking it opens the update dialog:
- The dialog reads the package's published versions from the Host's configured registries — the same list the Add plugin dialog offers, including the npmmirror fallback. Star any registry to make it Power-Up's default for later updates; otherwise the list starts from the Add dialog's remembered choice.
- Type a version or pick one from the floating version list. The current installed version is tagged Current; the newest is tagged latest, and a version that is both uses one Current · latest tag.
- Confirming removes the installed copy, checks the new spec the way Add plugin does, and installs the selected version without enabling it.
- The dialog then asks whether to enable the new version.
- After enabling, it asks whether to restart DSH. On the desktop app the
lib/restart-helper.cjshelper relaunches the exact executable after the old Host exits; underdsh webthe dialog explains that the terminal owns the process. - A management call that reports
restart-requiredkeeps a Restart needed tag on the card and adds the plugin to the count beside the Installed plugins heading. The heading bar is always present — with No plugins need a restart and the restart button when nothing is pending — and a Restart DSH button confirms and performs the same restart. The Host also audits profile bundle directories written after it started, so updates made through the built-in Add plugin / Update UI, or before this page loaded, are marked too.
Power-Up updates itself through the same dialog. Because removing the plugin
unloads this panel, the Host answers first and then hands removeBundle →
inspect → installBundle(enabled: true) to the built-in manager service,
which keeps running after the Power-Up Host fiber is unloaded. The panel closes;
refresh the page when the install finishes.
Design notes
- Theme-safe by construction. Every surface, border, text color, hover and
switch state uses the host's
--dsw-alias-*tokens. The switch follows the host convention (--dsw-alias-border-l3/--dsw-alias-switch-thumboff,--dsw-alias-brand-primary+--dsw-alias-label-primary-foregroundon), so it stays readable in both light and dark themes. The only literal colors live inside the plugin's brand SVG artwork. - Two icons, two jobs.
icon.svgis the 256px brand tile shown by the Plugin Manager. The sidebar uses the same double-chevron mark as a 16-grid,fill:none,stroke:currentColorline drawing, but without the tile frame: the mark gets the full grid, so the chevrons and the amber baseline never collide with a border. The reference line artwork isdesign/sidebar-icon.svg; the runtime copy lives inclient.js. - No imports from Harness Client packages. The menu is plain React + CSS and
observes the trajectory package's own
data-*contracts. If those attributes change, row-specific actions degrade gracefully; session-level actions in the empty ledger area keep working. - The update entry uses the built-in page's contracts. The Plugins page has
no per-card slot, so the overlay injects one button into every
[data-plugin-group="bundles"] [data-plugin-package]card and re-asserts it after React renders. Version listing is a plain registryGET; removal and installation use the sameremote.pluginManagercalls as Add plugin. The Host adds two loopback-only routes:/dsh-powerup/api/restartfor the process restart, and/dsh-powerup/api/self-updatefor the self-update handoff. - Self-update outlives its own unload. The Host route sends its answer, then
a timer starts
removeBundle→inspect→installBundle(enabled: true)through the built-in manager service. Removing the bundle unloads Power-Up's own Host fiber, but the manager service and the pending promise stay in the Host process, so the reinstall finishes; failures are appended to~/.dsh/powerup/self-update.log. - Restart status lives in this browser session. A management result that
says
restart-requiredis written tosessionStorage; the card gets a Restart needed tag and the group heading gets a count plus a restart button. The Client also wraps the sharedremote.pluginManagermethods so an update started from the built-in Add plugin/Update dialogs is observed, and asks the Host audit route for profile bundles whose files are newer than the Host process. A real app restart clears the session, while a page refresh keeps the markers. - The dialog mirrors the host modal. The backdrop is
--dsw-alias-bg-mask-1with the shared mask blur, the surface is--dsw-alias-bg-layer-2with--dsw-radius-paneland--dsw-elevation-prominent, and the primary button uses--dsw-alias-button-primary-fill/-hover, so the dialog follows both themes instead of inventing its own palette. The registry picker and version list are custom controls built from--dsw-alias-*tokens; both open as fixed-position popovers anchored to their triggers, so they never grow the dialog or get clipped by its scroll area.
Development
node test/smoke.mjs
The smoke test loads the real Client module with React/browser doubles, applies it to a fake slot context, and checks registrations, icons, helpers, theme tokens, and the manifest.
License
MIT © RestRegular