agentrust-py 0.0.3__tar.gz → 0.0.4__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 (75) hide show
  1. agentrust_py-0.0.4/.gitignore +33 -0
  2. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/PKG-INFO +14 -7
  3. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/README.md +1 -1
  4. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/agentrust_sdk/__init__.py +25 -1
  5. agentrust_py-0.0.4/agentrust_sdk/_evaluations.py +574 -0
  6. agentrust_py-0.0.4/agentrust_sdk/_real_validator.py +1739 -0
  7. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/agentrust_sdk/adapters/crewai.py +6 -0
  8. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/agentrust_sdk/adapters/langgraph.py +6 -0
  9. agentrust_py-0.0.4/agentrust_sdk/audit/__init__.py +7 -0
  10. agentrust_py-0.0.4/agentrust_sdk/audit/logger.py +138 -0
  11. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/agentrust_sdk/auto.py +9 -2
  12. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/agentrust_sdk/autoload.py +1 -1
  13. agentrust_py-0.0.4/agentrust_sdk/classifier/__init__.py +8 -0
  14. agentrust_py-0.0.4/agentrust_sdk/classifier/engine.py +233 -0
  15. agentrust_py-0.0.4/agentrust_sdk/classifier/profiles.py +139 -0
  16. agentrust_py-0.0.4/agentrust_sdk/classifier/system_prompt.md +74 -0
  17. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/agentrust_sdk/cli.py +75 -31
  18. agentrust_py-0.0.4/agentrust_sdk/cli_certify.py +472 -0
  19. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/agentrust_sdk/client.py +240 -2
  20. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/agentrust_sdk/config.py +14 -1
  21. agentrust_py-0.0.4/agentrust_sdk/decorator.py +359 -0
  22. agentrust_py-0.0.4/agentrust_sdk/embedded.py +800 -0
  23. agentrust_py-0.0.4/agentrust_sdk/golden_suite.py +92 -0
  24. agentrust_py-0.0.4/agentrust_sdk/governance/__init__.py +15 -0
  25. agentrust_py-0.0.4/agentrust_sdk/governance/hitl.py +172 -0
  26. agentrust_py-0.0.4/agentrust_sdk/governance/kernel.py +310 -0
  27. agentrust_py-0.0.4/agentrust_sdk/governance/kill_switch.py +100 -0
  28. agentrust_py-0.0.4/agentrust_sdk/governance/modes.py +58 -0
  29. agentrust_py-0.0.4/agentrust_sdk/manifest.py +146 -0
  30. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/agentrust_sdk/models.py +29 -14
  31. agentrust_py-0.0.4/agentrust_sdk/notifications/__init__.py +14 -0
  32. agentrust_py-0.0.4/agentrust_sdk/notifications/discord.py +93 -0
  33. agentrust_py-0.0.4/agentrust_sdk/notifications/dispatcher.py +125 -0
  34. agentrust_py-0.0.4/agentrust_sdk/notifications/slack.py +71 -0
  35. agentrust_py-0.0.4/agentrust_sdk/policy/__init__.py +8 -0
  36. agentrust_py-0.0.4/agentrust_sdk/policy/backends/__init__.py +5 -0
  37. agentrust_py-0.0.4/agentrust_sdk/policy/backends/native.py +40 -0
  38. agentrust_py-0.0.4/agentrust_sdk/policy/backends/opa.py +89 -0
  39. agentrust_py-0.0.4/agentrust_sdk/policy/engine.py +392 -0
  40. agentrust_py-0.0.4/agentrust_sdk/policy/loader.py +387 -0
  41. agentrust_py-0.0.4/agentrust_sdk/tool_tracking.py +128 -0
  42. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/agentrust_sdk/webhooks.py +16 -8
  43. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/pyproject.toml +16 -7
  44. agentrust_py-0.0.4/tests/_cfg.py +32 -0
  45. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/tests/conftest.py +14 -1
  46. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/tests/test_adapters.py +29 -24
  47. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/tests/test_async_advanced.py +63 -49
  48. agentrust_py-0.0.4/tests/test_callback_url.py +184 -0
  49. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/tests/test_chaos.py +14 -12
  50. agentrust_py-0.0.4/tests/test_cli_certify.py +333 -0
  51. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/tests/test_client.py +16 -24
  52. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/tests/test_config.py +1 -1
  53. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/tests/test_decorator.py +68 -11
  54. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/tests/test_embedded.py +10 -3
  55. agentrust_py-0.0.4/tests/test_golden_suite.py +79 -0
  56. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/tests/test_hooks.py +41 -41
  57. agentrust_py-0.0.4/tests/test_manifest.py +119 -0
  58. agentrust_py-0.0.3/agentrust_sdk/decorator.py +0 -276
  59. agentrust_py-0.0.3/agentrust_sdk/embedded.py +0 -428
  60. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/CHANGELOG.md +0 -0
  61. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/LICENSE +0 -0
  62. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/agentrust/__init__.py +0 -0
  63. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/agentrust_sdk/adapters/__init__.py +0 -0
  64. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/agentrust_sdk/adapters/autogen.py +0 -0
  65. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/agentrust_sdk/adapters/claude_agents.py +0 -0
  66. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/agentrust_sdk/adapters/mcp.py +0 -0
  67. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/agentrust_sdk/adapters/openai_agents.py +0 -0
  68. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/agentrust_sdk/auth.py +0 -0
  69. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/agentrust_sdk/hooks.py +0 -0
  70. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/agentrust_sdk/py.typed +0 -0
  71. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/agentrust_sdk/queue_replay.py +0 -0
  72. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/agentrust_sdk/tiers.py +0 -0
  73. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/agentrust_sdk/version_negotiation.py +0 -0
  74. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/tests/__init__.py +0 -0
  75. {agentrust_py-0.0.3 → agentrust_py-0.0.4}/tests/test_webhooks.py +0 -0
