pikakit 1.0.15 → 1.0.17

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.
@@ -833,7 +833,7 @@ export async function run(spec) {
833
833
  title: c.cyan("⚡ Get Started"),
834
834
  titleAlignment: "left"
835
835
  }
836
- ).split("\\n").map(l => `${c.gray(S.branch)} ${l}`).join("\\n"));
836
+ ).split("\n").map(l => `${c.gray(S.branch)} ${l}`).join("\n"));
837
837
 
838
838
  stepLine();
839
839
  console.log(` ${c.cyan("Done!")}`);
@@ -40,6 +40,28 @@ function findProjectRoot() {
40
40
 
41
41
  const projectRoot = findProjectRoot();
42
42
  const dashboardPath = path.join(__dirname, '..', 'dashboard');
43
+ const knowledgeDir = path.join(projectRoot, '.agent', 'knowledge');
44
+
45
+ // Read lessons count from YAML files (same source as CLI)
46
+ function getLessonsCount() {
47
+ let count = 0;
48
+ const files = ['lessons-learned.yaml', 'mistakes.yaml', 'improvements.yaml'];
49
+
50
+ for (const file of files) {
51
+ const filePath = path.join(knowledgeDir, file);
52
+ if (fs.existsSync(filePath)) {
53
+ try {
54
+ const content = fs.readFileSync(filePath, 'utf-8');
55
+ // Simple YAML parsing - count items in lessons/mistakes/improvements arrays
56
+ const matches = content.match(/^\s*-\s+id:/gm);
57
+ if (matches) count += matches.length;
58
+ } catch (e) {
59
+ // Ignore read errors
60
+ }
61
+ }
62
+ }
63
+ return count;
64
+ }
43
65
 
44
66
  // ============================================================================
45
67
  // DATA PROVIDERS
@@ -84,11 +106,11 @@ const api = {
84
106
  const kpis = hasRealData ? realKpis.kpis : {};
85
107
 
86
108
  const totalTasks = metricsCollector?.getMetricValue?.('total_tasks') || 0;
87
- const patternsLearned = causalityEngine?.getPatternCount?.() || 0;
109
+ const patternsLearned = getLessonsCount(); // Read directly from YAML files
88
110
  const skillsGenerated = skillGenerator?.getSkillCount?.() || 0;
89
111
 
90
- // Determine if this is a new user (no data yet)
91
- const isNewUser = totalTasks === 0 && patternsLearned === 0;
112
+ // Determine if this is a new user (no lessons yet)
113
+ const isNewUser = patternsLearned === 0;
92
114
 
93
115
  const summary = {
94
116
  totalTasks,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pikakit",
3
- "version": "1.0.15",
3
+ "version": "1.0.17",
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>",