Cotton code
63 lines · 2.5 KB · RustRaw
//! `records`, part 2 — the READING surface of//! `packages/server/src/mcp/records.ts`: search, `get_record`, the agenda,//! meetings, messages, the money reads and writes that live in `records.ts`,//! memory and sessions.//!//! Part 1 (`records_1`) is the record kinds a person edits by hand. The split//! is the file's own: 7,647 lines holding far more than one primitive, ported//! by two agents against one contract.//!//! Money reads and ordinary transaction writes share the direct row model.//!//! Each cluster owns its own `validateX` ports rather than sharing one//! `validate.rs`: the group is eight independent reading surfaces, and a//! refusal sentence belongs beside the handler that raises it.//!//! `mod.rs` is the group's one export: the tool table `dispatch` registers.pub mod agenda;pub mod conversations;pub mod memory;pub mod messages;pub mod money;pub mod record;pub mod search;mod search_tables;pub mod sessions;use crate::mcp::dispatch::HandlerGroup;/// The tools this group implements, in the order the TypeScript's dispatch/// names them.pub fn handlers() -> HandlerGroup {    &[        ("search_records", search::search_records),        ("get_record", record::get_record),        ("today_agenda", agenda::today_agenda),        ("list_message_threads", messages::list_message_threads),        ("read_message_thread", messages::read_message_thread),        ("search_messages", messages::search_messages),        ("list_money_accounts", money::list_money_accounts),        ("list_money_transactions", money::list_money_transactions),        ("record_transaction", money::record_transaction),        ("update_transaction", money::update_transaction),        ("delete_transaction", money::delete_transaction),        ("settle_expected", money::settle_expected),        ("brief", memory::brief),        ("recall", memory::recall),        ("remember", memory::remember),        ("memory_update", memory::memory_update),        ("memory_reorder", memory::memory_reorder),        ("memory_archive", memory::memory_archive),        ("log_session", sessions::log_session),        ("list_sessions", sessions::list_sessions),        // The project conversation (schema v31) — the three verbs that open a        // session, read one whole, and open a project's standing conversation.        ("create_session", conversations::create_session),        ("get_session", conversations::get_session),        (            "open_project_conversation",            conversations::open_project_conversation,        ),    ]}