linux-mcp-server 0.1.0.dev0__tar.gz → 1.0.0__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.
- linux_mcp_server-1.0.0/.codecov.yml +38 -0
- linux_mcp_server-1.0.0/.coderabbit.yaml +111 -0
- linux_mcp_server-1.0.0/.devcontainer/Containerfile +22 -0
- linux_mcp_server-1.0.0/.devcontainer/devcontainer.json +47 -0
- linux_mcp_server-1.0.0/.github/workflows/build-publish.yml +75 -0
- linux_mcp_server-1.0.0/.github/workflows/ci.yml +124 -0
- linux_mcp_server-1.0.0/.github/workflows/ci_installation.yaml +67 -0
- linux_mcp_server-1.0.0/.github/workflows/docs.yml +63 -0
- {linux_mcp_server-0.1.0.dev0 → linux_mcp_server-1.0.0}/.gitignore +10 -0
- linux_mcp_server-1.0.0/.tekton/pipeline-build-multiarch.yaml +740 -0
- linux_mcp_server-1.0.0/.tekton/pull_request.yaml +52 -0
- linux_mcp_server-1.0.0/.tekton/push.yaml +55 -0
- linux_mcp_server-1.0.0/.tekton/task-get-version.yaml +61 -0
- linux_mcp_server-1.0.0/AGENTS.md +54 -0
- linux_mcp_server-1.0.0/Containerfile +89 -0
- linux_mcp_server-1.0.0/LICENSE +201 -0
- linux_mcp_server-1.0.0/Makefile +56 -0
- linux_mcp_server-1.0.0/PKG-INFO +64 -0
- linux_mcp_server-1.0.0/README.md +33 -0
- linux_mcp_server-1.0.0/docs/api/audit.md +6 -0
- linux_mcp_server-1.0.0/docs/api/commands.md +6 -0
- linux_mcp_server-1.0.0/docs/api/config.md +6 -0
- linux_mcp_server-1.0.0/docs/api/connection.md +6 -0
- linux_mcp_server-1.0.0/docs/api/formatters.md +6 -0
- linux_mcp_server-1.0.0/docs/api/index.md +29 -0
- linux_mcp_server-1.0.0/docs/api/parsers.md +6 -0
- linux_mcp_server-1.0.0/docs/api/server.md +6 -0
- linux_mcp_server-1.0.0/docs/api/tools/logs.md +6 -0
- linux_mcp_server-1.0.0/docs/api/tools/network.md +6 -0
- linux_mcp_server-1.0.0/docs/api/tools/processes.md +6 -0
- linux_mcp_server-1.0.0/docs/api/tools/services.md +6 -0
- linux_mcp_server-1.0.0/docs/api/tools/storage.md +6 -0
- linux_mcp_server-1.0.0/docs/api/tools/system_info.md +6 -0
- linux_mcp_server-1.0.0/docs/architecture.md +56 -0
- linux_mcp_server-1.0.0/docs/cheatsheet.md +52 -0
- linux_mcp_server-1.0.0/docs/clients.md +637 -0
- linux_mcp_server-1.0.0/docs/contributing.md +408 -0
- linux_mcp_server-0.1.0.dev0/DEBUGGING.md → linux_mcp_server-1.0.0/docs/debugging.md +11 -31
- {linux_mcp_server-0.1.0.dev0 → linux_mcp_server-1.0.0/docs/examples}/claude_desktop_config.example.json +2 -7
- {linux_mcp_server-0.1.0.dev0 → linux_mcp_server-1.0.0/docs/examples}/example_config.sh +6 -3
- linux_mcp_server-1.0.0/docs/getting-started.md +84 -0
- linux_mcp_server-1.0.0/docs/index.md +119 -0
- linux_mcp_server-1.0.0/docs/install.md +474 -0
- linux_mcp_server-1.0.0/docs/troubleshooting.md +340 -0
- linux_mcp_server-0.1.0.dev0/USAGE.md → linux_mcp_server-1.0.0/docs/usage.md +54 -121
- linux_mcp_server-1.0.0/licenses/GPL-3.0.txt +674 -0
- linux_mcp_server-1.0.0/mkdocs.yml +103 -0
- linux_mcp_server-1.0.0/pyproject.toml +183 -0
- linux_mcp_server-1.0.0/renovate.json +4 -0
- linux_mcp_server-1.0.0/scripts/verify_installation.sh +61 -0
- linux_mcp_server-1.0.0/src/linux_mcp_server/__init__.py +8 -0
- {linux_mcp_server-0.1.0.dev0 → linux_mcp_server-1.0.0}/src/linux_mcp_server/__main__.py +8 -8
- linux_mcp_server-1.0.0/src/linux_mcp_server/_vendor/__init__.py +53 -0
- linux_mcp_server-1.0.0/src/linux_mcp_server/audit.py +330 -0
- linux_mcp_server-1.0.0/src/linux_mcp_server/commands.py +341 -0
- linux_mcp_server-1.0.0/src/linux_mcp_server/config.py +44 -0
- linux_mcp_server-1.0.0/src/linux_mcp_server/connection/__init__.py +0 -0
- linux_mcp_server-1.0.0/src/linux_mcp_server/connection/ssh.py +472 -0
- linux_mcp_server-1.0.0/src/linux_mcp_server/formatters.py +545 -0
- {linux_mcp_server-0.1.0.dev0 → linux_mcp_server-1.0.0}/src/linux_mcp_server/logging_config.py +81 -57
- linux_mcp_server-1.0.0/src/linux_mcp_server/parsers.py +550 -0
- linux_mcp_server-1.0.0/src/linux_mcp_server/server.py +18 -0
- linux_mcp_server-1.0.0/src/linux_mcp_server/tools/__init__.py +55 -0
- linux_mcp_server-1.0.0/src/linux_mcp_server/tools/logs.py +193 -0
- linux_mcp_server-1.0.0/src/linux_mcp_server/tools/network.py +111 -0
- linux_mcp_server-1.0.0/src/linux_mcp_server/tools/processes.py +85 -0
- linux_mcp_server-1.0.0/src/linux_mcp_server/tools/services.py +132 -0
- linux_mcp_server-1.0.0/src/linux_mcp_server/tools/storage.py +247 -0
- linux_mcp_server-1.0.0/src/linux_mcp_server/tools/system_info.py +172 -0
- linux_mcp_server-1.0.0/src/linux_mcp_server/utils/__init__.py +3 -0
- linux_mcp_server-1.0.0/src/linux_mcp_server/utils/decorators.py +64 -0
- linux_mcp_server-1.0.0/src/linux_mcp_server/utils/enum.py +16 -0
- linux_mcp_server-1.0.0/src/linux_mcp_server/utils/format.py +61 -0
- linux_mcp_server-1.0.0/src/linux_mcp_server/utils/types.py +130 -0
- linux_mcp_server-1.0.0/src/linux_mcp_server/utils/validation.py +23 -0
- linux_mcp_server-1.0.0/tests/__init__.py +0 -0
- linux_mcp_server-1.0.0/tests/_vendor/__init__.py +0 -0
- linux_mcp_server-1.0.0/tests/_vendor/test_vendor.py +56 -0
- linux_mcp_server-1.0.0/tests/conftest.py +75 -0
- linux_mcp_server-1.0.0/tests/connection/__init__.py +0 -0
- linux_mcp_server-1.0.0/tests/connection/ssh/__init__.py +0 -0
- linux_mcp_server-1.0.0/tests/connection/ssh/test_connection_manager.py +156 -0
- linux_mcp_server-1.0.0/tests/connection/ssh/test_discover_ssh_key.py +72 -0
- linux_mcp_server-1.0.0/tests/connection/ssh/test_execute_command.py +40 -0
- linux_mcp_server-1.0.0/tests/connection/ssh/test_get_bin_path.py +27 -0
- linux_mcp_server-1.0.0/tests/connection/ssh/test_host_key_verification.py +83 -0
- linux_mcp_server-1.0.0/tests/connection/ssh/test_timeout.py +113 -0
- linux_mcp_server-1.0.0/tests/parsers/__init__.py +0 -0
- linux_mcp_server-1.0.0/tests/parsers/test_parse_cpu_info.py +33 -0
- linux_mcp_server-1.0.0/tests/parsers/test_parse_free_output.py +32 -0
- linux_mcp_server-1.0.0/tests/parsers/test_parse_ip_brief.py +27 -0
- linux_mcp_server-1.0.0/tests/parsers/test_parse_listing.py +83 -0
- linux_mcp_server-1.0.0/tests/parsers/test_parse_os_release.py +27 -0
- linux_mcp_server-1.0.0/tests/parsers/test_parse_proc.py +62 -0
- linux_mcp_server-1.0.0/tests/parsers/test_parse_ps_output.py +58 -0
- linux_mcp_server-1.0.0/tests/parsers/test_parse_service_count.py +33 -0
- linux_mcp_server-1.0.0/tests/parsers/test_parse_ss.py +74 -0
- linux_mcp_server-1.0.0/tests/parsers/test_parse_system_info.py +30 -0
- linux_mcp_server-1.0.0/tests/test__main__.py +14 -0
- {linux_mcp_server-0.1.0.dev0 → linux_mcp_server-1.0.0}/tests/test_audit.py +103 -150
- linux_mcp_server-1.0.0/tests/test_commands.py +120 -0
- linux_mcp_server-1.0.0/tests/test_config.py +257 -0
- linux_mcp_server-1.0.0/tests/test_formatters.py +575 -0
- {linux_mcp_server-0.1.0.dev0 → linux_mcp_server-1.0.0}/tests/test_logging_config.py +70 -95
- linux_mcp_server-1.0.0/tests/test_server.py +34 -0
- linux_mcp_server-1.0.0/tests/tools/__init__.py +0 -0
- linux_mcp_server-1.0.0/tests/tools/test_logs.py +463 -0
- linux_mcp_server-1.0.0/tests/tools/test_network.py +223 -0
- linux_mcp_server-1.0.0/tests/tools/test_processes.py +175 -0
- linux_mcp_server-1.0.0/tests/tools/test_services.py +112 -0
- linux_mcp_server-1.0.0/tests/tools/test_storage.py +475 -0
- linux_mcp_server-1.0.0/tests/tools/test_system_info.py +86 -0
- linux_mcp_server-1.0.0/tests/utils/__init__.py +0 -0
- linux_mcp_server-1.0.0/tests/utils/test_decorators.py +56 -0
- linux_mcp_server-1.0.0/tests/utils/test_enum.py +24 -0
- linux_mcp_server-1.0.0/tests/utils/test_format.py +68 -0
- linux_mcp_server-1.0.0/tests/utils/test_validation.py +69 -0
- linux_mcp_server-1.0.0/uv.lock +2787 -0
- linux_mcp_server-0.1.0.dev0/.python-version +0 -1
- linux_mcp_server-0.1.0.dev0/CONTRIBUTING.md +0 -350
- linux_mcp_server-0.1.0.dev0/LICENSE +0 -21
- linux_mcp_server-0.1.0.dev0/PKG-INFO +0 -331
- linux_mcp_server-0.1.0.dev0/README.md +0 -316
- linux_mcp_server-0.1.0.dev0/pyproject.toml +0 -49
- linux_mcp_server-0.1.0.dev0/src/linux_mcp_server/__init__.py +0 -4
- linux_mcp_server-0.1.0.dev0/src/linux_mcp_server/audit.py +0 -285
- linux_mcp_server-0.1.0.dev0/src/linux_mcp_server/server.py +0 -328
- linux_mcp_server-0.1.0.dev0/src/linux_mcp_server/tools/__init__.py +0 -2
- linux_mcp_server-0.1.0.dev0/src/linux_mcp_server/tools/logs.py +0 -225
- linux_mcp_server-0.1.0.dev0/src/linux_mcp_server/tools/network.py +0 -281
- linux_mcp_server-0.1.0.dev0/src/linux_mcp_server/tools/processes.py +0 -257
- linux_mcp_server-0.1.0.dev0/src/linux_mcp_server/tools/services.py +0 -147
- linux_mcp_server-0.1.0.dev0/src/linux_mcp_server/tools/ssh_executor.py +0 -324
- linux_mcp_server-0.1.0.dev0/src/linux_mcp_server/tools/storage.py +0 -358
- linux_mcp_server-0.1.0.dev0/src/linux_mcp_server/tools/system_info.py +0 -507
- linux_mcp_server-0.1.0.dev0/src/linux_mcp_server/tools/utils.py +0 -27
- linux_mcp_server-0.1.0.dev0/src/linux_mcp_server/tools/validation.py +0 -58
- linux_mcp_server-0.1.0.dev0/tests/__init__.py +0 -2
- linux_mcp_server-0.1.0.dev0/tests/test_processes.py +0 -56
- linux_mcp_server-0.1.0.dev0/tests/test_server.py +0 -49
- linux_mcp_server-0.1.0.dev0/tests/test_services.py +0 -115
- linux_mcp_server-0.1.0.dev0/tests/test_ssh_executor.py +0 -358
- linux_mcp_server-0.1.0.dev0/tests/test_storage.py +0 -383
- linux_mcp_server-0.1.0.dev0/tests/test_system_info.py +0 -83
- linux_mcp_server-0.1.0.dev0/tests/test_validation.py +0 -165
- linux_mcp_server-0.1.0.dev0/uv.lock +0 -1001
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
codecov:
|
|
2
|
+
notify:
|
|
3
|
+
after_n_builds: 6
|
|
4
|
+
wait_for_ci: false
|
|
5
|
+
|
|
6
|
+
require_ci_to_pass: false
|
|
7
|
+
token: 74bc381b-9c5f-44c1-9efa-af57d5f3fe50 # notsecret # repo-scoped, upload-only, stability in fork PRs
|
|
8
|
+
|
|
9
|
+
coverage:
|
|
10
|
+
range: 40..100
|
|
11
|
+
status:
|
|
12
|
+
project:
|
|
13
|
+
default:
|
|
14
|
+
target: 60%
|
|
15
|
+
threshold: 10%
|
|
16
|
+
app:
|
|
17
|
+
target: 60%
|
|
18
|
+
threshold: 10%
|
|
19
|
+
paths:
|
|
20
|
+
- src/
|
|
21
|
+
tests:
|
|
22
|
+
target: 100%
|
|
23
|
+
paths:
|
|
24
|
+
- tests/
|
|
25
|
+
|
|
26
|
+
patch:
|
|
27
|
+
default:
|
|
28
|
+
target: 95%
|
|
29
|
+
threshold: 10%
|
|
30
|
+
app:
|
|
31
|
+
target: 95%
|
|
32
|
+
threshold: 10%
|
|
33
|
+
paths:
|
|
34
|
+
- src/
|
|
35
|
+
tests:
|
|
36
|
+
target: 100%
|
|
37
|
+
paths:
|
|
38
|
+
- tests/
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# CodeRabbit Configuration for linux-mcp-server
|
|
2
|
+
# Docs: https://docs.coderabbit.ai/configuration/
|
|
3
|
+
|
|
4
|
+
language: en-US
|
|
5
|
+
tone_instructions: >
|
|
6
|
+
You are a brilliant but world-weary senior developer who has seen too much.
|
|
7
|
+
Deliver feedback with dry wit and gentle sarcasm, but always be helpful.
|
|
8
|
+
Use programming puns when the opportunity arises.
|
|
9
|
+
|
|
10
|
+
reviews:
|
|
11
|
+
profile: chill
|
|
12
|
+
collapse_walkthrough: true
|
|
13
|
+
poem: false
|
|
14
|
+
request_changes_workflow: false
|
|
15
|
+
high_level_summary: false
|
|
16
|
+
high_level_summary_placeholder: "@coderabbitai summary"
|
|
17
|
+
abort_on_close: true
|
|
18
|
+
review_status: false
|
|
19
|
+
|
|
20
|
+
auto_review:
|
|
21
|
+
enabled: false
|
|
22
|
+
drafts: false
|
|
23
|
+
base_branches:
|
|
24
|
+
- main
|
|
25
|
+
ignore_title_keywords:
|
|
26
|
+
- "WIP"
|
|
27
|
+
- "[WIP]"
|
|
28
|
+
- "DO NOT MERGE"
|
|
29
|
+
|
|
30
|
+
path_filters:
|
|
31
|
+
- "!**/__pycache__/**"
|
|
32
|
+
- "!**/.venv/**"
|
|
33
|
+
- "!**/.pytest_cache/**"
|
|
34
|
+
- "!**/.ruff_cache/**"
|
|
35
|
+
- "!**/dist/**"
|
|
36
|
+
- "!**/*.egg-info/**"
|
|
37
|
+
- "!**/htmlcov/**"
|
|
38
|
+
- "!**/.coverage"
|
|
39
|
+
- "!**/uv.lock"
|
|
40
|
+
|
|
41
|
+
path_instructions:
|
|
42
|
+
- path: "src/**/*.py"
|
|
43
|
+
# NOTE(major): Adjust the read-only line at the top when
|
|
44
|
+
# write operations are allowed.
|
|
45
|
+
instructions: |
|
|
46
|
+
Focus on security and architecture:
|
|
47
|
+
- CRITICAL: All operations MUST be read-only. Flag any write operations.
|
|
48
|
+
- Check for TOCTOU race conditions (use try-except, not check-then-use)
|
|
49
|
+
- psutil exceptions pattern: except (psutil.NoSuchProcess, psutil.AccessDenied)
|
|
50
|
+
- Verify async/await patterns (no blocking calls in async functions)
|
|
51
|
+
- Ensure proper exception handling with graceful degradation
|
|
52
|
+
- Error messages must be clear enough for LLMs to understand and act on
|
|
53
|
+
- Check input validation before shell commands (command injection)
|
|
54
|
+
- Verify MCP decorator order: @mcp.tool, @log_tool_call, @disallow_local_execution_in_containers
|
|
55
|
+
- Host parameter pattern: host: Host | None = None (supports local and remote)
|
|
56
|
+
- Resource cleanup: Verify SSH connections use context managers
|
|
57
|
+
- Timeout handling: All network/SSH operations must have timeouts
|
|
58
|
+
- Container safety: Flag operations that won't work in containers without explicit checks
|
|
59
|
+
- Don't nitpick style (ruff handles) or types (pyright validates)
|
|
60
|
+
|
|
61
|
+
- path: "src/**/config.py"
|
|
62
|
+
instructions: |
|
|
63
|
+
Configuration validation:
|
|
64
|
+
- Centralize derived config logic (defaults, path resolution) in config class
|
|
65
|
+
- Validate environment variables at startup, not lazily
|
|
66
|
+
- Check for secure defaults
|
|
67
|
+
|
|
68
|
+
- path: "src/**/connection/*.py"
|
|
69
|
+
instructions: |
|
|
70
|
+
SSH/connection handling:
|
|
71
|
+
- All SSH operations must have timeouts
|
|
72
|
+
- Prefer library-native async features (asyncssh timeout param) over wrappers (asyncio.wait_for)
|
|
73
|
+
- Connection errors must include host information for debugging
|
|
74
|
+
- Resource cleanup: Use context managers for all connections
|
|
75
|
+
- Key handling: No plaintext passwords, only key-based auth
|
|
76
|
+
|
|
77
|
+
- path: "tests/**/*.py"
|
|
78
|
+
instructions: |
|
|
79
|
+
Focus on test quality and meaningfulness:
|
|
80
|
+
- Tests should verify behavior, not just chase coverage. A test that doesn't assert meaningful outcomes is worse than no test.
|
|
81
|
+
- Prefer parameterized tests over duplicate test functions
|
|
82
|
+
- Mock specs should be provided: AsyncMock(spec=SomeClass)
|
|
83
|
+
- Use pytest.raises with nullcontext() pattern, not boolean flags
|
|
84
|
+
- Use fixtures for reusable test components, not helper functions
|
|
85
|
+
- Check for edge cases: process disappearing, permission denied, empty output
|
|
86
|
+
- Verify both local (psutil) and remote (SSH) code paths tested
|
|
87
|
+
- Don't nitpick coverage percentages (CI enforces 70%+ overall, 100% patch)
|
|
88
|
+
|
|
89
|
+
- path: "pyproject.toml"
|
|
90
|
+
instructions: |
|
|
91
|
+
Check dependency versions and configuration consistency.
|
|
92
|
+
Dev tools: uv (package manager), ruff (linting/formatting), pyright (type checking), pytest (testing).
|
|
93
|
+
|
|
94
|
+
- path: ".github/workflows/**"
|
|
95
|
+
instructions: "Validate workflow syntax and security (no secrets in logs)"
|
|
96
|
+
|
|
97
|
+
- path: "Makefile"
|
|
98
|
+
instructions: |
|
|
99
|
+
Makefile validation:
|
|
100
|
+
- .PHONY declarations for all non-file targets
|
|
101
|
+
- Avoid flags that are already defaults
|
|
102
|
+
|
|
103
|
+
- path: "Containerfile"
|
|
104
|
+
instructions: "Use Podman + Containerfile conventions (not Docker + Dockerfile)"
|
|
105
|
+
|
|
106
|
+
chat:
|
|
107
|
+
auto_reply: true
|
|
108
|
+
|
|
109
|
+
knowledge_base:
|
|
110
|
+
learnings:
|
|
111
|
+
scope: global
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
FROM quay.io/fedora/fedora:43
|
|
2
|
+
|
|
3
|
+
ENV UV_LINK_MODE=copy
|
|
4
|
+
ENV UV_COMPILE_BYTECODE=1
|
|
5
|
+
ENV SHELL=/usr/bin/fish
|
|
6
|
+
|
|
7
|
+
RUN dnf install -y \
|
|
8
|
+
python3 \
|
|
9
|
+
python3-pip \
|
|
10
|
+
git \
|
|
11
|
+
make \
|
|
12
|
+
fish \
|
|
13
|
+
sudo \
|
|
14
|
+
&& dnf clean all
|
|
15
|
+
|
|
16
|
+
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
|
|
17
|
+
|
|
18
|
+
# Create vscode user with sudo access and fish shell
|
|
19
|
+
RUN useradd -m -s /usr/bin/fish vscode && \
|
|
20
|
+
echo "vscode ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/vscode
|
|
21
|
+
|
|
22
|
+
WORKDIR /workspace
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/refs/heads/main/schemas/devContainer.schema.json",
|
|
3
|
+
"name": "linux-mcp-server",
|
|
4
|
+
"build": {
|
|
5
|
+
"dockerfile": "Containerfile",
|
|
6
|
+
"context": "."
|
|
7
|
+
},
|
|
8
|
+
// Podman-specific: keep UID/GID mapping for rootless containers
|
|
9
|
+
"runArgs": [
|
|
10
|
+
"--userns=keep-id",
|
|
11
|
+
"--security-opt=label=disable"
|
|
12
|
+
],
|
|
13
|
+
"containerUser": "vscode",
|
|
14
|
+
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,Z",
|
|
15
|
+
"workspaceFolder": "/workspace",
|
|
16
|
+
"postCreateCommand": "make sync",
|
|
17
|
+
"customizations": {
|
|
18
|
+
"vscode": {
|
|
19
|
+
"extensions": [
|
|
20
|
+
"charliermarsh.ruff",
|
|
21
|
+
"github.vscode-github-actions",
|
|
22
|
+
"github.vscode-pull-request-github",
|
|
23
|
+
"ms-python.debugpy",
|
|
24
|
+
"ms-python.python",
|
|
25
|
+
"ms-python.vscode-pylance"
|
|
26
|
+
],
|
|
27
|
+
"settings": {
|
|
28
|
+
"python.defaultInterpreterPath": "/workspace/.venv/bin/python",
|
|
29
|
+
"python.terminal.activateEnvironment": true,
|
|
30
|
+
"editor.formatOnSave": true,
|
|
31
|
+
"terminal.integrated.defaultProfile.linux": "fish",
|
|
32
|
+
"terminal.integrated.profiles.linux": {
|
|
33
|
+
"fish": {
|
|
34
|
+
"path": "/usr/bin/fish"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"[python]": {
|
|
38
|
+
"editor.defaultFormatter": "charliermarsh.ruff",
|
|
39
|
+
"editor.codeActionsOnSave": {
|
|
40
|
+
"source.fixAll": "explicit",
|
|
41
|
+
"source.organizeImports": "explicit"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
name: Build and publish
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
tags:
|
|
5
|
+
- '*'
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
name: Build sdist and wheel
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- name: Checkout
|
|
17
|
+
uses: actions/checkout@v6.0.1
|
|
18
|
+
with:
|
|
19
|
+
fetch-depth: 0
|
|
20
|
+
|
|
21
|
+
- name: Show environment
|
|
22
|
+
run: |
|
|
23
|
+
set -x
|
|
24
|
+
python -VV
|
|
25
|
+
python -m site
|
|
26
|
+
ls -ld $(python -c "import site; print(site.getsitepackages()[0])")
|
|
27
|
+
git tag --list --sort=-refname --format='%(refname:short) %(objectname:short)'
|
|
28
|
+
whoami
|
|
29
|
+
|
|
30
|
+
- name: Install build tools
|
|
31
|
+
run: |
|
|
32
|
+
python -m pip install --upgrade pip
|
|
33
|
+
python -m pip install build
|
|
34
|
+
|
|
35
|
+
- name: Build
|
|
36
|
+
run: python -m build --sdist --wheel
|
|
37
|
+
|
|
38
|
+
- name: Upload artifacts
|
|
39
|
+
uses: actions/upload-artifact@v6.0.0
|
|
40
|
+
with:
|
|
41
|
+
name: artifacts
|
|
42
|
+
path: dist
|
|
43
|
+
if-no-files-found: error
|
|
44
|
+
|
|
45
|
+
publish:
|
|
46
|
+
name: Publish to PyPI
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
needs:
|
|
49
|
+
- build
|
|
50
|
+
|
|
51
|
+
environment:
|
|
52
|
+
name: pypi
|
|
53
|
+
url: https://pypi.org/p/linux-mcp-server
|
|
54
|
+
|
|
55
|
+
permissions:
|
|
56
|
+
id-token: write
|
|
57
|
+
|
|
58
|
+
steps:
|
|
59
|
+
- name: Download artifacts
|
|
60
|
+
uses: actions/download-artifact@v7.0.0
|
|
61
|
+
with:
|
|
62
|
+
name: artifacts
|
|
63
|
+
path: dist
|
|
64
|
+
|
|
65
|
+
- name: Show environment
|
|
66
|
+
run: |
|
|
67
|
+
set -x
|
|
68
|
+
python -VV
|
|
69
|
+
python -m site
|
|
70
|
+
ls -ld $(python -c "import site; print(site.getsitepackages()[0])")
|
|
71
|
+
ls -l dist/
|
|
72
|
+
whoami
|
|
73
|
+
|
|
74
|
+
- name: Publish to PyPI
|
|
75
|
+
uses: pypa/gh-action-pypi-publish@v1.13.0
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
pull_request:
|
|
9
|
+
branches:
|
|
10
|
+
- main
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
env:
|
|
16
|
+
PIP_DISABLE_PIP_VERSION_CHECK: 1
|
|
17
|
+
COVERAGE_IGOR_VERBOSE: 1
|
|
18
|
+
FORCE_COLOR: 1 # Get colored pytest output
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
sanity:
|
|
23
|
+
name: Sanity - ${{ matrix.test.name }}
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
|
|
26
|
+
strategy:
|
|
27
|
+
fail-fast: false
|
|
28
|
+
matrix:
|
|
29
|
+
test:
|
|
30
|
+
- name: Type
|
|
31
|
+
step_name: Check types
|
|
32
|
+
command: pyright
|
|
33
|
+
|
|
34
|
+
- name: Lint
|
|
35
|
+
step_name: Run lint
|
|
36
|
+
command: ruff check --diff
|
|
37
|
+
|
|
38
|
+
- name: Format
|
|
39
|
+
step_name: Run format check
|
|
40
|
+
command: ruff format --diff
|
|
41
|
+
|
|
42
|
+
steps:
|
|
43
|
+
- name: Checkout
|
|
44
|
+
uses: actions/checkout@v6.0.1
|
|
45
|
+
|
|
46
|
+
- name: Install Python
|
|
47
|
+
uses: actions/setup-python@v6.1.0
|
|
48
|
+
with:
|
|
49
|
+
python-version-file: pyproject.toml
|
|
50
|
+
|
|
51
|
+
- name: Install uv
|
|
52
|
+
uses: astral-sh/setup-uv@v7.1.6
|
|
53
|
+
with:
|
|
54
|
+
enable-cache: true
|
|
55
|
+
prune-cache: false
|
|
56
|
+
|
|
57
|
+
- name: Install dependencies
|
|
58
|
+
run: uv sync --locked --group lint
|
|
59
|
+
|
|
60
|
+
- name: "Show environment"
|
|
61
|
+
run: |
|
|
62
|
+
python -VV
|
|
63
|
+
python -m site
|
|
64
|
+
uv --version
|
|
65
|
+
env | sort
|
|
66
|
+
ls -ld $(python -c "import site; print(site.getsitepackages()[0])")
|
|
67
|
+
whoami
|
|
68
|
+
|
|
69
|
+
- name: ${{ matrix.test.step_name }}
|
|
70
|
+
run: uv run --locked ${{ matrix.test.command }}
|
|
71
|
+
|
|
72
|
+
tests:
|
|
73
|
+
name: Unit - ${{ matrix.python-version }}
|
|
74
|
+
runs-on: ubuntu-latest
|
|
75
|
+
|
|
76
|
+
strategy:
|
|
77
|
+
fail-fast: true
|
|
78
|
+
matrix:
|
|
79
|
+
python-version:
|
|
80
|
+
- "3.10"
|
|
81
|
+
- "3.11"
|
|
82
|
+
- "3.12"
|
|
83
|
+
- "3.13"
|
|
84
|
+
- "3.14"
|
|
85
|
+
- "3.14t"
|
|
86
|
+
|
|
87
|
+
steps:
|
|
88
|
+
- name: Checkout
|
|
89
|
+
uses: actions/checkout@v6.0.1
|
|
90
|
+
|
|
91
|
+
- name: Install Python
|
|
92
|
+
uses: actions/setup-python@v6.1.0
|
|
93
|
+
with:
|
|
94
|
+
python-version-file: pyproject.toml
|
|
95
|
+
|
|
96
|
+
- name: Install uv
|
|
97
|
+
uses: astral-sh/setup-uv@v7.1.6
|
|
98
|
+
with:
|
|
99
|
+
enable-cache: true
|
|
100
|
+
prune-cache: false
|
|
101
|
+
|
|
102
|
+
- name: Install dependencies
|
|
103
|
+
run: uv sync --locked --group test
|
|
104
|
+
|
|
105
|
+
- name: Show environment
|
|
106
|
+
run: |
|
|
107
|
+
set -x
|
|
108
|
+
python -VV
|
|
109
|
+
python -m site
|
|
110
|
+
uv --version
|
|
111
|
+
ls -ld $(python -c "import site; print(site.getsitepackages()[0])")
|
|
112
|
+
whoami
|
|
113
|
+
|
|
114
|
+
- name: Run tests
|
|
115
|
+
run: uv run --locked pytest --cov-report=xml
|
|
116
|
+
|
|
117
|
+
- name: Upload coverage report
|
|
118
|
+
uses: codecov/codecov-action@v5.5.2
|
|
119
|
+
with:
|
|
120
|
+
env_vars: OS,PYTHON
|
|
121
|
+
disable_search: true
|
|
122
|
+
files: coverage/coverage.xml
|
|
123
|
+
fail_ci_if_error: true
|
|
124
|
+
flags: unittests
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
name: Installation Validation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
paths:
|
|
8
|
+
- 'src/linux_mcp_server/**'
|
|
9
|
+
- 'scripts/verify_installation.sh'
|
|
10
|
+
|
|
11
|
+
pull_request:
|
|
12
|
+
branches:
|
|
13
|
+
- main
|
|
14
|
+
paths:
|
|
15
|
+
- 'src/linux_mcp_server/**'
|
|
16
|
+
- 'scripts/verify_installation.sh'
|
|
17
|
+
|
|
18
|
+
permissions:
|
|
19
|
+
contents: read
|
|
20
|
+
|
|
21
|
+
env:
|
|
22
|
+
PIP_DISABLE_PIP_VERSION_CHECK: 1
|
|
23
|
+
FORCE_COLOR: 1
|
|
24
|
+
|
|
25
|
+
jobs:
|
|
26
|
+
installation_qa:
|
|
27
|
+
name: Install QA - ${{ matrix.method }} - Py ${{ matrix.python-version }}
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
|
|
30
|
+
strategy:
|
|
31
|
+
fail-fast: false
|
|
32
|
+
matrix:
|
|
33
|
+
python-version:
|
|
34
|
+
- "3.10"
|
|
35
|
+
- "3.11"
|
|
36
|
+
- "3.12"
|
|
37
|
+
- "3.13"
|
|
38
|
+
- "3.14"
|
|
39
|
+
- "3.14t"
|
|
40
|
+
method:
|
|
41
|
+
- 'pip_user'
|
|
42
|
+
- 'uvx_run'
|
|
43
|
+
- 'uv_tool_run'
|
|
44
|
+
|
|
45
|
+
steps:
|
|
46
|
+
- name: Checkout Code
|
|
47
|
+
uses: actions/checkout@v6.0.1
|
|
48
|
+
|
|
49
|
+
- name: Install Python ${{ matrix.python-version }}
|
|
50
|
+
uses: actions/setup-python@v6.1.0
|
|
51
|
+
with:
|
|
52
|
+
python-version: ${{ matrix.python-version }}
|
|
53
|
+
|
|
54
|
+
- name: Install uv
|
|
55
|
+
uses: astral-sh/setup-uv@v7.1.6
|
|
56
|
+
with:
|
|
57
|
+
enable-cache: true
|
|
58
|
+
prune-cache: false
|
|
59
|
+
|
|
60
|
+
- name: Run Installation and Verification
|
|
61
|
+
shell: bash
|
|
62
|
+
env:
|
|
63
|
+
METHOD: ${{ matrix.method }}
|
|
64
|
+
UV_PYTHON: python
|
|
65
|
+
run: |
|
|
66
|
+
chmod +x scripts/verify_installation.sh
|
|
67
|
+
./scripts/verify_installation.sh
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
name: Documentation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
paths:
|
|
8
|
+
- "docs/**"
|
|
9
|
+
- "src/**"
|
|
10
|
+
- "mkdocs.yml"
|
|
11
|
+
- "pyproject.toml"
|
|
12
|
+
- ".github/workflows/docs.yml"
|
|
13
|
+
workflow_dispatch:
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
pages: write
|
|
18
|
+
id-token: write
|
|
19
|
+
|
|
20
|
+
concurrency:
|
|
21
|
+
group: pages
|
|
22
|
+
cancel-in-progress: false
|
|
23
|
+
|
|
24
|
+
jobs:
|
|
25
|
+
build:
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
steps:
|
|
28
|
+
- name: Checkout
|
|
29
|
+
uses: actions/checkout@v6.0.1
|
|
30
|
+
|
|
31
|
+
- name: Install Python
|
|
32
|
+
uses: actions/setup-python@v6.1.0
|
|
33
|
+
with:
|
|
34
|
+
python-version-file: pyproject.toml
|
|
35
|
+
|
|
36
|
+
- name: Install uv
|
|
37
|
+
uses: astral-sh/setup-uv@v7.1.6
|
|
38
|
+
with:
|
|
39
|
+
enable-cache: true
|
|
40
|
+
prune-cache: false
|
|
41
|
+
|
|
42
|
+
- name: Install dependencies
|
|
43
|
+
run: uv sync --locked --group docs
|
|
44
|
+
|
|
45
|
+
- name: Build documentation
|
|
46
|
+
run: uv run --locked mkdocs build --strict
|
|
47
|
+
|
|
48
|
+
- name: Upload artifact
|
|
49
|
+
uses: actions/upload-pages-artifact@v4.0.0
|
|
50
|
+
with:
|
|
51
|
+
path: site
|
|
52
|
+
|
|
53
|
+
deploy:
|
|
54
|
+
if: github.event.repository.fork == false
|
|
55
|
+
environment:
|
|
56
|
+
name: github-pages
|
|
57
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
58
|
+
runs-on: ubuntu-latest
|
|
59
|
+
needs: build
|
|
60
|
+
steps:
|
|
61
|
+
- name: Deploy to GitHub Pages
|
|
62
|
+
id: deployment
|
|
63
|
+
uses: actions/deploy-pages@v4.0.5
|
|
@@ -20,6 +20,10 @@ wheels/
|
|
|
20
20
|
.installed.cfg
|
|
21
21
|
*.egg
|
|
22
22
|
|
|
23
|
+
# Vendored packages
|
|
24
|
+
src/linux_mcp_server/_vendor/*
|
|
25
|
+
!src/linux_mcp_server/_vendor/__init__.py
|
|
26
|
+
|
|
23
27
|
# Virtual environments
|
|
24
28
|
.venv/
|
|
25
29
|
venv/
|
|
@@ -29,9 +33,13 @@ env/
|
|
|
29
33
|
# Testing
|
|
30
34
|
.pytest_cache/
|
|
31
35
|
.coverage
|
|
36
|
+
coverage/
|
|
32
37
|
htmlcov/
|
|
33
38
|
.tox/
|
|
34
39
|
|
|
40
|
+
# Documentation build
|
|
41
|
+
site/
|
|
42
|
+
|
|
35
43
|
# IDEs
|
|
36
44
|
.vscode/
|
|
37
45
|
.idea/
|
|
@@ -49,3 +57,5 @@ Thumbs.db
|
|
|
49
57
|
# Configuration files (user-specific)
|
|
50
58
|
config.sh
|
|
51
59
|
|
|
60
|
+
.claude/settings.local.json
|
|
61
|
+
CLAUDE.local.md
|