ts for some reason, moved to wf_api
This commit is contained in:
@@ -4,8 +4,9 @@ from typing import Any
|
||||
|
||||
from mcp.server.fastmcp import FastMCP
|
||||
|
||||
from wf_api.models import RawWorkflowPlan
|
||||
|
||||
from ..workflow_surface import WorkflowSurfaceHandlers
|
||||
from ..models import RawWorkflowPlan
|
||||
from .service import WfMcpService
|
||||
|
||||
|
||||
|
||||
@@ -27,7 +27,8 @@ from wf_core import (
|
||||
execute_workflow_result_async,
|
||||
resume_workflow_result_async,
|
||||
)
|
||||
|
||||
from wf_api.models import RawWorkflowPlan
|
||||
from wf_api.runtime_dependencies import resolve_runtime_dependencies
|
||||
from wf_platform import (
|
||||
CapabilityBuckets,
|
||||
CapabilitySource,
|
||||
@@ -47,7 +48,6 @@ from ...models import (
|
||||
CatalogSnapshot,
|
||||
BrokerConfig,
|
||||
ConnectionConfig,
|
||||
RawWorkflowPlan,
|
||||
)
|
||||
from ...sdk import BackendAdapter
|
||||
from ...runtime import ToolExecutor
|
||||
@@ -55,7 +55,6 @@ from ...shared.errors import error_payload
|
||||
from ...shared.names import RESERVED_CONNECTION_IDS
|
||||
from ...storage import Store
|
||||
from ...workflow.wrappers import _model_from_schema
|
||||
from wf_api.runtime_dependencies import resolve_runtime_dependencies
|
||||
from ...workflow_surface.saved_subgraphs import (
|
||||
SavedSubgraphTree,
|
||||
prepare_saved_subgraphs,
|
||||
|
||||
+3
-30
@@ -4,12 +4,11 @@ from dataclasses import asdict, dataclass, field
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
from wf_core import Edge
|
||||
from wf_core.models.steps import InputBinding, Step
|
||||
|
||||
from .capabilities import CatalogNodeEntry, CatalogPromptEntry, CatalogResourceEntry
|
||||
|
||||
# RawWorkflowPlan moved to wf_api.models; re-exported here for backward compat.
|
||||
from wf_api.models import RawWorkflowPlan # noqa: F401
|
||||
|
||||
|
||||
@dataclass(slots=True)
|
||||
class ConnectionConfig:
|
||||
@@ -42,32 +41,6 @@ class CatalogSnapshot:
|
||||
return age_ms > self.max_age_seconds * 1000
|
||||
|
||||
|
||||
class RawWorkflowPlan(BaseModel):
|
||||
"""Raw authoring plan using the same graph step and edge models as core."""
|
||||
|
||||
name: str
|
||||
input_schema: dict[str, Any]
|
||||
state_schema: dict[str, Any]
|
||||
output_schema: dict[str, Any]
|
||||
outcomes: list[str] = Field(
|
||||
default_factory=lambda: ["ok"],
|
||||
description=(
|
||||
"Declared public workflow outcomes. Legacy plans without this field "
|
||||
"default to ok."
|
||||
),
|
||||
)
|
||||
output: list[InputBinding] = Field(
|
||||
default_factory=list,
|
||||
description=(
|
||||
"Optional root workflow output bindings. Sources read graph paths "
|
||||
"such as state.result and targets write the public output payload."
|
||||
),
|
||||
)
|
||||
start: str
|
||||
nodes: list[Step]
|
||||
edges: list[Edge]
|
||||
|
||||
|
||||
@dataclass(slots=True)
|
||||
class BrokerConfig:
|
||||
store_root: Path
|
||||
|
||||
@@ -54,14 +54,14 @@ from wf_api.constants import (
|
||||
DEFAULT_OK_OUTCOME,
|
||||
RUNTIME_ERROR_CAPABILITY,
|
||||
)
|
||||
from wf_api.models import RawWorkflowPlan
|
||||
from wf_api.next_actions import NextActions
|
||||
from wf_api.refs import parse_workflow_surface_capability_id
|
||||
|
||||
from ..broker.service.adapters import require_adapter
|
||||
from ..events import make_event
|
||||
from ..models import RawWorkflowPlan
|
||||
from ..shared import matches_query, paged_list_payload
|
||||
from .models import TraceRange
|
||||
from wf_api.next_actions import NextActions
|
||||
from .saved_subgraphs import (
|
||||
SavedSubgraphTree,
|
||||
direct_wrapper_interrupt_diagnostic,
|
||||
|
||||
@@ -26,8 +26,8 @@ from wf_core.models.steps import Step
|
||||
from wf_core.models.workflow_refs import WorkflowRef
|
||||
from wf_platform import CapabilitySource
|
||||
|
||||
from ..models import RawWorkflowPlan
|
||||
from wf_api.runtime_dependencies import resolve_runtime_dependencies
|
||||
from wf_api.models import RawWorkflowPlan
|
||||
|
||||
_STEPS_ADAPTER = TypeAdapter(list[Step])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user