Shared schema, dataclasses, and version constants for the agent-readiness insights ecosystem.
Project description
agent-readiness-insights-protocol
Shared schema, dataclasses, and version constants for the agent-readiness insights ecosystem.
This is a tiny PyPI package that defines the contract between three independent consumers of the insights system:
| Consumer | Repo |
|---|---|
| OSS rule pack | agent-readiness-rules |
| Public scanner | agent-readiness |
| Closed insights engine | (private) |
Splitting the protocol out keeps each consumer honest about the contract,
lets either side iterate behind versioned interfaces, and means the engine
never has to install the full agent-readiness runtime to deserialize
a JSON response.
Install
pip install agent-readiness-insights-protocol
Pydantic is the only runtime dependency.
What's inside
- Dataclasses —
Rule,Insight,SearchHit,EvaluateRequest,EvaluateResponse,HealthResponse. Allpydantic.BaseModelsubclasses with strict JSON serializers. - Version constants — two independent integers:
PROTOCOL_VERSION— JSON shapes for/evaluate,/insights/search,/healthz.RULES_VERSION— YAML rule schema (match types, required fields).
- JSON Schema export —
schemas/rule.schema.jsonis generated bytools/export_schema.pyand committed so any consumer's CI can validate YAML rule files without importing Python.
Versioning rules
Bump only on breaking changes. Adding optional fields is non-breaking
and does NOT bump either version (mirrors the existing convention in
agent-readiness/src/agent_readiness/models.py).
The engine's /healthz reports both versions:
{
"protocol_version": 1,
"rules_version_supported": [1],
"rules_pack_version_loaded": "1.0.0",
"engine_version": "0.1.0"
}
A client refuses to call when protocol_version mismatches; logs a warning
when a rules version it doesn't recognise appears.
Usage
from agent_readiness_insights_protocol import (
PROTOCOL_VERSION,
RULES_VERSION,
Rule,
EvaluateRequest,
EvaluateResponse,
)
req = EvaluateRequest(repo_path="/path/to/repo", with_insights=True)
print(req.model_dump_json())
Develop
make dev # pip install -e ".[dev]"
make test # pytest
make lint # ruff check
make schema # regenerate schemas/rule.schema.json
make build # build wheel + sdist
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
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 agent_readiness_insights_protocol-0.1.0.tar.gz.
File metadata
- Download URL: agent_readiness_insights_protocol-0.1.0.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1378890c1f243c3cb8e1310dd5e340a61728df1d9465b1c318f25beec9b695e5
|
|
| MD5 |
e806fca1bf9dbbafc55f7506c6e79be3
|
|
| BLAKE2b-256 |
4769feea88bda943a61cfd87779d96dfaf3545ba90675bf84f6c937b5d6cf500
|
File details
Details for the file agent_readiness_insights_protocol-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agent_readiness_insights_protocol-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
063c371b47f6a20b86db6e38ece736b4f74375d7680ff4e2b3a3f258315d37d3
|
|
| MD5 |
3ad0f28a5418318364f4239681660ea4
|
|
| BLAKE2b-256 |
0f0a81b8e894e0fc89af2b3c2d2841d31087bb741ed1e7ddd3ca9d84b25e18fe
|