Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 6 additions & 0 deletions capiscio_mcp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ async def read_database(query: str) -> list[dict]:
ServerErrorCode,
TrustLevel,
)

# Eagerly register MCP proto descriptor before capiscio-sdk can register its
# simpler version. The MCP proto is a superset (has PolicyDecision* etc.), so
# the SDK can safely fall back to it when it detects a duplicate.
import capiscio_mcp._proto.gen.capiscio.v1.mcp_pb2 as _mcp_pb2 # noqa: F401, E402

from capiscio_mcp.errors import (
GuardError,
ServerVerifyError,
Expand Down
20 changes: 19 additions & 1 deletion capiscio_mcp/_proto/gen/capiscio/v1/mcp_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ Issues = "https://github.com/capiscio/capiscio-mcp-python/issues"
[tool.hatch.build.targets.wheel]
packages = ["capiscio_mcp"]

[tool.hatch.build.targets.wheel.force-include]
"capiscio_mcp/_proto/gen/capiscio" = "capiscio_mcp/_proto/gen/capiscio"

[tool.hatch.build.targets.sdist.force-include]
"capiscio_mcp/_proto/gen/capiscio" = "capiscio_mcp/_proto/gen/capiscio"

[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
Expand Down
Loading