@subcortex-ai/sdk 0.3.6 → 0.3.8

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.d.cts CHANGED
@@ -546,6 +546,8 @@ interface RecordRapportInput {
546
546
  aboutPerson?: string;
547
547
  /** Confidence */
548
548
  confidence?: ConfidenceLevel | number;
549
+ /** Session ID — binds to an Experience for session grouping */
550
+ sessionId?: string;
549
551
  }
550
552
 
551
553
  /**
@@ -1010,6 +1012,8 @@ interface CreateAssertionInput {
1010
1012
  confidence?: number;
1011
1013
  /** Override the default tenant ID for this operation */
1012
1014
  tenantId?: string;
1015
+ /** Session ID — binds this assertion to an Experience for session grouping */
1016
+ sessionId?: string;
1013
1017
  }
1014
1018
  /**
1015
1019
  * Input for superseding (updating) an existing assertion.
@@ -1040,6 +1044,8 @@ interface SupersedeAssertionInput {
1040
1044
  confidence?: number;
1041
1045
  /** Override the default tenant ID */
1042
1046
  tenantId?: string;
1047
+ /** Session ID — binds this assertion to an Experience for session grouping */
1048
+ sessionId?: string;
1043
1049
  }
1044
1050
  /** What the SDK returns for a relationship. */
1045
1051
  interface Relationship {
package/dist/index.d.ts CHANGED
@@ -546,6 +546,8 @@ interface RecordRapportInput {
546
546
  aboutPerson?: string;
547
547
  /** Confidence */
548
548
  confidence?: ConfidenceLevel | number;
549
+ /** Session ID — binds to an Experience for session grouping */
550
+ sessionId?: string;
549
551
  }
550
552
 
551
553
  /**
@@ -1010,6 +1012,8 @@ interface CreateAssertionInput {
1010
1012
  confidence?: number;
1011
1013
  /** Override the default tenant ID for this operation */
1012
1014
  tenantId?: string;
1015
+ /** Session ID — binds this assertion to an Experience for session grouping */
1016
+ sessionId?: string;
1013
1017
  }
1014
1018
  /**
1015
1019
  * Input for superseding (updating) an existing assertion.
@@ -1040,6 +1044,8 @@ interface SupersedeAssertionInput {
1040
1044
  confidence?: number;
1041
1045
  /** Override the default tenant ID */
1042
1046
  tenantId?: string;
1047
+ /** Session ID — binds this assertion to an Experience for session grouping */
1048
+ sessionId?: string;
1043
1049
  }
1044
1050
  /** What the SDK returns for a relationship. */
1045
1051
  interface Relationship {
package/dist/index.js CHANGED
@@ -579,15 +579,15 @@ var SignalsNamespace = class {
579
579
  const value = {
580
580
  content: input.content,
581
581
  intensity: input.intensity ?? 0.7,
582
- about_subject: input.aboutSubject || null,
583
- session_id: input.sessionId || null
582
+ about_subject: input.aboutSubject || null
584
583
  };
585
584
  const result = await this.http.post("/api/v1/assertions", {
586
585
  tenant_id: this.tenantId,
587
586
  subject: userSubject,
588
587
  predicate,
589
588
  value,
590
- confidence: input.intensity ?? 0.7
589
+ confidence: input.intensity ?? 0.7,
590
+ ...input.sessionId ? { session_id: input.sessionId } : {}
591
591
  });
592
592
  let resolved = 0;
593
593
  if (input.resolveConflicting && POSITIVE_SIGNALS.has(input.type)) {
@@ -1034,7 +1034,8 @@ ${connectedPeople.map((p) => {
1034
1034
  correlation_id: correlationId,
1035
1035
  agent_id: "sdk",
1036
1036
  tenant_id: this.tenantId,
1037
- candidates
1037
+ candidates,
1038
+ ...input.sessionId ? { context: { session_id: input.sessionId } } : {}
1038
1039
  });
1039
1040
  return { success: true };
1040
1041
  }
@@ -1310,7 +1311,8 @@ var AssertionsNamespace = class {
1310
1311
  subject: input.subject,
1311
1312
  predicate: input.predicate,
1312
1313
  value: input.value,
1313
- confidence: input.confidence
1314
+ confidence: input.confidence,
1315
+ ...input.sessionId ? { session_id: input.sessionId } : {}
1314
1316
  });
1315
1317
  }
1316
1318
  /** Get an assertion by its content-addressable ID. */
@@ -1343,7 +1345,8 @@ var AssertionsNamespace = class {
1343
1345
  subject: input.subject,
1344
1346
  predicate: input.predicate,
1345
1347
  value: input.value,
1346
- confidence: input.confidence
1348
+ confidence: input.confidence,
1349
+ ...input.sessionId ? { session_id: input.sessionId } : {}
1347
1350
  });
1348
1351
  }
1349
1352
  /** Retract an assertion by closing its temporal bounds. */
@@ -1532,7 +1535,12 @@ var IntakeNamespace = class {
1532
1535
  provenance: c.provenance,
1533
1536
  person_name: c.personName
1534
1537
  })),
1535
- context: input.context
1538
+ context: input.context ? {
1539
+ topic: input.context.topic,
1540
+ emotional_state: input.context.emotionalState,
1541
+ session_id: input.context.sessionId,
1542
+ excerpt: input.context.excerpt
1543
+ } : void 0
1536
1544
  });
1537
1545
  }
1538
1546
  /** Get pending intake results for an agent. */