vibe-cokit 1.7.0 → 1.7.2
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/dist/cli.js +25 -7
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2388,6 +2388,15 @@ async function getSkillsVersion() {
|
|
|
2388
2388
|
const settings = await readSettings();
|
|
2389
2389
|
return get_default(settings, "skillsVersion", null);
|
|
2390
2390
|
}
|
|
2391
|
+
async function updateAntigravityVersion(commitSha) {
|
|
2392
|
+
const settings = await readSettings();
|
|
2393
|
+
settings.antigravityVersion = commitSha;
|
|
2394
|
+
await writeSettings(settings);
|
|
2395
|
+
}
|
|
2396
|
+
async function getAntigravityVersion() {
|
|
2397
|
+
const settings = await readSettings();
|
|
2398
|
+
return get_default(settings, "antigravityVersion", null);
|
|
2399
|
+
}
|
|
2391
2400
|
async function upgradeCli() {
|
|
2392
2401
|
const { stdout: installedRaw } = await exec2("bun", ["pm", "ls", "-g"]);
|
|
2393
2402
|
const match = installedRaw.match(/vibe-cokit@(\S+)/);
|
|
@@ -2401,7 +2410,7 @@ async function upgradeCli() {
|
|
|
2401
2410
|
return { upgraded: true, from: currentVersion, to: latestVersion };
|
|
2402
2411
|
}
|
|
2403
2412
|
async function copyAgentFolder(srcDir) {
|
|
2404
|
-
const dest = join(process.cwd(), ".
|
|
2413
|
+
const dest = join(process.cwd(), ".agents");
|
|
2405
2414
|
await mkdir(dest, { recursive: true });
|
|
2406
2415
|
const entries = await readdir(srcDir, { withFileTypes: true });
|
|
2407
2416
|
for (const entry of entries) {
|
|
@@ -2492,17 +2501,17 @@ vibe-cokit init (antigravity)
|
|
|
2492
2501
|
await verifyPrerequisites();
|
|
2493
2502
|
log("Cloning antigravity configuration...");
|
|
2494
2503
|
await cloneRepo(tmpDir, ANTIGRAVITY_REPO);
|
|
2495
|
-
log("Copying agent config to .
|
|
2504
|
+
log("Copying agent config to .agents/...");
|
|
2496
2505
|
await copyAgentFolder(tmpDir);
|
|
2497
2506
|
log("Updating .gitignore...");
|
|
2498
|
-
await ensureGitignore(".
|
|
2507
|
+
await ensureGitignore(".agents");
|
|
2499
2508
|
log("Updating version tracking...");
|
|
2500
2509
|
const sha = await getCommitSha(tmpDir);
|
|
2501
2510
|
await updateSettings(sha);
|
|
2502
2511
|
console.log(`
|
|
2503
2512
|
\u2713 Antigravity initialized successfully!`);
|
|
2504
2513
|
console.log(` Version: ${sha.slice(0, 8)}`);
|
|
2505
|
-
console.log(` Agent: ./.
|
|
2514
|
+
console.log(` Agent: ./.agents/
|
|
2506
2515
|
`);
|
|
2507
2516
|
} catch (err) {
|
|
2508
2517
|
console.error(`
|
|
@@ -2560,6 +2569,7 @@ vibe-cokit update (${agentType})
|
|
|
2560
2569
|
break;
|
|
2561
2570
|
case "antigravity":
|
|
2562
2571
|
await updateAntigravity(ref);
|
|
2572
|
+
await updateSkills(ref);
|
|
2563
2573
|
break;
|
|
2564
2574
|
}
|
|
2565
2575
|
console.log(`
|
|
@@ -2634,18 +2644,26 @@ async function updateSkills(ref) {
|
|
|
2634
2644
|
async function updateAntigravity(ref) {
|
|
2635
2645
|
const tmpDir = join3(TEMP_DIR, crypto.randomUUID());
|
|
2636
2646
|
try {
|
|
2647
|
+
log("Checking antigravity version...");
|
|
2648
|
+
const currentSha = await getAntigravityVersion();
|
|
2637
2649
|
log("Fetching latest antigravity version...");
|
|
2638
2650
|
const targetSha = await getRemoteSha(ref, ANTIGRAVITY_REPO);
|
|
2651
|
+
if (currentSha && currentSha === targetSha) {
|
|
2652
|
+
log(`Antigravity: up-to-date (${currentSha.slice(0, 8)})`);
|
|
2653
|
+
return;
|
|
2654
|
+
}
|
|
2639
2655
|
log("Cloning antigravity repository...");
|
|
2640
2656
|
await cloneRepo(tmpDir, ANTIGRAVITY_REPO);
|
|
2641
2657
|
if (ref) {
|
|
2642
2658
|
log(`Checking out ${ref}...`);
|
|
2643
2659
|
await exec3("git", ["-C", tmpDir, "checkout", ref]);
|
|
2644
2660
|
}
|
|
2645
|
-
log("Updating .
|
|
2661
|
+
log("Updating .agents/ folder...");
|
|
2646
2662
|
await copyAgentFolder(tmpDir);
|
|
2647
2663
|
const sha = await getCommitSha(tmpDir);
|
|
2648
|
-
|
|
2664
|
+
await updateAntigravityVersion(sha);
|
|
2665
|
+
const from = currentSha ? currentSha.slice(0, 8) : "none";
|
|
2666
|
+
log(`Antigravity updated: ${from} \u2192 ${sha.slice(0, 8)}`);
|
|
2649
2667
|
} finally {
|
|
2650
2668
|
await cleanup(tmpDir);
|
|
2651
2669
|
}
|
|
@@ -3644,7 +3662,7 @@ cli.command("", "A toolkit for interacting with Claude Code").action(() => {
|
|
|
3644
3662
|
cli.outputHelp();
|
|
3645
3663
|
});
|
|
3646
3664
|
cli.command("init [agent]", "Initialize vibe-cokit (claude-code | antigravity)").action((agent) => initCommand(agent));
|
|
3647
|
-
cli.command("update
|
|
3665
|
+
cli.command("update [agent] [ref]", "Update agent config to latest (claude-code | antigravity)").alias("upgrade").action((agent, ref) => updateCommand(agent, ref));
|
|
3648
3666
|
cli.command("skills [ref]", "Install or update skills from vibe-cokit").action(skillsCommand);
|
|
3649
3667
|
cli.command("help", "Show detailed usage guide").action(helpCommand);
|
|
3650
3668
|
cli.command("version", "Show version and installed commit IDs").action(versionCommand);
|