Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion capiscio_mcp/guard.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,18 @@ async def run_eval():
# We're in an async context, use run_coroutine_threadsafe
import concurrent.futures
future = asyncio.run_coroutine_threadsafe(run_eval(), loop)
result = future.result(timeout=30.0)
try:
result = future.result(timeout=30.0)
except (TimeoutError, concurrent.futures.TimeoutError):
future.cancel()
raise GuardError(
reason=DenyReason.INTERNAL_ERROR,
detail=(
"Guard evaluation timed out. This usually means the "
"guard is being called outside of an MCP request context "
"or the gRPC core server is not responding."
),
)
else:
# No event loop, create one
result = asyncio.run(run_eval())
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "capiscio-mcp"
version = "2.7.1"
version = "2.7.2"
description = "Trust badges for MCP tool calls - RFC-006 & RFC-007 implementation"
Comment on lines 6 to 8

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is intentional — pyproject.toml version tracks the package distribution version (aligned with the capiscio ecosystem release), while MCP_VERSION is the internal MCP protocol version constant. They serve different purposes and are expected to diverge.

readme = "README.md"
requires-python = ">=3.10"
Expand Down
Loading