rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:RestRegular/dsh-powerup
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Small, opt-in upgrades for DeepSeek Harness. The upgrades include a right-click action menu in the Trajectory view, a copyable step reference that an agent can resolve back into the raw session data, an optional stop reason for background jobs, an in-place plugin installer, and a sidebar launcher that turns the left sidebar's panel list into an adaptive icon grid with drag sorting, folders, a back-to-conversation tile, and restart/close tiles.
dsh plugin --profile web add @restregular/dsh-powerup
Then open a session, switch to Trajectory, and right-click a record row.
Right-click a trajectory record:
dsh-step:<session-id>/<step-id>; the
powerup_step_read tool turns that string back into the raw session data.Right-click empty space in the ledger:
The sidebar Power-Up page turns the menu on or off and lists the available actions. The setting is stored in the browser. It also holds the defaults for one-click install (auto-enable and auto-restart), which the plugin installer uses.
The session header's background jobs panel keeps the host's list, live output,
and stop button. Clicking a running job's stop button opens a themed Power-Up
dialog instead of the host's two-press stop. The dialog is portaled to the
document body, so it renders above the jobs menu (which is itself a body portal)
and is not clipped by any slot's stacking context; its colors come only from
--dsw-alias-* tokens, so light and dark themes both work.
cancelled by the user reason. Enter confirms while Esc cancels.cancelled by the user: <reason>. The completion notice injected into the
session and the shell tool's result therefore carry the reason.↑ / ↓ move, Home / End jump, Enter runs, Esc closes.
Copy step reference copies a single line such as
dsh-step:session-1a2b…/turn.0.step.3. The reference carries the session id
plus a stable step id:
| Step id | Copied from | Resolves to |
|---|---|---|
turn.<turn>.step.<step> |
an assistant row | every raw event between step/start and step/end |
call.<call-id> |
a tool row | that tool call and its tool/result |
seq.<n> |
any other raw-event row | that single event |
index.<n> |
a synthetic row | nothing — the menu disables the action |
Paste the line into the session and the agent can call
powerup_step_read, a read-only Host tool registered while both tools and
sessionQuery are composed:
{ "ref": "dsh-step:session-1a2b…/turn.0.step.3", "requests": false }
It returns the raw events as JSON. Optional arguments: before / after add up
to 50 neighboring events on each side, and requests: true also includes the
request/header snapshots (the full system prompt and tool schemas), which are
omitted by default because they are large. The tool is workspace-agnostic: it
reads the session named in the reference through ctx.sessionQuery, so an agent
can open a step in a session it never had to locate on disk.
The left sidebar's global panel buttons (Conversation, Files, Plugins, and the entries other plugins add) become an icon grid instead of a one-per-row list:
auto-fill grid of
minmax(58px, 1fr) cells, so widening the sidebar adds columns and narrowing
it removes them — there is no fixed column count to break.× removes it from the folder, click the title to
rename the folder, and Ungroup returns every member to the grid.div.panelEntry holding button.panelRow plus
its panelUnpin overlay) and the extra-panels menu in a span.moreAnchor.
The launcher treats any direct child that owns a direct button as one tile:
the wrapper becomes the grid cell and its row button the click target, so the
unpin overlay can be hidden without losing the row. The host's "More" entry is
recognised by aria-haspopup / aria-expanded (or the moreAnchor wrapper),
never by "not a button", so every panel row keeps its own slot id.layout.selectPanel(null) to return
to the Conversation; it highlights when no global panel is selected and can be
placed anywhere by dragging, including into a folder.重启 / Restart opens the same restart confirmation the pending-restart
bar uses: the tile only calls into that React prompt, so there is one dialog,
one capability read (GET /dsh-powerup/api/restart) and one set of copy. The
confirmation explains that running tasks are interrupted; only a runtime that
can relaunch itself (the desktop app) enables the confirm button.关闭 / Close
opens a close confirmation (same dialog and copy conventions as restart) and
posts to GET/POST /dsh-powerup/api/close, which ends the Electron app without
relaunching it. Like the other synthetic tiles it drags anywhere, including
into a folder.localStorage.Open the built-in Plugins page. Every third-party card under Installed plugins gains a small install icon in its action area. Clicking it opens the install dialog:
lib/restart-helper.cjs helper relaunches the exact executable after the old
Host exits; under dsh web the dialog explains that the terminal owns the
process.restart-required keeps 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 installs made through
the built-in Add plugin / Install UI, or before this page loaded, are
marked too.Power-Up installs itself through the same dialog (the one-click action is hidden
for itself). 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.
--dsw-alias-* tokens. The switch follows the
host convention (--dsw-alias-border-l3 / --dsw-alias-switch-thumb off,
--dsw-alias-brand-primary + --dsw-alias-label-primary-foreground on), so
it stays readable in both light and dark themes. The only literal colors live
inside the plugin's brand SVG artwork.icon.svg is the 256px brand tile shown by the
Plugin Manager. The sidebar uses the same double-chevron mark as a 16-grid,
fill:none, stroke:currentColor line 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 is
design/sidebar-icon.svg; the runtime copy lives in client.js.dsh-step:<session-id>/<step-id> — no data, no URL, no port — so
the line survives restarts and can be pasted into any agent. The Host half
registers powerup_step_read when tools and sessionQuery are composed,
resolves the step through sessionQuery.readSession (raw events, ascending
seq), and returns the matching event window as JSON. A nested run_code
sub-call has no raw tool/call event of its own, so it falls back to the step
that owns it. Nothing is written to disk and no public route is added.data-* contracts. If those attributes
change, row-specific actions degrade gracefully; session-level actions in the
empty ledger area keep working.@deepseek-ai/dsh-client-ui-jobs, so Power-Up does not replace it: a capture
listener recognizes its button[data-kill-state], maps the button to the live
row (DOM order plus the row's title label), and opens the reason dialog.
The typed reason goes to POST /dsh-powerup/api/job-kill, which calls the
registry's kill(id, session, reason) — the same admission the built-in
Remote uses, with the reason settlement merges into the job's detail line.<nav>, applies grid/tile CSS, appends
synthetic folder tiles, hides the rows that moved into a folder with an
inline display (React rewrites className when the active panel changes and
would drop an added class), and sorts with the grid's order property. Host
rows are resolved by shape — a direct <button>, or a cell wrapper
(div.panelEntry since 0.2.2, the More Menu root <span>) whose direct
child is that button — so one code path covers both the panel rows and the
more menu, and only aria-haspopup / aria-expanded / moreAnchor marks a
row as More.openRestart and openClose in module-level bridges while it is mounted; the
synthetic restart/close tiles call them, and get the exact confirmations,
capability checks and localized copy the pending-restart bar uses — nothing is
duplicated. If the overlay is not mounted at all (a host without
remote.pluginManager), each tile falls back to a browser confirm over the
same Host route.<nav>
with a MutationObserver, so a write that changes a watched subtree on every
sync turns into an infinite loop — and a loop rebuilds the folder flyout
continuously, which makes normal clicks miss (the node under the pointer is
replaced between pointerdown and click). Setting textContent to the same
string still emits a childList mutation, so the synthetic chat/restart/close
tiles only write their labels when they actually changed, folder tiles rebuild
only when
their signature changed, and the flyout re-renders only when its roster or
name changed. A
MutationObserver re-applies that after every host render, and the module
falls back to the native rail whenever the wide layout disappears.dsh-powerup:launcher:v1 stores
only an order array plus group records. normalizeLauncherState drops panels
that no longer exist (unregistered or unpinned), appends new ones in host
order, and dissolves empty folders, so plugin changes never wedge the layout
or lose the settings of the panels that remain.[data-plugin-group="bundles"] [data-plugin-package] card and re-asserts it
after React renders. Version listing is a plain registry GET; removal and
installation use the same remote.pluginManager calls as Add plugin. The
Host adds three loopback-only routes: /dsh-powerup/api/restart for the
process restart, /dsh-powerup/api/close for closing the app without a
relaunch, and /dsh-powerup/api/self-update for the self-install handoff.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. The Host captures the
version it was loaded from before removal and re-installs that version if the
check or install fails, so a failed self-install does not leave Power-Up
missing.dsh-powerup:settings:v1), so the
Power-Up page and an open dialog agree without a reload. A one-click run
installs disabled — the same shape as Add plugin — then enables through
setBundleEnabled, and posts the restart only when the defaults allow it. With
auto-enable off the new copy stays disabled and nothing restarts. When no
restart happens the completion panel closes on a timer; install, enable, and
restart failures stay on screen with their reason instead.shell.overlay
is an absolute layer at z-index: 20, and the host jobs menu is a
document.body portal at z-index: 100; a high z-index inside the overlay
layer therefore still loses. The reason popover is rendered through
react-dom's createPortal into document.body and uses z-index: 1400.
Its surface (--dsw-alias-bg-layer-2, --dsw-radius-panel,
--dsw-elevation-prominent), 34px input, and buttons mirror the host dialog
and menu primitives; the confirm button reuses the host's armed-stop
treatment (red border, 12% red fill, red text) instead of inventing a solid
danger style. Without react-dom it falls back to in-place rendering.restart-required is written to sessionStorage; the card gets a
Restart needed tag and the group heading gets a count plus a restart
button. The Client also wraps the shared remote.pluginManager methods so an
install started from the built-in Add plugin/Install 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.--dsw-alias-bg-mask-1 with the shared mask blur, the surface is
--dsw-alias-bg-layer-2 with --dsw-radius-panel and
--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.npm test
node test/smoke.mjs loads the real Client module with React/browser doubles,
applies it to a fake slot context, and checks registrations, icons, helpers,
theme tokens, the step-reference copy path, the stop-reason mapping, the Host
routes, and the manifest. node test/host.mjs exercises the step-reference codec
and resolver plus the powerup_step_read tool against a fake sessionQuery and
a raw event log.
MIT © RestRegular
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek、deepseek-harness。