Chronos/DBWaitlist

Changelog / Chronos DB

Chronos DB 0.3.2

Agents can check their reads between steps, and a vetoed effect's record is safer to keep

Beta5 changesDownloads

Agents can check their reads between steps, and a vetoed effect's record is safer to keep. Most of this came from the 0.2.0 release threads on r/AI_Agents: CHECK READS (Abhishekxdg/chronosdb#35) and the keyed hash for discarded effects (Abhishekxdg/chronosdb#36). Also trigram indexes and per-metric pgvector graphs.

Upgrading from 0.3.1: SHOW OUTBOX DISCARDED's payload_sha256 column is now payload_hmac (keyed), and it has a new column, recipient_domains. Effects discarded before the upgrade show no payload_hmac.

  • A vetoed effect's hash is keyed, and its record says where it was going. SHOW OUTBOX DISCARDED kept a plain SHA-256 of each discarded payload, so a short, guessable one ("refund approved") could be confirmed by hashing candidates. Its payload_sha256 column is now payload_hmac: an HMAC-SHA256 under a key the database makes for itself (outbox.key in the folder, sealed when the folder is encrypted, never shown in SQL). A new recipient_domains column lists the domains of the email addresses in the payload (example.com,x.org), so a vetoed email to an outside domain shows without keeping its addresses. Records made before this have no payload_hmac. Raised on r/AI_Agents: Abhishekxdg/chronosdb#36.
  • Stopping chronos serve or chronos mcp no longer forgets what worlds read. Both close the database and then exit the process, and what dropping the database keeps for the next open (worlds' read sets, the reads recorded for DIFF ... READERS, agents' hourly merge counts) was kept only by the drop, which an exit skips. After every clean stop, a world that checks its reads was held as after a crash (relies on reads made before the database restarted), and rows_per_hour/deletes_per_hour started again from zero. Closing the database now keeps them.
  • CHECK READS: has anything I read changed? CHECK READS [OF WORLD w] lists what a world that checks its reads (check_reads) read that changed since it forked (rows, key ranges and filtered scans, an empty result included), and changes nothing: no rebase, the world's view stays as it was. Meant for an agent between steps of a long task: re-read and decide again before writing, instead of finding out at its merge. In a folder attached to Postgres it checks a world of main's reads against Postgres as it is now too. Also the MCP tool check_reads and the HTTP op check_reads. See stale reads. (Asked for on r/AI_Agents: Abhishekxdg/chronosdb#35.)
  • Trigram indexes (pg_trgm). USING gin (name gin_trgm_ops) and USING gist (name gist_trgm_ops), on a column or an expression, were accepted and kept as btrees, so % and LIKE '%...%' read every row. They are now indexes of each text's trigrams: name % 'jon' reads only the rows with enough of the constant's trigrams to reach the similarity threshold, and LIKE (and ILIKE, for an ASCII pattern) only the rows with every trigram of the pattern's literal runs, each row checked again. Kept up by writes, branches and merges like any index; pg_indexes and dumps show the operator class, and chronos import keeps it instead of reporting it dropped. On 200,000 two-word names (examples/trigram_index.rs), LIKE '%...%' went from 10.8 ms to 1.0 ms and % from 70 ms to 25 ms; % gains less on that data's small alphabet, where every trigram is in thousands of rows. Issue #33.
  • pgvector indexes keep their operator class, and cosine and L2 get a graph of their own. USING hnsw (e vector_cosine_ops) (or vector_ip_ops) is kept and shown by pg_get_indexdef and pg_indexes as Postgres shows it, so pg_dump carries it; an unknown class is 42704, as in Postgres. The search index ranks every vector column by inner product, the cosine and L2 order only for vectors of unit length; for vectors that aren't, a cosine or L2 index now gets a graph of its own (over unit-length copies for cosine, by Euclidean distance for L2), so ORDER BY e <=> q LIMIT k walks a graph instead of comparing every row: on 200,000 vectors of 384 dimensions and mixed lengths, cosine went from 15.6 ms to 0.57 ms (97.7% recall@10) and L2 from 15.1 ms to 1.24 ms (98.5%) (examples/metric_graphs.rs). chronos import no longer reports pgvector's operator classes as dropped. Issue #32.

The macOS builds need macOS 13 or later, as for 0.2.0.

Chronos DB 0.3.2 · Chronos