pikakit 1.0.49 → 1.0.51

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.
@@ -72,14 +72,17 @@ function findDashboardScript() {
72
72
  const moduleDir = path.dirname(new URL(import.meta.url).pathname.replace(/^\/([A-Z]:)/i, '$1'));
73
73
  const cliRoot = path.resolve(moduleDir, '..', '..');
74
74
  const homeDir = process.env.USERPROFILE || process.env.HOME || '';
75
+ const projectRoot = process.cwd();
75
76
 
76
77
  const possiblePaths = [
78
+ // PRIORITY 0: npm package in node_modules (HIGHEST - always has latest published code)
79
+ path.join(projectRoot, "node_modules", "pikakit", "lib", "agent-cli", "scripts", "dashboard-server.js"),
77
80
  // PRIORITY 1: New v7.0 script bundled with CLI package
78
81
  path.join(cliRoot, "scripts", "dashboard-server.js"),
79
82
  // PRIORITY 2: Dashboard folder (legacy)
80
83
  path.join(cliRoot, "dashboard", "dashboard-server.js"),
81
84
  // PRIORITY 3: Current project paths
82
- path.join(process.cwd(), ".agent", "skills", "auto-learner", "scripts", "dashboard-server.js"),
85
+ path.join(projectRoot, ".agent", "skills", "auto-learner", "scripts", "dashboard-server.js"),
83
86
  // PRIORITY 4: Fallback - agent-skill-kit
84
87
  path.join(homeDir, "Desktop", "agent-skill-kit", ".agent", "skills", "auto-learner", "scripts", "dashboard-server.js"),
85
88
  ];
@@ -40,7 +40,31 @@ function findProjectRoot() {
40
40
  }
41
41
 
42
42
  const projectRoot = findProjectRoot();
43
- const dashboardPath = path.join(__dirname, '..', 'dashboard');
43
+
44
+ // Find dashboard folder from multiple possible locations
45
+ function findDashboardPath() {
46
+ const possiblePaths = [
47
+ // 1. npm package in node_modules (most reliable after npm install)
48
+ path.join(projectRoot, 'node_modules', 'pikakit', 'lib', 'agent-cli', 'dashboard'),
49
+ // 2. Local symlink or copy in project
50
+ path.join(projectRoot, 'lib', 'agent-cli', 'dashboard'),
51
+ // 3. Relative to this script (original behavior for development)
52
+ path.join(__dirname, '..', 'dashboard')
53
+ ];
54
+
55
+ for (const p of possiblePaths) {
56
+ if (fs.existsSync(path.join(p, 'index.html'))) {
57
+ console.log(`[Dashboard] Using dashboard from: ${p}`);
58
+ return p;
59
+ }
60
+ }
61
+
62
+ // Fallback to original path
63
+ console.log(`[Dashboard] Fallback to __dirname path`);
64
+ return path.join(__dirname, '..', 'dashboard');
65
+ }
66
+
67
+ const dashboardPath = findDashboardPath();
44
68
  const knowledgeDir = path.join(projectRoot, '.agent', 'knowledge');
45
69
 
46
70
  // Read lessons count - prioritize v6 format
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pikakit",
3
- "version": "1.0.49",
3
+ "version": "1.0.51",
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>",