pikakit 3.9.26 → 3.9.28
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 +125 -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
|
/**
|
|
@@ -324,24 +324,30 @@ export async function run(spec) {
|
|
|
324
324
|
}
|
|
325
325
|
|
|
326
326
|
|
|
327
|
-
// Installation Summary
|
|
327
|
+
// Installation Summary Box
|
|
328
328
|
stepLine();
|
|
329
|
+
step("Installation Summary");
|
|
330
|
+
stepLine();
|
|
331
|
+
|
|
329
332
|
const agentsString = selectedAgents.map(a => a.displayName).join(", ");
|
|
330
|
-
const methodLabel = installMethod === "symlink" ? "Symlink" : "Copy";
|
|
331
|
-
const scopeLabel = isGlobal ? "Global" : "Project";
|
|
332
333
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
`${c.cyan(
|
|
338
|
-
|
|
334
|
+
let summaryContent = "";
|
|
335
|
+
const methodVerb = installMethod === "symlink" ? "symlink" : "copy";
|
|
336
|
+
|
|
337
|
+
for (const sn of selectedSkills) {
|
|
338
|
+
summaryContent += `${c.cyan(sn)}\n`;
|
|
339
|
+
summaryContent += ` ${c.dim(methodVerb)} ${c.gray("→")} ${c.dim(agentsString)}\n\n`;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
// Remove trailing newlines
|
|
343
|
+
summaryContent = summaryContent.trim();
|
|
339
344
|
|
|
340
345
|
console.log(boxen(summaryContent, {
|
|
341
346
|
padding: 1,
|
|
342
|
-
borderColor: "
|
|
347
|
+
borderColor: "gray",
|
|
343
348
|
borderStyle: "round",
|
|
344
|
-
|
|
349
|
+
dimBorder: true,
|
|
350
|
+
title: "Installation Summary",
|
|
345
351
|
titleAlignment: "left"
|
|
346
352
|
}).split("\n").map(l => `${c.gray(S.branch)} ${l}`).join("\n"));
|
|
347
353
|
|
|
@@ -369,13 +375,11 @@ export async function run(spec) {
|
|
|
369
375
|
|
|
370
376
|
const installResults = { success: [], failed: [] };
|
|
371
377
|
|
|
372
|
-
// Install all skills with single progress spinner
|
|
373
|
-
const skillSpinner = spinner();
|
|
374
|
-
skillSpinner.start(`Installing ${selectedSkills.length} skills...`);
|
|
375
|
-
|
|
376
378
|
for (const sn of selectedSkills) {
|
|
377
379
|
const src = skillPathMap[sn] || path.join(skillsDir || tmp, sn);
|
|
378
|
-
|
|
380
|
+
|
|
381
|
+
const is = spinner();
|
|
382
|
+
is.start(`Installing ${sn} to ${selectedAgents.length} agents`);
|
|
379
383
|
|
|
380
384
|
const result = await installSkillForAgents(src, sn, selectedAgents, {
|
|
381
385
|
method: installMethod,
|
|
@@ -388,13 +392,12 @@ export async function run(spec) {
|
|
|
388
392
|
|
|
389
393
|
installResults.success.push(...result.success);
|
|
390
394
|
installResults.failed.push(...result.failed);
|
|
391
|
-
}
|
|
392
395
|
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
396
|
+
if (result.failed.length === 0) {
|
|
397
|
+
is.stop(`Installed ${sn}(${result.success.length} agents)`);
|
|
398
|
+
} else {
|
|
399
|
+
is.stop(`${sn}: ${result.success.length} success, ${result.failed.length} failed`);
|
|
400
|
+
}
|
|
398
401
|
}
|
|
399
402
|
|
|
400
403
|
|
|
@@ -658,39 +661,94 @@ export async function run(spec) {
|
|
|
658
661
|
stepLine();
|
|
659
662
|
step("Installation complete");
|
|
660
663
|
|
|
661
|
-
// Final Success Box
|
|
664
|
+
// Final Success Box
|
|
662
665
|
stepLine();
|
|
666
|
+
console.log(`${c.gray(S.branch)}`); // Extra spacing line
|
|
667
|
+
|
|
668
|
+
let successContent = "";
|
|
669
|
+
|
|
670
|
+
// Skills summary
|
|
671
|
+
for (const sn of selectedSkills) {
|
|
672
|
+
const mockPath = `.agent / skills / ${sn}`;
|
|
673
|
+
successContent += `${c.cyan("✓")} ${c.dim(mockPath)}\n`;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
// Workflows summary
|
|
677
|
+
if (workflowsInstalled > 0) {
|
|
678
|
+
successContent += `${c.cyan("✓")} ${c.dim(`.agent/workflows/ (${workflowsInstalled} files)`)}\n`;
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
// Agents summary
|
|
682
|
+
if (agentsInstalled > 0) {
|
|
683
|
+
successContent += `${c.cyan("✓")} ${c.dim(`.agent/agents/ (${agentsInstalled} files)`)}\n`;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
// GEMINI.md summary
|
|
687
|
+
if (geminiInstalled) {
|
|
688
|
+
successContent += `${c.cyan("✓")} ${c.dim(".agent/GEMINI.md (Agent Rules)")}\n`;
|
|
689
|
+
}
|
|
663
690
|
|
|
664
|
-
//
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
if (
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
691
|
+
// ARCHITECTURE.md summary
|
|
692
|
+
if (archInstalled) {
|
|
693
|
+
successContent += `${c.cyan("✓")} ${c.dim(".agent/ARCHITECTURE.md")}\n`;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
// Knowledge summary
|
|
697
|
+
if (knowledgeInstalled) {
|
|
698
|
+
successContent += `${c.cyan("✓")} ${c.dim(".agent/knowledge/")}\n`;
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
// Rules summary
|
|
702
|
+
if (rulesInstalled > 0) {
|
|
703
|
+
successContent += `${c.cyan("✓")} ${c.dim(`.agent/rules/ (${rulesInstalled} files)`)}\n`;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
// Shared resources summary
|
|
707
|
+
if (sharedInstalled) {
|
|
708
|
+
successContent += `${c.cyan("✓")} ${c.dim(".agent/.shared/ (ui-ux-pro-max data)")}\n`;
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
// VS Code Extension summary
|
|
712
|
+
if (extensionInstalled) {
|
|
713
|
+
successContent += `${c.cyan("✓")} ${c.dim("PikaKit VS Code Extension")}\n`;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
// Build title
|
|
717
|
+
const parts = [`${selectedSkills.length} skills`];
|
|
718
|
+
if (workflowsInstalled > 0) parts.push(`${workflowsInstalled} workflows`);
|
|
719
|
+
if (agentsInstalled > 0) parts.push(`${agentsInstalled} agents`);
|
|
720
|
+
if (geminiInstalled) parts.push("GEMINI.md");
|
|
721
|
+
|
|
722
|
+
console.log(boxen(successContent.trim(), {
|
|
675
723
|
padding: 1,
|
|
676
724
|
borderColor: "cyan",
|
|
677
725
|
borderStyle: "round",
|
|
678
|
-
title: c.cyan("
|
|
726
|
+
title: c.cyan(`Installed ${parts.join(", ")}`),
|
|
679
727
|
titleAlignment: "left"
|
|
680
728
|
}).split("\n").map(l => `${c.gray(S.branch)} ${l}`).join("\n"));
|
|
681
729
|
|
|
682
730
|
fs.rmSync(tmp, { recursive: true, force: true });
|
|
683
731
|
|
|
684
|
-
// Install CLI package
|
|
732
|
+
// Install CLI package
|
|
733
|
+
stepLine();
|
|
734
|
+
const cliSpinner = spinner();
|
|
685
735
|
const cliPackage = "pikakit";
|
|
686
736
|
|
|
687
737
|
if (isGlobal) {
|
|
738
|
+
cliSpinner.start(`Installing kit CLI globally(${cliPackage})`);
|
|
688
739
|
try {
|
|
689
740
|
await execAsync(`npm install -g ${cliPackage}`, { timeout: 120000 });
|
|
690
|
-
|
|
741
|
+
cliSpinner.stop("CLI installed globally");
|
|
742
|
+
step(c.dim("Command: kit"));
|
|
743
|
+
} catch (e) {
|
|
744
|
+
cliSpinner.stop(c.yellow("Global CLI installation failed"));
|
|
745
|
+
step(c.dim(`Try running manually: npm i -g ${cliPackage}`));
|
|
746
|
+
}
|
|
691
747
|
} else {
|
|
748
|
+
cliSpinner.start(`Installing kit CLI locally(${cliPackage})`);
|
|
692
749
|
try {
|
|
693
750
|
await execAsync(`npm install -D ${cliPackage}`, { timeout: 120000 });
|
|
751
|
+
cliSpinner.stop("CLI installed locally");
|
|
694
752
|
|
|
695
753
|
// Add npm scripts to package.json
|
|
696
754
|
try {
|
|
@@ -698,30 +756,52 @@ export async function run(spec) {
|
|
|
698
756
|
if (fs.existsSync(pkgPath)) {
|
|
699
757
|
const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf-8"));
|
|
700
758
|
pkg.scripts = pkg.scripts || {};
|
|
759
|
+
|
|
701
760
|
if (!pkg.scripts.kit) {
|
|
702
761
|
pkg.scripts.kit = "kit";
|
|
703
762
|
}
|
|
763
|
+
|
|
704
764
|
fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + "\n");
|
|
765
|
+
step(c.green("✓ Added npm script: 'kit'"));
|
|
705
766
|
}
|
|
706
|
-
} catch {
|
|
767
|
+
} catch (scriptErr) {
|
|
768
|
+
step(c.yellow("⚠ Could not add npm scripts automatically"));
|
|
769
|
+
}
|
|
707
770
|
|
|
708
771
|
// Create wrapper scripts for direct command access (Windows + Unix)
|
|
709
772
|
try {
|
|
710
773
|
const projectRoot = process.cwd();
|
|
774
|
+
|
|
775
|
+
// Always create kit wrappers
|
|
711
776
|
const kitCmd = `@echo off\nnode "%~dp0node_modules\\pikakit\\bin\\kit.js" %* `;
|
|
712
777
|
const kitSh = `#!/bin/sh\nnode "$(dirname "$0")/node_modules/pikakit/bin/kit.js" "$@"`;
|
|
713
778
|
fs.writeFileSync(path.join(projectRoot, "kit.cmd"), kitCmd);
|
|
714
779
|
fs.writeFileSync(path.join(projectRoot, "kit"), kitSh, { mode: 0o755 });
|
|
715
|
-
|
|
716
|
-
|
|
780
|
+
|
|
781
|
+
step(c.green(" Created wrapper script: kit"));
|
|
782
|
+
step(c.dim("Run directly: ./kit (Unix) | kit (Windows)"));
|
|
783
|
+
} catch (wrapperErr) {
|
|
784
|
+
step(c.dim("Run: npx kit"));
|
|
785
|
+
}
|
|
786
|
+
} catch (e) {
|
|
787
|
+
cliSpinner.stop(c.yellow("Local CLI installation skipped"));
|
|
788
|
+
step(c.dim(`Run manually: npm i -D ${cliPackage}`));
|
|
789
|
+
}
|
|
717
790
|
}
|
|
718
791
|
|
|
719
|
-
// Run npm install
|
|
792
|
+
// Run npm install to ensure all skill dependencies are available
|
|
793
|
+
stepLine();
|
|
794
|
+
const depsSpinner = spinner();
|
|
795
|
+
depsSpinner.start("Installing skill dependencies");
|
|
720
796
|
try {
|
|
721
797
|
await execAsync("npm install", { timeout: 120000 });
|
|
722
|
-
|
|
798
|
+
depsSpinner.stop("Dependencies ready");
|
|
799
|
+
} catch (e) {
|
|
800
|
+
depsSpinner.stop(c.yellow("Dependencies skipped"));
|
|
801
|
+
step(c.dim("Run: npm install"));
|
|
802
|
+
}
|
|
723
803
|
|
|
724
|
-
// Final success message
|
|
804
|
+
// Final success message
|
|
725
805
|
stepLine();
|
|
726
806
|
console.log();
|
|
727
807
|
console.log(boxen(
|
|
@@ -735,7 +815,7 @@ export async function run(spec) {
|
|
|
735
815
|
padding: 1,
|
|
736
816
|
borderColor: "cyan",
|
|
737
817
|
borderStyle: "round",
|
|
738
|
-
title: c.cyan(
|
|
818
|
+
title: c.cyan("⚡ PikaKit"),
|
|
739
819
|
titleAlignment: "center"
|
|
740
820
|
}
|
|
741
821
|
));
|
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.28",
|
|
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
|
}
|