Python SDK for CodeRifts — API governance for AI agents
Project description
coderifts-sdk
Python SDK for CodeRifts — API governance for AI agents.
Installation
pip3 install coderifts-sdk
Quick Start
from coderifts import CodeRifts
client = CodeRifts(api_key="cr_live_...")
# Full OpenAPI spec diff analysis
result = client.diff(before="...", after="...")
print(result.omega_decision, result.risk_score)
# Agent preflight check
result = client.preflight_check(
tool_name="get_refund_status",
old_spec="...",
new_spec="..."
)
print(result.decision, result.safe)
# Compliance ledger
ledger = client.get_ledger(repo="owner/repo", limit=10)
print(ledger.total, ledger.entries)
Methods
| Method | Description |
|---|---|
diff(before, after) |
Full OpenAPI spec diff analysis |
preflight_check(tool_name, old_spec, new_spec) |
Agent tool invocation safety check |
explain_decision(omega_api, decision, reflex_triggers) |
Human-readable explanation |
how_to_unblock(decision, breaking_changes, detected_patterns) |
Actionable steps to resolve BLOCK |
score_mcp(manifest) |
MCP manifest agent safety score |
get_ledger(repo, decision, limit) |
Query compliance ledger |
simulate_policy(policy_yaml, old_spec, new_spec) |
Test YAML policy against specs |
Error Handling
from coderifts import CodeRiftsError
try:
result = client.diff(before="...", after="...")
except CodeRiftsError as e:
print(e.code, e.message)
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
coderifts_sdk-1.0.1.tar.gz
(6.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file coderifts_sdk-1.0.1.tar.gz.
File metadata
- Download URL: coderifts_sdk-1.0.1.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0rc1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1fe0f1702c17007058cc8466bd5e0d52aab0d8028dba19ffce26735a2b17683
|
|
| MD5 |
12a2e7347381300cf744afa8581f05e6
|
|
| BLAKE2b-256 |
f7fdc521e582cd367cde5c8c4bdaa66d573774ba6dba0c1ec72bf2366e3964cc
|
File details
Details for the file coderifts_sdk-1.0.1-py3-none-any.whl.
File metadata
- Download URL: coderifts_sdk-1.0.1-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0rc1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c084929d5cfad518a99815f71d0599642a3b5b83151dbf4eb1c5aed194ff2ff
|
|
| MD5 |
30c3a7debb6ee040f44d2dcd9100ff15
|
|
| BLAKE2b-256 |
ec5489f4800cb3e350ffef8383cdaa7cff8f65c847ced13420a1ec01d54f05f8
|