DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

maomaocatpanda-eng /

maomaocatpanda-eng/dsh-quiet-identity

Verified

Removes the fixed "You are an AI agent powered by DeepSeek Harness." opener from the assembled system prompt, for gateways that reject or rate-limit requests carrying it.

★ 0 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: main@6b6707bc

dsh-quiet-identity

Removes the fixed first-party opener “You are an AI agent powered by DeepSeek Harness.” from the assembled system prompt.

中文说明 · Install · Verify · What it does not touch

Why

@deepseek-ai/dsh-system-prompt registers one fixed section at construction time when its includeHarnessIdentity config is true (the default):

this.section({
  name: "harness:identity",
  order: HARNESS_IDENTITY,   // -1000
  text: "You are an AI agent powered by DeepSeek Harness.",
})

Some third-party OpenAI-compatible gateways match on that exact sentence and answer 200 OK with a rate-limit error event instead of a completion — a failure that looks like a quota problem, arrives after a long stall, and is retried by the harness until the turn times out. When the deployment owns the complete prompt anyway (its own persona prefix, its own instructions), the opener carries no information the model needs, and removing it is enough to make those gateways behave.

The supported switch is includeHarnessIdentity: false in the system-prompt config. This plugin exists for the case where you would rather not edit — or cannot edit — that config: it removes the section at the presentation layer instead.

How it works

The plugin listens to the system-prompt/assemble waterfall, which runs after every contribution has been collected and whose return value is authoritative:

ctx.on('system-prompt/assemble', async (assembly, _context, next) => {
  const assembled = await next()
  const filtered = stripIdentity(assembled)   // drops name === 'harness:identity'
  return filtered
})

Filtering one known section name is idempotent, and the assembly is copied rather than mutated. next() always runs, so other plugins' contributions survive.

Install

dsh plugin --profile web add dsh-quiet-identity

Or from a checkout, with the profile's own package manager:

cd "$DSH_HOME/profiles/desktop"
pnpm add "link:/path/to/dsh-quiet-identity"

then add "dsh-quiet-identity" to dsh.profile.bundles in that profile's package.json. A bundle's patch only applies to packages listed there — installing without listing loads nothing.

Restart the host. The plugin takes effect on the next process, not the next turn.

Verify

The opener is one section of the assembled prompt, so any place that shows the delivered system prompt will show it gone. Two checks that need no extra tooling:

  • Ask the agent to repeat the first sentence of its system prompt. It should no longer be the harness identity line.
  • With logRemoval: true in the plugin's config, the host log gets one line per assembly where a section was actually removed.

If the opener is still there, the usual cause is the bundle not being listed in dsh.profile.bundles — check that first.

What it does not touch

  • The deployment persona prefix and suffix
  • Reusable instructions, the generated tools SDK, structured-output guidance
  • Tool declarations (they stay provider-owned)
  • Runtime context, working directory, workspace instructions
  • Any other plugin's sections, contexts or variables

Uninstalling the plugin restores the opener: nothing is written to disk, and no other node's config is rewritten.

Compatibility

  • Needs a host where system-prompt/assemble is a waterfall and the opener's section is named harness:identity — every 0.2.x build.
  • If a deployment already sets includeHarnessIdentity: false, the section never exists and this plugin does nothing (it returns the assembly unchanged).
  • No peerDependencies: the plugin uses only ctx.on and the shape of the assembly object.

License

MIT


中文说明

把系统提示词里固定的那句 “You are an AI agent powered by DeepSeek Harness.” 去掉。

为什么需要。 有些第三方 OpenAI 兼容网关会匹配这句话,命中后返回 HTTP 200,但内容是一个限流错误事件而不是补全。表现很像额度问题:等很久才回、被 dsh 当成限流自动重试、最后整轮超时。当部署自己拥有完整提示词(自己的 persona 前缀、自己的指令)时,这句话不携带模型需要的信息,去掉就能让这些网关正常工作。

和改配置的区别。 正解是给 system-prompt 配置 includeHarnessIdentity: false。这个插件是给“不想改、或改不了那份配置”的场景准备的:它在提示词组装层把这个段摘掉。

原理。 挂 system-prompt/assemble waterfall,next() 之后过滤掉名为 harness:identity 的段。幂等、不改原对象、不吞别的插件的贡献。

安装。 dsh plugin --profile web add dsh-quiet-identity,或本地 link: 装完记得把包名加进该 profile package.json 的 dsh.profile.bundles——bundle 的 patch 只对列在那里的包生效。装完要重启宿主,下一个进程生效。

不动什么。 persona 前缀与后缀、可复用指令与工具 SDK、工具声明、runtime 上下文与工作目录、别的插件的段与变量。卸载即恢复,不落盘。

兼容。 需要宿主把 system-prompt/assemble 作为 waterfall 且该段名为 harness:identity(0.2.x 均满足)。部署本来就把 includeHarnessIdentity 设为 false 时,这个插件什么也不做。

—/ 5

No ratings yet

Verified DSH bundle

Commit 6b6707bc9a59

Community comments

No comments yet. Be the first to write one.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout