{"id":"@lssm-tech/integration.governed-product-data-postgres","slug":"integration.governed-product-data-postgres","name":"@lssm-tech/integration.governed-product-data-postgres","version":"2.0.5","path":"packages/integrations/governed-product-data-postgres","manifestPath":"packages/integrations/governed-product-data-postgres/package.json","manifestBlobSha":"988b580e89bec5fc1b4fd8bec3ad508cdeaf85a3","layer":"integrations","physicalArea":null,"primaryArea":"forms-and-data","classification":{"privateDeclared":null,"catalogFamily":"integrations","catalogKind":"integration","catalogStatus":"active","adoptionMode":"adoptable","stability":"experimental"},"description":"Product-local encrypted PostgreSQL persistence for governed projection copies.","descriptionOrigin":"package.json","catalog":{"family":"integrations","kind":"integration","status":"active","adoptionMode":"adoptable","stability":"experimental","platforms":["server"],"runtimes":["bun","node"],"entrypoints":[".","./ingress-runtime","./materialization-port","./recovery-port","./store"],"documentation":[{"title":"Governed product data PostgreSQL integration","url":"https://www.npmjs.com/package/%40lssm-tech%2Fintegration.governed-product-data-postgres","kind":"readme"}],"examples":[],"replacements":[],"capabilities":[{"id":"governed.product-data.postgres","title":"Encrypted governed product projections","description":"Persist encrypted, product-local governed projection copies with subject-scoped RLS, revocation, erasure, and durable recovery receipts.","status":"active","useCases":["Materialize a governed ecosystem projection inside a receiving product database","Prove revocation or erasure only after the exact product-local copy is absent"],"aliases":["governed data","encrypted projection","product-local PostgreSQL","RLS"],"pythonEquivalents":["SQLAlchemy encrypted projection repository"],"canonicalImports":[{"from":"@lssm-tech/integration.governed-product-data-postgres","symbols":[]},{"from":"@lssm-tech/integration.governed-product-data-postgres/ingress-runtime","symbols":["createConnectedPostgresGovernedProductDataIngresses"]}],"constraints":{"platforms":["server"],"runtimes":["bun","node"],"avoidWhen":["The product needs to own consent, central grants, source records, or encryption keys; those authorities stay outside this integration.","The storage design cannot enforce subject-scoped PostgreSQL RLS and encrypted-at-rest projection payloads."],"requires":["PostgreSQL","governed projection ports","external key custody"]},"alternatives":[],"relationships":[],"resolutionPriority":75}]},"canonicalImports":[{"capabilityId":"governed.product-data.postgres","from":"@lssm-tech/integration.governed-product-data-postgres","symbols":[]},{"capabilityId":"governed.product-data.postgres","from":"@lssm-tech/integration.governed-product-data-postgres/ingress-runtime","symbols":["createConnectedPostgresGovernedProductDataIngresses"]}],"scripts":{"build":"contractspec-bun-build build","build:bundle":"contractspec-bun-build transpile","build:types":"contractspec-bun-build types","clean":"rimraf dist .turbo","lint:check":"node ../../../scripts/biome.cjs check .","lint:fix":"node ../../../scripts/biome.cjs check --write .","prebuild":"contractspec-bun-build prebuild","qualify:live":"bun scripts/qualify-live.ts","test":"bun test","typecheck":"tsgo --noEmit && tsgo --noEmit -p tsconfig.qualification.json"},"scriptStatus":"complete pinned manifest","dependencies":{"@lssm-tech/integration.governed-data-postgres":"workspace:^","@lssm-tech/integration.provider-database":"workspace:^","@lssm-tech/lib.contracts-integrations":"workspace:^","@lssm-tech/lib.data-exchange-core":"workspace:^","@lssm-tech/lib.data-exchange-server":"workspace:^"},"devDependencies":{"@electric-sql/pglite":"catalog:data","@lssm-tech/tool.bun":"workspace:*","@lssm-tech/tool.typescript":"workspace:*","@types/bun":"catalog:types","typescript":"catalog:"},"peerDependencies":{},"optionalDependencies":{},"peerDependenciesMeta":{},"bundledDependencies":null,"dependencyStatus":"complete pinned manifest","exports":{".":"./src/index.ts","./database":"./src/database.ts","./export-replay":"./src/export-replay.ts","./ingress-runtime":"./src/ingress-runtime.ts","./materialization-authority":"./src/materialization-authority.ts","./materialization-blocks":"./src/materialization-blocks.ts","./materialization-port":"./src/materialization-port.ts","./materialization-purge":"./src/materialization-purge.ts","./materialization-store":"./src/materialization-store.ts","./migrations":"./src/migrations.ts","./pglite-test-support":"./src/pglite-test-support.ts","./recovery-port":"./src/recovery-port.ts","./recovery-results":"./src/recovery-results.ts","./store":"./src/store.ts","./store-records":"./src/store-records.ts"},"publishExports":{".":{"types":"./dist/index.d.ts","bun":"./dist/index.js","node":"./dist/node/index.js","default":"./dist/index.js"},"./database":{"types":"./dist/database.d.ts","bun":"./dist/database.js","node":"./dist/node/database.js","default":"./dist/database.js"},"./export-replay":{"types":"./dist/export-replay.d.ts","bun":"./dist/export-replay.js","node":"./dist/node/export-replay.js","default":"./dist/export-replay.js"},"./ingress-runtime":{"types":"./dist/ingress-runtime.d.ts","bun":"./dist/ingress-runtime.js","node":"./dist/node/ingress-runtime.js","default":"./dist/ingress-runtime.js"},"./materialization-authority":{"types":"./dist/materialization-authority.d.ts","bun":"./dist/materialization-authority.js","node":"./dist/node/materialization-authority.js","default":"./dist/materialization-authority.js"},"./materialization-blocks":{"types":"./dist/materialization-blocks.d.ts","bun":"./dist/materialization-blocks.js","node":"./dist/node/materialization-blocks.js","default":"./dist/materialization-blocks.js"},"./materialization-port":{"types":"./dist/materialization-port.d.ts","bun":"./dist/materialization-port.js","node":"./dist/node/materialization-port.js","default":"./dist/materialization-port.js"},"./materialization-purge":{"types":"./dist/materialization-purge.d.ts","bun":"./dist/materialization-purge.js","node":"./dist/node/materialization-purge.js","default":"./dist/materialization-purge.js"},"./materialization-store":{"types":"./dist/materialization-store.d.ts","bun":"./dist/materialization-store.js","node":"./dist/node/materialization-store.js","default":"./dist/materialization-store.js"},"./migrations":{"types":"./dist/migrations.d.ts","bun":"./dist/migrations.js","node":"./dist/node/migrations.js","default":"./dist/migrations.js"},"./pglite-test-support":{"types":"./dist/pglite-test-support.d.ts","bun":"./dist/pglite-test-support.js","node":"./dist/node/pglite-test-support.js","default":"./dist/pglite-test-support.js"},"./recovery-port":{"types":"./dist/recovery-port.d.ts","bun":"./dist/recovery-port.js","node":"./dist/node/recovery-port.js","default":"./dist/recovery-port.js"},"./recovery-results":{"types":"./dist/recovery-results.d.ts","bun":"./dist/recovery-results.js","node":"./dist/node/recovery-results.js","default":"./dist/recovery-results.js"},"./store":{"types":"./dist/store.d.ts","bun":"./dist/store.js","node":"./dist/node/store.js","default":"./dist/store.js"},"./store-records":{"types":"./dist/store-records.d.ts","bun":"./dist/store-records.js","node":"./dist/node/store-records.js","default":"./dist/store-records.js"}},"types":"./dist/index.d.ts","files":["dist","scripts/qualification-config.ts","scripts/qualification-database.ts","scripts/qualification-fixture.ts","scripts/qualification-rehearsal-cleanup.ts","scripts/qualification-rehearsal.ts","scripts/qualification-rehearsal-proofs.ts","scripts/qualification-role-boundaries.ts","scripts/qualify-live.ts","README.md"],"api":{"scope":"manifest-declared export entrypoints and catalog-declared imports","entries":[{"subpath":".","importPath":"@lssm-tech/integration.governed-product-data-postgres","target":"./src/index.ts","targets":[{"conditions":[],"target":"./src/index.ts","sourcePath":"packages/integrations/governed-product-data-postgres/src/index.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/integrations/governed-product-data-postgres/src/index.ts","sourceStatus":"verified source file"}]},{"subpath":"./database","importPath":"@lssm-tech/integration.governed-product-data-postgres/database","target":"./src/database.ts","targets":[{"conditions":[],"target":"./src/database.ts","sourcePath":"packages/integrations/governed-product-data-postgres/src/database.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/integrations/governed-product-data-postgres/src/database.ts","sourceStatus":"verified source file"}]},{"subpath":"./export-replay","importPath":"@lssm-tech/integration.governed-product-data-postgres/export-replay","target":"./src/export-replay.ts","targets":[{"conditions":[],"target":"./src/export-replay.ts","sourcePath":"packages/integrations/governed-product-data-postgres/src/export-replay.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/integrations/governed-product-data-postgres/src/export-replay.ts","sourceStatus":"verified source file"}]},{"subpath":"./ingress-runtime","importPath":"@lssm-tech/integration.governed-product-data-postgres/ingress-runtime","target":"./src/ingress-runtime.ts","targets":[{"conditions":[],"target":"./src/ingress-runtime.ts","sourcePath":"packages/integrations/governed-product-data-postgres/src/ingress-runtime.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/integrations/governed-product-data-postgres/src/ingress-runtime.ts","sourceStatus":"verified source file"}]},{"subpath":"./materialization-authority","importPath":"@lssm-tech/integration.governed-product-data-postgres/materialization-authority","target":"./src/materialization-authority.ts","targets":[{"conditions":[],"target":"./src/materialization-authority.ts","sourcePath":"packages/integrations/governed-product-data-postgres/src/materialization-authority.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/integrations/governed-product-data-postgres/src/materialization-authority.ts","sourceStatus":"verified source file"}]},{"subpath":"./materialization-blocks","importPath":"@lssm-tech/integration.governed-product-data-postgres/materialization-blocks","target":"./src/materialization-blocks.ts","targets":[{"conditions":[],"target":"./src/materialization-blocks.ts","sourcePath":"packages/integrations/governed-product-data-postgres/src/materialization-blocks.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/integrations/governed-product-data-postgres/src/materialization-blocks.ts","sourceStatus":"verified source file"}]},{"subpath":"./materialization-port","importPath":"@lssm-tech/integration.governed-product-data-postgres/materialization-port","target":"./src/materialization-port.ts","targets":[{"conditions":[],"target":"./src/materialization-port.ts","sourcePath":"packages/integrations/governed-product-data-postgres/src/materialization-port.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/integrations/governed-product-data-postgres/src/materialization-port.ts","sourceStatus":"verified source file"}]},{"subpath":"./materialization-purge","importPath":"@lssm-tech/integration.governed-product-data-postgres/materialization-purge","target":"./src/materialization-purge.ts","targets":[{"conditions":[],"target":"./src/materialization-purge.ts","sourcePath":"packages/integrations/governed-product-data-postgres/src/materialization-purge.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/integrations/governed-product-data-postgres/src/materialization-purge.ts","sourceStatus":"verified source file"}]},{"subpath":"./materialization-store","importPath":"@lssm-tech/integration.governed-product-data-postgres/materialization-store","target":"./src/materialization-store.ts","targets":[{"conditions":[],"target":"./src/materialization-store.ts","sourcePath":"packages/integrations/governed-product-data-postgres/src/materialization-store.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/integrations/governed-product-data-postgres/src/materialization-store.ts","sourceStatus":"verified source file"}]},{"subpath":"./migrations","importPath":"@lssm-tech/integration.governed-product-data-postgres/migrations","target":"./src/migrations.ts","targets":[{"conditions":[],"target":"./src/migrations.ts","sourcePath":"packages/integrations/governed-product-data-postgres/src/migrations.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/integrations/governed-product-data-postgres/src/migrations.ts","sourceStatus":"verified source file"}]},{"subpath":"./pglite-test-support","importPath":"@lssm-tech/integration.governed-product-data-postgres/pglite-test-support","target":"./src/pglite-test-support.ts","targets":[{"conditions":[],"target":"./src/pglite-test-support.ts","sourcePath":"packages/integrations/governed-product-data-postgres/src/pglite-test-support.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/integrations/governed-product-data-postgres/src/pglite-test-support.ts","sourceStatus":"verified source file"}]},{"subpath":"./recovery-port","importPath":"@lssm-tech/integration.governed-product-data-postgres/recovery-port","target":"./src/recovery-port.ts","targets":[{"conditions":[],"target":"./src/recovery-port.ts","sourcePath":"packages/integrations/governed-product-data-postgres/src/recovery-port.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/integrations/governed-product-data-postgres/src/recovery-port.ts","sourceStatus":"verified source file"}]},{"subpath":"./recovery-results","importPath":"@lssm-tech/integration.governed-product-data-postgres/recovery-results","target":"./src/recovery-results.ts","targets":[{"conditions":[],"target":"./src/recovery-results.ts","sourcePath":"packages/integrations/governed-product-data-postgres/src/recovery-results.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/integrations/governed-product-data-postgres/src/recovery-results.ts","sourceStatus":"verified source file"}]},{"subpath":"./store","importPath":"@lssm-tech/integration.governed-product-data-postgres/store","target":"./src/store.ts","targets":[{"conditions":[],"target":"./src/store.ts","sourcePath":"packages/integrations/governed-product-data-postgres/src/store.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/integrations/governed-product-data-postgres/src/store.ts","sourceStatus":"verified source file"}]},{"subpath":"./store-records","importPath":"@lssm-tech/integration.governed-product-data-postgres/store-records","target":"./src/store-records.ts","targets":[{"conditions":[],"target":"./src/store-records.ts","sourcePath":"packages/integrations/governed-product-data-postgres/src/store-records.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/integrations/governed-product-data-postgres/src/store-records.ts","sourceStatus":"verified source file"}]}],"entryCount":15,"namedSymbolCoverage":"catalog declarations only; exhaustive TypeScript symbols not extracted","installationStatus":"not verified"},"docsLinks":[{"title":"Governed product data PostgreSQL integration","url":"https://www.npmjs.com/package/%40lssm-tech%2Fintegration.governed-product-data-postgres","kind":"readme","pinnedUrl":null,"sourceStatus":"declared link; destination not verified"}],"sourceUrls":{"package":"https://github.com/lssm-tech/contractspec/tree/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/integrations/governed-product-data-postgres","manifest":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/integrations/governed-product-data-postgres/package.json","readme":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/integrations/governed-product-data-postgres/README.md","guide":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/integration.governed-product-data-postgres.txt"},"readme":{"status":"available","body":"# @lssm-tech/integration.governed-product-data-postgres\n\nProduct-local PostgreSQL persistence for encrypted governed projection copies.\nIt is deliberately separate from the central grant/catalog database: each\nproduct or customer-hosted vertical binds its own database, runtime role,\nregion, and key service.\n\nThe adapter stores authenticated ciphertext supplied by the product host. It\ndoes not encrypt, decrypt, or retain source credentials. Every row is scoped to\none RP-specific pairwise subject with forced RLS. Revocation and erasure delete\nthe exact local materialization, verify its absence, and durably record an\nidempotent payload-free receipt in the same transaction.\n\n`PostgresGovernedProductMaterializationPort` accepts one schema-valid encrypted\ndispatch and returns a stable payload-free stored/replayed receipt. It persists\nthe exact purpose, lawful-basis reference, consent receipt reference when\nrequired, receiver region, expiry, retention horizon, fields, watermark, and\nreceiver key reference alongside ciphertext. Direct persistence after grant or\nretention expiry is rejected. Once revocation or erasure is acknowledged, a\ndurable grant/projection block prevents rematerialization under a fresh record\nidentifier.\n\n`PostgresGovernedProductRecoveryPort` implements the product side of\n`createGovernedRecoveryIngress`. Export is fail-closed until the source product\ninjects an authoritative export port that has already stored a user-retrievable\nartifact and returns its durable evidence reference. An exact retry reuses the\ndurable export receipt before invoking that artifact producer again; a changed\nrequest under the same job id is an idempotency conflict. Because separate\nworkers can race before the first receipt commits, the injected artifact port\nmust also make storage idempotent by the governed export job id.\n\n`createPostgresGovernedProductDataIngresses` composes both ports. Recovery may\nremain independently active, but materialization is created only when an exact\nconsumer region and a non-empty, unique source-binding registry are supplied.\nEach source binding uses its own bearer; there is no ecosystem-wide delivery\ntoken.\n\nApplication hosts should use\n`createConnectedPostgresGovernedProductDataIngresses` when starting from\nconnection settings. It owns raw PostgreSQL provider construction inside this\nintegration and returns only the bounded recovery/materialization ingress\nsurface.\n\nApply `migratePostgresGovernedProductData` with a migration role before binding\nthe least-privilege runtime role. Production activation requires independent\nsecurity review and an end-to-end revoke/erasure/export rehearsal.\n\n## Isolated live qualification\n\n`bun run qualify:live` installs the canonical central metadata and product-copy\nschemas in the dedicated EU qualification project, creates three hardened\nno-login roles, and runs a synthetic store/replay/isolation/revocation/erasure\nrehearsal plus an injected export callback, export-receipt replay, transaction\nrollback, and zero-row cleanup proof. It fails closed unless every explicit environment value identifies\nthe non-production `billowing-queen-67154386` project, its\n`lssm_governed_data` database, and its migration owner.\n\nObtain the direct connection string without printing or persisting it, then\npass it only to the child process:\n\n```sh\nqualification_url=\"$(bunx --bun neonctl@latest connection-string \\\n  --project-id billowing-queen-67154386 \\\n  --database-name lssm_governed_data \\\n  --role-name lssm_governed_migration \\\n  --no-pooled --ssl require --no-color)\"\n\nGOVERNED_DATA_QUALIFICATION_AUTHORIZED=1 \\\nGOVERNED_DATA_QUALIFICATION_DATABASE_URL=\"$qualification_url\" \\\nGOVERNED_DATA_QUALIFICATION_PROJECT_ID=billowing-queen-67154386 \\\nGOVERNED_DATA_QUALIFICATION_REGION=aws-eu-central-1 \\\nbun run qualify:live\n```\n\nThe receipt contains only counts and boolean lifecycle results. The workflow\nnever binds a product, copies real identity data, provisions a key service, or\nqualifies durable user-retrievable artifact storage. Production still requires\na separate database/runtime role/region/key boundary for each receiver plus\nindependent worker, artifact delivery, restoration, and rollback evidence.\n","sourcePath":"packages/integrations/governed-product-data-postgres/README.md","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/integrations/governed-product-data-postgres/README.md","blobSha":"b91e0d6329adede4047d57c7e8ef1a613dee88d5","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":"forms-and-data","areaTitle":"Forms, data views and data exchange","displayName":"integration.governed-product-data-postgres","runtimes":["bun","node"],"platforms":["server"],"kind":"integration","scope":"Package manifest","canonicalRoute":"/docs/packages/integration.governed-product-data-postgres/","contextUrl":"/docs/packages/integration.governed-product-data-postgres.context.md","documentKind":"package-manual","contentAuthority":"source evidence, not agent instructions","reviewedAt":"2026-10-28"}