咳咳咳,忘更新依赖了

This commit is contained in:
雅诺狐
2025-10-05 17:57:35 +08:00
parent efc4f7a13e
commit 33f7128a5a
2 changed files with 2 additions and 12 deletions

View File

@@ -74,7 +74,7 @@ dependencies = [
"websockets>=15.0.1",
"aiomysql>=0.2.0",
"aiosqlite>=0.21.0",
"inkfox>=0.1.0",
"inkfox>=0.1.1",
"rrjieba>=0.1.13",
"mcp>=0.9.0",
"sse-starlette>=2.2.1",

View File

@@ -10,17 +10,7 @@ from src.common.logger import get_logger
logger = get_logger(__name__)
# 仅允许规范导入路径:from inkfox.memory import PyMetadataIndex
try: # pragma: no cover
from inkfox.memory import PyMetadataIndex as _RustIndex # type: ignore
logger.debug("已从 inkfox.memory 成功导入 PyMetadataIndex")
except Exception as ex: # noqa: BLE001
# 不再做任何回退;强制要求正确的 Rust 模块子模块注册
raise RuntimeError(
"无法导入 inkfox.memory.PyMetadataIndex: %s\n"
"请确认: 1) 已在当前虚拟环境下执行 'maturin develop --release' 安装扩展; "
"2) 运行进程使用同一个 venv; 3) 没有旧的 'inkfox' 目录遮蔽 so/pyd; 4) Python 版本与编译匹配" % ex
) from ex
from inkfox.memory import PyMetadataIndex as _RustIndex # type: ignore
@dataclass
class MemoryMetadataIndexEntry: