vouch-protocol 3.0.0__tar.gz → 3.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 (391) hide show
  1. {vouch_protocol-3.0.0/vouch_protocol.egg-info → vouch_protocol-3.1.0}/PKG-INFO +18 -16
  2. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/README.md +14 -10
  3. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/pyproject.toml +6 -6
  4. vouch_protocol-3.1.0/tests/test_ati_core.py +122 -0
  5. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_audio_bridge.py +2 -0
  6. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_authority_state.py +4 -0
  7. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_autosign.py +4 -2
  8. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_bridge.py +6 -0
  9. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_cache.py +71 -0
  10. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_caveats.py +36 -11
  11. vouch_protocol-3.1.0/tests/test_cli_verify.py +239 -0
  12. vouch_protocol-3.1.0/tests/test_cli_without_server_extra.py +38 -0
  13. vouch_protocol-3.1.0/tests/test_conformance.py +99 -0
  14. vouch_protocol-3.1.0/tests/test_context_v1.py +298 -0
  15. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_credential_gate.py +6 -1
  16. vouch_protocol-3.1.0/tests/test_delegation_attenuation.py +51 -0
  17. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_delegation_chain_vectors.py +30 -2
  18. vouch_protocol-3.1.0/tests/test_delegation_hardening.py +852 -0
  19. vouch_protocol-3.1.0/tests/test_delegation_size_guard.py +138 -0
  20. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_delegation_verify.py +128 -22
  21. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_dx_sugar.py +9 -5
  22. vouch_protocol-3.1.0/tests/test_ed25519_check.py +98 -0
  23. vouch_protocol-3.1.0/tests/test_ed25519_strict_vector.py +82 -0
  24. vouch_protocol-3.1.0/tests/test_fence.py +945 -0
  25. vouch_protocol-3.1.0/tests/test_fetch_hostile_documents.py +235 -0
  26. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_fleet.py +15 -2
  27. vouch_protocol-3.1.0/tests/test_git_commit_binding.py +382 -0
  28. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_git_workflow.py +18 -13
  29. vouch_protocol-3.1.0/tests/test_grade_evidence.py +327 -0
  30. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_hasura_integration.py +2 -1
  31. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_hybrid.py +21 -4
  32. vouch_protocol-3.1.0/tests/test_identity_file_reader.py +551 -0
  33. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_intent_recheck.py +41 -13
  34. vouch_protocol-3.1.0/tests/test_intent_recheck_vector.py +54 -0
  35. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_jcs_interop.py +28 -0
  36. vouch_protocol-3.1.0/tests/test_keys_post_quantum.py +1344 -0
  37. vouch_protocol-3.1.0/tests/test_keys_ts_interop.py +101 -0
  38. vouch_protocol-3.1.0/tests/test_kms.py +723 -0
  39. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_liveness_conformance.py +146 -19
  40. vouch_protocol-3.1.0/tests/test_mcp_guard_replay.py +153 -0
  41. vouch_protocol-3.1.0/tests/test_mcp_guard_revocation.py +243 -0
  42. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_mcp_server_shield.py +39 -0
  43. vouch_protocol-3.1.0/tests/test_mcp_server_status_tools.py +328 -0
  44. vouch_protocol-3.1.0/tests/test_mint_delegation.py +169 -0
  45. vouch_protocol-3.1.0/tests/test_mldsa_check.py +102 -0
  46. vouch_protocol-3.1.0/tests/test_multikey.py +151 -0
  47. vouch_protocol-3.1.0/tests/test_nesting_and_precision.py +185 -0
  48. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_nonce.py +19 -6
  49. vouch_protocol-3.1.0/tests/test_nonce_replay_store.py +395 -0
  50. vouch_protocol-3.1.0/tests/test_onboard.py +503 -0
  51. vouch_protocol-3.1.0/tests/test_pacing.py +2010 -0
  52. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_policy_limits.py +8 -5
  53. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_pq_verify.py +3 -1
  54. vouch_protocol-3.1.0/tests/test_proof_set_vector.py +68 -0
  55. vouch_protocol-3.1.0/tests/test_reasoning_escrow_binding.py +201 -0
  56. vouch_protocol-3.1.0/tests/test_recovery.py +373 -0
  57. vouch_protocol-3.1.0/tests/test_replay_key_vector.py +28 -0
  58. vouch_protocol-3.1.0/tests/test_revocation_fail_closed.py +383 -0
  59. vouch_protocol-3.1.0/tests/test_root_delegation_scripts.py +78 -0
  60. vouch_protocol-3.1.0/tests/test_sidecar.py +1727 -0
  61. vouch_protocol-3.1.0/tests/test_ssrf_ranges.py +17 -0
  62. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_status_list.py +36 -58
  63. vouch_protocol-3.1.0/tests/test_status_list_strict.py +646 -0
  64. vouch_protocol-3.1.0/tests/test_strict_time_leftovers.py +65 -0
  65. vouch_protocol-3.1.0/tests/test_timefmt.py +179 -0
  66. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_trust_check.py +148 -0
  67. vouch_protocol-3.1.0/tests/test_trusted_roots.py +177 -0
  68. vouch_protocol-3.1.0/tests/test_trusted_roots_vector.py +45 -0
  69. vouch_protocol-3.1.0/tests/test_validator_cli.py +1675 -0
  70. vouch_protocol-3.1.0/tests/test_validator_server.py +532 -0
  71. vouch_protocol-3.1.0/tests/test_vector_runners.py +135 -0
  72. vouch_protocol-3.1.0/tests/test_verifier_hardening.py +1035 -0
  73. vouch_protocol-3.1.0/tests/test_verifier_round2.py +683 -0
  74. vouch_protocol-3.1.0/tests/test_verifier_round3.py +155 -0
  75. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_verifier_vc.py +7 -4
  76. vouch_protocol-3.1.0/tests/test_verify_without_key.py +213 -0
  77. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_vouch_mcp.py +10 -3
  78. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/__init__.py +1 -1
  79. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/accountability.py +9 -8
  80. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/agent.py +38 -6
  81. vouch_protocol-3.1.0/vouch/async_verifier.py +441 -0
  82. vouch_protocol-3.1.0/vouch/attenuation.py +790 -0
  83. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/authority_state.py +694 -697
  84. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/autosign.py +130 -19
  85. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/bridge/server.py +13 -1
  86. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/cache.py +50 -8
  87. vouch_protocol-3.1.0/vouch/caveats.py +715 -0
  88. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/cli.py +542 -277
  89. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/conformance.py +118 -58
  90. vouch_protocol-3.1.0/vouch/conformance_jcs_vectors.json +227 -0
  91. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/data_integrity.py +47 -8
  92. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/data_integrity_hybrid.py +66 -22
  93. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/deliberation.py +8 -7
  94. vouch_protocol-3.1.0/vouch/did_web.py +607 -0
  95. vouch_protocol-3.1.0/vouch/ed25519_check.py +216 -0
  96. vouch_protocol-3.1.0/vouch/fence.py +968 -0
  97. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/fleet.py +37 -7
  98. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/gate.py +57 -18
  99. vouch_protocol-3.1.0/vouch/grade.py +726 -0
  100. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/heartbeat.py +7 -8
  101. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/integrations/_common.py +1 -1
  102. vouch_protocol-3.1.0/vouch/integrations/a2a.py +149 -0
  103. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/integrations/fastapi.py +4 -1
  104. vouch_protocol-3.1.0/vouch/integrations/hasura/webhook.py +470 -0
  105. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/integrations/mcp/server.py +249 -63
  106. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/integrations/mlflow.py +26 -3
  107. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/integrations/safetensors.py +32 -4
  108. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/intent_recheck.py +142 -36
  109. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/jcs.py +46 -23
  110. vouch_protocol-3.1.0/vouch/keys.py +1136 -0
  111. vouch_protocol-3.1.0/vouch/kms.py +782 -0
  112. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/liveness_conformance.py +164 -76
  113. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/mcp/_guard.py +205 -86
  114. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/mcp_guard.py +65 -3
  115. vouch_protocol-3.1.0/vouch/mldsa_check.py +199 -0
  116. vouch_protocol-3.1.0/vouch/multikey.py +192 -0
  117. vouch_protocol-3.1.0/vouch/nesting.py +35 -0
  118. vouch_protocol-3.1.0/vouch/nonce.py +493 -0
  119. vouch_protocol-3.1.0/vouch/onboard.py +1184 -0
  120. vouch_protocol-3.1.0/vouch/pacing/__init__.py +288 -0
  121. vouch_protocol-3.1.0/vouch/pacing/_common.py +183 -0
  122. vouch_protocol-3.1.0/vouch/pacing/_pedersen.py +126 -0
  123. vouch_protocol-3.1.0/vouch/pacing/census.py +265 -0
  124. vouch_protocol-3.1.0/vouch/pacing/custody.py +384 -0
  125. vouch_protocol-3.1.0/vouch/pacing/disclosure.py +373 -0
  126. vouch_protocol-3.1.0/vouch/pacing/dissent.py +344 -0
  127. vouch_protocol-3.1.0/vouch/pacing/fuse.py +298 -0
  128. vouch_protocol-3.1.0/vouch/pacing/load_auth.py +332 -0
  129. vouch_protocol-3.1.0/vouch/pacing/oversight.py +324 -0
  130. vouch_protocol-3.1.0/vouch/pacing/pace.py +297 -0
  131. vouch_protocol-3.1.0/vouch/pacing/prereg.py +318 -0
  132. vouch_protocol-3.1.0/vouch/pacing/recursion.py +339 -0
  133. vouch_protocol-3.1.0/vouch/pacing/redline.py +347 -0
  134. vouch_protocol-3.1.0/vouch/pacing/restraint.py +582 -0
  135. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/ratelimit.py +9 -1
  136. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/reasoning.py +153 -32
  137. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/receipts.py +5 -4
  138. vouch_protocol-3.1.0/vouch/recovery.py +501 -0
  139. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/reputation.py +9 -1
  140. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/reputation_policy.py +15 -8
  141. vouch_protocol-3.1.0/vouch/revocation.py +650 -0
  142. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/root_of_trust.py +14 -1
  143. vouch_protocol-3.1.0/vouch/sidecar.py +1571 -0
  144. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/signer.py +135 -24
  145. vouch_protocol-3.1.0/vouch/ssrf.py +628 -0
  146. vouch_protocol-3.1.0/vouch/status_list.py +1262 -0
  147. vouch_protocol-3.1.0/vouch/status_list_fetcher.py +245 -0
  148. vouch_protocol-3.1.0/vouch/timefmt.py +284 -0
  149. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/transport/did_key.py +17 -4
  150. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/transport/rendezvous.py +11 -4
  151. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/trust_check.py +214 -19
  152. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/trust_entropy.py +9 -24
  153. vouch_protocol-3.1.0/vouch/trusted_roots.py +237 -0
  154. vouch_protocol-3.1.0/vouch/validator_flags.py +93 -0
  155. vouch_protocol-3.1.0/vouch/validator_server.py +1235 -0
  156. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/vc.py +22 -9
  157. vouch_protocol-3.1.0/vouch/verification.py +664 -0
  158. vouch_protocol-3.1.0/vouch/verifier.py +1985 -0
  159. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0/vouch_protocol.egg-info}/PKG-INFO +18 -16
  160. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch_protocol.egg-info/SOURCES.txt +68 -0
  161. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch_protocol.egg-info/requires.txt +2 -5
  162. vouch_protocol-3.0.0/tests/test_conformance.py +0 -35
  163. vouch_protocol-3.0.0/tests/test_delegation_attenuation.py +0 -30
  164. vouch_protocol-3.0.0/tests/test_multikey.py +0 -61
  165. vouch_protocol-3.0.0/tests/test_recovery.py +0 -113
  166. vouch_protocol-3.0.0/tests/test_validator_server.py +0 -185
  167. vouch_protocol-3.0.0/vouch/async_verifier.py +0 -297
  168. vouch_protocol-3.0.0/vouch/attenuation.py +0 -399
  169. vouch_protocol-3.0.0/vouch/caveats.py +0 -415
  170. vouch_protocol-3.0.0/vouch/did_web.py +0 -328
  171. vouch_protocol-3.0.0/vouch/grade.py +0 -221
  172. vouch_protocol-3.0.0/vouch/integrations/a2a.py +0 -81
  173. vouch_protocol-3.0.0/vouch/integrations/hasura/webhook.py +0 -325
  174. vouch_protocol-3.0.0/vouch/keys.py +0 -213
  175. vouch_protocol-3.0.0/vouch/kms.py +0 -518
  176. vouch_protocol-3.0.0/vouch/multikey.py +0 -123
  177. vouch_protocol-3.0.0/vouch/nonce.py +0 -216
  178. vouch_protocol-3.0.0/vouch/onboard.py +0 -766
  179. vouch_protocol-3.0.0/vouch/recovery.py +0 -218
  180. vouch_protocol-3.0.0/vouch/revocation.py +0 -449
  181. vouch_protocol-3.0.0/vouch/ssrf.py +0 -85
  182. vouch_protocol-3.0.0/vouch/status_list.py +0 -700
  183. vouch_protocol-3.0.0/vouch/status_list_fetcher.py +0 -175
  184. vouch_protocol-3.0.0/vouch/validator_server.py +0 -220
  185. vouch_protocol-3.0.0/vouch/verification.py +0 -422
  186. vouch_protocol-3.0.0/vouch/verifier.py +0 -1018
  187. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/LICENSE +0 -0
  188. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/MANIFEST.in +0 -0
  189. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/setup.cfg +0 -0
  190. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_accountability.py +0 -0
  191. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_agent_enroll.py +0 -0
  192. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_attribution.py +0 -0
  193. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_audit_trail.py +0 -0
  194. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_auditor.py +0 -0
  195. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_authority_state_vectors.py +0 -0
  196. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_behavioral_attestation.py +0 -0
  197. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_budget.py +0 -0
  198. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_c2pa_formats.py +0 -0
  199. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_canary.py +0 -0
  200. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_ccg_demo.py +0 -0
  201. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_cli_init.py +0 -0
  202. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_cli_root.py +0 -0
  203. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_data_integrity.py +0 -0
  204. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_deliberation.py +0 -0
  205. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_disconnected_edge.py +0 -0
  206. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_dtn_pads.py +0 -0
  207. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_examples_robotics.py +0 -0
  208. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_fastapi_credential_gate.py +0 -0
  209. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_grade.py +0 -0
  210. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_halos_evidence.py +0 -0
  211. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_hardware_seam.py +0 -0
  212. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_heartbeat.py +0 -0
  213. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_heartbeat_hardening.py +0 -0
  214. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_hybrid_interop.py +0 -0
  215. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_jcs.py +0 -0
  216. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_mcp_check_trust.py +0 -0
  217. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_media_badge.py +0 -0
  218. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_media_native.py +0 -0
  219. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_merkle.py +0 -0
  220. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_mint_contributor_credential.py +0 -0
  221. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_orbital_accumulator.py +0 -0
  222. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_proof_of_integration.py +0 -0
  223. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_provenance.py +0 -0
  224. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_quorum.py +0 -0
  225. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_reasoning.py +0 -0
  226. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_receipts.py +0 -0
  227. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_reputation.py +0 -0
  228. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_reputation_aggregate.py +0 -0
  229. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_reputation_disputes.py +0 -0
  230. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_reputation_ledger.py +0 -0
  231. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_reputation_policy.py +0 -0
  232. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_reputation_portability.py +0 -0
  233. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_revocation.py +0 -0
  234. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_robot_access.py +0 -0
  235. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_robot_conformance.py +0 -0
  236. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_robot_consent.py +0 -0
  237. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_robot_custody.py +0 -0
  238. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_robot_embodiment.py +0 -0
  239. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_robot_fusion.py +0 -0
  240. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_robot_handover.py +0 -0
  241. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_robot_handshake_blackbox_passport.py +0 -0
  242. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_robot_identity.py +0 -0
  243. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_robot_lease_quorum.py +0 -0
  244. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_robot_lifecycle.py +0 -0
  245. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_robot_liveness_revocation.py +0 -0
  246. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_robot_odd.py +0 -0
  247. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_robot_perception.py +0 -0
  248. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_robot_pq.py +0 -0
  249. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_robot_provenance_capability.py +0 -0
  250. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_robot_root_identity.py +0 -0
  251. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_robot_safety_record.py +0 -0
  252. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_robot_swarm.py +0 -0
  253. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_robot_teleop.py +0 -0
  254. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_robot_wear.py +0 -0
  255. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_root_of_trust.py +0 -0
  256. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_root_of_trust_vectors.py +0 -0
  257. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_ros2_action_gate.py +0 -0
  258. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_runtime_vectors.py +0 -0
  259. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_scan.py +0 -0
  260. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_secure_key_custody.py +0 -0
  261. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_security_hardening.py +0 -0
  262. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_shield_guard.py +0 -0
  263. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_shield_rules.py +0 -0
  264. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_shield_vectors.py +0 -0
  265. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_signer_vc.py +0 -0
  266. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_threshold.py +0 -0
  267. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_threshold_loader.py +0 -0
  268. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_tool_registry.py +0 -0
  269. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_transparency.py +0 -0
  270. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_transport.py +0 -0
  271. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_transport_http_rendezvous.py +0 -0
  272. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_transport_rendezvous.py +0 -0
  273. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_transport_udna_sdk.py +0 -0
  274. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_trifecta.py +0 -0
  275. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_trust_entropy.py +0 -0
  276. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/tests/test_vc.py +0 -0
  277. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/attribution.py +0 -0
  278. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/attribution_cli.py +0 -0
  279. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/audio.py +0 -0
  280. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/audit_trail.py +0 -0
  281. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/auditor.py +0 -0
  282. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/behavioral_attestation.py +0 -0
  283. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/bridge/__init__.py +0 -0
  284. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/bridge/audio_routes.py +0 -0
  285. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/bridge/config.py +0 -0
  286. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/budget.py +0 -0
  287. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/canary.py +0 -0
  288. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/config.py +0 -0
  289. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/credential.py +0 -0
  290. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/integrations/adk.py +0 -0
  291. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/integrations/amnesia.py +0 -0
  292. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/integrations/autogen/__init__.py +0 -0
  293. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/integrations/autogpt/__init__.py +0 -0
  294. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/integrations/autogpt/commands.py +0 -0
  295. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/integrations/claude-code/settings.hooks.json +0 -0
  296. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/integrations/crewai/__init__.py +0 -0
  297. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/integrations/crewai/tool.py +0 -0
  298. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/integrations/google.py +0 -0
  299. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/integrations/goose.py +0 -0
  300. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/integrations/hasura/__init__.py +0 -0
  301. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/integrations/langchain/__init__.py +0 -0
  302. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/integrations/langchain/tool.py +0 -0
  303. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/integrations/langgraph.py +0 -0
  304. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/integrations/mcp/__init__.py +0 -0
  305. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/integrations/n8n.py +0 -0
  306. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/integrations/openai.py +0 -0
  307. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/integrations/streamlit/__init__.py +0 -0
  308. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/integrations/streamlit/seal.py +0 -0
  309. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/integrations/vertex_ai/__init__.py +0 -0
  310. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/keystore.py +0 -0
  311. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/mcp/__init__.py +0 -0
  312. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/media/__init__.py +0 -0
  313. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/media/badge.py +0 -0
  314. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/media/c2pa.py +0 -0
  315. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/media/native.py +0 -0
  316. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/merkle.py +0 -0
  317. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/metrics.py +0 -0
  318. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/proof_of_integration.py +0 -0
  319. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/provenance.py +0 -0
  320. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/quorum.py +0 -0
  321. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/registry.py +0 -0
  322. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/reputation_aggregate.py +0 -0
  323. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/reputation_disputes.py +0 -0
  324. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/reputation_ledger.py +0 -0
  325. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/reputation_portability.py +0 -0
  326. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/__init__.py +0 -0
  327. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/_signing.py +0 -0
  328. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/_verify.py +0 -0
  329. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/access.py +0 -0
  330. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/accumulator.py +0 -0
  331. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/blackbox.py +0 -0
  332. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/bundle.py +0 -0
  333. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/capability.py +0 -0
  334. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/conformance.py +0 -0
  335. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/consent.py +0 -0
  336. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/custody.py +0 -0
  337. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/dtn_revocation.py +0 -0
  338. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/edge_trust.py +0 -0
  339. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/embodiment.py +0 -0
  340. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/freshness.py +0 -0
  341. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/fusion.py +0 -0
  342. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/geoscope.py +0 -0
  343. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/halos.py +0 -0
  344. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/handover.py +0 -0
  345. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/handshake.py +0 -0
  346. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/hardware.py +0 -0
  347. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/identity.py +0 -0
  348. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/lease.py +0 -0
  349. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/lifecycle.py +0 -0
  350. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/liveness.py +0 -0
  351. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/localization.py +0 -0
  352. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/odd.py +0 -0
  353. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/orbital.py +0 -0
  354. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/passport.py +0 -0
  355. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/perception.py +0 -0
  356. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/perception_consensus.py +0 -0
  357. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/physical_quorum.py +0 -0
  358. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/pq.py +0 -0
  359. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/presence.py +0 -0
  360. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/provenance.py +0 -0
  361. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/quorum_trust.py +0 -0
  362. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/revocation.py +0 -0
  363. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/root_identity.py +0 -0
  364. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/safety_record.py +0 -0
  365. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/swarm.py +0 -0
  366. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/teleop.py +0 -0
  367. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/robotics/wear.py +0 -0
  368. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/scan/__init__.py +0 -0
  369. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/scan/detector.py +0 -0
  370. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/scan/patterns.py +0 -0
  371. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/seal.py +0 -0
  372. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/shield/__init__.py +0 -0
  373. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/shield/demo.py +0 -0
  374. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/shield/flight_recorder.py +0 -0
  375. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/shield/rules.py +0 -0
  376. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/shield/shield.py +0 -0
  377. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/shield/trust_registry.py +0 -0
  378. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/threshold.py +0 -0
  379. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/tool_registry.py +0 -0
  380. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/transparency.py +0 -0
  381. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/transport/__init__.py +0 -0
  382. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/transport/base.py +0 -0
  383. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/transport/envelope.py +0 -0
  384. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/transport/http_rendezvous.py +0 -0
  385. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/transport/http_transport.py +0 -0
  386. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/transport/manager.py +0 -0
  387. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/transport/udna.py +0 -0
  388. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch/trifecta.py +0 -0
  389. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch_protocol.egg-info/dependency_links.txt +0 -0
  390. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch_protocol.egg-info/entry_points.txt +0 -0
  391. {vouch_protocol-3.0.0 → vouch_protocol-3.1.0}/vouch_protocol.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vouch-protocol
3
- Version: 3.0.0
3
+ Version: 3.1.0
4
4
  Summary: The Identity & Reputation Standard for AI Agents
5
5
  Author-email: Vouch Protocol Contributors <hello@vouch-protocol.com>
6
6
  License: Apache License 2.0
@@ -204,7 +204,7 @@ License: Apache License 2.0
204
204
 
205
205
  Project-URL: Homepage, https://github.com/vouch-protocol/vouch
206
206
  Project-URL: Bug Tracker, https://github.com/vouch-protocol/vouch/issues
207
- Project-URL: Documentation, https://vouch-protocol.com
207
+ Project-URL: Documentation, https://vouch-protocol.org
208
208
  Keywords: ai,agents,identity,cryptography,did,verifiable-credentials
209
209
  Classifier: Development Status :: 4 - Beta
210
210
  Classifier: Intended Audience :: Developers
@@ -248,11 +248,9 @@ Provides-Extra: enterprise
248
248
  Requires-Dist: redis>=5.0.0; extra == "enterprise"
249
249
  Requires-Dist: prometheus-client>=0.17.0; extra == "enterprise"
250
250
  Provides-Extra: aws
251
- Requires-Dist: aioboto3>=12.0.0; extra == "aws"
251
+ Requires-Dist: boto3>=1.40.0; extra == "aws"
252
252
  Provides-Extra: gcp
