@siduri-x/core 2.0.4 → 2.0.6

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.
@@ -19,6 +19,9 @@ export interface RetrievedContext {
19
19
  collectedEvidence: EvidenceRecord[];
20
20
  citations: ResponseCitation[];
21
21
  lifeContext?: string[];
22
+ selfIdentity?: any;
23
+ selfRelationship?: any;
24
+ personality?: any;
22
25
  }
23
26
  /**
24
27
  * Concurrently queries Self, Knowledge (Life DB), External Knowledge, and Memory
@@ -15,8 +15,8 @@ async function retrieveRuntimeContext(params) {
15
15
  const subsystemDiagnostics = {};
16
16
  // 1. Resolve External Knowledge organ (either explicitly passed or from legacy knowledge with .search)
17
17
  const extKnowledge = externalKnowledge || (knowledge && typeof knowledge.search === 'function' ? knowledge : undefined);
18
- // 2. Query all 4 streams in parallel
19
- const [knowledgeData, memoryData, selfOrMemoryDirectives, lifeContext] = await Promise.all([
18
+ // 2. Query streams in parallel
19
+ const [knowledgeData, memoryData, selfOrMemoryDirectives, lifeContext, selfIdentity, selfRelationship, personality,] = await Promise.all([
20
20
  // Stream A: External Cited Lore / Documentation
21
21
  extKnowledge && shouldQueryKnowledge && typeof extKnowledge.search === 'function'
22
22
  ? extKnowledge.search(perceivedText).catch((e) => {
@@ -62,6 +62,24 @@ async function retrieveRuntimeContext(params) {
62
62
  return [];
63
63
  })
64
64
  : Promise.resolve([]),
65
+ // Stream E: Self Identity
66
+ self && typeof self.getIdentity === 'function'
67
+ ? self.getIdentity(companionId).catch((e) => {
68
+ console.error('[SiduriRuntime] Self identity failed:', e.message);
69
+ return undefined;
70
+ })
71
+ : Promise.resolve(undefined),
72
+ // Stream F: Self Relationship toward interacting actor
73
+ self && typeof self.getRelationship === 'function' && requestContext.actor?.actorId
74
+ ? self.getRelationship(companionId, requestContext.actor.actorId).catch((e) => {
75
+ console.error('[SiduriRuntime] Self relationship failed:', e.message);
76
+ return null;
77
+ })
78
+ : Promise.resolve(null),
79
+ // Stream G: Self Personality
80
+ self && typeof self.getPersonality === 'function'
81
+ ? self.getPersonality(companionId).catch(() => undefined)
82
+ : Promise.resolve(undefined),
65
83
  ]);
66
84
  const activeDirectives = (selfOrMemoryDirectives || []);
67
85
  // Build evidence records from retrieved external knowledge context
@@ -115,5 +133,8 @@ async function retrieveRuntimeContext(params) {
115
133
  collectedEvidence,
116
134
  citations,
117
135
  lifeContext,
136
+ selfIdentity,
137
+ selfRelationship,
138
+ personality,
118
139
  };
119
140
  }
@@ -0,0 +1 @@
1
+ export {};