litloop 1.18.3__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 (333) hide show
  1. litloop-1.18.3/LICENSE +197 -0
  2. litloop-1.18.3/NOTICE +42 -0
  3. litloop-1.18.3/PKG-INFO +347 -0
  4. litloop-1.18.3/README.md +288 -0
  5. litloop-1.18.3/pyproject.toml +91 -0
  6. litloop-1.18.3/setup.cfg +4 -0
  7. litloop-1.18.3/src/litloop/__init__.py +89 -0
  8. litloop-1.18.3/src/litloop/__main__.py +6 -0
  9. litloop-1.18.3/src/litloop/_source_hygiene.py +158 -0
  10. litloop-1.18.3/src/litloop/agents/__init__.py +13 -0
  11. litloop-1.18.3/src/litloop/agents/client.py +164 -0
  12. litloop-1.18.3/src/litloop/agents/runner.py +123 -0
  13. litloop-1.18.3/src/litloop/agents/system.py +54 -0
  14. litloop-1.18.3/src/litloop/agents/tools.py +142 -0
  15. litloop-1.18.3/src/litloop/app_server.py +8 -0
  16. litloop-1.18.3/src/litloop/browser/__init__.py +1 -0
  17. litloop-1.18.3/src/litloop/browser/backend.py +1009 -0
  18. litloop-1.18.3/src/litloop/browser/camofox_api.py +368 -0
  19. litloop-1.18.3/src/litloop/browser/chrome_copy.py +136 -0
  20. litloop-1.18.3/src/litloop/browser/cloakbrowser_compat.py +72 -0
  21. litloop-1.18.3/src/litloop/browser/cookies.py +347 -0
  22. litloop-1.18.3/src/litloop/browser/engine.py +965 -0
  23. litloop-1.18.3/src/litloop/browser/login.py +636 -0
  24. litloop-1.18.3/src/litloop/browser/pdf.py +263 -0
  25. litloop-1.18.3/src/litloop/browser/profile_health.py +167 -0
  26. litloop-1.18.3/src/litloop/browser/runtime.py +210 -0
  27. litloop-1.18.3/src/litloop/cache.py +104 -0
  28. litloop-1.18.3/src/litloop/citations/__init__.py +1 -0
  29. litloop-1.18.3/src/litloop/citations/bib_import.py +102 -0
  30. litloop-1.18.3/src/litloop/citations/bibtex_crossref.py +143 -0
  31. litloop-1.18.3/src/litloop/citations/formats.py +225 -0
  32. litloop-1.18.3/src/litloop/citations/paper_list.py +200 -0
  33. litloop-1.18.3/src/litloop/citations/session_export.py +94 -0
  34. litloop-1.18.3/src/litloop/cli/__init__.py +12 -0
  35. litloop-1.18.3/src/litloop/cli/_utils.py +267 -0
  36. litloop-1.18.3/src/litloop/cli/commands.py +1098 -0
  37. litloop-1.18.3/src/litloop/cli/doctor.py +141 -0
  38. litloop-1.18.3/src/litloop/cli/main.py +1173 -0
  39. litloop-1.18.3/src/litloop/cli/web.py +190 -0
  40. litloop-1.18.3/src/litloop/config.py +413 -0
  41. litloop-1.18.3/src/litloop/data/VARCON-LICENSE.txt +62 -0
  42. litloop-1.18.3/src/litloop/data/elements.tsv +119 -0
  43. litloop-1.18.3/src/litloop/data/institutional_identity_policy.json +165 -0
  44. litloop-1.18.3/src/litloop/data/publisher_access_catalog.json +969 -0
  45. litloop-1.18.3/src/litloop/data/publisher_carsi.json +105 -0
  46. litloop-1.18.3/src/litloop/data/spelling_search.tsv.gz +0 -0
  47. litloop-1.18.3/src/litloop/data/spelling_us.tsv.gz +0 -0
  48. litloop-1.18.3/src/litloop/data/webvpn.dat +0 -0
  49. litloop-1.18.3/src/litloop/data/webvpn.json +603 -0
  50. litloop-1.18.3/src/litloop/db.py +1922 -0
  51. litloop-1.18.3/src/litloop/deps.py +128 -0
  52. litloop-1.18.3/src/litloop/desktop/__init__.py +1 -0
  53. litloop-1.18.3/src/litloop/desktop/agent_runner.py +537 -0
  54. litloop-1.18.3/src/litloop/desktop/download_jobs.py +571 -0
  55. litloop-1.18.3/src/litloop/desktop/error_text.py +192 -0
  56. litloop-1.18.3/src/litloop/desktop/server.py +999 -0
  57. litloop-1.18.3/src/litloop/desktop/settings.py +552 -0
  58. litloop-1.18.3/src/litloop/desktop/translate.py +103 -0
  59. litloop-1.18.3/src/litloop/diagnostics.py +126 -0
  60. litloop-1.18.3/src/litloop/download/__init__.py +1 -0
  61. litloop-1.18.3/src/litloop/download/doi_check.py +44 -0
  62. litloop-1.18.3/src/litloop/download/fetcher.py +975 -0
  63. litloop-1.18.3/src/litloop/download/markdown.py +130 -0
  64. litloop-1.18.3/src/litloop/download/pdf.py +454 -0
  65. litloop-1.18.3/src/litloop/download/pipeline.py +1166 -0
  66. litloop-1.18.3/src/litloop/download/progress.py +312 -0
  67. litloop-1.18.3/src/litloop/download/rename.py +211 -0
  68. litloop-1.18.3/src/litloop/extractors/__init__.py +0 -0
  69. litloop-1.18.3/src/litloop/extractors/html_extractor.py +31 -0
  70. litloop-1.18.3/src/litloop/extractors/pdf_extractor.py +151 -0
  71. litloop-1.18.3/src/litloop/extractors/publisher_adapters/__init__.py +0 -0
  72. litloop-1.18.3/src/litloop/extractors/publisher_adapters/acs.py +167 -0
  73. litloop-1.18.3/src/litloop/extractors/publisher_adapters/elsevier.py +178 -0
  74. litloop-1.18.3/src/litloop/extractors/publisher_adapters/generic.py +191 -0
  75. litloop-1.18.3/src/litloop/extractors/publisher_adapters/nature.py +204 -0
  76. litloop-1.18.3/src/litloop/extractors/publisher_adapters/rsc.py +154 -0
  77. litloop-1.18.3/src/litloop/extractors/publisher_adapters/tandfonline.py +154 -0
  78. litloop-1.18.3/src/litloop/extractors/publisher_adapters/wiley.py +160 -0
  79. litloop-1.18.3/src/litloop/http_utils.py +57 -0
  80. litloop-1.18.3/src/litloop/identifiers.py +134 -0
  81. litloop-1.18.3/src/litloop/institutional/__init__.py +1 -0
  82. litloop-1.18.3/src/litloop/institutional/auth.py +576 -0
  83. litloop-1.18.3/src/litloop/institutional/carsi_login.py +569 -0
  84. litloop-1.18.3/src/litloop/institutional/config_adapter.py +63 -0
  85. litloop-1.18.3/src/litloop/institutional/proxy_check.py +98 -0
  86. litloop-1.18.3/src/litloop/institutional/remote_assist.py +274 -0
  87. litloop-1.18.3/src/litloop/institutional/schools.py +102 -0
  88. litloop-1.18.3/src/litloop/institutional/session_heal.py +73 -0
  89. litloop-1.18.3/src/litloop/institutional/session_store.py +105 -0
  90. litloop-1.18.3/src/litloop/log.py +47 -0
  91. litloop-1.18.3/src/litloop/models.py +269 -0
  92. litloop-1.18.3/src/litloop/network.py +417 -0
  93. litloop-1.18.3/src/litloop/optional.py +310 -0
  94. litloop-1.18.3/src/litloop/publishers/__init__.py +1 -0
  95. litloop-1.18.3/src/litloop/publishers/access.py +232 -0
  96. litloop-1.18.3/src/litloop/publishers/pdf_router.py +451 -0
  97. litloop-1.18.3/src/litloop/publishers/profiles.py +899 -0
  98. litloop-1.18.3/src/litloop/publishers/strategies/__init__.py +122 -0
  99. litloop-1.18.3/src/litloop/publishers/strategies/_core.py +2340 -0
  100. litloop-1.18.3/src/litloop/publishers/strategies/_elsevier_api.py +578 -0
  101. litloop-1.18.3/src/litloop/publishers/strategies/acm.py +27 -0
  102. litloop-1.18.3/src/litloop/publishers/strategies/acs.py +42 -0
  103. litloop-1.18.3/src/litloop/publishers/strategies/aip.py +27 -0
  104. litloop-1.18.3/src/litloop/publishers/strategies/aps.py +29 -0
  105. litloop-1.18.3/src/litloop/publishers/strategies/asce.py +28 -0
  106. litloop-1.18.3/src/litloop/publishers/strategies/base.py +108 -0
  107. litloop-1.18.3/src/litloop/publishers/strategies/copernicus.py +24 -0
  108. litloop-1.18.3/src/litloop/publishers/strategies/elsevier.py +66 -0
  109. litloop-1.18.3/src/litloop/publishers/strategies/generic.py +39 -0
  110. litloop-1.18.3/src/litloop/publishers/strategies/ieee.py +28 -0
  111. litloop-1.18.3/src/litloop/publishers/strategies/iop.py +27 -0
  112. litloop-1.18.3/src/litloop/publishers/strategies/nature.py +27 -0
  113. litloop-1.18.3/src/litloop/publishers/strategies/oxford.py +27 -0
  114. litloop-1.18.3/src/litloop/publishers/strategies/registry.py +83 -0
  115. litloop-1.18.3/src/litloop/publishers/strategies/royalsociety.py +28 -0
  116. litloop-1.18.3/src/litloop/publishers/strategies/rsc.py +27 -0
  117. litloop-1.18.3/src/litloop/publishers/strategies/sage.py +30 -0
  118. litloop-1.18.3/src/litloop/publishers/strategies/science.py +27 -0
  119. litloop-1.18.3/src/litloop/publishers/strategies/springer.py +34 -0
  120. litloop-1.18.3/src/litloop/publishers/strategies/tandfonline.py +32 -0
  121. litloop-1.18.3/src/litloop/publishers/strategies/wiley.py +32 -0
  122. litloop-1.18.3/src/litloop/publishers/supplementary.py +219 -0
  123. litloop-1.18.3/src/litloop/quota.py +202 -0
  124. litloop-1.18.3/src/litloop/search/__init__.py +1 -0
  125. litloop-1.18.3/src/litloop/search/abstracts.py +291 -0
  126. litloop-1.18.3/src/litloop/search/deep.py +1216 -0
  127. litloop-1.18.3/src/litloop/search/quick.py +1102 -0
  128. litloop-1.18.3/src/litloop/search/scansci_find.py +410 -0
  129. litloop-1.18.3/src/litloop/search/screening.py +225 -0
  130. litloop-1.18.3/src/litloop/search/title_to_doi.py +163 -0
  131. litloop-1.18.3/src/litloop/search/watches.py +124 -0
  132. litloop-1.18.3/src/litloop/server.py +1731 -0
  133. litloop-1.18.3/src/litloop/sources/__init__.py +1339 -0
  134. litloop-1.18.3/src/litloop/sources/_batch.py +529 -0
  135. litloop-1.18.3/src/litloop/sources/_index.py +221 -0
  136. litloop-1.18.3/src/litloop/sources/_routes.py +290 -0
  137. litloop-1.18.3/src/litloop/sources/altcha.py +90 -0
  138. litloop-1.18.3/src/litloop/sources/arxiv.py +45 -0
  139. litloop-1.18.3/src/litloop/sources/attempt.py +91 -0
  140. litloop-1.18.3/src/litloop/sources/carsi.py +74 -0
  141. litloop-1.18.3/src/litloop/sources/core_api.py +46 -0
  142. litloop-1.18.3/src/litloop/sources/crossref.py +162 -0
  143. litloop-1.18.3/src/litloop/sources/elsevier_api.py +620 -0
  144. litloop-1.18.3/src/litloop/sources/elsevier_check.py +274 -0
  145. litloop-1.18.3/src/litloop/sources/europepmc.py +81 -0
  146. litloop-1.18.3/src/litloop/sources/ezproxy.py +317 -0
  147. litloop-1.18.3/src/litloop/sources/instsci.py +1295 -0
  148. litloop-1.18.3/src/litloop/sources/libgen.py +116 -0
  149. litloop-1.18.3/src/litloop/sources/nature.py +39 -0
  150. litloop-1.18.3/src/litloop/sources/oa_discovery.py +135 -0
  151. litloop-1.18.3/src/litloop/sources/openaire.py +122 -0
  152. litloop-1.18.3/src/litloop/sources/openalex.py +100 -0
  153. litloop-1.18.3/src/litloop/sources/publishers.py +684 -0
  154. litloop-1.18.3/src/litloop/sources/sage_cn.py +139 -0
  155. litloop-1.18.3/src/litloop/sources/scibban.py +10 -0
  156. litloop-1.18.3/src/litloop/sources/scihub.py +1379 -0
  157. litloop-1.18.3/src/litloop/sources/scihub_domains.py +203 -0
  158. litloop-1.18.3/src/litloop/sources/scihub_speed.py +187 -0
  159. litloop-1.18.3/src/litloop/sources/scoring.py +250 -0
  160. litloop-1.18.3/src/litloop/sources/semantic_scholar.py +146 -0
  161. litloop-1.18.3/src/litloop/sources/springer_tdm.py +172 -0
  162. litloop-1.18.3/src/litloop/sources/unpaywall.py +116 -0
  163. litloop-1.18.3/src/litloop/sources/vpnsci.py +38 -0
  164. litloop-1.18.3/src/litloop/store.py +264 -0
  165. litloop-1.18.3/src/litloop/templates/index.html +347 -0
  166. litloop-1.18.3/src/litloop/terms/__init__.py +1 -0
  167. litloop-1.18.3/src/litloop/terms/glossary.py +422 -0
  168. litloop-1.18.3/src/litloop/terms/spelling.py +89 -0
  169. litloop-1.18.3/src/litloop/terms/text.py +106 -0
  170. litloop-1.18.3/src/litloop/tor/__init__.py +1 -0
  171. litloop-1.18.3/src/litloop/tor/embedded.py +371 -0
  172. litloop-1.18.3/src/litloop/tor/proxy.py +110 -0
  173. litloop-1.18.3/src/litloop/updates.py +148 -0
  174. litloop-1.18.3/src/litloop/zotero/__init__.py +1 -0
  175. litloop-1.18.3/src/litloop/zotero/bridge.py +309 -0
  176. litloop-1.18.3/src/litloop/zotero/client.py +317 -0
  177. litloop-1.18.3/src/litloop.egg-info/PKG-INFO +347 -0
  178. litloop-1.18.3/src/litloop.egg-info/SOURCES.txt +331 -0
  179. litloop-1.18.3/src/litloop.egg-info/dependency_links.txt +1 -0
  180. litloop-1.18.3/src/litloop.egg-info/entry_points.txt +2 -0
  181. litloop-1.18.3/src/litloop.egg-info/requires.txt +43 -0
  182. litloop-1.18.3/src/litloop.egg-info/top_level.txt +1 -0
  183. litloop-1.18.3/tests/test_abstracts.py +180 -0
  184. litloop-1.18.3/tests/test_agent_builtin.py +181 -0
  185. litloop-1.18.3/tests/test_agent_client.py +108 -0
  186. litloop-1.18.3/tests/test_agent_loop.py +81 -0
  187. litloop-1.18.3/tests/test_agent_runner.py +221 -0
  188. litloop-1.18.3/tests/test_agent_tools.py +92 -0
  189. litloop-1.18.3/tests/test_app_continue.py +81 -0
  190. litloop-1.18.3/tests/test_app_server.py +396 -0
  191. litloop-1.18.3/tests/test_app_settings_paths.py +42 -0
  192. litloop-1.18.3/tests/test_app_types.py +105 -0
  193. litloop-1.18.3/tests/test_batch_school_phase.py +49 -0
  194. litloop-1.18.3/tests/test_batch_termination.py +131 -0
  195. litloop-1.18.3/tests/test_bib_import.py +57 -0
  196. litloop-1.18.3/tests/test_bibtex_crossref.py +102 -0
  197. litloop-1.18.3/tests/test_browser_backend_check.py +55 -0
  198. litloop-1.18.3/tests/test_browser_reaper.py +133 -0
  199. litloop-1.18.3/tests/test_build_release_prune.py +63 -0
  200. litloop-1.18.3/tests/test_cache_moved_folder.py +37 -0
  201. litloop-1.18.3/tests/test_camofox_api.py +145 -0
  202. litloop-1.18.3/tests/test_camoufox_backend.py +76 -0
  203. litloop-1.18.3/tests/test_challenge_dead_end.py +9 -0
  204. litloop-1.18.3/tests/test_checkout_sync.py +66 -0
  205. litloop-1.18.3/tests/test_chrome_copy.py +73 -0
  206. litloop-1.18.3/tests/test_cli_commands.py +103 -0
  207. litloop-1.18.3/tests/test_cloakbrowser_compat.py +83 -0
  208. litloop-1.18.3/tests/test_cloakbrowser_gate.py +41 -0
  209. litloop-1.18.3/tests/test_config_env_keys.py +80 -0
  210. litloop-1.18.3/tests/test_config_masking.py +44 -0
  211. litloop-1.18.3/tests/test_db.py +514 -0
  212. litloop-1.18.3/tests/test_dead_browser_waits.py +63 -0
  213. litloop-1.18.3/tests/test_dead_driver.py +41 -0
  214. litloop-1.18.3/tests/test_deep_exact_queries.py +80 -0
  215. litloop-1.18.3/tests/test_deep_search.py +568 -0
  216. litloop-1.18.3/tests/test_diagnostics.py +58 -0
  217. litloop-1.18.3/tests/test_direct_routing.py +55 -0
  218. litloop-1.18.3/tests/test_doctor.py +88 -0
  219. litloop-1.18.3/tests/test_doi_check.py +64 -0
  220. litloop-1.18.3/tests/test_doi_index.py +182 -0
  221. litloop-1.18.3/tests/test_download_invariants.py +339 -0
  222. litloop-1.18.3/tests/test_download_jobs.py +1501 -0
  223. litloop-1.18.3/tests/test_download_local.py +128 -0
  224. litloop-1.18.3/tests/test_elsevier_api_proxy.py +130 -0
  225. litloop-1.18.3/tests/test_elsevier_api_split.py +89 -0
  226. litloop-1.18.3/tests/test_elsevier_check.py +212 -0
  227. litloop-1.18.3/tests/test_error_text.py +90 -0
  228. litloop-1.18.3/tests/test_europepmc.py +123 -0
  229. litloop-1.18.3/tests/test_eval_synergy.py +52 -0
  230. litloop-1.18.3/tests/test_ezproxy_lane.py +137 -0
  231. litloop-1.18.3/tests/test_failure_reasons.py +115 -0
  232. litloop-1.18.3/tests/test_feedback_fixes.py +95 -0
  233. litloop-1.18.3/tests/test_find_bridge.py +162 -0
  234. litloop-1.18.3/tests/test_fork_fixes.py +722 -0
  235. litloop-1.18.3/tests/test_generic_adapter.py +96 -0
  236. litloop-1.18.3/tests/test_glossary.py +159 -0
  237. litloop-1.18.3/tests/test_grey_default_off.py +50 -0
  238. litloop-1.18.3/tests/test_grey_proxy.py +90 -0
  239. litloop-1.18.3/tests/test_hedged_race.py +157 -0
  240. litloop-1.18.3/tests/test_html_extractor.py +76 -0
  241. litloop-1.18.3/tests/test_http_retry.py +65 -0
  242. litloop-1.18.3/tests/test_identifiers_canonical.py +46 -0
  243. litloop-1.18.3/tests/test_institutional_sequence.py +62 -0
  244. litloop-1.18.3/tests/test_lane_oa_enrich.py +155 -0
  245. litloop-1.18.3/tests/test_lane_overflow_institution.py +58 -0
  246. litloop-1.18.3/tests/test_lane_pretriage.py +208 -0
  247. litloop-1.18.3/tests/test_late_files.py +88 -0
  248. litloop-1.18.3/tests/test_libgen_session.py +104 -0
  249. litloop-1.18.3/tests/test_login_no_access.py +149 -0
  250. litloop-1.18.3/tests/test_login_waits.py +74 -0
  251. litloop-1.18.3/tests/test_main.py +48 -0
  252. litloop-1.18.3/tests/test_mcp_batch_size.py +27 -0
  253. litloop-1.18.3/tests/test_mcp_lifecycle.py +76 -0
  254. litloop-1.18.3/tests/test_mcp_surface.py +84 -0
  255. litloop-1.18.3/tests/test_md_export.py +101 -0
  256. litloop-1.18.3/tests/test_models.py +111 -0
  257. litloop-1.18.3/tests/test_no_control_chars.py +27 -0
  258. litloop-1.18.3/tests/test_oa_browser_fallback.py +35 -0
  259. litloop-1.18.3/tests/test_oa_discovery.py +140 -0
  260. litloop-1.18.3/tests/test_onboarding.py +51 -0
  261. litloop-1.18.3/tests/test_openaire.py +49 -0
  262. litloop-1.18.3/tests/test_optica_profile.py +48 -0
  263. litloop-1.18.3/tests/test_optimization_batch.py +198 -0
  264. litloop-1.18.3/tests/test_optional.py +240 -0
  265. litloop-1.18.3/tests/test_page_pdf_link_text.py +46 -0
  266. litloop-1.18.3/tests/test_paper_check.py +57 -0
  267. litloop-1.18.3/tests/test_paste_list.py +90 -0
  268. litloop-1.18.3/tests/test_pdf_extractor.py +86 -0
  269. litloop-1.18.3/tests/test_pdf_ownership.py +169 -0
  270. litloop-1.18.3/tests/test_pdf_utils_url.py +22 -0
  271. litloop-1.18.3/tests/test_pipeline.py +154 -0
  272. litloop-1.18.3/tests/test_pmc_batch.py +17 -0
  273. litloop-1.18.3/tests/test_policy_lanes.py +77 -0
  274. litloop-1.18.3/tests/test_prepare_release.py +116 -0
  275. litloop-1.18.3/tests/test_preprint_pdf.py +157 -0
  276. litloop-1.18.3/tests/test_preview_guard.py +65 -0
  277. litloop-1.18.3/tests/test_profile_health.py +110 -0
  278. litloop-1.18.3/tests/test_progress_auto.py +66 -0
  279. litloop-1.18.3/tests/test_progress_reporter.py +117 -0
  280. litloop-1.18.3/tests/test_proxy_check.py +80 -0
  281. litloop-1.18.3/tests/test_proxy_rotation.py +33 -0
  282. litloop-1.18.3/tests/test_publisher_access.py +368 -0
  283. litloop-1.18.3/tests/test_publisher_pdf_router.py +96 -0
  284. litloop-1.18.3/tests/test_publisher_site_skip.py +41 -0
  285. litloop-1.18.3/tests/test_publisher_strategies.py +67 -0
  286. litloop-1.18.3/tests/test_publisher_window.py +90 -0
  287. litloop-1.18.3/tests/test_queue_parsing_arxiv.py +89 -0
  288. litloop-1.18.3/tests/test_quota_warnings.py +27 -0
  289. litloop-1.18.3/tests/test_real_world_replay.py +425 -0
  290. litloop-1.18.3/tests/test_remaining_estimate.py +46 -0
  291. litloop-1.18.3/tests/test_remote_assist.py +84 -0
  292. litloop-1.18.3/tests/test_rename.py +56 -0
  293. litloop-1.18.3/tests/test_rename_formats.py +218 -0
  294. litloop-1.18.3/tests/test_replay_batching.py +73 -0
  295. litloop-1.18.3/tests/test_resolver.py +178 -0
  296. litloop-1.18.3/tests/test_sage_cn.py +180 -0
  297. litloop-1.18.3/tests/test_schools.py +122 -0
  298. litloop-1.18.3/tests/test_scihub_pool.py +220 -0
  299. litloop-1.18.3/tests/test_scihub_referer.py +122 -0
  300. litloop-1.18.3/tests/test_scihub_speed.py +152 -0
  301. litloop-1.18.3/tests/test_scihub_year.py +39 -0
  302. litloop-1.18.3/tests/test_screening.py +115 -0
  303. litloop-1.18.3/tests/test_search_cache.py +132 -0
  304. litloop-1.18.3/tests/test_search_cleanup.py +92 -0
  305. litloop-1.18.3/tests/test_search_errors.py +75 -0
  306. litloop-1.18.3/tests/test_search_fallback_tidy.py +38 -0
  307. litloop-1.18.3/tests/test_seed_collection.py +64 -0
  308. litloop-1.18.3/tests/test_session_heal.py +171 -0
  309. litloop-1.18.3/tests/test_session_store.py +64 -0
  310. litloop-1.18.3/tests/test_small_batch.py +129 -0
  311. litloop-1.18.3/tests/test_smoke_app.py +47 -0
  312. litloop-1.18.3/tests/test_source_hygiene.py +22 -0
  313. litloop-1.18.3/tests/test_sources_negcache.py +29 -0
  314. litloop-1.18.3/tests/test_spelling.py +22 -0
  315. litloop-1.18.3/tests/test_springer_tdm.py +184 -0
  316. litloop-1.18.3/tests/test_sso_publishers.py +446 -0
  317. litloop-1.18.3/tests/test_startup_and_prune.py +111 -0
  318. litloop-1.18.3/tests/test_step_watchdog.py +43 -0
  319. litloop-1.18.3/tests/test_store.py +136 -0
  320. litloop-1.18.3/tests/test_subprocess_decode.py +19 -0
  321. litloop-1.18.3/tests/test_supplementary.py +121 -0
  322. litloop-1.18.3/tests/test_text.py +34 -0
  323. litloop-1.18.3/tests/test_translate.py +120 -0
  324. litloop-1.18.3/tests/test_unpaywall_email_gate.py +152 -0
  325. litloop-1.18.3/tests/test_updates.py +63 -0
  326. litloop-1.18.3/tests/test_user_agent.py +75 -0
  327. litloop-1.18.3/tests/test_user_waiting_notice.py +79 -0
  328. litloop-1.18.3/tests/test_wall_pacing.py +93 -0
  329. litloop-1.18.3/tests/test_watches.py +127 -0
  330. litloop-1.18.3/tests/test_webvpn_auth.py +51 -0
  331. litloop-1.18.3/tests/test_webvpn_left_and_timing.py +235 -0
  332. litloop-1.18.3/tests/test_zotero.py +214 -0
  333. litloop-1.18.3/tests/test_zotero_bridge_ops.py +224 -0
