permanent tools

This commit is contained in:
lda
2026-05-19 16:16:22 +07:00 Verified
parent d580e16114
commit 5ff3216d37
3 changed files with 38 additions and 11 deletions
+23 -2
View File
@@ -36,6 +36,23 @@ def build_local_documentation_source(repo_root: Path) -> CapabilitySource:
title="wf_mcp Troubleshooting", title="wf_mcp Troubleshooting",
description="Failure-oriented guide for discovery and deployment issues.", description="Failure-oriented guide for discovery and deployment issues.",
), ),
_markdown_resource(
path=docs_dir / "workflow_capabilities.md",
name="wf.docs.workflow_capabilities",
uri="wf://docs/workflow-capabilities",
title="Workflow Capabilities",
description=(
"Raw capabilities, workflow capabilities, wrappers, and "
"source ownership."
),
),
_markdown_resource(
path=docs_dir / "workflow_drafts.md",
name="wf.docs.workflow_drafts",
uri="wf://docs/workflow-drafts",
title="Workflow Drafts",
description="Draft and workspace authoring model for workflows.",
),
], ],
prompts=[ prompts=[
DocumentationPrompt( DocumentationPrompt(
@@ -45,7 +62,10 @@ def build_local_documentation_source(repo_root: Path) -> CapabilitySource:
text=( text=(
"Use wf://docs/operator-manual for the platform mental model. " "Use wf://docs/operator-manual for the platform mental model. "
"Use wf://docs/end-to-end-runbook for the normal connection-to-run " "Use wf://docs/end-to-end-runbook for the normal connection-to-run "
"flow. Use wf://docs/troubleshooting when a source, capability, " "flow. Use wf://docs/workflow-capabilities for wrappers and "
"workflow-ready node contracts. Use wf://docs/workflow-drafts "
"for draft workspace authoring. "
"Use wf://docs/troubleshooting when a source, capability, "
"or deployment is missing or unrunnable." "or deployment is missing or unrunnable."
), ),
), ),
@@ -58,7 +78,8 @@ def build_local_documentation_source(repo_root: Path) -> CapabilitySource:
"wf.workflow.list_capabilities and " "wf.workflow.list_capabilities and "
"wf.workflow.inspect_capability. Test a small reusable piece with " "wf.workflow.inspect_capability. Test a small reusable piece with "
"wf.workflow.call_capability before saving a larger artifact. " "wf.workflow.call_capability before saving a larger artifact. "
"Read wf://docs/end-to-end-runbook for the full sequence." "Read wf://docs/workflow-capabilities for the wrapper model, "
"then wf://docs/workflow-drafts for the workspace tools."
), ),
), ),
DocumentationPrompt( DocumentationPrompt(
+4 -6
View File
@@ -36,11 +36,9 @@ _SEARCH_ALWAYS_VISIBLE_TOOL_NAMES = [
# Stable workflow control surface. Keep future workflow-capability test # Stable workflow control surface. Keep future workflow-capability test
# tools pinned here too; they are distinct from raw MCP tool execution. # tools pinned here too; they are distinct from raw MCP tool execution.
"wf.workflow.list_artifacts", "wf.workflow.list_artifacts",
"wf.workflow.validate_draft", "wf.workflow.list_capabilities",
"wf.workflow.compile_draft", "wf.workflow.inspect_capability",
"wf.workflow.create_artifact_from_plan", "wf.workflow.call_capability",
"wf.workflow.create_artifact_from_draft",
"wf.workflow.patch_draft",
"wf.workflow.list_draft_workspaces", "wf.workflow.list_draft_workspaces",
"wf.workflow.create_draft_workspace", "wf.workflow.create_draft_workspace",
"wf.workflow.get_draft_workspace", "wf.workflow.get_draft_workspace",
@@ -54,9 +52,9 @@ _SEARCH_ALWAYS_VISIBLE_TOOL_NAMES = [
"wf.workflow.create_minimal_draft_workspace", "wf.workflow.create_minimal_draft_workspace",
"wf.workflow.create_artifact_from_workspace", "wf.workflow.create_artifact_from_workspace",
"wf.workflow.create_wrapper_from_workspace", "wf.workflow.create_wrapper_from_workspace",
"wf.workflow.call_capability",
"wf.workflow.inspect_artifact", "wf.workflow.inspect_artifact",
"wf.workflow.list_deployments", "wf.workflow.list_deployments",
"wf.workflow.save_deployment",
"wf.workflow.validate_deployment", "wf.workflow.validate_deployment",
"wf.workflow.run_deployment", "wf.workflow.run_deployment",
] ]
+11 -3
View File
@@ -199,8 +199,9 @@ def test_server_search_mode_pins_stable_control_and_workflow_tools() -> None:
assert "wf.admin.list_proxy_tools" in names assert "wf.admin.list_proxy_tools" in names
assert "wf.admin.get_proxy_tool" in names assert "wf.admin.get_proxy_tool" in names
assert "wf.workflow.list_artifacts" in names assert "wf.workflow.list_artifacts" in names
assert "wf.workflow.validate_draft" in names assert "wf.workflow.list_capabilities" in names
assert "wf.workflow.create_artifact_from_draft" in names assert "wf.workflow.inspect_capability" in names
assert "wf.workflow.call_capability" in names
assert "wf.workflow.list_draft_workspaces" in names assert "wf.workflow.list_draft_workspaces" in names
assert "wf.workflow.create_draft_workspace" in names assert "wf.workflow.create_draft_workspace" in names
assert "wf.workflow.get_draft_workspace" in names assert "wf.workflow.get_draft_workspace" in names
@@ -214,12 +215,17 @@ def test_server_search_mode_pins_stable_control_and_workflow_tools() -> None:
assert "wf.workflow.create_minimal_draft_workspace" in names assert "wf.workflow.create_minimal_draft_workspace" in names
assert "wf.workflow.create_artifact_from_workspace" in names assert "wf.workflow.create_artifact_from_workspace" in names
assert "wf.workflow.create_wrapper_from_workspace" in names assert "wf.workflow.create_wrapper_from_workspace" in names
assert "wf.workflow.call_capability" in names
assert "wf.workflow.inspect_artifact" in names assert "wf.workflow.inspect_artifact" in names
assert "wf.workflow.list_deployments" in names assert "wf.workflow.list_deployments" in names
assert "wf.workflow.save_deployment" in names
assert "wf.workflow.validate_deployment" in names assert "wf.workflow.validate_deployment" in names
assert "wf.workflow.run_deployment" in names assert "wf.workflow.run_deployment" in names
assert "wf.workflow.validate_draft" not in names
assert "wf.workflow.compile_draft" not in names
assert "wf.workflow.create_artifact_from_plan" not in names
assert "wf.workflow.create_artifact_from_draft" not in names
assert "wf.workflow.patch_draft" not in names
assert "wf.admin.call_tool" not in names assert "wf.admin.call_tool" not in names
assert "fixture.personal.echo_tool" not in names assert "fixture.personal.echo_tool" not in names
@@ -313,6 +319,8 @@ def test_server_exposes_platform_documentation_resources() -> None:
resources = await client.list_resources() resources = await client.list_resources()
uris = [str(resource.uri) for resource in resources] uris = [str(resource.uri) for resource in resources]
assert "wf://docs/operator-manual" in uris assert "wf://docs/operator-manual" in uris
assert "wf://docs/workflow-capabilities" in uris
assert "wf://docs/workflow-drafts" in uris
result = await client.read_resource("wf://docs/operator-manual") result = await client.read_resource("wf://docs/operator-manual")
assert isinstance(result[0], mcp_types.TextResourceContents) assert isinstance(result[0], mcp_types.TextResourceContents)