{"_id":"@alma-harness/postgres","_rev":"12-38fc8b6bad08c6da9dc69dd5be0e1092","name":"@alma-harness/postgres","dist-tags":{"latest":"0.10.1"},"versions":{"0.1.0":{"name":"@alma-harness/postgres","version":"0.1.0","license":"Apache-2.0","_id":"@alma-harness/postgres@0.1.0","maintainers":[{"name":"fabiofernandescarneiro","email":"fabiofernandescarneiro@gmail.com"}],"homepage":"https://github.com/FabioFernandesCarneiro/alma#readme","bugs":{"url":"https://github.com/FabioFernandesCarneiro/alma/issues"},"dist":{"shasum":"0eafddff0e0f1fd7b67e7098c3370454572e66c3","tarball":"https://registry.npmjs.org/@alma-harness/postgres/-/postgres-0.1.0.tgz","fileCount":6,"integrity":"sha512-3wQbeJhiwtaw8L35DNSKUXDtOWlzPSIfjvk98NQchCRx/96Y9OTphtEwOF5OUbEC9qXvNh6GnpayryuYe2Cwag==","signatures":[{"sig":"MEYCIQCeiPNrM/ojblRuvLTyKphJ3K7XVHon7W1mRuTdnFmfpwIhAIsVvb83ipND62fRYGlAb1PAtvLGc+75WE5W3wAnPD8j","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":237838},"main":"./dist/index.js","type":"module","_from":"file:alma-harness-postgres-0.1.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"fabiofernandescarneiro","email":"fabiofernandescarneiro@gmail.com"},"_resolved":"/private/var/folders/zc/snhwcnp15dj2hk0k9_g1fh3h0000gn/T/cd9db7bd53a2a17f1d96d65d523edd4e/alma-harness-postgres-0.1.0.tgz","_integrity":"sha512-3wQbeJhiwtaw8L35DNSKUXDtOWlzPSIfjvk98NQchCRx/96Y9OTphtEwOF5OUbEC9qXvNh6GnpayryuYe2Cwag==","repository":{"url":"git+https://github.com/FabioFernandesCarneiro/alma.git","type":"git","directory":"packages/postgres"},"_npmVersion":"11.18.0","description":"Reference Postgres storage adapters for Alma: SessionStore and the memory stores (episodes, profile, erasure watermarks), with row-level security keyed on {org, uid}.","directories":{},"_nodeVersion":"26.4.0","dependencies":{"pg":"^8.16.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","@types/pg":"^8.15.0","typescript":"^5.9.2","@types/node":"^24.1.0","@alma-harness/testing":"0.1.0"},"peerDependencies":{"@alma-harness/core":"^0.1.0","@alma-harness/memory":"^0.1.0"},"_npmOperationalInternal":{"tmp":"tmp/postgres_0.1.0_1788211400607_0.4316728698017833","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@alma-harness/postgres","version":"0.2.0","license":"Apache-2.0","_id":"@alma-harness/postgres@0.2.0","maintainers":[{"name":"fabiofernandescarneiro","email":"fabiofernandescarneiro@gmail.com"}],"homepage":"https://github.com/FabioFernandesCarneiro/alma#readme","bugs":{"url":"https://github.com/FabioFernandesCarneiro/alma/issues"},"dist":{"shasum":"5931835baa83b94a4dcd790341714f6b8b1efbad","tarball":"https://registry.npmjs.org/@alma-harness/postgres/-/postgres-0.2.0.tgz","fileCount":6,"integrity":"sha512-uj7Hk8PCvriwhL2vxbADcmDRY1GwElNYHe1Ez/em7X63W5r3Z3EvFc7A6cpvYBP1BN1GmByP037DhuQz9e8aiA==","signatures":[{"sig":"MEUCIQCBby/LORt/e6c+3iIf3r3B+2R4gjn3OnN6M8cZBPulswIgJIgBvBoM8pJufm2/EIyJaxDIRzftr7gAKnaDbsQZ2DA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":271821},"main":"./dist/index.js","type":"module","_from":"file:alma-harness-postgres-0.2.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"fabiofernandescarneiro","email":"fabiofernandescarneiro@gmail.com"},"_resolved":"/private/var/folders/zc/snhwcnp15dj2hk0k9_g1fh3h0000gn/T/8dd799ed42577d292d4c4117ebb5ff5d/alma-harness-postgres-0.2.0.tgz","_integrity":"sha512-uj7Hk8PCvriwhL2vxbADcmDRY1GwElNYHe1Ez/em7X63W5r3Z3EvFc7A6cpvYBP1BN1GmByP037DhuQz9e8aiA==","repository":{"url":"git+https://github.com/FabioFernandesCarneiro/alma.git","type":"git","directory":"packages/postgres"},"_npmVersion":"11.18.0","description":"Reference Postgres storage adapters for Alma: SessionStore and the memory stores (episodes, profile, erasure watermarks), with row-level security keyed on {org, uid}.","directories":{},"_nodeVersion":"26.4.0","dependencies":{"pg":"^8.16.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","@types/pg":"^8.15.0","typescript":"^5.9.2","@types/node":"^24.1.0","@alma-harness/testing":"0.2.0"},"peerDependencies":{"@alma-harness/core":"^0.2.0","@alma-harness/memory":"^0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/postgres_0.2.0_1788446554265_0.17054321633026537","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@alma-harness/postgres","version":"0.3.0","license":"Apache-2.0","_id":"@alma-harness/postgres@0.3.0","maintainers":[{"name":"fabiofernandescarneiro","email":"fabiofernandescarneiro@gmail.com"}],"homepage":"https://github.com/FabioFernandesCarneiro/alma#readme","bugs":{"url":"https://github.com/FabioFernandesCarneiro/alma/issues"},"dist":{"shasum":"0a8d961e3d1b13b1eb64135725c8fe71ae2e65e5","tarball":"https://registry.npmjs.org/@alma-harness/postgres/-/postgres-0.3.0.tgz","fileCount":6,"integrity":"sha512-YllImIzqmR4jfmP0lgrtPWS1Dxz3JH4GRl4LMNg9DCA9Ji733w14BRDTY9wpb/7IcZJXVZnp+gnhh4dIxNDXdg==","signatures":[{"sig":"MEQCIDwqO40pe2LFJpM+nfJi+DK6hF+Pd1NFwqcjBSTWT2SsAiAwb+CRrOavhRLijnj+WMZZPeYv3Z93FJVJV4C251maHw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":288717},"main":"./dist/index.js","type":"module","_from":"file:alma-harness-postgres-0.3.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"fabiofernandescarneiro","email":"fabiofernandescarneiro@gmail.com"},"_resolved":"/private/var/folders/zc/snhwcnp15dj2hk0k9_g1fh3h0000gn/T/2992641e4226dfadb520299ad4b9df32/alma-harness-postgres-0.3.0.tgz","_integrity":"sha512-YllImIzqmR4jfmP0lgrtPWS1Dxz3JH4GRl4LMNg9DCA9Ji733w14BRDTY9wpb/7IcZJXVZnp+gnhh4dIxNDXdg==","repository":{"url":"git+https://github.com/FabioFernandesCarneiro/alma.git","type":"git","directory":"packages/postgres"},"_npmVersion":"11.18.0","description":"Reference Postgres storage adapters for Alma: SessionStore and the memory stores (episodes, profile, erasure watermarks), with row-level security keyed on {org, uid}.","directories":{},"_nodeVersion":"26.4.0","dependencies":{"pg":"^8.16.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","@types/pg":"^8.15.0","typescript":"^5.9.2","@types/node":"^24.1.0","@alma-harness/testing":"0.3.0"},"peerDependencies":{"@alma-harness/core":"^0.3.0","@alma-harness/memory":"^0.3.0"},"_npmOperationalInternal":{"tmp":"tmp/postgres_0.3.0_1788455646548_0.7694534640923116","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@alma-harness/postgres","version":"0.4.0","license":"Apache-2.0","_id":"@alma-harness/postgres@0.4.0","maintainers":[{"name":"fabiofernandescarneiro","email":"fabiofernandescarneiro@gmail.com"}],"homepage":"https://github.com/FabioFernandesCarneiro/alma#readme","bugs":{"url":"https://github.com/FabioFernandesCarneiro/alma/issues"},"dist":{"shasum":"11f19cd57f175980f461b8db0e6159142be5986c","tarball":"https://registry.npmjs.org/@alma-harness/postgres/-/postgres-0.4.0.tgz","fileCount":6,"integrity":"sha512-wERBeJR4KrkbT1O0EaA5u3uvQUL741pDZtjj5HdM+cRrWBHMgGcA5lvQTuiH9WAD1BMJnC4rSFHly/4K01KW8w==","signatures":[{"sig":"MEYCIQDYATER5LcwLlQwkjua6PQ1cPuM7GrH3bzG6+DUj+KcHgIhAMS6/r66XgbH3PGYhWDAKJzthINzo+ub9TwDOdzzJTeI","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":288717},"main":"./dist/index.js","type":"module","_from":"file:alma-harness-postgres-0.4.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"fabiofernandescarneiro","email":"fabiofernandescarneiro@gmail.com"},"_resolved":"/private/var/folders/zc/snhwcnp15dj2hk0k9_g1fh3h0000gn/T/923967ec47e99ae0f721921d1f3a5e27/alma-harness-postgres-0.4.0.tgz","_integrity":"sha512-wERBeJR4KrkbT1O0EaA5u3uvQUL741pDZtjj5HdM+cRrWBHMgGcA5lvQTuiH9WAD1BMJnC4rSFHly/4K01KW8w==","repository":{"url":"git+https://github.com/FabioFernandesCarneiro/alma.git","type":"git","directory":"packages/postgres"},"_npmVersion":"11.18.0","description":"Reference Postgres storage adapters for Alma: SessionStore and the memory stores (episodes, profile, erasure watermarks), with row-level security keyed on {org, uid}.","directories":{},"_nodeVersion":"26.4.0","dependencies":{"pg":"^8.16.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","@types/pg":"^8.15.0","typescript":"^5.9.2","@types/node":"^24.1.0","@alma-harness/testing":"0.4.0"},"peerDependencies":{"@alma-harness/core":"^0.4.0","@alma-harness/memory":"^0.4.0"},"_npmOperationalInternal":{"tmp":"tmp/postgres_0.4.0_1788462111852_0.8229043515070049","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@alma-harness/postgres","version":"0.5.0","license":"Apache-2.0","_id":"@alma-harness/postgres@0.5.0","maintainers":[{"name":"fabiofernandescarneiro","email":"fabiofernandescarneiro@gmail.com"}],"homepage":"https://github.com/FabioFernandesCarneiro/alma#readme","bugs":{"url":"https://github.com/FabioFernandesCarneiro/alma/issues"},"dist":{"shasum":"ba098bfcbabbcff140a532272c21adc6ce6fa302","tarball":"https://registry.npmjs.org/@alma-harness/postgres/-/postgres-0.5.0.tgz","fileCount":6,"integrity":"sha512-wvA/Xso/aBNNHQSHeLpG+Ch4InNBdz22Cl2xsDQpCthTKl+tjEOVyngGtbS9df8etexcFXAqv7LDoVYa5olGeQ==","signatures":[{"sig":"MEQCIDS79j43BPKQYwZxVd1FiTeRvvDsY60jr9EYsRJj5U1wAiBs5qemrteKqnNaazllVA3YhEafnsgOsJN+6eUJTyfS+Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":291254},"main":"./dist/index.js","type":"module","_from":"file:alma-harness-postgres-0.5.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"fabiofernandescarneiro","email":"fabiofernandescarneiro@gmail.com"},"_resolved":"/private/var/folders/zc/snhwcnp15dj2hk0k9_g1fh3h0000gn/T/70dbfd0cdce5a7ff04e31470b79c2723/alma-harness-postgres-0.5.0.tgz","_integrity":"sha512-wvA/Xso/aBNNHQSHeLpG+Ch4InNBdz22Cl2xsDQpCthTKl+tjEOVyngGtbS9df8etexcFXAqv7LDoVYa5olGeQ==","repository":{"url":"git+https://github.com/FabioFernandesCarneiro/alma.git","type":"git","directory":"packages/postgres"},"_npmVersion":"11.18.0","description":"Reference Postgres storage adapters for Alma: SessionStore and the memory stores (episodes, profile, erasure watermarks), with row-level security keyed on {org, uid}.","directories":{},"_nodeVersion":"26.4.0","dependencies":{"pg":"^8.16.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","@types/pg":"^8.15.0","typescript":"^5.9.2","@types/node":"^24.1.0","@alma-harness/testing":"0.5.0"},"peerDependencies":{"@alma-harness/core":"^0.5.0","@alma-harness/memory":"^0.5.0"},"_npmOperationalInternal":{"tmp":"tmp/postgres_0.5.0_1788472353448_0.5193022220212777","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"name":"@alma-harness/postgres","version":"0.6.0","license":"Apache-2.0","_id":"@alma-harness/postgres@0.6.0","maintainers":[{"name":"fabiofernandescarneiro","email":"fabiofernandescarneiro@gmail.com"}],"homepage":"https://github.com/FabioFernandesCarneiro/alma#readme","bugs":{"url":"https://github.com/FabioFernandesCarneiro/alma/issues"},"dist":{"shasum":"6343c15d1a004baf59ba7493dff84af5573a1220","tarball":"https://registry.npmjs.org/@alma-harness/postgres/-/postgres-0.6.0.tgz","fileCount":6,"integrity":"sha512-xi0z3xeEogXkwHsqRF9GrYf45et6tkL1xUgKF98y4ieIqMrVsHVhu6PQbvKFQmyzRCDgGubDo2bZzbEvOaE3Gw==","signatures":[{"sig":"MEUCIE0MMbYwJaOIZOR4UotoCcflDaFNOWW02YxOqNIvFqd9AiEA1txn4nF7y9I2iXwe1QxDUGbW98vT2QLUUC3ZrzruEIA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":433682},"main":"./dist/index.js","type":"module","_from":"file:alma-harness-postgres-0.6.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"fabiofernandescarneiro","email":"fabiofernandescarneiro@gmail.com"},"_resolved":"/private/var/folders/zc/snhwcnp15dj2hk0k9_g1fh3h0000gn/T/745a185692d0af5ba949dc0db93b7c7b/alma-harness-postgres-0.6.0.tgz","_integrity":"sha512-xi0z3xeEogXkwHsqRF9GrYf45et6tkL1xUgKF98y4ieIqMrVsHVhu6PQbvKFQmyzRCDgGubDo2bZzbEvOaE3Gw==","repository":{"url":"git+https://github.com/FabioFernandesCarneiro/alma.git","type":"git","directory":"packages/postgres"},"_npmVersion":"11.18.0","description":"Reference Postgres storage adapters for Alma: SessionStore and the memory stores (episodes, profile, erasure watermarks), with row-level security keyed on {org, uid}.","directories":{},"_nodeVersion":"26.4.0","dependencies":{"pg":"^8.16.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","@types/pg":"^8.15.0","typescript":"^5.9.2","@types/node":"^24.1.0","@alma-harness/testing":"0.6.0"},"peerDependencies":{"@alma-harness/core":"^0.6.0","@alma-harness/memory":"^0.6.0","@alma-harness/execution":"^0.6.0"},"_npmOperationalInternal":{"tmp":"tmp/postgres_0.6.0_1788902326858_0.06925291550499746","host":"s3://npm-registry-packages-npm-production"}},"0.6.1":{"name":"@alma-harness/postgres","version":"0.6.1","license":"Apache-2.0","_id":"@alma-harness/postgres@0.6.1","maintainers":[{"name":"fabiofernandescarneiro","email":"fabiofernandescarneiro@gmail.com"}],"homepage":"https://github.com/FabioFernandesCarneiro/alma#readme","bugs":{"url":"https://github.com/FabioFernandesCarneiro/alma/issues"},"dist":{"shasum":"fa93b27a80380d83aab411ab5468e09d7ed6da8f","tarball":"https://registry.npmjs.org/@alma-harness/postgres/-/postgres-0.6.1.tgz","fileCount":6,"integrity":"sha512-ojML5sGC+Pb0xZDuzL7iVbQ5FB4WzU/LMyZoB1VaXMC+l/oCb7li6Th0fQPIYzu48MSdgYP9thx0Qx9fPld+8w==","signatures":[{"sig":"MEUCIQDv4KIZNTSOxl+xbihpYDJEgbTWfRzOTg3j11PREcEX8wIgLEpQTyHoOrvdbXsvaXyRIv/6TPFTZy3fEEkhIFqNz0M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":433682},"main":"./dist/index.js","type":"module","_from":"file:alma-harness-postgres-0.6.1.tgz","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"fabiofernandescarneiro","email":"fabiofernandescarneiro@gmail.com"},"_resolved":"/private/var/folders/zc/snhwcnp15dj2hk0k9_g1fh3h0000gn/T/dc0217e0e547f0af390c8657f8522cfa/alma-harness-postgres-0.6.1.tgz","_integrity":"sha512-ojML5sGC+Pb0xZDuzL7iVbQ5FB4WzU/LMyZoB1VaXMC+l/oCb7li6Th0fQPIYzu48MSdgYP9thx0Qx9fPld+8w==","repository":{"url":"git+https://github.com/FabioFernandesCarneiro/alma.git","type":"git","directory":"packages/postgres"},"_npmVersion":"11.18.0","description":"Reference Postgres storage adapters for Alma: SessionStore and the memory stores (episodes, profile, erasure watermarks), with row-level security keyed on {org, uid}.","directories":{},"_nodeVersion":"26.4.0","dependencies":{"pg":"^8.16.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","@types/pg":"^8.15.0","typescript":"^5.9.2","@types/node":"^24.1.0","@alma-harness/testing":"0.6.1"},"peerDependencies":{"@alma-harness/core":"^0.6.1","@alma-harness/memory":"^0.6.1","@alma-harness/execution":"^0.6.1"},"_npmOperationalInternal":{"tmp":"tmp/postgres_0.6.1_1788905831556_0.207323719609676","host":"s3://npm-registry-packages-npm-production"}},"0.7.0":{"name":"@alma-harness/postgres","version":"0.7.0","license":"Apache-2.0","_id":"@alma-harness/postgres@0.7.0","maintainers":[{"name":"fabiofernandescarneiro","email":"fabiofernandescarneiro@gmail.com"}],"homepage":"https://github.com/FabioFernandesCarneiro/alma#readme","bugs":{"url":"https://github.com/FabioFernandesCarneiro/alma/issues"},"dist":{"shasum":"ba4891a05fbb39decf66ac1c89cc16c00fa47fe9","tarball":"https://registry.npmjs.org/@alma-harness/postgres/-/postgres-0.7.0.tgz","fileCount":6,"integrity":"sha512-vaR2FDrzHVJjDRGMndWP0eWl+BnASVOytceml90BlDC1KtVmCnvEIw4BigDHUkvg6TOnEGYaeHEXzh7DnnEg/w==","signatures":[{"sig":"MEQCIDS+9iaICbOtZYu1m7BshkoML/oVQxSoS2p75/tVMCxWAiAE8vxewdlUv3XBD4SQIOtIQo5+Dwn1kADIpC4M5G2pNA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":406493},"main":"./dist/index.js","type":"module","_from":"file:alma-harness-postgres-0.7.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"fabiofernandescarneiro","email":"fabiofernandescarneiro@gmail.com"},"_resolved":"/private/var/folders/zc/snhwcnp15dj2hk0k9_g1fh3h0000gn/T/eee307a7b9fdefc4d321db6fac5a4905/alma-harness-postgres-0.7.0.tgz","_integrity":"sha512-vaR2FDrzHVJjDRGMndWP0eWl+BnASVOytceml90BlDC1KtVmCnvEIw4BigDHUkvg6TOnEGYaeHEXzh7DnnEg/w==","repository":{"url":"git+https://github.com/FabioFernandesCarneiro/alma.git","type":"git","directory":"packages/postgres"},"_npmVersion":"11.18.0","description":"Reference Postgres storage adapters for Alma: SessionStore and the memory stores (episodes, profile, erasure watermarks), with row-level security keyed on {org, uid}.","directories":{},"_nodeVersion":"26.4.0","dependencies":{"pg":"^8.16.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","@types/pg":"^8.15.0","typescript":"^5.9.2","@types/node":"^24.1.0","@alma-harness/testing":"0.7.0"},"peerDependencies":{"@alma-harness/core":"^0.7.0","@alma-harness/memory":"^0.7.0","@alma-harness/execution":"^0.7.0"},"_npmOperationalInternal":{"tmp":"tmp/postgres_0.7.0_1789137033917_0.504478904163361","host":"s3://npm-registry-packages-npm-production"}},"0.8.0":{"name":"@alma-harness/postgres","version":"0.8.0","license":"Apache-2.0","_id":"@alma-harness/postgres@0.8.0","maintainers":[{"name":"fabiofernandescarneiro","email":"fabiofernandescarneiro@gmail.com"}],"homepage":"https://github.com/FabioFernandesCarneiro/alma#readme","bugs":{"url":"https://github.com/FabioFernandesCarneiro/alma/issues"},"dist":{"shasum":"4ff0b1dae0e332a312b83858b891b66ec56dbe7d","tarball":"https://registry.npmjs.org/@alma-harness/postgres/-/postgres-0.8.0.tgz","fileCount":6,"integrity":"sha512-d96rMYg9tH/jdkToZnAi4gft+8iL/bZov6tvU3eYZLiNP5IgB44Lq6kr5ENn/Zww1l5lLRe53KUSATsHdaAPOQ==","signatures":[{"sig":"MEQCIAVIm1PIYGn4urMozrb8XO0ez5HAzEWPJWVF9X2rZRlDAiBPSFaaK5vxgt00M/t6NUotEBlkbuVmHE6DavzOCt90kQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":406493},"main":"./dist/index.js","type":"module","_from":"file:alma-harness-postgres-0.8.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"fabiofernandescarneiro","email":"fabiofernandescarneiro@gmail.com"},"_resolved":"/private/var/folders/zc/snhwcnp15dj2hk0k9_g1fh3h0000gn/T/bc37445d0265f2ed80b7f3cb2849f4f7/alma-harness-postgres-0.8.0.tgz","_integrity":"sha512-d96rMYg9tH/jdkToZnAi4gft+8iL/bZov6tvU3eYZLiNP5IgB44Lq6kr5ENn/Zww1l5lLRe53KUSATsHdaAPOQ==","repository":{"url":"git+https://github.com/FabioFernandesCarneiro/alma.git","type":"git","directory":"packages/postgres"},"_npmVersion":"11.18.0","description":"Reference Postgres storage adapters for Alma: SessionStore and the memory stores (episodes, profile, erasure watermarks), with row-level security keyed on {org, uid}.","directories":{},"_nodeVersion":"26.4.0","dependencies":{"pg":"^8.16.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","@types/pg":"^8.15.0","typescript":"^5.9.2","@types/node":"^24.1.0","@alma-harness/testing":"0.8.0"},"peerDependencies":{"@alma-harness/core":"^0.8.0","@alma-harness/memory":"^0.8.0","@alma-harness/execution":"^0.8.0"},"_npmOperationalInternal":{"tmp":"tmp/postgres_0.8.0_1789155222774_0.010816841562977242","host":"s3://npm-registry-packages-npm-production"}},"0.9.0":{"name":"@alma-harness/postgres","version":"0.9.0","license":"Apache-2.0","_id":"@alma-harness/postgres@0.9.0","maintainers":[{"name":"fabiofernandescarneiro","email":"fabiofernandescarneiro@gmail.com"}],"homepage":"https://github.com/FabioFernandesCarneiro/alma#readme","bugs":{"url":"https://github.com/FabioFernandesCarneiro/alma/issues"},"dist":{"shasum":"1463c715f3438259654ec17e20a0b7da07ad0c1c","tarball":"https://registry.npmjs.org/@alma-harness/postgres/-/postgres-0.9.0.tgz","fileCount":6,"integrity":"sha512-820wJcdX43kgY8OMAXQZ/AHE+PylzMXD2qiax7FPFhv7VUlzIRxWHINyFervZSf2nr3uw7Rv/mH+ztBfmzR1pQ==","signatures":[{"sig":"MEYCIQCkNt83D/bkMcRlfSLrjkqhJM5Jtm40Eev2u6+TxIIiqAIhAPPCXIeS1v4xpx8MRnFuiyA42DTcA1ufkLkdkE+5Ma2E","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQDhKF7+XGxOwatRG7Bq8zBTMc544mCg0ce3WJC/BCnoDQIhAPwO2BNozw04XyBZQlvAdMc8pJ+8XlTZaYhIKKD7lYd6","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":406493},"main":"./dist/index.js","type":"module","_from":"file:alma-harness-postgres-0.9.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"fabiofernandescarneiro","email":"fabiofernandescarneiro@gmail.com"},"_resolved":"/private/var/folders/zc/snhwcnp15dj2hk0k9_g1fh3h0000gn/T/579c8eb53dc238423f8230aa3802e784/alma-harness-postgres-0.9.0.tgz","_integrity":"sha512-820wJcdX43kgY8OMAXQZ/AHE+PylzMXD2qiax7FPFhv7VUlzIRxWHINyFervZSf2nr3uw7Rv/mH+ztBfmzR1pQ==","repository":{"url":"git+https://github.com/FabioFernandesCarneiro/alma.git","type":"git","directory":"packages/postgres"},"_npmVersion":"11.18.0","description":"Reference Postgres storage adapters for Alma: SessionStore and the memory stores (episodes, profile, erasure watermarks), with row-level security keyed on {org, uid}.","directories":{},"_nodeVersion":"26.4.0","dependencies":{"pg":"^8.16.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","@types/pg":"^8.15.0","typescript":"^5.9.2","@types/node":"^24.1.0","@alma-harness/testing":"0.9.0"},"peerDependencies":{"@alma-harness/core":"^0.9.0","@alma-harness/memory":"^0.9.0","@alma-harness/execution":"^0.9.0"},"_npmOperationalInternal":{"tmp":"tmp/postgres_0.9.0_1789655923222_0.43999610846340076","host":"s3://npm-registry-packages-npm-production"}},"0.10.0":{"name":"@alma-harness/postgres","version":"0.10.0","license":"Apache-2.0","_id":"@alma-harness/postgres@0.10.0","maintainers":[{"name":"fabiofernandescarneiro","email":"fabiofernandescarneiro@gmail.com"}],"homepage":"https://github.com/FabioFernandesCarneiro/alma#readme","bugs":{"url":"https://github.com/FabioFernandesCarneiro/alma/issues"},"dist":{"shasum":"f6a205351643d416d6c305f08d9891ef9d09c2bd","tarball":"https://registry.npmjs.org/@alma-harness/postgres/-/postgres-0.10.0.tgz","fileCount":6,"integrity":"sha512-gD/KA2ix5F5xNjlbz6XAP8B+4xrdSxqHlN8oysF4Ll7ewo/SbpoVUekmpHNWNwHOYpsafV5RpNBgM3qh2z5SRg==","signatures":[{"sig":"MEQCIDZpy0OYVYX1D0cuzIh+U35o1eNsnRyRK0MJ0CLt7EGlAiBIk+PvtjdMjrIBIjEMD0RlzsKw0Je8HC36KUWwNADyLg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQCtUEyDGwEN7sHACxT/A5m+hJEw1vnC6AYqlu2EL6rD9AIgdmHbklpbS24N8joj/mZzwAi1l0eNTIvuCFj/wuJcGD0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":408877},"main":"./dist/index.js","type":"module","_from":"file:alma-harness-postgres-0.10.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"fabiofernandescarneiro","email":"fabiofernandescarneiro@gmail.com"},"_resolved":"/private/var/folders/zc/snhwcnp15dj2hk0k9_g1fh3h0000gn/T/c7c7b24d045f412c9d0035b9dfbe7bc3/alma-harness-postgres-0.10.0.tgz","_integrity":"sha512-gD/KA2ix5F5xNjlbz6XAP8B+4xrdSxqHlN8oysF4Ll7ewo/SbpoVUekmpHNWNwHOYpsafV5RpNBgM3qh2z5SRg==","repository":{"url":"git+https://github.com/FabioFernandesCarneiro/alma.git","type":"git","directory":"packages/postgres"},"_npmVersion":"11.18.0","description":"Reference Postgres storage adapters for Alma: SessionStore and the memory stores (episodes, profile, erasure watermarks), with row-level security keyed on {org, uid}.","directories":{},"_nodeVersion":"26.4.0","dependencies":{"pg":"^8.16.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","@types/pg":"^8.15.0","typescript":"^5.9.2","@types/node":"^24.1.0","@alma-harness/testing":"0.10.0"},"peerDependencies":{"@alma-harness/core":"^0.10.0","@alma-harness/memory":"^0.10.0","@alma-harness/execution":"^0.10.0"},"_npmOperationalInternal":{"tmp":"tmp/postgres_0.10.0_1789675508321_0.6119572623802552","host":"s3://npm-registry-packages-npm-production"}},"0.10.1":{"_id":"@alma-harness/postgres@0.10.1","bugs":{"url":"https://github.com/FabioFernandesCarneiro/alma/issues"},"dist":{"shasum":"a873be4a8e3bdcdcff5b5ebb51414a8db0ae8045","tarball":"https://registry.npmjs.org/@alma-harness/postgres/-/postgres-0.10.1.tgz","fileCount":6,"integrity":"sha512-1xtRAnYWSIbmjGYoaQIUJdQHsSg95sqKwyGPYQGz+vetxvSoAGBx6M+BMX5B2U4uiabIlFhA6U4V19yguoRyHg==","signatures":[{"sig":"MEUCIGH8a3fiss3irug8N5eT7KqDei50RkBqi3rplO9sHbodAiEAn4XsDf9PZv51zOCyAGVcvvurduzYgCnf1n2xBeZU3NI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIC4pfazOKFDeEpzcHR4GcHHWSej1f2F+FmzlhROgEOSEAiAZmI/nO3Ox//3sb6adG3mzQq4gk4lu0iug1crMIPxR3A=="}],"unpackedSize":408877},"main":"./dist/index.js","name":"@alma-harness/postgres","type":"module","_from":"file:alma-harness-postgres-0.10.1.tgz","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"license":"Apache-2.0","scripts":{"test":"vitest run","build":"tsup","typecheck":"tsc --noEmit"},"version":"0.10.1","_npmUser":{"name":"fabiofernandescarneiro","email":"fabiofernandescarneiro@gmail.com"},"homepage":"https://github.com/FabioFernandesCarneiro/alma#readme","_resolved":"/private/var/folders/zc/snhwcnp15dj2hk0k9_g1fh3h0000gn/T/cb1151122ac6067d92325edb182b186b/alma-harness-postgres-0.10.1.tgz","_integrity":"sha512-1xtRAnYWSIbmjGYoaQIUJdQHsSg95sqKwyGPYQGz+vetxvSoAGBx6M+BMX5B2U4uiabIlFhA6U4V19yguoRyHg==","repository":{"url":"git+https://github.com/FabioFernandesCarneiro/alma.git","type":"git","directory":"packages/postgres"},"_npmVersion":"11.18.0","description":"Reference Postgres storage adapters for Alma: SessionStore and the memory stores (episodes, profile, erasure watermarks), with row-level security keyed on {org, uid}.","directories":{},"maintainers":[{"name":"fabiofernandescarneiro","email":"fabiofernandescarneiro@gmail.com"}],"_nodeVersion":"26.4.0","dependencies":{"pg":"^8.16.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","@types/pg":"^8.15.0","typescript":"^5.9.2","@types/node":"^24.1.0","@alma-harness/testing":"0.10.1"},"peerDependencies":{"@alma-harness/core":"^0.10.1","@alma-harness/memory":"^0.10.1","@alma-harness/execution":"^0.10.1"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/postgres_0.10.1_1789680447884_0.8261265062724925"}}},"time":{"created":"2026-08-31T21:23:20.402Z","modified":"2026-09-17T21:27:28.162Z","0.1.0":"2026-08-31T21:23:20.819Z","0.2.0":"2026-09-03T14:42:34.402Z","0.3.0":"2026-09-03T17:14:06.763Z","0.4.0":"2026-09-03T19:01:51.991Z","0.5.0":"2026-09-03T21:52:33.593Z","0.6.0":"2026-09-08T21:18:47.012Z","0.6.1":"2026-09-08T22:17:11.690Z","0.7.0":"2026-09-11T14:30:34.059Z","0.8.0":"2026-09-11T19:33:42.930Z","0.9.0":"2026-09-17T14:38:43.313Z","0.10.0":"2026-09-17T20:05:08.441Z","0.10.1":"2026-09-17T21:27:28.009Z"},"bugs":{"url":"https://github.com/FabioFernandesCarneiro/alma/issues"},"license":"Apache-2.0","homepage":"https://github.com/FabioFernandesCarneiro/alma#readme","repository":{"url":"git+https://github.com/FabioFernandesCarneiro/alma.git","type":"git","directory":"packages/postgres"},"description":"Reference Postgres storage adapters for Alma: SessionStore and the memory stores (episodes, profile, erasure watermarks), with row-level security keyed on {org, uid}.","maintainers":[{"name":"fabiofernandescarneiro","email":"fabiofernandescarneiro@gmail.com"}],"readme":"# @alma-harness/postgres\n\nReference storage adapters for [Alma](https://github.com/FabioFernandesCarneiro/alma),\nwith row-level security as defense in depth.\n\n> **Status: pre-1.0.** The API is still moving; see the\n> [roadmap](../../docs/architecture.md#12-adoption-roadmap) for where it stands.\n\n## What it owns\n\n- `PostgresSessionStore` — the conversation log.\n- `PostgresEpisodeStore`, `PostgresProfileStore`, `PostgresErasureWatermarks` —\n  the memory tiers.\n- `PostgresSpendStore` — the persistent budget counters (spec: spend-store).\n  The tenant-day counter is org-keyed, so its RLS policy is org-only; the app\n  role gets no delete on either counter — spend survives scoped purge as a\n  financial record.\n- `PostgresLegacyTurnClaims` — erase-only cleanup of replies retained by older\n  deployments. Wire it as `createMemoryErasure({ turns })` while any historical\n  claims exist. It validates scope, compares session identity exactly and leaves\n  leases untouched. It cannot acquire, claim, complete, read replies or provision\n  tables. Missing tables/permissions fail rather than report successful erasure.\n  Existing schema grants and app-role membership are deployment prerequisites.\n  `purgeTurnClaimsBefore` and `purgeExpiredLeases` remain explicit historical\n  retention functions under the separate retention role, in bounded batches.\n  Quiesce old writers before cleanup; removing an SDK does not stop old processes.\n- `PostgresAuditLog` — the five audit trails (spec 038), written synchronously\n  and with no buffering wrapper: a buffered sink that loses its buffer on a\n  crash stops writing silently, which is the failure `AuditSinkError` was typed\n  to catch. Five tables rather than one `jsonb` bag, so \"metadata only, never\n  content\" is a column a reviewer can audit. The app role gets `select, insert`\n  and NOT `delete`/`update` — an audit row that can be edited is not one.\n  Legacy writes remain write-only. Settled costs have the scoped read surface below.\n- `purgeAuditBefore` — time-based retention, per family (spec 039). It assumes\n  the `alma_retention` role, which the migration creates and grants `select,\n  delete` on the audit tables, with matching RLS policies. That role exists\n  because the app role deliberately cannot delete: **erasure may not remove an\n  audit row; retention may, and they are different actors.** Running the sweep\n  on a raw pool instead looked correct in dev and deleted nothing in any\n  deployment not connected as a superuser — FORCE ROW LEVEL SECURITY subjects\n  even the table owner to the predicate.\n- `migrateSessionStore`, `migrateMemoryStores`, `migrateSpendStore`,\n  `migrateRoutineRunStore`, `migrateRoutineStore`,\n  `migrateAuditLog` —\n  idempotent migrations; running them is the product's choice, typically at\n  startup.\n\n- `PostgresRoutineRunStore` — routine runs as metadata (spec:\n  postgres-routine-runs): the same fire again, today's count for the ceiling,\n  the last delivery's hash for the dedupe, durable across processes. Atomic\n  `claim` arbitrates execution and submitted-batch collection under RLS. The app\n  role gets no delete — a run record is retained like a trail — and\n  `purgeRoutineRunsBefore` sweeps completed runs by age as the retention role,\n  preserving unresolved `running` and `submitted` records. The migration\n  upgrades the outcome constraint on existing tables. See the\n  [upgrade and recovery notes](../schedule/README.md#claims-and-recovery).\n- `PostgresRoutineStore` — the routines themselves (spec: clock-tick), as\n  `jsonb` under the shared policy; `list` runs as `alma_scheduler`, the\n  role the tick assumes to read every scope, created by the migration.\n  Grant it to the login the tick connects as, like the other two roles.\n\nEvery operation runs inside a transaction that assumes a dedicated\nnon-superuser role and binds `alma.org` / `alma.uid` as transaction-local\nsettings, which the RLS policies compare against. Application-level scoping is\nthe first layer; this is the second, so a forgotten `WHERE` cannot leak across\ntenants.\n\n## Before the first non-superuser connection\n\n`SET LOCAL ROLE alma_app` admits only roles the connection's login is a\nmember of, and no migration grants that membership — it cannot know which\nlogin you connect as. Once, as a role that may grant (the migrations'\nsuperuser will do):\n\n```ts\nawait grantRole(pool, { to: \"svc_myproduct\" });                  // alma_app\nawait grantRole(pool, { role: \"alma_retention\", to: \"svc_ops\" }); // the sweeps, if a different login\n```\n\nRe-granting is a no-op, so a product may run it at every startup. Without it\nthe first least-privilege deployment fails every call with `permission denied\nto set role` — fail-closed, and a surprise the superuser-connected test suites\ncannot see (spec: erasure-reaches-the-claims).\n\n```ts\nimport { migrateMemoryStores, PostgresEpisodeStore } from \"@alma-harness/postgres\";\n\nawait migrateMemoryStores(pool);\nconst episodes = new PostgresEpisodeStore(pool);\n```\n\nBoth accept `statementTimeoutMs` (default 30s) and `role` — a query shaped by\nmodel-supplied input needs a ceiling that does not depend on the caller\nremembering one.\n\n## What it must never do\n\n- Rank in SQL. Adapters filter *candidates* — a superset of what the tokenizer\n  matches — and hand them to the shared ranker in `@alma-harness/memory`, so\n  every backend orders results identically.\n- Depend on the database's collation for correctness: case folding happens in\n  the adapter, because `ilike` under `lc_ctype=C` folds ASCII only.\n- Reinterpret a contract. It proves itself against the shared suites in\n  `@alma-harness/testing`, run against a real Postgres 17 — which is why\n  `pnpm check:all` refuses to pass without a `DATABASE_URL` (spec 031).\n\nRoutine warning metadata uses `alma_routine_runs.caps_crossed`. Rerun\n`migrateRoutineRunStore` before deploying the financial-warning-policy packages;\nexisting records are preserved, and absent/empty warnings read as absent.\nScope, claims and unresolved-run retention keep their existing contracts.\n\n## Idempotent cost settlement\n\nRun `migrateCostSettlementStore(pool)` before constructing\n`PostgresCostSettlementStore(pool)`. The migration includes audit/spend schema\nsetup and additively extends `alma_audit_cost`; legacy rows retain no settlement\nID and are excluded from the new reads. Grant `alma_app` to the service login\nas described above. Governed runners use this writer explicitly.\n\nA settlement transaction increments session and UTC org-day totals once, inserts\nan immutable receipt, and queues each named projection consumer. After an\nuncertain commit, retry the identical settlement only. Changed input raises\n`SettlementConflictError`. The host must persist identity before provider\ndispatch and preserve priced usage for recovery; these execution contracts are\nnot implemented by this storage adapter. Never also call `AuditLog.cost` or\n`SpendStore.add` for the same charge.\n\n`pending(scope, consumer)` returns full receipts, at most 100 per call. Apply\nidempotently by scope/settlement ID, then call `acknowledge(scope, consumer, id)`.\nOnly configure consumers the host can drain; an empty list creates no obligations.\nThe app role can delete pending rows but cannot update/delete financial receipts.\nRetention skips pending receipts and continues other audit families; its role\nhas SELECT only on pending work. The composite foreign key also prevents raw\nretention SQL from removing unresolved work. Stop retries before receipt expiry.\n\nOn a large populated database, the migration needs a maintenance window: ordinary\nindex builds block cost inserts. Alternatively, before migration add the nullable\nsettlement columns, then prebuild the six identically named/defined indexes\nlisted in `costSettlementStoreMigrationSql` using `CREATE [UNIQUE] INDEX\nCONCURRENTLY` outside a transaction. Apply the remaining migration in a short\nmaintenance window for constraints/permissions. This delivery performs no\nproduction migration or deployment.\n\nThe JSON financial extension has DB key/shape checks; callers cannot add prompt\nor response fields. Typed legacy cost/tier/cache/warning columns are populated\nas well. `turn_id` stays null: operation identity is distinct and lives in the\nclosed receipt. The DB checks shape/content surfaces; the adapter enforces value\nvalidity too. Direct SQL receipt writes are unsupported. Reads fail explicitly\non a corrupt receipt rather than silently omitting financial data; reconcile\nsuch corruption through an operator. `list` filters occurrence, operation, model\nand priced tier using indexes.\nIt is not a projection cursor: late historical settlements remain visible through\n`pending`, which has no high-water offset.\n\n## Durable execution journal\n\n`migrateExecutionStore(pool)` adds `alma_executions`; `PostgresExecutionStore(pool)`\nimplements `ExecutionStore` with the standard role/scope/timeout options. Migration\nis additive/idempotent and grants select/insert/update, never delete. A recursive\nSQL shape check excludes arbitrary content even inside price bands and usage;\nread-time core normalization rejects corrupt values. Grant `alma_app` membership\nto the application login using `grantRole`, as for other scoped stores.\n\nClaims serialize through scoped unique identities. Mutation clocks are read after\nrow locks; bounded expiry sweeps use SKIP LOCKED. A lost commit acknowledgement is\nan uncertain result, not permission to dispatch again: read the record or replay\nthe same immutable claim/evidence. Recovery cannot dispatch. Paginated `list` is\nobservational, not a notification delivery cursor.\n\nExisting session erasure and audit/turn retention leave this content-free journal\nintact. There is no journal retention or production backfill in this migration.\nGoverned runners use this journal. Future state extensions require\nupgrading readers before writers; old readers reject unknown states.\n\n## Documentation\n\n[Docs index](../../docs/README.md) · [Invariants §1](../../docs/invariants.md)\n· [Session store spec](../../docs/specs/001-postgres-session-store.md)\n· [Memory storage spec](../../docs/specs/011-memory-storage.md)\n\nApache-2.0\n\n### Scoped execution results (spec 081)\n\nRun `migrateExecutionResultStore(pool)` with the migration principal and grant the\napplication login the configured RLS role. Construct\n`new PostgresExecutionResultStore(pool, { maxSensitivity: \"personal\", maxRetentionMs: 60000, maxChars: 10000 })`.\nThe two tables `alma_result_scopes` and `alma_execution_results` force org/user RLS;\nthe app receives SELECT/INSERT/UPDATE, no DELETE or global retention grant.\n\nEvery operation locks an exact scope guard, including first preparation and empty\nscope erasure. Reads also take that lock because they can physically expire content.\nUnknown reads may create scope metadata. Clock sampling occurs after locking;\nexpiry nulling commits even when a conflicting prepare is rejected. `erase` clears\npending and available rows, including expired unswept content, without deleting\nmetadata. The host schedules bounded `purgeExpired` calls from its tenant/user\ninventory; tombstones and scope metadata remain indefinitely. Neither migration nor\nstore changes financial or execution journals. Erasure cannot revoke input already\nread by a host or provider, and the host must audit its erasure composition.\n\n## Durable usage inbox\n\nInstall the new `@alma-harness/execution` peer and run `migrateUsageInbox(pool)`.\n`PostgresUsageInbox(pool, opts?)` uses standard role/scope/timeout settings. Journal\nand inbox migrations emit the same shared shape validator and work in either order.\nImmutable `alma_usage_inbox` rows allow app SELECT/INSERT only. A separate scoped\npending table permits DELETE for acknowledgement, with its receipt timestamp bound\nby FK. Both tables force RLS. Winner-only pending insertion and exact replay\nresolve lost commit acknowledgements without reviving already acknowledged work.\n\n`list` retains acknowledged history; `listPending` selects work. Both use bounded\nexclusive `(receivedAt,id)` pages; restart every pass to catch late commits.\nOne logical consumer owns recovery and acknowledgements. Compare full journal\nbinding and persist recovery/disposition before acknowledgement; no subscriber\nfan-out, automatic settlement or redispatch. Session/result erasure and retention\ndo not remove inbox metadata. See the [execution package](../execution/README.md).\n\n## Governed financial receipts\n\nRun `migrateGovernedCostSettlementStore(pool)` before using `settleGoverned`,\n`getGoverned`, `listGoverned` or `pendingGoverned` on `PostgresCostSettlementStore`.\nThe migration also updates the ordinary settlement schema. Upgrading ordinary\nsettlement code requires rerunning `migrateCostSettlementStore` for its mode flag.\nThe existing payload CHECK is unchanged; an immutable FORCE-RLS extension stores\nclosed request/decision metadata. Application grants are SELECT/INSERT only.\n\nOne transaction locks session then org-day counters, captures actual previous\namounts, and commits increments, cost, decisions and pending work. One governed\noperation/call has one receipt. Cross-mode or identity/policy reuse conflicts and\nrolls back; replay preserves original decisions. `capsCrossed` remains warn-only.\nBlock evidence never throws a monetary stop from this store. No provider is called.\n\nThe ordinary retention path skips governed costs indefinitely, even after their\nprojections are acknowledged. Other eligible costs and audit families still expire.\nProduct erasure cannot reset these receipts. Use the original occurrence time and\npolicy for recovery, and never charge through both accounting writers. Governed runners and operation accounting are separate packages.\n\nGoverned financial connections require PostgreSQL float round-trip output\n(`extra_float_digits >= 1`, the PostgreSQL 12+ default); rounded float text can\nfail exact financial consistency checks. Preserve this setting in role/pool options.\n\nGoverned journal upgrades require **both** `migrateExecutionStore` and\n`migrateUsageInbox` before new writers. They bind CHECKs to the versioned v2 shape\nfunction, so replaying older startup SQL cannot downgrade governed input checks.\nRun these locking migrations in a maintenance window; upgrade strict readers first.\nSettled/completed metadata survives erasure, but historical success cannot restore\nexpired result content. Completion and financial settlement remain separate,\nidempotently recoverable transactions. The journal never increments costs itself.\n\nGoverned single-call adoption adds optional operation/attempt/call columns to the\nrouting and access trails through migrateAuditLog. Existing rows remain readable\nwith null correlation. Run this migration with the other governed stores before\nusing the matching single-call runner and audit adapter.\n\nTemperature controls use the v2 structural check over a projection excluding only\nthat new key, plus a numeric `0..2` check. Old migration replay remains compatible;\nold application readers do not. Deploy matching readers before temperature writers\n(spec: explicit-temperature-controls).\n\nOperation lineage is available separately in `@alma-harness/postgres-execution`;\nit reuses the exported `inScope`, `resolveRlsRole` and `resolveStatementTimeout`\nhelpers (spec: durable-operation-lineage).\n\nMigrations pin SQL function dependencies to `pg_catalog, installation_schema, pg_temp`\n(spec: restore-safe-sql-functions). Select the trusted installation schema first\non migration connections; do not grant runtime CREATE there. Function rights stay\ninvoker and pg_dump preserves the path. Rerun current migrations before backup;\nfrozen old startup SQL can replace definitions and remove this configuration.\n\nRerun execution/inbox migrations for attested context rejection; deploy matching readers first (spec: safe-context-rejection-rotation). Old SQL replay retains the stricter checks.\n\n## Retired turn coordination\n\nFresh hosts use the canonical runtime and never create `alma_turn_claims` or\n`alma_turn_leases`. The old constructor and migration exports are removed. Existing\nSQL data is not dropped or rewritten. Mixed deployments must retain the historical\ncleanup adapter and `turnRecords: \"claims\"` posture until their content is gone;\nonly hosts without historical claims may declare `turnRecords: \"none\"`.\nNo role membership or execution authority is created by cleanup. Spend, financial\nreceipts, journals and audit stores remain separate retained surfaces.\n\nTool-choice writers require matching readers and rerunning **both**\n`migrateExecutionStore` and `migrateUsageInbox` first (spec: governed-tool-choice).\nThe upgrade preserves old records without the optional field. A separate versioned\nSQL helper checks the closed choice and bounded client-tool name; existing v2\nshape and rejection helpers retain their contracts. Current CHECKs survive replay\nof earlier startup SQL in either migration order. Old application binaries reject\nnew-field records, so deploy readers before enabling writers. Apply the locking\nCHECK upgrade in a maintenance window for populated tables. This does not grant\nexecution authority, change RLS or persist response content in the journal/inbox.\n","readmeFilename":"README.md"}