Skip to main content

SOX Protocol reference plugin: schema-strict body validator (kind: transformer)

Project description

sox-plugin-schema-strict

Reference plugin for the SOX Protocol — strict JSON-Schema validation of message bodies on the wire.

The plugin registers a transformer-kind middleware (id io.sox.schema-strict) that validates every operation's input body against the canonical schema in spec/operations/<op>.input.schema.json. Requests that fail validation are short-circuited with a structured error_code envelope before they reach the backing store.

It is the canonical proof-of-concept that the SOX plugin contract works end-to-end. Most SOX deployments will install this plugin alongside the core; the recommended install line is:

pip install sox-protocol sox-plugin-schema-strict

Install non-editable. The plugin's sox-plugin.yaml manifest is registered as setuptools package-data; editable installs (pip install -e) do not expose that data file via importlib.resources and the SOX MCP server will fail plugin discovery at boot. Use plain pip install.

What it validates

  • channels__send body shape (must be a JSON object, not a string).
  • channels__recv channel filter list shape and max_messages range.
  • channels__subscribe / channels__unsubscribe channel patterns.
  • channels__replay since / until cursors and limit bounds.
  • channels__heartbeat status enum.
  • group__create / group__invite / group__join / group__leave / group__list_members argument shapes.

If you skip the plugin, SOX core accepts any well-typed body — useful for prototyping but unsafe for shared deployments.

Pipeline placement

Schema-strict registers as the first middleware in the pipeline (before auth, before store dispatch). Validation failures emit:

{ "error_code": "schema_invalid", "details": { ... } }

with HTTP status 400 (HTTP transport) or as a structured tool error envelope (stdio transport).

License

Apache 2.0 — see the SOX Protocol repository for the full license and patent grant.

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

sox_plugin_schema_strict-1.0.0.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

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

sox_plugin_schema_strict-1.0.0-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file sox_plugin_schema_strict-1.0.0.tar.gz.

File metadata

  • Download URL: sox_plugin_schema_strict-1.0.0.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sox_plugin_schema_strict-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3bfe328cfb0270ff4408734e7b65752bf605c2ce612b093934adf2b68418f11f
MD5 9ed217d0b4be8aea6a31929114fab1fe
BLAKE2b-256 67cd7be1c9e22e7b528a277cadc7d61038b4dfca9c65ca0113152d1c82820442

See more details on using hashes here.

Provenance

The following attestation bundles were made for sox_plugin_schema_strict-1.0.0.tar.gz:

Publisher: python-publish.yml on PseudoSky/sox-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 sox_plugin_schema_strict-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sox_plugin_schema_strict-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a964645eeed63d9ab92c2c3b8eee7dc9d050444125d507336f15f08e91fba257
MD5 ae6cc1d367d3a9eb766531b6e80cdfc5
BLAKE2b-256 936bb52dd65ddf5f3037f1ac733deedc0f33af4c435ad9823ce4c0dba322a1a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for sox_plugin_schema_strict-1.0.0-py3-none-any.whl:

Publisher: python-publish.yml on PseudoSky/sox-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