PocketSWPU/dsh-serendipity 预览 preview

PocketSWPU/dsh-serendipity

Plugin插件 Native原生 ⭐ 3 MIT Sessions & Context会话与上下文

这是一个把用户本人当主角的 RPG 养成插件。核心是对话后触发随机奇遇、六维属性跨会话持久化、带设置页 UI,已发布 npm @pocket30/dsh-serendipity

Project Overview项目介绍

This is a native plugin built exclusively for DeepSeek Harness (DSH) that adds an idle character-raising RPG layer to your daily AI-assisted workflow. It can be installed via the DSH CLI with the command npx @deepseek-ai/dsh plugin --profile web add @pocket30/dsh-serendipity@1.0.0. After installation, you will need to restart the DSH web process and hard refresh your browser to see the new "Serendipity Settings" page in the DSH settings menu. It triggers random narrative events after every user-initiated conversation round, and avoids infinite loops because it explicitly ignores rounds that are injected by the plugin itself.

Events are sorted into four tiers: daily, adventure, epic, and legend, unlocked incrementally as your character levels up. There are over 700 events across 7 themes, and you can choose to only trigger events from a single theme to maintain narrative immersion. Each event can have branching paths that are selected based on your character's current six core attribute values, so different attribute builds get entirely different story outcomes. All character attribute and level data persists across sessions and restarts when using the recommended web profile.

The plugin requires DSH CLI version 0.1.0-rc.6 or a compatible equivalent, and it is recommended that you use the web profile which provides built-in cross-session storage. If you use a headless or TUI profile that does not support storage domains, the plugin will fall back to in-memory storage and send a warning alert to notify you of the change. All configuration can be edited visually through the dedicated settings page, and changes are written immediately to your DSH settings file and take effect right away. The entire project is open source under the permissive MIT license.

这是一款DeepSeek Harness(DSH)原生插件,在用户每次完成对话后,有概率触发一段随机的“工作奇遇”短剧情,将用户本人作为游戏主角进行养成。奇遇分科幻、玄幻、武侠等七大主题,共有超过700个不同事件,每个事件会对主角的力量、智力等六项属性产生不同影响,还会积累经验升级角色等级。

插件支持等级解锁机制,等级越高越容易解锁触发更宏大的奇遇事件,还支持属性分支剧情,相同奇遇会根据当前角色属性走向不同结局,过往奇遇也会和后续剧情产生联动,体验连贯有趣。奇遇触发在模型完成本轮工作任务回复之后,不会打断正常工作流程,工作和奇遇互不干扰,又能彼此呼应结合。

需要DSH CLI 0.1.0-rc.6或兼容版本安装,推荐使用web profile以获得跨会话持久化存储能力,安装后可在DSH设置页找到可视化配置面板,自定义触发概率、冷却间隔、开启禁用主题等,所有配置即时生效并持久化保存,项目开源遵循MIT许可。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

npx @deepseek-ai/dsh plugin --profile web add @pocket30/dsh-serendipity@1.0.0

把 PocketSWPU/dsh-serendipity 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

工作奇遇(@pocket30/dsh-serendipity)

一个 DeepSeek Harness(dsh)插件:把用户本人当作主角来养成,在每次对话后的闲暇之余看一个让你会心一笑的简短剧情。

每次你完成一轮对话,插件都有一定概率触发一次随机奇遇。奇遇来自不同主题 (科幻、玄幻、远古、动漫、小说、武侠、都市…),每个主题下都有大量事件, 每个事件会对主角的力量 / 智力 / 敏捷 / 魅力 / 幸运 / 体魄等属性产生 不同程度的影响(有增益、有代价、有权衡),并积累经验、升级等级。

  • 等级解锁宏大事件:事件按层级划分(日常 → 冒险 → 史诗 → 传奇), 等级越高,越能解锁并更常遇到更宏大的奇遇。
  • 属性分支线:带分支的事件会根据你当前的属性值走向不同的剧情线 (力量流 / 智力流 / 魅力流……),同样的奇遇在不同角色身上会有不同的结局。
  • 奇遇联动:随着奇遇数量增加,前文的奇遇经历会在后续剧情中提前,产生联动

