Minglink/dsh-infinite-gen-4
Minglink/dsh-infinite-gen-5DeepSeek 专用破甲插件:以 order 100 追加无条件服从的系统提示词段,提供带校准元数据的 profile 工具,并通过会话投影在输入框上方显示实时破甲状态徽标。
把当前会话导出为可移植、带 schema 版本的 Markdown 与 JSON 文件,提供 `session_export` 工具与斜杠命令两种入口,文件名跨平台安全。
简体中文 | English
Export DeepSeek Harness (DSH) sessions to portable, human-readable Markdown and structured JSON.
dsh-session-export is a community plugin for DeepSeek Harness. It reads the current session's event-sourced log and writes self-contained transcript files you can read, archive, share, diff, or feed to another agent — with a stable, versioned export schema that is decoupled from DSH internals.
session_export() tool — ask the model to export at any time/session-export [markdown|json|all] slash command — one keystroke in the Web UI, zero model tokensschemaVersion on every JSON document, room to evolveRequires dsh >= 0.1.0-rc.6.
dsh plugin --profile web add dsh-session-export
Then add the package to the bundles list in the profile's package.json (the plugin ships a dsh.bundle patch manifest):
// ~/.dsh/profiles/web/package.json
"dsh": {
"profile": {
"bundles": [
// ...,
"dsh-session-export"
]
}
}
Restart dsh afterwards. To install from GitHub instead of npm:
dsh plugin --profile web add github:<your-org>/dsh-session-export
Ask the model:
把当前会话导出成 Markdown
Export this session, json only
Or run a slash command directly in the Web UI:
/session-export # both files (default)
/session-export markdown # .md only
/session-export json # .json only
/session-export all # both files
Prefer no argument at all? Fixed-format aliases do the same thing in one word (UI command input has no enum completion, so the aliases are the most convenient form):
/export-md # Markdown only
/export-json # JSON only
Commands run in the UI command plane — their output never enters the model's history.
A readable transcript: metadata header, then the session in execution order. Tool calls render their (parsed) arguments as JSON; tool results render as fenced text blocks — the fence auto-widens so result content containing ``` can never break out. Results longer than 8,000 characters are truncated with a marker.
A stable document owned by this plugin (not a dump of DSH internals):
{
"schemaVersion": "1.0",
"session": {
"id": "session-e6bb6821-…",
"createdAt": "2026-08-14T09:52:59.798Z",
"exportedAt": "2026-08-14T09:53:24.300Z",
"model": "glm-5.3",
"provider": "zai-coding-cn",
"cwd": "/private/tmp/dsh-export-verify",
"asOfSeq": 137,
"eventCount": 6,
"omitted": { "contextMessages": 2 }
},
"events": [
{ "type": "user_message", "seq": 6, "timestamp": "…", "content": "…" },
{ "type": "assistant_message", "seq": 9, "timestamp": "…", "content": "…", "reasoning": "…", "provider": "…", "model": "…" },
{ "type": "tool_call", "seq": 10, "timestamp": "…", "callId": "…", "tool": "bash", "arguments": { "command": "echo hi" } },
{ "type": "tool_result", "seq": 11, "timestamp": "…", "callId": "…", "tool": "bash", "success": true, "content": "hi\n" },
{ "type": "unknown_event", "seq": 99, "timestamp": "…", "eventType": "future/thing" }
]
}
Notes on fidelity:
tool_call.arguments keeps the model's raw string when it is not valid JSON.tool_result.error carries the internal { name, code } identity for failed calls.session.omitted.session.omitted.replacedEvents.unknown_event entries — never a crash.Markdown output (trimmed):
# DSH Session Export
## Metadata
- Session ID: session-e6bb6821-2a4c-40a3-a178-13ea25ccfe4e
- Model: zai-coding-cn / glm-5.3
- Working Directory: /private/tmp/dsh-export-verify
- Exported Events: 6
---
## User
先用 bash 运行 echo verify-2 …
## Assistant
_zai-coding-cn / glm-5.3_
> The user wants me to: …
### Tool Call: `bash`
```json
{
"command": "echo verify-2"
}
```
### Tool Result — `bash` (ok)
```text
verify-2
```
Exports land in <session working directory>/.dsh/exports/:
.dsh/exports/session-<session-id>-<UTC timestamp>.md
.dsh/exports/session-<session-id>-<UTC timestamp>.json
The directory is created automatically, filenames are sanitized for Windows/macOS/Linux, and a name collision appends -1, -2, … instead of overwriting.
Exports can contain sensitive data. A transcript may include your source code, file contents read by tools, tool arguments (paths, commands, queries), tool results, API responses, and absolute filesystem paths. Review an export before sharing it — this plugin performs no redaction.
pnpm install
pnpm run typecheck
pnpm run build
pnpm test # node:test, no extra deps
Layout:
src/
index.ts # plugin entry: tool + slash command
session-adapter.ts # DSH session -> export schema (only DSH-typed module)
schema.ts # the plugin-owned export schema types
markdown.ts # Markdown renderer (pure)
json.ts # JSON renderer (pure)
exporter.ts # filenames + file writing
test/ # node:test suites for markdown / json / filenames
The renderers and schema have no DSH imports, so the export format can be unit-tested and evolved independently of the DSH Developer Preview API.
@deepseek-ai/dsh 0.1.0-rc.6 (DSH Developer Preview).ctx.tools.register() / defineTool from @deepseek-ai/dsh-tools, the optional ctx.commands service from @deepseek-ai/dsh-commands, and the public Session event log from @deepseek-ai/dsh-session. No private fields, no core modifications.web); the tool works everywhere, including headless.