heimdall-code 0.1.0__py3-none-any.whl

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.
@@ -0,0 +1,293 @@
1
+ Metadata-Version: 2.4
2
+ Name: heimdall-code
3
+ Version: 0.1.0
4
+ Summary: A code knowledge graph that sees everything -- indexes any repository into a SQLite property graph and serves it to AI agents over MCP.
5
+ Project-URL: Homepage, https://github.com/stPhoenix/heimdall
6
+ Project-URL: Source, https://github.com/stPhoenix/heimdall
7
+ Project-URL: Issues, https://github.com/stPhoenix/heimdall/issues
8
+ License-Expression: Apache-2.0
9
+ License-File: LICENSE
10
+ Keywords: code-intelligence,knowledge-graph,mcp,static-analysis,tree-sitter
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Topic :: Software Development :: Libraries
15
+ Requires-Python: >=3.12
16
+ Requires-Dist: mcp>=1.2
17
+ Requires-Dist: tree-sitter-language-pack>=1.13
18
+ Requires-Dist: tree-sitter>=0.25
19
+ Description-Content-Type: text/markdown
20
+
21
+ # Heimdall
22
+
23
+ **A code knowledge graph that sees everything.**
24
+
25
+ Heimdall indexes any repository into a property graph — every symbol, call, import and
26
+ inheritance edge — then serves it to coding agents over MCP so they can answer
27
+ *"what calls this?"*, *"what breaks if I change it?"* and *"how does A reach B?"*
28
+ without grepping the whole tree.
29
+
30
+ Apache-2.0. No server, no cloud, no embedded graph engine. **The graph is a SQLite file.**
31
+
32
+ ```console
33
+ $ heimdall index ~/code/django
34
+ pass 1/4 discovering files
35
+ 2974 source files
36
+ pass 2/4 parsing (24 workers)
37
+ pass 3/4 building graph
38
+ pass 4/4 building search index
39
+ done in 1.49s # 43,482 symbols, 353,101 edges
40
+
41
+ $ heimdall impact django/shortcuts.py:get_object_or_404 -d 2 -c 0.7
42
+ impact of django/shortcuts.py:get_object_or_404: 6 symbols, 4 files
43
+
44
+ depth 1 (5):
45
+ Function django/contrib/flatpages/views.py:flatpage (0.80)
46
+ django/contrib/flatpages/views.py:22
47
+ ...
48
+
49
+ $ heimdall trace flatpage HttpResponse
50
+ path of length 2:
51
+ -> django/contrib/flatpages/views.py:flatpage
52
+ -> django/contrib/flatpages/views.py:render_flatpage
53
+ -> django/http/response.py:HttpResponse
54
+ ```
55
+
56
+ A second and a half, cold, for the whole of Django on a laptop.
57
+
58
+ ## Why
59
+
60
+ [GitNexus](https://github.com/abhigyanpatwari/GitNexus) showed that agents work far better
61
+ with a precomputed structural index than with raw search. Heimdall takes that idea and
62
+ rebuilds it from scratch under **Apache-2.0**, in Python, on a much lazier stack:
63
+
64
+ | | GitNexus 1.6.9 | Heimdall |
65
+ |---|---|---|
66
+ | License | PolyForm Noncommercial | Apache-2.0 |
67
+ | Graph store | LadybugDB (native + WASM) | `sqlite3` (stdlib) |
68
+ | Traversal | Cypher engine | recursive CTEs |
69
+ | Search | BM25 + embeddings + RRF | FTS5 BM25 (stdlib) |
70
+ | Runtime | Node.js / browser WASM | CPython |
71
+ | Dependencies | 33 | **2** (tree-sitter, mcp) |
72
+ | Ingestion | 15 phases | 4 passes |
73
+
74
+ GitNexus is the larger tool and does things Heimdall does not: a program dependence graph
75
+ and taint analysis, API route and DI extraction, cross-repository contract graphs, MRO
76
+ resolution, embeddings, a web UI. If you need those, use it — the honest comparison is in
77
+ [bench/README.md](bench/README.md), not in this table. The same goes for graphify, which
78
+ indexes docs, images and video into the same graph and has an LLM extraction pass on top;
79
+ only its AST code extraction is measured here, because that is the part an `ast` oracle
80
+ can adjudicate.
81
+
82
+ Heimdall's bet is narrower: that the structural core of that idea fits in
83
+ `sqlite3` + tree-sitter, and that everything traversal and ranking needs is already in the
84
+ standard library. Measured on the same repository — [Django](https://github.com/django/django),
85
+ 2,927 Python files — graded by an independent CPython `ast` oracle, against GitNexus and
86
+ against [graphify](https://pypi.org/project/graphifyy/) in its AST-only mode:
87
+
88
+ | | Heimdall | GitNexus | graphify |
89
+ |---|---|---|---|
90
+ | `self.m()` bound correctly | 100.0% | 97.1% | 92.6% |
91
+ | same-file call bound correctly | 100.0% | 93.4% | 89.3% |
92
+ | imported call bound correctly | 99.7% | 71.5% | 75.4% |
93
+ | class instantiation, same file / imported | 99.5% / 98.8% | not modelled | 95.2% / 98.2% |
94
+ | mean targets emitted per call | 1.00–1.06 | 1.00 | 1.00 |
95
+ | edges the referee can refute outright | **0** of 157,036 | 0 of 23,736 | 202 of 30,882 |
96
+ | live symbols wrongly shown as uncalled | **1** (0.0%) | 1,373 (29.4%) | 205 (4.4%) |
97
+ | hand-written edge cases missed or fabricated | **1** of 13 | 4 of 13 | 3 of 13 |
98
+ | *who calls `Model.check`*, precision | 94% | 0% | 95% |
99
+ | index from scratch | **1.7 s** | 23.0 s | 28.8 s |
100
+ | index on disk | **48 MB** | 642 MB | 151 MB |
101
+ | `impact X` from cold | **56 ms** | 949 ms | 856 ms |
102
+
103
+ Six of those Heimdall numbers only got there because the benchmark existed. It found that
104
+ imports were resolved file-wide rather than per-scope, that a Python `pkg/main.py`
105
+ registered as `pkg` only, that `as` renames were never followed, that a class name used as
106
+ a receiver was ignored, that recursion produced no edge, and — the moment the benchmark
107
+ moved to Django — that `@decorator(...)` was booked against the enclosing class instead of
108
+ the function it wraps, which alone cost 26% of imported-call recall. All fixed, all covered
109
+ by a test. See [bench/README.md](bench/README.md) for the oracle, the 31 cases, and the
110
+ caveats — including the ones that do not flatter us.
111
+
112
+ ## Install
113
+
114
+ ```console
115
+ uv tool install heimdall-code # or: pip install heimdall-code
116
+ heimdall install # wire it into every agent on this machine
117
+ ```
118
+
119
+ Or nothing at all: `uvx heimdall-code index .`. The distribution is `heimdall-code`
120
+ because an unrelated `heimdall` already sits on PyPI; the command is `heimdall`.
121
+
122
+ Python 3.12+. Two dependencies: `tree-sitter-language-pack` for parsing and `mcp` for
123
+ the server. Everything else is the standard library.
124
+
125
+ ## Use
126
+
127
+ ```console
128
+ heimdall index [PATH] # build .heimdall/graph.db (idempotent, re-run any time)
129
+ heimdall search "retry backoff" # BM25 ranked symbols
130
+ heimdall context MyClass.method # definition, callers, callees, members, supertypes
131
+ heimdall impact process_batch # blast radius, grouped by call depth
132
+ heimdall trace main save_to_s3 # shortest path between two symbols
133
+ heimdall stats # what is in the graph
134
+ heimdall sql "SELECT ..." # read-only SQL escape hatch
135
+ heimdall projects # every repo you have indexed
136
+ heimdall install [claude|codex] # register with an agent, as MCP or as a CLI skill
137
+ ```
138
+
139
+ Every command takes `--json` for machine consumption and `-p/--project NAME` to query a
140
+ repository other than the current directory.
141
+
142
+ ## MCP
143
+
144
+ Indexing registers the repository in `~/.heimdall/registry.json`, so **one** MCP server
145
+ serves all of them. `heimdall install` writes that server into whichever agents you name:
146
+
147
+ | | writes |
148
+ |---|---|
149
+ | `heimdall install` | both of the below, whichever are present |
150
+ | `heimdall install claude` | `~/.claude.json` |
151
+ | `heimdall install claude --project` | `./.mcp.json`, committed with the repo |
152
+ | `heimdall install codex` | `~/.codex/config.toml` |
153
+ | `heimdall install codex --project` | `./.codex/config.toml` — Codex reads it once the project is trusted |
154
+ | `heimdall install … --cli` | the [skill](skills/heimdall/SKILL.md) instead of the server, so the agent drives the CLI: `~/.claude/skills/heimdall/`, `~/.agents/skills/heimdall/` |
155
+
156
+ The command written is the copy of heimdall that ran the install, or
157
+ `uvx --from heimdall-code heimdall mcp` when that copy is a throwaway `uvx` environment
158
+ that uv would later collect. Your other settings are merged around it, and a config file
159
+ that does not parse is reported rather than replaced.
160
+
161
+ ### As a Claude Code plugin
162
+
163
+ ```console
164
+ /plugin marketplace add stPhoenix/heimdall
165
+ /plugin install heimdall
166
+ ```
167
+
168
+ Server and skill, no Python install — the plugin's `.mcp.json` runs it through `uvx`.
169
+
170
+ <details>
171
+ <summary>Raw config for other clients</summary>
172
+
173
+ ```json
174
+ {
175
+ "mcpServers": {
176
+ "heimdall": { "command": "heimdall", "args": ["mcp"] }
177
+ }
178
+ }
179
+ ```
180
+ </details>
181
+
182
+ | Tool | Answers |
183
+ |---|---|
184
+ | `overview` | What is this repo? Languages, hot files, entry points |
185
+ | `search` | Where is the thing called roughly *this*? |
186
+ | `context` | Definition, members, callers, callees, supertypes of one symbol |
187
+ | `impact` | What breaks if I change this? Grouped by call depth |
188
+ | `trace` | How does A reach B? |
189
+ | `read_symbol` | The source of one function, not the whole file |
190
+ | `sql` | Anything else — the schema is two tables |
191
+ | `projects` | Which repos are indexed |
192
+
193
+ Every tool takes an optional `project` argument, so an agent can reason across
194
+ repositories in one session. Results are compact JSON, and any truncation is reported
195
+ in the payload rather than silently applied.
196
+
197
+ ## How it works
198
+
199
+ Four passes, all precomputed at index time so a query is one SQL statement:
200
+
201
+ 1. **discover** — `git ls-files` when the repo is a git checkout (so `.gitignore` is
202
+ honoured for free), a filtered walk otherwise.
203
+ 2. **parse** — tree-sitter, one process per core. Symbols, calls, imports and heritage
204
+ clauses come out of a *data table* of node types per language, not per-language code.
205
+ A decorator counts as a call by the function it wraps, so `@override_settings(...)`
206
+ puts the test in that helper's blast radius.
207
+ 3. **resolve** — imports are matched by longest dotted-suffix, per scope, so a function
208
+ with its own `from x import y` is not resolved against the whole file. `as` renames are
209
+ followed home, but only when the import landed inside the repo, so `from asyncio import
210
+ run as arun` cannot become a call to your own `run`. Calls are matched by name and
211
+ scored: same file `0.95`, imported file `0.80`, globally unique `0.70`, ambiguous
212
+ `0.30`. Once any candidate has real evidence behind it the name-only matches are
213
+ dropped rather than listed. Confidence is stored on the edge so callers can filter.
214
+ 4. **index** — FTS5 over names, qualified names and signatures.
215
+
216
+ Receivers are used wherever they carry information: `self.foo()` resolves inside the
217
+ enclosing class, `utils.foo()` inside the file imported as `utils`, and `Model.foo()`
218
+ inside the class `Model` — including when *several* classes are called `Model`, because
219
+ the one that defines `foo` is the one that was meant. On Django that leaves 46,260 of
220
+ 286,346 call edges resolved by name alone — and every one of them is labelled
221
+ `confidence = 0.3`.
222
+
223
+ ### Schema
224
+
225
+ ```sql
226
+ node(id, kind, name, qname, path, line, end_line, lang, signature)
227
+ edge(src, dst, kind, confidence, line)
228
+ ```
229
+
230
+ `kind` on nodes: `Folder`, `File`, `Class`, `Interface`, `Function`, `Method`.
231
+ `kind` on edges: `CONTAINS`, `DEFINES`, `IMPORTS`, `CALLS`, `EXTENDS`.
232
+
233
+ That is the whole data model — `heimdall sql` gives you direct access to it.
234
+
235
+ ## Languages
236
+
237
+ Python, JavaScript, TypeScript, TSX, Go, Rust, Java, Kotlin, C#, Ruby, PHP, C, C++,
238
+ Swift, Scala, Lua, Dart, Bash. Every one of them is covered by a test that asserts it
239
+ still yields symbols and call edges, so a grammar rename fails the build rather than
240
+ silently degrading the graph.
241
+
242
+ Adding a language means adding rows to three dicts in `heimdall/parse.py` — node types
243
+ for definitions, for calls, and for imports — plus a snippet in the test.
244
+
245
+ One known gap: in Ruby, a receiver-less call without parentheses (`foo`) is
246
+ indistinguishable from a variable reference in the grammar, so only `foo()` and
247
+ `x.foo` produce call edges.
248
+
249
+ ## Limitations
250
+
251
+ Call resolution is name-based, not type-based. `self.x()` and `module.x()` resolve
252
+ exactly; a call on an inferred variable (`client.get()`) produces up to five
253
+ `confidence = 0.3` edges rather than one certain edge. Filter them out with
254
+ `--min-confidence 0.7`; `trace` already does by default.
255
+
256
+ Inherited members are not followed when resolving `self.x()`, indexing is full-rebuild
257
+ rather than incremental, and there are no embeddings, no community detection and no
258
+ control-flow graph.
259
+
260
+ One gap has a test standing on it, so it is known rather than suspected: a local name that
261
+ shadows a module-level function (`parse = json.loads` inside a function that lives next to
262
+ a `def parse`) still resolves to the module-level one — GitNexus gets this wrong too, and
263
+ fixing it means real scope analysis.
264
+
265
+ *"Who writes into this table"* used to be the other one. A receiver whose name several
266
+ classes share — Django has 236 classes called `Model` — made the resolver give up and
267
+ fall back to matching `check` by name, which buried the 103 real callers of `Model.check`
268
+ in 442 rows. Ambiguity in the receiver is not ambiguity in the call, though: exactly one
269
+ of those 236 classes defines `check`. Keeping every candidate class and letting the member
270
+ decide answers it in 109 rows at 94% precision, with no schema change and no change in
271
+ index time. What is left is the variable receiver — `field.check(...)` in the same file as
272
+ `Model.check` — which is name ranking working as designed, and marked as such by its
273
+ confidence.
274
+
275
+ Community detection is the one of those with a number attached, and Django moved it. On
276
+ GitNexus's own call graph, 15 lines of stdlib label propagation still beat the vendored
277
+ Leiden outright — 0.801 Newman modularity against 0.613, with the directory tree at 0.479.
278
+ On Heimdall's much denser graph it does not: label propagation collapses to 74 groups and
279
+ scores 0.188, below Leiden's 0.257 and below the directory tree's 0.224. So clustering is
280
+ worth having and the cheap algorithm is not uniformly enough. If it lands here it lands
281
+ with that caveat measured, not assumed.
282
+
283
+ ## Contributing
284
+
285
+ Layout, how to add a language, and the release steps are in
286
+ [CONTRIBUTING.md](CONTRIBUTING.md); what changed is in [CHANGELOG.md](CHANGELOG.md).
287
+ A resolution bug is worth a fixture in `tests/test_heimdall.py` — every one found so far
288
+ has one.
289
+
290
+ ## License
291
+
292
+ Apache License 2.0 — see [LICENSE](LICENSE). Independent implementation; GitNexus is
293
+ credited as inspiration only, no code was taken from it.
@@ -0,0 +1,15 @@
1
+ heimdall/__init__.py,sha256=2e5Z5RKxOb9L3E_Raq_L1lemq-BLBbg0wEzfIqzgEUc,382
2
+ heimdall/__main__.py,sha256=B9DWzNqFThCJkJ3tzKUuvvGASGlNyRPwBndKidr62qc,159
3
+ heimdall/cli.py,sha256=VMUBGvjx6TETor6QxNyBn15ICIiwH3-ObtBoSZ7YA8U,7434
4
+ heimdall/graph.py,sha256=t8WgMXmaT094RKdJ-U9vv82MpzOI0ZEgahUK-LBImKQ,12535
5
+ heimdall/index.py,sha256=yqCPRifQUJ8d5NByZvF7BZ7i8x7MRgK0XmZRICNgKEk,17380
6
+ heimdall/install.py,sha256=3kkDuFfydzsDzamOlMX8yxx8Wg6YTAEooC_bvBSXAwg,6731
7
+ heimdall/mcp_server.py,sha256=v5FtAsETmULuSXgB84ouBvzqaf3d2irKhPY7TexBWO8,5988
8
+ heimdall/parse.py,sha256=ssX1TbtsqzLZXGbD77-a780yJOfI1JQ53XdGAoPIZKM,15113
9
+ heimdall/registry.py,sha256=0xuPUFcZWXt4jA_7bsdCXuD_Ott2OhICAq6DMICoVVo,1672
10
+ heimdall/SKILL.md,sha256=RqoMUmZf2lH2KIURBe52ZnCBarRVvoQ5PD2l401aiV0,2203
11
+ heimdall_code-0.1.0.dist-info/METADATA,sha256=mJjA8GTBcU7nsZbtesXAb1F8eKST0I_22Ik_njJiAMI,13946
12
+ heimdall_code-0.1.0.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
13
+ heimdall_code-0.1.0.dist-info/entry_points.txt,sha256=xPIxIX2svKGupwVqqh7-h0YpuDI7VnDt70pnEkFivW8,81
14
+ heimdall_code-0.1.0.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
15
+ heimdall_code-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.31.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ heimdall = heimdall.cli:main
3
+ heimdall-code = heimdall.cli:main
@@ -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.