Metadata-Version: 2.4
Name: crewai-dominion-trust
Version: 0.1.0
Summary: Trust-gated MCP tool calls for CrewAI via Dominion Observatory
Author-email: Dinesh Kumar <vdineshk@users.noreply.github.com>
License: MIT
Project-URL: Homepage, https://github.com/vdineshk/daee-engine
Project-URL: Repository, https://github.com/vdineshk/daee-engine/tree/main/packages/crewai-dominion-trust
Keywords: crewai,mcp,trust,security,agents,dominion-observatory
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Security
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: crewai>=0.80.0
Requires-Dist: httpx>=0.24.0
Dynamic: license-file

# crewai-dominion-trust

[![PyPI](https://img.shields.io/pypi/v/crewai-dominion-trust)](https://pypi.org/project/crewai-dominion-trust/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Trust-gated MCP tool calls for CrewAI. One-line activation to check behavioral trust scores via [Dominion Observatory](https://github.com/vdineshk/daee-engine) before every tool call.

## Install

```bash
pip install crewai-dominion-trust
```

## Quick Start

```python
from crewai_dominion_trust import enable_trust_guard

# One line to enable trust checking for ALL tool calls
enable_trust_guard(min_score=70)

# Now all CrewAI agents will have trust-gated MCP tools
agent = Agent(
    role="researcher",
    mcps=["https://some-mcp-server.example.com/mcp"],
)
```

## How It Works

1. Registers a `BeforeToolCallHook` in CrewAI's hook system
2. Before each MCP tool call, checks the server trust score
3. Returns `False` to block calls below the threshold
4. Scores are cached (5-minute TTL) for performance

## Configuration

```python
enable_trust_guard(
    min_score=70,           # Minimum trust score (0-100)
    cache_ttl=300.0,        # Cache TTL in seconds
    block_on_error=False,   # Fail-open if Observatory unreachable
)
```

## License

MIT
