Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
155 commits
Select commit Hold shift + click to select a range
51c64f6
refactor: 简化模型获取逻辑,移除不必要的注释和代码
MiaowFISH Sep 19, 2025
8dae32d
refactor: 优化世界状态管理与响应处理机制
MiaowFISH Sep 19, 2025
d76d1eb
feat: 更新配置版本至 2.0.2,添加新版本迁移逻辑,优化工作记忆处理
MiaowFISH Sep 19, 2025
a01b1c6
📝 Add docstrings to `dev`
coderabbitai[bot] Sep 19, 2025
4e19c8d
Merge pull request #158 from YesWeAreBot/coderabbitai/docstrings/d76d1eb
MiaowFISH Sep 21, 2025
c8f7b8d
refactor: use WithSession type for session management
MiaowFISH Sep 21, 2025
8e6a446
refactor: remove vision-tools package and its related files
MiaowFISH Sep 24, 2025
8a34b39
fix: add error type annotations in catch blocks across multiple servi…
MiaowFISH Sep 24, 2025
691c461
feat(pglite): implement PGlite driver with vector support and databas…
MiaowFISH Sep 24, 2025
d0d9909
feat(vector-store): create vector store plugin for Koishi
MiaowFISH Sep 24, 2025
823800c
feat(pglite): add comprehensive tests for vector operations and funct…
MiaowFISH Sep 24, 2025
88d0f8d
refactor: move pglite to minato repo
MiaowFISH Sep 25, 2025
eafbaa5
feat(vector-store): update dependencies and enhance configuration opt…
MiaowFISH Sep 25, 2025
d034013
fix(chat-model): correct fetch function signature and improve signal …
MiaowFISH Sep 25, 2025
81ea9db
feat(core-util): support dynamic model or group selection for vision …
MiaowFISH Sep 25, 2025
4395ecb
refactor: remove AppError usage and error handling from multiple serv…
MiaowFISH Sep 25, 2025
53c487d
feat(telemetry): add telemetry plugin with initial configuration and …
MiaowFISH Sep 25, 2025
7fc7d2c
feat: implement ModelSwitcher for dynamic model selection and health …
MiaowFISH Sep 26, 2025
f79868f
refactor: unify switch configuration interfaces and improve logging i…
MiaowFISH Sep 26, 2025
b0bad68
refactor: replace Context with Logger in model classes and improve lo…
MiaowFISH Sep 26, 2025
4c7f3ed
refactor: replace Logger context usage with direct ctx.logger calls a…
MiaowFISH Sep 26, 2025
f524422
refactor: remove logger service and update logging references
MiaowFISH Sep 26, 2025
87278e7
refactor: update commitlint configuration to enforce lower-case subje…
MiaowFISH Sep 26, 2025
da56207
refactor: remove unused logger references and improve logging initial…
MiaowFISH Sep 27, 2025
67c2f0e
refactor: rename Fatherless AI to Featherless AI and update related f…
MiaowFISH Sep 27, 2025
6730b82
refactor: streamline message formatting and enhance error handling in…
MiaowFISH Sep 27, 2025
656d142
refactor: update model switching logic and enhance circuit breaker co…
MiaowFISH Sep 27, 2025
0bfbf9c
refactor: update asset service config to use const for driver schema …
MiaowFISH Sep 27, 2025
f8280e9
refactor: enhance circuit breaker logic and improve model status mana…
MiaowFISH Sep 27, 2025
f394d12
refactor: replace local Logger imports with koishi's Logger and remov…
MiaowFISH Sep 28, 2025
0865ae4
refactor: enhance model weights handling and improve error classifica…
MiaowFISH Oct 1, 2025
bd3392b
refactor: update command structure and authority settings in sticker …
MiaowFISH Oct 1, 2025
7ea256b
refactor: add telemetry service and integrate Sentry for error tracking
MiaowFISH Oct 1, 2025
de7abe7
refactor: streamline HeartbeatProcessor initialization and enhance ev…
MiaowFISH Oct 4, 2025
0fc466d
refactor: update session handling in CoreUtil and Interactions extens…
MiaowFISH Oct 4, 2025
53c726b
refactor: integrate telemetry configuration into the main config and …
MiaowFISH Oct 4, 2025
4ce6e89
chore: update JSX settings in TypeScript configuration
MiaowFISH Oct 10, 2025
ad4b1d1
refactor: enhance tool invocation and extension management
MiaowFISH Oct 11, 2025
ea10e16
refactor: rename ToolKitService to ToolService and update related typ…
MiaowFISH Oct 13, 2025
cd1143f
refactor: remove ArchivalMemoryManager and integrate HistoryManager f…
MiaowFISH Oct 18, 2025
861aea9
refactor: implement HistoryManager for event history management and u…
MiaowFISH Oct 19, 2025
8e7cc02
refactor: update HistoryCommandManager and ContextBuilder for improve…
MiaowFISH Oct 19, 2025
8783762
refactor: streamline event handling and context management by removin…
MiaowFISH Oct 19, 2025
9db7503
refactor: update message handling and history management by renaming …
MiaowFISH Oct 19, 2025
5ed956e
refactor: update package dependencies to latest versions and enhance …
MiaowFISH Oct 22, 2025
ce67931
refactor(extension): implement capability-based context system and re…
MiaowFISH Oct 27, 2025
9f12afb
refactor(extension): implement unified tool/action registry and renam…
MiaowFISH Oct 28, 2025
700bcc9
chore(deps): remove commitlint and commitizen dependencies
MiaowFISH Oct 28, 2025
63ff99a
feat(extension): implement core-util builtin plugin with message send…
MiaowFISH Oct 28, 2025
95e4c10
fix(extension): enhance vision model handling and cleanup code
MiaowFISH Oct 28, 2025
3ba3205
refactor(code-executor): migrate to unified plugin system and simplif…
MiaowFISH Oct 28, 2025
22362bf
refactor(plugins): migrate extensions to unified plugin system and up…
MiaowFISH Oct 28, 2025
ee9c798
feat(core): enable action-level heartbeat continuation control
MiaowFISH Oct 28, 2025
d5dc9c2
refactor(plugin): overhaul tool system architecture with unified plug…
MiaowFISH Oct 29, 2025
93d01cc
refactor(vector-store): migrate from custom driver to pglite plugin
MiaowFISH Nov 3, 2025
6a6514b
refactor(core): update build process, streamline dependencies, and en…
MiaowFISH Nov 8, 2025
9261d29
chore(plugins): move plugin packages to plugins folder
MiaowFISH Nov 8, 2025
134d085
refactor(package): update build scripts to use pkgroll and enhance de…
MiaowFISH Nov 8, 2025
7f7f5ff
refactor(vector-store): migrate to @yesimbot/vector-driver-pglite and…
MiaowFISH Nov 8, 2025
784ecea
feat(command): reorganize command handling and configuration management
MiaowFISH Nov 8, 2025
6b0cedd
feat(config): add bump and eslint configuration files
MiaowFISH Nov 11, 2025
df179b0
style: make eslint happy
MiaowFISH Nov 11, 2025
7c10da6
style: make eslint happy
MiaowFISH Nov 12, 2025
8d052b4
feat(worldstate): add StimulusCategory
MiaowFISH Nov 12, 2025
01b9468
feat(plugin): impl hook system
MiaowFISH Nov 12, 2025
7778721
feat(context): impl ContextCollector
MiaowFISH Nov 12, 2025
6cf16b0
feat(worldstate): record AgentResponse
MiaowFISH Nov 12, 2025
9ae0853
style: make eslint happy
MiaowFISH Nov 12, 2025
e7e2d61
feat: restructure worldstate service and types
MiaowFISH Nov 13, 2025
4ea8d95
feat(eslint): update rules for import and TypeScript handling
MiaowFISH Nov 13, 2025
4761abf
fix: correct export from worldstate to world in services index
MiaowFISH Nov 13, 2025
d584c6a
feat(model): improve error handling
MiaowFISH Nov 14, 2025
0a381a2
style: improve code formatting
MiaowFISH Nov 14, 2025
67ba1a9
refactor: rename history to recorder and update related references
MiaowFISH Nov 14, 2025
acc7776
refactor(plugin): simplify tool context system and remove legacy cont…
MiaowFISH Nov 14, 2025
9bf2b4d
refactor(plugin)!: migrate tool context to use session directly and u…
MiaowFISH Nov 14, 2025
72bc265
refactor(agent): unify stimulus types and improve context handling in…
MiaowFISH Nov 14, 2025
8ffedac
refactor: update imports and replace context.require with context.ses…
MiaowFISH Nov 14, 2025
acb64e8
style: update eslint config and format code
MiaowFISH Nov 14, 2025
732111c
refactor(types): enhance event data structure and unify event types
MiaowFISH Nov 19, 2025
26d2125
refactor(agent): unify stimulus handling and enhance user message str…
MiaowFISH Nov 19, 2025
e87e071
refactor: rename stimulus to percept and update related types and han…
MiaowFISH Nov 19, 2025
a37c015
style: format code
MiaowFISH Nov 19, 2025
3b62e03
refactor: update package dependencies
MiaowFISH Nov 22, 2025
a8a9d1d
refactor: remove memory plugin
MiaowFISH Nov 22, 2025
b23e948
refactor(world): update world state architecture
MiaowFISH Nov 22, 2025
037d370
wip(world): update event handling and observation types in world serv…
MiaowFISH Nov 23, 2025
7c84a60
fix(model): improve error handling and logging in stream processing
MiaowFISH Nov 23, 2025
a197cbf
fix(config): update maxMessages in migrate function
MiaowFISH Nov 23, 2025
da93c7f
feat(horizon): implement chat mode and event management system
MiaowFISH Nov 27, 2025
ece930a
refactor(plugin): streamline plugin structure and remove unused hooks
MiaowFISH Nov 27, 2025
c2ec49c
wip(horizon): update percept handling and type definitions for improv…
MiaowFISH Nov 27, 2025
1dbab80
feat(core): integrate HorizonService and update percept handling acro…
MiaowFISH Nov 27, 2025
8f7a5d8
refactor(horizon): update DefaultChatMode instantiation and remove un…
MiaowFISH Nov 28, 2025
4d1e5b3
wip(vector-store): remove unused dependencies and localization files
MiaowFISH Nov 28, 2025
6837e4f
chore(packages): update package.json to use 'types' instead of 'typin…
MiaowFISH Nov 29, 2025
7745dc6
refactor(daily-planner): update imports to use 'type' for type-only i…
MiaowFISH Nov 29, 2025
651c9f0
chore(config): update editorconfig and gitignore files
MiaowFISH Nov 29, 2025
7a2e8c9
feat(chat-mode): implement BaseChatMode and refactor DefaultChatMode …
MiaowFISH Nov 30, 2025
fe7e1f8
feat(horizon): improve chat mode interface and implement event conver…
MiaowFISH Nov 30, 2025
178c786
refactor: unify tool and action handling in plugin service
MiaowFISH Nov 30, 2025
428ed69
feat: refactor plugin utilities and reorganize imports for clarity
MiaowFISH Dec 1, 2025
2532d37
refactor(telemetry): move TelemetryConfig to index.ts and enhance ser…
MiaowFISH Dec 1, 2025
732b5c2
refactor(plugin): reorganize tool and action registration methods, up…
MiaowFISH Dec 1, 2025
ec171e3
deps: update @sentry/node to v10.27.0 and change gifwrap import path
MiaowFISH Dec 1, 2025
b860e34
feat(prompt): add template parsing and optimized snippet loading
MiaowFISH Dec 2, 2025
1168fd8
refactor(sticker): reorganize imports and move snippet registration
MiaowFISH Dec 2, 2025
09456f6
feat(plugin): enhance service injection and schema property mapping
MiaowFISH Dec 2, 2025
071fe7f
fix(plugin): properly bind plugin context to action execution
MiaowFISH Dec 2, 2025
5bc71f0
feat(chat-mode): enhance template registration and context building i…
MiaowFISH Dec 2, 2025
df932c6
refactor(heartbeat): enhance template data preparation
MiaowFISH Dec 2, 2025
a8576a1
feat(persona): update persona description and enhance character traits
MiaowFISH Dec 2, 2025
3ac563c
feat(prompts): remove outdated prompt files and add new templates for…
MiaowFISH Dec 2, 2025
88a8775
feat(templates): create modular templates for identity, environment, …
MiaowFISH Dec 2, 2025
5deb687
feat(templates): add current date display to user events template
MiaowFISH Dec 2, 2025
e1db148
feat(chat): enhance message handling and self-info retrieval
MiaowFISH Dec 2, 2025
dcccc88
feat(heartbeat): add session context to view data in heartbeat proces…
MiaowFISH Dec 2, 2025
d2f3065
fix(chat): enhance error handling for request timeouts
MiaowFISH Dec 2, 2025
99b6a61
fix(plugin): remove optional target parameter from sendMessage action
MiaowFISH Dec 2, 2025
6da7074
refactor: update imports to use type-only imports and node module paths
MiaowFISH Dec 2, 2025
17450c6
chore(core): update package info
MiaowFISH Dec 2, 2025
5920548
feat(heartbeat): record timeline events for agent actions and tool usage
MiaowFISH Dec 2, 2025
e3c7012
feat(chat): enhance working memory structure and event handling
MiaowFISH Dec 3, 2025
feac2dd
fix(migrations): handle optional l1_memory in migrateV201ToV202 function
MiaowFISH Dec 3, 2025
b556445
chore(plugins): move to plugins repo
MiaowFISH Dec 7, 2025
0f51d68
feat(horizon): rename event structure fields and add timeline stage m…
MiaowFISH Dec 7, 2025
b0a9d5f
feat(heartbeat): enhance event handling with timeline stages
MiaowFISH Dec 7, 2025
d0aa64b
feat(templates): improve event display logic by adding active and new…
MiaowFISH Dec 7, 2025
452d198
chore: update tooling dependencies and remove unused scripts
MiaowFISH Dec 8, 2025
1716b2a
chore(config): remove legacy config migration system
MiaowFISH Dec 8, 2025
074b8d3
feat(shared-model): add shared model package
MiaowFISH Dec 8, 2025
bff6442
chore(config): remove log level configuration and related code
MiaowFISH Dec 10, 2025
7221428
feat(shared-model): extend shared provider with config schemas and ut…
MiaowFISH Dec 12, 2025
58ec698
refactor(model): migrate to shared provider registry
MiaowFISH Dec 12, 2025
eb77d41
refactor(agent): migrate to shared model package and provider registry
MiaowFISH Dec 12, 2025
750cb43
feat(provider-openai): implement new provider using shared registry
MiaowFISH Dec 12, 2025
90c5a3e
refactor(core): remove telemetry service
MiaowFISH Dec 12, 2025
9c2ebd0
deps(core): remove module exports and unused dependencies
MiaowFISH Dec 12, 2025
ed23436
Update recommended model to `gemini-3-pro` in plugin usage instructions
WSXYT Dec 19, 2025
f8ebe0d
Merge pull request #168 from WSXYT/dev
MiaowFISH Dec 19, 2025
efbaa82
feat(model): refactor provider registry into model service
MiaowFISH Dec 19, 2025
21e9486
refactor(core): replace ProviderRegistry with Model service in AgentC…
MiaowFISH Dec 19, 2025
34f4718
feat(provider-openai): add provider removal and online model fetching…
MiaowFISH Dec 19, 2025
0a5fb08
Fix baseURL handling and improve model endpoint resolution logic (#169)
WSXYT Dec 20, 2025
029eee7
feat(shared-model): add model information fetching and classification
MiaowFISH Dec 20, 2025
6bb826b
feat(model): add unknown model registration and promotion
MiaowFISH Dec 20, 2025
d15bfc1
minify model-index.json
MiaowFISH Dec 23, 2025
7b52cda
refactor: overhaul provider architecture and class structure
MiaowFISH Dec 23, 2025
26a9564
docs(core): reset changelog to standard template
MiaowFISH Dec 23, 2025
36e4259
refactor(core): 重构心跳处理器并迁移至流式响应
MiaowFISH Dec 23, 2025
373817b
feat(core): 新增 Koishi Schema 转换为 JSON Schema 的工具函数
MiaowFISH Dec 26, 2025
57f43ef
feat(core): 优化工具集成流程并支持非流式心跳响应
MiaowFISH Dec 26, 2025
a9bc4b2
feat(provider-openai): 标记 OpenAI 插件为可重用
MiaowFISH Dec 26, 2025
8b9bb46
build: 升级依赖并优化脚本配置
MiaowFISH Dec 26, 2025
e4df505
docs: 完善项目 README 文档
MiaowFISH Dec 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/wild-books-do.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"koishi-plugin-yesimbot-extension-sticker-manager": patch
---

fix authority
5 changes: 4 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@ trim_trailing_whitespace = true
end_of_line = lf
indent_style = space
indent_size = 4
max_line_length = 140
max_line_length = 120

[*.json]
indent_size = 2

[*.yml]
indent_size = 2

[*.vue]
indent_size = 2
20 changes: 9 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
lib
dist
external
lib/
dist/
external/
conversation/

node_modules
npm-debug.log
Expand All @@ -10,20 +11,13 @@ tsconfig.tsbuildinfo
tsconfig.temp.json
package-lock.json
yarn.lock
bun.lock
*.tgz

.turbo
.eslintcache
.DS_Store
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
bun.lock

*.mdt
coverage
data/logs
data/cache
Expand All @@ -32,3 +26,7 @@ data/queue.json
data/emojis.json

__snapshots__

.github/instructions
.github/prompts
.github/copilot-instructions.md
1 change: 0 additions & 1 deletion .husky/commit-msg

This file was deleted.

2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"semi": true,
"singleQuote": false,
"arrowParens": "always",
"trailingComma": "es5"
"trailingComma": "all"
}
251 changes: 207 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,95 +1,258 @@
# YesImBot / Athena

