rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:y2zyyr/dsh-restart-control
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Adds a Restart DSH button to DSH Desktop → Settings → General (通用设置). It sits directly below「繁忙时 Enter 键行为」and lets you restart the DSH Desktop application with one click, using DSH's official graceful restart facility.
settings.general.item)ctx.desktopRuntime.requestRestart() → graceful Cordis teardown +
app.relaunch() + app.exit(0)) when a desktop shell is presentdsh --profile web support (v0.1.7): arms a detached relauncher,
then SIGTERMs its own process so the CLI's built-in handler performs the same
graceful Cordis teardown; the relauncher waits for the old pid to die and
re-execs the original argv/cwd verbatim, then the browser panel reloads on
the new generation — still no shell, no kill/pkill/sudoModal + Button primitives) before restarting--dsw-alias-*) — no hardcoded colorsLocal install into a DSH web profile (additive, backed-up edits):
~/.dsh/profiles/web/package.json dependencies:"@y2zyyr/dsh-restart-control": "link:/path/to/dsh-restart-control"
@y2zyyr/dsh-restart-control to dsh.profile.bundles.pnpm install in the profile directory.Naming rule (DSH Desktop ≥ 2.0.2): the dependency key must be exactly the plugin's
package.jsonname(@y2zyyr/dsh-restart-control). The desktop validates that every bundle's resolved manifest name matches its reference name and otherwise refuses to load the whole profile withprofile package identity is invalid. Do not alias the key to a scoped name.
The plugin's own cordis.patch.yml registers the Loader entry; the host half is
loaded by Cordis and the browser half is served as
/plugins/@y2zyyr/dsh-restart-control/client.js.
compatibility or advanced mode —
provides the desktopRuntime service; the button restarts through the
official facade (mode: "desktop").dsh web / --profile web (no desktop shell): the button restarts the
server process itself — graceful SIGTERM teardown + detached relauncher
re-execing the captured argv/cwd (mode: "web"). Requires a real Node host
process (always true for the host half); if spawning the relauncher fails the
route returns 500 and keeps the server up.^0.1.0-rc.6 (compatible with the DeepSeek Harness Desktop runtime 0.1.0-rc.7; v0.1.1 widened the range so the DSH Desktop market verifier accepts the package).The host half registers a browser-trust-fenced route (/dsh-restart-control/api,
loopback / same-origin only) and calls the official
ctx.desktopRuntime.requestRestart() when a desktop shell is present. The
official implementation disposes the whole Cordis plugin tree (flushing settings /
session state, 5 s grace), then app.relaunch() + app.exit(0). This is a
graceful restart — never a process kill. Without a desktop shell the plugin
uses its web path: it spawns a detached relauncher child FIRST, replies 202, then
sends itself SIGTERM — the dsh CLI installs
process.on("SIGTERM") -> root fiber.dispose(), so the identical graceful
teardown runs before exit. The relauncher polls until the old pid is actually
gone (bounded backstop, never double-spawns) and re-execs the captured
argv/cwd verbatim. GET /status reports { ok, restartable, mode }.
desktopRuntime
service; the plugin never spawns kill/pkill/osascript/sudo./tmp/dsh-restart-control-test/ used purely for local verification, and it is
never shipped as telemetry.webServer (route) and
optionally desktopRuntime; the client only slots/locale.pnpm installpnpm typecheck (tsc, no emit)pnpm test (node --test; real Cordis integration tests)pnpm build (scripts/build.mjs → lib/index.js + lib/client.js)CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。