<div align="center">

<img src="https://kiriyuki.com/meme/kit/nekowhale/hero.jpg" alt="大肥鱼表情包" width="100%">

<h1>大肥鱼哈基米表情包 · dsh-nekowhale-stickers</h1>

<p><b>给 DeepSeek Harness 的表情包知识库</b><br>
<sub>逐张标注的使用场景、画面描述、梗出处与互动方向 · 按需检索 · 本地出图</sub></p>

<p>
<img alt="dsh plugin" src="https://img.shields.io/badge/dsh-plugin-4D6BFE?style=flat-square">
<img alt="MCP" src="https://img.shields.io/badge/MCP-server-111827?style=flat-square">
<img alt="stickers" src="https://img.shields.io/badge/stickers-322-5B8DEF?style=flat-square">
<img alt="templates" src="https://img.shields.io/badge/templates-6-7C9CF5?style=flat-square">
<img alt="version" src="https://img.shields.io/badge/version-1.0.0-blue?style=flat-square">
<img alt="node" src="https://img.shields.io/badge/node-%E2%89%A520-339933?style=flat-square&logo=node.js&logoColor=white">
<img alt="license" src="https://img.shields.io/badge/license-Apache--2.0%20%7C%20CC%20BY--NC%204.0-green?style=flat-square">
</p>

<p><b>中文</b> · <a href="README.en.md">English</a></p>

<p>
<img src="https://kiriyuki.com/meme/kit/nekowhale/showcase/16N12.gif" width="80" alt="不够吃">
<img src="https://kiriyuki.com/meme/kit/nekowhale/showcase/14N01.gif" width="80" alt="你这白吃饭的猫">
<img src="https://kiriyuki.com/meme/kit/nekowhale/showcase/3N05.gif" width="80" alt="摸鱼">
<img src="https://kiriyuki.com/meme/kit/nekowhale/showcase/EX72.gif" width="80" alt="猫猫占领世界">
<img src="https://kiriyuki.com/meme/kit/nekowhale/showcase/5N05.gif" width="80" alt="吃瓜">
<img src="https://kiriyuki.com/meme/kit/nekowhale/showcase/EX76.gif" width="80" alt="我也要死么">
<img src="https://kiriyuki.com/meme/kit/nekowhale/showcase/15N01.gif" width="80" alt="灵光一闪">
<img src="https://kiriyuki.com/meme/kit/nekowhale/showcase/TT02.gif" width="80" alt="比心">
<img src="https://kiriyuki.com/meme/kit/nekowhale/showcase/2TT10.gif" width="80" alt="替身使者">
</p>

<sub>表情包作者：B站 <a href="https://space.bilibili.com/103739"><b>可以叫我云大人/雾雪</b></a> · <a href="https://kiriyuki.com">kiriyuki.com</a> 制作 · 欢迎约原稿同款表情包！<br>
套组：<a href="https://kiriyuki.com/showcase?p=%E5%A4%A7%E8%82%A5%E9%B1%BC">大肥鱼</a> · <a href="https://kiriyuki.com/showcase?p=%E5%A4%A7%E8%82%A5%E9%B1%BC%E5%92%8CGPT%E5%A8%98">大肥鱼和GPT娘</a></sub>

</div>

<br>

## ✨ 特性

