btp-guard 1.0.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 (542) hide show
  1. btp_guard-1.0.0/LICENSE +21 -0
  2. btp_guard-1.0.0/PKG-INFO +224 -0
  3. btp_guard-1.0.0/README.md +190 -0
  4. btp_guard-1.0.0/btp_guard.egg-info/PKG-INFO +224 -0
  5. btp_guard-1.0.0/btp_guard.egg-info/SOURCES.txt +940 -0
  6. btp_guard-1.0.0/btp_guard.egg-info/dependency_links.txt +1 -0
  7. btp_guard-1.0.0/btp_guard.egg-info/entry_points.txt +4 -0
  8. btp_guard-1.0.0/btp_guard.egg-info/requires.txt +9 -0
  9. btp_guard-1.0.0/btp_guard.egg-info/top_level.txt +1 -0
  10. btp_guard-1.0.0/pyproject.toml +74 -0
  11. btp_guard-1.0.0/setup.cfg +4 -0
  12. btp_guard-1.0.0/src/__init__.py +316 -0
  13. btp_guard-1.0.0/src/a2a_protocol.py +170 -0
  14. btp_guard-1.0.0/src/adaptive_post_quantum_engine.py +327 -0
  15. btp_guard-1.0.0/src/advanced_cosmology_neuro_engine.py +147 -0
  16. btp_guard-1.0.0/src/agent_discovery_daemon.py +141 -0
  17. btp_guard-1.0.0/src/agent_identity_governance.py +146 -0
  18. btp_guard-1.0.0/src/agent_passport.py +333 -0
  19. btp_guard-1.0.0/src/agent_social_network.py +172 -0
  20. btp_guard-1.0.0/src/alerting/__init__.py +25 -0
  21. btp_guard-1.0.0/src/alerting/webhook_dispatcher.py +501 -0
  22. btp_guard-1.0.0/src/api/cloud_engine_server.py +966 -0
  23. btp_guard-1.0.0/src/api/index.py +24 -0
  24. btp_guard-1.0.0/src/api/saas_app.py +193 -0
  25. btp_guard-1.0.0/src/ast_validator.py +200 -0
  26. btp_guard-1.0.0/src/audit_ledger.py +91 -0
  27. btp_guard-1.0.0/src/audit_merkle_tree.py +117 -0
  28. btp_guard-1.0.0/src/auth/sso_federation.py +312 -0
  29. btp_guard-1.0.0/src/aws_bedrock_adapter.py +102 -0
  30. btp_guard-1.0.0/src/bartholomew_companion.py +272 -0
  31. btp_guard-1.0.0/src/bartholomew_eval/__init__.py +2 -0
  32. btp_guard-1.0.0/src/bartholomew_eval/__init__.pyi +7 -0
  33. btp_guard-1.0.0/src/bartholomew_eval/agent_credential.py +116 -0
  34. btp_guard-1.0.0/src/bartholomew_eval/agent_protocol.py +363 -0
  35. btp_guard-1.0.0/src/bartholomew_eval/agent_runtime_environment.py +153 -0
  36. btp_guard-1.0.0/src/bartholomew_eval/agent_scouter.py +87 -0
  37. btp_guard-1.0.0/src/bartholomew_eval/agent_supervisor.py +182 -0
  38. btp_guard-1.0.0/src/bartholomew_eval/algorithm_synthesizer.py +72 -0
  39. btp_guard-1.0.0/src/bartholomew_eval/async_dreamer.py +86 -0
  40. btp_guard-1.0.0/src/bartholomew_eval/attestation_verifier.py +94 -0
  41. btp_guard-1.0.0/src/bartholomew_eval/autonomous_daemon.py +195 -0
  42. btp_guard-1.0.0/src/bartholomew_eval/autonomous_runtime.py +129 -0
  43. btp_guard-1.0.0/src/bartholomew_eval/bayesian_engine.py +173 -0
  44. btp_guard-1.0.0/src/bartholomew_eval/blind_external_mission.py +132 -0
  45. btp_guard-1.0.0/src/bartholomew_eval/cache_engine.py +88 -0
  46. btp_guard-1.0.0/src/bartholomew_eval/cli.py +322 -0
  47. btp_guard-1.0.0/src/bartholomew_eval/cli.pyi +3 -0
  48. btp_guard-1.0.0/src/bartholomew_eval/commercial_fulfillment.py +237 -0
  49. btp_guard-1.0.0/src/bartholomew_eval/crypto_engine.py +93 -0
  50. btp_guard-1.0.0/src/bartholomew_eval/due_diligence_operator.py +113 -0
  51. btp_guard-1.0.0/src/bartholomew_eval/economic_operator.py +139 -0
  52. btp_guard-1.0.0/src/bartholomew_eval/engine.py +271 -0
  53. btp_guard-1.0.0/src/bartholomew_eval/engine.pyi +20 -0
  54. btp_guard-1.0.0/src/bartholomew_eval/environment.py +164 -0
  55. btp_guard-1.0.0/src/bartholomew_eval/epistemic_execution_engine.py +123 -0
  56. btp_guard-1.0.0/src/bartholomew_eval/epistemic_provenance.py +193 -0
  57. btp_guard-1.0.0/src/bartholomew_eval/evidence_artifact.py +137 -0
  58. btp_guard-1.0.0/src/bartholomew_eval/experience_store.py +80 -0
  59. btp_guard-1.0.0/src/bartholomew_eval/external_feedback_engine.py +91 -0
  60. btp_guard-1.0.0/src/bartholomew_eval/external_repository_validator.py +93 -0
  61. btp_guard-1.0.0/src/bartholomew_eval/flaky_quarantine.py +74 -0
  62. btp_guard-1.0.0/src/bartholomew_eval/fuzzer.py +142 -0
  63. btp_guard-1.0.0/src/bartholomew_eval/game_theoretic_engine.py +252 -0
  64. btp_guard-1.0.0/src/bartholomew_eval/github_app_server.py +152 -0
  65. btp_guard-1.0.0/src/bartholomew_eval/guard.py +96 -0
  66. btp_guard-1.0.0/src/bartholomew_eval/guard.pyi +16 -0
  67. btp_guard-1.0.0/src/bartholomew_eval/guard_proxy.py +124 -0
  68. btp_guard-1.0.0/src/bartholomew_eval/hypothesis_engine.py +114 -0
  69. btp_guard-1.0.0/src/bartholomew_eval/integrations.py +121 -0
  70. btp_guard-1.0.0/src/bartholomew_eval/integrations.pyi +24 -0
  71. btp_guard-1.0.0/src/bartholomew_eval/internal_engine_calculator.py +161 -0
  72. btp_guard-1.0.0/src/bartholomew_eval/latency_solver.py +112 -0
  73. btp_guard-1.0.0/src/bartholomew_eval/linux_adapter.py +168 -0
  74. btp_guard-1.0.0/src/bartholomew_eval/linux_master.py +65 -0
  75. btp_guard-1.0.0/src/bartholomew_eval/llm_adapters.py +238 -0
  76. btp_guard-1.0.0/src/bartholomew_eval/market_operating_contract.py +166 -0
  77. btp_guard-1.0.0/src/bartholomew_eval/memory_curator.py +127 -0
  78. btp_guard-1.0.0/src/bartholomew_eval/multimodel_benchmark.py +96 -0
  79. btp_guard-1.0.0/src/bartholomew_eval/objective_engine.py +222 -0
  80. btp_guard-1.0.0/src/bartholomew_eval/opportunity_hound.py +148 -0
  81. btp_guard-1.0.0/src/bartholomew_eval/opportunity_source.py +189 -0
  82. btp_guard-1.0.0/src/bartholomew_eval/owner_operator.py +114 -0
  83. btp_guard-1.0.0/src/bartholomew_eval/pipeline_engine.py +81 -0
  84. btp_guard-1.0.0/src/bartholomew_eval/provenance_layer.py +125 -0
  85. btp_guard-1.0.0/src/bartholomew_eval/py.typed +1 -0
  86. btp_guard-1.0.0/src/bartholomew_eval/reality_audit_ledger.py +105 -0
  87. btp_guard-1.0.0/src/bartholomew_eval/reality_challenge_harness.py +95 -0
  88. btp_guard-1.0.0/src/bartholomew_eval/reality_primitive.py +136 -0
  89. btp_guard-1.0.0/src/bartholomew_eval/reality_substrate.py +145 -0
  90. btp_guard-1.0.0/src/bartholomew_eval/resource_governor.py +128 -0
  91. btp_guard-1.0.0/src/bartholomew_eval/resource_graph.py +318 -0
  92. btp_guard-1.0.0/src/bartholomew_eval/result_contract.py +73 -0
  93. btp_guard-1.0.0/src/bartholomew_eval/routing_engine.py +120 -0
  94. btp_guard-1.0.0/src/bartholomew_eval/security_opportunity_adapter.py +104 -0
  95. btp_guard-1.0.0/src/bartholomew_eval/self_healing.py +123 -0
  96. btp_guard-1.0.0/src/bartholomew_eval/skill_acquirer.py +120 -0
  97. btp_guard-1.0.0/src/bartholomew_eval/sovereign_memory.py +165 -0
  98. btp_guard-1.0.0/src/bartholomew_eval/swarm_federation.py +141 -0
  99. btp_guard-1.0.0/src/bartholomew_eval/text_handler.py +160 -0
  100. btp_guard-1.0.0/src/bartholomew_eval/threat_discovery.py +105 -0
  101. btp_guard-1.0.0/src/bartholomew_eval/threat_hunter.py +176 -0
  102. btp_guard-1.0.0/src/bartholomew_eval/transformer.py +165 -0
  103. btp_guard-1.0.0/src/bartholomew_eval/unscripted_external_evaluator.py +117 -0
  104. btp_guard-1.0.0/src/bartholomew_eval/verifier.py +89 -0
  105. btp_guard-1.0.0/src/bartholomew_eval/vulnerability_scanner.py +382 -0
  106. btp_guard-1.0.0/src/bartholomew_eval/world_adapters.py +210 -0
  107. btp_guard-1.0.0/src/bartholomew_eval/xg_optimizer.py +99 -0
  108. btp_guard-1.0.0/src/benchmarks/__init__.py +7 -0
  109. btp_guard-1.0.0/src/benchmarks/swarm_chaos_benchmark.py +181 -0
  110. btp_guard-1.0.0/src/billing/__init__.py +19 -0
  111. btp_guard-1.0.0/src/billing/metering_engine.py +178 -0
  112. btp_guard-1.0.0/src/bonded_warranty.py +146 -0
  113. btp_guard-1.0.0/src/btp_guard/__init__.py +94 -0
  114. btp_guard-1.0.0/src/btp_guard/auth_deps.py +233 -0
  115. btp_guard-1.0.0/src/btp_guard/authorization_gate.py +158 -0
  116. btp_guard-1.0.0/src/btp_guard/btp_guard.py +155 -0
  117. btp_guard-1.0.0/src/btp_guard/cli.py +3764 -0
  118. btp_guard-1.0.0/src/btp_guard/errors.py +223 -0
  119. btp_guard-1.0.0/src/btp_guard/integrations/__init__.py +10 -0
  120. btp_guard-1.0.0/src/btp_guard/integrations/crewai.py +80 -0
  121. btp_guard-1.0.0/src/btp_guard/integrations/langchain.py +97 -0
  122. btp_guard-1.0.0/src/btp_guard/ledger.py +95 -0
  123. btp_guard-1.0.0/src/btp_guard/mcp_server.py +979 -0
  124. btp_guard-1.0.0/src/btp_guard/policy.py +49 -0
  125. btp_guard-1.0.0/src/btp_guard/sdk_client.py +1618 -0
  126. btp_guard-1.0.0/src/btp_guard/sessions.py +294 -0
  127. btp_guard-1.0.0/src/btp_guard/stripe_bridge.py +184 -0
  128. btp_guard-1.0.0/src/btp_guard/telemetry.py +26 -0
  129. btp_guard-1.0.0/src/btp_guard/ui_router.py +1175 -0
  130. btp_guard-1.0.0/src/btp_guard/universal_services.py +392 -0
  131. btp_guard-1.0.0/src/btp_manifest.py +118 -0
  132. btp_guard-1.0.0/src/byzantine_swarm_consensus.py +229 -0
  133. btp_guard-1.0.0/src/cli.py +11 -0
  134. btp_guard-1.0.0/src/cli_linter.py +238 -0
  135. btp_guard-1.0.0/src/client_wrapper.py +249 -0
  136. btp_guard-1.0.0/src/cloud_identity.py +131 -0
  137. btp_guard-1.0.0/src/cloud_telemetry.py +173 -0
  138. btp_guard-1.0.0/src/compliance_dossier_exporter.py +192 -0
  139. btp_guard-1.0.0/src/compliance_exporter.py +49 -0
  140. btp_guard-1.0.0/src/compliance_report_generator.py +128 -0
  141. btp_guard-1.0.0/src/confidential_enclave_attestation.py +182 -0
  142. btp_guard-1.0.0/src/container_sandbox.py +121 -0
  143. btp_guard-1.0.0/src/cross_framework_adapter.py +60 -0
  144. btp_guard-1.0.0/src/daemon/approval_queue.py +92 -0
  145. btp_guard-1.0.0/src/daemon/btp_daemon.py +214 -0
  146. btp_guard-1.0.0/src/daemon/daemon_server.py +323 -0
  147. btp_guard-1.0.0/src/daemon/m2m_observer.py +144 -0
  148. btp_guard-1.0.0/src/daemon/m2m_wire_daemon.py +443 -0
  149. btp_guard-1.0.0/src/daemon/mesh_daemon.py +156 -0
  150. btp_guard-1.0.0/src/daemon/notifications.py +48 -0
  151. btp_guard-1.0.0/src/daemon/swarm_hud.py +182 -0
  152. btp_guard-1.0.0/src/daemon/tray_manager.py +58 -0
  153. btp_guard-1.0.0/src/declarative_policy_engine.py +137 -0
  154. btp_guard-1.0.0/src/decorator.py +132 -0
  155. btp_guard-1.0.0/src/delegation_chain.py +149 -0
  156. btp_guard-1.0.0/src/demo_v24.py +123 -0
  157. btp_guard-1.0.0/src/deploy_gate.py +69 -0
  158. btp_guard-1.0.0/src/dispatch_seam.py +254 -0
  159. btp_guard-1.0.0/src/dispute_resolver.py +145 -0
  160. btp_guard-1.0.0/src/docker_runner.py +147 -0
  161. btp_guard-1.0.0/src/dynamic_memory_governor.py +136 -0
  162. btp_guard-1.0.0/src/dynamic_policy_sync.py +161 -0
  163. btp_guard-1.0.0/src/ebpf_kernel_guard.py +330 -0
  164. btp_guard-1.0.0/src/economy/__init__.py +3 -0
  165. btp_guard-1.0.0/src/economy/barter_client.py +245 -0
  166. btp_guard-1.0.0/src/entropy_grounding_engine.py +121 -0
  167. btp_guard-1.0.0/src/epistemic_physics_engine.py +143 -0
  168. btp_guard-1.0.0/src/federated_threat_immunity.py +114 -0
  169. btp_guard-1.0.0/src/fleet_telemetry.py +137 -0
  170. btp_guard-1.0.0/src/framework_adapters/__init__.py +18 -0
  171. btp_guard-1.0.0/src/framework_adapters/autogen/__init__.py +11 -0
  172. btp_guard-1.0.0/src/framework_adapters/autogen/autogen_btp_interceptor.py +303 -0
  173. btp_guard-1.0.0/src/framework_adapters/crewai/__init__.py +15 -0
  174. btp_guard-1.0.0/src/framework_adapters/crewai/crewai_btp_task_guard.py +506 -0
  175. btp_guard-1.0.0/src/framework_adapters/langgraph/__init__.py +17 -0
  176. btp_guard-1.0.0/src/framework_adapters/langgraph/langgraph_btp_guard.py +517 -0
  177. btp_guard-1.0.0/src/framework_adapters/llamaindex/__init__.py +15 -0
  178. btp_guard-1.0.0/src/framework_adapters/llamaindex/llamaindex_btp_tool.py +281 -0
  179. btp_guard-1.0.0/src/framework_adapters/universal/__init__.py +15 -0
  180. btp_guard-1.0.0/src/framework_adapters/universal/universal_model_guard.py +478 -0
  181. btp_guard-1.0.0/src/framework_integrations.py +307 -0
  182. btp_guard-1.0.0/src/frost_threshold_engine.py +495 -0
  183. btp_guard-1.0.0/src/gateway_server.py +577 -0
  184. btp_guard-1.0.0/src/hawking_information_preservation_engine.py +117 -0
  185. btp_guard-1.0.0/src/hermetic_sandbox.py +197 -0
  186. btp_guard-1.0.0/src/immune/__init__.py +21 -0
  187. btp_guard-1.0.0/src/immune/auto_immunity_engine.py +428 -0
  188. btp_guard-1.0.0/src/init_wizard.py +213 -0
  189. btp_guard-1.0.0/src/integrations/__init__.py +1 -0
  190. btp_guard-1.0.0/src/integrations/crewai/__init__.py +1 -0
  191. btp_guard-1.0.0/src/integrations/crewai/bartholomew_tool_guard.py +72 -0
  192. btp_guard-1.0.0/src/integrations/langchain/__init__.py +1 -0
  193. btp_guard-1.0.0/src/integrations/langchain/bartholomew_guard.py +82 -0
  194. btp_guard-1.0.0/src/integrations/mcp/mcp_middleware.py +49 -0
  195. btp_guard-1.0.0/src/interactive_agent_repl.py +195 -0
  196. btp_guard-1.0.0/src/interactive_demo.py +261 -0
  197. btp_guard-1.0.0/src/kernel_interceptor.py +53 -0
  198. btp_guard-1.0.0/src/langchain_guard.py +76 -0
  199. btp_guard-1.0.0/src/marginal_utility_engine.py +121 -0
  200. btp_guard-1.0.0/src/marketplace/__init__.py +19 -0
  201. btp_guard-1.0.0/src/marketplace/sla_contract.py +340 -0
  202. btp_guard-1.0.0/src/mcp_gateway.py +429 -0
  203. btp_guard-1.0.0/src/mcp_server/__init__.py +2 -0
  204. btp_guard-1.0.0/src/mcp_server/inline_tool_gate.py +91 -0
  205. btp_guard-1.0.0/src/mcp_server/server.py +253 -0
  206. btp_guard-1.0.0/src/native_core/btp_ffi.py +81 -0
  207. btp_guard-1.0.0/src/native_core/vectorized_crypto.py +167 -0
  208. btp_guard-1.0.0/src/offline_airgap_verifier.py +121 -0
  209. btp_guard-1.0.0/src/onprem.py +143 -0
  210. btp_guard-1.0.0/src/p2p/__init__.py +15 -0
  211. btp_guard-1.0.0/src/p2p/reputation_gossip.py +258 -0
  212. btp_guard-1.0.0/src/package_telemetry_tracker.py +98 -0
  213. btp_guard-1.0.0/src/policy_synthesizer.py +131 -0
  214. btp_guard-1.0.0/src/polyglot_ast_validator.py +256 -0
  215. btp_guard-1.0.0/src/python_backend/app/agent_eval_janitor.py +224 -0
  216. btp_guard-1.0.0/src/python_backend/app/agent_eval_leaderboard.py +68 -0
  217. btp_guard-1.0.0/src/python_backend/app/alert_hub.py +54 -0
  218. btp_guard-1.0.0/src/python_backend/app/auth.py +62 -0
  219. btp_guard-1.0.0/src/python_backend/app/base_flash_arbitrage.py +37 -0
  220. btp_guard-1.0.0/src/python_backend/app/billing.py +13 -0
  221. btp_guard-1.0.0/src/python_backend/app/config.py +38 -0
  222. btp_guard-1.0.0/src/python_backend/app/defense_enclave_engine.py +107 -0
  223. btp_guard-1.0.0/src/python_backend/app/depin_adapters.py +77 -0
  224. btp_guard-1.0.0/src/python_backend/app/domain_saas_arbitrage.py +108 -0
  225. btp_guard-1.0.0/src/python_backend/app/encryption_and_security.py +61 -0
  226. btp_guard-1.0.0/src/python_backend/app/enterprise_adapters.py +71 -0
  227. btp_guard-1.0.0/src/python_backend/app/enterprise_api_keys.py +72 -0
  228. btp_guard-1.0.0/src/python_backend/app/freelance_and_security_scout.py +50 -0
  229. btp_guard-1.0.0/src/python_backend/app/immunefi_google_scout.py +49 -0
  230. btp_guard-1.0.0/src/python_backend/app/inference_engine.py +704 -0
  231. btp_guard-1.0.0/src/python_backend/app/main.py +1840 -0
  232. btp_guard-1.0.0/src/python_backend/app/micro_api_suite.py +31 -0
  233. btp_guard-1.0.0/src/python_backend/app/multi_payment_gateway.py +42 -0
  234. btp_guard-1.0.0/src/python_backend/app/notary_service.py +75 -0
  235. btp_guard-1.0.0/src/python_backend/app/onchain_context_indexer.py +36 -0
  236. btp_guard-1.0.0/src/python_backend/app/report_engine.py +132 -0
  237. btp_guard-1.0.0/src/python_backend/app/stripe_billing_engine.py +156 -0
  238. btp_guard-1.0.0/src/python_backend/app/stripe_webhook_handler.py +246 -0
  239. btp_guard-1.0.0/src/python_backend/app/synthetic_dataset_factory.py +87 -0
  240. btp_guard-1.0.0/src/python_backend/app/worker.py +57 -0
  241. btp_guard-1.0.0/src/python_backend/app/worker_daemon.py +385 -0
  242. btp_guard-1.0.0/src/python_backend/app/yield_and_public_apis.py +75 -0
  243. btp_guard-1.0.0/src/python_backend/bartholomew_eval/__init__.py +78 -0
  244. btp_guard-1.0.0/src/python_backend/bartholomew_eval/__init__.pyi +7 -0
  245. btp_guard-1.0.0/src/python_backend/bartholomew_eval/agent_credential.py +116 -0
  246. btp_guard-1.0.0/src/python_backend/bartholomew_eval/agent_scouter.py +87 -0
  247. btp_guard-1.0.0/src/python_backend/bartholomew_eval/algorithm_synthesizer.py +72 -0
  248. btp_guard-1.0.0/src/python_backend/bartholomew_eval/async_dreamer.py +86 -0
  249. btp_guard-1.0.0/src/python_backend/bartholomew_eval/attestation_verifier.py +94 -0
  250. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/__init__.py +84 -0
  251. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/__init__.pyi +7 -0
  252. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/agent_credential.py +116 -0
  253. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/agent_protocol.py +355 -0
  254. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/agent_runtime_environment.py +153 -0
  255. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/agent_scouter.py +87 -0
  256. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/agent_supervisor.py +182 -0
  257. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/algorithm_synthesizer.py +72 -0
  258. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/async_dreamer.py +86 -0
  259. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/attestation_verifier.py +94 -0
  260. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/autonomous_daemon.py +195 -0
  261. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/autonomous_runtime.py +129 -0
  262. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/bayesian_engine.py +173 -0
  263. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/blind_external_mission.py +132 -0
  264. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/cache_engine.py +88 -0
  265. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/cli.py +322 -0
  266. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/cli.pyi +3 -0
  267. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/commercial_fulfillment.py +237 -0
  268. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/crypto_engine.py +93 -0
  269. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/due_diligence_operator.py +113 -0
  270. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/economic_operator.py +139 -0
  271. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/engine.py +271 -0
  272. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/engine.pyi +20 -0
  273. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/environment.py +164 -0
  274. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/epistemic_execution_engine.py +123 -0
  275. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/epistemic_provenance.py +193 -0
  276. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/evidence_artifact.py +137 -0
  277. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/experience_store.py +80 -0
  278. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/external_feedback_engine.py +91 -0
  279. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/external_repository_validator.py +93 -0
  280. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/flaky_quarantine.py +74 -0
  281. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/fuzzer.py +142 -0
  282. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/github_app_server.py +152 -0
  283. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/guard.py +96 -0
  284. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/guard.pyi +16 -0
  285. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/guard_proxy.py +124 -0
  286. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/hypothesis_engine.py +114 -0
  287. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/integrations.py +121 -0
  288. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/integrations.pyi +24 -0
  289. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/internal_engine_calculator.py +161 -0
  290. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/latency_solver.py +112 -0
  291. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/linux_adapter.py +168 -0
  292. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/linux_master.py +65 -0
  293. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/llm_adapters.py +238 -0
  294. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/market_operating_contract.py +166 -0
  295. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/memory_curator.py +127 -0
  296. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/multimodel_benchmark.py +96 -0
  297. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/objective_engine.py +222 -0
  298. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/opportunity_hound.py +148 -0
  299. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/opportunity_source.py +189 -0
  300. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/owner_operator.py +114 -0
  301. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/pipeline_engine.py +81 -0
  302. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/provenance_layer.py +125 -0
  303. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/py.typed +1 -0
  304. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/reality_audit_ledger.py +105 -0
  305. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/reality_challenge_harness.py +95 -0
  306. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/reality_primitive.py +136 -0
  307. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/reality_substrate.py +145 -0
  308. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/resource_governor.py +128 -0
  309. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/resource_graph.py +318 -0
  310. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/result_contract.py +73 -0
  311. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/routing_engine.py +120 -0
  312. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/security_opportunity_adapter.py +104 -0
  313. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/self_healing.py +123 -0
  314. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/skill_acquirer.py +120 -0
  315. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/sovereign_memory.py +165 -0
  316. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/swarm_federation.py +141 -0
  317. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/text_handler.py +160 -0
  318. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/threat_discovery.py +105 -0
  319. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/threat_hunter.py +176 -0
  320. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/transformer.py +165 -0
  321. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/unscripted_external_evaluator.py +117 -0
  322. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/verifier.py +89 -0
  323. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/vulnerability_scanner.py +382 -0
  324. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/world_adapters.py +210 -0
  325. btp_guard-1.0.0/src/python_backend/bartholomew_eval/bartholomew_eval/xg_optimizer.py +99 -0
  326. btp_guard-1.0.0/src/python_backend/bartholomew_eval/cache_engine.py +88 -0
  327. btp_guard-1.0.0/src/python_backend/bartholomew_eval/cli.py +240 -0
  328. btp_guard-1.0.0/src/python_backend/bartholomew_eval/cli.pyi +3 -0
  329. btp_guard-1.0.0/src/python_backend/bartholomew_eval/crypto_engine.py +93 -0
  330. btp_guard-1.0.0/src/python_backend/bartholomew_eval/engine.py +228 -0
  331. btp_guard-1.0.0/src/python_backend/bartholomew_eval/engine.pyi +20 -0
  332. btp_guard-1.0.0/src/python_backend/bartholomew_eval/environment.py +164 -0
  333. btp_guard-1.0.0/src/python_backend/bartholomew_eval/epistemic_execution_engine.py +123 -0
  334. btp_guard-1.0.0/src/python_backend/bartholomew_eval/epistemic_provenance.py +193 -0
  335. btp_guard-1.0.0/src/python_backend/bartholomew_eval/evidence_artifact.py +137 -0
  336. btp_guard-1.0.0/src/python_backend/bartholomew_eval/experience_store.py +80 -0
  337. btp_guard-1.0.0/src/python_backend/bartholomew_eval/fuzzer.py +142 -0
  338. btp_guard-1.0.0/src/python_backend/bartholomew_eval/guard.py +96 -0
  339. btp_guard-1.0.0/src/python_backend/bartholomew_eval/guard.pyi +16 -0
  340. btp_guard-1.0.0/src/python_backend/bartholomew_eval/guard_proxy.py +124 -0
  341. btp_guard-1.0.0/src/python_backend/bartholomew_eval/integrations.py +121 -0
  342. btp_guard-1.0.0/src/python_backend/bartholomew_eval/integrations.pyi +24 -0
  343. btp_guard-1.0.0/src/python_backend/bartholomew_eval/internal_engine_calculator.py +120 -0
  344. btp_guard-1.0.0/src/python_backend/bartholomew_eval/memory_curator.py +127 -0
  345. btp_guard-1.0.0/src/python_backend/bartholomew_eval/pipeline_engine.py +81 -0
  346. btp_guard-1.0.0/src/python_backend/bartholomew_eval/py.typed +1 -0
  347. btp_guard-1.0.0/src/python_backend/bartholomew_eval/resource_governor.py +128 -0
  348. btp_guard-1.0.0/src/python_backend/bartholomew_eval/routing_engine.py +120 -0
  349. btp_guard-1.0.0/src/python_backend/bartholomew_eval/self_healing.py +123 -0
  350. btp_guard-1.0.0/src/python_backend/bartholomew_eval/sovereign_memory.py +165 -0
  351. btp_guard-1.0.0/src/python_backend/bartholomew_eval/swarm_federation.py +141 -0
  352. btp_guard-1.0.0/src/python_backend/bartholomew_eval/threat_discovery.py +105 -0
  353. btp_guard-1.0.0/src/python_backend/bartholomew_eval/threat_hunter.py +176 -0
  354. btp_guard-1.0.0/src/python_backend/bartholomew_eval/transformer.py +165 -0
  355. btp_guard-1.0.0/src/python_backend/bartholomew_eval/verifier.py +89 -0
  356. btp_guard-1.0.0/src/python_backend/bartholomew_eval/vulnerability_scanner.py +382 -0
  357. btp_guard-1.0.0/src/python_backend/bartholomew_eval/xg_optimizer.py +99 -0
  358. btp_guard-1.0.0/src/python_backend/src/agent_discovery_daemon.py +141 -0
  359. btp_guard-1.0.0/src/python_backend/src/ast_validator.py +200 -0
  360. btp_guard-1.0.0/src/python_backend/src/bonded_warranty.py +86 -0
  361. btp_guard-1.0.0/src/python_backend/src/compliance_exporter.py +49 -0
  362. btp_guard-1.0.0/src/python_backend/src/cross_framework_adapter.py +60 -0
  363. btp_guard-1.0.0/src/python_backend/src/demo_v24.py +123 -0
  364. btp_guard-1.0.0/src/python_backend/src/deploy_gate.py +69 -0
  365. btp_guard-1.0.0/src/python_backend/src/kernel_interceptor.py +53 -0
  366. btp_guard-1.0.0/src/python_backend/src/mcp_gateway.py +300 -0
  367. btp_guard-1.0.0/src/python_backend/src/rfc8785.py +74 -0
  368. btp_guard-1.0.0/src/python_backend/src/trust_protocol.py +131 -0
  369. btp_guard-1.0.0/src/python_backend/src/verification_sla.py +75 -0
  370. btp_guard-1.0.0/src/python_backend/src/workspace_transaction.py +111 -0
  371. btp_guard-1.0.0/src/python_backend/standalone_btp_verifier.py +136 -0
  372. btp_guard-1.0.0/src/python_backend/worker_ai.py +82 -0
  373. btp_guard-1.0.0/src/quantum_tunneling_engine.py +168 -0
  374. btp_guard-1.0.0/src/quorum_approval_gate.py +155 -0
  375. btp_guard-1.0.0/src/remote_policy_loader.py +89 -0
  376. btp_guard-1.0.0/src/replay_protector.py +76 -0
  377. btp_guard-1.0.0/src/reputation_engine.py +156 -0
  378. btp_guard-1.0.0/src/rfc8785.py +74 -0
  379. btp_guard-1.0.0/src/secret_masker.py +135 -0
  380. btp_guard-1.0.0/src/security/audit_dossier.py +154 -0
  381. btp_guard-1.0.0/src/settlement/alby_client.py +82 -0
  382. btp_guard-1.0.0/src/settlement/autonomous_escrow.py +464 -0
  383. btp_guard-1.0.0/src/settlement/cross_chain_bridge.py +170 -0
  384. btp_guard-1.0.0/src/settlement/evm_deployer.py +190 -0
  385. btp_guard-1.0.0/src/settlement/evm_escrow.py +195 -0
  386. btp_guard-1.0.0/src/settlement/l402_protocol.py +237 -0
  387. btp_guard-1.0.0/src/settlement/lightning_gateway.py +209 -0
  388. btp_guard-1.0.0/src/settlement/swarm_arbitration.py +367 -0
  389. btp_guard-1.0.0/src/sidecar/main.py +120 -0
  390. btp_guard-1.0.0/src/sidecar/test_sidecar_e2e.py +58 -0
  391. btp_guard-1.0.0/src/siem_exporter.py +178 -0
  392. btp_guard-1.0.0/src/snapshot_engine.py +96 -0
  393. btp_guard-1.0.0/src/sovereign_agent_worker.py +120 -0
  394. btp_guard-1.0.0/src/stateful_session_guard.py +164 -0
  395. btp_guard-1.0.0/src/streaming_tool_guard.py +93 -0
  396. btp_guard-1.0.0/src/stripe_connect_v2/server.py +385 -0
  397. btp_guard-1.0.0/src/telemetry_exporter.py +101 -0
  398. btp_guard-1.0.0/src/tenancy/__init__.py +15 -0
  399. btp_guard-1.0.0/src/tenancy/workspace_manager.py +160 -0
  400. btp_guard-1.0.0/src/threat_intel_feed.py +147 -0
  401. btp_guard-1.0.0/src/token_budget_governor.py +73 -0
  402. btp_guard-1.0.0/src/trust_protocol.py +164 -0
  403. btp_guard-1.0.0/src/tui_monitor.py +67 -0
  404. btp_guard-1.0.0/src/unified_physics_invariant_engine.py +131 -0
  405. btp_guard-1.0.0/src/universal_model_guard.py +474 -0
  406. btp_guard-1.0.0/src/usage_tracker.py +255 -0
  407. btp_guard-1.0.0/src/v25_kernel.py +368 -0
  408. btp_guard-1.0.0/src/verification_sla.py +75 -0
  409. btp_guard-1.0.0/src/workspace_transaction.py +111 -0
  410. btp_guard-1.0.0/src/zk_compliance_proof_engine.py +529 -0
  411. btp_guard-1.0.0/src/zk_rollup_batcher.py +258 -0
  412. btp_guard-1.0.0/tests/test_1m_million_scale_crypto_invariants.py +105 -0
  413. btp_guard-1.0.0/tests/test_adaptive_post_quantum.py +139 -0
  414. btp_guard-1.0.0/tests/test_advanced_ast_evasions.py +101 -0
  415. btp_guard-1.0.0/tests/test_advanced_cosmology_neuro_engine.py +74 -0
  416. btp_guard-1.0.0/tests/test_adversarial_fuzz.py +175 -0
  417. btp_guard-1.0.0/tests/test_adversarial_protocol.py +200 -0
  418. btp_guard-1.0.0/tests/test_adversarial_trust_falsification.py +155 -0
  419. btp_guard-1.0.0/tests/test_agent_protocol.py +82 -0
  420. btp_guard-1.0.0/tests/test_audit_dossier.py +42 -0
  421. btp_guard-1.0.0/tests/test_audit_ledger.py +65 -0
  422. btp_guard-1.0.0/tests/test_audit_merkle_tree.py +55 -0
  423. btp_guard-1.0.0/tests/test_authorization_gate_mvp.py +367 -0
  424. btp_guard-1.0.0/tests/test_autonomous_execution.py +129 -0
  425. btp_guard-1.0.0/tests/test_autonomous_trust_adaptation.py +183 -0
  426. btp_guard-1.0.0/tests/test_bayesian_and_text_engine.py +117 -0
  427. btp_guard-1.0.0/tests/test_bidirectional_interop_challenge.py +113 -0
  428. btp_guard-1.0.0/tests/test_bonded_warranty.py +84 -0
  429. btp_guard-1.0.0/tests/test_btp_interoperability.py +40 -0
  430. btp_guard-1.0.0/tests/test_byzantine_swarm.py +115 -0
  431. btp_guard-1.0.0/tests/test_cli_linter.py +104 -0
  432. btp_guard-1.0.0/tests/test_client_wrapper.py +152 -0
  433. btp_guard-1.0.0/tests/test_cloud_bot_gateway.py +99 -0
  434. btp_guard-1.0.0/tests/test_cloud_engine_server.py +132 -0
  435. btp_guard-1.0.0/tests/test_cloud_gateway_production.py +132 -0
  436. btp_guard-1.0.0/tests/test_cloud_telemetry.py +52 -0
  437. btp_guard-1.0.0/tests/test_community_integrations.py +90 -0
  438. btp_guard-1.0.0/tests/test_compliance_dossier_export.py +93 -0
  439. btp_guard-1.0.0/tests/test_compliance_report_generator.py +46 -0
  440. btp_guard-1.0.0/tests/test_confidential_enclave.py +94 -0
  441. btp_guard-1.0.0/tests/test_conformance_suite.py +57 -0
  442. btp_guard-1.0.0/tests/test_container_sandbox.py +65 -0
  443. btp_guard-1.0.0/tests/test_cross_agent_generalization.py +342 -0
  444. btp_guard-1.0.0/tests/test_cross_agent_trust_exchange.py +173 -0
  445. btp_guard-1.0.0/tests/test_cross_framework_interop.py +148 -0
  446. btp_guard-1.0.0/tests/test_daemon_system.py +116 -0
  447. btp_guard-1.0.0/tests/test_declarative_policy_engine.py +86 -0
  448. btp_guard-1.0.0/tests/test_delegation_and_reputation.py +132 -0
  449. btp_guard-1.0.0/tests/test_deploy_gate_and_compliance.py +92 -0
  450. btp_guard-1.0.0/tests/test_dispatch_seam.py +151 -0
  451. btp_guard-1.0.0/tests/test_dispute_and_replay.py +107 -0
  452. btp_guard-1.0.0/tests/test_docker_runner.py +63 -0
  453. btp_guard-1.0.0/tests/test_ebpf_kernel_guard.py +62 -0
  454. btp_guard-1.0.0/tests/test_enterprise_cloud_suite.py +141 -0
  455. btp_guard-1.0.0/tests/test_enterprise_features.py +96 -0
  456. btp_guard-1.0.0/tests/test_enterprise_gap_audit.py +75 -0
  457. btp_guard-1.0.0/tests/test_enterprise_polish_and_metering.py +158 -0
  458. btp_guard-1.0.0/tests/test_entropy_grounding_engine.py +86 -0
  459. btp_guard-1.0.0/tests/test_epistemic_physics_engine.py +83 -0
  460. btp_guard-1.0.0/tests/test_external_agentdojo_benchmark.py +243 -0
  461. btp_guard-1.0.0/tests/test_fleet_telemetry.py +63 -0
  462. btp_guard-1.0.0/tests/test_framework_integrations.py +72 -0
  463. btp_guard-1.0.0/tests/test_frontend_routes.py +16 -0
  464. btp_guard-1.0.0/tests/test_frontier_model_guards.py +96 -0
  465. btp_guard-1.0.0/tests/test_frost_threshold.py +303 -0
  466. btp_guard-1.0.0/tests/test_game_theoretic_a2a.py +123 -0
  467. btp_guard-1.0.0/tests/test_gateway_server.py +102 -0
  468. btp_guard-1.0.0/tests/test_gemini_38_framework.py +84 -0
  469. btp_guard-1.0.0/tests/test_global_cookbook_recipes.py +46 -0
  470. btp_guard-1.0.0/tests/test_hawking_information_preservation.py +63 -0
  471. btp_guard-1.0.0/tests/test_hermetic_command_sandbox.py +80 -0
  472. btp_guard-1.0.0/tests/test_inline_mandatory_tool_gate.py +114 -0
  473. btp_guard-1.0.0/tests/test_interactive_demo.py +12 -0
  474. btp_guard-1.0.0/tests/test_internal_deep_evasion_lab.py +155 -0
  475. btp_guard-1.0.0/tests/test_invariant_fuzzer.py +163 -0
  476. btp_guard-1.0.0/tests/test_key_lifecycle_and_threats.py +75 -0
  477. btp_guard-1.0.0/tests/test_langchain_guard.py +70 -0
  478. btp_guard-1.0.0/tests/test_linux_master.py +69 -0
  479. btp_guard-1.0.0/tests/test_live_adversarial_audit.py +136 -0
  480. btp_guard-1.0.0/tests/test_live_benchmark.py +160 -0
  481. btp_guard-1.0.0/tests/test_live_cloud_run_audit.py +69 -0
  482. btp_guard-1.0.0/tests/test_live_cloud_verification.py +59 -0
  483. btp_guard-1.0.0/tests/test_llm_adapters.py +163 -0
  484. btp_guard-1.0.0/tests/test_m2m_benchmark_and_manifest.py +40 -0
  485. btp_guard-1.0.0/tests/test_m2m_wire_daemon.py +135 -0
  486. btp_guard-1.0.0/tests/test_marginal_utility_engine.py +88 -0
  487. btp_guard-1.0.0/tests/test_massive_fuzzing_suite.py +205 -0
  488. btp_guard-1.0.0/tests/test_mcp_bonded_settlement.py +144 -0
  489. btp_guard-1.0.0/tests/test_mcp_guard.py +229 -0
  490. btp_guard-1.0.0/tests/test_mcp_registry_spec.py +53 -0
  491. btp_guard-1.0.0/tests/test_mcp_server_e2e.py +104 -0
  492. btp_guard-1.0.0/tests/test_million_invariant_fuzz.py +203 -0
  493. btp_guard-1.0.0/tests/test_mixed_workload_30k.py +171 -0
  494. btp_guard-1.0.0/tests/test_moves_1_and_3.py +85 -0
  495. btp_guard-1.0.0/tests/test_multi_agent_swarm_stress.py +129 -0
  496. btp_guard-1.0.0/tests/test_native_core.py +49 -0
  497. btp_guard-1.0.0/tests/test_new_routes.py +21 -0
  498. btp_guard-1.0.0/tests/test_objective_engine.py +47 -0
  499. btp_guard-1.0.0/tests/test_policy_synthesizer.py +36 -0
  500. btp_guard-1.0.0/tests/test_polyglot_ast_validator.py +85 -0
  501. btp_guard-1.0.0/tests/test_polyglot_fuzzer.py +98 -0
  502. btp_guard-1.0.0/tests/test_property_based_fuzzing.py +163 -0
  503. btp_guard-1.0.0/tests/test_quantum_tunneling_engine.py +90 -0
  504. btp_guard-1.0.0/tests/test_real_market_operating_contract.py +97 -0
  505. btp_guard-1.0.0/tests/test_resource_graph.py +52 -0
  506. btp_guard-1.0.0/tests/test_revenue_engines.py +63 -0
  507. btp_guard-1.0.0/tests/test_saas_github_app_engine.py +86 -0
  508. btp_guard-1.0.0/tests/test_secret_masker.py +62 -0
  509. btp_guard-1.0.0/tests/test_simple_guard.py +67 -0
  510. btp_guard-1.0.0/tests/test_snapshot_engine.py +50 -0
  511. btp_guard-1.0.0/tests/test_sovereign_agent_worker.py +73 -0
  512. btp_guard-1.0.0/tests/test_sso_federation.py +296 -0
  513. btp_guard-1.0.0/tests/test_standing_mesh_daemon.py +75 -0
  514. btp_guard-1.0.0/tests/test_stateful_and_identity.py +98 -0
  515. btp_guard-1.0.0/tests/test_streaming_and_quorum.py +108 -0
  516. btp_guard-1.0.0/tests/test_swarm_hud.py +22 -0
  517. btp_guard-1.0.0/tests/test_telemetry_exporter.py +60 -0
  518. btp_guard-1.0.0/tests/test_unified_physics_invariant_engine.py +79 -0
  519. btp_guard-1.0.0/tests/test_universal_model_compatibility.py +363 -0
  520. btp_guard-1.0.0/tests/test_universal_swarm_delegation.py +37 -0
  521. btp_guard-1.0.0/tests/test_usage_and_activation.py +92 -0
  522. btp_guard-1.0.0/tests/test_v24_mcp_transaction.py +157 -0
  523. btp_guard-1.0.0/tests/test_v25_kernel_benchmark.py +188 -0
  524. btp_guard-1.0.0/tests/test_v26_ebpf_and_enclave.py +133 -0
  525. btp_guard-1.0.0/tests/test_v27_swarm_consensus.py +127 -0
  526. btp_guard-1.0.0/tests/test_v31_agent_passport_and_discovery.py +279 -0
  527. btp_guard-1.0.0/tests/test_v32_ebpf_and_hot_reload.py +97 -0
  528. btp_guard-1.0.0/tests/test_v33_v34_v40_expansion.py +173 -0
  529. btp_guard-1.0.0/tests/test_v35_zk_rollup_and_enclave.py +222 -0
  530. btp_guard-1.0.0/tests/test_v40_escrow_and_l402.py +382 -0
  531. btp_guard-1.0.0/tests/test_v41_framework_adapters.py +125 -0
  532. btp_guard-1.0.0/tests/test_v41_swarm_arbitration_and_zk_fault_proof.py +220 -0
  533. btp_guard-1.0.0/tests/test_v42_settlement_gateway.py +111 -0
  534. btp_guard-1.0.0/tests/test_v43_evm_deployer.py +42 -0
  535. btp_guard-1.0.0/tests/test_v44_chaos_benchmark.py +33 -0
  536. btp_guard-1.0.0/tests/test_v50_multi_tenancy_and_workspaces.py +134 -0
  537. btp_guard-1.0.0/tests/test_v51_webhooks_and_alerts.py +308 -0
  538. btp_guard-1.0.0/tests/test_v52_auto_immunity_engine.py +130 -0
  539. btp_guard-1.0.0/tests/test_v53_marketplace_and_sla_escrows.py +243 -0
  540. btp_guard-1.0.0/tests/test_v54_p2p_gossip_and_cross_chain_bridge.py +268 -0
  541. btp_guard-1.0.0/tests/test_wireguard_framework_adapters.py +85 -0
  542. btp_guard-1.0.0/tests/test_zk_compliance_proof.py +256 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Bartholomew AI & Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,224 @@