@@ -0,0 +1,33 @@
1
+ # ── Secrets — NEVER commit these ─────────────────────────────────────────────
2
+ .env
3
+ .env.local
4
+ .env.*.local
5
+
6
+ # ── Python ────────────────────────────────────────────────────────────────────
7
+ __pycache__/
8
+ *.py[cod]
9
+ *.pyo
10
+ *.pyd
11
+ .Python
12
+ *.egg-info/
13
+ dist/
14
+ build/
15
+ *.whl
16
+ *.tar.gz
17
+ .eggs/
18
+
19
+ # ── Virtual environments ──────────────────────────────────────────────────────
20
+ venv/
21
+ .venv/
22
+ .venv*/
23
+ env/
24
+ .env/
25
+
26
+ # ── AgentTrust local data ─────────────────────────────────────────────────────
27
+ *.db
28
+ /tmp/agentrust_*.db
29
+
30
+ # ── Testing ───────────────────────────────────────────────────────────────────
31
+ .pytest_cache/
32
+ .coverage
33
+ htmlcov/
@@ -1,11 +1,11 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: agentrust-py
3
- Version: 0.0.3
4
- Summary: AgentTrust Edge — the AI Agent Harness. One decorator, full trust enforcement.
3
+ Version: 0.0.4
4
+ Summary: AgentTrust Edge — Full Governance Platform. Policy Engine + MAD Classifier + HITL + Kill Switch.
5
5
  Project-URL: Homepage, https://agentrust.io
6
6
  Project-URL: Documentation, https://docs.agentrust.io
7
- Project-URL: Repository, https://github.com/agentrust/agentrust
8
- Project-URL: Changelog, https://github.com/agentrust/agentrust/blob/main/CHANGELOG.md
7
+ Project-URL: Repository, https://github.com/agent-trust-os/agent-trust-sdk
8
+ Project-URL: Changelog, https://github.com/agent-trust-os/agent-trust-sdk/blob/main/CHANGELOG.md
9
9
  License: Apache-2.0
10
10
  License-File: LICENSE
11
11
  Keywords: agents,ai,audit,compliance,governance,llm,safety,trust
@@ -38,11 +38,18 @@ Provides-Extra: embedded
38
38
  Requires-Dist: fastapi<1.0.0,>=0.137.1; extra == 'embedded'
39
39
  Requires-Dist: uvicorn<1.0.0,>=0.29.0; extra == 'embedded'
40
40
  Provides-Extra: full
