{"_id":"@4players/odin-bot-sdk","_rev":"10-fe8977bea5af963fd37ea63b1df65db3","name":"@4players/odin-bot-sdk","dist-tags":{"latest":"0.4.4"},"versions":{"0.1.0":{"name":"@4players/odin-bot-sdk","version":"0.1.0","keywords":["odin","bot","sdk","nodejs"],"author":{"name":"Phillip Schuster"},"license":"MIT","_id":"@4players/odin-bot-sdk@0.1.0","maintainers":[{"name":"svenpaulsen","email":"info@sven-paulsen.de"},{"name":"pschuster","email":"pschuster@me.com"}],"dist":{"shasum":"bfc3350b076fb60b547588c860324e0699edc90f","tarball":"https://registry.npmjs.org/@4players/odin-bot-sdk/-/odin-bot-sdk-0.1.0.tgz","fileCount":361,"integrity":"sha512-Uttwz+CyXaKEd33wVC5NNmVkKgKmoPhBm+pdy58lm3pVQ7S6iBSA9Iul92pXiRdxVcTyeydGUFsQOaX3C9/9Kg==","signatures":[{"sig":"MEQCIDiVNI3mtqjd9Ln9j7eztPSEhFh34Wa8UX/WLflsYCSyAiA9nTtaSPU9qyA9pDXDQAC9kiGjm1mq4mRP/+XJRjuqHg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":71505489,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj7gWuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqKwg//UI366VdLjgLn8APRuePL1RddKFSlBdPcARrhEoeuIL3vwf8a\r\nT7HKGzZi0OI579G8dXgj46ucl0i6kRvdr0lSOd+ctFhv9mEflzx3yQdh5llo\r\n8Oc7DDwkxJRJibEWDLUQDoRgJlwNTZdxwphFHYKkroDb027PTeOKD6RUoqlY\r\nWUU/2zvkb4lX0TSqbnfJpkDfDNMM7HvifRw4fLGcmHwKkNLjTmyK3EFCXrYI\r\nhIR6KcprPLjLbiaaKVeT0L1EkdAR9o/+LOoAaayFsOXU8Kl+ScmdZTIRWZDI\r\nmxDi0AKfoNKisnGqy92Xd6gbstDtCd5hNCngEZQxKdYXdRfBC2oX3+xplus5\r\nAuCJQWE9/U4A0iUqyD89HypT8D5zEUR0Qd/ygC5Sgb8L7PPVIJzRia+PoOFl\r\nM1vw+2RFgxAA+cqpn++fsoFIpPf3FaA5zMSi0eJccSVn7ACLPAEU8hNCIM4A\r\n5fB3X1nzGYmNiYpiTlvGiCOhZq8fnlhkUHHEmAcFc3PZOHQXae9R9UxslZmq\r\na5DiHa2vNGlpXlEVte/XHGs5O0DYFDBbIoIVvkTycefi6ffZ9/oCGKAsZDn/\r\nAfopVpKtJCysdA7q3X+ayYLaZS1QvSWWTPej+JP62iE6k0p8OjVyhbw46Ynv\r\nYRUHywIhdumIYyYWIohA/St+4mJL1hdUMaU=\r\n=PPbD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./lib/cjs/index.js","types":"./lib/index.d.js","module":"./lib/esm/index.js","engines":{"node":">=18.0.0"},"private":false,"scripts":{"docs":"typedoc src/index.ts --json docs/api.json --excludeExternals --excludePrivate","build":"tsc -b ./tsconfig.cjs.json ./tsconfig.esm.json"},"_npmUser":{"name":"pschuster","email":"pschuster@me.com"},"_npmVersion":"8.19.3","description":"A simple SDK built on top of Odin Web SDK and Odin Foundation to quickly build simple bots that welcome users, change rooms or adding AI bots to Odin based text chats.","directories":{},"_nodeVersion":"18.13.0","dependencies":{"ws":"^8.12.1","openai":"^3.1.0","web-audio-api":"^0.2.2","@4players/odin":"^0.14.0","web-audio-engine":"^0.13.4","@4players/odin-tokens":"^1.3.0","@4players/odin-foundation":"0.1.3"},"_hasShrinkwrap":false,"devDependencies":{"esm":"^3.2.25","rimraf":"^4.0.4","typescript":"^4.9.4","@types/node":"^18.11.18"},"_npmOperationalInternal":{"tmp":"tmp/odin-bot-sdk_0.1.0_1676543405955_0.6660585493452977","host":"s3://npm-registry-packages"}},"0.3.0":{"name":"@4players/odin-bot-sdk","version":"0.3.0","keywords":["odin","bot","sdk","nodejs"],"author":{"name":"Phillip Schuster"},"license":"MIT","_id":"@4players/odin-bot-sdk@0.3.0","maintainers":[{"name":"svenpaulsen","email":"info@sven-paulsen.de"},{"name":"pschuster","email":"pschuster@me.com"}],"dist":{"shasum":"4b220655706c30776c22fb4800160eabf0a6fb17","tarball":"https://registry.npmjs.org/@4players/odin-bot-sdk/-/odin-bot-sdk-0.3.0.tgz","fileCount":520,"integrity":"sha512-wBana+dF01C9XLJ1KLchs1DXxsuzBmlPJBVhUDbKrM4u9/neSjpA9LEcSarY3B+9RNtEnA6LzOjH3sYsZV37jA==","signatures":[{"sig":"MEUCIBVADpGOxQHhl9V+Is4moGW/mPPJg6mh+6sL/iJKlksZAiEAphgOvKWZvwqvw6HCtK3APhs73DGrnoP4ZRrJ+GQI4MA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":156278563,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkHZAyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo8Uw/+OVmffGkSiO5ZQ9uEZ3CozFL9VhFW0rqsNWfEGbBDd3Xt/eE7\r\n8dfsEJy0GPef0+6MTFqdaaMjI/NOIG8kdv9EdeyLfTHkSukpj1bxpEelW1Ps\r\neD9obp0hxs/gjkKVS3tA3JuP+OR/85X7Gf7+I6psak/sAITgUpTwMFBY5gKX\r\nbpvLIh/StS/Jubpbhe8DXvFS89gf88MT3mYHfp8O+C4fe6jSLMdUnhA+YzGR\r\nzpRlk7gyEK27pW6clur9ztGU96/G8mHfAJ8ujzWPdCPI/y7FKMGNn7MhpQ2I\r\ns5pXXtXGeeV8p55PBPjEW2Y5efkTT1Sja5CyjbqbJflXzNXuGp4E3ylu0SuS\r\nMFnfio2vqTMkTY/Ooi9JKoLiYU/930GOlGFeoSoL1ERIOOJeGwK3vsHbL7/a\r\nhU+Zr4f4mG2d3UeKMRuPsYx0DPSwHEyJY9rGGaH0Uht6AmtvW2czUqQzbWpq\r\n9wONyAcoN503P353ZXcUOXZSIkw9E+yrVhgU4KNK4wxrSWzSoEL1DhySjD2H\r\nkCcSN885euN2oanq+uNFWsrDqN0yukVgdN42z1ThSwbTNY2OogIazFUyPjir\r\nHJY+yGIIyjAXTPQ6oYsonwrnqeylEK6mhcdgabbrL7SRlQii5g8OXEdb0+0j\r\n59WKBdTIh3VUuP11aodWDo1tJ5oejRGvMvo=\r\n=yk98\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./lib/cjs/index.js","types":"./lib/index.d.js","module":"./lib/esm/index.js","engines":{"node":">=18.0.0"},"gitHead":"874214bcbf1d0d06d7211575673193426a1da359","private":false,"scripts":{"docs":"typedoc src/index.ts --json docs/api.json --excludeExternals --excludePrivate","build":"tsc -b ./tsconfig.cjs.json ./tsconfig.esm.json"},"_npmUser":{"name":"pschuster","email":"pschuster@me.com"},"_npmVersion":"8.19.3","description":"A simple SDK built on top of Odin Web SDK and Odin Foundation to quickly build simple bots that welcome users, change rooms or adding AI bots to Odin based text chats.","directories":{},"_nodeVersion":"18.13.0","dependencies":{"ws":"^8.12.1","openai":"^3.1.0","web-audio-api":"^0.2.2","web-audio-engine":"^0.13.4","@4players/odin-nodejs":"^0.7.2","@4players/odin-tokens":"^1.3.0","@4players/odin-foundation":"0.2.0"},"_hasShrinkwrap":false,"devDependencies":{"esm":"^3.2.25","rimraf":"^4.0.4","typescript":"^4.9.4","@types/node":"^18.11.18"},"_npmOperationalInternal":{"tmp":"tmp/odin-bot-sdk_0.3.0_1679659056916_0.39467247522826","host":"s3://npm-registry-packages"}},"0.3.1":{"name":"@4players/odin-bot-sdk","version":"0.3.1","keywords":["odin","bot","sdk","nodejs"],"author":{"name":"Phillip Schuster"},"license":"MIT","_id":"@4players/odin-bot-sdk@0.3.1","maintainers":[{"name":"svenpaulsen","email":"info@sven-paulsen.de"},{"name":"pschuster","email":"pschuster@me.com"}],"dist":{"shasum":"d8762fa75c4564cfbd5dee9845e0dc5a4e94b1e5","tarball":"https://registry.npmjs.org/@4players/odin-bot-sdk/-/odin-bot-sdk-0.3.1.tgz","fileCount":17,"integrity":"sha512-3xVSMUHzFUde74yRUDUU2jA1QCYexfoi1kZy9ahtlNHszInnndE2CO91Lj543KLHZBFcRwtx02CspYAwI+oirA==","signatures":[{"sig":"MEUCIBGcSgshp3c2tsL0l10x7RZ/GbUhMEhRtlDgGO3T074FAiEA5XsAiwJCz69YzqwXLN8G9l+X6t33p9t87p60DVPXMZU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":111476,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkLsiqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq60g//YdC0UuEayF9oj25rBoWydUNn9HFG1yL/k9R6qM0BCZyf22eC\r\nKWbA6ma4vBLE6nTuWzIMglui7+HpBULXAOfTrhaUanzsIvT8ste4qEsnKEvt\r\nTbTfsZgz8LrAn4gyEqr3ENZuWHoUzQFoWhn18cPvwZ4l6k6Bp59A1PYVv5eL\r\nq9VUdlr4Wzy4dKAAo9g63MpKNbPx/KEfnfjBwblrrCbglIphvwf8FLPuwTOC\r\nu1ZOlJeKvdis2y22I3TNtNsR5GXuqDlgD9JERFkgpXyk5VOp8c/7ymrhQgV3\r\nJaw0u0QRhOPm1ShYG+t7aIeBnUqhtcs+k1sHfEJrgbnQvfGdMIg7N7/iSC/i\r\npJForfz3hAxieKYtX/v39OhxWI1gJ55HovaET01jrJntpNoxfdeWMvAXZEAv\r\nZ+sHzcAxlRWFVDW9rPQffUN2mAnJ3TByTisgvkJLbjfRiZ6UbtFDK0FSPJ0I\r\n/jKxlQBuUbu1bVi2exwu0OqQrU6IprKgvkTrFXMzq0/HTQV2a94IyLS3YOdH\r\n7ezGFdAU2mscj9lqkmCIPN2eFNpPpp5mMekIZxRopdMv+GsdnpzAYy1SPVfV\r\nayayr6Ng/5Uibx0wjF/uXCP5YOipXXIJvyKW0VeIkXmkhVnHazCI84/FFXth\r\njm/rmGIn7KK5ybLXxz+FzHEhr7irK0bwHCg=\r\n=D1Mk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./lib/cjs/index.js","types":"./lib/index.d.js","module":"./lib/esm/index.js","engines":{"node":">=18.0.0"},"gitHead":"0578b9558f08f242d6899c273e49c100fcb87cf8","private":false,"scripts":{"docs":"typedoc src/index.ts --json docs/api.json --excludeExternals --excludePrivate","build":"tsc -b ./tsconfig.cjs.json ./tsconfig.esm.json"},"_npmUser":{"name":"pschuster","email":"pschuster@me.com"},"_npmVersion":"9.1.2","description":"A simple SDK built on top of Odin Web SDK and Odin Foundation to quickly build simple bots that welcome users, change rooms or adding AI bots to Odin based text chats.","directories":{},"_nodeVersion":"18.14.2","dependencies":{"ws":"^8.12.1","openai":"^3.1.0","web-audio-api":"^0.2.2","web-audio-engine":"^0.13.4","@4players/odin-nodejs":"^0.7.3","@4players/odin-tokens":"^1.3.0","@4players/odin-foundation":"0.2.0"},"_hasShrinkwrap":false,"devDependencies":{"esm":"^3.2.25","rimraf":"^4.0.4","typedoc":"^0.23.28","typescript":"^4.9.4","@types/node":"^18.11.18"},"_npmOperationalInternal":{"tmp":"tmp/odin-bot-sdk_0.3.1_1680787626413_0.5589406289094689","host":"s3://npm-registry-packages"}},"0.3.2":{"name":"@4players/odin-bot-sdk","version":"0.3.2","keywords":["odin","bot","sdk","nodejs"],"author":{"name":"Phillip Schuster"},"license":"MIT","_id":"@4players/odin-bot-sdk@0.3.2","maintainers":[{"name":"svenpaulsen","email":"info@sven-paulsen.de"},{"name":"pschuster","email":"pschuster@me.com"}],"dist":{"shasum":"663ccb944898c59dff064ce41a3a1f7ac273aa5c","tarball":"https://registry.npmjs.org/@4players/odin-bot-sdk/-/odin-bot-sdk-0.3.2.tgz","fileCount":17,"integrity":"sha512-5yxIlRCoA+8d05i6BoFIsvb6w0uYZ8sTS9/PtvbbMooo/ltMoapJjLT4sx2+U7fhGuO+e8BiONhhWmYvUkYDZQ==","signatures":[{"sig":"MEQCIF/BInuqspcKMHP33nhTGx4sjFXb6BmsOptz1ucKzDBlAiBRcuFhGKJ0g7A39DxqkaNFonwDfEVmhmTe36iSL1kpCQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":111276},"main":"./lib/cjs/index.js","types":"./lib/index.d.js","module":"./lib/esm/index.js","engines":{"node":">=18.0.0"},"gitHead":"1c696d44e6f8978e00712d3184c4a5589b2a18dc","private":false,"scripts":{"docs":"typedoc src/index.ts --json docs/api.json --excludeExternals --excludePrivate","build":"tsc -b ./tsconfig.cjs.json ./tsconfig.esm.json"},"_npmUser":{"name":"pschuster","email":"pschuster@me.com"},"_npmVersion":"9.6.6","description":"A simple SDK built on top of Odin NodeJS SDK and Odin Foundation to quickly build simple bots that welcome users, change rooms or adding AI bots to Odin based text chats.","directories":{},"_nodeVersion":"18.18.2","dependencies":{"ws":"^8.12.1","openai":"^3.1.0","web-audio-api":"^0.2.2","web-audio-engine":"^0.13.4","@4players/odin-nodejs":"^0.9.2","@4players/odin-tokens":"^1.3.0","@4players/odin-foundation":"0.2.0"},"_hasShrinkwrap":false,"devDependencies":{"esm":"^3.2.25","rimraf":"^4.0.4","typedoc":"^0.23.28","typescript":"^4.9.4","@types/node":"^18.11.18"},"_npmOperationalInternal":{"tmp":"tmp/odin-bot-sdk_0.3.2_1706018193185_0.6462841271008757","host":"s3://npm-registry-packages"}},"0.4.0":{"name":"@4players/odin-bot-sdk","version":"0.4.0","keywords":["odin","bot","sdk","nodejs"],"author":{"name":"Phillip Schuster"},"license":"MIT","_id":"@4players/odin-bot-sdk@0.4.0","maintainers":[{"name":"svenpaulsen","email":"info@sven-paulsen.de"},{"name":"pschuster","email":"pschuster@me.com"}],"dist":{"shasum":"6d89d8b246ba82d7a7bd56a0303834523b1e8959","tarball":"https://registry.npmjs.org/@4players/odin-bot-sdk/-/odin-bot-sdk-0.4.0.tgz","fileCount":17,"integrity":"sha512-uCud4+PCQmsaOOzDDwcYYG3mPO3h8NNskjIL8W99ZcLHerNhO4HjVOrdbDC3HA+wsf6YLSAYiunjyfqWwVxO2g==","signatures":[{"sig":"MEUCIEV5Lo/bEA7Omx6VaIIg8ADRd9va1rhZoRO5I0FtyOj1AiEAmDXduc5BGx973k3ric2XV9HTidFL5V3F7pHdpKshAwQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":114284},"main":"./lib/cjs/index.js","types":"./lib/index.d.js","module":"./lib/esm/index.js","engines":{"node":">=18.0.0"},"gitHead":"6a1f1c9920554d0c8ebd33dfb8a01619123d5892","private":false,"scripts":{"docs":"typedoc src/index.ts --json docs/api.json --excludeExternals --excludePrivate","build":"tsc -b ./tsconfig.cjs.json ./tsconfig.esm.json"},"_npmUser":{"name":"pschuster","email":"pschuster@me.com"},"_npmVersion":"9.6.6","description":"A simple SDK built on top of Odin NodeJS SDK and Odin Foundation to quickly build simple bots that welcome users, change rooms or adding AI bots to Odin based text chats.","directories":{},"_nodeVersion":"18.18.2","dependencies":{"ws":"^8.12.1","openai":"^3.1.0","web-audio-api":"^0.2.2","web-audio-engine":"^0.13.4","@4players/odin-nodejs":"^0.10.1","@4players/odin-tokens":"^1.3.0","@4players/odin-foundation":"0.2.0"},"_hasShrinkwrap":false,"devDependencies":{"esm":"^3.2.25","rimraf":"^4.0.4","typedoc":"^0.23.28","typescript":"^4.9.4","@types/node":"^18.11.18"},"_npmOperationalInternal":{"tmp":"tmp/odin-bot-sdk_0.4.0_1706096679820_0.9627809248050232","host":"s3://npm-registry-packages"}},"0.4.1":{"name":"@4players/odin-bot-sdk","version":"0.4.1","keywords":["odin","bot","sdk","nodejs"],"author":{"name":"Phillip Schuster"},"license":"MIT","_id":"@4players/odin-bot-sdk@0.4.1","maintainers":[{"name":"svenpaulsen","email":"info@sven-paulsen.de"},{"name":"pschuster","email":"pschuster@me.com"}],"dist":{"shasum":"31552d90e9bec892fd00fecb02c7cf7c1a1965da","tarball":"https://registry.npmjs.org/@4players/odin-bot-sdk/-/odin-bot-sdk-0.4.1.tgz","fileCount":17,"integrity":"sha512-Yy6oo47rRhGgNiofXugwm5EA9oxjPaTznlLX8FmV9lR2k1rS6qxlzRm/rgv4DZ8cCHtVdD5PBbzNnCrkjdLqtA==","signatures":[{"sig":"MEYCIQCiCUwXS7FJSYNNV7BkAJwmWrDb5/z9BAIE16GrBcKzLQIhAKSwQXXTKpSWBwbuorHsKjPGgNHZrn9bWbiwPRamSvlh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":116558},"main":"./lib/cjs/index.js","types":"./lib/index.d.js","module":"./lib/esm/index.js","engines":{"node":">=18.0.0"},"gitHead":"05c9e01c541a2d40c9f87ad46d8336a8cc8da64c","private":false,"scripts":{"docs":"typedoc src/index.ts --json docs/api.json --excludeExternals --excludePrivate","build":"tsc -b ./tsconfig.cjs.json ./tsconfig.esm.json"},"_npmUser":{"name":"pschuster","email":"pschuster@me.com"},"_npmVersion":"9.6.6","description":"A simple SDK built on top of Odin NodeJS SDK and Odin Foundation to quickly build simple bots that welcome users, change rooms or adding AI bots to Odin based text chats.","directories":{},"_nodeVersion":"18.18.2","dependencies":{"ws":"^8.12.1","openai":"^3.1.0","web-audio-api":"^0.2.2","web-audio-engine":"^0.13.4","@4players/odin-nodejs":"^0.10.2","@4players/odin-tokens":"^1.3.0","@4players/odin-foundation":"0.2.0"},"_hasShrinkwrap":false,"devDependencies":{"esm":"^3.2.25","rimraf":"^4.0.4","typedoc":"^0.23.28","typescript":"^4.9.4","@types/node":"^18.11.18"},"_npmOperationalInternal":{"tmp":"tmp/odin-bot-sdk_0.4.1_1706793931190_0.7297005467147564","host":"s3://npm-registry-packages"}},"0.4.2":{"name":"@4players/odin-bot-sdk","version":"0.4.2","keywords":["odin","bot","sdk","nodejs"],"author":{"name":"Phillip Schuster"},"license":"MIT","_id":"@4players/odin-bot-sdk@0.4.2","maintainers":[{"name":"svenpaulsen","email":"info@sven-paulsen.de"},{"name":"pschuster","email":"pschuster@me.com"}],"dist":{"shasum":"3c4c15bbceaba1c960b06a98b5eea5591ffc5064","tarball":"https://registry.npmjs.org/@4players/odin-bot-sdk/-/odin-bot-sdk-0.4.2.tgz","fileCount":17,"integrity":"sha512-51wWNBNtnYKQuwyVtwEGRXQ6PmPlND3Cm+r8EifDEJKV/d0Xot7rD7ZjvZrCWiVpGoWpo6/VTeTeXMQuUdNZ4w==","signatures":[{"sig":"MEUCICtcNkTzmQVDPOkpMBVNqm+eJSwkdBL3JNH7YTd89DlJAiEAj6BkaZ/YAnvC0D8PwHK2xRmCs/bDcS7ryG184MfpZ7Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":116558},"main":"./lib/cjs/index.js","types":"./lib/index.d.js","module":"./lib/esm/index.js","engines":{"node":">=18.0.0"},"gitHead":"59d6d7f47e40ff05272594f7cc714702fa5ffbff","private":false,"scripts":{"docs":"typedoc src/index.ts --json docs/api.json --excludeExternals --excludePrivate","build":"tsc -b ./tsconfig.cjs.json ./tsconfig.esm.json"},"_npmUser":{"name":"pschuster","email":"pschuster@me.com"},"_npmVersion":"9.6.6","description":"A simple SDK built on top of Odin NodeJS SDK and Odin Foundation to quickly build simple bots that welcome users, change rooms or adding AI bots to Odin based text chats.","directories":{},"_nodeVersion":"18.18.2","dependencies":{"ws":"^8.12.1","openai":"^3.1.0","web-audio-api":"^0.2.2","web-audio-engine":"^0.13.4","@4players/odin-nodejs":"^0.10.3","@4players/odin-tokens":"^1.3.0","@4players/odin-foundation":"0.2.0"},"_hasShrinkwrap":false,"devDependencies":{"esm":"^3.2.25","rimraf":"^4.0.4","typedoc":"^0.23.28","typescript":"^4.9.4","@types/node":"^18.11.18"},"_npmOperationalInternal":{"tmp":"tmp/odin-bot-sdk_0.4.2_1707398041848_0.49105748865389565","host":"s3://npm-registry-packages"}},"0.4.3":{"name":"@4players/odin-bot-sdk","version":"0.4.3","keywords":["odin","bot","sdk","nodejs"],"author":{"name":"Phillip Schuster"},"license":"MIT","_id":"@4players/odin-bot-sdk@0.4.3","maintainers":[{"name":"svenpaulsen","email":"info@sven-paulsen.de"},{"name":"pschuster","email":"pschuster@me.com"}],"dist":{"shasum":"b58072a7c205a823e478dab7478d9db7aac4b21f","tarball":"https://registry.npmjs.org/@4players/odin-bot-sdk/-/odin-bot-sdk-0.4.3.tgz","fileCount":17,"integrity":"sha512-244lHvZKvfULKHMpUvzTtjWvTybpS7XoE+1OD0y0p9lL8034TgFFRgsqD93dGVGkDVQYBA2Q11LaiTXDdawPUA==","signatures":[{"sig":"MEQCIHG8Fv6auzbd1GNfLj5ysIE5/xeGxRTX5Is+0eDwlxmbAiACcU1BKHJSQcXaprxbZFCs8xGqnsxDAm6L365gU88BwQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":116558},"main":"./lib/cjs/index.js","types":"./lib/index.d.js","module":"./lib/esm/index.js","engines":{"node":">=18.0.0"},"gitHead":"2d2f66d5e792cb924d18ae3d0408a1fc093bf0df","private":false,"scripts":{"docs":"typedoc src/index.ts --json docs/api.json --excludeExternals --excludePrivate","build":"tsc -b ./tsconfig.cjs.json ./tsconfig.esm.json"},"_npmUser":{"name":"pschuster","email":"pschuster@me.com"},"_npmVersion":"9.6.6","description":"A simple SDK built on top of Odin NodeJS SDK and Odin Foundation to quickly build simple bots that welcome users, change rooms or adding AI bots to Odin based text chats.","directories":{},"_nodeVersion":"18.18.2","dependencies":{"ws":"^8.12.1","openai":"^3.1.0","web-audio-api":"^0.2.2","web-audio-engine":"^0.13.4","@4players/odin-nodejs":"^0.10.3","@4players/odin-tokens":"^1.3.0","@4players/odin-foundation":"0.2.1"},"_hasShrinkwrap":false,"devDependencies":{"esm":"^3.2.25","rimraf":"^4.0.4","typedoc":"^0.23.28","typescript":"^4.9.4","@types/node":"^18.11.18"},"_npmOperationalInternal":{"tmp":"tmp/odin-bot-sdk_0.4.3_1707410969519_0.49086772930101996","host":"s3://npm-registry-packages"}},"0.4.4":{"name":"@4players/odin-bot-sdk","version":"0.4.4","keywords":["odin","bot","sdk","nodejs"],"author":{"name":"Phillip Schuster"},"license":"MIT","_id":"@4players/odin-bot-sdk@0.4.4","maintainers":[{"name":"svenpaulsen","email":"info@sven-paulsen.de"},{"name":"pschuster","email":"pschuster@me.com"}],"dist":{"shasum":"beeddf9d2b505c8137e6fd076c6e04b0ab26de9b","tarball":"https://registry.npmjs.org/@4players/odin-bot-sdk/-/odin-bot-sdk-0.4.4.tgz","fileCount":17,"integrity":"sha512-DHMIJH3jdRsuYofNqlk0JhoWa6NRDHqPAsb/zMakwsUjCry9xIFSFZP+9cDp0KSjsyQZ0qym0PjzvfHNcrweMA==","signatures":[{"sig":"MEQCIDx0aH6/gdRaN9WTlHH+eubF1nJ8NCmXTCfZqc4NYvv5AiAtmsFwCDsDq5+2SJe5uPpgdy+9982bleDdhDI6kz6CFw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":116737},"main":"./lib/cjs/index.js","types":"./lib/index.d.js","module":"./lib/esm/index.js","engines":{"node":">=18.0.0"},"gitHead":"50b144590f09c3d6c315519ad45c1a4b2ed53306","private":false,"scripts":{"docs":"typedoc src/index.ts --json docs/api.json --excludeExternals --excludePrivate","build":"tsc -b ./tsconfig.cjs.json ./tsconfig.esm.json"},"_npmUser":{"name":"pschuster","email":"pschuster@me.com"},"_npmVersion":"9.6.6","description":"A simple SDK built on top of Odin NodeJS SDK and Odin Foundation to quickly build simple bots that welcome users, change rooms or adding AI bots to Odin based text chats.","directories":{},"_nodeVersion":"18.18.2","dependencies":{"ws":"^8.12.1","openai":"^3.1.0","web-audio-api":"^0.2.2","web-audio-engine":"^0.13.4","@4players/odin-nodejs":"^0.10.3","@4players/odin-tokens":"^1.3.0","@4players/odin-foundation":"0.2.2"},"_hasShrinkwrap":false,"devDependencies":{"esm":"^3.2.25","rimraf":"^4.0.4","typedoc":"^0.23.28","typescript":"^4.9.4","@types/node":"^18.11.18"},"_npmOperationalInternal":{"tmp":"tmp/odin-bot-sdk_0.4.4_1707496520328_0.4652171497232609","host":"s3://npm-registry-packages"}}},"time":{"created":"2023-02-16T10:30:05.847Z","modified":"2026-07-23T15:34:45.671Z","0.1.0":"2023-02-16T10:30:06.377Z","0.3.0":"2023-03-24T11:57:38.666Z","0.3.1":"2023-04-06T13:27:06.580Z","0.3.2":"2024-01-23T13:56:33.341Z","0.4.0":"2024-01-24T11:44:39.973Z","0.4.1":"2024-02-01T13:25:31.361Z","0.4.2":"2024-02-08T13:14:02.005Z","0.4.3":"2024-02-08T16:49:29.709Z","0.4.4":"2024-02-09T16:35:20.517Z"},"author":{"name":"Phillip Schuster"},"license":"MIT","keywords":["odin","bot","sdk","nodejs"],"description":"A simple SDK built on top of Odin NodeJS SDK and Odin Foundation to quickly build simple bots that welcome users, change rooms or adding AI bots to Odin based text chats.","maintainers":[{"email":"info@sven-paulsen.de","name":"svenpaulsen"},{"email":"pschuster@me.com","name":"pschuster"},{"email":"acc@zinomedia.de","name":"zino1337"}],"readme":"# ODIN Bot SDK for NodeJS\n\nThis is a simple bot SDK built on top of the ODIN Web (JS/TS) SDK to make it easier to build bots for ODIN. It provides \na simple interface to the ODIN Web SDK and handles the communication with the ODIN Web SDK.\n\n## Prerequisites\n\nODIN in its core is super flexiblen and allows you to build and use any data structures that you like. However, this \nflexibility comes with a price: It makes interacting between different applications and bots a bit more difficult. \nFor this we built a set of simple core data structures bundled in the `@4players/odin-foundation` package. It \ncontains interfaces for users and messages.\n\nThe ODIN Bot SDKs uses these data structures to build internal user representations and to send messages and RPCs.\n\nIf you want your application to interact with the Bot SDK make sure to use the same naving conventions as defined in \nthe ODIN foundation.\n\nIf you have already built your own data structures, you can still make use of the Bot SDK. Just make a few \nadjustments to the `OdinBot` class to create data structures your application needs.\n\n## Installation\n\nAdd the bot SDK to your NodeJS project:\n\n```bash\nnpm install @4players/odin-bot-sdk\n```\n\n## Usage\n\nYou need to create you own bot class that extends the `OdinBot` class. You can then add your own functionality by \noverriding a few functions:\n\n```typescript\nimport {\n    OdinMessageReceivedEventPayload,\n    OdinPeerJoinedEventPayload,\n    OdinPeerLeftEventPayload\n} from \"@4players/odin-nodejs\";\n\nclass MyBot extends OdinBot {\n\n    /** Override register RPC methods to register your own RPC methods */\n    protected override registerRPCMethods() {\n        this.registerRPCMethod(\"getUsers\");\n        this.registerRPCMethod(\"getPing\");\n    }\n\n    /** Override onPeerLeft to get notified when a new user left the room */\n    protected override async onPeerLeft(event: OdinPeerLeftEventPayload, user: IUser) {\n        await this.sendTextMessage(`${user.name} left the room`);\n    }\n\n    /** Override onPeerJoined to get notified when a new user joined the room */\n    protected override async onPeerJoined(event: OdinPeerJoinedEventPayload, user: IUser) {\n        if (this.isJoined) {\n            // Send a private text message to the individual user (this message cannot be seen by other peers in the room\n            await this.sendTextMessage(`Hello there ${user.name}! I am a bot and will store all messages that you \n            write so other can also read them. If you are not happy with that, please leave this channel`, event.peerId);\n            // Send a public text message to all users in the room\n            await this.sendTextMessage(`${user.name} joined the room`);\n        }\n    }\n\n    /** Override onTextMessageReceived to get notified when a new text message was received */\n    protected override async onTextMessageReceived(event: OdinMessageReceivedEventPayload, message: IChatMessage, userData: IUserData) {\n        console.log(\"Someone sent this message:\", message, userData);\n    }\n\n    /** One of your own RPC methods */\n    protected async getUsers(senderPeerId: number) {\n        await this.sendTextMessage(`There are ${this.users.size} users in this room`, senderPeerId);\n    }\n\n    /** Another RPC method */\n    protected async getPing(senderPeerId: number, text: string) {\n        await this.sendTextMessage(`We got this text: ${text}`, senderPeerId);\n    }\n}\n```\n\nNext, create an instance of the class by providing your access key and a unique bot id. This allows your application \nto distinguish between different bots. Finally, start the bot by providing the name of the room.\n\n```typescript\n\nconst main = async function() {\n  const bot = new MyBot(\"Ad4R7/hpCx1U5yGvC61oNBeJ/fWiW7dodvXWW7MEwrjg\", \"bot-00001\");\n  \n  // Set the sample rate and number of channels to use for audio capture (default is 48000 and 1)\n  const sampleRate = 48000;\n  const numChannels = 1;\n  \n  await bot.start(\"Lobby\", sampleRate, numChannels);\n}\n\nmain()\n  .then(() => {\n    console.log(\"Bot started\");\n  })\n  .catch((err) => {\n    console.error(\"Could not start bot\", err);\n  });\n```\n\n**Please note:** The `start` function provides \n\n## Functions you can override\n\nYou can override these functions of the `OdinBot` class to adapt functionality:\n\n- `protected override registerRPCMethods()`: Called when the bot is started. Use this to register your own RPC methods\n- `protected override async onPeerLeft(event: OdinPeerLeftEventPayload, user: IUser)`: Called when a new user joined the room\n- `protected override async onPeerJoined(event: OdinPeerJoinedEventPayload, user: IUser)`: Called when a user left the room\n- `protected override async onTextMessageReceived(event: OdinMessageReceivedEventPayload, message: IChatMessage, userData: IUserData)`: Called when a new text message was received\n- `protected override async onUserDataChanged(event: OdinPeerUserDataChangedEventPayload, userData: IUserData)`: Called when the user data of a user changed\n- `protected override async onRoomDataChanged(event: OdinRoomUserDataChangedEventPayload, roomData: IRoomData)`: Called when the room data changed\n- `protected override async onRoomJoined(event: OdinJoinedEventPayload, roomData: IRoomData)`: Called when the bot joined a room\n- `protected override async onRoomLeft(event: OdinLeftEventPayload)`: Called when the bot left a room\n- `protected override onMediaActivity(event: OdinMediaActivityEventPayload, user: IUser, active: boolean)`: Called when the media activity of a user changed\n- `protected override onMediaAdded(event: OdinMediaAddedEventPayload, user: IUser, mediaId: number)`: Called when a user added a new media stream\n- `protected override onMediaRemoved(event: OdinMediaRemovedEventPayload, user: IUser, mediaId: number)`: Called when a user removed a media stream\n- `protected override onAudioDataReceived(event: OdinAudioDataReceivedEventPayload, user: IUser)`: Called when new audio samples are available\n\n## Capturing audio\n\nWith the new Bot SDK (from version 0.2.0) you can record audio from each individual user. To do so, you need to \nstart capturing audio:\n \n```typescript\n    this.startCaptureAudio();\n```\n\nIf you want to capture audio right from the beginning, use the `onBeforeJoin` callback function to start capturing:\n\n```typescript\nclass MyBot extends OdinBot {\n    //  ...\n    protected override onBeforeJoin() {\n        this.startCaptureAudio();\n    }\n    //  ...\n}\n```\n\n**Please note:** Users typically don't expect to be recorded. So you should inform your users about that by sending a\nmessage or by showing a popup.\n\nYou will now receive `onAudioDataReceived` events for each user that is talking every 20 milliseconds. In the event \npayload you'll receive 16-bit samples ranging from -32768 to 32767 or 32-bit floats ranging from -1 to 1. The sample \nrate is determined by the sample rate and channel count that you set when starting the bot. Different audio \nlibraries handle audio differently and require different samples. You should be fine with either the 16-bit or \n32-bit samples.\n\nThis is a simple example of how to record audio using the `wav` NPM package:\n\n```typescript\nclass MyBot extends OdinBot {\n    private fileRecorder: wav.FileWriter;\n    //  ...\n    protected override onBeforeJoin() {\n        // Start capture audio (required to receive audio data)\n        this.startCaptureAudio();\n        \n        this.fileRecorder = new wav.FileWriter(\"audio.wav\", {\n            channels: 1,\n            sampleRate: 48000,\n            bitDepth: 16\n        });\n    }\n\n    protected override async onAudioDataReceived(event: OdinAudioDataReceivedEventPayload, user: IUser) {\n        // You can directly write the 16 bit samples to the WAV encoder\n        this.fileRecorder.wavEncoder.file.write(event.samples16, (error) => {\n            if (error) {\n                console.log(\"Failed to write audio file\");\n            }\n        });\n    }\n    //  ...\n}\n```\n\nAs you can see, it's super simple to receive audio data and working with them. In our example (see /examples folder) \nwe show you how to leverage OpenAI to transcribe audio. As you receive individual audio files for each user, you can \nalso use that for moderation purposes.\n\n## Sending audio\n\nWith the new Bot SDK (from version 0.2.0) you can also send audio to the room. To do so, you need to create an \n`OdinMedia` instance like this:\n\n```typescript\n// Create a new audio stream with 44.1 kHz and 1 channel\nconst media = room.createAudioStream(44200, 1);\n\n// Prepare our MP3 decoder and load the sample file\nconst audioBuffer = await decode(fs.readFileSync('./santa.mp3'));\n\n// Create a stream that will match the settings of the file\nconst audioBufferStream = new AudioBufferStream({channels: 1, sampleRate: 44100, float: true, bitDepth: 32});\n\n// Whenever the stream has data, send it to the media stream\naudioBufferStream.on('data', (data) => {\n    const floats = new Float32Array(new Uint8Array(data).buffer)\n    media.sendAudioData(floats);\n});\n\n// Write the audio file to the stream. AudioBufferStream will read the file and send it as a media stream which will\n// trigger the on('data') event which we use to just forward the samples to ODIN\naudioBufferStream.write(audioBuffer);\n}\n```\n\nWe used the npm packages `audio-buffer-stream` and `audio-decode` for this example code. Of course there are other \nways to handle audio. It's just important to regularly (every 20 milliseconds) send audio data to the media stream. \nODIN requires 32-bit floats with values ranging from -1 to 1. The sample rate and channel count must match the \noptions used when creating the media object.\n\n## Samples\n\nYou can find a sample bot in the `examples` folder. It's a simple bot that will send a message to the room when a \nuser joins or leaves and answers questions starting with `@bot` using ChatGPT-API from OpenAI. It also records audio \nand transcribes them using OpenAIs new `whisper` model.\n\nThe `@4players/odin-nodejs` package also contains some working samples for recording and playing audio.\n\n## RPC methods\n\nThe `@4players/odin-foundation` packages provides data structures for different kind of messages:\n\n- `message`: A simple text message\n- `poke`: A text message that notifies the user\n- `rpc` : A remote procedure call that can be used to trigger actions in the bot\n\nYou need to register a member function of your class as a RPC method by calling the `registerRPCMethod` function. \nBest place for that is to override the `registerRPCMethods` function.\n\n```typescript\nclass MyBot extends OdinBot {\n  //  ...\n  protected override registerRPCMethods() {\n    this.registerRPCMethod(\"getUsers\");\n    this.registerRPCMethod(\"getPing\");\n  }\n  //  ...\n}\n```\n\nRPC methods need to have this format:\n\n```typescript\nexport type OdinBotRPCMethod = (senderPeerId: number, ...args: any[]) => void;\n```\n\nThe first parameter is the peer id of the sender (of the rpc call) and optionally additional parameters.\n\nTo send the RPC call from your application, you only need to send a message with this data structure to the bot. The \nbot will then call the registered RPC method.\n\n```typescript\nconst rpcPayload: IRPCPayload = {\n  method: 'getPing',\n  args: ['This is my text and expect the bot to send it back']\n}\n\nconst message: IMessageTransferFormat = {\n  kind: 'rpc',\n  payload: rpcPayload\n}\n\nawait this.room.sendMessage(this.encodeObjToUint8Array(message));\n```\n","readmeFilename":"README.md"}