Skip to main content

kitchen_tools/tool/
mod.rs

1//! How the orchestrator drives a neuro-kitchen tool without its window. A tool (lucem, dspk,
2//! neuro-convert, garnish, any tool from kitchen-template) is a plugin program
3//! ([`crate::plugin`]: JSON lines over stdin and stdout, large data as files) that answers three
4//! more requests:
5//!
6//! | Request | Answer |
7//! |---|---|
8//! | `describe` | [`ToolDescription`]: its operations, what each reads and writes (the contract's type and format), its recipe's JSON Schema |
9//! | `validate` | whether a recipe is one an operation can run, and if not, why |
10//! | `run` | runs an operation on input results into an output folder: [`RunReport`] |
11//!
12//! The orchestrator knows nothing else about a tool. It connects tools by the types and formats they declare,
13//! so a new tool joins the soup by answering these three requests.
14//!
15//! - [`description`], [`protocol`], [`report`]: the data.
16//! - [`serve`]: the tool's side ([`HeadlessTool`], [`serve_stdio`]).
17//! - [`client`]: the orchestrator's side ([`ToolClient`]).
18
19pub mod client;
20pub mod description;
21pub mod protocol;
22pub mod report;
23pub mod serve;
24
25pub use client::{ToolClient, check_inputs};
26pub use description::{InputPort, Operation, OutputPort, Resources, ToolDescription};
27pub use protocol::{RunInput, RunRequest, TOOL_PROTOCOL, ToolRef, ToolRequest, Validation};
28pub use report::{ReviewFlag, RunOutput, RunReport};
29pub use serve::{HeadlessTool, plugin_info, serve_stdio};