paveo 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. paveo-0.1.0/LICENSE +97 -0
  2. paveo-0.1.0/MANIFEST.in +12 -0
  3. paveo-0.1.0/Makefile +58 -0
  4. paveo-0.1.0/PKG-INFO +580 -0
  5. paveo-0.1.0/README.md +551 -0
  6. paveo-0.1.0/SECURITY.md +79 -0
  7. paveo-0.1.0/docs/PRICES.md +67 -0
  8. paveo-0.1.0/docs/SECURITY_REVIEW.md +146 -0
  9. paveo-0.1.0/docs/SPEC_V1.md +1013 -0
  10. paveo-0.1.0/docs/THREAT_MODEL.md +313 -0
  11. paveo-0.1.0/examples/paveo.json +31 -0
  12. paveo-0.1.0/examples/refund_bot.py +80 -0
  13. paveo-0.1.0/examples/runaway_loop.py +73 -0
  14. paveo-0.1.0/pyproject.toml +143 -0
  15. paveo-0.1.0/setup.cfg +4 -0
  16. paveo-0.1.0/src/paveo/__init__.py +46 -0
  17. paveo-0.1.0/src/paveo/_anthropic.py +525 -0
  18. paveo-0.1.0/src/paveo/_anthropic_client.py +317 -0
  19. paveo-0.1.0/src/paveo/_canonical.py +53 -0
  20. paveo-0.1.0/src/paveo/_evidence.py +604 -0
  21. paveo-0.1.0/src/paveo/_gemini.py +349 -0
  22. paveo-0.1.0/src/paveo/_generic.py +367 -0
  23. paveo-0.1.0/src/paveo/_harnesses.py +169 -0
  24. paveo-0.1.0/src/paveo/_licence.py +254 -0
  25. paveo-0.1.0/src/paveo/_memory.py +449 -0
  26. paveo-0.1.0/src/paveo/_openai.py +309 -0
  27. paveo-0.1.0/src/paveo/_policy_document.py +963 -0
  28. paveo-0.1.0/src/paveo/_replay.py +594 -0
  29. paveo-0.1.0/src/paveo/_setup.py +855 -0
  30. paveo-0.1.0/src/paveo/audit.py +827 -0
  31. paveo-0.1.0/src/paveo/budget.py +393 -0
  32. paveo-0.1.0/src/paveo/cli.py +545 -0
  33. paveo-0.1.0/src/paveo/enforce.py +670 -0
  34. paveo-0.1.0/src/paveo/errors.py +190 -0
  35. paveo-0.1.0/src/paveo/policy.py +824 -0
  36. paveo-0.1.0/src/paveo/prices.py +1047 -0
  37. paveo-0.1.0/src/paveo/py.typed +0 -0
  38. paveo-0.1.0/src/paveo/session.py +470 -0
  39. paveo-0.1.0/src/paveo/starters/claude-code.json +96 -0
  40. paveo-0.1.0/src/paveo/starters/codex.json +50 -0
  41. paveo-0.1.0/src/paveo/starters/cursor.json +64 -0
  42. paveo-0.1.0/src/paveo/starters/finance-ops.json +72 -0
  43. paveo-0.1.0/src/paveo/starters/support-agent.json +86 -0
  44. paveo-0.1.0/src/paveo/stores/__init__.py +28 -0
  45. paveo-0.1.0/src/paveo/stores/memory.py +278 -0
  46. paveo-0.1.0/src/paveo/stores/protocol.py +91 -0
  47. paveo-0.1.0/src/paveo.egg-info/PKG-INFO +580 -0
  48. paveo-0.1.0/src/paveo.egg-info/SOURCES.txt +81 -0
  49. paveo-0.1.0/src/paveo.egg-info/dependency_links.txt +1 -0
  50. paveo-0.1.0/src/paveo.egg-info/entry_points.txt +2 -0
  51. paveo-0.1.0/src/paveo.egg-info/requires.txt +10 -0
  52. paveo-0.1.0/src/paveo.egg-info/top_level.txt +1 -0
  53. paveo-0.1.0/tests/conftest.py +50 -0
  54. paveo-0.1.0/tests/overhead.py +184 -0
  55. paveo-0.1.0/tests/price_freshness.py +39 -0
  56. paveo-0.1.0/tests/test_anthropic.py +497 -0
  57. paveo-0.1.0/tests/test_audit.py +628 -0
  58. paveo-0.1.0/tests/test_audit_processes.py +79 -0
  59. paveo-0.1.0/tests/test_budget.py +659 -0
  60. paveo-0.1.0/tests/test_check_llm.py +551 -0
  61. paveo-0.1.0/tests/test_cli.py +1198 -0
  62. paveo-0.1.0/tests/test_errors.py +128 -0
  63. paveo-0.1.0/tests/test_evidence.py +498 -0
  64. paveo-0.1.0/tests/test_examples.py +41 -0
  65. paveo-0.1.0/tests/test_gemini.py +546 -0
  66. paveo-0.1.0/tests/test_licence.py +493 -0
  67. paveo-0.1.0/tests/test_models_and_declared_prices.py +525 -0
  68. paveo-0.1.0/tests/test_no_egress.py +429 -0
  69. paveo-0.1.0/tests/test_openai.py +484 -0
  70. paveo-0.1.0/tests/test_other_agents.py +688 -0
  71. paveo-0.1.0/tests/test_overhead.py +23 -0
  72. paveo-0.1.0/tests/test_policy.py +723 -0
  73. paveo-0.1.0/tests/test_price_freshness.py +97 -0
  74. paveo-0.1.0/tests/test_prices.py +521 -0
  75. paveo-0.1.0/tests/test_rate_and_repeat.py +745 -0
  76. paveo-0.1.0/tests/test_replay.py +751 -0
  77. paveo-0.1.0/tests/test_repo_claims.py +144 -0
  78. paveo-0.1.0/tests/test_requires.py +552 -0
  79. paveo-0.1.0/tests/test_session.py +315 -0
  80. paveo-0.1.0/tests/test_shadow_and_refusals.py +412 -0
  81. paveo-0.1.0/tests/test_starter_policies.py +545 -0
  82. paveo-0.1.0/tests/test_stores.py +528 -0
  83. paveo-0.1.0/tests/test_wrap_anthropic.py +603 -0
