libtmux-mcp 0.1.0a0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. libtmux_mcp-0.1.0a0/.codecov.yml +15 -0
  2. libtmux_mcp-0.1.0a0/.github/contributing.md +35 -0
  3. libtmux_mcp-0.1.0a0/.github/dependabot.yml +7 -0
  4. libtmux_mcp-0.1.0a0/.github/stale.yml +29 -0
  5. libtmux_mcp-0.1.0a0/.github/workflows/tests.yml +124 -0
  6. libtmux_mcp-0.1.0a0/.gitignore +207 -0
  7. libtmux_mcp-0.1.0a0/.prettierrc +3 -0
  8. libtmux_mcp-0.1.0a0/.tool-versions +3 -0
  9. libtmux_mcp-0.1.0a0/AGENTS.md +397 -0
  10. libtmux_mcp-0.1.0a0/CHANGES +16 -0
  11. libtmux_mcp-0.1.0a0/LICENSE +21 -0
  12. libtmux_mcp-0.1.0a0/PKG-INFO +272 -0
  13. libtmux_mcp-0.1.0a0/README.md +239 -0
  14. libtmux_mcp-0.1.0a0/conftest.py +74 -0
  15. libtmux_mcp-0.1.0a0/docs/__init__.py +1 -0
  16. libtmux_mcp-0.1.0a0/docs/_ext/sphinx_fonts.py +153 -0
  17. libtmux_mcp-0.1.0a0/docs/_static/css/custom.css +234 -0
  18. libtmux_mcp-0.1.0a0/docs/_static/favicon.ico +0 -0
  19. libtmux_mcp-0.1.0a0/docs/_static/img/books/amazon-logo.png +0 -0
  20. libtmux_mcp-0.1.0a0/docs/_static/img/books/ibooks-logo.png +0 -0
  21. libtmux_mcp-0.1.0a0/docs/_static/img/icons/icon-128x128.png +0 -0
  22. libtmux_mcp-0.1.0a0/docs/_static/img/icons/icon-144x144.png +0 -0
  23. libtmux_mcp-0.1.0a0/docs/_static/img/icons/icon-152x152.png +0 -0
  24. libtmux_mcp-0.1.0a0/docs/_static/img/icons/icon-192x192.png +0 -0
  25. libtmux_mcp-0.1.0a0/docs/_static/img/icons/icon-384x384.png +0 -0
  26. libtmux_mcp-0.1.0a0/docs/_static/img/icons/icon-512x512.png +0 -0
  27. libtmux_mcp-0.1.0a0/docs/_static/img/icons/icon-72x72.png +0 -0
  28. libtmux_mcp-0.1.0a0/docs/_static/img/icons/icon-96x96.png +0 -0
  29. libtmux_mcp-0.1.0a0/docs/_static/img/libtmux.svg +191 -0
  30. libtmux_mcp-0.1.0a0/docs/_static/js/spa-nav.js +236 -0
  31. libtmux_mcp-0.1.0a0/docs/_templates/book.html +7 -0
  32. libtmux_mcp-0.1.0a0/docs/_templates/page.html +76 -0
  33. libtmux_mcp-0.1.0a0/docs/_templates/sidebar/brand.html +18 -0
  34. libtmux_mcp-0.1.0a0/docs/_templates/sidebar/projects.html +70 -0
  35. libtmux_mcp-0.1.0a0/docs/about.md +91 -0
  36. libtmux_mcp-0.1.0a0/docs/api/index.md +14 -0
  37. libtmux_mcp-0.1.0a0/docs/api/middleware.md +8 -0
  38. libtmux_mcp-0.1.0a0/docs/api/models.md +8 -0
  39. libtmux_mcp-0.1.0a0/docs/api/resources.md +8 -0
  40. libtmux_mcp-0.1.0a0/docs/api/server.md +8 -0
  41. libtmux_mcp-0.1.0a0/docs/api/tools.md +55 -0
  42. libtmux_mcp-0.1.0a0/docs/api/utils.md +8 -0
  43. libtmux_mcp-0.1.0a0/docs/conf.py +286 -0
  44. libtmux_mcp-0.1.0a0/docs/developing.md +106 -0
  45. libtmux_mcp-0.1.0a0/docs/glossary.md +36 -0
  46. libtmux_mcp-0.1.0a0/docs/history.md +11 -0
  47. libtmux_mcp-0.1.0a0/docs/index.md +34 -0
  48. libtmux_mcp-0.1.0a0/docs/justfile +206 -0
  49. libtmux_mcp-0.1.0a0/docs/manifest.json +53 -0
  50. libtmux_mcp-0.1.0a0/docs/quickstart.md +146 -0
  51. libtmux_mcp-0.1.0a0/docs/redirects.txt +0 -0
  52. libtmux_mcp-0.1.0a0/docs/requirements.txt +1 -0
  53. libtmux_mcp-0.1.0a0/docs/topics/index.md +7 -0
  54. libtmux_mcp-0.1.0a0/docs/topics/safety.md +62 -0
  55. libtmux_mcp-0.1.0a0/justfile +129 -0
  56. libtmux_mcp-0.1.0a0/pyproject.toml +245 -0
  57. libtmux_mcp-0.1.0a0/src/libtmux_mcp/__about__.py +17 -0
  58. libtmux_mcp-0.1.0a0/src/libtmux_mcp/__init__.py +19 -0
  59. libtmux_mcp-0.1.0a0/src/libtmux_mcp/__main__.py +7 -0
  60. libtmux_mcp-0.1.0a0/src/libtmux_mcp/_utils.py +532 -0
  61. libtmux_mcp-0.1.0a0/src/libtmux_mcp/middleware.py +74 -0
  62. libtmux_mcp-0.1.0a0/src/libtmux_mcp/models.py +141 -0
  63. libtmux_mcp-0.1.0a0/src/libtmux_mcp/resources/__init__.py +15 -0
  64. libtmux_mcp-0.1.0a0/src/libtmux_mcp/resources/hierarchy.py +195 -0
  65. libtmux_mcp-0.1.0a0/src/libtmux_mcp/server.py +133 -0
  66. libtmux_mcp-0.1.0a0/src/libtmux_mcp/tools/__init__.py +27 -0
  67. libtmux_mcp-0.1.0a0/src/libtmux_mcp/tools/env_tools.py +109 -0
  68. libtmux_mcp-0.1.0a0/src/libtmux_mcp/tools/option_tools.py +146 -0
  69. libtmux_mcp-0.1.0a0/src/libtmux_mcp/tools/pane_tools.py +633 -0
  70. libtmux_mcp-0.1.0a0/src/libtmux_mcp/tools/server_tools.py +177 -0
  71. libtmux_mcp-0.1.0a0/src/libtmux_mcp/tools/session_tools.py +228 -0
  72. libtmux_mcp-0.1.0a0/src/libtmux_mcp/tools/window_tools.py +377 -0
  73. libtmux_mcp-0.1.0a0/tests/__init__.py +1 -0
  74. libtmux_mcp-0.1.0a0/tests/conftest.py +57 -0
  75. libtmux_mcp-0.1.0a0/tests/test_env_tools.py +51 -0
  76. libtmux_mcp-0.1.0a0/tests/test_middleware.py +119 -0
  77. libtmux_mcp-0.1.0a0/tests/test_option_tools.py +61 -0
  78. libtmux_mcp-0.1.0a0/tests/test_pane_tools.py +509 -0
  79. libtmux_mcp-0.1.0a0/tests/test_resources.py +103 -0
  80. libtmux_mcp-0.1.0a0/tests/test_resources_integration.py +119 -0
  81. libtmux_mcp-0.1.0a0/tests/test_server.py +139 -0
  82. libtmux_mcp-0.1.0a0/tests/test_server_tools.py +212 -0
  83. libtmux_mcp-0.1.0a0/tests/test_session_tools.py +209 -0
  84. libtmux_mcp-0.1.0a0/tests/test_utils.py +423 -0
  85. libtmux_mcp-0.1.0a0/tests/test_window_tools.py +220 -0
  86. libtmux_mcp-0.1.0a0/uv.lock +2783 -0
