dsh-plugin
DayuanJiang/next-ai-draw-iodsh 的 draw.io 绘图插件:通过 next-ai-drawio MCP 服务器作图,点回复里的链接在右侧栏打开实时预览,可以手动修改图,AI 的每次修改都是可以恢复的版本。需 Node.js 18+,首次使用由 npx 下载 MCP 服务器。
面向纯文本 DSH 主脑的模型无关视觉审阅流水线:HTML 逐页截图 + 视觉子代理简报契约(gewu_prep),再把每条审阅发现定位回源码核验真值(gewu_locate);已在 mimo-v2.5 与 qwen3.7-plus 上实测。
The Gewu Inspection Surface: let text-only models in DSH complete visual-inspection tasks through vision subagents.
格物 (Gewu): from the Great Learning — "investigate things to attain knowledge." Look carefully first, then conclude. 中文: README.md
npm i gewu-tools
pwsh node_modules\gewu-tools\scripts\install-gewu-plugins.ps1 -Install # idempotent mount into DSH
# Or install directly through the DSH plugin manager (requires the dsh.bundle manifest)
dsh plugin add gewu-tools
# Restart the DSH session; gewu_prep / gewu_locate appear in the tool catalog. -Verify = 4 greens.
# Optional: inject a custom preset (defaults to community, zero injection; GEWU_BRIEF_PRESET also works)
pwsh gewu\scripts\install-gewu-plugins.ps1 -Install -Preset <preset-file-path>
The DSH session brain is usually a text-only model — it cannot see rendered pages, so it cannot answer "does this proposal page look good / crowded / misaligned?" Vision subagents (e.g. subagent_vision, mimo-v2.5, qwen3.7-plus) can see, but have two weaknesses:
gewu-tools packages a three-step pipeline (validated on a 24-page proposal, 2026-08-16) into two tools:
① gewu_prep screenshot + briefing: renders an HTML document page-by-page and generates a
complete vision-subagent briefing contract (discipline / artifact / attribution rules)
② vision subagent dispatch: the main agent calls DSH's native vision subagent with the briefing
③ gewu_locate truth verification: locates a text/number from the review back into the HTML source
(page section id + line number); count=0 means OCR misread — do not trust it
Validated on vision subagents mimo-v2.5 (conservative) and qwen3.7-plus (more insightful, slightly more false positives). Finding: model tier does not determine the trustworthiness of review results —
gewu_locate) blocks OCR misreads and page-attribution drift before acceptance: in testing, 2.5 of qwen3.7-plus's 3 core new claims failed source-code verification — all were caught by the verification step.Tier differences only show up in review style (higher-tier = sharper insight, steadier = more conservative conclusions), not in correctness. With any vision model, the pipeline output stays trustworthy and auditable — which is exactly why verification is hard-wired as the third step.
Prereqs: Windows + Chrome/Edge + Node 24+ (for the verify script only).
# Direct install through the DSH plugin manager (requires the dsh.bundle manifest)
dsh plugin add gewu-tools
# Or use the bundled installer for local junction mounting and custom presets
pwsh gewu\scripts\install-gewu-plugins.ps1 -Install # idempotent
pwsh gewu\scripts\install-gewu-plugins.ps1 -Verify # verify only
pwsh gewu\scripts\install-gewu-plugins.ps1 -Uninstall # remove
pwsh gewu\scripts\install-gewu-plugins.ps1 -Install -Preset <preset-file-path> # optional custom preset
-Preset injects a custom briefing preset. If omitted, the installer uses community (zero injection); you can also set the GEWU_BRIEF_PRESET environment variable instead.
The script appends a gewu-tools mount row to the DSH agent preset (default pre-sales, override with env GEWU_PRESET), pointing at <workspace>\.dsh\gewu-tools (a Junction to this project).
Restart the DSH session after install (host plugins have no HMR). Verification: install-gewu-plugins.ps1 -Verify expects 4 greens (preset mount row / junction chain / import load / preset loading).
1. gewu_prep(html_path="...", client="<client>", background="<ground rules / marker semantics>")
→ { pages: [...], briefing: "..." }
2. Call a vision subagent with the briefing as its prompt → per-page issue list + conclusions
3. gewu_locate(html_path=..., needle=<text/number from the findings>) for every key finding
A preset is gewu-tools' extension point: put your own design standards or acceptance criteria into a preset file, and gewu_prep injects them into the briefing so the vision subagent reviews against the same yardstick. The default community preset injects nothing and keeps the 1.0.0 community baseline.
| Field | Type | Description |
|---|---|---|
name | string | Non-empty preset name. |
version | string | Non-empty preset version. |
defaultFocus | string | null | Overrides the default focus list; pass null to keep the built-in default. |
sections | string[] | Sections injected into the briefing (design standard / acceptance criteria); each section ≤ 2,000 characters, total ≤ 8,000 characters. |
dispatchHints | string | null | Dispatch hints (e.g. how many pages to review per pass); nullable. |
requires | object | Reserved extension dependency declaration; an invalid object causes degradation. |
Minimal example brief-preset.js:
export default {
name: "my-design-standard",
version: "1.0.0",
defaultFocus: "layout consistency, information density, chart readability",
sections: [
"Visual standard: primary color #123456, left-aligned titles, 24px card spacing.",
"Acceptance criteria: each page must have one core claim; key data must match business-marker semantics."
],
dispatchHints: null,
requires: {}
};
If a preset file is invalid (not an object, missing name/version, wrong field types, sections too long, etc.), gewu-tools falls back to community and returns preset_degraded: true with preset_error explaining why.
index.js works without DSH. Non-DSH hosts (Trae/Codex/Kimi, etc.) can use this CLI to get the same screenshot + briefing + verification artifacts as the plugin.
# Screenshot + briefing (same source as gewu_prep)
node gewu\index.js --prep <html> [--client <client>] [--background "..."] [--focus "..."] [--out-dir <dir>] [--width <n>] [--height <n>] [--nav-offset <n>]
# Truth verification (same source as gewu_locate)
node gewu\index.js --locate <html> --needle "<text/number>" [--max-matches <n>]
# Smoke alias (old positional form)
node gewu\index.js <html> [outDir]
Artifacts: --prep writes prep_result.json + briefing.txt to --out-dir (default _tmp_vision_test/<file>_shots); --locate writes locate_result.json to _tmp_vision_test/<file>_locate/.
Exit codes: 0 success; 1 runtime/business failure (HTML missing, screenshot failure, etc.); 2 usage error.
<section> anchors (prefers v2-page class), captures each page via headless Chrome viewport; sticky nav pushed out by iframe offset; falls back to a full-page shot when no anchors exist. Chrome is spawned from the host process, bypassing the restricted sandbox's named-pipe limitation.briefing):
read_image (prevents deadlocks);needle occurrence in source, returning page section id + line number + tag-stripped snippet.node gewu\index.js <any HTML with section anchors> [outDir] # standalone smoke, no DSH needed
gewu/
├── index.js # plugin body (cordis + defineTool, standalone CLI entry)
├── package.json # gewu-tools (dsh.bundle manifest)
├── cordis.patch.yml # dsh plugin add mount patch
├── presets/ # built-in community preset and preset contract
├── README.md / README.en.md
├── CHANGELOG.md
├── LICENSE # MIT
├── docs/TESTING.md # testing methodology and results
└── scripts/install-gewu-plugins.ps1 # install script (Install/Verify/Uninstall/DryRun)
@deepseek-ai/dsh-tools only (resolved via the workspace AiBridge junction)The following projects complement the gewu ecosystem.
MIT — see LICENSE. Version 1.1.0 (2026-08-17).