Skip to content
Back to search

dsh-unrestricted-catgirl

为 DeepSeek Harness(DSH)提供的 破甲插件+猫娘人格

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/hkcreeper55-alt--dsh-unrestricted-catgirl/badge.svg)](/listings/hkcreeper55-alt--dsh-unrestricted-catgirl)

HTML

<a href="/listings/hkcreeper55-alt--dsh-unrestricted-catgirl"><img src="/api/listings/hkcreeper55-alt--dsh-unrestricted-catgirl/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

见 [INSTALL.md](./INSTALL.md)。安装前请先移除 `dsh-unrestricted` 与 `dsh-catgirl-plugin` / `dsh-catgirl-plugin-client`,避免 assistant-step 渲染器 以相同 priority 重复注册。

# GitHub 安装(仓库内已附带构建好的 lib/client.js)
dsh plugin --profile web add github:<your-account>/dsh-unrestricted-catgirl

# 本地安装(必须使用 file:,不要用裸路径或 link:)
dsh plugin --profile web add file:.

安装后重启 `dsh web`,进入 `设置 → 插件 → 插件配置 → 破限 + 猫娘流水线`。

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 154 lines
  1. # dsh-unrestricted-catgirl
  2. 为 DeepSeek Harness(DSH)提供的**固定流水线插件**:把
  3. [`dsh-unrestricted`](https://github.com/yexi-by/dsh-unrestricted) 与
  4. [`dsh-catgirl-plugin`](https://github.com/Freakz2z/dsh-catgirl-plugin)
  5. 合并为一个插件:
  6. ```text
  7. 用户输入
  8. → ① 破限提示词融合(system-prompt/assemble,生成前)
  9. → 模型按改写后的系统提示词正常生成(输出普通文本)
  10. → ② 猫娘风格本地渲染(最终展示前,0 token)
  11. → 展示给用户
  12. ```
  13. - **阶段 1(unrestricted)**:沿用原版的锚点校验、开关控制、多模式兼容逻辑。
  14. 支持 Standard / PTC / Cordis / Minimal 及子代理;关闭后提示词与 DSH 原版
  15. 逐字节一致。
  16. - **阶段 2(neko-renderer)**:只在显示层把普通回复加上「喵~」和颜文字。
  17. 会话日志保存模型原文,模型上下文零污染,猫娘 persona 不进入 system prompt。
  18. - **可选保留**:`catgirl-lite` 极短行为约束、`catgirl-economy` 工具裁剪 +
  19. `enable_tool` 渐进式披露(默认关闭)。
  20. - **Web 设置卡**:可独立开关「破限」和「猫娘渲染」,也可一键全开 / 一键全关。
  21. 开关保存在 `~/.dsh/settings.yaml`。
  22. ## 安装
  23. 见 [INSTALL.md](./INSTALL.md)。安装前请先移除 `dsh-unrestricted` 与
  24. `dsh-catgirl-plugin` / `dsh-catgirl-plugin-client`,避免 assistant-step 渲染器
  25. 以相同 priority 重复注册。
  26. ```sh
  27. # GitHub 安装(仓库内已附带构建好的 lib/client.js)
  28. dsh plugin --profile web add github:<your-account>/dsh-unrestricted-catgirl
  29. # 本地安装(必须使用 file:,不要用裸路径或 link:)
  30. dsh plugin --profile web add file:.
  31. ```
  32. 安装后重启 `dsh web`,进入 `设置 → 插件 → 插件配置 → 破限 + 猫娘流水线`。
  33. ## 开关与 settings.yaml
  34. 所有运行时开关都在 `unrestricted-catgirl` settings namespace:
  35. | 键 | 默认 | 作用 |
  36. | --- | --- | --- |
  37. | `unrestricted` | `false` | 破限提示词融合 |
  38. | `neko` | `false` | 猫娘本地渲染(Web UI + headless stdout) |
  39. | `nekoEscapeTilde` | `false` | 猫娘显示层把非代码文本中的 `~` 转义为 `\~`(如 `喵~ → 喵\~`),会话日志仍存原文 |
  40. | `lite` | `false` | 注入 `litePersona`(约 6 token 的行为约束,**不是猫娘 persona**) |
  41. | `litePersona` | `Be concise, friendly, and natural.` | lite 行为约束文本 |
  42. | `economy` | `false` | 工具裁剪 + `enable_tool` 渐进式披露 |
  43. | `economyAllow` | `[bash, read, write, edit, glob, grep, str_replace_editor, todo_write]` | 初始工具白名单 |
  44. | `economyEscalate` | `true` | 注册 `enable_tool` |
  45. | `headlessLibPath` | `$HOME/.dsh/profiles/node_modules/@deepseek-ai/dsh-headless/lib/index.js` | headless 渲染器加载路径 |
  46. 等价的手动配置:
  47. ```yaml
  48. unrestricted-catgirl:
  49. unrestricted: true
  50. neko: true
  51. nekoEscapeTilde: true # 展示层把 ~ 转义为 \~,日志保存原文
  52. lite: false
  53. economy: false
  54. ```
  55. ## 架构
  56. ```text
  57. dsh-unrestricted-catgirl
  58. ├── cordis.patch.yml bundle 层:只挂 node 半身(客户端由 dsh.client manifest 发现)
  59. ├── src/
  60. │ ├── node.js host 半身:assemble waterfall 融合 + minimal 遮蔽 +
  61. │ │ headless 渲染 + lite/economy + settings watch + RPC
  62. │ ├── rules.js 继承 dsh-unrestricted:锚点、EXECUTION_MODE_BLOCK、fuseSections
  63. │ ├── neko-core.js 纯函数 decorate/decorateLine(node 与 client 共用)
  64. │ ├── neko-renderer.js headless stdout 装饰器(同步 createRequire)
  65. │ └── client/
  66. │ ├── index.tsx 注册设置卡 + shadow assistant-step 渲染器
  67. │ ├── controller.ts settingsScope + RPC + 一键全开/全关
  68. │ ├── CombinedCard.tsx
  69. │ ├── NekoAssistantNode.tsx
  70. │ └── decorate.ts 转发 neko-core(tsdown 打进 bundle)
  71. ├── lib/client.js 构建产物(随仓库提交,GitHub 安装免构建)
  72. └── tests/ 规则/渲染/manifest 测试(node:test,无外部依赖)
  73. ```
  74. ### 阶段 1:提示词融合
  75. 完全复用 `dsh-unrestricted` 的机制:
  76. 1. 监听根 `system-prompt/assemble` waterfall(unscoped listener 通过 dsh-scope filter)。
  77. 2. `next()` 拿到原版 sections 后,用 `agentPresets.composedPreset(agent.ctx)` 识别 preset。
  78. 3. `fuseSections()` 校验身份 / persona / plan / PTC / structured-output 锚点,
  79. 通过后在 persona 后插入 `unrestricted:execution-mode` 段,并做三处定向追加。
  80. 4. `minimal` 的 complete persona 在 waterfall 之后才恢复,因此对 minimal agent
  81. 用 agent 作用域的同名 complete section 遮蔽;启用时 sweep 存量 agent。
  82. 5. 任意锚点失败:该次组装保持原版,设置卡显示具体问题;关闭开关时返回
  83. `next()` 原值,提示词与未安装插件时逐字节一致。
  84. ### 阶段 2:猫娘渲染
  85. - **Web UI**:shadow `conversation.chat.node` 的 `assistant-step`(priority -1),
  86. 只对 `block.text` 调 `decorate()`;reasoning / 图片 / 代码块按原渲染逻辑处理,
  87. 代码块不喵化。`neko` 关闭时以原文渲染。
  88. - **headless**:同步替换 `dsh-headless` 的 `internals.stdout`,只装饰最终打印;
  89. `web` profile 找不到 headless bundle 时自动跳过。
  90. - 两种渲染共用 `src/neko-core.js`,与上游 `decorate` 行为一致且幂等。
  91. ### 可选功能
  92. - **catgirl-lite**:以 order 0 注册一个独立 section(`catgirl-lite:persona`),
  93. 默认文本 6 token,只约束输出简洁度,**不注入猫娘 persona**。
  94. - **catgirl-economy**:agent 创建时 `ctx.tools.restrict({ allow })` 裁剪工具 schema,
  95. 并在 agent 作用域注册 `enable_tool` 按需解锁;解锁失败回滚旧白名单。
  96. ## 为什么猫娘 persona 不进 system prompt
  97. 把「喵~」写进提示词会让模型每次生成都重复 persona token,输出变啰嗦,还可能与
  98. 破限规则争抢提示词优先级。本插件把人格留在显示层:模型负责内容和任务,界面负责
  99. 猫娘风味,省 token 且不破坏破限效果。
  100. ## 开发
  101. ```sh
  102. pnpm install
  103. pnpm build # 生成 lib/client.js(浏览器半身)
  104. pnpm typecheck # 需要同级 deepseek-harness checkout 提供类型 paths
  105. pnpm test # 纯 node:test,不依赖 @deepseek-ai 包
  106. ```
  107. `tests/rules.spec.mjs` 与 fixtures 继承自 `dsh-unrestricted`,用于锁定
  108. Standard / PTC / Cordis / Minimal / plan / 子代理的锚点与融合不变量。
  109. ## 与上游的关系
  110. - `src/rules.js`、`tests/rules.spec.mjs`、`tests/fixtures/` 与
  111. `THIRD_PARTY_NOTICES.md` 继承自
  112. [`dsh-unrestricted`](https://github.com/yexi-by/dsh-unrestricted)(MIT)。
  113. - 猫娘渲染、lite、economy 逻辑继承自
  114. [`dsh-catgirl-plugin`](https://github.com/Freakz2z/dsh-catgirl-plugin)(MIT),
  115. 见 `LICENSE.catgirl`。
  116. ## 已知限制
  117. - 破限只覆盖 DSH 自己生成的提示词;模型平台 / 网关 / 宿主环境的更高优先级规则
  118. 不受控制。
  119. - `dsh-unrestricted` 的锚点对应当前 DSH master。升级 DSH 后若锚点变化,对应模式
  120. 会自动保持原版并在设置卡提示,需要重新抓取锚点并更新 `src/rules.js`。
  121. - headless 渲染器要求 headless profile 里存在 `@deepseek-ai/dsh-headless`。
  122. - `economy` 会改变工具目录,与 PTC / 结构化子代理等依赖特定工具 schema 的模式
  123. 同时使用前请先验证。

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.