lastlight 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.
Files changed (128) hide show
  1. lastlight-0.1.0/LICENSE +305 -0
  2. lastlight-0.1.0/NOTICE +11 -0
  3. lastlight-0.1.0/PKG-INFO +651 -0
  4. lastlight-0.1.0/README.md +320 -0
  5. lastlight-0.1.0/pyproject.toml +46 -0
  6. lastlight-0.1.0/setup.cfg +4 -0
  7. lastlight-0.1.0/src/lastlight/__init__.py +14 -0
  8. lastlight-0.1.0/src/lastlight/adaptive.py +3 -0
  9. lastlight-0.1.0/src/lastlight/api.py +119 -0
  10. lastlight-0.1.0/src/lastlight/app.py +2 -0
  11. lastlight-0.1.0/src/lastlight/application/__init__.py +1 -0
  12. lastlight-0.1.0/src/lastlight/application/adaptive.py +2 -0
  13. lastlight-0.1.0/src/lastlight/application/app.py +49 -0
  14. lastlight-0.1.0/src/lastlight/application/domain.py +2 -0
  15. lastlight-0.1.0/src/lastlight/application/factory.py +37 -0
  16. lastlight-0.1.0/src/lastlight/application/interfaces.py +2 -0
  17. lastlight-0.1.0/src/lastlight/application/knowledge_sources.py +2 -0
  18. lastlight-0.1.0/src/lastlight/application/language.py +76 -0
  19. lastlight-0.1.0/src/lastlight/application/retrieval.py +2 -0
  20. lastlight-0.1.0/src/lastlight/application/safety.py +2 -0
  21. lastlight-0.1.0/src/lastlight/application/session.py +120 -0
  22. lastlight-0.1.0/src/lastlight/application/triage.py +2 -0
  23. lastlight-0.1.0/src/lastlight/chunking.py +3 -0
  24. lastlight-0.1.0/src/lastlight/cli/__init__.py +8 -0
  25. lastlight-0.1.0/src/lastlight/cli/app.py +2 -0
  26. lastlight-0.1.0/src/lastlight/cli/cli.py +298 -0
  27. lastlight-0.1.0/src/lastlight/cli/commands.py +352 -0
  28. lastlight-0.1.0/src/lastlight/cli/compat.py +2 -0
  29. lastlight-0.1.0/src/lastlight/cli/evaluation.py +2 -0
  30. lastlight-0.1.0/src/lastlight/cli/factory.py +30 -0
  31. lastlight-0.1.0/src/lastlight/cli/indexer.py +2 -0
  32. lastlight-0.1.0/src/lastlight/cli/interfaces.py +2 -0
  33. lastlight-0.1.0/src/lastlight/cli/knowledge_sources.py +2 -0
  34. lastlight-0.1.0/src/lastlight/cli/pack_validation.py +2 -0
  35. lastlight-0.1.0/src/lastlight/cli/provenance.py +2 -0
  36. lastlight-0.1.0/src/lastlight/cli/repository.py +2 -0
  37. lastlight-0.1.0/src/lastlight/cli/safety.py +2 -0
  38. lastlight-0.1.0/src/lastlight/cli/session.py +2 -0
  39. lastlight-0.1.0/src/lastlight/cli/system_commands.py +32 -0
  40. lastlight-0.1.0/src/lastlight/cli/triage.py +2 -0
  41. lastlight-0.1.0/src/lastlight/commands.py +2 -0
  42. lastlight-0.1.0/src/lastlight/compat.py +2 -0
  43. lastlight-0.1.0/src/lastlight/composite_repository.py +2 -0
  44. lastlight-0.1.0/src/lastlight/domain.py +2 -0
  45. lastlight-0.1.0/src/lastlight/evaluation/__init__.py +3 -0
  46. lastlight-0.1.0/src/lastlight/evaluation/app.py +2 -0
  47. lastlight-0.1.0/src/lastlight/evaluation/domain.py +2 -0
  48. lastlight-0.1.0/src/lastlight/evaluation/evaluation.py +362 -0
  49. lastlight-0.1.0/src/lastlight/evaluation/util.py +2 -0
  50. lastlight-0.1.0/src/lastlight/factory.py +2 -0
  51. lastlight-0.1.0/src/lastlight/indexer.py +2 -0
  52. lastlight-0.1.0/src/lastlight/interfaces.py +2 -0
  53. lastlight-0.1.0/src/lastlight/knowledge/__init__.py +12 -0
  54. lastlight-0.1.0/src/lastlight/knowledge/composite_repository.py +46 -0
  55. lastlight-0.1.0/src/lastlight/knowledge/domain.py +2 -0
  56. lastlight-0.1.0/src/lastlight/knowledge/indexer.py +107 -0
  57. lastlight-0.1.0/src/lastlight/knowledge/interfaces.py +2 -0
  58. lastlight-0.1.0/src/lastlight/knowledge/knowledge_sources.py +32 -0
  59. lastlight-0.1.0/src/lastlight/knowledge/markdown_loader.py +52 -0
  60. lastlight-0.1.0/src/lastlight/knowledge/metadata.py +57 -0
  61. lastlight-0.1.0/src/lastlight/knowledge/pack_validation.py +96 -0
  62. lastlight-0.1.0/src/lastlight/knowledge/provenance.py +174 -0
  63. lastlight-0.1.0/src/lastlight/knowledge/repository.py +123 -0
  64. lastlight-0.1.0/src/lastlight/knowledge/tokenizer.py +2 -0
  65. lastlight-0.1.0/src/lastlight/knowledge/util.py +2 -0
  66. lastlight-0.1.0/src/lastlight/knowledge_sources.py +2 -0
  67. lastlight-0.1.0/src/lastlight/language.py +2 -0
  68. lastlight-0.1.0/src/lastlight/markdown_loader.py +2 -0
  69. lastlight-0.1.0/src/lastlight/metadata.py +2 -0
  70. lastlight-0.1.0/src/lastlight/pack_validation.py +2 -0
  71. lastlight-0.1.0/src/lastlight/provenance.py +2 -0
  72. lastlight-0.1.0/src/lastlight/ranking.py +3 -0
  73. lastlight-0.1.0/src/lastlight/repository.py +2 -0
  74. lastlight-0.1.0/src/lastlight/retrieval/__init__.py +14 -0
  75. lastlight-0.1.0/src/lastlight/retrieval/adaptive.py +176 -0
  76. lastlight-0.1.0/src/lastlight/retrieval/chunking.py +116 -0
  77. lastlight-0.1.0/src/lastlight/retrieval/ranking.py +110 -0
  78. lastlight-0.1.0/src/lastlight/retrieval/strategies.py +89 -0
  79. lastlight-0.1.0/src/lastlight/retrieval/tokenizer.py +95 -0
  80. lastlight-0.1.0/src/lastlight/safety/__init__.py +3 -0
  81. lastlight-0.1.0/src/lastlight/safety/domain.py +2 -0
  82. lastlight-0.1.0/src/lastlight/safety/safety.py +65 -0
  83. lastlight-0.1.0/src/lastlight/safety/triage.py +161 -0
  84. lastlight-0.1.0/src/lastlight/session.py +2 -0
  85. lastlight-0.1.0/src/lastlight/shared/__init__.py +1 -0
  86. lastlight-0.1.0/src/lastlight/shared/compat.py +93 -0
  87. lastlight-0.1.0/src/lastlight/shared/domain.py +65 -0
  88. lastlight-0.1.0/src/lastlight/shared/interfaces.py +20 -0
  89. lastlight-0.1.0/src/lastlight/shared/util.py +18 -0
  90. lastlight-0.1.0/src/lastlight/system_commands.py +2 -0
  91. lastlight-0.1.0/src/lastlight/tokenizer.py +3 -0
  92. lastlight-0.1.0/src/lastlight/triage.py +2 -0
  93. lastlight-0.1.0/src/lastlight/types.py +38 -0
  94. lastlight-0.1.0/src/lastlight/util.py +2 -0
  95. lastlight-0.1.0/src/lastlight.egg-info/PKG-INFO +651 -0
  96. lastlight-0.1.0/src/lastlight.egg-info/SOURCES.txt +126 -0
  97. lastlight-0.1.0/src/lastlight.egg-info/dependency_links.txt +1 -0
  98. lastlight-0.1.0/src/lastlight.egg-info/entry_points.txt +2 -0
  99. lastlight-0.1.0/src/lastlight.egg-info/top_level.txt +1 -0
  100. lastlight-0.1.0/tests/test_adaptive.py +92 -0
  101. lastlight-0.1.0/tests/test_adaptive_cli.py +80 -0
  102. lastlight-0.1.0/tests/test_adaptive_readme_examples.py +80 -0
  103. lastlight-0.1.0/tests/test_app.py +63 -0
  104. lastlight-0.1.0/tests/test_chunking.py +48 -0
  105. lastlight-0.1.0/tests/test_cli.py +215 -0
  106. lastlight-0.1.0/tests/test_cli_library_boundary.py +28 -0
  107. lastlight-0.1.0/tests/test_compat.py +40 -0
  108. lastlight-0.1.0/tests/test_composite_repository.py +67 -0
  109. lastlight-0.1.0/tests/test_evaluation.py +121 -0
  110. lastlight-0.1.0/tests/test_example_pack.py +65 -0
  111. lastlight-0.1.0/tests/test_indexer.py +100 -0
  112. lastlight-0.1.0/tests/test_language_filter.py +117 -0
  113. lastlight-0.1.0/tests/test_library_integration.py +59 -0
  114. lastlight-0.1.0/tests/test_list_knowledge.py +72 -0
  115. lastlight-0.1.0/tests/test_loader.py +65 -0
  116. lastlight-0.1.0/tests/test_multi_pack_attribution.py +37 -0
  117. lastlight-0.1.0/tests/test_multi_pack_cli.py +67 -0
  118. lastlight-0.1.0/tests/test_pack_validation.py +117 -0
  119. lastlight-0.1.0/tests/test_package_layout.py +44 -0
  120. lastlight-0.1.0/tests/test_provenance.py +118 -0
  121. lastlight-0.1.0/tests/test_public_api.py +68 -0
  122. lastlight-0.1.0/tests/test_repository.py +159 -0
  123. lastlight-0.1.0/tests/test_retrieval.py +86 -0
  124. lastlight-0.1.0/tests/test_safety.py +37 -0
  125. lastlight-0.1.0/tests/test_session.py +106 -0
  126. lastlight-0.1.0/tests/test_system_cli.py +37 -0
  127. lastlight-0.1.0/tests/test_tokenizer.py +32 -0
  128. lastlight-0.1.0/tests/test_triage.py +66 -0