253
- Requires-Dist: google-cloud-kms>=2.0.0; extra == "gcp"
254
- Provides-Extra: azure
255
- Requires-Dist: azure-keyvault-keys>=4.0.0; extra == "azure"
253
+ Requires-Dist: google-cloud-kms>=3.0.0; extra == "gcp"
256
254
  Provides-Extra: pq
257
255
  Provides-Extra: udna
258
256
  Requires-Dist: sirraya-udna-sdk>=1.0.3; extra == "udna"
@@ -327,7 +325,7 @@ Dynamic: license-file
327
325
 
328
326
  ```bash
329
327
  # Install (Linux and macOS). On Windows, use: pip install vouch-protocol
330
- curl -fsSL https://vouch-protocol.com/install.sh | sh
328
+ curl -fsSL https://vouch-protocol.org/install.sh | sh
331
329
 
332
330
  # Run vouch with no arguments and pick what you want to do
333
331
  vouch
@@ -373,9 +371,12 @@ Credentials are issued with `Signer.sign()` and checked with `Verifier.verify()`
373
371
  Vouch is not one tool, it is a set of them. Here is the whole map.
374
372
 
375
373
  ### On the command line
376
- - **`vouch init`** generate an agent identity (a DID and keypair).
374
+ - **`vouch init`** generate an agent identity (a DID, an Ed25519 key and a post-quantum key).
377
375
  - **`vouch sign` / `vouch verify`** sign a payload and verify it.
376
+ - **`vouch sidecar`** run the signing sidecar, which holds your agent's key so the model never has it. The caller chooses how long each credential stays valid. It opens passphrase-locked identities, and `--kms` signs with a key in AWS KMS or Google Cloud KMS.
377
+ - **`vouch validator`** run a heartbeat validator: agents send a signed heartbeat at every interval and get back a short-lived session voucher.
378
378
  - **`vouch git`** sign every git commit cryptographically, set up in one command, with a verified badge for your README.
379
+ - **`vouch run`** start an agent inside a file-access fence on Linux: `vouch run -- python agent.py`. The kernel lets it reach its workspace and the paths you list, and keeps your keys out of its reach. See [Fenced runs](docs/fenced-run.md).
379
380
  - **`vouch scan`** find leaked Vouch key material in your code before it ships (a private key in a file, a seed in an env var, a DID document that accidentally carries a private key).
380
381
  - **`vouch attribute`** separate who wrote which line. When an AI assistant and a human both edit a file, this records the AI's lines under the AI's own key and your lines under yours, so when a line causes an incident you can prove which of you wrote it. See [the Claude Code integration](vouch/integrations/claude-code/README.md).
381
382
  - **`vouch media`** sign images, with C2PA support.
@@ -453,7 +454,7 @@ AI agents are making real-world API calls with **ZERO cryptographic proof** of:
453
454
  - **Human-readable JSON** (proof attaches as a sibling object, no Base64-wrapped opaque payload)
454
455
  - **Framework-agnostic** (works with MCP, LangChain, CrewAI, AutoGPT, AutoGen, Vertex AI)
455
456
  - **Cross-language interop** (Python, TypeScript, Go, byte-identical canonical form)
456
- - **Open source** (Apache 2.0 license, CC0 prior-art portfolio)
457
+ - **Open source** (Apache 2.0 license, with a public portfolio of defensive prior-art disclosures)
457
458
 
458
459
  **Think of it as:**
459
460
  - SSL certificate = Proves website identity
@@ -535,7 +536,7 @@ flowchart TB
535
536
  ### 1. Install
536
537
  ```bash