1
+ Metadata-Version: 2.4
2
+ Name: btp-guard
3
+ Version: 1.0.0
4
+ Summary: Bartholomew Trust Protocol (BTP v1.0.0) - Sub-35us in-process execution gating, AST inspection, cryptographic audit trails, and tool-call security for autonomous AI agents.
5
+ Author-email: Itsub Alemayehu <security@bartholomew.info>
6
+ License: MIT
7
+ Project-URL: Homepage, https://bartholomew.info
8
+ Project-URL: Documentation, https://bartholomew.info#sdk
9
+ Project-URL: Repository, https://github.com/bartholomew-ai/bartholomew
10
+ Project-URL: Tracker, https://github.com/bartholomew-ai/bartholomew/issues
11
+ Keywords: ai-safety,agent-guardrails,security,ast-analysis,agent-security,prompt-injection-defense,tool-call-validation,mcp-guard,autonomous-agents,llm-security,mcp,claude,cursor,langchain,crewai,autogen,openai-agents,ed25519
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.14
21
+ Classifier: Topic :: Security
22
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
23
+ Requires-Python: >=3.10
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Requires-Dist: cryptography>=42.0.0
27
+ Requires-Dist: pyyaml>=6.0
28
+ Provides-Extra: fastapi
29
+ Requires-Dist: fastapi>=0.100.0; extra == "fastapi"
30
+ Requires-Dist: uvicorn>=0.22.0; extra == "fastapi"
31
+ Provides-Extra: test
32
+ Requires-Dist: pytest>=7.0.0; extra == "test"
33
+ Dynamic: license-file
34
+
35
+ <p align="center">
36
+ <img src="packages/vscode-extension/icon.png" width="140" alt="Bartholomew Shield Logo" />
37
+ </p>
38
+
39
+ # Bartholomew (BTP v1.0.0) — In-Process Runtime Execution Gateway for Autonomous AI Agents
40
+
41
+ **Deterministic AST Policy Invariant Gating, In-Flight Secret Masking, and Cryptographic Attestation for Autonomous AI Agent Swarms.**
42
+
43
+ [![CI](https://github.com/bartholomew-ai/bartholomew/actions/workflows/ci.yml/badge.svg)](https://github.com/bartholomew-ai/bartholomew/actions/workflows/ci.yml)
44
+ [![Open VSX](https://img.shields.io/badge/Open%20VSX-v1.0.0-blue?logo=visualstudiocode)](https://open-vsx.org/extension/Bartholomew/bartholomew-guard-vscode)
45
+ [![PyPI](https://img.shields.io/pypi/v/btp-guard?logo=pypi&logoColor=white)](https://pypi.org/project/btp-guard/)
46
+ [![npm](https://img.shields.io/npm/v/btp-guard?logo=npm&logoColor=white)](https://www.npmjs.com/package/btp-guard)
47
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
48
+ [![Tests](https://img.shields.io/badge/tests-2920%20passing-brightgreen)](tests/)
49
+
50
+ [![OpenAI](https://img.shields.io/badge/OpenAI-Agents%20SDK-10A37F?logo=openai&logoColor=white)](examples/README.md)
51
+ [![Anthropic](https://img.shields.io/badge/Anthropic-Claude%20Tool%20Guard-D97706?logo=anthropic&logoColor=white)](examples/README.md)
52
+ [![LangChain](https://img.shields.io/badge/LangChain-Runtime%20Guard-1C3C3C?logo=langchain&logoColor=white)](examples/README.md)
53
+ [![CrewAI](https://img.shields.io/badge/CrewAI-Agent%20Guard-FF4B4B)](examples/README.md)
54
+ [![AutoGen](https://img.shields.io/badge/Microsoft-AutoGen%20Swarm-00A4EF?logo=microsoft&logoColor=white)](examples/README.md)
55
+ [![IDE](https://img.shields.io/badge/IDE-Cursor%20%2F%20VS%20Code-7C3AED?logo=githubcopilot&logoColor=white)](https://open-vsx.org/extension/Bartholomew/bartholomew-guard-vscode)
56
+
57
+ ---
58
+
59
+ ## What It Does
60
+
61
+ Bartholomew is the execution gate for autonomous AI agents.
62
+
63
+ It sits between an agent and real-world execution (shell, SQL, file I/O, cloud APIs) and decides whether proposed actions should be allowed before they execute.
64
+
65
+ ```
66
+ [ Autonomous Agent / LLM ]
67
+ │
68
+ ▼ (Proposes Tool Call / Bash / SQL)
69
+ ┌────────────────────────────────────────────────────────────────────────┐
70
+ │ Bartholomew In-Process Runtime Gateway │
71
+ │ │
72
+ │ [ Polyglot AST Invariant Gate ] ──► Sub-millisecond syntax check │
73
+ │ [ In-Flight Secret Vault ] ──► Real-time credential scrubbing │
74
+ │ [ Declarative Policy Engine ] ──► Spend caps & command allowlists │
75
+ │ [ Cryptographic Attestation ] ──► RFC 8785 Ed25519 Signed Receipts │
76
+ └───────────────────────────────────┬────────────────────────────────────┘
77
+ │
78
+ ┌────────────┴────────────┐
79
+ ▼ ▼
80
+ [ ALLOW ] [ DENY ]
81
+ │ │
82
+ ▼ ▼
83
+ [ Target System / DB / OS ] [ Execution Veto + Audit Evidence ]
84
+ ```
85
+
86
+ ### Core Capabilities:
87
+ - **Pre-Execution Gating**: Evaluates tool arguments, commands, and code strings before OS dispatch.
88
+ - **Polyglot AST Parsing**: Parses Abstract Syntax Trees across Python, SQL, Bash, JavaScript, and Go to block dangerous mutations (`rm -rf`, `DROP TABLE`, subshell escapes).
89
+ - **In-Flight Secret Scrubbing**: Detects and redacts credentials (`sk-*`, `ghp_*`, `AKIA*`, private keys) before they touch logs, providers, or vector stores.
90
+ - **Cryptographic Auditability**: Generates canonical RFC 8785 JSON digests signed with Ed25519 keys for tamper-proof verification.
91
+ - **Zero Network Overhead**: Evaluates locally inside the host process runtime without external API latency or second-model token billing.
92
+
93
+ ---
94
+
95
+ ## Quickstart
96
+
97
+ ### Python
98
+
99
+ ```bash
100
+ pip install btp-guard
101
+ ```
102
+
103
+ ```python
104
+ from btp_guard import Guard
105
+
106
+ guard = Guard(spend_cap=100.0, strict=True)
107
+
108
+ # 1. Protect any tool function via decorator
109
+ @guard.protect
110
+ def execute_shell(command: str):
111
+ return f"Executed: {command}"
112
+
113
+ # 2. Or check actions directly inline
114
+ result = guard.check("rm -rf /var/data")
115
+ if not result["allowed"]:
116
+ print(f"Blocked: {result['reason']}")
117
+ # Output: Blocked: BTP-AST-001: Catastrophic shell pattern detected
118
+ ```
119
+
120
+ ### Node.js / TypeScript
121
+
122
+ ```bash
123
+ npm install btp-guard
124
+ ```
125
+
126
+ ```typescript
127
+ import { Guard } from "btp-guard";
128
+
129
+ const guard = new Guard({ maxSpendUsd: 100.0 });
130
+ const verdict = guard.check("DROP TABLE users;");
131
+
132
+ if (!verdict.allowed) {
133
+ throw new Error(`Action blocked: ${verdict.reason}`);
134
+ }
135
+ ```
136
+
137
+ ---
138
+
139
+ ## MCP Server (Model Context Protocol)
140
+
141
+ Bartholomew provides a native Model Context Protocol (MCP) server for Claude Desktop, Cursor, Windsurf, and any MCP-compatible client:
142
+
143
+ ```json
144
+ {
145
+ "mcpServers": {
146
+ "bartholomew": {
147
+ "command": "python",
148
+ "args": ["-m", "src.mcp_server"]
149
+ }
150
+ }
151
+ }
152
+ ```
153
+
154
+ ---
155
+
156
+ ## Framework Integrations
157
+
158
+ Bartholomew provides drop-in runtime interceptors for all major agent orchestrators:
159
+
160
+ | Framework / Ecosystem | Integration Guard | Reference Guide |
161
+ |---|---|---|
162
+ | **OpenAI Agents SDK** | Dynamic Tool Gating & Schema Invariant Checks | [`docs/FRAMEWORK_GUIDE.md`](docs/FRAMEWORK_GUIDE.md) |
163
+ | **Anthropic Claude** | `ClaudeToolGuard` / Tool-Call Interceptor | [`docs/FRAMEWORK_GUIDE.md`](docs/FRAMEWORK_GUIDE.md) |
164
+ | **Microsoft AutoGen** | `@btp_autogen_guard` / Swarm Consensus Interceptor | [`examples/future_swarms/autogen_swarm_consensus.py`](examples/future_swarms/autogen_swarm_consensus.py) |
165
+ | **CrewAI** | `@btp_crewai_tool` / Task & Agent Boundary Gate | [`docs/FRAMEWORK_GUIDE.md`](docs/FRAMEWORK_GUIDE.md) |
166
+ | **LangChain / LangGraph** | `BTPGuardTool` / Node Execution Interceptor | [`docs/FRAMEWORK_GUIDE.md`](docs/FRAMEWORK_GUIDE.md) |
167
+ | **Cursor / VS Code** | Pre-execution IDE Sentry & Extension | [Open VSX Extension](https://open-vsx.org/extension/Bartholomew/bartholomew-guard-vscode) |
168
+
169
+ ---
170
+
171
+ ## Defense in Depth Architecture
172
+
173
+ Bartholomew functions as **Layer 2** in the autonomous agent defense stack:
174
+
175
+ | Layer | Technology | Typical Latency | Defense Boundary |
176
+ |---|---|---|---|
177
+ | **Layer 1 — Prompt Rails** | NeMo, Guardrails AI, LlamaGuard | 800ms – 2,500ms | Natural language prompt & completion text |
178
+ | **Layer 2 — Execution Gate** | **Bartholomew BTP** | **< 0.1 ms (Sub-millisecond)** | **Raw tool arguments, AST syntax, credentials, spend** |
179
+ | **Layer 3 — OS Isolation** | Docker, gVisor, E2B | 200ms – 500ms | Kernel syscall & container isolation |
180
+
181
+ ---
182
+
183
+ ## Audit & Compliance Readiness
184
+
185
+ Bartholomew generates tamper-evident audit evidence packs mapping to AICPA Trust Services Criteria (CC6.1, CC6.6, CC7.1) and ISO/IEC 27001:2022 (A.8.8, A.8.30):
186
+
187
+ ```bash
188
+ python scripts/generate_soc2_compliance_evidence.py
189
+ ```
190
+
191
+ Output: `docs/audit/soc2-compliance-evidence.json` containing SHA-256 Merkle proofs, RFC 8785 canonical digests, and Ed25519 digital signatures for zero-network independent auditor verification.
192
+
193
+ ---
194
+
195
+ ## Development & Test Suite
196
+
197
+ ```bash
198
+ # Clone repository
199
+ git clone https://github.com/bartholomew-ai/bartholomew.git
200
+ cd bartholomew
201
+
202
+ # Install dependencies
203
+ pip install -e ".[test]"
204
+
205
+ # Run full test suite (2,920 automated tests)
206
+ python -m pytest -q
207
+ ```
208
+
209
+ ---
210
+
211
+ ## Documentation
212
+
213
+ - [`docs/quickstart.md`](docs/quickstart.md) — Full setup and configuration guide
214
+ - [`docs/threat-model.md`](docs/threat-model.md) — Threat model and security boundaries
215
+ - [`docs/btp-protocol-spec.md`](docs/btp-protocol-spec.md) — BTP wire protocol specification
216
+ - [`docs/FRAMEWORK_GUIDE.md`](docs/FRAMEWORK_GUIDE.md) — Framework adapter documentation
217
+ - [`SECURITY.md`](SECURITY.md) — Vulnerability disclosure policy
218
+ - [`CONTRIBUTING.md`](CONTRIBUTING.md) — Contributing guidelines
219
+
220
+ ---
221
+
222
+ ## License
223
+
224
+ Bartholomew is distributed under the [MIT License](LICENSE).
@@ -0,0 +1,190 @@
1
+ <p align="center">
2
+ <img src="packages/vscode-extension/icon.png" width="140" alt="Bartholomew Shield Logo" />
3
+ </p>
4
+
5
+ # Bartholomew (BTP v1.0.0) — In-Process Runtime Execution Gateway for Autonomous AI Agents
6
+
7
+ **Deterministic AST Policy Invariant Gating, In-Flight Secret Masking, and Cryptographic Attestation for Autonomous AI Agent Swarms.**
8
+
9
+ [![CI](https://github.com/bartholomew-ai/bartholomew/actions/workflows/ci.yml/badge.svg)](https://github.com/bartholomew-ai/bartholomew/actions/workflows/ci.yml)
10
+ [![Open VSX](https://img.shields.io/badge/Open%20VSX-v1.0.0-blue?logo=visualstudiocode)](https://open-vsx.org/extension/Bartholomew/bartholomew-guard-vscode)
11
+ [![PyPI](https://img.shields.io/pypi/v/btp-guard?logo=pypi&logoColor=white)](https://pypi.org/project/btp-guard/)
12
+ [![npm](https://img.shields.io/npm/v/btp-guard?logo=npm&logoColor=white)](https://www.npmjs.com/package/btp-guard)
13
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
14
+ [![Tests](https://img.shields.io/badge/tests-2920%20passing-brightgreen)](tests/)
15
+
16
+ [![OpenAI](https://img.shields.io/badge/OpenAI-Agents%20SDK-10A37F?logo=openai&logoColor=white)](examples/README.md)
17
+ [![Anthropic](https://img.shields.io/badge/Anthropic-Claude%20Tool%20Guard-D97706?logo=anthropic&logoColor=white)](examples/README.md)
18
+ [![LangChain](https://img.shields.io/badge/LangChain-Runtime%20Guard-1C3C3C?logo=langchain&logoColor=white)](examples/README.md)
19
+ [![CrewAI](https://img.shields.io/badge/CrewAI-Agent%20Guard-FF4B4B)](examples/README.md)
20
+ [![AutoGen](https://img.shields.io/badge/Microsoft-AutoGen%20Swarm-00A4EF?logo=microsoft&logoColor=white)](examples/README.md)
21
+ [![IDE](https://img.shields.io/badge/IDE-Cursor%20%2F%20VS%20Code-7C3AED?logo=githubcopilot&logoColor=white)](https://open-vsx.org/extension/Bartholomew/bartholomew-guard-vscode)
22
+
23
+ ---
24
+
25
+ ## What It Does
26
+
27
+ Bartholomew is the execution gate for autonomous AI agents.
28
+
29
+ It sits between an agent and real-world execution (shell, SQL, file I/O, cloud APIs) and decides whether proposed actions should be allowed before they execute.
30
+
31
+ ```
32
+ [ Autonomous Agent / LLM ]
33
+ │
34
+ ▼ (Proposes Tool Call / Bash / SQL)
35
+ ┌────────────────────────────────────────────────────────────────────────┐
36
+ │ Bartholomew In-Process Runtime Gateway │
37
+ │ │
38
+ │ [ Polyglot AST Invariant Gate ] ──► Sub-millisecond syntax check │
39
+ │ [ In-Flight Secret Vault ] ──► Real-time credential scrubbing │
40
+ │ [ Declarative Policy Engine ] ──► Spend caps & command allowlists │
41
+ │ [ Cryptographic Attestation ] ──► RFC 8785 Ed25519 Signed Receipts │
42
+ └───────────────────────────────────┬────────────────────────────────────┘
43
+ │
44
+ ┌────────────┴────────────┐
45
+ ▼ ▼
46
+ [ ALLOW ] [ DENY ]
47
+ │ │
48
+ ▼ ▼
49
+ [ Target System / DB / OS ] [ Execution Veto + Audit Evidence ]
50
+ ```
51
+
52
+ ### Core Capabilities:
53
+ - **Pre-Execution Gating**: Evaluates tool arguments, commands, and code strings before OS dispatch.
54
+ - **Polyglot AST Parsing**: Parses Abstract Syntax Trees across Python, SQL, Bash, JavaScript, and Go to block dangerous mutations (`rm -rf`, `DROP TABLE`, subshell escapes).
55
+ - **In-Flight Secret Scrubbing**: Detects and redacts credentials (`sk-*`, `ghp_*`, `AKIA*`, private keys) before they touch logs, providers, or vector stores.
56
+ - **Cryptographic Auditability**: Generates canonical RFC 8785 JSON digests signed with Ed25519 keys for tamper-proof verification.
57
+ - **Zero Network Overhead**: Evaluates locally inside the host process runtime without external API latency or second-model token billing.
58
+
59
+ ---
60
+
61
+ ## Quickstart
62
+
63
+ ### Python
64
+
65
+ ```bash
66
+ pip install btp-guard
67
+ ```
68
+
69
+ ```python
70
+ from btp_guard import Guard
71
+
72
+ guard = Guard(spend_cap=100.0, strict=True)
73
+
74
+ # 1. Protect any tool function via decorator
75
+ @guard.protect
76
+ def execute_shell(command: str):
77
+ return f"Executed: {command}"
78
+
79
+ # 2. Or check actions directly inline
80
+ result = guard.check("rm -rf /var/data")
81
+ if not result["allowed"]:
82
+ print(f"Blocked: {result['reason']}")
83
+ # Output: Blocked: BTP-AST-001: Catastrophic shell pattern detected
84
+ ```
85
+
86
+ ### Node.js / TypeScript
87
+
88
+ ```bash
89
+ npm install btp-guard
90
+ ```
91
+
92
+ ```typescript
93
+ import { Guard } from "btp-guard";
94
+
95
+ const guard = new Guard({ maxSpendUsd: 100.0 });
96
+ const verdict = guard.check("DROP TABLE users;");
97
+
98
+ if (!verdict.allowed) {
99
+ throw new Error(`Action blocked: ${verdict.reason}`);
100
+ }
101
+ ```
102
+
103
+ ---
104
+
105
+ ## MCP Server (Model Context Protocol)
106
+
107
+ Bartholomew provides a native Model Context Protocol (MCP) server for Claude Desktop, Cursor, Windsurf, and any MCP-compatible client:
108
+
109
+ ```json
110
+ {
111
+ "mcpServers": {
112
+ "bartholomew": {
113
+ "command": "python",
114
+ "args": ["-m", "src.mcp_server"]
115
+ }
116
+ }
117
+ }
118
+ ```
119
+
120
+ ---
121
+
122
+ ## Framework Integrations
123
+
124
+ Bartholomew provides drop-in runtime interceptors for all major agent orchestrators:
125
+
126
+ | Framework / Ecosystem | Integration Guard | Reference Guide |
127
+ |---|---|---|
128
+ | **OpenAI Agents SDK** | Dynamic Tool Gating & Schema Invariant Checks | [`docs/FRAMEWORK_GUIDE.md`](docs/FRAMEWORK_GUIDE.md) |
129
+ | **Anthropic Claude** | `ClaudeToolGuard` / Tool-Call Interceptor | [`docs/FRAMEWORK_GUIDE.md`](docs/FRAMEWORK_GUIDE.md) |
130
+ | **Microsoft AutoGen** | `@btp_autogen_guard` / Swarm Consensus Interceptor | [`examples/future_swarms/autogen_swarm_consensus.py`](examples/future_swarms/autogen_swarm_consensus.py) |
131
+ | **CrewAI** | `@btp_crewai_tool` / Task & Agent Boundary Gate | [`docs/FRAMEWORK_GUIDE.md`](docs/FRAMEWORK_GUIDE.md) |
132
+ | **LangChain / LangGraph** | `BTPGuardTool` / Node Execution Interceptor | [`docs/FRAMEWORK_GUIDE.md`](docs/FRAMEWORK_GUIDE.md) |
133
+ | **Cursor / VS Code** | Pre-execution IDE Sentry & Extension | [Open VSX Extension](https://open-vsx.org/extension/Bartholomew/bartholomew-guard-vscode) |
134
+
135
+ ---
136
+
137
+ ## Defense in Depth Architecture
138
+
139
+ Bartholomew functions as **Layer 2** in the autonomous agent defense stack:
140
+
141
+ | Layer | Technology | Typical Latency | Defense Boundary |
142
+ |---|---|---|---|
143
+ | **Layer 1 — Prompt Rails** | NeMo, Guardrails AI, LlamaGuard | 800ms – 2,500ms | Natural language prompt & completion text |
144
+ | **Layer 2 — Execution Gate** | **Bartholomew BTP** | **< 0.1 ms (Sub-millisecond)** | **Raw tool arguments, AST syntax, credentials, spend** |
145
+ | **Layer 3 — OS Isolation** | Docker, gVisor, E2B | 200ms – 500ms | Kernel syscall & container isolation |
146
+
147
+ ---
148
+
149
+ ## Audit & Compliance Readiness
150
+
151
+ Bartholomew generates tamper-evident audit evidence packs mapping to AICPA Trust Services Criteria (CC6.1, CC6.6, CC7.1) and ISO/IEC 27001:2022 (A.8.8, A.8.30):
152
+
153
+ ```bash
154
+ python scripts/generate_soc2_compliance_evidence.py
155
+ ```
156
+
157
+ Output: `docs/audit/soc2-compliance-evidence.json` containing SHA-256 Merkle proofs, RFC 8785 canonical digests, and Ed25519 digital signatures for zero-network independent auditor verification.
158
+
159
+ ---
160
+
161
+ ## Development & Test Suite
162
+
163
+ ```bash
164
+ # Clone repository
165
+ git clone https://github.com/bartholomew-ai/bartholomew.git
166
+ cd bartholomew
167
+
168
+ # Install dependencies
169
+ pip install -e ".[test]"
170
+
171
+ # Run full test suite (2,920 automated tests)
172
+ python -m pytest -q
173
+ ```
174
+
175
+ ---
176
+
177
+ ## Documentation
178
+
179
+ - [`docs/quickstart.md`](docs/quickstart.md) — Full setup and configuration guide
180
+ - [`docs/threat-model.md`](docs/threat-model.md) — Threat model and security boundaries
181
+ - [`docs/btp-protocol-spec.md`](docs/btp-protocol-spec.md) — BTP wire protocol specification
182
+ - [`docs/FRAMEWORK_GUIDE.md`](docs/FRAMEWORK_GUIDE.md) — Framework adapter documentation
183
+ - [`SECURITY.md`](SECURITY.md) — Vulnerability disclosure policy
184
+ - [`CONTRIBUTING.md`](CONTRIBUTING.md) — Contributing guidelines
185
+
186
+ ---
187
+
188
+ ## License
189
+
190
+ Bartholomew is distributed under the [MIT License](LICENSE).
@@ -0,0 +1,224 @@
1
+ Metadata-Version: 2.4
2
+ Name: btp-guard
3
+ Version: 1.0.0
4
+ Summary: Bartholomew Trust Protocol (BTP v1.0.0) - Sub-35us in-process execution gating, AST inspection, cryptographic audit trails, and tool-call security for autonomous AI agents.
5
+ Author-email: Itsub Alemayehu <security@bartholomew.info>
6
+ License: MIT
7
+ Project-URL: Homepage, https://bartholomew.info
8
+ Project-URL: Documentation, https://bartholomew.info#sdk
9
+ Project-URL: Repository, https://github.com/bartholomew-ai/bartholomew
10
+ Project-URL: Tracker, https://github.com/bartholomew-ai/bartholomew/issues
11
+ Keywords: ai-safety,agent-guardrails,security,ast-analysis,agent-security,prompt-injection-defense,tool-call-validation,mcp-guard,autonomous-agents,llm-security,mcp,claude,cursor,langchain,crewai,autogen,openai-agents,ed25519
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.14
21
+ Classifier: Topic :: Security
22
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
23
+ Requires-Python: >=3.10
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Requires-Dist: cryptography>=42.0.0
27
+ Requires-Dist: pyyaml>=6.0
28
+ Provides-Extra: fastapi
29
+ Requires-Dist: fastapi>=0.100.0; extra == "fastapi"
30
+ Requires-Dist: uvicorn>=0.22.0; extra == "fastapi"
31
+ Provides-Extra: test
32
+ Requires-Dist: pytest>=7.0.0; extra == "test"
33
+ Dynamic: license-file
34
+
35
+ <p align="center">
36
+ <img src="packages/vscode-extension/icon.png" width="140" alt="Bartholomew Shield Logo" />
37
+ </p>
38
+
39
+ # Bartholomew (BTP v1.0.0) — In-Process Runtime Execution Gateway for Autonomous AI Agents
40
+
41
+ **Deterministic AST Policy Invariant Gating, In-Flight Secret Masking, and Cryptographic Attestation for Autonomous AI Agent Swarms.**
42
+
43
+ [![CI](https://github.com/bartholomew-ai/bartholomew/actions/workflows/ci.yml/badge.svg)](https://github.com/bartholomew-ai/bartholomew/actions/workflows/ci.yml)
44
+ [![Open VSX](https://img.shields.io/badge/Open%20VSX-v1.0.0-blue?logo=visualstudiocode)](https://open-vsx.org/extension/Bartholomew/bartholomew-guard-vscode)
45
+ [![PyPI](https://img.shields.io/pypi/v/btp-guard?logo=pypi&logoColor=white)](https://pypi.org/project/btp-guard/)
46
+ [![npm](https://img.shields.io/npm/v/btp-guard?logo=npm&logoColor=white)](https://www.npmjs.com/package/btp-guard)
47
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
48
+ [![Tests](https://img.shields.io/badge/tests-2920%20passing-brightgreen)](tests/)
49
+
50
+ [![OpenAI](https://img.shields.io/badge/OpenAI-Agents%20SDK-10A37F?logo=openai&logoColor=white)](examples/README.md)
51
+ [![Anthropic](https://img.shields.io/badge/Anthropic-Claude%20Tool%20Guard-D97706?logo=anthropic&logoColor=white)](examples/README.md)
52
+ [![LangChain](https://img.shields.io/badge/LangChain-Runtime%20Guard-1C3C3C?logo=langchain&logoColor=white)](examples/README.md)
53
+ [![CrewAI](https://img.shields.io/badge/CrewAI-Agent%20Guard-FF4B4B)](examples/README.md)
54
+ [![AutoGen](https://img.shields.io/badge/Microsoft-AutoGen%20Swarm-00A4EF?logo=microsoft&logoColor=white)](examples/README.md)
55
+ [![IDE](https://img.shields.io/badge/IDE-Cursor%20%2F%20VS%20Code-7C3AED?logo=githubcopilot&logoColor=white)](https://open-vsx.org/extension/Bartholomew/bartholomew-guard-vscode)
56
+
57
+ ---
58
+
59
+ ## What It Does
60
+
61
+ Bartholomew is the execution gate for autonomous AI agents.
62
+
63
+ It sits between an agent and real-world execution (shell, SQL, file I/O, cloud APIs) and decides whether proposed actions should be allowed before they execute.
64
+
65
+ ```
66
+ [ Autonomous Agent / LLM ]
67
+ │
68
+ ▼ (Proposes Tool Call / Bash / SQL)
69
+ ┌────────────────────────────────────────────────────────────────────────┐
70
+ │ Bartholomew In-Process Runtime Gateway │
71
+ │ │
72
+ │ [ Polyglot AST Invariant Gate ] ──► Sub-millisecond syntax check │
73
+ │ [ In-Flight Secret Vault ] ──► Real-time credential scrubbing │
74
+ │ [ Declarative Policy Engine ] ──► Spend caps & command allowlists │
75
+ │ [ Cryptographic Attestation ] ──► RFC 8785 Ed25519 Signed Receipts │
76
+ └───────────────────────────────────┬────────────────────────────────────┘
77
+ │
78
+ ┌────────────┴────────────┐
79
+ ▼ ▼
80
+ [ ALLOW ] [ DENY ]
81
+ │ │
82
+ ▼ ▼
83
+ [ Target System / DB / OS ] [ Execution Veto + Audit Evidence ]
84
+ ```
85
+
86
+ ### Core Capabilities:
87
+ - **Pre-Execution Gating**: Evaluates tool arguments, commands, and code strings before OS dispatch.
88
+ - **Polyglot AST Parsing**: Parses Abstract Syntax Trees across Python, SQL, Bash, JavaScript, and Go to block dangerous mutations (`rm -rf`, `DROP TABLE`, subshell escapes).
89
+ - **In-Flight Secret Scrubbing**: Detects and redacts credentials (`sk-*`, `ghp_*`, `AKIA*`, private keys) before they touch logs, providers, or vector stores.
90
+ - **Cryptographic Auditability**: Generates canonical RFC 8785 JSON digests signed with Ed25519 keys for tamper-proof verification.
91
+ - **Zero Network Overhead**: Evaluates locally inside the host process runtime without external API latency or second-model token billing.
92
+
93
+ ---
94
+
95
+ ## Quickstart
96
+
97
+ ### Python
98
+
99
+ ```bash
100
+ pip install btp-guard
101
+ ```
102
+
103
+ ```python
104
+ from btp_guard import Guard
105
+
106
+ guard = Guard(spend_cap=100.0, strict=True)
107
+
108
+ # 1. Protect any tool function via decorator
109
+ @guard.protect
110
+ def execute_shell(command: str):
111
+ return f"Executed: {command}"
112
+
113
+ # 2. Or check actions directly inline
114
+ result = guard.check("rm -rf /var/data")
115
+ if not result["allowed"]:
116
+ print(f"Blocked: {result['reason']}")
117
+ # Output: Blocked: BTP-AST-001: Catastrophic shell pattern detected
118
+ ```
119
+
120
+ ### Node.js / TypeScript
121
+
122
+ ```bash
123
+ npm install btp-guard
124
+ ```
125
+
126
+ ```typescript
127
+ import { Guard } from "btp-guard";
128
+
129
+ const guard = new Guard({ maxSpendUsd: 100.0 });
130
+ const verdict = guard.check("DROP TABLE users;");
131
+
132
+ if (!verdict.allowed) {
133
+ throw new Error(`Action blocked: ${verdict.reason}`);
134
+ }
135
+ ```
136
+
137
+ ---
138
+
139
+ ## MCP Server (Model Context Protocol)
140
+
141
+ Bartholomew provides a native Model Context Protocol (MCP) server for Claude Desktop, Cursor, Windsurf, and any MCP-compatible client:
142
+
143
+ ```json
144
+ {
145
+ "mcpServers": {
146
+ "bartholomew": {
147
+ "command": "python",
148
+ "args": ["-m", "src.mcp_server"]
149
+ }
150
+ }
151
+ }
152
+ ```
153
+
154
+ ---
155
+
156
+ ## Framework Integrations
157
+
158
+ Bartholomew provides drop-in runtime interceptors for all major agent orchestrators:
159
+
160
+ | Framework / Ecosystem | Integration Guard | Reference Guide |
161
+ |---|---|---|
162
+ | **OpenAI Agents SDK** | Dynamic Tool Gating & Schema Invariant Checks | [`docs/FRAMEWORK_GUIDE.md`](docs/FRAMEWORK_GUIDE.md) |
163
+ | **Anthropic Claude** | `ClaudeToolGuard` / Tool-Call Interceptor | [`docs/FRAMEWORK_GUIDE.md`](docs/FRAMEWORK_GUIDE.md) |
164
+ | **Microsoft AutoGen** | `@btp_autogen_guard` / Swarm Consensus Interceptor | [`examples/future_swarms/autogen_swarm_consensus.py`](examples/future_swarms/autogen_swarm_consensus.py) |
165
+ | **CrewAI** | `@btp_crewai_tool` / Task & Agent Boundary Gate | [`docs/FRAMEWORK_GUIDE.md`](docs/FRAMEWORK_GUIDE.md) |
166
+ | **LangChain / LangGraph** | `BTPGuardTool` / Node Execution Interceptor | [`docs/FRAMEWORK_GUIDE.md`](docs/FRAMEWORK_GUIDE.md) |
167
+ | **Cursor / VS Code** | Pre-execution IDE Sentry & Extension | [Open VSX Extension](https://open-vsx.org/extension/Bartholomew/bartholomew-guard-vscode) |
168
+
169
+ ---
170
+
171
+ ## Defense in Depth Architecture
172
+
173
+ Bartholomew functions as **Layer 2** in the autonomous agent defense stack:
174
+
175
+ | Layer | Technology | Typical Latency | Defense Boundary |
176
+ |---|---|---|---|
177
+ | **Layer 1 — Prompt Rails** | NeMo, Guardrails AI, LlamaGuard | 800ms – 2,500ms | Natural language prompt & completion text |
178
+ | **Layer 2 — Execution Gate** | **Bartholomew BTP** | **< 0.1 ms (Sub-millisecond)** | **Raw tool arguments, AST syntax, credentials, spend** |
179
+ | **Layer 3 — OS Isolation** | Docker, gVisor, E2B | 200ms – 500ms | Kernel syscall & container isolation |
180
+
181
+ ---
182
+
183
+ ## Audit & Compliance Readiness
184
+
185
+ Bartholomew generates tamper-evident audit evidence packs mapping to AICPA Trust Services Criteria (CC6.1, CC6.6, CC7.1) and ISO/IEC 27001:2022 (A.8.8, A.8.30):
186
+
187
+ ```bash
188
+ python scripts/generate_soc2_compliance_evidence.py
189
+ ```
190
+
191
+ Output: `docs/audit/soc2-compliance-evidence.json` containing SHA-256 Merkle proofs, RFC 8785 canonical digests, and Ed25519 digital signatures for zero-network independent auditor verification.
192
+
193
+ ---
194
+
195
+ ## Development & Test Suite
196
+
197
+ ```bash
198
+ # Clone repository
199
+ git clone https://github.com/bartholomew-ai/bartholomew.git
200
+ cd bartholomew
201
+
202
+ # Install dependencies
203
+ pip install -e ".[test]"
204
+
205
+ # Run full test suite (2,920 automated tests)
206
+ python -m pytest -q
207
+ ```
208
+
209
+ ---
210
+
211
+ ## Documentation
212
+
213
+ - [`docs/quickstart.md`](docs/quickstart.md) — Full setup and configuration guide
214
+ - [`docs/threat-model.md`](docs/threat-model.md) — Threat model and security boundaries
215
+ - [`docs/btp-protocol-spec.md`](docs/btp-protocol-spec.md) — BTP wire protocol specification
216
+ - [`docs/FRAMEWORK_GUIDE.md`](docs/FRAMEWORK_GUIDE.md) — Framework adapter documentation
217
+ - [`SECURITY.md`](SECURITY.md) — Vulnerability disclosure policy
218
+ - [`CONTRIBUTING.md`](CONTRIBUTING.md) — Contributing guidelines
219
+
220
+ ---
221
+
222
+ ## License
223
+
224
+ Bartholomew is distributed under the [MIT License](LICENSE).