pikakit 1.0.30 → 1.0.31

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.
@@ -9,7 +9,7 @@
9
9
  */
10
10
 
11
11
  import { getKPIs, getMetricValue, getMetricHistory } from './metrics-collector.js';
12
- import { loadCausalPatterns } from './causality-engine.js';
12
+ import { loadKnowledge } from './knowledge.js';
13
13
 
14
14
  // ============================================================================
15
15
  // DASHBOARD DATA AGGREGATION
@@ -22,7 +22,8 @@ import { loadCausalPatterns } from './causality-engine.js';
22
22
  export function getFullDashboardData() {
23
23
  try {
24
24
  const kpis = getKPIs();
25
- const patterns = loadCausalPatterns();
25
+ const knowledge = loadKnowledge();
26
+ const lessons = knowledge.lessons || [];
26
27
 
27
28
  return {
28
29
  version: '7.0.0',
@@ -30,11 +31,12 @@ export function getFullDashboardData() {
30
31
  kpis,
31
32
  summary: {
32
33
  totalTasks: getMetricValue('total_tasks') || 0,
33
- patternsLearned: patterns.length,
34
+ patternsLearned: lessons.length,
35
+ lessonsCount: lessons.length,
34
36
  skillsGenerated: 0,
35
37
  abTestsActive: 0
36
38
  },
37
- patterns: patterns.slice(0, 10)
39
+ lessons: lessons.slice(0, 10)
38
40
  };
39
41
  } catch (e) {
40
42
  return {
@@ -51,16 +53,17 @@ export function getFullDashboardData() {
51
53
  * @returns {Object} - Pattern stats
52
54
  */
53
55
  export function getPatternStats() {
54
- const patterns = loadCausalPatterns();
56
+ const knowledge = loadKnowledge();
57
+ const lessons = knowledge.lessons || [];
55
58
  return {
56
- total: patterns.length,
57
- byCategory: patterns.reduce((acc, p) => {
58
- const cat = p.category || 'other';
59
+ total: lessons.length,
60
+ byCategory: lessons.reduce((acc, p) => {
61
+ const cat = p.tags?.[0] || 'other';
59
62
  acc[cat] = (acc[cat] || 0) + 1;
60
63
  return acc;
61
64
  }, {}),
62
- avgConfidence: patterns.length > 0
63
- ? patterns.reduce((sum, p) => sum + (p.confidence || 0), 0) / patterns.length
65
+ avgConfidence: lessons.length > 0
66
+ ? lessons.reduce((sum, p) => sum + (p.confidence || 0), 0) / lessons.length
64
67
  : 0
65
68
  };
66
69
  }
@@ -139,10 +142,11 @@ export function getGaugeWidgets() {
139
142
  * @returns {Array} - Counter data
140
143
  */
141
144
  export function getCounterWidgets() {
142
- const patterns = loadCausalPatterns();
145
+ const knowledge = loadKnowledge();
146
+ const lessons = knowledge.lessons || [];
143
147
  return [
144
148
  { id: 'tasks', label: 'Total Tasks', value: getMetricValue('total_tasks') || 0 },
145
- { id: 'patterns', label: 'Patterns', value: patterns.length },
149
+ { id: 'patterns', label: 'Patterns', value: lessons.length },
146
150
  { id: 'skills', label: 'Skills', value: 0 },
147
151
  { id: 'tests', label: 'A/B Tests', value: 0 }
148
152
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pikakit",
3
- "version": "1.0.30",
3
+ "version": "1.0.31",
4
4
  "description": "Enterprise-grade Agent Skill Manager with Antigravity Skills support, Progressive Disclosure detection, and semantic routing validation",
5
5
  "license": "MIT",
6
6
  "author": "pikakit <pikakit@gmail.com>",