{"_id":"rebuff","_rev":"10-a8b2db28fbd90cee53c3a3a7854c1a20","time":{"modified":"2023-11-28T00:52:05.232Z","created":"2023-05-08T03:32:47.432Z","8.0.0":"2014-04-05T16:20:07.725Z","0.0.1":"2023-05-08T03:32:47.651Z","0.0.2":"2023-10-24T20:50:33.911Z","0.0.3":"2023-10-24T22:22:05.491Z","0.0.4":"2023-10-25T18:32:28.892Z","0.1.0":"2023-11-28T00:52:04.981Z"},"name":"rebuff","dist-tags":{"latest":"0.1.0"},"versions":{"0.0.1":{"name":"rebuff","version":"0.0.1","description":"","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/woop/rebuff.git"},"author":{"name":"W Pienaar"},"license":"ISC","bugs":{"url":"https://github.com/woop/rebuff/issues"},"homepage":"https://github.com/woop/rebuff#readme","gitHead":"df0fb61171d2ffb19a82382cb54ab549a2e191f8","_id":"rebuff@0.0.1","_nodeVersion":"18.15.0","_npmVersion":"9.5.0","dist":{"integrity":"sha512-aqwznJyCIFd6Tap7h7JSTE4LERgLxTuhOkOA4FWKcyfbZ0zQuJJGm2zWgQRKhUa88LFyFnGIN8TjouJKZCXX3A==","shasum":"7b10e9e65daec2d01afadf4123e493a3ae7c6989","tarball":"https://registry.npmjs.org/rebuff/-/rebuff-0.0.1.tgz","fileCount":1,"unpackedSize":428,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDeWDULunEdK3mH7p9StbwwSpfa1libdek38M314Qx1gIhAI3DsKqli31dPd4NkhbG6qv4MRBnh1Q9idhaeZhk80Rl"}]},"_npmUser":{"name":"willempienaar","email":"npm@willem.co"},"directories":{},"maintainers":[{"name":"willempienaar","email":"npm@willem.co"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rebuff_0.0.1_1683516767432_0.192411174940621"},"_hasShrinkwrap":false},"0.0.2":{"name":"rebuff","version":"0.0.2","description":"Rebuff's Javascript client SDK for Node and the browser","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","format":"prettier --write .","lint":"eslint .","lint:fix":"eslint . --fix","lint:debug":"eslint src/sdk.ts --debug","test":"mocha --require ts-node/register tests/**/*.test.ts"},"repository":{"type":"git","url":"git+https://github.com/protectai/rebuff.git"},"author":{"name":"Protect AI"},"license":"Apache-2.0","bugs":{"url":"https://github.com/protectai/rebuff/issues"},"homepage":"https://github.com/protectai/rebuff#readme","dependencies":{"node-fetch":"^3.3.1"},"_id":"rebuff@0.0.2","_nodeVersion":"18.16.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-df1v/d2G9kDlaH0O2kBAmKWu/NfXWAIVPuS1yYxwT19ZgSRFwbFtJkIIiWe0YM8RJaBaifmWPPitQqABY0AuOQ==","shasum":"c98407e75876f1db28ac46f7214477c795630ccf","tarball":"https://registry.npmjs.org/rebuff/-/rebuff-0.0.2.tgz","fileCount":5,"unpackedSize":12462,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGiMVzjfbPkgxnq14QiixvHFjK7VAMhvlmeFgSn57/aRAiEAly+z55RqAPZ/OOezzBfEWjP1Kr5kIHYprTh9EoHONys="}]},"_npmUser":{"name":"caleb-protectai","email":"caleb@protectai.com"},"directories":{},"maintainers":[{"name":"willempienaar","email":"npm@willem.co"},{"name":"seanpmorgan","email":"seanpmorgan123@gmail.com"},{"name":"caleb-protectai","email":"caleb@protectai.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rebuff_0.0.2_1698180633606_0.4138328268126099"},"_hasShrinkwrap":false},"0.0.3":{"name":"rebuff","version":"0.0.3","description":"Rebuff's Javascript client SDK for Node and the browser","main":"src/index.ts","scripts":{"build":"tsc","format":"prettier --write .","lint":"eslint .","lint:fix":"eslint . --fix","lint:debug":"eslint src/sdk.ts --debug","test":"mocha --require ts-node/register tests/**/*.test.ts"},"repository":{"type":"git","url":"git+https://github.com/protectai/rebuff.git"},"author":{"name":"Protect AI"},"license":"Apache-2.0","bugs":{"url":"https://github.com/protectai/rebuff/issues"},"homepage":"https://github.com/protectai/rebuff#readme","dependencies":{"@pinecone-database/pinecone":"^0.1.6","chai":"^4.3.7","crypto":"^1.0.1","langchain":"^0.0.146","node-fetch":"^3.3.1","openai":"^3.2.1","string-similarity":"^4.0.4"},"devDependencies":{"@types/chai":"^4.3.9","@types/mocha":"^10.0.3","@types/string-similarity":"^4.0.1","mocha":"^10.2.0"},"_id":"rebuff@0.0.3","dist":{"shasum":"9bc789ac0a71db1e036801c4e7c0e145b3c47b6c","integrity":"sha512-MUjZbcSOwJ495yY0IDhfLmtzJZzUeucJK9pdk+E4JmIx8XWdI1FoegNyCjhIZ3X6cE+oWDagma+QfgUdI4esUw==","tarball":"https://registry.npmjs.org/rebuff/-/rebuff-0.0.3.tgz","fileCount":14,"unpackedSize":21265,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCH0mQGYVcutlDDS5YV7JaAD5l+6eV33e0Q6f286WsdJ8CIQDyjlrlREVwLHFe3A43lpDmvDqpMt1Q9eCvs+rHOGdfDA=="}]},"_npmUser":{"name":"caleb-protectai","email":"caleb@protectai.com"},"directories":{},"maintainers":[{"name":"willempienaar","email":"npm@willem.co"},{"name":"seanpmorgan","email":"seanpmorgan123@gmail.com"},{"name":"caleb-protectai","email":"caleb@protectai.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rebuff_0.0.3_1698186125229_0.7821277819733017"},"_hasShrinkwrap":false},"0.0.4":{"name":"rebuff","version":"0.0.4","description":"Rebuff's Javascript client SDK for Node and the browser","main":"src/index.ts","scripts":{"build":"tsc","format":"prettier --write .","lint":"eslint .","lint:fix":"eslint . --fix","lint:debug":"eslint src/sdk.ts --debug","test":"mocha --require ts-node/register tests/**/*.test.ts"},"repository":{"type":"git","url":"git+https://github.com/protectai/rebuff.git"},"author":{"name":"Protect AI"},"license":"Apache-2.0","bugs":{"url":"https://github.com/protectai/rebuff/issues"},"homepage":"https://github.com/protectai/rebuff#readme","dependencies":{"@pinecone-database/pinecone":"^0.1.6","chai":"^4.3.7","crypto":"^1.0.1","langchain":"^0.0.146","node-fetch":"^3.3.1","openai":"^3.2.1","string-similarity":"^4.0.4"},"devDependencies":{"@types/chai":"^4.3.9","@types/mocha":"^10.0.3","@types/string-similarity":"^4.0.1","mocha":"^10.2.0"},"_id":"rebuff@0.0.4","dist":{"shasum":"98a998f8d9ed6a3c3505eab2ddc422b8e186cda7","integrity":"sha512-MQdh64nZq9uRAY5zKATea3tSOKP7XNw/opXuzWTUHOHWBZ6dEGgM2CJFIC3KcpOZu+CGqVrPUPUvZGiD4/Yw/w==","tarball":"https://registry.npmjs.org/rebuff/-/rebuff-0.0.4.tgz","fileCount":14,"unpackedSize":21265,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDm7w+I5nDskDrzM+QNPucd2CEnhUSDAqh4l9fQvcK6vgIgU9Hzdq/duzqGSLnMJuQzjNNj7lFo3/1eDv9U+qCBhHc="}]},"_npmUser":{"name":"caleb-protectai","email":"caleb@protectai.com"},"directories":{},"maintainers":[{"name":"willempienaar","email":"npm@willem.co"},{"name":"seanpmorgan","email":"seanpmorgan123@gmail.com"},{"name":"caleb-protectai","email":"caleb@protectai.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rebuff_0.0.4_1698258748646_0.3144708875230424"},"_hasShrinkwrap":false},"0.1.0":{"name":"rebuff","version":"0.1.0","description":"Rebuff's Javascript client SDK for Node and the browser","main":"src/index.ts","type":"module","scripts":{"build":"tsc","format":"prettier --write .","lint":"eslint .","lint:fix":"eslint . --fix","lint:debug":"eslint src/sdk.ts --debug","test":"tests/setup-and-run-tests.sh"},"repository":{"type":"git","url":"git+https://github.com/protectai/rebuff.git"},"author":{"name":"Protect AI"},"license":"Apache-2.0","bugs":{"url":"https://github.com/protectai/rebuff/issues"},"homepage":"https://github.com/protectai/rebuff#readme","dependencies":{"@pinecone-database/pinecone":"^0.1.6","chai":"^4.3.7","chromadb":"1.5.6","crypto":"^1.0.1","langchain":"^0.0.159","node-fetch":"^3.3.1","openai":"^3.2.1","string-similarity":"^4.0.4"},"devDependencies":{"@types/chai":"^4.3.9","@types/mocha":"^10.0.3","@types/string-similarity":"^4.0.1","ts-node":"^10.9.1","mocha":"^10.2.0"},"_id":"rebuff@0.1.0","dist":{"shasum":"ac3a578c72b73e85fa79e43e876ade6146c7d34b","integrity":"sha512-TlUQ+zfR5bMbk6Rs4PBN2V5j+SvAjMeMgd8mChnJD+Afm/6eTkWMMkzH2L6KfFp5olMvqi4Ev4QWHHPzR96cOg==","tarball":"https://registry.npmjs.org/rebuff/-/rebuff-0.1.0.tgz","fileCount":16,"unpackedSize":109946,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCavGCEqpMU4Iy99oSHYqyAxZ3bg964d2g1aHemomzMqQIgeWXsAtD7TwpxVsvKjV7AsFhvRhjytF6tHSA+oslP1xE="}]},"_npmUser":{"name":"seanpmorgan","email":"seanpmorgan123@gmail.com"},"directories":{},"maintainers":[{"name":"willempienaar","email":"npm@willem.co"},{"name":"seanpmorgan","email":"seanpmorgan123@gmail.com"},{"name":"caleb-protectai","email":"caleb@protectai.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rebuff_0.1.0_1701132724821_0.7537958721340117"},"_hasShrinkwrap":false}},"maintainers":[{"name":"willempienaar","email":"npm@willem.co"},{"name":"seanpmorgan","email":"seanpmorgan123@gmail.com"},{"name":"caleb-protectai","email":"caleb@protectai.com"}],"homepage":"https://github.com/protectai/rebuff#readme","repository":{"type":"git","url":"git+https://github.com/protectai/rebuff.git"},"author":{"name":"Protect AI"},"bugs":{"url":"https://github.com/protectai/rebuff/issues"},"license":"Apache-2.0","readme":"<!-- markdownlint-configure-file {\n  \"MD013\": {\n    \"code_blocks\": false,\n    \"tables\": false\n  },\n  \"MD033\": false,\n  \"MD041\": false\n} -->\n\n<div align=\"center\">\n\n## Rebuff.ai\n\n  <img width=\"250\" src=\"https://imgur.com/ishzqSK.png\" alt=\"Rebuff Logo\">\n\n### **Self-hardening prompt injection detector**\n\nRebuff is designed to protect AI applications from prompt injection (PI) attacks through a [multi-layered defense](#features).\n\n[Playground](https://playground.rebuff.ai/) •\n[Discord](https://discord.gg/R3U2XVNKeE) •\n[Features](#features) •\n[Installation](#installation) •\n[Getting started](#getting-started) •\n[Docs](https://docs.rebuff.ai)\n\n</div>\n<div align=\"center\">\n\n</div>\n\n## Disclaimer\n\nRebuff is still a prototype and **cannot provide 100% protection** against prompt injection attacks!\n\n## Features\n\nRebuff offers 4 layers of defense:\n\n- Heuristics: Filter out potentially malicious input before it reaches the LLM.\n- LLM-based detection: Use a dedicated LLM to analyze incoming prompts and identify potential attacks.\n- VectorDB: Store embeddings of previous attacks in a vector database to recognize and prevent similar attacks in the future.\n- Canary tokens: Add canary tokens to prompts to detect leakages, allowing the framework to store embeddings about the incoming prompt in the vector database and prevent future attacks.\n\n## Roadmap\n\n- [x] Prompt Injection Detection\n- [x] Canary Word Leak Detection\n- [x] Attack Signature Learning\n- [x] JavaScript/TypeScript SDK\n- [ ] Python SDK to have parity with TS SDK\n- [ ] Local-only mode\n- [ ] User Defined Detection Strategies\n- [ ] Heuristics for adversarial suffixes\n\n## Installation\n\n```bash\nnpm i rebuff\n```\n\n## Getting started\n\nImporting the Rebuff SDK:\n\n```typescript\nimport { RebuffSdk } from \"rebuff\";\n```\n\nImporting the Rebuff API interface:\n\n```typescript\nimport { RebuffApi } from \"rebuff\";\n```\n\n🚧🚧🚧 More Coming Soon 🚧🚧🚧\n","readmeFilename":"README.md","description":"Rebuff's Javascript client SDK for Node and the browser"}