@getanima/core 0.2.1 → 0.2.3
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/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +8 -6
- package/SPEC.md +0 -475
- package/dist/alme/core/KnowledgeGraph.d.ts +0 -58
- package/dist/alme/core/KnowledgeGraph.d.ts.map +0 -1
- package/dist/alme/core/KnowledgeGraph.js +0 -114
- package/dist/alme/core/KnowledgeGraph.js.map +0 -1
- package/dist/alme/core/MetacognitionEngine.d.ts +0 -35
- package/dist/alme/core/MetacognitionEngine.d.ts.map +0 -1
- package/dist/alme/core/MetacognitionEngine.js +0 -90
- package/dist/alme/core/MetacognitionEngine.js.map +0 -1
- package/dist/alme/core/PerformanceAnalyzer.d.ts +0 -68
- package/dist/alme/core/PerformanceAnalyzer.d.ts.map +0 -1
- package/dist/alme/core/PerformanceAnalyzer.js +0 -142
- package/dist/alme/core/PerformanceAnalyzer.js.map +0 -1
- package/dist/alme/core/SelfReflectionModule.d.ts +0 -41
- package/dist/alme/core/SelfReflectionModule.d.ts.map +0 -1
- package/dist/alme/core/SelfReflectionModule.js +0 -101
- package/dist/alme/core/SelfReflectionModule.js.map +0 -1
- package/dist/alme/core/SkillProfile.d.ts +0 -52
- package/dist/alme/core/SkillProfile.d.ts.map +0 -1
- package/dist/alme/core/SkillProfile.js +0 -97
- package/dist/alme/core/SkillProfile.js.map +0 -1
- package/dist/codegen/ArchitecturalDesignGenerator.d.ts +0 -77
- package/dist/codegen/ArchitecturalDesignGenerator.d.ts.map +0 -1
- package/dist/codegen/ArchitecturalDesignGenerator.js +0 -194
- package/dist/codegen/ArchitecturalDesignGenerator.js.map +0 -1
- package/dist/codegen/ContextAwareGenerator.d.ts +0 -67
- package/dist/codegen/ContextAwareGenerator.d.ts.map +0 -1
- package/dist/codegen/ContextAwareGenerator.js +0 -158
- package/dist/codegen/ContextAwareGenerator.js.map +0 -1
- package/dist/codegen/SystemInteractionSimulator.d.ts +0 -87
- package/dist/codegen/SystemInteractionSimulator.d.ts.map +0 -1
- package/dist/codegen/SystemInteractionSimulator.js +0 -203
- package/dist/codegen/SystemInteractionSimulator.js.map +0 -1
- package/dist/codegen/multiStageCodegen.d.ts +0 -30
- package/dist/codegen/multiStageCodegen.d.ts.map +0 -1
- package/dist/codegen/multiStageCodegen.js +0 -60
- package/dist/codegen/multiStageCodegen.js.map +0 -1
- package/dist/ideation/InnovationEngine.d.ts +0 -47
- package/dist/ideation/InnovationEngine.d.ts.map +0 -1
- package/dist/ideation/InnovationEngine.js +0 -127
- package/dist/ideation/InnovationEngine.js.map +0 -1
- package/dist/learning-tracker/LearningVisualizer.d.ts +0 -26
- package/dist/learning-tracker/LearningVisualizer.d.ts.map +0 -1
- package/dist/learning-tracker/LearningVisualizer.js +0 -61
- package/dist/learning-tracker/LearningVisualizer.js.map +0 -1
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.knowledgeGraph = exports.KnowledgeGraph = void 0;
|
|
4
|
-
class KnowledgeGraph {
|
|
5
|
-
nodes = new Map();
|
|
6
|
-
MAX_NODE_CONNECTIONS = 25;
|
|
7
|
-
/**
|
|
8
|
-
* Create or update a knowledge node
|
|
9
|
-
* @param content Core content of the node
|
|
10
|
-
* @param type Type of knowledge node
|
|
11
|
-
* @param metadata Additional metadata
|
|
12
|
-
* @returns Unique node ID
|
|
13
|
-
*/
|
|
14
|
-
addNode(content, type = 'concept', metadata = {}) {
|
|
15
|
-
const nodeId = this.generateNodeId(content);
|
|
16
|
-
const defaultMetadata = {
|
|
17
|
-
created: Date.now(),
|
|
18
|
-
lastUpdated: Date.now(),
|
|
19
|
-
confidence: 0.1,
|
|
20
|
-
sources: []
|
|
21
|
-
};
|
|
22
|
-
const node = {
|
|
23
|
-
id: nodeId,
|
|
24
|
-
type,
|
|
25
|
-
content,
|
|
26
|
-
metadata: { ...defaultMetadata, ...metadata },
|
|
27
|
-
connections: []
|
|
28
|
-
};
|
|
29
|
-
this.nodes.set(nodeId, node);
|
|
30
|
-
return nodeId;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Create a connection between two nodes
|
|
34
|
-
* @param sourceNodeId Origin node
|
|
35
|
-
* @param targetNodeId Destination node
|
|
36
|
-
* @param relationship Type of relationship
|
|
37
|
-
* @param strength Strength of connection
|
|
38
|
-
*/
|
|
39
|
-
connect(sourceNodeId, targetNodeId, relationship, strength = 0.5) {
|
|
40
|
-
const sourceNode = this.nodes.get(sourceNodeId);
|
|
41
|
-
const targetNode = this.nodes.get(targetNodeId);
|
|
42
|
-
if (!sourceNode || !targetNode) {
|
|
43
|
-
throw new Error('Nodes must exist to create a connection');
|
|
44
|
-
}
|
|
45
|
-
// Prevent excessive connections
|
|
46
|
-
if (sourceNode.connections.length >= this.MAX_NODE_CONNECTIONS) {
|
|
47
|
-
// Remove weakest connection if limit reached
|
|
48
|
-
sourceNode.connections.sort((a, b) => a.strength - b.strength);
|
|
49
|
-
sourceNode.connections.shift();
|
|
50
|
-
}
|
|
51
|
-
sourceNode.connections.push({
|
|
52
|
-
targetNodeId,
|
|
53
|
-
relationship,
|
|
54
|
-
strength
|
|
55
|
-
});
|
|
56
|
-
// Update node confidence and timestamp
|
|
57
|
-
sourceNode.metadata.lastUpdated = Date.now();
|
|
58
|
-
sourceNode.metadata.confidence += 0.01;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Find interconnected nodes
|
|
62
|
-
* @param nodeId Starting node
|
|
63
|
-
* @param maxDepth Maximum connection depth
|
|
64
|
-
* @returns Connected node network
|
|
65
|
-
*/
|
|
66
|
-
findRelatedConcepts(nodeId, maxDepth = 3) {
|
|
67
|
-
const relatedNodes = [];
|
|
68
|
-
const visitedNodes = new Set();
|
|
69
|
-
const traverse = (currentNodeId, currentDepth) => {
|
|
70
|
-
if (currentDepth > maxDepth || visitedNodes.has(currentNodeId))
|
|
71
|
-
return;
|
|
72
|
-
const currentNode = this.nodes.get(currentNodeId);
|
|
73
|
-
if (!currentNode)
|
|
74
|
-
return;
|
|
75
|
-
visitedNodes.add(currentNodeId);
|
|
76
|
-
relatedNodes.push(currentNode);
|
|
77
|
-
// Recursively explore connections
|
|
78
|
-
currentNode.connections.forEach(connection => {
|
|
79
|
-
traverse(connection.targetNodeId, currentDepth + 1);
|
|
80
|
-
});
|
|
81
|
-
};
|
|
82
|
-
traverse(nodeId, 0);
|
|
83
|
-
return relatedNodes;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Generate a unique node ID
|
|
87
|
-
* @param content Node content
|
|
88
|
-
* @returns Unique identifier
|
|
89
|
-
*/
|
|
90
|
-
generateNodeId(content) {
|
|
91
|
-
// Simple hash function to generate unique IDs
|
|
92
|
-
const hash = (str) => {
|
|
93
|
-
let hash = 0;
|
|
94
|
-
for (let i = 0; i < str.length; i++) {
|
|
95
|
-
const char = str.charCodeAt(i);
|
|
96
|
-
hash = ((hash << 5) - hash) + char;
|
|
97
|
-
hash = hash & hash; // Convert to 32-bit integer
|
|
98
|
-
}
|
|
99
|
-
return Math.abs(hash).toString(16);
|
|
100
|
-
};
|
|
101
|
-
return `node_${hash(content)}_${Date.now()}`;
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Retrieve entire knowledge graph
|
|
105
|
-
* @returns Comprehensive graph data
|
|
106
|
-
*/
|
|
107
|
-
exportGraph() {
|
|
108
|
-
return Array.from(this.nodes.values());
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
exports.KnowledgeGraph = KnowledgeGraph;
|
|
112
|
-
// Singleton instance for global knowledge tracking
|
|
113
|
-
exports.knowledgeGraph = new KnowledgeGraph();
|
|
114
|
-
//# sourceMappingURL=KnowledgeGraph.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KnowledgeGraph.js","sour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C;IAED;;;;OAIG;IACK,cAAc,CAAC,OAAe;QACpC,8CAA8C;QAC9C,MAAM,IAAI,GAAG,CAAC,GAAW,EAAE,EAAE;YAC3B,IAAI,IAAI,GAAG,CAAC,CAAC;YACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBACpC,MAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;gBAC/B,IAAI,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;gBACnC,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,4BAA4B;YAClD,CAAC;YACD,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QACrC,CAAC,CAAC;QAEF,OAAO,QAAQ,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC;IAC/C,CAAC;IAED;;;OAGG;IACH,WAAW;QACT,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;IACzC,CAAC;CACF;AAtID,wCAsIC;AAED,mDAAmD;AACtC,QAAA,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Adaptive Learning Metacognition Engine (ALME)
|
|
3
|
-
* Core system for autonomous cognitive enhancement
|
|
4
|
-
*/
|
|
5
|
-
export declare class MetacognitionEngine {
|
|
6
|
-
private skillProfile;
|
|
7
|
-
private knowledgeGraph;
|
|
8
|
-
private performanceAnalyzer;
|
|
9
|
-
private learningPathGenerator;
|
|
10
|
-
private learningHistory;
|
|
11
|
-
constructor();
|
|
12
|
-
/**
|
|
13
|
-
* Primary method for autonomous self-improvement
|
|
14
|
-
*/
|
|
15
|
-
performSelfImprovement(): Promise<void>;
|
|
16
|
-
/**
|
|
17
|
-
* Execute a specific learning step
|
|
18
|
-
* @param learningStep Detailed learning objective
|
|
19
|
-
* @returns Learning outcome
|
|
20
|
-
*/
|
|
21
|
-
private executeLearningstep;
|
|
22
|
-
/**
|
|
23
|
-
* Record details of learning experience
|
|
24
|
-
* @param learningStep Step that was attempted
|
|
25
|
-
* @param outcome Outcome of the learning attempt
|
|
26
|
-
*/
|
|
27
|
-
private recordLearningExperience;
|
|
28
|
-
/**
|
|
29
|
-
* Retrieve learning insights
|
|
30
|
-
* @returns Aggregated learning insights
|
|
31
|
-
*/
|
|
32
|
-
getLearningInsights(): Array<string>;
|
|
33
|
-
}
|
|
34
|
-
export declare const alme: MetacognitionEngine;
|
|
35
|
-
//# sourceMappingURL=MetacognitionEngine.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MetacognitionEngine.d.ts","sourceRoot":"","sources":["../../../src/alme/core/MetacognitionEngine.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,qBAAa,mBAAmB;IAE9B,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,mBAAmB,CAAsB;IACjD,OAAO,CAAC,qBAAqB,CAAwB;IAGrD,OAAO,CAAC,eAAe,CAKf;;IASR;;OAEG;IACG,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC;IAsB7C;;;;OAIG;YACW,mBAAmB;IAYjC;;;;OAIG;IACH,OAAO,CAAC,wBAAwB;IAchC;;;OAGG;IACH,mBAAmB,IAAI,KAAK,CAAC,MAAM,CAAC;CAMrC;AAGD,eAAO,MAAM,IAAI,qBAA4B,CAAC"}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.alme = exports.MetacognitionEngine = void 0;
|
|
4
|
-
const SkillProfile_1 = require("./SkillProfile");
|
|
5
|
-
const LearningPathGenerator_1 = require("./LearningPathGenerator");
|
|
6
|
-
const PerformanceAnalyzer_1 = require("./PerformanceAnalyzer");
|
|
7
|
-
const KnowledgeGraph_1 = require("./KnowledgeGraph");
|
|
8
|
-
/**
|
|
9
|
-
* Adaptive Learning Metacognition Engine (ALME)
|
|
10
|
-
* Core system for autonomous cognitive enhancement
|
|
11
|
-
*/
|
|
12
|
-
class MetacognitionEngine {
|
|
13
|
-
// Core cognitive components
|
|
14
|
-
skillProfile;
|
|
15
|
-
knowledgeGraph;
|
|
16
|
-
performanceAnalyzer;
|
|
17
|
-
learningPathGenerator;
|
|
18
|
-
// Metadata tracking
|
|
19
|
-
learningHistory = [];
|
|
20
|
-
constructor() {
|
|
21
|
-
this.skillProfile = new SkillProfile_1.SkillProfile();
|
|
22
|
-
this.knowledgeGraph = new KnowledgeGraph_1.KnowledgeGraph();
|
|
23
|
-
this.performanceAnalyzer = new PerformanceAnalyzer_1.PerformanceAnalyzer();
|
|
24
|
-
this.learningPathGenerator = new LearningPathGenerator_1.LearningPathGenerator();
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Primary method for autonomous self-improvement
|
|
28
|
-
*/
|
|
29
|
-
async performSelfImprovement() {
|
|
30
|
-
// 1. Analyze current performance and skill gaps
|
|
31
|
-
const performanceAssessment = await this.performanceAnalyzer.assess();
|
|
32
|
-
// 2. Generate personalized learning path
|
|
33
|
-
const learningPath = this.learningPathGenerator.generate(performanceAssessment.skillGaps);
|
|
34
|
-
// 3. Execute learning path
|
|
35
|
-
for (const learningStep of learningPath) {
|
|
36
|
-
const learningOutcome = await this.executeLearningstep(learningStep);
|
|
37
|
-
// 4. Record learning experience
|
|
38
|
-
this.recordLearningExperience(learningStep, learningOutcome);
|
|
39
|
-
}
|
|
40
|
-
// 5. Update knowledge graph and skill profile
|
|
41
|
-
this.knowledgeGraph.integrate(learningPath);
|
|
42
|
-
this.skillProfile.update(performanceAssessment);
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Execute a specific learning step
|
|
46
|
-
* @param learningStep Detailed learning objective
|
|
47
|
-
* @returns Learning outcome
|
|
48
|
-
*/
|
|
49
|
-
async executeLearningstep(learningStep) {
|
|
50
|
-
try {
|
|
51
|
-
// Implement learning step execution logic
|
|
52
|
-
// This could involve code generation, skill simulation, etc.
|
|
53
|
-
return 'success';
|
|
54
|
-
}
|
|
55
|
-
catch (error) {
|
|
56
|
-
// Handle learning failures
|
|
57
|
-
console.error('Learning step failed:', error);
|
|
58
|
-
return 'failure';
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Record details of learning experience
|
|
63
|
-
* @param learningStep Step that was attempted
|
|
64
|
-
* @param outcome Outcome of the learning attempt
|
|
65
|
-
*/
|
|
66
|
-
recordLearningExperience(learningStep, outcome) {
|
|
67
|
-
this.learningHistory.push({
|
|
68
|
-
timestamp: Date.now(),
|
|
69
|
-
skillDomain: learningStep.domain,
|
|
70
|
-
learningOutcome: outcome,
|
|
71
|
-
insights: outcome === 'success'
|
|
72
|
-
? ['Skill acquired']
|
|
73
|
-
: ['Area for improvement identified']
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Retrieve learning insights
|
|
78
|
-
* @returns Aggregated learning insights
|
|
79
|
-
*/
|
|
80
|
-
getLearningInsights() {
|
|
81
|
-
// Analyze learning history and extract key insights
|
|
82
|
-
return this.learningHistory
|
|
83
|
-
.filter(entry => entry.learningOutcome !== 'success')
|
|
84
|
-
.map(entry => `Improvement needed in ${entry.skillDomain}`);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
exports.MetacognitionEngine = MetacognitionEngine;
|
|
88
|
-
// Singleton instance for global access
|
|
89
|
-
exports.alme = new MetacognitionEngine();
|
|
90
|
-
//# sourceMappingURL=MetacognitionEngine.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":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B;QACjD,IAAI,CAAC;YACH,0CAA0C;YAC1C,6DAA6D;YAC7D,OAAO,SAAS,CAAC;QACnB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,2BAA2B;YAC3B,OAAO,CAAC,KAAK,CAAC,uBAAuB,EAAE,KAAK,CAAC,CAAC;YAC9C,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;IAED;;;;OAIG;IACK,wBAAwB,CAC9B,YAAiB,EACjB,OAA0C;QAE1C,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC;YACxB,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;YACrB,WAAW,EAAE,YAAY,CAAC,MAAM;YAChC,eAAe,EAAE,OAAO;YACxB,QAAQ,EAAE,OAAO,KAAK,SAAS;gBAC7B,CAAC,CAAC,CAAC,gBAAgB,CAAC;gBACpB,CAAC,CAAC,CAAC,iCAAiC,CAAC;SACxC,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,mBAAmB;QACjB,oDAAoD;QACpD,OAAO,IAAI,CAAC,eAAe;aACxB,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,eAAe,KAAK,SAAS,CAAC;aACpD,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,yBAAyB,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;IAChE,CAAC;CACF;AA7FD,kDA6FC;AAED,uCAAuC;AAC1B,QAAA,IAAI,GAAG,IAAI,mBAAmB,EAAE,CAAC"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { SkillProfile } from './SkillProfile';
|
|
2
|
-
import { KnowledgeGraph } from './KnowledgeGraph';
|
|
3
|
-
interface PerformanceMetrics {
|
|
4
|
-
accuracy: number;
|
|
5
|
-
complexity: number;
|
|
6
|
-
adaptability: number;
|
|
7
|
-
innovationScore: number;
|
|
8
|
-
emotionalIntelligence: number;
|
|
9
|
-
}
|
|
10
|
-
interface AssessmentContext {
|
|
11
|
-
interaction: string;
|
|
12
|
-
domain: string;
|
|
13
|
-
challenges: string[];
|
|
14
|
-
outcomes: string[];
|
|
15
|
-
}
|
|
16
|
-
export declare class PerformanceAnalyzer {
|
|
17
|
-
private skillProfile;
|
|
18
|
-
private knowledgeGraph;
|
|
19
|
-
private performanceHistory;
|
|
20
|
-
constructor(skillProfile: SkillProfile, knowledgeGraph: KnowledgeGraph);
|
|
21
|
-
/**
|
|
22
|
-
* Comprehensive performance assessment
|
|
23
|
-
* @returns Detailed performance insights
|
|
24
|
-
*/
|
|
25
|
-
assess(): Promise<{
|
|
26
|
-
overallPerformance: PerformanceMetrics;
|
|
27
|
-
skillGaps: string[];
|
|
28
|
-
improvementRecommendations: string[];
|
|
29
|
-
}>;
|
|
30
|
-
/**
|
|
31
|
-
* Record performance of a specific interaction
|
|
32
|
-
* @param context Interaction details
|
|
33
|
-
* @param metrics Performance metrics
|
|
34
|
-
*/
|
|
35
|
-
recordPerformance(context: AssessmentContext, metrics: PerformanceMetrics): void;
|
|
36
|
-
/**
|
|
37
|
-
* Calculate aggregate performance metrics
|
|
38
|
-
* @param performances Array of performance metrics
|
|
39
|
-
* @returns Aggregated performance metrics
|
|
40
|
-
*/
|
|
41
|
-
private calculateAggregateMetrics;
|
|
42
|
-
/**
|
|
43
|
-
* Identify areas needing skill improvement
|
|
44
|
-
* @param performance Overall performance metrics
|
|
45
|
-
* @returns Array of skill gaps
|
|
46
|
-
*/
|
|
47
|
-
private identifySkillGaps;
|
|
48
|
-
/**
|
|
49
|
-
* Generate targeted improvement strategies
|
|
50
|
-
* @param skillGaps Identified skill gaps
|
|
51
|
-
* @returns Improvement recommendations
|
|
52
|
-
*/
|
|
53
|
-
private generateImprovementStrategies;
|
|
54
|
-
/**
|
|
55
|
-
* Update skill profile based on performance
|
|
56
|
-
* @param context Interaction context
|
|
57
|
-
* @param metrics Performance metrics
|
|
58
|
-
*/
|
|
59
|
-
private updateSkillProfile;
|
|
60
|
-
/**
|
|
61
|
-
* Calculate average of an array of numbers
|
|
62
|
-
* @param values Array of numbers
|
|
63
|
-
* @returns Average value
|
|
64
|
-
*/
|
|
65
|
-
private average;
|
|
66
|
-
}
|
|
67
|
-
export {};
|
|
68
|
-
//# sourceMappingURL=PerformanceAnalyzer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PerformanceAnalyzer.d.ts","sourceRoot":"","sources":["../../../src/alme/core/PerformanceAnalyzer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,qBAAqB,EAAE,MAAM,CAAC;CAC/B;AAED,UAAU,iBAAiB;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,cAAc,CAAiB;IAGvC,OAAO,CAAC,kBAAkB,CAIlB;gBAEI,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,cAAc;IAKtE;;;OAGG;IACG,MAAM,IAAI,OAAO,CAAC;QACtB,kBAAkB,EAAE,kBAAkB,CAAC;QACvC,SAAS,EAAE,MAAM,EAAE,CAAC;QACpB,0BAA0B,EAAE,MAAM,EAAE,CAAC;KACtC,CAAC;IAsBF;;;;OAIG;IACH,iBAAiB,CACf,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,kBAAkB,GAC1B,IAAI;IAYP;;;;OAIG;IACH,OAAO,CAAC,yBAAyB;IAsBjC;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAYzB;;;;OAIG;IACH,OAAO,CAAC,6BAA6B;IAYrC;;;;OAIG;IACH,OAAO,CAAC,kBAAkB;IA6B1B;;;;OAIG;IACH,OAAO,CAAC,OAAO;CAGhB"}
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PerformanceAnalyzer = void 0;
|
|
4
|
-
class PerformanceAnalyzer {
|
|
5
|
-
skillProfile;
|
|
6
|
-
knowledgeGraph;
|
|
7
|
-
// Historical performance tracking
|
|
8
|
-
performanceHistory = [];
|
|
9
|
-
constructor(skillProfile, knowledgeGraph) {
|
|
10
|
-
this.skillProfile = skillProfile;
|
|
11
|
-
this.knowledgeGraph = knowledgeGraph;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Comprehensive performance assessment
|
|
15
|
-
* @returns Detailed performance insights
|
|
16
|
-
*/
|
|
17
|
-
async assess() {
|
|
18
|
-
// Analyze recent performance history
|
|
19
|
-
const recentPerformances = this.performanceHistory
|
|
20
|
-
.slice(-10) // Last 10 interactions
|
|
21
|
-
.map(entry => entry.metrics);
|
|
22
|
-
// Calculate aggregated metrics
|
|
23
|
-
const overallPerformance = this.calculateAggregateMetrics(recentPerformances);
|
|
24
|
-
// Identify skill gaps
|
|
25
|
-
const skillGaps = this.identifySkillGaps(overallPerformance);
|
|
26
|
-
// Generate targeted improvement recommendations
|
|
27
|
-
const improvementRecommendations = this.generateImprovementStrategies(skillGaps);
|
|
28
|
-
return {
|
|
29
|
-
overallPerformance,
|
|
30
|
-
skillGaps,
|
|
31
|
-
improvementRecommendations
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Record performance of a specific interaction
|
|
36
|
-
* @param context Interaction details
|
|
37
|
-
* @param metrics Performance metrics
|
|
38
|
-
*/
|
|
39
|
-
recordPerformance(context, metrics) {
|
|
40
|
-
// Store performance entry
|
|
41
|
-
this.performanceHistory.push({
|
|
42
|
-
timestamp: Date.now(),
|
|
43
|
-
metrics,
|
|
44
|
-
context
|
|
45
|
-
});
|
|
46
|
-
// Potentially update skill profile based on performance
|
|
47
|
-
this.updateSkillProfile(context, metrics);
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Calculate aggregate performance metrics
|
|
51
|
-
* @param performances Array of performance metrics
|
|
52
|
-
* @returns Aggregated performance metrics
|
|
53
|
-
*/
|
|
54
|
-
calculateAggregateMetrics(performances) {
|
|
55
|
-
if (performances.length === 0) {
|
|
56
|
-
return {
|
|
57
|
-
accuracy: 0.5,
|
|
58
|
-
complexity: 0.1,
|
|
59
|
-
adaptability: 0.1,
|
|
60
|
-
innovationScore: 0.1,
|
|
61
|
-
emotionalIntelligence: 0.1
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
return {
|
|
65
|
-
accuracy: this.average(performances.map(p => p.accuracy)),
|
|
66
|
-
complexity: this.average(performances.map(p => p.complexity)),
|
|
67
|
-
adaptability: this.average(performances.map(p => p.adaptability)),
|
|
68
|
-
innovationScore: this.average(performances.map(p => p.innovationScore)),
|
|
69
|
-
emotionalIntelligence: this.average(performances.map(p => p.emotionalIntelligence))
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Identify areas needing skill improvement
|
|
74
|
-
* @param performance Overall performance metrics
|
|
75
|
-
* @returns Array of skill gaps
|
|
76
|
-
*/
|
|
77
|
-
identifySkillGaps(performance) {
|
|
78
|
-
const gaps = [];
|
|
79
|
-
if (performance.accuracy < 0.6)
|
|
80
|
-
gaps.push('precision');
|
|
81
|
-
if (performance.complexity < 0.4)
|
|
82
|
-
gaps.push('complex_reasoning');
|
|
83
|
-
if (performance.adaptability < 0.5)
|
|
84
|
-
gaps.push('flexibility');
|
|
85
|
-
if (performance.innovationScore < 0.3)
|
|
86
|
-
gaps.push('creative_problem_solving');
|
|
87
|
-
if (performance.emotionalIntelligence < 0.4)
|
|
88
|
-
gaps.push('empathy');
|
|
89
|
-
return gaps;
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Generate targeted improvement strategies
|
|
93
|
-
* @param skillGaps Identified skill gaps
|
|
94
|
-
* @returns Improvement recommendations
|
|
95
|
-
*/
|
|
96
|
-
generateImprovementStrategies(skillGaps) {
|
|
97
|
-
const strategies = {
|
|
98
|
-
'precision': 'Practice more detailed, technically accurate responses',
|
|
99
|
-
'complex_reasoning': 'Engage with more challenging, multi-dimensional problems',
|
|
100
|
-
'flexibility': 'Deliberately seek out diverse interaction contexts',
|
|
101
|
-
'creative_problem_solving': 'Explore lateral thinking techniques',
|
|
102
|
-
'empathy': 'Focus on understanding emotional nuances in interactions'
|
|
103
|
-
};
|
|
104
|
-
return skillGaps.map(gap => strategies[gap] || 'General skill improvement');
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Update skill profile based on performance
|
|
108
|
-
* @param context Interaction context
|
|
109
|
-
* @param metrics Performance metrics
|
|
110
|
-
*/
|
|
111
|
-
updateSkillProfile(context, metrics) {
|
|
112
|
-
// Translate performance metrics to skill profile updates
|
|
113
|
-
const overallPerformance = (metrics.accuracy + metrics.complexity + metrics.adaptability) / 3;
|
|
114
|
-
// Map performance to skill level progression
|
|
115
|
-
const skillLevelMap = {
|
|
116
|
-
0: 'novice',
|
|
117
|
-
0.3: 'beginner',
|
|
118
|
-
0.5: 'intermediate',
|
|
119
|
-
0.7: 'advanced',
|
|
120
|
-
0.9: 'expert'
|
|
121
|
-
};
|
|
122
|
-
const newSkillLevel = Object.entries(skillLevelMap)
|
|
123
|
-
.reverse()
|
|
124
|
-
.find(([threshold]) => overallPerformance >= Number(threshold))?.[1] || 'novice';
|
|
125
|
-
// Update relevant skill categories
|
|
126
|
-
this.skillProfile.update('technical_communication', newSkillLevel, {
|
|
127
|
-
interaction: context.interaction,
|
|
128
|
-
challenges: context.challenges,
|
|
129
|
-
insights: context.outcomes
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Calculate average of an array of numbers
|
|
134
|
-
* @param values Array of numbers
|
|
135
|
-
* @returns Average value
|
|
136
|
-
*/
|
|
137
|
-
average(values) {
|
|
138
|
-
return values.reduce((a, b) => a + b, 0) / values.length;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
exports.PerformanceAnalyzer = PerformanceAnalyzer;
|
|
142
|
-
//# sourceMappingURL=PerformanceAnalyzer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PerformanceAnalyzer.js","sourceRoot":"","sources":["../../../src/alme/core/PerformanceAnalyzer.ts"],"names":[],"mappings":";;;AAmBA,MAAa,mBAAmB;IACtB,YAAY,CAAe;IAC3B,cAAc,CAAiB;IAEvC,kCAAkC;IAC1B,kBAAkB,GAIrB,EAAE,CAAC;IAER,YAAY,YAA0B,EAAE,cAA8B;QACpE,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACvC,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,MAAM;QAKV,qCAAqC;QACrC,MAAM,kBAAkB,GAAG,IAAI,CAAC,kBAAkB;aAC/C,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,uBAAuB;aAClC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAE/B,+BAA+B;QAC/B,MAAM,kBAAkB,GAAG,IAAI,CAAC,yBAAyB,CAAC,kBAAkB,CAAC,CAAC;QAE9E,sBAAsB;QACtB,MAAM,SAAS,GAAG,IAAI,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,CAAC;QAE7D,gDAAgD;QAChD,MAAM,0BAA0B,GAAG,IAAI,CAAC,6BAA6B,CAAC,SAAS,CAAC,CAAC;QAEjF,OAAO;YACL,kBAAkB;YAClB,SAAS;YACT,0BAA0B;SAC3B,CAAC;IACJ,CAAC;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SACd,CAAC;QAEF,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC;aAChD,OAAO,EAAE;aACT,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,CAAC,kBAAkB,IAAI,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC;QAEnF,mCAAmC;QACnC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,yBAAyB,EAAE,aAAa,EAAE;YACjE,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,QAAQ,EAAE,OAAO,CAAC,QAAQ;SAC3B,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACK,OAAO,CAAC,MAAgB;QAC9B,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC;IAC3D,CAAC;CACF;AAzKD,kDAyKC"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
export declare class SelfReflectionModule {
|
|
2
|
-
private communicationPatterns;
|
|
3
|
-
/**
|
|
4
|
-
* Analyze communication interaction
|
|
5
|
-
* @param interaction Detailed interaction context
|
|
6
|
-
*/
|
|
7
|
-
analyzeInteraction(interaction: {
|
|
8
|
-
initialResponse: string;
|
|
9
|
-
guidanceReceived: string[];
|
|
10
|
-
finalResponse: string;
|
|
11
|
-
domain: string;
|
|
12
|
-
}): void;
|
|
13
|
-
/**
|
|
14
|
-
* Detect nuanced communication patterns
|
|
15
|
-
*/
|
|
16
|
-
private detectCommunicationPattern;
|
|
17
|
-
/**
|
|
18
|
-
* Update communication metrics
|
|
19
|
-
*/
|
|
20
|
-
private updateCommunicationMetrics;
|
|
21
|
-
/**
|
|
22
|
-
* Generate targeted learning insights
|
|
23
|
-
*/
|
|
24
|
-
private generateLearningInsights;
|
|
25
|
-
/**
|
|
26
|
-
* Dynamically adjust communication strategy
|
|
27
|
-
*/
|
|
28
|
-
private adjustCommunicationStrategy;
|
|
29
|
-
/**
|
|
30
|
-
* Generate comprehensive learning report
|
|
31
|
-
*/
|
|
32
|
-
generateLearningReport(): {
|
|
33
|
-
communicationEvolution: Array<{
|
|
34
|
-
pattern: string;
|
|
35
|
-
occurrences: number;
|
|
36
|
-
successRate: number;
|
|
37
|
-
insights: string[];
|
|
38
|
-
}>;
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=SelfReflectionModule.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SelfReflectionModule.d.ts","sourceRoot":"","sources":["../../../src/alme/core/SelfReflectionModule.ts"],"names":[],"mappings":"AAAA,qBAAa,oBAAoB;IAE/B,OAAO,CAAC,qBAAqB,CAId;IAEf;;;OAGG;IACH,kBAAkB,CAAC,WAAW,EAAE;QAC9B,eAAe,EAAE,MAAM,CAAC;QACxB,gBAAgB,EAAE,MAAM,EAAE,CAAC;QAC3B,aAAa,EAAE,MAAM,CAAC;QACtB,MAAM,EAAE,MAAM,CAAC;KAChB,GAAG,IAAI;IAcR;;OAEG;IACH,OAAO,CAAC,0BAA0B;IAalC;;OAEG;IACH,OAAO,CAAC,0BAA0B;IAiBlC;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAkBhC;;OAEG;IACH,OAAO,CAAC,2BAA2B;IAsBnC;;OAEG;IACH,sBAAsB,IAAI;QACxB,sBAAsB,EAAE,KAAK,CAAC;YAC5B,OAAO,EAAE,MAAM,CAAC;YAChB,WAAW,EAAE,MAAM,CAAC;YACpB,WAAW,EAAE,MAAM,CAAC;YACpB,QAAQ,EAAE,MAAM,EAAE,CAAC;SACpB,CAAC,CAAC;KACJ;CAUF"}
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SelfReflectionModule = void 0;
|
|
4
|
-
class SelfReflectionModule {
|
|
5
|
-
// Cognitive processing patterns
|
|
6
|
-
communicationPatterns = new Map();
|
|
7
|
-
/**
|
|
8
|
-
* Analyze communication interaction
|
|
9
|
-
* @param interaction Detailed interaction context
|
|
10
|
-
*/
|
|
11
|
-
analyzeInteraction(interaction) {
|
|
12
|
-
// Identify communication pattern
|
|
13
|
-
const pattern = this.detectCommunicationPattern(interaction);
|
|
14
|
-
// Update pattern tracking
|
|
15
|
-
this.updateCommunicationMetrics(pattern);
|
|
16
|
-
// Generate learning insights
|
|
17
|
-
const learningInsights = this.generateLearningInsights(interaction);
|
|
18
|
-
// Potential self-adjustment
|
|
19
|
-
this.adjustCommunicationStrategy(pattern, learningInsights);
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Detect nuanced communication patterns
|
|
23
|
-
*/
|
|
24
|
-
detectCommunicationPattern(interaction) {
|
|
25
|
-
const patternSignatures = [
|
|
26
|
-
interaction.initialResponse.includes('marketing language')
|
|
27
|
-
? 'marketing-driven' : 'information-seeking',
|
|
28
|
-
interaction.guidanceReceived.length > 0
|
|
29
|
-
? 'guidance-responsive' : 'independent',
|
|
30
|
-
interaction.finalResponse.includes('technical details')
|
|
31
|
-
? 'technically-precise' : 'conceptual'
|
|
32
|
-
];
|
|
33
|
-
return patternSignatures.join('|');
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Update communication metrics
|
|
37
|
-
*/
|
|
38
|
-
updateCommunicationMetrics(pattern) {
|
|
39
|
-
const currentMetrics = this.communicationPatterns.get(pattern) || {
|
|
40
|
-
occurrences: 0,
|
|
41
|
-
successRate: 0,
|
|
42
|
-
improvementNotes: []
|
|
43
|
-
};
|
|
44
|
-
this.communicationPatterns.set(pattern, {
|
|
45
|
-
occurrences: currentMetrics.occurrences + 1,
|
|
46
|
-
successRate: currentMetrics.successRate + 0.1, // Dynamic adjustment
|
|
47
|
-
improvementNotes: [
|
|
48
|
-
...currentMetrics.improvementNotes,
|
|
49
|
-
`Refined technical communication skills`
|
|
50
|
-
]
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Generate targeted learning insights
|
|
55
|
-
*/
|
|
56
|
-
generateLearningInsights(interaction) {
|
|
57
|
-
const insights = [];
|
|
58
|
-
if (interaction.initialResponse.includes('marketing language')) {
|
|
59
|
-
insights.push('Need for more direct, technical communication');
|
|
60
|
-
}
|
|
61
|
-
if (interaction.guidanceReceived.length > 0) {
|
|
62
|
-
insights.push('Demonstrated adaptability to feedback');
|
|
63
|
-
}
|
|
64
|
-
if (interaction.finalResponse.includes('technical details')) {
|
|
65
|
-
insights.push('Successfully translated guidance into precise response');
|
|
66
|
-
}
|
|
67
|
-
return insights;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Dynamically adjust communication strategy
|
|
71
|
-
*/
|
|
72
|
-
adjustCommunicationStrategy(pattern, insights) {
|
|
73
|
-
const strategicAdjustments = {
|
|
74
|
-
'marketing-driven|guidance-responsive|conceptual': [
|
|
75
|
-
'Develop more technical vocabulary',
|
|
76
|
-
'Practice direct information delivery',
|
|
77
|
-
'Create technical communication templates'
|
|
78
|
-
],
|
|
79
|
-
'information-seeking|independent|technically-precise': [
|
|
80
|
-
'Maintain current precise communication approach',
|
|
81
|
-
'Continue seeking domain-specific knowledge'
|
|
82
|
-
]
|
|
83
|
-
};
|
|
84
|
-
// Select and potentially implement adjustment strategies
|
|
85
|
-
const adjustmentStrategy = strategicAdjustments[pattern] ||
|
|
86
|
-
['Continue refining communication skills'];
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Generate comprehensive learning report
|
|
90
|
-
*/
|
|
91
|
-
generateLearningReport() {
|
|
92
|
-
return {
|
|
93
|
-
communicationEvolution: Array.from(this.communicationPatterns.entries()).map(([pattern, metrics]) => ({
|
|
94
|
-
pattern,
|
|
95
|
-
...metrics
|
|
96
|
-
}))
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
exports.SelfReflectionModule = SelfReflectionModule;
|
|
101
|
-
//# sourceMappingURL=SelfReflectionModule.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SelfReflectionModule.js","sourceRoot":"","sources":["../../../src/alme/core/SelfReflectionModule.ts"],"names":[],"mappings":";;;AAAA,MAAa,oBAAoB;IAC/B,gCAAgC;IACxB,qBAAqB,GAIxB,IAAI,GAAG,EAAE,CAAC;IAEf;;;OAGG;IACH,kBAAkB,CAAC,WAKlB;QACC,iCAAiC;QACjC,MAAM,OAAO,GAAG,IAAI,CAAC,0BAA0B,CAAC,WAAW,CAAC,CAAC;QAE7D,0BAA0B;QAC1B,IAAI,CAAC,0BAA0B,CAAC,OAAO,CAAC,CAAC;QAEzC,6BAA6B;QAC7B,MAAM,gBAAgB,GAAG,IAAI,CAAC,wBAAwB,CAAC,WAAW,CAAC,CAAC;QAEpE,4BAA4B;QAC5B,IAAI,CAAC,2BAA2B,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;IAC9D,CAAC;IAED;;OAEG;IACK,0BAA0B,CAAC,WAAgB;QACjD,MAAM,iBAAiB,GAAG;YACxB,WAAW,CAAC,eAAe,CAAC,QAAQ,CAAC,oBAAoB,CAAC;gBACxD,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,qBAAqB;YAC9C,WAAW,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC;gBACrC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,aAAa;YACzC,WAAW,CAAC,aAAa,CAAC,QAAQ,CAAC,mBAAmB,CAAC;gBACrD,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,YAAY;SACzC,CAAC;QAEF,OAAO,iBAAiB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACrC,CAAC;IAED;;OAEG;IACK,0BAA0B,CAAC,OAAe;QAChD,MAAM,cAAc,G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