pikakit 3.9.26 → 3.9.27
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/lib/commands/install.js +128 -45
- package/package.json +77 -77
|
@@ -12,7 +12,7 @@ import boxen from "boxen";
|
|
|
12
12
|
import { parseSkillSpec, merkleHash } from "../helpers.js";
|
|
13
13
|
import { parseSkillMdFrontmatter } from "../skills.js";
|
|
14
14
|
import { step, activeStep, stepLine, S, c, fatal, spinner, multiselect, select, confirm, isCancel, cancel } from "../ui.js";
|
|
15
|
-
import { WORKSPACE, GLOBAL_DIR, OFFLINE, GLOBAL, FORCE
|
|
15
|
+
import { WORKSPACE, GLOBAL_DIR, OFFLINE, GLOBAL, FORCE } from "../config.js";
|
|
16
16
|
import { installSkill } from "../installer.js";
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -292,6 +292,7 @@ export async function run(spec) {
|
|
|
292
292
|
const { selectAgentsPrompt, selectScopePrompt, selectMethodPrompt } = await import("../ui.js");
|
|
293
293
|
|
|
294
294
|
stepLine();
|
|
295
|
+
activeStep(`${detectedAgents.length} agents found — Select target`);
|
|
295
296
|
const selectedAgents = await selectAgentsPrompt(detectedAgents);
|
|
296
297
|
|
|
297
298
|
if (!selectedAgents || selectedAgents.length === 0) {
|
|
@@ -304,6 +305,7 @@ export async function run(spec) {
|
|
|
304
305
|
|
|
305
306
|
if (!GLOBAL) {
|
|
306
307
|
stepLine();
|
|
308
|
+
activeStep("Installation scope");
|
|
307
309
|
const scope = await selectScopePrompt();
|
|
308
310
|
|
|
309
311
|
if (!scope) {
|
|
@@ -316,6 +318,7 @@ export async function run(spec) {
|
|
|
316
318
|
|
|
317
319
|
// --- Select installation method ---
|
|
318
320
|
stepLine();
|
|
321
|
+
activeStep("Installation method");
|
|
319
322
|
const installMethod = await selectMethodPrompt();
|
|
320
323
|
|
|
321
324
|
if (!installMethod) {
|
|
@@ -324,24 +327,30 @@ export async function run(spec) {
|
|
|
324
327
|
}
|
|
325
328
|
|
|
326
329
|
|
|
327
|
-
// Installation Summary
|
|
330
|
+
// Installation Summary Box
|
|
328
331
|
stepLine();
|
|
332
|
+
step("Installation Summary");
|
|
333
|
+
stepLine();
|
|
334
|
+
|
|
329
335
|
const agentsString = selectedAgents.map(a => a.displayName).join(", ");
|
|
330
|
-
const methodLabel = installMethod === "symlink" ? "Symlink" : "Copy";
|
|
331
|
-
const scopeLabel = isGlobal ? "Global" : "Project";
|
|
332
336
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
`${c.cyan(
|
|
338
|
-
|
|
337
|
+
let summaryContent = "";
|
|
338
|
+
const methodVerb = installMethod === "symlink" ? "symlink" : "copy";
|
|
339
|
+
|
|
340
|
+
for (const sn of selectedSkills) {
|
|
341
|
+
summaryContent += `${c.cyan(sn)}\n`;
|
|
342
|
+
summaryContent += ` ${c.dim(methodVerb)} ${c.gray("→")} ${c.dim(agentsString)}\n\n`;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
// Remove trailing newlines
|
|
346
|
+
summaryContent = summaryContent.trim();
|
|
339
347
|
|
|
340
348
|
console.log(boxen(summaryContent, {
|
|
341
349
|
padding: 1,
|
|
342
|
-
borderColor: "
|
|
350
|
+
borderColor: "gray",
|
|
343
351
|
borderStyle: "round",
|
|
344
|
-
|
|
352
|
+
dimBorder: true,
|
|
353
|
+
title: "Installation Summary",
|
|
345
354
|
titleAlignment: "left"
|
|
346
355
|
}).split("\n").map(l => `${c.gray(S.branch)} ${l}`).join("\n"));
|
|
347
356
|
|
|
@@ -369,13 +378,11 @@ export async function run(spec) {
|
|
|
369
378
|
|
|
370
379
|
const installResults = { success: [], failed: [] };
|
|
371
380
|
|
|
372
|
-
// Install all skills with single progress spinner
|
|
373
|
-
const skillSpinner = spinner();
|
|
374
|
-
skillSpinner.start(`Installing ${selectedSkills.length} skills...`);
|
|
375
|
-
|
|
376
381
|
for (const sn of selectedSkills) {
|
|
377
382
|
const src = skillPathMap[sn] || path.join(skillsDir || tmp, sn);
|
|
378
|
-
|
|
383
|
+
|
|
384
|
+
const is = spinner();
|
|
385
|
+
is.start(`Installing ${sn} to ${selectedAgents.length} agents`);
|
|
379
386
|
|
|
380
387
|
const result = await installSkillForAgents(src, sn, selectedAgents, {
|
|
381
388
|
method: installMethod,
|
|
@@ -388,13 +395,12 @@ export async function run(spec) {
|
|
|
388
395
|
|
|
389
396
|
installResults.success.push(...result.success);
|
|
390
397
|
installResults.failed.push(...result.failed);
|
|
391
|
-
}
|
|
392
398
|
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
399
|
+
if (result.failed.length === 0) {
|
|
400
|
+
is.stop(`Installed ${sn}(${result.success.length} agents)`);
|
|
401
|
+
} else {
|
|
402
|
+
is.stop(`${sn}: ${result.success.length} success, ${result.failed.length} failed`);
|
|
403
|
+
}
|
|
398
404
|
}
|
|
399
405
|
|
|
400
406
|
|
|
@@ -658,39 +664,94 @@ export async function run(spec) {
|
|
|
658
664
|
stepLine();
|
|
659
665
|
step("Installation complete");
|
|
660
666
|
|
|
661
|
-
// Final Success Box
|
|
667
|
+
// Final Success Box
|
|
662
668
|
stepLine();
|
|
669
|
+
console.log(`${c.gray(S.branch)}`); // Extra spacing line
|
|
670
|
+
|
|
671
|
+
let successContent = "";
|
|
672
|
+
|
|
673
|
+
// Skills summary
|
|
674
|
+
for (const sn of selectedSkills) {
|
|
675
|
+
const mockPath = `.agent / skills / ${sn}`;
|
|
676
|
+
successContent += `${c.cyan("✓")} ${c.dim(mockPath)}\n`;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
// Workflows summary
|
|
680
|
+
if (workflowsInstalled > 0) {
|
|
681
|
+
successContent += `${c.cyan("✓")} ${c.dim(`.agent/workflows/ (${workflowsInstalled} files)`)}\n`;
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
// Agents summary
|
|
685
|
+
if (agentsInstalled > 0) {
|
|
686
|
+
successContent += `${c.cyan("✓")} ${c.dim(`.agent/agents/ (${agentsInstalled} files)`)}\n`;
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
// GEMINI.md summary
|
|
690
|
+
if (geminiInstalled) {
|
|
691
|
+
successContent += `${c.cyan("✓")} ${c.dim(".agent/GEMINI.md (Agent Rules)")}\n`;
|
|
692
|
+
}
|
|
663
693
|
|
|
664
|
-
//
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
if (
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
694
|
+
// ARCHITECTURE.md summary
|
|
695
|
+
if (archInstalled) {
|
|
696
|
+
successContent += `${c.cyan("✓")} ${c.dim(".agent/ARCHITECTURE.md")}\n`;
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
// Knowledge summary
|
|
700
|
+
if (knowledgeInstalled) {
|
|
701
|
+
successContent += `${c.cyan("✓")} ${c.dim(".agent/knowledge/")}\n`;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
// Rules summary
|
|
705
|
+
if (rulesInstalled > 0) {
|
|
706
|
+
successContent += `${c.cyan("✓")} ${c.dim(`.agent/rules/ (${rulesInstalled} files)`)}\n`;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
// Shared resources summary
|
|
710
|
+
if (sharedInstalled) {
|
|
711
|
+
successContent += `${c.cyan("✓")} ${c.dim(".agent/.shared/ (ui-ux-pro-max data)")}\n`;
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
// VS Code Extension summary
|
|
715
|
+
if (extensionInstalled) {
|
|
716
|
+
successContent += `${c.cyan("✓")} ${c.dim("PikaKit VS Code Extension")}\n`;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
// Build title
|
|
720
|
+
const parts = [`${selectedSkills.length} skills`];
|
|
721
|
+
if (workflowsInstalled > 0) parts.push(`${workflowsInstalled} workflows`);
|
|
722
|
+
if (agentsInstalled > 0) parts.push(`${agentsInstalled} agents`);
|
|
723
|
+
if (geminiInstalled) parts.push("GEMINI.md");
|
|
724
|
+
|
|
725
|
+
console.log(boxen(successContent.trim(), {
|
|
675
726
|
padding: 1,
|
|
676
727
|
borderColor: "cyan",
|
|
677
728
|
borderStyle: "round",
|
|
678
|
-
title: c.cyan("
|
|
729
|
+
title: c.cyan(`Installed ${parts.join(", ")}`),
|
|
679
730
|
titleAlignment: "left"
|
|
680
731
|
}).split("\n").map(l => `${c.gray(S.branch)} ${l}`).join("\n"));
|
|
681
732
|
|
|
682
733
|
fs.rmSync(tmp, { recursive: true, force: true });
|
|
683
734
|
|
|
684
|
-
// Install CLI package
|
|
735
|
+
// Install CLI package
|
|
736
|
+
stepLine();
|
|
737
|
+
const cliSpinner = spinner();
|
|
685
738
|
const cliPackage = "pikakit";
|
|
686
739
|
|
|
687
740
|
if (isGlobal) {
|
|
741
|
+
cliSpinner.start(`Installing kit CLI globally(${cliPackage})`);
|
|
688
742
|
try {
|
|
689
743
|
await execAsync(`npm install -g ${cliPackage}`, { timeout: 120000 });
|
|
690
|
-
|
|
744
|
+
cliSpinner.stop("CLI installed globally");
|
|
745
|
+
step(c.dim("Command: kit"));
|
|
746
|
+
} catch (e) {
|
|
747
|
+
cliSpinner.stop(c.yellow("Global CLI installation failed"));
|
|
748
|
+
step(c.dim(`Try running manually: npm i -g ${cliPackage}`));
|
|
749
|
+
}
|
|
691
750
|
} else {
|
|
751
|
+
cliSpinner.start(`Installing kit CLI locally(${cliPackage})`);
|
|
692
752
|
try {
|
|
693
753
|
await execAsync(`npm install -D ${cliPackage}`, { timeout: 120000 });
|
|
754
|
+
cliSpinner.stop("CLI installed locally");
|
|
694
755
|
|
|
695
756
|
// Add npm scripts to package.json
|
|
696
757
|
try {
|
|
@@ -698,30 +759,52 @@ export async function run(spec) {
|
|
|
698
759
|
if (fs.existsSync(pkgPath)) {
|
|
699
760
|
const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf-8"));
|
|
700
761
|
pkg.scripts = pkg.scripts || {};
|
|
762
|
+
|
|
701
763
|
if (!pkg.scripts.kit) {
|
|
702
764
|
pkg.scripts.kit = "kit";
|
|
703
765
|
}
|
|
766
|
+
|
|
704
767
|
fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + "\n");
|
|
768
|
+
step(c.green("✓ Added npm script: 'kit'"));
|
|
705
769
|
}
|
|
706
|
-
} catch {
|
|
770
|
+
} catch (scriptErr) {
|
|
771
|
+
step(c.yellow("⚠ Could not add npm scripts automatically"));
|
|
772
|
+
}
|
|
707
773
|
|
|
708
774
|
// Create wrapper scripts for direct command access (Windows + Unix)
|
|
709
775
|
try {
|
|
710
776
|
const projectRoot = process.cwd();
|
|
777
|
+
|
|
778
|
+
// Always create kit wrappers
|
|
711
779
|
const kitCmd = `@echo off\nnode "%~dp0node_modules\\pikakit\\bin\\kit.js" %* `;
|
|
712
780
|
const kitSh = `#!/bin/sh\nnode "$(dirname "$0")/node_modules/pikakit/bin/kit.js" "$@"`;
|
|
713
781
|
fs.writeFileSync(path.join(projectRoot, "kit.cmd"), kitCmd);
|
|
714
782
|
fs.writeFileSync(path.join(projectRoot, "kit"), kitSh, { mode: 0o755 });
|
|
715
|
-
|
|
716
|
-
|
|
783
|
+
|
|
784
|
+
step(c.green(" Created wrapper script: kit"));
|
|
785
|
+
step(c.dim("Run directly: ./kit (Unix) | kit (Windows)"));
|
|
786
|
+
} catch (wrapperErr) {
|
|
787
|
+
step(c.dim("Run: npx kit"));
|
|
788
|
+
}
|
|
789
|
+
} catch (e) {
|
|
790
|
+
cliSpinner.stop(c.yellow("Local CLI installation skipped"));
|
|
791
|
+
step(c.dim(`Run manually: npm i -D ${cliPackage}`));
|
|
792
|
+
}
|
|
717
793
|
}
|
|
718
794
|
|
|
719
|
-
// Run npm install
|
|
795
|
+
// Run npm install to ensure all skill dependencies are available
|
|
796
|
+
stepLine();
|
|
797
|
+
const depsSpinner = spinner();
|
|
798
|
+
depsSpinner.start("Installing skill dependencies");
|
|
720
799
|
try {
|
|
721
800
|
await execAsync("npm install", { timeout: 120000 });
|
|
722
|
-
|
|
801
|
+
depsSpinner.stop("Dependencies ready");
|
|
802
|
+
} catch (e) {
|
|
803
|
+
depsSpinner.stop(c.yellow("Dependencies skipped"));
|
|
804
|
+
step(c.dim("Run: npm install"));
|
|
805
|
+
}
|
|
723
806
|
|
|
724
|
-
// Final success message
|
|
807
|
+
// Final success message
|
|
725
808
|
stepLine();
|
|
726
809
|
console.log();
|
|
727
810
|
console.log(boxen(
|
|
@@ -735,7 +818,7 @@ export async function run(spec) {
|
|
|
735
818
|
padding: 1,
|
|
736
819
|
borderColor: "cyan",
|
|
737
820
|
borderStyle: "round",
|
|
738
|
-
title: c.cyan(
|
|
821
|
+
title: c.cyan("⚡ PikaKit"),
|
|
739
822
|
titleAlignment: "center"
|
|
740
823
|
}
|
|
741
824
|
));
|
package/package.json
CHANGED
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "pikakit",
|
|
3
|
-
"version": "3.9.
|
|
4
|
-
"description": "Enterprise-grade Agent Skill Manager with Antigravity Skills support, Progressive Disclosure detection, and semantic routing validation",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"author": "pikakit <pikakit@gmail.com>",
|
|
7
|
-
"homepage": "https://github.com/pikakit/pikakit",
|
|
8
|
-
"repository": {
|
|
9
|
-
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/pikakit/pikakit.git"
|
|
11
|
-
},
|
|
12
|
-
"bugs": {
|
|
13
|
-
"url": "https://github.com/pikakit/pikakit/issues"
|
|
14
|
-
},
|
|
15
|
-
"type": "module",
|
|
16
|
-
"bin": {
|
|
17
|
-
"pikakit": "bin/cli.mjs",
|
|
18
|
-
"kit": "bin/kit.js"
|
|
19
|
-
},
|
|
20
|
-
"files": [
|
|
21
|
-
"bin/",
|
|
22
|
-
"lib/",
|
|
23
|
-
"specs/",
|
|
24
|
-
"README.md",
|
|
25
|
-
"LICENSE"
|
|
26
|
-
],
|
|
27
|
-
"engines": {
|
|
28
|
-
"node": ">=18.0.0"
|
|
29
|
-
},
|
|
30
|
-
"keywords": [
|
|
31
|
-
"agent",
|
|
32
|
-
"ai",
|
|
33
|
-
"skills",
|
|
34
|
-
"cli",
|
|
35
|
-
"tooling",
|
|
36
|
-
"registry",
|
|
37
|
-
"security",
|
|
38
|
-
"devops",
|
|
39
|
-
"automation",
|
|
40
|
-
"antigravity"
|
|
41
|
-
],
|
|
42
|
-
"scripts": {
|
|
43
|
-
"lint": "eslint bin/",
|
|
44
|
-
"lint:fix": "eslint bin/ --fix",
|
|
45
|
-
"format": "prettier --write bin/",
|
|
46
|
-
"test": "vitest run",
|
|
47
|
-
"test:watch": "vitest",
|
|
48
|
-
"ci": "npm run lint && npm test && node bin/kit.js verify --strict && node bin/kit.js doctor --strict",
|
|
49
|
-
"agent": "agent",
|
|
50
|
-
"kit": "kit"
|
|
51
|
-
},
|
|
52
|
-
"publishConfig": {
|
|
53
|
-
"access": "public"
|
|
54
|
-
},
|
|
55
|
-
"dependencies": {
|
|
56
|
-
"@clack/core": "^0.5.0",
|
|
57
|
-
"@clack/prompts": "^0.11.0",
|
|
58
|
-
"@google/generative-ai": "^0.21.0",
|
|
59
|
-
"boxen": "^8.0.1",
|
|
60
|
-
"chalk": "^5.4.1",
|
|
61
|
-
"clipboardy": "^5.1.0",
|
|
62
|
-
"css-tree": "^3.1.0",
|
|
63
|
-
"csv-parse": "^6.1.0",
|
|
64
|
-
"dotenv": "^16.4.5",
|
|
65
|
-
"gradient-string": "^2.0.2",
|
|
66
|
-
"js-yaml": "^4.1.0",
|
|
67
|
-
"kleur": "^4.1.5",
|
|
68
|
-
"ora": "^9.1.0",
|
|
69
|
-
"picocolors": "^1.1.1",
|
|
70
|
-
"prompts": "^2.4.2"
|
|
71
|
-
},
|
|
72
|
-
"devDependencies": {
|
|
73
|
-
"eslint": "^9.39.2",
|
|
74
|
-
"pikakit": "^3.
|
|
75
|
-
"prettier": "^3.2.5",
|
|
76
|
-
"vitest": "^4.0.18"
|
|
77
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "pikakit",
|
|
3
|
+
"version": "3.9.27",
|
|
4
|
+
"description": "Enterprise-grade Agent Skill Manager with Antigravity Skills support, Progressive Disclosure detection, and semantic routing validation",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "pikakit <pikakit@gmail.com>",
|
|
7
|
+
"homepage": "https://github.com/pikakit/pikakit",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/pikakit/pikakit.git"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/pikakit/pikakit/issues"
|
|
14
|
+
},
|
|
15
|
+
"type": "module",
|
|
16
|
+
"bin": {
|
|
17
|
+
"pikakit": "bin/cli.mjs",
|
|
18
|
+
"kit": "bin/kit.js"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"bin/",
|
|
22
|
+
"lib/",
|
|
23
|
+
"specs/",
|
|
24
|
+
"README.md",
|
|
25
|
+
"LICENSE"
|
|
26
|
+
],
|
|
27
|
+
"engines": {
|
|
28
|
+
"node": ">=18.0.0"
|
|
29
|
+
},
|
|
30
|
+
"keywords": [
|
|
31
|
+
"agent",
|
|
32
|
+
"ai",
|
|
33
|
+
"skills",
|
|
34
|
+
"cli",
|
|
35
|
+
"tooling",
|
|
36
|
+
"registry",
|
|
37
|
+
"security",
|
|
38
|
+
"devops",
|
|
39
|
+
"automation",
|
|
40
|
+
"antigravity"
|
|
41
|
+
],
|
|
42
|
+
"scripts": {
|
|
43
|
+
"lint": "eslint bin/",
|
|
44
|
+
"lint:fix": "eslint bin/ --fix",
|
|
45
|
+
"format": "prettier --write bin/",
|
|
46
|
+
"test": "vitest run",
|
|
47
|
+
"test:watch": "vitest",
|
|
48
|
+
"ci": "npm run lint && npm test && node bin/kit.js verify --strict && node bin/kit.js doctor --strict",
|
|
49
|
+
"agent": "agent",
|
|
50
|
+
"kit": "kit"
|
|
51
|
+
},
|
|
52
|
+
"publishConfig": {
|
|
53
|
+
"access": "public"
|
|
54
|
+
},
|
|
55
|
+
"dependencies": {
|
|
56
|
+
"@clack/core": "^0.5.0",
|
|
57
|
+
"@clack/prompts": "^0.11.0",
|
|
58
|
+
"@google/generative-ai": "^0.21.0",
|
|
59
|
+
"boxen": "^8.0.1",
|
|
60
|
+
"chalk": "^5.4.1",
|
|
61
|
+
"clipboardy": "^5.1.0",
|
|
62
|
+
"css-tree": "^3.1.0",
|
|
63
|
+
"csv-parse": "^6.1.0",
|
|
64
|
+
"dotenv": "^16.4.5",
|
|
65
|
+
"gradient-string": "^2.0.2",
|
|
66
|
+
"js-yaml": "^4.1.0",
|
|
67
|
+
"kleur": "^4.1.5",
|
|
68
|
+
"ora": "^9.1.0",
|
|
69
|
+
"picocolors": "^1.1.1",
|
|
70
|
+
"prompts": "^2.4.2"
|
|
71
|
+
},
|
|
72
|
+
"devDependencies": {
|
|
73
|
+
"eslint": "^9.39.2",
|
|
74
|
+
"pikakit": "^3.7.5",
|
|
75
|
+
"prettier": "^3.2.5",
|
|
76
|
+
"vitest": "^4.0.18"
|
|
77
|
+
}
|
|
78
78
|
}
|