mcpolish 0.1.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.
- mcpolish-0.1.0/.github/workflows/ci.yml +28 -0
- mcpolish-0.1.0/.github/workflows/publish.yml +148 -0
- mcpolish-0.1.0/.gitignore +69 -0
- mcpolish-0.1.0/.pre-commit-hooks.yaml +8 -0
- mcpolish-0.1.0/.python-version +1 -0
- mcpolish-0.1.0/CODE_OF_CONDUCT.md +75 -0
- mcpolish-0.1.0/CONTRIBUTING.md +133 -0
- mcpolish-0.1.0/LICENSE +201 -0
- mcpolish-0.1.0/MCPOLISH.md +844 -0
- mcpolish-0.1.0/PKG-INFO +279 -0
- mcpolish-0.1.0/README.md +246 -0
- mcpolish-0.1.0/SECURITY.md +55 -0
- mcpolish-0.1.0/VERIFICATION.md +188 -0
- mcpolish-0.1.0/action.yml +62 -0
- mcpolish-0.1.0/docs/concepts/glossary.md +151 -0
- mcpolish-0.1.0/docs/concepts/how-scoring-works.md +147 -0
- mcpolish-0.1.0/docs/concepts/the-rule-system.md +144 -0
- mcpolish-0.1.0/docs/concepts/what-is-a-linter.md +89 -0
- mcpolish-0.1.0/docs/concepts/what-is-mcp.md +104 -0
- mcpolish-0.1.0/docs/concepts/what-mcpolish-checks.md +108 -0
- mcpolish-0.1.0/docs/getting-started/installation.md +111 -0
- mcpolish-0.1.0/docs/getting-started/quickstart.md +95 -0
- mcpolish-0.1.0/docs/getting-started/understanding-output.md +142 -0
- mcpolish-0.1.0/docs/getting-started/your-first-lint.md +149 -0
- mcpolish-0.1.0/docs/index.md +80 -0
- mcpolish-0.1.0/docs/methodology.md +83 -0
- mcpolish-0.1.0/docs/rules/MP001.md +90 -0
- mcpolish-0.1.0/docs/rules/MP002.md +78 -0
- mcpolish-0.1.0/docs/rules/MP003.md +85 -0
- mcpolish-0.1.0/docs/rules/MP004.md +96 -0
- mcpolish-0.1.0/docs/rules/MP005.md +93 -0
- mcpolish-0.1.0/docs/rules/MP010.md +86 -0
- mcpolish-0.1.0/docs/rules/MP011.md +99 -0
- mcpolish-0.1.0/docs/rules/MP012.md +91 -0
- mcpolish-0.1.0/docs/rules/MP013.md +83 -0
- mcpolish-0.1.0/docs/rules/MP014.md +80 -0
- mcpolish-0.1.0/docs/rules/MP020.md +76 -0
- mcpolish-0.1.0/docs/rules/MP021.md +62 -0
- mcpolish-0.1.0/docs/rules/MP022.md +99 -0
- mcpolish-0.1.0/docs/rules/MP023.md +82 -0
- mcpolish-0.1.0/docs/rules/MP024.md +75 -0
- mcpolish-0.1.0/docs/rules/MP025.md +86 -0
- mcpolish-0.1.0/docs/rules/MP026.md +99 -0
- mcpolish-0.1.0/docs/rules/MP030.md +101 -0
- mcpolish-0.1.0/docs/rules/MP031.md +93 -0
- mcpolish-0.1.0/docs/rules/MP032.md +98 -0
- mcpolish-0.1.0/docs/rules/MP033.md +89 -0
- mcpolish-0.1.0/docs/rules/MP040.md +85 -0
- mcpolish-0.1.0/docs/rules/MP041.md +84 -0
- mcpolish-0.1.0/docs/rules/index.md +71 -0
- mcpolish-0.1.0/docs/scenarios/ci-github.md +215 -0
- mcpolish-0.1.0/docs/scenarios/ci-gitlab.md +212 -0
- mcpolish-0.1.0/docs/scenarios/customizing-rules.md +222 -0
- mcpolish-0.1.0/docs/scenarios/enterprise-fleet.md +148 -0
- mcpolish-0.1.0/docs/scenarios/existing-project.md +159 -0
- mcpolish-0.1.0/docs/scenarios/huge-monorepo.md +145 -0
- mcpolish-0.1.0/docs/scenarios/multi-file-server.md +154 -0
- mcpolish-0.1.0/docs/scenarios/new-project.md +151 -0
- mcpolish-0.1.0/docs/scenarios/pre-commit-setup.md +168 -0
- mcpolish-0.1.0/docs/scenarios/silencing-false-positives.md +149 -0
- mcpolish-0.1.0/docs/scenarios/single-file-server.md +141 -0
- mcpolish-0.1.0/docs/scenarios/tool-constructor-server.md +151 -0
- mcpolish-0.1.0/docs/usage/autofix.md +166 -0
- mcpolish-0.1.0/docs/usage/cli-reference.md +169 -0
- mcpolish-0.1.0/docs/usage/configuration.md +171 -0
- mcpolish-0.1.0/docs/usage/llm-rules.md +155 -0
- mcpolish-0.1.0/docs/usage/output-formats.md +183 -0
- mcpolish-0.1.0/docs/usage/python-api.md +192 -0
- mcpolish-0.1.0/examples/clean_server.py +59 -0
- mcpolish-0.1.0/examples/lowlevel_server.py +36 -0
- mcpolish-0.1.0/examples/smelly_server.py +54 -0
- mcpolish-0.1.0/pyproject.toml +67 -0
- mcpolish-0.1.0/src/mcpolish/__init__.py +22 -0
- mcpolish-0.1.0/src/mcpolish/_version.py +1 -0
- mcpolish-0.1.0/src/mcpolish/api.py +91 -0
- mcpolish-0.1.0/src/mcpolish/cli/__init__.py +5 -0
- mcpolish-0.1.0/src/mcpolish/cli/doctor.py +40 -0
- mcpolish-0.1.0/src/mcpolish/cli/explain.py +41 -0
- mcpolish-0.1.0/src/mcpolish/cli/lint.py +135 -0
- mcpolish-0.1.0/src/mcpolish/cli/main.py +35 -0
- mcpolish-0.1.0/src/mcpolish/cli/score.py +44 -0
- mcpolish-0.1.0/src/mcpolish/config/__init__.py +5 -0
- mcpolish-0.1.0/src/mcpolish/config/loader.py +83 -0
- mcpolish-0.1.0/src/mcpolish/config/schema.py +5 -0
- mcpolish-0.1.0/src/mcpolish/discover/__init__.py +7 -0
- mcpolish-0.1.0/src/mcpolish/discover/base.py +22 -0
- mcpolish-0.1.0/src/mcpolish/discover/ir.py +87 -0
- mcpolish-0.1.0/src/mcpolish/discover/python_ast.py +424 -0
- mcpolish-0.1.0/src/mcpolish/exceptions.py +25 -0
- mcpolish-0.1.0/src/mcpolish/fix/__init__.py +9 -0
- mcpolish-0.1.0/src/mcpolish/fix/base.py +18 -0
- mcpolish-0.1.0/src/mcpolish/fix/engine.py +82 -0
- mcpolish-0.1.0/src/mcpolish/fix/strategies/__init__.py +8 -0
- mcpolish-0.1.0/src/mcpolish/fix/strategies/add_description_stub.py +73 -0
- mcpolish-0.1.0/src/mcpolish/fix/strategies/rename_redundant_prefix.py +41 -0
- mcpolish-0.1.0/src/mcpolish/integrations/__init__.py +1 -0
- mcpolish-0.1.0/src/mcpolish/integrations/pre_commit.py +23 -0
- mcpolish-0.1.0/src/mcpolish/llm/__init__.py +6 -0
- mcpolish-0.1.0/src/mcpolish/llm/cache.py +64 -0
- mcpolish-0.1.0/src/mcpolish/llm/client.py +154 -0
- mcpolish-0.1.0/src/mcpolish/logging.py +20 -0
- mcpolish-0.1.0/src/mcpolish/registry/__init__.py +5 -0
- mcpolish-0.1.0/src/mcpolish/registry/data/__init__.py +0 -0
- mcpolish-0.1.0/src/mcpolish/registry/data/snapshot.v1.json +59 -0
- mcpolish-0.1.0/src/mcpolish/registry/snapshot.py +86 -0
- mcpolish-0.1.0/src/mcpolish/report/__init__.py +35 -0
- mcpolish-0.1.0/src/mcpolish/report/base.py +42 -0
- mcpolish-0.1.0/src/mcpolish/report/gitlab.py +41 -0
- mcpolish-0.1.0/src/mcpolish/report/json_report.py +49 -0
- mcpolish-0.1.0/src/mcpolish/report/pr_comment.py +47 -0
- mcpolish-0.1.0/src/mcpolish/report/sarif.py +77 -0
- mcpolish-0.1.0/src/mcpolish/report/tty.py +63 -0
- mcpolish-0.1.0/src/mcpolish/rules/__init__.py +30 -0
- mcpolish-0.1.0/src/mcpolish/rules/base.py +52 -0
- mcpolish-0.1.0/src/mcpolish/rules/consistency/MP030_param_type_mismatch.py +83 -0
- mcpolish-0.1.0/src/mcpolish/rules/consistency/MP031_param_meaning_mismatch.py +73 -0
- mcpolish-0.1.0/src/mcpolish/rules/consistency/MP032_undocumented_side_effect.py +89 -0
- mcpolish-0.1.0/src/mcpolish/rules/consistency/MP033_duplicate_tool_description.py +58 -0
- mcpolish-0.1.0/src/mcpolish/rules/consistency/__init__.py +0 -0
- mcpolish-0.1.0/src/mcpolish/rules/description/MP020_too_short.py +45 -0
- mcpolish-0.1.0/src/mcpolish/rules/description/MP021_too_long.py +49 -0
- mcpolish-0.1.0/src/mcpolish/rules/description/MP022_missing_example.py +51 -0
- mcpolish-0.1.0/src/mcpolish/rules/description/MP023_no_trigger_condition.py +70 -0
- mcpolish-0.1.0/src/mcpolish/rules/description/MP024_jargon_density.py +59 -0
- mcpolish-0.1.0/src/mcpolish/rules/description/MP025_useless_qualifier.py +72 -0
- mcpolish-0.1.0/src/mcpolish/rules/description/MP026_ambiguous_description.py +67 -0
- mcpolish-0.1.0/src/mcpolish/rules/description/__init__.py +0 -0
- mcpolish-0.1.0/src/mcpolish/rules/naming/MP010_generic_tool_name.py +74 -0
- mcpolish-0.1.0/src/mcpolish/rules/naming/MP011_redundant_prefix.py +76 -0
- mcpolish-0.1.0/src/mcpolish/rules/naming/MP012_inconsistent_verb_pattern.py +98 -0
- mcpolish-0.1.0/src/mcpolish/rules/naming/MP013_name_collision_cross_server.py +60 -0
- mcpolish-0.1.0/src/mcpolish/rules/naming/MP014_snake_vs_camel.py +64 -0
- mcpolish-0.1.0/src/mcpolish/rules/naming/__init__.py +0 -0
- mcpolish-0.1.0/src/mcpolish/rules/registry.py +142 -0
- mcpolish-0.1.0/src/mcpolish/rules/schema/MP001_require_tool_description.py +41 -0
- mcpolish-0.1.0/src/mcpolish/rules/schema/MP002_require_param_description.py +43 -0
- mcpolish-0.1.0/src/mcpolish/rules/schema/MP003_require_return_schema.py +51 -0
- mcpolish-0.1.0/src/mcpolish/rules/schema/MP004_require_required_array.py +62 -0
- mcpolish-0.1.0/src/mcpolish/rules/schema/MP005_valid_json_schema.py +59 -0
- mcpolish-0.1.0/src/mcpolish/rules/schema/__init__.py +0 -0
- mcpolish-0.1.0/src/mcpolish/rules/security/MP040_hidden_prompt_injection.py +59 -0
- mcpolish-0.1.0/src/mcpolish/rules/security/MP041_instruction_in_description.py +64 -0
- mcpolish-0.1.0/src/mcpolish/rules/security/__init__.py +0 -0
- mcpolish-0.1.0/src/mcpolish/score/__init__.py +6 -0
- mcpolish-0.1.0/src/mcpolish/score/badge.py +39 -0
- mcpolish-0.1.0/src/mcpolish/score/scorer.py +59 -0
- mcpolish-0.1.0/src/mcpolish/types.py +110 -0
- mcpolish-0.1.0/tests/__init__.py +0 -0
- mcpolish-0.1.0/tests/conftest.py +62 -0
- mcpolish-0.1.0/tests/e2e/__init__.py +0 -0
- mcpolish-0.1.0/tests/e2e/test_cli_lint.py +75 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/config/custom_weights/pyproject.toml +12 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/config/custom_weights/server.py +12 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/config/empty_section/pyproject.toml +5 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/config/empty_section/server.py +15 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/config/malformed_toml/pyproject.toml +2 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/config/malformed_toml/server.py +12 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/config/no_pyproject/server.py +11 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/config/per_rule_override/pyproject.toml +8 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/config/per_rule_override/server.py +15 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/config/select_ignore/pyproject.toml +7 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/config/select_ignore/server.py +15 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/discovery/add_tool_call.py +31 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/discovery/async_tools.py +17 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/discovery/docstring_styles.py +47 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/discovery/dynamic_registration.py +19 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/discovery/empty.py +0 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/discovery/fastmcp_decorator.py +17 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/discovery/lowlevel_tool_constructor.py +24 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/discovery/multiple_tools_one_file.py +23 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/discovery/no_tools.py +11 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/discovery/pydantic_schema.py +28 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/discovery/syntax_error.py +9 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/discovery/typed_params.py +27 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/flags/baseline.py +20 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/flags/needs_safe_fix.py +11 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/flags/needs_unsafe_fix.py +16 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/modular_project/__init__.py +0 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/modular_project/helpers/__init__.py +0 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/modular_project/helpers/util.py +12 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/modular_project/main.py +10 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/modular_project/tools/__init__.py +1 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/modular_project/tools/admin.py +13 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/modular_project/tools/memory.py +28 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/modular_project/tools/search.py +16 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/rule_MP001.py +14 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/rule_MP002.py +17 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/rule_MP003.py +18 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/rule_MP004.py +21 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/rule_MP005.py +15 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/rule_MP010.py +20 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/rule_MP011.py +20 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/rule_MP012.py +45 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/rule_MP013.py +20 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/rule_MP014.py +45 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/rule_MP020.py +14 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/rule_MP021.py +32 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/rule_MP022.py +20 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/rule_MP023.py +15 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/rule_MP024.py +14 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/rule_MP025.py +14 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/rule_MP026.py +22 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/rule_MP030.py +24 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/rule_MP031.py +22 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/rule_MP032.py +22 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/rule_MP033.py +20 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/rule_MP040.py +15 -0
- mcpolish-0.1.0/tests/fixtures/scenarios/rule_MP041.py +14 -0
- mcpolish-0.1.0/tests/unit/__init__.py +0 -0
- mcpolish-0.1.0/tests/unit/test_config.py +45 -0
- mcpolish-0.1.0/tests/unit/test_discover_python.py +91 -0
- mcpolish-0.1.0/tests/unit/test_fix_engine.py +63 -0
- mcpolish-0.1.0/tests/unit/test_registry_filter.py +34 -0
- mcpolish-0.1.0/tests/unit/test_registry_snapshot.py +23 -0
- mcpolish-0.1.0/tests/unit/test_reporters.py +74 -0
- mcpolish-0.1.0/tests/unit/test_rules_consistency.py +49 -0
- mcpolish-0.1.0/tests/unit/test_rules_description.py +70 -0
- mcpolish-0.1.0/tests/unit/test_rules_naming.py +90 -0
- mcpolish-0.1.0/tests/unit/test_rules_schema.py +80 -0
- mcpolish-0.1.0/tests/unit/test_rules_security.py +30 -0
- mcpolish-0.1.0/tests/unit/test_scenarios.py +464 -0
- mcpolish-0.1.0/tests/unit/test_scorer.py +40 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
strategy:
|
|
12
|
+
matrix:
|
|
13
|
+
python: ["3.11", "3.12"]
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
- uses: actions/setup-python@v5
|
|
17
|
+
with:
|
|
18
|
+
python-version: ${{ matrix.python }}
|
|
19
|
+
- name: Install
|
|
20
|
+
run: |
|
|
21
|
+
python -m pip install --upgrade pip
|
|
22
|
+
pip install -e ".[dev]"
|
|
23
|
+
- name: Lint
|
|
24
|
+
run: ruff check src tests
|
|
25
|
+
- name: Test
|
|
26
|
+
run: pytest -q
|
|
27
|
+
- name: Self-lint
|
|
28
|
+
run: mcpolish lint examples/clean_server.py
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
name: publish
|
|
2
|
+
|
|
3
|
+
# Fires when you push a version tag like v0.1.0.
|
|
4
|
+
# Build runs first without approval. Publish waits for the required reviewer
|
|
5
|
+
# on the `pypi` environment.
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
tags:
|
|
9
|
+
- 'v*'
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
inputs:
|
|
12
|
+
tag:
|
|
13
|
+
description: 'Tag to publish (e.g. v0.1.0). Used only for manual dispatch.'
|
|
14
|
+
required: false
|
|
15
|
+
|
|
16
|
+
permissions: {}
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
# ----- 1. Build the wheel + sdist, verify metadata. No secrets needed. -----
|
|
20
|
+
build:
|
|
21
|
+
name: Build distribution
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
permissions:
|
|
24
|
+
contents: read
|
|
25
|
+
outputs:
|
|
26
|
+
version: ${{ steps.version.outputs.version }}
|
|
27
|
+
|
|
28
|
+
steps:
|
|
29
|
+
- name: Checkout
|
|
30
|
+
uses: actions/checkout@v4
|
|
31
|
+
|
|
32
|
+
- name: Set up Python
|
|
33
|
+
uses: actions/setup-python@v5
|
|
34
|
+
with:
|
|
35
|
+
python-version: '3.12'
|
|
36
|
+
|
|
37
|
+
- name: Install build tools
|
|
38
|
+
run: |
|
|
39
|
+
python -m pip install --upgrade pip
|
|
40
|
+
python -m pip install --upgrade build twine
|
|
41
|
+
|
|
42
|
+
- name: Confirm tag matches package version
|
|
43
|
+
id: version
|
|
44
|
+
run: |
|
|
45
|
+
set -e
|
|
46
|
+
TAG_NAME="${GITHUB_REF#refs/tags/}"
|
|
47
|
+
if [ -z "$TAG_NAME" ] || [ "$TAG_NAME" = "$GITHUB_REF" ]; then
|
|
48
|
+
TAG_NAME="${{ inputs.tag }}"
|
|
49
|
+
fi
|
|
50
|
+
TAG_VERSION="${TAG_NAME#v}"
|
|
51
|
+
PKG_VERSION=$(python -c "import tomllib,sys; print(tomllib.loads(open('pyproject.toml','rb').read().decode())['project']['version'])")
|
|
52
|
+
echo "tag=$TAG_NAME"
|
|
53
|
+
echo "tag_version=$TAG_VERSION"
|
|
54
|
+
echo "pyproject_version=$PKG_VERSION"
|
|
55
|
+
if [ "$TAG_VERSION" != "$PKG_VERSION" ]; then
|
|
56
|
+
echo "::error::tag $TAG_NAME ($TAG_VERSION) does not match pyproject version $PKG_VERSION"
|
|
57
|
+
exit 1
|
|
58
|
+
fi
|
|
59
|
+
echo "version=$PKG_VERSION" >> "$GITHUB_OUTPUT"
|
|
60
|
+
|
|
61
|
+
- name: Build sdist and wheel
|
|
62
|
+
run: python -m build
|
|
63
|
+
|
|
64
|
+
- name: Verify metadata with twine
|
|
65
|
+
run: twine check --strict dist/*
|
|
66
|
+
|
|
67
|
+
- name: Install built wheel and smoke-test the CLI
|
|
68
|
+
run: |
|
|
69
|
+
python -m venv /tmp/smoke
|
|
70
|
+
/tmp/smoke/bin/pip install --upgrade pip
|
|
71
|
+
/tmp/smoke/bin/pip install dist/*.whl
|
|
72
|
+
/tmp/smoke/bin/mcpolish --version
|
|
73
|
+
/tmp/smoke/bin/mcpolish doctor
|
|
74
|
+
|
|
75
|
+
- name: Show what will be uploaded
|
|
76
|
+
run: |
|
|
77
|
+
echo "==== Files to publish ===="
|
|
78
|
+
ls -la dist/
|
|
79
|
+
echo "==== Wheel contents ===="
|
|
80
|
+
unzip -l dist/*.whl | head -50
|
|
81
|
+
|
|
82
|
+
- name: Upload build artifacts
|
|
83
|
+
uses: actions/upload-artifact@v4
|
|
84
|
+
with:
|
|
85
|
+
name: dist
|
|
86
|
+
path: dist/
|
|
87
|
+
retention-days: 7
|
|
88
|
+
|
|
89
|
+
# ----- 2. Publish to PyPI. Gated by the `pypi` environment's required reviewer. -----
|
|
90
|
+
publish:
|
|
91
|
+
name: Publish to PyPI
|
|
92
|
+
needs: build
|
|
93
|
+
runs-on: ubuntu-latest
|
|
94
|
+
environment:
|
|
95
|
+
name: pypi
|
|
96
|
+
url: https://pypi.org/project/mcpolish/${{ needs.build.outputs.version }}/
|
|
97
|
+
permissions:
|
|
98
|
+
id-token: write # required for PyPI Trusted Publishing (OIDC)
|
|
99
|
+
timeout-minutes: 15
|
|
100
|
+
|
|
101
|
+
steps:
|
|
102
|
+
- name: Download dist artifacts
|
|
103
|
+
uses: actions/download-artifact@v4
|
|
104
|
+
with:
|
|
105
|
+
name: dist
|
|
106
|
+
path: dist/
|
|
107
|
+
|
|
108
|
+
- name: List artifacts under review
|
|
109
|
+
run: |
|
|
110
|
+
echo "Reviewer is approving publication of mcpolish ${{ needs.build.outputs.version }}"
|
|
111
|
+
ls -la dist/
|
|
112
|
+
|
|
113
|
+
- name: Publish to PyPI
|
|
114
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
115
|
+
with:
|
|
116
|
+
packages-dir: dist/
|
|
117
|
+
print-hash: true
|
|
118
|
+
|
|
119
|
+
# ----- 3. Verify the upload landed and is installable. -----
|
|
120
|
+
verify:
|
|
121
|
+
name: Verify install from PyPI
|
|
122
|
+
needs: [build, publish]
|
|
123
|
+
runs-on: ubuntu-latest
|
|
124
|
+
|
|
125
|
+
steps:
|
|
126
|
+
- name: Wait for PyPI index to settle
|
|
127
|
+
run: sleep 30
|
|
128
|
+
|
|
129
|
+
- name: Set up Python
|
|
130
|
+
uses: actions/setup-python@v5
|
|
131
|
+
with:
|
|
132
|
+
python-version: '3.12'
|
|
133
|
+
|
|
134
|
+
- name: Install from PyPI
|
|
135
|
+
run: |
|
|
136
|
+
python -m venv /tmp/verify
|
|
137
|
+
/tmp/verify/bin/pip install --upgrade pip
|
|
138
|
+
/tmp/verify/bin/pip install "mcpolish==${{ needs.build.outputs.version }}"
|
|
139
|
+
/tmp/verify/bin/mcpolish --version
|
|
140
|
+
/tmp/verify/bin/mcpolish doctor
|
|
141
|
+
|
|
142
|
+
- name: Summary
|
|
143
|
+
run: |
|
|
144
|
+
echo "## Published mcpolish ${{ needs.build.outputs.version }}" >> "$GITHUB_STEP_SUMMARY"
|
|
145
|
+
echo "" >> "$GITHUB_STEP_SUMMARY"
|
|
146
|
+
echo "Available at: https://pypi.org/project/mcpolish/${{ needs.build.outputs.version }}/" >> "$GITHUB_STEP_SUMMARY"
|
|
147
|
+
echo "" >> "$GITHUB_STEP_SUMMARY"
|
|
148
|
+
echo "Install with: \`pip install mcpolish==${{ needs.build.outputs.version }}\`" >> "$GITHUB_STEP_SUMMARY"
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# --- Python ---
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
.Python
|
|
7
|
+
*.egg-info/
|
|
8
|
+
*.egg
|
|
9
|
+
MANIFEST
|
|
10
|
+
|
|
11
|
+
# --- Build artifacts ---
|
|
12
|
+
build/
|
|
13
|
+
dist/
|
|
14
|
+
wheels/
|
|
15
|
+
*.whl
|
|
16
|
+
.eggs/
|
|
17
|
+
pip-wheel-metadata/
|
|
18
|
+
|
|
19
|
+
# --- Virtual environments ---
|
|
20
|
+
.venv
|
|
21
|
+
.venv-*
|
|
22
|
+
venv/
|
|
23
|
+
env/
|
|
24
|
+
ENV/
|
|
25
|
+
|
|
26
|
+
# --- Caches ---
|
|
27
|
+
.pytest_cache/
|
|
28
|
+
.mypy_cache/
|
|
29
|
+
.ruff_cache/
|
|
30
|
+
.coverage
|
|
31
|
+
.coverage.*
|
|
32
|
+
coverage.xml
|
|
33
|
+
htmlcov/
|
|
34
|
+
.tox/
|
|
35
|
+
.nox/
|
|
36
|
+
.cache/
|
|
37
|
+
|
|
38
|
+
# --- Editor / IDE ---
|
|
39
|
+
.idea/
|
|
40
|
+
.vscode/
|
|
41
|
+
*.swp
|
|
42
|
+
*.swo
|
|
43
|
+
*~
|
|
44
|
+
.project
|
|
45
|
+
.pydevproject
|
|
46
|
+
|
|
47
|
+
# --- OS ---
|
|
48
|
+
.DS_Store
|
|
49
|
+
.DS_Store?
|
|
50
|
+
._*
|
|
51
|
+
.Spotlight-V100
|
|
52
|
+
.Trashes
|
|
53
|
+
ehthumbs.db
|
|
54
|
+
Thumbs.db
|
|
55
|
+
desktop.ini
|
|
56
|
+
|
|
57
|
+
# --- mcpolish runtime ---
|
|
58
|
+
# LLM verdict cache (per-user, regenerated on demand)
|
|
59
|
+
.mcpolish-cache.sqlite
|
|
60
|
+
*.mcpolish.db
|
|
61
|
+
# Reports written to disk during local runs
|
|
62
|
+
*.sarif
|
|
63
|
+
codequality.json
|
|
64
|
+
mcpolish-report.json
|
|
65
|
+
badge.svg
|
|
66
|
+
mcpolish_badge.svg
|
|
67
|
+
# Ad-hoc local scratch
|
|
68
|
+
/tmp/
|
|
69
|
+
scratch/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.11
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Contributor Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and maintainers pledge to make participation in the mcpolish community a respectful and productive experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
|
6
|
+
|
|
7
|
+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
|
8
|
+
|
|
9
|
+
## Our standards
|
|
10
|
+
|
|
11
|
+
Examples of behaviour that contributes to a positive environment:
|
|
12
|
+
|
|
13
|
+
- Showing empathy and kindness toward other people.
|
|
14
|
+
- Being respectful of differing opinions, viewpoints, and experiences.
|
|
15
|
+
- Giving and gracefully accepting constructive feedback.
|
|
16
|
+
- Accepting responsibility for our mistakes and learning from them.
|
|
17
|
+
- Focusing on what is best for the project and the community.
|
|
18
|
+
|
|
19
|
+
Examples of unacceptable behaviour:
|
|
20
|
+
|
|
21
|
+
- Sexualised language or imagery, or unwelcome attention of any kind.
|
|
22
|
+
- Trolling, insulting or derogatory comments, and personal or political attacks.
|
|
23
|
+
- Public or private harassment.
|
|
24
|
+
- Publishing other people's private information without explicit permission.
|
|
25
|
+
- Conduct which could reasonably be considered inappropriate in a professional setting.
|
|
26
|
+
|
|
27
|
+
## Enforcement responsibilities
|
|
28
|
+
|
|
29
|
+
Project maintainers are responsible for clarifying and enforcing these standards. Maintainers have the right to remove, edit, or reject comments, commits, code, issues, pull requests, and other contributions that are not aligned with this Code of Conduct, and will communicate the reasons when doing so.
|
|
30
|
+
|
|
31
|
+
## Scope
|
|
32
|
+
|
|
33
|
+
This Code of Conduct applies in all project spaces (issues, pull requests, discussions, chat channels) and when an individual is officially representing the project in public spaces. Examples of representing the project include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
|
34
|
+
|
|
35
|
+
## Reporting
|
|
36
|
+
|
|
37
|
+
If you experience or witness behaviour that violates this Code of Conduct, please report it by emailing the maintainers at conduct@mcpolish.dev. All reports will be reviewed and investigated promptly and fairly.
|
|
38
|
+
|
|
39
|
+
The maintainers will respect the privacy and security of the reporter of any incident.
|
|
40
|
+
|
|
41
|
+
## Enforcement guidelines
|
|
42
|
+
|
|
43
|
+
Maintainers will follow these guidelines when determining the consequences for any action they deem to be in violation of this Code of Conduct.
|
|
44
|
+
|
|
45
|
+
### 1. Correction
|
|
46
|
+
|
|
47
|
+
**Impact**: Use of inappropriate language or other behaviour deemed unprofessional or unwelcome.
|
|
48
|
+
|
|
49
|
+
**Consequence**: A private, written warning from the maintainers, explaining the nature of the violation and why the behaviour was inappropriate. A public apology may be requested.
|
|
50
|
+
|
|
51
|
+
### 2. Warning
|
|
52
|
+
|
|
53
|
+
**Impact**: A violation through a single incident or series of actions.
|
|
54
|
+
|
|
55
|
+
**Consequence**: A warning with consequences for continued behaviour. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in project spaces and on external channels. Violating these terms may lead to a temporary or permanent ban.
|
|
56
|
+
|
|
57
|
+
### 3. Temporary ban
|
|
58
|
+
|
|
59
|
+
**Impact**: A serious violation of community standards, including sustained inappropriate behaviour.
|
|
60
|
+
|
|
61
|
+
**Consequence**: A temporary ban from any sort of interaction or public communication with the project for a specified period of time. No public or private interaction with the people involved is allowed during this period. Violating these terms may lead to a permanent ban.
|
|
62
|
+
|
|
63
|
+
### 4. Permanent ban
|
|
64
|
+
|
|
65
|
+
**Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behaviour, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
|
66
|
+
|
|
67
|
+
**Consequence**: A permanent ban from any sort of public interaction within the project.
|
|
68
|
+
|
|
69
|
+
## Attribution
|
|
70
|
+
|
|
71
|
+
This Code of Conduct is adapted from the Contributor Covenant, version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.
|
|
72
|
+
|
|
73
|
+
Community Impact Guidelines are inspired by Mozilla's code of conduct enforcement ladder.
|
|
74
|
+
|
|
75
|
+
For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq.
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Contributing to mcpolish
|
|
2
|
+
|
|
3
|
+
Thank you for taking the time to contribute. This page explains how to get a development environment set up, the conventions the project follows, and how to propose changes.
|
|
4
|
+
|
|
5
|
+
## Ways to contribute
|
|
6
|
+
|
|
7
|
+
| If you have... | Open a |
|
|
8
|
+
|---|---|
|
|
9
|
+
| Found a bug | [Bug report issue](https://github.com/vtensor/mcpolish/issues/new?labels=bug) |
|
|
10
|
+
| Want a new rule | [Rule proposal issue](https://github.com/vtensor/mcpolish/issues/new?labels=rule-proposal) with a citation or operational evidence |
|
|
11
|
+
| Spotted a doc problem | Pull request that edits the file under `docs/` |
|
|
12
|
+
| Fixed a bug | Pull request linked to the issue |
|
|
13
|
+
| Want to discuss design | [Discussion](https://github.com/vtensor/mcpolish/discussions) |
|
|
14
|
+
|
|
15
|
+
Before opening a large pull request, please open an issue first so we can agree on the approach. Small fixes (typos, single-rule patches, doc edits) do not need an issue first.
|
|
16
|
+
|
|
17
|
+
## Development setup
|
|
18
|
+
|
|
19
|
+
mcpolish needs Python 3.11 or newer.
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
git clone https://github.com/vtensor/mcpolish.git
|
|
23
|
+
cd mcpolish
|
|
24
|
+
python -m venv .venv
|
|
25
|
+
source .venv/bin/activate
|
|
26
|
+
pip install -e ".[dev,llm]"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The `dev` extra adds pytest, mypy, and ruff. The `llm` extra adds the OpenAI and Anthropic SDKs needed for the three LLM-judged rules.
|
|
30
|
+
|
|
31
|
+
## Running the tests
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
pytest -q
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The suite has 132 tests and runs in under one second. It must stay green for any pull request to be merged.
|
|
38
|
+
|
|
39
|
+
Useful subsets:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
pytest -k MP010 # tests for one rule
|
|
43
|
+
pytest tests/unit/test_scenarios.py -v
|
|
44
|
+
pytest --tb=short # shorter failure traces
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Linting and type-checking
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
ruff check src tests
|
|
51
|
+
mypy src/mcpolish
|
|
52
|
+
mcpolish lint examples/clean_server.py
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
All three must pass before merge.
|
|
56
|
+
|
|
57
|
+
## Running mcpolish on itself
|
|
58
|
+
|
|
59
|
+
mcpolish lints MCP servers; the examples under `examples/` are real MCP servers. Use them as a smoke test:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
mcpolish lint examples/clean_server.py # must score 100
|
|
63
|
+
mcpolish lint examples/smelly_server.py --fail-on never
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Adding a new rule
|
|
67
|
+
|
|
68
|
+
This is the most common kind of contribution. The shape:
|
|
69
|
+
|
|
70
|
+
1. **Open a rule proposal issue.** Cite the paper, blog post, or operational evidence that supports the rule.
|
|
71
|
+
2. **Pick the next stable ID** in the appropriate category:
|
|
72
|
+
- Schema: MP001-MP009
|
|
73
|
+
- Naming: MP010-MP019
|
|
74
|
+
- Description: MP020-MP029
|
|
75
|
+
- Consistency: MP030-MP039
|
|
76
|
+
- Security: MP040-MP049
|
|
77
|
+
3. **Add the rule file** under `src/mcpolish/rules/<category>/MPxxx_name.py`. Follow the shape of existing rules.
|
|
78
|
+
4. **Register it** with the `@register` decorator so the rule shows up at import time.
|
|
79
|
+
5. **Add a fixture** under `tests/fixtures/scenarios/rule_MPxxx.py` that triggers exactly your rule.
|
|
80
|
+
6. **Add tests** under `tests/unit/test_rules_<category>.py` plus the parametrised entry in `tests/unit/test_scenarios.py`.
|
|
81
|
+
7. **Write the docs** under `docs/rules/MPxxx.md`. Follow the template in [docs/rules/MP010.md](docs/rules/MP010.md).
|
|
82
|
+
8. **Update the indexes**: `docs/rules/index.md`, `docs/concepts/what-mcpolish-checks.md`, and `docs/methodology.md`.
|
|
83
|
+
|
|
84
|
+
Once shipped, a rule ID is stable forever. The default severity may change between releases. The ID and the human name never do.
|
|
85
|
+
|
|
86
|
+
## Style
|
|
87
|
+
|
|
88
|
+
- Plain English in docs and comments. Avoid em dashes and box-drawing characters; the project deliberately uses ASCII only.
|
|
89
|
+
- Sentences under 25 words where reasonable.
|
|
90
|
+
- Define every short form on first use, or link to the [glossary](docs/concepts/glossary.md).
|
|
91
|
+
- Code style follows `ruff` defaults. Run `ruff format` before committing.
|
|
92
|
+
- Type hints everywhere. `mypy` runs in strict mode for new code paths.
|
|
93
|
+
|
|
94
|
+
## Pull request checklist
|
|
95
|
+
|
|
96
|
+
Before opening a pull request:
|
|
97
|
+
|
|
98
|
+
- [ ] Tests pass: `pytest -q`
|
|
99
|
+
- [ ] Lint passes: `ruff check src tests`
|
|
100
|
+
- [ ] No forbidden characters: `grep -rPn "[\x{2014}\x{2013}\x{2500}-\x{257F}]" src tests docs README.md` returns nothing (Unicode em dash U+2014, en dash U+2013, and box-drawing block)
|
|
101
|
+
- [ ] Internal markdown links resolve (run the link-check script in `tests/` if present, or open the changed pages)
|
|
102
|
+
- [ ] New code paths covered by tests
|
|
103
|
+
- [ ] Docs updated where behaviour changed
|
|
104
|
+
- [ ] `VERIFICATION.md` updated if a verification scenario changed
|
|
105
|
+
|
|
106
|
+
## Commit messages
|
|
107
|
+
|
|
108
|
+
Use a short imperative subject line:
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
add MP015 require-tool-version
|
|
112
|
+
fix MP004 firing on auto-derived schemas
|
|
113
|
+
docs: expand MP010 examples
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Long-form commit bodies are welcome for non-trivial changes.
|
|
117
|
+
|
|
118
|
+
## Release process (maintainers)
|
|
119
|
+
|
|
120
|
+
1. Bump `__version__` in `src/mcpolish/_version.py`.
|
|
121
|
+
2. Bump `version` in `pyproject.toml`.
|
|
122
|
+
3. Update `CHANGELOG.md`.
|
|
123
|
+
4. Tag the release: `git tag -a v0.x.y -m "v0.x.y"`.
|
|
124
|
+
5. Push: `git push --tags`.
|
|
125
|
+
6. CI publishes the wheel to PyPI.
|
|
126
|
+
|
|
127
|
+
## Code of Conduct
|
|
128
|
+
|
|
129
|
+
This project follows the [Contributor Covenant](CODE_OF_CONDUCT.md). Participation in this project means agreeing to abide by it.
|
|
130
|
+
|
|
131
|
+
## License
|
|
132
|
+
|
|
133
|
+
By contributing, you agree that your contributions will be licensed under the project's Apache 2.0 [LICENSE](LICENSE).
|
mcpolish-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for describing the origin of the Work and
|
|
141
|
+
reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may accept and charge a
|
|
167
|
+
fee for, acceptance of support, warranty, indemnity, or other
|
|
168
|
+
liability obligations and/or rights consistent with this License.
|
|
169
|
+
However, in accepting such obligations, You may act only on Your
|
|
170
|
+
own behalf and on the sole responsibility of any other Contributor,
|
|
171
|
+
and only if You agree to indemnify, defend, and hold each Contributor
|
|
172
|
+
harmless for any liability incurred by, or claims asserted against,
|
|
173
|
+
such Contributor by reason of your accepting any such warranty or
|
|
174
|
+
additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 Vikram Dev
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|