Metadata-Version: 2.1
Name: nonebot-plugin-shiro-personification
Version: 0.5.2
Summary: 基于群聊与私聊上下文的人设回复插件，支持作息模拟、联网检索、风格学习、主动私聊、贴图、画像与 Agent 工具调用。
Keywords: nonebot,nonebot2,plugin,onebot,personification,chatbot
Author-Email: luojisama <2534316454@qq.com>
License: MIT
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Communications :: Chat
Project-URL: Homepage, https://github.com/luojisama/nonebot-plugin-personification
Project-URL: Bug Tracker, https://github.com/luojisama/nonebot-plugin-personification/issues
Project-URL: Repository, https://github.com/luojisama/nonebot-plugin-personification
Requires-Python: >=3.10
Requires-Dist: nonebot2>=2.2.0
Requires-Dist: nonebot-adapter-onebot>=2.4.0
Requires-Dist: nonebot-plugin-apscheduler>=0.3.0
Requires-Dist: nonebot-plugin-localstore>=0.6.0
Requires-Dist: nonebot-plugin-htmlrender>=0.2.0
Requires-Dist: openai>=1.0.0
Requires-Dist: anthropic>=0.34.0
Requires-Dist: filelock>=3.16.0
Requires-Dist: watchdog>=4.0.0
Requires-Dist: pydantic
Requires-Dist: httpx
Requires-Dist: Pillow
Requires-Dist: PyYAML
Description-Content-Type: text/markdown

# nonebot-plugin-shiro-personification

基于 NoneBot2 和 OneBot V11 的拟人化聊天插件，围绕群聊与私聊上下文构建人设回复，支持作息模拟、联网检索、风格学习、主动私聊、贴图、画像、长期记忆与 Agent 工具调用。

## 特性

- 群聊回复、随机插话、戳一戳响应、私聊上下文记忆
- Agent 工具调用：联网搜索、天气、时间、新闻、群信息、好友申请、定时任务
- 并行研究工具：面向复杂查询和生图准备并发聚合联网、Wiki、图片与视觉资料
- 用户画像、长期记忆、记忆宫殿、群聊风格学习、话题摘要与上下文压缩
- 主动私聊、群空闲主动发话、Qzone 说说、远程 skill 审批与插件知识库
- 图片生成、贴图库自动标注、语义选图、视觉分析与 LLM 决策 TTS 语音回复

## 安装

```bash
nb plugin install nonebot-plugin-shiro-personification
```

或：

```bash
pip install nonebot-plugin-shiro-personification
```

## 环境要求

- Python `>=3.10`
- NoneBot2
- OneBot V11 适配器

## 配置

- 完整配置表见 [CONFIG.md](./CONFIG.md)，其中包含每一个配置项的示例写法、默认值与备注。
- 默认使用 `nonebot-plugin-localstore` 的数据目录；如需兼容旧部署，可通过 `personification_data_dir` 显式覆盖。

## 常用命令

- `拟人帮助`
- `查看配置`
- `拟人开关 [开启/关闭]`
- `拟人语音 [开启/关闭]`
- `拟人联网 [开启/关闭]`
- `拟人主动消息 [开启/关闭]`
- `开启拟人` / `关闭拟人`
- `开启表情包` / `关闭表情包`
- `拟人作息 [开启/关闭/全局开启/全局关闭]`
- `学习群聊风格`
- `查看群聊风格 [群号]`
- `查看画像` / `刷新画像`
- `群好感` / `设置群好感 [群号] [数值]`
- `清除记忆 [全局/@用户/用户ID]`
- `完全清除记忆`
- `永久拉黑 [用户ID/@用户]`
- `取消永久拉黑 [用户ID/@用户]`
- `发个说说`
- `/persona help`

## 联动与兼容

- `nonebot-plugin-htmlrender` 作为默认依赖声明；不可用时相关渲染能力会自动降级，不影响主插件加载。
- `nonebot-plugin-shiro-signin` 暂未发布，因此当前不会作为安装文档中的可选 extra 提供。
- 未安装签到联动插件时，好感度、称号、黑名单等联动能力会自动降级，不影响主插件加载。
- 依赖其他插件时统一使用 `require(...)` 声明，避免因普通 `import` 提前导入导致插件加载失败。

## 更新

### 0.5.2

- 同步本地 `personification` 新功能：并行研究工具、图片生成 skill、模型路由、回复风格策略与最新测试。
- TTS 支持由 LLM 在合成前决策 `voice/text/block`，并加入内置安全策略与自定义禁读策略。
- 修复 `nonebot_plugin_htmlrender` 加载顺序，避免普通 import 提前导入后再次 `require()` 时报错。
- 去除普通聊天意图兜底中的关键词语义判断，保持回复、YAML、TTS 与贴图路径由统一语义帧驱动。

### 0.5.1

- 将本地 `personification` 的当前功能面、测试与配置项完整同步到发布包 `nonebot-plugin-shiro-personification`。
- 新增稳定的 `web_console_api` 接口，供 `nonebot-plugin-shiro-web-console` 在在线版与本地版之间统一读取状态、全局配置、群配置与统计信息。
- 补齐轻量模型、视觉/视频理解回退、插件知识库构建、图片输入模式等配置文档，并修正文档中对数据目录配置的旧说明。

### 0.5.0

- 完整迁移本地 `personification` 功能到发布包，补齐长期记忆、记忆宫殿、TTS、远程 skill 审批、插件知识库等能力。
- 修复插件商店加载问题，避免 `nonebot_plugin_htmlrender` 因提前导入导致后续 `require()` 失败。
- 统一改为使用 `nonebot-plugin-localstore` 的 `get_plugin_data_dir()` 管理插件数据目录。
- 放宽 `pydantic` 依赖限制，并修正配置模型以兼容 `pydantic v1/v2`。
- 增补完整配置文档，覆盖全部配置项、示例写法、默认值与备注。
- 文档中明确说明签到联动插件暂未发布，相关能力仅保留兼容降级逻辑。

### 0.4.0

- 完整迁移本地 `personification` 开发版架构到在线版包。
- 新增 Agent 工具调用、用户画像、自定义 skills、群摘要与上下文压缩。
- 新增群空闲主动发话、好友申请判定、贴图库自动标注与语义选图。

## License

[MIT](./LICENSE)
