Knowledge bases in the store: collections, grants and chunks kept apart per tenant

Collections owned by an organization, team, project or person; grants that
add up down the tree and never cross an organization; chunks in PostgreSQL
with pgvector, partitioned by organization, an HNSW index per collection, and
row-level security as a second line behind each query's filter. Search fuses
nearest-neighbour and full-text ranks. Off on SQLite and without pgvector,
saying why. server init and the HA database setup install and enable it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ilker ManapandClaude Opus 5.5 committed 2026-10-08 12:47:57 +02:00
1 parent 0a7fb821d8
commit d35630defe
11 files changed
+1408 -25

No files matched your search

+4
View File
@@ -48,6 +48,10 @@ type DB struct {
// personal is what a person's own use is held to when nobody wrote a
// limit for them; see SetPersonalDefaults.
personal *Limits
// kbErr is why this store cannot hold knowledge bases, nil when it can;
// set once at open (knowledge.go).
kbErr error
}
// OpenSQLite opens (creating if needed) a database and brings it up to date.