@zhengjunyao/dsh-updater
监测版本源并分级展示更新风险,支持一键路径与渠道化更新决策 适合运维与测试人员,需在配置中定义更新通道与风险展示策略。
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:zhengjy01/dsh-updater说明文档
阅读完整 README ↗Configuration
File: DSH_HOME/dsh-updater/config.json (default ~/.dsh/dsh-updater/config.json, mode
0600). It is seeded once from the plugin's composition row; after that the file wins
(it is re-read before every update).
| Field | Type | Default | Meaning |
|---|---|---|---|
enabled | boolean | true | Master switch; when false the routes and tools stay unmounted |
announceToAgent | boolean | true | Announce the plugin (tools and behaviour) in the agent system prompt |
entry | 'sidebar' | 'ball' | 'both' | 'off' | 'sidebar' | Where the panel entry lives in the GUI |
channel | 'latest' | 'next' | 'alpha' | 'latest' | Which npm dist-tag to follow when resolving the target version |
checkIntervalMinutes | number | 180 | Background re-check interval in minutes (0 disables the timer) |
checkOnBoot | boolean | true | Run one check shortly after the host boots |
registry | string | 'https://registry.npmjs.org' | npm registry base URL |
apiBase | string | 'https://api.github.com' | GitHub API base URL |
githubToken | string | '' | Optional GitHub token — raises the 60 req/h unauthenticated release limit |
cacheTtlMinutes | number | 30 | How long a cached registry/releases fetch stays fresh (minutes) |
npmArgsExtra | string[] | [] | Extra arguments appended to the npm install command (at most 20) |
backupWhenUpdating | boolean | true | Take a full backup of the current install before replacing it |
backupCount | number | 3 | How many pre-update backups to keep |
autoRollback | boolean | true | Restore the backup automatically when the new version fails to boot |
confirmOn | 'warn' | 'high' | 'never' | 'high' | Risk levels that require an explicit confirmation before updating |
fallbackPort | number | 3098 | Port for the detached recovery console (tries +9 further when busy) |
bootTimeoutMs | number | 180000 | How long the new host may take to answer before the attempt fails |
maxAttempts | number | 2 | Install attempts per update request (1 = no automatic retry) |
killGraceMs | number | 6000 | Grace period after SIGTERM before the helper SIGKILLs the old host |
portFreeTimeoutMs | number | 25000 | How long to wait for the old host to release its port |
lingerMs | number | 4000 | How long the helper keeps its console up after success before exiting |
readyConfirmMs | number | 4000 | How long a boot that answers the port must hold before it is called ready |
bootWatchMs | number | 30000 | How long a host that reported ready is still watched afterwards |
installTimeoutMs | number | 600000 | How long the npm install itself may run |
logLines | number | 400 | Lines of log kept for display |
autoReload | boolean | true | Auto-reload the page once the new host answers |
showOverlay | boolean | true | Show the full-screen overlay while waiting |
probeIntervalMs | number | 1200 | Reconnect probe interval (ms) |
historyLimit | number | 40 | Update records kept in history.json |
Every field is clamped to a sane range (maxAttempts 1–5, backupCount 0–20,
installTimeoutMs 30000–3600000, …); illegal values silently fall back to the defaults, so
the config file can never make the plugin throw.