537
538
  # Linux and macOS: one line
538
- curl -fsSL https://vouch-protocol.com/install.sh | sh
539
+ curl -fsSL https://vouch-protocol.org/install.sh | sh
539
540
 
540
541
  # Or with pip (any platform)
541
542
  pip install vouch-protocol
@@ -617,7 +618,8 @@ Works with all major AI frameworks out-of-the-box:
617
618
 
618
619
  - **Key Rotation**: automatic rotating keys for production
619
620
  - **Voice AI Signing**: sign audio frames in real-time
620
- - **Cloud KMS**: AWS KMS, GCP Cloud KMS, Azure Key Vault
621
+ - **Cloud keys**: Ed25519 keys in AWS KMS and Google Cloud KMS sign credentials, and the private key never leaves the service (`vouch sidecar --kms`). Azure Key Vault does not offer Ed25519 keys
622
+ - **Heartbeat validator service**: `vouch validator` runs a heartbeat validator that renews agent sessions, with a container image and a Kubernetes manifest
621
623
  - **Reputation Scoring**: track agent behavior over time
622
624
  - **Revocation Registry**: blacklist compromised keys
623
625
  - **Redis Caching**: production-scale verification
@@ -659,7 +661,7 @@ agent.sign({'action': 'read_customer_data', 'customer_id': 'cust_abc'})
659
661
  agent.sign({'action': 'access_phi', 'patient_id': '12345'})
