⚠️ This repository has been renamed: 7gzgn/dsh-restart-planner — click to visit the new location. Everything below is preserved as originally indexed.

@7gzgn/dsh-self-restart avatar

@7gzgn/dsh-self-restart

Let the agent restart its own DSH host: schedule a self-restart, finish the turn first, then a detached helper stops and relaunches the app and reports what happened.

Plugin
Verification
L5 · Run tested
Verified
Risk
Out of scope
Health
Active
Trust
Gold

Install verification: runtime verified (L5) · tested on dsh 0.2.1-rc.2 · last checked Install verification details →

Install verification badge dsh 0.2.1-rc.2

What it does

Let the agent restart its own DSH host: schedule a self-restart, finish the turn first, then a detached helper stops and relaunches the app and reports what happened.

Installation

dsh plugin --profile web add github:7gzgn/dsh-self-restart
verified

Install method: GitHub · runtime verified (L5)

Verification & Compatibility

Grouped by plugin version: each card lists the dsh versions actually tested against that artifact version and their install verdicts (L5 wins). Untested combinations are omitted — absence means untested, never assumed compatible. L1–L3 are a plugin-level static archive (independent of the dsh version — the same verdict on every dsh row): they sit in each row's level grid next to L4/L5, marked "static", while their evidence is stored once per plugin inside that row's "checks & evidence" instead of being duplicated per version.

External credentials (plugin-level): none detected

Declared DSH compatibilityfrom package.json · peerDependencies
author declared no dsh version requirement

○ The author declares no dsh version requirement — install is not blocked by version.

Install compatibility matrix (rows = plugin versions〔latest 5〕, columns = dsh versions〔latest 5〕)
At-a-glance → evidence in the cards below
plugin \ dshdsh 0.2.1-rc.2
current
dsh 0.2.1-alpha.4
e50147✓○
Install compatibility (by plugin version, dsh versions within)
Legend:✓ L5 runtime verified○ ecosystem plugin◼ ecosystem app✗ failed
e50147github✓ 1 runtime-verified2026-10-19

https://github.com/7gzgn/dsh-self-restart

✓dsh 0.2.1-rc.2current2026-10-19L5 · runtime verified
Environment & artifact
  • • Node.js: v24.14.0
  • • DSH: 0.2.1-rc.2
  • • Plugin artifact: github · https://github.com/7gzgn/dsh-self-restart (version unstated)
Levels (L1–L3 plugin-level static archive · L4/L5 newest real verdicts for this combination)
L1 static
Passed
L2 static
Passed
L3 static
Passed
L4 sandbox
Passed
L5 runtime
Passed
Install + runtime smoke verified in the dsh sandbox — installs and runs
L5 · runtime verified · valid for dsh 0.2.1-rc.2

ID: dsh-self-restart-5@e50147@dsh0.2.1-rc.2 · profile: l4-sandbox

Issued: 2026-10-19 · expires: 2026-10-26

View checks & evidence
L1 · Found✓ Passed
Defaulted from L3✓ Passed
defaulted to passed — L3 install spec passed (full-registry L3 sweep policy)
L2 · Structured✓ Passed
Defaulted from L3✓ Passed
defaulted to passed — L3 install spec passed (full-registry L3 sweep policy)
L3 · Install spec✓ Passed
Install command parsed✓ Passed
Source: registry verification · Method: install spec parse · Captured 2026-10-18
DSH version declared✓ Passed
Source: registry verification · Method: DSH version declaration · Captured 2026-10-18
L4 · Install tested✓ Passed
Install executed in confined sandbox✓ Passed
Source: Windows ACL sandbox · Method: sandbox install run · Captured 2026-10-19
spec github:7gzgn/dsh-self-restart · channel GitHub source · outcome ran · exit 0
check took: 1.9s
Install succeeded✓ Passed
Source: Windows ACL sandbox · Method: sandbox install run · Captured 2026-10-19
spec github:7gzgn/dsh-self-restart · channel GitHub source · outcome ran · exit 0
check took: 1.9s
Installed artifact confirmed✓ Passed
Source: Windows ACL sandbox · Method: sandbox install run · Captured 2026-10-19
spec github:7gzgn/dsh-self-restart · channel GitHub source · outcome ran · exit 0
check took: 1.9s
L5 · Run tested✓ Passed

active in loader tree (150 entries)

