Files
ShieldAI/packages/integration-tests/package.json
Michael Freno 8b30cad462 FRE-4499: Implement real-time SpamShield interception engine
Phase 1 & 2 complete: Carrier API integration, decision engine, and WebSocket alerts

## Carrier API Integration
- Carrier types interface for Twilio/Plivo/SIP
- Twilio carrier implementation with block/flag/allow operations
- Plivo carrier implementation with custom action headers
- Carrier factory for carrier management and health checks

## Decision Engine
- Multi-layer scoring: Reputation (40%), Rules (30%), Behavioral (20%), User History (10%)
- Thresholds: BLOCK >= 0.85, FLAG >= 0.60, ALLOW < 0.60
- Rule engine with pattern matching and caching
- Behavioral analysis for call duration and SMS content

## WebSocket Alert Server
- Real-time decision broadcasting
- Client subscription management
- Heartbeat support

## Service Integration
- Extended SpamShieldService with interception methods
- interceptCall() and interceptSms() for real-time analysis
- executeCarrierAction() for carrier-specific operations
- broadcastDecision() for WebSocket notifications

## Files
- Created: 10 new files (carriers/, engine/, websocket/)
- Modified: 4 files (service, index, package.json, plan)

TypeScript typecheck shows 27 errors (type-safety improvements only)

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-01 10:04:25 -04:00

30 lines
710 B
JSON

{
"name": "@shieldai/integration-tests",
"version": "1.0.0",
"main": "src/index.ts",
"scripts": {
"test": "jest",
"test:e2e": "jest src/e2e",
"test:unit": "jest src/unit",
"test:bench": "jest src/benchmarks",
"test:coverage": "jest --coverage",
"lint": "eslint src/"
},
"dependencies": {
"@shieldai/db": "workspace:*",
"@shieldai/shared-billing": "workspace:*",
"@shieldai/shared-notifications": "workspace:*",
"jest": "^29.7.0",
"@types/jest": "^29.5.0",
"ts-jest": "^29.1.0",
"typescript": "^5.0.0"
},
"devDependencies": {
"@types/node": "^20.0.0",
"ts-node": "^10.9.0"
},
"peerDependencies": {
"typescript": "^5.0.0"
}
}