agentmesh-proxy 0.3.0__tar.gz → 0.3.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/PKG-INFO +17 -1
  2. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/README.md +16 -0
  3. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/proxy/server.py +1 -0
  4. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/security/pii_scanner.py +39 -4
  5. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/pyproject.toml +1 -1
  6. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/.dockerignore +0 -0
  7. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/.github/workflows/ci.yml +0 -0
  8. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/.github/workflows/codeql.yml +0 -0
  9. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/.gitignore +0 -0
  10. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/CHANGELOG.md +0 -0
  11. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/CONTRIBUTING.md +0 -0
  12. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/Dockerfile +0 -0
  13. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/LICENSE +0 -0
  14. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/PRIVACY.md +0 -0
  15. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/SECURITY.md +0 -0
  16. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/__init__.py +0 -0
  17. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/attribution/__init__.py +0 -0
  18. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/attribution/chargebacks.py +0 -0
  19. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/audit/__init__.py +0 -0
  20. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/audit/trail.py +0 -0
  21. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/bridge/__init__.py +0 -0
  22. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/bridge/bpmn.py +0 -0
  23. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/budget/__init__.py +0 -0
  24. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/budget/enforcer.py +0 -0
  25. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/cache/__init__.py +0 -0
  26. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/cache/redis_backend.py +0 -0
  27. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/cache/semantic.py +0 -0
  28. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/cli.py +0 -0
  29. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/compliance/__init__.py +0 -0
  30. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/compliance/pdf_report.py +0 -0
  31. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/compliance/reporter.py +0 -0
  32. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/core.py +0 -0
  33. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/events/__init__.py +0 -0
  34. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/events/bus.py +0 -0
  35. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/integrations/__init__.py +0 -0
  36. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/integrations/autogen.py +0 -0
  37. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/integrations/crewai.py +0 -0
  38. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/integrations/google_adk.py +0 -0
  39. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/integrations/haystack.py +0 -0
  40. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/integrations/langgraph.py +0 -0
  41. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/integrations/nvidia_nim.py +0 -0
  42. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/integrations/openai_agents.py +0 -0
  43. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/integrations/pydantic_ai.py +0 -0
  44. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/integrations/saml_handler.py +0 -0
  45. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/integrations/webhooks.py +0 -0
  46. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/monitoring/__init__.py +0 -0
  47. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/monitoring/anomaly_detector.py +0 -0
  48. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/optimizer/__init__.py +0 -0
  49. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/optimizer/circuit_breaker.py +0 -0
  50. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/optimizer/compressor.py +0 -0
  51. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/optimizer/cost_optimizer.py +0 -0
  52. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/optimizer/embedder.py +0 -0
  53. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/optimizer/health_monitor.py +0 -0
  54. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/optimizer/multi_vendor.py +0 -0
  55. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/optimizer/normalizer.py +0 -0
  56. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/optimizer/router.py +0 -0
  57. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/policy/__init__.py +0 -0
  58. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/policy/engine.py +0 -0
  59. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/policy/schema.py +0 -0
  60. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/proxy/__init__.py +0 -0
  61. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/proxy/forwarder.py +0 -0
  62. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/proxy/middleware.py +0 -0
  63. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/quota/__init__.py +0 -0
  64. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/quota/engine.py +0 -0
  65. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/quota/escalation.py +0 -0
  66. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/security/__init__.py +0 -0
  67. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/security/injection_detector.py +0 -0
  68. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/security/toxicity_filter.py +0 -0
  69. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/server.py +0 -0
  70. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/templates/__init__.py +0 -0
  71. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/templates/customer_service.yaml +0 -0
  72. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/templates/enterprise.yaml +0 -0
  73. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/templates/fintech.yaml +0 -0
  74. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/templates/healthcare.yaml +0 -0
  75. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/templates/nvidia_nim.yaml +0 -0
  76. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh/templates/research.yaml +0 -0
  77. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh-extension/_metadata/generated_indexed_rulesets/_ruleset1 +0 -0
  78. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh-extension/background/service_worker.js +0 -0
  79. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh-extension/content/interceptor.js +0 -0
  80. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh-extension/content/styles.css +0 -0
  81. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh-extension/generate_icons.py +0 -0
  82. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh-extension/icons/icon128.png +0 -0
  83. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh-extension/icons/icon16.png +0 -0
  84. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh-extension/icons/icon48.png +0 -0
  85. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh-extension/manifest.json +0 -0
  86. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh-extension/popup/popup.css +0 -0
  87. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh-extension/popup/popup.html +0 -0
  88. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh-extension/popup/popup.js +0 -0
  89. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/agentmesh-extension/rules/redirect_rules.json +0 -0
  90. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/c/357/200/272Usersanilsprojectsagentmeshagentmeshcache__init__.py" +0 -0
  91. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/dashboard_err.txt +0 -0
  92. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/dashboard_out.txt +0 -0
  93. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/docs/architecture.md +0 -0
  94. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/docs/blog-how-i-cut-agent-bill-70-percent.md +0 -0
  95. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/docs/cookbook.md +0 -0
  96. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/docs/demo.gif +0 -0
  97. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/docs/deploying-to-kubernetes.md +0 -0
  98. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/docs/devto-article.md +0 -0
  99. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/docs/getting-started.md +0 -0
  100. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/docs/linkedin-company-post.md +0 -0
  101. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/docs/linkedin-post.md +0 -0
  102. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/docs/linkedin-profile.md +0 -0
  103. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/docs/medium-article.md +0 -0
  104. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/docs/policy-reference.md +0 -0
  105. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/docs/social-assets/AnilLinkedinProfile_Nov2025.png +0 -0
  106. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/docs/social-assets/author_card.png +0 -0
  107. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/docs/social-assets/devto_cover.png +0 -0
  108. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/docs/social-assets/li_hero.png +0 -0
  109. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/docs/social-assets/m_pipeline.png +0 -0
  110. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/docs/social-assets/sub_cover.png +0 -0
  111. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/docs/social-assets/sub_problem.png +0 -0
  112. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/docs/social-assets/x1_hero.png +0 -0
  113. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/docs/social-assets/x2_benchmark.png +0 -0
  114. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/docs/social-assets/x3_semantic.png +0 -0
  115. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/docs/substack-article.md +0 -0
  116. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/docs/x-thread.md +0 -0
  117. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/examples/__init__.py +0 -0
  118. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/examples/benchmark.py +0 -0
  119. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/examples/dashboard_terminal.py +0 -0
  120. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/examples/dashboard_web.py +0 -0
  121. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/examples/demo.py +0 -0
  122. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/examples/make_demo_gif.py +0 -0
  123. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/examples/quickstart.py +0 -0
  124. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/examples/simulation.py +0 -0
  125. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/examples/test_extension_e2e.py +0 -0
  126. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/generate_store_assets.py +0 -0
  127. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/hf-space/.gitattributes +0 -0
  128. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/hf-space/README.md +0 -0
  129. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/hf-space/app.py +0 -0
  130. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/hf-space/requirements.txt +0 -0
  131. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/spaces/README.md +0 -0
  132. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/spaces/app.py +0 -0
  133. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/spaces/requirements.txt +0 -0
  134. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/store_assets/marquee_1400x560.png +0 -0
  135. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/store_assets/promo_small_440x280.png +0 -0
  136. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/store_assets/screenshot_1280x800.png +0 -0
  137. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/store_assets/screenshot_promo_640x400.png +0 -0
  138. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/store_assets/store_icon_128.png +0 -0
  139. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/store_assets/store_icon_from_promo.png +0 -0
  140. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/store_assets/store_icon_from_screenshot.png +0 -0
  141. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/tests/__init__.py +0 -0
  142. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/tests/test_async.py +0 -0
  143. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/tests/test_attribution.py +0 -0
  144. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/tests/test_cache.py +0 -0
  145. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/tests/test_compliance.py +0 -0
  146. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/tests/test_core.py +0 -0
  147. {agentmesh_proxy-0.3.0 → agentmesh_proxy-0.3.2}/tests/test_templates.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentmesh-proxy
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
  Summary: Governance proxy for every AI tool — PII/PHI masking, prompt injection detection, anomaly alerts, semantic cache, token quotas, vendor routing, compliance reports