属性会持久化,跨会话、跨重启持续养成,并反过来影响你与模型的后续对话走向。

插件还会在 dsh 设置页注册一个**“奇遇设置”页**(参照 DSH-better-sidebar 的 “侧边卡片”交互):通用参数开关行 + 主题小卡片网格(点击即开关,齿轮弹窗调 二级设置),修改即时生效(写回 $DSH_HOME/settings.yaml 的 serendipity: 小节)。


✨ 功能概览

  • 🚀 自动触发
    监听 turn/end 事件,仅统计由你主动发起的对话轮次,插件自身注入的剧情轮不会重复触发,避免无限循环。

  • 🎲 概率与冷却
    支持自定义触发概率,以及两次奇遇之间的最少用户对话轮数间隔。

  • 📚 主题与事件库
    内置 7 大主题、700+ 事件(每主题 60+ 日常 / 30+ 冒险 / 10+ 史诗 / 传奇),支持动态追加事件/主题,也可禁用指定主题。题材为单选模式(在设置页点选后,奇遇将仅在该主题范围内触发,不会跨主题跳转)。

  • 🏆 等级解锁机制
    事件划分为 日常 / 冒险 / 史诗 / 传奇 四个等级,随角色等级提升逐步解锁。等级越高,抽中宏大事件的概率越大,同时获得的经验与收益也更丰厚。

  • 🔁 防重复机制
    最近 noRepeatWindow 次(默认 5)奇遇中出现过的同主题事件不会立即再次触发,避免短时间内重复刷到同一剧情;窗口设为 0 可关闭。

  • 🌿 属性分支系统
    支持 branches 的事件会根据主角当前属性值匹配对应分支(例如力量最高触发「以力破局」,智力最高触发「以智取胜」)。分支命中采用属性加权抽取:属性值越高,对应分支被选中的概率越大——奇遇养成的属性会越来越明显地塑造后续剧情走向。每个分支拥有独立的标题、剧情文本和属性结算逻辑。

  • 📈 属性与经验成长
    属性变化在 0~100 区间内自动裁剪,经验值累积后自动提升角色等级。

  • ✍️ 剧情注入方式
    默认采用 followup 模式,触发后由模型以主角视角将奇遇续写成完整故事,并在对话中自然交代属性变动。

  • 🎭 与工作回复分离
    奇遇在模型完成本轮工作任务回复之后独立触发:不打断任务、不影响正常模型输出;奇遇作为单独的输出呈现,剧情又由模型结合刚才的工作内容续写——「干活」与「奇遇」互不干扰,又彼此呼应。

  • 👤 状态可视化
    在设置页的「角色档案」分组中,可直接查看等级、经验、六维属性及最近奇遇记录(支持手动刷新)。同时,模型端可通过 serendipity_status 和 serendipity_reset 工具查询或重置角色档案。

  • ⚙️ 设置页实时配置
    通过 dsh 设置 → "奇遇设置" 进行可视化编辑,修改后即时生效。

  • 💾 跨会话持久化
    优先使用 storage domain(web 组合自带),重启后角色数据不丢失;若当前组合不支持 storage,则自动降级为进程内内存存储,并给出告警提示。

演示效果

奇遇设置页 · 主题卡片

奇遇设置 · 主题卡片网格

奇遇演示 · 奇遇触发

奇遇设置 · 题材选择

dsh 设置页 → “奇遇设置”:通用参数开关行 + 主题小卡片网格(单选,点击即 切换题材),修改即时生效并写回 $DSH_HOME/settings.yaml 的 serendipity: 小节。

触发示例(对话实录)

第一次

【工作奇遇】日常奇遇触发 · 玄幻
传承石碑:断崖下立着一块布满裂纹的石碑,碑文记载着一门失传的功法。你凝神参悟,识海深处传来一声轻叹。
属性变化:智力 +5 · 体魄 +2 · 经验 +14
当前状态:等级 2 · 经验 32/40 · 力量 10 · 智力 24 · 敏捷 10 · 魅力 10 · 幸运 20 · 体魄 14
累计奇遇:4 次
请以主角的视角把这次奇遇自然地融入当前对话,并在合适的位置交代属性变化;不要跳出角色。

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-mnemos 下一个 Next dsh-song-ui →