llmwiki-serve 0.2.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.
Files changed (93) hide show
  1. llmwiki_serve-0.2.0/.gitignore +18 -0
  2. llmwiki_serve-0.2.0/CHANGELOG.md +93 -0
  3. llmwiki_serve-0.2.0/CODE_OF_CONDUCT.md +49 -0
  4. llmwiki_serve-0.2.0/CONTRIBUTING.md +90 -0
  5. llmwiki_serve-0.2.0/LICENSE +201 -0
  6. llmwiki_serve-0.2.0/PKG-INFO +448 -0
  7. llmwiki_serve-0.2.0/README.md +411 -0
  8. llmwiki_serve-0.2.0/SECURITY.md +58 -0
  9. llmwiki_serve-0.2.0/SUPPORT.md +20 -0
  10. llmwiki_serve-0.2.0/THIRD_PARTY_NOTICES.md +35 -0
  11. llmwiki_serve-0.2.0/docs/architecture.md +295 -0
  12. llmwiki_serve-0.2.0/docs/decisions/2026-07-17-producer-manifest-freshness-boundary.md +61 -0
  13. llmwiki_serve-0.2.0/docs/decisions/2026-07-17-serve-graph-neighborhood-boundary.md +47 -0
  14. llmwiki_serve-0.2.0/docs/decisions/2026-07-20-default-serve-io-logging.md +60 -0
  15. llmwiki_serve-0.2.0/docs/investigations/chat-agent-bridge-query-e2e.md +233 -0
  16. llmwiki_serve-0.2.0/docs/openapi.json +1548 -0
  17. llmwiki_serve-0.2.0/docs/release.md +210 -0
  18. llmwiki_serve-0.2.0/docs/research/2026-07-17-freshness-invalidation-core-libraries.md +258 -0
  19. llmwiki_serve-0.2.0/docs/research/2026-07-17-hadoop-spark-freshness-patterns.md +423 -0
  20. llmwiki_serve-0.2.0/examples/README.md +13 -0
  21. llmwiki_serve-0.2.0/examples/sample-wiki/artwork-review.md +13 -0
  22. llmwiki_serve-0.2.0/examples/sample-wiki/draft-note.md +11 -0
  23. llmwiki_serve-0.2.0/examples/sample-wiki/hot.md +11 -0
  24. llmwiki_serve-0.2.0/examples/sample-wiki/index.md +12 -0
  25. llmwiki_serve-0.2.0/examples/sample-wiki/requester-return.md +13 -0
  26. llmwiki_serve-0.2.0/pyproject.toml +109 -0
  27. llmwiki_serve-0.2.0/scripts/__init__.py +1 -0
  28. llmwiki_serve-0.2.0/scripts/candidate_sample_artifacts.py +743 -0
  29. llmwiki_serve-0.2.0/scripts/check_third_party_notices.py +62 -0
  30. llmwiki_serve-0.2.0/scripts/ckg_neighborhood_perf.py +176 -0
  31. llmwiki_serve-0.2.0/scripts/export_openapi.py +75 -0
  32. llmwiki_serve-0.2.0/scripts/freshness_strategy_probe.py +297 -0
  33. llmwiki_serve-0.2.0/scripts/generate_candidate_samples.py +56 -0
  34. llmwiki_serve-0.2.0/scripts/release_smoke.py +1738 -0
  35. llmwiki_serve-0.2.0/scripts/upstream_candidate_smoke.py +544 -0
  36. llmwiki_serve-0.2.0/src/llmwiki_serve/__init__.py +6 -0
  37. llmwiki_serve-0.2.0/src/llmwiki_serve/adapters.py +705 -0
  38. llmwiki_serve-0.2.0/src/llmwiki_serve/api.py +794 -0
  39. llmwiki_serve-0.2.0/src/llmwiki_serve/cli.py +168 -0
  40. llmwiki_serve-0.2.0/src/llmwiki_serve/io_logging.py +381 -0
  41. llmwiki_serve-0.2.0/src/llmwiki_serve/models.py +202 -0
  42. llmwiki_serve-0.2.0/src/llmwiki_serve/parser.py +276 -0
  43. llmwiki_serve-0.2.0/src/llmwiki_serve/projection.py +275 -0
  44. llmwiki_serve-0.2.0/src/llmwiki_serve/py.typed +1 -0
  45. llmwiki_serve-0.2.0/src/llmwiki_serve/search.py +159 -0
  46. llmwiki_serve-0.2.0/src/llmwiki_serve/service.py +908 -0
  47. llmwiki_serve-0.2.0/tests/conftest.py +8 -0
  48. llmwiki_serve-0.2.0/tests/fixtures/dendron-workspace/dendron.yml +3 -0
  49. llmwiki_serve-0.2.0/tests/fixtures/dendron-workspace/vault/process.md +11 -0
  50. llmwiki_serve-0.2.0/tests/fixtures/dendron-workspace/vault/process.review.md +10 -0
  51. llmwiki_serve-0.2.0/tests/fixtures/dendron-workspace/vault/root.md +11 -0
  52. llmwiki_serve-0.2.0/tests/fixtures/foam-workspace/.vscode/extensions.json +1 -0
  53. llmwiki_serve-0.2.0/tests/fixtures/foam-workspace/Team Notes.md +10 -0
  54. llmwiki_serve-0.2.0/tests/fixtures/foam-workspace/index.md +10 -0
  55. llmwiki_serve-0.2.0/tests/fixtures/llmwiki-compiler-output/.wiki-compiler.json +1 -0
  56. llmwiki_serve-0.2.0/tests/fixtures/llmwiki-compiler-output/hot.md +10 -0
  57. llmwiki_serve-0.2.0/tests/fixtures/llmwiki-compiler-output/index.md +11 -0
  58. llmwiki_serve-0.2.0/tests/fixtures/llmwiki-compiler-output/packaging-topic.md +10 -0
  59. llmwiki_serve-0.2.0/tests/fixtures/logseq-graph/journals/2026_07_01.md +10 -0
  60. llmwiki_serve-0.2.0/tests/fixtures/logseq-graph/logseq/config.edn +1 -0
  61. llmwiki_serve-0.2.0/tests/fixtures/logseq-graph/pages/Org-Page.org +4 -0
  62. llmwiki_serve-0.2.0/tests/fixtures/logseq-graph/pages/Product.md +10 -0
  63. llmwiki_serve-0.2.0/tests/fixtures/logseq-graph/pages/Project___Alpha.md +3 -0
  64. llmwiki_serve-0.2.0/tests/fixtures/logseq-graph/pages/Workflow.md +10 -0
  65. llmwiki_serve-0.2.0/tests/fixtures/native-wiki-root/graph/graph.json +16 -0
  66. llmwiki_serve-0.2.0/tests/fixtures/native-wiki-root/wiki/CRITICAL_FACTS.md +11 -0
  67. llmwiki_serve-0.2.0/tests/fixtures/native-wiki-root/wiki/concepts/release.md +13 -0
  68. llmwiki_serve-0.2.0/tests/fixtures/native-wiki-root/wiki/overview.md +14 -0
  69. llmwiki_serve-0.2.0/tests/fixtures/obsidian-vault/.obsidian/app.json +1 -0
  70. llmwiki_serve-0.2.0/tests/fixtures/obsidian-vault/Product Process.md +10 -0
  71. llmwiki_serve-0.2.0/tests/fixtures/obsidian-vault/Release Checklist.md +10 -0
  72. llmwiki_serve-0.2.0/tests/fixtures/obsidian-vault/index.md +11 -0
  73. llmwiki_serve-0.2.0/tests/fixtures/quartz-site/content/index.md +10 -0
  74. llmwiki_serve-0.2.0/tests/fixtures/quartz-site/content/topic.md +10 -0
  75. llmwiki_serve-0.2.0/tests/fixtures/quartz-site/quartz.config.ts +1 -0
  76. llmwiki_serve-0.2.0/tests/fixtures/quartz-yaml-site/content/index.md +11 -0
  77. llmwiki_serve-0.2.0/tests/fixtures/quartz-yaml-site/quartz.config.yaml +3 -0
  78. llmwiki_serve-0.2.0/tests/fixtures/sample-wiki/artwork-review.md +21 -0
  79. llmwiki_serve-0.2.0/tests/fixtures/sample-wiki/draft-note.md +11 -0
  80. llmwiki_serve-0.2.0/tests/fixtures/sample-wiki/hot.md +12 -0
  81. llmwiki_serve-0.2.0/tests/fixtures/sample-wiki/index.md +13 -0
  82. llmwiki_serve-0.2.0/tests/fixtures/sample-wiki/requester-return.md +12 -0
  83. llmwiki_serve-0.2.0/tests/test_adapters.py +881 -0
  84. llmwiki_serve-0.2.0/tests/test_candidate_samples.py +825 -0
  85. llmwiki_serve-0.2.0/tests/test_connection_loop_matrix.py +102 -0
  86. llmwiki_serve-0.2.0/tests/test_freshness_loop_matrix.py +781 -0
  87. llmwiki_serve-0.2.0/tests/test_governance_loop_matrix.py +444 -0
  88. llmwiki_serve-0.2.0/tests/test_graph_traversal_loop_matrix.py +364 -0
  89. llmwiki_serve-0.2.0/tests/test_io_logging.py +205 -0
  90. llmwiki_serve-0.2.0/tests/test_public_api.py +90 -0
  91. llmwiki_serve-0.2.0/tests/test_service.py +3034 -0
  92. llmwiki_serve-0.2.0/tests/test_upstream_candidate_smoke.py +257 -0
  93. llmwiki_serve-0.2.0/uv.lock +1394 -0
