sourcecode 0.26.0__tar.gz → 0.27.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 (133) hide show
  1. sourcecode-0.27.0/CONTRIBUTING.md +184 -0
  2. sourcecode-0.27.0/LICENSE +186 -0
  3. sourcecode-0.27.0/PKG-INFO +565 -0
  4. sourcecode-0.27.0/README.md +350 -0
  5. sourcecode-0.27.0/SECURITY.md +94 -0
  6. sourcecode-0.27.0/docs/privacy.md +182 -0
  7. {sourcecode-0.26.0 → sourcecode-0.27.0}/pyproject.toml +18 -3
  8. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/__init__.py +1 -1
  9. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/cli.py +112 -4
  10. sourcecode-0.27.0/src/sourcecode/telemetry/__init__.py +111 -0
  11. sourcecode-0.27.0/src/sourcecode/telemetry/config.py +67 -0
  12. sourcecode-0.27.0/src/sourcecode/telemetry/consent.py +63 -0
  13. sourcecode-0.27.0/src/sourcecode/telemetry/events.py +78 -0
  14. sourcecode-0.27.0/src/sourcecode/telemetry/filters.py +140 -0
  15. sourcecode-0.27.0/src/sourcecode/telemetry/transport.py +52 -0
  16. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_integration_lqn.py +1 -1
  17. sourcecode-0.27.0/tests/test_telemetry.py +335 -0
  18. sourcecode-0.26.0/PKG-INFO +0 -724
  19. sourcecode-0.26.0/README.md +0 -708
  20. {sourcecode-0.26.0 → sourcecode-0.27.0}/.gitignore +0 -0
  21. {sourcecode-0.26.0 → sourcecode-0.27.0}/.ruff.toml +0 -0
  22. {sourcecode-0.26.0 → sourcecode-0.27.0}/docs/schema.md +0 -0
  23. {sourcecode-0.26.0 → sourcecode-0.27.0}/raw +0 -0
  24. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/architecture_analyzer.py +0 -0
  25. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/architecture_summary.py +0 -0
  26. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/classifier.py +0 -0
  27. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/code_notes_analyzer.py +0 -0
  28. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/confidence_analyzer.py +0 -0
  29. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/context_summarizer.py +0 -0
  30. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/coverage_parser.py +0 -0
  31. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/dependency_analyzer.py +0 -0
  32. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/detectors/__init__.py +0 -0
  33. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/detectors/base.py +0 -0
  34. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/detectors/csproj_parser.py +0 -0
  35. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/detectors/dart.py +0 -0
  36. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/detectors/dotnet.py +0 -0
  37. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/detectors/elixir.py +0 -0
  38. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/detectors/go.py +0 -0
  39. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/detectors/heuristic.py +0 -0
  40. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/detectors/hybrid.py +0 -0
  41. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/detectors/java.py +0 -0
  42. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/detectors/jvm_ext.py +0 -0
  43. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/detectors/nodejs.py +0 -0
  44. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/detectors/parsers.py +0 -0
  45. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/detectors/php.py +0 -0
  46. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/detectors/project.py +0 -0
  47. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/detectors/python.py +0 -0
  48. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/detectors/ruby.py +0 -0
  49. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/detectors/rust.py +0 -0
  50. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/detectors/systems.py +0 -0
  51. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/detectors/terraform.py +0 -0
  52. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/detectors/tooling.py +0 -0
  53. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/doc_analyzer.py +0 -0
  54. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/env_analyzer.py +0 -0
  55. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/git_analyzer.py +0 -0
  56. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/graph_analyzer.py +0 -0
  57. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/metrics_analyzer.py +0 -0
  58. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/prepare_context.py +0 -0
  59. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/redactor.py +0 -0
  60. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/relevance_scorer.py +0 -0
  61. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/runtime_classifier.py +0 -0
  62. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/scanner.py +0 -0
  63. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/schema.py +0 -0
  64. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/semantic_analyzer.py +0 -0
  65. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/serializer.py +0 -0
  66. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/summarizer.py +0 -0
  67. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/tree_utils.py +0 -0
  68. {sourcecode-0.26.0 → sourcecode-0.27.0}/src/sourcecode/workspace.py +0 -0
  69. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/__init__.py +0 -0
  70. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/conftest.py +0 -0
  71. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/fixtures/coverage.xml +0 -0
  72. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/fixtures/fastapi_app/pyproject.toml +0 -0
  73. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/fixtures/fastapi_app/src/main.py +0 -0
  74. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/fixtures/go_service/cmd/api/main.go +0 -0
  75. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/fixtures/go_service/go.mod +0 -0
  76. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/fixtures/jacoco.xml +0 -0
  77. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/fixtures/lcov.info +0 -0
  78. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/fixtures/nextjs_app/app/page.tsx +0 -0
  79. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/fixtures/nextjs_app/package.json +0 -0
  80. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/fixtures/nextjs_app/pnpm-lock.yaml +0 -0
  81. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/fixtures/pnpm_monorepo/apps/web/app/page.tsx +0 -0
  82. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/fixtures/pnpm_monorepo/apps/web/package.json +0 -0
  83. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/fixtures/pnpm_monorepo/packages/api/main.py +0 -0
  84. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/fixtures/pnpm_monorepo/packages/api/pyproject.toml +0 -0
  85. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/fixtures/pnpm_monorepo/pnpm-workspace.yaml +0 -0
  86. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_architecture_analyzer.py +0 -0
  87. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_architecture_summary.py +0 -0
  88. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_classifier.py +0 -0
  89. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_cli.py +0 -0
  90. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_code_notes_analyzer.py +0 -0
  91. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_coverage_parser.py +0 -0
  92. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_cross_consistency.py +0 -0
  93. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_dependency_analyzer_node_python.py +0 -0
  94. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_dependency_analyzer_polyglot.py +0 -0
  95. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_dependency_schema.py +0 -0
  96. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_detector_dotnet.py +0 -0
  97. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_detector_go_rust_java.py +0 -0
  98. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_detector_nodejs.py +0 -0
  99. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_detector_php_ruby_dart.py +0 -0
  100. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_detector_python.py +0 -0
  101. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_detector_universal_managed.py +0 -0
  102. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_detector_universal_systems.py +0 -0
  103. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_detectors_base.py +0 -0
  104. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_doc_analyzer_jsdom.py +0 -0
  105. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_doc_analyzer_python.py +0 -0
  106. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_graph_analyzer_polyglot.py +0 -0
  107. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_graph_analyzer_python_node.py +0 -0
  108. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_graph_schema.py +0 -0
  109. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_hybrid_inference.py +0 -0
  110. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_integration.py +0 -0
  111. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_integration_dependencies.py +0 -0
  112. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_integration_detection.py +0 -0
  113. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_integration_docs.py +0 -0
  114. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_integration_graph_modules.py +0 -0
  115. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_integration_metrics.py +0 -0
  116. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_integration_multistack.py +0 -0
  117. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_integration_semantics.py +0 -0
  118. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_integration_universal.py +0 -0
  119. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_metrics_analyzer.py +0 -0
  120. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_packaging.py +0 -0
  121. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_phase1_improvements.py +0 -0
  122. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_real_projects.py +0 -0
  123. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_redactor.py +0 -0
  124. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_scanner.py +0 -0
  125. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_schema.py +0 -0
  126. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_schema_normalization.py +0 -0
  127. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_semantic_analyzer_node.py +0 -0
  128. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_semantic_analyzer_python.py +0 -0
  129. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_semantic_import_resolution.py +0 -0
  130. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_semantic_schema.py +0 -0
  131. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_signal_hierarchy.py +0 -0
  132. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_summarizer.py +0 -0
  133. {sourcecode-0.26.0 → sourcecode-0.27.0}/tests/test_workspace_analyzer.py +0 -0
