@subcortex-ai/sdk 0.3.5 → 0.3.7

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.
package/dist/index.cjs CHANGED
@@ -594,14 +594,14 @@ function isValidSignalType(type) {
594
594
  return false;
595
595
  }
596
596
  var SIGNAL_DECAY_CONFIG = {
597
- frustration: 24,
598
- excitement: 24,
599
- concern: 24,
600
- satisfaction: 24,
601
- confusion: 24,
602
- gratitude: 24,
603
- tension: 24,
597
+ confusion: 8,
598
+ excitement: 16,
599
+ frustration: 18,
600
+ tension: 18,
604
601
  sentiment: 24,
602
+ concern: 36,
603
+ satisfaction: 48,
604
+ gratitude: 48,
605
605
  _default: 24
606
606
  };
607
607
  function getDecayHalfLife(signalType) {
@@ -658,15 +658,15 @@ var SignalsNamespace = class {
658
658
  const value = {
659
659
  content: input.content,
660
660
  intensity: input.intensity ?? 0.7,
661
- about_subject: input.aboutSubject || null,
662
- session_id: input.sessionId || null
661
+ about_subject: input.aboutSubject || null
663
662
  };
664
663
  const result = await this.http.post("/api/v1/assertions", {
665
664
  tenant_id: this.tenantId,
666
665
  subject: userSubject,
667
666
  predicate,
668
667
  value,
669
- confidence: input.intensity ?? 0.7
668
+ confidence: input.intensity ?? 0.7,
669
+ ...input.sessionId ? { session_id: input.sessionId } : {}
670
670
  });
671
671
  let resolved = 0;
672
672
  if (input.resolveConflicting && POSITIVE_SIGNALS.has(input.type)) {
@@ -1113,7 +1113,8 @@ ${connectedPeople.map((p) => {
1113
1113
  correlation_id: correlationId,
1114
1114
  agent_id: "sdk",
1115
1115
  tenant_id: this.tenantId,
1116
- candidates
1116
+ candidates,
1117
+ ...input.sessionId ? { context: { sessionId: input.sessionId } } : {}
1117
1118
  });
1118
1119
  return { success: true };
1119
1120
  }
@@ -1389,7 +1390,8 @@ var AssertionsNamespace = class {
1389
1390
  subject: input.subject,
1390
1391
  predicate: input.predicate,
1391
1392
  value: input.value,
1392
- confidence: input.confidence
1393
+ confidence: input.confidence,
1394
+ ...input.sessionId ? { session_id: input.sessionId } : {}
1393
1395
  });
1394
1396
  }
1395
1397
  /** Get an assertion by its content-addressable ID. */
@@ -1422,7 +1424,8 @@ var AssertionsNamespace = class {
1422
1424
  subject: input.subject,
1423
1425
  predicate: input.predicate,
1424
1426
  value: input.value,
1425
- confidence: input.confidence
1427
+ confidence: input.confidence,
1428
+ ...input.sessionId ? { session_id: input.sessionId } : {}
1426
1429
  });
1427
1430
  }
1428
1431
  /** Retract an assertion by closing its temporal bounds. */