npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-soul

v0.6.0

Published

为 DeepSeek Harness 添加个性化设置

Readme

dsh-soul

简体中文 | English

DeepSeek Harness 个性化设置插件,用于配置 Agent 的昵称、回复风格、语调和自定义指令。

功能

  • Web UI 个性化设置页面
  • 设置页体验:中英双语文案(随界面语言切换)、dirty 检测(无改动禁用保存)、保存结果提示、「查看当前生效提示词」只读面板
  • 启用或禁用个性化设置
  • 「关于你」:设置用户昵称、职业和介绍,回复时结合你的背景
  • 选择回复风格和语调(合并为单一选项):professional(专业严谨)、casual(轻松自然)、humorous(幽默风趣)、roast(吐槽达人)、efficient(高效干练)
  • 特质微调(在风格和语调的基础上叠加):
    • 标题和列表:default(默认)、more(增强,采用清晰格式和列表结构)、less(减弱,使用更多段落文本)
    • 表情符号:default(默认)、more(增强,使用较多表情符号)、less(减弱,尽量减少使用表情符号)
  • 选择输出语言(Agent 回复语言 + /soul 命令输出语言):中文 / English
  • 提示词随输出语言本地化:language=en 时 system prompt 使用英文描述
  • 输入自定义指令
  • Agent 可调用工具 set_persona,让模型在对话中直接调整人设
  • 人设预设:多套命名人设一键切换(保存 / 使用 / 列表 / 删除,Web UI 与命令双入口)
  • set_persona 确认模式(requireToolConfirmation):Agent 的人设修改需经 /soul confirm 确认后才生效
  • 输入框光轨:Agent 回复中时,输入框边框显示沿边循环流动的光轨(默认颜色 #679EFE
    • 颜色:预设色板、取色器或十六进制输入(如 #679EFE
    • 流动速度:慢 / 中 / 快;光带粗细:细 / 中 / 粗
    • 光轨起点、终点沿边框匀速推进,带渐隐拖尾;与输入框边框完全重合,不出现双线
    • 设置页内置实时效果示例,随颜色 / 速度 / 粗细联动;系统开启「减少动态效果」时自动停用
  • /soul set 键值方式修改配置项
  • 配置持久化保存
  • 配置输入校验:字段白名单、类型、长度上限(昵称/职业 50、介绍 500、自定义指令 2000 字符)、枚举与十六进制颜色校验,非法或超限字段整单拒绝
  • 配置更新后同步到所有活动 Agent
  • 变更检测:仅在影响 Agent 行为的配置实际变化时刷新提示词并注入会话;纯外观配置(输入框光轨)只落盘,不产生注入消息

安装

dsh plugin --profile web add dsh-soul
dsh plugin --profile web update dsh-soul

插件配置由 cordis.patch.yml 提供:

- insert:
    - id: soul
      name: dsh-soul

截图

设置页(关于你 + 特质)

设置页上半部分:关于你 与 特质起始

设置页(特质 + 输出语言 + 自定义指令)

设置页下半部分:特质、输出语言与自定义指令

/soul 命令提示

/soul 命令自动补全提示与输入框

/soul 命令输出(设置昵称、show、enable、disable、reset)

/soul 多种命令的输出示例

使用

启动 DSH 后,进入设置页面中的「个性化设置」栏目,修改配置并点击「保存设置」。

也可以使用斜杠命令:

/soul show        查看当前配置(含确认模式与预设数量)
/soul set k=v     修改配置项(如 /soul set style=humorous language=en;光轨:trailColor=#679EFE trailSpeed=fast trailWidth=thick)
/soul save <名>   保存当前配置为人设预设
/soul use <名>    应用人设预设
/soul list        查看人设预设(✔ 标记当前匹配项)
/soul del <名>    删除人设预设(delete / rm 别名)
/soul confirm     应用待确认的人设变更(确认模式)
/soul reject      拒绝待确认的人设变更
/soul reset       重置配置(保留人设预设库)
/soul enable      启用个性化设置
/soul disable     禁用个性化设置
/soul 小明        设置昵称

配置保存后会同步到所有活动 Agent,当前会话下一次请求即可使用最新配置;无实际变化的保存不产生注入消息。

Agent 也可以通过工具 set_persona 在对话中直接调整你的人设(昵称、回复风格和语调、特质、回复语言、自定义指令)。模型只会在明确请求改变称呼、语气、风格或语言时调用该工具。开启「人设变更需确认」(requireToolConfirmation)后,该工具的修改会以待确认提议返回,需使用 /soul confirm 确认或 /soul reject 拒绝后才会生效。

配置文件

插件将配置保存到 DSH 的用户数据目录,文件名为:

soul-config.json

配置示例:

{
  "enabled": true,
  "nickname": "小明",
  "occupation": "软件工程师",
  "bio": "对编程和技术感兴趣",
  "style": "professional",
  "language": "zh",
  "customInstructions": "请保持简洁,优先给出结论。",
  "requireToolConfirmation": false,
  "trailEnabled": true,
  "trailColor": "#679EFE",
  "trailSpeed": "slow",
  "trailWidth": "thin"
}

人设预设保存在同一文件的 personas 字段:名称 → 人设字段快照(昵称/职业/介绍/风格/特质/语言/自定义指令)+ updatedAt;预设库变更不影响活动配置,使用预设时才应用到配置并同步会话。

输入框光轨字段:trailEnabled(是否启用,默认 true)、trailColor(6 位十六进制颜色,统一大写存储,默认 #679EFE)、trailSpeedslow / normal / fast,默认 slow)、trailWidththin / normal / thick,默认 thin)。这四个字段属纯外观配置,只落盘、不进入 system prompt、不触发会话注入。

字段长度上限:昵称 / 职业 50 字符,介绍 500 字符,自定义指令 2000 字符;颜色必须为 #rrggbb 形式。未知字段会被丢弃,非法或超限字段整单拒绝(HTTP 返回 400 与字段级错误明细)。

实现原理

插件通过 compilePrompt() 将昵称、风格、语调和自定义指令编译成 system prompt,并注册到 DSH:

spCtx.systemPrompt.section({
  name: 'soul:persona',
  order: 0,
  text: () => compilePrompt(configCache || DEFAULT_CONFIG)
})

配置更新后,插件会遍历所有活动 Agent,使用标准 UserMessage 调用 agent.inject()

agent.inject(createUserMessage({
  content: [{ type: 'text', text: prompt }],
  source: {
    kind: 'plugin',
    plugin: 'dsh-soul',
    form: 'snapshot',
    sections: [{ name: 'soul:persona', text: prompt }]
  }
}))

agent.inject() 会将最新配置放入 Agent 的待处理上下文,在下一次请求中生效;不会主动触发新请求,也不会修改历史消息。

许可证

MIT License