41
- Requires-Dist: agentrust-sdk[embedded,otel,retry]; extra == 'full'
41
+ Requires-Dist: fastapi<1.0.0,>=0.137.1; extra == 'full'
42
+ Requires-Dist: openai<2.0.0,>=1.0.0; extra == 'full'
43
+ Requires-Dist: opentelemetry-api>=1.20.0; extra == 'full'
44
+ Requires-Dist: opentelemetry-sdk>=1.20.0; extra == 'full'
45
+ Requires-Dist: tenacity<10.0.0,>=8.2.0; extra == 'full'
46
+ Requires-Dist: uvicorn<1.0.0,>=0.29.0; extra == 'full'
42
47
  Provides-Extra: langchain
43
48
  Requires-Dist: langchain<1.0.0,>=0.2.0; extra == 'langchain'
44
49
  Provides-Extra: langgraph
45
50
  Requires-Dist: langgraph<1.0.0,>=0.2.0; extra == 'langgraph'
51
+ Provides-Extra: llm
52
+ Requires-Dist: openai<2.0.0,>=1.0.0; extra == 'llm'
46
53
  Provides-Extra: openai
47
54
  Requires-Dist: openai<3.0.0,>=2.41.1; extra == 'openai'
48
55
  Provides-Extra: otel
@@ -73,7 +80,7 @@ pip install "agentrust-py[embedded,retry]"
73
80
  ## 30-second quickstart
74
81
 
75
82
  ```python
76
- from agentrust_sdk import harness, embed_gateway
83
+ from import harness, embed_gateway
77
84
 
78
85
  # Optional: start an in-process SQLite gateway (dev / air-gap)
79
86
  embed_gateway()
@@ -19,7 +19,7 @@ pip install "agentrust-py[embedded,retry]"
19
19
  ## 30-second quickstart
20
20
 
21
21
  ```python
22
- from agentrust_sdk import harness, embed_gateway
22
+ from import harness, embed_gateway
23
23
 
24
24
  # Optional: start an in-process SQLite gateway (dev / air-gap)
25
25
  embed_gateway()
@@ -42,7 +42,19 @@ from .adapters.autogen import AgentTrustReplyHook, AgentTrustGroupChatMonitor
42
42
  from .adapters.claude_agents import ClaudeAgentGuard
43
43
  from .adapters.openai_agents import agent_guard as openai_agent_guard, OpenAIAgentsGuard, SwarmGuard
44
44
  from .decorator import BlockedError, harness, validate # validate = alias
45
+ from .tool_tracking import track_tool, timed_tool
45
46
  from .embedded import EmbeddedGateway, embed_gateway
47
+ from ._real_validator import (
48
+ ValidatorResult,
49
+ register_ml_injection_detector,
50
+ register_semantic_grounding,
51
+ register_validator,
52
+ )
53
+ from ._evaluations import (
54
+ evaluate_all,
55
+ evaluate_robustness,
56
+ register_llm_judge,
57
+ )
46
58
  from .models import (
47
59
  DecisionResult,
48
60
  RiskResult,
@@ -76,6 +88,15 @@ __all__ = [
76
88
  # Embedded gateway (zero-dep plug-and-play)
77
89
  "embed_gateway",
78
90
  "EmbeddedGateway",
91
+ # Pluggable validation extensions (research-driven)
92
+ "register_validator",
93
+ "register_ml_injection_detector",
94
+ "register_semantic_grounding",
95
+ "ValidatorResult",
96
+ # 11-dimension evaluation engine
97
+ "evaluate_all",
98
+ "evaluate_robustness",
99
+ "register_llm_judge",
79
100
  # Clients
80
101
  "AgentTrustClient",
81
102
  "AsyncAgentTrustClient",
@@ -117,8 +138,11 @@ __all__ = [
117
138
  "webhook_mask_url",
118
139
  "validate_webhook_url",
119
140
  "is_discord_url",
141
+ # Tool tracking (call inside @harness-decorated functions)
142
+ "track_tool",
143
+ "timed_tool",
120
144
  # Backward compat
121
145
  "validate",
122
146
  ]
123
147
 
124
- __version__ = "0.0.3"
148
+ __version__ = "0.0.4"