claudekit-cli 4.3.1-dev.13 → 4.3.1-dev.15
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/cli-manifest.json
CHANGED
package/dist/index.js
CHANGED
|
@@ -57569,6 +57569,12 @@ function getPlanItemsByType(plan, type) {
|
|
|
57569
57569
|
const normalized = list.filter((entry) => typeof entry === "string").map((entry) => entry.trim()).filter((entry) => entry.length > 0);
|
|
57570
57570
|
return Array.from(new Set(normalized));
|
|
57571
57571
|
}
|
|
57572
|
+
function hasPlanItemsForType(plan, type) {
|
|
57573
|
+
const meta = getPlanMeta(plan);
|
|
57574
|
+
if (!meta?.items || typeof meta.items !== "object")
|
|
57575
|
+
return false;
|
|
57576
|
+
return Array.isArray(meta.items[type]);
|
|
57577
|
+
}
|
|
57572
57578
|
function providerSupportsType(provider, type) {
|
|
57573
57579
|
if (type === "agent")
|
|
57574
57580
|
return getProvidersSupporting("agents").includes(provider);
|
|
@@ -58382,17 +58388,23 @@ function registerMigrationRoutes(app, deps) {
|
|
|
58382
58388
|
const plannedSkillActions = execActions.filter((a3) => a3.type === "skill").length;
|
|
58383
58389
|
if (includeFromPlan.skills && discovered2.skills.length > 0 && plannedSkillActions === 0) {
|
|
58384
58390
|
const allowedSkillNames = getPlanItemsByType(plan, "skills");
|
|
58391
|
+
const hasExplicitSkillItems = hasPlanItemsForType(plan, "skills");
|
|
58392
|
+
const skippedSkillKeys = new Set(plan.actions.filter((action) => action.type === "skill" && action.action === "skip").map((action) => JSON.stringify([action.provider, action.global, action.item])));
|
|
58385
58393
|
const plannedSkills = allowedSkillNames.length > 0 ? discovered2.skills.filter((skill) => allowedSkillNames.includes(skill.name)) : executionMode === "install" ? [] : discovered2.skills;
|
|
58386
58394
|
const skillProviders = allPlanProviders.filter((provider) => providerSupportsType(provider, "skill"));
|
|
58387
58395
|
if (skillProviders.length > 0) {
|
|
58388
|
-
for (const
|
|
58389
|
-
|
|
58390
|
-
|
|
58391
|
-
|
|
58392
|
-
|
|
58393
|
-
|
|
58394
|
-
|
|
58395
|
-
|
|
58396
|
+
for (const provider of skillProviders) {
|
|
58397
|
+
const skillScopes = new Set(plan.actions.filter((action) => action.provider === provider && action.type === "skill").map((action) => action.global));
|
|
58398
|
+
const scopes = skillScopes.size > 0 ? Array.from(skillScopes) : [false];
|
|
58399
|
+
for (const globalFromPlan2 of scopes) {
|
|
58400
|
+
const providerSkills = hasExplicitSkillItems ? plannedSkills.filter((skill) => !skippedSkillKeys.has(JSON.stringify([provider, globalFromPlan2, skill.name]))) : plannedSkills;
|
|
58401
|
+
for (const skill of providerSkills) {
|
|
58402
|
+
const batch = await installSkillDirectories([skill], [provider], {
|
|
58403
|
+
global: globalFromPlan2
|
|
58404
|
+
});
|
|
58405
|
+
tagResults(batch, "skills", skill.name);
|
|
58406
|
+
allResults.push(...batch);
|
|
58407
|
+
}
|
|
58396
58408
|
}
|
|
58397
58409
|
}
|
|
58398
58410
|
}
|
|
@@ -63794,7 +63806,7 @@ var package_default;
|
|
|
63794
63806
|
var init_package = __esm(() => {
|
|
63795
63807
|
package_default = {
|
|
63796
63808
|
name: "claudekit-cli",
|
|
63797
|
-
version: "4.3.1-dev.
|
|
63809
|
+
version: "4.3.1-dev.15",
|
|
63798
63810
|
description: "CLI tool for bootstrapping and updating ClaudeKit projects",
|
|
63799
63811
|
type: "module",
|
|
63800
63812
|
repository: {
|
|
@@ -93520,6 +93532,14 @@ init_types3();
|
|
|
93520
93532
|
import { constants as constants4 } from "node:fs";
|
|
93521
93533
|
import { access as access5, readdir as readdir23 } from "node:fs/promises";
|
|
93522
93534
|
import { join as join98 } from "node:path";
|
|
93535
|
+
async function pathExists11(path8) {
|
|
93536
|
+
try {
|
|
93537
|
+
await access5(path8, constants4.F_OK);
|
|
93538
|
+
return true;
|
|
93539
|
+
} catch {
|
|
93540
|
+
return false;
|
|
93541
|
+
}
|
|
93542
|
+
}
|
|
93523
93543
|
async function validateExtraction(extractDir) {
|
|
93524
93544
|
try {
|
|
93525
93545
|
const entries = await readdir23(extractDir, { encoding: "utf8" });
|
|
@@ -93527,16 +93547,28 @@ async function validateExtraction(extractDir) {
|
|
|
93527
93547
|
if (entries.length === 0) {
|
|
93528
93548
|
throw new ExtractionError("Extraction resulted in no files");
|
|
93529
93549
|
}
|
|
93530
|
-
const criticalPaths = [".claude"
|
|
93550
|
+
const criticalPaths = [".claude"];
|
|
93531
93551
|
const missingPaths = [];
|
|
93532
93552
|
for (const path8 of criticalPaths) {
|
|
93533
|
-
|
|
93534
|
-
await access5(join98(extractDir, path8), constants4.F_OK);
|
|
93553
|
+
if (await pathExists11(join98(extractDir, path8))) {
|
|
93535
93554
|
logger.debug(`Found: ${path8}`);
|
|
93536
|
-
|
|
93537
|
-
logger.warning(`Expected path not found: ${path8}`);
|
|
93538
|
-
missingPaths.push(path8);
|
|
93555
|
+
continue;
|
|
93539
93556
|
}
|
|
93557
|
+
logger.warning(`Expected path not found: ${path8}`);
|
|
93558
|
+
missingPaths.push(path8);
|
|
93559
|
+
}
|
|
93560
|
+
const guidancePaths = ["CLAUDE.md", ".claude/CLAUDE.md", ".claude/rules/CLAUDE.md"];
|
|
93561
|
+
let guidancePath = null;
|
|
93562
|
+
for (const path8 of guidancePaths) {
|
|
93563
|
+
if (await pathExists11(join98(extractDir, path8))) {
|
|
93564
|
+
guidancePath = path8;
|
|
93565
|
+
break;
|
|
93566
|
+
}
|
|
93567
|
+
}
|
|
93568
|
+
if (guidancePath) {
|
|
93569
|
+
logger.debug(`Found: ${guidancePath}`);
|
|
93570
|
+
} else {
|
|
93571
|
+
logger.debug("No CLAUDE.md guidance file found in extracted kit");
|
|
93540
93572
|
}
|
|
93541
93573
|
if (missingPaths.length > 0) {
|
|
93542
93574
|
logger.warning(`Some expected paths are missing: ${missingPaths.join(", ")}. This may not be a ClaudeKit project.`);
|