noormme 1.1.0 ā 1.2.0
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 +84 -65
- package/dist/cjs/agentic/ActionJournal.js +13 -9
- package/dist/cjs/agentic/CapabilityManager.js +35 -21
- package/dist/cjs/agentic/CognitiveRepository.js +19 -9
- package/dist/cjs/agentic/ContextBuffer.js +24 -12
- package/dist/cjs/agentic/Cortex.js +11 -4
- package/dist/cjs/agentic/EpisodicMemory.js +7 -5
- package/dist/cjs/agentic/PersonaManager.js +16 -8
- package/dist/cjs/agentic/PolicyEnforcer.js +31 -12
- package/dist/cjs/agentic/ResourceMonitor.js +4 -4
- package/dist/cjs/agentic/SessionCompressor.js +22 -14
- package/dist/cjs/agentic/SessionManager.js +36 -18
- package/dist/cjs/agentic/VectorIndexer.js +22 -18
- package/dist/cjs/agentic/improvement/AblationEngine.js +22 -15
- package/dist/cjs/agentic/improvement/ActionRefiner.js +12 -10
- package/dist/cjs/agentic/improvement/ConflictResolver.js +5 -5
- package/dist/cjs/agentic/improvement/CortexJanitor.js +30 -9
- package/dist/cjs/agentic/improvement/CuriosityEngine.js +27 -23
- package/dist/cjs/agentic/improvement/EvolutionRitual.js +4 -4
- package/dist/cjs/agentic/improvement/EvolutionaryPilot.js +16 -6
- package/dist/cjs/agentic/improvement/GoalArchitect.d.ts +2 -2
- package/dist/cjs/agentic/improvement/GoalArchitect.js +20 -18
- package/dist/cjs/agentic/improvement/GovernanceManager.js +19 -11
- package/dist/cjs/agentic/improvement/HiveLink.js +22 -15
- package/dist/cjs/agentic/improvement/KnowledgeDistiller.js +48 -32
- package/dist/cjs/agentic/improvement/RecursiveReasoner.js +40 -17
- package/dist/cjs/agentic/improvement/ReflectionEngine.js +10 -8
- package/dist/cjs/agentic/improvement/RitualOrchestrator.js +28 -22
- package/dist/cjs/agentic/improvement/RuleEngine.js +22 -17
- package/dist/cjs/agentic/improvement/SelfEvolution.js +24 -18
- package/dist/cjs/agentic/improvement/SelfTestRegistry.js +18 -15
- package/dist/cjs/agentic/improvement/SkillSynthesizer.js +42 -27
- package/dist/cjs/agentic/improvement/SovereignMetrics.js +19 -17
- package/dist/cjs/agentic/improvement/StrategicPlanner.js +120 -55
- package/dist/cjs/agentic/telemetry/CognitiveSynthesizer.js +26 -12
- package/dist/cjs/agentic/telemetry/EventHarvester.js +3 -2
- package/dist/cjs/agentic/telemetry/ResearchAlchemist.js +5 -2
- package/dist/cjs/cache/cache-manager.js +7 -4
- package/dist/cjs/cli/commands/analyze.js +5 -4
- package/dist/cjs/cli/commands/generate.js +81 -44
- package/dist/cjs/cli/commands/init.js +7 -3
- package/dist/cjs/cli/commands/inspect.js +139 -36
- package/dist/cjs/cli/commands/migrate.js +5 -4
- package/dist/cjs/cli/commands/optimize.js +4 -4
- package/dist/cjs/cli/commands/status.js +9 -7
- package/dist/cjs/cli/commands/watch.js +7 -6
- package/dist/cjs/cli/index.js +2 -2
- package/dist/cjs/cli/ui/spinner.d.ts +15 -0
- package/dist/cjs/cli/ui/spinner.js +76 -0
- package/dist/cjs/dialect/database-introspector.js +3 -1
- package/dist/cjs/dialect/postgresql/postgresql-driver.js +3 -1
- package/dist/cjs/dialect/postgresql/postgresql-features.js +18 -8
- package/dist/cjs/dialect/postgresql/postgresql-introspector.js +2 -2
- package/dist/cjs/dialect/sqlite/sqlite-auto-indexer.js +47 -33
- package/dist/cjs/dialect/sqlite/sqlite-auto-optimizer.js +8 -7
- package/dist/cjs/dialect/sqlite/sqlite-driver.js +2 -2
- package/dist/cjs/dialect/sqlite/sqlite-introspector.js +15 -12
- package/dist/cjs/edge-runtime/edge-config.js +21 -19
- package/dist/cjs/errors/NoormError.js +22 -20
- package/dist/cjs/helpers/agent-schema.js +2 -0
- package/dist/cjs/helpers/postgresql.js +7 -4
- package/dist/cjs/helpers/schema-evolution.js +31 -6
- package/dist/cjs/index.d.ts +3 -3
- package/dist/cjs/logging/logger.js +8 -4
- package/dist/cjs/migration/data_migrator.js +12 -11
- package/dist/cjs/migration/database_migration_manager.js +17 -13
- package/dist/cjs/migration/schema_differ.js +22 -14
- package/dist/cjs/migration/schema_introspector.js +8 -8
- package/dist/cjs/migration/type_mapper.js +68 -67
- package/dist/cjs/noormme.js +52 -37
- package/dist/cjs/performance/index.js +5 -5
- package/dist/cjs/performance/query-optimizer.js +26 -21
- package/dist/cjs/performance/services/cache-service.js +26 -16
- package/dist/cjs/performance/services/connection-factory.js +28 -23
- package/dist/cjs/performance/services/metrics-collector.js +41 -36
- package/dist/cjs/performance/utils/query-parser.js +15 -16
- package/dist/cjs/relationships/relationship-engine.js +10 -8
- package/dist/cjs/repository/repository-factory.js +97 -38
- package/dist/cjs/schema/core/coordinators/schema-discovery.coordinator.js +1 -3
- package/dist/cjs/schema/core/discovery/relationship-discovery.js +16 -16
- package/dist/cjs/schema/core/discovery/table-metadata-discovery.js +9 -9
- package/dist/cjs/schema/core/discovery/view-discovery.js +5 -4
- package/dist/cjs/schema/core/factories/discovery-factory.js +4 -4
- package/dist/cjs/schema/core/utils/name-generator.js +14 -5
- package/dist/cjs/schema/core/utils/type-mapper.js +24 -24
- package/dist/cjs/schema/dialects/postgresql/postgresql-discovery.coordinator.js +8 -7
- package/dist/cjs/schema/dialects/sqlite/discovery/sqlite-constraint-discovery.js +17 -15
- package/dist/cjs/schema/dialects/sqlite/discovery/sqlite-index-discovery.js +8 -8
- package/dist/cjs/schema/dialects/sqlite/introspection/sqlite-schema-introspector.js +6 -11
- package/dist/cjs/schema/dialects/sqlite/sqlite-discovery.coordinator.js +14 -13
- package/dist/cjs/schema/test/basic-schema-test.js +11 -9
- package/dist/cjs/schema/test/dialect-capabilities.test.js +6 -6
- package/dist/cjs/schema/test/discovery-factory.test.js +2 -2
- package/dist/cjs/schema/test/error-handling.test.js +8 -6
- package/dist/cjs/schema/test/integration.test.js +24 -18
- package/dist/cjs/schema/test/schema-discovery-coordinator.test.js +9 -9
- package/dist/cjs/schema/test/simple-schema-test.js +9 -9
- package/dist/cjs/schema/test/sqlite-discovery-coordinator.test.js +64 -48
- package/dist/cjs/schema/test/test-runner.js +3 -3
- package/dist/cjs/sqlite-migration/index.d.ts +2 -2
- package/dist/cjs/sqlite-migration/sqlite-migration-manager.js +21 -17
- package/dist/cjs/sqlite-migration/sqlite-migration-provider.js +38 -34
- package/dist/cjs/testing/test-utils.js +36 -34
- package/dist/cjs/types/index.d.ts +5 -2
- package/dist/cjs/types/index.js +6 -3
- package/dist/cjs/types/type-generator.js +46 -42
- package/dist/cjs/util/safe-sql-helpers.js +1 -1
- package/dist/cjs/util/security-validator.js +20 -9
- package/dist/cjs/utils/errorHelpers.js +20 -10
- package/dist/cjs/watch/schema-watcher.js +22 -23
- package/dist/esm/agentic/ActionJournal.js +13 -9
- package/dist/esm/agentic/CapabilityManager.js +35 -21
- package/dist/esm/agentic/CognitiveRepository.js +19 -9
- package/dist/esm/agentic/ContextBuffer.js +24 -12
- package/dist/esm/agentic/Cortex.js +11 -4
- package/dist/esm/agentic/EpisodicMemory.js +7 -5
- package/dist/esm/agentic/PersonaManager.js +16 -8
- package/dist/esm/agentic/PolicyEnforcer.js +31 -12
- package/dist/esm/agentic/ResourceMonitor.js +4 -4
- package/dist/esm/agentic/SessionCompressor.js +22 -14
- package/dist/esm/agentic/SessionManager.js +36 -18
- package/dist/esm/agentic/VectorIndexer.js +22 -18
- package/dist/esm/agentic/improvement/AblationEngine.js +22 -15
- package/dist/esm/agentic/improvement/ActionRefiner.js +12 -10
- package/dist/esm/agentic/improvement/ConflictResolver.js +5 -5
- package/dist/esm/agentic/improvement/CortexJanitor.js +30 -9
- package/dist/esm/agentic/improvement/CuriosityEngine.js +27 -23
- package/dist/esm/agentic/improvement/EvolutionRitual.js +4 -4
- package/dist/esm/agentic/improvement/EvolutionaryPilot.js +16 -6
- package/dist/esm/agentic/improvement/GoalArchitect.d.ts +2 -2
- package/dist/esm/agentic/improvement/GoalArchitect.js +20 -18
- package/dist/esm/agentic/improvement/GovernanceManager.js +19 -11
- package/dist/esm/agentic/improvement/HiveLink.js +22 -15
- package/dist/esm/agentic/improvement/KnowledgeDistiller.js +48 -32
- package/dist/esm/agentic/improvement/RecursiveReasoner.js +40 -17
- package/dist/esm/agentic/improvement/ReflectionEngine.js +10 -8
- package/dist/esm/agentic/improvement/RitualOrchestrator.js +28 -22
- package/dist/esm/agentic/improvement/RuleEngine.js +22 -17
- package/dist/esm/agentic/improvement/SelfEvolution.js +24 -18
- package/dist/esm/agentic/improvement/SelfTestRegistry.js +18 -15
- package/dist/esm/agentic/improvement/SkillSynthesizer.js +42 -27
- package/dist/esm/agentic/improvement/SovereignMetrics.js +19 -17
- package/dist/esm/agentic/improvement/StrategicPlanner.js +120 -55
- package/dist/esm/agentic/telemetry/CognitiveSynthesizer.js +26 -12
- package/dist/esm/agentic/telemetry/EventHarvester.js +3 -2
- package/dist/esm/agentic/telemetry/ResearchAlchemist.js +5 -2
- package/dist/esm/cache/cache-manager.js +7 -4
- package/dist/esm/cli/commands/analyze.js +5 -4
- package/dist/esm/cli/commands/generate.js +82 -45
- package/dist/esm/cli/commands/init.js +8 -4
- package/dist/esm/cli/commands/inspect.js +140 -37
- package/dist/esm/cli/commands/migrate.js +5 -4
- package/dist/esm/cli/commands/optimize.js +4 -4
- package/dist/esm/cli/commands/status.js +9 -7
- package/dist/esm/cli/commands/watch.js +7 -6
- package/dist/esm/cli/index.js +2 -2
- package/dist/esm/cli/ui/spinner.d.ts +15 -0
- package/dist/esm/cli/ui/spinner.js +70 -0
- package/dist/esm/dialect/database-introspector.js +3 -1
- package/dist/esm/dialect/postgresql/postgresql-driver.js +3 -1
- package/dist/esm/dialect/postgresql/postgresql-features.js +18 -8
- package/dist/esm/dialect/postgresql/postgresql-introspector.js +2 -2
- package/dist/esm/dialect/sqlite/sqlite-auto-indexer.js +47 -33
- package/dist/esm/dialect/sqlite/sqlite-auto-optimizer.js +8 -7
- package/dist/esm/dialect/sqlite/sqlite-driver.js +2 -2
- package/dist/esm/dialect/sqlite/sqlite-introspector.js +15 -12
- package/dist/esm/dynamic/dynamic.js +1 -1
- package/dist/esm/edge-runtime/edge-config.js +21 -19
- package/dist/esm/errors/NoormError.js +22 -20
- package/dist/esm/helpers/agent-schema.js +2 -0
- package/dist/esm/helpers/postgresql.js +7 -4
- package/dist/esm/helpers/schema-evolution.js +31 -6
- package/dist/esm/index.d.ts +3 -3
- package/dist/esm/index.js +2 -2
- package/dist/esm/logging/logger.js +8 -4
- package/dist/esm/migration/data_migrator.js +12 -11
- package/dist/esm/migration/database_migration_manager.js +18 -14
- package/dist/esm/migration/schema_differ.js +22 -14
- package/dist/esm/migration/schema_introspector.js +8 -8
- package/dist/esm/migration/type_mapper.js +68 -67
- package/dist/esm/noormme.js +52 -37
- package/dist/esm/performance/index.js +5 -5
- package/dist/esm/performance/query-optimizer.js +26 -21
- package/dist/esm/performance/services/cache-service.js +26 -16
- package/dist/esm/performance/services/connection-factory.js +28 -23
- package/dist/esm/performance/services/metrics-collector.js +41 -36
- package/dist/esm/performance/utils/query-parser.js +15 -16
- package/dist/esm/raw-builder/sql.js +1 -1
- package/dist/esm/relationships/relationship-engine.js +10 -8
- package/dist/esm/repository/repository-factory.js +98 -39
- package/dist/esm/schema/builders/alter-table-add-index-builder.js +1 -1
- package/dist/esm/schema/builders/create-index-builder.js +2 -2
- package/dist/esm/schema/core/coordinators/schema-discovery.coordinator.js +1 -3
- package/dist/esm/schema/core/discovery/relationship-discovery.js +16 -16
- package/dist/esm/schema/core/discovery/table-metadata-discovery.js +9 -9
- package/dist/esm/schema/core/discovery/view-discovery.js +5 -4
- package/dist/esm/schema/core/factories/discovery-factory.js +4 -4
- package/dist/esm/schema/core/utils/name-generator.js +14 -5
- package/dist/esm/schema/core/utils/type-mapper.js +24 -24
- package/dist/esm/schema/dialects/postgresql/postgresql-discovery.coordinator.js +8 -7
- package/dist/esm/schema/dialects/sqlite/discovery/sqlite-constraint-discovery.js +17 -15
- package/dist/esm/schema/dialects/sqlite/discovery/sqlite-index-discovery.js +8 -8
- package/dist/esm/schema/dialects/sqlite/introspection/sqlite-schema-introspector.js +6 -11
- package/dist/esm/schema/dialects/sqlite/sqlite-discovery.coordinator.js +14 -13
- package/dist/esm/schema/test/basic-schema-test.js +11 -9
- package/dist/esm/schema/test/dialect-capabilities.test.js +6 -6
- package/dist/esm/schema/test/discovery-factory.test.js +2 -2
- package/dist/esm/schema/test/error-handling.test.js +8 -6
- package/dist/esm/schema/test/integration.test.js +24 -18
- package/dist/esm/schema/test/schema-discovery-coordinator.test.js +9 -9
- package/dist/esm/schema/test/simple-schema-test.js +9 -9
- package/dist/esm/schema/test/sqlite-discovery-coordinator.test.js +64 -48
- package/dist/esm/schema/test/test-runner.js +3 -3
- package/dist/esm/sqlite-migration/index.d.ts +2 -2
- package/dist/esm/sqlite-migration/sqlite-migration-manager.js +21 -17
- package/dist/esm/sqlite-migration/sqlite-migration-provider.js +38 -34
- package/dist/esm/testing/test-utils.js +36 -34
- package/dist/esm/types/index.d.ts +5 -2
- package/dist/esm/types/index.js +6 -3
- package/dist/esm/types/type-generator.js +46 -42
- package/dist/esm/util/safe-sql-helpers.js +1 -1
- package/dist/esm/util/security-validator.js +20 -9
- package/dist/esm/utils/errorHelpers.js +21 -11
- package/dist/esm/watch/schema-watcher.js +22 -23
- package/package.json +40 -44
|
@@ -29,9 +29,9 @@ class StrategicPlanner {
|
|
|
29
29
|
const mutations = [];
|
|
30
30
|
// 0. Pre-Flight System Health Check (Phase 4)
|
|
31
31
|
const tests = await this.cortex.tests.runAllProbes();
|
|
32
|
-
const failedTests = tests.filter(t => !t.success);
|
|
32
|
+
const failedTests = tests.filter((t) => !t.success);
|
|
33
33
|
if (failedTests.length > 0) {
|
|
34
|
-
console.warn(`[StrategicPlanner] Mutation cycle aborted. System health probes failed: ${failedTests.map(t => t.name).join(', ')}`);
|
|
34
|
+
console.warn(`[StrategicPlanner] Mutation cycle aborted. System health probes failed: ${failedTests.map((t) => t.name).join(', ')}`);
|
|
35
35
|
return [];
|
|
36
36
|
}
|
|
37
37
|
const personas = await this.typedDb
|
|
@@ -52,12 +52,20 @@ class StrategicPlanner {
|
|
|
52
52
|
const report = await this.analyzePersona(persona.id);
|
|
53
53
|
// 3. Blacklist Check (Local & Global Phase 5)
|
|
54
54
|
const lastMutation = persona.metadata?.last_failed_mutation;
|
|
55
|
-
const allPersonas = await this.typedDb
|
|
56
|
-
|
|
55
|
+
const allPersonas = await this.typedDb
|
|
56
|
+
.selectFrom(this.personasTable)
|
|
57
|
+
.selectAll()
|
|
58
|
+
.execute();
|
|
59
|
+
const isGloballyBlacklisted = allPersonas.some((p) => {
|
|
57
60
|
const mp = this.parsePersona(p);
|
|
58
|
-
return mp.metadata?.last_failed_mutation?.type === report.recommendation &&
|
|
61
|
+
return (mp.metadata?.last_failed_mutation?.type === report.recommendation &&
|
|
62
|
+
Date.now() - (mp.metadata?.last_failed_mutation?.timestamp || 0) <
|
|
63
|
+
3600000);
|
|
59
64
|
});
|
|
60
|
-
if (isGloballyBlacklisted ||
|
|
65
|
+
if (isGloballyBlacklisted ||
|
|
66
|
+
(lastMutation &&
|
|
67
|
+
report.recommendation === lastMutation.type &&
|
|
68
|
+
Date.now() - lastMutation.timestamp < 86400000)) {
|
|
61
69
|
console.log(`[StrategicPlanner] Skipping blacklisted mutation ${report.recommendation} for persona ${persona.id} (Global=${isGloballyBlacklisted})`);
|
|
62
70
|
continue;
|
|
63
71
|
}
|
|
@@ -76,22 +84,33 @@ class StrategicPlanner {
|
|
|
76
84
|
*/
|
|
77
85
|
async applyDirectMutation(persona, report, failures = []) {
|
|
78
86
|
return await this.db.transaction().execute(async (trx) => {
|
|
79
|
-
const reason = failures.length > 0
|
|
87
|
+
const reason = failures.length > 0
|
|
88
|
+
? `Failure Patterns: ${failures.join(', ')}`
|
|
89
|
+
: report.recommendation;
|
|
80
90
|
console.log(`[StrategicPlanner] Applying direct mutation to persona ${persona.id} (Reason: ${reason})`);
|
|
81
91
|
let updates = {};
|
|
82
92
|
let mutationType = 'role_update';
|
|
83
93
|
if (failures.length > 0) {
|
|
84
94
|
// Lesson-Driven Synthesis: Pull categories of lessons
|
|
85
95
|
const lessons = await this.cortex.reasoner.synthesizeLessons();
|
|
86
|
-
const relevantLessons = updates.role
|
|
87
|
-
|
|
96
|
+
const relevantLessons = updates.role
|
|
97
|
+
? []
|
|
98
|
+
: (lessons['general'] || []).slice(0, 2);
|
|
99
|
+
updates = {
|
|
100
|
+
role: `${persona.role || ''} (Optimized for: ${failures.join(', ')}. Patterns: ${relevantLessons.join('; ')})`.trim(),
|
|
101
|
+
};
|
|
88
102
|
}
|
|
89
103
|
else {
|
|
90
104
|
// Evolutionary Cross-Pollination (Phase 5)
|
|
91
|
-
const allPersonas = await
|
|
105
|
+
const allPersonas = await trx
|
|
106
|
+
.selectFrom(this.personasTable)
|
|
107
|
+
.selectAll()
|
|
108
|
+
.execute();
|
|
92
109
|
const winningMutations = allPersonas
|
|
93
|
-
.map(p => this.parsePersona(p))
|
|
94
|
-
.filter(p => (p.metadata?.evolution_status === 'stable' ||
|
|
110
|
+
.map((p) => this.parsePersona(p))
|
|
111
|
+
.filter((p) => (p.metadata?.evolution_status === 'stable' ||
|
|
112
|
+
!p.metadata?.evolution_status) &&
|
|
113
|
+
p.metadata?.mutation_reason?.includes(report.recommendation));
|
|
95
114
|
if (winningMutations.length > 0 && Math.random() > 0.5) {
|
|
96
115
|
console.log(`[StrategicPlanner] Cross-Pollinating success from Persona ${winningMutations[0].id}`);
|
|
97
116
|
updates = { role: winningMutations[0].role || persona.role };
|
|
@@ -99,10 +118,18 @@ class StrategicPlanner {
|
|
|
99
118
|
else {
|
|
100
119
|
switch (report.recommendation) {
|
|
101
120
|
case 'optimize_accuracy':
|
|
102
|
-
updates = {
|
|
121
|
+
updates = {
|
|
122
|
+
role: `${persona.role || ''} (Focus strictly on accuracy and detailed verification)`.trim(),
|
|
123
|
+
};
|
|
103
124
|
break;
|
|
104
125
|
case 'optimize_efficiency':
|
|
105
|
-
updates = {
|
|
126
|
+
updates = {
|
|
127
|
+
policies: [
|
|
128
|
+
...(persona.policies || []),
|
|
129
|
+
'timeout_reduction',
|
|
130
|
+
'concise_output',
|
|
131
|
+
],
|
|
132
|
+
};
|
|
106
133
|
mutationType = 'policy_update';
|
|
107
134
|
break;
|
|
108
135
|
case 'critical_intervention':
|
|
@@ -130,10 +157,10 @@ class StrategicPlanner {
|
|
|
130
157
|
previousState: {
|
|
131
158
|
role: persona.role,
|
|
132
159
|
policies: persona.policies,
|
|
133
|
-
capabilities: persona.capabilities
|
|
160
|
+
capabilities: persona.capabilities,
|
|
134
161
|
},
|
|
135
162
|
newState: { ...updates },
|
|
136
|
-
reason: `Auto-mutation triggered by ${report.recommendation}
|
|
163
|
+
reason: `Auto-mutation triggered by ${report.recommendation}`,
|
|
137
164
|
};
|
|
138
165
|
const history = [...(persona.metadata?.mutationHistory || []), mutation];
|
|
139
166
|
if (history.length > 5)
|
|
@@ -146,17 +173,21 @@ class StrategicPlanner {
|
|
|
146
173
|
verification_started_at: Date.now(),
|
|
147
174
|
verification_baseline: {
|
|
148
175
|
successRate: report.successRate,
|
|
149
|
-
averageLatency: report.averageLatency
|
|
150
|
-
}
|
|
176
|
+
averageLatency: report.averageLatency,
|
|
177
|
+
},
|
|
151
178
|
};
|
|
152
179
|
await trx
|
|
153
180
|
.updateTable(this.personasTable)
|
|
154
181
|
.set({
|
|
155
182
|
role: updates.role || persona.role,
|
|
156
|
-
policies: updates.policies
|
|
157
|
-
|
|
183
|
+
policies: updates.policies
|
|
184
|
+
? JSON.stringify(updates.policies)
|
|
185
|
+
: undefined,
|
|
186
|
+
capabilities: updates.capabilities
|
|
187
|
+
? JSON.stringify(updates.capabilities)
|
|
188
|
+
: undefined,
|
|
158
189
|
metadata: JSON.stringify(newMetadata),
|
|
159
|
-
updated_at: new Date()
|
|
190
|
+
updated_at: new Date(),
|
|
160
191
|
})
|
|
161
192
|
.where('id', '=', persona.id)
|
|
162
193
|
.execute();
|
|
@@ -171,15 +202,23 @@ class StrategicPlanner {
|
|
|
171
202
|
const report = await this.analyzePersona(persona.id);
|
|
172
203
|
// Adaptive Meta-Tuning: Increase window based on rollback history (Phase 4)
|
|
173
204
|
const rollbackHistory = persona.metadata?.rollbackHistory || [];
|
|
174
|
-
const recentRollbacks = rollbackHistory.filter(ts =>
|
|
205
|
+
const recentRollbacks = rollbackHistory.filter((ts) => Date.now() - ts < 604800000).length;
|
|
175
206
|
// Hive-Mind Verification Speedups (Phase 5)
|
|
176
|
-
const allPersonas = await this.typedDb
|
|
177
|
-
|
|
178
|
-
|
|
207
|
+
const allPersonas = await this.typedDb
|
|
208
|
+
.selectFrom(this.personasTable)
|
|
209
|
+
.selectAll()
|
|
210
|
+
.execute();
|
|
211
|
+
const hiveTrusted = allPersonas
|
|
212
|
+
.map((p) => this.parsePersona(p))
|
|
213
|
+
.filter((p) => p.metadata?.evolution_status === 'stable' &&
|
|
214
|
+
p.metadata?.mutation_reason === persona.metadata?.mutation_reason).length;
|
|
215
|
+
let sampleSizeThreshold = 10 + recentRollbacks * 10;
|
|
179
216
|
// Pass 5: Adaptive Verification Windows
|
|
180
217
|
// If a mutation is performing exceptionally well early on (Z-score check), accelerate stabilization.
|
|
181
218
|
const earlyStats = await this.analyzePersona(persona.id);
|
|
182
|
-
const earlyBaseline = persona.metadata?.verification_baseline || {
|
|
219
|
+
const earlyBaseline = persona.metadata?.verification_baseline || {
|
|
220
|
+
successRate: 0.8,
|
|
221
|
+
};
|
|
183
222
|
const earlyZ = (earlyStats.successRate - earlyBaseline.successRate) / 0.1; // Use nominal stdDev for early check
|
|
184
223
|
if (earlyZ > 3.0 && earlyStats.sampleSize >= 5) {
|
|
185
224
|
console.log(`[StrategicPlanner] High Performance Detected (Z=${earlyZ.toFixed(2)}). Accelerating stabilization threshold.`);
|
|
@@ -191,14 +230,18 @@ class StrategicPlanner {
|
|
|
191
230
|
}
|
|
192
231
|
if (report.sampleSize < sampleSizeThreshold)
|
|
193
232
|
return null;
|
|
194
|
-
const baseline = persona.metadata?.verification_baseline || {
|
|
233
|
+
const baseline = persona.metadata?.verification_baseline || {
|
|
234
|
+
successRate: 0.8,
|
|
235
|
+
averageLatency: 500,
|
|
236
|
+
};
|
|
195
237
|
// Dynamic Variance Calculation (Intelligence Refinement)
|
|
196
238
|
const recentMetrics = await this.cortex.metrics.getRecentMetrics(100);
|
|
197
239
|
const values = recentMetrics
|
|
198
|
-
.filter(m => m.metricName === 'success_rate')
|
|
199
|
-
.map(m => Number(m.metricValue));
|
|
240
|
+
.filter((m) => m.metricName === 'success_rate')
|
|
241
|
+
.map((m) => Number(m.metricValue));
|
|
200
242
|
const mean = values.reduce((a, b) => a + b, 0) / (values.length || 1);
|
|
201
|
-
const variance = values.reduce((a, b) => a + Math.pow(b - mean, 2), 0) /
|
|
243
|
+
const variance = values.reduce((a, b) => a + Math.pow(b - mean, 2), 0) /
|
|
244
|
+
(values.length || 1);
|
|
202
245
|
const stdDev = Math.sqrt(variance) || 0.1;
|
|
203
246
|
const zScore = (report.successRate - baseline.successRate) / (stdDev || 1);
|
|
204
247
|
console.log(`[StrategicPlanner] Verifying persona ${persona.id}: Success=${report.successRate.toFixed(2)} (Baseline=${baseline.successRate.toFixed(2)}, Ļ=${stdDev.toFixed(3)}, Z-Score=${zScore.toFixed(2)}, Threshold=${sampleSizeThreshold})`);
|
|
@@ -208,18 +251,26 @@ class StrategicPlanner {
|
|
|
208
251
|
return await this.rollbackPersona(persona.id);
|
|
209
252
|
}
|
|
210
253
|
// 2. Stabilization (Proven improvement or stability)
|
|
211
|
-
if (report.sampleSize >=
|
|
254
|
+
if (report.sampleSize >= sampleSizeThreshold * 2 && zScore >= -0.5) {
|
|
212
255
|
console.log(`[StrategicPlanner] Evolution for persona ${persona.id} STABILIZED.`);
|
|
213
256
|
// Cognitive Rule Distillation (Phase 4)
|
|
214
257
|
if (persona.metadata?.mutation_reason?.includes('optimize_efficiency')) {
|
|
215
258
|
await this.cortex.rules.defineRule('all', 'all', 'audit', {
|
|
216
259
|
condition: 'latency > 500',
|
|
217
260
|
priority: 10,
|
|
218
|
-
metadata: {
|
|
261
|
+
metadata: {
|
|
262
|
+
reason: `Distilled from successful persona ${persona.id} optimization`,
|
|
263
|
+
},
|
|
219
264
|
});
|
|
220
265
|
}
|
|
221
|
-
await this.db
|
|
222
|
-
.
|
|
266
|
+
await this.db
|
|
267
|
+
.updateTable(this.personasTable)
|
|
268
|
+
.set({
|
|
269
|
+
metadata: JSON.stringify({
|
|
270
|
+
...persona.metadata,
|
|
271
|
+
evolution_status: 'stable',
|
|
272
|
+
}),
|
|
273
|
+
})
|
|
223
274
|
.where('id', '=', persona.id)
|
|
224
275
|
.execute();
|
|
225
276
|
return `Evolution stabilized for persona ${persona.id}`;
|
|
@@ -241,7 +292,7 @@ class StrategicPlanner {
|
|
|
241
292
|
try {
|
|
242
293
|
const failureReport = await this.cortex.actions.getFailureReport();
|
|
243
294
|
// Only consider tools that failed more than once
|
|
244
|
-
const frequentFailures = failureReport.filter(f => f.failureCount > 1);
|
|
295
|
+
const frequentFailures = failureReport.filter((f) => f.failureCount > 1);
|
|
245
296
|
for (const fail of frequentFailures) {
|
|
246
297
|
patterns.push(`tool_failure_${fail.toolName}`);
|
|
247
298
|
}
|
|
@@ -261,7 +312,7 @@ class StrategicPlanner {
|
|
|
261
312
|
.selectAll()
|
|
262
313
|
.where((eb) => eb.or([
|
|
263
314
|
eb((0, sql_js_1.sql) `json_extract(metadata, '$.persona_id')`, '=', id),
|
|
264
|
-
eb((0, sql_js_1.sql) `metadata->>'persona_id'`, '=', String(id))
|
|
315
|
+
eb((0, sql_js_1.sql) `metadata->>'persona_id'`, '=', String(id)),
|
|
265
316
|
]))
|
|
266
317
|
.orderBy('created_at', 'desc')
|
|
267
318
|
.limit(50)
|
|
@@ -269,7 +320,9 @@ class StrategicPlanner {
|
|
|
269
320
|
// 1. Fetch Global Baseline for Dynamic Thresholds
|
|
270
321
|
const globalMetrics = await this.cortex.metrics.getRecentMetrics(200);
|
|
271
322
|
const calcStats = (metricName) => {
|
|
272
|
-
const vals = globalMetrics
|
|
323
|
+
const vals = globalMetrics
|
|
324
|
+
.filter((m) => m.metricName === metricName)
|
|
325
|
+
.map((m) => Number(m.metricValue));
|
|
273
326
|
if (vals.length < 10)
|
|
274
327
|
return { mean: metricName === 'query_latency' ? 500 : 0.9, stdDev: 0.1 };
|
|
275
328
|
const mean = vals.reduce((a, b) => a + b, 0) / vals.length;
|
|
@@ -284,25 +337,27 @@ class StrategicPlanner {
|
|
|
284
337
|
successRate: successStats.mean,
|
|
285
338
|
averageLatency: latencyStats.mean,
|
|
286
339
|
sampleSize: 0,
|
|
287
|
-
recommendation: 'maintain'
|
|
340
|
+
recommendation: 'maintain',
|
|
288
341
|
};
|
|
289
342
|
}
|
|
290
|
-
const successMetrics = recentMetrics.filter(m => m.metric_name === 'task_success_rate');
|
|
291
|
-
const latencyMetrics = recentMetrics.filter(m => m.metric_name === 'query_latency');
|
|
343
|
+
const successMetrics = recentMetrics.filter((m) => m.metric_name === 'task_success_rate');
|
|
344
|
+
const latencyMetrics = recentMetrics.filter((m) => m.metric_name === 'query_latency');
|
|
292
345
|
const avgSuccess = successMetrics.length > 0
|
|
293
|
-
? successMetrics.reduce((sum, m) => sum + Number(m.metric_value), 0) /
|
|
346
|
+
? successMetrics.reduce((sum, m) => sum + Number(m.metric_value), 0) /
|
|
347
|
+
successMetrics.length
|
|
294
348
|
: successStats.mean;
|
|
295
349
|
const avgLatency = latencyMetrics.length > 0
|
|
296
|
-
? latencyMetrics.reduce((sum, m) => sum + Number(m.metric_value), 0) /
|
|
350
|
+
? latencyMetrics.reduce((sum, m) => sum + Number(m.metric_value), 0) /
|
|
351
|
+
latencyMetrics.length
|
|
297
352
|
: latencyStats.mean;
|
|
298
353
|
let recommendation = 'maintain';
|
|
299
354
|
// 2. Map Dynamic Thresholds to Recommendations
|
|
300
355
|
// Critical: Worse than 2.5 standard deviations from mean
|
|
301
|
-
const criticalThreshold = successStats.mean -
|
|
356
|
+
const criticalThreshold = successStats.mean - 2.5 * successStats.stdDev;
|
|
302
357
|
// Optimize: Worse than 1.0 standard deviations from mean
|
|
303
|
-
const accuracyThreshold = successStats.mean -
|
|
358
|
+
const accuracyThreshold = successStats.mean - 1.0 * successStats.stdDev;
|
|
304
359
|
// Efficiency: Latency > 2 standard deviations above mean
|
|
305
|
-
const efficiencyThreshold = latencyStats.mean +
|
|
360
|
+
const efficiencyThreshold = latencyStats.mean + 2.0 * latencyStats.stdDev;
|
|
306
361
|
if (avgSuccess < criticalThreshold) {
|
|
307
362
|
recommendation = 'critical_intervention';
|
|
308
363
|
}
|
|
@@ -318,7 +373,7 @@ class StrategicPlanner {
|
|
|
318
373
|
successRate: avgSuccess,
|
|
319
374
|
averageLatency: avgLatency,
|
|
320
375
|
sampleSize: recentMetrics.length,
|
|
321
|
-
recommendation
|
|
376
|
+
recommendation,
|
|
322
377
|
};
|
|
323
378
|
}
|
|
324
379
|
/**
|
|
@@ -354,19 +409,23 @@ class StrategicPlanner {
|
|
|
354
409
|
rollbackHistory: rollbackHistory,
|
|
355
410
|
last_failed_mutation: {
|
|
356
411
|
type: lastMutation.type,
|
|
357
|
-
timestamp: Date.now()
|
|
412
|
+
timestamp: Date.now(),
|
|
358
413
|
},
|
|
359
414
|
evolution_status: 'stable',
|
|
360
|
-
lastRollback: Date.now()
|
|
415
|
+
lastRollback: Date.now(),
|
|
361
416
|
};
|
|
362
417
|
await trx
|
|
363
418
|
.updateTable(this.personasTable)
|
|
364
419
|
.set({
|
|
365
420
|
role: previous.role,
|
|
366
|
-
policies: previous.policies
|
|
367
|
-
|
|
421
|
+
policies: previous.policies
|
|
422
|
+
? JSON.stringify(previous.policies)
|
|
423
|
+
: undefined,
|
|
424
|
+
capabilities: previous.capabilities
|
|
425
|
+
? JSON.stringify(previous.capabilities)
|
|
426
|
+
: undefined,
|
|
368
427
|
metadata: JSON.stringify(newMetadata),
|
|
369
|
-
updated_at: new Date()
|
|
428
|
+
updated_at: new Date(),
|
|
370
429
|
})
|
|
371
430
|
.where('id', '=', id)
|
|
372
431
|
.execute();
|
|
@@ -378,11 +437,17 @@ class StrategicPlanner {
|
|
|
378
437
|
id: p.id,
|
|
379
438
|
name: p.name,
|
|
380
439
|
role: p.role,
|
|
381
|
-
capabilities: typeof p.capabilities === 'string'
|
|
382
|
-
|
|
383
|
-
|
|
440
|
+
capabilities: typeof p.capabilities === 'string'
|
|
441
|
+
? JSON.parse(p.capabilities)
|
|
442
|
+
: p.capabilities || [],
|
|
443
|
+
policies: typeof p.policies === 'string'
|
|
444
|
+
? JSON.parse(p.policies)
|
|
445
|
+
: p.policies || [],
|
|
446
|
+
metadata: typeof p.metadata === 'string'
|
|
447
|
+
? JSON.parse(p.metadata)
|
|
448
|
+
: p.metadata || {},
|
|
384
449
|
createdAt: new Date(p.created_at),
|
|
385
|
-
updatedAt: new Date(p.updated_at)
|
|
450
|
+
updatedAt: new Date(p.updated_at),
|
|
386
451
|
};
|
|
387
452
|
}
|
|
388
453
|
}
|
|
@@ -13,7 +13,8 @@ class CognitiveSynthesizer {
|
|
|
13
13
|
constructor(db, config = {}) {
|
|
14
14
|
this.db = db;
|
|
15
15
|
this.config = config;
|
|
16
|
-
this.evolutionTable =
|
|
16
|
+
this.evolutionTable =
|
|
17
|
+
config.sessionEvolutionTable || 'agent_session_evolution';
|
|
17
18
|
}
|
|
18
19
|
/**
|
|
19
20
|
* Infer goals and update session evolution with production-grade persistence.
|
|
@@ -33,12 +34,13 @@ class CognitiveSynthesizer {
|
|
|
33
34
|
if (existing) {
|
|
34
35
|
const currentPath = this.parsePath(existing.evolution_path);
|
|
35
36
|
// Only append to path if goal or strategy shifted significantly
|
|
36
|
-
if (existing.inferred_goal !== goalInferred ||
|
|
37
|
+
if (existing.inferred_goal !== goalInferred ||
|
|
38
|
+
existing.strategy !== strategy) {
|
|
37
39
|
currentPath.push({
|
|
38
40
|
timestamp: new Date().toISOString(),
|
|
39
41
|
previousGoal: existing.inferred_goal,
|
|
40
42
|
newGoal: goalInferred,
|
|
41
|
-
strategyShift: strategy
|
|
43
|
+
strategyShift: strategy,
|
|
42
44
|
});
|
|
43
45
|
}
|
|
44
46
|
await trx
|
|
@@ -49,7 +51,7 @@ class CognitiveSynthesizer {
|
|
|
49
51
|
evolution_path: JSON.stringify(currentPath),
|
|
50
52
|
status: 'active',
|
|
51
53
|
autonomy_level: this.calculateAutonomy(currentPath.length, existing.autonomy_level || 1),
|
|
52
|
-
updated_at: new Date()
|
|
54
|
+
updated_at: new Date(),
|
|
53
55
|
})
|
|
54
56
|
.where('session_id', '=', sessionId)
|
|
55
57
|
.execute();
|
|
@@ -61,14 +63,16 @@ class CognitiveSynthesizer {
|
|
|
61
63
|
session_id: sessionId,
|
|
62
64
|
inferred_goal: goalInferred,
|
|
63
65
|
strategy,
|
|
64
|
-
evolution_path: JSON.stringify([
|
|
66
|
+
evolution_path: JSON.stringify([
|
|
67
|
+
{
|
|
65
68
|
timestamp: new Date().toISOString(),
|
|
66
69
|
event: 'session_start',
|
|
67
|
-
initialGoal: goalInferred
|
|
68
|
-
}
|
|
70
|
+
initialGoal: goalInferred,
|
|
71
|
+
},
|
|
72
|
+
]),
|
|
69
73
|
status: 'active',
|
|
70
74
|
autonomy_level: 1,
|
|
71
|
-
updated_at: new Date()
|
|
75
|
+
updated_at: new Date(),
|
|
72
76
|
})
|
|
73
77
|
.execute();
|
|
74
78
|
}
|
|
@@ -97,7 +101,9 @@ class CognitiveSynthesizer {
|
|
|
97
101
|
timestamp: new Date().toISOString(),
|
|
98
102
|
type: 'shift',
|
|
99
103
|
shift: shiftType,
|
|
100
|
-
reason: shiftType === 'abandonment'
|
|
104
|
+
reason: shiftType === 'abandonment'
|
|
105
|
+
? 'User manual termination or lack of progress'
|
|
106
|
+
: 'Strategic goal shift',
|
|
101
107
|
});
|
|
102
108
|
await trx
|
|
103
109
|
.updateTable(this.evolutionTable)
|
|
@@ -105,7 +111,7 @@ class CognitiveSynthesizer {
|
|
|
105
111
|
status: shiftType === 'pivot' ? 'pivoted' : 'abandoned',
|
|
106
112
|
strategy: shiftType === 'pivot' ? 'Strategic Pivot' : 'Terminated',
|
|
107
113
|
evolution_path: JSON.stringify(currentPath),
|
|
108
|
-
updated_at: new Date()
|
|
114
|
+
updated_at: new Date(),
|
|
109
115
|
})
|
|
110
116
|
.where('session_id', '=', sessionId)
|
|
111
117
|
.execute();
|
|
@@ -121,7 +127,15 @@ class CognitiveSynthesizer {
|
|
|
121
127
|
if (clean.length < 100)
|
|
122
128
|
return clean;
|
|
123
129
|
// Simple heuristic: look for "need", "want", "please", "can you"
|
|
124
|
-
const keywords = [
|
|
130
|
+
const keywords = [
|
|
131
|
+
'need',
|
|
132
|
+
'want',
|
|
133
|
+
'please',
|
|
134
|
+
'can you',
|
|
135
|
+
'implement',
|
|
136
|
+
'fix',
|
|
137
|
+
'add',
|
|
138
|
+
];
|
|
125
139
|
for (const kw of keywords) {
|
|
126
140
|
const index = clean.toLowerCase().indexOf(kw);
|
|
127
141
|
if (index !== -1) {
|
|
@@ -141,7 +155,7 @@ class CognitiveSynthesizer {
|
|
|
141
155
|
return 'Adaptive Exploration';
|
|
142
156
|
}
|
|
143
157
|
calculateAutonomy(pivots, currentLevel) {
|
|
144
|
-
// Logic: frequent pivots without completion decrease autonomy.
|
|
158
|
+
// Logic: frequent pivots without completion decrease autonomy.
|
|
145
159
|
// Consistent execution increases it.
|
|
146
160
|
if (pivots > 5)
|
|
147
161
|
return Math.min(4, currentLevel + 1);
|
|
@@ -8,7 +8,8 @@ class EventHarvester {
|
|
|
8
8
|
constructor(db, config = {}) {
|
|
9
9
|
this.db = db;
|
|
10
10
|
this.config = config;
|
|
11
|
-
this.telemetryTable =
|
|
11
|
+
this.telemetryTable =
|
|
12
|
+
config.telemetryEventsTable || 'agent_telemetry_events';
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
14
15
|
* Persist a raw telemetry event
|
|
@@ -22,7 +23,7 @@ class EventHarvester {
|
|
|
22
23
|
type,
|
|
23
24
|
content,
|
|
24
25
|
metadata: metadata ? JSON.stringify(metadata) : null,
|
|
25
|
-
created_at: new Date()
|
|
26
|
+
created_at: new Date(),
|
|
26
27
|
})
|
|
27
28
|
.execute();
|
|
28
29
|
}
|
|
@@ -22,7 +22,7 @@ class ResearchAlchemist {
|
|
|
22
22
|
metric_name: metricName,
|
|
23
23
|
value: value,
|
|
24
24
|
metadata: metadata ? JSON.stringify(metadata) : null,
|
|
25
|
-
created_at: new Date()
|
|
25
|
+
created_at: new Date(),
|
|
26
26
|
})
|
|
27
27
|
.execute();
|
|
28
28
|
}
|
|
@@ -42,7 +42,10 @@ class ResearchAlchemist {
|
|
|
42
42
|
.where('metadata', 'like', `%${taskType}%`)
|
|
43
43
|
.executeTakeFirst();
|
|
44
44
|
const discoveryValue = existing ? 0.1 : 1.0; // 1.0 for first-time discovery, 0.1 for repeat
|
|
45
|
-
await this.transmute(sessionId, 'discovery_index', discoveryValue, {
|
|
45
|
+
await this.transmute(sessionId, 'discovery_index', discoveryValue, {
|
|
46
|
+
taskType,
|
|
47
|
+
firstDiscovery: !existing,
|
|
48
|
+
});
|
|
46
49
|
}
|
|
47
50
|
/**
|
|
48
51
|
* Record a "Magic" moment
|
|
@@ -40,7 +40,7 @@ class CacheManager {
|
|
|
40
40
|
const item = {
|
|
41
41
|
value,
|
|
42
42
|
timestamp: Date.now(),
|
|
43
|
-
ttl: ttl || this.config.ttl || 300000 // 5 minutes default
|
|
43
|
+
ttl: ttl || this.config.ttl || 300000, // 5 minutes default
|
|
44
44
|
};
|
|
45
45
|
// Refresh LRU position if exists
|
|
46
46
|
if (this.cache.has(key)) {
|
|
@@ -76,7 +76,7 @@ class CacheManager {
|
|
|
76
76
|
size: this.cache.size,
|
|
77
77
|
hits: this.hits,
|
|
78
78
|
misses: this.misses,
|
|
79
|
-
hitRate: total > 0 ? this.hits / total : 0
|
|
79
|
+
hitRate: total > 0 ? this.hits / total : 0,
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
82
|
/**
|
|
@@ -159,13 +159,16 @@ class CacheManager {
|
|
|
159
159
|
* Get all cache values
|
|
160
160
|
*/
|
|
161
161
|
values() {
|
|
162
|
-
return Array.from(this.cache.values()).map(item => item.value);
|
|
162
|
+
return Array.from(this.cache.values()).map((item) => item.value);
|
|
163
163
|
}
|
|
164
164
|
/**
|
|
165
165
|
* Get all cache entries
|
|
166
166
|
*/
|
|
167
167
|
entries() {
|
|
168
|
-
return Array.from(this.cache.entries()).map(([key, item]) => [
|
|
168
|
+
return Array.from(this.cache.entries()).map(([key, item]) => [
|
|
169
|
+
key,
|
|
170
|
+
item.value,
|
|
171
|
+
]);
|
|
169
172
|
}
|
|
170
173
|
}
|
|
171
174
|
exports.CacheManager = CacheManager;
|
|
@@ -18,11 +18,11 @@ async function analyze(options) {
|
|
|
18
18
|
host: 'localhost',
|
|
19
19
|
port: 0,
|
|
20
20
|
username: '',
|
|
21
|
-
password: ''
|
|
21
|
+
password: '',
|
|
22
22
|
},
|
|
23
23
|
performance: {
|
|
24
|
-
enableQueryOptimization: true
|
|
25
|
-
}
|
|
24
|
+
enableQueryOptimization: true,
|
|
25
|
+
},
|
|
26
26
|
});
|
|
27
27
|
await db.initialize();
|
|
28
28
|
console.log(chalk_1.default.gray(`š Database: ${databasePath}\n`));
|
|
@@ -111,7 +111,8 @@ async function analyze(options) {
|
|
|
111
111
|
console.log(chalk_1.default.gray(` Average query time: ${sqliteMetrics.averageQueryTime.toFixed(2)}ms`));
|
|
112
112
|
console.log(chalk_1.default.gray(` Total queries executed: ${sqliteMetrics.totalQueries}`));
|
|
113
113
|
console.log(chalk_1.default.gray(` Slow queries (>1000ms): ${sqliteMetrics.slowQueries}`));
|
|
114
|
-
if (metrics.warningCount &&
|
|
114
|
+
if (metrics.warningCount &&
|
|
115
|
+
Object.keys(metrics.warningCount).length > 0) {
|
|
115
116
|
console.log(chalk_1.default.yellow('\nā ļø Warnings:'));
|
|
116
117
|
Object.entries(metrics.warningCount).forEach(([type, count]) => {
|
|
117
118
|
console.log(chalk_1.default.gray(` ${type}: ${count}`));
|