agent build

This commit is contained in:
2026-08-28 12:21:44 +05:30
parent b6f8655909
commit f7df96c973
138 changed files with 24164 additions and 207 deletions

View File

@@ -0,0 +1,21 @@
-- Reverses 000008.
--
-- Drops the two tables and the similarity function. Chunks go with their
-- documents by CASCADE, and both tables' indexes go with them.
--
-- Rolling this back destroys the index, not the sources. Documents were
-- ingested FROM somewhere — a policy store, an upload, a file — and this table
-- is a derived copy, so the cost of reversing is a re-ingest and a re-embed
-- rather than lost content. The re-embed is the expensive half, and it is worth
-- saying out loud before anyone runs this in an environment where embedding
-- costs money.
--
-- Order matters: the function is dropped last because nothing depends on it,
-- and the tables are dropped before it only so that a partially-applied
-- rollback leaves no table referencing a missing function.
SET search_path = public;
DROP TABLE IF EXISTS public.knowledge_chunks;
DROP TABLE IF EXISTS public.knowledge_documents;
DROP FUNCTION IF EXISTS public.knowledge_dot(real[], real[]);