@@ -0,0 +1,184 @@
1
+ # Contributing to sourcecode
2
+
3
+ Thank you for your interest in contributing. This document covers how to set up a development environment, run tests, and submit changes.
4
+
5
+ ---
6
+
7
+ ## Code of Conduct
8
+
9
+ This project follows the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md). By participating, you agree to uphold it.
10
+
11
+ ---
12
+
13
+ ## Getting started
14
+
15
+ ### Prerequisites
16
+
17
+ - Python 3.9+
18
+ - Git
19
+
20
+ ### Local setup
21
+
22
+ ```bash
23
+ git clone https://github.com/sourcecode-ai/sourcecode
24
+ cd sourcecode
25
+ pip install -e ".[dev]"
26
+ ```
27
+
28
+ This installs `sourcecode` in editable mode with all development dependencies (`pytest`, `ruff`, `mypy`).
29
+
30
+ ### Run the CLI locally
31
+
32
+ ```bash
33
+ sourcecode . --agent
34
+ sourcecode . prepare-context explain
35
+ ```
36
+
37
+ ### Run tests
38
+
39
+ ```bash
40
+ pytest tests/
41
+ ```
42
+
43
+ Run a single file:
44
+ ```bash
45
+ pytest tests/test_detector_nodejs.py -v
46
+ ```
47
+
48
+ ---
49
+
50
+ ## Project structure
51
+
52
+ ```
53
+ src/sourcecode/
54
+ ├── cli.py # CLI entry point (Typer)
55
+ ├── scanner.py # File tree scanning
56
+ ├── schema.py # Output schema (SourceMap + all dataclasses)
57
+ ├── serializer.py # JSON/YAML output + agent_view/compact_view
58
+ ├── summarizer.py # Natural language project summary
59
+ ├── architecture_summary.py # Architecture description generation
60
+ ├── prepare_context.py # Task-specific context compilation
61
+ ├── relevance_scorer.py # File operational relevance scoring
62
+ ├── runtime_classifier.py # Monorepo package role classification
63
+ ├── git_analyzer.py # Git context extraction
64
+ ├── detectors/ # Stack/framework/entry point detectors
65
+ │ ├── python.py
66
+ │ ├── nodejs.py
67
+ │ ├── go.py
68
+ │ └── ...
69
+ └── ...
70
+ tests/
71
+ ├── test_detector_nodejs.py
72
+ ├── test_summarizer.py
73
+ └── ...
74
+ ```
75
+
76
+ ---
77
+
78
+ ## Making changes
79
+
80
+ ### Adding a new language detector
81
+
82
+ 1. Create `src/sourcecode/detectors/<language>.py`
83
+ 2. Implement the `BaseDetector` interface (see `detectors/base.py`)
84
+ 3. Register it in `detectors/__init__.py` → `build_default_detectors()`
85
+ 4. Add tests in `tests/test_detector_<language>.py`
86
+
87
+ ### Modifying the output schema
88
+
89
+ The schema is defined in `schema.py` as Python dataclasses. All fields must have defaults so that existing consumers are not broken. Add new fields at the end of the relevant dataclass with `Optional[T] = None` or `list[T] = field(default_factory=list)`.
90
+
91
+ ### Modifying relevance scoring
92
+
93
+ Relevance scoring lives in `relevance_scorer.py` (file-level scoring) and `runtime_classifier.py` (monorepo package-level classification). Changes here affect what agents see first — test with realistic repos.
94
+
95
+ ---
96
+
97
+ ## Code style
98
+
99
+ This project uses `ruff` for linting and formatting.
100
+
101
+ ```bash
102
+ ruff check src/ tests/
103
+ ruff format src/ tests/
104
+ ```
105
+
106
+ Type checking with `mypy`:
107
+ ```bash
108
+ mypy src/
109
+ ```
110
+
111
+ Rules:
112
+ - All public functions must have type annotations
113
+ - Docstrings are optional but welcome for non-obvious logic
114
+ - No inline comments explaining what the code does — names should do that
115
+ - Comments only for non-obvious constraints or workarounds
116
+
117
+ ---
118
+
119
+ ## Commits
120
+
121
+ Follow [Conventional Commits](https://www.conventionalcommits.org/):
122
+
123
+ ```
124
+ feat: add Go module graph support
125
+ fix: exclude benchmark entrypoints from production ranking
126
+ docs: update agent workflow examples
127
+ refactor: simplify relevance scorer baseline calculation
128
+ test: add coverage for monorepo runtime classifier
129
+ ```
130
+
131
+ Keep commits atomic. One logical change per commit.
132
+
133
+ ---
134
+
135
+ ## Pull requests
136
+
137
+ 1. Fork the repository and create a branch: `git checkout -b feat/my-feature`
138
+ 2. Make your changes with tests
139
+ 3. Run the full test suite: `pytest tests/`
140
+ 4. Run lint: `ruff check src/ tests/`
141
+ 5. Open a PR against `main`
142
+
143
+ **PR description should include:**
144
+ - What changed and why
145
+ - How to test it manually
146
+ - Any breaking changes or schema additions
147
+
148
+ ---
149
+
150
+ ## Reporting bugs
151
+
152
+ Open an issue with:
153
+ - `sourcecode --version` output
154
+ - Command you ran
155
+ - Expected behavior
156
+ - Actual behavior / error output
157
+ - OS and Python version
158
+
159
+ ---
160
+
161
+ ## Proposing features
162
+
163
+ Open an issue with the `feature` label. Describe:
164
+ - The problem you're solving
165
+ - Why it belongs in `sourcecode` (vs. a wrapper or downstream tool)
166
+ - What the output or behavior would look like
167
+
168
+ Features that add flags without clear agent-oriented use cases will be declined. Complexity is a cost.
169
+
170
+ ---
171
+
172
+ ## What we will NOT merge
173
+
174
+ - LLM API calls inside the analysis pipeline
175
+ - Network requests during analysis (except opt-in telemetry)
176
+ - New flags that only serve human-readable output, not agent consumption
177
+ - Breaking changes to the output schema without a migration path
178
+ - Features that compromise the determinism guarantee
179
+
180
+ ---
181
+
182
+ ## License
183
+
184
+ By submitting a contribution, you agree that it will be licensed under the [Apache 2.0 License](LICENSE).
@@ -0,0 +1,186 @@
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 formats.
34
+
35
+ "Work" shall mean the work of authorship made available under
36
+ the License, as indicated by a copyright notice that is included in
37
+ or attached to the work (an example is provided in the Appendix below).
38
+
39
+ "Derivative Works" shall mean any work, whether in Source or Object
40
+ form, that is based on (or derived from) the Work and for which the
41
+ editorial revisions, annotations, elaborations, or other transformations
42
+ represent, as a whole, an original work of authorship. For the purposes
43
+ of this License, Derivative Works shall not include works that remain
44
+ separable from, or merely link (or bind by name) to the interfaces of,
45
+ the Work and Derivative Works thereof.
46
+
47
+ "Contribution" shall mean, as submitted to the Licensor for inclusion
48
+ in the Work by the copyright owner or by an individual or Legal Entity
49
+ authorized to submit on behalf of the copyright owner. For the purposes
50
+ of this definition, "submit" means any form of electronic, verbal, or
51
+ written communication sent to the Licensor or its representatives,
52
+ including but not limited to communication on electronic mailing lists,
53
+ source code control systems, and issue tracking systems that are managed
54
+ by, or on behalf of, the Licensor for the purpose of discussing and
55
+ improving the Work, but excluding communication that is conspicuously
56
+ marked or designated in writing by the copyright owner as "Not a
57
+ Contribution."
58
+
59
+ "Contributor" shall mean Licensor and any Legal Entity on behalf of
60
+ whom a Contribution has been received by the Licensor and included
61
+ within the Work.
62
+
63
+ 2. Grant of Copyright License. Subject to the terms and conditions of
64
+ this License, each Contributor hereby grants to You a perpetual,
65
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
66
+ copyright license to reproduce, prepare Derivative Works of,
67
+ publicly display, publicly perform, sublicense, and distribute the
68
+ Work and such Derivative Works in Source or Object form.
69
+
70
+ 3. Grant of Patent License. Subject to the terms and conditions of
71
+ this License, each Contributor hereby grants to You a perpetual,
72
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
73
+ (except as stated in this section) patent license to make, have made,
74
+ use, offer to sell, sell, import, and otherwise transfer the Work,
75
+ where such license applies only to those patent claims licensable
76
+ by such Contributor that are necessarily infringed by their
77
+ Contribution(s) alone or by the combination of their Contribution(s)
78
+ with the Work to which such Contribution(s) was submitted. If You
79
+ institute patent litigation against any entity (including a cross-claim
80
+ or counterclaim in a lawsuit) alleging that the Work or any Contributor
81
+ Contribution constitutes direct or contributory patent infringement,
82
+ then any patent rights granted to You under this License for that Work
83
+ shall terminate as of the date such litigation is filed.
84
+
85
+ 4. Redistribution. You may reproduce and distribute copies of the
86
+ Work or Derivative Works thereof in any medium, with or without
87
+ modifications, and in Source or Object form, provided that You
88
+ meet the following conditions:
89
+
90
+ (a) You must give any other recipients of the Work or Derivative
91
+ Works a copy of this License; and
92
+
93
+ (b) You must cause any modified files to carry prominent notices
94
+ stating that You changed the files; and
95
+
96
+ (c) You must retain, in the Source form of any Derivative Works
97
+ that You distribute, all copyright, patent, trademark, and
98
+ attribution notices from the Source form of the Work,
99
+ excluding those notices that do not pertain to any part of
100
+ the Derivative Works; and
101
+
102
+ (d) If the Work includes a "NOTICE" text file as part of its
103
+ distribution, You must include a readable copy of the
104
+ attribution notices contained within such NOTICE file, in
105
+ at least one of the following places: within a NOTICE text
106
+ file distributed as part of the Derivative Works; within
107
+ the Source form or documentation, if provided along with the
108
+ Derivative Works; or, within a display generated by the
109
+ Derivative Works, if and wherever such third-party notices
110
+ normally appear. The contents of the NOTICE file are for
111
+ informational purposes only and do not modify the License.
112
+ You may add Your own attribution notices within Derivative
113
+ Works that You distribute, alongside or in addition to the
114
+ NOTICE text from the Work, provided that such additional
115
+ attribution notices cannot be construed as modifying the License.
116
+
117
+ You may add Your own license statement for Your modifications and
118
+ may provide additional grant of rights to use, copy, modify, merge,
119
+ publish, distribute, sublicense, and/or sell copies of the
120
+ Derivative Works, as separate terms and conditions for their use,
121
+ reproduction, and distribution, or alongside or as supplement to
122
+ any license terms for such Derivative Works as a whole, provided
123
+ Your use, reproduction, and distribution of the Work otherwise
124
+ complies with the conditions stated in this License.
125
+
126
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
127
+ any Contribution intentionally submitted for inclusion in the Work
128
+ by You to the Licensor shall be under the terms and conditions of
129
+ this License, without any additional terms or conditions.
130
+ Notwithstanding the above, nothing herein shall supersede or modify
131
+ the terms of any separate license agreement you may have executed
132
+ with Licensor regarding such Contributions.
133
+
134
+ 6. Trademarks. This License does not grant permission to use the trade
135
+ names, trademarks, service marks, or product names of the Licensor,
136
+ except as required for reasonable and customary use in describing the
137
+ origin of the Work and reproducing the content of the NOTICE file.
138
+
139
+ 7. Disclaimer of Warranty. Unless required by applicable law or
140
+ agreed to in writing, Licensor provides the Work (and each
141
+ Contributor provides its Contributions) on an "AS IS" BASIS,
142
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
143
+ implied, including, without limitation, any warranties or conditions
144
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
145
+ PARTICULAR PURPOSE. You are solely responsible for determining the
146
+ appropriateness of using or reproducing the Work and assume any
147
+ risks associated with Your exercise of permissions under this License.
148
+
149
+ 8. Limitation of Liability. In no event and under no legal theory,
150
+ whether in tort (including negligence), contract, or otherwise,
151
+ unless required by applicable law (such as deliberate and grossly
152
+ negligent acts) or agreed to in writing, shall any Contributor be
153
+ liable to You for damages, including any direct, indirect, special,
154
+ incidental, or exemplary damages of any character arising as a
155
+ result of this License or out of the use or inability to use the
156
+ Work (including but not limited to damages for loss of goodwill,
157
+ work stoppage, computer failure or malfunction, or all other
158
+ commercial damages or losses), even if such Contributor has been
159
+ advised of the possibility of such damages.
160
+
161
+ 9. Accepting Warranty or Liability. While redistributing the Work or
162
+ Derivative Works thereof, You may choose to offer, and charge a fee
163
+ for, acceptance of support, warranty, indemnity, or other liability
164
+ obligations and/or rights consistent with this License. However, in
165
+ accepting such obligations, You may offer such obligations only on
166
+ Your own behalf and on Your sole responsibility, not on behalf of
167
+ any other Contributor, and only if You agree to indemnify, defend,
168
+ and hold each Contributor harmless for any liability incurred by,
169
+ or claims asserted against, such Contributor by reason of your
170
+ accepting any warranty or additional liability.
171
+
172
+ END OF TERMS AND CONDITIONS
173
+
174
+ Copyright 2024 sourcecode contributors
175
+
176
+ Licensed under the Apache License, Version 2.0 (the "License");
177
+ you may not use this file except in compliance with the License.
178
+ You may obtain a copy of the License at
179
+
180
+ http://www.apache.org/licenses/LICENSE-2.0
181
+
182
+ Unless required by applicable law or agreed to in writing, software
183
+ distributed under the License is distributed on an "AS IS" BASIS,
184
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
185
+ See the License for the specific language governing permissions and
186
+ limitations under the License.