-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
277 lines (251 loc) · 6.88 KB
/
pyproject.toml
File metadata and controls
277 lines (251 loc) · 6.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "ea-agentgate"
version = "1.0.1"
description = "Enterprise-grade security gateway for AI agents with middleware, tracing, and auto-rollback"
readme = { file = "README_PYPI.md", content-type = "text/markdown" }
license = {file = "LICENSE"}
requires-python = ">=3.13"
authors = [
{ name = "Erick Aleman", email = "erick@eacognitive.com" }
]
maintainers = [
{ name = "Erick Aleman", email = "erick@eacognitive.com" }
]
keywords = [
"agentgate",
"ai",
"agents",
"safety",
"middleware",
"gateway",
"openai",
"anthropic",
"gemini",
"llm",
"security",
"governance",
"monitoring"
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: Other/Proprietary License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: System :: Monitoring",
"Typing :: Typed",
]
# Minimal runtime dependencies for CLI and core functionality
# These ensure `pip install ea-agentgate && ea-agentgate serve` works out of the box
dependencies = [
"uvicorn[standard]>=0.27.0",
"fastapi>=0.109.0",
"pydantic-settings>=2.0.0",
"keyring>=25.0.0",
"sqlmodel>=0.0.14",
"aiosqlite>=0.19.0",
"greenlet>=3.0.0",
]
[project.optional-dependencies]
openai = ["openai>=1.0.0"]
anthropic = ["anthropic>=0.30.0"]
google = ["google-genai>=1.0.0"]
all = [
"openai>=1.0.0",
"anthropic>=0.30.0",
"google-genai>=1.0.0",
"torch>=2.0.0",
"transformers>=4.30.0",
]
dashboard = ["httpx>=0.27.0"]
# Full server with all security features (PII detection, auth, rate limiting, etc.)
server = [
"fastapi>=0.109.0",
"uvicorn[standard]>=0.27.0",
"sqlmodel>=0.0.14",
"pydantic-settings>=2.0.0",
"keyring>=25.0.0",
"pyjwt[crypto]>=2.10.1",
"cryptography>=46.0.5",
"passlib[bcrypt]>=1.7.4",
"bcrypt>=4.0.0,<5.0.0",
"python-multipart>=0.0.6",
"pyotp>=2.9.0",
"qrcode>=7.4.0",
"pillow>=12.1.1",
"webauthn>=2.0.0",
"presidio-analyzer>=2.2.0",
"presidio-anonymizer>=2.2.0",
"lingua-language-detector>=2.0.0",
"slowapi>=0.1.9",
"prometheus-client>=0.20.0",
"python-json-logger>=2.0.0",
"z3-solver>=4.13.0",
"httpx>=0.27.0",
"aiosqlite>=0.19.0",
"greenlet>=3.0.0",
"azure-identity>=1.15.0",
"azure-keyvault-secrets>=4.8.0",
"mcp[cli]>=1.26.0,<2",
"alembic>=1.13.0",
"redis>=4.5.0",
]
# Enterprise features
redis = ["redis>=4.5.0"]
azure = [
"azure-identity>=1.15.0",
"azure-keyvault-secrets>=4.8.0",
]
semantic = ["openai>=1.0.0"] # For embeddings + LLM-as-judge
otel = [
"opentelemetry-api>=1.20.0",
"opentelemetry-sdk>=1.20.0",
]
otel-otlp = [
"opentelemetry-api>=1.20.0",
"opentelemetry-sdk>=1.20.0",
"opentelemetry-exporter-otlp>=1.20.0",
]
enterprise = [
"redis>=4.5.0",
"openai>=1.0.0",
"opentelemetry-api>=1.20.0",
"opentelemetry-sdk>=1.20.0",
]
# Async support extras
async = [
"aiofiles>=23.0.0", # Async file I/O
]
# PostgreSQL production support
postgres = [
"asyncpg>=0.29.0",
"psycopg2-binary>=2.9.9",
]
# Cloud backup support
backup-cloud = [
"boto3>=1.26.0",
"azure-storage-blob>=12.19.0",
]
# ML-based security features
ml = [
"torch>=2.0.0",
"transformers>=4.30.0",
]
dev = [
"pytest>=8.0.0",
"pytest-asyncio>=0.23.0",
"pytest-cov>=4.1.0",
"pytest-xdist>=3.5.0",
"allure-pytest>=2.13.0",
"hypothesis>=6.100.0",
"ruff>=0.3.0",
"mypy>=1.18.2,<1.19",
"z3-solver>=4.13.0",
"httpx>=0.27.0",
"torch>=2.10.0",
"transformers>=5.1.0",
"fakeredis[lua]>=2.20.0", # For Redis testing with Lua support
"aiofiles>=23.0.0",
"openai>=1.0.0",
"anthropic>=0.30.0",
"opentelemetry-api>=1.20.0",
"opentelemetry-sdk>=1.20.0",
# Server dependencies needed for tests
"pyjwt[crypto]>=2.10.1",
"bcrypt>=4.0.0,<5.0.0",
"passlib[bcrypt]>=1.7.4",
"python-multipart>=0.0.6",
"pyotp>=2.9.0",
"qrcode>=7.4.0",
"pillow>=12.1.1",
"cryptography>=46.0.5",
"webauthn>=2.0.0",
"presidio-analyzer>=2.2.0",
"presidio-anonymizer>=2.2.0",
"lingua-language-detector>=2.0.0",
"slowapi>=0.1.9",
"prometheus-client>=0.20.0",
"python-json-logger>=2.0.0",
"azure-identity>=1.15.0",
"azure-keyvault-secrets>=4.8.0",
"sentry-sdk[fastapi]>=2.0.0",
]
[project.urls]
Homepage = "https://github.com/EaCognitive/agentgate"
Documentation = "https://github.com/EaCognitive/agentgate#readme"
Repository = "https://github.com/EaCognitive/agentgate"
Changelog = "https://github.com/EaCognitive/agentgate/blob/main/CHANGELOG.md"
"Bug Tracker" = "https://github.com/EaCognitive/agentgate/issues"
"Source Code" = "https://github.com/EaCognitive/agentgate"
[project.scripts]
ea-agentgate = "ea_agentgate.cli:main"
[tool.hatch.build.targets.wheel]
packages = ["ea_agentgate", "server"]
include = ["ea_agentgate/prompts/registry.json"]
[tool.hatch.build.targets.sdist]
include = [
"/ea_agentgate",
"/server",
"/tests",
"/README.md",
"/README_PYPI.md",
"/LICENSE",
"/CHANGELOG.md",
]
[tool.ruff]
line-length = 100
target-version = "py313"
[tool.ruff.lint]
select = ["E", "F", "W", "E501"]
[tool.ruff.lint.per-file-ignores]
"alembic/versions/*.py" = ["E501"]
[tool.pyright]
include = ["ea_agentgate", "server"]
exclude = ["tests"]
pythonVersion = "3.13"
typeCheckingMode = "basic"
[tool.pylint.main]
source-roots = ["."]
[tool.pylint.basic]
good-names = ["i", "j", "k", "ex", "Run", "_", "id"]
[tool.pylint.design]
max-public-methods = 20
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-v --tb=short -m \"not formal_heavy\""
asyncio_mode = "auto"
# Allow both function and session scoped async fixtures
# E2E tests use session scope, others use function scope
asyncio_default_fixture_loop_scope = "session"
markers = [
"backup: backup and restore system tests",
"unit: unit tests that don't require external services",
"integration: integration tests that may require external services",
"security: security-focused tests",
"e2e: end-to-end tests with full middleware stack",
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"formal_heavy: long-running formal verification workloads excluded by default",
]
[tool.coverage.run]
source = ["ea_agentgate", "server"]
omit = ["*/examples/*", "*/__init__.py"]
[tool.coverage.report]
fail_under = 90
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"raise NotImplementedError",
]
[tool.mypy]
python_version = "3.13"
warn_return_any = true
warn_unused_configs = true
ignore_missing_imports = true
files = ["ea_agentgate"]
exclude = "ea_agentgate/examples"