docpull 6.9.0__tar.gz → 6.11.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 (310) hide show
  1. {docpull-6.9.0/src/docpull.egg-info → docpull-6.11.0}/PKG-INFO +121 -28
  2. {docpull-6.9.0 → docpull-6.11.0}/README.md +108 -24
  3. {docpull-6.9.0 → docpull-6.11.0}/pyproject.toml +18 -3
  4. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/__init__.py +5 -18
  5. docpull-6.11.0/src/docpull/_fileutil.py +99 -0
  6. docpull-6.11.0/src/docpull/_jsonutil.py +121 -0
  7. docpull-6.11.0/src/docpull/_lazy.py +31 -0
  8. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/agent_publish.py +68 -0
  9. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/basis.py +8 -1
  10. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/cache/__init__.py +4 -15
  11. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/cache/manager.py +94 -33
  12. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/change_events.py +47 -16
  13. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/cli.py +203 -154
  14. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/compat_jobs.py +71 -13
  15. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/context_ci.py +189 -37
  16. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/context_packs/__init__.py +3 -14
  17. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/context_packs/brand.py +2 -13
  18. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/context_packs/cli.py +106 -139
  19. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/context_packs/common.py +5 -0
  20. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/context_packs/feed.py +3 -24
  21. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/context_packs/openapi.py +2 -20
  22. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/context_packs/package.py +48 -13
  23. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/context_packs/paper.py +1 -5
  24. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/context_packs/product.py +1 -6
  25. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/context_packs/repo.py +36 -0
  26. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/context_packs/standards.py +1 -4
  27. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/context_packs/styleguide.py +1 -6
  28. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/context_packs/typed.py +1 -13
  29. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/context_packs/visuals.py +1 -6
  30. docpull-6.11.0/src/docpull/context_query.py +894 -0
  31. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/contracts.py +1 -8
  32. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/conversion/__init__.py +4 -15
  33. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/conversion/extractor.py +2 -37
  34. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/core/fetcher.py +55 -29
  35. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/discovery/__init__.py +7 -15
  36. docpull-6.11.0/src/docpull/discovery/agent_files.py +419 -0
  37. docpull-6.11.0/src/docpull/discovery/composite.py +219 -0
  38. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/discovery/crawler.py +2 -19
  39. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/discovery/link_extractors/__init__.py +4 -15
  40. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/discovery/link_extractors/enhanced.py +5 -38
  41. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/discovery/link_extractors/static.py +3 -29
  42. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/discovery/sitemap.py +29 -47
  43. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/discovery_index.py +1 -8
  44. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/document_parse.py +126 -13
  45. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/document_worker.py +2 -10
  46. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/eval_grade.py +10 -38
  47. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/exports.py +1 -8
  48. docpull-6.11.0/src/docpull/freshness.py +290 -0
  49. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/frozen.py +9 -1
  50. docpull-6.11.0/src/docpull/gc.py +399 -0
  51. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/graph.py +1 -5
  52. docpull-6.11.0/src/docpull/headings.py +63 -0
  53. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/http/__init__.py +4 -15
  54. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/http/client.py +1 -65
  55. docpull-6.11.0/src/docpull/impact.py +737 -0
  56. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/integrations/_records.py +2 -11
  57. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/judge.py +6 -3
  58. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/local_workflows.py +85 -8
  59. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/mcp/server.py +722 -66
  60. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/mcp/tools.py +180 -99
  61. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/metadata_extractor.py +54 -32
  62. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/models/__init__.py +4 -15
  63. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/models/config.py +23 -2
  64. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/models/document.py +1 -5
  65. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/models/events.py +1 -0
  66. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/monitor.py +253 -26
  67. docpull-6.11.0/src/docpull/outdated_probe.py +534 -0
  68. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/output_contract.py +28 -27
  69. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/pack_reader.py +24 -27
  70. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/pack_tools.py +11 -39
  71. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/pipeline/steps/__init__.py +4 -15
  72. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/pipeline/steps/convert.py +17 -2
  73. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/pipeline/steps/fetch.py +60 -18
  74. docpull-6.11.0/src/docpull/pipeline/steps/metadata.py +256 -0
  75. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/pipeline/steps/save.py +1 -12
  76. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/pipeline/steps/save_json.py +12 -4
  77. docpull-6.11.0/src/docpull/pipeline/steps/soft_404.py +261 -0
  78. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/project.py +1477 -160
  79. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/provenance.py +1 -10
  80. docpull-6.11.0/src/docpull/query_conflicts.py +280 -0
  81. docpull-6.11.0/src/docpull/readiness.py +469 -0
  82. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/redaction.py +28 -18
  83. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/registry.py +169 -14
  84. docpull-6.11.0/src/docpull/registry_build.py +222 -0
  85. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/rendering.py +98 -3
  86. docpull-6.11.0/src/docpull/run_outputs.py +227 -0
  87. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/security/__init__.py +4 -15
  88. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/security/injection.py +27 -0
  89. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/security/robots.py +2 -19
  90. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/security/url_validator.py +1 -9
  91. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/server.py +9 -1
  92. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/share.py +2 -2
  93. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/skill_export.py +11 -1
  94. docpull-6.11.0/src/docpull/state_paths.py +51 -0
  95. docpull-6.11.0/src/docpull/surface.py +557 -0
  96. docpull-6.11.0/src/docpull/typed_diff.py +551 -0
  97. docpull-6.11.0/src/docpull/url_versions.py +218 -0
  98. docpull-6.11.0/src/docpull/vectors.py +376 -0
  99. docpull-6.11.0/src/docpull/versions.py +161 -0
  100. {docpull-6.9.0 → docpull-6.11.0/src/docpull.egg-info}/PKG-INFO +121 -28
  101. {docpull-6.9.0 → docpull-6.11.0}/src/docpull.egg-info/SOURCES.txt +44 -2
  102. {docpull-6.9.0 → docpull-6.11.0}/src/docpull.egg-info/requires.txt +12 -1
  103. docpull-6.11.0/tests/test_add_detection.py +69 -0
  104. docpull-6.11.0/tests/test_agent_files_discovery.py +542 -0
  105. docpull-6.11.0/tests/test_ai_catalog_export.py +86 -0
  106. docpull-6.11.0/tests/test_audit_cache_mcp.py +338 -0
  107. docpull-6.11.0/tests/test_audit_project.py +203 -0
  108. docpull-6.11.0/tests/test_audit_runtime.py +311 -0
  109. {docpull-6.9.0 → docpull-6.11.0}/tests/test_cli.py +4 -0
  110. docpull-6.11.0/tests/test_cli_tiers.py +76 -0
  111. {docpull-6.9.0 → docpull-6.11.0}/tests/test_compat_jobs.py +1 -1
  112. {docpull-6.9.0 → docpull-6.11.0}/tests/test_context_query.py +149 -0
  113. {docpull-6.9.0 → docpull-6.11.0}/tests/test_convert_step_new.py +11 -0
  114. {docpull-6.9.0 → docpull-6.11.0}/tests/test_feed_pack.py +1 -1
  115. docpull-6.11.0/tests/test_freshness.py +210 -0
  116. docpull-6.11.0/tests/test_gc.py +184 -0
  117. docpull-6.11.0/tests/test_heuristics_eval.py +72 -0
  118. docpull-6.11.0/tests/test_impact.py +552 -0
  119. docpull-6.11.0/tests/test_languages_render.py +85 -0
  120. docpull-6.11.0/tests/test_mcp_project_tools.py +189 -0
  121. {docpull-6.9.0 → docpull-6.11.0}/tests/test_mcp_server.py +1 -0
  122. docpull-6.11.0/tests/test_mcp_toolsets.py +220 -0
  123. {docpull-6.9.0 → docpull-6.11.0}/tests/test_monitor_fetch_failures.py +6 -2
  124. docpull-6.11.0/tests/test_outdated_probe.py +304 -0
  125. {docpull-6.9.0 → docpull-6.11.0}/tests/test_project.py +8 -0
  126. docpull-6.11.0/tests/test_project_lifecycle.py +234 -0
  127. docpull-6.11.0/tests/test_query_headings_conflicts.py +279 -0
  128. docpull-6.11.0/tests/test_readiness.py +317 -0
  129. {docpull-6.9.0 → docpull-6.11.0}/tests/test_registry.py +82 -0
  130. docpull-6.11.0/tests/test_registry_build.py +123 -0
  131. docpull-6.11.0/tests/test_run_outputs.py +110 -0
  132. docpull-6.11.0/tests/test_single_url_sources.py +500 -0
  133. {docpull-6.9.0 → docpull-6.11.0}/tests/test_sitemap_lastmod_skip.py +8 -0
  134. docpull-6.11.0/tests/test_soft_404.py +367 -0
  135. {docpull-6.9.0 → docpull-6.11.0}/tests/test_surface_contract.py +38 -12
  136. docpull-6.11.0/tests/test_typed_diff.py +259 -0
  137. docpull-6.11.0/tests/test_url_versions.py +283 -0
  138. docpull-6.11.0/tests/test_vector_sidecar.py +251 -0
  139. docpull-6.11.0/tests/test_versions.py +97 -0
  140. docpull-6.9.0/src/docpull/_jsonutil.py +0 -48
  141. docpull-6.9.0/src/docpull/context_query.py +0 -493
  142. docpull-6.9.0/src/docpull/discovery/composite.py +0 -132
  143. docpull-6.9.0/src/docpull/pipeline/steps/metadata.py +0 -137
  144. docpull-6.9.0/src/docpull/surface.py +0 -387
  145. docpull-6.9.0/tests/test_claim_audit_script.py +0 -52
  146. docpull-6.9.0/tests/test_release_a_plus_check_script.py +0 -149
  147. {docpull-6.9.0 → docpull-6.11.0}/LICENSE +0 -0
  148. {docpull-6.9.0 → docpull-6.11.0}/setup.cfg +0 -0
  149. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/__main__.py +0 -0
  150. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/accounting.py +0 -0
  151. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/acquisition_workflows.py +0 -0
  152. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/auth_cli.py +0 -0
  153. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/cache/frontier.py +0 -0
  154. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/cache/streaming_dedup.py +0 -0
  155. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/compat_api.py +0 -0
  156. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/context_aliases.py +0 -0
  157. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/context_packs/_legacy_cli.py +0 -0
  158. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/context_packs/dataset.py +0 -0
  159. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/context_packs/policy_pack.py +0 -0
  160. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/context_packs/relationship.py +0 -0
  161. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/context_packs/transcript.py +0 -0
  162. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/context_packs/typed_models.py +0 -0
  163. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/context_packs/website.py +0 -0
  164. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/context_packs/wiki.py +0 -0
  165. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/context_packs/workflow_cli.py +0 -0
  166. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/contracts_cli.py +0 -0
  167. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/conversion/article_cleanup.py +0 -0
  168. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/conversion/chunking.py +0 -0
  169. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/conversion/ensemble.py +0 -0
  170. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/conversion/filings.py +0 -0
  171. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/conversion/markdown.py +0 -0
  172. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/conversion/protocols.py +0 -0
  173. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/conversion/special_cases.py +0 -0
  174. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/conversion/trafilatura_extractor.py +0 -0
  175. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/core/__init__.py +0 -0
  176. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/discovery/_fetch.py +0 -0
  177. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/discovery/filters.py +0 -0
  178. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/discovery/link_extractors/protocols.py +0 -0
  179. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/discovery/protocols.py +0 -0
  180. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/doctor.py +0 -0
  181. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/evidence.py +0 -0
  182. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/export_formats.py +0 -0
  183. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/fixtures/__init__.py +0 -0
  184. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/http/protocols.py +0 -0
  185. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/http/rate_limiter.py +0 -0
  186. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/integrations/__init__.py +0 -0
  187. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/integrations/langchain.py +0 -0
  188. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/integrations/llamaindex.py +0 -0
  189. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/mcp/__init__.py +0 -0
  190. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/mcp/sources.py +0 -0
  191. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/models/profiles.py +0 -0
  192. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/models/run.py +0 -0
  193. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/models/schema.py +0 -0
  194. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/pipeline/__init__.py +0 -0
  195. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/pipeline/base.py +0 -0
  196. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/pipeline/manifest.py +0 -0
  197. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/pipeline/steps/chunk.py +0 -0
  198. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/pipeline/steps/dedup.py +0 -0
  199. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/pipeline/steps/render.py +0 -0
  200. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/pipeline/steps/save_ndjson.py +0 -0
  201. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/pipeline/steps/save_okf.py +0 -0
  202. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/pipeline/steps/save_sqlite.py +0 -0
  203. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/pipeline/steps/screen.py +0 -0
  204. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/pipeline/steps/validate.py +0 -0
  205. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/policy.py +0 -0
  206. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/policy_cli.py +0 -0
  207. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/py.typed +0 -0
  208. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/research.py +0 -0
  209. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/schemas/artifact-manifest.v1.schema.json +0 -0
  210. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/schemas/basis.v2.schema.json +0 -0
  211. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/schemas/change-event.v1.schema.json +0 -0
  212. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/schemas/citation-map.v1.schema.json +0 -0
  213. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/schemas/document.v3.schema.json +0 -0
  214. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/schemas/intelligence-bundle.v1.schema.json +0 -0
  215. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/schemas/pack.v3.schema.json +0 -0
  216. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/schemas/provenance.v1.schema.json +0 -0
  217. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/schemas/relationship-pack.v1.schema.json +0 -0
  218. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/schemas/rights.v1.schema.json +0 -0
  219. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/schemas/run-identity.v1.schema.json +0 -0
  220. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/schemas/website-snapshot.v1.schema.json +0 -0
  221. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/schemas/workflow-request.v1.schema.json +0 -0
  222. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/schemas/workflow-result.v1.schema.json +0 -0
  223. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/security/download_policy.py +0 -0
  224. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/security/optout.py +0 -0
  225. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/source_scoring.py +0 -0
  226. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/time_utils.py +0 -0
  227. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/warc.py +0 -0
  228. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/web_search.py +0 -0
  229. {docpull-6.9.0 → docpull-6.11.0}/src/docpull/workflows.py +0 -0
  230. {docpull-6.9.0 → docpull-6.11.0}/src/docpull.egg-info/dependency_links.txt +0 -0
  231. {docpull-6.9.0 → docpull-6.11.0}/src/docpull.egg-info/entry_points.txt +0 -0
  232. {docpull-6.9.0 → docpull-6.11.0}/src/docpull.egg-info/top_level.txt +0 -0
  233. {docpull-6.9.0 → docpull-6.11.0}/tests/test_accounting.py +0 -0
  234. {docpull-6.9.0 → docpull-6.11.0}/tests/test_acquisition_workflows.py +0 -0
  235. {docpull-6.9.0 → docpull-6.11.0}/tests/test_auth_cli.py +0 -0
  236. {docpull-6.9.0 → docpull-6.11.0}/tests/test_basis.py +0 -0
  237. {docpull-6.9.0 → docpull-6.11.0}/tests/test_cache_conditional_get.py +0 -0
  238. {docpull-6.9.0 → docpull-6.11.0}/tests/test_cache_lock_regressions.py +0 -0
  239. {docpull-6.9.0 → docpull-6.11.0}/tests/test_chunking.py +0 -0
  240. {docpull-6.9.0 → docpull-6.11.0}/tests/test_compat_api.py +0 -0
  241. {docpull-6.9.0 → docpull-6.11.0}/tests/test_context_ci.py +0 -0
  242. {docpull-6.9.0 → docpull-6.11.0}/tests/test_context_packs.py +0 -0
  243. {docpull-6.9.0 → docpull-6.11.0}/tests/test_conversion.py +0 -0
  244. {docpull-6.9.0 → docpull-6.11.0}/tests/test_crawl_regressions.py +0 -0
  245. {docpull-6.9.0 → docpull-6.11.0}/tests/test_discovery.py +0 -0
  246. {docpull-6.9.0 → docpull-6.11.0}/tests/test_discovery_index.py +0 -0
  247. {docpull-6.9.0 → docpull-6.11.0}/tests/test_doctor.py +0 -0
  248. {docpull-6.9.0 → docpull-6.11.0}/tests/test_document_parse.py +0 -0
  249. {docpull-6.9.0 → docpull-6.11.0}/tests/test_document_record.py +0 -0
  250. {docpull-6.9.0 → docpull-6.11.0}/tests/test_exports.py +0 -0
  251. {docpull-6.9.0 → docpull-6.11.0}/tests/test_extractor_ensemble.py +0 -0
  252. {docpull-6.9.0 → docpull-6.11.0}/tests/test_fetch_lifecycle.py +0 -0
  253. {docpull-6.9.0 → docpull-6.11.0}/tests/test_frontier_resume.py +0 -0
  254. {docpull-6.9.0 → docpull-6.11.0}/tests/test_frozen.py +0 -0
  255. {docpull-6.9.0 → docpull-6.11.0}/tests/test_graph.py +0 -0
  256. {docpull-6.9.0 → docpull-6.11.0}/tests/test_http_efficiency.py +0 -0
  257. {docpull-6.9.0 → docpull-6.11.0}/tests/test_import_efficiency.py +0 -0
  258. {docpull-6.9.0 → docpull-6.11.0}/tests/test_injection_screen.py +0 -0
  259. {docpull-6.9.0 → docpull-6.11.0}/tests/test_integration.py +0 -0
  260. {docpull-6.9.0 → docpull-6.11.0}/tests/test_integrations.py +0 -0
  261. {docpull-6.9.0 → docpull-6.11.0}/tests/test_jsonutil.py +0 -0
  262. {docpull-6.9.0 → docpull-6.11.0}/tests/test_judge.py +0 -0
  263. {docpull-6.9.0 → docpull-6.11.0}/tests/test_link_extractors.py +0 -0
  264. {docpull-6.9.0 → docpull-6.11.0}/tests/test_live_web_smoke.py +0 -0
  265. {docpull-6.9.0 → docpull-6.11.0}/tests/test_local_pack_workflows.py +0 -0
  266. {docpull-6.9.0 → docpull-6.11.0}/tests/test_local_workflows.py +0 -0
  267. {docpull-6.9.0 → docpull-6.11.0}/tests/test_mcp_tools.py +0 -0
  268. {docpull-6.9.0 → docpull-6.11.0}/tests/test_metadata_extractor.py +0 -0
  269. {docpull-6.9.0 → docpull-6.11.0}/tests/test_model_cache_lock.py +0 -0
  270. {docpull-6.9.0 → docpull-6.11.0}/tests/test_model_crawl_politeness.py +0 -0
  271. {docpull-6.9.0 → docpull-6.11.0}/tests/test_model_fetch_pipeline.py +0 -0
  272. {docpull-6.9.0 → docpull-6.11.0}/tests/test_model_jobs_monitor.py +0 -0
  273. {docpull-6.9.0 → docpull-6.11.0}/tests/test_monitor.py +0 -0
  274. {docpull-6.9.0 → docpull-6.11.0}/tests/test_naming.py +0 -0
  275. {docpull-6.9.0 → docpull-6.11.0}/tests/test_openapi_pack.py +0 -0
  276. {docpull-6.9.0 → docpull-6.11.0}/tests/test_optional_extras_installed.py +0 -0
  277. {docpull-6.9.0 → docpull-6.11.0}/tests/test_optout.py +0 -0
  278. {docpull-6.9.0 → docpull-6.11.0}/tests/test_output_contract.py +0 -0
  279. {docpull-6.9.0 → docpull-6.11.0}/tests/test_outputs_e2e.py +0 -0
  280. {docpull-6.9.0 → docpull-6.11.0}/tests/test_pack_server.py +0 -0
  281. {docpull-6.9.0 → docpull-6.11.0}/tests/test_pack_tools.py +0 -0
  282. {docpull-6.9.0 → docpull-6.11.0}/tests/test_parser_dependency_support.py +0 -0
  283. {docpull-6.9.0 → docpull-6.11.0}/tests/test_pipeline.py +0 -0
  284. {docpull-6.9.0 → docpull-6.11.0}/tests/test_policy.py +0 -0
  285. {docpull-6.9.0 → docpull-6.11.0}/tests/test_policy_cli.py +0 -0
  286. {docpull-6.9.0 → docpull-6.11.0}/tests/test_provenance.py +0 -0
  287. {docpull-6.9.0 → docpull-6.11.0}/tests/test_public_feature_smoke.py +0 -0
  288. {docpull-6.9.0 → docpull-6.11.0}/tests/test_qa_judge.py +0 -0
  289. {docpull-6.9.0 → docpull-6.11.0}/tests/test_rate_limiter.py +0 -0
  290. {docpull-6.9.0 → docpull-6.11.0}/tests/test_real_feature_smoke_script.py +0 -0
  291. {docpull-6.9.0 → docpull-6.11.0}/tests/test_real_site_regressions.py +0 -0
  292. {docpull-6.9.0 → docpull-6.11.0}/tests/test_relationship_workflow.py +0 -0
  293. {docpull-6.9.0 → docpull-6.11.0}/tests/test_release_registry_workflows.py +0 -0
  294. {docpull-6.9.0 → docpull-6.11.0}/tests/test_rendering.py +0 -0
  295. {docpull-6.9.0 → docpull-6.11.0}/tests/test_reproducible_release_build.py +0 -0
  296. {docpull-6.9.0 → docpull-6.11.0}/tests/test_research.py +0 -0
  297. {docpull-6.9.0 → docpull-6.11.0}/tests/test_save_ndjson.py +0 -0
  298. {docpull-6.9.0 → docpull-6.11.0}/tests/test_save_sqlite.py +0 -0
  299. {docpull-6.9.0 → docpull-6.11.0}/tests/test_security_hardening.py +0 -0
  300. {docpull-6.9.0 → docpull-6.11.0}/tests/test_share.py +0 -0
  301. {docpull-6.9.0 → docpull-6.11.0}/tests/test_source_scoring.py +0 -0
  302. {docpull-6.9.0 → docpull-6.11.0}/tests/test_special_cases.py +0 -0
  303. {docpull-6.9.0 → docpull-6.11.0}/tests/test_time_utils.py +0 -0
  304. {docpull-6.9.0 → docpull-6.11.0}/tests/test_token_metrics.py +0 -0
  305. {docpull-6.9.0 → docpull-6.11.0}/tests/test_trafilatura_extractor.py +0 -0
  306. {docpull-6.9.0 → docpull-6.11.0}/tests/test_typed_knowledge_packs.py +0 -0
  307. {docpull-6.9.0 → docpull-6.11.0}/tests/test_warc.py +0 -0
  308. {docpull-6.9.0 → docpull-6.11.0}/tests/test_web_search.py +0 -0
  309. {docpull-6.9.0 → docpull-6.11.0}/tests/test_website_snapshot.py +0 -0
  310. {docpull-6.9.0 → docpull-6.11.0}/tests/test_workflow_contracts.py +0 -0
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: docpull
3
- Version: 6.9.0
4
- Summary: Declare, sync, diff, and lock context dependencies for AI agents
3
+ Version: 6.11.0
4
+ Summary: Web context for AI agents: fetch, lock, cite, and track changes to any public web source
5
5
  Author-email: Zachary Roth <support@raintree.technology>
