diff --git a/Makefile b/Makefile index 8d2623f..6c08409 100644 --- a/Makefile +++ b/Makefile @@ -21,3 +21,7 @@ db-history: db-stamp-head: uv run alembic stamp head +test: + docker compose down + docker rmi kilostar-kilostar:latest + docker compose up -d --build diff --git a/kilostar/utils/mcp_helper.py b/kilostar/utils/mcp_helper.py index 26421f3..823f4a1 100644 --- a/kilostar/utils/mcp_helper.py +++ b/kilostar/utils/mcp_helper.py @@ -107,7 +107,7 @@ async def get_all_toolsets_for_scope( Args: scope: 调用方所属 scope。 - toolset_ids: agent 配置的 toolset 列表;为 None 表示返回全部。 + toolset_ids: agent 配置的 toolset 列表;为 None 或空列表表示返回全部。 返回顺序保持稳定:先本地 toolset(按 toolset_ids),再 MCP toolset。 任意一类拉取失败仅记录日志,不影响其他类。 @@ -120,7 +120,8 @@ async def get_all_toolsets_for_scope( ) snapshot = await fetch_snapshot() - local = build_toolsets_for_scope(snapshot, scope, toolset_ids=toolset_ids) + effective_ids = toolset_ids if toolset_ids else None + local = build_toolsets_for_scope(snapshot, scope, toolset_ids=effective_ids) if local: toolsets.extend(local) except Exception as e: