Public
Likeslimarmor
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v88View latest version
upsertManynow usessqlite.batch()— all records in a batch are written in a single round-trip instead of one SQL call per record. For 100 records, this is ~3× faster.- FTS sync is batched —
DELETE + INSERTfor FTS5 are batched alongside main upserts (one round-trip instead of two per record). setup()guard added — module-level_setupDoneflag skips all setup SQL on warm requests. Saves 3+ SQLite round-trips on every subsequent call after the first./seedand/testuseupsertMany— seeding 100 records now makes ~2 embedding API calls instead of 100.
/clearnow clears FTS table — previously,POST /clearonly deleted from the mainvectordbtable, leaving ghost entries invectordb_ftsthat would appear in keyword search results. Now both tables are cleared atomically viasqlite.batch().stats()uses correct dim in auto-dim mode —estimated_storage_mbnow usesRESOLVED_DIM(actual detected dimension) instead of the pre-resolution config default whenEMBEDDING_DIM=auto.
ui.ts: Moved CLI logic to/ui.js(external script) to fix embedded/preview CSP issues.api.ts: Added/ui.jsroute to serve the CLI script with no-store caching.api.ts: AddedALLOW_WRITE_TESTS_NOAUTHto allow full validation without headers.api.ts: Added/validate?write=yespreset to the no-JS CLI.vectordb.ts: Expanded DiskANN index tuning — supportsINDEX_ALPHA,INDEX_SEARCH_L,INDEX_INSERT_L.vectordb.ts: ExpandedINDEX_COMPRESS_NEIGHBORSoptions (float1bit,floatb16,float32).
api.ts:/statsuses configured embedding dimensions (no hard-coded 4096).ui.ts:upsertnow accepts--metaJSON;delreflects actualdeletedfield.vectordb.ts: Added metadata filters, hybrid BM25 keyword boost, batch upsert, chunking helper, FTS5 index.api.ts: Added/auth,/export,/import,/upsert_chunked, enhanced/searchand/list.api.ts: Added/validateendpoint for self-checks.ui.ts: Added hybrid search flags, meta filters, pagination, server auth status.- Auth: Added
ADMIN_TOKENbearer token authentication for write operations. - Docs: Full README, GUIDE, HANDOVER written.
- Multi-provider support: Nebius (default), OpenAI, OpenRouter, custom.
- Browser CLI (
/ui) — terminal-style web interface. - Added
/seed,/calibrate,/test,/clear,/reindexadmin endpoints. - Content-hash deduplication (skips re-embedding unchanged text).
maxDistancefilter on search.- Distance scores returned in search results.
- Initial release.
- Core:
setup(),upsert(),search(),remove(),stats(). - libSQL DiskANN index with
float8neighbor compression. - Nebius embedding API integration.