@@ -0,0 +1,305 @@
1
+ Mozilla Public License Version 2.0
2
+ ==================================
3
+
4
+ 1. Definitions
5
+ --------------
6
+
7
+ 1.1. "Contributor" means each individual or legal entity that creates,
8
+ contributes to the creation of, or owns Covered Software.
9
+
10
+ 1.2. "Contributor Version" means the combination of the Contributions of
11
+ others, if any, used by a Contributor and that particular Contributor's
12
+ Contribution.
13
+
14
+ 1.3. "Contribution" means Covered Software of a particular Contributor.
15
+
16
+ 1.4. "Covered Software" means Source Code Form to which the initial Contributor
17
+ has attached the notice in Exhibit A, the Executable Form of such Source Code
18
+ Form, and Modifications of such Source Code Form, in each case including
19
+ portions thereof.
20
+
21
+ 1.5. "Incompatible With Secondary Licenses" means that the initial Contributor
22
+ has attached the notice described in Exhibit B to the Covered Software; or that
23
+ the Covered Software was made available under the terms of version 1.1 or
24
+ earlier of the License, but not also under the terms of a Secondary License.
25
+
26
+ 1.6. "Executable Form" means any form of the work other than Source Code Form.
27
+
28
+ 1.7. "Larger Work" means a work that combines Covered Software with other
29
+ material, in a separate file or files, that is not Covered Software.
30
+
31
+ 1.8. "License" means this document.
32
+
33
+ 1.9. "Licensable" means having the right to grant, to the maximum extent
34
+ possible, whether at the time of the initial grant or subsequently, any and all
35
+ of the rights conveyed by this License.
36
+
37
+ 1.10. "Modifications" means any of the following:
38
+
39
+ (a) any file in Source Code Form that results from an addition to, deletion
40
+ from, or modification of the contents of Covered Software; or
41
+
42
+ (b) any new file in Source Code Form that contains any Covered Software.
43
+
44
+ 1.11. "Patent Claims" of a Contributor means any patent claim(s), including
45
+ without limitation, method, process, and apparatus claims, in any patent
46
+ Licensable by such Contributor that would be infringed, but for the grant of
47
+ the License, by the making, using, selling, offering for sale, having made,
48
+ import, or transfer of either its Contributions or its Contributor Version.
49
+
50
+ 1.12. "Secondary License" means either the GNU General Public License, Version
51
+ 2.0, the GNU Lesser General Public License, Version 2.1, the GNU Affero General
52
+ Public License, Version 3.0, or any later versions of those licenses.
53
+
54
+ 1.13. "Source Code Form" means the form of the work preferred for making
55
+ modifications.
56
+
57
+ 1.14. "You" means an individual or a legal entity exercising rights under this
58
+ License.
59
+
60
+ 2. License Grants and Conditions
61
+ --------------------------------
62
+
63
+ 2.1. Grants
64
+
65
+ Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive
66
+ license:
67
+
68
+ (a) under intellectual property rights other than patent or trademark
69
+ Licensable by such Contributor to use, reproduce, make available, modify,
70
+ display, perform, distribute, and otherwise exploit its Contributions, either
71
+ on an unmodified basis, with Modifications, or as part of a Larger Work; and
72
+
73
+ (b) under Patent Claims of such Contributor to make, use, sell, offer for sale,
74
+ have made, import, and otherwise transfer either its Contributions or its
75
+ Contributor Version.
76
+
77
+ 2.2. Effective Date
78
+
79
+ The licenses granted in Section 2.1 with respect to any Contribution become
80
+ effective for each Contribution on the date the Contributor first distributes
81
+ such Contribution.
82
+
83
+ 2.3. Limitations on Grant Scope
84
+
85
+ The licenses granted in this Section 2 are the only rights granted under this
86
+ License. No additional rights or licenses will be implied from the distribution
87
+ or licensing of Covered Software under this License. Notwithstanding Section
88
+ 2.1(b) above, no patent license is granted by a Contributor:
89
+
90
+ (a) for any code that a Contributor has removed from Covered Software; or
91
+
92
+ (b) for infringements caused by: (i) Your and any other third party's
93
+ modifications of Covered Software, or (ii) the combination of its Contributions
94
+ with other software except as part of its Contributor Version; or
95
+
96
+ (c) under Patent Claims infringed by Covered Software in the absence of its
97
+ Contributions.
98
+
99
+ This License does not grant any rights in the trademarks, service marks, or
100
+ logos of any Contributor except as necessary to comply with Section 3.4.
101
+
102
+ 2.4. Subsequent Licenses
103
+
104
+ No Contributor makes additional grants as a result of Your choice to distribute
105
+ the Covered Software under a subsequent version of this License.
106
+
107
+ 2.5. Representation
108
+
109
+ Each Contributor represents that the Contributor believes its Contributions are
110
+ its original creation(s) or it has sufficient rights to grant the rights to its
111
+ Contributions conveyed by this License.
112
+
113
+ 2.6. Fair Use
114
+
115
+ This License is not intended to limit any rights You have under applicable
116
+ copyright doctrines of fair use, fair dealing, or other equivalents.
117
+
118
+ 2.7. Conditions
119
+
120
+ Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in
121
+ Section 2.1.
122
+
123
+ 3. Responsibilities
124
+ -------------------
125
+
126
+ 3.1. Distribution of Source Form
127
+
128
+ All distribution of Covered Software in Source Code Form, including any
129
+ Modifications that You create or to which You contribute, must be under the
130
+ terms of this License. You must inform recipients that the Source Code Form of
131
+ the Covered Software is governed by the terms of this License, and how they can
132
+ obtain a copy of this License. You may not attempt to alter or restrict the
133
+ recipients' rights in the Source Code Form.
134
+
135
+ 3.2. Distribution of Executable Form
136
+
137
+ If You distribute Covered Software in Executable Form then:
138
+
139
+ (a) such Covered Software must also be made available in Source Code Form, as
140
+ described in Section 3.1, and You must inform recipients how they can obtain a
141
+ copy of such Source Code Form by reasonable means in a timely manner, at a
142
+ charge no more than the cost of distribution to the recipient; and
143
+
144
+ (b) You may distribute such Executable Form under the terms of this License, or
145
+ sub-license it under different terms, provided that the license for the
146
+ Executable Form does not attempt to limit or alter the recipients' rights in the
147
+ Source Code Form under this License.
148
+
149
+ 3.3. Distribution of a Larger Work
150
+
151
+ You may create and distribute a Larger Work under terms of Your choice,
152
+ provided that You also comply with the requirements of this License for the
153
+ Covered Software. If the Larger Work is a combination of Covered Software with
154
+ a work governed by one or more Secondary Licenses, and the Covered Software is
155
+ not Incompatible With Secondary Licenses, this License permits You to
156
+ additionally distribute such Covered Software under the terms of such Secondary
157
+ License(s), so that the recipient of the Larger Work may, at their option,
158
+ further distribute the Covered Software under the terms of either this License
159
+ or such Secondary License(s).
160
+
161
+ 3.4. Notices
162
+
163
+ You may not remove or alter the substance of any license notices contained
164
+ within the Source Code Form of the Covered Software, except that You may alter
165
+ any license notices to the extent required to remedy known factual inaccuracies.
166
+
167
+ 3.5. Application of Additional Terms
168
+
169
+ You may choose to offer, and to charge a fee for, warranty, support, indemnity
170
+ or liability obligations to one or more recipients of Covered Software.
171
+ However, You may do so only on Your own behalf, and not on behalf of any
172
+ Contributor. You must make it absolutely clear that any such warranty, support,
173
+ indemnity, or liability obligation is offered by You alone, and You hereby
174
+ agree to indemnify every Contributor for any liability incurred by such
175
+ Contributor as a result of warranty, support, indemnity or liability terms You
176
+ offer. You may include additional disclaimers of warranty and limitations of
177
+ liability specific to any jurisdiction.
178
+
179
+ 4. Inability to Comply Due to Statute or Regulation
180
+ ---------------------------------------------------
181
+
182
+ If it is impossible for You to comply with any of the terms of this License
183
+ with respect to some or all of the Covered Software due to statute, judicial
184
+ order, or regulation then You must comply with the terms of this License to the
185
+ maximum extent possible.
186
+
187
+ 5. Termination
188
+ --------------
189
+
190
+ 5.1. The rights granted under this License will terminate automatically if You
191
+ fail to comply with any of its terms. However, if You become compliant, then
192
+ the rights granted under this License from a particular Contributor are
193
+ reinstated (a) provisionally, unless and until such Contributor explicitly and
194
+ finally terminates Your grants, and (b) on an ongoing basis, if such
195
+ Contributor fails to notify You of the non-compliance by some reasonable means
196
+ prior to 60 days after You have come back into compliance. Moreover, Your
197
+ grants from a particular Contributor are reinstated on an ongoing basis if such
198
+ Contributor notifies You of the non-compliance by some reasonable means, this
199
+ is the first time You have received notice of non-compliance with this License
200
+ from such Contributor, and You become compliant prior to 30 days after Your
201
+ receipt of the notice.
202
+
203
+ 5.2. If You initiate litigation against any entity by asserting a patent
204
+ infringement claim alleging that a Contributor Version directly or indirectly
205
+ infringes any patent, then the rights granted to You by any and all
206
+ Contributors for the Covered Software under Section 2.1 of this License shall
207
+ terminate.
208
+
209
+ 5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user
210
+ license agreements (excluding distributors and resellers) which have been
211
+ validly granted by You or Your distributors under this License prior to
212
+ termination shall survive termination.
213
+
214
+ 6. Disclaimer of Warranty
215
+ -------------------------
216
+
217
+ Covered Software is provided under this License on an "as is" basis, without
218
+ warranty of any kind, either expressed, implied, or statutory, including,
219
+ without limitation, warranties that the Covered Software is free of defects,
220
+ merchantable, fit for a particular purpose or non-infringing. The entire risk
221
+ as to the quality and performance of the Covered Software is with You. Should
222
+ any Covered Software prove defective in any respect, You assume the cost of any
223
+ necessary servicing, repair, or correction. This disclaimer of warranty
224
+ constitutes an essential part of this License. No use of any Covered Software
225
+ is authorized under this License except under this disclaimer.
226
+
227
+ 7. Limitation of Liability
228
+ --------------------------
229
+
230
+ Under no circumstances and under no legal theory, whether tort (including
231
+ negligence), contract, or otherwise, shall any Contributor, or anyone who
232
+ distributes Covered Software as permitted above, be liable to You for any
233
+ direct, indirect, special, incidental, or consequential damages of any character
234
+ including, without limitation, damages for lost profits, loss of goodwill, work
235
+ stoppage, computer failure or malfunction, or any and all other commercial
236
+ damages or losses, even if such party shall have been informed of the
237
+ possibility of such damages. This limitation of liability shall not apply to
238
+ liability for death or personal injury resulting from such party's negligence
239
+ to the extent applicable law prohibits such limitation. Some jurisdictions do
240
+ not allow the exclusion or limitation of incidental or consequential damages,
241
+ so this exclusion and limitation may not apply to You.
242
+
243
+ 8. Litigation
244
+ -------------
245
+
246
+ Any litigation relating to this License may be brought only in the courts of a
247
+ jurisdiction where the defendant maintains its principal place of business and
248
+ such litigation shall be governed by laws of that jurisdiction, without
249
+ reference to its conflict-of-law provisions. Nothing in this Section shall
250
+ prevent a party's ability to bring cross-claims or counter-claims.
251
+
252
+ 9. Miscellaneous
253
+ ----------------
254
+
255
+ This License represents the complete agreement concerning the subject matter
256
+ hereof. If any provision of this License is held to be unenforceable, such
257
+ provision shall be reformed only to the extent necessary to make it
258
+ enforceable. Any law or regulation which provides that the language of a
259
+ contract shall be construed against the drafter shall not be used to construe
260
+ this License against a Contributor.
261
+
262
+ 10. Versions of the License
263
+ ---------------------------
264
+
265
+ 10.1. New Versions
266
+
267
+ Mozilla Foundation is the license steward. Except as provided in Section 10.3,
268
+ no one other than the license steward has the right to modify or publish new
269
+ versions of this License. Each version will be given a distinguishing version
270
+ number.
271
+
272
+ 10.2. Effect of New Versions
273
+
274
+ You may distribute the Covered Software under the terms of the version of the
275
+ License under which You originally received the Covered Software, or under the
276
+ terms of any subsequent version published by the license steward.
277
+
278
+ 10.3. Modified Versions
279
+
280
+ If you create software not governed by this License, and you want to create a
281
+ new license for such software, you may create and use a modified version of
282
+ this License if you rename the license and remove any references to the name of
283
+ the license steward, except to note that such modified license differs from
284
+ this License.
285
+
286
+ 10.4. Distributing Source Code Form that is Incompatible With Secondary
287
+ Licenses
288
+
289
+ If You choose to distribute Source Code Form that is Incompatible With
290
+ Secondary Licenses under the terms of this version of the License, the notice
291
+ described in Exhibit B of this License must be attached.
292
+
293
+ Exhibit A - Source Code Form License Notice
294
+ -------------------------------------------
295
+
296
+ This Source Code Form is subject to the terms of the Mozilla Public License,
297
+ v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain
298
+ one at https://mozilla.org/MPL/2.0/.
299
+
300
+ Exhibit B - "Incompatible With Secondary Licenses" Notice
301
+ --------------------------------------------------------
302
+
303
+ This Source Code Form is "Incompatible With Secondary Licenses", as defined by
304
+ the Mozilla Public License, v. 2.0.
305
+
lastlight-0.1.0/NOTICE ADDED
@@ -0,0 +1,11 @@
1
+ Project: LastLight
2
+
3
+ Original Author:
4
+ Eduardo J. Barrios
5
+
6
+ GitHub:
7
+ https://github.com/edujbarrios
8
+
9
+ License:
10
+ Mozilla Public License 2.0
11
+