paveo-0.1.0/LICENSE ADDED
@@ -0,0 +1,97 @@
1
+ Copyright (c) 2026 MD Faiz Jamal
2
+
3
+ Licensed under the terms that follow, unmodified.
4
+
5
+ Elastic License 2.0
6
+
7
+ URL: https://www.elastic.co/licensing/elastic-license
8
+
9
+ ## Acceptance
10
+
11
+ By using the software, you agree to all of the terms and conditions below.
12
+
13
+ ## Copyright License
14
+
15
+ The licensor grants you a non-exclusive, royalty-free, worldwide,
16
+ non-sublicensable, non-transferable license to use, copy, distribute, make
17
+ available, and prepare derivative works of the software, in each case subject to
18
+ the limitations and conditions below.
19
+
20
+ ## Limitations
21
+
22
+ You may not provide the software to third parties as a hosted or managed
23
+ service, where the service provides users with access to any substantial set of
24
+ the features or functionality of the software.
25
+
26
+ You may not move, change, disable, or circumvent the license key functionality
27
+ in the software, and you may not remove or obscure any functionality in the
28
+ software that is protected by the license key.
29
+
30
+ You may not alter, remove, or obscure any licensing, copyright, or other notices
31
+ of the licensor in the software. Any use of the licensor’s trademarks is subject
32
+ to applicable law.
33
+
34
+ ## Patents
35
+
36
+ The licensor grants you a license, under any patent claims the licensor can
37
+ license, or becomes able to license, to make, have made, use, sell, offer for
38
+ sale, import and have imported the software, in each case subject to the
39
+ limitations and conditions in this license. This license does not cover any
40
+ patent claims that you cause to be infringed by modifications or additions to
41
+ the software. If you or your company make any written claim that the software
42
+ infringes or contributes to infringement of any patent, your patent license for
43
+ the software granted under these terms ends immediately. If your company makes
44
+ such a claim, your patent license ends immediately for work on behalf of your
45
+ company.
46
+
47
+ ## Notices
48
+
49
+ You must ensure that anyone who gets a copy of any part of the software from you
50
+ also gets a copy of these terms.
51
+
52
+ If you modify the software, you must include in any modified copies of the
53
+ software prominent notices stating that you have modified the software.
54
+
55
+ ## No Other Rights
56
+
57
+ These terms do not imply any licenses other than those expressly granted in
58
+ these terms.
59
+
60
+ ## Termination
61
+
62
+ If you use the software in violation of these terms, such use is not licensed,
63
+ and your licenses will automatically terminate. If the licensor provides you
64
+ with a notice of your violation, and you cease all violation of this license no
65
+ later than 30 days after you receive that notice, your licenses will be
66
+ reinstated retroactively. However, if you violate these terms after such
67
+ reinstatement, any additional violation of these terms will cause your licenses
68
+ to terminate automatically and permanently.
69
+
70
+ ## No Liability
71
+
72
+ *As far as the law allows, the software comes as is, without any warranty or
73
+ condition, and the licensor will not be liable to you for any damages arising
74
+ out of these terms or the use or nature of the software, under any kind of
75
+ legal claim.*
76
+
77
+ ## Definitions
78
+
79
+ The **licensor** is the entity offering these terms, and the **software** is the
80
+ software the licensor makes available under these terms, including any portion
81
+ of it.
82
+
83
+ **you** refers to the individual or entity agreeing to these terms.
84
+
85
+ **your company** is any legal entity, sole proprietorship, or other kind of
86
+ organization that you work for, plus all organizations that have control over,
87
+ are under the control of, or are under common control with that
88
+ organization. **control** means ownership of substantially all the assets of an
89
+ entity, or the power to direct its management and policies by vote, contract, or
90
+ otherwise. Control can be direct or indirect.
91
+
92
+ **your licenses** are all the licenses granted to you for the software under
93
+ these terms.
94
+
95
+ **use** means anything you do with the software requiring one of your licenses.
96
+
97
+ **trademark** means trademarks, service marks, and similar rights.
@@ -0,0 +1,12 @@
1
+ # The sdist must be able to run its own gate (Rule 19: clone to green tests in
2
+ # one command). setuptools' default manifest ships test*.py but not conftest.py,
3
+ # which every test file imports, so an unpacked sdist failed at collection.
4
+ include LICENSE
5
+ include SECURITY.md
6
+ include Makefile
7
+ include MANIFEST.in
8
+ recursive-include tests *.py
9
+ prune tests/maintainer
10
+ recursive-include examples *.py *.json
11
+ # Named, not globbed: only the published docs belong in a release.
12
+ include docs/SPEC_V1.md docs/THREAT_MODEL.md docs/PRICES.md docs/SECURITY_REVIEW.md
paveo-0.1.0/Makefile ADDED
@@ -0,0 +1,58 @@
1
+ # Clone to green tests in one command (Rule 19). No tribal knowledge.
2
+ #
3
+ # make dev once, to build .venv and install the package editable
4
+ # make check the verification gate, in order, before a commit
5
+
6
+ PY := .venv/bin/python
7
+
8
+ # The gate finds the package by path, never through an editable install. On this
9
+ # machine, files pip writes into the venv get flagged UF_HIDDEN shortly after
10
+ # they are created, and since Python 3.13 `site.addpackage` silently skips hidden
11
+ # .pth files — so `pip install -e .` reports success and leaves the package
12
+ # unimportable, with no error anywhere. A verification gate that can be defeated
13
+ # by a filesystem flag is not a gate (Rule 5).
14
+ export PYTHONPATH := src
15
+
16
+ .PHONY: dev check lint types test egress overhead example release-check clean
17
+
18
+ # The editable install is a convenience for working in a REPL. Nothing in the
19
+ # gate relies on it, deliberately — see the PYTHONPATH note above.
20
+ dev:
21
+ python3 -m venv .venv
22
+ $(PY) -m pip install --upgrade pip
23
+ $(PY) -m pip install -e ".[dev]"
24
+
25
+ lint:
26
+ $(PY) -m ruff check .
27
+ $(PY) -m ruff format --check .
28
+
29
+ types:
30
+ $(PY) -m mypy --strict src/
31
+
32
+ test:
33
+ $(PY) -m pytest -q
34
+
35
+ # Standalone ON PURPOSE: pytest plugins can open sockets themselves and mask
36
+ # the result. This is the run that counts.
37
+ egress:
38
+ $(PY) -m tests.test_no_egress
39
+
40
+ # What a call costs us, on the real clock; fails over the budget (Rule 17, D73).
41
+ # Standalone because it measures this machine, which is not a unit test's job.
42
+ overhead:
43
+ $(PY) -m tests.overhead
44
+
45
+ example:
46
+ $(PY) examples/refund_bot.py
47
+ $(PY) examples/runaway_loop.py
48
+
49
+ check: lint types test egress overhead
50
+
51
+ # Before any release, on top of `check`: refuses a price table not re-read within
52
+ # 30 days (§12.5, D43). Not part of `check`, so an old table never blocks a commit,
53
+ # only a release.
54
+ release-check: check
55
+ $(PY) -m tests.price_freshness
56
+
57
+ clean:
58
+ rm -rf .venv .pytest_cache .mypy_cache .ruff_cache src/*.egg-info