Pack my device copy's settle upload

Work out what my device's copy of my records would send when it settles with my account: where the account's copy is kept on the device and the exact upload for one batch, compressed when that makes it smaller

Give account (the signed-in account name, 1 to 256 characters) and request (one settle batch as a JSON object, the shape record-sync.mjs sends: copy, root, took_through, rows). Answers location (the private-file-system directory the account's copy is kept under, the account name's bytes in hex so two accounts never share one, and the file name records.sqlite3), sends (frame or plain), headers (content type, the x-trillion-device-account header, and for a frame its dictionary BLAKE3 id and exact expanded size), plain_bytes, sent_bytes, body (plain text) or body_base64 (the deflate frame, compressed against the sample of settle JSON in do-work/frame-dictionaries.json) and expands_back (the frame expands to exactly the batch). A batch under 1024 bytes, or one that would not shrink, goes plain. Refuses an empty, non-text or over-long account and a request that is not an object. It reads only its input: it opens no database, keeps nothing on any device, sends nothing and settles nothing. The screen's other work (the SQLite copy in the browser's private file system that survives reloads and reads offline, the outbox of small writes, the settle itself with the hosted store and sealed records) needs a browser worker and @sqlite.org/sqlite-wasm and is not done by this run.

What it asks for

Nothing: your AI starts it with your words.

Use it from your AI

Connect the AI you already use to Trillion once. Then ask in your own words; your AI finds this tool by what it does and runs it.

Say to your AI: “Use Trillion to work out what my device's copy of my records would send when it settles with my account: where the account's copy is kept on the device and the exact upload for one batch, compressed when that makes it smaller”