Skills Plugins MCP Prompt Model 导航 博客 资讯 我的中心
会话与消息 #deepseek-harness#dsh-plugin

dsh-prompt-optimize

Rewrite the current composer draft through an auxiliary LLM call without sending a message.

peterliucius @peterliucius ⬇ 2 ★ 0 main

安装

dsh plugin --profile web add github:peterliucius/dsh-prompt-optimize
下载安装清单

需要可复现安装时,可在仓库后追加 #commit 固定提交。

Rewrite the current composer draft through an auxiliary LLM call without sending a message.

该插件未提供要点说明,请参考仓库 README。

deepseek-harnessdsh-plugin
  1. 安装并启动 DeepSeek Harness:npx @deepseek-ai/dsh web
  2. 在终端执行上面的安装命令(CLI 会解析插件并核验来源)
  3. 用 dsh plugins list 确认已安装,必要时重启 Harness 生效

插件以当前 dsh 进程的权限运行,安装时可能执行代码。请先通读仓库源码与许可证,确认无破坏性命令与越权访问;本站只做索引,不对第三方插件安全性作担保。

代码仓库github.com/peterliucius/dsh-prompt-optimize
许可证MIT
主要语言main
下载量2
GitHub 星标0
最近推送2026-08-17
收录日期2026-09-19
分类会话与消息

事实信息来自公开插件目录快照(2026-10-01),介绍文案由本站再加工。

以下为插件仓库 README 全文(原始内容,由公开目录抓取整理)。

# dsh-prompt-optimize

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

```sh
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`:

```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#`) if you do not want a later push to change what runs.

A local checkout that already has `lib/` does not need `allowBuilds`:

```sh
dsh plugin --profile web add /path/to/dsh-prompt-optimize
```

Start the web profile:

```sh
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](https://github.com/deepseek-ai/deepseek-harness) checkout at `../dsharness`. Without that checkout, `pnpm test` skips.

```sh
pnpm install
pnpm test
pnpm build
```

Regenerate Typert host + remote-client artifacts after changing `@Remote` methods (requires the sibling checkout):

```sh
pnpm exec tsx scripts/generate-typert.ts
```

## License

MIT

数据来源:公开的 DeepSeek Harness 插件目录与各插件 GitHub 仓库。本站为独立第三方目录,与 DeepSeek、幻方(High-Flyer)及插件作者均无隶属或背书关系。

每日精选 Skill 推荐,免费送到你邮箱

输入邮箱,每天接收一个精选 AI Agent 技能推荐。完全免费,持续更新。

提交后我们会发送一封确认邮件,点击邮件里的链接才会开始收信。

完全免费,取消任意时间。我们不会发送垃圾邮件。