Skip to main content

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

  • DataclassesRule, Insight, SearchHit, EvaluateRequest, EvaluateResponse, HealthResponse. All pydantic.BaseModel subclasses 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 exportschemas/rule.schema.json is generated by tools/export_schema.py and 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agent_readiness_insights_protocol-0.11.0.tar.gz (82.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file agent_readiness_insights_protocol-0.11.0.tar.gz.

File metadata

File hashes

Hashes for agent_readiness_insights_protocol-0.11.0.tar.gz
Algorithm Hash digest
SHA256 ffeca9ce8e0f8b796840c2fcba522c31f4675a50a55512c45c8c83756a7f3222
MD5 78e84dc2647129520c8c7ba3bff5b8c1
BLAKE2b-256 e7238aea37dfea4ddb58b92298eec51cd25521abdfd4990f442c0abbdf9d03a3

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_readiness_insights_protocol-0.11.0.tar.gz:

Publisher: release.yml on harrydaihaolin/agent-readiness-insights-protocol

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agent_readiness_insights_protocol-0.11.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agent_readiness_insights_protocol-0.11.0-py3-none-any.whl
Algorithm Hash digest
SHA256 07a4a4552c097200f5553df4e46f61fabd1da241a6ea0da7ab6a28b7677a8c76
MD5 cb850896e21e621c78ec278b0dd3dcb4
BLAKE2b-256 1d4892cf979d1348c30402fe7f5e71fd4a235a5cc43af3a4ca0d9b5c59a5907a

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_readiness_insights_protocol-0.11.0-py3-none-any.whl:

Publisher: release.yml on harrydaihaolin/agent-readiness-insights-protocol

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page