660
662
  ```
661
663
 
662
- To keep this space free from patent capture, the project publishes **61 defensive prior-art disclosures** under CC0, covering cryptographic identity, media provenance, voice biometrics, AI safety, post-quantum cryptography, AI coding governance, and per-region human-or-AI code authorship. See [docs/disclosures](docs/disclosures/README.md).
664
+ To keep this space free from patent capture, the project publishes **more than 130 defensive prior-art disclosures**, covering cryptographic identity, media provenance, voice biometrics, AI safety, post-quantum cryptography, AI coding governance, per-region human-or-AI code authorship, robotics, delegation, and operating system enforcement. See [docs/disclosures](docs/disclosures/README.md).
663
665
 
664
666
  ---
665
667
 
@@ -682,7 +684,7 @@ To keep this space free from patent capture, the project publishes **61 defensiv
682
684
  - [Protocol Specification (developer guide)](https://github.com/vouch-protocol/vouch/blob/main/docs/vouch_guide.md)
683
685
  - [Integration Guides](https://github.com/vouch-protocol/vouch/tree/main/vouch/integrations)
684
686
  - [Threat Model and Security Considerations](https://github.com/vouch-protocol/vouch/blob/main/docs/THREAT_MODEL.md)
685
- - [Defensive Prior Art Disclosures (61 PADs, CC0)](https://github.com/vouch-protocol/vouch/tree/main/docs/disclosures)
687
+ - [Defensive Prior Art Disclosures (more than 130 PADs)](https://github.com/vouch-protocol/vouch/tree/main/docs/disclosures)
686
688
  - [FAQ and Discussions](https://github.com/vouch-protocol/vouch/discussions)
687
689
 
688
690
  ---
@@ -704,7 +706,7 @@ To keep this space free from patent capture, the project publishes **61 defensiv
704
706
  - [x] **Post-quantum profile** (`eddsa-jcs-2022` + `mldsa44-jcs-2024` proof set, NIST CNSA 2.0 / NSM-10 aligned)
705
707
  - [x] **Three-language reference implementation** (Python, TypeScript, Go) with byte-identical canonical form via RFC 8785 JCS, verified against shared test vectors
706
708
  - [x] **Specification drafted** and submitted to the open standards group for incubation
707
- - [x] **55 Prior Art Disclosures** (CC0 defensive publications)
709
+ - [x] **More than 130 Prior Art Disclosures** (defensive publications)
708
710
  - [x] Identity Sidecar architecture (LLM-isolated keys)
709
711
  - [x] Heartbeat Protocol with adaptive Trust Entropy
710
712
  - [x] Resource-bound delegation chains with capability narrowing
@@ -740,7 +742,7 @@ To keep this space free from patent capture, the project publishes **61 defensiv
740
742
 
741
743
  You can use this freely in commercial and open-source projects.
742
744
 
743
- The 61 defensive prior-art disclosures are released under **CC0 1.0 Universal** to ensure ecosystem freedom from patent capture.
745
+ The defensive prior-art disclosures in `docs/disclosures` are published to keep these methods free from patent capture. They are dedicated to the public domain under **CC0 1.0 Universal**, so anyone may copy, quote and build on them without asking.
744
746
 
745
747
  *The Vouch Protocol specification is being developed as a open standard submission via the open standards group. The implementation is also being proposed to the Linux Foundation's AI & Data Foundation.*
746
748
 
@@ -792,7 +794,7 @@ Thanks goes to these wonderful people. This section is maintained automatically
792
794
 
793
795
  ## Prior Art Disclosures
794
796
 
795
- To ensure ecosystem freedom, we publish **55 defensive prior art disclosures** (CC0 public domain) covering novel methods across cryptographic identity, media provenance, voice biometrics, AI safety, post-quantum cryptography, AI coding assistant governance, and content authenticity:
797
+ To ensure ecosystem freedom, we publish **more than 130 defensive prior art disclosures** covering novel methods across cryptographic identity, media provenance, voice biometrics, AI safety, post-quantum cryptography, AI coding assistant governance, and content authenticity. The first 55 are listed below. The full list is in [docs/disclosures](docs/disclosures/README.md):
796
798
 
797
799
  | ID | Title | Category |
798
800
  |----|-------|----------|
@@ -37,7 +37,7 @@
37
37
 
38
38
  ```bash
39
39
  # Install (Linux and macOS). On Windows, use: pip install vouch-protocol
40
- curl -fsSL https://vouch-protocol.com/install.sh | sh
40
+ curl -fsSL https://vouch-protocol.org/install.sh | sh
41
41
 
42
42
  # Run vouch with no arguments and pick what you want to do
43
43
  vouch
@@ -83,9 +83,12 @@ Credentials are issued with `Signer.sign()` and checked with `Verifier.verify()`
83
83
  Vouch is not one tool, it is a set of them. Here is the whole map.
84
84
 
85
85
  ### On the command line
86
- - **`vouch init`** generate an agent identity (a DID and keypair).
86
+ - **`vouch init`** generate an agent identity (a DID, an Ed25519 key and a post-quantum key).
87
87
  - **`vouch sign` / `vouch verify`** sign a payload and verify it.
88
+ - **`vouch sidecar`** run the signing sidecar, which holds your agent's key so the model never has it. The caller chooses how long each credential stays valid. It opens passphrase-locked identities, and `--kms` signs with a key in AWS KMS or Google Cloud KMS.
89
+ - **`vouch validator`** run a heartbeat validator: agents send a signed heartbeat at every interval and get back a short-lived session voucher.
88
90
  - **`vouch git`** sign every git commit cryptographically, set up in one command, with a verified badge for your README.
91
+ - **`vouch run`** start an agent inside a file-access fence on Linux: `vouch run -- python agent.py`. The kernel lets it reach its workspace and the paths you list, and keeps your keys out of its reach. See [Fenced runs](docs/fenced-run.md).
89
92
  - **`vouch scan`** find leaked Vouch key material in your code before it ships (a private key in a file, a seed in an env var, a DID document that accidentally carries a private key).
90
93
  - **`vouch attribute`** separate who wrote which line. When an AI assistant and a human both edit a file, this records the AI's lines under the AI's own key and your lines under yours, so when a line causes an incident you can prove which of you wrote it. See [the Claude Code integration](vouch/integrations/claude-code/README.md).
91
94
  - **`vouch media`** sign images, with C2PA support.
@@ -163,7 +166,7 @@ AI agents are making real-world API calls with **ZERO cryptographic proof** of:
163
166
  - **Human-readable JSON** (proof attaches as a sibling object, no Base64-wrapped opaque payload)
164
167
  - **Framework-agnostic** (works with MCP, LangChain, CrewAI, AutoGPT, AutoGen, Vertex AI)
165
168
  - **Cross-language interop** (Python, TypeScript, Go, byte-identical canonical form)
166
- - **Open source** (Apache 2.0 license, CC0 prior-art portfolio)
169
+ - **Open source** (Apache 2.0 license, with a public portfolio of defensive prior-art disclosures)
167
170
 
168
171
  **Think of it as:**
169
172
  - SSL certificate = Proves website identity
@@ -245,7 +248,7 @@ flowchart TB
245
248
  ### 1. Install
246
249
  ```bash
247
250
  # Linux and macOS: one line
248
- curl -fsSL https://vouch-protocol.com/install.sh | sh
251
+ curl -fsSL https://vouch-protocol.org/install.sh | sh
249
252
 
250
253
  # Or with pip (any platform)
251
254
  pip install vouch-protocol
@@ -327,7 +330,8 @@ Works with all major AI frameworks out-of-the-box:
327
330
 
328
331
  - **Key Rotation**: automatic rotating keys for production
329
332
  - **Voice AI Signing**: sign audio frames in real-time
330
- - **Cloud KMS**: AWS KMS, GCP Cloud KMS, Azure Key Vault
333
+ - **Cloud keys**: Ed25519 keys in AWS KMS and Google Cloud KMS sign credentials, and the private key never leaves the service (`vouch sidecar --kms`). Azure Key Vault does not offer Ed25519 keys
334
+ - **Heartbeat validator service**: `vouch validator` runs a heartbeat validator that renews agent sessions, with a container image and a Kubernetes manifest
331
335
  - **Reputation Scoring**: track agent behavior over time
332
336
  - **Revocation Registry**: blacklist compromised keys
333
337
  - **Redis Caching**: production-scale verification
@@ -369,7 +373,7 @@ agent.sign({'action': 'read_customer_data', 'customer_id': 'cust_abc'})
369
373
  agent.sign({'action': 'access_phi', 'patient_id': '12345'})
370
374
  ```
