deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
PROJECT README
Session management for DeepSeek Harness (DSH): a settings page that lists every historical session and physically deletes a session's log directory (irreversible, type-to-confirm, with an audit trail).
English | 中文
settings.section page (no shipped UI is replaced).sessionPersistence.locate() and deletes the whole session directory (log + session-owned artifacts) directly through Node fs — no shell or sandbox involved, consistent across platforms.~/.dsh/sessions-rm.log (time / sessionId / title / ok / path or error).dsh plugin add), no --patch neededInstall straight from GitHub — pnpm pins the package by commit with a full integrity hash:
dsh plugin --profile web add git+https://github.com/Temoa/dsh-sessions-rm.git
Because the package declares dsh.bundle.patch (cordis.patch.yml), the reconciler appends it to the profile's dsh.profile.bundles automatically — the plugin mounts at the PROFILE level and is active for every session on that profile. The client half is discovered through dsh.client (exports["./client"]) and the Host Remote manifest through exports["./typert"] (registered by dsh-typert-loader); no manual patch file is needed.
To uninstall: dsh plugin --profile web remove @temoa/dsh-sessions-rm.
After changing plugin code, fully restart the harness — modules are cached per process URL.
git clone git+https://github.com/Temoa/dsh-sessions-rm.git
cd dsh-sessions-rm
dsh web --patch ./cordis.patch.yml
The package declares no dependencies — runtime imports (@deepseek-ai/cordis, @deepseek-ai/dsh-typert-protocol, @deepseek-ai/dsh-home-paths, zod) are provided by the DSH installation. Two ways to make them resolvable:
node_modules into the plugin directory (recommended, offline):ln -s /path/to/dsh/node_modules node_modules
npm install in the plugin directory if the @deepseek-ai/* packages are available on your registry.Open Settings → Session Management: pick a session, click 删除 (Delete), type 确认删除 in the dialog, then confirm. The row disappears, the sidebar hides the session immediately (archived), the log directory is physically removed, and one line is appended to ~/.dsh/sessions-rm.log.
lib/index.js registers ctx.sessionRm (a TypertRemoteService subclass) exposing list / delete. lib/typert.host.js is the Typert manifest (exports["./typert"]) auto-registered by dsh-typert-loader; api-gateway routes sessionRm/* wire calls to the service methods.lib/client.js (a factory-form CJS bundle built by scripts/build-client.js from src/client.js) registers matching descriptors via ctx.remote.$mount() and calls ctx.remote.sessionRm.list()/delete().workspaceRegistry.archiveSession() (sidebar hides instantly via the archive set) → sessionPersistence.locate() → Node fs delete → append audit line.@Remote is a TS decorator; this project reuses the official Remote() decorator by constructing a decorator context manually (see addRemote in lib/index.js), so no TS toolchain is needed.None — the plugin is intentionally configuration-free. All behavior is fixed by design.
npm run build:client # node scripts/build-client.js → lib/client.js
npm test # node test/index.mjs — manifest/bundle structure checks
Tests cover: Host service class shape, Typert manifest structure (package/face/codecs/invocations), and client bundle format.
sessionPersistence.locate() and validated to be an absolute path; no external input is accepted. Deletion and audit writes run directly through Node fs, independent of the shell or the deployment sandbox boundary (the Windows profile mounts the pwsh executor, and the sandbox is unusable when dsh web starts from a drive root).MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。