Cotton code
22 lines · 947 B · TypeScriptRaw
/** * The session tools: the session log (log_session, list_sessions, * get_session) and the machines the sessions run on (list_devices, * list_agent_accounts). The Rust handlers are the reference: * crates/cotton-tools/src/mcp/handlers/records_2/sessions.rs, * conversations.rs, session_bus/mod.rs, devices.rs. * * The session inbox (send_to_session, poll_session_inbox, get_session_message, * update_session_message) is retired (owner, 15 Nov 2026): the rows it wrote * stay in `session_message`, and nothing writes a new one (RETIRED_TABLES). */import type { Handler } from "../context.ts";import { listDevices } from "./sessions/devices.ts";import { getSession, listSessions } from "./sessions/list.ts";import { logSession } from "./sessions/log.ts";export const SESSIONS_HANDLERS: Record<string, Handler> = {  log_session: logSession,  list_sessions: listSessions,  get_session: getSession,  list_devices: listDevices,};