encoded-continuation-tokens-local-sort
Installation
SKILL.md
One token slot, remote cursors and local ones
A list that pages from a server holds a continuation: String?. When the same list must also page a
locally sorted or shuffled ordering, the cheapest correct move is to keep one slot and make the
local cursors fit in it, rather than adding a parallel "local page index" that every consumer then
has to know about.
Routing happens twice: the collection id says local or remote, and the token's prefix says which local mode.
// adapted: names generalized, page size hoisted; encoding as written
"SHUFFLE0_[7,2,19,4]" // shuffle: page number, then the whole shuffled position list as JSON
"ASC1735689600000" // oldest-first: the timestamp of the last row read
"DESC1735689600000" // newest-first: same, other direction
"TITLE3" // stable order: a page offset
"CUSTOM_ORDER3" // stable order: a page offset