deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
PROJECT README
Self-update and deployment tools for DeepSeek Harness, shipped as an installable profile bundle.
dsh-selfup gives the agent (and you) four maintenance tools over the harness checkout:
| Tool | What it does |
|---|---|
dsh_update_status |
Read-only: repo, branch, HEAD, ahead/behind, dirty files, CLI version, built-bin freshness, launcher and systemd-unit state |
dsh_update |
git fetch → fast-forward pull → pnpm install → pnpm run build (optional pnpm run test), each as its own reported step |
dsh_install |
Install dsh to ~/.local/bin (mode=local, from the repo) or build an Arch package from the published npm tarball (mode=arch) |
dsh_systemd |
Manage a systemd user service running dsh web (~/.config/systemd/user/dsh-web.service) |
Zero runtime dependencies: the plugin talks to the checkout through the harness's own shell service, and ctx.tools.register() accepts the raw definitions directly.
git rev-parse --show-toplevel from the working directory, falling back to $DSH_SELFUP_REPO)git, node, pnpm on PATHmode=arch additionally needs makepkg (Arch base-devel); the systemd actions need a running user systemd instanceInstall the bundle into a profile and restart the web server:
dsh plugin --profile web add dsh-selfup # once published to npm
dsh plugin --profile web add github:geokkjer/dsh-selfup # or straight from this repo
Or, for a local checkout of this plugin:
cd /path/to/dsh-selfup
dsh plugin --profile web add .
dsh plugin runs pnpm add in the profile directory and registers the package as a bundle layer (dsh.bundle.patch → cordis.patch.yml). After the next dsh web start, the four tools appear in every session.
To develop against this repo without a build step, the package entry is plain ESM (index.js) with a hand-written index.d.ts; there is nothing to compile.
dsh_update_statusRead-only snapshot of the checkout and its deployment:
origin/masterapps/cli/package.jsonapps/cli/lib/bin.js)~/.local/bin/dsh launcher presencedsh-web systemd unit: active, enabled, file presentdsh_updateUpdate the checkout in four independently skippable steps:
git fetch origingit merge --ff-only origin/master (never rebases or creates merge commits)pnpm installpnpm run build (and optionally pnpm run test)Parameters (all optional booleans, default true): pull, install, build, test, force.
force=true, which auto-stashes before the pull and pops after (a pop conflict is reported, not hidden).origin/master and nothing else is requested, the tool says so and stops.pnpm steps run as background processes with the call's abort signal forwarded, so a cancelled call kills the step.dsh_systemd action=restart.dsh_installmode=local (default): writes a launcher to ~/.local/bin/dsh that execs the repo's built CLI (apps/cli/lib/bin.js) and falls back to the tsx source launcher when the build is absent. dsh --version then works from anywhere and stays in sync with the repo.mode=arch: writes a PKGBUILD to ~/.cache/dsh-arch sourcing the published npm tarball at the checkout's version, builds it with makepkg -f, and returns the package path for sudo pacman -U.dsh_systemdManage the dsh-web user service that runs dsh web --host <host> --port <port> (defaults 127.0.0.1:3080):
action=install writes the unit file, daemon-reloads and enables it — it does not start it.status / start / restart / stop / disable act on the unit directly.⚠️
start/restartterminate the currently runningdsh webinstance — including the session calling the tool — so the new code only takes effect then. The port must be free (stop any terminalpnpm run dsh webfirst).
The unit sets WorkingDirectory to the repo, DSH_HOME to $HOME/.dsh, and PATH to include the node bin directory, so it behaves like a hand-started dsh web.
The plugin resolves the session's sandbox policy (sandboxPolicy.resolve({ session })) and passes it to every shell call, so writes outside the workspace — the launcher, the unit file, the Arch build dir — inherit the session's approved mode instead of the executor's confining default.
npm test
Applies the plugin against a stub context and asserts the four tools register with the expected names and well-formed JSON schemas (no harness needed).
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。