Preface¶
When modifying plugins or trying new configurations in DeepSeek Harness (DSH), common concerns are: installing the wrong packages, breaking your profiles, and being unable to start your daily-use desktop or headless environment. The official --from-default-profile can only initialize from a few built-in templates, cannot clone from an existing profile, and doesn’t conveniently support “just create the directory, don’t start it”. Probing requires manually assembling DSH_HOME, environment variables, and dsh --profile; verifying HTTP or host routes requires launching a separate web process; reading session.v4.jsonl.zstd requires decoding multi-frame zstd yourself. The following introduces the community plugin dsh-profile-lab (maintainer wqzhellohhwy, SkillHub category: workflow): using a set of tmpprofile_* model tools to turn “create isolated environment → install plugins → run sessions → read summaries → reclaim” into guarded standard actions.
What Is This¶
dsh-profile-lab is a Cordis plugin running on the DSH host side: it registers ten model tools starting with tmpprofile_, does not declare dsh.client, and has no browser half. inject only writes ['tools'] (not webServer), so it will not hang entirely (pending) in profiles without HTTP services such as headless or tui. At runtime it depends only on Node built-in modules (node:fs, node:path, node:child_process, node:zlib, node:crypto), with no third-party runtime dependencies.
Its direct raison d’être: fear of breaking the main instance when modifying plugins — first verify the tool surface, session behavior, and HTTP surface in an isolated profile, then install into your daily-use profile after confirmation.
Comparison with Old Approaches¶
| Pain point | This plugin’s approach |
|---|---|
| Cannot clone from existing profiles, and the target directory must not already exist | tmpprofile_create: create from a template or clone with clone: "desktop" (config copied, node_modules linked item-by-item) |
| Only want to create a profile, don’t want to start it immediately | Internally uses --dump-config to short-circuit boot |
Manually assembling probe commands, digging through sessions/ yourself |
tmpprofile_run: assembly → run headless → return sessionId and event summary |
| Can’t verify HTTP / render routes in headless | tmpprofile_web_start / web_probe / web_stop: resident web instance, probe routes, reclaim by pid |
| Repeatedly writing scripts for multi-frame zstd decoding of session logs | tmpprofile_session: built-in frame-by-frame decoding, outputs preset, tool surface, context, tokens, etc. |
| Cleanup relies on self-discipline | tmpprofile_clean: whitelist + junction-aware deletion + default dry-run |
Core Features: Ten Tools¶
Tool names use the unified tmpprofile_ prefix, making group-level on/off convenient in dsh-tool-manager.
| Tool | Purpose | Key parameters |
|---|---|---|
tmpprofile_create |
Create isolated profile (template or clone), optionally install packages | name, template (default headless), clone, packages, purpose, overwrite |
tmpprofile_install |
Append install or remove packages for registered temp profiles | name, packages, remove |
tmpprofile_run |
Synchronously run a headless probe (with timeout) | name, task, sessionId, env, timeoutMs, json |
tmpprofile_web_start |
Start a resident web instance | name, port, probePath, waitMs, cwd, env |
tmpprofile_web_probe |
Send an HTTP probe to the resident instance | name, path, method, timeoutMs |
tmpprofile_web_stop |
Stop the resident instance | name, waitMs |
tmpprofile_session |
Read a structured summary of the session log | sessionId or name, sections, limit |
tmpprofile_list |
List profiles managed by this plugin and unregistered ones | — |
tmpprofile_clean |
Cleanup (default dry-run, requires confirm: true) |
names, confirm, sessions, archiveTo |
tmpprofile_fingerprint |
Collect a profiles/ fingerprint, self-check whether other profiles were mistakenly touched |
exclude |
The headless probe focuses on host-side facts (assembly, which entry is not activated, which service it is waiting on). The web instance focuses on the HTTP/render surface (port listening, host route registration, page HTML retrievable). They are not the same thing; when verifying web, the profile’s bundles must include @deepseek-ai/dsh-web-app (use template: "web" or clone from a profile that has web-app).
Installation and Enablement¶
The plugin runs with the current DSH process privileges; before installing, review the GitHub source code and the MIT license yourself. package.json requires Node >=20, DSH >=0.2.0-rc.1, Cordis >=4.0.0-rc <5.
Installation methods from the README:
# 从本地目录装(开发态)
dsh plugin --profile desktop add link:C:/repository/dsh-profile-lab
# 或从 GitHub 装
dsh plugin --profile desktop add github:<你的账号>/dsh-profile-lab
After installation, restart DSH (the plugin is assembled at startup). The desktop profile is exclusively managed by Electron; direct command-line access may be refused — you can install via the desktop version’s plugin page, or go through the in-app channel.
Optional Cordis configuration (inline config in cordis.patch.yml, all entries optional):
- insert:
- id: dsh-profile-lab
name: 'dsh-profile-lab'
config:
home: 'C:/Users/you/.dsh' # 缺省 $DSH_HOME 或 ~/.dsh
dshBin: '' # 显式指定 dsh 的 lib/bin.js
nodePath: '' # 显式指定子进程 node
tools:
disabled: ['tmpprofile_fingerprint'] # 按名字关闭工具
Typical Usage¶
The model-side common closed loop is as follows (parameters are JSON tool call illustrations):
# A. host 面:装配 + 工具面 + 会话行为
tmpprofile_create { name: "probeA", template: "headless", purpose: "验证 dsh-xxx 的工具面", packages: ["link:C:/plugins/dsh-xxx"] }
tmpprofile_run { name: "probeA", task: "只回复两个字:OK" }
tmpprofile_session { name: "probeA", sections: ["preset","tools","contexts"] }
# B. 渲染 / HTTP 面:起真实例,探插件 host 路由
tmpprofile_create { name: "webA", template: "web", packages: ["link:C:/plugins/dsh-xxx"] }
tmpprofile_web_start { name: "webA", probePath: "/api/dsh-xxx/status" }
tmpprofile_web_stop { name: "webA" }
tmpprofile_clean { names: ["probeA", "webA"], confirm: true }
The session.tools returned by tmpprofile_run comes from the complete session log on disk; headless --json is only a projection and cannot replace the tool/call surface in the log. See docs/RECIPES.md in the repository for more recipes.
After installation, you can run a self-check from the repository root (it will actually create a temp profile, install this plugin, run one headless session, and clean up):
node scripts/selfcheck.mjs
Exit code 0 means it can load in the real DSH and the tools are callable.
Safety Guardrails and File Locations¶
The following are deliberately designed safety guardrails: it only reads/writes temp profiles registered in $DSH_HOME/profile-lab.json, and hard-rejects built-in names such as desktop, headless, rescue, etc.; before deleting a directory, it uses lstat to resolve junction/symlink, without following links to delete the source; tmpprofile_clean defaults to dry-run; only overwrite: true moves the old directory to profile-lab-trash/; cross-process lock $DSH_HOME/profile-lab.lock; operations append to $DSH_HOME/profile-lab-log.jsonl.
| Content | Path |
|---|---|
| Manifest | $DSH_HOME/profile-lab.json |
| Audit log | $DSH_HOME/profile-lab-log.jsonl |
| Temp profiles | $DSH_HOME/profiles/<name>/ |
Use Cases and Limitations¶
Suitable for: developing DSH plugins or modifying Cordis injection, when you need to install link/GitHub packages in an isolated profile, run short tasks, read session summaries, start web to verify routes when necessary, and then clean up in one go.
Not suitable or needs attention:
- When the main profile can no longer start, this plugin also depends on host loading and cannot replace
rescue/reserve. - Probe sessions still write under the same
DSH_HOME’ssessions//storages/; process-level data isolation requires a separateDSH_HOME(not yet implemented by the plugin). - Web probes verify server-side and static HTML; whether the in-page JS actually executes needs to be checked yourself by opening the corresponding port in a browser.
- Historical manual directories in
profiles/will appear inunmanagedand will not be auto-deleted; they need to be explicitly brought under management before operations.
The DSH community adopts an “everything is a plugin” philosophy; SkillHub (skillhub.cn) is a community directory site, with no official affiliation with DeepSeek / High-Flyer.
Links¶
- Directory page: https://www.skillhub.cn/plugins/wqzhellohhwy/dsh-profile-lab
- Source code and README: https://github.com/wqzhellohhwy/dsh-profile-lab