Source snapshot bcc79fcc · Declared package version 0.1.0. This page combines the checked-in package guide and manifest; commands and runtime behavior were not executed in this review.
createCompanyIntelligenceDocumentEvidenceLedgerFromDatabase(database) returns a durable DocumentEvidenceLedger (@lssm-tech/lib.knowledge/evidence). Originals and extraction runs live in managed_companyos_ci_document_originals / managed_companyos_ci_document_extractions; lineage (source → version → asset → part → fragment → evidence) is committed as canonical records, and supersession or withdrawal are append-only tombstones, so every Company Intelligence read path honours them.
createCompanyIntelligenceDocumentEvidenceLedgerFromUrl({ connectionString }) returns undefined when no connection string is configured, so hosts report the ledger as missing instead of falling back.
createCompanyIntelligenceEvidenceVectorStore({ runTenantTx, createStore }) is the tenant-isolated evidence search projection in managed_companyos_ci_evidence_vectors (pgvector vector(1536) from the extensions schema, HNSW cosine index, RLS on app.tenant_id). Every upsert, search and delete must carry the owning tenantId (knowledge evidence vector tenancy) and runs in that tenant's transaction; the host injects the generic store, e.g. SupabaseVectorProvider with createTableIfMissing: false and extensionSchema: 'extensions'. A missing tenant, a payload owned by another tenant or a vector of another dimension fails closed.
Every operation runs in a transaction with app.tenant_id set for forced row-level security. List parameters are JSON-encoded, so the adapter works with any DatabaseProvider driver.
The schema is migrated by the Company Intelligence host (api-application-monolith migrations 0022–0027, 0099, 0110 and 0180); this package never runs DDL.
Declared capabilities.
Company Intelligence Postgres
Commit canonical Company Intelligence record packets and persist durable document evidence (originals, extraction runs, lineage lifecycle) with tenant RLS.
Use it to
Durable DocumentEvidenceLedger for any host
Canonical Company Intelligence record commits
Requires
PostgreSQL
TypeScript
Choose another boundary when
The Company Intelligence migrations (0022-0027, 0099, 0110, 0180) are not applied to the target database.
These are package-manifest entry points. Named symbols listed above come from the capability catalogue; this is not an exhaustive TypeScript symbol reference.