tftio-kb 2.5.3

Personal knowledge base — typed AST with org-mode as projection, SQLite-backed
Documentation
//! MCP (Model Context Protocol) JSON-RPC server over stdio.
//!
//! This module is the Rust port of `KB.MCP`, `KB.MCP.Protocol`, and
//! `KB.MCP.Tools` from the Haskell reference implementation. The
//! transport reads one JSON-RPC 2.0 message per line from stdin and
//! writes one response per line to stdout; nothing else is permitted on
//! the protocol channel. Diagnostics (db path, embedding status,
//! handler errors) belong on stderr.
//!
//! Submodules:
//!
//! - [`protocol`] — wire-level types ([`Request`], [`Response`],
//!   [`RpcError`], [`RpcId`]) plus error constructors.
//! - [`server`] — dispatch loop ([`run_mcp_with`], [`handle_line`]) and
//!   the lifecycle handlers ([`builtin_methods`]).
//! - [`tools`] — the seven kb tools and the `tools/list` /
//!   `tools/call` registration helpers.

pub mod protocol;
pub mod server;
pub mod tools;

pub use protocol::{
    Request, Response, RpcError, RpcId, decode_request, encode_message, error_response,
    internal_error, invalid_params, invalid_request, method_not_found, parse_error,
    success_response,
};
pub use server::{
    MethodHandler, Methods, SERVER_NAME, SERVER_PROTOCOL_VERSION, SERVER_VERSION, builtin_methods,
    handle_line, run_mcp_with,
};
pub use tools::{ToolsState, error_content, mk_tools, success_content, tools_methods};