Sandbox install passed✓ Passed
Source: Windows ACL sandbox · Method: sandbox install run · Captured 2026-10-19
spec github:7gzgn/dsh-self-restart · install mode reused L4 scratch
check took: 270ms
Web boot ready✓ Passed
Source: DSH runtime · Method: web boot · Captured 2026-10-19
ready line dsh web: http://127.0.0.1:55548/?token=…
HTTP endpoint served✓ Passed
Source: DSH runtime · Method: HTTP request · Captured 2026-10-19
path / · HTTP 200 · took 270ms
Plugin active in inventory✓ Passed
Source: DSH runtime · Method: plugin inventory query · Captured 2026-10-19
verdict active · entries 150
match: include:plugin-restart-planner · dsh-restart-planner · phase active
phases: active 122 · null 28

L1–L3 are plugin-level static conclusions (baseline, identical across dsh versions): evidence is stored once per plugin.

○dsh 0.2.1-alpha.42026-10-18not tested
Environment & artifact
  • • Node.js: v24.14.0
  • • DSH: 0.2.1-alpha.4
  • • Plugin artifact: github · https://github.com/7gzgn/dsh-self-restart (version unstated)
Levels (L1–L3 plugin-level static archive · L4/L5 newest real verdicts for this combination)
L1 static
Passed
L2 static
Passed
L3 static
Passed
L4 sandbox
Passed
L5 runtime
Unknown
This dsh version × artifact combination was not tested — no conclusion drawn
not tested

ID: dsh-self-restart-5@e50147@dsh0.2.1-alpha.4 · profile: l4-sandbox

Issued: 2026-10-18 · expires: 2026-10-25

View checks & evidence
L1 · Found✓ Passed
Defaulted from L3✓ Passed
defaulted to passed — L3 install spec passed (full-registry L3 sweep policy)
L2 · Structured✓ Passed
Defaulted from L3✓ Passed
defaulted to passed — L3 install spec passed (full-registry L3 sweep policy)
L3 · Install spec✓ Passed
Install command parsed✓ Passed
Source: registry verification · Method: install spec parse · Captured 2026-10-18
DSH version declared✓ Passed
Source: registry verification · Method: DSH version declaration · Captured 2026-10-18
L4 · Install tested✓ Passed
Install executed in confined sandbox✓ Passed
Source: Windows ACL sandbox · Method: sandbox install run · Captured 2026-10-18
spec github:7gzgn/dsh-self-restart · channel GitHub source · outcome ran · exit 0
check took: 1.7s
Install succeeded✓ Passed
Source: Windows ACL sandbox · Method: sandbox install run · Captured 2026-10-18
spec github:7gzgn/dsh-self-restart · channel GitHub source · outcome ran · exit 0
check took: 1.7s
Installed artifact confirmed✓ Passed
Source: Windows ACL sandbox · Method: sandbox install run · Captured 2026-10-18
spec github:7gzgn/dsh-self-restart · channel GitHub source · outcome ran · exit 0
check took: 1.7s
L5 · Run tested? Unknown

not present in web-profile loader inventory

Sandbox install passed✓ Passed
Source: Windows ACL sandbox · Method: sandbox install run · Captured 2026-10-18
spec github:7gzgn/dsh-self-restart · install mode reused L4 scratch
check took: 23ms
Web boot ready✓ Passed
Source: DSH runtime · Method: web boot · Captured 2026-10-18
ready line dsh web: http://127.0.0.1:62481/?token=…
HTTP endpoint served✓ Passed
Source: DSH runtime · Method: HTTP request · Captured 2026-10-18
path / · HTTP 200 · took 23ms
Plugin active in inventory? Unknown
Source: DSH runtime · Method: plugin inventory query · Captured 2026-10-18
verdict not-found · entries 150
phases: active 122 · null 28
not present in web-profile loader inventory

L1–L3 are plugin-level static conclusions (baseline, identical across dsh versions): evidence is stored once per plugin.

Author badges

Embed the official badges in your README to showcase security & install-test status:

dsh.so risk
`[![dsh.so risk](https://www.dsh.so/badge/dsh-self-restart-5.svg)](https://www.dsh.so/artifact/dsh-self-restart-5/)`
dsh 0.2.1-rc.2 install verified
`[![dsh.so install · dsh 0.2.1-rc.2](https://www.dsh.so/badge/install/dsh-self-restart-5@0.2.1-rc.2.svg)](https://www.dsh.so/artifact/dsh-self-restart-5/)`

Security Report

Two automated layers, neither a manual review: a static scan (per-plugin rule checks) and a model-driven dynamic security audit that covers only the subset static-flagged at warn or above and never executes plugin code.

dsh-self-restart-5Automated review · daily

Static low, dynamic medium — stricter wins → overall medium.