litloop-1.18.3/LICENSE ADDED
@@ -0,0 +1,197 @@
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
+
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 modifications
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 any work of authorship, including
48
+ the original version of the Work and any modifications or additions
49
+ to that Work or Derivative Works thereof, that is intentionally
50
+ submitted to the Licensor for inclusion in the Work by the copyright owner
51
+ or by an individual or Legal Entity authorized to submit on behalf of
52
+ the copyright owner. For the purposes of this definition, "submitted"
53
+ means any form of electronic, verbal, or written communication sent
54
+ to the Licensor or its representatives, including but not limited to
55
+ communication on electronic mailing lists, source code control systems,
56
+ and issue tracking systems that are managed by, or on behalf of, the
57
+ Licensor for the purpose of discussing and improving the Work, but
58
+ excluding communication that is conspicuously marked or otherwise
59
+ designated in writing by the copyright owner as "Not a Contribution."
60
+
61
+ "Contributor" shall mean Licensor and any individual or Legal Entity
62
+ on behalf of whom a Contribution has been received by the Licensor and
63
+ subsequently incorporated within the Work.
64
+
65
+ 2. Grant of Copyright License. Subject to the terms and conditions of
66
+ this License, each Contributor hereby grants to You a perpetual,
67
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
68
+ copyright license to reproduce, prepare Derivative Works of,
69
+ publicly display, publicly perform, sublicense, and distribute the
70
+ Work and such Derivative Works in Source or Object form.
71
+
72
+ 3. Grant of Patent License. Subject to the terms and conditions of
73
+ this License, each Contributor hereby grants to You a perpetual,
74
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
75
+ (except as stated in this section) patent license to make, have made,
76
+ use, offer to sell, sell, import, and otherwise transfer the Work,
77
+ where such license applies only to those patent claims licensable
78
+ by such Contributor that are necessarily infringed by their
79
+ Contribution(s) alone or by combination of their Contribution(s)
80
+ with the Work to which such Contribution(s) was submitted. If You
81
+ institute patent litigation against any entity (including a
82
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
83
+ or a Contribution incorporated within the Work constitutes direct
84
+ or contributory patent infringement, then any patent licenses
85
+ granted to You under this License for that Work shall terminate
86
+ as of the date such litigation is filed.
87
+
88
+ 4. Redistribution. You may reproduce and distribute copies of the
89
+ Work or Derivative Works thereof in any medium, with or without
90
+ modifications, and in Source or Object form, provided that You
91
+ meet the following conditions:
92
+
93
+ (a) You must give any other recipients of the Work or
94
+ Derivative Works a copy of this License; and
95
+
96
+ (b) You must cause any modified files to carry prominent notices
97
+ stating that You changed the files; and
98
+
99
+ (c) You must retain, in the Source form of any Derivative Works
100
+ that You distribute, all copyright, patent, trademark, and
101
+ attribution notices from the Source form of the Work,
102
+ excluding those notices that do not pertain to any part of
103
+ the Derivative Works; and
104
+
105
+ (d) If the Work includes a "NOTICE" text file as part of its
106
+ distribution, then any Derivative Works that You distribute must
107
+ include a readable copy of the attribution notices contained
108
+ within such NOTICE file, excluding any notices that do not
109
+ pertain to any part of the Derivative Works, in at least one
110
+ of the following places: within a NOTICE text file distributed
111
+ as part of the Derivative Works; within the Source form or
112
+ documentation, if provided along with the Derivative Works; or,
113
+ within a display generated by the Derivative Works, if and
114
+ wherever such third-party notices normally appear. The contents
115
+ of the NOTICE file are for informational purposes only and
116
+ do not modify the License. You may add Your own attribution
117
+ notices within Derivative Works that You distribute, alongside
118
+ or as an addendum to the NOTICE text from the Work, provided
119
+ that such additional attribution notices cannot be construed
120
+ as modifying the License.
121
+
122
+ You may add Your own copyright statement to Your modifications and
123
+ may provide additional or different license terms and conditions
124
+ for use, reproduction, or distribution of Your modifications, or
125
+ for any such Derivative Works as a whole, provided Your use,
126
+ reproduction, and distribution of the Work otherwise complies with
127
+ the conditions stated in this License.
128
+
129
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
130
+ any Contribution intentionally submitted for inclusion in the Work
131
+ by You to the Licensor shall be under the terms and conditions of
132
+ this License, without any additional terms or conditions.
133
+ Notwithstanding the above, nothing herein shall supersede or modify
134
+ the terms of any separate license agreement you may have executed
135
+ with Licensor regarding such Contributions.
136
+
137
+ 6. Trademarks. This License does not grant permission to use the trade
138
+ names, trademarks, service marks, or product names of the Licensor,
139
+ except as required for reasonable and customary use in describing the
140
+ origin of the Work and reproducing the content of the NOTICE file.
141
+
142
+ 7. Disclaimer of Warranty. Unless required by applicable law or
143
+ agreed to in writing, Licensor provides the Work (and each
144
+ Contributor provides its Contributions) on an "AS IS" BASIS,
145
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
146
+ implied, including, without limitation, any warranties or conditions
147
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
148
+ PARTICULAR PURPOSE. You are solely responsible for determining the
149
+ appropriateness of using or redistributing the Work and assume any
150
+ risks associated with Your exercise of permissions under this License.
151
+
152
+ 8. Limitation of Liability. In no event and under no legal theory,
153
+ whether in tort (including negligence), contract, or otherwise,
154
+ unless required by applicable law (such as deliberate and grossly
155
+ negligent acts) or agreed to in writing, shall any Contributor be
156
+ liable to You for damages, including any direct, indirect, special,
157
+ incidental, or consequential damages of any character arising as a
158
+ result of this License or out of the use or inability to use the
159
+ Work (including but not limited to damages for loss of goodwill,
160
+ work stoppage, computer failure or malfunction, or any and all
161
+ other commercial damages or losses), even if such Contributor
162
+ has been advised of the possibility of such damages.
163
+
164
+ 9. Accepting Warranty or Additional Liability. While redistributing
165
+ the Work or Derivative Works thereof, You may choose to offer,
166
+ and charge a fee for, acceptance of support, warranty, indemnity,
167
+ or other liability obligations and/or rights consistent with this
168
+ License. However, in accepting such obligations, You may act only
169
+ on Your own behalf and on Your sole responsibility, not on behalf
170
+ of any other Contributor, and only if You agree to indemnify,
171
+ defend, and hold each Contributor harmless for any liability
172
+ incurred by, or claims asserted against, such Contributor by reason
173
+ of your accepting any such warranty or additional liability.
174
+
175
+ END OF TERMS AND CONDITIONS
176
+
177
+ Copyright 2024-2026 litloop contributors
178
+
179
+ Licensed under the Apache License, Version 2.0 (the "License");
180
+ you may not use this file except in compliance with the License.
181
+ You may obtain a copy of the License at
182
+
183
+ http://www.apache.org/licenses/LICENSE-2.0
184
+
185
+ Unless required by applicable law or agreed to in writing, software
186
+ distributed under the License is distributed on an "AS IS" BASIS,
187
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
188
+ See the License for the specific language governing permissions and
189
+ limitations under the License.
190
+
191
+ ---
192
+
193
+ EXCEPTION: The compiled Cython extensions in src/litloop/_core/ (*.pyd, *.so)
194
+ are distributed as pre-compiled binaries via PyPI only. Their Cython source
195
+ code (*.pyx) is proprietary and not included in this repository. The pure
196
+ Python fallback implementations in the main source files are fully functional
197
+ and licensed under the Apache 2.0 license above.
litloop-1.18.3/NOTICE ADDED
@@ -0,0 +1,42 @@
1
+ LitLoop (litloop-paper-agent)
2
+ https://github.com/dysprosium231/litloop-paper-agent
3
+
4
+ This product is a derivative work of scansci-pdf
5
+ https://github.com/Rimagination/scansci-pdf
6
+ Copyright 2024-2026 scansci-pdf contributors
7
+ Licensed under the Apache License, Version 2.0 (see LICENSE).
8
+
9
+ LitLoop is maintained independently by dysprosium231 and is not affiliated
10
+ with or endorsed by the original authors. The full commit history of the
11
+ original project is preserved in this repository; changes made for LitLoop
12
+ are the commits after upstream commit fb796df and include:
13
+
14
+ - Institutional downloads: fixes for browser-based publisher logins (WebVPN,
15
+ CARSI/Shibboleth, school-agnostic IdP detection, login heartbeat so races
16
+ wait for a user who is logging in, cancellation of in-flight downloads).
17
+ - Browser: option to drive a copy of the locally installed Chrome; stable
18
+ browser process name; per-host proxy exception for publishers that
19
+ authorise by cookie; challenge-page and PDF-capture fixes for Science,
20
+ Springer Nature, RSC, ACS, Wiley and AIP.
21
+ - Sci-Hub: ALTCHA proof-of-work solved over HTTP so it works without a
22
+ browser; optional no-browser mode; mirror-probe fix.
23
+ - Zotero: zotero_push files papers through zotero-mcp (CrossRef metadata,
24
+ duplicate reuse, PDF attachment to WebDAV) and finds it automatically.
25
+ - Installation: scripts/deploy.py installs or updates the plugin end to end
26
+ and registers it with Claude Code, Claude Desktop and Codex.
27
+ - Config output masks every API key; Springer OA-only keys are recognised.
28
+
29
+ The compiled extensions of the original project (src/scansci_pdf/_core/*.pyd,
30
+ *.so) are distributed by the original authors via PyPI only and are NOT part
31
+ of this repository; LitLoop uses the pure-Python fallbacks.
32
+
33
+ Third-party data
34
+ ----------------
35
+
36
+ src/litloop/data/spelling_*.tsv.gz are derived from VarCon (Variant Conversion
37
+ Info), Copyright 2000-2020 Kevin Atkinson and Benjamin Titze, part of SCOWL
38
+ (http://wordlist.aspell.net/). See src/litloop/data/VARCON-LICENSE.txt.
39
+
40
+ src/litloop/data/elements.tsv lists element symbols and names taken from
41
+ PubChem's periodic table (National Center for Biotechnology Information,
42
+ https://pubchem.ncbi.nlm.nih.gov/periodic-table/), retrieved 2026-10-25.
@@ -0,0 +1,347 @@
1
+ Metadata-Version: 2.4
2
+ Name: litloop
3
+ Version: 1.18.3
4
+ Summary: LitLoop academic paper agent: search, screening, download (open access, publisher and institutional routes) and Zotero filing, as an MCP server and CLI
5
+ License-Expression: Apache-2.0
6
+ Project-URL: Homepage, https://github.com/dysprosium231/litloop-paper-agent
7
+ Project-URL: Repository, https://github.com/dysprosium231/litloop-paper-agent
8
+ Project-URL: Issues, https://github.com/dysprosium231/litloop-paper-agent/issues
9
+ Project-URL: Upstream, https://github.com/Rimagination/scansci-pdf
10
+ Keywords: mcp,mcp-server,literature-review,systematic-review,zotero,academic-papers,research-tools,pdf
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Programming Language :: Python :: 3.14
19
+ Classifier: Topic :: Scientific/Engineering
20
+ Classifier: Topic :: Text Processing :: Markup :: HTML
21
+ Requires-Python: >=3.11
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Requires-Dist: requests>=2.31
25
+ Requires-Dist: requests[socks]>=2.31
26
+ Requires-Dist: urllib3>=2.7.0
27
+ Requires-Dist: beautifulsoup4>=4.12
28
+ Requires-Dist: mcp[cli]<3.0,>=1.12
29
+ Requires-Dist: typer>=0.15
30
+ Requires-Dist: uvicorn>=0.34
31
+ Requires-Dist: fastapi>=0.115
32
+ Requires-Dist: jinja2>=3.1
33
+ Requires-Dist: pymupdf>=1.24
34
+ Requires-Dist: openpyxl>=3.1
35
+ Requires-Dist: pymupdf4llm>=0.0.17
36
+ Requires-Dist: filelock>=3.12
37
+ Requires-Dist: pycryptodome>=3.20
38
+ Requires-Dist: abbreviations>=0.2.5
39
+ Provides-Extra: fast
40
+ Requires-Dist: lxml>=4.9; extra == "fast"
41
+ Provides-Extra: vpnsci
42
+ Requires-Dist: pycryptodome>=3.20; extra == "vpnsci"
43
+ Provides-Extra: instsci
44
+ Requires-Dist: pycryptodome>=3.20; extra == "instsci"
45
+ Provides-Extra: cloakbrowser
46
+ Requires-Dist: cloakbrowser>=0.5.9; extra == "cloakbrowser"
47
+ Provides-Extra: camoufox
48
+ Requires-Dist: camoufox[geoip]>=0.4.11; extra == "camoufox"
49
+ Provides-Extra: web
50
+ Requires-Dist: fastapi>=0.115; extra == "web"
51
+ Requires-Dist: jinja2>=3.1; extra == "web"
52
+ Provides-Extra: patchright
53
+ Requires-Dist: patchright>=1.61; extra == "patchright"
54
+ Provides-Extra: zotero
55
+ Requires-Dist: zotero-mcp-server>=0.14.1; extra == "zotero"
56
+ Provides-Extra: dev
57
+ Requires-Dist: pytest>=8.0; extra == "dev"
58
+ Dynamic: license-file
59
+
60
+ [English](README.md) · [简体中文](README.zh-CN.md)
61
+
62
+ <div align="center">
63
+ <img src="assets/brand/litloop-icon.png" width="88" alt="LitLoop" />
64
+ <h1>LitLoop</h1>
65
+ <p><strong>A desktop app for finding, screening, downloading and filing papers</strong> · an agent searches and scores in the background, you make the calls in the app</p>
66
+
67
+ <a href="./LICENSE"><img alt="License" src="https://img.shields.io/badge/license-Apache--2.0-0F766E?style=flat-square" /></a>
68
+ <a href="https://modelcontextprotocol.io"><img alt="MCP" src="https://img.shields.io/badge/MCP-21%20tools-111827?style=flat-square" /></a>
69
+ <img alt="Python" src="https://img.shields.io/badge/python-3.11%2B-3776AB?style=flat-square" />
70
+ <img alt="Status" src="https://img.shields.io/badge/status-in%20development-F59E0B?style=flat-square" />
71
+
72
+ [Screenshots](#screenshots) · [Why](#why-litloop) · [One full run](#one-full-run) · [The four screens](#the-four-screens) · [Deep search](#deep-search-how-it-gets-the-whole-topic) · [Downloading](#downloading-how-it-gets-the-pdf) · [Install](#install-and-run) · [Using it with an agent](#using-it-with-an-agent) · [Status](#project-status)
73
+ </div>
74
+
75
+ > **Still in development.** Search → screening → download → Zotero works end to end and has been checked against real topics and a small test set. The desktop app covers screening, downloads, Zotero, settings, the built-in agent and watched searches, and you can build your own installer. Systematic-review support stops at flow counts and export; analysis and synthesis are not built yet. See [Project status](#project-status).
76
+ >
77
+ > LitLoop is an independent derivative of [Rimagination/scansci-pdf](https://github.com/Rimagination/scansci-pdf) (Apache-2.0), maintained by [dysprosium231](https://github.com/dysprosium231); it is not affiliated with the original author. Most of the download and institutional-access machinery comes from that project; LitLoop's changes are listed in [NOTICE](NOTICE).
78
+
79
+ ## Screenshots
80
+
81
+ | Screening: the agent's score and reason, your call | Downloads: the queue, one paper at a time |
82
+ |:---:|:---:|
83
+ | ![Screening](assets/screenshots/screening.png) | ![Downloads](assets/screenshots/downloads.png) |
84
+ | **Zotero: push a download batch into a collection** | **Settings: every group has a test button** |
85
+ | ![Zotero](assets/screenshots/zotero.png) | ![Settings](assets/screenshots/settings.png) |
86
+
87
+ ## Why LitLoop
88
+
89
+ Literature work on a new topic usually gets stuck in four places. LitLoop handles each of them:
90
+
91
+ | Where it sticks | What LitLoop does |
92
+ |---|---|
93
+ | **Results are noisy** — half of the first pages are off-topic | Deduplicates, drops off-topic titles and junk records, folds preprints into the published version; every hit carries a cleaned abstract, the real citation count, and retraction or expression-of-concern flags |
94
+ | **Too much to read** — hundreds of abstracts, no idea where to start | An agent reads the abstracts and scores each paper high / medium / low / irrelevant with one sentence of reasoning; deep search keeps re-ranking from your scores so the likeliest papers come first |
95
+ | **Downloading is a chore** — open access, publisher site, campus WebVPN, CARSI, one after another | One click: open access first, then the publisher's own site, then each campus route in turn; when you need to log in or solve a captcha the app tells you and waits |
96
+ | **Filing is tedious** — dragging papers into Zotero and renaming files | Files are named `author-year_title-words_DOI.pdf`, pushed into a Zotero collection by download batch, reused when the item already exists, and checked for empty attachments |
97
+
98
+ A few rules it follows:
99
+
100
+ - **You decide.** The agent only scores and explains; which paper to keep and which to download is your call, and your score overrides the agent's.
101
+ - **Logins happen in your own browser.** Campus account, password and captcha are all yours to handle. LitLoop stores no passwords and does not bypass verification.
102
+ - **Data stays on your machine.** Screening records, download history and PDFs live in `~/.litloop/` and the folder you pick; Zotero writes go through the local interface.
103
+ - **API quota is visible.** Official limits are collected in [docs/API_LIMITS.md](docs/API_LIMITS.md), and the settings screen shows today's usage.
104
+
105
+ ## One full run
106
+
107
+ Take "rare-earth-doped amorphous nanomaterials as drug carriers" as an example:
108
+
109
+ 1. **Ask the question.** In the app's Screening screen, click "New search" and fill in the question and inclusion criteria — or just tell an agent (Claude Code, Codex, etc.): "find as much of the literature on rare-earth-doped amorphous nanocarriers for drug delivery as you can, and hand it to me in batches". If you would rather not keep a chat open, fill in a tool-calling model under Settings → Built-in agent and the app runs the search itself.
110
+ 2. **The agent searches and scores.** Quick search answers in seconds; deep search first builds a candidate pool (a few thousand papers) and then hands you 30 at a time, already scored.
111
+ 3. **You screen in the app.** The batch list is on the left, the abstract (translatable to Chinese), journal quartile, citation count and the agent's reason on the right. `↑`/`↓` moves, `1`–`4` scores, `space` adds to downloads. Click "Continue search" for the next batch without going back to the chat.
112
+ 4. **Download.** The Downloads screen collects everything you picked across searches that has not been downloaded yet; click "Download all". Each paper shows what it is doing and where it finally came from; when it needs your campus login or a captcha, an amber banner appears at the top.
113
+ 5. **Into Zotero.** The Zotero screen lists downloaded papers by batch; pick a collection and push.
114
+ 6. **Look back.** "History" in the top right groups every search by topic, with how many papers were read and which ones you kept. Each topic shows the review flow (identified, deduplicated, included, excluded) and can export it as Markdown; the final list exports as BibTeX / RIS / a DOI list. Add a search to "Watched" and the app checks for new papers each time it opens.
115
+
116
+ ## The four screens
117
+
118
+ ### Screening
119
+
120
+ - **Batch list**: title, journal, year, the agent's score and one sentence of reasoning; filter to this batch, or search titles and journals.
121
+ - **Excluding**: when you exclude a paper you can pick a reason (off topic, not a research paper, wrong material or system, unreliable data, duplicate) or skip it; a reason you give shows up in the review flow's exclusion reasons and in the export.
122
+ - **Details**: full abstract, journal quartile (CAS and JCR, needs the companion plugin), citation count, DOI; the abstract can be translated automatically.
123
+ - **Translation**: under Settings → Screening choose the scope (high only, high and medium, everything, or off) and the service. DeepSeek and DeepL use your own key and translate when a paper is opened, without spending chat quota; choosing "agent" translates along with scoring.
124
+ - **Continue search**: after the agent stops, build the next batch from all scores so far; you score it first and the agent fills in its own scores once you return to the chat.
125
+ - **Deep-search progress**: papers scored / pool size, a small bar chart of the high-relevance share per batch, stage progress and an estimate of the time left; when it looks like a good place to stop, it says so.
126
+ - **History**: grouped by topic, how many papers each search read and which ones you kept. Expanding a topic shows one line of review flow — identified, after deduplication, screened, included, excluded, low-relevance undecided — exportable as Markdown for the methods section. The list can be exported or added to downloads in one click, and the search's query can be added to "Watched".
127
+ - **Watched**: saves a query; each time the app opens it checks (default every 7 days, configurable) and sends a system notification when there is something new, with a per-topic count of new papers.
128
+ - **Glossary**: several spellings of the same thing (e.g. `PDC = polymer-derived ceramic`) are searched together, and every search reports what it expanded. Deep search suggests abbreviations that recur in the abstracts it has read, and nothing takes effect until you confirm it. British/American spellings (aluminium / aluminum) and element symbols versus names (Al / aluminum) are built in; a bad expansion can be switched off individually.
129
+
130
+ ### Downloads
131
+
132
+ - **Queue**: collected across searches, deduplicated and numbered; start one search's papers or all of them.
133
+ - **Per-paper state**: what it is doing right now (e.g. "opening Elsevier", "campus route: WebVPN browser"), the final source and file; failures say why and what to do next (e.g. "the institution does not subscribe: logged in through the institution and there is still no full text").
134
+ - **When it needs you**: campus login or captcha puts an amber banner at the top and the program waits; skip that one paper, or cancel the whole task.
135
+ - **Results**: open the PDF, open its folder, retry what failed.
136
+
137
+ ### Zotero
138
+
139
+ - Shows whether Zotero and zotero-mcp are ready and how writing is done; if it is not local writing, authorise in one click (local writing takes a few seconds per paper).
140
+ - **Push queue**: downloaded papers not yet in Zotero, grouped by download batch; pick a collection and push — a missing collection is created.
141
+ - **Attachment check**: finds missing or empty PDF attachments in a collection, then re-attaches them from the local PDF or adds the papers to downloads.
142
+ - **Push history**: per-paper results (created, already in the library, PDF not attached, failed).
143
+
144
+ ### Settings
145
+
146
+ - Search API keys, screening and translation, API quota, downloads, network, campus login, agent, Zotero — every group has a "Test" button.
147
+ - **Built-in agent**: works without any agent command installed. Fill in an Anthropic or OpenAI-compatible endpoint (DeepSeek, Qwen, Kimi, GLM, OpenRouter, Ollama, vLLM …) with its key and model name; "Test" checks on the spot that the model actually issues tool calls — a model that does not cannot run tasks. Set "Which backend" to "Built-in agent" and searches started in the app run on it.
148
+ - **Optional components**: layout analysis (about 65 MB, only affects how PDFs are converted to Markdown) is not installed by default; click "Install" in the same group when needed, and set a mirror if the download is slow.
149
+ - **API quota**: today's usage and the official limit for each API.
150
+ - **Network**: detects whether v2rayN, Clash and friends are in TUN mode and shows how to set direct rules; "this computer is on campus" makes downloads go straight out through the campus IP.
151
+ - **First-run guide**: on first launch it walks through search APIs, translation, downloads, network, campus login and Zotero; every step can be tested or skipped, and it can be re-run from settings later.
152
+ - Light and dark themes follow the system; the sidebar collapses to icons.
153
+
154
+ ## Deep search: how it gets the whole topic
155
+
156
+ Deep search is for covering a topic properly. The agent produces the question, 4–8 English query variants, core terms and a few seed papers; if you already have a Zotero collection for the topic, the whole collection can serve as seeds.
157
+
158
+ 1. **Build the pool**: take 100 hits per query variant, plus papers that share many references with the seeds and mention a core term in title or abstract. Several core terms can be required and all of them must appear; different spellings of one concept are joined with `|`, e.g. `Al|aluminum|aluminium`.
159
+ 2. **Batch screening**: 30 papers per batch. The first batch is ranked by co-citation plus query match; afterwards a lightweight model re-ranks by all of your and the agent's scores (continuous active learning, as used in systematic-review screening).
160
+ 3. **Snowballing**: papers scored "high" become new seeds and expand outwards; your own seeds carry the highest weight so the drift does not run away.
161
+ 4. **Abstracts**: candidates without one are looked up in Semantic Scholar, Scopus and Crossref simultaneously, first answer wins, so a paper is not buried just because it arrived without an abstract.
162
+ 5. **Suggesting a stop**: when the high-relevance share of the last batch falls below 1/6 of the best batch, or 200 papers have been screened, it suggests stopping and estimates how many relevant papers are still unread.
163
+
164
+ **Self-test results** (test sets and criteria in `tests/acceptance/`, replayable with `scripts/eval_deep_search.py`). There are only three test sets, 9–26 target papers each, drawn from the author's own Zotero collections and one review, with scores from the agent: they say something about these topics, not about the general case.
165
+
166
+ | Test set | Papers read | Targets found |
167
+ |---|---|---|
168
+ | SiC/Al pressureless infiltration | 150 | 17 of 19 |
169
+ | PDC ceramic aerogels | 120 | 24 of 26 |
170
+ | Rare-earth drug carriers | 150 | 2 of 9 (many branches, little cross-citation; still being improved) |
171
+
172
+ Parameters and quota control are documented in [docs/AGENT.md](docs/AGENT.md#检索与筛选).
173
+
174
+ ## Downloading: how it gets the PDF
175
+
176
+ After "Download all", a list of up to 30 papers goes through these steps in order (longer lists go through the batch lanes):
177
+
178
+ ```
179
+ 1 Open access direct OA links, DOI-built URLs for MDPI / SciOpen and similar, several at once
180
+ 2 Sci-Hub only when you turn it on; papers from 2024 on are skipped (barely indexed);
181
+ when the route is "fastest wins" it first measures speed
182
+ 3 One by one free sources and the publisher site in parallel -> then each campus route
183
+ campus routes: WebVPN direct download -> WebVPN browser -> CARSI -> EZProxy
184
+ ```
185
+
186
+ - **Publisher sites**: about 30 publishers get dedicated handling (Elsevier, Wiley, Springer, ACS, RSC, T&F, SAGE, IOP, IEEE …), the rest go through a generic browser. If the campus IP already has access, this step alone gets the PDF.
187
+ - **Campus routes**: WebVPN at 100+ universities, CARSI federation login, EZProxy. Only one window opens at a time and waits for you; each step gets at most 4 minutes (extended while you are actually logging in) and then hands over to the next.
188
+ - **No wasted work**: if a publisher site still shows nothing after logging in through the institution, it is recorded as "not subscribed" and the campus routes are skipped; when Sci-Hub says it does not have a paper, it is not asked again for an hour.
189
+ - **Files**: named `author-year_first-title-words_DOI.pdf`, one file per paper; before accepting a PDF it checks that the paper is the right one. When only a preprint is available it first waits for the published version from the publisher and campus routes, and only then keeps the preprint, with `_preprint` in the file name and a note in the download record.
190
+ - **Logs**: every stage records its duration (`[timing]`), so a slow step is easy to find.
191
+
192
+ Measured on 2026-10-18 with a list of 14 new papers from 2024–2026, off campus, through WebVPN/CARSI: 11 succeeded. Publisher sites for Elsevier, T&F and ACS generally take 20–70 seconds per paper, open access 10–25 seconds. Of the three failures, one was a conference chapter the institution does not subscribe to and one was an SSRN preprint.
193
+
194
+ Publisher and institutional configuration, proxy setup and troubleshooting are in [docs/DOWNLOAD.md](docs/DOWNLOAD.md). Sci-Hub and LibGen are off by default; whether to use them is your decision. When using institutional routes, respect your university's and the publishers' terms.
195
+
196
+ ## Install and run
197
+
198
+ You can install the desktop app from a download, run it from source, or build your own installer. **Latest installer: [Releases](https://github.com/dysprosium231/litloop-paper-agent/releases/latest)** (`LitLoop_1.18.2_x64-setup.exe`, about 102 MB, ships its own Python runtime; it is not signed, so the first run has to get past SmartScreen via "More info → Run anyway").
199
+
200
+ The installers are not signed: the [SignPath Foundation](https://signpath.org/) open-source programme declined the application on 2026-11-07, because it asks for a level of public visibility (stars, forks, outside references and discussion) that this repository does not have yet. Reapplying later is an option, and a paid certificate is the alternative for now (see [docs/SIGNING.md](docs/SIGNING.md)). See [PRIVACY.md](PRIVACY.md): the program runs on your machine, has no telemetry, and only contacts a literature database or a publisher when you ask it to.
201
+
202
+ Running from source needs Python 3.11+, Git, Node.js and Rust (the MSVC toolchain on Windows).
203
+
204
+ 1. **Install the Python side.** The easiest way is to tell an agent in Claude Code, Codex or ZCode:
205
+
206
+ ```text
207
+ Install or update this plugin for me: https://github.com/dysprosium231/litloop-paper-agent
208
+ ```
209
+
210
+ The agent pulls the code, creates a dedicated virtual environment, installs dependencies and registers the MCP server. Manual steps are in [docs/AGENT.md](docs/AGENT.md#安装与配置详情).
211
+
212
+ 2. **Start the app.** In the repository's `app` directory:
213
+
214
+ ```bash
215
+ npm install
216
+ npm run tauri dev
217
+ ```
218
+
219
+ The first Rust build takes a few minutes, later ones about half a minute before a window appears. The `LITLOOP_PYTHON` environment variable can point at a Python that has LitLoop installed. Development notes and restart scripts are in [app/README.md](app/README.md).
220
+
221
+ 3. **Walk through the first-run guide.** At minimum fill in an OpenAlex key and a contact email; to download subscription papers, pick your university under "Campus login". Nothing has to be filled in to try it: with an empty config a quick search falls back to Crossref — a five-result query took five seconds when measured on 2026-11-05.
222
+
223
+ ### Building an installer
224
+
225
+ ```bash
226
+ python scripts/build_release.py --bundle
227
+ ```
228
+
229
+ It first stages an embedded Python runtime in `build/runtime` (the official embeddable distribution, the core dependencies and `uv.exe`), then calls `npm run tauri build`. You get two packages, either one installs the app:
230
+
231
+ - **NSIS (`app/src-tauri/target/release/bundle/nsis/LitLoop_<version>_x64-setup.exe`)**, about 102 MiB (101.8 MiB for 1.18.2): double-click to install with support for per-user or per-machine mode (`installMode: both`). When uninstalling, a prompt asks whether to also delete `~/.litloop` (defaulting to **No**, so your screening records, downloaded PDFs and settings are kept).
232
+ - **MSI (`app/src-tauri/target/release/bundle/msi/LitLoop_<version>_x64_<language>.msi`)**, about 128 MiB (128.3 MiB for 1.18.2): Windows Installer package that lets you choose the install folder and installs per machine (requires administrator rights, suitable for bulk deployment). Uninstalling keeps `~/.litloop` by default.
233
+
234
+ Both ship Python and the dependencies inside — the target machine needs nothing installed.
235
+
236
+ - **Administrator rights**: per-machine installation (installing into `Program Files` or using the MSI) requires administrator rights (`installMode: both`).
237
+ - **SmartScreen prompt**: the installer is **unsigned**, so on first launch Windows shows "Windows protected your PC" / "unrecognised app" — click **More info** → **Run anyway**; if a managed/company PC blocks this by policy, ask your IT administrator or run from source.
238
+ - **Uninstalling and user data**: your data lives in `~/.litloop`; NSIS asks before deleting it (defaulting to keep), and MSI always leaves it intact.
239
+ - **Optional layout analysis** (about 65 MB, only affects how PDFs are converted to Markdown): not included in the installer; install it on demand under Settings → Optional components, with a mirror if the download is slow.
240
+
241
+ ### Dependencies and keys
242
+
243
+ | Component | Needed? | What it does | Without it | How to get it |
244
+ |---|---|---|---|---|
245
+ | Python 3.11+, Git | Required | Running and updating LitLoop | Does not run | Windows: `winget install Python.Python.3.12 Git.Git` |
246
+ | OpenAlex API key | **Strongly recommended** | The main data source for quick and deep search | About 1000 credits a day, which one deep search can use up | Free at [openalex.org](https://openalex.org); put it in settings or `OPENALEX_API_KEY` |
247
+ | Elsevier API key | **Strongly recommended** | Abstracts from Scopus; ScienceDirect full text where you have access | Elsevier papers often lack abstracts and deep search can only rank by title | Free at [dev.elsevier.com](https://dev.elsevier.com); `ELSEVIER_API_KEY` |
248
+ | Springer Nature Meta API key | Recommended | Abstracts for Springer, Nature and BMC papers | Only Scopus and Crossref, so more misses | [dev.springernature.com](https://dev.springernature.com); `SPRINGER_META_API_KEY` |
249
+ | Contact email | Recommended | Sent to Crossref, OpenAlex and Unpaywall for contact and higher limits | Crossref rate-limits you in the public pool | Set it in the app |
250
+ | scansci-find (discovery engine) | Recommended | The keyword route for quick and deep search | Falls back to the built-in search, slower | Install with `--with-find` |
251
+ | Zotero 7+, zotero-mcp | Optional | Writes papers and PDFs into your local Zotero | Downloads only, no library updates | Authorise local writing on the Zotero screen |
252
+ | Local Chrome | Optional | Publisher pages and campus logins | Browser-dependent routes are unavailable; open access still works | Any normal Chrome; LitLoop makes its own isolated copy |
253
+ | Campus account | Optional | Subscription papers through WebVPN / CARSI / EZProxy | Only open-access and public versions | See [docs/DOWNLOAD.md](docs/DOWNLOAD.md) |
254
+ | Semantic Scholar API key | Optional | One more search source, faster abstract lookups | Core features are unaffected | [semanticscholar.org/product/api](https://www.semanticscholar.org/product/api); `SEMANTIC_SCHOLAR_API_KEY` |
255
+ | litloop-journal-rank | Optional (not public) | Journal quartiles, warning lists, local retraction data | No quartile information; retraction flags come from OpenAlex | Not released yet |
256
+
257
+ Every configuration key is in [docs/CONFIG.md](docs/CONFIG.md).
258
+
259
+ ## Using it with an agent
260
+
261
+ LitLoop is also an MCP server (21 tools) and a command-line tool. Installed into Claude Code, Codex or ZCode, the whole flow can be one sentence, without opening the app:
262
+
263
+ ```text
264
+ Find papers from the last five years on urban heat islands and green-space cooling, CAS zone 2 or better, no retractions
265
+ Screen these 30 by relevance to my topic, explain each choice, I will pick
266
+ Use these 3 as seeds and cover SiC/Al pressureless infiltration as fully as you can, hand it to me in batches
267
+ Download the ones I picked and push them into my Zotero "heat island" collection
268
+ This list has 3000 papers; split it into ones I can fetch directly and ones that need campus access, then download in batches
269
+ This download failed, help me diagnose it
270
+ ```
271
+
272
+ The app and the agent share one store: scores the agent saved show up in the app, and changes you make in the app are visible to the agent (format in [docs/APP_DATA.md](docs/APP_DATA.md)).
273
+
274
+ The agent can also hand you a session link: `litloop://session/<session id>`. Opening it jumps straight to that screening — starting the app if needed, or handing the link to the window that is already open.
275
+
276
+ Command line:
277
+
278
+ ```bash
279
+ litloop search "urban heat island" --year-from 2021 --sort cited # search
280
+ litloop search "carbon cycle" --out q.txt # write hits to a download queue
281
+ litloop get 10.1038/nature12373 # download one paper
282
+ litloop batch q.txt --lanes # batch download (xlsx/csv/bib/queue files)
283
+ litloop check # check dependencies and environment
284
+ ```
285
+
286
+ The full MCP tool list, manual MCP configuration (Claude Desktop, Cursor, Cline …) and search filters are in [docs/AGENT.md](docs/AGENT.md).
287
+
288
+ ## More documentation
289
+
290
+ | Document | Contents |
291
+ |---|---|
292
+ | [docs/AGENT.md](docs/AGENT.md) | Install details, the full MCP tool list, search filters, deep-search parameters |
293
+ | [docs/DOWNLOAD.md](docs/DOWNLOAD.md) | Download layers, Elsevier API, WebVPN, CARSI, EZProxy, proxies, troubleshooting |
294
+ | [docs/CONFIG.md](docs/CONFIG.md) | Every configuration key and its default |
295
+ | [docs/API_LIMITS.md](docs/API_LIMITS.md) | Official limits of each external API (with sources and check dates) and LitLoop's pacing |
296
+ | [docs/APP_DATA.md](docs/APP_DATA.md) | File formats the app and the agent share |
297
+ | [app/README.md](app/README.md) | Developing the desktop app |
298
+ | [AGENTS.md](AGENTS.md) · [docs/LAYOUT.md](docs/LAYOUT.md) | Contribution conventions · code layout (what each subpackage owns) |
299
+ | [CHARTER.md](CHARTER.md) · [TODO.md](TODO.md) · [docs/DECISIONS.md](docs/DECISIONS.md) | Design and acceptance criteria · progress and to-dos · decisions and experiment logs |
300
+
301
+ ## Project status
302
+
303
+ October 2026: in development, used by the maintainer, feedback welcome. Every change runs the full test suite on Linux, Windows and macOS across Python 3.11–3.13.
304
+
305
+ ### Working today
306
+
307
+ Run end to end on a real topic (precursor-derived SiBCN ceramics for insulation and microwave absorption) — search → screening → download → Zotero:
308
+
309
+ | Step | State |
310
+ |---|---|
311
+ | Search | OpenAlex (Crossref when there is no key, Semantic Scholar when a key is set); searches glossary variants — abbreviations, full names, British/American spellings, element symbols — at once; filters off-topic and junk records; folds preprints into the published version; completes and cleans abstracts; flags retractions and expressions of concern; sorts by citations or date |
312
+ | Screening | The AI scores each paper and explains why, you choose, records stay local and become a download queue |
313
+ | Deep search | Multiple query variants plus co-citation build the pool, batch screening, re-ranking from your scores, high-relevance papers snowball |
314
+ | Download | Open access, publisher sites, campus routes in turn; WebVPN, CARSI, EZProxy; DOI in the file name, one paper per file; preprints are marked `_preprint` |
315
+ | Zotero | Local writing, a few seconds per paper; checks for empty attachments |
316
+ | Desktop app | Screening, downloads, Zotero, settings and quota, built-in agent and watched searches all work; you can build the installer and the first release is out (about 102 MiB, Python runtime included); auto-update and code signing are still missing |
317
+
318
+ ### Known limits
319
+
320
+ - A quick search takes about 6–10 seconds and returns only the first 10–20 hits per query variant; use deep search to cover a topic.
321
+ - Deep search takes about a minute per batch (pool expansion plus abstracts).
322
+ - Topics with many branches and little cross-citation (rare-earth drug carriers, for instance) are still not covered fully.
323
+ - Journal quartiles and the local retraction database need the companion plugin litloop-journal-rank, which is not public yet.
324
+ - Chinese-language databases (CNKI, Wanfang) are not supported yet.
325
+
326
+ ### Still to build
327
+
328
+ In planned order; progress is tracked in [TODO.md](TODO.md).
329
+
330
+ 1. **Desktop app**: the installer can be built; auto-update and signing remain. The built-in agent (the app calling Anthropic / OpenAI-compatible APIs itself) can already run searches started in the app; per-task model choice and a test-set comparison against an external agent are still open.
331
+ 2. **Systematic-review support**: flow counts (identified, deduplicated, included, excluded, with reasons) and Markdown export are done; resuming an interrupted review is not.
332
+ 3. **Watched searches**: saving a query, checking when the app opens, notifying, and listing the new papers with a one-click "add to downloads" are done; feeding those papers straight into a screening session is not.
333
+ 4. **Analysis and synthesis**: PDF to Markdown exists; extracting findings from full text, building comparison tables and drafting a review are next.
334
+ 5. **Chinese literature**: CNKI and Wanfang.
335
+ 6. **Publishing the quartile plugin**: the data is licensed, so it must be opened up to user-supplied data first.
336
+
337
+ ## Credits
338
+
339
+ LitLoop is built on **[scansci-pdf](https://github.com/Rimagination/scansci-pdf)** by [Rimagination](https://github.com/Rimagination) (Apache-2.0). The original project drew on [FlareSolverr](https://github.com/FlareSolverr/FlareSolverr), [ref-downloader](https://github.com/ltczding-gif/ref-downloader), [paper-fetch-skill](https://github.com/Dictation354/paper-fetch-skill), [paper-fetcher](https://github.com/fermionoid/paper-fetcher) and [cloakbrowser](https://github.com/CloakHQ/CloakBrowser).
340
+
341
+ The original project's contributor [annsyun](https://github.com/annsyun) implemented the institutional download route for SAGE China ([Rimagination/scansci-pdf#58](https://github.com/Rimagination/scansci-pdf/pull/58)).
342
+
343
+ Search uses public data from [OpenAlex](https://openalex.org), [Semantic Scholar](https://www.semanticscholar.org) and [Crossref](https://www.crossref.org). Retraction data comes from [Retraction Watch](https://retractionwatch.com), published by Crossref.
344
+
345
+ ## License
346
+
347
+ [Apache License 2.0](LICENSE). The original project's copyright notices are kept in LICENSE and [NOTICE](NOTICE). The prebuilt extensions the original project shipped through PyPI (`_core/*.pyd`, `*.so`) are not in this repository; LitLoop uses pure Python.