test ruff check fix fmt
This commit is contained in:
@@ -1,34 +1,18 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
import shutil
|
||||
from typing import Any, cast
|
||||
from typing import Any
|
||||
|
||||
from wf_artifacts import FileDraftWorkspaceStore, WorkflowDeployment
|
||||
from wf_authoring import NodeSpec, build_async_registry, node
|
||||
from wf_core import END, NodeUse, RunStatus, RuntimeContext
|
||||
from wf_mcp.broker import WfMcpService
|
||||
from wf_authoring import node
|
||||
from wf_core import END
|
||||
from wf_mcp.capabilities import DiscoveredTool
|
||||
from wf_mcp.models import AuthRecord, ConnectionConfig, RawWorkflowPlan
|
||||
from wf_mcp.runtime import ToolExecutor
|
||||
from wf_mcp.sdk import ToolCallResult
|
||||
from wf_mcp.shared.errors import error_payload
|
||||
from wf_mcp.storage import FileStore
|
||||
from wf_platform import (
|
||||
CapabilityBuckets,
|
||||
CapabilitySource,
|
||||
SourceVisibility,
|
||||
)
|
||||
|
||||
from ..test_support import (
|
||||
EchoInput,
|
||||
EchoOutput,
|
||||
FailingDiscoveryAdapter,
|
||||
FakeAdapter,
|
||||
echo_tool,
|
||||
finalize_tool,
|
||||
input_binding,
|
||||
local_temp_root,
|
||||
output_binding,
|
||||
)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import asyncio
|
||||
import shutil
|
||||
|
||||
from wf_artifacts import FileDraftWorkspaceStore
|
||||
from wf_authoring import NodeSpec, node
|
||||
from wf_authoring import NodeSpec
|
||||
from wf_core import RunStatus
|
||||
from wf_mcp.broker import WfMcpService
|
||||
from wf_mcp.models import ConnectionConfig
|
||||
|
||||
@@ -20,10 +20,9 @@ from ..test_support import (
|
||||
|
||||
|
||||
def test_service_records_tool_call_events() -> None:
|
||||
from wf_authoring import node
|
||||
from wf_core import END, RunStatus
|
||||
|
||||
from ..test_support import echo_tool, input_binding, output_binding
|
||||
from ..test_support import input_binding, output_binding
|
||||
from .conftest import raw_plan
|
||||
|
||||
service = WfMcpService(store=FileStore(local_temp_root() / "tool_event_store"))
|
||||
@@ -75,7 +74,6 @@ def test_service_records_tool_call_events() -> None:
|
||||
|
||||
|
||||
def test_service_rejects_text_binding_for_raw_mcp_content_contract() -> None:
|
||||
from wf_authoring import node
|
||||
from wf_core import END
|
||||
|
||||
from ..test_support import input_binding, output_binding
|
||||
|
||||
@@ -2,7 +2,7 @@ from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
||||
from wf_authoring import NodeSpec, node
|
||||
from wf_authoring import NodeSpec
|
||||
from wf_mcp.broker import WfMcpService
|
||||
from wf_mcp.models import ConnectionConfig
|
||||
from wf_mcp.storage import FileStore
|
||||
@@ -47,8 +47,18 @@ def test_service_compiles_and_runs_raw_plan() -> None:
|
||||
"id": "echo",
|
||||
"type": "node",
|
||||
"node": "demo.personal.echo_tool",
|
||||
"input": [{"target": {"root": "local", "parts": ["text"]}, "path": {"root": "input", "parts": ["text"]}}],
|
||||
"output": [{"source": {"root": "local", "parts": ["echoed"]}, "target": {"root": "state", "parts": ["echoed"]}}],
|
||||
"input": [
|
||||
{
|
||||
"target": {"root": "local", "parts": ["text"]},
|
||||
"path": {"root": "input", "parts": ["text"]},
|
||||
}
|
||||
],
|
||||
"output": [
|
||||
{
|
||||
"source": {"root": "local", "parts": ["echoed"]},
|
||||
"target": {"root": "state", "parts": ["echoed"]},
|
||||
}
|
||||
],
|
||||
}
|
||||
],
|
||||
edges=[{"from": "echo", "outcome": "ok", "to": "__end__"}],
|
||||
@@ -69,17 +79,35 @@ def test_service_preserves_raw_plan_root_output_bindings() -> None:
|
||||
|
||||
plan = raw_plan(
|
||||
name="root_output_plan",
|
||||
input_schema={"type": "object", "properties": {"text": {"type": "string"}}, "required": ["text"]},
|
||||
input_schema={
|
||||
"type": "object",
|
||||
"properties": {"text": {"type": "string"}},
|
||||
"required": ["text"],
|
||||
},
|
||||
state_schema={"fields": {"echoed": {"type": "string"}}},
|
||||
output_schema={"type": "object", "properties": {"echoed": {"type": "string"}}, "required": ["echoed"]},
|
||||
output_schema={
|
||||
"type": "object",
|
||||
"properties": {"echoed": {"type": "string"}},
|
||||
"required": ["echoed"],
|
||||
},
|
||||
start="echo",
|
||||
nodes=[
|
||||
{
|
||||
"id": "echo",
|
||||
"type": "node",
|
||||
"node": "demo.personal.echo_tool",
|
||||
"input": [{"target": {"root": "local", "parts": ["text"]}, "path": {"root": "input", "parts": ["text"]}}],
|
||||
"output": [{"source": {"root": "local", "parts": ["echoed"]}, "target": {"root": "state", "parts": ["echoed"]}}],
|
||||
"input": [
|
||||
{
|
||||
"target": {"root": "local", "parts": ["text"]},
|
||||
"path": {"root": "input", "parts": ["text"]},
|
||||
}
|
||||
],
|
||||
"output": [
|
||||
{
|
||||
"source": {"root": "local", "parts": ["echoed"]},
|
||||
"target": {"root": "state", "parts": ["echoed"]},
|
||||
}
|
||||
],
|
||||
}
|
||||
],
|
||||
edges=[{"from": "echo", "outcome": "ok", "to": "__end__"}],
|
||||
|
||||
Reference in New Issue
Block a user