static low→dynamic medium→overall medium
0 critical·0 high
mediumoverall · medium
1static scan · vet primaryvet AST static analysis (npm artifact or git source)
plugin versionv0.4.6dsh manifest
scanned version0.4.6git2026-10-18
current version0.4.6same version
vet verdictclean · git

Vet is an AST static scan (npm artifact or git source).

show static findings (8)
  • warningchildProcess · code-execlib/core.js:201

    const child = spawn(file, args, { detached: true, stdio: 'ignore', env });

  • warningshellExec · shelllib/core.js:45

    execFile(candidate, ['-NoProfile', '-NonInteractive', '-Command', 'exit 0'],

  • warningshellExec · shelllib/core.js:139

    execFile(file, args, {

  • warningchildProcess · code-execlib/helper.mjs:359

    const child = spawn(argv[0], argv.slice(1), {

  • warningshellExec · shelllib/helper.mjs:43

    const ppid = execFileSync('ps', ['-o', 'ppid=', '-p', String(pid)], { encoding: 'utf8' }).trim();

  • warningshellExec · shelllib/helper.mjs:44

    const comm = execFileSync('ps', ['-o', 'comm=', '-p', String(pid)], { encoding: 'utf8' }).trim();

  • warningshellExec · shelllib/helper.mjs:61

    const args = execFileSync('ps', ['-o', 'args=', '-p', String(pid)], { encoding: 'utf8' }).trim();

  • warningnetIp · networklib/index.js:258

    if (Number.isFinite(port) && port > 0) return `http://127.0.0.1:${port}`;

2model reads redacted source context · never executes plugin code
highest grademedium
merged intooverall medium
audited at2026-10-19
findings0 critical·0 high2 medium / 2 low hidden
show 4 audit findings
  • mediumAgent can schedule a host process-tree kill/relaunch by default without user confirmationlib/core.js:333

    The self_restart tool is advertised to the model in the system prompt and its `confirm` option defaults to false (lib/plan.js normalizeConfirm: `input.confirm === true || (input.confirm === undefined && config.confirm === true)`). A model driven by indirect prompt injection (web page, repo file, tool output) can call action='schedule' and cause the detached helper to SIGTERM/SIGKILL the host and all its descendants, then relaunch it. The delay/quiet gates only defer the kill; they do not require human approval. Impact is host downtime and possible loss of unsaved non-session work.

  • mediumModel-supplied relaunchCommand is forwarded unvalidated to the restart helperlib/core.js:246

    The tool schema exposes `relaunchCommand` to the model as an override of the command used to bring the host back. The string is copied verbatim into the helper payload with no allow-list or validation. On POSIX helper.mjs it is only echoed (relaunchArgv becomes null and [targetExe] is spawned), but on Windows the relaunch is performed inside lib/helper.ps1, which is not part of the harvested sources; if that helper executes the override, a prompt-injected model could launch arbitrary code that survives the restart. The execution path could not be verified.

  • lowModel-written restart reason is echoed verbatim into the system promptlib/index.js

    The `reason` argument supplied to the tool is persisted into last.json by the helper and, for 10 minutes after a successful restart, is interpolated unescaped into the systemPrompt section of every new process. Text that reached the model through untrusted content can therefore persist into the system prompt, and any local process able to write ~/.dsh/dsh-restart-planner/last.json can inject instructions into future sessions.

  • lowWindows helper.ps1 is absent from the audited sources, leaving the primary path unreviewedlib/core.js:71

    On Windows the plugin runs lib/helper.ps1 with ExecutionPolicy Bypass and hands it the full payload (including relaunchCommand and the allow marker check). That file was not part of the harvest, so the arm/Explorer handoff, the kill list construction, and how the relaunch command is executed could not be verified; only the POSIX implementation was reviewed.

Host-restart plugin: the model can trigger a gated host kill/relaunch without user confirmation and pass an unvalidated relaunchCommand; Windows helper.ps1 was not audited.

Rule: the dynamic audit can only raise risk, never lower it (raise-only, never an exemption); a wrong raise is withdrawn by human review and the tier falls back to the static verdict. Overall verdict = the stricter of the two layers.

Disclaimer: the static scan and the dynamic security audit are both automated analysis, not a security guarantee. Always review what you install.

Activity

Last commit 2026-10-18 · activity: Active

• Repo created: 2026-10-16

• Stars: ★ 0 · Forks: 0

• Health: Active — committed within last 30 days

Source

GitHub: github.com/7gzgn/dsh-self-restart

Was this page helpful?