uhhh add support for WHAT Where
This commit is contained in:
@@ -5,6 +5,7 @@ from typing import Any
|
||||
from mcp.server.fastmcp import FastMCP
|
||||
|
||||
from ..workflow_surface import WorkflowSurfaceHandlers
|
||||
from ..models import RawWorkflowPlan
|
||||
from .service import WfMcpService
|
||||
|
||||
|
||||
@@ -25,7 +26,7 @@ def register_artifact_tools(server: FastMCP, service: WfMcpService) -> None:
|
||||
artifact_id: str,
|
||||
version: int,
|
||||
title: str,
|
||||
plan: dict[str, Any],
|
||||
plan: RawWorkflowPlan,
|
||||
outcomes: list[str],
|
||||
description: str | None = None,
|
||||
required_capabilities: dict[str, dict[str, Any]] | None = None,
|
||||
|
||||
@@ -523,9 +523,9 @@ class WfMcpService:
|
||||
def compile_plan(self, plan: RawWorkflowPlan) -> Workflow:
|
||||
node_defs: dict[str, Any] = {}
|
||||
for step in plan.nodes:
|
||||
if step.get("type") != "node":
|
||||
if not isinstance(step, NodeUse):
|
||||
continue
|
||||
qualified_name = step["node"]
|
||||
qualified_name = step.node
|
||||
spec = self._get_qualified_spec(qualified_name)
|
||||
node_defs[qualified_name] = spec.to_node_def()
|
||||
|
||||
@@ -536,8 +536,8 @@ class WfMcpService:
|
||||
"output_schema": plan.output_schema,
|
||||
"start": plan.start,
|
||||
"node_defs": [node.model_dump() for node in node_defs.values()],
|
||||
"nodes": plan.nodes,
|
||||
"edges": plan.edges,
|
||||
"nodes": [node.model_dump(by_alias=True) for node in plan.nodes],
|
||||
"edges": [edge.model_dump(by_alias=True) for edge in plan.edges],
|
||||
}
|
||||
return Workflow.model_validate(payload)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user