{"_id":"@cogitator-ai/fastify","_rev":"7-e42d4f1b4311e4da3545cbcfbed8044c","name":"@cogitator-ai/fastify","dist-tags":{"latest":"0.1.15"},"versions":{"0.1.1":{"name":"@cogitator-ai/fastify","version":"0.1.1","keywords":["cogitator","ai","agents","fastify","server","api","streaming","sse","websocket","llm"],"license":"MIT","_id":"@cogitator-ai/fastify@0.1.1","maintainers":[{"name":"el1fe","email":"piuro.pavel@gmail.com"}],"homepage":"https://github.com/cogitator-ai/Cogitator-AI#readme","bugs":{"url":"https://github.com/cogitator-ai/Cogitator-AI/issues"},"dist":{"shasum":"7b2b325f3d26fc2d7c6cc4ebc3686574f410cf99","tarball":"https://registry.npmjs.org/@cogitator-ai/fastify/-/fastify-0.1.1.tgz","fileCount":75,"integrity":"sha512-Cu7spqWXdj/Ec/Lpjte3af5sh4fGBCH3wGz+OXq/7FINGJfNi/gOQ/0NXcbGO2A+FLHBMrrP880j4fFQUb/joQ==","signatures":[{"sig":"MEQCIFFLAt7Qz8+rLyHrB1jIdPV0AE7zOR5JCQOBnHeWHc7YAiAgmdC57a2oWcU+G9QPyGr89uaTBxxZCU0EliRhkkN2PA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":115653},"main":"./dist/index.js","type":"module","_from":"file:cogitator-ai-fastify-0.1.1.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"tsc --watch","build":"tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"el1fe","email":"piuro.pavel@gmail.com"},"_resolved":"/private/var/folders/20/4d95hdvj45j337gtqpbx3v1m0000gn/T/f2bc9ba998a5d7bb1d1aa65dae14bffb/cogitator-ai-fastify-0.1.1.tgz","_integrity":"sha512-Cu7spqWXdj/Ec/Lpjte3af5sh4fGBCH3wGz+OXq/7FINGJfNi/gOQ/0NXcbGO2A+FLHBMrrP880j4fFQUb/joQ==","repository":{"url":"git+https://github.com/cogitator-ai/Cogitator-AI.git","type":"git","directory":"packages/fastify"},"_npmVersion":"10.9.0","description":"Fastify server adapter for Cogitator AI runtime","directories":{},"_nodeVersion":"22.11.0","dependencies":{"fastify-plugin":"^5.0.0","@cogitator-ai/core":"0.17.5","@cogitator-ai/types":"0.19.3","@cogitator-ai/server-shared":"0.1.0"},"_hasShrinkwrap":false,"devDependencies":{"fastify":"^5.2.1","@types/ws":"^8.5.0","typescript":"^5.6.0","@types/node":"^22.0.0","@fastify/swagger":"^9.4.2","@fastify/websocket":"^11.0.2","@fastify/rate-limit":"^10.2.1","@fastify/swagger-ui":"^5.2.2","@cogitator-ai/swarms":"0.4.7","@cogitator-ai/workflows":"0.5.4"},"peerDependencies":{"fastify":">=5.0.0"},"optionalDependencies":{"@fastify/swagger":"^9.0.0","@fastify/websocket":"^11.0.0","@fastify/rate-limit":"^10.0.0","@fastify/swagger-ui":"^5.0.0","@cogitator-ai/swarms":"0.4.7","@cogitator-ai/workflows":"0.5.4"},"_npmOperationalInternal":{"tmp":"tmp/fastify_0.1.1_1769505476388_0.7090817155886031","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@cogitator-ai/fastify","version":"0.1.2","keywords":["cogitator","ai","agents","fastify","server","api","streaming","sse","websocket","llm"],"license":"MIT","_id":"@cogitator-ai/fastify@0.1.2","maintainers":[{"name":"el1fe","email":"piuro.pavel@gmail.com"}],"homepage":"https://github.com/cogitator-ai/Cogitator-AI#readme","bugs":{"url":"https://github.com/cogitator-ai/Cogitator-AI/issues"},"dist":{"shasum":"4a348137084063f7e3e33f9d2897f9c7e0a58a35","tarball":"https://registry.npmjs.org/@cogitator-ai/fastify/-/fastify-0.1.2.tgz","fileCount":74,"integrity":"sha512-e20hrukiTLwTYKawuYRClKS0fu/dOVVKKfDtFKnuENYiaUA422pPYqjAREvwPdOTQTFQRU5g3sL0YotawHAp6w==","signatures":[{"sig":"MEYCIQCZtvjpgTFkh+URXoio0h49m/gm+sYO80AaEOU86H+5hQIhANRp3IE7Z+56kn3pNtLu8JzmfgBP1b05wj5W3WQbxtB0","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":114615},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"a6b9adee17ab69490d006ebca129a24d50e90b0f","scripts":{"dev":"tsc --watch","build":"tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"el1fe","email":"piuro.pavel@gmail.com"},"repository":{"url":"git+https://github.com/cogitator-ai/Cogitator-AI.git","type":"git","directory":"packages/fastify"},"_npmVersion":"10.9.0","description":"Fastify server adapter for Cogitator AI runtime","directories":{},"_nodeVersion":"22.11.0","dependencies":{"fastify-plugin":"^5.0.0","@cogitator-ai/core":"workspace:*","@cogitator-ai/types":"workspace:*","@cogitator-ai/server-shared":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"fastify":"^5.7.4","@types/ws":"^8.5.0","typescript":"^5.6.0","@types/node":"^22.0.0","@fastify/swagger":"^9.4.2","@fastify/websocket":"^11.0.2","@fastify/rate-limit":"^10.2.1","@fastify/swagger-ui":"^5.2.2","@cogitator-ai/swarms":"workspace:*","@cogitator-ai/workflows":"workspace:*"},"peerDependencies":{"fastify":">=5.0.0"},"optionalDependencies":{"@fastify/swagger":"^9.0.0","@fastify/websocket":"^11.0.0","@fastify/rate-limit":"^10.0.0","@fastify/swagger-ui":"^5.0.0","@cogitator-ai/swarms":"workspace:*","@cogitator-ai/workflows":"workspace:*"},"_npmOperationalInternal":{"tmp":"tmp/fastify_0.1.2_1771596825535_0.37920830084096124","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@cogitator-ai/fastify","version":"0.1.4","keywords":["cogitator","ai","agents","fastify","server","api","streaming","sse","websocket","llm"],"license":"MIT","_id":"@cogitator-ai/fastify@0.1.4","maintainers":[{"name":"el1fe","email":"piuro.pavel@gmail.com"}],"homepage":"https://github.com/cogitator-ai/Cogitator-AI#readme","bugs":{"url":"https://github.com/cogitator-ai/Cogitator-AI/issues"},"dist":{"shasum":"e3d74499e1284c7bfd0e2e68f8374ccaa0106084","tarball":"https://registry.npmjs.org/@cogitator-ai/fastify/-/fastify-0.1.4.tgz","fileCount":74,"integrity":"sha512-/jihgfAfrqmZQaVxRMhOOMYUJnOGA7sC1nsAiJXvXQrK+rVwi4t7nl43kH9GsJd5cCATqWXf3I/CkG6dG6gIrw==","signatures":[{"sig":"MEYCIQCjihOftVy4cuJE8aSe3VQOjHD7cOnfey1XzUDwqkHqWQIhAJ6guOCkyvVUX3TaFG/m2rERG0yFvQauYGp4ggdNe4FQ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":115331},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"bd13671fadc28e9010d374b6d85a73e9558d67d2","scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"el1fe","email":"piuro.pavel@gmail.com"},"repository":{"url":"git+https://github.com/cogitator-ai/Cogitator-AI.git","type":"git","directory":"packages/fastify"},"_npmVersion":"10.9.0","description":"Fastify server adapter for Cogitator AI runtime","directories":{},"_nodeVersion":"22.11.0","dependencies":{"fastify-plugin":"^5.0.0","@cogitator-ai/core":"workspace:*","@cogitator-ai/types":"workspace:*","@cogitator-ai/server-shared":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.18","fastify":"^5.7.4","@types/ws":"^8.5.0","typescript":"^5.6.0","@types/node":"^22.0.0","@fastify/swagger":"^9.4.2","@fastify/websocket":"^11.0.2","@fastify/rate-limit":"^10.2.1","@fastify/swagger-ui":"^5.2.2","@cogitator-ai/swarms":"workspace:*","@cogitator-ai/workflows":"workspace:*"},"peerDependencies":{"fastify":">=5.0.0"},"optionalDependencies":{"@fastify/swagger":"^9.0.0","@fastify/websocket":"^11.0.0","@fastify/rate-limit":"^10.0.0","@fastify/swagger-ui":"^5.0.0","@cogitator-ai/swarms":"workspace:*","@cogitator-ai/workflows":"workspace:*"},"_npmOperationalInternal":{"tmp":"tmp/fastify_0.1.4_1771980494954_0.15755016253624055","host":"s3://npm-registry-packages-npm-production"}},"0.1.6":{"name":"@cogitator-ai/fastify","version":"0.1.6","keywords":["cogitator","ai","agents","fastify","server","api","streaming","sse","websocket","llm"],"license":"MIT","_id":"@cogitator-ai/fastify@0.1.6","maintainers":[{"name":"el1fe","email":"piuro.pavel@gmail.com"}],"homepage":"https://github.com/cogitator-ai/Cogitator-AI#readme","bugs":{"url":"https://github.com/cogitator-ai/Cogitator-AI/issues"},"dist":{"shasum":"b7d1e4d70be266dc7d9401a9139dd42dac3e7816","tarball":"https://registry.npmjs.org/@cogitator-ai/fastify/-/fastify-0.1.6.tgz","fileCount":74,"integrity":"sha512-9Jn+sFFPJB7RoZfO3SV+Qpa6Apwifte5npzYdFOyRW+NB8Ar3vrk3iUklQ5yYZJLoCl2sK3TwDQiQozXlHghSg==","signatures":[{"sig":"MEQCIBjhQW7LD0ZU5kDLcCyqqGFV6v97J7kBFaEMTqPgpNgAAiBsNZ7KMfMzr34KzGvBf22EoRLhsWJi1yUQlXQWTC3vww==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":115331},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"f508be4a1a30c7bd136f0fa8b2e6cee5521416ab","scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"el1fe","email":"piuro.pavel@gmail.com"},"repository":{"url":"git+https://github.com/cogitator-ai/Cogitator-AI.git","type":"git","directory":"packages/fastify"},"_npmVersion":"10.9.0","description":"Fastify server adapter for Cogitator AI runtime","directories":{},"_nodeVersion":"22.11.0","dependencies":{"fastify-plugin":"^5.0.0","@cogitator-ai/core":"workspace:*","@cogitator-ai/types":"workspace:*","@cogitator-ai/server-shared":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.18","fastify":"^5.7.4","@types/ws":"^8.5.0","typescript":"^5.6.0","@types/node":"^22.0.0","@fastify/swagger":"^9.4.2","@fastify/websocket":"^11.0.2","@fastify/rate-limit":"^10.2.1","@fastify/swagger-ui":"^5.2.2","@cogitator-ai/swarms":"workspace:*","@cogitator-ai/workflows":"workspace:*"},"peerDependencies":{"fastify":">=5.0.0"},"optionalDependencies":{"@fastify/swagger":"^9.0.0","@fastify/websocket":"^11.0.0","@fastify/rate-limit":"^10.0.0","@fastify/swagger-ui":"^5.0.0","@cogitator-ai/swarms":"workspace:*","@cogitator-ai/workflows":"workspace:*"},"_npmOperationalInternal":{"tmp":"tmp/fastify_0.1.6_1772035571496_0.5270379024253855","host":"s3://npm-registry-packages-npm-production"}},"0.1.13":{"name":"@cogitator-ai/fastify","version":"0.1.13","keywords":["cogitator","ai","agents","fastify","server","api","streaming","sse","websocket","llm"],"license":"MIT","_id":"@cogitator-ai/fastify@0.1.13","maintainers":[{"name":"el1fe","email":"piuro.pavel@gmail.com"}],"homepage":"https://github.com/cogitator-ai/Cogitator-AI#readme","bugs":{"url":"https://github.com/cogitator-ai/Cogitator-AI/issues"},"dist":{"shasum":"83dd3774382b2a42402e4e1a303fb8402510e90d","tarball":"https://registry.npmjs.org/@cogitator-ai/fastify/-/fastify-0.1.13.tgz","fileCount":74,"integrity":"sha512-X++dB2RWQi8GOr3CV/6wPYqnheGg1ZCnUframtulmwZUJFD3uDfc2zzXMsYSgA9bF5nafUmQYpTEPC8LUW6v6w==","signatures":[{"sig":"MEUCIDaDwA7x8k3yLMvqBA87QxFZU5kl/9ftaSE0i3hwUb13AiEAlxyjjQsac3Y4LHWaBD164DQRNFL2CulLo9caWt5OFFU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":115332},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"33b6a8cb29bfdd7d2255acfa240b2df5d558354e","scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"el1fe","email":"piuro.pavel@gmail.com"},"repository":{"url":"git+https://github.com/cogitator-ai/Cogitator-AI.git","type":"git","directory":"packages/fastify"},"_npmVersion":"10.9.0","description":"Fastify server adapter for Cogitator AI runtime","directories":{},"_nodeVersion":"22.11.0","dependencies":{"fastify-plugin":"^5.0.0","@cogitator-ai/core":"workspace:*","@cogitator-ai/types":"workspace:*","@cogitator-ai/server-shared":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.18","fastify":"^5.7.4","@types/ws":"^8.5.0","typescript":"^5.6.0","@types/node":"^22.0.0","@fastify/swagger":"^9.4.2","@fastify/websocket":"^11.0.2","@fastify/rate-limit":"^10.2.1","@fastify/swagger-ui":"^5.2.2","@cogitator-ai/swarms":"workspace:*","@cogitator-ai/workflows":"workspace:*"},"peerDependencies":{"fastify":">=5.0.0"},"optionalDependencies":{"@fastify/swagger":"^9.0.0","@fastify/websocket":"^11.0.0","@fastify/rate-limit":"^10.0.0","@fastify/swagger-ui":"^5.0.0","@cogitator-ai/swarms":"workspace:*","@cogitator-ai/workflows":"workspace:*"},"_npmOperationalInternal":{"tmp":"tmp/fastify_0.1.13_1778881344804_0.3945260058938098","host":"s3://npm-registry-packages-npm-production"}},"0.1.14":{"name":"@cogitator-ai/fastify","version":"0.1.14","keywords":["cogitator","ai","agents","fastify","server","api","streaming","sse","websocket","llm"],"license":"MIT","_id":"@cogitator-ai/fastify@0.1.14","maintainers":[{"name":"el1fe","email":"piuro.pavel@gmail.com"}],"homepage":"https://github.com/cogitator-ai/Cogitator-AI#readme","bugs":{"url":"https://github.com/cogitator-ai/Cogitator-AI/issues"},"dist":{"shasum":"75609306d8266ad099a355a121ac1ae318715bea","tarball":"https://registry.npmjs.org/@cogitator-ai/fastify/-/fastify-0.1.14.tgz","fileCount":75,"integrity":"sha512-qsk7ZNOmqugPfzthk3b7mcRrRS//6grKTP+OsZS3j9kzGp5vEtMAB5RkUIlQ/4KJv29zDPQXbH1HyzNL5VyaMQ==","signatures":[{"sig":"MEUCIA2zlc0RBeYtVHF5McNYPy+0TMKnWBo+xZWjrNrg3jcPAiEA6kdtxGC26fSFTGHTtmiqVlR1OhoLP4sBKc8c/RQ6H30=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":116374},"main":"./dist/index.js","type":"module","_from":"file:cogitator-ai-fastify-0.1.14.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"el1fe","email":"piuro.pavel@gmail.com"},"_resolved":"/private/var/folders/20/4d95hdvj45j337gtqpbx3v1m0000gn/T/5105e3fff66868f7a8b4270605aa0df0/cogitator-ai-fastify-0.1.14.tgz","_integrity":"sha512-qsk7ZNOmqugPfzthk3b7mcRrRS//6grKTP+OsZS3j9kzGp5vEtMAB5RkUIlQ/4KJv29zDPQXbH1HyzNL5VyaMQ==","repository":{"url":"git+https://github.com/cogitator-ai/Cogitator-AI.git","type":"git","directory":"packages/fastify"},"_npmVersion":"10.9.0","description":"Fastify server adapter for Cogitator AI runtime","directories":{},"_nodeVersion":"22.11.0","dependencies":{"fastify-plugin":"^5.0.0","@cogitator-ai/core":"0.19.3","@cogitator-ai/types":"0.22.2","@cogitator-ai/server-shared":"0.1.0"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.18","fastify":"^5.7.4","@types/ws":"^8.5.0","typescript":"^5.6.0","@types/node":"^22.0.0","@fastify/swagger":"^9.4.2","@fastify/websocket":"^11.0.2","@fastify/rate-limit":"^10.2.1","@fastify/swagger-ui":"^5.2.2","@cogitator-ai/swarms":"0.4.19","@cogitator-ai/workflows":"0.5.16"},"peerDependencies":{"fastify":">=5.0.0"},"optionalDependencies":{"@fastify/swagger":"^9.0.0","@fastify/websocket":"^11.0.0","@fastify/rate-limit":"^10.0.0","@fastify/swagger-ui":"^5.0.0","@cogitator-ai/swarms":"0.4.19","@cogitator-ai/workflows":"0.5.16"},"_npmOperationalInternal":{"tmp":"tmp/fastify_0.1.14_1778882263301_0.262156638135532","host":"s3://npm-registry-packages-npm-production"}},"0.1.15":{"name":"@cogitator-ai/fastify","version":"0.1.15","description":"Fastify server adapter for Cogitator AI runtime","type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"main":"./dist/index.js","types":"./dist/index.d.ts","dependencies":{"fastify-plugin":"^5.0.0","@cogitator-ai/types":"0.22.3","@cogitator-ai/core":"0.19.4","@cogitator-ai/server-shared":"0.1.0"},"peerDependencies":{"fastify":">=5.0.0"},"optionalDependencies":{"@fastify/swagger":"^9.0.0","@fastify/swagger-ui":"^5.0.0","@fastify/rate-limit":"^10.0.0","@fastify/websocket":"^11.0.0","@cogitator-ai/workflows":"0.5.17","@cogitator-ai/swarms":"0.4.20"},"devDependencies":{"@fastify/swagger":"^9.4.2","@fastify/swagger-ui":"^5.2.2","@fastify/rate-limit":"^10.2.1","@fastify/websocket":"^11.0.2","@types/node":"^22.0.0","@types/ws":"^8.5.0","fastify":"^5.7.4","typescript":"^5.6.0","vitest":"^4.0.18","@cogitator-ai/workflows":"0.5.17","@cogitator-ai/swarms":"0.4.20"},"repository":{"type":"git","url":"git+https://github.com/cogitator-ai/Cogitator-AI.git","directory":"packages/fastify"},"license":"MIT","keywords":["cogitator","ai","agents","fastify","server","api","streaming","sse","websocket","llm"],"scripts":{"build":"tsc","dev":"tsc --watch","test":"vitest run","test:watch":"vitest","typecheck":"tsc --noEmit","clean":"rm -rf dist"},"_id":"@cogitator-ai/fastify@0.1.15","bugs":{"url":"https://github.com/cogitator-ai/Cogitator-AI/issues"},"homepage":"https://github.com/cogitator-ai/Cogitator-AI#readme","_integrity":"sha512-y5QjBfNDR/UVwUH8Hc0dOi9/FU/KaOFmiKnrXh3exnIeMOIRHUcTT1kReFBIYQ3o9QdooGR0XLD7r53annwmEQ==","_resolved":"/private/var/folders/20/4d95hdvj45j337gtqpbx3v1m0000gn/T/8c8b37c6122b4dec3ede4acc0b8a0486/cogitator-ai-fastify-0.1.15.tgz","_from":"file:cogitator-ai-fastify-0.1.15.tgz","_nodeVersion":"22.23.1","_npmVersion":"10.9.8","dist":{"integrity":"sha512-y5QjBfNDR/UVwUH8Hc0dOi9/FU/KaOFmiKnrXh3exnIeMOIRHUcTT1kReFBIYQ3o9QdooGR0XLD7r53annwmEQ==","shasum":"79b56f4a02d4d15006c496c9140931c5d713c035","tarball":"https://registry.npmjs.org/@cogitator-ai/fastify/-/fastify-0.1.15.tgz","fileCount":75,"unpackedSize":121705,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIQCTmFJifXH6/hKJIe+f0G1+dm3uASXk/3YhLsP/FWKARwIfHtXXxugw4gxiRUlgxSQEROL7a7NpSKoqWcszNWeTzw=="}]},"_npmUser":{"name":"el1fe","email":"piuro.pavel@gmail.com"},"directories":{},"maintainers":[{"name":"el1fe","email":"piuro.pavel@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/fastify_0.1.15_1785059672413_0.04653163868142962"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-27T09:17:56.277Z","modified":"2026-07-26T09:54:32.740Z","0.1.1":"2026-01-27T09:17:56.532Z","0.1.2":"2026-02-20T14:13:45.728Z","0.1.4":"2026-02-25T00:48:15.149Z","0.1.6":"2026-02-25T16:06:11.692Z","0.1.13":"2026-05-15T21:42:24.957Z","0.1.14":"2026-05-15T21:57:43.465Z","0.1.15":"2026-07-26T09:54:32.572Z"},"bugs":{"url":"https://github.com/cogitator-ai/Cogitator-AI/issues"},"license":"MIT","homepage":"https://github.com/cogitator-ai/Cogitator-AI#readme","keywords":["cogitator","ai","agents","fastify","server","api","streaming","sse","websocket","llm"],"repository":{"type":"git","url":"git+https://github.com/cogitator-ai/Cogitator-AI.git","directory":"packages/fastify"},"description":"Fastify server adapter for Cogitator AI runtime","maintainers":[{"name":"el1fe","email":"piuro.pavel@gmail.com"}],"readme":"# @cogitator-ai/fastify\n\nFastify server adapter for Cogitator AI runtime. Automatically generates REST API endpoints for agents, workflows, and swarms with SSE streaming, WebSocket support, and Swagger documentation.\n\n## Installation\n\n```bash\nnpm install @cogitator-ai/fastify fastify\n# or\npnpm add @cogitator-ai/fastify fastify\n```\n\n## Quick Start\n\n```typescript\nimport Fastify from 'fastify';\nimport { Cogitator, Agent } from '@cogitator-ai/core';\nimport { cogitatorPlugin } from '@cogitator-ai/fastify';\n\nconst fastify = Fastify({ logger: true });\n\nconst cogitator = new Cogitator({\n  defaultBackend: 'openai',\n  backends: { openai: { apiKey: process.env.OPENAI_API_KEY } },\n});\n\nconst chatAgent = new Agent({\n  name: 'chat',\n  instructions: 'You are a helpful assistant.',\n  model: 'gpt-4o-mini',\n});\n\nawait fastify.register(cogitatorPlugin, {\n  cogitator,\n  agents: { chat: chatAgent },\n  prefix: '/api',\n  enableSwagger: true,\n});\n\nawait fastify.listen({ port: 3000 });\nconsole.log('Server running on http://localhost:3000');\n```\n\n## Auto-generated Endpoints\n\n### Agents\n\n```\nGET    /api/agents                    - List all agents\nPOST   /api/agents/:name/run          - Run agent (JSON response)\nPOST   /api/agents/:name/stream       - Run agent (SSE stream)\n```\n\n### Threads (Memory)\n\n```\nGET    /api/threads/:id               - Get thread messages\nPOST   /api/threads/:id/messages      - Add message to thread\nDELETE /api/threads/:id               - Delete thread\n```\n\n### Workflows\n\n```\nGET    /api/workflows                 - List all workflows\nPOST   /api/workflows/:name/run       - Run workflow\nPOST   /api/workflows/:name/stream    - Stream workflow events\n```\n\n### Swarms\n\n```\nGET    /api/swarms                    - List all swarms\nPOST   /api/swarms/:name/run          - Run swarm\nPOST   /api/swarms/:name/stream       - Stream swarm events\nGET    /api/swarms/:name/blackboard   - Get shared state\n```\n\n### Tools & Docs\n\n```\nGET    /api/tools                     - List all tools\nGET    /api/health                    - Health check\nGET    /api/docs                      - Swagger UI\n```\n\n## Configuration\n\n```typescript\nawait fastify.register(cogitatorPlugin, {\n  cogitator,\n  agents: { chat: chatAgent, research: researchAgent },\n  workflows: { 'code-review': codeReviewWorkflow },\n  swarms: { 'dev-team': devTeamSwarm },\n  prefix: '/cogitator',\n  enableWebSocket: true,\n  enableSwagger: true,\n\n  // Authentication\n  auth: async (request) => {\n    const token = request.headers.authorization?.replace('Bearer ', '');\n    const user = await validateToken(token);\n    return { userId: user.id, roles: user.roles };\n  },\n\n  // Rate limiting (requires @fastify/rate-limit)\n  rateLimit: {\n    max: 100,\n    timeWindow: '1 minute',\n  },\n\n  // Swagger customization\n  swagger: {\n    title: 'My AI API',\n    description: 'AI-powered API endpoints',\n    version: '1.0.0',\n  },\n\n  // WebSocket options\n  websocket: {\n    path: '/ws',\n  },\n});\n```\n\n## SSE Streaming\n\nThe `/agents/:name/stream` endpoint returns Server-Sent Events:\n\n```typescript\nconst response = await fetch('/api/agents/chat/stream', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({ input: 'Hello!' }),\n});\n\nconst reader = response.body.getReader();\nconst decoder = new TextDecoder();\n\nwhile (true) {\n  const { done, value } = await reader.read();\n  if (done) break;\n\n  const lines = decoder.decode(value).split('\\n');\n  for (const line of lines) {\n    if (line.startsWith('data: ')) {\n      const event = JSON.parse(line.slice(6));\n      console.log(event);\n      // { type: 'text-delta', id: '...', delta: 'Hello' }\n    }\n  }\n}\n```\n\n### Stream Events\n\n| Event Type        | Description                             |\n| ----------------- | --------------------------------------- |\n| `start`           | Stream started, includes message ID     |\n| `text-start`      | Text generation started                 |\n| `text-delta`      | Text chunk received                     |\n| `text-end`        | Text generation finished                |\n| `tool-call-start` | Tool execution started                  |\n| `tool-call-end`   | Tool execution finished                 |\n| `tool-result`     | Tool returned result                    |\n| `workflow`        | Workflow event (node started/completed) |\n| `swarm`           | Swarm event (agent started/completed)   |\n| `error`           | Error occurred                          |\n| `finish`          | Stream finished, includes usage stats   |\n\n## WebSocket Support\n\nEnable real-time bidirectional communication:\n\n```typescript\nawait fastify.register(cogitatorPlugin, {\n  // ...\n  enableWebSocket: true,\n});\n```\n\nClient usage:\n\n```typescript\nconst ws = new WebSocket('ws://localhost:3000/api/ws');\n\nws.onmessage = (event) => {\n  const message = JSON.parse(event.data);\n  console.log(message);\n};\n\n// Run agent\nws.send(\n  JSON.stringify({\n    type: 'run',\n    id: 'req-1',\n    payload: {\n      type: 'agent',\n      name: 'chat',\n      input: 'Hello!',\n    },\n  })\n);\n\n// Subscribe to channel\nws.send(JSON.stringify({ type: 'subscribe', channel: 'updates' }));\n\n// Ping/pong\nws.send(JSON.stringify({ type: 'ping' }));\n```\n\n### WebSocket Message Types\n\n| Type          | Direction     | Description              |\n| ------------- | ------------- | ------------------------ |\n| `ping`        | Client→Server | Heartbeat                |\n| `pong`        | Server→Client | Heartbeat response       |\n| `subscribe`   | Client→Server | Subscribe to channel     |\n| `subscribed`  | Server→Client | Subscription confirmed   |\n| `unsubscribe` | Client→Server | Unsubscribe from channel |\n| `run`         | Client→Server | Run agent/workflow/swarm |\n| `stop`        | Client→Server | Cancel running operation |\n| `event`       | Server→Client | Stream event             |\n| `error`       | Server→Client | Error message            |\n\n## Custom Streaming\n\nUse `FastifyStreamWriter` for custom streaming routes:\n\n```typescript\nimport { FastifyStreamWriter, generateId } from '@cogitator-ai/fastify';\n\nfastify.post('/custom/stream', async (request, reply) => {\n  const writer = new FastifyStreamWriter(reply);\n  const messageId = generateId('msg');\n\n  writer.start(messageId);\n  const textId = generateId('txt');\n  writer.textStart(textId);\n\n  // Your streaming logic\n  writer.textDelta(textId, 'Hello ');\n  writer.textDelta(textId, 'World!');\n\n  writer.textEnd(textId);\n  writer.finish(messageId);\n  writer.close();\n});\n```\n\n## Optional Dependencies\n\nInstall these packages to enable additional features:\n\n```bash\n# Swagger UI\npnpm add @fastify/swagger @fastify/swagger-ui\n\n# Rate limiting\npnpm add @fastify/rate-limit\n\n# WebSocket support\npnpm add @fastify/websocket\n\n# Workflows support\npnpm add @cogitator-ai/workflows\n\n# Swarms support\npnpm add @cogitator-ai/swarms\n```\n\n## API Reference\n\n### cogitatorPlugin\n\n```typescript\nimport { cogitatorPlugin } from '@cogitator-ai/fastify';\n\nawait fastify.register(cogitatorPlugin, options);\n```\n\n### CogitatorPluginOptions\n\n```typescript\ninterface CogitatorPluginOptions {\n  cogitator: Cogitator;\n  agents?: Record<string, Agent>;\n  workflows?: Record<string, Workflow>;\n  swarms?: Record<string, SwarmConfig>;\n  prefix?: string; // Default: '/cogitator'\n  auth?: AuthFunction;\n  rateLimit?: RateLimitConfig;\n  enableSwagger?: boolean; // Default: false\n  enableWebSocket?: boolean; // Default: false\n  swagger?: SwaggerConfig;\n  websocket?: WebSocketConfig;\n}\n```\n\n### FastifyStreamWriter\n\n```typescript\nclass FastifyStreamWriter {\n  constructor(reply: FastifyReply);\n  start(messageId: string): void;\n  textStart(id: string): void;\n  textDelta(id: string, delta: string): void;\n  textEnd(id: string): void;\n  toolCallStart(id: string, toolName: string): void;\n  toolCallDelta(id: string, argsTextDelta: string): void;\n  toolCallEnd(id: string): void;\n  toolResult(id: string, toolCallId: string, result: unknown): void;\n  workflowEvent(event: string, data: unknown): void;\n  swarmEvent(event: string, data: unknown): void;\n  error(message: string, code?: string): void;\n  finish(messageId: string, usage?: Usage): void;\n  close(): void;\n}\n```\n\n## Fastify Decorators\n\nThe plugin adds decorators to the Fastify instance:\n\n```typescript\n// Access cogitator context\nfastify.cogitator.runtime; // Cogitator instance\nfastify.cogitator.agents; // Registered agents\nfastify.cogitator.workflows; // Registered workflows\nfastify.cogitator.swarms; // Registered swarms\n\n// Request decorators (in handlers)\nrequest.cogitatorAuth; // Auth context from auth hook\nrequest.cogitatorRequestId; // Unique request ID\nrequest.cogitatorStartTime; // Request start timestamp\n```\n\n## Error Handling\n\nAll endpoints return consistent error responses:\n\n```json\n{\n  \"error\": {\n    \"message\": \"Agent 'unknown' not found\",\n    \"code\": \"NOT_FOUND\"\n  }\n}\n```\n\nError codes map to HTTP status codes:\n\n- `INVALID_INPUT` → 400\n- `UNAUTHORIZED` → 401\n- `PERMISSION_DENIED` → 403\n- `NOT_FOUND` → 404\n- `RATE_LIMIT_EXCEEDED` → 429\n- `INTERNAL` → 500\n- `UNAVAILABLE` → 503\n- `UNIMPLEMENTED` → 501\n\n## JSON Schema Validation\n\nFastify's built-in validation is used for all endpoints. Request schemas are exported:\n\n```typescript\nimport {\n  AgentRunRequestSchema,\n  AgentRunResponseSchema,\n  AddMessageRequestSchema,\n  WorkflowRunRequestSchema,\n  SwarmRunRequestSchema,\n} from '@cogitator-ai/fastify';\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}