@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.
- package/dist/context-retriever.d.ts +3 -0
- package/dist/context-retriever.js +23 -2
- package/dist/conversational-teach.test.d.ts +1 -0
- package/dist/conversational-teach.test.js +643 -0
- package/dist/index.d.ts +7 -1
- package/dist/intent-classifier.js +2 -2
- package/dist/memory-settler.d.ts +22 -1
- package/dist/memory-settler.js +69 -8
- package/dist/perception-cycle.test.js +14 -0
- package/dist/perception-pipeline.js +13 -2
- package/dist/prompt-compiler.d.ts +3 -0
- package/dist/prompt-compiler.js +5 -2
- package/dist/response-envelope.d.ts +1 -0
- package/dist/response-envelope.js +2 -1
- package/dist/runtime.d.ts +46 -0
- package/dist/runtime.js +237 -1
- package/dist/siduri-db.d.ts +7 -0
- package/dist/siduri-db.js +172 -11
- package/dist/siduri-db.test.js +2 -1
- package/dist/teaching.d.ts +6 -7
- package/dist/teaching.js +7 -125
- package/package.json +1 -1
|
@@ -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
|
|
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 {};
|