Zu core: contracts, ports, registry, loop, event bus
Project description
zu-core
The small, stable core of Zu: the typed contracts, the six ports, the plugin registry, the interpreter loop, and the event bus. It depends only on the standard library and Pydantic — it physically cannot import a model SDK, a browser, or any concrete adapter. It should be readable in an afternoon.
What's inside
| Module | Responsibility |
|---|---|
contracts.py |
TaskSpec, Result, and the frozen Event envelope (types namespaced harness.* / data.*). |
ports.py |
The six Protocol ports + the capability envelope (CAP_*, EGRESS_OPEN, declared_envelope). |
registry.py |
The one registry the loop reads (entry points, decorators, config). |
loop.py |
The interpreter loop: provider → tool → detectors → finalise → validators, with the escalation ladder and budgets. |
bus.py |
The event bus: append-before-notify, with isolated destinations. |
events.py |
The event taxonomy (the stable set of harness.* / data.* type constants). |
sinks.py |
The in-memory default EventSink. |
eventstore.py / codec.py / projections.py |
Shared filter contract, the encryption-at-rest seam, and rebuildable read-side views. |
The six ports
ModelProvider, Tool, Detector, Validator, SandboxBackend, EventSink
— each a runtime-checkable structural Protocol. A plugin implements the
shape; it never subclasses a framework.
This package registers no plugins — it defines the contracts every other package plugs into.
Tests
uv run pytest packages/zu-core — deterministic, offline.
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 zu_core-0.2.0.tar.gz.
File metadata
- Download URL: zu_core-0.2.0.tar.gz
- Upload date:
- Size: 72.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a20fef01ef57a5533924b3ccb3d2899e6d3381841c4d089cbf1c9e81be12f80
|
|
| MD5 |
f3fdef68013f170f628f27f76b1ec67c
|
|
| BLAKE2b-256 |
ea04598088a298178906b6576faa08e3947d0c62d988f4be3a0a226e0b6c3390
|
File details
Details for the file zu_core-0.2.0-py3-none-any.whl.
File metadata
- Download URL: zu_core-0.2.0-py3-none-any.whl
- Upload date:
- Size: 56.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b7d9507ca050654758ab70b057b4e3668c145e363d14742628b015308dc7427
|
|
| MD5 |
137c637594eef26b3e002db0b7fdc58d
|
|
| BLAKE2b-256 |
401cf05bf838f1be310649a436b60eb2f4459ecd9276ced64586079b3d5eba7f
|