yumoqing 25e71b548b feat: 平台内部agent独立模块(从pipeline-service迁出)
能力包(5工具/管理员硬门禁/模型自动配置)+前端入口+宿主集成说明
2026-09-02 15:26:16 +08:00

28 lines
855 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""pipeline-platform 模块装载入口。
宿主应用pipeline-app在 init() 中调用 load_pipeline_platform() 即挂载:
能力包注册platform_abilityimport 即注册)。
未装本模块的宿主完全零接触(不 import 本包则以上全部不发生)。
"""
import logging
logger = logging.getLogger("pipeline.platform")
_loaded = False
def load_pipeline_platform():
"""挂载平台内部 agent幂等"""
global _loaded
if _loaded:
return True
try:
from . import platform_ability # noqa: F401import 即注册能力包)
logger.info("[pipeline_platform] ability registered: platform_general")
_loaded = True
return True
except Exception as e:
logger.warning("[pipeline_platform] ability 注册失败: %s", str(e)[:200])
return False