6
6
  Maintainer-email: Raintree Technology <support@raintree.technology>
7
7
  License-Expression: MIT
@@ -15,7 +15,7 @@ Project-URL: MCP Plugin, https://github.com/raintree-technology/docpull/tree/mai
15
15
  Project-URL: Comparison Guide, https://github.com/raintree-technology/docpull/blob/main/docs/alternatives.md
16
16
  Project-URL: Download Stats, https://pepy.tech/project/docpull
17
17
  Project-URL: Changelog, https://github.com/raintree-technology/docpull/blob/main/docs/CHANGELOG.md
18
- Keywords: python,markdown,documentation,web,website,web-extraction,web-to-markdown,source-ingestion,provenance,context-ci,content-extraction,developer-tools,cli,rag,llm,mcp,ai-agents,context-engineering,context-dependencies,context-packs,source-packs,research,claude,ai-training-data
18
+ Keywords: python,markdown,web-context,agent-context,ai-context,citations,documentation,web,website,web-extraction,web-to-markdown,source-ingestion,provenance,context-ci,content-extraction,developer-tools,cli,rag,llm,mcp,ai-agents,context-engineering,context-dependencies,context-packs,source-packs,research,claude,ai-training-data
19
19
  Classifier: Development Status :: 5 - Production/Stable
