Bundle
dsh-trans-md
Long-reply to Markdown transcriber for DeepSeek Harness: replies longer than 15 lines are written to a .md file under a workspace subdirectory instead of flooding the chat.
- Source
- passerby325799
- License
- MIT
- Updated
- Updated 24 days ago
Readme
# dsh-trans-md
Long replies become Markdown files — for DeepSeek Harness (`dsh`).
Very long assistant replies can be truncated mid-stream by the transport. `dsh-trans-md` moves the bulk of long replies into a workspace Markdown file and keeps the chat reply short. It also saves tokens: content written to a file as a tool argument is paid for once, while a long chat reply stays in context and is re-sent on every later request.
## Install
```sh
dsh plugin --profile web add github:<owner>/dsh-trans-md
```
Restart `dsh` (or reload the profile), then the rule is active for new turns.
## What it does
The plugin contributes one system-prompt section (order 40) stating a single rule:
- If a user-facing final reply would exceed **15 lines**, write the full content to `docs/<prefix>-<topic>.md` in the current workspace instead of sending it in chat.
- The chat reply becomes a short digest (at most 10 lines) plus the file path.
- Replies under 15 lines are sent normally in chat.
- Writing the file and *also* pasting its body into chat is explicitly disallowed.
- Investigation depth is unchanged — only the delivery location changes.
It registers no tools, no UI, and makes no network requests. The `docs/` directory is created on first use.
## Configuration
All fields are optional; the defaults are shown.
| Key | Default | Meaning |
|---|---|---|
| `enabled` | `true` | Turn the rule off without uninstalling. |
| `maxLines` | `15` | Line threshold above which a reply goes to a file. |
| `docsDir` | `"docs"` | Workspace-relative directory for the files. |
| `filePrefix` | `"notes"` | Prefix for generated filenames. |
| `ruleFile` | — | Path to a Markdown file that replaces the built-in rule text entirely. |
| `workspaceRoot` | — | Optional absolute base path; when omitted the process working directory is used. |
Set them through the profile patch:
```yaml
- id: dsh-trans-md
name: dsh-trans-md
config:
maxLines: 20
docsDir: notes
```
## Custom rule text
Point `ruleFile` at any Markdown file to replace the built-in instruction. A non-empty file wins entirely; an empty or unreadable file silently falls back to the built-in text, so a bad path never breaks prompt assembly. Content is capped at 4000 characters.
## Scope and limits
- **This is a prompt-level instruction, not a hard interception.** It makes the behaviour the strongly preferred default; it cannot guarantee it in every turn. A hard guarantee would require an output hooks layer, which this plugin deliberately does not add.
- The rule applies to the final user-facing reply. Intermediate narration between tool calls is exempt.
- Styles apply to the main conversation only.
## Requirements
- DeepSeek Harness with a `systemPrompt` service available. If that service is absent the plugin mounts and contributes nothing rather than failing profile load.
- No runtime dependencies.
## License
MIT
Install
dsh plugin --profile web add github:passerby325799/dsh-trans-md#0622ce09d7634c185b938987b5439a4ef42d4d0d
Profile: web
With the hub plugin installed, ask your agent to install it by name — it resolves the same plan shown here.
dsh plugin --profile web add github:stvlynn/dsh.fish#path:packages/dsh-plugin-hub
install dsh-trans-md from the hub