refactor: 重整 schemas 作用域并统一用户上下文模型

This commit is contained in:
zl-q
2026-03-13 01:01:54 +08:00
parent f201babb48
commit fb3c649db7
42 changed files with 4205 additions and 2013 deletions
+20 -1
View File
@@ -11,6 +11,9 @@ from core.agentscope.tools.custom.calendar import (
calendar_read,
calendar_write,
)
from core.agentscope.tools.custom.user_lookup import (
user_lookup,
)
from core.agentscope.tools.hitl_middleware import register_tool_middlewares
from core.agentscope.tools.tool_meta import TOOL_META
@@ -32,7 +35,14 @@ TOOL_GROUPS: dict[str, ToolGroup] = {
"intent": ToolGroup(stage="intent", tool_names=frozenset({"calendar_read"})),
"execution": ToolGroup(
stage="execution",
tool_names=frozenset({"calendar_read", "calendar_write", "calendar_share"}),
tool_names=frozenset(
{
"calendar_read",
"calendar_write",
"calendar_share",
"user_lookup",
}
),
),
"report": ToolGroup(stage="report", tool_names=frozenset()),
}
@@ -79,6 +89,15 @@ def _load_custom_tool_bindings(
"user_token": user_token or "",
},
),
CustomToolBinding(
name="user_lookup",
func=user_lookup,
preset_kwargs={
"session": session,
"owner_id": owner_id,
"user_token": user_token or "",
},
),
]