- 新增 pam_deploy_graph 包,包含 agent、action router、runner、parser 和配置加载能力 - 支持 hybrid_node_mcp 路由策略:PAM_HOME 走脚本 action,PAM_NODE 走 MCP - 新增 fake runner 和 CLI 预演/全局流程验证入口 - 新增路由、输出解析、配置加载、脚本命令构造、Skill 策略加载测试 - 在 README 中记录当前代码骨架、实现进度、使用方式和下一步建议
25 lines
725 B
Python
25 lines
725 B
Python
"""Optional LangGraph integration.
|
|
|
|
The runtime works without LangGraph installed. This module exposes a factory for
|
|
projects that install the optional dependency.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
|
|
def build_langgraph():
|
|
try:
|
|
from langgraph.graph import END, START, StateGraph
|
|
except ImportError as exc: # pragma: no cover - depends on optional package
|
|
raise RuntimeError(
|
|
"langgraph is not installed. Install the optional dependency with "
|
|
"`pip install -e .[langgraph]`."
|
|
) from exc
|
|
|
|
graph = StateGraph(dict)
|
|
graph.add_node("start", lambda state: state)
|
|
graph.add_edge(START, "start")
|
|
graph.add_edge("start", END)
|
|
return graph.compile()
|
|
|