mcp-server-flink 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.
- mcp_server_flink-0.1.0/.github/dependabot.yml +17 -0
- mcp_server_flink-0.1.0/.github/workflows/ci.yml +64 -0
- mcp_server_flink-0.1.0/.github/workflows/codeql.yml +26 -0
- mcp_server_flink-0.1.0/.github/workflows/release.yml +77 -0
- mcp_server_flink-0.1.0/.github/workflows/scorecard.yml +32 -0
- mcp_server_flink-0.1.0/.gitignore +10 -0
- mcp_server_flink-0.1.0/CHANGELOG.md +22 -0
- mcp_server_flink-0.1.0/CONTRIBUTING.md +60 -0
- mcp_server_flink-0.1.0/LICENSE +202 -0
- mcp_server_flink-0.1.0/PKG-INFO +274 -0
- mcp_server_flink-0.1.0/README.md +246 -0
- mcp_server_flink-0.1.0/SECURITY.md +30 -0
- mcp_server_flink-0.1.0/docker/compose.yaml +58 -0
- mcp_server_flink-0.1.0/pyproject.toml +65 -0
- mcp_server_flink-0.1.0/scripts/live-test.sh +63 -0
- mcp_server_flink-0.1.0/server.json +64 -0
- mcp_server_flink-0.1.0/src/mcp_server_flink/__init__.py +1 -0
- mcp_server_flink-0.1.0/src/mcp_server_flink/__main__.py +4 -0
- mcp_server_flink-0.1.0/src/mcp_server_flink/cli.py +38 -0
- mcp_server_flink-0.1.0/src/mcp_server_flink/client.py +319 -0
- mcp_server_flink-0.1.0/src/mcp_server_flink/config.py +231 -0
- mcp_server_flink-0.1.0/src/mcp_server_flink/diagnose.py +391 -0
- mcp_server_flink-0.1.0/src/mcp_server_flink/server.py +639 -0
- mcp_server_flink-0.1.0/src/mcp_server_flink/shaping.py +401 -0
- mcp_server_flink-0.1.0/src/mcp_server_flink/sql.py +199 -0
- mcp_server_flink-0.1.0/src/mcp_server_flink/sql_guard.py +348 -0
- mcp_server_flink-0.1.0/tests/__init__.py +0 -0
- mcp_server_flink-0.1.0/tests/conftest.py +98 -0
- mcp_server_flink-0.1.0/tests/fixtures/backpressure.json +16 -0
- mcp_server_flink-0.1.0/tests/fixtures/checkpoint_config.json +20 -0
- mcp_server_flink-0.1.0/tests/fixtures/checkpoints.json +329 -0
- mcp_server_flink-0.1.0/tests/fixtures/config.json +13 -0
- mcp_server_flink-0.1.0/tests/fixtures/exceptions_failed.json +60 -0
- mcp_server_flink-0.1.0/tests/fixtures/exceptions_none.json +10 -0
- mcp_server_flink-0.1.0/tests/fixtures/job_config.json +11 -0
- mcp_server_flink-0.1.0/tests/fixtures/job_failed.json +142 -0
- mcp_server_flink-0.1.0/tests/fixtures/job_running.json +142 -0
- mcp_server_flink-0.1.0/tests/fixtures/jobmanager_config.json +106 -0
- mcp_server_flink-0.1.0/tests/fixtures/jobs_overview.json +92 -0
- mcp_server_flink-0.1.0/tests/fixtures/overview.json +11 -0
- mcp_server_flink-0.1.0/tests/fixtures/taskmanager.json +95 -0
- mcp_server_flink-0.1.0/tests/fixtures/taskmanagers.json +47 -0
- mcp_server_flink-0.1.0/tests/fixtures/watermarks.json +6 -0
- mcp_server_flink-0.1.0/tests/gateway_fake.py +126 -0
- mcp_server_flink-0.1.0/tests/test_client.py +180 -0
- mcp_server_flink-0.1.0/tests/test_config.py +111 -0
- mcp_server_flink-0.1.0/tests/test_diagnose.py +269 -0
- mcp_server_flink-0.1.0/tests/test_live.py +418 -0
- mcp_server_flink-0.1.0/tests/test_shaping.py +169 -0
- mcp_server_flink-0.1.0/tests/test_sql_guard.py +266 -0
- mcp_server_flink-0.1.0/tests/test_sql_runner.py +192 -0
- mcp_server_flink-0.1.0/tests/test_stdio.py +82 -0
- mcp_server_flink-0.1.0/tests/test_tools.py +540 -0
- mcp_server_flink-0.1.0/uv.lock +1381 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
# Keeps the pinned action commits current.
|
|
4
|
+
- package-ecosystem: github-actions
|
|
5
|
+
directory: /
|
|
6
|
+
schedule:
|
|
7
|
+
interval: weekly
|
|
8
|
+
groups:
|
|
9
|
+
actions:
|
|
10
|
+
patterns: ["*"]
|
|
11
|
+
- package-ecosystem: pip
|
|
12
|
+
directory: /
|
|
13
|
+
schedule:
|
|
14
|
+
interval: weekly
|
|
15
|
+
groups:
|
|
16
|
+
python:
|
|
17
|
+
patterns: ["*"]
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
# Weekly, so a new mcp or Flink release that breaks the server is caught.
|
|
8
|
+
schedule:
|
|
9
|
+
- cron: "0 6 * * 1"
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
lint:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
20
|
+
with:
|
|
21
|
+
persist-credentials: false
|
|
22
|
+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
23
|
+
with:
|
|
24
|
+
python-version: "3.12"
|
|
25
|
+
- run: pip install uv
|
|
26
|
+
- run: uv sync --locked
|
|
27
|
+
- run: uv run ruff check .
|
|
28
|
+
- run: uv run ruff format --check .
|
|
29
|
+
- run: uv run pyright
|
|
30
|
+
|
|
31
|
+
unit:
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
strategy:
|
|
34
|
+
fail-fast: false
|
|
35
|
+
matrix:
|
|
36
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
37
|
+
steps:
|
|
38
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
39
|
+
with:
|
|
40
|
+
persist-credentials: false
|
|
41
|
+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
42
|
+
with:
|
|
43
|
+
python-version: ${{ matrix.python-version }}
|
|
44
|
+
- run: pip install uv
|
|
45
|
+
- run: uv sync --locked --python ${{ matrix.python-version }}
|
|
46
|
+
- run: uv run pytest -m "not live"
|
|
47
|
+
|
|
48
|
+
live:
|
|
49
|
+
runs-on: ubuntu-latest
|
|
50
|
+
strategy:
|
|
51
|
+
fail-fast: false
|
|
52
|
+
matrix:
|
|
53
|
+
flink: ["1.20.5", "2.3.0"]
|
|
54
|
+
steps:
|
|
55
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
56
|
+
with:
|
|
57
|
+
persist-credentials: false
|
|
58
|
+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
59
|
+
with:
|
|
60
|
+
python-version: "3.12"
|
|
61
|
+
- run: pip install uv
|
|
62
|
+
- run: uv sync --locked
|
|
63
|
+
- name: Live tests on Flink ${{ matrix.flink }}
|
|
64
|
+
run: scripts/live-test.sh "${{ matrix.flink }}"
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: CodeQL
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
schedule:
|
|
8
|
+
- cron: "0 8 * * 1"
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
analyze:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
permissions:
|
|
17
|
+
contents: read
|
|
18
|
+
security-events: write
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
21
|
+
with:
|
|
22
|
+
persist-credentials: false
|
|
23
|
+
- uses: github/codeql-action/init@915412ff23e8b7659517e607487dbeae018f2934 # v4.39.5
|
|
24
|
+
with:
|
|
25
|
+
languages: python, actions
|
|
26
|
+
- uses: github/codeql-action/analyze@915412ff23e8b7659517e607487dbeae018f2934 # v4.39.5
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
# Publishes to PyPI when a version tag such as v0.1.0 is pushed. PyPI trusts
|
|
4
|
+
# this workflow through a trusted publisher, so no API token is stored.
|
|
5
|
+
on:
|
|
6
|
+
push:
|
|
7
|
+
tags: ["v*"]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
17
|
+
with:
|
|
18
|
+
persist-credentials: false
|
|
19
|
+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
20
|
+
with:
|
|
21
|
+
python-version: "3.12"
|
|
22
|
+
- name: Check the tag matches the package version
|
|
23
|
+
run: |
|
|
24
|
+
version=$(sed -n 's/^__version__ = "\(.*\)"$/\1/p' src/mcp_server_flink/__init__.py)
|
|
25
|
+
if [ "v${version}" != "${GITHUB_REF_NAME}" ]; then
|
|
26
|
+
echo "Tag ${GITHUB_REF_NAME} does not match the package version ${version}"
|
|
27
|
+
exit 1
|
|
28
|
+
fi
|
|
29
|
+
server_json=$(python -c "import json; print(json.load(open('server.json'))['version'])")
|
|
30
|
+
if [ "${server_json}" != "${version}" ]; then
|
|
31
|
+
echo "server.json version ${server_json} does not match ${version}"
|
|
32
|
+
exit 1
|
|
33
|
+
fi
|
|
34
|
+
- run: pip install build
|
|
35
|
+
- run: python -m build
|
|
36
|
+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
37
|
+
with:
|
|
38
|
+
name: dist
|
|
39
|
+
path: dist/
|
|
40
|
+
|
|
41
|
+
publish:
|
|
42
|
+
needs: build
|
|
43
|
+
runs-on: ubuntu-latest
|
|
44
|
+
environment:
|
|
45
|
+
name: pypi
|
|
46
|
+
url: https://pypi.org/project/mcp-server-flink/
|
|
47
|
+
permissions:
|
|
48
|
+
id-token: write
|
|
49
|
+
steps:
|
|
50
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
51
|
+
with:
|
|
52
|
+
name: dist
|
|
53
|
+
path: dist/
|
|
54
|
+
- uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
|
|
55
|
+
|
|
56
|
+
github-release:
|
|
57
|
+
needs: publish
|
|
58
|
+
runs-on: ubuntu-latest
|
|
59
|
+
permissions:
|
|
60
|
+
contents: write
|
|
61
|
+
# Signs the files with Sigstore, using this workflow's GitHub identity.
|
|
62
|
+
id-token: write
|
|
63
|
+
steps:
|
|
64
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
65
|
+
with:
|
|
66
|
+
name: dist
|
|
67
|
+
path: dist/
|
|
68
|
+
# Writes a .sigstore.json bundle next to each file, attached to the
|
|
69
|
+
# release with it. Verify with:
|
|
70
|
+
# python -m sigstore verify github --repository hashroute3/mcp-server-flink <file>
|
|
71
|
+
- uses: sigstore/gh-action-sigstore-python@790bc6befb9d733738f18d8f895854b453640ec9 # v3.5.0
|
|
72
|
+
with:
|
|
73
|
+
inputs: ./dist/*.tar.gz ./dist/*.whl
|
|
74
|
+
upload-signing-artifacts: false
|
|
75
|
+
- run: gh release create "$GITHUB_REF_NAME" dist/* --repo "$GITHUB_REPOSITORY" --title "$GITHUB_REF_NAME" --generate-notes
|
|
76
|
+
env:
|
|
77
|
+
GH_TOKEN: ${{ github.token }}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Scorecard
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
schedule:
|
|
7
|
+
- cron: "0 7 * * 1"
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
permissions: read-all
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
analysis:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
permissions:
|
|
16
|
+
# Upload the results to code scanning and publish them to the
|
|
17
|
+
# OpenSSF REST API (for the README badge).
|
|
18
|
+
contents: read
|
|
19
|
+
security-events: write
|
|
20
|
+
id-token: write
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
23
|
+
with:
|
|
24
|
+
persist-credentials: false
|
|
25
|
+
- uses: ossf/scorecard-action@23f22cd43608bae7a1f1fa2603d7314dee9538a5 # v2.6.0
|
|
26
|
+
with:
|
|
27
|
+
results_file: results.sarif
|
|
28
|
+
results_format: sarif
|
|
29
|
+
publish_results: true
|
|
30
|
+
- uses: github/codeql-action/upload-sarif@915412ff23e8b7659517e607487dbeae018f2934 # v4.39.5
|
|
31
|
+
with:
|
|
32
|
+
sarif_file: results.sarif
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
## 0.1.0 (2026-12-06)
|
|
6
|
+
|
|
7
|
+
First release.
|
|
8
|
+
|
|
9
|
+
- 13 read-only tools on the Flink REST API: cluster overview, JobManager
|
|
10
|
+
configuration, jobs, job details, exceptions, checkpoints, backpressure, job
|
|
11
|
+
and vertex metrics, watermarks, task managers and their metrics.
|
|
12
|
+
- `diagnose_job`: state, restarts, exceptions, checkpoints, backpressure and
|
|
13
|
+
watermarks in one call, as findings ordered by severity.
|
|
14
|
+
- SQL Gateway tools: `run_sql`, `list_catalogs`, `list_databases`,
|
|
15
|
+
`list_tables` and `describe_table`. `run_sql` accepts only read-only
|
|
16
|
+
statements unless the server runs with `--allow-write`, and its results are
|
|
17
|
+
bounded by a row limit and a timeout.
|
|
18
|
+
- Job control tools, registered only with `--allow-write`: `cancel_job`,
|
|
19
|
+
`stop_job_with_savepoint` and `trigger_savepoint`.
|
|
20
|
+
- stdio and streamable HTTP transports; basic auth, bearer tokens and TLS
|
|
21
|
+
options for both APIs.
|
|
22
|
+
- Tested on Flink 1.20.5 and 2.3.0.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Bug reports, fixes and new tools are welcome.
|
|
4
|
+
|
|
5
|
+
## Reporting a problem
|
|
6
|
+
|
|
7
|
+
Open an [issue](https://github.com/hashroute3/mcp-server-flink/issues) with:
|
|
8
|
+
|
|
9
|
+
- the tool you called and its arguments;
|
|
10
|
+
- what it returned, and what you expected;
|
|
11
|
+
- your Flink version, and whether the SQL Gateway is involved.
|
|
12
|
+
|
|
13
|
+
Security problems go through private reporting instead; see
|
|
14
|
+
[SECURITY.md](SECURITY.md).
|
|
15
|
+
|
|
16
|
+
## Sending a change
|
|
17
|
+
|
|
18
|
+
Changes are made through pull requests to `main`. Every pull request needs the
|
|
19
|
+
CI checks (lint, type check, unit tests and live tests on Flink 1.20 and 2.3)
|
|
20
|
+
to pass before it is merged.
|
|
21
|
+
|
|
22
|
+
1. Fork the repository and create a branch from `main`.
|
|
23
|
+
2. Make the change, with tests (see below).
|
|
24
|
+
3. Run the checks locally:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
uv sync
|
|
28
|
+
uv run ruff check . && uv run ruff format --check .
|
|
29
|
+
uv run pyright
|
|
30
|
+
uv run pytest
|
|
31
|
+
scripts/live-test.sh # needs Docker; starts and stops the cluster
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
4. Open a pull request that explains what changes for a user of the server.
|
|
35
|
+
Add a line to the unreleased section of [CHANGELOG.md](CHANGELOG.md) for
|
|
36
|
+
anything a user would notice.
|
|
37
|
+
|
|
38
|
+
## Requirements for a change
|
|
39
|
+
|
|
40
|
+
- **Every tool has a unit test** in `tests/test_tools.py` that calls it through
|
|
41
|
+
an MCP client against mocked HTTP, and a live test in `tests/test_live.py`.
|
|
42
|
+
Prefer fixtures captured from a real cluster (`tests/fixtures`) over
|
|
43
|
+
hand-written responses.
|
|
44
|
+
- **The SQL guard only gets stricter by accident, never looser.** A change to
|
|
45
|
+
`sql_guard.py` needs tests in `tests/test_sql_guard.py` for the statements it
|
|
46
|
+
newly allows and for the bypasses it must still reject.
|
|
47
|
+
- **Tool output stays bounded.** Lists are paginated or truncated, long
|
|
48
|
+
strings are cut, and stack traces are summarized.
|
|
49
|
+
- **New tools carry correct annotations.** Anything that changes the cluster
|
|
50
|
+
is registered only with `--allow-write`.
|
|
51
|
+
- **Style** is whatever `ruff check`, `ruff format` and `pyright` accept with
|
|
52
|
+
the settings in `pyproject.toml`. Code supports Python 3.10 and later.
|
|
53
|
+
- **Credentials never reach logs, errors or tool output.**
|
|
54
|
+
|
|
55
|
+
## Releases
|
|
56
|
+
|
|
57
|
+
The maintainer bumps the version in `src/mcp_server_flink/__init__.py` and
|
|
58
|
+
`server.json`, dates the CHANGELOG entry, and pushes a `vX.Y.Z` tag. The release
|
|
59
|
+
workflow builds the package, publishes it to PyPI through trusted publishing,
|
|
60
|
+
and creates a GitHub release whose files are signed with Sigstore.
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|