pikakit 3.9.65 → 3.9.66

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/bin/cli.mjs CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
  /**
3
3
  * PikaKit CLI - Main Entry Point
4
4
  * Routes to install wizard or kit commands
@@ -280,6 +280,39 @@ export async function run(spec) {
280
280
  selectedSkills = [...new Set([...selectedSkills, ...requiredInRepo])];
281
281
  }
282
282
 
283
+ // --- PikaKit Engine Extension (prompt) ---
284
+ const __cliDir = path.resolve(new URL('.', import.meta.url).pathname.replace(/^\/([A-Z]:)/, '$1'), '..', '..', '..');
285
+ const vsixDir = path.join(__cliDir, "packages", "pikakit-extension");
286
+ let wantExtension = false;
287
+ let detectedIDEs = [];
288
+
289
+ if (fs.existsSync(vsixDir)) {
290
+ const vsCodeBasedIDEs = [
291
+ { name: "VS Code", cli: "code" },
292
+ { name: "Cursor", cli: "cursor" },
293
+ { name: "Windsurf", cli: "windsurf" },
294
+ { name: "Antigravity", cli: "antigravity" }
295
+ ];
296
+
297
+ for (const ide of vsCodeBasedIDEs) {
298
+ try {
299
+ await execAsync(`${ide.cli} --version`, { timeout: 5000 });
300
+ detectedIDEs.push(ide);
301
+ } catch { /* not installed */ }
302
+ }
303
+
304
+ if (detectedIDEs.length > 0) {
305
+ const installExt = await confirm({
306
+ message: `Install PikaKit Engine extension? ${c.dim(`(${detectedIDEs.map(i => i.name).join(", ")})`)}`,
307
+ initialValue: true
308
+ });
309
+
310
+ if (!isCancel(installExt) && installExt) {
311
+ wantExtension = true;
312
+ }
313
+ }
314
+ }
315
+
283
316
  // Check for required skills and show info
284
317
  const CORE_REQUIRED = ["skill-generator"];
285
318
  const installedRequired = selectedSkills.filter(s => CORE_REQUIRED.includes(s));
@@ -514,11 +547,13 @@ export async function run(spec) {
514
547
  sharedInstalled = true;
515
548
  }
516
549
 
517
- // Install VS Code Extension (silent)
518
- const vsixDir = path.join(tmp, "packages", "pikakit-extension");
550
+ // Install PikaKit Engine Extension (if user chose yes earlier)
519
551
  let extensionInstalled = false;
520
552
 
521
- if (fs.existsSync(vsixDir)) {
553
+ if (wantExtension && detectedIDEs.length > 0) {
554
+ const extSpinner = spinner();
555
+ extSpinner.start("Installing PikaKit Engine extension...");
556
+
522
557
  try {
523
558
  let vsixPath = null;
524
559
  const files = fs.readdirSync(vsixDir);
@@ -534,21 +569,26 @@ export async function run(spec) {
534
569
  }
535
570
 
536
571
  if (vsixPath && fs.existsSync(vsixPath)) {
537
- const vsCodeBasedIDEs = [
538
- { name: "VS Code", cli: "code" },
539
- { name: "Cursor", cli: "cursor" },
540
- { name: "Windsurf", cli: "windsurf" },
541
- { name: "Antigravity", cli: "antigravity" }
542
- ];
543
-
544
- for (const ide of vsCodeBasedIDEs) {
572
+ const installed = [];
573
+ for (const ide of detectedIDEs) {
545
574
  try {
546
575
  await execAsync(`${ide.cli} --install-extension "${vsixPath}"`, { timeout: 30000 });
547
- extensionInstalled = true;
548
- } catch { /* ignore */ }
576
+ installed.push(ide.name);
577
+ } catch { /* skip this IDE */ }
578
+ }
579
+
580
+ if (installed.length > 0) {
581
+ extSpinner.stop(`PikaKit Engine installed → ${installed.join(", ")}`);
582
+ extensionInstalled = true;
583
+ } else {
584
+ extSpinner.stop(c.yellow("Extension build succeeded but installation failed"));
549
585
  }
586
+ } else {
587
+ extSpinner.stop(c.yellow("Extension build failed — skipping"));
550
588
  }
551
- } catch { /* ignore */ }
589
+ } catch {
590
+ extSpinner.stop(c.yellow("Extension build failed — skipping"));
591
+ }
552
592
  }
553
593
 
554
594
  // Final Success Box (compact) - THE ONLY OUTPUT
@@ -612,13 +652,13 @@ export async function run(spec) {
612
652
  } catch (e) { /* ignore */ }
613
653
 
614
654
  // Final success message (single clean box)
615
- console.log();
655
+ stepLine();
616
656
  console.log(boxen(
617
657
  `${c.green("✓")} ${c.bold("Installation Complete!")}\n\n` +
618
658
  `${c.cyan("Next Steps:")}\n` +
619
- ` ${c.dim("1.")} Run ${c.cyan("kit")} to access CLI tools\n` +
659
+ ` ${c.dim("1.")} Run ${c.cyan("npx kit")} to access CLI tools\n` +
620
660
  ` ${c.dim("2.")} Use ${c.cyan("/autopilot")} in your AI agent\n` +
621
- ` ${c.dim("3.")} Explore skills with ${c.cyan("kit list")}`,
661
+ ` ${c.dim("3.")} Explore skills with ${c.cyan("npx kit list")}`,
622
662
  {
623
663
  padding: 1,
624
664
  borderColor: "cyan",
@@ -626,6 +666,6 @@ export async function run(spec) {
626
666
  title: c.cyan(`⚡ PikaKit v${pkg.version}`),
627
667
  titleAlignment: "center"
628
668
  }
629
- ));
669
+ ).split("\n").map(l => `${c.gray(S.branch)} ${l}`).join("\n"));
630
670
  console.log();