20
20
  Classifier: Intended Audience :: Developers
21
21
  Classifier: Intended Audience :: Information Technology
@@ -77,8 +77,12 @@ Requires-Dist: pypdf>=6.21.1; extra == "unstructured"
77
77
  Requires-Dist: unstructured[all-docs]>=0.24.1; (python_version >= "3.11" and python_version < "3.14") and extra == "unstructured"
78
78
  Provides-Extra: pdf
79
79
  Requires-Dist: pypdf>=6.21.1; extra == "pdf"
80
+ Provides-Extra: tables
81
+ Requires-Dist: pypdf>=6.21.1; extra == "tables"
82
+ Requires-Dist: pdfplumber>=0.11.10; extra == "tables"
80
83
  Provides-Extra: parse
81
84
  Requires-Dist: pypdf>=6.21.1; extra == "parse"
85
+ Requires-Dist: pdfplumber>=0.11.10; extra == "parse"
82
86
  Requires-Dist: markitdown[docx,pdf]>=0.1.0; extra == "parse"
83
87
  Requires-Dist: unstructured[all-docs]>=0.24.1; (python_version >= "3.11" and python_version < "3.14") and extra == "parse"
84
88
  Provides-Extra: presidio
@@ -89,6 +93,9 @@ Provides-Extra: e2b
89
93
  Requires-Dist: e2b>=2.0.0; extra == "e2b"