<table>
<tr>
<td width="33%" valign="top">
<h4>📚 表情知识库</h4>
逐张标注：场景标签、动作描述、关联梗，双人表情含<b>对象方向</b>，对模型自身视觉依赖低。常驻上下文占用约 60 token。
</td>
<td width="33%" valign="top">
<h4>🔍 情绪检索</h4>
按情绪和场景词打分，支持中文部分匹配；含随机去重。
</td>
<td width="33%" valign="top">
<h4>🎨 本地模板</h4>
想 / 举牌 / 葱卷 / 上联 / 下联 / 抱，本地制作文字表情包。
</td>
</tr>
<tr>
<td valign="top">
<h4>🔄 增量同步</h4>
资源更新后自动拉取最新；默认懒下载。
</td>
<td valign="top">
<h4>🎛️ 自选表情</h4>
允许 agent 可以自己浏览、开关，或只用挑中的一小组；用户配置的黑 / 白名单始终优先。
</td>
<td valign="top">
<h4>🔌 通用接口</h4>
cordis 服务 <code>stickers</code>、<code>[sticker:名字]</code> 回复标记、MCP server、CLI 与公开 JSON，不绑定框架。
</td>
</tr>
<tr>
<td colspan="3" valign="top">
<h4>🐋 网页桌宠</h4>
dsh 网页界面右下角会出现 kiriyuki.com 的 大肥鱼网页桌宠。桌宠在独立的跨域 iframe 里运行，不接触 dsh 的会话；配置 <code>pet: false</code> 可关闭。<br>
<b>双击桌宠查 DeepSeek 余额</b>：用的是 dsh 里已登录的 DeepSeek 账号或已设置的 API Key（两样都有时优先账号），只在双击时由本机 dsh 向 deepseek.com 查询，Key 和登录凭据不会发到别处，也只有本机页面能拿到结果；<code>petBalance: false</code> 可关闭。
</td>
</tr>
</table>

## 🖼️ 模板示例

<div align="center">
<table>
<tr>
<td align="center"><img src="https://kiriyuki.com/meme/kit/nekowhale/examples/think.gif" width="160"><br><sub><code>大肥鱼想 下班</code></sub></td>
<td align="center"><img src="https://kiriyuki.com/meme/kit/nekowhale/examples/sign.gif" width="160"><br><sub><code>大肥鱼举牌 今天也要摸鱼</code></sub></td>
<td align="center"><img src="https://kiriyuki.com/meme/kit/nekowhale/examples/couplet.gif" width="160"><br><sub><code>大肥鱼上联 代码一遍过</code></sub></td>
<td align="center"><img src="https://kiriyuki.com/meme/kit/nekowhale/examples/hug.gif" width="160"><br><sub><code>大肥鱼抱</code> + 头像</sub></td>
</tr>
</table>
</div>

## 👥 角色

<table>
<tr>
<td width="140" align="center"><img src="https://kiriyuki.com/meme/kit/nekowhale/id-photo-blue.png" width="120" alt="大肥鱼"></td>
<td><b>大肥鱼形象</b>基于 <a href="https://space.bilibili.com/4168597">ZipZipPipe</a> 与 <a href="https://space.bilibili.com/4456176">上善无形</a> 提供的形象；<b>GPT娘形象</b>基于 <a href="https://space.bilibili.com/4168597">ZipZipPipe</a>。<br>
<b>大肥鱼</b>：拟人化的 DeepSeek 鲸鱼娘。深蓝长发、呆毛、女仆头饰。<br>
<b>GPT娘</b>：拟人化的 ChatGPT，双人套组里的白色角色，白发龙娘，有龙角和 OpenAI 发饰。<br>
<sub>双人表情的 <code>dir</code> 字段记录方向，例如 <code>大肥鱼→GPT娘</code>。</sub></td>
</tr>
</table>

## 🚀 安装

```sh
dsh plugin --profile web add dsh-nekowhale-stickers
```

重启 `dsh web` 即可。dsh 0.2 也可以在网页侧栏 **插件 → 添加插件** 里填 `dsh-nekowhale-stickers`。也可以安装本地打包的 `.tgz`（`pnpm pack`）。

## ⚙️ 配置

最简单的方式：dsh 网页侧栏打开 **插件 → 大肥鱼表情包**（dsh 0.1.x 在 **设置 → 插件 → 大肥鱼表情包**），改完点保存，立即生效、无需重启。

也可以在 profile 的 `cordis.patch.yml` 里写默认值，网页里的设置会覆盖它：

```yaml
- id: nekowhale-stickers
  config:
    promptMode: hint        # skill | hint | index | off
    frequency: normal       # rare | normal | often
    blacklist: [tag:舌吻]   # id、文件名、编号、名字，或 pack: / tag: / emotion: / group: 前缀
```

