@bulwark-ai/gateway 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -449,6 +449,19 @@ for await (const event of gateway.chatStream({ /* same params */ })) {
449
449
  | **AI cost management** | Per-user budgets, alert thresholds, cost tracking per model |
450
450
  | **Security-first AI** | Prompt hardening, injection guard, SSRF protection |
451
451
 
452
+ ## KB Chat — "Chat with Your Docs"
453
+
454
+ Standalone knowledge base chat app included. Upload documents, chat with AI that references them.
455
+
456
+ ```bash
457
+ cd packages/kb-chat
458
+ npm install
459
+ npx tsx server.ts # API on :3200
460
+ npm run dev # UI on :3201
461
+ ```
462
+
463
+ Enter your OpenAI key → drag-and-drop documents → chat with source citations. Self-hosted, private, your data never leaves your machine.
464
+
452
465
  ## Architecture
453
466
 
454
467
  ```
@@ -528,26 +541,47 @@ Run integration tests: `OPENAI_API_KEY=sk-xxx npx vitest run src/__tests__/integ
528
541
 
529
542
  | Feature | Bulwark | LiteLLM | Portkey | Helicone |
530
543
  |---------|---------|---------|---------|----------|
544
+ | **Deployment** | | | | |
531
545
  | Self-hosted | Yes | Yes | No (SaaS) | Partial |
532
- | TypeScript | Yes | No (Python) | No | No |
533
- | Embeddable | Yes (`npm install`) | No (proxy) | No | No |
534
- | PII Detection | 15 types + custom | Plugin | Partial | No |
535
- | Output PII Scan | Yes | No | No | No |
536
- | Output PII Protection | Yes (non-streaming) | No | No | No |
546
+ | Embeddable (`npm install`) | Yes | No (proxy) | No | No |
547
+ | Docker Compose | Yes | Yes | No | No |
548
+ | TypeScript-native | Yes | No (Python) | No | No |
549
+ | **Security** | | | | |
550
+ | PII Detection | 14 types + custom + Luhn | Plugin | Partial | No |
551
+ | Output PII Scan | Yes (input + output) | No | No | No |
537
552
  | Prompt Injection Guard | 20+ patterns | No | No | No |
538
- | Budget Control | Per-user/team | Yes | Yes | No |
539
- | Audit Log | Yes | Yes | Yes | Yes |
540
- | Multi-Tenant | Yes | No | No | No |
541
- | Content Policies | 4 types, scoped | Plugin | Partial | No |
542
- | RAG/KB | Built-in | No | No | No |
553
+ | System Prompt Hardening | Yes | No | No | No |
554
+ | SSRF Protection | Yes | No | N/A | N/A |
555
+ | Content Policies | 4 types, team-scoped | Plugin | Partial | No |
556
+ | ReDoS Protection | Yes (PII + policies) | No | No | No |
557
+ | Auth Bypass Prevention | Yes (whitelist body) | No | N/A | N/A |
558
+ | **Governance** | | | | |
559
+ | Budget Control | Per-user/team/tenant | Yes | Yes | No |
560
+ | Rate Limiting | Yes (memory + Redis) | Yes | Yes | No |
561
+ | Audit Log | Yes (immutable) | Yes | Yes | Yes |
562
+ | Multi-Tenant Isolation | Yes (data + query) | No | No | No |
563
+ | Config Presets | strict/balanced/dev | No | No | No |
564
+ | Fail Mode | fail-open/fail-closed | No | No | No |
565
+ | Kill Switch | Yes (runtime toggle) | No | No | No |
566
+ | Debug/Trace Mode | Yes | No | No | Yes |
567
+ | **AI Features** | | | | |
568
+ | LLM Providers | 6 + Azure | 100+ | Many | Many |
569
+ | Retry + Fallback | Yes (cross-provider) | Yes | Yes | No |
570
+ | RAG Knowledge Base | Built-in | No | No | No |
571
+ | KB Chat App | Yes (standalone) | No | No | No |
543
572
  | Streaming (SSE) | Yes | Yes | Yes | Yes |
544
- | GDPR Module | Yes | No | No | No |
545
- | SOC 2 Module | Yes | No | No | No |
546
- | Admin UI | Yes | Separate | SaaS | SaaS |
547
- | Redis Support | Yes | No | N/A | N/A |
548
- | Providers | 6 | 100+ | Many | Many |
549
- | Retry + Fallback | Yes | Yes | Yes | No |
550
- | Test Suite | 136 tests | ? | ? | ? |
573
+ | Metadata Tagging | Yes | No | Yes | Yes |
574
+ | **Compliance** | | | | |
575
+ | GDPR | Yes (erasure, export, retention) | No | No | No |
576
+ | SOC 2 | Yes (anomaly, vendor, change log) | No | No | No |
577
+ | HIPAA | Yes (PHI logging, BAA tracking) | No | No | No |
578
+ | CCPA | Yes (access, delete, opt-out, GPC) | No | No | No |
579
+ | Data Residency | Yes (region checks, TIA) | No | No | No |
580
+ | **Developer Experience** | | | | |
581
+ | Admin UI | Yes (9 pages) | Separate | SaaS | SaaS |
582
+ | Express/Next.js/Fastify | Yes (3 middleware) | No | No | No |
583
+ | Test Suite | 136 real LLM tests | ? | ? | ? |
584
+ | Integration Examples | 4 (Express, Next, Fastify, RAG) | Yes | Yes | Yes |
551
585
 
552
586
  ## License
553
587
 
package/dist/index.js CHANGED
@@ -215,7 +215,7 @@ var require_package = __commonJS({
215
215
  "package.json"(exports2, module2) {
216
216
  module2.exports = {
217
217
  name: "@bulwark-ai/gateway",
218
- version: "0.1.3",
218
+ version: "0.1.4",
219
219
  description: "Enterprise AI governance gateway \u2014 PII detection, prompt injection guard, budget control, audit logging, RAG, multi-tenant. Drop into any Node.js app.",
220
220
  main: "dist/index.js",
221
221
  types: "dist/index.d.ts",
@@ -267,7 +267,9 @@ var require_package = __commonJS({
267
267
  author: "Bulwark AI",
268
268
  license: "SEE LICENSE IN LICENSE",
269
269
  dependencies: {
270
+ "@anthropic-ai/sdk": "^0.39.0",
270
271
  "better-sqlite3": "^11.0.0",
272
+ openai: "^4.80.0",
271
273
  uuid: "^11.0.0"
272
274
  },
273
275
  devDependencies: {
@@ -282,15 +284,11 @@ var require_package = __commonJS({
282
284
  vitest: "^3.0.0"
283
285
  },
284
286
  peerDependencies: {
285
- openai: "^4.0.0",
286
- "@anthropic-ai/sdk": "^0.30.0",
287
287
  express: "^4.0.0 || ^5.0.0",
288
288
  pg: "^8.0.0",
289
289
  ioredis: "^5.0.0"
290
290
  },
291
291
  peerDependenciesMeta: {
292
- openai: { optional: true },
293
- "@anthropic-ai/sdk": { optional: true },
294
292
  express: { optional: true },
295
293
  pg: { optional: true },
296
294
  ioredis: { optional: true }
package/dist/index.mjs CHANGED
@@ -211,7 +211,7 @@ var require_package = __commonJS({
211
211
  "package.json"(exports, module) {
212
212
  module.exports = {
213
213
  name: "@bulwark-ai/gateway",
214
- version: "0.1.3",
214
+ version: "0.1.4",
215
215
  description: "Enterprise AI governance gateway \u2014 PII detection, prompt injection guard, budget control, audit logging, RAG, multi-tenant. Drop into any Node.js app.",
216
216
  main: "dist/index.js",
217
217
  types: "dist/index.d.ts",
@@ -263,7 +263,9 @@ var require_package = __commonJS({
263
263
  author: "Bulwark AI",
264
264
  license: "SEE LICENSE IN LICENSE",
265
265
  dependencies: {
266
+ "@anthropic-ai/sdk": "^0.39.0",
266
267
  "better-sqlite3": "^11.0.0",
268
+ openai: "^4.80.0",
267
269
  uuid: "^11.0.0"
268
270
  },
269
271
  devDependencies: {
@@ -278,15 +280,11 @@ var require_package = __commonJS({
278
280
  vitest: "^3.0.0"
279
281
  },
280
282
  peerDependencies: {
281
- openai: "^4.0.0",
282
- "@anthropic-ai/sdk": "^0.30.0",
283
283
  express: "^4.0.0 || ^5.0.0",
284
284
  pg: "^8.0.0",
285
285
  ioredis: "^5.0.0"
286
286
  },
287
287
  peerDependenciesMeta: {
288
- openai: { optional: true },
289
- "@anthropic-ai/sdk": { optional: true },
290
288
  express: { optional: true },
291
289
  pg: { optional: true },
292
290
  ioredis: { optional: true }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bulwark-ai/gateway",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Enterprise AI governance gateway — PII detection, prompt injection guard, budget control, audit logging, RAG, multi-tenant. Drop into any Node.js app.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -31,7 +31,9 @@
31
31
  "author": "Bulwark AI",
32
32
  "license": "SEE LICENSE IN LICENSE",
33
33
  "dependencies": {
34
+ "@anthropic-ai/sdk": "^0.39.0",
34
35
  "better-sqlite3": "^11.0.0",
36
+ "openai": "^4.80.0",
35
37
  "uuid": "^11.0.0"
36
38
  },
37
39
  "devDependencies": {
@@ -46,15 +48,11 @@
46
48
  "vitest": "^3.0.0"
47
49
  },
48
50
  "peerDependencies": {
49
- "openai": "^4.0.0",
50
- "@anthropic-ai/sdk": "^0.30.0",
51
51
  "express": "^4.0.0 || ^5.0.0",
52
52
  "pg": "^8.0.0",
53
53
  "ioredis": "^5.0.0"
54
54
  },
55
55
  "peerDependenciesMeta": {
56
- "openai": { "optional": true },
57
- "@anthropic-ai/sdk": { "optional": true },
58
56
  "express": { "optional": true },
59
57
  "pg": { "optional": true },
60
58
  "ioredis": { "optional": true }