Metadata-Version: 2.4
Name: diplomat-gate
Version: 0.1.0
Summary: Approval gates for AI agent payments and emails. CONTINUE / REVIEW / STOP before execution.
Project-URL: Homepage, https://diplomat.run
Project-URL: Repository, https://github.com/Diplomat-ai/diplomat-gate
Project-URL: Documentation, https://github.com/Diplomat-ai/diplomat-gate#readme
Project-URL: Issues, https://github.com/Diplomat-ai/diplomat-gate/issues
Author-email: Diplomat Services <contact@diplomat.run>
License: Apache-2.0
License-File: LICENSE
Keywords: ai-agents,approval-gate,email,governance,guardrails,payments,safety,tool-calls
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Security
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10
Provides-Extra: all
Requires-Dist: pyyaml>=6.0; extra == 'all'
Requires-Dist: rich>=13.0; extra == 'all'
Provides-Extra: dev
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: pyyaml>=6.0; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Provides-Extra: rich
Requires-Dist: rich>=13.0; extra == 'rich'
Provides-Extra: yaml
Requires-Dist: pyyaml>=6.0; extra == 'yaml'
Description-Content-Type: text/markdown

# diplomat-gate

Approval gates for AI agent payments and emails. Evaluate tool calls against policies — **CONTINUE / REVIEW / STOP** — before execution.

## Install

```bash
pip install diplomat-gate
pip install "diplomat-gate[yaml]"   # for YAML config
pip install "diplomat-gate[all]"    # all extras
```

## Quick start

```python
from diplomat_gate import Gate

gate = Gate.from_yaml("gate.yaml")

verdict = gate.evaluate({
    "action": "charge_card",
    "amount": 15000,
    "currency": "usd",
    "customer_id": "cus_abc123",
})

if verdict.allowed:
    # proceed
    pass
elif verdict.needs_review:
    # route to human
    pass
else:
    # verdict.blocked — abort
    pass
```

## License

Apache-2.0
