{"_id":"@ws-kit/core","_rev":"15-0bb44c91e6efb39426e073f8b9a129f5","name":"@ws-kit/core","dist-tags":{"latest":"0.10.1"},"versions":{"0.0.1":{"name":"@ws-kit/core","version":"0.0.1","keywords":["websocket","router","type-safe","adapter","validation","typescript","real-time","server","messaging","framework","event-driven","infrastructure","websocket-server","rpc","pluggable","pub-sub"],"author":{"name":"Konstantin Tarkus"},"license":"MIT","_id":"@ws-kit/core@0.0.1","maintainers":[{"name":"koistya","email":"hello@tarkus.me"},{"name":"kriasoft-bot","email":"kriasoft@gmail.com"}],"homepage":"https://kriasoft.com/ws-kit/","bugs":{"url":"https://github.com/kriasoft/ws-kit/issues"},"dist":{"shasum":"9a11a9a9801ec5d761d99a6ab2dadc7dcd9445ab","tarball":"https://registry.npmjs.org/@ws-kit/core/-/core-0.0.1.tgz","fileCount":47,"integrity":"sha512-KRGBWh9kJeXl4tZDbic5QLdaIyLrXeMH4ra2iWjdmlVjijELeWz7FxrEDnEY+s/0RZq5ebf3+DJczqppKU94ZQ==","signatures":[{"sig":"MEQCIF5vmP9sNPeqSktTFsz/6uFALID8wXdHLRBHx4Y4oXQoAiBO2quR14PMavZKQMVuWMr4Y5hfAnv47lHjkxvy6lSxLg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ws-kit%2fcore@0.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":344803},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"funding":{"url":"https://github.com/sponsors/koistya","type":"github"},"gitHead":"b9c8c072c034be1fd4ee20cc455325a269b3339d","_npmUser":{"name":"kriasoft-bot","email":"kriasoft@gmail.com"},"repository":{"url":"git+https://github.com/kriasoft/ws-kit.git","type":"git","directory":"packages/core"},"_npmVersion":"11.6.1","description":"WS-Kit — Type-safe WebSocket router for Bun and Cloudflare with pluggable validators and zero vendor lock-in","directories":{},"sideEffects":false,"_nodeVersion":"24.11.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_0.0.1_1761906589462_0.09628102149954931","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@ws-kit/core","version":"0.1.0","keywords":["websocket","router","type-safe","adapter","validation","typescript","real-time","server","messaging","framework","event-driven","infrastructure","websocket-server","rpc","pluggable","pub-sub"],"author":{"name":"Konstantin Tarkus"},"license":"MIT","_id":"@ws-kit/core@0.1.0","maintainers":[{"name":"koistya","email":"hello@tarkus.me"},{"name":"kriasoft-bot","email":"kriasoft@gmail.com"}],"homepage":"https://kriasoft.com/ws-kit/","bugs":{"url":"https://github.com/kriasoft/ws-kit/issues"},"dist":{"shasum":"b2e0038c21b22a1af6bd36e1c2ee38b782ea94b7","tarball":"https://registry.npmjs.org/@ws-kit/core/-/core-0.1.0.tgz","fileCount":47,"integrity":"sha512-tWpXqCdhIn5onVz8dsClvo/HKr2Y64mDgYXwZ+BbsUtkrr4bfO1YIrDA8U85+tiN4WJO6VsMRMO6n7vt+uNBxQ==","signatures":[{"sig":"MEUCIHJHKWzjvEbs2eCdnsUp5qJCl47w0A2LCu5unVUGsB2YAiEAquFKVp3MZvgiSEqfMIuCEuMN3hQddNj5qPrOzURD8as=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ws-kit%2fcore@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":345239},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"funding":{"url":"https://github.com/sponsors/koistya","type":"github"},"gitHead":"c672dd7f80c4d00adfebcb00047026dad644d772","_npmUser":{"name":"kriasoft-bot","email":"kriasoft@gmail.com"},"repository":{"url":"git+https://github.com/kriasoft/ws-kit.git","type":"git","directory":"packages/core"},"_npmVersion":"11.6.1","description":"WS-Kit — Type-safe WebSocket router for Bun and Cloudflare with pluggable validators and zero vendor lock-in","directories":{},"sideEffects":false,"_nodeVersion":"24.11.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_0.1.0_1761922524377_0.34248985033402946","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@ws-kit/core","version":"0.2.0","keywords":["websocket","router","type-safe","adapter","validation","typescript","real-time","server","messaging","framework","event-driven","infrastructure","websocket-server","rpc","pluggable","pub-sub"],"author":{"name":"Konstantin Tarkus"},"license":"MIT","_id":"@ws-kit/core@0.2.0","maintainers":[{"name":"koistya","email":"hello@tarkus.me"},{"name":"kriasoft-bot","email":"kriasoft@gmail.com"}],"homepage":"https://kriasoft.com/ws-kit/","bugs":{"url":"https://github.com/kriasoft/ws-kit/issues"},"dist":{"shasum":"2b472093731a63654c6f20edd5bf6fb86045f330","tarball":"https://registry.npmjs.org/@ws-kit/core/-/core-0.2.0.tgz","fileCount":47,"integrity":"sha512-Ao5wS/PUuZfaixUGqYN8PE6jomnPEkaupiNEDveGwr96gT+rBhQrORKXVCTN57UiZaIGt3sIgfEyePAfxTrHig==","signatures":[{"sig":"MEQCIEbQS5/jcm5dNuezmL/4TfEKFor1T/cA4R0mm3BfH2AqAiAtJywEL/Hm5VtL32d+a6GGt0e8Rmq8Djz2oz6lUaCxog==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ws-kit%2fcore@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":378079},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"funding":{"url":"https://github.com/sponsors/koistya","type":"github"},"gitHead":"74203ef33af9090627efc815ca51f0a9a4c7ddff","_npmUser":{"name":"kriasoft-bot","email":"kriasoft@gmail.com"},"repository":{"url":"git+https://github.com/kriasoft/ws-kit.git","type":"git","directory":"packages/core"},"_npmVersion":"11.6.1","description":"WS-Kit — Type-safe WebSocket router for Bun and Cloudflare with pluggable validators and zero vendor lock-in","directories":{},"sideEffects":false,"_nodeVersion":"24.11.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_0.2.0_1762007502775_0.7343205979688412","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@ws-kit/core","version":"0.3.0","keywords":["websocket","router","type-safe","adapter","validation","typescript","real-time","server","messaging","framework","event-driven","infrastructure","websocket-server","rpc","pluggable","pub-sub"],"author":{"name":"Konstantin Tarkus"},"license":"MIT","_id":"@ws-kit/core@0.3.0","maintainers":[{"name":"koistya","email":"hello@tarkus.me"},{"name":"kriasoft-bot","email":"kriasoft@gmail.com"}],"homepage":"https://kriasoft.com/ws-kit/","bugs":{"url":"https://github.com/kriasoft/ws-kit/issues"},"dist":{"shasum":"73313b07541cf2826c8205b8974b4e04c242fb2a","tarball":"https://registry.npmjs.org/@ws-kit/core/-/core-0.3.0.tgz","fileCount":47,"integrity":"sha512-bIyVk/ZLMMlFeqpQp7mxd8WNL+/gSMbWbRhmVqIT3g6kcgtv8yB1VYmxwDDtZuWi9Rav/EIYXRt5P9JE7egPdg==","signatures":[{"sig":"MEQCIADrne3YqxXmb/z8vkgYDzf1DDbnFLt1a/dnVuvoqvA+AiA4YjR/9plUQ4AvhQBwfoUpHr2MRFmkUroTFADRrsI9nA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ws-kit%2fcore@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":384351},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"funding":{"url":"https://github.com/sponsors/koistya","type":"github"},"gitHead":"a508fe35340aa4427f7d0db313189088a115a25e","_npmUser":{"name":"kriasoft-bot","email":"kriasoft@gmail.com"},"repository":{"url":"git+https://github.com/kriasoft/ws-kit.git","type":"git","directory":"packages/core"},"_npmVersion":"11.6.1","description":"WS-Kit — Type-safe WebSocket router for Bun and Cloudflare with pluggable validators and zero vendor lock-in","directories":{},"sideEffects":false,"_nodeVersion":"24.11.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_0.3.0_1762038336759_0.8579934309303856","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@ws-kit/core","version":"0.4.0","keywords":["websocket","router","type-safe","adapter","validation","typescript","real-time","server","messaging","framework","event-driven","infrastructure","websocket-server","rpc","pluggable","pub-sub"],"author":{"name":"Konstantin Tarkus"},"license":"MIT","_id":"@ws-kit/core@0.4.0","maintainers":[{"name":"koistya","email":"hello@tarkus.me"},{"name":"kriasoft-bot","email":"kriasoft@gmail.com"}],"homepage":"https://kriasoft.com/ws-kit/","bugs":{"url":"https://github.com/kriasoft/ws-kit/issues"},"dist":{"shasum":"8c7e57e91658f248c2a65db57c7cb4c378100d61","tarball":"https://registry.npmjs.org/@ws-kit/core/-/core-0.4.0.tgz","fileCount":46,"integrity":"sha512-/GECGd/y/PSiFjK6ReBrtzK0fpggaHBeLcU2CbC0lRMhuSVXnLDvrXqO6j46ky9hZKTI0YNFM4A0wGIwf1OBdQ==","signatures":[{"sig":"MEQCIGBJbankpJVlFCdlwujMfR3tSKobfZImqGgMDGsIGWtVAiBjM/aHOTyBPbYG48bUqpXJWkuimiSIwHYN5DLJnncKeg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ws-kit%2fcore@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":390187},"main":"./index.js","type":"module","types":"./index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./index.d.ts","default":"./index.js"}},"funding":{"url":"https://github.com/sponsors/koistya","type":"github"},"gitHead":"f883719f2aa148907f6d11a70d54f0ffa3dcbba2","_npmUser":{"name":"kriasoft-bot","email":"kriasoft@gmail.com"},"repository":{"url":"git+https://github.com/kriasoft/ws-kit.git","type":"git","directory":"packages/core"},"_npmVersion":"11.6.1","description":"WS-Kit — Type-safe WebSocket router for Bun and Cloudflare with pluggable validators and zero vendor lock-in","directories":{},"sideEffects":false,"_nodeVersion":"24.11.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_0.4.0_1762098006069_0.8241174757637975","host":"s3://npm-registry-packages-npm-production"}},"0.4.1":{"name":"@ws-kit/core","version":"0.4.1","keywords":["websocket","router","type-safe","adapter","validation","typescript","real-time","server","messaging","framework","event-driven","infrastructure","websocket-server","rpc","pluggable","pub-sub"],"author":{"name":"Konstantin Tarkus"},"license":"MIT","_id":"@ws-kit/core@0.4.1","maintainers":[{"name":"koistya","email":"hello@tarkus.me"},{"name":"kriasoft-bot","email":"kriasoft@gmail.com"}],"homepage":"https://kriasoft.com/ws-kit/","bugs":{"url":"https://github.com/kriasoft/ws-kit/issues"},"dist":{"shasum":"c0613e880ab04be8f32310d55964c5119aad2c06","tarball":"https://registry.npmjs.org/@ws-kit/core/-/core-0.4.1.tgz","fileCount":48,"integrity":"sha512-EuiP+XKSTBoktN63ONzYUFodEeQFcuX6ZBooXfzm6pjMg3RxbjOGPP1gnfsX2k9fThuQNaRPia7dmkq93zw/KA==","signatures":[{"sig":"MEUCIATTy5RSXhvrjDKSXb1qMbf9BRim1lXhdz7fXhgRpo2qAiEA0WkZCuuHWgk4BZ7hTls2aSCsqqifvxwjL0uHn/EoSsk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ws-kit%2fcore@0.4.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":399370},"main":"./index.js","type":"module","types":"./index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./index.d.ts","default":"./index.js"}},"funding":{"url":"https://github.com/sponsors/koistya","type":"github"},"gitHead":"5b2f4fded8a1649c1f9c614b9939ea1626653e36","_npmUser":{"name":"kriasoft-bot","email":"kriasoft@gmail.com"},"repository":{"url":"git+https://github.com/kriasoft/ws-kit.git","type":"git","directory":"packages/core"},"_npmVersion":"11.6.1","description":"WS-Kit — Type-safe WebSocket router for Bun and Cloudflare with pluggable validators and zero vendor lock-in","directories":{},"sideEffects":false,"_nodeVersion":"24.11.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_0.4.1_1762099023970_0.6062696054445202","host":"s3://npm-registry-packages-npm-production"}},"0.4.2":{"name":"@ws-kit/core","version":"0.4.2","keywords":["websocket","router","type-safe","adapter","validation","typescript","real-time","server","messaging","framework","event-driven","infrastructure","websocket-server","rpc","pluggable","pub-sub"],"author":{"name":"Konstantin Tarkus"},"license":"MIT","_id":"@ws-kit/core@0.4.2","maintainers":[{"name":"koistya","email":"hello@tarkus.me"},{"name":"kriasoft-bot","email":"kriasoft@gmail.com"}],"homepage":"https://kriasoft.com/ws-kit/","bugs":{"url":"https://github.com/kriasoft/ws-kit/issues"},"dist":{"shasum":"076b7c13dc83f76b1be4c096bebcccea797ba8ee","tarball":"https://registry.npmjs.org/@ws-kit/core/-/core-0.4.2.tgz","fileCount":48,"integrity":"sha512-4Rho8Grub7F37UBaHQ46dOnVhaEz96SE7qqSZhURsfXyF6TiaJ4EXwn/759SanBP1Mo7BvNYbxzrdq9SfR+SJw==","signatures":[{"sig":"MEQCIE52tg58zysHHopQXaiEAN4qMYy3WsjBHCssi4g2A9yOAiBB79iGxaFQOWqFw8TwKmHh7Dpn6cjHFrs8ZyZdmaMH4w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ws-kit%2fcore@0.4.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":400108},"main":"./index.js","type":"module","types":"./index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./index.d.ts","default":"./index.js"}},"funding":{"url":"https://github.com/sponsors/koistya","type":"github"},"gitHead":"b5da3ed1cb864d56a84152385ef6155ab940ce3c","_npmUser":{"name":"kriasoft-bot","email":"kriasoft@gmail.com"},"repository":{"url":"git+https://github.com/kriasoft/ws-kit.git","type":"git","directory":"packages/core"},"_npmVersion":"11.6.1","description":"WS-Kit — Type-safe WebSocket router for Bun and Cloudflare with pluggable validators and zero vendor lock-in","directories":{},"sideEffects":false,"_nodeVersion":"24.11.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_0.4.2_1762107811176_0.656073964547158","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@ws-kit/core","version":"0.5.0","keywords":["websocket","router","type-safe","adapter","validation","typescript","real-time","server","messaging","framework","event-driven","infrastructure","websocket-server","rpc","pluggable","pub-sub"],"author":{"name":"Konstantin Tarkus"},"license":"MIT","_id":"@ws-kit/core@0.5.0","maintainers":[{"name":"koistya","email":"hello@tarkus.me"},{"name":"kriasoft-bot","email":"kriasoft@gmail.com"}],"homepage":"https://kriasoft.com/ws-kit/","bugs":{"url":"https://github.com/kriasoft/ws-kit/issues"},"dist":{"shasum":"31ca0e5068b5371bb8254f1feca5eef9643aea4c","tarball":"https://registry.npmjs.org/@ws-kit/core/-/core-0.5.0.tgz","fileCount":48,"integrity":"sha512-Oyg8pZTEks/UsJEQFbiH598UJe5f7kvIC4C6qWMNCYvmC8pOPj7w1m0DfARIPQIzwlEYe30A3Th3yJR8XzzfoQ==","signatures":[{"sig":"MEYCIQCM9niIFpK1aPsm97+5h5p6QhI1MXxW+rQ5T5zOrH3ooAIhAPdxzqlBAuKBAKYrArztwA3OrgwsMzMJe+qGJ6430Twf","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ws-kit%2fcore@0.5.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":412221},"main":"./index.js","type":"module","types":"./index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./index.d.ts","default":"./index.js"}},"funding":{"url":"https://github.com/sponsors/koistya","type":"github"},"gitHead":"b0cd18d7e3cc047c96ed89f30cf6e36a644471d0","_npmUser":{"name":"kriasoft-bot","email":"kriasoft@gmail.com"},"repository":{"url":"git+https://github.com/kriasoft/ws-kit.git","type":"git","directory":"packages/core"},"_npmVersion":"11.6.1","description":"WS-Kit — Type-safe WebSocket router for Bun and Cloudflare with pluggable validators and zero vendor lock-in","directories":{},"sideEffects":false,"_nodeVersion":"24.11.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_0.5.0_1762458968162_0.4870448146623736","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"name":"@ws-kit/core","version":"0.6.0","keywords":["websocket","router","type-safe","adapter","validation","typescript","real-time","server","messaging","framework","event-driven","infrastructure","websocket-server","rpc","pluggable","pub-sub"],"author":{"name":"Konstantin Tarkus"},"license":"MIT","_id":"@ws-kit/core@0.6.0","maintainers":[{"name":"koistya","email":"hello@tarkus.me"},{"name":"kriasoft-bot","email":"kriasoft@gmail.com"}],"homepage":"https://kriasoft.com/ws-kit/","bugs":{"url":"https://github.com/kriasoft/ws-kit/issues"},"dist":{"shasum":"e6863facf3feefbaaebea2b8eee03f295c2bd2cf","tarball":"https://registry.npmjs.org/@ws-kit/core/-/core-0.6.0.tgz","fileCount":48,"integrity":"sha512-T+Mx3dfwSuOtenjcaNLDFyw6BjuGAcgXdisxgXSpraCeTFZOwkqRzkWs691RV5eKr2ZCgtsXqEGnh62DUwl+zw==","signatures":[{"sig":"MEQCIE6nQOb2Wl4ijkzxhEhdD7KsqwxU+SVczhrLwpO4OxA/AiAB2EIU3w5aXnUX6GF6L0jJKK81FXac0LLPUGt9Upykgw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ws-kit%2fcore@0.6.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":437794},"main":"./index.js","type":"module","types":"./index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./index.d.ts","default":"./index.js"}},"funding":{"url":"https://github.com/sponsors/koistya","type":"github"},"gitHead":"cc09904f7c67deaa4c45f93c5181916f92ea7112","_npmUser":{"name":"kriasoft-bot","email":"kriasoft@gmail.com"},"repository":{"url":"git+https://github.com/kriasoft/ws-kit.git","type":"git","directory":"packages/core"},"_npmVersion":"11.6.1","description":"WS-Kit — Type-safe WebSocket router for Bun and Cloudflare with pluggable validators and zero vendor lock-in","directories":{},"sideEffects":false,"_nodeVersion":"24.11.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_0.6.0_1762522382638_0.5479272121394752","host":"s3://npm-registry-packages-npm-production"}},"0.7.0":{"name":"@ws-kit/core","version":"0.7.0","keywords":["websocket","router","type-safe","adapter","validation","typescript","real-time","server","messaging","framework","event-driven","infrastructure","websocket-server","rpc","pluggable","pub-sub"],"author":{"name":"Konstantin Tarkus"},"license":"MIT","_id":"@ws-kit/core@0.7.0","maintainers":[{"name":"koistya","email":"hello@tarkus.me"},{"name":"kriasoft-bot","email":"kriasoft@gmail.com"}],"homepage":"https://kriasoft.com/ws-kit/","bugs":{"url":"https://github.com/kriasoft/ws-kit/issues"},"dist":{"shasum":"dae9b05913ba61c99fdc5992cfb667ace851dfc6","tarball":"https://registry.npmjs.org/@ws-kit/core/-/core-0.7.0.tgz","fileCount":48,"integrity":"sha512-MF25G/Fb8gHjDoV7oPSznoto6w3FQu1iXCYuqN5XU3vQPa2gTxnwLbpMU9HzYNg7y9A+NqGhz/FIrpMq5xbY/Q==","signatures":[{"sig":"MEUCIFFMajn1/mwegJyqDUkUOPiSFaUbvL9W+l66KuQJOSrwAiEAhnDfMxk17kg5uSSBuh5XKJxxCMWGtZr7QZfXSugea0k=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ws-kit%2fcore@0.7.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":444789},"main":"./index.js","type":"module","types":"./index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./index.d.ts","default":"./index.js"}},"funding":{"url":"https://github.com/sponsors/koistya","type":"github"},"gitHead":"570635e7dd40e411559a36f340d0e44a17f71388","_npmUser":{"name":"kriasoft-bot","email":"kriasoft@gmail.com"},"repository":{"url":"git+https://github.com/kriasoft/ws-kit.git","type":"git","directory":"packages/core"},"_npmVersion":"11.6.1","description":"WS-Kit — Type-safe WebSocket router for Bun and Cloudflare with pluggable validators and zero vendor lock-in","directories":{},"sideEffects":false,"_nodeVersion":"24.11.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_0.7.0_1762643092408_0.33134385241803166","host":"s3://npm-registry-packages-npm-production"}},"0.8.0":{"name":"@ws-kit/core","version":"0.8.0","keywords":["websocket","router","type-safe","rpc","pub-sub"],"author":{"name":"Konstantin Tarkus"},"license":"MIT","_id":"@ws-kit/core@0.8.0","maintainers":[{"name":"koistya","email":"hello@tarkus.me"},{"name":"kriasoft-bot","email":"kriasoft@gmail.com"}],"homepage":"https://kriasoft.com/ws-kit/","bugs":{"url":"https://github.com/kriasoft/ws-kit/issues"},"dist":{"shasum":"ddb32cdd1c5cea43d2cd13d1fee5d13955a94820","tarball":"https://registry.npmjs.org/@ws-kit/core/-/core-0.8.0.tgz","fileCount":244,"integrity":"sha512-y/63WqFBxSdPkatK+YWW31LhEY0qefpiacakEJSjJ3+Q8ZyfnsZpXJfLJb/H16ai/dNNeFDP2qQkhJloTroLqg==","signatures":[{"sig":"MEUCID/Nf38pIkvizAGQwKO2eEXIv2eVW/HoCTtGhqFb8bbkAiEAwBhrrmB7sGdqfqtS/K84dA/RPnoAzH+vLu4tMXDbvMo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ws-kit%2fcore@0.8.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":557987},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./plugin":{"types":"./dist/plugin/index.d.ts","default":"./dist/plugin/index.js"},"./pubsub":{"types":"./dist/capabilities/pubsub/index.d.ts","default":"./dist/capabilities/pubsub/index.js"},"./testing":{"types":"./dist/testing/index.d.ts","default":"./dist/testing/index.js"},"./internal":{"types":"./dist/internal.d.ts","default":"./dist/internal.js"}},"funding":{"url":"https://github.com/sponsors/koistya","type":"github"},"gitHead":"b1d18ca9b170c34c784ff4b4d5b03d44e13148b3","scripts":{"test":"bun test","build":"tsc","typecheck":"tsc --build tsconfig.check.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:92943fdc-2ec1-434c-aea9-efe216310035"}},"repository":{"url":"git+https://github.com/kriasoft/ws-kit.git","type":"git","directory":"packages/core"},"_npmVersion":"11.6.2","description":"Tiny, type-safe WebSocket router","directories":{},"sideEffects":false,"_nodeVersion":"24.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.1.13","@types/bun":"^1.3.3","typescript":"^5.0.0","@ws-kit/bun":"^0.8.0","@ws-kit/zod":"^0.8.0","@ws-kit/memory":"^0.8.0","@ws-kit/pubsub":"^0.8.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.8.0_1764547610223_0.02032793237201269","host":"s3://npm-registry-packages-npm-production"}},"0.8.1":{"name":"@ws-kit/core","version":"0.8.1","keywords":["websocket","router","type-safe","rpc","pub-sub"],"author":{"name":"Konstantin Tarkus"},"license":"MIT","_id":"@ws-kit/core@0.8.1","maintainers":[{"name":"koistya","email":"hello@tarkus.me"},{"name":"kriasoft-bot","email":"kriasoft@gmail.com"}],"homepage":"https://kriasoft.com/ws-kit/","bugs":{"url":"https://github.com/kriasoft/ws-kit/issues"},"dist":{"shasum":"5da7bf014b8760db4aa349206d0148ce66e10f37","tarball":"https://registry.npmjs.org/@ws-kit/core/-/core-0.8.1.tgz","fileCount":244,"integrity":"sha512-7yFO2XGvPUc8iiRlFxOj1uWPKwW1xcLoRG+IC5/flcE0lBXzm1XWYJkpajudaKl0Cb17+96vvDSAz+bHHDyzXg==","signatures":[{"sig":"MEUCIHbwg/ZZw8d5ebnEFS3/T5SRiPuV3dE9MPnpeXnmLmUsAiEAj8O8Tf3RazzcCEISPM1O1RzvbiEj10uX/Ui37J/RReU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ws-kit%2fcore@0.8.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":559959},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./plugin":{"types":"./dist/plugin/index.d.ts","default":"./dist/plugin/index.js"},"./pubsub":{"types":"./dist/capabilities/pubsub/index.d.ts","default":"./dist/capabilities/pubsub/index.js"},"./testing":{"types":"./dist/testing/index.d.ts","default":"./dist/testing/index.js"},"./internal":{"types":"./dist/internal.d.ts","default":"./dist/internal.js"}},"funding":{"url":"https://github.com/sponsors/koistya","type":"github"},"gitHead":"7ba20c305112106486d082bd4241806667c98b8d","scripts":{"test":"bun test","build":"tsc","typecheck":"tsc --build tsconfig.check.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:92943fdc-2ec1-434c-aea9-efe216310035"}},"repository":{"url":"git+https://github.com/kriasoft/ws-kit.git","type":"git","directory":"packages/core"},"_npmVersion":"11.6.2","description":"Tiny, type-safe WebSocket router","directories":{},"sideEffects":false,"_nodeVersion":"24.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.1.13","@types/bun":"^1.3.3","typescript":"^5.0.0","@ws-kit/bun":"^0.8.1","@ws-kit/zod":"^0.8.1","@ws-kit/memory":"^0.8.0","@ws-kit/pubsub":"^0.8.1"},"_npmOperationalInternal":{"tmp":"tmp/core_0.8.1_1764550070791_0.4672664352065261","host":"s3://npm-registry-packages-npm-production"}},"0.9.0":{"name":"@ws-kit/core","version":"0.9.0","keywords":["websocket","router","type-safe","rpc","pub-sub"],"author":{"name":"Konstantin Tarkus"},"license":"MIT","_id":"@ws-kit/core@0.9.0","maintainers":[{"name":"koistya","email":"hello@tarkus.me"},{"name":"kriasoft-bot","email":"kriasoft@gmail.com"}],"homepage":"https://kriasoft.com/ws-kit/","bugs":{"url":"https://github.com/kriasoft/ws-kit/issues"},"dist":{"shasum":"96cd893807944d7c2036ab2934b09dce14c32658","tarball":"https://registry.npmjs.org/@ws-kit/core/-/core-0.9.0.tgz","fileCount":248,"integrity":"sha512-BslWifIZNm8fx9rdM5b62M40HbGTdf8MZadlAoVP21zm1xlHP8xwDJjlpvnf6bUHD9HCsyWqNOrLk0JcjoeAqA==","signatures":[{"sig":"MEYCIQCjoox5PzVx8sFnoUzOJxQLE4f6ZoxjHglsHbm3I3r9PwIhAKXbyLo4E8q04nhpvfm+RUiH6lxl5LioruXpxkXnOhTa","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ws-kit%2fcore@0.9.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":598922},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./plugin":{"types":"./dist/plugin/index.d.ts","default":"./dist/plugin/index.js"},"./pubsub":{"types":"./dist/capabilities/pubsub/index.d.ts","default":"./dist/capabilities/pubsub/index.js"},"./testing":{"types":"./dist/testing/index.d.ts","default":"./dist/testing/index.js"},"./internal":{"types":"./dist/internal.d.ts","default":"./dist/internal.js"}},"funding":{"url":"https://github.com/sponsors/koistya","type":"github"},"gitHead":"7f41d1c07b55142e2f575372066b7db0a6cc5362","scripts":{"test":"bun test","build":"tsc","typecheck":"tsc --build tsconfig.check.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:92943fdc-2ec1-434c-aea9-efe216310035"}},"repository":{"url":"git+https://github.com/kriasoft/ws-kit.git","type":"git","directory":"packages/core"},"_npmVersion":"11.6.2","description":"Tiny, type-safe WebSocket router","directories":{},"sideEffects":false,"_nodeVersion":"24.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.1.13","@types/bun":"^1.3.3","typescript":"^5.0.0","@ws-kit/bun":"^0.9.0","@ws-kit/zod":"^0.9.0","@ws-kit/memory":"^0.9.0","@ws-kit/pubsub":"^0.9.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.9.0_1764885621891_0.6807560873919194","host":"s3://npm-registry-packages-npm-production"}},"0.10.0":{"name":"@ws-kit/core","version":"0.10.0","keywords":["websocket","router","type-safe","rpc","pub-sub"],"author":{"name":"Konstantin Tarkus"},"license":"MIT","_id":"@ws-kit/core@0.10.0","maintainers":[{"name":"koistya","email":"hello@tarkus.me"},{"name":"kriasoft-bot","email":"kriasoft@gmail.com"}],"homepage":"https://kriasoft.com/ws-kit/","bugs":{"url":"https://github.com/kriasoft/ws-kit/issues"},"dist":{"shasum":"82b3542a9048ebdd392e28a4df2e3aac95bba20a","tarball":"https://registry.npmjs.org/@ws-kit/core/-/core-0.10.0.tgz","fileCount":248,"integrity":"sha512-SIioevAT2YYvSYSWAUmz3QyHYgS+xNtKIXYmn+jq3Cu3j4wthjLu2S6xe8DuSD18WUxekMDJVxu3RuM9wDy8+Q==","signatures":[{"sig":"MEYCIQCNx2iFIWjm25ZPZl/pYodC3sm0s0DnQzK4dwKJkN98hgIhAIZCZVTMIfusFN3iJESd8V/o8TpbpH7N3LOXEsGzHQ1D","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ws-kit%2fcore@0.10.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":599698},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./plugin":{"types":"./dist/plugin/index.d.ts","default":"./dist/plugin/index.js"},"./pubsub":{"types":"./dist/capabilities/pubsub/index.d.ts","default":"./dist/capabilities/pubsub/index.js"},"./testing":{"types":"./dist/testing/index.d.ts","default":"./dist/testing/index.js"},"./internal":{"types":"./dist/internal.d.ts","default":"./dist/internal.js"}},"funding":{"url":"https://github.com/sponsors/koistya","type":"github"},"gitHead":"b0a32263ddc6a0b9a54084519304f0bbb478538f","scripts":{"test":"bun test","build":"tsc","typecheck":"tsc --build tsconfig.check.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:92943fdc-2ec1-434c-aea9-efe216310035"}},"repository":{"url":"git+https://github.com/kriasoft/ws-kit.git","type":"git","directory":"packages/core"},"_npmVersion":"11.6.2","description":"Tiny, type-safe WebSocket router","directories":{},"sideEffects":false,"_nodeVersion":"24.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.1.13","@types/bun":"^1.3.3","typescript":"^5.0.0","@ws-kit/bun":"^0.10.0","@ws-kit/zod":"^0.10.0","@ws-kit/memory":"^0.10.0","@ws-kit/pubsub":"^0.10.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.10.0_1764943201204_0.10264938728640582","host":"s3://npm-registry-packages-npm-production"}},"0.10.1":{"name":"@ws-kit/core","version":"0.10.1","description":"Tiny, type-safe WebSocket router","type":"module","sideEffects":false,"license":"MIT","author":{"name":"Konstantin Tarkus"},"homepage":"https://kriasoft.com/ws-kit/","bugs":{"url":"https://github.com/kriasoft/ws-kit/issues"},"repository":{"type":"git","url":"git+https://github.com/kriasoft/ws-kit.git","directory":"packages/core"},"funding":{"type":"github","url":"https://github.com/sponsors/koistya"},"keywords":["websocket","router","type-safe","rpc","pub-sub"],"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./plugin":{"types":"./dist/plugin/index.d.ts","default":"./dist/plugin/index.js"},"./pubsub":{"types":"./dist/capabilities/pubsub/index.d.ts","default":"./dist/capabilities/pubsub/index.js"},"./testing":{"types":"./dist/testing/index.d.ts","default":"./dist/testing/index.js"},"./internal":{"types":"./dist/internal.d.ts","default":"./dist/internal.js"}},"main":"./dist/index.js","types":"./dist/index.d.ts","devDependencies":{"@types/bun":"^1.3.6","@ws-kit/bun":"^0.10.1","@ws-kit/memory":"^0.10.1","@ws-kit/pubsub":"^0.10.2","@ws-kit/zod":"^0.10.2","typescript":"^5.0.0","zod":"^4.1.13"},"engines":{"node":">=22"},"publishConfig":{"access":"public"},"scripts":{"build":"tsc","test":"bun test","typecheck":"tsc --build tsconfig.check.json"},"gitHead":"aaa14caf31960392a54c7475fbf458811407a7f9","_id":"@ws-kit/core@0.10.1","_nodeVersion":"24.12.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-CQa3wbvmUPJoaw/lNMpiHQPimaMaEb72oSfQ88748wIoEQzf8746L0q56TdZr3Mp6XzSMCcxyadNOAP4uXngag==","shasum":"ff99d9d7d3dd31f44f6955e508ea24f5b0a2537f","tarball":"https://registry.npmjs.org/@ws-kit/core/-/core-0.10.1.tgz","fileCount":248,"unpackedSize":606028,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ws-kit%2fcore@0.10.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCqOwN0sL+yp7SAxcm1Y2PQIskUHJqhKRKk/8rLL8Li2wIgaayCCo225TjAOsqKKSODuVTAVtLiLKssk5kAOHo0Jy8="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:92943fdc-2ec1-434c-aea9-efe216310035"}},"directories":{},"maintainers":[{"name":"koistya","email":"hello@tarkus.me"},{"name":"kriasoft-bot","email":"kriasoft@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/core_0.10.1_1768870685460_0.7637529774617997"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-31T10:29:49.384Z","modified":"2026-01-20T00:58:05.972Z","0.0.1":"2025-10-31T10:29:49.654Z","0.1.0":"2025-10-31T14:55:24.592Z","0.2.0":"2025-11-01T14:31:43.006Z","0.3.0":"2025-11-01T23:05:36.968Z","0.4.0":"2025-11-02T15:40:06.282Z","0.4.1":"2025-11-02T15:57:04.173Z","0.4.2":"2025-11-02T18:23:31.375Z","0.5.0":"2025-11-06T19:56:08.362Z","0.6.0":"2025-11-07T13:33:02.814Z","0.7.0":"2025-11-08T23:04:52.626Z","0.8.0":"2025-12-01T00:06:50.476Z","0.8.1":"2025-12-01T00:47:51.032Z","0.9.0":"2025-12-04T22:00:22.085Z","0.10.0":"2025-12-05T14:00:01.414Z","0.10.1":"2026-01-20T00:58:05.647Z"},"bugs":{"url":"https://github.com/kriasoft/ws-kit/issues"},"author":{"name":"Konstantin Tarkus"},"license":"MIT","homepage":"https://kriasoft.com/ws-kit/","keywords":["websocket","router","type-safe","rpc","pub-sub"],"repository":{"type":"git","url":"git+https://github.com/kriasoft/ws-kit.git","directory":"packages/core"},"description":"Tiny, type-safe WebSocket router","maintainers":[{"name":"koistya","email":"hello@tarkus.me"},{"name":"kriasoft-bot","email":"kriasoft@gmail.com"}],"readme":"# @ws-kit/core\n\n**Tiny, composable WebSocket router for Bun and Cloudflare.**\n\n## Core Concepts\n\n- **Minimal by design**: `createRouter()` contains only routing, not validation or pub/sub\n- **Plugin-driven**: Validators (Zod, Valibot) and Pub/Sub are added via plugins\n- **Capability-gated**: APIs exist only when enabled; no \"method throws disabled\"\n- **Type-safe**: Full TypeScript inference from schema through handlers\n- **Platform-agnostic**: Works with any platform (Bun, Cloudflare, Node.js)\n\n## Import Patterns\n\n`createRouter()` is the base router factory available from `@ws-kit/core`. It's also re-exported from validator packages (`@ws-kit/zod`, `@ws-kit/valibot`) for convenience:\n\n- **`@ws-kit/core`** — Base router (minimal, validator-agnostic). Use when you need a bare router or want explicit control over plugin imports.\n- **`@ws-kit/zod`** / **`@ws-kit/valibot`** — Re-export `createRouter` plus validators and helpers for single-source imports.\n\n**Recommended**: Import from your validator package for a single canonical import source:\n\n```typescript\n// ✅ Single import source (recommended)\nimport { createRouter, withZod, z, message } from \"@ws-kit/zod\";\n\nconst router = createRouter().plugin(withZod());\n```\n\nBoth patterns work equally well — choose based on your preference.\n\n## Quick Start\n\n```typescript\nimport { createRouter } from \"@ws-kit/core\";\nimport { withZod } from \"@ws-kit/zod\"; // or withValibot from @ws-kit/valibot\n\nconst router = createRouter<{ userId?: string }>().plugin(withZod()); // Add validation plugin for full features\n\n// Register an event handler (with validation)\nrouter.on(schema, (ctx) => {\n  ctx.data; // { userId?: string }\n  ctx.type; // Literal from schema\n  ctx.payload; // Typed payload (available with validation plugin)\n});\n\n// Errors flow to universal sink\nrouter.onError((err, ctx) => {\n  console.error(\"error:\", err, \"type:\", ctx?.type);\n});\n```\n\n## API Surface\n\n### Base Router (always available)\n\n```typescript\nrouter.use(mw); // Global middleware\nrouter.on(schema, handler); // Event handler\nrouter.route(schema).use(mw).on(handler); // Per-route middleware + handler\nrouter.merge(other, { onConflict: \"error\" }); // Combine routers\nrouter.mount(\"prefix.\", other); // Prefix types for namespacing\nrouter.plugin(withZod()); // Add capabilities\nrouter.onOpen((ctx) => {}); // Connection opened (after auth)\nrouter.onClose((ctx) => {}); // Connection closed\nrouter.onError((err, ctx) => {}); // Universal error sink\n```\n\n### Added by Plugins\n\nAfter `withZod()` or `withValibot()`:\n\n```typescript\nrouter.rpc(schema, handler); // RPC handlers (request-response)\n```\n\nAfter `withPubSub()`:\n\n```typescript\nrouter.publish(topic, schema, payload);\n// ctx.subscribe(topic), ctx.unsubscribe(topic), ctx.subscriptions\n```\n\n## Architecture\n\n- **`src/router/`** — Core routing: factory, dispatch, middleware, registry\n- **`src/context/`** — Context types: base, event, RPC\n- **`src/schema/`** — Runtime message shape: contracts for validators\n- **`src/plugin/`** — Plugin system: capability management\n- **`src/capabilities/`** — Adapter contracts (no implementations)\n- **`src/ws/`** — WebSocket adapter interface\n- **`src/error/`** — Unified error handling\n- **`src/options/`** — Heartbeat & rate limiting\n- **`src/utils/`** — Utilities: assertions, composition, ID generation\n\n## Design Philosophy\n\nFrom [docs/proposals/router.md](../../docs/proposals/router.md):\n\n1. **No hidden APIs**: Capability-gated; throw on missing plugin\n2. **Validator-agnostic**: Adapters implement `ValidatorAdapter` interface\n3. **Deterministic composition**: `merge()` and `mount()` with explicit conflict resolution\n4. **Single error sink**: All errors flow to `router.onError()`\n5. **Transparent behavior**: Heartbeat & limits add no API surface\n6. **No branding symbols**: Type-level inference only; schemas are plain objects at runtime\n\n## Type Safety\n\nFull type inference from schema through handlers:\n\n```typescript\n// Schema defines the contract\nconst UserUpdate = message(\"USER_UPDATE\", {\n  id: z.string(),\n  name: z.string(),\n});\n\n// Handler context is inferred\nrouter.on(UserUpdate, (ctx) => {\n  ctx.payload; // { id: string; name: string }\n  ctx.type; // \"USER_UPDATE\"\n});\n```\n\n## Error Handling\n\nSingle universal error sink with error codes:\n\n```typescript\nrouter.onError((err, ctx) => {\n  if (err instanceof WsKitError) {\n    console.log(\"Error code:\", err.code); // \"BAD_REQUEST\", \"INVALID_ARGUMENT\", etc.\n    console.log(\"Retryable:\", err.retryable);\n  }\n});\n```\n\n## Testing\n\n`createTestRouter()` provides in-memory transport + fake clock:\n\n```typescript\nimport { createTestRouter } from \"@ws-kit/core/testing\";\n\nconst testRouter = createTestRouter(router);\ntestRouter.clock.advance(30_000); // Fast-forward heartbeat\ntestRouter.capture.errors(); // Assert on errors\n```\n\n## See Also\n\n- **Router proposal**: [docs/proposals/router.md](../../docs/proposals/router.md)\n- **Validator contracts**: See `@ws-kit/zod`, `@ws-kit/valibot`\n- **Platform adapters**: See `@ws-kit/bun`, `@ws-kit/cloudflare`\n- **Pub/Sub adapters**: See `@ws-kit/redis`, `@ws-kit/kafka`\n\n## License\n\nMIT\n","readmeFilename":"README.md"}