diff --git a/apps/scheduler/call/choice/choice.py b/apps/scheduler/call/choice/choice.py index fb2c475a3a885f49af4546c74b9a84a0941b30eb..2a645d9673b306d41700ea04b812b66a5d7707f5 100644 --- a/apps/scheduler/call/choice/choice.py +++ b/apps/scheduler/call/choice/choice.py @@ -80,7 +80,7 @@ class Choice(CoreCall, input_model=ChoiceInput, output_model=ChoiceOutput): logger.warning(f"[Choice] 分支 {choice.branch_id} 条件处理失败: {msg}") continue if not ConditionHandler.check_value_type( - condition.left.value, condition.left.type): + condition.left, condition.left.type): msg = f"左值类型不匹配: {condition.left.value} 应为 {condition.left.type.value}" logger.warning(f"[Choice] 分支 {choice.branch_id} 条件处理失败: {msg}") continue @@ -98,7 +98,7 @@ class Choice(CoreCall, input_model=ChoiceInput, output_model=ChoiceOutput): logger.warning(f"[Choice] 分支 {choice.branch_id} 条件处理失败: {msg}") continue if not ConditionHandler.check_value_type( - condition.right.value, condition.right.type): + condition.right, condition.right.type): msg = f"右值类型不匹配: {condition.right.value} 应为 {condition.right.type.value}" logger.warning(f"[Choice] 分支 {choice.branch_id} 条件处理失败: {msg}") continue @@ -119,7 +119,7 @@ class Choice(CoreCall, input_model=ChoiceInput, output_model=ChoiceOutput): else: condition.right.value = ast.literal_eval(condition.right.value) if not ConditionHandler.check_value_type( - condition.right.value, condition.right.type): + condition.right, condition.right.type): msg = f"右值类型不匹配: {condition.right.value} 应为 {condition.right.type.value}" logger.warning(f"[Choice] 分支 {choice.branch_id} 条件处理失败: {msg}") continue diff --git a/apps/scheduler/call/choice/condition_handler.py b/apps/scheduler/call/choice/condition_handler.py index 261809ad57fdd6d8c5267c59a7b87404dd7befa5..f63620625323d5f77e0de54b03196cb9277eba48 100644 --- a/apps/scheduler/call/choice/condition_handler.py +++ b/apps/scheduler/call/choice/condition_handler.py @@ -112,7 +112,7 @@ class ConditionHandler(BaseModel): left = condition.left operate = condition.operate right = condition.right - value_type = condition.type + value_type = left.type result = None if value_type == Type.STRING: diff --git a/apps/scheduler/pool/loader/app.py b/apps/scheduler/pool/loader/app.py index 49407ba95358d4442c714087fd48b1aaca219f8d..aaca569d20fc0985233d2db5063a68869f788d85 100644 --- a/apps/scheduler/pool/loader/app.py +++ b/apps/scheduler/pool/loader/app.py @@ -78,7 +78,6 @@ class AppLoader: # 加载模型 try: metadata = AgentAppMetadata.model_validate(metadata) - logger.info(f"[AppLoader] Agent应用元数据验证成功: {metadata}") except Exception as e: err = "[AppLoader] Agent应用元数据验证失败" logger.exception(err) diff --git a/apps/schemas/mcp.py b/apps/schemas/mcp.py index af7086cdd99f779e7d01e3f5601501b953e1c367..b1f45c4371e42204afd52a12dbad69a05f5133a9 100644 --- a/apps/schemas/mcp.py +++ b/apps/schemas/mcp.py @@ -57,7 +57,7 @@ class MCPServerStdioConfig(MCPBasicConfig): class MCPServerSSEConfig(MCPBasicConfig): """MCP 服务器配置""" - url: str = Field(description="MCP 服务器地址", default="") + url: str = Field(description="MCP 服务器地址", default="http://example.com/sse", pattern=r"^https?://.+/sse$") class MCPServerConfig(BaseModel): diff --git a/apps/services/appcenter.py b/apps/services/appcenter.py index 4e0d00d06254973d284b149faaa632d969700981..1541162300526b98219894606d999f069cc95e1c 100644 --- a/apps/services/appcenter.py +++ b/apps/services/appcenter.py @@ -83,7 +83,6 @@ class AppCenterManager: if app_type is not None: filters["app_type"] = app_type.value # 获取应用列表 - logger.error(f"[AppCenterManager] 搜索条件: {filters}, 页码: {page}, 每页大小: {SERVICE_PAGE_SIZE}") apps, total_apps = await AppCenterManager._search_apps_by_filter(filters, page, SERVICE_PAGE_SIZE) # 构建返回的应用卡片列表 diff --git a/apps/services/parameter.py b/apps/services/parameter.py index 2b85c62e341ebaedb3af025ca59d869e82d9a46c..89f1ca85fa5f84c74e20b4f139a381052425d882 100644 --- a/apps/services/parameter.py +++ b/apps/services/parameter.py @@ -75,6 +75,8 @@ class ParameterManager: pre_step_params = [] for i in range(1, len(q)): step_id = q[i] + if step_id == 'start' or step_id == 'end': + continue node_id = step_id_to_node_id.get(step_id) _, output_schema = await NodeManager.get_node_params(node_id) slot = Slot(output_schema)