Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
4e247e1
py(deps): Pin coordinated tmux version check
tony Oct 17, 2026
807734b
mcp(fix): Check the version of owned tmux operations
tony Oct 17, 2026
5132f90
CI(test): Exercise native tmux refusal
tony Oct 17, 2026
2ded934
Support(docs): Explain tmux version checks
tony Oct 17, 2026
f72a999
Changelog(docs): Record tmux 3.3a minimum
tony Oct 17, 2026
978b6f0
py(deps): Pin the hook-free libtmux version probe
tony Oct 17, 2026
2c915c9
mcp(fix): Probe the daemon version without firing hooks
tony Oct 17, 2026
9d64f14
Changelog(docs): Record the hook-free version probe
tony Oct 17, 2026
ea916d5
py(deps): Require libtmux 0.63 for the version-check surface
tony Oct 17, 2026
303e62a
mcp(fix): Raise library exceptions from the version-check helpers
tony Oct 17, 2026
9d8c21e
mcp(fix): Keep serving when the default endpoint is unsupported
tony Oct 17, 2026
949d69e
mcp(fix): Report a refused run_command fence as a version error
tony Oct 17, 2026
f3d8436
Support(docs): State the libtmux 0.63 requirement and release order
tony Oct 17, 2026
4ee4423
Changelog(docs): Record the libtmux 0.63 requirement and startup beha…
tony Oct 17, 2026
5a33848
Tests(fix): Pin library exceptions for probe failures
tony Oct 17, 2026
13e3330
py(deps): Pin libtmux's strict-ranking and cache head
tony Oct 17, 2026
aaeac2f
mcp(perf): Reuse the checked release per endpoint
tony Oct 17, 2026
d5085ac
CI(test): Add the tmux 3.8 lane
tony Oct 17, 2026
a2b4b3a
Changelog(docs): Record per-endpoint version reuse
tony Oct 17, 2026
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
32 changes: 31 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ jobs:
strategy:
matrix:
python-version: ['3.14']
tmux-version: ['3.2a', '3.3a', '3.4', '3.5', '3.6', 'master']
tmux-version: ['3.3a', '3.4', '3.5', '3.6', '3.7a', '3.8', 'master']
env:
TMUX_TMPDIR: /tmp/libtmux-mcp-test
steps:
- uses: actions/checkout@v7

Expand Down Expand Up @@ -78,6 +80,7 @@ jobs:
sudo apt install libevent-2.1-7
export PATH=$HOME/tmux-builds/tmux-${{ matrix.tmux-version }}/bin:$PATH
ls $HOME/tmux-builds/tmux-${{ matrix.tmux-version }}/bin
mkdir -p "$TMUX_TMPDIR"
tmux -V
uv run py.test --cov=./ --cov-append --cov-report=xml -n auto --verbose
env:
Expand All @@ -88,6 +91,33 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}

unsupported-versions:
runs-on: ubuntu-latest
env:
TMUX_TMPDIR: /tmp/libtmux-mcp-test
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v10.2.0
- run: uv python install 3.14
- run: uv sync --all-extras --dev
- name: Build supported and rejected native endpoints
run: |
sudo apt-get update
sudo apt-get install -y libevent-dev libncurses-dev bison
mkdir -p "$TMUX_TMPDIR" "$RUNNER_TEMP/tmux-versions"
for version in 3.2a 3.3 3.3a; do
git clone --quiet --depth=1 --branch "$version" https://github.com/tmux/tmux.git "$RUNNER_TEMP/tmux-versions/$version"
cd "$RUNNER_TEMP/tmux-versions/$version"
sh autogen.sh
./configure --prefix="$RUNNER_TEMP/tmux-versions/$version/install"
make -j2
make install
done
echo "LIBTMUX_TEST_MINIMUM_TMUX=$RUNNER_TEMP/tmux-versions/3.3a/install/bin/tmux" >> "$GITHUB_ENV"
echo "LIBTMUX_TEST_UNSUPPORTED_TMUX=$RUNNER_TEMP/tmux-versions/3.2a/install/bin/tmux" >> "$GITHUB_ENV"
echo "LIBTMUX_TEST_UNPATCHED_TMUX=$RUNNER_TEMP/tmux-versions/3.3/install/bin/tmux" >> "$GITHUB_ENV"
- run: uv run pytest tests/test_tmux_versions.py --reruns=0 -q

release:
runs-on: ubuntu-latest
needs: build
Expand Down
12 changes: 12 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@
_Notes on upcoming releases will be added here_
<!-- END PLACEHOLDER - ADD NEW CHANGELOG ENTRIES BELOW THIS LINE -->

### Compatibility

