Repository navigation
Conversation
…n endpoints why: The installed MCP dependencies, documentation and hidden build helpers must resolve in a single project check. what: - Pin ty and preserve the published libtmux dependency version. - Include the documentation and build helpers and enforce authored function annotations. - Update development commands and run the type matrix alongside the runtime suite.
why: Tool registration, wire validation and tmux dispatch use different contracts that should remain visible to callers and tests. what: - Narrow parsed environment fields and retain command dispatch on the live tmux instance. - Exercise invalid tool requests through a local FastMCP client and resolve the owned fixture socket. - Use the installed documentation extension metadata support and current context-manager annotations.
why: The corner fixture exercises valid input, and the development environment now provides typed Docutils nodes. what: - Annotate the fixture with the tool's PaneCorner type. - Remove the redundant suppressions from the fixture and docs widget.
why: Contributors need a consistent way to resolve typing ambiguities while preserving the contract callers rely on. what: - Describe the limited uses of object and Any at input boundaries. - Check precise signatures against supported callers, misuse and downstream inference.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #164 +/- ##
==========================================
- Coverage 87.03% 86.67% -0.36%
==========================================
Files 47 47
Lines 3964 3970 +6
Branches 601 603 +2
==========================================
- Hits 3450 3441 -9
- Misses 354 367 +13
- Partials 160 162 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
why: The supported libtmux release defines variadic commands on its shared command mixin. Referring to that interface preserves each object’s socket, target, return value, and method overrides. what: - Use the shared receiver directly where only cmd is needed. - Forward string command arguments on the original object in mixed-use calls.
tony
marked this pull request as ready for review
November 29, 2026 21:29
why: The unreleased changelog links contributors to the reviewed tooling and behavior changes. what: - Record the migration in the existing unreleased section and link its pull request.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type coverage
The project and its hidden build helpers now run ty on Python 3.11 and 3.15. The MCP tools keep their existing libtmux dependency and dispatch commands on the original server, session, window or pane. Functions that only execute commands accept libtmux’s public
CmdMixinreceiver. The remaining mixed-use calls pass string arguments through one helper that invokes the same bound method.Command dispatch
At the first draft, ty reported 29 argument-count errors. The environment mixin on libtmux 0.62.0 declares two positional arguments, even though the concrete method accepts a command followed by arbitrary tmux arguments. All nine published releases from 0.62.0 through 0.69.0 have that declaration. Version 0.70.0 corrected it, but substituting that release failed 30 consumer runtime tests on each supported endpoint. The shared command mixin was already present in the locked 0.62.0 release. Original mixins · Upstream signature change
On an isolated tmux socket, direct and typed calls produced identical command arguments, stdout, stderr and exit codes for all four concrete receivers and a server subclass overriding
cmd. A format query succeeded and an invalid tmux command returned exit 1 with the same error. Passing a list where one string argument is required reached the checker as an invalid argument.Verification
The completed workflow on the measured source passed seven tmux runtime builds and both Python type checks. Hosted checks
Closes #163.
Type-checker benchmark
The mypy baseline uses the project’s pre-migration settings and dependency lock. Both tools checked the same 84 candidate files with Python 3.11.15. Both targeted Python 3.11. The two source snapshots differ in 23 of those files. Mypy settings · Ty settings · Candidate lock · Baseline lock
The table gives mean wall time and sample standard deviation across 8 fresh CLI processes per cell. mypy 2.4.1 exited 0 (16/16). ty 0.0.113 exited 0 (16/16). hyperfine 1.20.0 timed the installed checker executables on Linux x86_64. Stub packages in the shared environment include
types-docutils0.23.0.20261122,types-regex2026.11.19.20261122. Mypy used no configured plugins. The historical config enabledignore_missing_importsfordocutils,docutils.*. Both commands used the locked libtmux 0.62.0 release and checked the same 84 candidate files. The original mypy native commands checked 72 ordinary files and two hidden build helpers. Passing all 84 paths explicitly includes the documentation sources on both snapshots.Cold runs cleared the checker cache before each sample. Repeat runs followed two untimed warmups. Mypy reused its module cache. Ty wrote no files under its isolated cache root, so its repeat timings measure another fresh process. The OS page cache stayed warm. Setup and diagnostics ran outside the timed commands.
Diagnostics
mypy-trunkreportedSuccess: no issues found in 84 source files.mypy-trunk-native-1reportedSuccess: no issues found in 72 source files.mypy-trunk-native-2reportedSuccess: no issues found in 2 source files.Samples
File manifest
.github/scripts/test_tmux_build.py.github/scripts/tmux_build.pyconftest.pydocs/__init__.pydocs/_ext/__init__.pydocs/_ext/widgets/__init__.pydocs/_ext/widgets/_assets.pydocs/_ext/widgets/_base.pydocs/_ext/widgets/_directive.pydocs/_ext/widgets/_discovery.pydocs/_ext/widgets/_prehydrate.pydocs/_ext/widgets/mcp_install.pydocs/conf.pyscripts/mcp_swap.pysrc/libtmux_mcp/__about__.pysrc/libtmux_mcp/__init__.pysrc/libtmux_mcp/__main__.pysrc/libtmux_mcp/_history.pysrc/libtmux_mcp/_tmux_proc.pysrc/libtmux_mcp/_utils.pysrc/libtmux_mcp/_wait_policy.pysrc/libtmux_mcp/middleware.pysrc/libtmux_mcp/models.pysrc/libtmux_mcp/prompts/__init__.pysrc/libtmux_mcp/prompts/recipes.pysrc/libtmux_mcp/resources/__init__.pysrc/libtmux_mcp/resources/hierarchy.pysrc/libtmux_mcp/resources/viewer.pysrc/libtmux_mcp/server.pysrc/libtmux_mcp/tools/__init__.pysrc/libtmux_mcp/tools/batch_tools.pysrc/libtmux_mcp/tools/buffer_tools.pysrc/libtmux_mcp/tools/env_tools.pysrc/libtmux_mcp/tools/hook_tools.pysrc/libtmux_mcp/tools/option_tools.pysrc/libtmux_mcp/tools/pane_tools/__init__.pysrc/libtmux_mcp/tools/pane_tools/capture_since.pysrc/libtmux_mcp/tools/pane_tools/copy_mode.pysrc/libtmux_mcp/tools/pane_tools/io.pysrc/libtmux_mcp/tools/pane_tools/layout.pysrc/libtmux_mcp/tools/pane_tools/lifecycle.pysrc/libtmux_mcp/tools/pane_tools/meta.pysrc/libtmux_mcp/tools/pane_tools/pipe.pysrc/libtmux_mcp/tools/pane_tools/search.pysrc/libtmux_mcp/tools/pane_tools/state.pysrc/libtmux_mcp/tools/pane_tools/wait.pysrc/libtmux_mcp/tools/server_tools.pysrc/libtmux_mcp/tools/session_tools.pysrc/libtmux_mcp/tools/wait_for_tools.pysrc/libtmux_mcp/tools/window_tools.pytests/__init__.pytests/conftest.pytests/docs/__init__.pytests/docs/_snapshots.pytests/docs/conftest.pytests/docs/test_compatibility.pytests/docs/test_topic_contracts.pytests/docs/test_widgets.pytests/test_batch_tools.pytests/test_buffer_tools.pytests/test_cli.pytests/test_env_tools.pytests/test_history.pytests/test_hook_tools.pytests/test_mcp_swap.pytests/test_middleware.pytests/test_option_tools.pytests/test_package_metadata.pytests/test_pane_tools.pytests/test_prompts.pytests/test_resources.pytests/test_resources_integration.pytests/test_retired_vocabulary.pytests/test_server.pytests/test_server_tools.pytests/test_session_tools.pytests/test_spawn_shell_history.pytests/test_spawn_tools_history.pytests/test_tmux_format_arguments.pytests/test_tool_annotations.pytests/test_utils.pytests/test_wait_for_tools.pytests/test_wait_policy.pytests/test_window_tools.pyReproduce
Run from a clone containing both revisions with bash, uv 0.12.0, hyperfine 1.20.0 and the utilities used below.
The Python typing policy describes how to check a proposed signature against downstream callers and when an open input type is appropriate.
Hosted checks
Checks on 55cbf6ea9b8d
Skipped — release · types · release · build.
Passed — build (3.15, 3.2a) · build (3.15, 3.3a) · build (3.15, 3.8) · build (3.15, 3.4) · build (3.15, 3.5) · types (3.15) · build (3.15, 3.6) · build (3.15, master) · types (3.11).