@@ -0,0 +1,18 @@
1
+ .venv/
2
+ __pycache__/
3
+ .pytest_cache/
4
+ .mypy_cache/
5
+ .ruff_cache/
6
+ .coverage
7
+ coverage.xml
8
+ htmlcov/
9
+ .tox/
10
+ .nox/
11
+ *.py[cod]
12
+ dist/
13
+ build/
14
+ *.egg-info/
15
+ .env
16
+ .DS_Store
17
+ .runtime-logs/
18
+ .llmwiki-work/
@@ -0,0 +1,93 @@
1
+ # Changelog
2
+
3
+ All notable changes to LLMWiki Serve will be documented here.
4
+
5
+ This project follows a lightweight changelog format until versioned releases
6
+ begin. Dates use `YYYY-MM-DD`.
7
+
8
+ ## 0.2.0 - 2026-07-17
9
+
10
+ - Added default-on local serve I/O JSONL logging for HTTP, MCP-style,
11
+ MCP Streamable HTTP, and opt-in A2A-style request/response debugging, with
12
+ `--io-log off` / `LLMWIKI_SERVE_IO_LOG=off` opt-out and credential/header/root
13
+ redaction.
14
+ - Added bounded graph-neighborhood lookup through `GET /graph/neighborhood` and
15
+ MCP `llmwiki_graph_neighbors` for CKG-like graph-guided agent inspection.
16
+ - Added an opt-in `--producer-manifest` freshness marker contract for generated
17
+ wiki operators that can update a manifest after every ingest/compile run;
18
+ source changes remain stale until that marker changes.
19
+ - Added CODEOWNERS for the planned Knowledge Bridge Labs maintainer team and
20
+ hardened the automated PR review guide's changed-file rendering.
21
+ - Added a usage-question issue form so public support routing works while blank
22
+ issues remain disabled.
23
+ - Polished the README first screen with badges, public-preview status,
24
+ cross-repo toolchain positioning, and a clearer what/what-not/how-it-works
25
+ overview.
26
+ - Linked the README release status to the cross-repo status and compatibility
27
+ matrix in the docs portal.
28
+ - Updated maintainer and vulnerability-reporting wording so public governance
29
+ routes point at Knowledge Bridge Labs without temporary transfer language.
30
+ - Hardened live serving refresh so cached projections detect source-file and
31
+ graph-sidecar rewrites, additions, and nested output changes even when writers
32
+ preserve path, inode, size, and mtime metadata.
33
+ - Added runtime refresh coverage for compile output creation/replacement,
34
+ Obsidian raw-ingest notes, nested wiki notes inside Obsidian vaults, status
35
+ visibility flips, and stat-preserving Markdown/sidecar rewrites.
36
+ - Fixed query evidence ranking so hot/index/overview role boosts cannot make an
37
+ otherwise unmatched or draft-only query answerable.
38
+ - Aligned CI dependency setup with contributor guidance by using the locked
39
+ `uv sync --extra dev` workflow, normalized source-distribution smoke text
40
+ reads on Windows, and documented the wheel-install smoke fallback for local
41
+ uv cache misses.
42
+ - Added contributor-facing PR review guidance through GitHub annotations, a
43
+ generated changed-path review guide, visible reviewer-focus prompts, and
44
+ documented maintainer review expectations.
45
+ - Added the official MCP Python SDK FastMCP Streamable HTTP endpoint at
46
+ `/mcp/stream`, kept `/mcp` JSON-RPC compatibility, and made A2A-style
47
+ compatibility endpoints opt-in.
48
+
49
+ ## 0.1.0 - 2026-07-01
50
+
51
+ - Initial public preview of the Python server for serving LLMWiki-style Markdown
52
+ folders over HTTP, MCP-style JSON-RPC, A2A-style message endpoints, and CLI
53
+ commands.
54
+ - Rejected marker/config-only Foam, Dendron, Quartz, and Logseq roots as
55
+ unsupported when they contain no servable wiki pages, and returned redacted
56
+ JSON root errors from regular HTTP routes.
57
+ - Added explicit source distribution content smoke coverage and documented the
58
+ intended minimal OSS-friendly sdist include/exclude policy.
59
+ - Added wiki metadata to context packs and clarified MCP-style/A2A-style
60
+ context responses so agents receive hot/index/overview orientation before
61
+ query-ranked evidence.
62
+ - Added an executable generated candidate sample suite and generated-artifact smoke
63
+ coverage for manifest, context, search, read, graph, MCP-style, A2A-style,
64
+ graph closure, and refresh behavior.
65
+ - Hardened default graph responses so shared non-page nodes do not carry
66
+ draft-derived page paths into approved-only graph or context payloads.
67
+ - Treated `.vscode` Markdown and Org files as workspace metadata rather than
68
+ served knowledge while preserving Foam extension marker detection.
69
+ - Improved CLI root, limit, port, and unsupported-folder failure messages so
70
+ operator-facing errors stay short and non-traceback-based.
71
+ - Added CI timeout/concurrency controls, removed duplicate release smoke runs,
72
+ documented the Python API boundary, and expanded release smoke wheel content
73
+ checks.
74
+ - Clarified CORS behavior so explicit `--cors-origin` values replace the
75
+ default local-development allowlist, and added regression coverage for that
76
+ policy.
77
+ - Documented fresh-clone Quick Start prerequisites and added the release smoke
78
+ script to CI before package builds.
79
+ - Added a public release smoke script and clarified fixture-vs-real-wiki
80
+ validation boundaries, refresh behavior, and package metadata.
81
+ - Added public PR operating guidance for substantial changes, prior discussion,
82
+ low-effort or unverified generated contributions, and safer security fallback
83
+ routing.
84
+ - Clarified compatible Markdown output target wording and added Logseq `.org`
85
+ fixture coverage.
86
+ - Added pull request and issue templates for CLI, HTTP, MCP, A2A, adapter, and
87
+ source-folder compatibility work.
88
+ - Added CodeQL, dependency review, and Dependabot configuration for public
89
+ collaboration readiness.
90
+ - Added support routing, CODEOWNERS preparation, and a release checklist for
91
+ public collaboration readiness.
92
+ - Added a project code of conduct and README links to contribution, security,
93
+ conduct, architecture, and release-note documents.
@@ -0,0 +1,49 @@
1
+ # Code of Conduct
2
+
3
+ LLMWiki Serve is intended to be a practical, respectful open-source project.
4
+ Contributors and maintainers are expected to keep discussions focused on the
5
+ software, the documentation, and the people using it.
6
+
7
+ ## Scope
8
+
9
+ This code of conduct applies in project issues, pull requests, reviews,
10
+ documentation discussions, community chat, and maintainer interactions connected
11
+ to this repository.
12
+
13
+ ## Expected Behavior
14
+
15
+ - Be respectful and constructive in issues, pull requests, reviews, and chat.
16
+ - Explain tradeoffs with evidence when you disagree.
17
+ - Keep feedback specific to the work and avoid personal attacks.
18
+ - Help new contributors understand project conventions without gatekeeping.
19
+ - Respect privacy and do not publish credentials, private exports, private
20
+ endpoint details, raw wiki content, or sensitive data.
21
+ - Keep review comments actionable and tied to project behavior, compatibility,
22
+ documentation, tests, security, or maintainability.
23
+
24
+ ## Unacceptable Behavior
25
+
26
+ - Harassment, threats, insults, or discriminatory language.
27
+ - Publishing private information without permission.
28
+ - Posting credentials, tokens, private endpoint details, private wiki exports,
29
+ or sensitive data.
30
+ - Repeatedly derailing technical discussions after maintainers ask to refocus.
31
+ - Submitting intentionally harmful code, documentation, tests, or artifacts.
32
+ - Misrepresenting validation results or security impact in public collaboration
33
+ spaces.
34
+
35
+ ## Reporting and Enforcement
36
+
37
+ Report conduct concerns through the private maintainer or organization contact
38
+ published for this repository. Do not open a public issue, pull request, or
39
+ discussion for conduct reports. Include the relevant link, participants, and
40
+ context needed to evaluate the concern. For suspected security vulnerabilities,
41
+ use the process in `SECURITY.md` instead.
42
+
43
+ Maintainers may edit, hide, or remove comments, close issues, reject pull
44
+ requests, request changes, or temporarily restrict participation when behavior
45
+ harms the project or its contributors.
46
+
47
+ Maintainers should apply enforcement consistently, protect reporters' privacy as
48
+ much as practical, and avoid public disclosure of sensitive details while a
49
+ conduct concern is being handled.
@@ -0,0 +1,90 @@
1
+ # Contributing
2
+
3
+ Thanks for helping improve `llmwiki-serve`.
4
+
5
+ ## Development Setup
6
+
7
+ ```bash
8
+ uv sync --extra dev
9
+ ```
10
+
11
+ ## Checks
12
+
13
+ Run the same checks before submitting changes:
14
+
15
+ ```bash
16
+ uv run ruff format --check .
17
+ uv run ruff check .
18
+ uv run mypy src
19
+ uv run pytest
20
+ uv build
21
+ uv run python scripts/release_smoke.py --wheel dist/*.whl --sdist dist/*.tar.gz
22
+ ```
23
+
24
+ The release smoke installs the built wheel into a clean temporary environment
25
+ offline by default. If a local machine has not cached all runtime dependency
26
+ wheels, either warm the cache with `uv sync --extra dev --locked` or rerun the
27
+ same smoke with `--allow-network-install` and call that out in the PR.
28
+ GitHub CI uses `--allow-network-install` because hosted runners start with an
29
+ empty uv cache.
30
+
31
+ ## Pull Requests
32
+
33
+ - Keep changes focused and avoid unrelated formatting churn.
34
+ - Add or update tests for behavior changes.
35
+ - Update `CHANGELOG.md` for notable user-facing, compatibility, security, or
36
+ project-maintenance changes.
37
+ - Do not commit secrets, credentials, token caches, private exports, or raw
38
+ sensitive data.
39
+ - Document user-facing behavior changes in `README.md` when appropriate.
40
+ - Use the pull request template to call out usage mode, HTTP/MCP/A2A endpoint
41
+ impact, validation, and data-handling considerations.
42
+
43
+ For substantial or ambiguous changes, open an issue or discussion first and get
44
+ agreement on the direction before investing in a large pull request. Examples
45
+ include new adapter contracts, new MCP or A2A behavior, authentication changes,
46
+ write-path proposals, release automation, or any change that expands the
47
+ supported serving model.
48
+
49
+ Maintainers may close low-effort, unverified, or mostly generated issues and PRs
50
+ when they do not include a clear problem statement, implementation rationale, and
51
+ reproducible validation. AI-assisted contributions are welcome, but contributors
52
+ remain responsible for understanding, testing, and maintaining the change.
53
+
54
+ ## Review Expectations
55
+
56
+ Review feedback should be actionable for contributors:
57
+
58
+ - Mark blocking issues clearly and explain the expected behavior or invariant.
59
+ - Prefer file- or line-specific comments when a concrete code change is needed.
60
+ - Distinguish optional design suggestions from merge-blocking defects.
61
+ - Ask for specific validation when behavior, adapter compatibility, package
62
+ contents, or network surfaces change.
63
+ - Keep generated or AI-assisted changes reviewable by describing the intended
64
+ behavior and the tests that prove it.
65
+
66
+ Pull requests receive a generated review-guide comment based on changed paths.
67
+ That comment is only a contributor aid; maintainer approval and CI remain the
68
+ merge signal.
69
+
70
+ ## Issues
71
+
72
+ - Use the bug template for reproducible defects.
73
+ - Use the feature template for focused server, adapter, endpoint, or operations
74
+ improvements.
75
+ - Use the adapter/protocol compatibility template for source-folder detection,
76
+ graph projection, HTTP, MCP, or A2A contract concerns.
77
+ - Use the documentation template for missing or confusing docs.
78
+ - Check `SUPPORT.md` for support routing expectations.
79
+ - Report suspected vulnerabilities privately through the process in
80
+ `SECURITY.md`.
81
+
82
+ ## Project Scope
83
+
84
+ `llmwiki-serve` is a read-only serving layer for LLMWiki-style Markdown folders.
85
+ Changes should preserve the Markdown folder as the source of truth and avoid
86
+ adding write paths unless the project scope changes explicitly.
87
+
88
+ ## Releases
89
+
90
+ Before publishing a release or release candidate, follow `docs/release.md`.
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.