A lorebook is inert until something selects it, and SillyTavern gates three ways
-- globally, per character card, and per persona. All of that selection lives in
settings.json, which is untracked, so versioning worlds/*.json alone captured
the content and lost the wiring. A restore would have handed back every lorebook
with no record of which were active or what the token budget was.
_text/world-settings.json now carries the selection and the tuning that decides
how entries fire: budget, scan depth, recursion, whole-word matching, and the
character-vs-global strategy. Non-secret, small, and regenerated by the same
pre-commit hook.
Tracked inside SillyTavern's live data directory rather than symlinked out of
it. data/ is a bind mount into the container, so a symlink to a host path
outside that mount resolves inside the container where the target does not
exist -- broken to SillyTavern while looking correct on the host.
The .gitignore is an allowlist, denying everything and re-including named paths,
because this is live application data rather than a curated export. secrets.json
is the reason: empty today because API keys go through LiteLLM with a
placeholder, and it arms itself the moment a key is typed into the UI. This repo
is public. A denylist protects only the paths someone remembered.
Two of the four artifact types are not diffable as stored. Character cards are
PNGs with the card JSON in a tEXt chunk, and personas live inside a 48 KB
settings.json that SillyTavern rewrites on any change. st-export.py extracts
both into _text/ so the reviewable artifact is text, one-way on purpose --
re-embedding JSON into a PNG is where a mistake corrupts authored content.
Stock content is excluded: Seraphina's expression pack is 3.6 MiB of PNG the app
regenerates on startup. The stock lorebook Eldoria.json stays -- 8 KB of
readable JSON is a useful worked example of the format.