@peopl-health/nexus 5.44.0-dev.5467 → 5.44.0-dev.5475

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.
@@ -126,15 +126,6 @@ async function handler(args = {}, context = {}) {
126
126
  const details = args?.escalation_details || '';
127
127
 
128
128
  if (!trace.safetyDecision?.escalationKind) trace.setSafetyDecision({ escalationKind: 'out_of_scope' });
129
- trace.setSignals({
130
- unresolvedRequest: {
131
- category,
132
- unresolvedQuestion: question.slice(0, MAX_LEN),
133
- escalationDetails: details.slice(0, MAX_LEN),
134
- urgency,
135
- resolutionAttempted: Boolean(args?.resolution_attempted),
136
- },
137
- });
138
129
 
139
130
  const patientCode = context?.toolRuntimeContext?.patientCode;
140
131
  let isQueued = false;
@@ -150,6 +141,18 @@ async function handler(args = {}, context = {}) {
150
141
  });
151
142
  }
152
143
 
144
+ if (isQueued) {
145
+ trace.setSignals({
146
+ unresolvedRequest: {
147
+ category,
148
+ unresolvedQuestion: question.slice(0, MAX_LEN),
149
+ escalationDetails: details.slice(0, MAX_LEN),
150
+ urgency,
151
+ resolutionAttempted: Boolean(args?.resolution_attempted),
152
+ },
153
+ });
154
+ }
155
+
153
156
  const data = {};
154
157
  // auditedWrite swallows a failed write and returns false rather than throwing.
155
158
  if (!isQueued) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peopl-health/nexus",
3
- "version": "5.44.0-dev.5467",
3
+ "version": "5.44.0-dev.5475",
4
4
  "description": "Core messaging and assistant library for WhatsApp communication platforms",
5
5
  "keywords": [
6
6
  "whatsapp",