Skip to main content

Crate plasmite

Crate plasmite 

Source
Expand description

Purpose: Shared library crate used by the plasmite CLI and bindings. Exports: api (stable public surface), notice (structured stderr notices). Role: Public API boundary with private internal storage modules. Invariants: Additive-only changes to api; internal modules remain private. Invariants: Core modules prefer explicit inputs/outputs over hidden state.

Modulesยง

api
Purpose: Define the stable public Rust API boundary for Plasmite. Exports: Core types and operations needed by bindings and CLI. Role: Public, additive-only surface; hides internal storage modules. Invariants: This module is the only public path to storage primitives. Invariants: Internal modules remain private and are not directly exposed.
mcp
Purpose: Provide a transport-agnostic MCP JSON-RPC core for Plasmite. Key exports: McpDispatcher, McpHandler, request/response envelopes. Role: Shared protocol adapter used by stdio and HTTP transports. Invariants: JSON-RPC envelopes stay stable and method routing is deterministic. Invariants: Unknown methods and malformed request shapes map to protocol errors. Invariants: Tool execution failures can be returned as successful result.isError.
notice
Purpose: Define a stable, structured schema for non-fatal stderr notices. Exports: Notice, notice_json. Role: Shared contract helper for CLI diagnostics (non-error events). Invariants: Notices are non-fatal and never alter stdout payloads. Invariants: JSON schema is stable once published; fields are additive-only.