rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:chai-yinfeng/dsh-macos-restart
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
dsh-macos-restart)English | 中文
macOS 桌面版一键重启 / One-click restart for the DeepSeek Harness desktop app.
A macOS-only one-click restart for the DeepSeek Harness desktop app. It
handles the Electron app itself, not a dsh web host: the restart is for making
plugins that cannot hot-reload load on the next launch.
This plugin is for the macOS Desktop app. It is not a generic header control
and not a dsh web restart button:
open -a on the .app.dsh web, or a standalone dsh CLI.The community plugin dsh-header-controls also puts restart/exit buttons in the
conversation header, but its documented mechanism is a dsh web launcher +
Windows taskkill/netstat flow. It does not restart the macOS Electron app.
The two plugins overlap only at the header-seat level.
/restart-desktop command. Add --force to restart while a turn runs.The header, sidebar, floating button, Settings page, and command all call the same Host operation.
POST /plugins/dsh-restart/restart with
{ "confirm": true }.state.json, then starts an
independent one-shot opener as a detached /bin/sh. The opener only
waits and opens; it never kills. Do not use launchctl submit for this: in
a real 0.1.4 test the submitted job restarted the opener every ~10s after
the app was back.cancelled, the opener exits without opening,
and the UI shows Restart cancelled. If the main already exited and only
the old host is still flushing, the helper waits for the host without
cancelling — the opener may have already relaunched the app. Only the
explicit stale-manager advanced path uses SIGKILL, with its own warning.open -a "/Applications/DeepSeek Harness.app".
open -a on an already-running app activates it, so the two helpers cannot
start two instances.~/.dsh/dsh-restart/.~/.dsh/dsh-restart/state.json records the last restart's phase:
queued → opener-started/killing → waiting-host → host-exited → waiting-port → port-free → opening → opened (or failed).POST /plugins/dsh-restart/open-logs does the same from the Host, so it works
even when the page has lost its connection. It uses open -R (Finder reveal)
because plain open <file>.log depends on a default application and can look
like a no-op.If the plugin manager holds its install lock with no pnpm/install progress for
five minutes, pluginOperation.stale becomes true and the dialog offers
Force restart (advanced). It is only available while the lock belongs to
the current host, or when no manager lock exists at all; a live pnpm process is
never bypassed. A force restart kills the host, releases the lock, and reopens
the app — an unfinished install is interrupted, and because it bypasses the
app's own quit confirmation the main process may skip its final account/window
state flush. Use it only when the manager is actually stuck.
Host/Origin, or only Origin; a loopback Host with no Origin is
accepted, and a present Origin must match Host. sec-fetch-site: cross-site is rejected.409 busy; the Client lists the affected session ids
and asks for a second confirmation before sending force: true.423. The only exception is the explicit
advanced force path for a stale manager lock described above.allowRestart: false in cordis.patch.yml disables the operation.app.asar and never starts a second server.- id: dsh-restart
name: 'dsh-macos-restart'
config:
allowRestart: true
lib/index.js — Host routes (/status, /restart, /open-logs), gates,
command, state, helper/opener scheduling.lib/helper.sh — detached killer/opener helper (--dry-run supported).lib/client.js — title-bar icon, sidebar action, Settings page, modal,
floating button, log actions.locale/{en,zh}.json — Plugin Manager display metadata.README.zh.md — Chinese README.PUBLISHING.md — npm + curated-catalog release checklist.See PUBLISHING.md.
The current package name dsh-macos-restart is a local development name; the
publishable artifact is dsh-macos-restart on npm.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。