Administration
Storage & records
What ThePredict writes to your disk, where it goes, how long it stays and how to read it.
Everything on this page stays on your machine. ThePredict writes it from background threads, so a slow disk never delays a fight, and nothing here is ever sent to Jev.
Where things live
| What | Where |
|---|---|
| Your configuration | plugins/MythicMobs/AIConfig/config.yml and AIConfig/Profiles/ (see Install & requirements) |
| Fight records (JSONL) | plugins/ThePredict/records/events/<UTC day>/events-<run>-<n>.jsonl, gzipped to .jsonl.gz once closed |
| Request bodies, when kept | bodies-<run>-<n>.jsonl in the same day folder |
| Backups, exports and the lock | records/backups/, records/exports/, records/.lock |
| Evaluation verdicts | records/eval/verdicts/<fingerprint>-<stage>.json |
| Aggregates database | plugins/ThePredict/aggregates.db, beside records/, not inside it |
| Scenario recordings | plugins/ThePredict/scenarios/ |
| Duel recordings | plugins/ThePredict/duels/ |
| Migration proposals | plugins/ThePredict/migration/ |
| Learning artifacts | plugins/ThePredict/learn/ |
| Profile overlays | plugins/ThePredict/autoconfig/ |
| Example boss | plugins/ThePredict/examples/ |
The records folder is records.directory (relative to plugins/ThePredict/) and the database file is storage.file. If config.yml is invalid, ThePredict stays inactive and opens neither: no records/ and no aggregates.db are created.
Fight records
The records are append-only JSONL: one JSON object per line, without spaces, written by one background thread (ThePredict-Storage). Every line carries v, type, run, t_ms, t_nanos, tick and tag, then its own fields.
records.level | What is written |
|---|---|
off | No records. |
decisions (default) | Decisions (planned, result, acceptance, local), outcome windows, tells and the other fight summaries. |
full | Also casts, threat changes, reactions, micro-movements and stances. |
records.bodies decides what happens to the request bodies: none, hash (default, only a hash), dedup (each distinct body once) or all.
- Rotation. A file rotates at
64MiB or after60minutes. A closed file is gzipped, and the original is deleted only once the.gzclosed correctly. - Retention.
14days and2048MiB by default. The current day is never deleted; if today alone passes the size cap, events pause and the aggregates keep working. - Runs. Each start with records begins with a
run_startline: plugin version, model, question detail,config_sha256, records level, body policy and answer cache. A clean stop writesrun_stopwithclean: true. After a crash the storage state shows the causeDIRTY_SHUTDOWN; run/thepredict records verify. - Tags.
/thepredict records tag <tag>writes a label into every following line, handy to mark a test session;tag clearstops.
Note Size
A planning estimate, not measured on a server: about 47 MB per hour before compression with five bosses fighting, at decisions level with hashed bodies. full writes much more.
Aggregates database
aggregates.db is a SQLite database of running statistics (outcomes per profile, tactic and level, and the data the other features keep). With storage.aggregates off, only the JSONL is written.
- Driver. ThePredict uses the
sqlite-jdbcdriver that Paper already ships and does not bundle its own. It needs SQLite 3.45 or newer. Without a usable driver, aggregates turn off (DRIVER_MISSING) and the JSONL records continue. - MySQL.
mysqlis reserved: writing it is a configuration error. - Backups. Every
24hours a copy goes torecords/backups/, keeping the newest7./thepredict records backupmakes one now. - Recovery. At startup the database is checked with SQLite's
quick_check. A broken file is renamed, never deleted, and the newest backup that passes the check takes its place; without one, aggregates stayFAILED. - Flushes. Pending statistics are written every
100ticks;/thepredict records flushforces one.
Important Keep it off network drives
SQLite's write-ahead log is not safe on NFS, CIFS/SMB or sshfs. When the records folder looks like one, the Store line of /thepredict status ends with network. Put plugins/ThePredict/ on a local disk.
Status and commands
When storage is running, /thepredict status adds a Storage block:
State: READY records decisions dropped 0 inFlight 0 failed 0
Store: sqlite 3.49.1 synchronous 1 journal walState shows the aggregates state (READY, STARTING, DISABLED, READ_ONLY, DEGRADED or FAILED) and its cause, the records level, dropped events, batches in flight and failed batches. Store shows the SQLite version and the settings read back from the database (synchronous 1 is normal, 2 is full), plus paused when events are paused for size, network for a network drive and failure … when the records failed. /thepredict records stats prints the same in one line with only thepredict.admin. The other records commands (export, prune, verify, backup, flush, cache, tag) need thepredict.records; see Commands & permissions.
Reading the data offline
Stop the server first, then use any JSON or SQLite tool. For example:
# every outcome window of the kept days (closed files are gzipped)
gzip -dcf plugins/ThePredict/records/events/*/events-*.jsonl* | jq -c 'select(.type == "outcome")'
# the best and worst tactics per profile
sqlite3 plugins/ThePredict/aggregates.db \
"SELECT profile, tactic, level, windows, effect_mean FROM outcome_stats ORDER BY profile, effect_mean DESC LIMIT 20"/thepredict records export outcomes writes the same statistics as CSV into records/exports/ while the server runs.
What stays private
- Local files may contain the UUIDs of mobs and worlds, and the duel files contain the UUIDs of the duellists. They help debugging and never leave the machine.
- Jev only ever receives aliases:
player_1,entity_1and so on, plus an entity's species. Never names,Displaynames, MythicMobs IDs, factions, UUIDs or coordinates. - No file ever holds the key or an
Authorizationheader.config_sha256is computed withoutjev.apiKey.
Scenario recording
debug.recordScenarios saves every decision Jev answered as an anonymized scenario, for calibration work. Keep it off on a live server; it is read at startup like the rest of config.yml.
- One file per decision:
plugins/ThePredict/scenarios/scenario-<UTC start>-<nonce>-<nnnn>.json, with the exact body sent (aliases only), the questions, the answer, the tokens and empty labels. Never the key. - At most 1 000 files per start. At the limit, one line:
Scenario recording reached its limit of 1000 files; later decisions are not recorded. - Its own thread with a queue of 64. When the queue is full the decision is dropped, counted and reported once:
Scenario recording dropped a decision: its queue of 64 is full. - About 4.5 KB per file in a one-against-one fight and 51 KB in the worst case (16 mobs against 16 players): up to about 51 MB per start.
- With recording on, closing the plugin can take about 2 seconds while the queue drains; whatever is left is dropped and counted.
Duel recorder
/thepredict duel records everything two factions of mobs decide and do, in real time (see Commands & permissions for the command). It is off until you start it and costs nothing while idle.
- What it follows. Up to 8 living duellists of the two factions inside the radius, sampled every 5 ticks. A round starts when each side has a duellist and ends when one side has none: a death gives the round to the other side; a removal (a timeout skill,
/mm mobs kill) is a draw. A side istpwhen its mobs have a bound profile andclassicotherwise. - Where.
plugins/ThePredict/duels/<label>-<UTC yyyyMMdd-HHmmss>/. - Files.
decisions.jsonl(planned,body,result,acceptanceandlocallines, joined byencounterandsequence;localuses sequence −1),samples.csv,casts.csv,damage.csv,intents.csv,defense.csv,retreats.csv,threat.csv,outcomes.csv,rounds.csvandsummary.md(wins with a confidence interval, time to kill, damage, hits and misses per skill, retreats, guards, time per control level, effect per tactic, requests, tokens and cost). - Limits. 4 hours, 500 rounds, 128 MB per file and 512 MB per recording. At a limit the recording stops itself, writes
summary.mdwithstopped_by: <limit>, tells the player who started it if they are online and logsDuel recording '<label>' stopped: <limit> reached. - Writer. One thread,
ThePredict-DuelWriter, alive only while recording, with a queue of 8 192 rows. A full queue drops rows and counts them (rows droppedinduel statusand insummary.md). At shutdown the recording stops, waiting 2 seconds at most. - Cost. With a key,
duel statusshows the requests and input tokens the recording spent.
To set up a fair, player-safe duel arena, see Targets, participants & threat.