@peopl-health/nexus 5.56.34 → 5.56.36

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.
@@ -49,7 +49,8 @@ function resolveMaxFunctionRounds(explicit) {
49
49
  const LOOP_ITERATION_HEADROOM = 3;
50
50
  const CACHE_TTLS = ['5m', '1h'];
51
51
  const DEFAULT_CACHE_TTL = '1h';
52
- const DEFAULT_THINKING_MODE = 'until_commit';
52
+ // Toggling thinking mid-turn invalidates the message cache, so the next call rewrites the whole history.
53
+ const DEFAULT_THINKING_MODE = 'always';
53
54
  // Turns that end the model's clinical reasoning for the turn; after one, until_commit stops thinking.
54
55
  const TERMINAL_COMMIT_TOOLS = new Set(['submitRoutingDecision', 'reportMedicalEscalation', 'reportCrisis', 'reportUnresolvedRequestv2']);
55
56
  const ROUTING_TOOL = 'submitRoutingDecision';
@@ -10,7 +10,6 @@ const CACHE_TTL_MS = 60 * 1000;
10
10
 
11
11
  const CAROUSEL_DELIVERY_FIELDS = [
12
12
  'twilio_sent',
13
- 'first_attmp_send',
14
13
  'delivered',
15
14
  'date_delivered_at',
16
15
  'twilio_error',
@@ -56,7 +55,8 @@ function deliveryStatus(row) {
56
55
  if (delivered === 'read' || delivered === 'leído' || delivered === 'leido') return 'read';
57
56
  if (delivered === 'failed' || delivered === 'undelivered') return 'failed';
58
57
  if (delivered) return 'delivered';
59
- if (firstOf(row.twilio_sent) || row.first_attmp_send) return 'sent';
58
+ // pending/queued, or an attempt Twilio never confirmed, has not left yet.
59
+ if (String(firstOf(row.twilio_sent) || '').trim().toLowerCase() === 'sent') return 'sent';
60
60
  return 'queued';
61
61
  }
62
62
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peopl-health/nexus",
3
- "version": "5.56.34",
3
+ "version": "5.56.36",
4
4
  "description": "Core messaging and assistant library for WhatsApp communication platforms",
5
5
  "keywords": [
6
6
  "whatsapp",