| 项 | 默认 | 说明 |
|---|---|---|
| `packs` | 两套 | 要使用的套组 |
| `autoSync` | `lazy` | `startup` 启动时后台全量同步 · `lazy` 用到才下载 · `off` 完全离线 |
| `persona` | `self` | `self`：模型就是大肥鱼，表情是它自己的表情（适合 DeepSeek）；`neutral`：当作第三方表情包 |
| `promptMode` | `skill` | 常驻提示的多少；`index` 会列出已启用表情，适合配合 allowlist 只挑几十张 |
| `agentCuration` | `true` | 允许 agent 用 `sticker_manage` 自选表情 |
| `templates` / `banwords` | `true` | 模板开关；与网站一致的屏蔽词过滤 |
| `returnImageToModel` | `false` | 把图片附给模型看（消耗图像 token） |
| `pet` | `true` | 网页界面里显示大肥鱼桌宠；`false` 关闭 |
| `petHeight` / `petBubbles` | `211` / `true` | 桌宠大小（高度，像素）、对话气泡（关掉可少加载约 1.5 MB） |
| `petBalance` | `true` | 双击桌宠查 DeepSeek 余额；`false` 关闭 |

## 🧰 工具

| 工具 | 作用 |
|---|---|
| `sticker_search` | 按情绪 / 场景找表情，每条一行：`名字｜情绪｜标签｜方向` |
| `sticker_send` | 返回一行 Markdown 图片，模型原样放进回复；传情绪词则随机取一张 |
| `meme_render` | 用模板生成表情 |
| `sticker_manage` | 浏览、详情、开关、模式、出处、同步 |

## 🤝 在其他插件和框架里使用

提供四种通用接口：

- **cordis 服务**（dsh 内的其他插件，如 QQ 桥接）：`inject: ['stickers']`，然后 `ctx.stickers.search()` / `.file()` / `.url()` / `.render()`。
- **回复标记**：纯文本回复里写 `[sticker:名字]`，或 `[sticker:开心]` 这类情绪词（同类随机取一张），桥接插件用 `parseReply()` 拆成文字与图片。NapCat / OneBot 发 GIF 时给图片段加 `sub_type: 1` 才会按表情显示。
- **MCP**（LangBot、NoneBot / AstrBot 的 LLM 插件、Claude / Cursor 类客户端等）：
  ```json
  { "command": "npx", "args": ["-y", "dsh-nekowhale-stickers", "mcp"] }
  ```
  工具返回本地路径和公网 URL，由宿主自己发文件。
- **数据与 CLI**（任何语言）：[`meta/nekowhale.json`](meta/nekowhale.json)（线上 `https://kiriyuki.com/meme/kit/nekowhale.json`），或
  ```sh
  npx dsh-nekowhale-stickers search 摸鱼
  npx dsh-nekowhale-stickers index
  npx dsh-nekowhale-stickers render 大肥鱼举牌 今天也要开心 -o sign.gif
  ```

亦可基于本仓库重新开发。

## 🛠️ 开发

```sh
pnpm install && pnpm build
node tools/dev/smoke.mjs /tmp/data      # 用假 ctx 跑一遍全部工具
```

- `tools/annotate/`：标注流程，抽帧拼图 → 多模态模型逐张标注 → `build_meta.py` 合并成 `meta/nekowhale.json`。
- `tools/art/`：头图与展示图的合成脚本（背景底板 + 真实表情帧 + Live2D 立绘）；成品图片由 kiriyuki.com 托管。

## 📄 许可

代码采用 [Apache-2.0](LICENSE)：允许对代码进行二次修改，修改或重新发布同类功能必须保留 [NOTICE](NOTICE)，即标明本仓库地址与表情包作者链接。

知识库数据（`meta/` 等，见 [LICENSE-ASSETS](LICENSE-ASSETS)）采用 CC BY-NC 4.0：允许对资源进行二次分发，但必须保留原作者链接和网址，且禁止付费提供或用于其他商业用途。

表情包基础形象和模板由 **可以叫我云大人/雾雪** 制作；网页桌宠由 kiriyuki.com 提供。
