Python SDK for CodeRifts — API governance for AI agents
Project description
coderifts-sdk
Python SDK for CodeRifts — API governance for AI agents.
Installation
pip 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.0.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.0.tar.gz.
File metadata
- Download URL: coderifts_sdk-1.0.0.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 |
5e13e242cb7dd8a1951621d602e4729d7f2945218dcb108d78cc03d3b02cdf73
|
|
| MD5 |
23f2927c224e8e9b0c4d7df425b364a0
|
|
| BLAKE2b-256 |
206acdb84f8f74ccc6136c921ed5d90735a12f6f1148ed097d6aadd90fa133e1
|
File details
Details for the file coderifts_sdk-1.0.0-py3-none-any.whl.
File metadata
- Download URL: coderifts_sdk-1.0.0-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 |
c382d137ea14996f174578d36f6623264fa868d2d5a2a4c8886c63ee9a5157bb
|
|
| MD5 |
c4406ed7d5d76dbd1f72e4733af0023b
|
|
| BLAKE2b-256 |
5918e3ee6ab9f39071c99e2bc922299c420f442ba0cfe63d4bea49b0dbbf3c1c
|