Skip to main content

kitchen_contract/
lib.rs

1//! The neuro-kitchen pipeline contract, as Rust types: the waist every app, the runtime, a
2//! generated interface and an agent agree on ([standard](../../../standard/README.md)).
3//!
4//! | Module | Standard | Holds |
5//! |---|---|---|
6//! | [`types`] | §1 | [`Type`] (shared and `app:name`), [`Format`], matching, the shared types |
7//! | [`params`] | §2.1 | [`ParamSpec`], [`ParamValue`], [`check_params`] |
8//! | [`ops`] | §2 | [`OpSpec`] (version, ports, params, [`Margin`], source, finish, effects, availability) |
9//! | [`catalog`] | §2.2, §6.1 | [`Catalog`]: an app's ops, by family, by type, fillable by a screen's offers |
10//! | [`pipelines`] | §4 | [`Pipeline`] and its check: every problem at once, or a [`Plan`] |
11//! | [`documents`] | §2.2 | documents on disk as JSON or TOML, the same id either way |
12//! | [`results`] | §3 | [`ContentId`], [`canonical_json`], [`ResultRecord`], [`RunRecord`], [`RunKey`] |
13//!
14//! Depends on nothing of ours, does no I/O and draws nothing: `cargo xtask check-layers` keeps it
15//! so. Every document carries [`CONTRACT_VERSION`]; its JSON Schemas are generated into
16//! `standard/schemas/` (a test fails when they are stale).
17
18pub mod catalog;
19pub mod documents;
20pub mod ops;
21pub mod params;
22pub mod pipelines;
23pub mod results;
24pub mod types;
25
26pub use catalog::Catalog;
27pub use ops::{Language, Margin, OpSource, OpSpec, PortSpec};
28pub use params::{ParamKind, ParamSpec, ParamValue, check_params};
29pub use pipelines::{Edge, Endpoint, Node, PIPELINE_VERSION, Pipeline, Plan, Problem};
30pub use results::{ContentId, OpRef, ResultRecord, RunKey, RunRecord, RunStatus, canonical_json};
31pub use types::{Axis, Format, Type, TypeDescription};
32
33/// The contract's version, `MAJOR.MINOR` ([standard §7](../../../standard/spec/07-versioning.md)):
34/// `0.x` until the first public release, when anything may still change. Confirmation joins in
35/// 0.2 (decision 0016).
36pub const CONTRACT_VERSION: &str = "0.1";