`huginn-mind::wire` names one request per `Mind` method plus `whoami`, and one response per method plus the read side's refusal. The payloads are the admission and read types unchanged, so a client speaks the organ's own vocabulary rather than a projection of it. `operation()` and `instance()` say what the envelope carries; `status()` derives the envelope's status from the response, and a refusal is data in that response rather than a transport failure. `Mind::status` answers `whoami` from the image every time it is asked: the instance, the schema epoch, and how many pipeline documents and receipts the mind holds. Nothing stores a status and no configuration supplies one. `schemas/cultnet/` publishes the JSON schema of each wire type, derived from the type and pinned to it byte for byte by a test, so the schema catalog cannot advertise a shape the crate does not speak. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
585 B
585 B
Huginn's CultNet contracts
huginn.mind_request.v1 and huginn.mind_response.v1 are the organ's own wire
schemas, published from here because Huginn owns them. huginn-daemon serves
them on a cultnet.schema_catalog_request.v0; nothing else reads them.
Each file is serde_json::to_string_pretty of schemars::schema_for! over the
type of the same name in crates/huginn-mind/src/wire.rs. Regenerate by hand
and the test refuses it:
cargo test -p huginn-mind --lib -- --exact wire::tests::published_wire_schemas_match_derivation
compares file to derivation byte for byte.