TauriTavern/docs/CurrentState
Darkatse 0d592e7fc5 test(perf): replay the frontend's host calls against the Rust backend
The frontend suite answers host calls from a fixture, so file reads,
card parsing and tokenizing never reached its counters. It now records
each call with its step and writes the calls, with the dataset laid out
as a data root, to tests/perf/out/. tt-perf (the perf feature) builds
AppState on Tauri's mock runtime from its own HostEnvironment and
replays the calls through the real commands, taking the values the host
issued from its own results. Each step counts result bytes, plus
callgrind instructions and /proc/self/io on Linux, retired instructions
on macOS and I/O counters on Windows. LlmApiLogStore and the two Webview
commands the replay reaches become generic over the runtime.

Linux compares with a committed baseline built with the Rust release it
names, so a new stable cannot move it. macOS and Windows counts depend
on the machine, so uncommitted source changes are compared with HEAD
measured in a worktree on the same machine, taking the least of three
runs. The replay runs on one async worker and one blocking thread:
tokenizing on a pool thread with a cold per-thread cache made a third
of runs 18M instructions shorter. macOS logical writes varied by 30%
and are not counted.

Reverting the name-only chat listing grows open-back's result bytes by
47%, which the frontend counters missed. The Linux baseline comes from
the first CI run, whose log ends with the counters to commit.
2026-10-27 20:54:31 -04:00
..
BootstrapOptimization.md perf (chat): Optimize loadItemizedPrompts() to prevent resident memory usage. 2026-04-05 14:52:23 -04:00
CharacterIdentityContract.md fix(characters): delete a character's lorebook only when unused 2026-10-16 20:02:45 -04:00
ChatPayload.md perf(characters): open a card without reading its chats or reparsing it 2026-10-27 20:53:50 -04:00
DataDirectorySelection.md refactor(platform): centralize native host identity 2026-10-03 22:50:26 -04:00
EmbeddedRuntime.md refactor(platform): centralize native host identity 2026-10-03 22:50:26 -04:00
FileTransfer.md fix(files): let Android name saved files by its own type table 2026-10-22 16:51:54 -04:00
FirstPartyUI.md refactor(assistant): extract the UI engine as @tauritavern/app-use 2026-10-18 18:44:16 -04:00
HostResourceCaching.md chore(deps): upgrade Tauri to 2.12.2 2026-10-09 22:52:43 -04:00
InAppAssistant.md fix(agent): keep stale built-in skill copies off the startup path 2026-10-22 04:54:31 -04:00
iOSPolicy.md feat(files): save remote images through host staging (#324) 2026-10-04 20:10:59 -04:00
LinuxRepository.md docs: use short URLs for installation and migration scripts 2026-09-18 22:51:51 -04:00
LoggingObservability.md refactor(agent): simplify image and capture handling 2026-10-22 00:57:47 -04:00
MCP.md refactor(agent): remove round and tool call budgets 2026-10-22 01:48:30 -04:00
MediaAssetContract.md refactor(host-resources): centralize cache authority and deterministic invalidation #118 2026-07-10 16:47:37 -04:00
MemoryExtensionApi.md chore(sync): finalize SillyTavern 1.19 compatibility 2026-09-27 23:17:48 -04:00
MobileStyleAdaptation.md docs(ios): gather the drawer bar into one section 2026-10-24 23:41:18 -04:00
NativeApiFormats.md fix(gemini): preserve native parts in ordinary input messages 2026-10-20 15:17:24 -04:00
PerfBaseline.md test(perf): replay the frontend's host calls against the Rust backend 2026-10-27 20:54:31 -04:00
README.md test(perf): measure opening a heavy card, host traffic and allocations 2026-10-27 20:53:58 -04:00
StartupOptimization.md fix(settings): keep one bad preset from blocking startup 2026-10-22 22:26:56 -04:00
Sync.md fix(sync): enumerate LAN addresses without netlink 2026-10-04 18:00:15 -04:00
ThirdPartyExtensions.md refactor(host): rely on the host and scope the dev resource bridge 2026-10-18 03:01:46 -04:00
TTS.md refactor(host): rely on the host and scope the dev resource bridge 2026-10-18 03:01:46 -04:00
UpdateChannels.md ci(release): ship the experimental OpenHarmony HAP with stable releases 2026-10-22 05:47:44 -04:00
UserEndpointAccess.md fix(security): require native approval for custom endpoints #184 2026-08-19 18:05:30 -04:00
VectorApi.md chore(sync): finalize SillyTavern 1.19 compatibility 2026-09-27 23:17:48 -04:00
WebHost.md feat(web-host): save World Info edits 2026-10-23 17:37:06 -04:00
WindowsDistribution.md ci(winget): fast-forward the submission fork before WingetCreate 2026-10-22 17:19:54 -04:00

模块文档

这里记录各模块的工作方式与源码入口。Agent 的整体说明集中在 Agent,后端分层见 后端结构。

模块 文档内容
第三方扩展 加载、发现与资源访问
移动端视口 原生内容视口、窗口背景与第一方移动端行为
消息内嵌运行时 iframe 的生命周期与渲染
启动流程 Shell、Core、Full 阶段
Bootstrap 启动输入与内存开销
聊天存储 完整历史、分页读取和保存
记忆扩展 聊天查询与扩展存储
媒体资源 浏览器资源与 Range 请求
系统 TTS Android Web Speech 接入与当前边界
同步 LAN Sync 与 TT-Sync
文件传输 原生选取、交付与暂存
数据目录 桌面目录选择与迁移
原生模型 API Responses、Claude、Gemini 等格式
iOS 策略 平台能力与分发设置
角色身份 角色、聊天目录、重命名与世界书绑定
日志 tracing、Dev API 与 LLM 请求日志
资源缓存 资源版本与条件请求
更新渠道 Stable、Canary 与更新检测
Linux 分发 APT、RPM 与 Nix
Windows 分发 WinGet 与安装包
MCP 服务器、工具目录与模型调用
向量 API 索引、embedding 与查询
自有界面 React、TypeScript 与构建流程
Web Host 浏览器嵌入方(Tavern Studio)使用的宿主实现
性能基线 前后端工作量的计量、基线与新增场景