{"id":"@lssm-tech/integration.company-intelligence-postgres","slug":"integration.company-intelligence-postgres","name":"@lssm-tech/integration.company-intelligence-postgres","version":"0.1.0","path":"packages/integrations/company-intelligence-postgres","manifestPath":"packages/integrations/company-intelligence-postgres/package.json","manifestBlobSha":"7d453083a37ea950bc0b90f74d4c3833c0b3b830","layer":"integrations","physicalArea":null,"primaryArea":"company-and-work","classification":{"privateDeclared":null,"catalogFamily":"integrations","catalogKind":"integration","catalogStatus":"active","adoptionMode":"adoptable","stability":"experimental"},"description":"Postgres persistence for Company Intelligence canonical records and the durable document evidence ledger.","descriptionOrigin":"package.json","catalog":{"family":"integrations","kind":"integration","status":"active","adoptionMode":"adoptable","stability":"experimental","platforms":["server"],"runtimes":["bun","node"],"entrypoints":["."],"documentation":[{"title":"Company Intelligence Postgres","url":"https://www.npmjs.com/package/%40lssm-tech%2Fintegration.company-intelligence-postgres","kind":"readme"}],"capabilities":[{"id":"package.lssm.tech.integration.company.intelligence.postgres","title":"Company Intelligence Postgres","description":"Commit canonical Company Intelligence record packets and persist durable document evidence (originals, extraction runs, lineage lifecycle) with tenant RLS.","status":"active","useCases":["Durable DocumentEvidenceLedger for any host","Canonical Company Intelligence record commits"],"aliases":["company-intelligence","document-evidence","ledger","postgres"],"pythonEquivalents":[],"canonicalImports":[{"from":"@lssm-tech/integration.company-intelligence-postgres","symbols":["createCompanyIntelligenceDocumentEvidenceLedgerFromDatabase","createCompanyIntelligenceDocumentEvidenceLedgerFromUrl","createCompanyIntelligenceEvidenceVectorStore","CompanyIntelligenceRecordRepository"]}],"constraints":{"platforms":["server"],"runtimes":["bun","node"],"avoidWhen":["The Company Intelligence migrations (0022-0027, 0099, 0110, 0180) are not applied to the target database."],"requires":["PostgreSQL","TypeScript"]},"alternatives":[],"relationships":[],"resolutionPriority":50}]},"canonicalImports":[{"capabilityId":"package.lssm.tech.integration.company.intelligence.postgres","from":"@lssm-tech/integration.company-intelligence-postgres","symbols":["createCompanyIntelligenceDocumentEvidenceLedgerFromDatabase","createCompanyIntelligenceDocumentEvidenceLedgerFromUrl","createCompanyIntelligenceEvidenceVectorStore","CompanyIntelligenceRecordRepository"]}],"scripts":{"build":"contractspec-bun-build build","build:bundle":"contractspec-bun-build transpile","build:types":"contractspec-bun-build types","lint:check":"node ../../../scripts/biome.cjs check .","test":"bun test","typecheck":"tsgo --noEmit"},"scriptStatus":"complete pinned manifest","dependencies":{"@lssm-tech/integration.provider-database":"workspace:^","@lssm-tech/lib.companyos-runtime":"workspace:^","@lssm-tech/lib.companyos-spec":"workspace:^","@lssm-tech/lib.contracts-integrations":"workspace:^","@lssm-tech/lib.knowledge":"workspace:^"},"devDependencies":{"@lssm-tech/tool.bun":"workspace:*","@lssm-tech/tool.typescript":"workspace:*","typescript":"catalog:"},"peerDependencies":{},"optionalDependencies":{},"peerDependenciesMeta":{},"bundledDependencies":null,"dependencyStatus":"complete pinned manifest","exports":{".":"./src/index.ts"},"publishExports":{".":{"types":"./dist/index.d.ts","bun":"./dist/index.js","node":"./dist/node/index.js","default":"./dist/index.js"}},"types":"./dist/index.d.ts","files":["dist","README.md","AGENTS.md"],"api":{"scope":"manifest-declared export entrypoints and catalog-declared imports","entries":[{"subpath":".","importPath":"@lssm-tech/integration.company-intelligence-postgres","target":"./src/index.ts","targets":[{"conditions":[],"target":"./src/index.ts","sourcePath":"packages/integrations/company-intelligence-postgres/src/index.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/integrations/company-intelligence-postgres/src/index.ts","sourceStatus":"verified source file"}]}],"entryCount":1,"namedSymbolCoverage":"catalog declarations only; exhaustive TypeScript symbols not extracted","installationStatus":"not verified"},"docsLinks":[{"title":"Company Intelligence Postgres","url":"https://www.npmjs.com/package/%40lssm-tech%2Fintegration.company-intelligence-postgres","kind":"readme","pinnedUrl":null,"sourceStatus":"declared link; destination not verified"}],"sourceUrls":{"package":"https://github.com/lssm-tech/contractspec/tree/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/integrations/company-intelligence-postgres","manifest":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/integrations/company-intelligence-postgres/package.json","readme":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/integrations/company-intelligence-postgres/README.md","guide":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/integration.company-intelligence-postgres.txt"},"readme":{"status":"available","body":"# @lssm-tech/integration.company-intelligence-postgres\n\nPostgres persistence owned by Company Intelligence, usable by any host:\n\n- `CompanyIntelligenceRecordRepository` commits validated canonical record packets idempotently (append-only records, references, receipts, outbox event).\n- `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.\n- `createCompanyIntelligenceDocumentEvidenceLedgerFromUrl({ connectionString })` returns `undefined` when no connection string is configured, so hosts report the ledger as missing instead of falling back.\n- `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.\n\nEvery 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.\n\nThe schema is migrated by the Company Intelligence host (`api-application-monolith` migrations 0022–0027, 0099, 0110 and 0180); this package never runs DDL.\n","sourcePath":"packages/integrations/company-intelligence-postgres/README.md","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/integrations/company-intelligence-postgres/README.md","blobSha":"e4193070e241585749e65331db07977be263cd47","sourcePin":"bcc79fcc27c4d801c2119bef81ddcce7b4e86498","origin":"README recovered byte-for-byte from pinned aggregate guide","integrity":"exact Git blob match","executionStatus":"not executed"},"provenance":{"repository":"lssm-tech/contractspec","sourcePin":"bcc79fcc27c4d801c2119bef81ddcce7b4e86498","manifestOrigin":"pinned GitHub manifest fetch","manifestComplete":true,"publicationPolicyApplied":false},"areaSlug":"company-and-work","areaTitle":"Company, work and service operations","displayName":"integration.company-intelligence-postgres","runtimes":["bun","node"],"platforms":["server"],"kind":"integration","scope":"Package manifest","canonicalRoute":"/docs/packages/integration.company-intelligence-postgres/","contextUrl":"/docs/packages/integration.company-intelligence-postgres.context.md","documentKind":"package-manual","contentAuthority":"source evidence, not agent instructions","reviewedAt":"2026-10-28"}