{"_id":"@anoromi/local-ai-tools-protocol","_rev":"2-37d0450822c1ae1eb3185e64bb96bea0","name":"@anoromi/local-ai-tools-protocol","dist-tags":{"latest":"0.4.0"},"versions":{"0.3.0":{"name":"@anoromi/local-ai-tools-protocol","version":"0.3.0","license":"MIT","_id":"@anoromi/local-ai-tools-protocol@0.3.0","maintainers":[{"name":"anoromi","email":"and.zagorulko@gmail.com"}],"homepage":"https://github.com/Anoromi/local-ai-tools/tree/main/packages/protocol#readme","bugs":{"url":"https://github.com/Anoromi/local-ai-tools/issues"},"dist":{"shasum":"78af372625f225005e23a8d3c5bb45715756c5ed","tarball":"https://registry.npmjs.org/@anoromi/local-ai-tools-protocol/-/local-ai-tools-protocol-0.3.0.tgz","fileCount":12,"integrity":"sha512-ggm181rPovKzzCpZPjtojRuUyc1TceqSgAeIU2jmnCY6cE6PlNenEj4lS2VmxfWgIXlzwif4X2Orp86w5czDMA==","signatures":[{"sig":"MEYCIQCPN9G4mmSKuahf9aAEvEHRSGtWrEb43+mdc36NUZuxxAIhANsrpLsOZFaV23Rpm1nNxW0VKoUJEUWPR2qXefeucuKv","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":39404},"type":"module","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"},"./encode":{"types":"./dist/encode.d.mts","import":"./dist/encode.mjs"},"./schema":{"types":"./dist/schema.d.mts","import":"./dist/schema.mjs"}},"gitHead":"ee441296155ee5e0b0636d5bb5b00b55a5e033e5","private":false,"scripts":{"test":"bun test test","build":"tsdown src/index.ts src/schema.ts src/encode.ts --format esm --dts --clean","clean":"rm -rf dist","prepack":"bun run build","pack:dry":"npm pack --dry-run","typecheck":"tsc --noEmit","publish:npm":"npm publish --access public","prepublishOnly":"bun run typecheck && bun run test && bun run build"},"_npmUser":{"name":"anoromi","email":"and.zagorulko@gmail.com"},"repository":{"url":"git+https://github.com/Anoromi/local-ai-tools.git","type":"git","directory":"packages/protocol"},"_npmVersion":"10.9.4","description":"Effect Schema protocol definitions for local-ai-tools clients","directories":{},"_nodeVersion":"22.22.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"effect":"4.0.0-beta.45","tsdown":"^0.20.3","@types/bun":"^1.3.13","typescript":"^6.0.3"},"peerDependencies":{"effect":"4.0.0-beta.45"},"_npmOperationalInternal":{"tmp":"tmp/local-ai-tools-protocol_0.3.0_1779017263314_0.9953672266690485","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@anoromi/local-ai-tools-protocol","version":"0.4.0","private":false,"type":"module","description":"Effect Schema protocol definitions for local-ai-tools clients","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Anoromi/local-ai-tools.git","directory":"packages/protocol"},"bugs":{"url":"https://github.com/Anoromi/local-ai-tools/issues"},"homepage":"https://github.com/Anoromi/local-ai-tools/tree/main/packages/protocol#readme","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"},"./schema":{"types":"./dist/schema.d.mts","import":"./dist/schema.mjs"},"./encode":{"types":"./dist/encode.d.mts","import":"./dist/encode.mjs"}},"scripts":{"clean":"rm -rf dist","build":"tsdown src/index.ts src/schema.ts src/encode.ts --format esm --dts --clean","typecheck":"tsc --noEmit","test":"bun test test","prepack":"bun run build","prepublishOnly":"bun run typecheck && bun run test && bun run build","pack:dry":"npm pack --dry-run","publish:npm":"npm publish --access public"},"peerDependencies":{"effect":"4.0.0-beta.45"},"devDependencies":{"@types/bun":"^1.3.13","effect":"4.0.0-beta.45","tsdown":"^0.20.3","typescript":"^6.0.3"},"_id":"@anoromi/local-ai-tools-protocol@0.4.0","gitHead":"5f0ad89ee3c046cbd84a8ea54e867764d0717ae3","_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-dZY4elOifCnu99tt9dqOkJaKL0Kfu9vynC8tiE/lLA1yz678IRsuI8Uvr8pdw8sr+lPGUUiU7WeulRekeZ6E4g==","shasum":"fefd8179c7406077c805a348e36aeb2c06a2cb47","tarball":"https://registry.npmjs.org/@anoromi/local-ai-tools-protocol/-/local-ai-tools-protocol-0.4.0.tgz","fileCount":12,"unpackedSize":45685,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGt9M5aqz542fF0BSzM/3qC6Y+FWlnH9D5H1fSC78ORVAiEA8Mn3v9XhP+GY1xn8GkpE65oguOGYPEw153J/1qzGYBU="}]},"_npmUser":{"name":"anoromi","email":"and.zagorulko@gmail.com"},"directories":{},"maintainers":[{"name":"anoromi","email":"and.zagorulko@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/local-ai-tools-protocol_0.4.0_1779042239634_0.9812609715011738"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-17T11:27:43.249Z","modified":"2026-05-17T18:23:59.903Z","0.3.0":"2026-05-17T11:27:43.453Z","0.4.0":"2026-05-17T18:23:59.775Z"},"bugs":{"url":"https://github.com/Anoromi/local-ai-tools/issues"},"license":"MIT","homepage":"https://github.com/Anoromi/local-ai-tools/tree/main/packages/protocol#readme","repository":{"type":"git","url":"git+https://github.com/Anoromi/local-ai-tools.git","directory":"packages/protocol"},"description":"Effect Schema protocol definitions for local-ai-tools clients","maintainers":[{"name":"anoromi","email":"and.zagorulko@gmail.com"}],"readme":"# @anoromi/local-ai-tools-protocol\n\nEffect Schema definitions and JSON line helpers for `local-ai-tools` clients.\n\nThis package contains only the reusable protocol surface:\n\n- daemon Unix-socket request/response schemas\n- daemon streaming event schemas\n- session NDJSON request/event schemas\n- TypeScript types inferred from the schemas\n- encode/decode helpers for JSON lines\n\nIt does not include a socket client, daemon auto-start logic, filesystem path\nresolution, or CLI code.\n\n## Install\n\n```bash\nnpm install @anoromi/local-ai-tools-protocol effect@4.0.0-beta.45\n```\n\n## Usage\n\n```ts\nimport {\n  decodeDaemonLine,\n  decodeSessionLine,\n  eventLine,\n  requestLine,\n} from \"@anoromi/local-ai-tools-protocol\"\n\nconst request = decodeSessionLine(\n  '{\"id\":\"1\",\"method\":\"health\",\"params\":{}}'\n)\n\nconst daemonLine = requestLine(\"2\", \"health\", {})\n\nconst event = eventLine({ event: \"ready\", version: \"0.1.0\" })\n\nconst daemonResponse = decodeDaemonLine(\n  '{\"id\":\"2\",\"ok\":true,\"result\":{\"status\":\"ok\"}}'\n)\n```\n\n## Session NDJSON\n\n```json\n{\"id\":\"1\",\"method\":\"synthesize\",\"params\":{\"text\":\"Hello\",\"output_path\":\"/tmp/hello.wav\",\"timings_path\":\"/tmp/hello.json\",\"voice\":\"af_sarah\",\"speed\":1,\"target_wpm\":null,\"format\":\"wav\"}}\n```\n\nSelection requests use one shared text and many question items:\n\n```json\n{\"id\":\"2\",\"method\":\"select\",\"params\":{\"text\":\"The deploy passed. The parser failed.\",\"items\":[{\"id\":\"failures\",\"question\":\"What failed?\",\"threshold\":0.5}],\"language\":\"auto\",\"include_all_scores\":false}}\n```\n\nClassification requests use many sentences and many labels:\n\n```json\n{\"id\":\"3\",\"method\":\"classify\",\"params\":{\"sentences\":[{\"id\":\"s1\",\"text\":\"The deploy passed.\"},{\"id\":\"s2\",\"text\":\"The parser failed.\"}],\"labels\":[{\"id\":\"success\",\"label\":\"success\",\"threshold\":0.5},{\"id\":\"issue\",\"label\":\"issue\",\"threshold\":0.5}],\"hypothesis_template\":\"This sentence indicates {}.\",\"include_all_scores\":false}}\n```\n\nCommon session events:\n\n```json\n{\"event\":\"ready\",\"version\":\"0.1.0\"}\n{\"id\":\"1\",\"event\":\"accepted\"}\n{\"id\":\"1\",\"event\":\"started\"}\n{\"id\":\"1\",\"event\":\"chunk\",\"chunk\":{\"index\":0,\"text\":\"Hello\",\"start\":0,\"end\":1.2,\"duration\":1.2,\"timing_basis\":\"native\"}}\n{\"id\":\"1\",\"event\":\"finished\",\"result\":{\"output_path\":\"/tmp/hello.wav\",\"timings_path\":\"/tmp/hello.json\"}}\n```\n\n## Compatibility\n\nThis package uses Effect 4 schemas and declares `effect@4.0.0-beta.45` as a peer\ndependency.\n\nGenerated `dist/` files are produced during package build and publish. They are\nnot committed in the `local-ai-tools` monorepo.\n","readmeFilename":"README.md"}