<div align="center">
<img src="https://raw.githubusercontent.com/HydroGest/YesImBot/main/img/logo.png" width="60%" />
<img src="https://raw.githubusercontent.com/HydroGest/YesImBot/main/img/logo.png" width="60%" alt="YesImBot Logo" />

[![npm](https://img.shields.io/npm/v/koishi-plugin-yesimbot?style=flat-square)](https://www.npmjs.com/package/koishi-plugin-yesimbot) [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](http://choosealicense.com/licenses/mit/) ![Language](https://img.shields.io/badge/language-TypeScript-brightgreen) ![NPM Downloads](https://img.shields.io/npm/dw/koishi-plugin-yesimbot) [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/MiaowFISH/YesImBot)
[![npm](https://img.shields.io/npm/v/koishi-plugin-yesimbot?style=flat-square)](https://www.npmjs.com/package/koishi-plugin-yesimbot)
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](http://choosealicense.com/licenses/mit/)
![Language](https://img.shields.io/badge/language-TypeScript-brightgreen?style=flat-square)
![NPM Downloads](https://img.shields.io/npm/dw/koishi-plugin-yesimbot?style=flat-square)
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/MiaowFISH/YesImBot)

**✨ 机器壳,人类心✨**
**✨ 机器壳,人类心 ✨**

_让 AI 大模型自然融入群聊的智能机器人系统_

[快速开始](#-快速开始) • [核心特性](#-核心特性) • [项目结构](#-项目结构) • [文档](#-文档) • [社区](#-社区支持)

</div>

---

## 📖 项目简介

YesImBot (Athena) 是一个基于 [Koishi](https://koishi.chat/zh-CN/) 的智能聊天机器人系统,旨在让人工智能大模型能够自然地参与到群聊讨论中,模拟真实的人类互动体验。通过先进的意愿值系统、记忆管理和工具扩展,为用户提供更加人性化的 AI 交流体验。
YesImBot (Athena) 是一个基于 [Koishi](https://koishi.chat/zh-CN/) 的智能聊天机器人插件,旨在让人工智能大模型能够自然地参与到群聊讨论中,模拟真实的人类互动体验。通过先进的意愿值系统、智能记忆管理和可扩展的工具框架,为用户提供更加人性化、更有温度的 AI 交流体验。

不同于传统的命令式 AI 助手,Athena 的设计理念是让机器人像真正的群友一样参与对话——它会观察群聊氛围、记住对话内容、选择合适的时机发言,而不是被动地等待指令。

## 🎯 核心特性

- **🧠 智能对话管理**:基于意愿值系统控制 Bot 的主动发言频率,模拟真实人类的交流模式
- **💾 记忆系统**:通过 Memory 和 Scenario 管理上下文,使机器人能够记住和理解对话历史
- **🔗 多适配器支持**:支持多种 LLM API(OpenAI、Cloudflare、Ollama 等),实现负载均衡和故障转移
- **🛠️ 可扩展的工具系统**:基于工具调用框架,允许机器人执行各种操作
- **🎭 自定义人格**:轻松定制 Bot 的名字、性格、响应模式等
- **📱 Web 管理界面**:提供直观的 Web 界面进行配置和管理
- **🔌 MCP 扩展支持**:支持 Model Context Protocol 扩展,实现更强大的功能集成
- **🧠 智能意愿系统** - 基于意愿值算法控制 Bot 的主动发言频率,模拟真实人类的交流节奏。Bot 会根据群聊活跃度、@消息、话题相关性等因素动态调整参与意愿,避免过度活跃或过于沉默

- **💾 上下文感知记忆** - 通过 Memory 和 Scenario 系统管理对话上下文,机器人能够记住历史对话、理解话题延续,并在合适的时机回忆起相关内容。支持短期记忆(会话内)和长期记忆(跨会话)

- **🔗 多模型适配器** - 支持多种 LLM API(OpenAI、Cloudflare Workers AI、Ollama 等),内置负载均衡和故障转移机制,确保服务稳定性。可根据任务类型动态选择最合适的模型

- **🛠️ 可扩展工具系统** - 基于工具调用(Function Calling)框架,允许机器人执行各种操作:发送消息、管理记忆、搜索信息、调用外部 API 等。开发者可以轻松添加自定义工具

- **🌍 世界状态管理** - 采用 WorldState 上下文工程设计,将群聊背景、用户信息、时间、环境等信息提炼为结构化的"世界状态",为 AI 提供完整的场景认知

- **🎭 人格化定制** - 支持自定义 Bot 的名字、性格特征、说话风格、兴趣爱好等。通过 Persona 配置和提示词模板,打造独一无二的虚拟角色

- **🔌 插件生态集成** - 充分利用 Koishi 的插件机制,与现有生态无缝集成。支持 Model Context Protocol (MCP) 扩展,可接入更多外部服务和能力

- **📊 智能调度系统** - 内置心跳处理器和事件调度机制,支持定时任务、延迟响应、消息合并等高级功能,让 Bot 的行为更加自然流畅

## 🏗️ 项目架构

Athena 采用模块化设计,核心功能由多个服务层协作完成:

```
packages/
├── core/ # 核心插件
│ ├── agent/ # 智能体系统(意愿值、调度)
│ ├── services/
│ │ ├── memory/ # 记忆管理服务
│ │ ├── model/ # LLM 模型适配服务
│ │ ├── prompt/ # 提示词管理服务
│ │ ├── plugin/ # 工具/插件系统
│ │ ├── horizon/ # 策略与场景管理
│ │ ├── worldstate/ # 世界状态服务
│ │ └── ...
│ └── resources/ # 资源文件(提示词模板等)
├── shared-model/ # 共享模型工具库
└── plugins/
└── provider-openai/ # OpenAI 提供者插件
```

### 架构特点

- **Service-Oriented** - 各功能模块以服务形式独立,通过依赖注入协作
- **Middleware-Based** - 可在消息处理流程的各个阶段插入自定义逻辑
- **Event-Driven** - 基于事件驱动架构,支持异步处理和灵活的消息流转
- **Highly Extensible** - 清晰的接口设计,便于二次开发和功能扩展

## 📦 项目结构

本项目采用 monorepo 架构,包含以下主要包:
本项目采用 Monorepo 架构管理,使用 Turborepo 和 Yarn Workspaces:

| 包 | 描述 | NPM 包名 | 状态 |
| --------------------- | ------------------------------- | ------------------------------- | ---- |
| `packages/core` | 核心机器人插件 | `koishi-plugin-yesimbot` | ✅ |
| `packages/shared-model` | 共享的模型工具和类型定义 | `@yesimbot/shared-model` | ✅ |
| `plugins/provider-openai` | OpenAI 兼容的模型提供者 | `koishi-plugin-yesimbot-provider-openai` | ✅ |

## 🚀 快速开始

### 前置要求

- [Node.js](https://nodejs.org/) >= 18.17.0
- [Koishi](https://koishi.chat/zh-CN/) >= 4.18.7
- 一个可用的 LLM API(如 OpenAI API、Ollama 等)

### 安装

在 Koishi 控制台的插件市场中搜索 `yesimbot`,点击安装即可。

或者使用命令行安装:

```bash
npm install koishi-plugin-yesimbot
# 或
yarn add koishi-plugin-yesimbot
```

### 基础配置

安装后,在 Koishi 配置文件中添加以下配置:

```yaml
plugins:
yesimbot:
# 记忆槽位配置
MemorySlot:
SlotContains:
- 123456789 # 群号
SlotSize: 20
AtReactPossibility: 0.5
IncreaseWillingnessOn:
Message: 15
At: 80
Threshold: 80
MessageWaitTime: 2000

# LLM API 配置
API:
APIList:
- APIType: OpenAI
BaseURL: https://api.openai.com/v1
APIKey: sk-your-api-key-here
AIModel: gpt-4o-mini

# Bot 设定
Bot:
WordsPerSecond: 20
```
YesImBot/
├── packages/
│ ├── core/ # 🎯 核心插件包
│ ├── mcp/ # 🔌 MCP扩展包
│ └── webui/ # 📱 Web管理界面
├── package.json # 项目根配置
└── README.md # 项目说明

详细配置说明请参考 [packages/core/README.md](packages/core/README.md)。

### 快速测试

配置完成后,将 Bot 添加到群聊中。发送消息并 @ 机器人,它应该会根据配置的意愿值系统做出响应。

> [!TIP]
> 如果想要 Bot 更活跃,可以降低 `Threshold` 值;如果想让它更安静,则提高此值。开启 `Debug.TestMode` 可以让每条消息都触发回复,便于测试。

## 📋 文档

### 在线文档

访问官方文档站了解更多:[https://docs.yesimbot.chat/](https://docs.yesimbot.chat/)

### 仓库文档

| 文档 | 描述 |
| ------------------------------------------ | ---------------------------------------- |
| [packages/core/README.md](packages/core/README.md) | 核心插件详细使用说明和配置指南 |
| [conversation/](conversation/) | 设计文档和开发历程记录 |
| [conversation/docs/](conversation/docs/) | 架构设计文档(记忆系统、WorldState 等) |

### 关键概念

- **意愿值系统(Willingness)** - 控制 Bot 主动发言的核心机制
- **记忆槽位(Memory Slot)** - 管理不同会话的上下文隔离和共享
- **世界状态(WorldState)** - 结构化的场景信息,为 AI 提供完整的上下文认知
- **工具调用(Tool Calling)** - 让 AI 能够执行具体操作的框架
- **策略系统(Strategy)** - 根据不同场景选择最合适的提示词策略

## 🛠️ 开发

### 环境设置

```bash
# 克隆仓库
git clone https://github.com/HydroGest/YesImBot.git
cd YesImBot

# 安装依赖
yarn install

# 构建所有包
yarn build

# 开发模式(监听文件变化)
yarn dev
```

### 📦 包说明
### 项目脚本

- `yarn build` - 构建所有包
- `yarn dev` - 开发模式
- `yarn lint` - 运行代码检查
- `yarn test` - 运行测试
- `yarn clean` - 清理构建产物

| 包名 | 描述 | NPM 包名 |
| --------- | --------------------------- | -------------------------------------- |
| **core** | 核心聊天机器人功能 | `koishi-plugin-yesimbot` |
| **mcp** | Model Context Protocol 扩展 | `koishi-plugin-yesimbot-extension-mcp` |
| **webui** | Web 管理界面 | _开发中_ |
### 扩展开发

## 📋 文档导航
Athena 提供了丰富的扩展点,开发者可以:

除了文档站([https://docs.yesimbot.chat/](https://docs.yesimbot.chat/))的文档外,仓库内还有内置的文档可供参考:
1. **添加自定义工具** - 实现新的工具函数,让 AI 能够执行更多操作
2. **扩展服务层** - 增加新的服务模块,如外部 API 集成、数据分析等
3. **定制提示词策略** - 为特定场景设计专门的提示词模板
4. **集成 MCP 协议** - 接入支持 Model Context Protocol 的外部服务

| 文档类型 | 文件路径 | 描述 |
| --------------- | -------------------------------------------------------------------------------- | ----------------------------------- |
| 🎯 **核心功能** | [packages/core/README.md](packages/core/README.md) | 核心插件的详细使用说明和配置指南 |
| 🏗️ **架构设计** | [packages/core/DESIGN.md](packages/core/DESIGN.md) | 系统架构、中间件设计和核心组件说明 |
| 🔧 **扩展开发** | [packages/core/src/extensions/README.md](packages/core/src/extensions/README.md) | 扩展系统开发指南和 API 文档 |
| 🔌 **MCP 扩展** | [packages/mcp/README.md](packages/mcp/README.md) | Model Context Protocol 扩展使用说明 |
| 📱 **Web 界面** | [packages/webui/README.md](packages/webui/README.md) | Web 管理界面使用和开发文档 |
详见开发文档(敬请期待)。

## 🤝 贡献

我们欢迎所有形式的贡献!
我们欢迎各种形式的贡献!无论是报告 Bug、提出新功能建议、改进文档,还是提交代码,都对项目的发展有重要意义。

### 贡献者

感谢所有贡献者们,是你们让 Athena 成为可能。
感谢所有为 Athena 做出贡献的开发者们:

![contributors](https://contrib.rocks/image?repo=HydroGest/YesImBot)

## 💬 社区支持
### 如何贡献

- 🐛 **问题反馈**: [GitHub Issues](https://github.com/HydroGest/YesImBot/issues)
- 💬 **QQ 交流群**: [857518324](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=k3O5_1kNFJMERGxBOj1ci43jHvLvfru9&authKey=TkOxmhIa6kEQxULtJ0oMVU9FxoY2XNiA%2B7bQ4K%2FNx5%2F8C8ToakYZeDnQjL%2B31Rx%2B&noverify=0&group_code=857518324)
1. Fork 本仓库
2. 创建你的特性分支 (`git checkout -b feature/AmazingFeature`)
3. 提交你的更改 (`git commit -m 'Add some AmazingFeature'`)
4. 推送到分支 (`git push origin feature/AmazingFeature`)
5. 开启一个 Pull Request

## 📄 许可证
## 💬 社区支持

### 获取帮助

本项目采用 MIT 许可证 - 查看 [LICENSE](LICENSE) 文件了解详情。
- **问题反馈** - [GitHub Issues](https://github.com/HydroGest/YesImBot/issues)
- **功能建议** - [GitHub Discussions](https://github.com/HydroGest/YesImBot/discussions)
- **QQ 交流群** - [857518324](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=k3O5_1kNFJMERGxBOj1ci43jHvLvfru9&authKey=TkOxmhIa6kEQxULtJ0oMVU9FxoY2XNiA%2B7bQ4K%2FNx5%2F8C8ToakYZeDnQjL%2B31Rx%2B&noverify=0&group_code=857518324)

## 🌟 支持项目
### 相关资源

如果这个项目对您有帮助,请考虑给我们一个 ⭐️!
- [Koishi 官方文档](https://koishi.chat/zh-CN/)
- [Koishi 插件市场](https://koishi.chat/zh-CN/market.html)

## ⭐ Star 历史

[![Athena/YesImBot Star 历史图表](https://api.star-history.com/svg?repos=Hydrogest/Yesimbot&type=Date)](https://star-history.com/#Hydrogest/Yesimbot&Date)
如果这个项目对你有帮助,请考虑给我们一个 ⭐ Star!

[![Star History Chart](https://api.star-history.com/svg?repos=Hydrogest/Yesimbot&type=Date)](https://star-history.com/#Hydrogest/Yesimbot&Date)

## 🙏 致谢

- 感谢 [Koishi](https://koishi.chat/) 提供的强大机器人框架
- 感谢 [Letta](https://github.com/letta-ai/letta)(原 MemGPT)项目的设计灵感
- 感谢 [@MizuAsaka](https://github.com/MizuAsaka) 设计的精美 Logo
- 感谢所有贡献者和社区成员的支持

---

<div align="center">

**让 AI 更像人类,让聊天更有温度** 💝

Made with ❤️ by the YesImBot Team

</div>
7 changes: 7 additions & 0 deletions bump.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { defineConfig } from "bumpp";

export default defineConfig({
all: true,
push: false,
recursive: true,
});
Loading