backdraft 0.2.0__py3-none-any.whl

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 (50) hide show
  1. backdraft/__init__.py +13 -0
  2. backdraft/bind/__init__.py +37 -0
  3. backdraft/bind/binder.py +653 -0
  4. backdraft/bind/cli.py +133 -0
  5. backdraft/bind/evidence.py +232 -0
  6. backdraft/bind/verify/__init__.py +30 -0
  7. backdraft/bind/verify/base.py +70 -0
  8. backdraft/bind/verify/entail.py +156 -0
  9. backdraft/bind/verify/overlap.py +114 -0
  10. backdraft/bind/verify/recompute.py +45 -0
  11. backdraft/bind/verify/value_trace.py +352 -0
  12. backdraft/cli.py +341 -0
  13. backdraft/cli_context.py +152 -0
  14. backdraft/credentials.py +106 -0
  15. backdraft/extract/__init__.py +37 -0
  16. backdraft/extract/base.py +184 -0
  17. backdraft/extract/pdf_text.py +124 -0
  18. backdraft/extract/text.py +44 -0
  19. backdraft/extract/vlm.py +175 -0
  20. backdraft/extract/vlm_settings.py +197 -0
  21. backdraft/extract/xlsx.py +244 -0
  22. backdraft/gate/__init__.py +39 -0
  23. backdraft/gate/cli.py +131 -0
  24. backdraft/gate/reader.py +592 -0
  25. backdraft/gate/searcher.py +123 -0
  26. backdraft/kernel/__init__.py +17 -0
  27. backdraft/kernel/artifact.py +234 -0
  28. backdraft/kernel/chunking.py +162 -0
  29. backdraft/kernel/claims.py +142 -0
  30. backdraft/kernel/errors.py +35 -0
  31. backdraft/kernel/hashing.py +89 -0
  32. backdraft/kernel/model.py +336 -0
  33. backdraft/kernel/tokens.py +291 -0
  34. backdraft/registry/__init__.py +39 -0
  35. backdraft/registry/ledger.py +82 -0
  36. backdraft/registry/schema.sql +90 -0
  37. backdraft/registry/store.py +915 -0
  38. backdraft/render/__init__.py +31 -0
  39. backdraft/render/_text.py +69 -0
  40. backdraft/render/cli.py +107 -0
  41. backdraft/render/footnotes.py +172 -0
  42. backdraft/render/html.py +1211 -0
  43. backdraft/render/markdown.py +313 -0
  44. backdraft/render/placement.py +105 -0
  45. backdraft/render/sidecar.py +164 -0
  46. backdraft-0.2.0.dist-info/METADATA +253 -0
  47. backdraft-0.2.0.dist-info/RECORD +50 -0
  48. backdraft-0.2.0.dist-info/WHEEL +4 -0
  49. backdraft-0.2.0.dist-info/entry_points.txt +2 -0
  50. backdraft-0.2.0.dist-info/licenses/LICENSE +21 -0
backdraft/__init__.py ADDED
@@ -0,0 +1,13 @@
1
+ """Backdraft — drop-in provenance for factual claims.
2
+
3
+ One click from any claim to the evidence behind it: `ingest` anchors source
4
+ documents, `read`/`search` gate them into a model's context while minting
5
+ citation tokens, `bind` resolves those tokens back to their receipts, `render`
6
+ produces a self-contained artifact.
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ __version__ = "0.1.0"
12
+
13
+ __all__ = ["__version__"]
@@ -0,0 +1,37 @@
1
+ """bind — resolve claims against the registry, verify, report.
2
+
3
+ The postprocess between writing and rendering: every token becomes its receipt,
4
+ every failure becomes a line item, and nothing the author wrote is dropped or
5
+ edited. `binder.bind` is the whole entry point; `verify` holds the optional
6
+ methods, all off unless `--check` names them.
7
+
8
+ Export style (shared by every package above the kernel): **names**, never
9
+ submodules. `bind.cli` is not imported here — it needs typer; the library does
10
+ not. The suffixes and path helpers below are `kernel/artifact.py`'s: the names a
11
+ bind run writes are part of the artifact format, and bind re-exports them because
12
+ its callers ask bind where it wrote.
13
+ """
14
+
15
+ from __future__ import annotations
16
+
17
+ from .binder import (
18
+ BOUND_SUFFIX,
19
+ PROPOSAL_LIMIT,
20
+ SIDECAR_SUFFIX,
21
+ bind,
22
+ bound_path,
23
+ propose_anchors,
24
+ search_query,
25
+ sidecar_path,
26
+ )
27
+
28
+ __all__ = [
29
+ "bind",
30
+ "bound_path",
31
+ "sidecar_path",
32
+ "propose_anchors",
33
+ "search_query",
34
+ "BOUND_SUFFIX",
35
+ "SIDECAR_SUFFIX",
36
+ "PROPOSAL_LIMIT",
37
+ ]