FRE-4517, FRE-4499: Complete SpamShield implementation and billing updates

- SpamFeedback table migration with timestamp index
- Real-time interception engine completion
- Billing service enhancements
- Classifier and rule engine updates

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
2026-05-01 19:53:19 -04:00
parent 3955b56e8d
commit 3663e5b80a
17 changed files with 7285 additions and 90 deletions

View File

@@ -1,4 +1,5 @@
import { PrismaClient, SpamRule } from '@prisma/client';
import { generateRequestId } from '@shieldai/types';
export interface RuleMatch {
ruleId: string;
@@ -78,7 +79,7 @@ export class RuleEngine {
});
}
} catch (error) {
console.error(`[RuleEngine] Invalid pattern for rule ${rule.id}:`, error);
console.error(`[RuleEngine] [req:${generateRequestId()}] Invalid pattern for rule ${rule.id}:`, error);
}
}
@@ -106,7 +107,7 @@ export class RuleEngine {
});
}
} catch (error) {
console.error(`[RuleEngine] Invalid pattern for rule ${rule.id}:`, error);
console.error(`[RuleEngine] [req:${generateRequestId()}] Invalid pattern for rule ${rule.id}:`, error);
}
}