{"_id":"@3leaps/ipcprims","_rev":"6-c66a6b088c2a7c3a2c1b7f1f2feaaf46","name":"@3leaps/ipcprims","dist-tags":{"latest":"0.2.5"},"versions":{"0.1.2":{"name":"@3leaps/ipcprims","version":"0.1.2","license":"MIT OR Apache-2.0","_id":"@3leaps/ipcprims@0.1.2","maintainers":[{"name":"3leapsdave","email":"dave.thompson@3leaps.net"}],"dist":{"shasum":"f32404e0d39f7ea97e53db119ce3773d71ba6a3e","tarball":"https://registry.npmjs.org/@3leaps/ipcprims/-/ipcprims-0.1.2.tgz","fileCount":11,"integrity":"sha512-zu9F5yD4U6+JxQgimasiVkf6NTdDBWkbB5Hlko3TQpxnt4zWKhjo8elG2Qw4iYY02KTSwO93A3U3T/uSQzavEA==","signatures":[{"sig":"MEUCIAk9XuOs1k0G/E4ZvwtpodtGqa/gwZh7dXx32iV8JXc2AiEAsEK0880dPCrTMDd3vkA2x3B+KVjED6O7yWpB551aCCA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18692},"main":"index.js","napi":{"name":"ipcprims","triples":{"defaults":false,"additional":["x86_64-unknown-linux-gnu","x86_64-unknown-linux-musl","aarch64-unknown-linux-gnu","aarch64-apple-darwin","x86_64-pc-windows-msvc"]}},"types":"index.d.ts","engines":{"node":">=18"},"gitHead":"ec0a70491510e4e072ae6dd74f1044682d4be0c5","scripts":{"test":"npm run build:native && tsc -p tsconfig.test.json && node --test .tmp-test/ipcprims.test.js","typecheck":"tsc --noEmit","build:native":"napi build --cargo-cwd . --release --platform --js false --strip"},"_npmUser":{"name":"3leapsdave","email":"dave.thompson@3leaps.net"},"_npmVersion":"11.7.0","description":"TypeScript bindings for ipcprims via Node-API","directories":{},"_nodeVersion":"22.19.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.6.3","@types/node":"^22.10.0","@napi-rs/cli":"^2.18.4"},"optionalDependencies":{"@3leaps/ipcprims-darwin-arm64":"0.1.2","@3leaps/ipcprims-linux-x64-gnu":"0.1.2","@3leaps/ipcprims-linux-x64-musl":"0.1.2","@3leaps/ipcprims-win32-x64-msvc":"0.1.2","@3leaps/ipcprims-linux-arm64-gnu":"0.1.2"},"_npmOperationalInternal":{"tmp":"tmp/ipcprims_0.1.2_1771446657308_0.7972416786263934","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@3leaps/ipcprims","version":"0.2.0","license":"MIT OR Apache-2.0","_id":"@3leaps/ipcprims@0.2.0","maintainers":[{"name":"3leapsdave","email":"dave.thompson@3leaps.net"}],"dist":{"shasum":"683d43f7d3f6a706d3619e127f5d527699ed5161","tarball":"https://registry.npmjs.org/@3leaps/ipcprims/-/ipcprims-0.2.0.tgz","fileCount":11,"integrity":"sha512-JT44gF1brjg3hBOLU1tKVqDMa2M++aqFnCkuwK+gvYJGzdJJMlczV6sJNc0cmNDzPTrIqhYoxmHXJXI1CFE9kQ==","signatures":[{"sig":"MEUCIQC854LoyaQPyH2finAutuKxlCUCzWFVhtPcSr9QwuNW0QIgKFelLsPymZ2spU6RgIOiU0fHeKFU8skZaoOzuMenyMc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18692},"main":"index.js","napi":{"name":"ipcprims","triples":{"defaults":false,"additional":["x86_64-unknown-linux-gnu","x86_64-unknown-linux-musl","aarch64-unknown-linux-gnu","aarch64-apple-darwin","x86_64-pc-windows-msvc"]}},"types":"index.d.ts","engines":{"node":">=18"},"gitHead":"90387c37139ecff728d9e2904ee5daaf037d362f","scripts":{"test":"npm run build:native && tsc -p tsconfig.test.json && node --test .tmp-test/ipcprims.test.js","typecheck":"tsc --noEmit","build:native":"napi build --cargo-cwd . --release --platform --js false --strip"},"_npmUser":{"name":"3leapsdave","email":"dave.thompson@3leaps.net"},"_npmVersion":"11.7.0","description":"TypeScript bindings for ipcprims via Node-API","directories":{},"_nodeVersion":"22.19.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.6.3","@types/node":"^22.10.0","@napi-rs/cli":"^2.18.4"},"optionalDependencies":{"@3leaps/ipcprims-darwin-arm64":"0.2.0","@3leaps/ipcprims-linux-x64-gnu":"0.2.0","@3leaps/ipcprims-linux-x64-musl":"0.2.0","@3leaps/ipcprims-win32-x64-msvc":"0.2.0","@3leaps/ipcprims-linux-arm64-gnu":"0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ipcprims_0.2.0_1772214591460_0.6524659830221917","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@3leaps/ipcprims","version":"0.2.2","license":"MIT OR Apache-2.0","_id":"@3leaps/ipcprims@0.2.2","maintainers":[{"name":"3leapsdave","email":"dave.thompson@3leaps.net"}],"homepage":"https://github.com/3leaps/ipcprims#readme","bugs":{"url":"https://github.com/3leaps/ipcprims/issues"},"dist":{"shasum":"fc79a45f129257693b142ad4c7eef91e0fe3bcdd","tarball":"https://registry.npmjs.org/@3leaps/ipcprims/-/ipcprims-0.2.2.tgz","fileCount":11,"integrity":"sha512-Dsm8JqaLdniayCtm0quGy8LeIa/dluXqveb7P+cMrU6YHDcnjJgcKfpbfjdAdY82XiBPXjR5jH0yq5vBqNbwbA==","signatures":[{"sig":"MEUCIHK7vsAXMpKH97ogLwIfB1Ff1Yp4p3BM8bqI1/GuiAUNAiEA+NWUoAJtCcqF8W4T22EmvJ0urwqF/iw99IXSnJaucEk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@3leaps%2fipcprims@0.2.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":24524},"main":"index.js","napi":{"name":"ipcprims","triples":{"defaults":false,"additional":["x86_64-unknown-linux-gnu","x86_64-unknown-linux-musl","aarch64-unknown-linux-gnu","aarch64-apple-darwin","x86_64-pc-windows-msvc"]}},"types":"index.d.ts","engines":{"node":">=18"},"gitHead":"3e1a221c7878dfb4e52b9a16120542c2fca3e062","scripts":{"test":"npm run build:native && tsc -p tsconfig.test.json && node --test .tmp-test/ipcprims.test.js","typecheck":"tsc --noEmit","build:native":"napi build --cargo-cwd . --release --platform --js false --strip","postbuild:native":"node scripts/augment-types.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:307a77ae-39cc-4d9f-89df-a7391a9bbbec"}},"repository":{"url":"git+https://github.com/3leaps/ipcprims.git","type":"git","directory":"bindings/typescript"},"_npmVersion":"11.5.1","description":"TypeScript bindings for ipcprims via Node-API","directories":{},"_nodeVersion":"24.18.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.6.3","@types/node":"^22.10.0","@napi-rs/cli":"^2.18.4"},"optionalDependencies":{"@3leaps/ipcprims-darwin-arm64":"0.2.2","@3leaps/ipcprims-linux-x64-gnu":"0.2.2","@3leaps/ipcprims-linux-x64-musl":"0.2.2","@3leaps/ipcprims-win32-x64-msvc":"0.2.2","@3leaps/ipcprims-linux-arm64-gnu":"0.2.2"},"_npmOperationalInternal":{"tmp":"tmp/ipcprims_0.2.2_1783436788834_0.36531336282704796","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"@3leaps/ipcprims","version":"0.2.3","license":"MIT OR Apache-2.0","_id":"@3leaps/ipcprims@0.2.3","maintainers":[{"name":"3leapsdave","email":"dave.thompson@3leaps.net"}],"homepage":"https://github.com/3leaps/ipcprims#readme","bugs":{"url":"https://github.com/3leaps/ipcprims/issues"},"dist":{"shasum":"3d75aafbab3a681b56fc1b1eeb47ded905cd7e29","tarball":"https://registry.npmjs.org/@3leaps/ipcprims/-/ipcprims-0.2.3.tgz","fileCount":11,"integrity":"sha512-CgYVR20XJhP1Y14r8wZESA34/VIdQX1X7449jtw5ZAQ4Ska+NPr80gj0OixdyRezYiOAFZqxV88FVBKEt8A/kQ==","signatures":[{"sig":"MEUCIDNm6DrQPLNxlFIdZ5ZgpvXTepRB1xqLjwhkdGBOf0Y6AiEA0WhMX4uIvcw5ZyUCEUv8m+AFoSZgylITiLTdg6ohBIs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@3leaps%2fipcprims@0.2.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":24525},"main":"index.js","napi":{"name":"ipcprims","triples":{"defaults":false,"additional":["x86_64-unknown-linux-gnu","x86_64-unknown-linux-musl","aarch64-unknown-linux-gnu","aarch64-apple-darwin","x86_64-pc-windows-msvc"]}},"types":"index.d.ts","engines":{"node":">=20"},"gitHead":"87a91592aa3692a7e852260018416b681b9914bd","scripts":{"test":"npm run build:native && tsc -p tsconfig.test.json && node --test .tmp-test/ipcprims.test.js","typecheck":"tsc --noEmit","build:native":"napi build --cargo-cwd . --release --platform --js false --strip","postbuild:native":"node scripts/augment-types.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:307a77ae-39cc-4d9f-89df-a7391a9bbbec"}},"repository":{"url":"git+https://github.com/3leaps/ipcprims.git","type":"git","directory":"bindings/typescript"},"_npmVersion":"11.5.1","description":"TypeScript bindings for ipcprims via Node-API","directories":{},"_nodeVersion":"24.18.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^6.0.3","@types/node":"^20.19.43","@napi-rs/cli":"^2.18.4"},"optionalDependencies":{"@3leaps/ipcprims-darwin-arm64":"0.2.3","@3leaps/ipcprims-linux-x64-gnu":"0.2.3","@3leaps/ipcprims-linux-x64-musl":"0.2.3","@3leaps/ipcprims-win32-x64-msvc":"0.2.3","@3leaps/ipcprims-linux-arm64-gnu":"0.2.3"},"_npmOperationalInternal":{"tmp":"tmp/ipcprims_0.2.3_1783454617048_0.4912515621904878","host":"s3://npm-registry-packages-npm-production"}},"0.2.4":{"name":"@3leaps/ipcprims","version":"0.2.4","license":"MIT OR Apache-2.0","_id":"@3leaps/ipcprims@0.2.4","maintainers":[{"name":"3leapsdave","email":"dave.thompson@3leaps.net"}],"homepage":"https://github.com/3leaps/ipcprims#readme","bugs":{"url":"https://github.com/3leaps/ipcprims/issues"},"dist":{"shasum":"3d34e7b2312cb11864625bdffb71d3365e23eb5d","tarball":"https://registry.npmjs.org/@3leaps/ipcprims/-/ipcprims-0.2.4.tgz","fileCount":11,"integrity":"sha512-DkFN6us3yqdowWSMOd7al7Gybau6QTc2UZmFj1pwZQ6AY8mdawXqqg9XcEw4GjdvAUQ4tU1OJhB8rhvMnLAEzQ==","signatures":[{"sig":"MEUCIBwBW1EH1qRjlNBz4jo+WFD67VnzG+PXu5qtIsXZWpr3AiEAsuxBgxOdFm5AWhXR2+GCaPBfnKFHAbjTwGHKAgfUTuA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQDoaQqj9OrvZAUTjNoHsUmQVcbfB3QEx8TQeD7FYelDqgIgSCj3/FO5spt22yFzWYmojFCpiqRlisOq48M8+yzpc6Q=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@3leaps%2fipcprims@0.2.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":24525},"main":"index.js","napi":{"name":"ipcprims","triples":{"defaults":false,"additional":["x86_64-unknown-linux-gnu","x86_64-unknown-linux-musl","aarch64-unknown-linux-gnu","aarch64-apple-darwin","x86_64-pc-windows-msvc"]}},"types":"index.d.ts","engines":{"node":">=20"},"gitHead":"a1363335317a15986be5b8c081560675aaef1aac","scripts":{"test":"npm run build:native && tsc -p tsconfig.test.json && node --test .tmp-test/ipcprims.test.js","typecheck":"tsc --noEmit","build:native":"napi build --cargo-cwd . --release --platform --js false --strip","postbuild:native":"node scripts/augment-types.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:307a77ae-39cc-4d9f-89df-a7391a9bbbec"}},"repository":{"url":"git+https://github.com/3leaps/ipcprims.git","type":"git","directory":"bindings/typescript"},"_npmVersion":"11.5.1","description":"TypeScript bindings for ipcprims via Node-API","directories":{},"_nodeVersion":"24.19.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^6.0.3","@types/node":"^20.19.43","@napi-rs/cli":"^2.18.4"},"optionalDependencies":{"@3leaps/ipcprims-darwin-arm64":"0.2.4","@3leaps/ipcprims-linux-x64-gnu":"0.2.4","@3leaps/ipcprims-linux-x64-musl":"0.2.4","@3leaps/ipcprims-win32-x64-msvc":"0.2.4","@3leaps/ipcprims-linux-arm64-gnu":"0.2.4"},"_npmOperationalInternal":{"tmp":"tmp/ipcprims_0.2.4_1787343245343_0.5931916446367249","host":"s3://npm-registry-packages-npm-production"}},"0.2.5":{"_id":"@3leaps/ipcprims@0.2.5","bugs":{"url":"https://github.com/3leaps/ipcprims/issues"},"dist":{"shasum":"43339e1765bb78060a104e61c28322ecd1ba7d99","tarball":"https://registry.npmjs.org/@3leaps/ipcprims/-/ipcprims-0.2.5.tgz","fileCount":14,"integrity":"sha512-MwsH+v+I7pal3348RsIAy/esYFBSlOtpYMx8OCJ1DsFDOBK+6aCu2YBog2KMQptTpVmYw28ypud1jA7hbSsH4w==","signatures":[{"sig":"MEUCIQCdHevr4zlU8noYE5c+inMopoDXHPpoWJi7sylWDPp9zAIge+6afNjCQZoWSaX5ns4Ka2oSTaF3HBl+AFaprvVBtAM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICh+GhQYyoE+RWazh1yZi0Pm7gSdlhIEErfeWM7x4zROAiATV7s24V1akXGebyukT7j5KTpSR2nZzvz+apj+o6du8g=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@3leaps%2fipcprims@0.2.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":32605},"main":"index.js","name":"@3leaps/ipcprims","napi":{"name":"ipcprims","triples":{"defaults":false,"additional":["x86_64-unknown-linux-gnu","x86_64-unknown-linux-musl","aarch64-unknown-linux-gnu","aarch64-apple-darwin","x86_64-pc-windows-msvc"]}},"types":"index.d.ts","engines":{"node":">=20"},"exports":{".":{"import":{"types":"./index.d.mts","default":"./index.mjs"},"require":{"types":"./index.d.cts","default":"./index.js"}},"./index":{"import":{"types":"./index.d.mts","default":"./index.mjs"},"require":{"types":"./index.d.cts","default":"./index.js"}},"./index.js":{"import":{"types":"./index.d.mts","default":"./index.mjs"},"require":{"types":"./index.d.cts","default":"./index.js"}},"./package.json":"./package.json"},"gitHead":"b6e8a9002e530379f65e555459a6f9c40791813c","license":"MIT OR Apache-2.0","scripts":{"test":"npm run build:native && tsc -p tsconfig.test.json && node --test .tmp-test/ipcprims.test.js && node scripts/check-export-drift.mjs && node scripts/check-pack.mjs","typecheck":"tsc --noEmit && tsc -p tsconfig.consumer.json","build:native":"napi build --cargo-cwd . --release --platform --js false --strip","postbuild:native":"node scripts/augment-types.mjs"},"version":"0.2.5","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:307a77ae-39cc-4d9f-89df-a7391a9bbbec"}},"homepage":"https://github.com/3leaps/ipcprims#readme","repository":{"url":"git+https://github.com/3leaps/ipcprims.git","type":"git","directory":"bindings/typescript"},"_npmVersion":"11.5.1","description":"TypeScript bindings for ipcprims via Node-API","directories":{},"maintainers":[{"name":"3leapsdave","email":"dave.thompson@3leaps.net"}],"_nodeVersion":"24.19.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^6.0.3","@types/node":"^20.19.43","@napi-rs/cli":"^2.18.4"},"optionalDependencies":{"@3leaps/ipcprims-darwin-arm64":"0.2.5","@3leaps/ipcprims-linux-x64-gnu":"0.2.5","@3leaps/ipcprims-linux-x64-musl":"0.2.5","@3leaps/ipcprims-win32-x64-msvc":"0.2.5","@3leaps/ipcprims-linux-arm64-gnu":"0.2.5"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ipcprims_0.2.5_1787680934760_0.7841880766888174"}}},"time":{"created":"2026-02-18T20:30:57.197Z","modified":"2026-08-25T18:02:15.230Z","0.1.2":"2026-02-18T20:30:57.453Z","0.2.0":"2026-02-27T17:49:51.613Z","0.2.2":"2026-07-07T15:06:28.973Z","0.2.3":"2026-07-07T20:03:37.178Z","0.2.4":"2026-08-21T20:14:05.427Z","0.2.5":"2026-08-25T18:02:14.839Z"},"bugs":{"url":"https://github.com/3leaps/ipcprims/issues"},"license":"MIT OR Apache-2.0","homepage":"https://github.com/3leaps/ipcprims#readme","repository":{"url":"git+https://github.com/3leaps/ipcprims.git","type":"git","directory":"bindings/typescript"},"description":"TypeScript bindings for ipcprims via Node-API","maintainers":[{"name":"3leapsdave","email":"dave.thompson@3leaps.net"}],"readme":"# @3leaps/ipcprims\n\nTypeScript bindings for ipcprims using Node-API (NAPI-RS).\n\n## Async Peer\n\nUse `AsyncPeer` and `AsyncListener` when the process must keep its event loop live while waiting for IPC frames. The sync `Peer.recv()` and `Peer.recvOn()` APIs are still available for short scripts, but they block the JavaScript thread while waiting.\n\n```ts\nimport { AsyncListener, AsyncPeer, COMMAND } from \"@3leaps/ipcprims\";\n\nconst listener = AsyncListener.bind(\"/tmp/ipcprims.sock\", {\n  channels: [COMMAND],\n});\n\nconst accepted = listener.accept();\nconst client = await AsyncPeer.connect(\"/tmp/ipcprims.sock\", [COMMAND]);\nconst server = await accepted;\n\nconst controller = new AbortController();\nconst pending = client.recvAsync({ signal: controller.signal });\n\nawait server.send(COMMAND, Buffer.from(\"hello\"));\nconst frame = await pending;\nconsole.log(frame.channel, frame.payload.toString());\n\nclient.close();\nserver.close();\nawait listener.close();\n```\n\n`recvAsync()` receives frames in arrival order. `recvOnAsync(channel)` and `openChannel(channel)` receive FIFO frames for that channel; they do not claim global ordering across channels.\n\nThe TypeScript async wrapper owns a small dispatcher above Rust `AsyncPeer` so concurrent JavaScript receive calls can wait independently. That dispatcher buffers at most 256 frames or 16 MiB while routing frames to waiters; Rust `AsyncPeer` transport, channel negotiation, CONTROL handling, schema validation, and bounded receive behavior still remain the underlying safety boundary.\n\n```ts\nconst receiver = await client.openChannel(COMMAND);\n\nfor await (const frame of receiver) {\n  console.log(frame.payload.toString());\n}\n```\n\nPassing an already-aborted or later-aborted `AbortSignal` rejects the pending receive without closing the peer, so a later `recvAsync()` or `recvOnAsync()` can still consume future frames.\n\n## Auth Token Checks\n\nAuth tokens are opaque bytes. Use `connectWithAuth()` on the client and `takeClientAuthToken()` on the accepted server peer. Treat an absent token, an empty token, a length mismatch, or a mismatched token as a handshake failure and close the peer before exposing it to application state.\n\n```ts\nimport { timingSafeEqual } from \"node:crypto\";\nimport { AsyncListener, AsyncPeer, COMMAND } from \"@3leaps/ipcprims\";\n\ndeclare function loadExpectedTokenBytes(): Buffer;\n\nconst expected = loadExpectedTokenBytes();\n\nconst listener = AsyncListener.bind(\"/tmp/ipcprims.sock\", {\n  channels: [COMMAND],\n});\nconst accepted = listener.accept();\nconst client = await AsyncPeer.connectWithAuth(\n  \"/tmp/ipcprims.sock\",\n  [COMMAND],\n  expected,\n);\nconst server = await accepted;\n\nconst presented = server.takeClientAuthToken();\nconst ok =\n  presented.present &&\n  presented.token !== undefined &&\n  presented.token.length > 0 &&\n  presented.token.length === expected.length &&\n  timingSafeEqual(presented.token, expected);\n\nif (!ok) {\n  server.close();\n  client.close();\n  await listener.close();\n  throw new Error(\"handshake failed\");\n}\n```\n\n`crypto.timingSafeEqual()` throws on unequal lengths, so check the length first and reject cleanly. Do not use `==`, string comparison, or `Buffer.equals()` for token authorization.\n\n## Schema Registry\n\nLoad a schema directory for standalone validation with `SchemaRegistry`. It\nuses the Rust registry's default configuration, so a channel without a schema\npasses without validation. TypeScript does not currently expose strict mode,\nmissing-schema rejection, or programmatic schema registration.\n\n```ts\nimport { COMMAND, SchemaRegistry } from \"@3leaps/ipcprims\";\n\nconst registry = SchemaRegistry.fromDirectory(\"/opt/example/schemas\");\nregistry.validate(COMMAND, Buffer.from('{\"id\":7}'));\nregistry.close();\n```\n\n`close()` is safe to call more than once. Calling `validate()` after closing the\nregistry throws because the native registry is no longer available.\n\nBoth `Listener.bind()` and `AsyncListener.bind()` accept `schemaDir` in their\noptions. Each loads and attaches its own registry with the same default-only\nconfiguration:\n\n```ts\nimport { AsyncListener, COMMAND, Listener } from \"@3leaps/ipcprims\";\n\nconst listener = Listener.bind(\"/tmp/ipcprims.sock\", {\n  channels: [COMMAND],\n  schemaDir: \"/opt/example/schemas\",\n});\n\nconst asyncListener = AsyncListener.bind(\"/tmp/ipcprims-async.sock\", {\n  channels: [COMMAND],\n  schemaDir: \"/opt/example/schemas\",\n});\n```\n\nThe standalone `SchemaRegistry` cannot be attached to a TypeScript peer or\nlistener. Use `schemaDir` when a TypeScript listener needs validation, and do\nnot assume it rejects unregistered channels. See the repository's\n[Schema Registry Guide](https://github.com/3leaps/ipcprims/blob/main/docs/guides/schema-registry.md)\nfor Rust configuration, directory rules, and platform-specific protections.\n","readmeFilename":"README.md"}