DeepSeek Harness 插件

dsh-plugin-structured-output

dsh plugin: opencode-style json_schema structured output via a generic StructuredOutput tool, /json-schema command, and native JSON Schema validation.(英文原文)

跳到安装方式

来源信息

GitHub 仓库
royenheart/dsh-plugin-structured-output
最近更新
2026年8月20日
分类
工具与能力
GitHub stars
0
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/royenheart/dsh-plugin-structured-output
插件名:dsh-plugin-structured-output
作者:royenheart

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器2 个文件
README.md来源说明 · 只读预览

@royenheart/dsh-plugin-structured-output

opencode-style json_schema structured output for dsh agents, built entirely on native dsh seams (no dsh source changes):

  • visibility is per agent preset (mode) and is opt-in: Settings →

结构化输出工具 / Structured output chooses which modes expose it;

  • in enabled modes, /json-schema <json> stores an object-rooted JSON Schema

for the receiving session and the StructuredOutput tool is registered;

  • the next prompt receives opencode's instruction to return the final answer

through StructuredOutput instead of plain text;

  • the tool validates the output with the native dsh JSON Schema subset

(@deepseek-ai/dsh-tools) and rejects malformed values.

Install

lib/ is generated locally and is not committed. install.py always builds the repository's own toolchain first (npm install when the toolchain is missing, then npm run build) and only reports an error when npm itself is missing.

Install/uninstall idempotently with the bundled script (stdlib-only Python). The package ships its own cordis.patch.yml (id structured-output) and declares dsh.bundle.patch, so the script only links the package into the profile node_modules, adds the link: dependency, and appends the package to dsh.profile.bundles. The profile's own cordis.patch.yml is never modified:

python3 install.py install --profile web          # install
python3 install.py uninstall --profile web        # remove
python3 install.py install --profile web --home "$DSH_HOME"   # explicit home

Manual alternative:

dsh plugin --profile web add link:/path/to/dsh-plugin-structured-output

dsh plugin reconciles dsh.profile.bundles from the installed package's dsh.bundle declaration, so no profile patch edit is needed either.

Per-mode visibility

No mode is enabled by default. After installing, open Settings → 结构化输出工具 (Structured output) and toggle the agent presets that should see StructuredOutput and /json-schema. Disabled modes see neither surface; the choice applies to sessions created after the change.

Usage

/json-schema {"type":"object","properties":{"answer":{"type":"string"}},"required":["answer"],"additionalProperties":false}
What is the answer to life, the universe, and everything?

The model must then call StructuredOutput with a valid object.

Supported schemas follow dsh's enforced JSON Schema subset: any JSON root, object properties/required/boolean additionalProperties, array items, scalar enum/const, and exact-one oneOf. Unsupported keywords are rejected at /json-schema time.