agentassert-typec-sdk
One-line wrap. Your Anthropic/OpenAI clients, contract-enforced.
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.AsyncAnthropicopenai.OpenAI/openai.AsyncOpenAI
How It Works
wrap()detects client type by class name- Intercepts
messages.create()/chat.completions.create() - Evaluates PreAction before forwarding
- Raises
ContractBreachErroron DENY - Sends PostAction after response for drift/Θ updates
For Unsupported Clients
Use the proxy instead — no code change, just env vars.
pip install agentassert-typec-proxy
export ANTHROPIC_BASE_URL=http://localhost:9000/anthropic
License
MIT
Metadata
Release files for agentassert-typec-sdk 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| agentassert_typec_sdk-0.7.0.tar.gz | 2.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agentassert_typec_sdk-0.7.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.4 kB
Release files / agentassert_typec_sdk-0.7.0.tar.gz
| Download URL | agentassert_typec_sdk-0.7.0.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
719d8e7a5ee40a93a3684decf7ec59caecfb9924aebb83d53bce10d1dd378cd2
|
|
BLAKE2b-256 checksum How to use checksums |
903cd3c810ed4d42216f720bc5b6852a510a5368bfca5737070f3d5446b95b8c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / agentassert_typec_sdk-0.7.0-py3-none-any.whl
| Download URL | agentassert_typec_sdk-0.7.0-py3-none-any.whl |
|---|---|
| Size | 2.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fcfb54e7f31ba6939ec8b89650dbe96b9955be34dcaab3003ea0569c5ec5af12
|
|
BLAKE2b-256 checksum How to use checksums |
17acc19d55c876f6fa61cbbcbab6605f42988721ace3a0d55f26253dc9868924
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|