pikakit 3.9.27 → 3.9.29
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 +49 -142
- package/bin/lib/ui.js +4 -30
- package/package.json +1 -1
|
@@ -247,14 +247,13 @@ export async function run(spec) {
|
|
|
247
247
|
|
|
248
248
|
// Show only categories, not individual skills
|
|
249
249
|
const selectedCategories = await multiselect({
|
|
250
|
-
message:
|
|
250
|
+
message: "",
|
|
251
251
|
options: sortedCategories.map(cat => ({
|
|
252
252
|
label: `${cat} (${grouped[cat].length} skills)`,
|
|
253
253
|
value: cat
|
|
254
254
|
})),
|
|
255
255
|
initialValues: sortedCategories, // Pre-select all
|
|
256
|
-
required: true
|
|
257
|
-
hint: `+ ${REQUIRED_SKILLS.length} system skill`
|
|
256
|
+
required: true
|
|
258
257
|
});
|
|
259
258
|
|
|
260
259
|
if (isCancel(selectedCategories)) {
|
|
@@ -292,7 +291,6 @@ export async function run(spec) {
|
|
|
292
291
|
const { selectAgentsPrompt, selectScopePrompt, selectMethodPrompt } = await import("../ui.js");
|
|
293
292
|
|
|
294
293
|
stepLine();
|
|
295
|
-
activeStep(`${detectedAgents.length} agents found — Select target`);
|
|
296
294
|
const selectedAgents = await selectAgentsPrompt(detectedAgents);
|
|
297
295
|
|
|
298
296
|
if (!selectedAgents || selectedAgents.length === 0) {
|
|
@@ -305,7 +303,6 @@ export async function run(spec) {
|
|
|
305
303
|
|
|
306
304
|
if (!GLOBAL) {
|
|
307
305
|
stepLine();
|
|
308
|
-
activeStep("Installation scope");
|
|
309
306
|
const scope = await selectScopePrompt();
|
|
310
307
|
|
|
311
308
|
if (!scope) {
|
|
@@ -318,7 +315,6 @@ export async function run(spec) {
|
|
|
318
315
|
|
|
319
316
|
// --- Select installation method ---
|
|
320
317
|
stepLine();
|
|
321
|
-
activeStep("Installation method");
|
|
322
318
|
const installMethod = await selectMethodPrompt();
|
|
323
319
|
|
|
324
320
|
if (!installMethod) {
|
|
@@ -326,33 +322,24 @@ export async function run(spec) {
|
|
|
326
322
|
return;
|
|
327
323
|
}
|
|
328
324
|
|
|
329
|
-
|
|
330
|
-
// Installation Summary Box
|
|
331
|
-
stepLine();
|
|
332
|
-
step("Installation Summary");
|
|
325
|
+
// Installation Summary (compact)
|
|
333
326
|
stepLine();
|
|
334
|
-
|
|
335
327
|
const agentsString = selectedAgents.map(a => a.displayName).join(", ");
|
|
328
|
+
const methodVerb = installMethod === "symlink" ? "Symlink" : "Copy";
|
|
336
329
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
borderColor: "gray",
|
|
351
|
-
borderStyle: "round",
|
|
352
|
-
dimBorder: true,
|
|
353
|
-
title: "Installation Summary",
|
|
354
|
-
titleAlignment: "left"
|
|
355
|
-
}).split("\n").map(l => `${c.gray(S.branch)} ${l}`).join("\n"));
|
|
330
|
+
console.log(boxen(
|
|
331
|
+
`${c.cyan("Skills:")} ${selectedSkills.length}\n` +
|
|
332
|
+
`${c.cyan("Method:")} ${methodVerb}\n` +
|
|
333
|
+
`${c.cyan("Target:")} ${agentsString}`,
|
|
334
|
+
{
|
|
335
|
+
padding: 1,
|
|
336
|
+
borderColor: "gray",
|
|
337
|
+
borderStyle: "round",
|
|
338
|
+
dimBorder: true,
|
|
339
|
+
title: "Summary",
|
|
340
|
+
titleAlignment: "left"
|
|
341
|
+
}
|
|
342
|
+
).split("\n").map(l => `${c.gray(S.branch)} ${l}`).join("\n"));
|
|
356
343
|
|
|
357
344
|
stepLine();
|
|
358
345
|
|
|
@@ -378,12 +365,13 @@ export async function run(spec) {
|
|
|
378
365
|
|
|
379
366
|
const installResults = { success: [], failed: [] };
|
|
380
367
|
|
|
368
|
+
// Single spinner for all skills
|
|
369
|
+
const skillSpinner = spinner();
|
|
370
|
+
skillSpinner.start(`Installing ${selectedSkills.length} skills...`);
|
|
371
|
+
|
|
381
372
|
for (const sn of selectedSkills) {
|
|
382
373
|
const src = skillPathMap[sn] || path.join(skillsDir || tmp, sn);
|
|
383
374
|
|
|
384
|
-
const is = spinner();
|
|
385
|
-
is.start(`Installing ${sn} to ${selectedAgents.length} agents`);
|
|
386
|
-
|
|
387
375
|
const result = await installSkillForAgents(src, sn, selectedAgents, {
|
|
388
376
|
method: installMethod,
|
|
389
377
|
scope: isGlobal ? "global" : "project",
|
|
@@ -395,12 +383,13 @@ export async function run(spec) {
|
|
|
395
383
|
|
|
396
384
|
installResults.success.push(...result.success);
|
|
397
385
|
installResults.failed.push(...result.failed);
|
|
386
|
+
}
|
|
398
387
|
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
}
|
|
388
|
+
// Show final result
|
|
389
|
+
if (installResults.failed.length === 0) {
|
|
390
|
+
skillSpinner.stop(`Installed ${selectedSkills.length} skills`);
|
|
391
|
+
} else {
|
|
392
|
+
skillSpinner.stop(`${installResults.success.length} success, ${installResults.failed.length} failed`);
|
|
404
393
|
}
|
|
405
394
|
|
|
406
395
|
|
|
@@ -664,94 +653,38 @@ export async function run(spec) {
|
|
|
664
653
|
stepLine();
|
|
665
654
|
step("Installation complete");
|
|
666
655
|
|
|
667
|
-
// Final Success Box
|
|
656
|
+
// Final Success Box (compact)
|
|
668
657
|
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
|
-
}
|
|
693
|
-
|
|
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
658
|
|
|
719
|
-
// Build
|
|
720
|
-
const
|
|
721
|
-
|
|
722
|
-
if (
|
|
723
|
-
if (
|
|
659
|
+
// Build compact summary
|
|
660
|
+
const items = [];
|
|
661
|
+
items.push(`${c.cyan("✓")} Skills: ${selectedSkills.length}`);
|
|
662
|
+
if (workflowsInstalled > 0) items.push(`${c.cyan("✓")} Workflows: ${workflowsInstalled}`);
|
|
663
|
+
if (agentsInstalled > 0) items.push(`${c.cyan("✓")} Agents: ${agentsInstalled}`);
|
|
664
|
+
if (geminiInstalled) items.push(`${c.cyan("✓")} GEMINI.md`);
|
|
665
|
+
if (archInstalled) items.push(`${c.cyan("✓")} ARCHITECTURE.md`);
|
|
666
|
+
if (extensionInstalled) items.push(`${c.cyan("✓")} VS Code Extension`);
|
|
724
667
|
|
|
725
|
-
console.log(boxen(
|
|
668
|
+
console.log(boxen(items.join("\n"), {
|
|
726
669
|
padding: 1,
|
|
727
670
|
borderColor: "cyan",
|
|
728
671
|
borderStyle: "round",
|
|
729
|
-
title: c.cyan(
|
|
672
|
+
title: c.cyan("Installed"),
|
|
730
673
|
titleAlignment: "left"
|
|
731
674
|
}).split("\n").map(l => `${c.gray(S.branch)} ${l}`).join("\n"));
|
|
732
675
|
|
|
733
676
|
fs.rmSync(tmp, { recursive: true, force: true });
|
|
734
677
|
|
|
735
|
-
// Install CLI package
|
|
736
|
-
stepLine();
|
|
737
|
-
const cliSpinner = spinner();
|
|
678
|
+
// Install CLI package (silent)
|
|
738
679
|
const cliPackage = "pikakit";
|
|
739
680
|
|
|
740
681
|
if (isGlobal) {
|
|
741
|
-
cliSpinner.start(`Installing kit CLI globally(${cliPackage})`);
|
|
742
682
|
try {
|
|
743
683
|
await execAsync(`npm install -g ${cliPackage}`, { timeout: 120000 });
|
|
744
|
-
|
|
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
|
-
}
|
|
684
|
+
} catch (e) { /* ignore */ }
|
|
750
685
|
} else {
|
|
751
|
-
cliSpinner.start(`Installing kit CLI locally(${cliPackage})`);
|
|
752
686
|
try {
|
|
753
687
|
await execAsync(`npm install -D ${cliPackage}`, { timeout: 120000 });
|
|
754
|
-
cliSpinner.stop("CLI installed locally");
|
|
755
688
|
|
|
756
689
|
// Add npm scripts to package.json
|
|
757
690
|
try {
|
|
@@ -759,61 +692,35 @@ export async function run(spec) {
|
|
|
759
692
|
if (fs.existsSync(pkgPath)) {
|
|
760
693
|
const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf-8"));
|
|
761
694
|
pkg.scripts = pkg.scripts || {};
|
|
762
|
-
|
|
763
|
-
if (!pkg.scripts.kit) {
|
|
764
|
-
pkg.scripts.kit = "kit";
|
|
765
|
-
}
|
|
766
|
-
|
|
695
|
+
if (!pkg.scripts.kit) pkg.scripts.kit = "kit";
|
|
767
696
|
fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + "\n");
|
|
768
|
-
step(c.green("✓ Added npm script: 'kit'"));
|
|
769
697
|
}
|
|
770
|
-
} catch
|
|
771
|
-
step(c.yellow("⚠ Could not add npm scripts automatically"));
|
|
772
|
-
}
|
|
698
|
+
} catch { /* ignore */ }
|
|
773
699
|
|
|
774
|
-
// Create wrapper scripts
|
|
700
|
+
// Create wrapper scripts
|
|
775
701
|
try {
|
|
776
702
|
const projectRoot = process.cwd();
|
|
777
|
-
|
|
778
|
-
// Always create kit wrappers
|
|
779
703
|
const kitCmd = `@echo off\nnode "%~dp0node_modules\\pikakit\\bin\\kit.js" %* `;
|
|
780
704
|
const kitSh = `#!/bin/sh\nnode "$(dirname "$0")/node_modules/pikakit/bin/kit.js" "$@"`;
|
|
781
705
|
fs.writeFileSync(path.join(projectRoot, "kit.cmd"), kitCmd);
|
|
782
706
|
fs.writeFileSync(path.join(projectRoot, "kit"), kitSh, { mode: 0o755 });
|
|
783
|
-
|
|
784
|
-
|
|
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
|
-
}
|
|
707
|
+
} catch { /* ignore */ }
|
|
708
|
+
} catch (e) { /* ignore */ }
|
|
793
709
|
}
|
|
794
710
|
|
|
795
|
-
// Run npm install
|
|
796
|
-
stepLine();
|
|
797
|
-
const depsSpinner = spinner();
|
|
798
|
-
depsSpinner.start("Installing skill dependencies");
|
|
711
|
+
// Run npm install silently
|
|
799
712
|
try {
|
|
800
713
|
await execAsync("npm install", { timeout: 120000 });
|
|
801
|
-
|
|
802
|
-
} catch (e) {
|
|
803
|
-
depsSpinner.stop(c.yellow("Dependencies skipped"));
|
|
804
|
-
step(c.dim("Run: npm install"));
|
|
805
|
-
}
|
|
714
|
+
} catch (e) { /* ignore */ }
|
|
806
715
|
|
|
807
|
-
// Final success message
|
|
808
|
-
stepLine();
|
|
716
|
+
// Final success message (single clean box)
|
|
809
717
|
console.log();
|
|
810
718
|
console.log(boxen(
|
|
811
719
|
`${c.green("✓")} ${c.bold("Installation Complete!")}\n\n` +
|
|
812
720
|
`${c.cyan("Next Steps:")}\n` +
|
|
813
721
|
` ${c.dim("1.")} Run ${c.cyan("kit")} to access CLI tools\n` +
|
|
814
722
|
` ${c.dim("2.")} Use ${c.cyan("/autopilot")} in your AI agent\n` +
|
|
815
|
-
` ${c.dim("3.")} Explore skills with ${c.cyan("kit list")}
|
|
816
|
-
`${c.dim("Documentation:")} ${c.cyan("https://pikakit.com/docs")}`,
|
|
723
|
+
` ${c.dim("3.")} Explore skills with ${c.cyan("kit list")}`,
|
|
817
724
|
{
|
|
818
725
|
padding: 1,
|
|
819
726
|
borderColor: "cyan",
|
package/bin/lib/ui.js
CHANGED
|
@@ -196,47 +196,21 @@ export async function selectAgentsPrompt(detectedAgents) {
|
|
|
196
196
|
return null;
|
|
197
197
|
}
|
|
198
198
|
|
|
199
|
-
//
|
|
200
|
-
const installChoice = await select({
|
|
201
|
-
message: "",
|
|
202
|
-
options: [
|
|
203
|
-
{
|
|
204
|
-
value: "select",
|
|
205
|
-
label: "Select specific agents",
|
|
206
|
-
hint: "Choose which agents to install to"
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
value: "all",
|
|
210
|
-
label: `All ${detectedAgents.length} agents`,
|
|
211
|
-
hint: detectedAgents.map(a => a.displayName).join(", ")
|
|
212
|
-
}
|
|
213
|
-
]
|
|
214
|
-
});
|
|
215
|
-
|
|
216
|
-
if (isCancel(installChoice)) {
|
|
217
|
-
cancel("Installation cancelled");
|
|
218
|
-
return null;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
if (installChoice === "all") {
|
|
222
|
-
return detectedAgents;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
// Find Antigravity index for pre-selection
|
|
199
|
+
// Find Antigravity agent for pre-selection
|
|
226
200
|
const antigravityAgent = detectedAgents.find(a =>
|
|
227
201
|
a.name.toLowerCase().includes('antigravity') ||
|
|
228
202
|
a.displayName.toLowerCase().includes('antigravity')
|
|
229
203
|
);
|
|
230
204
|
|
|
231
|
-
//
|
|
205
|
+
// Direct multiselect - no intermediate step
|
|
232
206
|
const selectedAgents = await multiselect({
|
|
233
|
-
message:
|
|
207
|
+
message: `Select agents (${detectedAgents.length} found)`,
|
|
234
208
|
options: detectedAgents.map(agent => ({
|
|
235
209
|
value: agent.name,
|
|
236
210
|
label: agent.displayName,
|
|
237
211
|
hint: agent.skillsDir
|
|
238
212
|
})),
|
|
239
|
-
initialValues: antigravityAgent ? [antigravityAgent.name] :
|
|
213
|
+
initialValues: antigravityAgent ? [antigravityAgent.name] : detectedAgents.map(a => a.name),
|
|
240
214
|
required: true
|
|
241
215
|
});
|
|
242
216
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pikakit",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.29",
|
|
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>",
|