90
94
  Provides-Extra: llm
91
95
  Requires-Dist: tiktoken>=0.7.0; extra == "llm"
96
+ Provides-Extra: vectors
97
+ Requires-Dist: sqlite-vec>=0.1.9; extra == "vectors"
98
+ Requires-Dist: fastembed>=0.9.1; extra == "vectors"
92
99
  Provides-Extra: all
93
100
  Requires-Dist: aiohttp-socks>=0.11.0; extra == "all"
94
101
  Requires-Dist: url-normalize>=1.4.0; extra == "all"
@@ -103,10 +110,13 @@ Requires-Dist: starlette>=1.3.1; extra == "all"
103
110
  Requires-Dist: uvicorn>=0.30.0; extra == "all"
104
111
  Requires-Dist: pyarrow>=16.0.0; extra == "all"
105
112
  Requires-Dist: pypdf>=6.21.1; extra == "all"
113
+ Requires-Dist: pdfplumber>=0.11.10; extra == "all"
106
114
  Requires-Dist: markitdown[docx,pdf]>=0.1.0; extra == "all"
107
115
  Requires-Dist: unstructured[all-docs]>=0.24.1; (python_version >= "3.11" and python_version < "3.14") and extra == "all"
108
116
  Requires-Dist: presidio-analyzer>=2.2.0; extra == "all"
109
117
  Requires-Dist: e2b>=2.0.0; extra == "all"
118
+ Requires-Dist: sqlite-vec>=0.1.9; extra == "all"
119
+ Requires-Dist: fastembed>=0.9.1; extra == "all"
110
120
  Provides-Extra: dev
111
121
  Requires-Dist: pytest>=7.0.0; extra == "dev"
112
122
  Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
@@ -117,7 +127,6 @@ Requires-Dist: bandit>=1.7.0; extra == "dev"
117
127
  Requires-Dist: pip-audit>=2.0.0; extra == "dev"
118
128
  Requires-Dist: msgpack>=1.2.1; extra == "dev"
119
129
  Requires-Dist: pre-commit>=3.0.0; extra == "dev"
120
- Requires-Dist: types-requests>=2.31.0; extra == "dev"
121
130
  Requires-Dist: types-beautifulsoup4>=4.12.0; extra == "dev"
122
131
  Requires-Dist: types-defusedxml>=0.7.0; extra == "dev"