@@ -0,0 +1,15 @@
1
+ codecov:
2
+ notify:
3
+ require_ci_to_pass: no
4
+
5
+ coverage:
6
+ precision: 2
7
+ round: down
8
+ range: "70...100"
9
+ status:
10
+ project:
11
+ default:
12
+ target: auto
13
+ threshold: 1%
14
+ base: auto
15
+ patch: off
@@ -0,0 +1,35 @@
1
+ # Contributing
2
+
3
+ When contributing to this repository, please first discuss the change you wish to make via issue,
4
+ email, or any other method with the maintainers of this repository before making a change.
5
+
6
+ Please note we have a code of conduct, please follow it in all your interactions with the project.
7
+
8
+ ## Pull Request Process
9
+
10
+ 1. Ensure any install or build dependencies are removed before the end of the layer when doing a
11
+ build.
12
+ 2. This project uses flake8 to conform with common Python standards. Make sure
13
+ to run your code through linter using latest version of flake8, before pull request.
14
+ 3. Bad documnentation is a Bug. If your change demands documentation update, please do so. If you
15
+ find an issue with documentation, take the time to improve or fix it.
16
+ 4. pytest is used for automated testing. Please make sure to update tests that are needed, and to run
17
+ `make test` before submitting your pull request. This should prevent issues with CI and
18
+ make the review and merging process easier and faster.
19
+ 5. Update the README.md with details of changes to the interface, this includes new environment
20
+ variables, exposed ports, useful file locations and container parameters.
21
+ 6. Increase the version numbers in any examples files and the README.md to the new version that this
22
+ Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/).
23
+ 7. You may merge the Pull Request in once you have the sign-off of one other developer. If you
24
+ do not have permission to do that, you may request reviewer to merge it for you.
25
+
26
+ ## Decorum
27
+
28
+ - Participants will be tolerant of opposing views.
29
+ - Participants must ensure that their language and actions are free of personal
30
+ attacks and disparaging personal remarks.
31
+ - When interpreting the words and actions of others, participants should always
32
+ assume good intentions.
33
+ - Behaviour which can be reasonably considered harassment will not be tolerated.
34
+
35
+ Based on [Ruby's Community Conduct Guideline](https://www.ruby-lang.org/en/conduct/)
@@ -0,0 +1,7 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "github-actions"
4
+ directory: "/"
5
+ schedule:
6
+ # Check for updates to GitHub Actions every week
7
+ interval: "weekly"
@@ -0,0 +1,29 @@
1
+ # Number of days of inactivity before an issue becomes stale
2
+ daysUntilStale: 60
3
+ # Number of days of inactivity before a stale issue is closed
4
+ daysUntilClose: 7
5
+ # Issues with these labels will never be considered stale
6
+ exemptLabels:
7
+ - pinned
8
+ - security
9
+ # Label to use when marking an issue as stale
10
+ staleLabel: stale
11
+ # Comment to post when marking an issue as stale. Set to `false` to disable
12
+ markComment: |
13
+ This issue has been automatically marked as stale because it has not had
14
+ recent activity. It will be closed if no further activity occurs. Thank you
15
+ for your contributions.
16
+
17
+ This bot is used to handle issues where the issue hasn't been discussed or
18
+ has gone out of date. If an issue isn't resolved and handled in a certain
19
+ period of time, it may be closed. If you would like your issue re-opened,
20
+ please create a fresh issue with the latest, up to date information and
21
+ mention this issue in it.
22
+ unmarkComment: |
23
+ Thank you for updating this issue. It is no longer marked as stale.
24
+
25
+ # Comment to post when closing a stale issue. Set to `false` to disable
26
+ closeComment: false
27
+
28
+ # limit to only 'issues' or 'pulls'
29
+ only: issues
@@ -0,0 +1,124 @@
1
+ name: tests
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ build:
7
+ # Don't run twice for internal PRs from our own repo
8
+ if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
9
+
10
+ runs-on: ubuntu-latest
11
+ strategy:
12
+ matrix:
13
+ python-version: ['3.14']
14
+ tmux-version: ['3.2a', '3.3a', '3.4', '3.5', '3.6', 'master']
15
+ steps:
16
+ - uses: actions/checkout@v6
17
+
18
+ - name: Install uv
19
+ uses: astral-sh/setup-uv@v7
20
+ with:
21
+ enable-cache: true
22
+
23
+ - name: Set up Python ${{ matrix.python-version }}
24
+ run: uv python install ${{ matrix.python-version }}
25
+
26
+ - name: Test runtime dependencies
27
+ run: |
28
+ uv run --no-dev -p python${{ matrix.python-version }} -- python -c '
29
+ from libtmux_mcp import main
30
+ from libtmux_mcp.__about__ import __version__
31
+ print("libtmux-mcp version:", __version__)
32
+ '
33
+
34
+ - name: Install dependencies
35
+ run: uv sync --all-extras --dev
36
+
37
+ - name: Setup tmux build cache for tmux ${{ matrix.tmux-version }}
38
+ id: tmux-build-cache
39
+ uses: actions/cache@v5
40
+ with:
41
+ path: ~/tmux-builds/tmux-${{ matrix.tmux-version }}
42
+ key: tmux-${{ matrix.tmux-version }}
43
+
44
+ - name: Build tmux ${{ matrix.tmux-version }}
45
+ if: steps.tmux-build-cache.outputs.cache-hit != 'true'
46
+ run: |
47
+ sudo apt install libevent-dev libncurses5-dev libtinfo-dev libutempter-dev bison
48
+ mkdir ~/tmux-builds
49
+ mkdir ~/tmux-src
50
+ git clone https://github.com/tmux/tmux.git ~/tmux-src/tmux-${{ matrix.tmux-version }}
51
+ cd ~/tmux-src/tmux-${{ matrix.tmux-version }}
52
+ git checkout ${{ matrix.tmux-version }}
53
+ sh autogen.sh
54
+ ./configure --prefix=$HOME/tmux-builds/tmux-${{ matrix.tmux-version }} && make && make install
55
+ export PATH=$HOME/tmux-builds/tmux-${{ matrix.tmux-version }}/bin:$PATH
56
+ cd ~
57
+ tmux -V
58
+
59
+ - name: Lint with ruff check
60
+ run: uv run ruff check .
61
+
62
+ - name: Format with ruff format
63
+ run: uv run ruff format . --check
64
+
65
+ - name: Lint with mypy
66
+ run: uv run mypy .
67
+
68
+ - name: Print python versions
69
+ run: |
70
+ python -V
71
+ uv run python -V
72
+
73
+ - name: Test with pytest
74
+ continue-on-error: ${{ matrix.tmux-version == 'master' }}
75
+ run: |
76
+ sudo apt install libevent-2.1-7
77
+ export PATH=$HOME/tmux-builds/tmux-${{ matrix.tmux-version }}/bin:$PATH
78
+ ls $HOME/tmux-builds/tmux-${{ matrix.tmux-version }}/bin
79
+ tmux -V
80
+ uv run py.test --cov=./ --cov-append --cov-report=xml -n auto --verbose
81
+ env:
82
+ COV_CORE_SOURCE: .
83
+ COV_CORE_CONFIG: .coveragerc
84
+ COV_CORE_DATAFILE: .coverage.eager
85
+ - uses: codecov/codecov-action@v5
86
+ with:
87
+ token: ${{ secrets.CODECOV_TOKEN }}
88
+
89
+ release:
90
+ runs-on: ubuntu-latest
91
+ needs: build
92
+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
93
+ permissions:
94
+ id-token: write # Required for OIDC trusted publishing
95
+ attestations: write # Required for generating attestations
96
+
97
+ strategy:
98
+ matrix:
99
+ python-version: ['3.14']
100
+
101
+ steps:
102
+ - uses: actions/checkout@v6
103
+
104
+ - name: Install uv
105
+ uses: astral-sh/setup-uv@v7
106
+ with:
107
+ enable-cache: true
108
+
109
+ - name: Set up Python ${{ matrix.python-version }}
110
+ run: uv python install ${{ matrix.python-version }}
111
+
112
+ - name: Install dependencies
113
+ run: uv sync --all-extras --dev
114
+
115
+ - name: Build package
116
+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
117
+ run: uv build
118
+
119
+ - name: Publish package
120
+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
121
+ uses: pypa/gh-action-pypi-publish@release/v1
122
+ with:
123
+ attestations: true
124
+ skip-existing: true
@@ -0,0 +1,207 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py.cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ #uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ #poetry.lock
109
+ #poetry.toml
110
+
111
+ # pdm
112
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
114
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
115
+ #pdm.lock
116
+ #pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # pixi
121
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
122
+ #pixi.lock
123
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
124
+ # in the .venv directory. It is recommended not to include this directory in version control.
125
+ .pixi
126
+
127
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
128
+ __pypackages__/
129
+
130
+ # Celery stuff
131
+ celerybeat-schedule
132
+ celerybeat.pid
133
+
134
+ # SageMath parsed files
135
+ *.sage.py
136
+
137
+ # Environments
138
+ .env
139
+ .envrc
140
+ .venv
141
+ env/
142
+ venv/
143
+ ENV/
144
+ env.bak/
145
+ venv.bak/
146
+
147
+ # Spyder project settings
148
+ .spyderproject
149
+ .spyproject
150
+
151
+ # Rope project settings
152
+ .ropeproject
153
+
154
+ # mkdocs documentation
155
+ /site
156
+
157
+ # mypy
158
+ .mypy_cache/
159
+ .dmypy.json
160
+ dmypy.json
161
+
162
+ # Pyre type checker
163
+ .pyre/
164
+
165
+ # pytype static type analyzer
166
+ .pytype/
167
+
168
+ # Cython debug symbols
169
+ cython_debug/
170
+
171
+ # PyCharm
172
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
173
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
174
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
175
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
176
+ #.idea/
177
+
178
+ # Abstra
179
+ # Abstra is an AI-powered process automation framework.
180
+ # Ignore directories containing user credentials, local state, and settings.
181
+ # Learn more at https://abstra.io/docs
182
+ .abstra/
183
+
184
+ # Visual Studio Code
185
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
186
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
187
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
188
+ # you could uncomment the following to ignore the entire vscode folder
189
+ # .vscode/
190
+
191
+ # Ruff stuff:
192
+ .ruff_cache/
193
+
194
+ # PyPI configuration file
195
+ .pypirc
196
+
197
+ # Cursor
198
+ # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
199
+ # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
200
+ # refer to https://docs.cursor.com/context/ignore-files
201
+ .cursorignore
202
+ .cursorindexingignore
203
+
204
+ # Marimo
205
+ marimo/_static/
206
+ marimo/_lsp/
207
+ __marimo__/
@@ -0,0 +1,3 @@
1
+ {
2
+ "printWidth": 100
3
+ }
@@ -0,0 +1,3 @@
1
+ just 1.47
2
+ uv 0.10.12
3
+ python 3.14 3.13 3.12 3.11 3.10