fix: keep capability probe static
这个提交存在于:
父节点
eda74f0d60
当前提交
d01da7b050
共有 4 个文件被更改,包括 20 次插入 和 9 次删除
|
|
@ -649,12 +649,9 @@ class MemoryCompanionBridge:
|
||||||
result["capability_schema_version"] = bot_personal_contract.BOT_PERSONAL_CAPABILITY_SCHEMA_VERSION
|
result["capability_schema_version"] = bot_personal_contract.BOT_PERSONAL_CAPABILITY_SCHEMA_VERSION
|
||||||
result["payload_schema_version"] = bot_personal_contract.BOT_PERSONAL_PAYLOAD_SCHEMA_VERSION
|
result["payload_schema_version"] = bot_personal_contract.BOT_PERSONAL_PAYLOAD_SCHEMA_VERSION
|
||||||
result["capability_state"] = "available"
|
result["capability_state"] = "available"
|
||||||
p5_status = getattr(self._plugin, "p5_capability_status", None)
|
# Capability discovery must remain static: callers use it before the
|
||||||
if callable(p5_status):
|
# plugin service is safe to query, and C1 guarantees no storage access.
|
||||||
try:
|
result["p5"] = {"state": "unprobed", "error_code": "p5_status_not_probed"}
|
||||||
result["p5"] = dict(p5_status() or {})
|
|
||||||
except Exception:
|
|
||||||
result["p5"] = {"state": "degraded", "error_code": "p5_status_exception"}
|
|
||||||
self._capability_cache.mark_available(c4_snapshot)
|
self._capability_cache.mark_available(c4_snapshot)
|
||||||
result.setdefault("warnings", [])
|
result.setdefault("warnings", [])
|
||||||
return result
|
return result
|
||||||
|
|
|
||||||
2
main.py
2
main.py
|
|
@ -16,7 +16,7 @@ from .core.models import json_dumps
|
||||||
from .core.service import MemoryCompanionService
|
from .core.service import MemoryCompanionService
|
||||||
|
|
||||||
PLUGIN_NAME = "astrbot_plugin_memory_companion"
|
PLUGIN_NAME = "astrbot_plugin_memory_companion"
|
||||||
PLUGIN_VERSION = "1.6.5"
|
PLUGIN_VERSION = "1.6.7"
|
||||||
|
|
||||||
_ACTIVE_BRIDGE: MemoryCompanionBridge | None = None
|
_ACTIVE_BRIDGE: MemoryCompanionBridge | None = None
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
name: astrbot_plugin_memory_companion
|
name: astrbot_plugin_memory_companion
|
||||||
display_name: 我会牢牢记住你
|
display_name: 雪色的记忆插件-聊天侧
|
||||||
author: menglimi
|
author: menglimi
|
||||||
author_url: https://github.com/menglimi
|
author_url: https://github.com/menglimi
|
||||||
version: 1.6.5
|
version: 1.6.7
|
||||||
description: 我会牢牢记住你是面向 AstrBot 陪伴体系的记忆陪伴中枢。它统一管理长期记忆、历史对话整理、群聊连续对话记忆、主链注入、权限边界、知识图谱、陪伴插件桥接、自然衰减、可移植数据和运行诊断。
|
description: 我会牢牢记住你是面向 AstrBot 陪伴体系的记忆陪伴中枢。它统一管理长期记忆、历史对话整理、群聊连续对话记忆、主链注入、权限边界、知识图谱、陪伴插件桥接、自然衰减、可移植数据和运行诊断。
|
||||||
desc: 为 AstrBot 提供主链记忆注入、历史聊天整理导入、连续对话记忆、陪伴插件协同、主动记忆/回忆工具、知识图谱、权限边界、自我时间线、自然衰减、迁移导出和成本诊断。
|
desc: 为 AstrBot 提供主链记忆注入、历史聊天整理导入、连续对话记忆、陪伴插件协同、主动记忆/回忆工具、知识图谱、权限边界、自我时间线、自然衰减、迁移导出和成本诊断。
|
||||||
repo: https://github.com/menglimi/astrbot_plugin_memory_companion
|
repo: https://github.com/menglimi/astrbot_plugin_memory_companion
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
|
ROOT = Path(__file__).resolve().parents[1]
|
||||||
|
|
||||||
|
|
||||||
|
def test_chat_side_display_name_preserves_stable_plugin_identity():
|
||||||
|
metadata = (ROOT / "metadata.yaml").read_text(encoding="utf-8")
|
||||||
|
main = (ROOT / "main.py").read_text(encoding="utf-8")
|
||||||
|
|
||||||
|
assert "name: astrbot_plugin_memory_companion" in metadata
|
||||||
|
assert "display_name: 雪色的记忆插件-聊天侧" in metadata
|
||||||
|
assert 'version: 1.6.7' in metadata
|
||||||
|
assert 'PLUGIN_VERSION = "1.6.7"' in main
|
||||||
正在加载…
添加表格
在新工单中引用