371
375
 
372
- To keep this space free from patent capture, the project publishes **61 defensive prior-art disclosures** under CC0, covering cryptographic identity, media provenance, voice biometrics, AI safety, post-quantum cryptography, AI coding governance, and per-region human-or-AI code authorship. See [docs/disclosures](docs/disclosures/README.md).
376
+ To keep this space free from patent capture, the project publishes **more than 130 defensive prior-art disclosures**, covering cryptographic identity, media provenance, voice biometrics, AI safety, post-quantum cryptography, AI coding governance, per-region human-or-AI code authorship, robotics, delegation, and operating system enforcement. See [docs/disclosures](docs/disclosures/README.md).
373
377
 
374
378
  ---
375
379
 
@@ -392,7 +396,7 @@ To keep this space free from patent capture, the project publishes **61 defensiv
392
396
  - [Protocol Specification (developer guide)](https://github.com/vouch-protocol/vouch/blob/main/docs/vouch_guide.md)
393
397
  - [Integration Guides](https://github.com/vouch-protocol/vouch/tree/main/vouch/integrations)
394
398
  - [Threat Model and Security Considerations](https://github.com/vouch-protocol/vouch/blob/main/docs/THREAT_MODEL.md)
395
- - [Defensive Prior Art Disclosures (61 PADs, CC0)](https://github.com/vouch-protocol/vouch/tree/main/docs/disclosures)
399
+ - [Defensive Prior Art Disclosures (more than 130 PADs)](https://github.com/vouch-protocol/vouch/tree/main/docs/disclosures)
396
400
  - [FAQ and Discussions](https://github.com/vouch-protocol/vouch/discussions)
397
401
 
398
402
  ---
@@ -414,7 +418,7 @@ To keep this space free from patent capture, the project publishes **61 defensiv
414
418
  - [x] **Post-quantum profile** (`eddsa-jcs-2022` + `mldsa44-jcs-2024` proof set, NIST CNSA 2.0 / NSM-10 aligned)
415
419
  - [x] **Three-language reference implementation** (Python, TypeScript, Go) with byte-identical canonical form via RFC 8785 JCS, verified against shared test vectors
416
420
  - [x] **Specification drafted** and submitted to the open standards group for incubation
417
- - [x] **55 Prior Art Disclosures** (CC0 defensive publications)
421
+ - [x] **More than 130 Prior Art Disclosures** (defensive publications)
418
422
  - [x] Identity Sidecar architecture (LLM-isolated keys)
419
423
  - [x] Heartbeat Protocol with adaptive Trust Entropy
420
424
  - [x] Resource-bound delegation chains with capability narrowing
@@ -450,7 +454,7 @@ To keep this space free from patent capture, the project publishes **61 defensiv
450
454
 
451
455
  You can use this freely in commercial and open-source projects.
452
456
 
453
- The 61 defensive prior-art disclosures are released under **CC0 1.0 Universal** to ensure ecosystem freedom from patent capture.
457
+ The defensive prior-art disclosures in `docs/disclosures` are published to keep these methods free from patent capture. They are dedicated to the public domain under **CC0 1.0 Universal**, so anyone may copy, quote and build on them without asking.
454
458
 
455
459
  *The Vouch Protocol specification is being developed as a open standard submission via the open standards group. The implementation is also being proposed to the Linux Foundation's AI & Data Foundation.*
456
460
 
@@ -502,7 +506,7 @@ Thanks goes to these wonderful people. This section is maintained automatically
502
506
 
503
507
  ## Prior Art Disclosures
504
508
 
505
- To ensure ecosystem freedom, we publish **55 defensive prior art disclosures** (CC0 public domain) covering novel methods across cryptographic identity, media provenance, voice biometrics, AI safety, post-quantum cryptography, AI coding assistant governance, and content authenticity:
509
+ To ensure ecosystem freedom, we publish **more than 130 defensive prior art disclosures** covering novel methods across cryptographic identity, media provenance, voice biometrics, AI safety, post-quantum cryptography, AI coding assistant governance, and content authenticity. The first 55 are listed below. The full list is in [docs/disclosures](docs/disclosures/README.md):
506
510
 
507
511
  | ID | Title | Category |
508
512
  |----|-------|----------|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "vouch-protocol"
7
- version = "3.0.0"
7
+ version = "3.1.0"
8
8
  description = "The Identity & Reputation Standard for AI Agents"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -69,10 +69,10 @@ enterprise = [
69
69
  "prometheus-client>=0.17.0",
70
70
  ]
71
71
 
72
- # Cloud KMS integrations
73
- aws = ["aioboto3>=12.0.0"]
74
- gcp = ["google-cloud-kms>=2.0.0"]
75
- azure = ["azure-keyvault-keys>=4.0.0"]
72
+ # Cloud KMS integrations: Ed25519 keys in AWS KMS or Google Cloud KMS.
73
+ # (Azure Key Vault has no Ed25519 keys, so it has no extra.)
74
+ aws = ["boto3>=1.40.0"]
75
+ gcp = ["google-cloud-kms>=3.0.0"]
76
76
 
77
77
  # The post-quantum profile is bundled by default (see required
78
78
  # `dependencies` above). The `pq` extra is retained as a no-op alias so
@@ -139,7 +139,7 @@ all = [
139
139
  [project.urls]
140
140
  "Homepage" = "https://github.com/vouch-protocol/vouch"
141
141
  "Bug Tracker" = "https://github.com/vouch-protocol/vouch/issues"
142
- "Documentation" = "https://vouch-protocol.com"
142
+ "Documentation" = "https://vouch-protocol.org"
143
143
 
144
144
  [project.scripts]
145
145
  vouch = "vouch.cli:main"
@@ -0,0 +1,122 @@
1
+ """The Agent Trust Index sweep: one hostile domain never stops it, and one card
2
+ naming thousands of DIDs never holds a worker for hours."""
3
+
4
+ import json
5
+ import os
6
+ import sys
7
+
8
+ import pytest
9
+
10
+ sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)), "agent-trust-index"))
11
+ from ati import core # noqa: E402
12
+
13
+ from vouch import grade # noqa: E402
14
+
15
+
16
+ def test_a_domain_that_raises_records_no_signals(monkeypatch, capsys):
17
+ def explode(domain, timeout=5):
18
+ raise RecursionError("maximum recursion depth exceeded")
19
+
20
+ monkeypatch.setattr(grade, "inspect_domain", explode)
21
+ assert core.resolve_domain("hostile.test") == grade.empty_signals()
22
+ assert "warning: hostile.test: RecursionError" in capsys.readouterr().err
23
+
24
+
25
+ def test_one_hostile_domain_does_not_stop_the_sweep(monkeypatch):
26
+ def inspect(domain, timeout=5):
27
+ if domain == "hostile.test":
28
+ raise OverflowError("date value out of range")
29
+ sig = grade.empty_signals()
30
+ sig.update(has_did=True, has_verification_method=True, did=f"did:web:{domain}")
31
+ return sig, []
32
+
33
+ monkeypatch.setattr(grade, "inspect_domain", inspect)
34
+ monkeypatch.setattr(
35
+ core,
36
+ "fetch_servers",
37
+ lambda max_servers: [
38
+ core.AgentRecord(name="good", title="", description="", domains=["good.test"]),
39
+ core.AgentRecord(name="hostile", title="", description="", domains=["hostile.test"]),
40
+ ],
41
+ )
42
+ results = {r["name"]: r for r in core.run(workers=2)}
43
+ assert results["good"]["signals"]["has_did"] is True
44
+ assert results["hostile"]["signals"]["has_did"] is False
45
+
46
+
47
+ def _card_naming(count):
48
+ return {"agents": [f"did:web:agent{i}.example" for i in range(count)]}
49
+
50
+
51
+ def test_at_most_ten_dids_from_one_card_are_checked(monkeypatch):
52
+ checked = []
53
+ monkeypatch.setattr(core, "_resolve_declared_did", lambda did, sig: checked.append(did))
54
+ monkeypatch.setattr(
55
+ grade,
56
+ "inspect_domain",
57
+ lambda domain, timeout=5: (grade.empty_signals(), [_card_naming(5000)]),
58
+ )
59
+ sig = core.resolve_domain("many.test")
60
+ assert checked == [f"did:web:agent{i}.example" for i in range(core.MAX_DIDS_PER_CARD)]
61
+ assert sig["reasons"]["declared_dids"] == (
62
+ "checked the first 10 of the 5000 DIDs an agent card names"
63
+ )
64
+
65
+
66
+ def test_a_card_within_the_cap_is_checked_in_full(monkeypatch):
67
+ checked = []
68
+ monkeypatch.setattr(core, "_resolve_declared_did", lambda did, sig: checked.append(did))
69
+ card = _card_naming(3)
70
+ card["self"] = "did:web:few.test" # the bare domain DID is not counted
71
+ monkeypatch.setattr(
72
+ grade, "inspect_domain", lambda domain, timeout=5: (grade.empty_signals(), [card])
73
+ )
74
+ sig = core.resolve_domain("few.test")
75
+ assert len(checked) == 3 and "declared_dids" not in sig["reasons"]
76
+
77
+
78
+ def test_the_cap_is_noted_in_the_sweep_result(monkeypatch):
79
+ monkeypatch.setattr(core, "_resolve_declared_did", lambda did, sig: None)
80
+ monkeypatch.setattr(
81
+ grade,
82
+ "inspect_domain",
83
+ lambda domain, timeout=5: (grade.empty_signals(), [_card_naming(50)]),
84
+ )
85
+ monkeypatch.setattr(
86
+ core,
87
+ "fetch_servers",
88
+ lambda max_servers: [
89
+ core.AgentRecord(name="many", title="", description="", domains=["many.test"])
90
+ ],
91
+ )
92
+ (result,) = core.run(workers=1)
93
+ assert "first 10 of the 50" in result["signals"]["reasons"]["declared_dids"]
94
+ json.dumps(result) # the record is still plain JSON
95
+
96
+
97
+ @pytest.mark.parametrize("count", [0, 1, 10, 11])
98
+ def test_cap_boundaries(monkeypatch, count):
99
+ checked = []
100
+ monkeypatch.setattr(core, "_resolve_declared_did", lambda did, sig: checked.append(did))
101
+ monkeypatch.setattr(
102
+ grade,
103
+ "inspect_domain",
104
+ lambda domain, timeout=5: (grade.empty_signals(), [_card_naming(count)]),
105
+ )
106
+ sig = core.resolve_domain("edge.test")
107
+ assert len(checked) == min(count, core.MAX_DIDS_PER_CARD)
108
+ assert ("declared_dids" in sig["reasons"]) == (count > core.MAX_DIDS_PER_CARD)
109
+
110
+
111
+ def test_a_card_too_deep_to_search_is_passed_over(monkeypatch):
112
+ deep = []
113
+ for _ in range(3000):
114
+ deep = [deep]
115
+ checked = []
116
+ monkeypatch.setattr(core, "_resolve_declared_did", lambda did, sig: checked.append(did))
117
+ cards = [{"x": deep}, _card_naming(2)]
118
+ monkeypatch.setattr(
119
+ grade, "inspect_domain", lambda domain, timeout=5: (grade.empty_signals(), cards)
120
+ )
121
+ core.resolve_domain("deep.test")
122
+ assert len(checked) == 2 # the next card is still searched
@@ -148,6 +148,7 @@ class TestAudioAuth:
148
148
 
149
149
  class TestAudioEmbed:
150
150
  def test_embed_invalid_base64(self):
151
+ pytest.importorskip("numpy")
151
152
  resp = client.post(
152
153
  "/audio/embed",
153
154
  json={
@@ -162,6 +163,7 @@ class TestAudioEmbed:
162
163
  assert "base64" in data["error"].lower() or "invalid" in data["error"].lower()
163
164
 
164
165
  def test_embed_too_small(self):
166
+ pytest.importorskip("numpy")
165
167
  tiny = base64.b64encode(b"abc").decode()
166
168
  resp = client.post(
167
169
  "/audio/embed",
@@ -424,6 +424,8 @@ def test_critical_requires_live_cosign(agent_call):
424
424
  signer, cred, voucher, vkey = agent_call
425
425
  pub = signer.get_public_key_multikey()
426
426
  # Even with a current epoch, critical demands a live co-sign.
427
+ # The same credential is checked twice below, so replay protection is
428
+ # off for this comparison.
427
429
  without = verify_agent_call(
428
430
  cred,
429
431
  public_key=pub,
@@ -432,6 +434,7 @@ def test_critical_requires_live_cosign(agent_call):
432
434
  trust_threshold=0.5,
433
435
  consequence=CONSEQUENCE_CRITICAL,
434
436
  last_seen_authority_epoch=5,
437
+ replay_store=False,
435
438
  )
436
439
  assert without.ok is False
437
440
  assert any(r.startswith("live_cosign_required") for r in without.reasons)
@@ -445,6 +448,7 @@ def test_critical_requires_live_cosign(agent_call):
445
448
  consequence=CONSEQUENCE_CRITICAL,
446
449
  last_seen_authority_epoch=5,
447
450
  live_cosign_ok=True,
451
+ replay_store=False,
448
452
  )
449
453
  assert with_cosign.ok is True
450
454
  assert with_cosign.authority_ok is True
@@ -297,8 +297,10 @@ class TestVerifyOneLiner:
297
297
  ok, passport = vouch.verify(cred, public_key=pubkey)
298
298
  assert ok
299
299
  assert passport.intent["action"] == "a"
300
- # JWK form is accepted too
301
- assert vouch.verify(cred, public_key=keypair.public_key_jwk)[0]
300
+ # JWK form is accepted too (the same credential again: replay off)
301
+ assert vouch.verify(cred, public_key=keypair.public_key_jwk, replay_store=False)[0]
302
+ # And by default a second presentation is refused.
303
+ assert vouch.verify(cred, public_key=pubkey).reason == "this credential was already used"
302
304
 
303
305
  def test_verifies_current_credential_by_default(self, env_identity, keypair, pubkey):
304
306
  import vouch
@@ -121,6 +121,12 @@ class TestSign:
121
121
  assert "base64" in data["error"].lower() or "invalid" in data["error"].lower()
122
122
 
123
123
  def test_sign_too_small(self):
124
+ try:
125
+ from vouch.media.c2pa import C2PA_AVAILABLE
126
+ except Exception:
127
+ pytest.skip("media modules not available")
128
+ if not C2PA_AVAILABLE:
129
+ pytest.skip("c2pa-python not available")
124
130
  tiny = base64.b64encode(b"abc").decode()
125
131
  resp = client.post(
126
132
  "/sign",
@@ -161,3 +161,74 @@ class TestMemoryCacheStats:
161
161
 
162
162
  # 2 hits, 2 misses = 50% hit ratio
163
163
  assert cache.hit_ratio == 0.5
164
+
165
+
166
+ class TestTieredCacheTtl:
167
+ """An L2 hit is copied into L1 for no longer than L2 had left."""
168
+
169
+ def _run(self, coro):
170
+ import asyncio
171
+
172
+ return asyncio.run(coro)
173
+
174
+ def test_l1_copy_keeps_l2_remaining_ttl(self):
175
+ from vouch.cache import MemoryCache, TieredCache
176
+
177
+ async def scenario():
178
+ l1, l2 = MemoryCache(default_ttl=300), MemoryCache(default_ttl=300)
179
+ await l2.set("did:web:x", "old-key", ttl=1)
180
+ tc = TieredCache(l1, l2) # type: ignore[arg-type]
181
+ assert await tc.get("did:web:x") == "old-key"
182
+ return l1._cache["did:web:x"].ttl
183
+
184
+ assert self._run(scenario()) <= 1
185
+
186
+ def test_unknown_l2_ttl_is_not_copied(self):
187
+ from vouch.cache import MemoryCache, RedisCache, TieredCache
188
+
189
+ class NoTtlRedis:
190
+ async def get(self, k):
191
+ return b"value"
192
+
193
+ async def pttl(self, k):
194
+ return -1
195
+
196
+ async def scenario():
197
+ l1 = MemoryCache(default_ttl=300)
198
+ tc = TieredCache(l1, RedisCache(NoTtlRedis()))
199
+ assert await tc.get("k") == "value"
200
+ return "k" in l1._cache
201
+
202
+ assert self._run(scenario()) is False
203
+
204
+ def test_redis_remaining_ttl_is_used(self):
205
+ from vouch.cache import MemoryCache, RedisCache, TieredCache
206
+
207
+ class FakeRedis:
208
+ async def get(self, k):
209
+ return b"value"
210
+
211
+ async def pttl(self, k):
212
+ return 2500
213
+
214
+ async def scenario():
215
+ l1 = MemoryCache(default_ttl=300)
216
+ tc = TieredCache(l1, RedisCache(FakeRedis()))
217
+ await tc.get("k")
218
+ return l1._cache["k"].ttl
219
+
220
+ assert self._run(scenario()) == 2.5
221
+
222
+ def test_wall_clock_jump_does_not_extend_or_expire(self, monkeypatch):
223
+ import time as real_time
224
+
225
+ from vouch import cache as cache_mod
226
+ from vouch.cache import MemoryCache
227
+
228
+ async def scenario():
229
+ c = MemoryCache(default_ttl=60)
230
+ await c.set("k", "v")
231
+ monkeypatch.setattr(cache_mod.time, "time", lambda: real_time.monotonic() + 10**6)
232
+ return await c.get("k")
233
+
234
+ assert self._run(scenario()) == "v"
@@ -108,20 +108,20 @@ class TestChainAndAccumulation:
108
108
 
109
109
  def test_all_caveats_satisfied_allows(self):
110
110
  chain, keys, root = self._chain()
111
- assert (
112
- verify_capability(chain, keys.get, {"shipped": True, "amount": 120}, root_issuer=root)
113
- is None
114
- )
111
+ ctx = {"action": "refund", "resource": "usd:<=200", "shipped": True, "amount": 120}
112
+ assert verify_capability(chain, keys.get, ctx, root_issuer=root) is None
115
113
 
116
114
  def test_ancestor_caveat_binds_descendant(self):
117
115
  chain, keys, root = self._chain()
118
116
  # 'shipped-only' came from the STORE (root); it still blocks the agent.
119
- r = verify_capability(chain, keys.get, {"shipped": False, "amount": 120}, root_issuer=root)
117
+ ctx = {"action": "refund", "resource": "usd:<=200", "shipped": False, "amount": 120}
118
+ r = verify_capability(chain, keys.get, ctx, root_issuer=root)
120
119
  assert r == "caveat_denied:shipped-only"
121
120
 
122
121
  def test_own_caveat_blocks(self):
123
122
  chain, keys, root = self._chain()
124
- r = verify_capability(chain, keys.get, {"shipped": True, "amount": 5000}, root_issuer=root)
123
+ ctx = {"action": "refund", "resource": "usd:<=200", "shipped": True, "amount": 5000}
124
+ r = verify_capability(chain, keys.get, ctx, root_issuer=root)
125
125
  assert r == "caveat_denied:under-200"
126
126
 
127
127
  def test_non_removal_via_root_check(self):
@@ -159,15 +159,35 @@ class TestChainAndAccumulation:
159
159
 
160
160
  def test_budget_exceeded(self):
161
161
  chain, keys, root = self._chain()
162
- r = verify_capability(
163
- chain, keys.get, {"shipped": True, "amount": 120}, root_issuer=root, max_caveats=1
164
- )
162
+ ctx = {"action": "refund", "resource": "usd:<=200", "shipped": True, "amount": 120}
163
+ r = verify_capability(chain, keys.get, ctx, root_issuer=root, max_caveats=1)
165
164
  assert r == REASON_BUDGET_EXCEEDED
166
165
 
167
166
  def test_empty_chain_rejected(self):
168
167
  with pytest.raises(CaveatError):
169
168
  verify_capability([], {}.get, {})
170
169
 
170
+ def test_a_trusted_start_is_required(self):
171
+ from vouch.caveats import REASON_UNTRUSTED_START
172
+
173
+ chain, keys, root = self._chain()
174
+ ctx = {"action": "refund", "resource": "usd:<=200", "shipped": True, "amount": 120}
175
+ assert verify_capability(chain, keys.get, ctx) == REASON_UNTRUSTED_START
176
+ assert verify_capability([chain[1]], keys.get, ctx) == REASON_UNTRUSTED_START
177
+ assert verify_capability(chain, keys.get, ctx, trusted_roots=[root]) is None
178
+ assert verify_capability(chain, keys.get, ctx, trusted_roots=[]) == REASON_UNTRUSTED_START
179
+ assert verify_capability([chain[1]], keys.get, ctx, trusted_roots=[root]) == REASON_UNROOTED
180
+
181
+ def test_context_must_name_what_the_chain_constrains(self):
182
+ chain, keys, root = self._chain()
183
+ for missing, ctx in (
184
+ ("action", {"resource": "usd:<=200", "shipped": True, "amount": 1}),
185
+ ("resource", {"action": "refund", "shipped": True, "amount": 1}),
186
+ ):
187
+ assert verify_capability(chain, keys.get, ctx, root_issuer=root) == (
188
+ f"context_missing:{missing}"
189
+ )
190
+
171
191
 
172
192
  # ---------------------------------------------------------------------------
173
193
  # Linkage, narrowing, expiry, and revocation of capability links
@@ -257,7 +277,12 @@ class TestLinkSecurity:
257
277
  # The builder clamps the child to its parent's window ...
258
278
  assert child["validUntil"] <= root["validUntil"]
259
279
  assert (
260
- verify_capability([root, child], keys.get, {"amount": 10}, root_issuer=store.get_did())
280
+ verify_capability(
281
+ [root, child],
282
+ keys.get,
283
+ {"action": "refund", "amount": 10},
284
+ root_issuer=store.get_did(),
285
+ )
261
286
  is None
262
287
  )
263
288
 
@@ -270,7 +295,7 @@ class TestLinkSecurity:
270
295
  mgr, to=agent.get_did(), attenuation={"action": "refund"}, parent=root
271
296
  )
272
297
  chain = [root, child]
273
- ctx = {"amount": 10}
298
+ ctx = {"action": "refund", "amount": 10}
274
299
  assert verify_capability(chain, keys.get, ctx, root_issuer=store.get_did()) is None
275
300
  assert (
276
301
  verify_capability(