dsh-prompt-optimize
by peterliucius
DeepSeek Harness web 插件:经辅助 LLM 调用改写当前编辑器草稿;点击仅替换草稿,绝不发送消息或开启轮次
DeepSeek Harness web plugin: rewrite the current composer draft through an auxiliary LLM call. Click replaces the draft only; it never sends a message or starts a turn.
安装
dsh plugin --profile web add github:peterliucius/dsh-prompt-optimizeGitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试
安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗
安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。
README
DeepSeek Harness web plugin: rewrite the current composer draft through an auxiliary LLM call. Click replaces the draft only; it never sends a message or starts a turn.
Install
dsh plugin --profile web add github:peterliucius/dsh-prompt-optimize
Git-hosted plugins build on install through prepare. pnpm ≥10 blocks that script until you allow it. The first add fails and prints the key; copy it into the profile's pnpm-workspace.yaml:
allowBuilds:
dsh-prompt-optimize: true
Then re-run the same add. Only allow packages whose source you trust. Pin a commit (github:peterliucius/dsh-prompt-optimize#<sha>) if you do not want a later push to change what runs.
A local checkout that already has lib/ does not need allowBuilds:
dsh plugin --profile web add /path/to/dsh-prompt-optimize
Start the web profile:
dsh --profile web
The patch inserts one row named dsh-prompt-optimize (maxInputBytes: 32768, maxOutputTokens: 4096, timeoutMs: 60000). The same package's dsh.client declaration occupies conversation.input.right. Default web-app does not mount this plugin.
Behavior
The sparkle button is always visible. It disables when the draft is empty after trim, contains a composer reference chip (U+FFFC), the session is removed, or the input machine is not in the plain phase.
Click captures the current draft, calls ctx.promptOptimize.optimize over the promptOptimize Typert Remote, and overwrites the composer through inputActions.setDraft only when the live draft still equals that capture. Failures toast; a moved draft toasts and is not replaced.
The auxiliary request frames the draft as JSON, uses a fixed rewrite instruction, enforces the configured byte and token budgets, composes timeout with caller cancellation, and sets reasoningEffort: 'off'. It never enqueues a user message or appends a durable session event.
Route resolution uses plugin provider/model when both are set, else the session's latest request/header config, else ctx.get('agentDefaultModel')?.currentSelection().
Configuration
Every field is required except the paired route override; there are no library defaults. The bundle row supplies the values below.
| Key | Contract |
|---|---|
maxInputBytes |
Positive UTF-8 byte ceiling for the final JSON-framed user prompt. |
maxOutputTokens |
Positive auxiliary generation token cap. |
timeoutMs |
Positive end-to-end deadline within the runtime timer limit. |
provider, model |
Optional explicit route; both or neither. |
Override them in the profile's cordis.patch.yml by restating the whole row config.
Develop against a local harness
Tests resolve @deepseek-ai/dsh-* peers through a sibling deepseek-harness checkout at ../dsharness. Without that checkout, pnpm test skips.
pnpm install
pnpm test
pnpm build
Regenerate Typert host + remote-client artifacts after changing @Remote methods (requires the sibling checkout):
pnpm exec tsx scripts/generate-typert.ts
License
MIT
原始 README: https://github.com/peterliucius/dsh-prompt-optimize/blob/main/README.md ↗
同类插件
查看全部 →
agent-vision-toolkit
为纯文本模型"看图“设计更好的视觉工具箱和技能,支持多图理解,图片问答,前端UI还原、GUI 自动化等,并可选无缝接入多个主流agent,直接识别粘贴图片| A vision toolkit and skill designed for text-only llms — image Q&A, long-screenshot OCR, frontend UI restoration, and GUI automation, with optional seamless integration for Codex, Claude Code, Pi, Oh My Pi, and OpenCode

api-relay-audit
从 DeepSeek Harness 对 AI API 中转站和 LLM 代理运行本地安全审计,生成 Markdown 报告,覆盖提示词注入、模型替换信号、工具调用改写、错误泄漏、流完整性和按 profile 启用的 Web3 风险。

OpenStory
✨ OpenStory 现已支持 DeepSeek Harness 插件! 现在可以通过 dsh-openstory 将 OpenStory 多智能体推演接入 DeepSeek Harness,让 agent 直接启动模拟、查看角色、下达指令并逐回合推进故事。查看 DSH 插件配置与使用指南。

phi
pi的编码代理 ∞ 提供者、子代理、hashline编辑和权限门

anysearch-dsh
DeepSeek Harness(DSH)的 AnySearch 网络搜索提供方与高级搜索工具。

codex-switch
Codex Switch 是一个 macOS 工具,一键配置 Codex 的自定义 API,同时保留官方 OpenAI 登录。保存后 Codex 的模型选择器里只会出现你选的那个 provider 的模型。也支持 Claude Code 的官方 / 自定义 API 切换。Codex Switch is a lightweight helper for configuring multiple coding-agent API routes. For Codex, it keeps Official OpenAI and a custom API provider configured in parallel, registers the custom model in Codex's mod