ONEX Service Provider Interface - Protocol definitions
Project description
omnibase_spi
omnibase_spi is the Service Provider Interface package for ONEX (OmniNode eXecution). It defines
protocol contracts, small wire-format contracts, and SPI exceptions that other
repos implement or consume.
This package is intentionally not the implementation layer. Concrete runtime,
transport, service, registry, and I/O behavior belongs in implementation repos
such as omnibase_infra.
Current Role
- Defines 248
protocol_*.pyfiles across 37 protocol domains. - Provides runtime-checkable Python
Protocolcontracts for service boundaries. - Provides frozen, data-only contracts in
src/omnibase_spi/contracts/for selected cross-boundary wire formats. - Imports
omnibase_coremodels and types where protocol signatures need shared platform data shapes. - Must not import implementation packages such as
omnibase_infra. - Must not contain service implementations, business workflows, state machines, transport clients, or general domain Pydantic models.
Dependency Direction
The import direction is deliberate and non-obvious:
Application and product repos
|
v
omnibase_spi ---- imports models/types ----> omnibase_core
^ ^
| implements protocols | uses models/types
|
omnibase_infra and other implementation repos --+
Allowed:
omnibase_spi -> omnibase_coreomnibase_infra -> omnibase_spiomnibase_infra -> omnibase_core- Product repos importing SPI protocols for type boundaries
Forbidden:
omnibase_core -> omnibase_spiomnibase_spi -> omnibase_infra- Protocol files that perform I/O or instantiate concrete services
- General domain
BaseModelclasses in SPI protocol modules
See Dependency Direction for the full rule, examples, and rationale.
Install
uv add omnibase_spi
For local workspace development, use the repository lockfile and the configured
omnibase-core source:
uv sync --group dev
Minimal Protocol Example
from typing import Protocol, runtime_checkable
@runtime_checkable
class ProtocolExampleService(Protocol):
"""Service boundary implemented outside omnibase_spi."""
async def run(self, payload: bytes) -> bytes:
"""Run the service operation."""
...
Add A Protocol
- Choose the domain under
src/omnibase_spi/protocols/. - Create a
protocol_<domain>_<name>.pyfile. - Name the public protocol
Protocol<Name>. - Add
@runtime_checkable. - Use
...method bodies only. - Import shared models from
omnibase_coreonly when the signature requires canonical platform models or types. - Add or update tests under
tests/. - Export the protocol from the domain
__init__.pyif it is public.
Common Commands
uv sync --group dev
uv run pytest
uv run mypy src/ --strict
uv run ruff check src/ tests/
uv run ruff format src/ tests/
python scripts/validation/run_all_validations.py
pre-commit run --all-files
uv build
Documentation
- Docs index
- Dependency direction
- Architecture overview
- API reference
- Developer guide
- Testing guide
- Contributing
- Security
- Agent context
- Claude context
License
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 omnibase_spi-0.20.6.tar.gz.
File metadata
- Download URL: omnibase_spi-0.20.6.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89c70b21fe1aeaa61a7622ae40bcf21e925ebb6d5282039ce5f4258eae22da48
|
|
| MD5 |
406a3b6d0482e048004936c47e7670bc
|
|
| BLAKE2b-256 |
e552d7623f3d4a063364639768240fe9d981ed95e4d631f9d477aca54499ed96
|
File details
Details for the file omnibase_spi-0.20.6-py3-none-any.whl.
File metadata
- Download URL: omnibase_spi-0.20.6-py3-none-any.whl
- Upload date:
- Size: 792.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e32893d1fabb9215a1cb2e314ca03a5362b89495be5f3ec049491ec4cc0d041
|
|
| MD5 |
b67081729fd5031e488de8dd23c22c85
|
|
| BLAKE2b-256 |
e868b8b917f1c6de94c5cca26a5af673fd164ee656953503000254edad4bd090
|