631
671
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pikakit",
3
- "version": "3.9.65",
3
+ "version": "3.9.66",
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>",
@@ -19,6 +19,7 @@
19
19
  },
20
20
  "files": [
21
21
  "bin/",
22
+ "packages/pikakit-extension/pikakit.vsix",
22
23
  "README.md"
23
24
  ],
24
25
  "engines": {
@@ -72,4 +73,4 @@
72
73
  "prettier": "^3.2.5",
73
74
  "vitest": "^4.0.18"
74
75
  }
75
- }
76
+ }
@@ -0,0 +1,105 @@
1
+ # PikaKit Engine - VS Code Extension
2
+
3
+ > 🤖 Real-time auto-learning from IDE diagnostics → Generate skills automatically
4
+
5
+ ## Features
6
+
7
+ - **Real-time Diagnostics** - Listen to TypeScript, ESLint errors in real-time
8
+ - **Pattern Detection** - Auto-detect patterns from repeated errors
9
+ - **Auto-Save Lessons** - Save to `.agent/lessons.json`
10
+ - **Skill Generation** - Generate SKILL.md when threshold is reached (≥3 times)
11
+ - **Auto-Accept** - Automatically accept Antigravity agent steps (edits, saves, terminal)
12
+ - **Auto-Run** - Automatically run proposed terminal commands
13
+ - **Status Bar** - Display learning status + Auto-Accept/Auto-Run toggles
14
+
15
+ ## Keyboard Shortcuts
16
+
17
+ | Shortcut | Action | Description |
18
+ |----------|--------|-------------|
19
+ | `Ctrl+Shift+Enter` | Toggle Auto-Accept | Auto-accept code edits, file saves, terminal commands |
20
+ | `Alt+Enter` | Toggle Auto-Run | Auto-run proposed terminal commands |
21
+
22
+ > On macOS: `Cmd+Shift+Enter` and `Alt+Enter`
23
+
24
+ ## Installation
25
+
26
+ ### Via PikaKit CLI (recommended)
27
+
28
+ ```bash
29
+ npx pikakit
30
+ ```
31
+
32
+ The extension is installed automatically during skill installation.
33
+
34
+ ### Install from VSIX
35
+
36
+ ```bash
37
+ cd packages/pikakit-extension
38
+ npm install && npm run compile
39
+ npx @vscode/vsce package --allow-missing-repository
40
+ code --install-extension pikakit-engine-1.1.0.vsix
41
+ ```
42
+
43
+ ### Local Development
44
+
45
+ ```bash
46
+ cd packages/pikakit-extension
47
+ npm install && npm run compile
48
+ ```
49
+
50
+ Press F5 → "Extension Development Host" → Extension runs in new window.
51
+
52
+ ## Commands
53
+
54
+ Press `Ctrl+Shift+P` → type "PikaKit":
55
+
56
+ | Command | Description |
57
+ |---------|-------------|
58
+ | `PikaKit: Start Learning` | Start listening to diagnostics |
59
+ | `PikaKit: Stop Learning` | Stop learning |
60
+ | `PikaKit: Generate Skill` | Manually generate from patterns |
61
+ | `PikaKit: View Lessons` | View all learned lessons |
62
+ | `PikaKit: Clear Lessons` | Clear all lessons |
63
+ | `PikaKit: Toggle Auto-Accept` | Toggle auto-accept (Ctrl+Shift+Enter) |
64
+ | `PikaKit: Toggle Auto-Run` | Toggle auto-run (Alt+Enter) |
65
+
66
+ ## Configuration
67
+
68
+ | Setting | Default | Description |
69
+ |---------|---------|-------------|
70
+ | `pikakit.autoStart` | `true` | Auto-start learning on VS Code startup |
71
+ | `pikakit.threshold` | `3` | Error count before generating a skill |
72
+ | `pikakit.lessonsPath` | `.agent/lessons.json` | Path to lessons storage |
73
+ | `pikakit.autoAcceptEnabled` | `false` | Enable Auto-Accept on startup |
74
+ | `pikakit.autoRunEnabled` | `false` | Enable Auto-Run on startup |
75
+
76
+ ## How It Works
77
+
78
+ ```
79
+ 1. TypeScript/ESLint error detected
80
+ 2. Extension analyzes the error
81
+ 3. Pattern saved to lessons.json
82
+ 4. When pattern repeats ≥3 times
83
+ 5. Auto-offer to generate skill
84
+ 6. New skill created in .agent/skills/
85
+ ```
86
+
87
+ ## Status Bar
88
+
89
+ | Icon | State | Action |
90
+ |------|-------|--------|
91
+ | `$(check) Auto-Accept` | ON | Click or Ctrl+Shift+Enter to toggle |
92
+ | `$(circle-slash) Auto-Accept` | OFF | Click or Ctrl+Shift+Enter to toggle |
93
+ | `$(play) Auto-Run` | ON | Click or Alt+Enter to toggle |
94
+ | `$(debug-pause) Auto-Run` | OFF | Click or Alt+Enter to toggle |
95
+
96
+ ## Supported Error Types
97
+
98
+ - TypeScript: Cannot find name, Property does not exist, Type mismatch
99
+ - ESLint: Unused variables, Missing semicolons
100
+ - React: Invalid hook calls, Missing dependencies
101
+ - General: Import errors, Module not found
102
+
103
+ ---
104
+
105
+ ⚡ PikaKit Engine v1.1.0