pdfhell 0.1.1__tar.gz → 0.1.2__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 (31) hide show
  1. {pdfhell-0.1.1 → pdfhell-0.1.2}/PKG-INFO +1 -1
  2. {pdfhell-0.1.1 → pdfhell-0.1.2}/pdfhell/__init__.py +1 -1
  3. {pdfhell-0.1.1 → pdfhell-0.1.2}/pdfhell/cli.py +41 -0
  4. {pdfhell-0.1.1 → pdfhell-0.1.2}/pdfhell.egg-info/PKG-INFO +1 -1
  5. {pdfhell-0.1.1 → pdfhell-0.1.2}/pyproject.toml +1 -1
  6. {pdfhell-0.1.1 → pdfhell-0.1.2}/LICENSE +0 -0
  7. {pdfhell-0.1.1 → pdfhell-0.1.2}/README.md +0 -0
  8. {pdfhell-0.1.1 → pdfhell-0.1.2}/pdfhell/auditpack.py +0 -0
  9. {pdfhell-0.1.1 → pdfhell-0.1.2}/pdfhell/case.py +0 -0
  10. {pdfhell-0.1.1 → pdfhell-0.1.2}/pdfhell/generators/__init__.py +0 -0
  11. {pdfhell-0.1.1 → pdfhell-0.1.2}/pdfhell/generators/_common.py +0 -0
  12. {pdfhell-0.1.1 → pdfhell-0.1.2}/pdfhell/generators/footnote_override.py +0 -0
  13. {pdfhell-0.1.1 → pdfhell-0.1.2}/pdfhell/generators/hidden_ocr_mismatch.py +0 -0
  14. {pdfhell-0.1.1 → pdfhell-0.1.2}/pdfhell/generators/split_table_across_pages.py +0 -0
  15. {pdfhell-0.1.1 → pdfhell-0.1.2}/pdfhell/junit.py +0 -0
  16. {pdfhell-0.1.1 → pdfhell-0.1.2}/pdfhell/runner.py +0 -0
  17. {pdfhell-0.1.1 → pdfhell-0.1.2}/pdfhell/scorer.py +0 -0
  18. {pdfhell-0.1.1 → pdfhell-0.1.2}/pdfhell/suite.py +0 -0
  19. {pdfhell-0.1.1 → pdfhell-0.1.2}/pdfhell/vision.py +0 -0
  20. {pdfhell-0.1.1 → pdfhell-0.1.2}/pdfhell.egg-info/SOURCES.txt +0 -0
  21. {pdfhell-0.1.1 → pdfhell-0.1.2}/pdfhell.egg-info/dependency_links.txt +0 -0
  22. {pdfhell-0.1.1 → pdfhell-0.1.2}/pdfhell.egg-info/entry_points.txt +0 -0
  23. {pdfhell-0.1.1 → pdfhell-0.1.2}/pdfhell.egg-info/requires.txt +0 -0
  24. {pdfhell-0.1.1 → pdfhell-0.1.2}/pdfhell.egg-info/top_level.txt +0 -0
  25. {pdfhell-0.1.1 → pdfhell-0.1.2}/setup.cfg +0 -0
  26. {pdfhell-0.1.1 → pdfhell-0.1.2}/tests/test_auditpack.py +0 -0
  27. {pdfhell-0.1.1 → pdfhell-0.1.2}/tests/test_cli.py +0 -0
  28. {pdfhell-0.1.1 → pdfhell-0.1.2}/tests/test_generators.py +0 -0
  29. {pdfhell-0.1.1 → pdfhell-0.1.2}/tests/test_junit.py +0 -0
  30. {pdfhell-0.1.1 → pdfhell-0.1.2}/tests/test_scorer.py +0 -0
  31. {pdfhell-0.1.1 → pdfhell-0.1.2}/tests/test_statistical.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pdfhell
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: PDF Hell — adversarial PDFs that break AI document readers. Procedural ground truth, not LLM-as-judge.
5
5
  Author: Multivon
6
6
  License: Apache-2.0
@@ -16,7 +16,7 @@ layer; the runtime, scoring, and reporting come from multivon-eval.
16
16
  """
17
17
  from __future__ import annotations
18
18
 
19
- __version__ = "0.1.1"
19
+ __version__ = "0.1.2"
20
20
 
21
21
  from .case import HellCase
22
22
  from .generators import (
@@ -34,6 +34,40 @@ def _cmd_list_traps(args: argparse.Namespace) -> int:
34
34
  return 0
35
35
 
36
36
 
37
+ def _cmd_discover(args: argparse.Namespace) -> int:
38
+ """Print the machine-readable pdfhell capability catalog as JSON.
39
+
40
+ Same shape an agent gets via the multivon-mcp ``eval_discover`` tool —
41
+ surfaced as a CLI command so agents that don't speak MCP can pipe
42
+ ``pdfhell discover --json | jq ...`` to plan a run.
43
+ """
44
+ from .generators import GENERATORS
45
+ catalog = {
46
+ "package": "pdfhell",
47
+ "version": __version__,
48
+ "traps": [],
49
+ "suites": [],
50
+ }
51
+ for trap in TRAP_FAMILIES:
52
+ _, example_case = GENERATORS[trap](seed=1)
53
+ catalog["traps"].append({
54
+ "name": trap,
55
+ "example_question": example_case.question,
56
+ "example_expected_answer": example_case.expected_answer,
57
+ })
58
+ for name, spec in SUITES.items():
59
+ catalog["suites"].append({
60
+ "name": name,
61
+ "version": spec.version,
62
+ "suite_hash": spec.suite_hash,
63
+ "total_cases": spec.total_cases,
64
+ "trap_seeds": {trap: list(seeds) for trap, seeds in spec.traps.items()},
65
+ })
66
+ json.dump(catalog, sys.stdout, indent=2 if not args.compact else None)
67
+ print()
68
+ return 0
69
+
70
+
37
71
  def _cmd_make(args: argparse.Namespace) -> int:
38
72
  try:
39
73
  pdf_bytes, case = generate_case(args.trap, args.seed)
@@ -158,6 +192,13 @@ def build_parser() -> argparse.ArgumentParser:
158
192
  p_list = sub.add_parser("list-traps", help="list available trap families")
159
193
  p_list.set_defaults(func=_cmd_list_traps)
160
194
 
195
+ p_discover = sub.add_parser(
196
+ "discover",
197
+ help="emit pdfhell capability catalog as JSON (for agents that don't speak MCP)",
198
+ )
199
+ p_discover.add_argument("--compact", action="store_true", help="single-line JSON, no indent")
200
+ p_discover.set_defaults(func=_cmd_discover)
201
+
161
202
  p_make = sub.add_parser("make", help="generate one case (pdf + json)")
162
203
  p_make.add_argument("--trap", required=True, choices=TRAP_FAMILIES)
163
204
  p_make.add_argument("--seed", required=True, type=int)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pdfhell
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: PDF Hell — adversarial PDFs that break AI document readers. Procedural ground truth, not LLM-as-judge.
5
5
  Author: Multivon
6
6
  License: Apache-2.0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pdfhell"
7
- version = "0.1.1"
7
+ version = "0.1.2"
8
8
  description = "PDF Hell — adversarial PDFs that break AI document readers. Procedural ground truth, not LLM-as-judge."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes