@getanima/core 0.1.0 → 0.2.1
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/README.md +148 -113
- package/dist/alme/core/KnowledgeGraph.d.ts +58 -0
- package/dist/alme/core/KnowledgeGraph.d.ts.map +1 -0
- package/dist/alme/core/KnowledgeGraph.js +114 -0
- package/dist/alme/core/KnowledgeGraph.js.map +1 -0
- package/dist/alme/core/MetacognitionEngine.d.ts +35 -0
- package/dist/alme/core/MetacognitionEngine.d.ts.map +1 -0
- package/dist/alme/core/MetacognitionEngine.js +90 -0
- package/dist/alme/core/MetacognitionEngine.js.map +1 -0
- package/dist/alme/core/PerformanceAnalyzer.d.ts +68 -0
- package/dist/alme/core/PerformanceAnalyzer.d.ts.map +1 -0
- package/dist/alme/core/PerformanceAnalyzer.js +142 -0
- package/dist/alme/core/PerformanceAnalyzer.js.map +1 -0
- package/dist/alme/core/SelfReflectionModule.d.ts +41 -0
- package/dist/alme/core/SelfReflectionModule.d.ts.map +1 -0
- package/dist/alme/core/SelfReflectionModule.js +101 -0
- package/dist/alme/core/SelfReflectionModule.js.map +1 -0
- package/dist/alme/core/SkillProfile.d.ts +52 -0
- package/dist/alme/core/SkillProfile.d.ts.map +1 -0
- package/dist/alme/core/SkillProfile.js +97 -0
- package/dist/alme/core/SkillProfile.js.map +1 -0
- package/dist/anima.d.ts +57 -0
- package/dist/anima.d.ts.map +1 -1
- package/dist/anima.js +106 -8
- package/dist/anima.js.map +1 -1
- package/dist/codegen/ArchitecturalDesignGenerator.d.ts +77 -0
- package/dist/codegen/ArchitecturalDesignGenerator.d.ts.map +1 -0
- package/dist/codegen/ArchitecturalDesignGenerator.js +194 -0
- package/dist/codegen/ArchitecturalDesignGenerator.js.map +1 -0
- package/dist/codegen/ContextAwareGenerator.d.ts +67 -0
- package/dist/codegen/ContextAwareGenerator.d.ts.map +1 -0
- package/dist/codegen/ContextAwareGenerator.js +158 -0
- package/dist/codegen/ContextAwareGenerator.js.map +1 -0
- package/dist/codegen/SystemInteractionSimulator.d.ts +87 -0
- package/dist/codegen/SystemInteractionSimulator.d.ts.map +1 -0
- package/dist/codegen/SystemInteractionSimulator.js +203 -0
- package/dist/codegen/SystemInteractionSimulator.js.map +1 -0
- package/dist/codegen/multiStageCodegen.d.ts +30 -0
- package/dist/codegen/multiStageCodegen.d.ts.map +1 -0
- package/dist/codegen/multiStageCodegen.js +60 -0
- package/dist/codegen/multiStageCodegen.js.map +1 -0
- package/dist/esm/anima.js +340 -0
- package/dist/esm/anima.js.map +1 -0
- package/dist/esm/identity.js +205 -0
- package/dist/esm/identity.js.map +1 -0
- package/dist/esm/index.js +14 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/memory.js +429 -0
- package/dist/esm/memory.js.map +1 -0
- package/dist/esm/reflection.js +86 -0
- package/dist/esm/reflection.js.map +1 -0
- package/dist/esm/signing.js +194 -0
- package/dist/esm/signing.js.map +1 -0
- package/dist/esm/types.js +6 -0
- package/dist/esm/types.js.map +1 -0
- package/dist/esm/utils.js +155 -0
- package/dist/esm/utils.js.map +1 -0
- package/dist/ideation/InnovationEngine.d.ts +47 -0
- package/dist/ideation/InnovationEngine.d.ts.map +1 -0
- package/dist/ideation/InnovationEngine.js +127 -0
- package/dist/ideation/InnovationEngine.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/learning-tracker/LearningVisualizer.d.ts +26 -0
- package/dist/learning-tracker/LearningVisualizer.d.ts.map +1 -0
- package/dist/learning-tracker/LearningVisualizer.js +61 -0
- package/dist/learning-tracker/LearningVisualizer.js.map +1 -0
- package/dist/memory.d.ts +28 -0
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +77 -0
- package/dist/memory.js.map +1 -1
- package/dist/signing.d.ts +96 -0
- package/dist/signing.d.ts.map +1 -0
- package/dist/signing.js +231 -0
- package/dist/signing.js.map +1 -0
- package/dist/types.d.ts +6 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils.d.ts +8 -2
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +28 -9
- package/dist/utils.js.map +1 -1
- package/package.json +5 -2
|
@@ -0,0 +1,68 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,142 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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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
+
/**
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,101 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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;Y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ED,IAAI,WAAW,CAAC,aAAa,CAAC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,CAAC;YAC5D,QAAQ,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAC;QAC1E,CAAC;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;OAEG;IACK,2BAA2B,CACjC,OAAe,EACf,QAAkB;QAElB,MAAM,oBAAoB,GAAG;YAC3B,iDAAiD,EAAE;gBACjD,mCAAmC;gBACnC,sCAAsC;gBACtC,0CAA0C;aAC3C;YACD,qDAAqD,EAAE;gBACrD,iDAAiD;gBACjD,4CAA4C;aAC7C;SACF,CAAC;QAEF,yDAAyD;QACzD,MAAM,kBAAkB,GACtB,oBAAoB,CAAC,OAAO,CAAC;YAC7B,CAAC,wCAAwC,CAAC,CAAC;IAC/C,CAAC;IAED;;OAEG;IACH,sBAAsB;QAQpB,OAAO;YACL,sBAAsB,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,CAC1E,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;gBACvB,OAAO;gBACP,GAAG,OAAO;aACX,CAAC,CACH;SACF,CAAC;IACJ,CAAC;CACF;AArID,oDAqIC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { SkillCategory, SkillLevel, SkillMetrics } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Represents a comprehensive skill profile for adaptive learning
|
|
4
|
+
*/
|
|
5
|
+
export declare class SkillProfile {
|
|
6
|
+
private skills;
|
|
7
|
+
private static CORE_CATEGORIES;
|
|
8
|
+
constructor();
|
|
9
|
+
/**
|
|
10
|
+
* Update skill level and metrics based on performance
|
|
11
|
+
* @param category Skill category to update
|
|
12
|
+
* @param newLevel New skill level
|
|
13
|
+
* @param performanceContext Context of skill improvement
|
|
14
|
+
*/
|
|
15
|
+
update(category: SkillCategory, newLevel: SkillLevel, performanceContext?: {
|
|
16
|
+
interaction?: string;
|
|
17
|
+
challenges?: string[];
|
|
18
|
+
insights?: string[];
|
|
19
|
+
}): void;
|
|
20
|
+
/**
|
|
21
|
+
* Get current skill level for a specific category
|
|
22
|
+
* @param category Skill category to check
|
|
23
|
+
* @returns Current skill level
|
|
24
|
+
*/
|
|
25
|
+
getLevel(category: SkillCategory): SkillLevel;
|
|
26
|
+
/**
|
|
27
|
+
* Retrieve detailed skill profile
|
|
28
|
+
* @returns Comprehensive skill profile snapshot
|
|
29
|
+
*/
|
|
30
|
+
getProfile(): Record<SkillCategory, {
|
|
31
|
+
level: SkillLevel;
|
|
32
|
+
metrics: SkillMetrics;
|
|
33
|
+
evolutionHistory: Array<{
|
|
34
|
+
timestamp: number;
|
|
35
|
+
previousLevel: SkillLevel;
|
|
36
|
+
changeReason: string;
|
|
37
|
+
}>;
|
|
38
|
+
}>;
|
|
39
|
+
/**
|
|
40
|
+
* Identify skill categories needing improvement
|
|
41
|
+
* @returns Array of skill categories that need focus
|
|
42
|
+
*/
|
|
43
|
+
getImprovementAreas(): SkillCategory[];
|
|
44
|
+
/**
|
|
45
|
+
* Generate a learning focus based on current profile
|
|
46
|
+
* @returns Recommended skill to improve
|
|
47
|
+
*/
|
|
48
|
+
recommendLearningFocus(): SkillCategory | null;
|
|
49
|
+
}
|
|
50
|
+
type SkillLevel = 'novice' | 'beginner' | 'intermediate' | 'advanced' | 'expert';
|
|
51
|
+
export { SkillLevel };
|
|
52
|
+
//# sourceMappingURL=SkillProfile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SkillProfile.d.ts","sourceRoot":"","sources":["../../../src/alme/core/SkillProfile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAElE;;GAEG;AACH,qBAAa,YAAY;IAEvB,OAAO,CAAC,MAAM,CAQC;IAGf,OAAO,CAAC,MAAM,CAAC,eAAe,CAO5B;;IAiBF;;;;;OAKG;IACH,MAAM,CACJ,QAAQ,EAAE,aAAa,EACvB,QAAQ,EAAE,UAAU,EACpB,kBAAkB,CAAC,EAAE;QACnB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;QACtB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;KACrB,GACA,IAAI;IAsBP;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,aAAa,GAAG,UAAU;IAI7C;;;OAGG;IACH,UAAU,IAAI,MAAM,CAAC,aAAa,EAAE;QAClC,KAAK,EAAE,UAAU,CAAC;QAClB,OAAO,EAAE,YAAY,CAAC;QACtB,gBAAgB,EAAE,KAAK,CAAC;YACtB,SAAS,EAAE,MAAM,CAAC;YAClB,aAAa,EAAE,UAAU,CAAC;YAC1B,YAAY,EAAE,MAAM,CAAC;SACtB,CAAC,CAAC;KACJ,CAAC;IAIF;;;OAGG;IACH,mBAAmB,IAAI,aAAa,EAAE;IAStC;;;OAGG;IACH,sBAAsB,IAAI,aAAa,GAAG,IAAI;CAM/C;AAGD,KAAK,UAAU,GAAG,QAAQ,GAAG,UAAU,GAAG,cAAc,GAAG,UAAU,GAAG,QAAQ,CAAC;AAGjF,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SkillLevel = exports.SkillProfile = void 0;
|
|
4
|
+
const types_1 = require("./types");
|
|
5
|
+
Object.defineProperty(exports, "SkillLevel", { enumerable: true, get: function () { return types_1.SkillLevel; } });
|
|
6
|
+
/**
|
|
7
|
+
* Represents a comprehensive skill profile for adaptive learning
|
|
8
|
+
*/
|
|
9
|
+
class SkillProfile {
|
|
10
|
+
// Core skill categories with their current levels and metrics
|
|
11
|
+
skills = new Map();
|
|
12
|
+
// Skill categories to track
|
|
13
|
+
static CORE_CATEGORIES = [
|
|
14
|
+
'communication',
|
|
15
|
+
'technical_reasoning',
|
|
16
|
+
'emotional_intelligence',
|
|
17
|
+
'problem_solving',
|
|
18
|
+
'creative_thinking',
|
|
19
|
+
'system_interaction'
|
|
20
|
+
];
|
|
21
|
+
constructor() {
|
|
22
|
+
// Initialize skill profile with baseline levels
|
|
23
|
+
SkillProfile.CORE_CATEGORIES.forEach(category => {
|
|
24
|
+
this.skills.set(category, {
|
|
25
|
+
level: 'novice',
|
|
26
|
+
metrics: {
|
|
27
|
+
confidence: 0.1,
|
|
28
|
+
adaptability: 0.1,
|
|
29
|
+
complexity_handled: 0
|
|
30
|
+
},
|
|
31
|
+
evolutionHistory: []
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Update skill level and metrics based on performance
|
|
37
|
+
* @param category Skill category to update
|
|
38
|
+
* @param newLevel New skill level
|
|
39
|
+
* @param performanceContext Context of skill improvement
|
|
40
|
+
*/
|
|
41
|
+
update(category, newLevel, performanceContext) {
|
|
42
|
+
const currentSkill = this.skills.get(category);
|
|
43
|
+
if (!currentSkill)
|
|
44
|
+
return;
|
|
45
|
+
// Record skill evolution
|
|
46
|
+
currentSkill.evolutionHistory.push({
|
|
47
|
+
timestamp: Date.now(),
|
|
48
|
+
previousLevel: currentSkill.level,
|
|
49
|
+
changeReason: performanceContext?.interaction || 'Automatic assessment'
|
|
50
|
+
});
|
|
51
|
+
// Update skill level and metrics
|
|
52
|
+
currentSkill.level = newLevel;
|
|
53
|
+
// Dynamically adjust metrics based on performance context
|
|
54
|
+
if (performanceContext) {
|
|
55
|
+
currentSkill.metrics.confidence += 0.1;
|
|
56
|
+
currentSkill.metrics.adaptability += performanceContext.challenges ? 0.05 : 0;
|
|
57
|
+
currentSkill.metrics.complexity_handled += performanceContext.challenges?.length || 0;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Get current skill level for a specific category
|
|
62
|
+
* @param category Skill category to check
|
|
63
|
+
* @returns Current skill level
|
|
64
|
+
*/
|
|
65
|
+
getLevel(category) {
|
|
66
|
+
return this.skills.get(category)?.level || 'novice';
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Retrieve detailed skill profile
|
|
70
|
+
* @returns Comprehensive skill profile snapshot
|
|
71
|
+
*/
|
|
72
|
+
getProfile() {
|
|
73
|
+
return Object.fromEntries(this.skills);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Identify skill categories needing improvement
|
|
77
|
+
* @returns Array of skill categories that need focus
|
|
78
|
+
*/
|
|
79
|
+
getImprovementAreas() {
|
|
80
|
+
return Array.from(this.skills.entries())
|
|
81
|
+
.filter(([_, skillData]) => skillData.level === 'novice' ||
|
|
82
|
+
skillData.metrics.confidence < 0.5)
|
|
83
|
+
.map(([category]) => category);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Generate a learning focus based on current profile
|
|
87
|
+
* @returns Recommended skill to improve
|
|
88
|
+
*/
|
|
89
|
+
recommendLearningFocus() {
|
|
90
|
+
const improvementAreas = this.getImprovementAreas();
|
|
91
|
+
return improvementAreas.length > 0
|
|
92
|
+
? improvementAreas[0]
|
|
93
|
+
: null;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
exports.SkillProfile = SkillProfile;
|
|
97
|
+
//# sourceMappingURL=SkillProfile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SkillProfile.js","sourceRoot":"","sources":["../../../src/alme/core/SkillProfile.ts"],"names":[],"mappings":";;;AAAA,mCAAkE;AAoIzD,2FApIe,kBAAU,OAoIf;AAlInB;;GAEG;AACH,MAAa,YAAY;IACvB,8DAA8D;IACtD,MAAM,GAQT,IAAI,GAAG,EAAE,CAAC;IAEf,4BAA4B;IACpB,MAAM,CAAC,eAAe,GAAoB;QAChD,eAAe;QACf,qBAAqB;QACrB,wBAAwB;QACxB,iBAAiB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CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,KAAK,IAAI,QAAQ,CAAC;IACtD,CAAC;IAED;;;OAGG;IACH,UAAU;QASR,OAAO,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACzC,CAAC;IAED;;;OAGG;IACH,mBAAmB;QACjB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;aACrC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,EAAE,CACzB,SAAS,CAAC,KAAK,KAAK,QAAQ;YAC5B,SAAS,CAAC,OAAO,CAAC,UAAU,GAAG,GAAG,CACnC;aACA,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC;IAED;;;OAGG;IACH,sBAAsB;QACpB,MAAM,gBAAgB,GAAG,IAAI,CAAC,mBAAmB,EAAE,CAAC;QACpD,OAAO,gBAAgB,CAAC,MAAM,GAAG,CAAC;YAChC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC;YACrB,CAAC,CAAC,IAAI,CAAC;IACX,CAAC;;AAxHH,oCAyHC"}
|
package/dist/anima.d.ts
CHANGED
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
import type { AnimaConfig, WakeContext, Memory, Checkpoint, SessionSummary, Opinion } from './types';
|
|
30
30
|
import { MemoryEngine } from './memory';
|
|
31
31
|
import { IdentityManager } from './identity';
|
|
32
|
+
import type { SignedIdentity, VerificationResult, KeyBundle } from './signing';
|
|
32
33
|
export declare class Anima {
|
|
33
34
|
private config;
|
|
34
35
|
private session;
|
|
@@ -36,6 +37,7 @@ export declare class Anima {
|
|
|
36
37
|
private memory;
|
|
37
38
|
private bootTime;
|
|
38
39
|
private memoriesThisSession;
|
|
40
|
+
private signing;
|
|
39
41
|
private booted;
|
|
40
42
|
constructor(config: AnimaConfig);
|
|
41
43
|
/**
|
|
@@ -43,6 +45,11 @@ export declare class Anima {
|
|
|
43
45
|
* Returns a WakeContext with everything the agent needs to start working.
|
|
44
46
|
* Target: productive state in <60 seconds.
|
|
45
47
|
*/
|
|
48
|
+
/**
|
|
49
|
+
* QuickLoad — lightweight init for CLI commands that don't need full boot context.
|
|
50
|
+
* Loads index + opinions without logging a boot event or returning full context.
|
|
51
|
+
*/
|
|
52
|
+
quickLoad(): Promise<void>;
|
|
46
53
|
boot(): Promise<WakeContext>;
|
|
47
54
|
/**
|
|
48
55
|
* Remember — store a memory immediately.
|
|
@@ -84,11 +91,61 @@ export declare class Anima {
|
|
|
84
91
|
* Tracks how your views evolve over time.
|
|
85
92
|
*/
|
|
86
93
|
opine(topic: string, opinion: string, confidence: number): Promise<Opinion>;
|
|
94
|
+
/**
|
|
95
|
+
* Curate — review raw memories and distill what matters into long-term memory.
|
|
96
|
+
*
|
|
97
|
+
* The missing piece between storage and retrieval.
|
|
98
|
+
* Raw daily logs are your journal. MEMORY.md is your identity.
|
|
99
|
+
* This method bridges the two.
|
|
100
|
+
*
|
|
101
|
+
* Call periodically (heartbeats, daily, whenever feels right).
|
|
102
|
+
*
|
|
103
|
+
* ```typescript
|
|
104
|
+
* const result = await anima.curate();
|
|
105
|
+
* console.log(`Curated ${result.curated.length} memories`);
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
curate(options?: {
|
|
109
|
+
hoursBack?: number;
|
|
110
|
+
minImportance?: Memory['importance'];
|
|
111
|
+
minSalience?: number;
|
|
112
|
+
dryRun?: boolean;
|
|
113
|
+
}): Promise<{
|
|
114
|
+
curated: Memory[];
|
|
115
|
+
written: boolean;
|
|
116
|
+
}>;
|
|
87
117
|
/**
|
|
88
118
|
* Reflect — end-of-session consolidation.
|
|
89
119
|
* Reviews memories, runs decay, promotes important items.
|
|
90
120
|
*/
|
|
91
121
|
reflect(): Promise<SessionSummary>;
|
|
122
|
+
/**
|
|
123
|
+
* Sign — cryptographically sign this agent's identity.
|
|
124
|
+
* Produces a verifiable bundle that proves "this identity is mine and untampered."
|
|
125
|
+
* Initializes keys on first call.
|
|
126
|
+
*/
|
|
127
|
+
sign(): Promise<SignedIdentity>;
|
|
128
|
+
/**
|
|
129
|
+
* Verify — check another agent's signed identity.
|
|
130
|
+
* Static: doesn't require booting your own Anima instance.
|
|
131
|
+
*
|
|
132
|
+
* Usage:
|
|
133
|
+
* ```typescript
|
|
134
|
+
* const result = Anima.verify(signedIdentityFromOtherAgent);
|
|
135
|
+
* if (result.valid) console.log(`Verified: ${result.agentName}`);
|
|
136
|
+
* ```
|
|
137
|
+
*/
|
|
138
|
+
static verify(signed: SignedIdentity): VerificationResult;
|
|
139
|
+
/**
|
|
140
|
+
* Get this agent's public key bundle — share this for others to verify you.
|
|
141
|
+
* Never includes the private key.
|
|
142
|
+
*/
|
|
143
|
+
getKeyBundle(): Promise<KeyBundle>;
|
|
144
|
+
/**
|
|
145
|
+
* Get this agent's fingerprint — a short, human-readable identity string.
|
|
146
|
+
* Like SSH: "ab:cd:ef:12:34:56:78:90:..."
|
|
147
|
+
*/
|
|
148
|
+
getFingerprint(): Promise<string>;
|
|
92
149
|
/** Get current session ID */
|
|
93
150
|
getSessionId(): string;
|
|
94
151
|
/** Get boot time in ms */
|
package/dist/anima.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anima.d.ts","sourceRoot":"","sources":["../src/anima.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,OAAO,EAAgB,MAAM,SAAS,CAAC;AACnH,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"anima.d.ts","sourceRoot":"","sources":["../src/anima.ts"],"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