rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:LosEcher/dsh-terminal-render
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Render DSH headless / CLI final output as readable terminal Markdown.
dsh --profile headless "task" currently prints the final assistant message as
raw Markdown source (**bold**, | tables |, # headings, …), which is
unreadable in a terminal. This plugin wraps process.stdout.write once at tree
mount so any Markdown-looking write is rendered to ANSI (CJK-aware) before it
reaches the terminal — with zero changes to the harness.
The headless bundle (@deepseek-ai/dsh-headless) builds its IO as
{ stdout: internals.stdout, ... } where internals.stdout is the
process.stdout object, captured by reference. The final message is written
through process.stdout.write(outcome.text). Wrapping that method therefore
intercepts the output regardless of plugin load order.
CommonMark's flanking rules and byte-oriented parsers mis-handle CJK prose, which has no spaces between words:
**加粗**,中文 — strong must close before a fullwidth comma / CJK char
(same rule as DSH web's cjkFriendlyStrong micromark extension).中文**加粗** — emphasis must open/close with CJK neighbors.unicode-width semantics), not byte count.~~…~~ is strikethrough; single ~text~ stays literal so LLM output
like ~**10%** ("approximately") is not struck (grok-build strategy).# After wiring into the headless profile (see below):
dsh --profile headless "list my todos" # rendered, when stdout is a TTY
dsh --profile headless "…" | cat # passthrough (not a TTY)
Env controls:
| Variable | Effect |
|---|---|
NO_COLOR |
Disable rendering entirely (plain passthrough). |
DSH_TERMINAL_RENDER=0 |
Force plain passthrough even for Markdown text (piping). |
DSH_TERMINAL_RENDER=1 |
Force rendering even without a TTY. |
DSH_TERMINAL_LINKS=0 |
Disable OSC 8 hyperlinks. |
#–###### (colored + bold), --- rulesinline code, [text](url) links with OSC 8 hyperlinks (plain (url) suffix fallback):---:, ---:, :---), CJK-aware wrapping- [x]), blockquotesAdd to ~/.dsh/profiles/headless/cordis.patch.yml:
- insert:
- id: terminal-render
name: dsh-terminal-render
and to ~/.dsh/profiles/headless/package.json dependencies:
"dsh-terminal-render": "github:LosEcher/dsh-terminal-render#main"
(During local development use "link:/absolute/path/to/dsh-terminal-render" instead,
then pnpm install in the profile and run a headless task.)
Same pattern in ~/.dsh/profiles/web/cordis.patch.yml and
~/.dsh/profiles/web/package.json; restart the web host afterwards.
node --check lib/render.js
node --check lib/index.js
node test/run.mjs # 27 assertions: widths, inline, blocks, detection
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。