Core operations require tmux 3.3a and libtmux 0.63.0 or newer.
Connected daemons, cold startup, owned subprocesses and generated completion
helpers are checked before requested effects. Subprocess version checks remember the daemon's release per endpoint and shares the
operation deadline and cancellation reaps the owned child. The version probe
runs no user hooks, and a failed probe or backend check is an expected tool
error. An unsupported default endpoint no longer stops startup: each tool
checks the endpoint it uses. CI retains 3.3a and tests rejection of native 3.2a
and unpatched 3.3. The development backend source pin remains in place until
libtmux 0.63.0 is released.

## libtmux-mcp 0.1.0a22 (2026-09-06)

libtmux-mcp 0.1.0a22 runs on FastMCP 4, which brings MCP Python SDK v2 with
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ commands, read output, orchestrate panes.

## Quickstart

**Requirements:** Python 3.10+, tmux >= 3.2a on `$PATH`.
**Requirements:** Python 3.10+, tmux >= 3.3a on `$PATH`, and libtmux 0.63.0 or newer, as described in
[compatibility](docs/reference/compatibility.md).

The distribution is `libtmux-mcp`, the import is `libtmux_mcp`, and the
installed executable is `libtmux-mcp`.
Expand Down
9 changes: 7 additions & 2 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
## Requirements

- Python 3.10+
- tmux >= 3.2a
- tmux >= 3.3a, including the patch letter
- libtmux 0.63.0 or newer, described in {ref}`compatibility`
- [uv](https://github.com/astral-sh/uv) ([install](https://docs.astral.sh/uv/getting-started/installation/)) or [pipx](https://github.com/pypa/pipx) ([install](https://pipx.pypa.io/stable/installation/)) — for running without a persistent install

## Run without installing
Expand Down Expand Up @@ -53,11 +54,15 @@ $ cd libtmux-mcp
```

```console
$ uv pip install -e "."
$ uv sync --all-extras --dev
```

Code changes take effect immediately — no reinstall needed.

This branch requires libtmux 0.63.0 or newer and pins a development revision
in `uv.lock` until that release exists. Ordinary package installers do not use
uv's source override and select the released package.

## Running the server

```console
Expand Down
31 changes: 28 additions & 3 deletions docs/reference/compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,42 @@

| tmux | Status |
|------|--------|
| >= 3.2a | Supported |
| < 3.2a | Not supported (libtmux requirement) |
| >= 3.3a | Core operations supported |
| 3.3 and earlier | Refused before requested effects |

Commands validate the selected daemon, including when the client executable is
newer. An absent endpoint validates the executable before startup. Owned raw
subprocesses and generated completion helpers retain a native release guard;
live dispatch cannot start a replacement daemon after losing the one it checked.
Unknown release reports are refused. `command-alias` redefinitions of the
library's metadata and guard built-ins remain outside this qualification.

The version check uses the operation's remaining subprocess budget. Cancelling an owned
async subprocess kills and reaps its metadata or effect child. Parent libtmux
calls delegated through worker threads retain their existing cancellation
semantics; this does not make those threads interruptible.

Higher requirements for individual features are documented separately from
the core minimum. Baseline polling does not require control mode.

## Dependencies

| Package | Required version |
|---------|-----------------|
| [libtmux](https://libtmux.git-pull.com/) | >= 0.62.0, < 1.0 |
| [libtmux](https://libtmux.git-pull.com/) | >= 0.63.0, < 1.0 |
| [FastMCP](https://github.com/jlowin/fastmcp) | >= 4.0.2, < 5.0.0 |
| [regex](https://github.com/mrabarnett/mrab-regex) | >= 2024.11.6 |

The libtmux backend must publish `libtmux._internal.support`, which first ships in
libtmux 0.63.0; the dependency range names that release, so an installer never
selects the 0.62 series. Until libtmux 0.63.0 is released, this branch's uv
source override pins the implementation from
[Python core PR779](https://github.com/tmux-python/libtmux/pull/779) for
development; ordinary package installers ignore that override. Startup and tool
dispatch refuse a backend without that module. Release libtmux first,
then drop the source override and merge this change. Use
`uv sync --all-extras --dev` for the development pair.

## MCP clients

| Client | Tested | Transport |
Expand Down
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ include = [
]

dependencies = [
"libtmux>=0.62.0,<1.0",
"libtmux>=0.63.0,<1.0",
"fastmcp>=4.0.2,<5.0.0",
"regex>=2024.11.6",
]
Expand Down Expand Up @@ -115,6 +115,10 @@ lint = [
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.uv.sources]
# Coordinated version-check backend, pending its package release.
libtmux = { git = "https://github.com/tmux-python/libtmux.git", rev = "f6e4630a15f342382487a60e1e1477abcd52294d" }

[tool.uv.exclude-newer-package]
# git-pull packages release in lockstep with their workspaces, so a
# fresh release blocking on the 3-day cooldown blocks every
Expand Down
Loading
Loading