Metadata-Version: 2.4
Name: agentassert-typec-sdk
Version: 0.4.2
Summary: AgentAssert Type-C SDK wrapper — wrap(Anthropic(), 'contract.yaml') to enforce behavioral contracts on direct API clients.
Project-URL: Homepage, https://agentassert.com/typec
Project-URL: Paper, https://arxiv.org/abs/2602.22302
Project-URL: Repository, https://github.com/qualixar/agentassert-typec
Author: Varun Pratap Bhardwaj
License-Expression: MIT
Keywords: agentassert,ai-agents,behavioral-contracts,qualixar,runtime-enforcement,sdk,typec,wrapper
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.12
Requires-Dist: agentassert-typec-core<0.5,>=0.4.2
Provides-Extra: dev
Requires-Dist: anthropic>=0.49; extra == 'dev'
Requires-Dist: openai>=1.68; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
Requires-Dist: pytest-cov>=6.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.9; extra == 'dev'
Description-Content-Type: text/markdown

# agentassert-typec-sdk

**One-line wrap. Your Anthropic/OpenAI clients, contract-enforced.**

```python
from anthropic import Anthropic
from agentassert_typec_sdk import wrap

client = wrap(Anthropic(), "contract.yaml")
# client.messages.create(...)  ← now contract-enforced
# Raises ContractBreachError on DENY
# Return type is UNCHANGED — same Anthropic response
```

## Supported Clients

- `anthropic.Anthropic` / `anthropic.AsyncAnthropic`
- `openai.OpenAI` / `openai.AsyncOpenAI`

## How It Works

1. `wrap()` detects client type by class name
2. Intercepts `messages.create()` / `chat.completions.create()`
3. Evaluates PreAction before forwarding
4. Raises `ContractBreachError` on DENY
5. Sends PostAction after response for drift/Θ updates

## For Unsupported Clients

Use the proxy instead — no code change, just env vars.

```bash
pip install agentassert-typec-proxy
export ANTHROPIC_BASE_URL=http://localhost:9000/anthropic
```

## License

MIT
