File size: 2,572 Bytes
138ebd0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.backends.legacy:build"

[project]
name = "prompt-injection-triage-env"
version = "1.0.0"
description = "OpenEnv RL environment for training AI agents to detect, classify, and mitigate prompt injection attacks."
readme = "README.md"
license = { text = "Apache-2.0" }
requires-python = ">=3.11"
authors = [
  { name = "Muhammed Al Hameed M" },
  { name = "Vignesh Anbalagan" },
  { name = "A. Shameer" },
]
keywords = ["prompt-injection", "ai-safety", "reinforcement-learning", "openenv", "cybersecurity"]

# ── Dependencies ─────────────────────────────────────────────────────────────
dependencies = [
  "openenv-core>=0.2.0",           # required by openenv validate
  "fastapi==0.135.3",
  "uvicorn[standard]==0.43.0",
  "pydantic==2.12.5",
  "openai==2.30.0",
  "httpx==0.28.1",
  "gradio==6.11.0",
]

[project.optional-dependencies]
test = [
  "pytest==9.0.2",
  "pytest-asyncio==1.3.0",
  "anyio==4.13.0",
]

# ── Entry points ─────────────────────────────────────────────────────────────
# "server" script is required by openenv validate multi-mode check
[project.scripts]
server = "server.app:main"

[tool.setuptools.packages.find]
where = ["."]
include = ["server*"]

# ── OpenEnv multi-mode deployment ─────────────────────────────────────────────
[tool.openenv]
name = "prompt-injection-triage-env"
version = "1.0.0"

[tool.openenv.modes.server]
description = "FastAPI environment server (RL loop endpoints: /reset /step /state /health)"
command = "uvicorn server.app:app --host 0.0.0.0 --port 7860"
port = 7860
health_check = "/health"

[tool.openenv.modes.ui]
description = "Gradio visual interface for judges"
command = "python app.py"
port = 7862

[tool.openenv.modes.inference]
description = "Baseline inference agent"
command = "python inference.py"

# ── Pytest ────────────────────────────────────────────────────────────────────
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]