pikakit 3.9.5 → 3.9.7
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 +21 -125
- package/package.json +1 -1
|
@@ -646,137 +646,33 @@ export async function run(spec) {
|
|
|
646
646
|
if (vsixPath && fs.existsSync(vsixPath)) {
|
|
647
647
|
let installedTo = [];
|
|
648
648
|
|
|
649
|
-
//
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
const
|
|
661
|
-
if (fs.existsSync(antigravityBase)) {
|
|
649
|
+
// List of VS Code-based IDEs with their CLI commands and config paths
|
|
650
|
+
const vsCodeBasedIDEs = [
|
|
651
|
+
{ name: "VS Code", cli: "code", configPath: null },
|
|
652
|
+
{ name: "Cursor", cli: "cursor", configPath: path.join(os.homedir(), ".cursor") },
|
|
653
|
+
{ name: "Windsurf", cli: "windsurf", configPath: path.join(os.homedir(), ".windsurf") },
|
|
654
|
+
{ name: "Codium", cli: "codium", configPath: path.join(os.homedir(), ".vscode-oss") },
|
|
655
|
+
{ name: "Positron", cli: "positron", configPath: path.join(os.homedir(), ".positron") },
|
|
656
|
+
{ name: "Antigravity", cli: "antigravity", configPath: path.join(os.homedir(), ".gemini", "antigravity") }
|
|
657
|
+
];
|
|
658
|
+
|
|
659
|
+
// Try to install on each detected IDE
|
|
660
|
+
for (const ide of vsCodeBasedIDEs) {
|
|
662
661
|
try {
|
|
663
|
-
|
|
664
|
-
const
|
|
665
|
-
|
|
666
|
-
//
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
if (fs.existsSync(extDest)) {
|
|
672
|
-
fs.rmSync(extDest, { recursive: true, force: true });
|
|
673
|
-
}
|
|
674
|
-
|
|
675
|
-
// VSIX is a ZIP file, need to rename for PowerShell
|
|
676
|
-
const isWindows = process.platform === "win32";
|
|
677
|
-
if (isWindows) {
|
|
678
|
-
// PowerShell Expand-Archive requires .zip extension
|
|
679
|
-
const zipPath = path.join(os.tmpdir(), "pikakit-ext.zip");
|
|
680
|
-
fs.copyFileSync(vsixPath, zipPath);
|
|
681
|
-
await execAsync(`powershell -Command "Expand-Archive -Path '${zipPath}' -DestinationPath '${extDest}' -Force"`, { timeout: 30000 });
|
|
682
|
-
fs.unlinkSync(zipPath);
|
|
683
|
-
} else {
|
|
684
|
-
// Use unzip on Unix
|
|
685
|
-
fs.mkdirSync(extDest, { recursive: true });
|
|
686
|
-
await execAsync(`unzip -o "${vsixPath}" -d "${extDest}"`, { timeout: 30000 });
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
// Move extension contents from extension/ subfolder to root if needed
|
|
690
|
-
const extSubfolder = path.join(extDest, "extension");
|
|
691
|
-
if (fs.existsSync(extSubfolder)) {
|
|
692
|
-
// Use cpSync instead of renameSync for reliability
|
|
693
|
-
for (const item of fs.readdirSync(extSubfolder)) {
|
|
694
|
-
const src = path.join(extSubfolder, item);
|
|
695
|
-
const dest = path.join(extDest, item);
|
|
696
|
-
fs.cpSync(src, dest, { recursive: true });
|
|
697
|
-
}
|
|
698
|
-
fs.rmSync(extSubfolder, { recursive: true, force: true });
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
// Clean up VSIX manifest files (but keep them for now - needed for registration)
|
|
702
|
-
|
|
703
|
-
// Register extension in Antigravity's extensions.json
|
|
704
|
-
const extJsonPath = path.join(antigravityExt, "extensions.json");
|
|
705
|
-
try {
|
|
706
|
-
let extensions = [];
|
|
707
|
-
if (fs.existsSync(extJsonPath)) {
|
|
708
|
-
const content = fs.readFileSync(extJsonPath, "utf8");
|
|
709
|
-
extensions = JSON.parse(content);
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
// Check if already registered
|
|
713
|
-
const extId = "pikakit.pikakit-skill-generator";
|
|
714
|
-
const existing = extensions.findIndex(e => e.identifier?.id === extId);
|
|
715
|
-
|
|
716
|
-
if (existing >= 0) {
|
|
717
|
-
// Update existing entry
|
|
718
|
-
extensions[existing].version = "1.0.0";
|
|
719
|
-
extensions[existing].location = {
|
|
720
|
-
$mid: 1,
|
|
721
|
-
path: extDest.replace(/\\/g, "/").replace(/^([A-Z]):/, (_, d) => `/${d.toLowerCase()}:`),
|
|
722
|
-
scheme: "file"
|
|
723
|
-
};
|
|
724
|
-
} else {
|
|
725
|
-
// Add new entry
|
|
726
|
-
const newEntry = {
|
|
727
|
-
identifier: {
|
|
728
|
-
id: extId,
|
|
729
|
-
uuid: "pikakit-00000000-0000-0000-0000-000000000001"
|
|
730
|
-
},
|
|
731
|
-
version: "1.0.0",
|
|
732
|
-
location: {
|
|
733
|
-
$mid: 1,
|
|
734
|
-
path: extDest.replace(/\\/g, "/").replace(/^([A-Z]):/, (_, d) => `/${d.toLowerCase()}:`),
|
|
735
|
-
scheme: "file"
|
|
736
|
-
},
|
|
737
|
-
relativeLocation: "pikakit.pikakit-skill-generator-1.0.0-universal",
|
|
738
|
-
metadata: {
|
|
739
|
-
installedTimestamp: Date.now(),
|
|
740
|
-
source: "sideload",
|
|
741
|
-
id: "pikakit-00000000-0000-0000-0000-000000000001",
|
|
742
|
-
publisherId: "pikakit",
|
|
743
|
-
publisherDisplayName: "PikaKit",
|
|
744
|
-
targetPlatform: "universal",
|
|
745
|
-
updated: false,
|
|
746
|
-
private: false,
|
|
747
|
-
isPreReleaseVersion: false,
|
|
748
|
-
hasPreReleaseVersion: false
|
|
749
|
-
}
|
|
750
|
-
};
|
|
751
|
-
extensions.push(newEntry);
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
// Write back
|
|
755
|
-
fs.writeFileSync(extJsonPath, JSON.stringify(extensions), "utf8");
|
|
756
|
-
} catch (jsonErr) {
|
|
757
|
-
// Non-fatal, extension files are there anyway
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
installedTo.push("Antigravity");
|
|
761
|
-
} catch (extractErr) {
|
|
762
|
-
// Antigravity install failed, try fallback to source copy
|
|
763
|
-
try {
|
|
764
|
-
const outDir = path.join(vsixDir, "out");
|
|
765
|
-
if (fs.existsSync(outDir)) {
|
|
766
|
-
fs.mkdirSync(extDest, { recursive: true });
|
|
767
|
-
fs.cpSync(path.join(vsixDir, "package.json"), path.join(extDest, "package.json"));
|
|
768
|
-
fs.cpSync(outDir, path.join(extDest, "out"), { recursive: true });
|
|
769
|
-
installedTo.push("Antigravity");
|
|
770
|
-
}
|
|
771
|
-
} catch {
|
|
772
|
-
// Both methods failed
|
|
773
|
-
}
|
|
662
|
+
// Check if IDE config exists or if CLI is available
|
|
663
|
+
const hasConfig = ide.configPath && fs.existsSync(ide.configPath);
|
|
664
|
+
|
|
665
|
+
// Try to install via CLI
|
|
666
|
+
await execAsync(`${ide.cli} --install-extension "${vsixPath}"`, { timeout: 30000 });
|
|
667
|
+
installedTo.push(ide.name);
|
|
668
|
+
} catch {
|
|
669
|
+
// IDE not available or CLI failed, continue to next
|
|
774
670
|
}
|
|
775
671
|
}
|
|
776
672
|
|
|
777
673
|
if (installedTo.length > 0) {
|
|
778
674
|
extensionInstalled = true;
|
|
779
|
-
es.stop(`Installed PikaKit
|
|
675
|
+
es.stop(`Installed PikaKit Extension (${installedTo.join(", ")})`);
|
|
780
676
|
} else {
|
|
781
677
|
es.stop(c.yellow("VS Code extension not installed (no IDE detected)"));
|
|
782
678
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pikakit",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.7",
|
|
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>",
|