TauriTavern/docs/API
Darkatse c899f6405d refactor(database): integrate TriviumDB through a native adapter
Move database ownership, blocking IO and TQL binding into tt-adapter-triviumdb
and upgrade the native engine to 0.8.8. Preserve the plugin API capabilities
with awaited open, numeric IDs and explicit shared-namespace lifecycle.

Coordinate archive IO with database maintenance and restore each namespace
as a complete file group. Keep behavior tests for persistence, parameter
binding, transactions and recovery instead of per-method forwarding tests.

Validated with pnpm run check and tauri-pilot against the macOS app using
the real data root; temporary test namespaces were removed afterward.
2026-09-18 01:42:56 -04:00
..
Agent.md feat(agent): add slash command for output revisions 2026-09-08 03:09:22 -04:00
Chat.md feat(settings): expose opt-in cold swipe loading 2026-09-13 04:53:10 -04:00
ChatSurface.md feat(chat): add cached async content preprocessing hooks 2026-09-06 00:48:25 -04:00
Database.md refactor(database): integrate TriviumDB through a native adapter 2026-09-18 01:42:56 -04:00
Dev.md refactor(dev): migrate dev logs panel to React 2026-08-23 21:51:16 -04:00
Extension.md feat(extension-store): add tryGetJson optional JSON lookup 2026-05-04 15:47:56 -04:00
Layout.md fix (mobilelayout): Fix scroll reachability for fixed-shell panels (Prompt Manager). 2026-04-17 19:59:17 -04:00
LlmConnections.md docs(agent): simplify and consolidate framework documentation 2026-09-06 20:53:05 -04:00
MCP.md fix(mcp): isolate recoverable call and catalog failures 2026-08-25 01:14:48 -04:00
Migration.md refactor(chat): remove windowed mode and restore full-history semantics 2026-07-19 20:57:41 -04:00
README.md refactor(database): integrate TriviumDB through a native adapter 2026-09-18 01:42:56 -04:00
Skill.md docs(skills): streamline import guidance and cleanup contract 2026-09-15 20:25:22 -04:00
WorldInfo.md feat (API): Expose WorldInfo and Dev APIs 2026-03-27 23:48:14 -04:00

扩展 API

TauriTavern 的宿主 API 位于 window.__TAURITAVERN__.api。使用前等待宿主就绪:

await (window.__TAURITAVERN__?.ready ?? window.__TAURITAVERN_MAIN_READY__);
const api = window.__TAURITAVERN__.api;
API 用途
api.chat 聊天读取、检索、metadata 与扩展存储
api.layout safe area、viewport 与输入法布局
api.dev 前后端日志和模型请求诊断
api.worldInfo 世界书激活结果与条目导航
api.extension.store 扩展的全局 JSON / Blob 存储
api.db 本地向量、文本索引、图与 TQL 数据库
api.agent 运行控制、历史、文件详情与 Profile 管理
api.llmConnections Agent 使用的模型连接
api.skill Skill 导入、编辑、作用域与导出
api.mcp MCP 服务器、工具发现、权限与测试调用

完整类型见 src/types.d.ts,稳定性约定见 宿主契约。从 SillyTavern 扩展迁移时,可参考 迁移指南。

框架内部的工作方式见 Agent;本目录集中说明调用方法和返回结果。