Skip to content

Commit e6fd019

Browse files
MiaowFISHHydroGest
andauthored
Dev (#145)
* refactor(core): ♻️ 重构世界状态为多级记忆系统 * chore: 🔨 修改依赖版本 * feat(core): ✨ 添加数据库迁移脚本 * refactor(core): ♻️ 移除旧的记忆系统实现 * feat(core): ✨ 优化错误上报和超时处理 * refactor(core): ♻️ 重构上下文管理器 * feat(core): ✨ 优化上下文构建逻辑 * feat(core): ✨ 优化上下文构建逻辑,更新提示词模板 * feat(core): ✨ 优化默认提示词 * feat(core): ✨ 调整提示词模板 * feat(core): ✨ 优化JSON解析和错误处理流程 * feat(core): ✨ 优化记忆召回逻辑,提高准确度 * refactor(core): ♻️ 清理一些无用配置 * feat(core): ✨ 优化禁言检测和事件记录流程 * refactor(daily): ♻️ 调整记忆检索逻辑 * feat(core): ✨ 自动补全提供商API地址 * fix(core): 🐛 修复JSON格式正确但内容不完整时解析失败 * feat(core): ✨ 优化JSON解析流程 * fix(core): 🐛 toolCalls is null * feat(core): ✨ 优化记忆合并分组 * fix(core): 🐛 调整系统提示词并修复解析问题 * refactor: ♻️ 删除无用提示词 * feat(core): ✨ JSON流式解析器 * feat(agent): ✨ 实现流式心跳处理并优化错误处理逻辑 - 新增流式心跳处理功能,支持实时解析和执行动作 - 重构错误处理逻辑,简化代码并提高可维护性 - 优化日志输出,提供更清晰的调试信息 - 添加对聚合错误的支持,增强错误报告能力 * feat(core): ✨ 召回记忆新增时间范围选项 * feat(core): ✨ 响应意愿支持分群配置 * fix(core): 修复自身消息处理和数据库约束问题 - 添加ignoreSelfMessage配置以忽略自身消息 - 处理数据库唯一约束错误并添加警告日志 - 修改频道匹配逻辑使用type替代isDirect - 更新消息表主键为复合主键(id, platform) - 改进错误日志记录包含错误信息 * chore(root): 更新commitlint配置规范 * fix(core): 改进日志清理功能并优化日志消息 * feat(core): 添加默认记忆块文件并改进空目录处理 当核心记忆目录为空时使用默认记忆块文件 * refactor(core): 简化意愿度计算逻辑,移除图片和表情支持 移除图片和表情相关的基础分计算逻辑,仅保留文本消息的基础分计算 简化意愿度管理器的实现 * refactor(model): 将自定义参数从字典改为数组结构并简化配置 * feat(agent): 记录心跳日志 * refactor: 优化模型服务和错误处理逻辑 - 移除ProviderConfig中的enabled字段及相关跳过逻辑 - 在StreamParser.reset()中重置状态而不销毁 - 新增OUTPUT_EMPTY_CONTENT错误类型用于空响应场景 - 简化chat-model.ts中的日志输出格式 * docs: 更新persona.md * build: 更新依赖项并移除无用包 - 将 sharp 替换为 @img/sharp-wasm32 以支持 wasm32 架构 - 移除不再使用的 commitlint-config-gitmoji 和 @types/sharp * build: 依赖还是换回来 * feat(ci): 优化Canary版本格式并添加自动化脚本 * refactor(sticker-manager): 移除未使用的依赖和导入 * refactor(core): 使用 koishi-plugin-sharp 替代直接依赖 将 sharp 功能迁移至 koishi-plugin-sharp 插件,移除直接依赖并调整相关代码 * feat: 更新角色记忆块和提示模板的内容 * fix(core): 修复服务初始化超时未处理错误的问题 * refactor(core): 重构流式处理逻辑以支持重试机制 * refactor(core): 替换sharp依赖为直接引入方式 * refactor(core): 重构流式心跳处理逻辑以支持批次重试 - 引入批次管理机制,支持在重试时安全切换消费者批次 - 为每个批次添加唯一ID和中断控制 - 改进日志记录,增加批次标识信息 - 优化消费者Promise管理方式 - 增强流式处理过程中的错误恢复能力 * feat(prompt): 更新提示词和XML标签使用说明 - 在memgpt_v2_chat.txt中明确用户可见内容只能通过send_message动作发出 - 移除persona.md中关于XML标签的详细说明,将其整合到core-util的send_message参数描述中 - 在core-util中完善send_message的message字段描述,包含XML标签使用规则 * fix(core): 调整资源最长保留天数为7天并优化自动清理逻辑 * feat(scripts): 优化canary版本号更新逻辑以支持所有依赖类型 * feat(scripts): 添加同步npm包到npmmirror的脚本 * feat(assets): 为存储驱动添加文件统计和列表功能并实现孤立文件清理 * refactor(assets): 替换sharp为jimp和gifwrap处理图片 * refactor: 更新依赖和版本号并修复文件格式 * ci(github): 添加 issue 模板和配置 * feat(assets): 添加文件类型检测功能并优化资源处理 * refactor: 移除配置向导服务并简化内存服务初始化 * fix: 修复构建多模态图像时的逻辑 * refactor(tsconfig): 修改tsconfig配置 * chore: 更新依赖版本至3.0.0-rc.1并调整changeset配置 * cleanup: 删除 bun.lock * fix: 分群配置不应缓存 * refactor: 优化服务枚举和表名常量定义 * refactor: 重命名核心服务文件 * fix: 向量长度不一致导致记忆检索失败 * cleanup: 删除过时测试文件 * chore: 更新版本号并清理changeset文件 * ci(workflow): 修改文档生成工作流以支持手动触发 * refactor(core): 重构配置结构和模型服务 - 将分散的配置合并为统一的 Config 类型 - 优化错误处理和日志记录 - 移除冗余的配置接口和类型定义 - 更新服务类以使用新的 Config 类型 * refactor(config): 重构配置系统并添加迁移功能 - 将配置系统重构为扁平化结构,移除嵌套的 system 配置 - 添加配置版本控制和迁移功能,支持从 v1 迁移到 v2 - 重命名 endpoint 为 assetEndpoint 以保持一致性 - 新增 config 模块导出和版本定义文件 * fix(config): 修复配置迁移中未处理空对象的情况 * refactor(config): 重构配置系统并添加版本管理 - 将配置版本从数字改为语义化版本格式 - 拆分版本配置到独立的目录结构 - 添加配置迁移脚本支持版本升级 - 引入自动生成配置快照的脚本 - 移除过时的错误报告配置 - 添加遥测配置支持 * fix(core): 修复配置版本迁移逻辑并优化错误处理 * refactor(mcp): 移除工具执行中的session参数 * docs(changeset): 修复配置迁移脚本 * docs(changeset): 删除冗余字段 * build(core): 添加 semver 依赖用于版本管理 --------- Co-authored-by: HydroGest <2445691453@qq.com>
1 parent e718451 commit e6fd019

File tree

123 files changed

+6314
-8869
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+6314
-8869
lines changed

.changeset/config.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
33
"changelog": "@changesets/cli/changelog",
4-
"commit": false,
5-
"fixed": [["koishi-plugin-yesimbot", "@yesimbot/koishi-plugin-code-executor"]],
4+
"commit": true,
5+
"fixed": [],
66
"linked": [],
77
"access": "public",
8-
"baseBranch": "main",
8+
"baseBranch": "v3",
99
"updateInternalDependencies": "patch",
1010
"ignore": [],
1111
"snapshot": {
1212
"useCalculatedVersion": true,
13-
"prereleaseTemplate": "{tag}.{datetime}"
13+
"prereleaseTemplate": "{tag}.{timestamp}"
1414
}
1515
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"koishi-plugin-yesimbot": patch
33
---
44

5-
use puppeteer
5+
修复配置迁移脚本

.changeset/ripe-corners-fly.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

.changeset/thick-paths-tell.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

.changeset/witty-masks-grow.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@yesimbot/koishi-plugin-mcp": patch
3+
---
4+
5+
删除冗余字段
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Bug Report
2+
description: 提交错误报告
3+
title: "Bug: "
4+
labels:
5+
- bug
6+
body:
7+
- type: textarea
8+
attributes:
9+
label: Describe the bug
10+
description: 请简明地表述 bug 是什么。
11+
validations:
12+
required: true
13+
- type: textarea
14+
attributes:
15+
label: Steps to reproduce
16+
description: 请描述如何重现这个行为。
17+
validations:
18+
required: true
19+
- type: textarea
20+
attributes:
21+
label: Expected behavior
22+
description: 请描述期望的行为。
23+
validations:
24+
required: true
25+
- type: textarea
26+
attributes:
27+
label: Screenshots
28+
description: 请尽量详细地提供相关截图,可以是聊天记录、Koishi 日志和服务端(如 go-cqhttp)日志等。
29+
- type: textarea
30+
attributes:
31+
label: Versions
32+
description: 请填写相应的版本号。
33+
value: |
34+
- OS: <!-- e.g. Windows 10 -->
35+
- Platform: <!-- e.g. Discord -->
36+
- Node version: <!-- e.g. 14.17.0 -->
37+
- Koishi version: <!-- e.g. 3.0.0 -->
38+
- YesImBot version: <!-- e.g. 1.0.0 -->
39+
validations:
40+
required: true
41+
- type: textarea
42+
attributes:
43+
label: Additional context
44+
description: 请描述其他想要补充的信息。

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Github Discussion
4+
url: https://github.com/YesWeAreBot/YesImBot/discussions
5+
about: Asking for help here | 在讨论区寻求别人的帮助
6+
- name: Official Docs
7+
url: https://docs.yesimbot.chat/
8+
about: Asking for help here | 在官方文档寻找解决方案
9+
- name: More
10+
url: https://qm.qq.com/q/x4v3y2Gr8m
11+
about: More YesImBot communities | 加入官方 QQ 群
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Feature Request
2+
description: 提交功能请求
3+
title: "Feature: "
4+
labels:
5+
- feature
6+
body:
7+
- type: textarea
8+
attributes:
9+
label: Describe the problem related to the feature request
10+
description: 请简要地说明是什么问题导致你想要一个新特性。
11+
validations:
12+
required: true
13+
- type: textarea
14+
attributes:
15+
label: Describe the solution you'd like
16+
description: 请说明你希望使用什么样的方法 (比如增加什么功能) 解决上述问题。
17+
validations:
18+
required: true
19+
- type: textarea
20+
attributes:
21+
label: Describe alternatives you've considered
22+
description: 除了上述方法以外,你还考虑过哪些其他的实现方式?
23+
- type: textarea
24+
attributes:
25+
label: Additional context
26+
description: 请描述其他想要补充的信息。

.github/workflows/canary.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ jobs:
4646
- name: Create Canary Version
4747
run: bun changeset version --snapshot ${{ github.event.inputs.tag }}
4848

49+
# - name: Optimize Canary Version Format
50+
# run: bun run optimize-canary-version
51+
4952
- name: Publish to NPM
5053
run: bun changeset publish --tag ${{ github.event.inputs.tag }}
5154
env:

.github/workflows/docs.yml

Lines changed: 51 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,56 @@
11
name: Generate and Deploy TS API Docs
22

33
on:
4-
push:
5-
branches: [dev]
4+
workflow_dispatch:
5+
inputs:
6+
branch:
7+
description: "The branch to generate docs from"
8+
required: true
9+
default: "dev"
610

711
jobs:
8-
generate-and-deploy-docs:
9-
runs-on: ubuntu-latest
10-
timeout-minutes: 15
11-
permissions:
12-
contents: write
13-
steps:
14-
- name: Check out repository
15-
uses: actions/checkout@v4
16-
with:
17-
fetch-depth: 1
18-
19-
- name: Setup Bun
20-
uses: oven-sh/setup-bun@v2
21-
with:
22-
bun-version: latest
23-
24-
- name: Cache dependencies
25-
uses: actions/cache@v4
26-
with:
27-
path: ~/.bun/install/cache
28-
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
29-
restore-keys: |
30-
${{ runner.os }}-bun-
31-
32-
- name: Install dependencies
33-
run: bun install --frozen-lockfile
34-
35-
- name: Install TypeDoc
36-
run: bun add -D typedoc typedoc-plugin-markdown typedoc-plugin-rename-defaults
37-
38-
- name: Generate API documentation
39-
run: bunx typedoc
40-
env:
41-
NODE_OPTIONS: --max-old-space-size=4096
42-
43-
- name: Deploy to GitHub Pages
44-
uses: peaceiris/actions-gh-pages@v4
45-
with:
46-
github_token: ${{ secrets.GITHUB_TOKEN }}
47-
publish_branch: gh-pages
48-
publish_dir: ./docs
49-
user_name: "github-actions[bot]"
50-
user_email: "github-actions[bot]@users.noreply.github.com"
51-
commit_message: "docs: deploy generated API documentation [skip ci]"
12+
generate-and-deploy-docs:
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 15
15+
permissions:
16+
contents: write
17+
steps:
18+
- name: Check out repository
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 1
22+
ref: ${{ github.event.inputs.branch }}
23+
24+
- name: Setup Bun
25+
uses: oven-sh/setup-bun@v2
26+
with:
27+
bun-version: latest
28+
29+
- name: Cache dependencies
30+
uses: actions/cache@v4
31+
with:
32+
path: ~/.bun/install/cache
33+
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
34+
restore-keys: |
35+
${{ runner.os }}-bun-
36+
37+
- name: Install dependencies
38+
run: bun install --frozen-lockfile
39+
40+
- name: Install TypeDoc
41+
run: bun add -D typedoc typedoc-plugin-markdown typedoc-plugin-rename-defaults
42+
43+
- name: Generate API documentation
44+
run: bunx typedoc
45+
env:
46+
NODE_OPTIONS: --max-old-space-size=4096
47+
48+
- name: Deploy to GitHub Pages
49+
uses: peaceiris/actions-gh-pages@v4
50+
with:
51+
github_token: ${{ secrets.GITHUB_TOKEN }}
52+
publish_branch: gh-pages
53+
publish_dir: ./docs
54+
user_name: "github-actions[bot]"
55+
user_email: "github-actions[bot]@users.noreply.github.com"
56+
commit_message: "docs: deploy generated API documentation [skip ci]"

0 commit comments

Comments
 (0)