@peopl-health/nexus 5.56.9 → 5.56.10

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.
@@ -258,7 +258,12 @@ async function handler(args, context = {}) {
258
258
 
259
259
  async function scanSafetyFlags(text) {
260
260
  try {
261
- return detectSafetyFlags(text, await getSafetyFlagPatterns());
261
+ const patterns = await getSafetyFlagPatterns();
262
+ if (!patterns?.length) {
263
+ logger.warn('[extractClinicalInfo] no safety patterns configured; treating the scan as unavailable');
264
+ return null;
265
+ }
266
+ return detectSafetyFlags(text, patterns);
262
267
  } catch (err) {
263
268
  logger.warn('[extractClinicalInfo] deterministic safety scan failed', { error: err?.message });
264
269
  return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peopl-health/nexus",
3
- "version": "5.56.9",
3
+ "version": "5.56.10",
4
4
  "description": "Core messaging and assistant library for WhatsApp communication platforms",
5
5
  "keywords": [
6
6
  "whatsapp",