Expand description
Build MCP servers from one authoritative catalog of typed operations.
Twill compiles command declarations into planning, native MCP surfaces, help, schemas, permissions, resources, tasks, results, and host-facing projections. Structured arguments remain JSON values; command templates only place those values into CLI-shaped operation syntax and never become shell programs.
Re-exports§
pub use contract::ContractViolation;pub use contract::check_confirmation_projection;pub use contract::check_native_surface_projection;pub use contract::check_resource_binding_projection;pub use contract::verify_catalog_coverage;pub use conversation_identity::CONVERSATION_IDENTITY_META_KEY;pub use conversation_identity::ConversationIdentity;pub use conversation_identity::InvocationContext;pub use error::FrameworkError;pub use error::PreResolvedWorkspaceProblem;pub use error::Result;pub use error::WorkspaceMetadataProblem;pub use event::EventSink;pub use event::FrameworkEvent;pub use event::InMemoryEventSink;pub use event::NoopEventSink;pub use event::PlanFacts;pub use help::HelpDetail;pub use help::HelpRequest;pub use help::HelpResult;pub use help::HelpTopic;pub use registry::CommandHandler;pub use registry::CommandRegistry;pub use registry::HandlerFuture;pub use resource::Grant;pub use resource::Granted;pub use resource::Listed;pub use resource::Listing;pub use resource::ReadResource;pub use resource::Release;pub use resource::Res;pub use resource::ResolveResource;pub use resource::ResolvedResources;pub use resource::Resource;pub use resource::ResourceOutput;pub use resource::ResourceRefusal;pub use rmcp_adapter::CliMcpServer;pub use rmcp_adapter::CliMcpServerConfig;pub use rmcp_adapter::ConversationIdentityCompatibility;pub use rmcp_adapter::NativeMcpInitializeProjection;pub use rmcp_adapter::NativeMcpServerIdentity;pub use rmcp_adapter::WorkspaceMetadataCompatibility;pub use runtime::RuntimeIdentity;pub use stateless::StatelessMcpHttpBody;pub use stateless::StatelessMcpHttpService;pub use stateless::StatelessMcpService;pub use template::CommandTemplate;pub use template::TemplateToken;pub use types::Field;pub use types::FieldShape;pub use types::TypeDecl;pub use types::Variant;pub use ambient_resources::*;pub use argument_schemas::*;pub use builder::*;pub use catalog::*;pub use model::*;pub use native_surfaces::*;pub use presentation::*;pub use response::*;pub use results::*;pub use tasks::*;
Modules§
- ambient_
resources - Ambient resource binding (RFC 0016).
- argument_
schemas - builder
- catalog
- contract
- conversation_
identity - error
- event
- help
- model
- native_
surfaces - presentation
- registry
- resource
- First-class resources (RFC 0012): server-held resources with identity, lifetime, and lifecycle edges derived from handler signatures. Handlers require, grant, release, and enumerate resources through their types; the framework derives the acquire/use/release graph at registration, so the declaration cannot drift from the behavior. Resolution stays the server author’s job: a resolver answers resolved-or-refused, and the framework knows — from the catalog — what to say when the answer is refused.
- response
- results
- rmcp_
adapter - runtime
- stateless
- tasks
- template
- types
- Named argument types: declared unions of object variants that commands reference by name (RFC 0008). Declarations are validated at registration, matched by the planner, and projected into the catalog, help, and schemas.
Macros§
- application_
error_ footprint - application_
error_ set - contract_
tests - Generate one
#[test]per contract rule for a registry constructor.
Structs§
- Host
Workspace Root - A validated workspace root supplied by a trusted embedding.
- Host
Workspace Roots Observation - A presence-preserving trusted-host root observation.
Enums§
- Host
Workspace Root Error - Validation failures for trusted host workspace roots.