@peopl-health/nexus 6.0.0-dev.658 → 6.0.0-dev.666

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.
@@ -39,6 +39,7 @@ class AssistantProcessor {
39
39
 
40
40
  const ctx = runOptions.toolRuntimeContext || null;
41
41
  assistant.toolRuntimeContext = ctx;
42
+ if (ctx && thread) thread.toolRuntimeContext = ctx;
42
43
 
43
44
  const startTime = Date.now();
44
45
  const runResult = await runAssistantWithRetries(thread, assistant, { ...runOptions, phiProcessor: this.phiProcessor }, message);
@@ -7,7 +7,6 @@ class ToolRuntimeContext {
7
7
  sessionId = null,
8
8
  repos = {},
9
9
  contextSource = null,
10
- thread = null,
11
10
  } = {}) {
12
11
  if (typeof patientCode !== 'string' || !patientCode) {
13
12
  throw new Error('ToolRuntimeContext requires a non-empty patientCode');
@@ -24,7 +23,6 @@ class ToolRuntimeContext {
24
23
  this.sessionId = sessionId;
25
24
  this.repos = repos;
26
25
  this.contextSource = contextSource;
27
- this.thread = thread;
28
26
  this.toolHistory = [];
29
27
  this.safetyArtifact = null;
30
28
  this.palliativeAssessment = null;
@@ -22,7 +22,7 @@ async function runShadowTurn({
22
22
  const shadowThread = cloneShadowThread(thread);
23
23
  const shadowAssistant = resolveAssistant(shadowThread);
24
24
 
25
- const context = new ToolRuntimeContext({ patientCode: code, turnId: runId, sessionId, thread: shadowThread });
25
+ const context = new ToolRuntimeContext({ patientCode: code, turnId: runId, sessionId });
26
26
 
27
27
  const runOptions = {
28
28
  toolRuntimeContext: context, shadow: true, shouldContinue, additionalInstructions,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peopl-health/nexus",
3
- "version": "6.0.0-dev.658",
3
+ "version": "6.0.0-dev.666",
4
4
  "description": "Core messaging and assistant library for WhatsApp communication platforms",
5
5
  "keywords": [
6
6
  "whatsapp",