/** * Public REST surface for the Cyrene v2 gateway, kept as a single import path * (`lib/api`) so call sites never change. The implementation is split by domain * under `lib/api/`: * * core.ts transport (request/ApiError) + token/role/API-key state * auth.ts /auth/login, /health * chat.ts /chat (sync + streaming) * sessions.ts /sessions (list/create/delete, message history) * messages.ts /messages/{id} (PATCH edit / DELETE) * personas.ts /personas * admin.ts /admin/* CRUD (personas, users, llm, rag, iot, automations…) * adminChannels.ts /admin/channels/* (adapters, config, platform views, login) * adminSystem.ts /admin/observability|notifications|backthink|system/* * * Everything below is a verbatim re-export — behaviour is unchanged. */ export { ApiError, decodeJwtRole, getApiKey, getAuthToken, getStoredRole, isNotImplemented, isTokenExpired, onAuthExpired, setApiKey, setAuthToken, setStoredRole, } from "./api/core"; export { health, login } from "./api/auth"; export { chatStream, chatSync } from "./api/chat"; export { createSubSession, deleteSession, fetchMessages, fetchSessions, markSessionRead, patchSession, } from "./api/sessions"; export type { CreateSessionResult, MessageDto, SessionPatch } from "./api/sessions"; export { deleteMessage, patchMessage } from "./api/messages"; export { fetchPersonas } from "./api/personas"; export { adminAddLlmProvider, adminAddMemory, adminCreateAutomation, adminCreatePersona, adminCreateUser, adminDeleteAutomation, adminDeleteRag, adminExportSession, adminGetLlm, adminGetLlmCatalog, adminGetOwnerProfile, adminIndexRag, adminIoTControl, adminIoTRule, adminIoTScenario, adminIssueApiKey, adminListAutomations, adminListChannels, adminListInstalledPlugins, adminListIoT, adminListMemories, adminListPersonas, adminListPlugins, adminListRag, adminListSessions, adminListUsers, adminMemorySearch, adminPluginInstall, adminPluginUninstall, adminRevokeApiKey, adminRunAutomation, adminSaveOwnerProfile, adminSearchRag, adminSetPluginPolicy, adminTestLlm, adminUpdatePersona, } from "./api/admin"; export { adminChannelClose, adminChannelFriendHandle, adminChannelLogOverview, adminChannelMessageTest, adminChannelMessages, adminChannelOpen, adminChannelPlatformFriends, adminChannelPlatformView, adminChannelTest, adminDeleteChannelAccount, adminSaveChannelConfig, adminWeixinLoginQR, adminWeixinLoginStatus, } from "./api/adminChannels"; export type { ChannelConfigSaveResult } from "./api/adminChannels"; export { adminBackthink, adminListNotifications, adminObservabilityAudit, adminObservabilityLogs, adminObservabilityMetrics, adminObservabilityTrace, adminSystemBackup, adminSystemRestore, adminSystemRevokeKeys, adminSystemRotateJWT, } from "./api/adminSystem";