A rebuild of sift: a new store layout, a keyword index of its own built by a compiled Rust core, and a home process
that serves agents, the browser and the command line. sift 2 does not open the stores of sift 1.x: bring them in
once with sift import, as Updating describes.
Added
sift importbrings in the collections of a 1.x home with their settings, keeping the vectors of unchanged
passages.sift serveis the home process: one per home, on 127.0.0.1, serving MCP, the UI and the CLI with the models
loaded once.sift serve --stdioconnects to it, or starts one that exits after 15 idle minutes.sift jobslists the home process's background jobs;--stopstops one.--offsetand--budgeton every search,--candidatesonquery, and all search options onmentions.sift add --agentsand--no-agents,sift status --unreadable,sift serve --idle-exit,sift ui --no-browser.--jsonand--coloron every command;NO_COLORandTERM=dumbturn colours off.- docs/limits.md lists every bound sift sets.
Changed
- Requires Python 3.12 or newer with SQLite 3.38 or newer, as the Python builds of uv, python.org and Homebrew have.
A Python linked against an older system SQLite, such as Ubuntu 22.04's 3.37, is refused with an explanation. - Ships a compiled extension, written in Rust, as wheels for Linux on x86-64 and ARM (glibc 2.28 or newer), macOS on
Apple silicon and Windows on x86-64, for every CPython from 3.12 on. Elsewhere, and on free-threaded builds, pip
builds it from source, which needs rustup (it installs the pinned Rust 1.100.0) and a C
compiler. Each package includes the licences of the Rust crates built into it. - Requires PyTorch 2.14 and torchvision 0.29 or newer.
- Each collection is one store, listed in
catalog.sqlite. Store layouts change through numbered migrations that a
newer sift applies once; each store records whether older versions may read or write it, and refuses them
otherwise with a request to upgrade. - Keyword search uses sift's own index, written in the same transaction as the documents, so it is current as soon as
sift indexends. Terms follow SQLite'sunicode61tokenizer without diacritics, ranked by BM25. Malformed
queries, such as one with a word starting with-(writeNOT word), are refused with the position of the error. sift indexbuilds a new topical order beside the live index and switches to it in one transaction, so keyword
search keeps answering; an interrupted build resumes on the next run.sift embedsorts passages by length, writes each batch as soon as it is embedded, and on an NVIDIA GPU compiles
the model before embedding 20,000 passages or more: 20 to 60 seconds once per process, then about twice the
throughput. On Windows this usestriton-windows. If compiling fails, the model runs uncompiled, and where the
installed Triton is another release than PyTorch was built for, sift names the one to install.- The MCP tools are now
search(hybrid, keyword or semantic; up to 20 queries per call),get,related,
collectionsandreindex. Agents need a new session to see them. - MCP
gettakesdocuments, each an id or{"id": ..., "first_line": ..., "last_line": ...}, in place of
idandlines. - JSON Lines records and mail attachments are identified as
FILE#KEY, such aspapers/2024.jsonl#2401.00001. --jsonoutput is always an object, and errors are too:
{"error": {"kind": ..., "code": ..., "message": ..., "remedy": ..., "field": ...}}. Search results are under
hits, withcollection,path,first_lineandlast_lineper hit;sift statusreportshomeand per
collectionfolder,agentsandcontents;sift linksreportsoutandinto, andsift unresolvedreports
targets.- Exit code 2 means a request was refused as asked, 130 that it was stopped (Ctrl+C), and 1 any other failure.
- Unknown
SIFT_environment variables are refused by name. sift statusprints a table.- Renamed options:
sift index --file(repeatable) replaces--files;sift add --id-field,--title-fieldand
--text-fieldsreplace--id,--titleand--text. - Folders containing
.obsidian/are titled by file name unless--title-fromsays otherwise. - Collection names are limited to 100 characters and may not be a Windows device name (
con,nul,com1, …). sift moveworks whilesift serveruns.- Models other than the defaults must be named at a full commit (
owner/model@<40 hex digits>) or as a local folder;
branches, tags and short commits are refused. SIFT_UPDATE_CHECKis off by default. When on, a command run in a terminal reports a newer version and the
command that installs it.sift workeraccepts at most 256 texts per request and serves only clients of its own major version.
Removed
sift serve --hostand--allow-host, andsift ui --host,--portand--allow-host: the home process serves
this machine only.sift workerstill lends a GPU to other machines.- The keyword syntax
NEAR(...), column filters (meta:,title:) and^. - Self-updating, with
update.lockand the update logs. - The Numba dependency.
Security
- CLI commands authenticate to the home process with a token stored, with its port, in a per-user folder outside the
home (%LOCALAPPDATA%\sifton Windows,$XDG_STATE_HOME/siftor~/.local/state/siftelsewhere) and readable
only by the user. MCP and the UI answer only requests addressed to127.0.0.1orlocalhost; MCP rejects requests
from web pages of other sites, and other sites cannot frame, load or trigger the UI
(security policy).