mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 07:27:15 +08:00
refactor: route agent support settings through runtime
This commit is contained in:
@@ -17,7 +17,9 @@ from app.runtime.capabilities.model import (
|
|||||||
SelectorSchema,
|
SelectorSchema,
|
||||||
)
|
)
|
||||||
from app.runtime.capabilities.registry import CapabilityRegistry
|
from app.runtime.capabilities.registry import CapabilityRegistry
|
||||||
from app.runtime.config import settings
|
from app.runtime.settings import RuntimeSettingsCompat
|
||||||
|
|
||||||
|
settings = RuntimeSettingsCompat()
|
||||||
|
|
||||||
|
|
||||||
_DEFAULT_CAPABILITY_ROOT = Path(__file__).resolve().parent
|
_DEFAULT_CAPABILITY_ROOT = Path(__file__).resolve().parent
|
||||||
|
|||||||
@@ -6,7 +6,9 @@ from typing import Dict, List, Optional
|
|||||||
|
|
||||||
from langchain_core.messages import BaseMessage, messages_from_dict, messages_to_dict
|
from langchain_core.messages import BaseMessage, messages_from_dict, messages_to_dict
|
||||||
|
|
||||||
from app.runtime.config import settings
|
from app.runtime.settings import RuntimeSettingsCompat
|
||||||
|
|
||||||
|
settings = RuntimeSettingsCompat()
|
||||||
from app.application.agentdata import AgentChatPort as AgentChatOper
|
from app.application.agentdata import AgentChatPort as AgentChatOper
|
||||||
from app.runtime.log import logger
|
from app.runtime.log import logger
|
||||||
from app.schemas.agent import ConversationMemory
|
from app.schemas.agent import ConversationMemory
|
||||||
|
|||||||
@@ -10,7 +10,9 @@ from typing import Any, Dict, Optional
|
|||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
from app.agent.llm.capability import AgentCapabilityManager
|
from app.agent.llm.capability import AgentCapabilityManager
|
||||||
from app.runtime.config import settings
|
from app.runtime.settings import RuntimeSettingsCompat
|
||||||
|
|
||||||
|
settings = RuntimeSettingsCompat()
|
||||||
from app.runtime.log import logger
|
from app.runtime.log import logger
|
||||||
from app.schemas.notification import ChannelCapability
|
from app.schemas.notification import ChannelCapability
|
||||||
from app.schemas.notification import ChannelCapabilities
|
from app.schemas.notification import ChannelCapabilities
|
||||||
|
|||||||
@@ -1046,6 +1046,8 @@ runtime provider,旧插件或测试替换模块级 `settings` 时仍保持原
|
|||||||
一次性兼容查询会话承接;查询装饰器由 117 个降至 112 个,站点查询专项测试与架构基线通过。
|
一次性兼容查询会话承接;查询装饰器由 117 个降至 112 个,站点查询专项测试与架构基线通过。
|
||||||
插件数据的六个只读入口也改为显式 Session/AsyncSession,旧插件无会话读取通过一次性兼容查询会话保留;
|
插件数据的六个只读入口也改为显式 Session/AsyncSession,旧插件无会话读取通过一次性兼容查询会话保留;
|
||||||
查询装饰器由 112 个降至 106 个,插件数据与事务专项测试及架构基线通过。
|
查询装饰器由 112 个降至 106 个,插件数据与事务专项测试及架构基线通过。
|
||||||
|
Agent 能力适配器、记忆和提示词模块改用 `RuntimeSettingsCompat` 动态运行时端口,保留模块级覆盖和
|
||||||
|
导入早期回退;配置债务由 101 个文件降至 98 个,Agent 能力、提示词与运行时专项测试通过。
|
||||||
|
|
||||||
同日修正适配器配置下沉边界:OCR、CookieCloud、DoH、Rust 和资源签名等低层实现不再直接依赖
|
同日修正适配器配置下沉边界:OCR、CookieCloud、DoH、Rust 和资源签名等低层实现不再直接依赖
|
||||||
`app.application`,由 `app.runtime.settings` 端口承接组合根注入;未启动装配时仍回退旧 Settings ABI,
|
`app.application`,由 `app.runtime.settings` 端口承接组合根注入;未启动装配时仍回退旧 Settings ABI,
|
||||||
|
|||||||
@@ -9,16 +9,13 @@
|
|||||||
"root": "app"
|
"root": "app"
|
||||||
},
|
},
|
||||||
"settings_imports": {
|
"settings_imports": {
|
||||||
"count": 101,
|
"count": 98,
|
||||||
"files": [
|
"files": [
|
||||||
"app/adapters/system/fsproxy.py",
|
"app/adapters/system/fsproxy.py",
|
||||||
"app/agent/capabilities/adapter.py",
|
|
||||||
"app/agent/llm/capability.py",
|
"app/agent/llm/capability.py",
|
||||||
"app/agent/llm/helper.py",
|
"app/agent/llm/helper.py",
|
||||||
"app/agent/llm/provider.py",
|
"app/agent/llm/provider.py",
|
||||||
"app/agent/memory/__init__.py",
|
|
||||||
"app/agent/orchestrator.py",
|
"app/agent/orchestrator.py",
|
||||||
"app/agent/prompt/__init__.py",
|
|
||||||
"app/agent/skills/registry.py",
|
"app/agent/skills/registry.py",
|
||||||
"app/agent/tools/base.py",
|
"app/agent/tools/base.py",
|
||||||
"app/agent/tools/impl/_plugin_tool_utils.py",
|
"app/agent/tools/impl/_plugin_tool_utils.py",
|
||||||
|
|||||||
+4
-4
@@ -14,7 +14,7 @@
|
|||||||
"workflow_to_db": []
|
"workflow_to_db": []
|
||||||
},
|
},
|
||||||
"edge_count": 6419,
|
"edge_count": 6419,
|
||||||
"edge_sha256": "bc2f57394915b9f90921a91cc4630a4426975ee765ece75a1aa0640080e41b4f",
|
"edge_sha256": "d5ae653cf616d76dfefea690bb71c32f54b07612af9c5c9cd4372ac6b55b6cae",
|
||||||
"edges": [
|
"edges": [
|
||||||
"app -> app.runtime",
|
"app -> app.runtime",
|
||||||
"app -> app.runtime.compat",
|
"app -> app.runtime.compat",
|
||||||
@@ -189,7 +189,7 @@
|
|||||||
"app.agent.capabilities.adapter -> app.runtime.capabilities.errors",
|
"app.agent.capabilities.adapter -> app.runtime.capabilities.errors",
|
||||||
"app.agent.capabilities.adapter -> app.runtime.capabilities.model",
|
"app.agent.capabilities.adapter -> app.runtime.capabilities.model",
|
||||||
"app.agent.capabilities.adapter -> app.runtime.capabilities.registry",
|
"app.agent.capabilities.adapter -> app.runtime.capabilities.registry",
|
||||||
"app.agent.capabilities.adapter -> app.runtime.config",
|
"app.agent.capabilities.adapter -> app.runtime.settings",
|
||||||
"app.agent.contracts -> app.schemas",
|
"app.agent.contracts -> app.schemas",
|
||||||
"app.agent.contracts -> app.schemas.types",
|
"app.agent.contracts -> app.schemas.types",
|
||||||
"app.agent.llm.capability -> app.adapters",
|
"app.agent.llm.capability -> app.adapters",
|
||||||
@@ -238,8 +238,8 @@
|
|||||||
"app.agent.memory -> app.application",
|
"app.agent.memory -> app.application",
|
||||||
"app.agent.memory -> app.application.agentdata",
|
"app.agent.memory -> app.application.agentdata",
|
||||||
"app.agent.memory -> app.runtime",
|
"app.agent.memory -> app.runtime",
|
||||||
"app.agent.memory -> app.runtime.config",
|
|
||||||
"app.agent.memory -> app.runtime.log",
|
"app.agent.memory -> app.runtime.log",
|
||||||
|
"app.agent.memory -> app.runtime.settings",
|
||||||
"app.agent.memory -> app.schemas",
|
"app.agent.memory -> app.schemas",
|
||||||
"app.agent.memory -> app.schemas.agent",
|
"app.agent.memory -> app.schemas.agent",
|
||||||
"app.agent.middleware.activity_log -> app.agent",
|
"app.agent.middleware.activity_log -> app.agent",
|
||||||
@@ -381,8 +381,8 @@
|
|||||||
"app.agent.prompt -> app.agent.llm",
|
"app.agent.prompt -> app.agent.llm",
|
||||||
"app.agent.prompt -> app.agent.llm.capability",
|
"app.agent.prompt -> app.agent.llm.capability",
|
||||||
"app.agent.prompt -> app.runtime",
|
"app.agent.prompt -> app.runtime",
|
||||||
"app.agent.prompt -> app.runtime.config",
|
|
||||||
"app.agent.prompt -> app.runtime.log",
|
"app.agent.prompt -> app.runtime.log",
|
||||||
|
"app.agent.prompt -> app.runtime.settings",
|
||||||
"app.agent.prompt -> app.schemas",
|
"app.agent.prompt -> app.schemas",
|
||||||
"app.agent.prompt -> app.schemas.notification",
|
"app.agent.prompt -> app.schemas.notification",
|
||||||
"app.agent.prompt.transfer_redo -> app.agent",
|
"app.agent.prompt.transfer_redo -> app.agent",
|
||||||
|
|||||||
Reference in New Issue
Block a user