{"_id":"@aymenkits/chat-core","name":"@aymenkits/chat-core","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@aymenkits/chat-core","version":"1.0.0","description":"Chat engine: scope-typed threads (order/inquiry/salon-pair) with a policy deciding who chats with whom, send pipeline persist → realtime → presence-miss → notifier, unread counts, system messages, per-sender rate limiting. Seams: ThreadStore, MessageStore","license":"MIT","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/aymenmokhtarikouki/chat-kit.git","directory":"packages/core"},"keywords":["chat","messaging","socket.io","realtime","threads","core"],"engines":{"node":">=18"},"sideEffects":false,"homepage":"https://github.com/aymenmokhtarikouki/chat-kit#readme","bugs":{"url":"https://github.com/aymenmokhtarikouki/chat-kit/issues"},"author":{"name":"Aymen Mokhtari"},"_id":"@aymenkits/chat-core@1.0.0","gitHead":"b7afbcf4861c0cd2f1ed98977bafef6b52a3006d","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-pam6FDMla4Rp8R8XyT2N++urhncvEjC8xYsE//RIIJOhpdCw6USC09RmHNs/b09kNcTHm+vhExMKLHOGnwCFQA==","shasum":"5747d40c53589d54f6b85240a2ef652eb29cb45a","tarball":"https://registry.npmjs.org/@aymenkits/chat-core/-/chat-core-1.0.0.tgz","fileCount":27,"unpackedSize":86257,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFkYgaZY3I6Ly8e2VMOAdbsKYW9N10AOFK4tmkS3qhP0AiB1u6+cM/oSiRWveOr0bFGjBhOeDx3D8ohgzO4jvqIEEg=="}]},"_npmUser":{"name":"aymen-mokhtari","email":"ayman.mokhtari@proton.me"},"directories":{},"maintainers":[{"name":"aymen-mokhtari","email":"ayman.mokhtari@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/chat-core_1.0.0_1783791531481_0.6124937502210273"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-11T17:38:51.298Z","1.0.0":"2026-07-11T17:38:51.628Z","modified":"2026-07-11T17:38:51.872Z"},"maintainers":[{"name":"aymen-mokhtari","email":"ayman.mokhtari@proton.me"}],"description":"Chat engine: scope-typed threads (order/inquiry/salon-pair) with a policy deciding who chats with whom, send pipeline persist → realtime → presence-miss → notifier, unread counts, system messages, per-sender rate limiting. Seams: ThreadStore, MessageStore","homepage":"https://github.com/aymenmokhtarikouki/chat-kit#readme","keywords":["chat","messaging","socket.io","realtime","threads","core"],"repository":{"type":"git","url":"git+https://github.com/aymenmokhtarikouki/chat-kit.git","directory":"packages/core"},"author":{"name":"Aymen Mokhtari"},"bugs":{"url":"https://github.com/aymenmokhtarikouki/chat-kit/issues"},"license":"MIT","readme":"# @aymenkits/chat-core\n\nScope-typed chat threads (an order, an inquiry, a salon↔customer pair) with a policy deciding who chats with whom; send pipeline: persist → realtime → presence-miss → push notifier. Unread counts, read receipts, system messages, per-sender rate limiting.\n\n## Install\n\n```bash\nnpm install @aymenkits/chat-core\n```\n\nInstalls with it: nothing else — zero dependencies.\n\n## You provide\n\n- `ThreadStore` + `MessageStore` — your tables (in-memory reference stores exported)\n- `policy.scopes` — YOUR participants/canPost rules per scope type\n- Optional `realtime`/`presence` (from `@aymenkits/chat-socketio`) and `notifier`\n\nThe package never owns tables, never imports an ORM, HTTP framework, or\nprovider SDK it can take as a parameter — storage and delivery are seams your\napp implements on its own stack.\n\n## Quick example\n\n```ts\nimport { createChatService } from '@aymenkits/chat-core'\n\nconst chat = createChatService({ stores, realtime, presence, notifier,\n  policy: { scopes: { order: { loadScope, participants: (o) => [o.customerId, o.cookId],\n    canPost: ({ scope }) => scope.status !== 'CANCELLED' } } } })\n```\n\n## Pairs with\n\n- `notifier` is satisfied by `@aymenkits/notify-core` as-is\n- `@aymenkits/chat-socketio` provides transport + presence\n- `@aymenkits/chat-express` for REST\n\nKits pair **by shape, never by import** — pass the sibling kit, your own\nservice, or a stub in tests.\n\n## Docs\n\nFull contracts and integration guides live in the repo:\nhttps://github.com/aymenmokhtarikouki/chat-kit (`contracts/`, `docs/`).\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-ca64fdc5d369adc6a9a14db053875243"}