{"_id":"@durable-streams/state","_rev":"20-8c496bba12f2f7257d3c01dc4bee5515","name":"@durable-streams/state","dist-tags":{"latest":"0.3.2"},"versions":{"0.1.0":{"name":"@durable-streams/state","version":"0.1.0","author":{"name":"Durable Stream contributors"},"license":"Apache-2.0","_id":"@durable-streams/state@0.1.0","maintainers":[{"name":"kylemathews","email":"mathews.kyle@gmail.com"}],"dist":{"shasum":"f5d37d55d62f1244686859968871e383841f7c69","tarball":"https://registry.npmjs.org/@durable-streams/state/-/state-0.1.0.tgz","fileCount":12,"integrity":"sha512-Npii3TfPAUYADue6uT2HaJcXERinn0KAja/eZseAbFjwMZKe/Gfd+pK8bomc2uApg8tu45F8cocXrjNKmDqZ4Q==","signatures":[{"sig":"MEUCIBW89zjZyTNrRsmxKXD8BTUqznryiNsI2KcQDsbro6ylAiEAqPbzG0hSiGP7PDHKPl7aDdq4pvhoAgGIgqhK/wcDMF8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":124973},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"gitHead":"8af2a6a4bde51f3bf929b59cd11d403dbca5c704","scripts":{"dev":"tsdown --watch","build":"tsdown","typecheck":"tsc --noEmit"},"_npmUser":{"name":"kylemathews","email":"mathews.kyle@gmail.com"},"_npmVersion":"8.9.0","description":"State change event protocol for Durable Streams","directories":{},"sideEffects":false,"_nodeVersion":"22.13.1","dependencies":{"@tanstack/db":"latest","@standard-schema/spec":"^1.0.0","@durable-streams/client":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.9.0","@durable-streams/server":"workspace:*"},"_npmOperationalInternal":{"tmp":"tmp/state_0.1.0_1766512183031_0.5314051574780909","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@durable-streams/state","version":"0.1.1","keywords":["durable-streams","state","protocol","typescript"],"author":{"name":"Durable Stream contributors"},"license":"Apache-2.0","_id":"@durable-streams/state@0.1.1","maintainers":[{"name":"kylemathews","email":"mathews.kyle@gmail.com"}],"homepage":"https://github.com/durable-streams/durable-streams#readme","bugs":{"url":"https://github.com/durable-streams/durable-streams/issues"},"dist":{"shasum":"524344383d0682b6a3a5446b3b133acafa5f16cb","tarball":"https://registry.npmjs.org/@durable-streams/state/-/state-0.1.1.tgz","fileCount":13,"integrity":"sha512-aOfverk1AOtjt8ILM5BFvPqeUaOqgzJ6dmLALDQsWtiiJvDFFMHuQbu3e41kkKB6+chg7rJs8/17oqxDBrVGMA==","signatures":[{"sig":"MEUCIQChXmC96f95fBFaUljhhIPR6g4QhAV+MA2l3e3XcgCmLwIgQvdwRD6Fv8cqoTs5DSBDndRp7DGQRdOs6zGAsO7qvSg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@durable-streams%2fstate@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":126358},"main":"./dist/index.cjs","type":"module","_from":"file:durable-streams-state-0.1.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"scripts":{"dev":"tsdown --watch","build":"tsdown","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4df7e61d-88c4-493a-b591-e008c207e11b"}},"_resolved":"/tmp/c92ef526f43acca51290713c944aed82/durable-streams-state-0.1.1.tgz","_integrity":"sha512-aOfverk1AOtjt8ILM5BFvPqeUaOqgzJ6dmLALDQsWtiiJvDFFMHuQbu3e41kkKB6+chg7rJs8/17oqxDBrVGMA==","repository":{"url":"git+https://github.com/durable-streams/durable-streams.git","type":"git","directory":"packages/state"},"_npmVersion":"11.7.0","description":"State change event protocol for Durable Streams","directories":{},"sideEffects":false,"_nodeVersion":"22.21.1","dependencies":{"@tanstack/db":"latest","@standard-schema/spec":"^1.0.0","@durable-streams/client":"0.1.1"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.9.0","@durable-streams/server":"0.1.1"},"_npmOperationalInternal":{"tmp":"tmp/state_0.1.1_1766545297292_0.4291387190814997","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@durable-streams/state","version":"0.1.2","keywords":["durable-streams","state","protocol","typescript"],"author":{"name":"Durable Stream contributors"},"license":"Apache-2.0","_id":"@durable-streams/state@0.1.2","maintainers":[{"name":"kylemathews","email":"mathews.kyle@gmail.com"}],"homepage":"https://github.com/durable-streams/durable-streams#readme","bugs":{"url":"https://github.com/durable-streams/durable-streams/issues"},"dist":{"shasum":"66d83410559bc29b95e8ffc8cc0f5e1beb2efaf4","tarball":"https://registry.npmjs.org/@durable-streams/state/-/state-0.1.2.tgz","fileCount":13,"integrity":"sha512-fLyBx7v48+9EkbXG8uvjNrJKn97+Mx7rzcItMcyOpVLsPAn/HfUgRailw6DpPN/lw+4PQPQ4jsCasGs25aRqtA==","signatures":[{"sig":"MEUCICs800dvu1p0W+J9gPqa77FH/27vQGpW72rR64eRNvLAAiEAsiFGwHVaAzDrEhpwnM5gso4g90oih1yAdb3GQ4SM9UM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@durable-streams%2fstate@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":126358},"main":"./dist/index.cjs","type":"module","_from":"file:durable-streams-state-0.1.2.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"scripts":{"dev":"tsdown --watch","build":"tsdown","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4df7e61d-88c4-493a-b591-e008c207e11b"}},"_resolved":"/tmp/e050de48d0a76a2b13c6d3a092e9f843/durable-streams-state-0.1.2.tgz","_integrity":"sha512-fLyBx7v48+9EkbXG8uvjNrJKn97+Mx7rzcItMcyOpVLsPAn/HfUgRailw6DpPN/lw+4PQPQ4jsCasGs25aRqtA==","repository":{"url":"git+https://github.com/durable-streams/durable-streams.git","type":"git","directory":"packages/state"},"_npmVersion":"11.7.0","description":"State change event protocol for Durable Streams","directories":{},"sideEffects":false,"_nodeVersion":"22.21.1","dependencies":{"@tanstack/db":"latest","@standard-schema/spec":"^1.0.0","@durable-streams/client":"0.1.2"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.9.0","@durable-streams/server":"0.1.2"},"_npmOperationalInternal":{"tmp":"tmp/state_0.1.2_1766546926310_0.9152325750958032","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@durable-streams/state","version":"0.1.3","keywords":["durable-streams","state","protocol","typescript"],"author":{"name":"Durable Stream contributors"},"license":"Apache-2.0","_id":"@durable-streams/state@0.1.3","maintainers":[{"name":"kylemathews","email":"mathews.kyle@gmail.com"}],"homepage":"https://github.com/durable-streams/durable-streams#readme","bugs":{"url":"https://github.com/durable-streams/durable-streams/issues"},"dist":{"shasum":"981cad6c15499376e6f34f239d4c3cc5fac7bb62","tarball":"https://registry.npmjs.org/@durable-streams/state/-/state-0.1.3.tgz","fileCount":13,"integrity":"sha512-4+VdKq99J3OoQD2KBkM4Vfc/+mm9dX0x9ci9v70/K3rB0U0ezKlXzwkFLhnktIi9dxVLWlTXgajQVB7mEMBvMg==","signatures":[{"sig":"MEUCIAiDqrye1/2IcvhEUdbvqON4/KBAETauaDgRZLVkXiHOAiEAt3461u1PjFyLNgZgaIjAodUI3eyDP6/0fI5sEdMOwNg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@durable-streams%2fstate@0.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":126429},"main":"./dist/index.cjs","type":"module","_from":"file:durable-streams-state-0.1.3.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"scripts":{"dev":"tsdown --watch","build":"tsdown","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4df7e61d-88c4-493a-b591-e008c207e11b"}},"_resolved":"/tmp/45625f731038c14168bd2b7ab1dd3bd2/durable-streams-state-0.1.3.tgz","_integrity":"sha512-4+VdKq99J3OoQD2KBkM4Vfc/+mm9dX0x9ci9v70/K3rB0U0ezKlXzwkFLhnktIi9dxVLWlTXgajQVB7mEMBvMg==","repository":{"url":"git+https://github.com/durable-streams/durable-streams.git","type":"git","directory":"packages/state"},"_npmVersion":"11.7.0","description":"State change event protocol for Durable Streams","directories":{},"sideEffects":false,"_nodeVersion":"22.21.1","dependencies":{"@tanstack/db":"latest","@standard-schema/spec":"^1.0.0","@durable-streams/client":"0.1.3"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.9.0","@durable-streams/server":"0.1.4"},"_npmOperationalInternal":{"tmp":"tmp/state_0.1.3_1767795608783_0.5144864950325474","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@durable-streams/state","version":"0.1.4","keywords":["durable-streams","state","protocol","typescript"],"author":{"name":"Durable Stream contributors"},"license":"Apache-2.0","_id":"@durable-streams/state@0.1.4","maintainers":[{"name":"kylemathews","email":"mathews.kyle@gmail.com"}],"homepage":"https://github.com/durable-streams/durable-streams#readme","bugs":{"url":"https://github.com/durable-streams/durable-streams/issues"},"dist":{"shasum":"41726f1e92d32c5ccbfbf696b13dea39b794084d","tarball":"https://registry.npmjs.org/@durable-streams/state/-/state-0.1.4.tgz","fileCount":13,"integrity":"sha512-pGjcckbfSIdfvStHLAWES4Fx/3XXBGSL+Kl1ahmKCyjSKtOBxbUSvIyjZTldAA3K5BBMKlznXeFN29V/5Nj8wA==","signatures":[{"sig":"MEYCIQDzkz2SFaMtsbJO/AQkEBY6242YdlOc/d2H/oknTZDnmAIhAOc3AIxztXq9148OGyWqqXSp9dPy4Mom1OxWxbcdULaC","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@durable-streams%2fstate@0.1.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":126429},"main":"./dist/index.cjs","type":"module","_from":"file:durable-streams-state-0.1.4.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"scripts":{"dev":"tsdown --watch","build":"tsdown","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4df7e61d-88c4-493a-b591-e008c207e11b"}},"_resolved":"/tmp/28988cdf37a4d292e5e5ebf4ca101df0/durable-streams-state-0.1.4.tgz","_integrity":"sha512-pGjcckbfSIdfvStHLAWES4Fx/3XXBGSL+Kl1ahmKCyjSKtOBxbUSvIyjZTldAA3K5BBMKlznXeFN29V/5Nj8wA==","repository":{"url":"git+https://github.com/durable-streams/durable-streams.git","type":"git","directory":"packages/state"},"_npmVersion":"11.7.0","description":"State change event protocol for Durable Streams","directories":{},"sideEffects":false,"_nodeVersion":"22.21.1","dependencies":{"@tanstack/db":"latest","@standard-schema/spec":"^1.0.0","@durable-streams/client":"0.1.4"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.9.0","@durable-streams/server":"0.1.5"},"_npmOperationalInternal":{"tmp":"tmp/state_0.1.4_1767907936101_0.8620985433181483","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@durable-streams/state","version":"0.1.5","keywords":["durable-streams","state","protocol","typescript"],"author":{"name":"Durable Stream contributors"},"license":"Apache-2.0","_id":"@durable-streams/state@0.1.5","maintainers":[{"name":"kylemathews","email":"mathews.kyle@gmail.com"}],"homepage":"https://github.com/durable-streams/durable-streams#readme","bugs":{"url":"https://github.com/durable-streams/durable-streams/issues"},"dist":{"shasum":"42ee830ead97205d3cb2f800147fd6022c4941ab","tarball":"https://registry.npmjs.org/@durable-streams/state/-/state-0.1.5.tgz","fileCount":13,"integrity":"sha512-MGCKO0o9/X2qyz4SawVTaoFEB2ejmcvCI6UnbhsDRdeM6NOacN/8Qq+kTRe+WbpQLT0qs8v+Ke+MwlamSzSFXg==","signatures":[{"sig":"MEUCIQD7CrhL/IGCO+pxi4YiJ0gpcotJMj7Tt6f0iAz4MT92agIgavg0I7vi76+vqpv2PtoI1kMsMu/YNJP3NeVBANFr0so=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@durable-streams%2fstate@0.1.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":126429},"main":"./dist/index.cjs","type":"module","_from":"file:durable-streams-state-0.1.5.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"scripts":{"dev":"tsdown --watch","build":"tsdown","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4df7e61d-88c4-493a-b591-e008c207e11b"}},"_resolved":"/tmp/8798aff84f238c086e1905d2afb44ed0/durable-streams-state-0.1.5.tgz","_integrity":"sha512-MGCKO0o9/X2qyz4SawVTaoFEB2ejmcvCI6UnbhsDRdeM6NOacN/8Qq+kTRe+WbpQLT0qs8v+Ke+MwlamSzSFXg==","repository":{"url":"git+https://github.com/durable-streams/durable-streams.git","type":"git","directory":"packages/state"},"_npmVersion":"11.7.0","description":"State change event protocol for Durable Streams","directories":{},"sideEffects":false,"_nodeVersion":"22.21.1","dependencies":{"@tanstack/db":"latest","@standard-schema/spec":"^1.0.0","@durable-streams/client":"0.1.5"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.9.0","@durable-streams/server":"0.1.6"},"_npmOperationalInternal":{"tmp":"tmp/state_0.1.5_1767920461570_0.05495251829051839","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@durable-streams/state","version":"0.2.0","keywords":["durable-streams","state","protocol","typescript"],"author":{"name":"Durable Stream contributors"},"license":"Apache-2.0","_id":"@durable-streams/state@0.2.0","maintainers":[{"name":"kylemathews","email":"mathews.kyle@gmail.com"}],"homepage":"https://github.com/durable-streams/durable-streams#readme","bugs":{"url":"https://github.com/durable-streams/durable-streams/issues"},"dist":{"shasum":"7ebe7583e5952557bc16024864c5eaeda5cf4a4b","tarball":"https://registry.npmjs.org/@durable-streams/state/-/state-0.2.0.tgz","fileCount":13,"integrity":"sha512-9XKSKkubcCbbRgUHJCENTw3351uJ4hfi8GLmYWD8l5OCEjvhVegUF06utFKehIRy3xTr57t5MC78weBfVlD2Dg==","signatures":[{"sig":"MEUCIGaschVQYbqIObcNy8mFA9aK8FgSL/FhNpXEScx6dMkmAiEA8ebZbLQwxal1M5Zd/Ik1W0rRRUZaE63Mfpo0ZcsKgr4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@durable-streams%2fstate@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":130946},"main":"./dist/index.cjs","type":"module","_from":"file:durable-streams-state-0.2.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"scripts":{"dev":"tsdown --watch","build":"tsdown","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4df7e61d-88c4-493a-b591-e008c207e11b"}},"_resolved":"/tmp/2d90089f2d0afae10ad6d12cc33e6f5d/durable-streams-state-0.2.0.tgz","_integrity":"sha512-9XKSKkubcCbbRgUHJCENTw3351uJ4hfi8GLmYWD8l5OCEjvhVegUF06utFKehIRy3xTr57t5MC78weBfVlD2Dg==","repository":{"url":"git+https://github.com/durable-streams/durable-streams.git","type":"git","directory":"packages/state"},"_npmVersion":"11.7.0","description":"State change event protocol for Durable Streams","directories":{},"sideEffects":false,"_nodeVersion":"22.21.1","dependencies":{"@standard-schema/spec":"^1.0.0","@durable-streams/client":"0.2.0"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.9.0","@tanstack/db":"latest","@durable-streams/server":"0.1.7"},"peerDependencies":{"@tanstack/db":">=0.5.0"},"_npmOperationalInternal":{"tmp":"tmp/state_0.2.0_1769036910621_0.904496506449346","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@durable-streams/state","version":"0.2.1","keywords":["durable-streams","state","protocol","typescript"],"author":{"name":"Durable Stream contributors"},"license":"Apache-2.0","_id":"@durable-streams/state@0.2.1","maintainers":[{"name":"kylemathews","email":"mathews.kyle@gmail.com"}],"homepage":"https://github.com/durable-streams/durable-streams#readme","bugs":{"url":"https://github.com/durable-streams/durable-streams/issues"},"dist":{"shasum":"444eb590f7f81ec4a0fb80824d406c53840dc7b8","tarball":"https://registry.npmjs.org/@durable-streams/state/-/state-0.2.1.tgz","fileCount":13,"integrity":"sha512-8piCcw/y1Jz6QJn0vOf+yhovFlp3xvRbzWRWtF51ndlorofJi3pOfCXnEINuvSueuNMIJosmKOg0AEvpMKfoCw==","signatures":[{"sig":"MEUCIQC2p18up8ezIwlaBfEC0XGAmkarqhqUtErzz4tT9OFQPgIgLzIjGt95YPtVO3A0Q56Tx61BIaSyXvlEILLmsZXpduw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@durable-streams%2fstate@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":130946},"main":"./dist/index.cjs","type":"module","_from":"file:durable-streams-state-0.2.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"scripts":{"dev":"tsdown --watch","build":"tsdown","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4df7e61d-88c4-493a-b591-e008c207e11b"}},"_resolved":"/tmp/dc198bb3243291ac59ff0a575ad857c0/durable-streams-state-0.2.1.tgz","_integrity":"sha512-8piCcw/y1Jz6QJn0vOf+yhovFlp3xvRbzWRWtF51ndlorofJi3pOfCXnEINuvSueuNMIJosmKOg0AEvpMKfoCw==","repository":{"url":"git+https://github.com/durable-streams/durable-streams.git","type":"git","directory":"packages/state"},"_npmVersion":"11.8.0","description":"State change event protocol for Durable Streams","directories":{},"sideEffects":false,"_nodeVersion":"22.22.0","dependencies":{"@standard-schema/spec":"^1.0.0","@durable-streams/client":"0.2.1"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.9.0","@tanstack/db":"latest","@durable-streams/server":"0.2.1"},"peerDependencies":{"@tanstack/db":">=0.5.0"},"_npmOperationalInternal":{"tmp":"tmp/state_0.2.1_1769714682192_0.9377061763952843","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@durable-streams/state","version":"0.2.2","keywords":["durable-streams","state","protocol","typescript"],"author":{"name":"Durable Stream contributors"},"license":"Apache-2.0","_id":"@durable-streams/state@0.2.2","maintainers":[{"name":"kylemathews","email":"mathews.kyle@gmail.com"}],"homepage":"https://github.com/durable-streams/durable-streams#readme","bugs":{"url":"https://github.com/durable-streams/durable-streams/issues"},"bin":{"intent":"bin/intent.js"},"dist":{"shasum":"f032bd7c953aad7033667a61fcc9cb2b74c70070","tarball":"https://registry.npmjs.org/@durable-streams/state/-/state-0.2.2.tgz","fileCount":16,"integrity":"sha512-dTYNUjtn6sgYoA/dtbBgbdHlKrrjOPaycXQZndruX2oDicZX71Qry760cLYAbRkqwM7dHyDzDk5WTlnIXYOoyA==","signatures":[{"sig":"MEQCIFrom+kcpW8Sy9R50d2p96ps0FIY+uOchnWotuXoKAJ5AiBUA0a7Gy6rqIr00joaWlZB2yCRWvN0dKIFrP8EucJoYw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@durable-streams%2fstate@0.2.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":145387},"main":"./dist/index.cjs","type":"module","_from":"file:durable-streams-state-0.2.2.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"scripts":{"dev":"tsdown --watch","build":"tsdown","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4df7e61d-88c4-493a-b591-e008c207e11b"}},"_resolved":"/tmp/f5e2b6d1897b3b137341626df8b36472/durable-streams-state-0.2.2.tgz","_integrity":"sha512-dTYNUjtn6sgYoA/dtbBgbdHlKrrjOPaycXQZndruX2oDicZX71Qry760cLYAbRkqwM7dHyDzDk5WTlnIXYOoyA==","repository":{"url":"git+https://github.com/durable-streams/durable-streams.git","type":"git","directory":"packages/state"},"_npmVersion":"11.11.0","description":"State change event protocol for Durable Streams","directories":{},"sideEffects":false,"_nodeVersion":"22.22.0","dependencies":{"@standard-schema/spec":"^1.0.0","@durable-streams/client":"0.2.2"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.9.0","@tanstack/db":"latest","@tanstack/intent":"latest","@durable-streams/server":"0.2.2"},"peerDependencies":{"@tanstack/db":">=0.5.0"},"_npmOperationalInternal":{"tmp":"tmp/state_0.2.2_1772832585947_0.08569396578665645","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"@durable-streams/state","version":"0.2.3","keywords":["durable-streams","state","protocol","typescript"],"author":{"name":"Durable Stream contributors"},"license":"Apache-2.0","_id":"@durable-streams/state@0.2.3","maintainers":[{"name":"kylemathews","email":"mathews.kyle@gmail.com"}],"homepage":"https://github.com/durable-streams/durable-streams#readme","bugs":{"url":"https://github.com/durable-streams/durable-streams/issues"},"bin":{"intent":"bin/intent.js"},"dist":{"shasum":"8a3fa17d0a23de538d0c5f7a65db6c1453ac79f7","tarball":"https://registry.npmjs.org/@durable-streams/state/-/state-0.2.3.tgz","fileCount":16,"integrity":"sha512-zUKXKr4bKX+ajqfX30JvIRmmWfDWbXvAkVU7pq60r00ySxOIN8P3KtuoE2rAS1UlPpfy3yxCuw+ikWJ7SCu7/g==","signatures":[{"sig":"MEYCIQCr30idIfzpfJsQ2mpa04TQRlFo4gRO1XFoyniXGza44AIhAI+GznfCmjGc3WPvfhcnXwE82epI4OGUMDcF9869FRvB","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@durable-streams%2fstate@0.2.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":145387},"main":"./dist/index.cjs","type":"module","_from":"file:durable-streams-state-0.2.3.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"scripts":{"dev":"tsdown --watch","build":"tsdown","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4df7e61d-88c4-493a-b591-e008c207e11b"}},"_resolved":"/tmp/f509b9a19270d1b698cd8e1e9d95852c/durable-streams-state-0.2.3.tgz","_integrity":"sha512-zUKXKr4bKX+ajqfX30JvIRmmWfDWbXvAkVU7pq60r00ySxOIN8P3KtuoE2rAS1UlPpfy3yxCuw+ikWJ7SCu7/g==","repository":{"url":"git+https://github.com/durable-streams/durable-streams.git","type":"git","directory":"packages/state"},"_npmVersion":"11.12.0","description":"State change event protocol for Durable Streams","directories":{},"sideEffects":false,"_nodeVersion":"22.22.1","dependencies":{"@standard-schema/spec":"^1.0.0","@durable-streams/client":"0.2.3"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.9.0","@tanstack/db":"latest","@tanstack/intent":"latest","@durable-streams/server":"0.2.3"},"peerDependencies":{"@tanstack/db":">=0.5.0"},"_npmOperationalInternal":{"tmp":"tmp/state_0.2.3_1774318545611_0.1353962955456709","host":"s3://npm-registry-packages-npm-production"}},"0.2.4":{"name":"@durable-streams/state","version":"0.2.4","keywords":["durable-streams","state","protocol","typescript"],"author":{"name":"Durable Stream contributors"},"license":"Apache-2.0","_id":"@durable-streams/state@0.2.4","maintainers":[{"name":"dev-npm-publisher-2","email":"dev@electric-sql.com"},{"name":"kylemathews","email":"mathews.kyle@gmail.com"}],"homepage":"https://github.com/durable-streams/durable-streams#readme","bugs":{"url":"https://github.com/durable-streams/durable-streams/issues"},"bin":{"intent":"bin/intent.js"},"dist":{"shasum":"52c23cc4173ad82cbcc66dce2d6275572ad31cb3","tarball":"https://registry.npmjs.org/@durable-streams/state/-/state-0.2.4.tgz","fileCount":16,"integrity":"sha512-ADU7jKhl6YYSV0BHqFj4fYw9Ww9y4Slcj0Uxcge90FZpqzkwg/0EadQq2v8GP3SSRY7KAQ6WpCEeWSml5dvd2A==","signatures":[{"sig":"MEUCIGX/88wx+iO18gjOmQs34e7pHXp1rrgmgOki137djPk6AiEAk7IRhre/O5eHaRs4W/XwSJtqTx9OMiQhIb2CHEdqLp0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@durable-streams%2fstate@0.2.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":141120},"main":"./dist/index.cjs","type":"module","_from":"file:durable-streams-state-0.2.4.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"scripts":{"dev":"tsdown --watch","build":"tsdown","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4df7e61d-88c4-493a-b591-e008c207e11b"}},"_resolved":"/tmp/931fdc47720c421b16d473de5b3b3a34/durable-streams-state-0.2.4.tgz","_integrity":"sha512-ADU7jKhl6YYSV0BHqFj4fYw9Ww9y4Slcj0Uxcge90FZpqzkwg/0EadQq2v8GP3SSRY7KAQ6WpCEeWSml5dvd2A==","repository":{"url":"git+https://github.com/durable-streams/durable-streams.git","type":"git","directory":"packages/state"},"_npmVersion":"11.12.1","description":"State change event protocol for Durable Streams","directories":{},"sideEffects":false,"_nodeVersion":"22.22.2","dependencies":{"@standard-schema/spec":"^1.0.0","@durable-streams/client":"0.2.3"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.9.0","@tanstack/db":"latest","@tanstack/intent":"latest","@durable-streams/server":"0.3.0"},"peerDependencies":{"@tanstack/db":">=0.5.0"},"_npmOperationalInternal":{"tmp":"tmp/state_0.2.4_1776088517063_0.034231026781731844","host":"s3://npm-registry-packages-npm-production"}},"0.2.5":{"name":"@durable-streams/state","version":"0.2.5","keywords":["durable-streams","state","protocol","typescript"],"author":{"name":"Durable Stream contributors"},"license":"Apache-2.0","_id":"@durable-streams/state@0.2.5","maintainers":[{"name":"dev-npm-publisher-2","email":"dev@electric-sql.com"},{"name":"kylemathews","email":"mathews.kyle@gmail.com"}],"homepage":"https://github.com/durable-streams/durable-streams#readme","bugs":{"url":"https://github.com/durable-streams/durable-streams/issues"},"bin":{"intent":"bin/intent.js"},"dist":{"shasum":"69a22e0348fc2a5c71eab497a6a5813b85e5856b","tarball":"https://registry.npmjs.org/@durable-streams/state/-/state-0.2.5.tgz","fileCount":16,"integrity":"sha512-9vVe2Ww+FxVuNs79f5geS7KZ6kvFXOROC+gCZmIXVugb5Fpah/B/IBl+kTm0gL/4MpjIuAcZtu3JK4rG9TuEeA==","signatures":[{"sig":"MEUCIHymoHeKZSFB8SrXyxhBD16CihysU1WWvcJ+Cka0AbBQAiEAmLRA9p6dLxCq7iwEHaJyGngj1YYPJl3dOjkXSYMo6rc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@durable-streams%2fstate@0.2.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":141524},"main":"./dist/index.cjs","type":"module","_from":"file:durable-streams-state-0.2.5.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"scripts":{"dev":"tsdown --watch","build":"tsdown","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4df7e61d-88c4-493a-b591-e008c207e11b"}},"_resolved":"/tmp/fcb0acc404be71548d4f345269c8b8b1/durable-streams-state-0.2.5.tgz","_integrity":"sha512-9vVe2Ww+FxVuNs79f5geS7KZ6kvFXOROC+gCZmIXVugb5Fpah/B/IBl+kTm0gL/4MpjIuAcZtu3JK4rG9TuEeA==","repository":{"url":"git+https://github.com/durable-streams/durable-streams.git","type":"git","directory":"packages/state"},"_npmVersion":"11.12.1","description":"State change event protocol for Durable Streams","directories":{},"sideEffects":false,"_nodeVersion":"22.22.2","dependencies":{"@standard-schema/spec":"^1.0.0","@durable-streams/client":"0.2.3"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.9.0","@tanstack/db":"latest","@tanstack/intent":"latest","@durable-streams/server":"0.3.1"},"peerDependencies":{"@tanstack/db":">=0.5.0"},"_npmOperationalInternal":{"tmp":"tmp/state_0.2.5_1776174354346_0.40051176128794763","host":"s3://npm-registry-packages-npm-production"}},"0.2.6":{"name":"@durable-streams/state","version":"0.2.6","keywords":["durable-streams","state","protocol","typescript"],"author":{"name":"Durable Stream contributors"},"license":"Apache-2.0","_id":"@durable-streams/state@0.2.6","maintainers":[{"name":"dev-npm-publisher-2","email":"dev@electric-sql.com"},{"name":"kylemathews","email":"mathews.kyle@gmail.com"}],"homepage":"https://github.com/durable-streams/durable-streams#readme","bugs":{"url":"https://github.com/durable-streams/durable-streams/issues"},"bin":{"intent":"bin/intent.js"},"dist":{"shasum":"170b028368a7999a8613d756c322fa60cc35c956","tarball":"https://registry.npmjs.org/@durable-streams/state/-/state-0.2.6.tgz","fileCount":16,"integrity":"sha512-Cph/g0Ghl4TGlxg13+TH/7/3OqC+nOWi+V7K16j3mqvacxgAtjzG7AYB2wD9cMaWVaqLtvgzgVTbdZIrdx2g9w==","signatures":[{"sig":"MEUCIQCM6wYLsK9HYj+x1hJM5cGLJmld+zcqcDw9+6AV6sFPpQIgR42aT5vZk30JTn+Bg2uBSp8ewLW7Hg+98lWrPpFaGKs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@durable-streams%2fstate@0.2.6","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":141915},"main":"./dist/index.cjs","type":"module","_from":"file:durable-streams-state-0.2.6.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"scripts":{"dev":"tsdown --watch","build":"tsdown","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4df7e61d-88c4-493a-b591-e008c207e11b"}},"_resolved":"/tmp/700c6fee42dfa63629f816d80e50aefa/durable-streams-state-0.2.6.tgz","_integrity":"sha512-Cph/g0Ghl4TGlxg13+TH/7/3OqC+nOWi+V7K16j3mqvacxgAtjzG7AYB2wD9cMaWVaqLtvgzgVTbdZIrdx2g9w==","repository":{"url":"git+https://github.com/durable-streams/durable-streams.git","type":"git","directory":"packages/state"},"_npmVersion":"11.14.1","description":"State change event protocol for Durable Streams","directories":{},"sideEffects":false,"_nodeVersion":"22.22.2","dependencies":{"@standard-schema/spec":"^1.0.0","@durable-streams/client":"0.2.4"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.9.0","@tanstack/db":"latest","@tanstack/intent":"latest","@durable-streams/server":"0.3.2"},"peerDependencies":{"@tanstack/db":">=0.5.0"},"_npmOperationalInternal":{"tmp":"tmp/state_0.2.6_1779128116735_0.714385420121088","host":"s3://npm-registry-packages-npm-production"}},"0.2.7":{"name":"@durable-streams/state","version":"0.2.7","keywords":["durable-streams","state","protocol","typescript"],"author":{"name":"Durable Stream contributors"},"license":"Apache-2.0","_id":"@durable-streams/state@0.2.7","maintainers":[{"name":"dev-npm-publisher-2","email":"dev@electric-sql.com"},{"name":"kylemathews","email":"mathews.kyle@gmail.com"}],"homepage":"https://github.com/durable-streams/durable-streams#readme","bugs":{"url":"https://github.com/durable-streams/durable-streams/issues"},"bin":{"intent":"bin/intent.js"},"dist":{"shasum":"c91589a40bc46ef34cc417009c9cafe413bf58d9","tarball":"https://registry.npmjs.org/@durable-streams/state/-/state-0.2.7.tgz","fileCount":16,"integrity":"sha512-9ZPWcGvTAbgHZOuf8jRLKBvDgMXTmD22mwPpBxvVw4yMtynqjF2gKKt8u3hvIB/dBSz0CWNgif2pMbgOGqW7Nw==","signatures":[{"sig":"MEUCIDPJscHgJuG6gAj0fMmF7cvjvuQC1fyfOyakQJc49Rf5AiEAvS4tDYdfJS0br12V/sT6DZ1EINM34wVpgtxC9MrCd+M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@durable-streams%2fstate@0.2.7","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":155455},"main":"./dist/index.cjs","type":"module","_from":"file:durable-streams-state-0.2.7.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"scripts":{"dev":"tsdown --watch","build":"tsdown","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4df7e61d-88c4-493a-b591-e008c207e11b"}},"_resolved":"/tmp/c47e48f0377878f1bb5768eff76c7bc3/durable-streams-state-0.2.7.tgz","_integrity":"sha512-9ZPWcGvTAbgHZOuf8jRLKBvDgMXTmD22mwPpBxvVw4yMtynqjF2gKKt8u3hvIB/dBSz0CWNgif2pMbgOGqW7Nw==","repository":{"url":"git+https://github.com/durable-streams/durable-streams.git","type":"git","directory":"packages/state"},"_npmVersion":"11.15.0","description":"State change event protocol for Durable Streams","directories":{},"sideEffects":false,"_nodeVersion":"22.22.3","dependencies":{"@tanstack/db":"^0.6.0","@standard-schema/spec":"^1.0.0","@durable-streams/client":"0.2.4"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.9.0","@tanstack/intent":"latest","@durable-streams/server":"0.3.3"},"_npmOperationalInternal":{"tmp":"tmp/state_0.2.7_1779812386642_0.8069414453401691","host":"s3://npm-registry-packages-npm-production"}},"0.2.8":{"name":"@durable-streams/state","version":"0.2.8","keywords":["durable-streams","state","protocol","typescript"],"author":{"name":"Durable Stream contributors"},"license":"Apache-2.0","_id":"@durable-streams/state@0.2.8","maintainers":[{"name":"dev-npm-publisher-2","email":"dev@electric-sql.com"},{"name":"kylemathews","email":"mathews.kyle@gmail.com"}],"homepage":"https://github.com/durable-streams/durable-streams#readme","bugs":{"url":"https://github.com/durable-streams/durable-streams/issues"},"bin":{"intent":"bin/intent.js"},"dist":{"shasum":"5e1f21a922fcb97d7dffead5c1c6f8e1fb8fac37","tarball":"https://registry.npmjs.org/@durable-streams/state/-/state-0.2.8.tgz","fileCount":16,"integrity":"sha512-AZeNft+2J1V2IOBWIlfUHXXbpqQ8CJI7lo/ZBFIFEy4veHKXOfeLcqpvTC9t5BPY6nNs/QAIs/0b/fRerq4BQQ==","signatures":[{"sig":"MEUCIFmkd1xCqZb1GPSyGL3VZxIIiqtpCr2Em6FUEJQDfemjAiEA6EDURqe1Gh2XUuEJDwn/EFhaQSMqzBtN67anhazW+ro=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@durable-streams%2fstate@0.2.8","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":155455},"main":"./dist/index.cjs","type":"module","_from":"file:durable-streams-state-0.2.8.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"scripts":{"dev":"tsdown --watch","build":"tsdown","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4df7e61d-88c4-493a-b591-e008c207e11b"}},"_resolved":"/tmp/f3b2782856aaa326f6afbaf5a74396ef/durable-streams-state-0.2.8.tgz","_integrity":"sha512-AZeNft+2J1V2IOBWIlfUHXXbpqQ8CJI7lo/ZBFIFEy4veHKXOfeLcqpvTC9t5BPY6nNs/QAIs/0b/fRerq4BQQ==","repository":{"url":"git+https://github.com/durable-streams/durable-streams.git","type":"git","directory":"packages/state"},"_npmVersion":"11.16.0","description":"State change event protocol for Durable Streams","directories":{},"sideEffects":false,"_nodeVersion":"22.22.3","dependencies":{"@tanstack/db":"^0.6.0","@standard-schema/spec":"^1.0.0","@durable-streams/client":"0.2.5"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.9.0","@tanstack/intent":"latest","@durable-streams/server":"0.3.4"},"_npmOperationalInternal":{"tmp":"tmp/state_0.2.8_1779971597066_0.4353606510267616","host":"s3://npm-registry-packages-npm-production"}},"0.2.9":{"name":"@durable-streams/state","version":"0.2.9","keywords":["durable-streams","state","protocol","typescript"],"author":{"name":"Durable Stream contributors"},"license":"Apache-2.0","_id":"@durable-streams/state@0.2.9","maintainers":[{"name":"dev-npm-publisher-2","email":"dev@electric-sql.com"},{"name":"kylemathews","email":"mathews.kyle@gmail.com"}],"homepage":"https://github.com/durable-streams/durable-streams#readme","bugs":{"url":"https://github.com/durable-streams/durable-streams/issues"},"bin":{"intent":"bin/intent.js"},"dist":{"shasum":"f95e778d2957e22104a9b0680319c6ee28289921","tarball":"https://registry.npmjs.org/@durable-streams/state/-/state-0.2.9.tgz","fileCount":16,"integrity":"sha512-PuT0HeSyXPzFi65ip7zYxf7BIiJy2mxMGRnFa8EEO+q0m6KdCvrcLTkM85a3u7HO8SqOPnt/s99dZpYHYzVKgw==","signatures":[{"sig":"MEUCIQCNJTKtf+julZELttI3GHJxO4UwO3YBTaDBUCx7gVToMQIgBApriZ7g6oGbRqh0AGljATB1ooQGxmPb5PubbLlXSjM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@durable-streams%2fstate@0.2.9","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":155455},"main":"./dist/index.cjs","type":"module","_from":"file:durable-streams-state-0.2.9.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"scripts":{"dev":"tsdown --watch","build":"tsdown","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4df7e61d-88c4-493a-b591-e008c207e11b"}},"_resolved":"/tmp/5beb3bb6b27248167c7f7db2f11d87bf/durable-streams-state-0.2.9.tgz","_integrity":"sha512-PuT0HeSyXPzFi65ip7zYxf7BIiJy2mxMGRnFa8EEO+q0m6KdCvrcLTkM85a3u7HO8SqOPnt/s99dZpYHYzVKgw==","repository":{"url":"git+https://github.com/durable-streams/durable-streams.git","type":"git","directory":"packages/state"},"_npmVersion":"11.16.0","description":"State change event protocol for Durable Streams","directories":{},"sideEffects":false,"_nodeVersion":"22.22.3","dependencies":{"@tanstack/db":"^0.6.0","@standard-schema/spec":"^1.0.0","@durable-streams/client":"0.2.6"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.9.0","@tanstack/intent":"latest","@durable-streams/server":"0.3.5"},"_npmOperationalInternal":{"tmp":"tmp/state_0.2.9_1780312090455_0.7959475155908606","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@durable-streams/state","version":"0.3.0","keywords":["durable-streams","state","protocol","typescript"],"author":{"name":"Durable Stream contributors"},"license":"Apache-2.0","_id":"@durable-streams/state@0.3.0","maintainers":[{"name":"dev-npm-publisher-2","email":"dev@electric-sql.com"},{"name":"kylemathews","email":"mathews.kyle@gmail.com"}],"homepage":"https://github.com/durable-streams/durable-streams#readme","bugs":{"url":"https://github.com/durable-streams/durable-streams/issues"},"bin":{"intent":"bin/intent.js"},"dist":{"shasum":"4f9988e9ecb583551e7a28427c6be347be3ba52e","tarball":"https://registry.npmjs.org/@durable-streams/state/-/state-0.3.0.tgz","fileCount":26,"integrity":"sha512-8PlQAGm/SJwg0Zid/gHsbPq7EFg6ygJ+lcrc+cR2njrTNwOBO0Y+MQkQOxDN3FfUzmfjnMKUjXWkforXbh7dCQ==","signatures":[{"sig":"MEUCIQCQ5LHejlCM4uKz10I6s5QaXAZ+Ll0xuf1yPlPJiUB3UAIgMH1hEVe/YELdWw1oS4+aQEhTyCSV/Aja//J47PxrSns=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@durable-streams%2fstate@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":162438},"main":"./dist/index.cjs","type":"module","_from":"file:durable-streams-state-0.3.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./db":{"import":{"types":"./dist/db.d.ts","default":"./dist/db.js"},"require":{"types":"./dist/db.d.cts","default":"./dist/db.cjs"}},"./package.json":"./package.json"},"scripts":{"dev":"tsdown --watch","build":"tsdown","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4df7e61d-88c4-493a-b591-e008c207e11b"}},"_resolved":"/tmp/1d7986546adeadf76df4b12f9a5d8cd3/durable-streams-state-0.3.0.tgz","_integrity":"sha512-8PlQAGm/SJwg0Zid/gHsbPq7EFg6ygJ+lcrc+cR2njrTNwOBO0Y+MQkQOxDN3FfUzmfjnMKUjXWkforXbh7dCQ==","repository":{"url":"git+https://github.com/durable-streams/durable-streams.git","type":"git","directory":"packages/state"},"_npmVersion":"11.16.0","description":"State change event protocol for Durable Streams","directories":{},"sideEffects":false,"_nodeVersion":"22.22.3","dependencies":{"@standard-schema/spec":"^1.0.0","@durable-streams/client":"0.2.6"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.9.0","@tanstack/db":"0.6.0","@tanstack/intent":"latest","@durable-streams/server":"0.3.6"},"peerDependencies":{"@tanstack/db":">=0.6.0 <1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/state_0.3.0_1780488011102_0.22650718623470678","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@durable-streams/state","version":"0.3.1","keywords":["durable-streams","state","protocol","typescript"],"author":{"name":"Durable Stream contributors"},"license":"Apache-2.0","_id":"@durable-streams/state@0.3.1","maintainers":[{"name":"dev-npm-publisher-2","email":"dev@electric-sql.com"},{"name":"kylemathews","email":"mathews.kyle@gmail.com"}],"homepage":"https://github.com/durable-streams/durable-streams#readme","bugs":{"url":"https://github.com/durable-streams/durable-streams/issues"},"bin":{"intent":"bin/intent.js"},"dist":{"shasum":"27e23621f0027f3073011784aef1de0c042a5bd9","tarball":"https://registry.npmjs.org/@durable-streams/state/-/state-0.3.1.tgz","fileCount":26,"integrity":"sha512-HYhw520Bfl9+L3MJgWpzLQjByP5y/uNNasOqSSFfyWhFxZeaKHM6Go2P79YFfTJPmXh4ZHEh1jOgIfrumqT6hA==","signatures":[{"sig":"MEUCIF+s+Ozj/u9hwy6ZrIpQ56n8hlBkJZG095VCUC3aPCYdAiEA/NyXdMyWAQiTF3JaWCJ7UhBdOz5Uc4AUs2z44eV5Afo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@durable-streams%2fstate@0.3.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":162522},"main":"./dist/index.cjs","type":"module","_from":"file:durable-streams-state-0.3.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./db":{"import":{"types":"./dist/db.d.ts","default":"./dist/db.js"},"require":{"types":"./dist/db.d.cts","default":"./dist/db.cjs"}},"./package.json":"./package.json"},"scripts":{"dev":"tsdown --watch","build":"tsdown","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4df7e61d-88c4-493a-b591-e008c207e11b"}},"_resolved":"/tmp/1de949024d3b0873f90d632034bc610f/durable-streams-state-0.3.1.tgz","_integrity":"sha512-HYhw520Bfl9+L3MJgWpzLQjByP5y/uNNasOqSSFfyWhFxZeaKHM6Go2P79YFfTJPmXh4ZHEh1jOgIfrumqT6hA==","repository":{"url":"git+https://github.com/durable-streams/durable-streams.git","type":"git","directory":"packages/state"},"_npmVersion":"11.16.0","description":"State change event protocol for Durable Streams","directories":{},"sideEffects":false,"_nodeVersion":"22.22.3","dependencies":{"@standard-schema/spec":"^1.0.0","@durable-streams/client":"0.2.6"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.9.0","@tanstack/db":"0.6.0","@tanstack/intent":"latest","@durable-streams/server":"0.3.7"},"peerDependencies":{"@tanstack/db":">=0.6.0 <1.0.0"},"peerDependenciesMeta":{"@tanstack/db":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/state_0.3.1_1780492562754_0.8541719709070574","host":"s3://npm-registry-packages-npm-production"}},"0.3.2":{"_id":"@durable-streams/state@0.3.2","bin":{"intent":"bin/intent.js"},"bugs":{"url":"https://github.com/durable-streams/durable-streams/issues"},"dist":{"shasum":"243d1c07761998f400e445e9423ded0bf37d6a19","tarball":"https://registry.npmjs.org/@durable-streams/state/-/state-0.3.2.tgz","fileCount":26,"integrity":"sha512-pFj09315ARvyJR6iCt6p1CP6HW6tw/JsKgD1pfyjduveOzqxq3v01aXPSlUMb83ncwWjtMTuzwyfP6JsywbaJg==","signatures":[{"sig":"MEUCIQCUUiSnQ09rV4OxMISxqru3MFHNRH+bTl3poCdDwUKp7QIgQNs1kxiql3H1lvCECp5oTVcEf0EHeQbxnkHktHAS8AE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHfApACcgqYO7AmpvMLYvjep2djRLp+chbruOyKaDf1bAiEAySSw+le7Z/9hzS8w13mlgeKPM9pX1OiwO2f/KuLuQWM="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@durable-streams%2fstate@0.3.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":162510},"main":"./dist/index.cjs","name":"@durable-streams/state","type":"module","_from":"file:durable-streams-state-0.3.2.tgz","types":"./dist/index.d.ts","author":{"name":"Durable Stream contributors"},"module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./db":{"import":{"types":"./dist/db.d.ts","default":"./dist/db.js"},"require":{"types":"./dist/db.d.cts","default":"./dist/db.cjs"}},"./package.json":"./package.json"},"license":"Apache-2.0","scripts":{"dev":"tsdown --watch","build":"tsdown","typecheck":"tsc --noEmit"},"version":"0.3.2","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4df7e61d-88c4-493a-b591-e008c207e11b"}},"homepage":"https://github.com/durable-streams/durable-streams#readme","keywords":["durable-streams","state","protocol","typescript"],"_resolved":"/tmp/f1975dda2a46c78bc37dbd2369992d74/durable-streams-state-0.3.2.tgz","_integrity":"sha512-pFj09315ARvyJR6iCt6p1CP6HW6tw/JsKgD1pfyjduveOzqxq3v01aXPSlUMb83ncwWjtMTuzwyfP6JsywbaJg==","repository":{"url":"git+https://github.com/durable-streams/durable-streams.git","type":"git","directory":"packages/state"},"_npmVersion":"12.0.2","description":"State change event protocol for Durable Streams","directories":{},"maintainers":[{"name":"dev-npm-publisher-2","email":"dev@electric-sql.com"},{"name":"kylemathews","email":"mathews.kyle@gmail.com"}],"sideEffects":false,"_nodeVersion":"22.23.2","dependencies":{"@standard-schema/spec":"^1.0.0","@durable-streams/client":"0.2.7"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.9.0","@tanstack/db":"0.6.0","@tanstack/intent":"latest","@durable-streams/server":"0.3.9"},"peerDependencies":{"@tanstack/db":">=0.6.0 <1.0.0"},"peerDependenciesMeta":{"@tanstack/db":{"optional":true}},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/state_0.3.2_1789060921651_0.02627290350025291"}}},"time":{"created":"2025-12-23T17:49:42.954Z","modified":"2026-09-10T17:22:02.039Z","0.1.0":"2025-12-23T17:49:43.174Z","0.1.1":"2025-12-24T03:01:37.445Z","0.1.2":"2025-12-24T03:28:46.441Z","0.1.3":"2026-01-07T14:20:08.925Z","0.1.4":"2026-01-08T21:32:16.238Z","0.1.5":"2026-01-09T01:01:01.743Z","0.2.0":"2026-01-21T23:08:30.775Z","0.2.1":"2026-01-29T19:24:42.347Z","0.2.2":"2026-03-06T21:29:46.099Z","0.2.3":"2026-03-24T02:15:45.754Z","0.2.4":"2026-04-13T13:55:17.199Z","0.2.5":"2026-04-14T13:45:54.473Z","0.2.6":"2026-05-18T18:15:16.885Z","0.2.7":"2026-05-26T16:19:46.835Z","0.2.8":"2026-05-28T12:33:17.211Z","0.2.9":"2026-06-01T11:08:10.599Z","0.3.0":"2026-06-03T12:00:11.248Z","0.3.1":"2026-06-03T13:16:03.030Z","0.3.2":"2026-09-10T17:22:01.732Z"},"bugs":{"url":"https://github.com/durable-streams/durable-streams/issues"},"author":{"name":"Durable Stream contributors"},"license":"Apache-2.0","homepage":"https://github.com/durable-streams/durable-streams#readme","keywords":["durable-streams","state","protocol","typescript"],"repository":{"url":"git+https://github.com/durable-streams/durable-streams.git","type":"git","directory":"packages/state"},"description":"State change event protocol for Durable Streams","maintainers":[{"name":"dev-npm-publisher-2","email":"dev@electric-sql.com"},{"name":"kylemathews","email":"mathews.kyle@gmail.com"}],"readme":"# @durable-streams/state\n\nBuilding blocks for transmitting structured state over Durable Streams. Use these primitives for any real-time protocol: AI token streams, presence updates, collaborative editing, or database sync.\n\n## Installation\n\n```bash\npnpm add @durable-streams/state\n```\n\nThe package exposes two entry points:\n\n- **`@durable-streams/state`** — the db-free protocol surface: `createStateSchema` and event helpers, `MaterializedState`, and the event types/guards. No extra dependencies.\n- **`@durable-streams/state/db`** — the reactive, TanStack DB-backed layer (`createStreamDB`, live queries, optimistic actions). This entry requires the `@tanstack/db` peer dependency:\n\n```bash\npnpm add @durable-streams/state @tanstack/db\n```\n\n> **Note:** `@tanstack/db` is a peer dependency of the `/db` entry only. Installing it ensures type compatibility when using StreamDB collections with TanStack DB's query utilities like `useLiveQuery` from `@tanstack/react-db`.\n\n## Overview\n\nThis package provides flexible primitives for streaming structured state. You choose how much structure you need:\n\n- **Simple state updates**: Stream JSON payloads and track current values\n- **Typed collections**: Add schemas and primary keys for structured entities\n- **Reactive queries**: Build on TanStack DB for subscriptions and optimistic updates\n\nStream whatever state your protocol requires.\n\n## Quick Start\n\n### Simple State\n\nStream structured JSON and query current values:\n\n```typescript\nimport { MaterializedState } from \"@durable-streams/state\"\n\nconst state = new MaterializedState()\n\n// Apply any structured change\nstate.apply({\n  type: \"token\",\n  key: \"stream-1\",\n  value: { content: \"Hello\", model: \"claude-3\" },\n  headers: { operation: \"insert\" },\n})\n\n// Query current state\nconst token = state.get(\"token\", \"stream-1\")\nconst allTokens = state.getType(\"token\")\n```\n\n### Typed Collections\n\nAdd schemas and validation for structured entities:\n\n```typescript\nimport { createStateSchema } from \"@durable-streams/state\"\nimport { createStreamDB } from \"@durable-streams/state/db\"\n\n// Define your schema\nconst schema = createStateSchema({\n  users: {\n    schema: userSchema, // Standard Schema validator\n    type: \"user\", // Event type field\n    primaryKey: \"id\", // Primary key field name\n  },\n  messages: {\n    schema: messageSchema,\n    type: \"message\",\n    primaryKey: \"id\",\n  },\n})\n\n// Create a stream-backed database\nconst db = createStreamDB({\n  streamOptions: {\n    url: \"https://api.example.com/streams/my-stream\",\n    contentType: \"application/json\",\n  },\n  live: \"sse\", // optional: true, \"long-poll\", \"sse\", or false\n  state: schema,\n})\n\n// Load initial data\nawait db.preload()\n\n// Reactive queries with useLiveQuery\nimport { useLiveQuery } from \"@tanstack/react-db\" // or solid-db, vue-db\nimport { eq } from \"@tanstack/db\"\n\nconst userQuery = useLiveQuery((q) =>\n  q\n    .from({ users: db.collections.users })\n    .where(({ users }) => eq(users.id, \"123\"))\n    .findOne()\n)\n\nconst allUsersQuery = useLiveQuery((q) =>\n  q.from({ users: db.collections.users })\n)\n```\n\n## Core Concepts\n\n### State Protocol\n\nThe Durable Streams State Protocol defines a standard format for state change events:\n\n- **Change Events**: `insert`, `update`, `delete` operations on entities\n- **Control Events**: `snapshot-start`, `snapshot-end`, `reset` signals\n- **Entity Types**: Discriminator field that routes events to collections\n- **Primary Keys**: Unique identifiers extracted from entity values\n\nSee [STATE-PROTOCOL.md](./STATE-PROTOCOL.md) for the full specification.\n\n### MaterializedState\n\nSimple in-memory state container for basic use cases:\n\n```typescript\nimport { MaterializedState } from \"@durable-streams/state\"\n\nconst state = new MaterializedState()\n\n// Apply change events\nstate.apply({\n  type: \"user\",\n  key: \"1\",\n  value: { name: \"Kyle\" },\n  headers: { operation: \"insert\" },\n})\n\n// Query state\nconst user = state.get(\"user\", \"1\")\nconst allUsers = state.getType(\"user\")\n```\n\n### StreamDB\n\nStream-backed database with TanStack DB collections. Provides reactive queries, subscriptions, and optimistic updates.\n\n## Schema Definition\n\n### createStateSchema()\n\nDefine your application state structure:\n\n```typescript\nconst schema = createStateSchema({\n  users: {\n    schema: userSchema, // Standard Schema validator\n    type: \"user\", // Event type for routing\n    primaryKey: \"id\", // Field to use as primary key\n  },\n  messages: {\n    schema: messageSchema,\n    type: \"message\",\n    primaryKey: \"id\",\n  },\n})\n```\n\n### Standard Schema Support\n\nUses [Standard Schema](https://standardschema.dev/) for validation, supporting multiple libraries:\n\n```typescript\n// Zod\nimport { z } from \"zod\"\n\nconst userSchema = z.object({\n  id: z.string(),\n  name: z.string(),\n  email: z.string().email(),\n})\n\n// Valibot\nimport * as v from \"valibot\"\n\nconst userSchema = v.object({\n  id: v.string(),\n  name: v.string(),\n  email: v.pipe(v.string(), v.email()),\n})\n\n// Manual Standard Schema\nconst userSchema = {\n  \"~standard\": {\n    version: 1,\n    vendor: \"my-app\",\n    validate: (value) => {\n      // Your validation logic\n      if (isValid(value)) {\n        return { value }\n      }\n      return { issues: [{ message: \"Invalid user\" }] }\n    },\n  },\n}\n```\n\n## Event Helpers\n\nSchema provides typed event creation helpers:\n\n```typescript\n// Insert\nconst insertEvent = schema.users.insert({\n  value: { id: \"1\", name: \"Kyle\", email: \"kyle@example.com\" },\n  key: \"1\", // Optional, defaults to value[primaryKey]\n})\n\n// Update\nconst updateEvent = schema.users.update({\n  value: { id: \"1\", name: \"Kyle Mathews\", email: \"kyle@example.com\" },\n  oldValue: { id: \"1\", name: \"Kyle\", email: \"kyle@example.com\" }, // Optional\n})\n\n// Delete\nconst deleteEvent = schema.users.delete({\n  key: \"1\",\n  oldValue: { id: \"1\", name: \"Kyle\", email: \"kyle@example.com\" }, // Optional\n})\n\n// Custom headers\nconst eventWithTxId = schema.users.insert({\n  value: { id: \"1\", name: \"Kyle\" },\n  headers: {\n    txid: crypto.randomUUID(),\n    timestamp: new Date().toISOString(),\n  },\n})\n```\n\n## StreamDB\n\n### Creating a Database\n\n```typescript\nconst db = createStreamDB({\n  streamOptions: {\n    url: \"https://api.example.com/streams/my-stream\",\n    contentType: \"application/json\",\n    // All DurableStream options supported\n    headers: { Authorization: \"Bearer token\" },\n    batching: true,\n  },\n  state: schema,\n})\n\n// The stream is created lazily when preload() is called\nawait db.preload()\n```\n\n### Reactive Queries with TanStack DB\n\nStreamDB collections are TanStack DB collections. Use TanStack DB's query builder for filtering, sorting, aggregation, and joins with **differential dataflow** - dramatically faster than JavaScript filtering:\n\n```typescript\nimport { useLiveQuery } from \"@tanstack/[framework]-db\" // react-db, solid-db, etc\nimport { eq, gt, and, count } from \"@tanstack/db\"\n\n// Simple collection access\nconst query = useLiveQuery((q) => q.from({ users: db.collections.users }))\n\n// Filtering with WHERE\nconst activeQuery = useLiveQuery((q) =>\n  q\n    .from({ users: db.collections.users })\n    .where(({ users }) => eq(users.active, true))\n)\n\n// Complex conditions\nconst query = useLiveQuery((q) =>\n  q\n    .from({ users: db.collections.users })\n    .where(({ users }) => and(eq(users.active, true), gt(users.age, 18)))\n)\n\n// Sorting and limiting\nconst topUsersQuery = useLiveQuery((q) =>\n  q\n    .from({ users: db.collections.users })\n    .orderBy(({ users }) => users.lastSeen, \"desc\")\n    .limit(10)\n)\n\n// Aggregation with GROUP BY and ordering\nconst langStatsQuery = useLiveQuery((q) => {\n  const languageCounts = q\n    .from({ events: db.collections.events })\n    .groupBy(({ events }) => events.language)\n    .select(({ events }) => ({\n      language: events.language,\n      total: count(events.id),\n    }))\n\n  return q\n    .from({ stats: languageCounts })\n    .orderBy(({ stats }) => stats.total, \"desc\")\n})\n\n// Joins across collections\nconst query = useLiveQuery((q) =>\n  q\n    .from({ messages: db.collections.messages })\n    .join({ users: db.collections.users }, ({ messages, users }) =>\n      eq(messages.userId, users.id)\n    )\n    .select(({ messages, users }) => ({\n      messageId: messages.id,\n      text: messages.text,\n      userName: users.name,\n    }))\n)\n```\n\n**Why use the query builder?**\n\n- **Differential dataflow**: Incremental updates only recompute affected results\n- **Dramatically faster**: Push filtering/sorting into the DB engine vs JavaScript\n- **Reactive**: Queries automatically update when data changes\n- **Type-safe**: Full TypeScript support with autocomplete\n\n**Framework integration**: See [TanStack DB docs](https://tanstack.com/db) for framework-specific guides:\n\n- [@tanstack/react-db](https://tanstack.com/db/latest/docs/framework/react/overview)\n- [@tanstack/solid-db](https://tanstack.com/db/latest/docs/framework/solid/overview)\n- [@tanstack/vue-db](https://tanstack.com/db/latest/docs/framework/vue/overview)\n\n### Lifecycle Methods\n\n```typescript\n// Load all data until up-to-date\nawait db.preload()\n\n// Stop syncing and cleanup\ndb.close()\n\n// Wait for a transaction to be confirmed\nawait db.utils.awaitTxId(\"txid-uuid\", 5000) // 5 second timeout\n```\n\n## Optimistic Actions\n\nDefine actions with optimistic updates and server confirmation:\n\n```typescript\nconst db = createStreamDB({\n  streamOptions: { url: streamUrl, contentType: \"application/json\" },\n  state: schema,\n  actions: ({ db, stream }) => ({\n    addUser: {\n      // Optimistic update (runs immediately)\n      onMutate: (user) => {\n        db.collections.users.insert(user)\n      },\n      // Server mutation (runs async)\n      mutationFn: async (user) => {\n        const txid = crypto.randomUUID()\n\n        await stream.append(\n          JSON.stringify(\n            schema.users.insert({\n              value: user,\n              headers: { txid },\n            })\n          )\n        )\n\n        // Wait for confirmation\n        await db.utils.awaitTxId(txid)\n      },\n    },\n\n    updateUser: {\n      onMutate: ({ id, updates }) => {\n        db.collections.users.update(id, (draft) => {\n          Object.assign(draft, updates)\n        })\n      },\n      mutationFn: async ({ id, updates }) => {\n        const txid = crypto.randomUUID()\n        const current = await db.collections.users.get(id)\n\n        await stream.append(\n          JSON.stringify(\n            schema.users.update({\n              value: { ...current, ...updates },\n              oldValue: current,\n              headers: { txid },\n            })\n          )\n        )\n\n        await db.utils.awaitTxId(txid)\n      },\n    },\n  }),\n})\n\n// Call actions\nawait db.actions.addUser({ id: \"1\", name: \"Kyle\", email: \"kyle@example.com\" })\nawait db.actions.updateUser({ id: \"1\", updates: { name: \"Kyle Mathews\" } })\n```\n\n## Framework Integration\n\nUse TanStack DB's framework adapters for reactive queries:\n\n### React\n\n```typescript\nimport { useLiveQuery } from '@tanstack/react-db'\nimport { eq } from '@tanstack/db'\n\nfunction UserProfile({ userId }: { userId: string }) {\n  const userQuery = useLiveQuery((q) =>\n    q.from({ users: db.collections.users })\n      .where(({ users }) => eq(users.id, userId))\n      .findOne()\n  )\n\n  if (userQuery.isLoading()) return <div>Loading...</div>\n  if (!userQuery.data) return <div>Not found</div>\n\n  return (\n    <div>\n      <h1>{userQuery.data.name}</h1>\n      <p>{userQuery.data.email}</p>\n    </div>\n  )\n}\n```\n\nSee [@tanstack/react-db docs](https://tanstack.com/db/latest/docs/framework/react/overview) for more.\n\n### Solid.js\n\n```typescript\nimport { useLiveQuery } from '@tanstack/solid-db'\nimport { eq } from '@tanstack/db'\n\nfunction MessageList() {\n  const messagesQuery = useLiveQuery((q) =>\n    q.from({ messages: db.collections.messages })\n      .orderBy(({ messages }) => messages.timestamp, 'desc')\n      .limit(50)\n  )\n\n  return (\n    <For each={messagesQuery.data}>\n      {(message) => <MessageCard message={message} />}\n    </For>\n  )\n}\n```\n\nSee [@tanstack/solid-db docs](https://tanstack.com/db/latest/docs/framework/solid/overview) for more.\n\n## Common Patterns\n\n### Key/Value Store\n\n```typescript\nconst schema = createStateSchema({\n  config: {\n    schema: configSchema,\n    type: \"config\",\n    primaryKey: \"key\",\n  },\n})\n\n// Set value\nawait stream.append(\n  JSON.stringify(\n    schema.config.insert({\n      value: { key: \"theme\", value: \"dark\" },\n    })\n  )\n)\n\n// Query value reactively\nconst themeQuery = useLiveQuery((q) =>\n  q\n    .from({ config: db.collections.config })\n    .where(({ config }) => eq(config.key, \"theme\"))\n    .findOne()\n)\n```\n\n### Presence Tracking\n\n```typescript\nconst schema = createStateSchema({\n  presence: {\n    schema: presenceSchema,\n    type: \"presence\",\n    primaryKey: \"userId\",\n  },\n})\n\n// Update presence\nawait stream.append(\n  JSON.stringify(\n    schema.presence.update({\n      value: {\n        userId: \"kyle\",\n        status: \"online\",\n        lastSeen: Date.now(),\n      },\n    })\n  )\n)\n\n// Query presence with TanStack DB\nconst presenceQuery = useLiveQuery((q) =>\n  q\n    .from({ presence: db.collections.presence })\n    .where(({ presence }) => eq(presence.status, \"online\"))\n)\n```\n\n### Multi-Type Chat Room\n\n```typescript\nconst schema = createStateSchema({\n  users: { schema: userSchema, type: \"user\", primaryKey: \"id\" },\n  messages: { schema: messageSchema, type: \"message\", primaryKey: \"id\" },\n  reactions: { schema: reactionSchema, type: \"reaction\", primaryKey: \"id\" },\n  typing: { schema: typingSchema, type: \"typing\", primaryKey: \"userId\" },\n})\n\n// Different types coexist in the same stream\nawait stream.append(JSON.stringify(schema.users.insert({ value: user })))\nawait stream.append(JSON.stringify(schema.messages.insert({ value: message })))\nawait stream.append(\n  JSON.stringify(schema.reactions.insert({ value: reaction }))\n)\n```\n\n## Best Practices\n\n### 1. Use Object Values\n\nStreamDB requires object values (not primitives) for the primary key pattern:\n\n```typescript\n// ❌ Won't work\n{ type: 'count', key: 'views', value: 42 }\n\n// ✅ Works\n{ type: 'count', key: 'views', value: { count: 42 } }\n```\n\n### 2. Always Call close()\n\n```typescript\nuseEffect(() => {\n  const db = createStreamDB({ streamOptions, state: schema })\n\n  return () => db.close() // Cleanup on unmount\n}, [])\n```\n\n### 3. Validate at Boundaries\n\nUse Standard Schema to validate data at system boundaries:\n\n```typescript\nconst userSchema = z.object({\n  id: z.string().uuid(),\n  email: z.string().email(),\n  age: z.number().min(0).max(150),\n})\n```\n\n### 4. Use Transaction IDs\n\nFor critical operations, always use transaction IDs to ensure confirmation:\n\n```typescript\nconst txid = crypto.randomUUID()\nawait stream.append(\n  JSON.stringify(schema.users.insert({ value: user, headers: { txid } }))\n)\nawait db.utils.awaitTxId(txid, 10000) // Wait up to 10 seconds\n```\n\n### 5. Handle Errors Gracefully\n\n```typescript\ntry {\n  await db.actions.addUser(user)\n} catch (error) {\n  if (error.message.includes(\"Timeout\")) {\n    // Handle timeout\n  } else {\n    // Handle other errors\n  }\n}\n```\n\n## API Reference\n\n### Types\n\n```typescript\nexport type Operation = \"insert\" | \"update\" | \"delete\"\n\nexport interface ChangeEvent<T = unknown> {\n  type: string\n  key: string\n  value?: T\n  old_value?: T\n  headers: ChangeHeaders\n}\n\nexport interface ChangeHeaders {\n  operation: Operation\n  txid?: string\n  timestamp?: string\n}\n\nexport interface ControlEvent {\n  headers: {\n    control: \"snapshot-start\" | \"snapshot-end\" | \"reset\"\n    offset?: string\n  }\n}\n\nexport type StateEvent<T = unknown> = ChangeEvent<T> | ControlEvent\n```\n\n### Functions\n\n```typescript\n// Create a state schema with typed collections and event helpers\nexport function createStateSchema<\n  T extends Record<string, CollectionDefinition>,\n>(collections: T): StateSchema<T>\n\n// Create a stream-backed database\nexport async function createStreamDB<\n  TDef extends StreamStateDefinition,\n  TActions extends Record<string, ActionDefinition<any>>,\n>(\n  options: CreateStreamDBOptions<TDef, TActions>\n): Promise<StreamDB<TDef> | StreamDBWithActions<TDef, TActions>>\n```\n\n### Classes\n\n```typescript\nexport class MaterializedState {\n  apply(event: ChangeEvent): void\n  applyBatch(events: ChangeEvent[]): void\n  get<T>(type: string, key: string): T | undefined\n  getType(type: string): Map<string, unknown>\n  clear(): void\n  readonly typeCount: number\n  readonly types: string[]\n}\n```\n\n## License\n\nApache-2.0\n\n## Learn More\n\n- [STATE-PROTOCOL.md](./STATE-PROTOCOL.md) - Full protocol specification\n- [Durable Streams Protocol](../../PROTOCOL.md) - Base protocol\n- [Standard Schema](https://standardschema.dev/) - Schema validation\n- [TanStack DB](https://tanstack.com/db) - Reactive collections\n","readmeFilename":"README.md"}