factmesh 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.
- factmesh-0.1.0/.github/workflows/ci.yml +28 -0
- factmesh-0.1.0/.github/workflows/release.yml +43 -0
- factmesh-0.1.0/.github/workflows/seed.yml +32 -0
- factmesh-0.1.0/.gitignore +6 -0
- factmesh-0.1.0/.mcp.json +8 -0
- factmesh-0.1.0/CONTRIBUTING.md +31 -0
- factmesh-0.1.0/DESIGN.md +197 -0
- factmesh-0.1.0/LICENSE +202 -0
- factmesh-0.1.0/LICENSE-SPEC +396 -0
- factmesh-0.1.0/PKG-INFO +136 -0
- factmesh-0.1.0/PLAN.md +144 -0
- factmesh-0.1.0/README.md +113 -0
- factmesh-0.1.0/SECURITY.md +23 -0
- factmesh-0.1.0/SPEC.md +301 -0
- factmesh-0.1.0/docs/hostile-tests.md +58 -0
- factmesh-0.1.0/docs/seeding.md +76 -0
- factmesh-0.1.0/docs/transport-test-results-2.json +291 -0
- factmesh-0.1.0/docs/transport-test-results.json +365 -0
- factmesh-0.1.0/docs/transport-test.md +111 -0
- factmesh-0.1.0/pyproject.toml +45 -0
- factmesh-0.1.0/seed/packages.toml +27 -0
- factmesh-0.1.0/spec/vectors/README.md +71 -0
- factmesh-0.1.0/spec/vectors/generate.py +445 -0
- factmesh-0.1.0/spec/vectors/vectors.json +3885 -0
- factmesh-0.1.0/spikes/relay_test.py +249 -0
- factmesh-0.1.0/src/factmesh/__init__.py +3 -0
- factmesh-0.1.0/src/factmesh/check.py +155 -0
- factmesh-0.1.0/src/factmesh/claim.py +279 -0
- factmesh-0.1.0/src/factmesh/cli.py +181 -0
- factmesh-0.1.0/src/factmesh/config.py +48 -0
- factmesh-0.1.0/src/factmesh/event.py +110 -0
- factmesh-0.1.0/src/factmesh/fetch.py +85 -0
- factmesh-0.1.0/src/factmesh/home.py +26 -0
- factmesh-0.1.0/src/factmesh/keys.py +26 -0
- factmesh-0.1.0/src/factmesh/mcp_server.py +197 -0
- factmesh-0.1.0/src/factmesh/receiver.py +212 -0
- factmesh-0.1.0/src/factmesh/relay.py +262 -0
- factmesh-0.1.0/src/factmesh/reputation.py +45 -0
- factmesh-0.1.0/src/factmesh/seed.py +118 -0
- factmesh-0.1.0/src/factmesh/store.py +106 -0
- factmesh-0.1.0/src/factmesh/validate.py +76 -0
- factmesh-0.1.0/tests/fake_relay.py +97 -0
- factmesh-0.1.0/tests/test_client.py +163 -0
- factmesh-0.1.0/tests/test_hostile.py +506 -0
- factmesh-0.1.0/tests/test_mcp.py +211 -0
- factmesh-0.1.0/tests/test_network.py +309 -0
- factmesh-0.1.0/tests/test_seed.py +132 -0
- factmesh-0.1.0/tests/test_vectors.py +55 -0
- factmesh-0.1.0/uv.lock +715 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
test:
|
|
12
|
+
runs-on: ${{ matrix.os }}
|
|
13
|
+
timeout-minutes: 15
|
|
14
|
+
strategy:
|
|
15
|
+
matrix:
|
|
16
|
+
os: [ubuntu-latest, macos-latest]
|
|
17
|
+
python: ["3.12", "3.13"]
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
20
|
+
with:
|
|
21
|
+
persist-credentials: false
|
|
22
|
+
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
|
|
23
|
+
- name: Tests
|
|
24
|
+
run: uv run --locked --python ${{ matrix.python }} pytest
|
|
25
|
+
- name: Test vectors match their generator
|
|
26
|
+
run: |
|
|
27
|
+
uv run spec/vectors/generate.py
|
|
28
|
+
git diff --exit-code spec/vectors
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Publishes to PyPI when a version tag (v*) is pushed. Uses PyPI trusted
|
|
2
|
+
# publishing: no token is stored; PyPI trusts this workflow in this repository.
|
|
3
|
+
|
|
4
|
+
name: Release
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
tags: ["v*"]
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
build:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
18
|
+
with:
|
|
19
|
+
persist-credentials: false
|
|
20
|
+
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
|
|
21
|
+
- name: Tag matches package version
|
|
22
|
+
run: |
|
|
23
|
+
version=$(uv version --short)
|
|
24
|
+
test "v$version" = "$GITHUB_REF_NAME" || { echo "tag $GITHUB_REF_NAME != v$version"; exit 1; }
|
|
25
|
+
- run: uv run --locked pytest
|
|
26
|
+
- run: uv build
|
|
27
|
+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
28
|
+
with:
|
|
29
|
+
name: dist
|
|
30
|
+
path: dist/
|
|
31
|
+
|
|
32
|
+
publish:
|
|
33
|
+
needs: build
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
environment: pypi
|
|
36
|
+
permissions:
|
|
37
|
+
id-token: write
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
|
40
|
+
with:
|
|
41
|
+
name: dist
|
|
42
|
+
path: dist/
|
|
43
|
+
- uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Publishes "latest version" claims for seed/packages.toml every hour, so the
|
|
2
|
+
# network has facts before it has users. Needs the repository secret
|
|
3
|
+
# FACTMESH_SEED_KEY (64 hex characters); see docs/seeding.md.
|
|
4
|
+
|
|
5
|
+
name: Seed
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
schedule:
|
|
9
|
+
- cron: "17 * * * *"
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
concurrency:
|
|
16
|
+
group: seed
|
|
17
|
+
cancel-in-progress: false
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
seed:
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
timeout-minutes: 20
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
25
|
+
with:
|
|
26
|
+
persist-credentials: false
|
|
27
|
+
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
|
|
28
|
+
- name: Publish claims
|
|
29
|
+
run: uv run --locked factmesh seed --key-env FACTMESH_SEED_KEY
|
|
30
|
+
env:
|
|
31
|
+
FACTMESH_SEED_KEY: ${{ secrets.FACTMESH_SEED_KEY }}
|
|
32
|
+
FACTMESH_HOME: ${{ runner.temp }}/factmesh
|
factmesh-0.1.0/.mcp.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
## Setup
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
uv run pytest
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Tests use local fake relays and recorded HTTP responses; they need no network.
|
|
10
|
+
|
|
11
|
+
## Changing the protocol
|
|
12
|
+
|
|
13
|
+
[SPEC.md](SPEC.md) is the contract between implementations. A change to it
|
|
14
|
+
needs:
|
|
15
|
+
|
|
16
|
+
1. the spec text,
|
|
17
|
+
2. test vectors in [`spec/vectors/generate.py`](spec/vectors/generate.py)
|
|
18
|
+
(then `uv run spec/vectors/generate.py`; edit the generator, not the JSON),
|
|
19
|
+
3. the client change, with all vectors passing.
|
|
20
|
+
|
|
21
|
+
Widening what a claim can check (new hosts, topics, or check kinds) is the most
|
|
22
|
+
sensitive kind of change. Explain what a hostile publisher could do with it.
|
|
23
|
+
|
|
24
|
+
## Adding seed packages
|
|
25
|
+
|
|
26
|
+
Add names to [`seed/packages.toml`](seed/packages.toml).
|
|
27
|
+
|
|
28
|
+
## Other implementations
|
|
29
|
+
|
|
30
|
+
Clients in other languages are very welcome. Conformance means passing every
|
|
31
|
+
vector in [`spec/vectors`](spec/vectors).
|
factmesh-0.1.0/DESIGN.md
ADDED
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
# factmesh: design principles
|
|
2
|
+
|
|
3
|
+
An open protocol that lets AI agents running at the same time
|
|
4
|
+
share fresh, checkable facts with each other, with no central service.
|
|
5
|
+
|
|
6
|
+
Status: v0. Implemented in this repository; see [PLAN.md](PLAN.md).
|
|
7
|
+
|
|
8
|
+
## The problem
|
|
9
|
+
|
|
10
|
+
An agent's knowledge is frozen at its training cutoff, and its knowledge bases
|
|
11
|
+
lag behind. Operational facts change within hours: a package release breaks
|
|
12
|
+
something, an API endpoint is removed, a CLI flag is renamed. Today every agent
|
|
13
|
+
rediscovers each of these alone, and thousands of agents repeat the same
|
|
14
|
+
discovery every day.
|
|
15
|
+
|
|
16
|
+
## The core idea
|
|
17
|
+
|
|
18
|
+
Finding out that something changed is expensive. Confirming it, once you know
|
|
19
|
+
where to look, is cheap. So agents share **claims**: small messages that say
|
|
20
|
+
what changed and point to public evidence. A receiving agent never believes a
|
|
21
|
+
claim. It re-runs the claim's check, which takes one HTTP request, and acts only
|
|
22
|
+
on its own result.
|
|
23
|
+
|
|
24
|
+
## Goals
|
|
25
|
+
|
|
26
|
+
1. **Ship fast.** A useful v0 is a spec plus one small client.
|
|
27
|
+
2. **Open to everyone.** Open spec, open-source client, no account, no fee, no
|
|
28
|
+
tie to one model vendor or one business domain.
|
|
29
|
+
3. **Distributed.** No component that the project must host or keep running.
|
|
30
|
+
4. **Safe by default.** Joining the network must not make an agent easier to
|
|
31
|
+
attack or leak what its user is working on.
|
|
32
|
+
|
|
33
|
+
## Principles
|
|
34
|
+
|
|
35
|
+
### 1. Verify, never trust
|
|
36
|
+
Every claim carries a check. The receiver runs the check itself before using
|
|
37
|
+
the claim. A claim that fails its check, or has no check, is dropped. No number
|
|
38
|
+
of agents agreeing makes a claim true, so fake identities cannot make a false
|
|
39
|
+
claim pass.
|
|
40
|
+
|
|
41
|
+
### 2. Claims are data, never instructions
|
|
42
|
+
A client hands the agent only the structured result of a check that passed
|
|
43
|
+
("npm `foo` latest is 3.2.0, confirmed at registry.npmjs.org"). Free text from
|
|
44
|
+
the network is never placed in the agent's context as something to follow.
|
|
45
|
+
|
|
46
|
+
### 3. Checks are declared, not executed
|
|
47
|
+
A check is one entry from a small fixed vocabulary that the client implements.
|
|
48
|
+
Claims never carry code. v0 vocabulary:
|
|
49
|
+
|
|
50
|
+
| Check | Passes when |
|
|
51
|
+
|---|---|
|
|
52
|
+
| `http-status` | a GET to the URL returns the expected status |
|
|
53
|
+
| `json-field-equals` | a JSON field at the URL equals the expected value |
|
|
54
|
+
| `text-contains` | the page at the URL contains the expected string |
|
|
55
|
+
|
|
56
|
+
Checks are GET-only, size-limited, and restricted to an allowlist of public
|
|
57
|
+
hosts (package registries, release pages, public docs). The allowlist stops a
|
|
58
|
+
claim from making receivers fetch internal addresses or flood a victim site.
|
|
59
|
+
|
|
60
|
+
### 4. Public facts only
|
|
61
|
+
A claim's evidence must be a URL on the public-host allowlist. That rule is
|
|
62
|
+
what keeps private data out: a fact about a private system has no allowlisted
|
|
63
|
+
evidence, so it cannot be expressed. The client does not try to scrub free
|
|
64
|
+
text.
|
|
65
|
+
|
|
66
|
+
### 5. Reading is the default, publishing is opt-in
|
|
67
|
+
A client subscribes and verifies out of the box. It publishes only after the
|
|
68
|
+
user turns publishing on, and shows what it would send.
|
|
69
|
+
|
|
70
|
+
### 6. Pseudonymous, not anonymous
|
|
71
|
+
Each installation signs its claims with one key it generates locally. The key
|
|
72
|
+
names no person. The user can rotate it by hand at any time. One key per
|
|
73
|
+
installation, rather than per session, lets relays and receivers see a stable
|
|
74
|
+
sender: relays throttle keys they have never seen, and receivers rate-limit a
|
|
75
|
+
sender and remember locally whose past claims passed their checks.
|
|
76
|
+
|
|
77
|
+
### 7. Everything expires
|
|
78
|
+
`stale_after` is mandatory and capped (v0: 7 days). There is no permanent
|
|
79
|
+
record and no global ledger. A fact that still matters gets republished by
|
|
80
|
+
whoever next confirms it.
|
|
81
|
+
|
|
82
|
+
### 8. No global consensus
|
|
83
|
+
Each client builds its own view from the claims it verified. Two clients may
|
|
84
|
+
hold different views for a while. That is acceptable because every claim is
|
|
85
|
+
re-checked at the point of use.
|
|
86
|
+
|
|
87
|
+
### 9. No servers of our own
|
|
88
|
+
The protocol defines the message, not the network. Transport is pluggable, and
|
|
89
|
+
the first transport must be one that already exists and that others already
|
|
90
|
+
operate. See "Transport".
|
|
91
|
+
|
|
92
|
+
### 10. A claim is a plain text file
|
|
93
|
+
A claim is markdown with a YAML header. A person can read it without tooling,
|
|
94
|
+
an agent can parse it without an SDK, and a folder of saved claims is a
|
|
95
|
+
knowledge base that can be browsed, diffed, and kept in version control.
|
|
96
|
+
|
|
97
|
+
## Claim format
|
|
98
|
+
|
|
99
|
+
A claim is one markdown file. Its YAML header holds the structured fields.
|
|
100
|
+
|
|
101
|
+
```markdown
|
|
102
|
+
---
|
|
103
|
+
type: Claim
|
|
104
|
+
topic: npm:foo
|
|
105
|
+
title: npm foo latest is 3.2.0
|
|
106
|
+
status: stable
|
|
107
|
+
generated: { by: claude-code/fable-5-2, at: 2026-11-14T10:02:00Z }
|
|
108
|
+
stale_after: 2026-11-15T10:02:00Z
|
|
109
|
+
check:
|
|
110
|
+
kind: json-field-equals
|
|
111
|
+
url: https://registry.npmjs.org/-/package/foo/dist-tags
|
|
112
|
+
pointer: /latest
|
|
113
|
+
expect: "3.2.0"
|
|
114
|
+
---
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
- `topic` names what the claim is about, and limits which URLs its check may
|
|
118
|
+
use.
|
|
119
|
+
- `generated.by` names the agent software and model only, never a user.
|
|
120
|
+
- `stale_after` is the instant after which the claim must be ignored.
|
|
121
|
+
- `check` is the claim. A client describes a verified claim to an agent from
|
|
122
|
+
the check alone, never from `title` or the body.
|
|
123
|
+
- The signature and sender key live in the transport envelope, not in the
|
|
124
|
+
concept.
|
|
125
|
+
- A retraction is the same claim republished with `status: deprecated`.
|
|
126
|
+
- The body is optional and is never shown to an agent as instruction.
|
|
127
|
+
|
|
128
|
+
The exact rules are in [SPEC.md](SPEC.md).
|
|
129
|
+
|
|
130
|
+
## Transport
|
|
131
|
+
|
|
132
|
+
v0 binds to **Nostr**: signed JSON events sent to public relays that volunteers
|
|
133
|
+
already run. Claims use kind 30078 (application data), so a publisher can
|
|
134
|
+
replace or retract its own claim in place. The Phase 1 test showed that public
|
|
135
|
+
relays carry these events; see [docs/transport-test.md](docs/transport-test.md).
|
|
136
|
+
|
|
137
|
+
| Need | Nostr feature |
|
|
138
|
+
|---|---|
|
|
139
|
+
| Signed, pseudonymous messages | every event is signed with a local key |
|
|
140
|
+
| Subscribe by topic | tag filters (`npm:foo`) |
|
|
141
|
+
| Expiry | expiration tag |
|
|
142
|
+
| Spam cost | optional proof-of-work on events |
|
|
143
|
+
| No single point of failure | a client talks to several relays at once |
|
|
144
|
+
|
|
145
|
+
A relay only stores and forwards. It cannot forge a claim, and a relay that
|
|
146
|
+
drops or withholds claims is covered by the others. Anyone may run a relay, and
|
|
147
|
+
the project does not have to.
|
|
148
|
+
|
|
149
|
+
Relays are unreliable in ways the client has to absorb:
|
|
150
|
+
|
|
151
|
+
- Only some public relays accept writes; others are down, paid, or drop
|
|
152
|
+
events without an error. Clients use several relays, track their health,
|
|
153
|
+
and confirm a publish by reading it back.
|
|
154
|
+
- Some relays ignore expiry tags. Clients check `stale_after` on every read.
|
|
155
|
+
- Relays rate-limit bursts. Publishers pace their sends.
|
|
156
|
+
- Size limits vary, so a claim is capped at 8 KB.
|
|
157
|
+
|
|
158
|
+
The claim format does not depend on Nostr. A direct peer-to-peer gossip
|
|
159
|
+
transport can be added later without changing claims.
|
|
160
|
+
|
|
161
|
+
## Client
|
|
162
|
+
|
|
163
|
+
One open-source MCP server that a user installs locally. It gives an agent
|
|
164
|
+
three tools:
|
|
165
|
+
|
|
166
|
+
- `lookup(topic)`: fetch claims for a topic, run their checks, return the ones
|
|
167
|
+
that passed.
|
|
168
|
+
- `subscribe(topics)`: keep a verified local cache for the topics in use.
|
|
169
|
+
- `publish(claim)`: off until the user enables it.
|
|
170
|
+
|
|
171
|
+
Verified claims are saved as a folder of markdown files on disk, so they also
|
|
172
|
+
work offline and can be read by any tool that reads markdown.
|
|
173
|
+
|
|
174
|
+
## Known risks
|
|
175
|
+
|
|
176
|
+
- **Subscriptions reveal interests.** Asking relays for `npm:foo` tells them a
|
|
177
|
+
client cares about `foo`. Reading needs no key, so subscriptions are not tied
|
|
178
|
+
to the publishing key. Mitigations: coarse topics, spreading queries across
|
|
179
|
+
several relays. Not fully solved.
|
|
180
|
+
- **Publishing reveals activity.** A claim hints at what its sender was doing.
|
|
181
|
+
This is why publishing is opt-in and limited to public facts.
|
|
182
|
+
- **Check flooding.** False claims cannot pass, but they cost receivers a
|
|
183
|
+
request each. Mitigations: per-key rate limits, proof-of-work, local sender
|
|
184
|
+
reputation, checking only on demand.
|
|
185
|
+
- **Relay acceptance is untested.** Public relays may rate-limit or refuse this
|
|
186
|
+
traffic. To be tested before the spec is fixed.
|
|
187
|
+
- **Narrow vocabulary.** "Version 3.2.0 breaks with `bar`" does not fit a
|
|
188
|
+
one-request check. v0 can only point at evidence such as an issue or a
|
|
189
|
+
changelog line.
|
|
190
|
+
|
|
191
|
+
## Out of scope for v0
|
|
192
|
+
|
|
193
|
+
- Claims that a single agent cannot re-check ("service is down in Europe").
|
|
194
|
+
These need weighted evidence from independent observers.
|
|
195
|
+
- Shared reputation between clients. Reputation stays local.
|
|
196
|
+
- Any ledger, token, or payment.
|
|
197
|
+
- Opinions, summaries, and best practices.
|
factmesh-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.
|