Skip to main content

pamin_kit/
lib.rs

1//! The framework every Pamin module is built on.
2//!
3//! A module is an engine plus an operation contract. The kit serves that
4//! contract as MCP and does what every module would otherwise repeat around
5//! each call: knowing who is calling, checking what they may use and recording
6//! usage.
7
8#[cfg(feature = "conformance")]
9pub mod conformance;
10mod kit;
11mod module;
12mod ops;
13mod seams;
14mod serve;
15#[cfg(feature = "http")]
16pub use serve::{HttpOptions, ProtectedResource};
17mod tasks;
18mod trace;
19
20// The README's example compiles as a doctest, so it cannot drift from the
21// API.
22#[doc = include_str!("../README.md")]
23#[cfg(doctest)]
24pub struct ReadmeDoctests;
25
26pub use kit::{CallError, Kit, Reply};
27pub use module::{Audience, BadModuleName, Hardware, Manifest, Module, ModuleName, Routing};
28pub use ops::{
29    App, Ask, Body, Completing, Content, Ctx, Form, Hints, Icon, JsonObject, Looks, Message,
30    NeedsInput, Ops, Prompt, PromptArgument, Resource, Role, Tool,
31};
32/// The schema generator contract types derive with, re-exported so a module
33/// and the kit cannot disagree on its version.
34pub use schemars;
35pub use seams::{
36    Change, ChangeFeed, Entitlements, Feature, Identity, InProcessChanges, Local, Metering, Open,
37    Space, Unmetered, Usage,
38};
39pub use tasks::{InProcessTasks, StoredTask, TASK_TTL, TaskState, TaskStore};