DeepSeek Harness DeepSeek Harness plugin catalog

← Catalog

dsh-update-detector

dsh-update-detector@0.1.3
loader dsh-update-detector

Published Updated

Name, description, and notes are shown in the submitted language and are not translated.

检测上游 harness 更新,并驱动 update-status.json 状态机。

For agents: Markdown · JSON · tarball

Install on a machine that already has the plugin market

curl -fsSL https://addon.dshdo.com/install-plugin-market.sh | sh
# then in /plugin-market/ install dsh-update-detector and enable it

Open /plugin-market/ → Cloud catalog, install this id, then enable. Install only registers; enable runs it.

Versions

Files

sha256
85b53fe040df6616ce744445f1cfd7e794311650b1368275ca97978bff412434
57409 bytes · package dsh-update-detector

README

dsh-update-detector

English | 中文

Detects Harness updates and serves /dsh-update/ on the existing Web server. Version 0.1.2 is detect-only: it does not install updates or restart Harness.

Behavior

A valid configuration schedules a startup check after two seconds and subsequent checks at checkIntervalMinutes. Opening the page reads status; its manual-check button requests a coalesced check. A check fetches from origin and compares commit ancestry. Fetch updates Git metadata, but the plugin never pulls, checks out, resets, stashes, installs, builds, or restarts Harness.

The default stable target accepts only vX.Y.Z and dsh-vX.Y.Z tags, without leading-zero components or prerelease suffixes. Annotated tags use their peeled commit. A checkout containing the release is not behind; a divergent history or an upstream with no stable tags is reported as unavailable. Branch tracking requires an explicit ref, such as origin/master.

Tracked changes and ordinary untracked files count as repository dirt. Existing executor states (busy, preparing, ready, restarting, running) remain read-only and block checks. The archived executor is an inert refusal stub with exit code 3; its LaunchAgent template must not be installed.

Configuration

Configuration is resolved once per plugin application: defaults, then Cordis Config, then $DSH_HOME/update-config.json. Unknown keys are ignored. Invalid values, malformed files, and unreadable configuration produce visible problems and disable checks. An explicitly invalid checkout path never selects a different repository. Reapply the plugin or restart the service after changing configuration.

KeyAccepted ValueDefault
checkIntervalMinutesNumber from 1 to 35791360
maxOutputBytesInteger from 1 to 16777216, per command stream1048576
graceMsInteger from 1 to 60000, termination grace in milliseconds1000
harnessPathExisting local Harness checkoutLocal checkout discovery
targetstable or branchstable
refExplicit Git ref for branch tracking; cannot start with -Unset
notifyBoolean, reserved; notifications are not implementedtrue

The plugin requires webServer, connection, and subprocess. Commands use the injected managed subprocess service and its scrubbed environment. Fetch and remote-tag queries have 60-second deadlines; local probes have five-second deadlines. Output truncation fails the command instead of comparing a retained tail. Runner status codes are -1 for execution failure, -2 for cancellation or timeout, and -3 for output overflow.

Disposal stops scheduling, deregisters page and RPC handlers, cancels active commands, and waits for process-tree exit and asynchronous deregistration. Concurrent disposers await the same completion. Cancelled checks cannot write durable status after teardown.

HTTP and RPC

The page supports GET and HEAD at /dsh-update, /dsh-update/, and /dsh-update/index.html. Connection registers the loopback-only /dsh-update RPC channel with its trusted-Host and cross-origin checks.

EndpointBehavior
statusDurable status plus a read-only Git dirt probe; invalid configuration skips the probe
readinessConfiguration, problems, and capabilities without running Git
checkCoalesced fetch and comparison; invalid configuration, missing checkout, and legacy busy state are refused
update, restart, apply, killExplicit not-supported errors

RPC requests POST to /dsh-update/<endpoint> with JSON { "type": "client-request", "rpcId": "request-id", "method": "<endpoint>", "payload": {} }. Responses use { "type": "server-response", "rpcId": "request-id", "result": ... }. Status persists in $DSH_HOME/update-status.json; existing status fields and unknown legacy fields are preserved.

Development

Run node --test 'tests/*.test.mjs'. Tests use temporary homes, fake Git responses, and explicit runner injection. They cover ancestry decisions, configuration rejection, durable state, output bounds, independently gated process-tree exit, repeated disposal, and page/RPC registration. Tests do not fetch the real Harness repository or write its user profile.

Known Limitations and Deferred Work

The plugin assumes a local checkout and matching host subprocess provider, with /usr/bin/git as its default executable. It does not provide an update executor, notifications, or rollback of Harness itself. Replacing plugin files does not prove that the running Node process loaded them; service activation requires a verified reload or restart.

Model Experience

None, as this plugin contributes no model prompt, tool schema, or model-visible messages.

KV Cache effect

The plugin does not alter model requests or their reusable prefixes.