Skip to content
Draft
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
20 changes: 19 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ include = [

dependencies = [
"libtmux>=0.62.0,<1.0",
"fastmcp>=3.4.2,<4.0.0",
"fastmcp==4.0.0a2",
"fastmcp-tasks==4.0.0a2",
]

[project.urls]
Expand Down Expand Up @@ -111,7 +112,24 @@ lint = [
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.uv]
# SPIKE ONLY (branch `tasks`). fastmcp 4.x is published as an alpha, so
# resolution needs pre-releases enabled. Declaring it here rather than
# relying on UV_PRERELEASE in the environment: uv records the mode it
# resolved under in uv.lock, so without this every `uv sync` / `uv lock`
# that forgot the variable fails the lockfile check.
prerelease = "allow"

[tool.uv.exclude-newer-package]
# SPIKE ONLY (branch `tasks`): the fastmcp 4.x alpha is younger than the
# 3-day cooldown. Exempted here so this throwaway worktree can evaluate it;
# this must never reach a shipping branch.
fastmcp = false
fastmcp-slim = false
fastmcp-tasks = false
mcp-types = false
mcp = false
pydocket = false
# git-pull packages release in lockstep with their workspaces, so a
# fresh release blocking on the 3-day cooldown blocks every
# contributor's `uv sync` until it clears. `false` exempts each
Expand Down
2 changes: 1 addition & 1 deletion src/libtmux_mcp/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
from fastmcp.server.middleware.response_limiting import ResponseLimitingMiddleware
from fastmcp.tools.base import ToolResult
from libtmux import exc as libtmux_exc
from mcp.types import CallToolRequestParams, TextContent
from mcp_types import CallToolRequestParams, TextContent
from pydantic import ValidationError as PydanticValidationError

from libtmux_mcp._utils import (
Expand Down
10 changes: 5 additions & 5 deletions tests/test_middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from fastmcp.exceptions import ToolError
from fastmcp.server.middleware import MiddlewareContext
from libtmux import exc as libtmux_exc
from mcp.types import CallToolRequestParams
from mcp_types import CallToolRequestParams

from libtmux_mcp._utils import TAG_DESTRUCTIVE, TAG_MUTATING, TAG_READONLY
from libtmux_mcp.middleware import (
Expand Down Expand Up @@ -592,7 +592,7 @@ def test_audit_middleware_redacts_sensitive_args(

def test_tail_preserving_truncation_keeps_tail() -> None:
"""Over-sized text is truncated from the head, tail is preserved."""
from mcp.types import TextContent
from mcp_types import TextContent

from libtmux_mcp.middleware import TailPreservingResponseLimitingMiddleware

Expand All @@ -615,7 +615,7 @@ def test_tail_preserving_truncation_keeps_tail() -> None:

def test_tail_preserving_passthrough_when_under_cap() -> None:
"""Text within the cap passes through unchanged."""
from mcp.types import TextContent
from mcp_types import TextContent

from libtmux_mcp.middleware import TailPreservingResponseLimitingMiddleware

Expand Down Expand Up @@ -1560,14 +1560,14 @@ def test_unexpected_argument_suggestion(
and flags ``wait_for_previous`` as a client scheduling leak, naming
the client from the MCP initialize handshake when available.
"""
import mcp.types
import mcp_types
from fastmcp import Client

probe = _error_probe_server()

client_kwargs: dict[str, t.Any] = {}
if client_name is not None:
client_kwargs["client_info"] = mcp.types.Implementation(
client_kwargs["client_info"] = mcp_types.Implementation(
name=client_name, version="9.9"
)

Expand Down
Loading
Loading