@subcortex-ai/sdk 0.3.9 → 0.3.11

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
@@ -485,6 +485,7 @@ var OrgRelationship = /* @__PURE__ */ ((OrgRelationship2) => {
485
485
  OrgRelationship2["HAS_MEMBER"] = "has_member";
486
486
  OrgRelationship2["HOLDS_ROLE"] = "holds_role";
487
487
  OrgRelationship2["CANDIDATE_FOR"] = "candidate_for";
488
+ OrgRelationship2["CONSIDERING"] = "considering";
488
489
  OrgRelationship2["COLLABORATES_WITH"] = "collaborates_with";
489
490
  OrgRelationship2["MENTORS"] = "mentors";
490
491
  OrgRelationship2["MENTORED_BY"] = "mentored_by";
@@ -554,7 +555,8 @@ var REVERSE_RELATIONSHIPS = {
554
555
  ["mentors" /* MENTORS */]: "mentored_by" /* MENTORED_BY */,
555
556
  ["mentored_by" /* MENTORED_BY */]: "mentors" /* MENTORS */,
556
557
  ["collaborates_with" /* COLLABORATES_WITH */]: "collaborates_with" /* COLLABORATES_WITH */,
557
- ["candidate_for" /* CANDIDATE_FOR */]: "candidate_for" /* CANDIDATE_FOR */,
558
+ ["candidate_for" /* CANDIDATE_FOR */]: "considering" /* CONSIDERING */,
559
+ ["considering" /* CONSIDERING */]: "candidate_for" /* CANDIDATE_FOR */,
558
560
  ["stakeholder_in" /* STAKEHOLDER_IN */]: "stakeholder_in" /* STAKEHOLDER_IN */,
559
561
  // Agent-facing predicate names → proper relationship types
560
562
  // The model sends 'direct_report' as predicate, SDK maps to proper relationships
@@ -856,13 +858,15 @@ var UsersNamespace = class {
856
858
  const nameAssertion = active.find((a) => a.predicate === "name" || a.predicate === "full_name");
857
859
  const name = nameAssertion?.value || input.displayName || null;
858
860
  const reminders = active.filter((a) => a.predicate === "reminder").map((a) => ({ id: a.id, predicate: a.predicate, value: a.value, confidence: a.confidence, createdAt: a.validFrom }));
859
- for (const reminder of reminders) {
860
- try {
861
- await this.http.post(
862
- `/api/v1/assertions/retract/${enc2(this.tenantId)}/${enc2(reminder.id)}`,
863
- {}
864
- );
865
- } catch {
861
+ if (input.dismissReminders !== false) {
862
+ for (const reminder of reminders) {
863
+ try {
864
+ await this.http.post(
865
+ `/api/v1/assertions/retract/${enc2(this.tenantId)}/${enc2(reminder.id)}`,
866
+ {}
867
+ );
868
+ } catch {
869
+ }
866
870
  }
867
871
  }
868
872
  const contexts = active.filter((a) => a.predicate === "context" || a.predicate === "context:task").map((a) => ({ id: a.id, predicate: a.predicate, value: a.value, confidence: a.confidence, createdAt: a.validFrom }));
@@ -1053,7 +1057,7 @@ ${connectedPeople.map((p) => {
1053
1057
  const FORWARD_MAP = {
1054
1058
  "direct_report": "manages" /* MANAGES */,
1055
1059
  "team_member": "has_member" /* HAS_MEMBER */,
1056
- "candidate": "manages" /* MANAGES */,
1060
+ "candidate": "considering" /* CONSIDERING */,
1057
1061
  "manager": "reports_to" /* REPORTS_TO */,
1058
1062
  "stakeholder": "stakeholder_in" /* STAKEHOLDER_IN */,
1059
1063
  "collaborator": "collaborates_with" /* COLLABORATES_WITH */,
@@ -1469,6 +1473,14 @@ var RelationshipsNamespace = class {
1469
1473
  `/api/v1/relationships/list/${enc4(tenantId)}`
1470
1474
  );
1471
1475
  }
1476
+ /** Retract (hard-delete) a relationship by id. Returns the removed relationship. */
1477
+ async retract(relationshipId, options) {
1478
+ const tenantId = options?.tenantId || this.tenantId;
1479
+ return this.http.post(
1480
+ `/api/v1/relationships/retract/${enc4(tenantId)}/${enc4(relationshipId)}`,
1481
+ {}
1482
+ );
1483
+ }
1472
1484
  };
1473
1485
  var AgentsNamespace = class {
1474
1486
  constructor(http, tenantId) {
@@ -1845,7 +1857,7 @@ var EntitiesNamespace = class {
1845
1857
  `/api/v1/assertions/query/${enc4(tenantId)}/${enc4(subject2)}`
1846
1858
  );
1847
1859
  const relationships = await this.http.get(
1848
- `/api/v1/relationships/query/${enc4(tenantId)}/${enc4(subject2)}`
1860
+ `/api/v1/relationships/${enc4(tenantId)}/${enc4(subject2)}`
1849
1861
  );
1850
1862
  const typeAssertion = assertions.find((a) => a.predicate === "type" && !a.isSuperseded);
1851
1863
  const descAssertion = assertions.find((a) => a.predicate === "description" && !a.isSuperseded);