ctxverify 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.
- ctxverify-0.1.0/.github/ISSUE_TEMPLATE/bug_report.md +41 -0
- ctxverify-0.1.0/.github/ISSUE_TEMPLATE/config.yml +8 -0
- ctxverify-0.1.0/.github/ISSUE_TEMPLATE/feature_request.md +25 -0
- ctxverify-0.1.0/.github/workflows/ci.yml +56 -0
- ctxverify-0.1.0/.github/workflows/publish.yml +52 -0
- ctxverify-0.1.0/.gitignore +14 -0
- ctxverify-0.1.0/.pre-commit-hooks.yaml +14 -0
- ctxverify-0.1.0/CHANGELOG.md +46 -0
- ctxverify-0.1.0/CONTRIBUTING.md +64 -0
- ctxverify-0.1.0/LICENSE +202 -0
- ctxverify-0.1.0/LICENSE-SPEC +396 -0
- ctxverify-0.1.0/NOTICE +12 -0
- ctxverify-0.1.0/PKG-INFO +472 -0
- ctxverify-0.1.0/README.md +446 -0
- ctxverify-0.1.0/README.zh-CN.md +445 -0
- ctxverify-0.1.0/SECURITY.md +38 -0
- ctxverify-0.1.0/SPEC.md +390 -0
- ctxverify-0.1.0/action.yml +50 -0
- ctxverify-0.1.0/docs/agents.md +322 -0
- ctxverify-0.1.0/docs/format.md +369 -0
- ctxverify-0.1.0/docs/rules.md +341 -0
- ctxverify-0.1.0/examples/actions.jsonl +5 -0
- ctxverify-0.1.0/examples/broken-pack/README.md +27 -0
- ctxverify-0.1.0/examples/broken-pack/claims.jsonl +9 -0
- ctxverify-0.1.0/examples/broken-pack/contradictions.json +11 -0
- ctxverify-0.1.0/examples/broken-pack/entities.json +15 -0
- ctxverify-0.1.0/examples/broken-pack/evidence.jsonl +6 -0
- ctxverify-0.1.0/examples/broken-pack/freshness.json +16 -0
- ctxverify-0.1.0/examples/broken-pack/manifest.json +37 -0
- ctxverify-0.1.0/examples/broken-pack/relations.json +11 -0
- ctxverify-0.1.0/examples/clean-pack/README.md +25 -0
- ctxverify-0.1.0/examples/clean-pack/claims.jsonl +2 -0
- ctxverify-0.1.0/examples/clean-pack/contradictions.json +3 -0
- ctxverify-0.1.0/examples/clean-pack/entities.json +10 -0
- ctxverify-0.1.0/examples/clean-pack/evidence.jsonl +2 -0
- ctxverify-0.1.0/examples/clean-pack/freshness.json +22 -0
- ctxverify-0.1.0/examples/clean-pack/manifest.json +33 -0
- ctxverify-0.1.0/examples/clean-pack/relations.json +3 -0
- ctxverify-0.1.0/examples/obsidian-vault/concepts/C-001_Context Packs.md +21 -0
- ctxverify-0.1.0/examples/obsidian-vault/concepts/C-002_Evidence.md +19 -0
- ctxverify-0.1.0/examples/obsidian-vault/concepts/C-003_Linting.md +19 -0
- ctxverify-0.1.0/pyproject.toml +43 -0
- ctxverify-0.1.0/src/ctxverify/__init__.py +47 -0
- ctxverify-0.1.0/src/ctxverify/__main__.py +8 -0
- ctxverify-0.1.0/src/ctxverify/adapters/__init__.py +14 -0
- ctxverify-0.1.0/src/ctxverify/adapters/generic.py +190 -0
- ctxverify-0.1.0/src/ctxverify/adapters/llmwiki.py +199 -0
- ctxverify-0.1.0/src/ctxverify/adapters/obsidian.py +253 -0
- ctxverify-0.1.0/src/ctxverify/checks/__init__.py +203 -0
- ctxverify-0.1.0/src/ctxverify/checks/actions.py +291 -0
- ctxverify-0.1.0/src/ctxverify/checks/consistency.py +202 -0
- ctxverify-0.1.0/src/ctxverify/checks/duplicates.py +43 -0
- ctxverify-0.1.0/src/ctxverify/checks/freshness.py +102 -0
- ctxverify-0.1.0/src/ctxverify/checks/hygiene.py +147 -0
- ctxverify-0.1.0/src/ctxverify/checks/identity.py +137 -0
- ctxverify-0.1.0/src/ctxverify/checks/links.py +77 -0
- ctxverify-0.1.0/src/ctxverify/checks/orphans.py +43 -0
- ctxverify-0.1.0/src/ctxverify/checks/provenance.py +114 -0
- ctxverify-0.1.0/src/ctxverify/cli.py +357 -0
- ctxverify-0.1.0/src/ctxverify/frontmatter.py +149 -0
- ctxverify-0.1.0/src/ctxverify/loader.py +598 -0
- ctxverify-0.1.0/src/ctxverify/mcp/__init__.py +12 -0
- ctxverify-0.1.0/src/ctxverify/mcp/server.py +279 -0
- ctxverify-0.1.0/src/ctxverify/model.py +531 -0
- ctxverify-0.1.0/src/ctxverify/report.py +252 -0
- ctxverify-0.1.0/src/ctxverify/resolve.py +118 -0
- ctxverify-0.1.0/src/ctxverify/rules.py +258 -0
- ctxverify-0.1.0/src/ctxverify/scaffold.py +85 -0
- ctxverify-0.1.0/src/ctxverify/version.py +1 -0
- ctxverify-0.1.0/src/ctxverify/writer.py +118 -0
- ctxverify-0.1.0/tests/__init__.py +0 -0
- ctxverify-0.1.0/tests/fixtures/llmwiki-project/sources/paper.md +4 -0
- ctxverify-0.1.0/tests/fixtures/llmwiki-project/wiki/concepts/knowledge-compilation.md +16 -0
- ctxverify-0.1.0/tests/fixtures/llmwiki-project/wiki/concepts/uncited.md +11 -0
- ctxverify-0.1.0/tests/test_actions.py +85 -0
- ctxverify-0.1.0/tests/test_adapters.py +116 -0
- ctxverify-0.1.0/tests/test_behaviour.py +237 -0
- ctxverify-0.1.0/tests/test_checks.py +117 -0
- ctxverify-0.1.0/tests/test_cli.py +139 -0
- ctxverify-0.1.0/tests/test_cli_wiring.py +195 -0
- ctxverify-0.1.0/tests/test_docs.py +110 -0
- ctxverify-0.1.0/tests/test_reporting.py +190 -0
- ctxverify-0.1.0/tests/test_resolve.py +75 -0
- ctxverify-0.1.0/tests/test_review_findings.py +474 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Something ctxverify reports that is wrong, or something it fails to report
|
|
4
|
+
title: ""
|
|
5
|
+
labels: bug
|
|
6
|
+
assignees: ""
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
**What happened**
|
|
10
|
+
|
|
11
|
+
A rule fired on a pack it should not have, or a rule stayed silent on a pack
|
|
12
|
+
it should have caught.
|
|
13
|
+
|
|
14
|
+
**The pack**
|
|
15
|
+
|
|
16
|
+
If you can share it, attach the eight files or a link. If not, the smallest
|
|
17
|
+
reproduction you can manage: the claim, the evidence record, and the manifest
|
|
18
|
+
source it points at.
|
|
19
|
+
|
|
20
|
+
**What you ran**
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
ctxv check <pack> --format json
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Paste the JSON output. It names the rule, the severity, the location and the
|
|
27
|
+
hint.
|
|
28
|
+
|
|
29
|
+
**What you expected**
|
|
30
|
+
|
|
31
|
+
**Which version**
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
ctxv --version
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**Anything else**
|
|
38
|
+
|
|
39
|
+
The rule catalogue is in `docs/rules.md`. If a rule is doing something you
|
|
40
|
+
did not expect, the rule id in the output is the fastest way to find its
|
|
41
|
+
documentation.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
blank_issues_enabled: true
|
|
2
|
+
contact_links:
|
|
3
|
+
- name: Context Pack Format (SPEC.md)
|
|
4
|
+
url: https://github.com/arronfly/ctxverify/blob/main/SPEC.md
|
|
5
|
+
about: The format specification, including the version rules and the conformance requirements.
|
|
6
|
+
- name: Rule catalogue
|
|
7
|
+
url: https://github.com/arronfly/ctxverify/blob/main/docs/rules.md
|
|
8
|
+
about: What each of the sixteen rules detects, why it matters, and how to fix what it reports.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: A check, an adapter, or a format change that would make ctxverify more useful
|
|
4
|
+
title: ""
|
|
5
|
+
labels: enhancement
|
|
6
|
+
assignees: ""
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
**What you want to check**
|
|
10
|
+
|
|
11
|
+
The problem you want a rule to catch. A concrete failure mode is worth more
|
|
12
|
+
than a category name.
|
|
13
|
+
|
|
14
|
+
**Why the current rules do not catch it**
|
|
15
|
+
|
|
16
|
+
If one of the existing rules is close but not quite right, say which one and
|
|
17
|
+
where it falls short. `docs/rules.md` lists all sixteen.
|
|
18
|
+
|
|
19
|
+
**What a finding would look like**
|
|
20
|
+
|
|
21
|
+
The rule id, the severity, and roughly the message.
|
|
22
|
+
|
|
23
|
+
**A pack that triggers it**
|
|
24
|
+
|
|
25
|
+
If you have one, that is the most useful thing you can bring.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
name: Test (Python ${{ matrix.python-version }})
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
fail-fast: false
|
|
14
|
+
matrix:
|
|
15
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
16
|
+
steps:
|
|
17
|
+
- name: Check out the repository
|
|
18
|
+
uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
21
|
+
uses: actions/setup-python@v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: ${{ matrix.python-version }}
|
|
24
|
+
|
|
25
|
+
- name: Upgrade pip
|
|
26
|
+
run: python -m pip install --upgrade pip
|
|
27
|
+
|
|
28
|
+
- name: Install the package and dev dependencies
|
|
29
|
+
run: "python -m pip install -e .[dev]"
|
|
30
|
+
|
|
31
|
+
- name: Run the test suite
|
|
32
|
+
env:
|
|
33
|
+
PYTHONPATH: src
|
|
34
|
+
run: |
|
|
35
|
+
python -m unittest discover -s tests -t .
|
|
36
|
+
|
|
37
|
+
- name: Check the example packs
|
|
38
|
+
run: |
|
|
39
|
+
set -e
|
|
40
|
+
PYTHONPATH=src python -m ctxverify check examples/clean-pack
|
|
41
|
+
echo "examples/clean-pack exited 0 as expected"
|
|
42
|
+
|
|
43
|
+
set +e
|
|
44
|
+
PYTHONPATH=src python -m ctxverify check examples/broken-pack
|
|
45
|
+
status=$?
|
|
46
|
+
set -e
|
|
47
|
+
if [ "$status" -ne 1 ]; then
|
|
48
|
+
echo "expected examples/broken-pack to exit 1, got $status"
|
|
49
|
+
exit 1
|
|
50
|
+
fi
|
|
51
|
+
echo "examples/broken-pack exited 1 as expected"
|
|
52
|
+
|
|
53
|
+
- name: Check that the README quotes real output
|
|
54
|
+
run: |
|
|
55
|
+
set -e
|
|
56
|
+
PYTHONPATH=src python -m unittest tests.test_docs -v
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build:
|
|
10
|
+
name: Build the distribution
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- name: Check out the repository
|
|
14
|
+
uses: actions/checkout@v4
|
|
15
|
+
|
|
16
|
+
- name: Set up Python
|
|
17
|
+
uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: "3.12"
|
|
20
|
+
|
|
21
|
+
- name: Install build
|
|
22
|
+
run: python -m pip install --upgrade pip build
|
|
23
|
+
|
|
24
|
+
- name: Build the sdist and wheel
|
|
25
|
+
run: python -m build
|
|
26
|
+
|
|
27
|
+
- name: Store the distribution packages
|
|
28
|
+
uses: actions/upload-artifact@v4
|
|
29
|
+
with:
|
|
30
|
+
name: python-package-distributions
|
|
31
|
+
path: dist/
|
|
32
|
+
|
|
33
|
+
publish:
|
|
34
|
+
name: Publish to PyPI
|
|
35
|
+
needs: build
|
|
36
|
+
runs-on: ubuntu-latest
|
|
37
|
+
environment:
|
|
38
|
+
name: pypi
|
|
39
|
+
url: https://pypi.org/p/ctxverify
|
|
40
|
+
permissions:
|
|
41
|
+
id-token: write
|
|
42
|
+
steps:
|
|
43
|
+
- name: Download the distribution packages
|
|
44
|
+
uses: actions/download-artifact@v4
|
|
45
|
+
with:
|
|
46
|
+
name: python-package-distributions
|
|
47
|
+
path: dist/
|
|
48
|
+
|
|
49
|
+
# Trusted publishing: configure this repository and workflow as a
|
|
50
|
+
# trusted publisher on PyPI. No API token is stored in the repository.
|
|
51
|
+
- name: Publish to PyPI
|
|
52
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# The ctxverify hook expects a pack directory, not a list of files, so it is
|
|
2
|
+
# invoked with `args: [<pack path>]` in the consuming repository's
|
|
3
|
+
# .pre-commit-config.yaml. The path defaults to the current directory when no
|
|
4
|
+
# argument is given.
|
|
5
|
+
#
|
|
6
|
+
# The `files` pattern below matches the pack's own files. Adjust it to point at
|
|
7
|
+
# your pack directory; pre-commit applies it to the changed paths, and the
|
|
8
|
+
# hook itself is told which directory to check through `args`.
|
|
9
|
+
- id: ctxverify
|
|
10
|
+
name: ctxverify — check the context pack
|
|
11
|
+
entry: ctxv check
|
|
12
|
+
language: python
|
|
13
|
+
files: \.(json|jsonl)$
|
|
14
|
+
pass_filenames: false
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.1.0] - 2026-11-05
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- The 16 rules of the first release:
|
|
15
|
+
- `pack.structure` — Pack files are present and parseable
|
|
16
|
+
- `provenance.missing` — Claims are backed by evidence
|
|
17
|
+
- `provenance.dangling` — Evidence points at things that exist
|
|
18
|
+
- `provenance.quote` — Quotes are present and untampered
|
|
19
|
+
- `links.broken` — Links resolve to real files
|
|
20
|
+
- `ids.duplicate` — Identifiers are unique
|
|
21
|
+
- `ids.collision` — Numbered files do not collide
|
|
22
|
+
- `status.inconsistent` — Claim status matches its evidence
|
|
23
|
+
- `contradiction.unresolved` — Contradictions are tracked and closed
|
|
24
|
+
- `freshness.stale` — Claims are still fresh
|
|
25
|
+
- `duplicate.claim` — The same fact is not stated twice
|
|
26
|
+
- `orphan.source` — Sources are used
|
|
27
|
+
- `orphan.entity` — Entities are used
|
|
28
|
+
- `hygiene.secret` — No credentials in the pack
|
|
29
|
+
- `hygiene.pii` — No personal contact details in the pack
|
|
30
|
+
- `action.unverified` — Reported actions really happened
|
|
31
|
+
- CLI commands: `check`, `init`, `export obsidian`, `export llmwiki`,
|
|
32
|
+
`verify-actions`, `rules`, and `mcp`.
|
|
33
|
+
- Output formats for `check`: text, JSON and SARIF; `verify-actions` emits
|
|
34
|
+
text or JSON.
|
|
35
|
+
- Adapters for Obsidian vaults and llmwiki projects.
|
|
36
|
+
- An MCP server over stdio with four tools: `check_pack`, `list_claims`,
|
|
37
|
+
`get_claim` and `verify_actions`.
|
|
38
|
+
- The action verifier, which checks an agent's reported actions against the
|
|
39
|
+
filesystem.
|
|
40
|
+
- The exit code contract: `0` for a clean pack, `1` for blocking findings
|
|
41
|
+
(including warnings and info under `--strict`), and `2` when the pack cannot
|
|
42
|
+
be read or the invocation is unusable.
|
|
43
|
+
|
|
44
|
+
### Notes
|
|
45
|
+
|
|
46
|
+
0.1.0 is the first public release. The Context Pack Format version is 0.1.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Contributing to ctxverify
|
|
2
|
+
|
|
3
|
+
## Setup
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
python -m venv .venv
|
|
7
|
+
source .venv/bin/activate
|
|
8
|
+
pip install -e ".[dev]"
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
ctxverify itself has no runtime dependencies. The `dev` extra installs the test
|
|
12
|
+
dependencies only.
|
|
13
|
+
|
|
14
|
+
## Running the tests
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
PYTHONPATH=src python -m unittest discover -s tests -t .
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
To check the bundled examples after a change:
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
PYTHONPATH=src python -m ctxverify check examples/clean-pack
|
|
24
|
+
PYTHONPATH=src python -m ctxverify check examples/broken-pack
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The first must exit 0 and the second must exit 1.
|
|
28
|
+
|
|
29
|
+
## Adding a new check
|
|
30
|
+
|
|
31
|
+
1. Implement the check in `src/ctxverify/checks/`, decorated with
|
|
32
|
+
`@register("<rule id>")`.
|
|
33
|
+
2. Import the module at the bottom of `src/ctxverify/checks/__init__.py` so the
|
|
34
|
+
decorator runs.
|
|
35
|
+
3. Add the rule to `RULES` in `src/ctxverify/rules.py` with the same stable id,
|
|
36
|
+
a severity, a category, a title and a one-line description. Rule ids are part
|
|
37
|
+
of the public contract: CI configurations select rules by id, so do not
|
|
38
|
+
rename an id once it has shipped.
|
|
39
|
+
4. Add a test under `tests/` that fails before the check and passes after it.
|
|
40
|
+
5. Document the rule in `docs/rules.md`.
|
|
41
|
+
|
|
42
|
+
## Changing the format
|
|
43
|
+
|
|
44
|
+
The format version is `FORMAT_VERSION` in `src/ctxverify/model.py`.
|
|
45
|
+
|
|
46
|
+
- Bump it whenever the meaning of a file, a field or a status changes.
|
|
47
|
+
- Add the new version to `SUPPORTED_FORMAT_VERSIONS`.
|
|
48
|
+
- Keep old versions readable. A pack written against an older version must
|
|
49
|
+
still load, and unknown keys are preserved rather than rejected, so an older
|
|
50
|
+
linter can check a newer pack.
|
|
51
|
+
- Update `SPEC.md` and the version noted in `CHANGELOG.md`.
|
|
52
|
+
|
|
53
|
+
## Commits and pull requests
|
|
54
|
+
|
|
55
|
+
- One logical change per commit. Use an imperative subject line of 72
|
|
56
|
+
characters or fewer, prefixed with the area touched, for example
|
|
57
|
+
`checks: reject empty evidence quotes`.
|
|
58
|
+
- Run the tests and check both example packs before opening a pull request.
|
|
59
|
+
- Describe what changed and why in the pull request body. Link the issue if
|
|
60
|
+
there is one.
|
|
61
|
+
- Do not bump the version or edit released sections of `CHANGELOG.md` in a
|
|
62
|
+
feature pull request; releases are cut separately.
|
|
63
|
+
- By contributing you agree that your contribution is licensed under the
|
|
64
|
+
Apache License, Version 2.0, the same license as the code.
|
ctxverify-0.1.0/LICENSE
ADDED
|
@@ -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.
|