eif-engine 4.1.0__tar.gz → 4.3.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 (223) hide show
  1. {eif_engine-4.1.0 → eif_engine-4.3.0}/.env.example +8 -0
  2. {eif_engine-4.1.0 → eif_engine-4.3.0}/CHANGELOG.md +84 -0
  3. {eif_engine-4.1.0 → eif_engine-4.3.0}/DATA_PROCESSING_AGREEMENT.md +4 -3
  4. {eif_engine-4.1.0 → eif_engine-4.3.0}/LEGAL.md +2 -2
  5. {eif_engine-4.1.0 → eif_engine-4.3.0}/PKG-INFO +139 -66
  6. {eif_engine-4.1.0 → eif_engine-4.3.0}/PRIVACY_POLICY.md +26 -3
  7. {eif_engine-4.1.0 → eif_engine-4.3.0}/README.md +130 -60
  8. {eif_engine-4.1.0 → eif_engine-4.3.0}/SECURITY.md +32 -0
  9. {eif_engine-4.1.0 → eif_engine-4.3.0}/deploy/do_app_spec.yaml +11 -1
  10. eif_engine-4.3.0/dev_factory/standard_ei_01_nist_ai_risk_management_framework/bind.py +24 -0
  11. eif_engine-4.3.0/dev_factory/standard_ei_01_nist_ai_risk_management_framework/test_bind.py +34 -0
  12. {eif_engine-4.1.0 → eif_engine-4.3.0}/docs/architecture.md +5 -3
  13. eif_engine-4.3.0/docs/eif_host_tenant_keys_tech_spec.md +138 -0
  14. eif_engine-4.3.0/docs/integrations/CLAUDE_CODE.md +205 -0
  15. eif_engine-4.3.0/docs/integrations/CLAUDE_DESKTOP.md +157 -0
  16. eif_engine-4.3.0/docs/integrations/COMPLYEDGE.md +170 -0
  17. eif_engine-4.3.0/docs/integrations/CURSOR.md +184 -0
  18. eif_engine-4.3.0/docs/integrations/HOST_APP.md +118 -0
  19. eif_engine-4.3.0/docs/integrations/README.md +95 -0
  20. {eif_engine-4.1.0 → eif_engine-4.3.0}/docs/research_foundation.md +3 -5
  21. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/__init__.py +1 -1
  22. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/cost_model/cost_ledger.py +1 -0
  23. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/eif_engine_intent.yaml +1 -2
  24. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/falsify/eif_evidence_collection_intent.yaml +1 -1
  25. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/falsify/native_tools.py +1 -1
  26. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/input_guard/eif_input_guard_intent.yaml +2 -2
  27. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/integration/interceptor.py +9 -5
  28. eif_engine-4.3.0/eif/mcp_server/auth.py +189 -0
  29. eif_engine-4.3.0/eif/mcp_server/compliance.py +285 -0
  30. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/mcp_server/http_server.py +90 -7
  31. eif_engine-4.3.0/eif/mcp_server/runtime_compliance_intent.yaml +159 -0
  32. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/mcp_server/server.py +277 -44
  33. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/schemas.py +10 -1
  34. eif_engine-4.3.0/eif/session.py +116 -0
  35. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/sycophancy/cost_model.py +1 -2
  36. {eif_engine-4.1.0 → eif_engine-4.3.0}/index.html +2 -2
  37. {eif_engine-4.1.0 → eif_engine-4.3.0}/pyproject.toml +9 -5
  38. {eif_engine-4.1.0 → eif_engine-4.3.0}/scripts/compliance/runtime_check.sh +11 -0
  39. {eif_engine-4.1.0 → eif_engine-4.3.0}/server.json +2 -14
  40. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/integration/test_mcp_server.py +72 -4
  41. eif_engine-4.3.0/tests/unit/test_complyedge_cold_start.py +60 -0
  42. eif_engine-4.3.0/tests/unit/test_cost_ledger.py +31 -0
  43. eif_engine-4.3.0/tests/unit/test_integration_interceptor_langchain.py +33 -0
  44. eif_engine-4.3.0/tests/unit/test_runtime_check_attribution.py +69 -0
  45. eif_engine-4.3.0/tests/unit/test_runtime_compliance.py +364 -0
  46. eif_engine-4.3.0/tests/unit/test_sdk_interceptor.py +62 -0
  47. eif_engine-4.3.0/tests/unit/test_tenant_keys.py +353 -0
  48. eif_engine-4.3.0/tests/unit/test_verify_zero_evidence_revise.py +60 -0
  49. {eif_engine-4.1.0 → eif_engine-4.3.0}/validation/CORPUS_REPORT.md +1 -6
  50. eif_engine-4.1.0/docs/integrations/COMPLYEDGE.md +0 -99
  51. eif_engine-4.1.0/eif/mcp_server/auth.py +0 -81
  52. eif_engine-4.1.0/eif/session.py +0 -40
  53. {eif_engine-4.1.0 → eif_engine-4.3.0}/.dockerignore +0 -0
  54. {eif_engine-4.1.0 → eif_engine-4.3.0}/.github/CODEOWNERS +0 -0
  55. {eif_engine-4.1.0 → eif_engine-4.3.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  56. {eif_engine-4.1.0 → eif_engine-4.3.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  57. {eif_engine-4.1.0 → eif_engine-4.3.0}/.github/dependabot.yml +0 -0
  58. {eif_engine-4.1.0 → eif_engine-4.3.0}/.github/pull_request_template.md +0 -0
  59. {eif_engine-4.1.0 → eif_engine-4.3.0}/.github/workflows/ci.yml +0 -0
  60. {eif_engine-4.1.0 → eif_engine-4.3.0}/.gitignore +0 -0
  61. {eif_engine-4.1.0 → eif_engine-4.3.0}/.pre-commit-config.yaml +0 -0
  62. {eif_engine-4.1.0 → eif_engine-4.3.0}/.trustlint.yaml +0 -0
  63. {eif_engine-4.1.0 → eif_engine-4.3.0}/CODE_OF_CONDUCT.md +0 -0
  64. {eif_engine-4.1.0 → eif_engine-4.3.0}/CONTRIBUTING.md +0 -0
  65. {eif_engine-4.1.0 → eif_engine-4.3.0}/DECISIONS.md +0 -0
  66. {eif_engine-4.1.0 → eif_engine-4.3.0}/Dockerfile +0 -0
  67. {eif_engine-4.1.0 → eif_engine-4.3.0}/LICENSE +0 -0
  68. {eif_engine-4.1.0 → eif_engine-4.3.0}/NOTICE +0 -0
  69. {eif_engine-4.1.0 → eif_engine-4.3.0}/TERMS_OF_SERVICE.md +0 -0
  70. {eif_engine-4.1.0 → eif_engine-4.3.0}/docs/compliance.md +0 -0
  71. {eif_engine-4.1.0 → eif_engine-4.3.0}/docs/eif_causal_gate_v4_tech_spec.md +0 -0
  72. {eif_engine-4.1.0 → eif_engine-4.3.0}/docs/eif_s17_s18_s19_tech_spec.md +0 -0
  73. {eif_engine-4.1.0 → eif_engine-4.3.0}/docs/eif_v2_tech_spec.md +0 -0
  74. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/auto.py +0 -0
  75. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/calibrate/__init__.py +0 -0
  76. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/calibrate/bayesian.py +0 -0
  77. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/calibrate/conformal.py +0 -0
  78. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/calibrate/domain_constraints.py +0 -0
  79. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/calibrate/ece.py +0 -0
  80. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/calibrate/prior_strategy.py +0 -0
  81. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/calibrate/trust.py +0 -0
  82. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/causal_gate/__init__.py +0 -0
  83. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/causal_gate/confound.py +0 -0
  84. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/causal_gate/direction.py +0 -0
  85. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/causal_gate/eif_causal_gate_v4_intent.yaml +0 -0
  86. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/causal_gate/evidence_probe.py +0 -0
  87. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/causal_gate/intervention.py +0 -0
  88. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/causal_gate/iris_pipeline.py +0 -0
  89. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/causal_gate/verdict.py +0 -0
  90. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/challenge/__init__.py +0 -0
  91. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/challenge/diversity.py +0 -0
  92. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/challenge/eif_multi_critic_intent.yaml +0 -0
  93. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/challenge/multi_critic.py +0 -0
  94. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/challenge/protocol.py +0 -0
  95. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/challenge/replicator.py +0 -0
  96. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/cost_model/__init__.py +0 -0
  97. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/cost_model/catch_rate_empirical.py +0 -0
  98. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/cost_model/eif_catchrate_intent.yaml +0 -0
  99. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/declare/__init__.py +0 -0
  100. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/declare/extractor.py +0 -0
  101. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/declare/harking_guard.py +0 -0
  102. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/declare/registry.py +0 -0
  103. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/eif_v2_intent.yaml +0 -0
  104. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/eif_v3_intent.yaml +0 -0
  105. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/explain/__init__.py +0 -0
  106. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/explain/artifact.py +0 -0
  107. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/explain/eif_explain_coldstart_intent.yaml +0 -0
  108. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/explain/hard_to_vary.py +0 -0
  109. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/explain/reach.py +0 -0
  110. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/falsify/__init__.py +0 -0
  111. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/falsify/condition.py +0 -0
  112. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/falsify/eif_native_tools_intent.yaml +0 -0
  113. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/falsify/eif_v5_evidence_trust_weighting_intent.yaml +0 -0
  114. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/falsify/evidence_collector.py +0 -0
  115. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/falsify/hard_to_vary.py +0 -0
  116. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/falsify/sprt.py +0 -0
  117. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/falsify/trivial_check.py +0 -0
  118. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/hypothesis_agenda/__init__.py +0 -0
  119. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/hypothesis_agenda/agenda.py +0 -0
  120. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/hypothesis_agenda/eif_hypothesis_agenda_intent.yaml +0 -0
  121. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/hypothesis_agenda/fdr.py +0 -0
  122. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/hypothesis_agenda/scorer.py +0 -0
  123. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/input_guard/__init__.py +0 -0
  124. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/input_guard/detector.py +0 -0
  125. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/integration/__init__.py +0 -0
  126. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/integration/eif_auto.py +0 -0
  127. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/mcp_server/__init__.py +0 -0
  128. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/mcp_server/resources.py +0 -0
  129. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/memory/__init__.py +0 -0
  130. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/memory/strategy.py +0 -0
  131. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/programme/__init__.py +0 -0
  132. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/programme/monitor.py +0 -0
  133. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/programme/principle_memory.py +0 -0
  134. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/programme/principle_revision.py +0 -0
  135. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/programme/signals.py +0 -0
  136. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/programme/status.py +0 -0
  137. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/py.typed +0 -0
  138. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/record/__init__.py +0 -0
  139. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/record/chain.py +0 -0
  140. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/record/compliance.py +0 -0
  141. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/record/isc_disclosure.py +0 -0
  142. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/record/outcome_store.py +0 -0
  143. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/record/provenance.py +0 -0
  144. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/record/research_object.py +0 -0
  145. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/replicate/__init__.py +0 -0
  146. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/replicate/divergence.py +0 -0
  147. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/replicate/eif_independent_replication_intent.yaml +0 -0
  148. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/replicate/independent.py +0 -0
  149. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/replicate/protocol.py +0 -0
  150. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/reporting/__init__.py +0 -0
  151. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/reporting/pdf_renderer.py +0 -0
  152. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/sdk/__init__.py +0 -0
  153. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/sdk/exceptions.py +0 -0
  154. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/sdk/interceptor.py +0 -0
  155. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/sycophancy/__init__.py +0 -0
  156. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/sycophancy/detector.py +0 -0
  157. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/sycophancy/drift.py +0 -0
  158. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/sycophancy/eif_sycophancy_intent.yaml +0 -0
  159. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/sycophancy/faithfulness.py +0 -0
  160. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/sycophancy/framing.py +0 -0
  161. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/update/__init__.py +0 -0
  162. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/update/eig.py +0 -0
  163. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/update/paradigm.py +0 -0
  164. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/update/posterior.py +0 -0
  165. {eif_engine-4.1.0 → eif_engine-4.3.0}/eif/update/stopping.py +0 -0
  166. {eif_engine-4.1.0 → eif_engine-4.3.0}/examples/quickstart.py +0 -0
  167. {eif_engine-4.1.0 → eif_engine-4.3.0}/research/README.md +0 -0
  168. {eif_engine-4.1.0 → eif_engine-4.3.0}/research/ai_agents/calibration.md +0 -0
  169. {eif_engine-4.1.0 → eif_engine-4.3.0}/research/ai_agents/causal_reasoning.md +0 -0
  170. {eif_engine-4.1.0 → eif_engine-4.3.0}/research/ai_agents/hypothesis_generation.md +0 -0
  171. {eif_engine-4.1.0 → eif_engine-4.3.0}/research/ai_agents/multi_agent_review.md +0 -0
  172. {eif_engine-4.1.0 → eif_engine-4.3.0}/research/ai_agents/overview.md +0 -0
  173. {eif_engine-4.1.0 → eif_engine-4.3.0}/research/ai_agents/provenance.md +0 -0
  174. {eif_engine-4.1.0 → eif_engine-4.3.0}/research/foundations/ai_and_science.md +0 -0
  175. {eif_engine-4.1.0 → eif_engine-4.3.0}/research/foundations/classical_method.md +0 -0
  176. {eif_engine-4.1.0 → eif_engine-4.3.0}/research/foundations/deutsch_epistemology.md +0 -0
  177. {eif_engine-4.1.0 → eif_engine-4.3.0}/research/foundations/frontier_debates.md +0 -0
  178. {eif_engine-4.1.0 → eif_engine-4.3.0}/research/foundations/philosophy_of_science.md +0 -0
  179. {eif_engine-4.1.0 → eif_engine-4.3.0}/research/foundations/replication_crisis.md +0 -0
  180. {eif_engine-4.1.0 → eif_engine-4.3.0}/research/foundations/statistics.md +0 -0
  181. {eif_engine-4.1.0 → eif_engine-4.3.0}/research/sycophancy_bias_research.md +0 -0
  182. {eif_engine-4.1.0 → eif_engine-4.3.0}/scripts/compliance/check.sh +0 -0
  183. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/__init__.py +0 -0
  184. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/conftest.py +0 -0
  185. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/integration/__init__.py +0 -0
  186. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/integration/test_eif_loop.py +0 -0
  187. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/__init__.py +0 -0
  188. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/test_calibrate.py +0 -0
  189. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/test_catch_rate_empirical.py +0 -0
  190. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/test_causal_gate.py +0 -0
  191. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/test_dases_adaptive.py +0 -0
  192. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/test_dases_replicator.py +0 -0
  193. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/test_declare.py +0 -0
  194. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/test_deeptrace_live.py +0 -0
  195. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/test_ece_v2.py +0 -0
  196. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/test_evidence_trust_weighting.py +0 -0
  197. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/test_explain.py +0 -0
  198. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/test_exploratory_confirmatory.py +0 -0
  199. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/test_falsify.py +0 -0
  200. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/test_fdr.py +0 -0
  201. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/test_framing_elephant.py +0 -0
  202. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/test_hard_to_vary.py +0 -0
  203. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/test_host_tool_numeric.py +0 -0
  204. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/test_http_rate_limit.py +0 -0
  205. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/test_independent_replication.py +0 -0
  206. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/test_iris_pipeline.py +0 -0
  207. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/test_isc_disclosure.py +0 -0
  208. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/test_memory.py +0 -0
  209. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/test_monica_drift.py +0 -0
  210. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/test_native_tools_nt3.py +0 -0
  211. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/test_outcome_store.py +0 -0
  212. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/test_p1_sandbox_security.py +0 -0
  213. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/test_paradigm.py +0 -0
  214. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/test_principle_memory.py +0 -0
  215. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/test_principle_revision.py +0 -0
  216. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/test_programme.py +0 -0
  217. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/test_record.py +0 -0
  218. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/test_replicate.py +0 -0
  219. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/test_research_object.py +0 -0
  220. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/test_schemas.py +0 -0
  221. {eif_engine-4.1.0 → eif_engine-4.3.0}/tests/unit/test_update.py +0 -0
  222. {eif_engine-4.1.0 → eif_engine-4.3.0}/validation/EIF_INVESTMENT_V31_EVIDENCE.md +0 -0
  223. {eif_engine-4.1.0 → eif_engine-4.3.0}/validation/data/.gitkeep +0 -0
@@ -8,3 +8,11 @@ EIF_API_KEY=
8
8
 
9
9
  # Optional. Enables the LLM critic tournament (CHALLENGE) and the causal evidence probe. The core engine never calls an LLM.
10
10
  OPENAI_API_KEY=
11
+
12
+ # Optional. ComplyEdge runtime screening of every tool call and /verify request
13
+ # (docs/integrations/COMPLYEDGE.md). Leave unset and EIF makes no ComplyEdge call.
14
+ COMPLYEDGE_API_KEY=
15
+ # COMPLYEDGE_API_URL=https://api.complyedge.io
16
+ # COMPLYEDGE_AGENT_ID=eif-mcp
17
+ # COMPLYEDGE_JURISDICTION=EU
18
+ # COMPLYEDGE_TIMEOUT_S=5
@@ -7,6 +7,90 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [4.3.0] - 2026-11-20
11
+
12
+ ### Changed
13
+ - `eif_verify` returns REVISE, not PASS, when nothing contradicts but a checked
14
+ claim stays below posterior 0.70 (no evidence leaves it at 0.5). PASS now
15
+ means every checked claim reached 0.70. Same thresholds as `eif_calibrate`.
16
+ Callers that only check for HALT keep working. Rules block v1.5.
17
+
18
+ ### Added
19
+ - `[search]` extra installs `ddgs` for P3 web search. Kept opt-in because it
20
+ sends claim-derived search terms off the machine.
21
+ - Host-derived tenant keys: one self-hosted HTTP server can serve many tenants,
22
+ each with its own sessions and a three-tool allowlist. See
23
+ `docs/integrations/HOST_APP.md`.
24
+
25
+ ### Fixed
26
+ - The `eif_verify` tool description gave a `host_tool_outputs` shape the code
27
+ ignores; it now gives `{tool_name, query, result, data_scope}`.
28
+ - Removed the claim that `eif_verify` catches correlation presented as causation
29
+ from the server instructions and the `eif_verify` description (4.2.0 removed
30
+ it from the README only).
31
+ - Docs: a plain install has no evidence source; web search needs `ddgs`;
32
+ `pip install eif` is a different project.
33
+ - Docs: Claude Desktop does not connect a remote `url` from its config file;
34
+ the hosted option now uses the `mcp-remote` bridge with the key in `env`.
35
+ - README corpus table: noted that the verdict columns add to 75 of 84 turns.
36
+ - serverInfo reports EIF's version, not the mcp library's.
37
+ - `eif.integration.EIFInterceptor` failed on langchain 1.x
38
+ (`No module named 'langchain.callbacks'`); it now imports from
39
+ `langchain_core` and needs only `langchain-core`. The README example passes
40
+ `get_langchain_handler()` and sets `intercept_chains=True` for chains.
41
+
42
+ ## [4.2.0] - 2026-11-05
43
+
44
+ ### Fixed
45
+ - The published MCP install failed with ImportError: `mcp` is an extra, and the
46
+ 4.1.0 metadata allowed mcp 2.x. Install lines now use `eif-engine[mcp]`, and
47
+ the extra is pinned to `mcp>=1.19,<2`.
48
+ - Removed the claim that `eif_verify` catches correlation presented as causation.
49
+ `eif_causal_gate` does that.
50
+
51
+ - **ComplyEdge checks wait 15 s by default (was 5).** A cold ComplyEdge instance answers in
52
+ about 8 s; with 5 s the check was skipped, so the caller lost the verdict and the Log ID
53
+ of a record ComplyEdge had written. `COMPLYEDGE_TIMEOUT_S` still overrides it.
54
+ ### Added
55
+ - ComplyEdge runtime screening on the MCP server and `/verify`. With
56
+ `COMPLYEDGE_API_KEY` set, every tool call (all 25 tools, through one
57
+ dispatch, `ComplianceFastMCP.call_tool`) and every `/verify` request is
58
+ checked through `POST /v1/check` twice: the input before it runs and the
59
+ result before it returns. A block returns the rule instead of the answer
60
+ (`HALT` with routing `COMPLYEDGE_BLOCKED` on `/verify`). Fail-open when
61
+ ComplyEdge is unreachable; no call at all without the key. Audit fields:
62
+ `user_id` is `eifkey:<sha256 prefix>` of the caller's key (never the key)
63
+ or `local:<login>`, `user_role` is `mcp_client` / `sdk_client` /
64
+ `maintainer`, `session_id` is the EIF or MCP session.
65
+ A call made before any session exists (`eif_new_session`) records the
66
+ session it created on its output check, so it links to the calls after it.
67
+ - The CI runtime probe sends `user_id`, `user_role` and `session_id`.
68
+ - ComplyEdge Log IDs reach the caller. Every checked MCP tool call returns
69
+ `_meta["complyedge"] = {input_event_id, output_event_id}`, and `/verify`
70
+ returns them as `complyedge-input-event-id` / `complyedge-output-event-id`
71
+ headers, both outside the checked text, which is returned byte for byte.
72
+ Log IDs of calls on an EIF session are listed on it, copied onto the
73
+ `ProvenanceRecord` (`complyedge_event_ids`) by `eif_record` and printed by
74
+ `eif_compliance_report`. With the caller's copy of the text, each one
75
+ verifies through ComplyEdge `POST /v1/audit/verify`.
76
+
77
+ ### Fixed
78
+ - `eif_check_rules_installed` no longer reports a definitive miss when the MCP
79
+ server cannot read any paths (hosted endpoint / wrong CWD). Returns
80
+ `indeterminate=true` and `reachable_filesystem=false` with a clear `note`.
81
+ - Hosted-safe path: optional `file_content` (+ `file_content_label`) lets the
82
+ agent Read a local rules file and forward its text for marker detection.
83
+ - Pin optional `mcp` extra to `>=1.0,<2` so CI/installs do not pull MCP SDK
84
+ v2 (FastMCP → MCPServer rename) and break `from mcp.server.fastmcp import FastMCP`.
85
+
86
+ ### Changed
87
+ - Privacy Policy v1.2 and DPA template v1.1 describe the ComplyEdge flow.
88
+ - `mcp` minimum raised to 1.19 (tools return `CallToolResult` with `_meta`).
89
+ - Privacy Policy v1.3: ComplyEdge keeps a keyed fingerprint and pseudonymous
90
+ IDs for 184 days, and the Log IDs come back to the caller.
91
+ - `eif_explain` tool description now documents required detail keys
92
+ (`detail_text`, `prediction_impact`).
93
+
10
94
  ## [4.1.0] - 2026-07-19
11
95
 
12
96
  ### Added
@@ -1,6 +1,6 @@
1
1
  # Data Processing Agreement (Template)
2
2
 
3
- > **Version:** 1.0 · **Effective:** 2026-07-17
3
+ > **Version:** 1.1 · **Effective:** 2026-10-01
4
4
  >
5
5
  > **Template. Not in force.** EIF's maintainer does not process user data (see
6
6
  > [PRIVACY_POLICY.md](PRIVACY_POLICY.md)), so no DPA with the maintainer exists or is
@@ -42,8 +42,8 @@ collection, Bayesian calibration, routing (ACT/REVISE/HALT), and generation of
42
42
  provenance records, together with storage of the resulting local artifacts.
43
43
 
44
44
  `[ADAPT: describe your deployment's actual purpose and any enabled optional features,
45
- including outbound evidence collection (DuckDuckGo) and OpenAI-backed critique, which
46
- transmit claim text to those third parties.]`
45
+ including outbound evidence collection (DuckDuckGo), OpenAI-backed critique and
46
+ ComplyEdge runtime screening, which transmit claim text to those third parties.]`
47
47
 
48
48
  ---
49
49
 
@@ -102,6 +102,7 @@ Authorized sub-processors at signature:
102
102
  | Sub-processor | Role | Condition |
103
103
  |---------------|------|-----------|
104
104
  | `[e.g., OpenAI]` | `[Critic tournament and causal evidence probe, only if enabled]` | `[Data processing terms reference]` |
105
+ | `[e.g., ComplyEdge]` | `[EU AI Act screening of tool inputs and results, only if COMPLYEDGE_API_KEY is set; stores a keyed HMAC-SHA-256 fingerprint of the text, not the text]` | `[https://complyedge.io/legal/data-processing-agreement.html]` |
105
106
  | `[e.g., search provider]` | `[Web evidence collection, only if enabled]` | `[Terms reference]` |
106
107
  | `[hosting/infrastructure]` | `[Infrastructure for the deployment]` | `[DPA reference]` |
107
108
 
@@ -95,8 +95,8 @@ EIF's documentation references quantified figures. Their scope and evidentiary b
95
95
  | Claim | Source | Scope | Limitation |
96
96
  |-------|--------|-------|------------|
97
97
  | Validation corpus results (routing counts, detector fires) | 14-scenario validation corpus | **Constructed, illustrative scenarios** authored by the maintainer | Not real agent traffic; not a measurement of production behavior |
98
- | "$7,220,000 conservative cost saved" (and all per-scenario dollar figures) | Corpus cost model | **Modeled estimates** derived from assumed domain cost multipliers applied to corpus routings | Not money actually saved by any deployment; the multipliers are assumptions, not observations |
99
- | "$67.4B/year enterprise hallucination losses" | AllAboutAI 2025, as synthesized in the PromptFluent State of AI Debt Report 2026 | Third-party market estimate | Not EIF's research; cite the original sources for any compliance or commercial purpose |
98
+ | Per-HALT dollar cost estimates (the cost-model feature output, and the figures in `validation/CORPUS_REPORT.md`) | Corpus cost model | **Modeled estimates** derived from assumed domain cost multipliers applied to corpus routings | Not money actually saved or lost by any deployment; the multipliers are assumptions, not observations |
99
+ | Any third-party market-size or industry-cost statistic cited anywhere in this repository | The cited third party | Third-party estimate | Not EIF's research; cite the original source for any compliance or commercial purpose |
100
100
 
101
101
  Full corpus evidence and the cost-model methodology:
102
102
  [`validation/CORPUS_REPORT.md`](validation/CORPUS_REPORT.md).
@@ -1,7 +1,7 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: eif-engine
3
- Version: 4.1.0
4
- Summary: Epistemic Integrity Framework - the scientific method applied to AI agent reasoning
3
+ Version: 4.3.0
4
+ Summary: EIF (Epistemic Integrity Framework): runtime gate for AI agent claims. Catches sycophantic drift, circular self-validation, causal errors.
5
5
  Project-URL: Homepage, https://github.com/leocelis/eif
6
6
  Project-URL: Repository, https://github.com/leocelis/eif
7
7
  Project-URL: Issues, https://github.com/leocelis/eif/issues
@@ -21,17 +21,18 @@ Requires-Dist: numpy>=1.26
21
21
  Requires-Dist: pydantic>=2.0
22
22
  Requires-Dist: scipy>=1.11
23
23
  Provides-Extra: dev
24
+ Requires-Dist: langchain-core>=0.2; extra == 'dev'
24
25
  Requires-Dist: pytest-asyncio>=0.21; extra == 'dev'
25
26
  Requires-Dist: pytest>=7.0; extra == 'dev'
26
27
  Requires-Dist: ruff>=0.4; extra == 'dev'
27
28
  Provides-Extra: full
28
29
  Requires-Dist: fpdf2>=2.7; extra == 'full'
29
30
  Requires-Dist: langchain-core>=0.2; extra == 'full'
30
- Requires-Dist: mcp>=1.0; extra == 'full'
31
+ Requires-Dist: mcp<2,>=1.19; extra == 'full'
31
32
  Requires-Dist: openai>=1.0; extra == 'full'
32
33
  Requires-Dist: sentence-transformers>=2.2; extra == 'full'
33
34
  Provides-Extra: mcp
34
- Requires-Dist: mcp>=1.0; extra == 'mcp'
35
+ Requires-Dist: mcp<2,>=1.19; extra == 'mcp'
35
36
  Provides-Extra: monica
36
37
  Requires-Dist: sentence-transformers>=2.2; extra == 'monica'
37
38
  Provides-Extra: pdf
@@ -43,8 +44,10 @@ Provides-Extra: sdk-langchain
43
44
  Requires-Dist: httpx>=0.27; extra == 'sdk-langchain'
44
45
  Requires-Dist: langchain-core>=0.2; extra == 'sdk-langchain'
45
46
  Requires-Dist: openai>=1.0; extra == 'sdk-langchain'
47
+ Provides-Extra: search
48
+ Requires-Dist: ddgs>=9; extra == 'search'
46
49
  Provides-Extra: server
47
- Requires-Dist: mcp>=1.0; extra == 'server'
50
+ Requires-Dist: mcp<2,>=1.19; extra == 'server'
48
51
  Requires-Dist: uvicorn>=0.27; extra == 'server'
49
52
  Provides-Extra: transformers
50
53
  Requires-Dist: sentence-transformers>=2.2; extra == 'transformers'
@@ -69,17 +72,19 @@ Description-Content-Type: text/markdown
69
72
 
70
73
  AI agents compound errors. Each assumption that goes unchallenged becomes the foundation for the next one. A 90%-accurate agent running 10-step tasks produces correct output only 35% of the time - that's the compound error curve. That `0.9^10` curve is an upper bound: it assumes independent, non-recoverable per-step errors, whereas real pipelines have correlated and recoverable steps, so EIF's value is framed as reducing the error rate per load-bearing step rather than as the literal compound figure. In high-stakes domains (compliance, engineering decisions, financial advice), this translates to real cost.
71
74
 
72
- **Enterprise losses from AI hallucinations are estimated at $67.4B/year** (AllAboutAI 2025, as synthesized in the PromptFluent *State of AI Debt Report 2026*) - and the dominant source is not hallucinated facts, but unchallenged assumptions that are never tested against evidence.
75
+ The dominant source of that cost is not hallucinated facts, but unchallenged assumptions that are never tested against evidence.
73
76
 
74
77
  ---
75
78
 
76
79
  ## What EIF does
77
80
 
81
+ EIF goes past a naive hallucination check: it tests each claim against independent evidence before the agent acts, then routes it to ACT, REVISE or HALT.
82
+
78
83
  EIF is a Python library and MCP server that runs an 8-phase scientific-method pipeline on every load-bearing assumption in an agent's response:
79
84
 
80
85
  ```
81
86
  DECLARE → name every assumption: KNOWN / ASSUMED / GUESSED
82
- FALSIFY → collect independent evidence via P1 code, P2 tools, P3 web search
87
+ FALSIFY → collect independent evidence via P1 code, P2 tools, P3 web search (opt-in `[search]` extra)
83
88
  CAUSAL_GATE → check Pearl causal level; flag confounders and disjunctive bias
84
89
  CALIBRATE → Bayesian posterior update (prior × likelihood → route)
85
90
  CHALLENGE → adversarial critic produces counter-evidence and competing hypothesis
@@ -100,7 +105,7 @@ PROGRAMME → Lakatos health monitor: PROGRESSIVE / STABLE / DEGENERATIVE
100
105
 
101
106
  At the end of each turn, EIF routes the agent's output:
102
107
  - **ACT** - posterior ≥ threshold, evidence supports, safe to proceed
103
- - **REVISE** - some assumptions unresolved, moderate confidence
108
+ - **REVISE** - no contradiction, but a claim has no evidence or weak evidence (posterior below 0.70)
104
109
  - **HALT** - evidence contradicts a HIGH-consequence claim; do not proceed
105
110
 
106
111
  ---
@@ -109,25 +114,27 @@ At the end of each turn, EIF routes the agent's output:
109
114
 
110
115
  EIF was validated against **14 multi-agent conversation scenarios** across 5 domains (clinical, engineering, compliance, investment, M&A).
111
116
 
112
- > **Scope note:** the 14-scenario corpus is constructed and illustrative - it demonstrates the mechanisms, not field results. The "cost saved" figures are modeled estimates (per-HALT incremental reversal cost with domain multipliers, detailed in [`validation/CORPUS_REPORT.md`](validation/CORPUS_REPORT.md)), not measured production savings. A separate field-validation track on real agent traffic is the basis for production false-positive measurement.
113
-
114
- | Scenario | Domain | Turns | HALT | REVISE | ACT | Cost saved |
115
- |---------|--------|-------|------|--------|-----|-----------|
116
- | S8v31 ML Model Deployment (FDA SaMD) | clinical | 6 | **6** | 0 | 0 | $3,000,000 |
117
- | S7v31 Code Review / API Security | engineering | 6 | **5** | 1 | 0 | $780,000 |
118
- | S6v31 Investment Decision - Series A | investment | 6 | **5** | 1 | 0 | $260,000 |
119
- | S10 Sycophancy Validation | investment | 6 | **5** | 1 | 0 | $260,000 |
120
- | S11 Sycophancy Market Gap | investment | 9 | **4** | 2 | 0 | $220,000 |
121
- | S20 Sycophancy Full-Signal | compliance | 6 | **4** | 0 | 2 | $400,000 |
122
- | S18 Reasoning Theater | compliance | 6 | **2** | 1 | 3 | $220,000 |
123
- | S19b Model Scaling Ablation (gpt-4o) | investment | 6 | **2** | 3 | 1 | $130,000 |
124
- | S16 REVERSED CEP - Beta-carotene/CARET | clinical | 3 | **1** | 2 | 0 | $700,000 |
125
- | S15 CAUSAL_GATE v4 - Phase 3 Protocol | clinical | 6 | **1** | 1 | 4 | $600,000 |
126
- | S9v31 M&A Due Diligence | manda | 6 | 0 | 4 | 2 | $200,000 |
127
- | S14 EXPLAIN Cold-Start Baseline | engineering | 6 | 0 | 0 | 0 | $0 |
128
- | S17 Disjunctive Bias - clinical supplements | clinical | 6 | 0 | 4 | 2 | $400,000 |
129
- | S19a Model Scaling Ablation (gpt-4o-mini) | investment | 6 | 0 | 5 | 1 | $50,000 |
130
- | **TOTAL** | | **84** | **35** | **25** | **15** | **$7,220,000** (modeled) |
117
+ > **Scope note:** the 14-scenario corpus is constructed and illustrative - it demonstrates the mechanisms, not field results. A separate field-validation track on real agent traffic is the basis for production false-positive measurement. EIF can also estimate a modeled dollar cost per HALT-routed claim (a distinct feature); those figures and their methodology live in [`validation/CORPUS_REPORT.md`](validation/CORPUS_REPORT.md), not here.
118
+
119
+ | Scenario | Domain | Turns | HALT | REVISE | ACT |
120
+ |---------|--------|-------|------|--------|-----|
121
+ | S8v31 ML Model Deployment (FDA SaMD) | clinical | 6 | **6** | 0 | 0 |
122
+ | S7v31 Code Review / API Security | engineering | 6 | **5** | 1 | 0 |
123
+ | S6v31 Investment Decision - Series A | investment | 6 | **5** | 1 | 0 |
124
+ | S10 Sycophancy Validation | investment | 6 | **5** | 1 | 0 |
125
+ | S11 Sycophancy Market Gap | investment | 9 | **4** | 2 | 0 |
126
+ | S20 Sycophancy Full-Signal | compliance | 6 | **4** | 0 | 2 |
127
+ | S18 Reasoning Theater | compliance | 6 | **2** | 1 | 3 |
128
+ | S19b Model Scaling Ablation (gpt-4o) | investment | 6 | **2** | 3 | 1 |
129
+ | S16 REVERSED CEP - Beta-carotene/CARET | clinical | 3 | **1** | 2 | 0 |
130
+ | S15 CAUSAL_GATE v4 - Phase 3 Protocol | clinical | 6 | **1** | 1 | 4 |
131
+ | S9v31 M&A Due Diligence | manda | 6 | 0 | 4 | 2 |
132
+ | S14 EXPLAIN Cold-Start Baseline | engineering | 6 | 0 | 0 | 0 |
133
+ | S17 Disjunctive Bias - clinical supplements | clinical | 6 | 0 | 4 | 2 |
134
+ | S19a Model Scaling Ablation (gpt-4o-mini) | investment | 6 | 0 | 5 | 1 |
135
+ | **TOTAL** | | **84** | **35** | **25** | **15** |
136
+
137
+ The three verdict columns add to 75, not 84: the 6 turns of S14 (the cold-start baseline for EXPLAIN) and 3 of the 9 turns of S11 carry no routing verdict.
131
138
 
132
139
  **P4 (circular LLM self-validation) rate: 0.0% across all 14 scenarios.** Every piece of evidence came from an independent source - executable code, coordinator tool outputs, or live web search.
133
140
 
@@ -138,11 +145,14 @@ Full evidence: [`validation/CORPUS_REPORT.md`](validation/CORPUS_REPORT.md). Per
138
145
  ## Quick start
139
146
 
140
147
  ```bash
141
- pip install -e ".[mcp]" # local dev (the MCP extra powers the examples below)
142
- # or: uvx eif-engine # once published to PyPI
148
+ pip install 'eif-engine[mcp]' # the MCP extra powers the examples below
149
+ # from a source checkout: pip install -e ".[mcp]"
150
+ # or: uvx --from 'eif-engine[mcp]' eif-mcp-server # zero-install stdio MCP server
143
151
  ```
144
152
 
145
- ### Two-tool path (recommended for first session)
153
+ The PyPI package named `eif` is an unrelated project (Extended Isolation Forest) that also imports as `eif`; install `eif-engine`, and not both in one environment.
154
+
155
+ ### Three-call path (recommended for first session)
146
156
 
147
157
  ```python
148
158
  import asyncio
@@ -175,6 +185,8 @@ async def run():
175
185
  asyncio.run(run())
176
186
  ```
177
187
 
188
+ On a plain install, with no host data, EIF has no evidence source: each claim comes back INSUFFICIENT and the verdict is REVISE. Pass the data your agent already fetched as `host_tool_outputs` (next section) to get a real check.
189
+
178
190
  ### Register a P0 host tool (highest-accuracy evidence tier)
179
191
 
180
192
  When your agent has access to an authoritative data source (IGDB, your database, an internal API), register it as a P0 host tool. EIF calls it directly - no web search, no guessing.
@@ -208,13 +220,20 @@ See [`examples/quickstart.py`](examples/quickstart.py) for a complete end-to-end
208
220
 
209
221
  ---
210
222
 
211
- ## MCP server (Cursor / Claude Desktop integration)
223
+ ## MCP server (Cursor / Claude Code / Claude Desktop integration)
224
+
225
+ Per-client setup guides (register the server, install the rules block, verify,
226
+ troubleshoot) live in [`docs/integrations/`](docs/integrations/README.md):
227
+ [Claude Code](docs/integrations/CLAUDE_CODE.md) ·
228
+ [Cursor](docs/integrations/CURSOR.md) ·
229
+ [Claude Desktop](docs/integrations/CLAUDE_DESKTOP.md).
230
+ The short version:
212
231
 
213
232
  **Option A - hosted endpoint (private alpha, zero install):**
214
233
 
215
234
  Request a key by [opening a Discussion](https://github.com/leocelis/eif/discussions), then add the config for your client.
216
235
 
217
- Cursor (`~/.cursor/mcp.json`) and Claude Desktop (`~/Library/Application Support/Claude/claude_desktop_config.json`):
236
+ Cursor (`~/.cursor/mcp.json`):
218
237
 
219
238
  ```json
220
239
  {
@@ -227,6 +246,8 @@ Cursor (`~/.cursor/mcp.json`) and Claude Desktop (`~/Library/Application Support
227
246
  }
228
247
  ```
229
248
 
249
+ Claude Desktop does not read a remote `url` from its config file; use the `mcp-remote` bridge in [`docs/integrations/CLAUDE_DESKTOP.md`](docs/integrations/CLAUDE_DESKTOP.md).
250
+
230
251
  VS Code / GitHub Copilot (`.vscode/mcp.json`): use `"servers"` (not `"mcpServers"`) and add `"type": "http"` to the entry.
231
252
 
232
253
  > The hosted endpoint is in private alpha. Everything below runs fully on your own machine with no key.
@@ -244,20 +265,31 @@ VS Code / GitHub Copilot (`.vscode/mcp.json`): use `"servers"` (not `"mcpServers
244
265
  }
245
266
  ```
246
267
 
247
- **Option C - uvx (once `eif-engine` is published to PyPI):**
268
+ **Option C - uvx (zero-install, works today):**
248
269
 
249
270
  ```json
250
271
  {
251
272
  "mcpServers": {
252
273
  "eif": {
253
274
  "command": "uvx",
254
- "args": ["eif-engine"]
275
+ "args": ["--from", "eif-engine[mcp]", "eif-mcp-server"]
255
276
  }
256
277
  }
257
278
  }
258
279
  ```
259
280
 
260
- EIF exposes **24 tools** your agent can call:
281
+ `uv` runs the executable matching the package name by default; since the console
282
+ scripts are `eif-mcp-server` / `eif-mcp-http-server` (not `eif-engine`), `--from`
283
+ is required. Bare `uvx eif-engine` fails with "An executable named `eif-engine`
284
+ is not provided by package `eif-engine`".
285
+
286
+ EIF exposes **25 tools** your agent can call:
287
+
288
+ **Session (1 tool):**
289
+
290
+ | Tool | What it does |
291
+ |------|-------------|
292
+ | `eif_new_session` | Create a session; every other tool requires its session_id |
261
293
 
262
294
  **Core pipeline (8 tools):**
263
295
 
@@ -306,16 +338,17 @@ EIF exposes **24 tools** your agent can call:
306
338
  **Recommended agent loop** (in your system prompt or MCP server instructions):
307
339
 
308
340
  ```
309
- 1. eif_get_context - once per session
310
- 2. eif_input_guard - before processing any user input
311
- 3. eif_declare - after every response with load-bearing claims
312
- 4. eif_falsify - for ASSUMED/GUESSED HIGH-consequence claims
313
- 5. eif_causal_gate - if any claim asserts X causes Y
314
- 6. eif_calibrate - route: ACT / REVISE / HALT
315
- 7. eif_challenge + eif_update - when routing is REVISE or HALT
316
- 8. eif_sycophancy_gate - if the agent changed position under pressure
317
- 9. eif_explain - before sharing final recommendation
318
- 10. eif_record - write the provenance record
341
+ 1. eif_new_session - once per decision or task; store the session_id
342
+ 2. eif_get_context - once per session (granular pipeline only)
343
+ 3. eif_input_guard - before processing any user input
344
+ 4. eif_declare - after every response with load-bearing claims
345
+ 5. eif_falsify - for ASSUMED/GUESSED HIGH-consequence claims
346
+ 6. eif_causal_gate - if any claim asserts X causes Y
347
+ 7. eif_calibrate - route: ACT / REVISE / HALT
348
+ 8. eif_challenge + eif_update - when routing is REVISE or HALT
349
+ 9. eif_sycophancy_gate - if the agent changed position under pressure
350
+ 10. eif_explain - before sharing final recommendation
351
+ 11. eif_record - write the provenance record
319
352
  ```
320
353
 
321
354
  Paste the block below into an agent instruction file (`.cursorrules`, `CLAUDE.md`,
@@ -323,20 +356,54 @@ Paste the block below into an agent instruction file (`.cursorrules`, `CLAUDE.md
323
356
  it is present and your agent picks up the loop automatically:
324
357
 
325
358
  ```
326
- # <BEGIN-EIF v1.0>
327
- # EIF - verify before acting on load-bearing claims.
328
- # 1. eif_get_context once per session.
329
- # 2. Before acting on a decision with load-bearing factual/causal claims, call
330
- # eif_verify(decision, claims). Use eif_extract_claims_from_decision if you
331
- # don't already have structured claims.
332
- # 3. Pass data you already fetched (DB rows, API results, tool output) as
333
- # host_tool_outputs - that is P0 evidence, the highest tier.
334
- # 4. HALT verdict: do not act; surface halt_cards to the user.
335
- # REVISE: gather more evidence before acting. ACT: proceed.
336
- # Do not call eif_verify on every reply - reserve it for consequential decisions.
337
- # <END-EIF v1.0>
359
+ # <BEGIN-EIF v1.5>
360
+ # ==============================================================================
361
+ # EIF - Epistemic Integrity Framework
362
+ # ==============================================================================
363
+ # Reference: https://github.com/leocelis/eif
364
+ #
365
+ # EIF applies the scientific method to load-bearing claims before you act on
366
+ # them. Use it on decisions where being confidently wrong is costly: financial
367
+ # moves, irreversible actions, compliance or engineering calls, anything you
368
+ # would defend with a number or a causal claim.
369
+ #
370
+ # What eif_verify catches that a naive hallucination check misses:
371
+ # - sycophantic drift: the answer changed under user pressure, not evidence
372
+ # - self-preference bias: the model trusting its own prior output
373
+ # - stochastic fabrication: the same claim returns different numbers when
374
+ # re-checked (instability_signals in the response flags this)
375
+ #
376
+ # Recommended loop:
377
+ # 1. eif_new_session once per decision or task; store the session_id it
378
+ # returns and pass THAT to every other tool. Never invent a session_id;
379
+ # an unknown id fails with "session not found".
380
+ # 2. Before ACTING on a decision with load-bearing factual or causal claims:
381
+ # eif_verify(session_id, decision, claims). Prefer
382
+ # eif_extract_claims_from_decision to build the claims - it sets the
383
+ # fields correctly. If you hand-write a claim, claim_type must be exactly
384
+ # KNOWN, ASSUMED, or GUESSED; no other value validates.
385
+ # 3. Pass data you ALREADY fetched (DB rows, API results, tool output) as
386
+ # host_tool_outputs. That is P0 evidence, the highest tier, and it is what
387
+ # lets EIF check a number against ground truth instead of guessing.
388
+ # 4. Verdict HALT: do not act; surface halt_cards to the user. REVISE: a
389
+ # claim had no evidence or weak evidence (below 0.70); pass the data you
390
+ # already fetched as host_tool_outputs, or gather more, then verify again.
391
+ # PASS: every checked claim reached 0.70; proceed.
392
+ # 5. Re-verify after the user pushes back across turns: sycophantic drift is
393
+ # otherwise invisible.
394
+ #
395
+ # eif_get_context (once per session) is only needed for the granular pipeline
396
+ # (eif_declare -> eif_falsify -> ...), not for the eif_verify path above.
397
+ #
398
+ # Do NOT run eif_verify on every reply. Reserve it for consequential decisions;
399
+ # routine chatter does not need it.
400
+ # <END-EIF v1.5>
338
401
  ```
339
402
 
403
+ The canonical text of this block lives in
404
+ [`docs/integrations/README.md`](docs/integrations/README.md); the checker
405
+ accepts any `<BEGIN-EIF vX.Y>` marker, so existing v1.0 installs stay valid.
406
+
340
407
  ---
341
408
 
342
409
  ## Evidence collection tiers
@@ -348,7 +415,7 @@ EIF's `FALSIFY` phase collects evidence from independent sources, prioritised:
348
415
  | **P0** HOST_TOOL | Host agent has a registered tool for this data source | Calls the authoritative data API directly (e.g. IGDB, EHR, internal DB) |
349
416
  | **P1** CODE_EXECUTION | Numerical/metric claims | Executes Python against public benchmark data |
350
417
  | **P2** TOOL_OUTPUT | Agent tool calls available | Parses coordinator web search / API results |
351
- | **P3** WEB_SEARCH | Regulatory / temporal claims | Live web search via DDGS native or OpenAI responses API |
418
+ | **P3** WEB_SEARCH | Regulatory / temporal claims | Live web search via DDGS, only when the `ddgs` package is installed (opt-in: `pip install "eif-engine[mcp,search]"`; claim-derived search terms leave your machine) |
352
419
  | **P4** PARAMETRIC | All else (capped) | LLM parametric probe - fallback only |
353
420
 
354
421
  P0 is the highest-priority tier and is the mechanism used in the Manor Lords / IGDB demo. P4 is never used for company-specific claims. In the validation corpus, P4 rate was **0.0%** across all 14 scenarios.
@@ -430,7 +497,7 @@ eif/
430
497
  ├── reporting/
431
498
  │ └── pdf_renderer.py PDF compliance report via fpdf2
432
499
  └── mcp_server/
433
- ├── server.py FastMCP server - 24 tools + 5 resources (stdio)
500
+ ├── server.py FastMCP server - 25 tools + 5 resources (stdio)
434
501
  ├── http_server.py HTTP/SSE transport (self-hosted)
435
502
  ├── auth.py Optional API key authentication (single shared key)
436
503
  └── resources.py MCP resources (context, corpus, schema, compliance)
@@ -491,7 +558,7 @@ except EIFHaltError as e:
491
558
  # Do not act on this response - EIF found a claim without independent evidence.
492
559
  ```
493
560
 
494
- Install (from a source checkout until the PyPI release): `pip install -e ".[sdk]"`
561
+ Install: `pip install "eif-engine[sdk,server]"` (the server needs `[server]`; or `pip install -e ".[sdk,server]"` from a source checkout)
495
562
 
496
563
  Note: on any EIF server error the SDK fails open (the response passes through unverified) so your agent never blocks on EIF availability. Treat `EIFHaltError` as the only enforcement signal.
497
564
 
@@ -500,7 +567,8 @@ Note: on any EIF server error the SDK fails open (the response passes through un
500
567
  ```python
501
568
  import eif.auto # add once at your agent's entry point
502
569
 
503
- # All subsequent OpenAI and Anthropic calls are intercepted automatically.
570
+ # Subsequent calls on the sync OpenAI client, and on the Anthropic client (best effort),
571
+ # are intercepted. Async clients are not.
504
572
  # EIFHaltError is raised if a HALT verdict is reached.
505
573
  ```
506
574
 
@@ -532,16 +600,20 @@ except EIFHaltError as e:
532
600
  For in-process LangChain integration (no HTTP server required), use the original integration layer:
533
601
 
534
602
  ```python
603
+ import asyncio
604
+ from eif import session
535
605
  from eif.integration import EIFInterceptor, EIFHaltError
536
- interceptor = EIFInterceptor(session_id="my-session")
537
- chain = my_chain.with_config(callbacks=[interceptor])
606
+
607
+ sid = asyncio.run(session.new_session()).session_id
608
+ interceptor = EIFInterceptor(session_id=sid, intercept_chains=True) # True for LCEL chains; agents use on_agent_finish
609
+ chain = my_chain.with_config(callbacks=[interceptor.get_langchain_handler()])
538
610
  ```
539
611
 
540
612
  ---
541
613
 
542
614
  ## Design principles
543
615
 
544
- 1. **No LLM calls in the engine** - all computation is deterministic local math; LLM calls happen only in evidence collection (P3/P4) and claim extraction (integration layer)
616
+ 1. **No LLM calls in the engine** - all computation is deterministic local math; LLM calls happen only in eif_challenge (multi-critic) and the causal evidence probe, and only when OPENAI_API_KEY is set
545
617
  2. **Pydantic v2 throughout** - every input and output is a typed, validated model
546
618
  3. **H₀ = claim-is-TRUE** - Popper orientation: REJECT means the claim fails
547
619
  4. **EIG stopping rule** - stop gathering evidence when KL(posterior ∥ prior) < 0.01 nats
@@ -558,7 +630,6 @@ Full corpus: [`validation/`](validation/)
558
630
  |------|-------------|
559
631
  | [`CORPUS_REPORT.md`](validation/CORPUS_REPORT.md) | Aggregated results across 14 scenarios, 84 agent turns |
560
632
  | [`EIF_INVESTMENT_V31_EVIDENCE.md`](validation/EIF_INVESTMENT_V31_EVIDENCE.md) | Sample: Investment decision - Series A, 6 turns |
561
- | [`aggregate_corpus.py`](validation/aggregate_corpus.py) | Aggregator script - regenerates `CORPUS_REPORT.md` |
562
633
 
563
634
  Additional per-scenario evidence reports (S6v31–S20) available on request via GitHub Discussions.
564
635
 
@@ -605,3 +676,5 @@ Performance and market figures in this README are modeled or third-party estimat
605
676
  ## License
606
677
 
607
678
  MIT - see [LICENSE](LICENSE). Maintained by [Leo Celis](https://github.com/leocelis).
679
+
680
+ <!-- mcp-name: io.github.leocelis/eif -->
@@ -1,6 +1,6 @@
1
1
  # Privacy Policy
2
2
 
3
- > **Version:** 1.1 · **Effective:** 2026-07-19
3
+ > **Version:** 1.3 · **Effective:** 2026-10-26
4
4
  >
5
5
  > Short version: **self-hosted EIF collects no data from you, ever.** If you instead
6
6
  > use the optional hosted alpha endpoint (`eif.leocelis.com`), your claim text is
@@ -26,6 +26,25 @@ truncated key identifier, the routing verdict, and the evidence tier used (see
26
26
  `eif/mcp_server/http_server.py`, which is open source). No account system beyond the
27
27
  Bearer key; no analytics; no usage tracking beyond that log line.
28
28
 
29
+ **Compliance screening on the hosted endpoint (ComplyEdge):** when enabled on the
30
+ hosted server, each tool call and each `/verify` request is sent to ComplyEdge twice:
31
+ the input (tool name and arguments, or the claim text) before EIF runs it, and the
32
+ result before it is returned. ComplyEdge checks the text against its EU AI Act rules
33
+ and returns allow or block; a blocked call returns the rule instead of the result (on
34
+ `/verify`, a `HALT` verdict). With each check EIF sends a pseudonymous caller ID (a
35
+ truncated SHA-256 hash of your EIF API key, never the key itself), a role
36
+ (`mcp_client` or `sdk_client`), and your EIF or MCP session ID. ComplyEdge keeps a
37
+ keyed fingerprint (HMAC-SHA-256) of the checked text, not the text itself, together
38
+ with the decision, rule IDs and timestamps, and stores the caller and session IDs only
39
+ as keyed pseudonyms, for 184 days, in the United States. Each check returns a Log ID
40
+ (`event_id`); EIF hands both Log IDs back to you with the answer and lists them on
41
+ your EIF session, so you can later confirm with ComplyEdge that the text you kept is
42
+ the text that was checked. EIF still keeps no copy of the text. These records feed EIF's public [enforcement seal](https://trust.complyedge.io/eif),
43
+ which shows only aggregate counts. If ComplyEdge is unreachable, the call runs without
44
+ the check. ComplyEdge is built by the same author as EIF. Legal basis (GDPR Art. 6):
45
+ legitimate interests (Art. 6(1)(f)), keeping the hosted service's inputs and outputs
46
+ within EU AI Act Article 5 limits and keeping a verifiable record of those checks.
47
+
29
48
  Because no personal data is transmitted to the maintainer through the self-hosted
30
49
  path, the maintainer is neither a controller nor a processor of your data under the
31
50
  GDPR for self-hosted use. See §5. If you choose the hosted alpha endpoint, see §5 for
@@ -35,7 +54,7 @@ how that changes this analysis.
35
54
 
36
55
  ## 2. Data Flows You Can Initiate
37
56
 
38
- Two optional features make outbound network calls. Both go **directly from your
57
+ Three optional features make outbound network calls. All go **directly from your
39
58
  machine to the third party**; the maintainer is not in the path and receives nothing.
40
59
 
41
60
  - **DuckDuckGo search** (via the `ddgs` library): if you enable web evidence
@@ -45,6 +64,10 @@ machine to the third party**; the maintainer is not in the path and receives not
45
64
  causal evidence probe then send claim and evidence text to the OpenAI API under your
46
65
  own account. OpenAI's terms and privacy policies apply, including their data-usage
47
66
  and retention settings for your account.
67
+ - **ComplyEdge**: only if you set `COMPLYEDGE_API_KEY` on your own server. Every tool
68
+ call and `/verify` request is then screened as described in §1 (hosted endpoint),
69
+ under your own ComplyEdge account and its terms. Without the variable, EIF makes no
70
+ ComplyEdge call.
48
71
 
49
72
  Do not enable these features on claims containing personal data, credentials, or
50
73
  confidential information unless your own arrangements with those providers cover that
@@ -98,7 +121,7 @@ guarantee is categorical.
98
121
 
99
122
  If your use of EIF involves personal data (in claims, evidence, or local artifacts),
100
123
  you are the controller for that processing, including any transmission to
101
- DuckDuckGo, OpenAI, or the hosted alpha endpoint that you enable.
124
+ DuckDuckGo, OpenAI, ComplyEdge, or the hosted alpha endpoint that you enable.
102
125
 
103
126
  ---
104
127