TauriTavern/docs/API
Darkatse 2d446c9237 feat(ohos): adopt the native window layout contract
Bring OpenHarmony onto the contract Android and iOS already follow.
ArkUI lays the Web out in the safe area, ArkWeb's RESIZE_CONTENT
shrinks the layout viewport by the docked keyboard's overlap, and an
app-owned window-layout plugin publishes window snapshots and draws
wallpaper strips behind the system bars.

- Share the window-layout plugin transport between Android and OHOS.
- Drop the remaining OHOS branches in Rust and the frontend.
- Rotate with the sensor, within the system rotation lock.

The ability and plugins-workspace pins point at the Darkatse forks
until LeenHawk/openharmony-ability#1 and LeenHawk/plugins-workspace#1
merge.
2026-10-05 19:53:38 -04:00
..
Agent.md feat(macros): unify contextual evaluation and parameter templates 2026-09-27 18:25:44 -04:00
Chat.md refactor(chat): unify payload and metadata commit sessions 2026-10-01 00:53:02 -04:00
ChatSurface.md feat(formatting): unify message formatting and reasoning refresh 2026-09-27 20:19:53 -04:00
Database.md feat(sync): include TriviumDB databases in sync scope 2026-09-18 20:15:38 -04:00
Dev.md refactor(files): unify native file selection and delivery 2026-10-04 16:28:48 -04:00
Extension.md feat(extension-store): stream JSON and blob persistence 2026-10-02 02:29:35 -04:00
Layout.md feat(ohos): adopt the native window layout contract 2026-10-05 19:53:38 -04:00
LlmConnections.md docs(agent): simplify and consolidate framework documentation 2026-09-06 20:53:05 -04:00
Macros.md feat(macros): unify contextual evaluation and parameter templates 2026-09-27 18:25:44 -04:00
MCP.md refactor(mcp): converge transport on rmcp 3.5 2026-10-03 17:20:15 -04:00
Migration.md chore(sync): finalize SillyTavern 1.19 compatibility 2026-09-27 23:17:48 -04:00
README.md refactor(layout): move mobile viewport ownership into native hosts 2026-10-05 05:50:20 -04:00
Skill.md refactor(platform): centralize native host identity 2026-10-03 22:50:26 -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 内容视口的读取与订阅
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;本目录集中说明调用方法和返回结果。