- 新增 GET /api/v1/admin/config-facts:记忆整理 7 键 + 安静时段 2 键的**进程生效值** + 声明默认值(反射读 default 标签,不读 .env) - 面板:记忆整理卡 + 安静时段卡(Miuix 只读),文案按新语义「只服务主动搭话,不静默回复」 - 后台思考行加 urgency(**只能是下限**,存档不可分 high/critical)+ quietHoursBypassed(与既有 bypassed 是两件事) - 红线实测:往响应里塞 JWT ⇒ TestAdminConfigFacts_NeverLeaksSecretValues 打红(连断言消息都把整个响应打出来了) - 前端:configFacts 24 checks / ConfigFactsCards 29 / BackthinkUrgencyTags 19 全过 - 契约 v0.68(纯增量:B12 新端点 + B8 两字段 + §4.10 形状与语义 + §7.4-17 下限限定)
128 lines
3.2 KiB
TypeScript
128 lines
3.2 KiB
TypeScript
/**
|
|
* 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 { fetchEnums } from "./api/meta";
|
|
export type { MetaEnums } from "./api/meta";
|
|
|
|
export { chatStream, chatSync } from "./api/chat";
|
|
export type { ChatTriggerResult } 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,
|
|
adminLlmUsage,
|
|
adminMemorySearch,
|
|
adminPluginInstall,
|
|
adminPluginUninstall,
|
|
adminRevokeApiKey,
|
|
adminResetLlmFromEnv,
|
|
adminRunAutomation,
|
|
adminSaveOwnerProfile,
|
|
adminSearchRag,
|
|
adminSetPluginPolicy,
|
|
adminTestLlm,
|
|
adminUpdatePersona,
|
|
} from "./api/admin";
|
|
|
|
export {
|
|
adminChannelClose,
|
|
adminChannelFriendHandle,
|
|
adminChannelLogOverview,
|
|
adminChannelMessageTest,
|
|
adminChannelMessages,
|
|
adminChannelOpen,
|
|
adminChannelPlatformFriends,
|
|
adminChannelPlatformView,
|
|
adminChannelTest,
|
|
adminDeleteChannelAccount,
|
|
adminDeleteEmptyChannelAccounts,
|
|
adminSaveChannelConfig,
|
|
adminWeixinLoginQR,
|
|
adminWeixinLoginStatus,
|
|
} from "./api/adminChannels";
|
|
export type { ChannelActionResult, ChannelConfigSaveResult } from "./api/adminChannels";
|
|
|
|
export {
|
|
adminBackthink,
|
|
adminConfigFacts,
|
|
adminListNotifications,
|
|
adminObservabilityAudit,
|
|
adminObservabilityLogs,
|
|
adminObservabilityMetrics,
|
|
adminObservabilityTrace,
|
|
adminSystemBackup,
|
|
adminSystemRestore,
|
|
adminSystemRevokeKeys,
|
|
adminSystemRotateJWT,
|
|
adminSystemStorage,
|
|
} from "./api/adminSystem";
|