5
5
  Project-URL: Homepage, https://github.com/anilatambharii/agentmesh
6
6
  Project-URL: Documentation, https://github.com/anilatambharii/agentmesh/tree/main/docs
@@ -78,6 +78,9 @@ Description-Content-Type: text/markdown
78
78
  [![PyPI Downloads](https://static.pepy.tech/badge/agentmesh-proxy)](https://pepy.tech/project/agentmesh-proxy)
79
79
  [![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
80
80
  [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
81
+ [![HuggingFace Space](https://img.shields.io/badge/🤗%20HuggingFace-Space-blue)](https://huggingface.co/spaces/AmbhariiLabs/agentmesh)
82
+
83
+ > ⭐ **If AgentMesh saves your team money or unblocks a compliance requirement, a GitHub star helps others find it.** [Star on GitHub →](https://github.com/anilatambharii/agentmesh)
81
84
 
82
85
  ---
83
86
 
@@ -85,6 +88,19 @@ Description-Content-Type: text/markdown
85
88
 
86
89
  ---
87
90
 
91
+ ## Built for teams that ship AI at scale
92
+
93
+ | If you're a... | AgentMesh gives you... |
94
+ |---|---|
95
+ | **Platform / AI Infra team** (Google, Meta, NVIDIA, Anthropic) | A drop-in governance sidecar for your internal LLM gateway |
96
+ | **Enterprise CTO / VP Eng** | One policy file that enforces cost caps, compliance, and security across every AI tool your engineers use |
97
+ | **Healthcare / Legal / Finance team** | HIPAA PHI masking + EU AI Act compliance reports out of the box |
98
+ | **FinOps / Finance** | Per-team chargeback reports — know exactly which team spent what on AI |
99
+ | **Security team** | Prompt injection detection + PII scanning + output toxicity filter on every request |
100
+ | **Solo engineer / startup** | 75% cost reduction on day one, zero code changes to your agents |
101
+
102
+ ---
103
+
88
104
  ## Enterprise Governance Features
89
105
 
90
106
  AgentMesh ships a complete enterprise security and compliance stack — no third-party SaaS required.
@@ -9,6 +9,9 @@
9
9
  [![PyPI Downloads](https://static.pepy.tech/badge/agentmesh-proxy)](https://pepy.tech/project/agentmesh-proxy)
10
10
  [![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
11
11
  [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
12
+ [![HuggingFace Space](https://img.shields.io/badge/🤗%20HuggingFace-Space-blue)](https://huggingface.co/spaces/AmbhariiLabs/agentmesh)
13
+
14
+ > ⭐ **If AgentMesh saves your team money or unblocks a compliance requirement, a GitHub star helps others find it.** [Star on GitHub →](https://github.com/anilatambharii/agentmesh)
12
15
 
13
16
  ---
14
17
 
@@ -16,6 +19,19 @@
16
19
 
17
20
  ---
18
21
 
22
+ ## Built for teams that ship AI at scale
23
+
24
+ | If you're a... | AgentMesh gives you... |
25
+ |---|---|
26
+ | **Platform / AI Infra team** (Google, Meta, NVIDIA, Anthropic) | A drop-in governance sidecar for your internal LLM gateway |
27
+ | **Enterprise CTO / VP Eng** | One policy file that enforces cost caps, compliance, and security across every AI tool your engineers use |
28
+ | **Healthcare / Legal / Finance team** | HIPAA PHI masking + EU AI Act compliance reports out of the box |
29
+ | **FinOps / Finance** | Per-team chargeback reports — know exactly which team spent what on AI |
30
+ | **Security team** | Prompt injection detection + PII scanning + output toxicity filter on every request |
31
+ | **Solo engineer / startup** | 75% cost reduction on day one, zero code changes to your agents |
32
+
33
+ ---
34
+
19
35
  ## Enterprise Governance Features
20
36
 
21
37
  AgentMesh ships a complete enterprise security and compliance stack — no third-party SaaS required.
@@ -600,6 +600,7 @@ def _build_mesh(config: ProxyConfig) -> Any:
600
600
  PIIScanner(
601
601
  mode=ScanMode(config.pii_mode),
602
602
  enabled_types=config.pii_entity_types or None,
603
+ strict_pci=True, # catch all card-shaped numbers, not just Luhn-valid ones
603
604
  )
604
605
  if config.pii_mode else None
605
606
  )
@@ -81,7 +81,7 @@ _PATTERNS: List[tuple] = [
81
81
  ("EMAIL", _p(r"\b[A-Za-z0-9._%+\-]+@[A-Za-z0-9.\-]+\.[A-Za-z]{2,}\b")),
82
82
  ("PHONE_US", _p(r"\b(\+1[\s\-.]?)?\(?\d{3}\)?[\s\-.]?\d{3}[\s\-.]?\d{4}\b")),
83
83
  ("SSN", _p(r"\b(?!000|666|9\d{2})\d{3}[- ](?!00)\d{2}[- ](?!0000)\d{4}\b")),
84
- ("PASSPORT", _p(r"\b[A-Z]{1,2}\d{6,9}\b")),
84
+ ("PASSPORT", _p(r"\b(?:passport(?:\s+(?:no|number|num|#))?)[:\s#]+[A-Z]{1,2}\d{6,9}\b")),
85
85
  ("IP_ADDRESS", _p(r"\b(?:\d{1,3}\.){3}\d{1,3}\b")),
86
86
  ("DOB", _p(r"\b(?:born|dob|date of birth)[:\s]+\d{1,2}[/\-]\d{1,2}[/\-]\d{2,4}\b")),
87
87
  ("ZIP_CODE", _p(r"\b\d{5}(?:-\d{4})?\b")),
@@ -99,6 +99,9 @@ _PATTERNS: List[tuple] = [
99
99
  ("PCI_CVV", _p(r"\b(?:cvv|cvc|cvv2|cvc2|security code)[:\s]+\d{3,4}\b")),
100
100
  ("PCI_ROUTING", _p(r"\b(?:routing(?:\s+number)?|aba)[:\s]+\d{9}\b")),
101
101
  ("PCI_ACCOUNT", _p(r"\b(?:account(?:\s+number)?|acct)[:\s]+\d{8,17}\b")),
102
+ ("PCI_BALANCE", _p(r"\b(?:current\s+balance|available\s+(?:balance|credit)|outstanding\s+balance|"
103
+ r"account\s+balance|closing\s+balance|credit\s+limit|amount\s+(?:owing|due|owed))"
104
+ r"[:\s]+\$?[\d,]+(?:\.\d{2})?\b")),
102
105
 
103
106
  # ── CII (credential & infrastructure) ────────────────────────────────────
104
107
  ("CII_AWS_KEY", _p(r"\b(?:AKIA|ASIA|AROA|AIDA|ANPA|ANVA|AIPA)[A-Z0-9]{16}\b")),
@@ -130,6 +133,25 @@ def _luhn(number: str) -> bool:
130
133
  return total % 10 == 0
131
134
 
132
135
 
136
+ def _dedup_overlapping(findings: List[Finding]) -> List[Finding]:
137
+ """
138
+ Remove overlapping findings, keeping the outermost (earliest-starting) match.
139
+ Sorts by start position, then drops any finding whose range overlaps the
140
+ previous kept finding.
141
+ """
142
+ if len(findings) <= 1:
143
+ return findings
144
+ sorted_f = sorted(findings, key=lambda f: (f.start, -(f.end - f.start)))
145
+ result: List[Finding] = []
146
+ last_end = -1
147
+ for f in sorted_f:
148
+ if f.start >= last_end:
149
+ result.append(f)
150
+ last_end = f.end
151
+ # else: this finding is fully or partially inside the previous one — skip it
152
+ return result
153
+
154
+
133
155
  class PIIScanner:
134
156
  """
135
157
  Scan text for PII, PHI, PCI and CII. Thread-safe, no external dependencies.
@@ -145,10 +167,15 @@ class PIIScanner:
145
167
  mode: ScanMode = ScanMode.MASK,
146
168
  enabled_types: Optional[List[str]] = None,
147
169
  min_confidence: float = 0.7,
170
+ strict_pci: bool = True,
148
171
  ):
149
172
  self.mode = mode
150
173
  self.enabled = set(enabled_types) if enabled_types else None
151
174
  self.min_conf = min_confidence
175
+ # When True, any card-shaped number (13-19 digits) is masked even if
176
+ # it fails the Luhn check. Recommended for governance proxies — better
177
+ # to mask a false positive than let a real card number reach the LLM.
178
+ self.strict_pci = strict_pci
152
179
 
153
180
  def scan(self, text: str) -> ScanResult:
154
181
  if not text:
@@ -166,8 +193,10 @@ class PIIScanner:
166
193
  if len(val) < min_len:
167
194
  continue
168
195
 
169
- # Extra validation for credit cards
170
- if entity_type == "PCI_CARD":
196
+ # Credit card validation:
197
+ # strict_pci=True (default): mask anything card-shaped — safer for governance
198
+ # strict_pci=False: only mask numbers that pass Luhn — fewer false positives
199
+ if entity_type == "PCI_CARD" and not self.strict_pci:
171
200
  digits_only = re.sub(r"\D", "", val)
172
201
  if not _luhn(digits_only):
173
202
  continue
@@ -195,10 +224,16 @@ class PIIScanner:
195
224
  if not findings:
196
225
  return ScanResult(original=text, cleaned=text)
197
226
 
227
+ # Remove overlapping matches — when two patterns overlap (e.g. PASSPORT
228
+ # inside PHI_MRN), keep the outermost (earliest start). Without this,
229
+ # applying replacements in reverse order corrupts string offsets for the
230
+ # outer match, producing artifacts like "[PHI_MRN]T]".
231
+ findings = _dedup_overlapping(findings)
232
+
198
233
  if self.mode == ScanMode.BLOCK:
199
234
  raise PIIDetectedError(findings)
200
235
 
201
- # Apply replacements in reverse order (preserve offsets)
236
+ # Apply replacements in reverse order so earlier offsets stay valid
202
237
  cleaned = text
203
238
  for f in sorted(findings, key=lambda x: x.start, reverse=True):
204
239
  replacement = f"[{f.entity_type}]" if self.mode == ScanMode.MASK else "***"
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "agentmesh-proxy"
7
- version = "0.3.0"
7
+ version = "0.3.2"
8
8
  description = "Governance proxy for every AI tool — PII/PHI masking, prompt injection detection, anomaly alerts, semantic cache, token quotas, vendor routing, compliance reports"
9
9
  readme = "README.md"
10
10
  license = { text = "Apache-2.0" }
File without changes