123
132
  Requires-Dist: types-pyyaml>=6.0.0; extra == "dev"
@@ -133,9 +142,15 @@ Dynamic: license-file
133
142
 
134
143
  **Active open-source project · MIT License**
135
144
 
136
- DocPull turns changing public web sources into cited, reproducible context for AI
137
- agents and retrieval pipelines. Use it when your application needs to know which
138
- sources it used, whether they changed, and how to rebuild the same context later.
145
+ **Web context for AI agents.** DocPull fetches any public web source, locks exactly
146
+ what it fetched, serves agents cited passages from that locked copy, and tells you
147
+ when a change upstream breaks something an agent already cited.
148
+
149
+ A source can be a docs site, a pricing or product page, a changelog, a policy, a
150
+ feed, a GitHub repo, an npm or PyPI package, a paper, a standard, a dataset, or a
151
+ local PDF. Use DocPull when an agent's answers depend on the live web and you need
152
+ to know which pages it used, whether they changed, and how to rebuild the same
153
+ context later.
139
154
 
140
155
  [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
141
156
  [![PyPI version](https://img.shields.io/pypi/v/docpull.svg?label=package)](https://pypi.org/project/docpull/)
@@ -145,36 +160,96 @@ sources it used, whether they changed, and how to rebuild the same context later
145
160
 
146
161
  ## Install and sync your first source
147
162
 
163
+ Five commands cover the daily loop:
164
+
148
165
  ```bash
149
166
  pip install docpull
150
- docpull init stripe-docs
151
- docpull add https://docs.stripe.com
152
- docpull sync
153
- docpull query "retry policy" --max-tokens 4000
154
- docpull diff
155
- docpull export context-pack --target cursor
167
+ docpull init payments-context # 1. declare sources
168
+ docpull add docs.stripe.com stripe.com/pricing npm:stripe github.com/stripe/stripe-node
169
+ docpull sync # 2. fetch and lock
170
+ docpull query "retry policy" --max-tokens 4000 > answer.json # 3. cited passages
171
+ docpull impact answer.json # 4. did a change break them?
172
+ docpull ci # 5. gate freshness and quality
156
173
  ```
157
174
 
158
- The project stores declared sources in `docpull.yaml` and resolved inputs in
159
- `.docpull/context.lock.json`. Later syncs produce a hash-based diff while preserving
160
- source URLs, content hashes, run IDs, citations, and export metadata.
175
+ `docpull add` works out what each input is: a site, a page, a package, a repo, a
176
+ paper (`doi:` or arXiv), a feed, an OpenAPI spec, or a PDF.
161
177
 
162
- `docpull query` retrieves deduplicated passages from locked archives with version
163
- filters, a response budget, and exact source spans. The same query is available
164
- through the Python SDK and MCP. See [Query locked context](docs/context-dependencies.md#query-locked-context)
165
- for budget semantics and queries across projects.
178
+ | Command | What it does |
179
+ | --- | --- |
180
+ | `init` / `add` | Create `docpull.yaml` and declare web pages, sites, packages, repos, papers, feeds, or files. |
181
+ | `sync` | Fetch sources into a new run and pin `.docpull/context.lock.json`. |
182
+ | `query` | Return deduplicated passages from locked archives with a token budget and exact source spans. |
183
+ | `impact` | Report saved citations that a later source change made stale, contradicted, or broken. |
184
+ | `ci` | Check freshness, citation coverage, pack quality, and rights; exit non-zero on a hard gate. |
185
+
186
+ `docpull --help` lists the core and pack commands. `docpull help --all` lists every
187
+ command, and `docpull help <command>` shows its options. No account or paid API is
188
+ required: fetching, discovery, extraction, indexing, diffs, and queries run locally.
189
+ See [Query locked context](docs/context-dependencies.md#query-locked-context) for
190
+ budget semantics and queries across projects.
166
191
 
167
192
  ![DocPull project diff showing changed pages, local semantic categories, and zero failed URLs](docs/launch-assets/docpull-project-diff-demo.png)
168
193
 
169
- No account or paid API is required for this path. Direct fetching, discovery,
170
- extraction, indexing, pack analysis, and diffs run locally.
194
+ ## MCP setup
195
+
196
+ Install the MCP extra and register the stdio server with the core toolset, which
197
+ exposes the query, impact, read, and fetch tools an agent needs day to day:
198
+
199
+ ```bash
200
+ pip install 'docpull[mcp]'
201
+ claude mcp add --transport stdio docpull -- docpull mcp --toolset core
202
+ ```
203
+
204
+ Add `--toolset project` or `--toolset packs` (repeat or comma-separate) for more
205
+ tools; the default is `all`. Project writes stay off unless you pass
206
+ `--allow-project-writes`. See [MCP server](#mcp-server) for HTTP and the full list.
207
+
208
+ ## Ready-made packs
209
+
210
+ Popular sources are prebuilt in the signed public
211
+ [registry](https://github.com/raintree-technology/docpull-registry). A pack is a
212
+ recipe: source URLs, pinned pages, and content hashes, never content. DocPull
213
+ fetches the pages on your machine and reports which still match:
214
+
215
+ ```bash
216
+ export DOCPULL_REGISTRY_PUBLIC_KEY=k2wv0zPUlj88D66zXXQD86Knnt66MoJN2ztFitdDg00=
217
+ docpull add stripe@latest
218
+ ```
219
+
220
+ Packs rebuild daily from [`registry/catalog.yaml`](registry/catalog.yaml); a new
221
+ version appears only when the pages changed.
222
+
223
+ ## GitHub Action
224
+
225
+ Check saved citations on every pull request. The action runs `docpull ci`, keeps
226
+ one comment on the PR ("2 cited claims changed upstream"), and fails on a hard gate:
227
+
228
+ ```yaml
229
+ permissions:
230
+ contents: read
231
+ pull-requests: write
232
+ steps:
233
+ - uses: actions/checkout@v4
234
+ - uses: raintree-technology/docpull@v6.11.0
235
+ with:
236
+ args: --citations evidence/answers.json
237
+ ```
238
+
239
+ See [Context CI](docs/context-ci.md#github-actions) for inputs and outputs.
171
240
 
172
241
  ## Why use DocPull
173
242
 
174
243
  - **Reproduce agent context.** Stable IDs, hashes, manifests, and lockfiles show which
175
244
  source versions produced an answer or artifact.
176
- - **Detect source drift.** Sync and diff documentation, product pages, policies,
177
- feeds, repositories, packages, standards, and local documents.
245
+ - **Detect web drift.** Sync and diff docs, product and pricing pages, changelogs,
246
+ policies, feeds, repositories, packages, standards, and local documents.
247
+ - **Catch stale citations.** `docpull impact` marks each saved citation valid, stale,
248
+ contradicted, or broken; on a controlled
249
+ [benchmark](bench/results/stale-citations/REPORT.md) it caught every changed
250
+ fact that a cache-only agent would have kept serving.
251
+ - **Keep web text from steering agents.** Query results withhold passages that
252
+ match prompt-injection patterns and say how many were withheld.
178
253
  - **Keep evidence inspectable.** Markdown, NDJSON, SQLite, citations, and provenance
179
254
  sidecars remain readable without a hosted service.
180
255
  - **Choose the downstream surface.** Export context for agent clients, vector import,
@@ -188,6 +263,10 @@ extraction, indexing, pack analysis, and diffs run locally.
188
263
  declared sources → local acquisition → versioned evidence → diff and validation → export
189
264
  ```
190
265
 
266
+ `docpull diff` compares runs with hash-based change reports, and
267
+ `docpull export context-pack --target cursor` writes context for an agent client.
268
+ Source URLs, content hashes, run IDs, and citations travel with every artifact.
269
+
191
270
  DocPull's v3 pack contract separates raw extraction, agent-ready context, and
192
271
  eval-grade evidence. Validate the level a downstream system requires:
193
272
 
@@ -220,16 +299,30 @@ See [context-pack workflows](docs/context-packs.md) for the complete surface.
220
299
 
221
300
  ```bash
222
301
  pip install 'docpull[mcp]'
223
- docpull mcp
302
+ docpull mcp # stdio, every tool
303
+ docpull mcp --toolset core,project # fewer tools for a smaller agent context
224
304
  ```
225
305
 
226
- Claude Code can register the same local server:
306
+ | Toolset | Tools |
307
+ | --- | --- |
308
+ | `core` | `context_query`, `context_impact`, `read_doc`, `grep_docs`, `list_indexed`, `ensure_docs`, `list_sources`, `fetch_url`, `project_status` |
309
+ | `project` | `project_status`, `project_outdated`, `project_install`, `project_sync`, `project_update` |
310
+ | `packs` | Pack builders, `pack_*`, `graph_*`, `export_pack`, `audit_pack`, `refresh_pack`, `intelligence_bundle`, `workflow_run` |
311
+ | `all` | Everything above plus `render_url`, `explain_routes`, `validate_policy`, `serve_pack_status`, `add_source`, `remove_source` |
312
+
313
+ `DOCPULL_MCP_TOOLSET=core` sets the same choice from the environment. Calling a tool
314
+ outside the enabled toolsets returns an error that names the toolset to add.
315
+
316
+ For clients that speak Streamable HTTP, run the same server locally:
227
317
 
228
318
  ```bash
229
- claude mcp add --transport stdio docpull -- docpull mcp
319
+ pip install 'docpull[mcp,serve]'
320
+ docpull mcp --transport http --toolset core # http://127.0.0.1:8765/mcp
230
321
  ```
231
322
 
232
- The Python stdio server is the supported MCP server.
323
+ The HTTP server has no authentication. It binds 127.0.0.1 by default, rejects
324
+ requests whose Host or Origin header is not a loopback address (DNS rebinding
325
+ protection), and refuses a non-loopback `--host` unless you also pass `--allow-remote`.
233
326
 
234
327
  ## Limits and security boundary
235
328
 
@@ -8,9 +8,15 @@
8
8
 
9
9
  **Active open-source project · MIT License**
10
10
 
11
- DocPull turns changing public web sources into cited, reproducible context for AI
12
- agents and retrieval pipelines. Use it when your application needs to know which
13
- sources it used, whether they changed, and how to rebuild the same context later.
11
+ **Web context for AI agents.** DocPull fetches any public web source, locks exactly
12
+ what it fetched, serves agents cited passages from that locked copy, and tells you
13
+ when a change upstream breaks something an agent already cited.
14
+
15
+ A source can be a docs site, a pricing or product page, a changelog, a policy, a
16
+ feed, a GitHub repo, an npm or PyPI package, a paper, a standard, a dataset, or a
17
+ local PDF. Use DocPull when an agent's answers depend on the live web and you need
18
+ to know which pages it used, whether they changed, and how to rebuild the same
19
+ context later.
14
20
 
15
21
  [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
16
22
  [![PyPI version](https://img.shields.io/pypi/v/docpull.svg?label=package)](https://pypi.org/project/docpull/)
@@ -20,36 +26,96 @@ sources it used, whether they changed, and how to rebuild the same context later
20
26
 
21
27
  ## Install and sync your first source
22
28
 
29
+ Five commands cover the daily loop:
30
+
23
31
  ```bash
24
32
  pip install docpull
25
- docpull init stripe-docs
26
- docpull add https://docs.stripe.com
27
- docpull sync
28
- docpull query "retry policy" --max-tokens 4000
29
- docpull diff
30
- docpull export context-pack --target cursor
33
+ docpull init payments-context # 1. declare sources
34
+ docpull add docs.stripe.com stripe.com/pricing npm:stripe github.com/stripe/stripe-node
35
+ docpull sync # 2. fetch and lock
36
+ docpull query "retry policy" --max-tokens 4000 > answer.json # 3. cited passages
37
+ docpull impact answer.json # 4. did a change break them?
38
+ docpull ci # 5. gate freshness and quality
31
39
  ```
32
40
 
33
- The project stores declared sources in `docpull.yaml` and resolved inputs in
34
- `.docpull/context.lock.json`. Later syncs produce a hash-based diff while preserving
35
- source URLs, content hashes, run IDs, citations, and export metadata.
41
+ `docpull add` works out what each input is: a site, a page, a package, a repo, a
42
+ paper (`doi:` or arXiv), a feed, an OpenAPI spec, or a PDF.
36
43
 
37
- `docpull query` retrieves deduplicated passages from locked archives with version
38
- filters, a response budget, and exact source spans. The same query is available
39
- through the Python SDK and MCP. See [Query locked context](docs/context-dependencies.md#query-locked-context)
40
- for budget semantics and queries across projects.
44
+ | Command | What it does |
45
+ | --- | --- |
46
+ | `init` / `add` | Create `docpull.yaml` and declare web pages, sites, packages, repos, papers, feeds, or files. |
47
+ | `sync` | Fetch sources into a new run and pin `.docpull/context.lock.json`. |
48
+ | `query` | Return deduplicated passages from locked archives with a token budget and exact source spans. |
49
+ | `impact` | Report saved citations that a later source change made stale, contradicted, or broken. |
50
+ | `ci` | Check freshness, citation coverage, pack quality, and rights; exit non-zero on a hard gate. |
51
+
52
+ `docpull --help` lists the core and pack commands. `docpull help --all` lists every
53
+ command, and `docpull help <command>` shows its options. No account or paid API is
54
+ required: fetching, discovery, extraction, indexing, diffs, and queries run locally.
55
+ See [Query locked context](docs/context-dependencies.md#query-locked-context) for
56
+ budget semantics and queries across projects.
41
57
 
42
58
  ![DocPull project diff showing changed pages, local semantic categories, and zero failed URLs](docs/launch-assets/docpull-project-diff-demo.png)
43
59
 
44
- No account or paid API is required for this path. Direct fetching, discovery,
45
- extraction, indexing, pack analysis, and diffs run locally.
60
+ ## MCP setup
61
+
62
+ Install the MCP extra and register the stdio server with the core toolset, which
63
+ exposes the query, impact, read, and fetch tools an agent needs day to day:
64
+
65
+ ```bash
66
+ pip install 'docpull[mcp]'
67
+ claude mcp add --transport stdio docpull -- docpull mcp --toolset core
68
+ ```
69
+
70
+ Add `--toolset project` or `--toolset packs` (repeat or comma-separate) for more
71
+ tools; the default is `all`. Project writes stay off unless you pass
72
+ `--allow-project-writes`. See [MCP server](#mcp-server) for HTTP and the full list.
73
+
74
+ ## Ready-made packs
75
+
76
+ Popular sources are prebuilt in the signed public
77
+ [registry](https://github.com/raintree-technology/docpull-registry). A pack is a
78
+ recipe: source URLs, pinned pages, and content hashes, never content. DocPull
79
+ fetches the pages on your machine and reports which still match:
80
+
81
+ ```bash
82
+ export DOCPULL_REGISTRY_PUBLIC_KEY=k2wv0zPUlj88D66zXXQD86Knnt66MoJN2ztFitdDg00=
83
+ docpull add stripe@latest
84
+ ```
85
+
86
+ Packs rebuild daily from [`registry/catalog.yaml`](registry/catalog.yaml); a new
87
+ version appears only when the pages changed.
88
+
89
+ ## GitHub Action
90
+
91
+ Check saved citations on every pull request. The action runs `docpull ci`, keeps
92
+ one comment on the PR ("2 cited claims changed upstream"), and fails on a hard gate:
93
+
94
+ ```yaml
95
+ permissions:
96
+ contents: read
97
+ pull-requests: write
98
+ steps:
99
+ - uses: actions/checkout@v4
100
+ - uses: raintree-technology/docpull@v6.11.0
101
+ with:
102
+ args: --citations evidence/answers.json
103
+ ```
104
+
105
+ See [Context CI](docs/context-ci.md#github-actions) for inputs and outputs.
46
106
 
47
107
  ## Why use DocPull
48
108
 
49
109
  - **Reproduce agent context.** Stable IDs, hashes, manifests, and lockfiles show which
50
110
  source versions produced an answer or artifact.
51
- - **Detect source drift.** Sync and diff documentation, product pages, policies,
52
- feeds, repositories, packages, standards, and local documents.
111
+ - **Detect web drift.** Sync and diff docs, product and pricing pages, changelogs,
112
+ policies, feeds, repositories, packages, standards, and local documents.
113
+ - **Catch stale citations.** `docpull impact` marks each saved citation valid, stale,
114
+ contradicted, or broken; on a controlled
115
+ [benchmark](bench/results/stale-citations/REPORT.md) it caught every changed
116
+ fact that a cache-only agent would have kept serving.
117
+ - **Keep web text from steering agents.** Query results withhold passages that
118
+ match prompt-injection patterns and say how many were withheld.
53
119
  - **Keep evidence inspectable.** Markdown, NDJSON, SQLite, citations, and provenance
54
120
  sidecars remain readable without a hosted service.
55
121
  - **Choose the downstream surface.** Export context for agent clients, vector import,
@@ -63,6 +129,10 @@ extraction, indexing, pack analysis, and diffs run locally.
63
129
  declared sources → local acquisition → versioned evidence → diff and validation → export
64
130
  ```
65
131
 
132
+ `docpull diff` compares runs with hash-based change reports, and
133
+ `docpull export context-pack --target cursor` writes context for an agent client.
134
+ Source URLs, content hashes, run IDs, and citations travel with every artifact.
135
+
66
136
  DocPull's v3 pack contract separates raw extraction, agent-ready context, and
67
137
  eval-grade evidence. Validate the level a downstream system requires:
68
138
 
@@ -95,16 +165,30 @@ See [context-pack workflows](docs/context-packs.md) for the complete surface.
95
165
 
96
166
  ```bash
97
167
  pip install 'docpull[mcp]'
98
- docpull mcp
168
+ docpull mcp # stdio, every tool
169
+ docpull mcp --toolset core,project # fewer tools for a smaller agent context
99
170
  ```
100
171
 
101
- Claude Code can register the same local server:
172
+ | Toolset | Tools |
173
+ | --- | --- |
174
+ | `core` | `context_query`, `context_impact`, `read_doc`, `grep_docs`, `list_indexed`, `ensure_docs`, `list_sources`, `fetch_url`, `project_status` |
175
+ | `project` | `project_status`, `project_outdated`, `project_install`, `project_sync`, `project_update` |
176
+ | `packs` | Pack builders, `pack_*`, `graph_*`, `export_pack`, `audit_pack`, `refresh_pack`, `intelligence_bundle`, `workflow_run` |
177
+ | `all` | Everything above plus `render_url`, `explain_routes`, `validate_policy`, `serve_pack_status`, `add_source`, `remove_source` |
178
+
179
+ `DOCPULL_MCP_TOOLSET=core` sets the same choice from the environment. Calling a tool
180
+ outside the enabled toolsets returns an error that names the toolset to add.
181
+
182
+ For clients that speak Streamable HTTP, run the same server locally:
102
183
 
103
184
  ```bash
104
- claude mcp add --transport stdio docpull -- docpull mcp
185
+ pip install 'docpull[mcp,serve]'
186
+ docpull mcp --transport http --toolset core # http://127.0.0.1:8765/mcp
105
187
  ```
106
188
 
107
- The Python stdio server is the supported MCP server.
189
+ The HTTP server has no authentication. It binds 127.0.0.1 by default, rejects
190
+ requests whose Host or Origin header is not a loopback address (DNS rebinding
191
+ protection), and refuses a non-loopback `--host` unless you also pass `--allow-remote`.
108
192
 
109
193
  ## Limits and security boundary
110
194
 
@@ -4,9 +4,9 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "docpull"
7
- version = "6.9.0"
7
+ version = "6.11.0"
8
8
  dynamic = []
9
- description = "Declare, sync, diff, and lock context dependencies for AI agents"
9
+ description = "Web context for AI agents: fetch, lock, cite, and track changes to any public web source"
10
10
  readme = {file = "README.md", content-type = "text/markdown"}
11
11
  requires-python = ">=3.11"
12
12
  license = "MIT"
@@ -20,6 +20,10 @@ maintainers = [
20
20
  keywords = [
21
21
  "python",
22
22
  "markdown",
23
+ "web-context",
24
+ "agent-context",
25
+ "ai-context",
26
+ "citations",
23
27
  "documentation",
24
28
  "web",
25
29
  "website",
@@ -132,8 +136,13 @@ unstructured = [
132
136
  pdf = [
133
137
  "pypdf>=6.21.1",
134
138
  ]
139
+ tables = [
140
+ "pypdf>=6.21.1",
141
+ "pdfplumber>=0.11.10",
142
+ ]
135
143
  parse = [
136
144
  "pypdf>=6.21.1",
145
+ "pdfplumber>=0.11.10",
137
146
  "markitdown[docx,pdf]>=0.1.0",
138
147
  "unstructured[all-docs]>=0.24.1; python_version >= '3.11' and python_version < '3.14'",
139
148
  ]
@@ -149,6 +158,10 @@ e2b = [
149
158
  llm = [
150
159
  "tiktoken>=0.7.0",
151
160
  ]
161
+ vectors = [
162
+ "sqlite-vec>=0.1.9",
163
+ "fastembed>=0.9.1",
164
+ ]
152
165
  all = [
153
166
  "aiohttp-socks>=0.11.0",
154
167
  "url-normalize>=1.4.0",
@@ -163,10 +176,13 @@ all = [
163
176
  "uvicorn>=0.30.0",
164
177
  "pyarrow>=16.0.0",
165
178
  "pypdf>=6.21.1",
179
+ "pdfplumber>=0.11.10",
166
180
  "markitdown[docx,pdf]>=0.1.0",
167
181
  "unstructured[all-docs]>=0.24.1; python_version >= '3.11' and python_version < '3.14'",
168
182
  "presidio-analyzer>=2.2.0",
169
183
  "e2b>=2.0.0",
184
+ "sqlite-vec>=0.1.9",
185
+ "fastembed>=0.9.1",
170
186
  ]
171
187
  dev = [
172
188
  "pytest>=7.0.0",
@@ -178,7 +194,6 @@ dev = [
178
194
  "pip-audit>=2.0.0",
179
195
  "msgpack>=1.2.1",
180
196
  "pre-commit>=3.0.0",
181
- "types-requests>=2.31.0",
182
197
  "types-beautifulsoup4>=4.12.0",
183
198
  "types-defusedxml>=0.7.0",
184
199
  "types-pyyaml>=6.0.0",
@@ -1,4 +1,4 @@
1
- """DocPull — reproducible context dependencies for AI agents.
1
+ """DocPull: web context for AI agents. Fetch, lock, cite, and track changes to public web sources.
2
2
 
3
3
  The public SDK is loaded lazily. Importing :mod:`docpull` is common to every
4
4
  CLI command and Python submodule import, so the package root must not eagerly
@@ -10,12 +10,12 @@ module that owns the requested symbol.
10
10
 
11
11
  from __future__ import annotations
12
12
 
13
- from importlib import import_module
14
- from typing import TYPE_CHECKING, Any
13
+ from typing import TYPE_CHECKING
15
14
 
15
+ from ._lazy import lazy_exports
16
16
  from .surface import PUBLIC_SDK_EXPORTS
17
17
 
18
- __version__ = "6.9.0"
18
+ __version__ = "6.11.0"
19
19
 
20
20
  _LAZY_EXPORTS: dict[str, tuple[str, str]] = {
21
21
  "query_context": (".context_query", "query_context"),
@@ -163,20 +163,7 @@ _LAZY_EXPORTS: dict[str, tuple[str, str]] = {
163
163
  __all__ = list(PUBLIC_SDK_EXPORTS)
164
164
 
165
165
 
166
- def __getattr__(name: str) -> Any:
167
- """Load one public SDK symbol on first access and cache it locally."""
168
- target = _LAZY_EXPORTS.get(name)
169
- if target is None:
170
- raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
171
- module_name, attribute_name = target
172
- value = getattr(import_module(module_name, __name__), attribute_name)
173
- globals()[name] = value
174
- return value
175
-
176
-
177
- def __dir__() -> list[str]:
178
- """Include lazy public attributes in interactive discovery."""
179
- return sorted(set(globals()) | set(__all__))
166
+ __getattr__, __dir__ = lazy_exports(__name__, globals(), _LAZY_EXPORTS, __all__)
180
167
 
181
168
 
182
169
  if TYPE_CHECKING:
@@ -0,0 +1,99 @@
1
+ """Small filesystem helpers: atomic text writes and advisory file locks."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import contextlib
6
+ import hashlib
7
+ import os
8
+ import tempfile
9
+ from collections.abc import Iterator
10
+ from pathlib import Path
11
+ from typing import IO, Any
12
+
13
+ try: # POSIX
14
+ import fcntl as _fcntl
15
+ except ImportError: # pragma: no cover - Windows
16
+ _fcntl = None # type: ignore[assignment]
17
+
18
+ try: # Windows
19
+ import msvcrt as _msvcrt
20
+ except ImportError:
21
+ _msvcrt = None # type: ignore[assignment]
22
+
23
+
24
+ def atomic_write_text(path: Path | str, text: str, *, encoding: str = "utf-8") -> None:
25
+ """Write ``text`` to ``path`` via a unique temp file in the same dir + ``os.replace``.
26
+
27
+ Each writer gets its own temp file, so concurrent writers never clobber
28
+ each other's half-written temp; the last ``os.replace`` wins atomically.
29
+ """
30
+ target = Path(path)
31
+ target.parent.mkdir(parents=True, exist_ok=True)
32
+ tmp_name: str | None = None
33
+ try:
34
+ with tempfile.NamedTemporaryFile(
35
+ "w",
36
+ encoding=encoding,
37
+ dir=target.parent,
38
+ prefix=f".{target.name}.",
39
+ suffix=".tmp",
40
+ delete=False,
41
+ ) as handle:
42
+ tmp_name = handle.name
43
+ handle.write(text)
44
+ handle.flush()
45
+ os.fsync(handle.fileno())
46
+ os.replace(tmp_name, target)
47
+ except BaseException:
48
+ if tmp_name is not None:
49
+ with contextlib.suppress(OSError):
50
+ os.unlink(tmp_name)
51
+ raise
52
+
53
+
54
+ def _lock(handle: IO[Any]) -> None:
55
+ if _fcntl is not None:
56
+ _fcntl.flock(handle.fileno(), _fcntl.LOCK_EX)
57
+ elif _msvcrt is not None: # pragma: no cover - Windows
58
+ handle.seek(0)
59
+ while True:
60
+ try:
61
+ _msvcrt.locking(handle.fileno(), _msvcrt.LK_LOCK, 1)
62
+ return
63
+ except OSError:
64
+ continue
65
+
66
+
67
+ def _unlock(handle: IO[Any]) -> None:
68
+ if _fcntl is not None:
69
+ _fcntl.flock(handle.fileno(), _fcntl.LOCK_UN)
70
+ elif _msvcrt is not None: # pragma: no cover - Windows
71
+ handle.seek(0)
72
+ with contextlib.suppress(OSError):
73
+ _msvcrt.locking(handle.fileno(), _msvcrt.LK_UNLCK, 1)
74
+
75
+
76
+ @contextlib.contextmanager
77
+ def file_lock(path: Path | str) -> Iterator[None]:
78
+ """Exclusive advisory lock on ``path`` (created if missing), blocking.
79
+
80
+ Uses ``fcntl.flock`` on POSIX and ``msvcrt.locking`` on Windows; a no-op
81
+ where neither exists. Advisory only: cooperating writers must all use it.
82
+ """
83
+ lock_path = Path(path)
84
+ lock_path.parent.mkdir(parents=True, exist_ok=True)
85
+ with open(lock_path, "a+b") as handle:
86
+ _lock(handle)
87
+ try:
88
+ yield
89
+ finally:
90
+ _unlock(handle)
91
+
92
+
93
+ def file_sha256(path: Path) -> str:
94
+ """Stream ``path`` through SHA-256 in 1 MiB chunks."""
95
+ digest = hashlib.sha256()
96
+ with path.open("rb") as handle:
97
+ for chunk in iter(lambda: handle.read(1024 * 1024), b""):
98
+ digest.update(chunk)
99
+ return digest.hexdigest()