diff --git a/CHANGELOG.md b/CHANGELOG.md index 1756ffc1..17830c19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,19 @@ 所有重要更改都将记录在此文件中。 +## [4.3.0] - 2026-09-12 + +### LivingMemory 2.7 适配 + +- 功能融合页新增 LivingMemory **官方面板**入口:LivingMemory 2.6.0 起移除独立 WebUI、改为自带 AstrBot 官方插件页(`pages/dashboard/index.html`)。集成服务现在会自动探测插件 `pages/` 目录与 AstrBot 主配置 `dashboard.host/port`,生成 `dashboard.official_page_url`(AstrBot Dashboard 前端 hash 路由 `/#/plugin-page/<插件名>/<页名>`)。 +- 功能融合页 LivingMemory 卡片新增「官方面板」按钮(新窗口打开,复用浏览器内 AstrBot 会话 JWT);LivingMemory 嵌入壳由「面板不可用」改为「面板禁止内嵌 + 新窗口打开」(官方插件页固定返回 `X-Frame-Options: SAMEORIGIN` 且资产需 JWT 换取,iframe 无法携带凭据,属预期行为,`embeddable` 相应置为 `false`)。 +- 伴随插件契约核对(对照 livingmemory 2.7.0-beta.1、group_chat_plus V1.2.3.hotfix.2):注册名、`initializer.memory_engine`、`memory_engine.graph_store`、`graph_store.get_graph_snapshot` 签名与返回键、`memory_engine.get_statistics` 全部保持,本地记忆图谱直读链路无需改动;LivingMemory 2.6.x 引入的全量快照防御上限只作用于本插件未调用的 `get_full_graph_snapshot`。 +- AstrBot 兼容性核对至 v4.28(commit e606a3037):本插件使用的全部 API 面(`astrbot.api.*`、`astrbot.api.event.filter`、`astrbot.api.web.request`、provider/star/config 工具)在 v4.28 中无变更。 + +### 版本 + +- 版本号由 4.2.0 提升至 **4.3.0**。 + ## [4.2.0] - 2026-09-05 ### 黑话导入 diff --git a/README.md b/README.md index 2bde46ad..bfd1b4dd 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ 让 AstrBot 在群聊中持续采集、学习、审查并注入上下文,使 Bot 逐步具备表达风格、群组黑话、社交关系、长期记忆和人格演化能力。 -[![Version](https://img.shields.io/badge/version-4.2.0-blue.svg)](https://github.com/NickCharlie/astrbot_plugin_self_learning) +[![Version](https://img.shields.io/badge/version-4.3.0-blue.svg)](https://github.com/NickCharlie/astrbot_plugin_self_learning) [![License](https://img.shields.io/badge/license-AGPL--3.0-green.svg)](LICENSE) [![AstrBot](https://img.shields.io/badge/AstrBot-%3E%3D4.11.4-orange.svg)](https://github.com/Soulter/AstrBot) [![Python](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org/) diff --git a/README_EN.md b/README_EN.md index 3ff3fed9..6fe1c236 100644 --- a/README_EN.md +++ b/README_EN.md @@ -14,7 +14,7 @@
-[![Version](https://img.shields.io/badge/version-4.2.0-blue.svg)](https://github.com/NickCharlie/astrbot_plugin_self_learning) [![License](https://img.shields.io/badge/license-AGPL--3.0-green.svg)](LICENSE) [![AstrBot](https://img.shields.io/badge/AstrBot-%3E%3D4.11.4-orange.svg)](https://github.com/Soulter/AstrBot) [![Python](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org/) +[![Version](https://img.shields.io/badge/version-4.3.0-blue.svg)](https://github.com/NickCharlie/astrbot_plugin_self_learning) [![License](https://img.shields.io/badge/license-AGPL--3.0-green.svg)](LICENSE) [![AstrBot](https://img.shields.io/badge/AstrBot-%3E%3D4.11.4-orange.svg)](https://github.com/Soulter/AstrBot) [![Python](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org/) [Features](#what-we-can-do) · [Quick Start](#quick-start) · [Web UI](#visual-management-interface) · [Community](#community) · [Contributing](CONTRIBUTING.md) diff --git a/__init__.py b/__init__.py index 6932e825..9c763cf0 100644 --- a/__init__.py +++ b/__init__.py @@ -1,5 +1,5 @@ # AstrBot 自学习插件 -__version__ = "4.2.0" +__version__ = "4.3.0" # Ensure parent namespace packages ("data", "data.plugins") are # durably registered in sys.modules. AstrBot loads plugins via diff --git a/docs/README.md b/docs/README.md index 4ab87625..5dbe4684 100644 --- a/docs/README.md +++ b/docs/README.md @@ -6,7 +6,7 @@ AstrBot 自主学习插件的实现文档和使用文档。 - 插件名: `astrbot_plugin_self_learning` - 展示名: `self-learning` -- 当前元数据版本: `4.2.0` +- 当前元数据版本: `4.3.0` - 最低 AstrBot 版本: `4.11.4` - 主要入口: `main.py` - 配置入口: `_conf_schema.json`, `config.py` diff --git a/docs/integrations.md b/docs/integrations.md index add886a7..f2d2b008 100644 --- a/docs/integrations.md +++ b/docs/integrations.md @@ -77,7 +77,7 @@ Dashboard -> 功能融合 页面内容: - Self Learning 当前面板。 -- LivingMemory 状态、外部面板入口和本地图谱适配 API 列表。 +- LivingMemory 状态、官方插件页/外部面板入口和本地图谱适配 API 列表。 - Group Chat Plus 状态、面板入口和开发 API 列表。 - `Integration_Settings` 快速编辑。 - Self Learning Hub 稳定 HTTP 契约和可对接能力。 @@ -154,6 +154,7 @@ GET /api/hub/v1/status | `delegated` | 当前能力是否已委托 | | `plugin` | AstrBot star 元信息 | | `dashboard` | 面板 URL、本地图谱路由、入口类型;`embeddable` 为 `false` 表示面板响应头禁止 iframe 嵌入(如 Group Chat Plus 的 `X-Frame-Options: DENY`),此时嵌入壳会提示改用新窗口打开 | +| `dashboard.official_page_url` | 伴随插件自带 AstrBot 官方插件页时的入口(LivingMemory 2.6.0+)。指向 AstrBot Dashboard 前端 hash 路由 `/#/plugin-page/<插件名>/<页名>`,由集成服务探测插件 `pages/<页名>/index.html` 与主配置 `dashboard.host/port` 自动生成;该页面需 AstrBot 会话 JWT,iframe 内不可用,只能新窗口打开(功能融合页的「官方面板」按钮) | | `dev_api` | 该插件公开 API 列表 | | `settings_group` | 相关配置组 | @@ -262,8 +263,9 @@ ECharts 图谱 payload。记忆图和知识图谱都会优先读取 LivingMemory | Dashboard 显示未委托 | 目标插件是否已加载、启用、名称是否匹配 | | LivingMemory 已安装但仍写入本地记忆 | `delegate_memory_to_livingmemory` 和 `disable_local_memory_when_delegated` 是否为 `true` | | Group Chat Plus 已安装但仍创建本地回复器 | `delegate_reply_to_group_chat_plus` 和 `disable_local_reply_when_delegated` 是否为 `true` | -| 面板入口为空 | 目标插件 Web 面板是否开启;图谱模块仍可通过本插件 `/api/graphs/*` 查看 | +| 面板入口为空 | 目标插件 Web 面板是否开启;LivingMemory 2.6.0+ 由集成服务自动探测其官方插件页(`pages/` 目录 + AstrBot 主配置 `dashboard` 段),图谱模块仍可通过本插件 `/api/graphs/*` 查看 | | Group Chat Plus 嵌入壳显示"面板禁止内嵌" | 该面板自 v1.2.x 起返回 `X-Frame-Options: DENY`,无法被 iframe 嵌入,属预期行为;集成服务会探测响应头并自动改用新窗口入口 | +| LivingMemory 嵌入壳显示"面板禁止内嵌" | AstrBot 官方插件页固定返回 `X-Frame-Options: SAMEORIGIN` 且资产需 JWT 换取,iframe 内无法携带凭据,属预期行为;请用嵌入壳或功能融合页的「官方面板」新窗口打开 | | API 列表不匹配 | 以目标插件当前开发 API 为准,更新 `webui/services/integration_service.py` | ## 测试 diff --git a/metadata.yaml b/metadata.yaml index 1d321cd7..7355be79 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -2,7 +2,7 @@ name: "astrbot_plugin_self_learning" author: "NickMo, EterUltimate" display_name: "self-learning" description: "SELF LEARNING 自主学习插件 — 让 AI 聊天机器人自主学习对话风格、理解群组黑话、管理社交关系与好感度、自适应人格演化,像真人一样自然对话。(使用前必须手动备份人格数据)" -version: "4.2.0" +version: "4.3.0" repo: "https://github.com/NickCharlie/astrbot_plugin_self_learning" tags: - "自学习" diff --git a/tests/unit/test_integration_service.py b/tests/unit/test_integration_service.py index 784ee212..62443631 100644 --- a/tests/unit/test_integration_service.py +++ b/tests/unit/test_integration_service.py @@ -339,3 +339,140 @@ def test_embed_shell_keeps_iframe_when_embedding_allowed(): assert '