claudekit-cli 4.1.0-dev.1 → 4.1.0
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 +2 -2
- package/dist/index.js +180 -131
- package/package.json +1 -1
package/cli-manifest.json
CHANGED
package/dist/index.js
CHANGED
|
@@ -16137,14 +16137,10 @@ var init_frontmatter_parser = __esm(() => {
|
|
|
16137
16137
|
import { readdir } from "node:fs/promises";
|
|
16138
16138
|
import { homedir as homedir6 } from "node:os";
|
|
16139
16139
|
import { join as join6 } from "node:path";
|
|
16140
|
-
function getAgentSourcePath(
|
|
16141
|
-
const globalPath = join6(homedir6(), ".claude/agents");
|
|
16142
|
-
if (globalOnly) {
|
|
16143
|
-
return findFirstExistingPath([globalPath]);
|
|
16144
|
-
}
|
|
16140
|
+
function getAgentSourcePath() {
|
|
16145
16141
|
return findFirstExistingPath([
|
|
16146
16142
|
...getProjectLayoutCandidates(process.cwd(), "agents"),
|
|
16147
|
-
|
|
16143
|
+
join6(home3, ".claude/agents")
|
|
16148
16144
|
]);
|
|
16149
16145
|
}
|
|
16150
16146
|
async function discoverAgents(sourcePath) {
|
|
@@ -16181,10 +16177,12 @@ async function findAgentByName(name, sourcePath) {
|
|
|
16181
16177
|
const agents = await discoverAgents(sourcePath);
|
|
16182
16178
|
return agents.find((a3) => a3.name.toLowerCase() === name.toLowerCase()) || null;
|
|
16183
16179
|
}
|
|
16180
|
+
var home3;
|
|
16184
16181
|
var init_agents_discovery = __esm(() => {
|
|
16185
16182
|
init_kit_layout();
|
|
16186
16183
|
init_logger();
|
|
16187
16184
|
init_frontmatter_parser();
|
|
16185
|
+
home3 = homedir6();
|
|
16188
16186
|
});
|
|
16189
16187
|
|
|
16190
16188
|
// node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
@@ -20821,14 +20819,10 @@ var init_safe_prompts = __esm(() => {
|
|
|
20821
20819
|
import { readdir as readdir4 } from "node:fs/promises";
|
|
20822
20820
|
import { homedir as homedir10 } from "node:os";
|
|
20823
20821
|
import { join as join16, relative as relative3 } from "node:path";
|
|
20824
|
-
function getCommandSourcePath(
|
|
20825
|
-
const globalPath = join16(homedir10(), ".claude/commands");
|
|
20826
|
-
if (globalOnly) {
|
|
20827
|
-
return findFirstExistingPath([globalPath]);
|
|
20828
|
-
}
|
|
20822
|
+
function getCommandSourcePath() {
|
|
20829
20823
|
return findFirstExistingPath([
|
|
20830
20824
|
...getProjectLayoutCandidates(process.cwd(), "commands"),
|
|
20831
|
-
|
|
20825
|
+
join16(home4, ".claude/commands")
|
|
20832
20826
|
]);
|
|
20833
20827
|
}
|
|
20834
20828
|
async function scanCommandDir(dir, rootDir) {
|
|
@@ -20878,11 +20872,12 @@ async function findCommandByName(name, sourcePath) {
|
|
|
20878
20872
|
const commands = await discoverCommands(sourcePath);
|
|
20879
20873
|
return commands.find((c2) => c2.name.toLowerCase() === name.toLowerCase()) || commands.find((c2) => c2.displayName?.toLowerCase() === name.toLowerCase()) || null;
|
|
20880
20874
|
}
|
|
20881
|
-
var SKIP_DIRS;
|
|
20875
|
+
var home4, SKIP_DIRS;
|
|
20882
20876
|
var init_commands_discovery = __esm(() => {
|
|
20883
20877
|
init_kit_layout();
|
|
20884
20878
|
init_logger();
|
|
20885
20879
|
init_frontmatter_parser();
|
|
20880
|
+
home4 = homedir10();
|
|
20886
20881
|
SKIP_DIRS = ["node_modules", ".git", "dist", "build"];
|
|
20887
20882
|
});
|
|
20888
20883
|
|
|
@@ -49305,7 +49300,7 @@ function resolveAgentDirs() {
|
|
|
49305
49300
|
dirs.push({ path: candidate, label: rel });
|
|
49306
49301
|
}
|
|
49307
49302
|
}
|
|
49308
|
-
const globalPath = join28(
|
|
49303
|
+
const globalPath = join28(home5, ".claude", "agents");
|
|
49309
49304
|
dirs.push({ path: globalPath, label: "~/.claude/agents" });
|
|
49310
49305
|
const seen = new Set;
|
|
49311
49306
|
return dirs.filter(({ path: path3 }) => {
|
|
@@ -49394,11 +49389,11 @@ function registerAgentsBrowserRoutes(app) {
|
|
|
49394
49389
|
res.status(404).json({ error: "Agent not found" });
|
|
49395
49390
|
});
|
|
49396
49391
|
}
|
|
49397
|
-
var
|
|
49392
|
+
var home5;
|
|
49398
49393
|
var init_agents_routes = __esm(() => {
|
|
49399
49394
|
init_frontmatter_parser();
|
|
49400
49395
|
init_kit_layout();
|
|
49401
|
-
|
|
49396
|
+
home5 = homedir15();
|
|
49402
49397
|
});
|
|
49403
49398
|
|
|
49404
49399
|
// src/schemas/ck-config.schema.json
|
|
@@ -51450,10 +51445,10 @@ function mergeServers(lists) {
|
|
|
51450
51445
|
function isSafeProjectPath(projectPath) {
|
|
51451
51446
|
if (projectPath.includes(".."))
|
|
51452
51447
|
return false;
|
|
51453
|
-
const
|
|
51448
|
+
const home6 = homedir23();
|
|
51454
51449
|
try {
|
|
51455
51450
|
const resolved = resolve14(projectPath);
|
|
51456
|
-
if (!resolved.startsWith(
|
|
51451
|
+
if (!resolved.startsWith(home6))
|
|
51457
51452
|
return false;
|
|
51458
51453
|
return existsSync21(resolved);
|
|
51459
51454
|
} catch {
|
|
@@ -51779,34 +51774,26 @@ async function copyHooksCompanionDirs(sourceDir, targetDir) {
|
|
|
51779
51774
|
function resolveSourceOrigin(sourcePath) {
|
|
51780
51775
|
if (!sourcePath)
|
|
51781
51776
|
return "global";
|
|
51782
|
-
const
|
|
51777
|
+
const home6 = homedir24();
|
|
51783
51778
|
const cwd2 = process.cwd();
|
|
51784
|
-
if (cwd2 ===
|
|
51779
|
+
if (cwd2 === home6)
|
|
51785
51780
|
return "global";
|
|
51786
51781
|
const cwdPrefix = cwd2.endsWith(sep6) ? cwd2 : `${cwd2}${sep6}`;
|
|
51787
51782
|
if (sourcePath === cwd2 || sourcePath.startsWith(cwdPrefix))
|
|
51788
51783
|
return "project";
|
|
51789
51784
|
return "global";
|
|
51790
51785
|
}
|
|
51791
|
-
function getConfigSourcePath(
|
|
51792
|
-
if (globalOnly)
|
|
51793
|
-
return getGlobalConfigSourcePath();
|
|
51786
|
+
function getConfigSourcePath() {
|
|
51794
51787
|
return findExistingProjectConfigPath(process.cwd()) ?? getGlobalConfigSourcePath();
|
|
51795
51788
|
}
|
|
51796
51789
|
function getGlobalConfigSourcePath() {
|
|
51797
51790
|
return join41(homedir24(), ".claude", "CLAUDE.md");
|
|
51798
51791
|
}
|
|
51799
|
-
function getRulesSourcePath(
|
|
51800
|
-
|
|
51801
|
-
if (globalOnly)
|
|
51802
|
-
return globalPath;
|
|
51803
|
-
return findExistingProjectLayoutPath(process.cwd(), "rules") ?? globalPath;
|
|
51792
|
+
function getRulesSourcePath() {
|
|
51793
|
+
return findExistingProjectLayoutPath(process.cwd(), "rules") ?? join41(homedir24(), ".claude", "rules");
|
|
51804
51794
|
}
|
|
51805
|
-
function getHooksSourcePath(
|
|
51806
|
-
|
|
51807
|
-
if (globalOnly)
|
|
51808
|
-
return globalPath;
|
|
51809
|
-
return findExistingProjectLayoutPath(process.cwd(), "hooks") ?? globalPath;
|
|
51795
|
+
function getHooksSourcePath() {
|
|
51796
|
+
return findExistingProjectLayoutPath(process.cwd(), "hooks") ?? join41(homedir24(), ".claude", "hooks");
|
|
51810
51797
|
}
|
|
51811
51798
|
async function discoverConfig(sourcePath) {
|
|
51812
51799
|
const path3 = sourcePath ?? getConfigSourcePath();
|
|
@@ -54311,12 +54298,12 @@ function scrubHookEntry(entry, event, capabilities, pathRewrite) {
|
|
|
54311
54298
|
}
|
|
54312
54299
|
function rewriteCommandPath(command, pathRewrite) {
|
|
54313
54300
|
if (pathRewrite.commandSubstitutions && pathRewrite.commandSubstitutions.size > 0) {
|
|
54314
|
-
const
|
|
54301
|
+
const home6 = homedir26();
|
|
54315
54302
|
for (const [originalAbsPath, wrapperAbsPath] of pathRewrite.commandSubstitutions) {
|
|
54316
54303
|
const candidates = new Set([
|
|
54317
54304
|
originalAbsPath,
|
|
54318
|
-
originalAbsPath.replace(
|
|
54319
|
-
originalAbsPath.replace(
|
|
54305
|
+
originalAbsPath.replace(home6, "$HOME"),
|
|
54306
|
+
originalAbsPath.replace(home6, "~")
|
|
54320
54307
|
]);
|
|
54321
54308
|
for (const candidate of candidates) {
|
|
54322
54309
|
if (command.includes(candidate)) {
|
|
@@ -56122,17 +56109,13 @@ __export(exports_skills_discovery, {
|
|
|
56122
56109
|
import { readFile as readFile24, readdir as readdir13, stat as stat9 } from "node:fs/promises";
|
|
56123
56110
|
import { homedir as homedir28 } from "node:os";
|
|
56124
56111
|
import { dirname as dirname15, join as join45 } from "node:path";
|
|
56125
|
-
function getSkillSourcePath(
|
|
56126
|
-
const globalPath = join45(homedir28(), ".claude/skills");
|
|
56127
|
-
if (globalOnly) {
|
|
56128
|
-
return findFirstExistingPath([globalPath]);
|
|
56129
|
-
}
|
|
56112
|
+
function getSkillSourcePath() {
|
|
56130
56113
|
const bundledRoot = join45(process.cwd(), "node_modules", "claudekit-engineer");
|
|
56131
56114
|
return findFirstExistingPath([
|
|
56132
56115
|
join45(bundledRoot, "skills"),
|
|
56133
56116
|
...getProjectLayoutCandidates(bundledRoot, "skills"),
|
|
56134
56117
|
...getProjectLayoutCandidates(process.cwd(), "skills"),
|
|
56135
|
-
|
|
56118
|
+
join45(home6, ".claude/skills")
|
|
56136
56119
|
]);
|
|
56137
56120
|
}
|
|
56138
56121
|
async function hasSkillMd(dir) {
|
|
@@ -56245,12 +56228,13 @@ async function findSkillByName(name, sourcePath) {
|
|
|
56245
56228
|
const skills = await discoverSkills(sourcePath);
|
|
56246
56229
|
return skills.find((s) => s.name.toLowerCase() === name.toLowerCase()) || null;
|
|
56247
56230
|
}
|
|
56248
|
-
var import_gray_matter5, SKIP_DIRS3;
|
|
56231
|
+
var import_gray_matter5, home6, SKIP_DIRS3;
|
|
56249
56232
|
var init_skills_discovery = __esm(() => {
|
|
56250
56233
|
init_kit_layout();
|
|
56251
56234
|
init_skill_frontmatter_validator();
|
|
56252
56235
|
init_logger();
|
|
56253
56236
|
import_gray_matter5 = __toESM(require_gray_matter(), 1);
|
|
56237
|
+
home6 = homedir28();
|
|
56254
56238
|
SKIP_DIRS3 = ["node_modules", ".git", "dist", "build", ".venv", "__pycache__", "common"];
|
|
56255
56239
|
});
|
|
56256
56240
|
|
|
@@ -56891,13 +56875,13 @@ function recordHookRegistrationOutcome(provider, mergeResult, warnings, feedback
|
|
|
56891
56875
|
function warnConversionFallback(warning) {
|
|
56892
56876
|
console.warn(`[migrate] Falling back to raw checksum for ${sanitizeUntrusted(warning.provider)} ${sanitizeUntrusted(warning.type)} "${sanitizeUntrusted(warning.item, 80)}" because ${sanitizeUntrusted(warning.format)} conversion failed: ${sanitizeUntrusted(warning.error, 260)}`);
|
|
56893
56877
|
}
|
|
56894
|
-
async function discoverMigrationItems(include, configSource
|
|
56895
|
-
const agentsSource = include.agents ? getAgentSourcePath(
|
|
56896
|
-
const commandsSource = include.commands ? getCommandSourcePath(
|
|
56897
|
-
const skillsSource = include.skills ? getSkillSourcePath(
|
|
56898
|
-
const hooksSource = include.hooks ? getHooksSourcePath(
|
|
56899
|
-
const configSourcePath = include.config ? configSource ?? getConfigSourcePath(
|
|
56900
|
-
const rulesSourcePath = include.rules ? getRulesSourcePath(
|
|
56878
|
+
async function discoverMigrationItems(include, configSource) {
|
|
56879
|
+
const agentsSource = include.agents ? getAgentSourcePath() : null;
|
|
56880
|
+
const commandsSource = include.commands ? getCommandSourcePath() : null;
|
|
56881
|
+
const skillsSource = include.skills ? getSkillSourcePath() : null;
|
|
56882
|
+
const hooksSource = include.hooks ? getHooksSourcePath() : null;
|
|
56883
|
+
const configSourcePath = include.config ? configSource ?? getConfigSourcePath() : null;
|
|
56884
|
+
const rulesSourcePath = include.rules ? getRulesSourcePath() : null;
|
|
56901
56885
|
const [agents, commands, skills, configItem, ruleItems, hookItems] = await Promise.all([
|
|
56902
56886
|
agentsSource ? discoverAgents(agentsSource) : Promise.resolve([]),
|
|
56903
56887
|
commandsSource ? discoverCommands(commandsSource) : Promise.resolve([]),
|
|
@@ -56974,12 +56958,12 @@ function registerMigrationRoutes(app) {
|
|
|
56974
56958
|
};
|
|
56975
56959
|
const discovered = await discoverMigrationItems(includeAll);
|
|
56976
56960
|
const cwd2 = process.cwd();
|
|
56977
|
-
const
|
|
56961
|
+
const home7 = homedir29();
|
|
56978
56962
|
res.status(200).json({
|
|
56979
56963
|
cwd: cwd2,
|
|
56980
56964
|
targetPaths: {
|
|
56981
56965
|
project: join46(cwd2, ".claude"),
|
|
56982
|
-
global: join46(
|
|
56966
|
+
global: join46(home7, ".claude")
|
|
56983
56967
|
},
|
|
56984
56968
|
sourcePaths: discovered.sourcePaths,
|
|
56985
56969
|
sourceOrigins: {
|
|
@@ -57590,7 +57574,7 @@ function registerMigrationRoutes(app) {
|
|
|
57590
57574
|
const configSource = sourceParsed.value;
|
|
57591
57575
|
const effectiveGlobal = requestedGlobal;
|
|
57592
57576
|
const warnings = [];
|
|
57593
|
-
const discovered = await discoverMigrationItems(include, configSource
|
|
57577
|
+
const discovered = await discoverMigrationItems(include, configSource);
|
|
57594
57578
|
const hasItems = discovered.agents.length > 0 || discovered.commands.length > 0 || discovered.skills.length > 0 || discovered.configItem !== null || discovered.ruleItems.length > 0 || discovered.hookItems.length > 0;
|
|
57595
57579
|
if (!hasItems) {
|
|
57596
57580
|
res.status(200).json({
|
|
@@ -60601,8 +60585,8 @@ function toDateStr(d3) {
|
|
|
60601
60585
|
return `${y3}-${m2}-${day}`;
|
|
60602
60586
|
}
|
|
60603
60587
|
async function scanActivityMetrics(periodDays) {
|
|
60604
|
-
const
|
|
60605
|
-
const projectsDir2 = join56(
|
|
60588
|
+
const home7 = homedir33();
|
|
60589
|
+
const projectsDir2 = join56(home7, ".claude", "projects");
|
|
60606
60590
|
const cutoff = new Date;
|
|
60607
60591
|
cutoff.setDate(cutoff.getDate() - periodDays);
|
|
60608
60592
|
const dailyMap = new Map;
|
|
@@ -60672,29 +60656,29 @@ async function scanActivityMetrics(periodDays) {
|
|
|
60672
60656
|
return { totalSessions, projects: projectActivities, dailyCounts };
|
|
60673
60657
|
}
|
|
60674
60658
|
async function resolveSessionDir(projectId) {
|
|
60675
|
-
const
|
|
60659
|
+
const home7 = homedir33();
|
|
60676
60660
|
if (projectId.startsWith("discovered-")) {
|
|
60677
60661
|
try {
|
|
60678
60662
|
const encodedPathB64 = projectId.slice("discovered-".length);
|
|
60679
60663
|
const projectPath = Buffer.from(encodedPathB64, "base64url").toString("utf-8");
|
|
60680
60664
|
const claudeEncoded = encodePath(projectPath);
|
|
60681
|
-
return join56(
|
|
60665
|
+
return join56(home7, ".claude", "projects", claudeEncoded);
|
|
60682
60666
|
} catch {
|
|
60683
60667
|
return null;
|
|
60684
60668
|
}
|
|
60685
60669
|
}
|
|
60686
60670
|
if (projectId === "current") {
|
|
60687
60671
|
const cwdEncoded = encodePath(process.cwd());
|
|
60688
|
-
return join56(
|
|
60672
|
+
return join56(home7, ".claude", "projects", cwdEncoded);
|
|
60689
60673
|
}
|
|
60690
60674
|
if (projectId === "global") {
|
|
60691
|
-
const globalEncoded = encodePath(join56(
|
|
60692
|
-
return join56(
|
|
60675
|
+
const globalEncoded = encodePath(join56(home7, ".claude"));
|
|
60676
|
+
return join56(home7, ".claude", "projects", globalEncoded);
|
|
60693
60677
|
}
|
|
60694
60678
|
const registered = await ProjectsRegistryManager.getProject(projectId);
|
|
60695
60679
|
if (registered) {
|
|
60696
60680
|
const claudeEncoded = encodePath(registered.path);
|
|
60697
|
-
return join56(
|
|
60681
|
+
return join56(home7, ".claude", "projects", claudeEncoded);
|
|
60698
60682
|
}
|
|
60699
60683
|
return null;
|
|
60700
60684
|
}
|
|
@@ -60846,8 +60830,8 @@ async function parseSessionDetail(filePath, limit, offset) {
|
|
|
60846
60830
|
}
|
|
60847
60831
|
function registerSessionRoutes(app) {
|
|
60848
60832
|
app.get("/api/sessions", async (_req, res) => {
|
|
60849
|
-
const
|
|
60850
|
-
const projectsDir2 = join56(
|
|
60833
|
+
const home7 = homedir33();
|
|
60834
|
+
const projectsDir2 = join56(home7, ".claude", "projects");
|
|
60851
60835
|
if (!existsSync37(projectsDir2)) {
|
|
60852
60836
|
res.json({ projects: [] });
|
|
60853
60837
|
return;
|
|
@@ -61530,10 +61514,10 @@ function hasOpenCodeInstallSignal2() {
|
|
|
61530
61514
|
join59(process.cwd(), "opencode.jsonc"),
|
|
61531
61515
|
join59(process.cwd(), ".opencode/agents"),
|
|
61532
61516
|
join59(process.cwd(), ".opencode/commands"),
|
|
61533
|
-
join59(
|
|
61534
|
-
join59(
|
|
61535
|
-
join59(
|
|
61536
|
-
join59(
|
|
61517
|
+
join59(home7, ".config/opencode/AGENTS.md"),
|
|
61518
|
+
join59(home7, ".config/opencode/agents"),
|
|
61519
|
+
join59(home7, ".config/opencode/commands"),
|
|
61520
|
+
join59(home7, ".opencode", "bin", OPENCODE_BINARY_NAME2)
|
|
61537
61521
|
]);
|
|
61538
61522
|
}
|
|
61539
61523
|
async function detectInstalledAgents() {
|
|
@@ -61557,108 +61541,108 @@ function isSkillInstalled(skillName, agent, options2) {
|
|
|
61557
61541
|
const installPath = getInstallPath(skillName, agent, options2);
|
|
61558
61542
|
return existsSync38(installPath);
|
|
61559
61543
|
}
|
|
61560
|
-
var
|
|
61544
|
+
var home7, OPENCODE_BINARY_NAME2, agents;
|
|
61561
61545
|
var init_agents = __esm(() => {
|
|
61562
|
-
|
|
61546
|
+
home7 = homedir37();
|
|
61563
61547
|
OPENCODE_BINARY_NAME2 = platform5() === "win32" ? "opencode.exe" : "opencode";
|
|
61564
61548
|
agents = {
|
|
61565
61549
|
"claude-code": {
|
|
61566
61550
|
name: "claude-code",
|
|
61567
61551
|
displayName: "Claude Code",
|
|
61568
61552
|
projectPath: ".claude/skills",
|
|
61569
|
-
globalPath: join59(
|
|
61570
|
-
detect: async () => existsSync38(join59(
|
|
61553
|
+
globalPath: join59(home7, ".claude/skills"),
|
|
61554
|
+
detect: async () => existsSync38(join59(home7, ".claude"))
|
|
61571
61555
|
},
|
|
61572
61556
|
cursor: {
|
|
61573
61557
|
name: "cursor",
|
|
61574
61558
|
displayName: "Cursor",
|
|
61575
61559
|
projectPath: ".cursor/skills",
|
|
61576
|
-
globalPath: join59(
|
|
61577
|
-
detect: async () => existsSync38(join59(
|
|
61560
|
+
globalPath: join59(home7, ".cursor/skills"),
|
|
61561
|
+
detect: async () => existsSync38(join59(home7, ".cursor"))
|
|
61578
61562
|
},
|
|
61579
61563
|
codex: {
|
|
61580
61564
|
name: "codex",
|
|
61581
61565
|
displayName: "Codex",
|
|
61582
61566
|
projectPath: ".codex/skills",
|
|
61583
|
-
globalPath: join59(
|
|
61584
|
-
detect: async () => existsSync38(join59(
|
|
61567
|
+
globalPath: join59(home7, ".codex/skills"),
|
|
61568
|
+
detect: async () => existsSync38(join59(home7, ".codex"))
|
|
61585
61569
|
},
|
|
61586
61570
|
opencode: {
|
|
61587
61571
|
name: "opencode",
|
|
61588
61572
|
displayName: "OpenCode",
|
|
61589
61573
|
projectPath: ".claude/skills",
|
|
61590
|
-
globalPath: join59(
|
|
61574
|
+
globalPath: join59(home7, ".claude/skills"),
|
|
61591
61575
|
detect: async () => hasOpenCodeInstallSignal2()
|
|
61592
61576
|
},
|
|
61593
61577
|
goose: {
|
|
61594
61578
|
name: "goose",
|
|
61595
61579
|
displayName: "Goose",
|
|
61596
61580
|
projectPath: ".goose/skills",
|
|
61597
|
-
globalPath: join59(
|
|
61598
|
-
detect: async () => existsSync38(join59(
|
|
61581
|
+
globalPath: join59(home7, ".config/goose/skills"),
|
|
61582
|
+
detect: async () => existsSync38(join59(home7, ".config/goose"))
|
|
61599
61583
|
},
|
|
61600
61584
|
"gemini-cli": {
|
|
61601
61585
|
name: "gemini-cli",
|
|
61602
61586
|
displayName: "Gemini CLI",
|
|
61603
61587
|
projectPath: ".agents/skills",
|
|
61604
|
-
globalPath: join59(
|
|
61605
|
-
detect: async () => existsSync38(join59(
|
|
61588
|
+
globalPath: join59(home7, ".agents/skills"),
|
|
61589
|
+
detect: async () => existsSync38(join59(home7, ".gemini"))
|
|
61606
61590
|
},
|
|
61607
61591
|
antigravity: {
|
|
61608
61592
|
name: "antigravity",
|
|
61609
61593
|
displayName: "Antigravity",
|
|
61610
61594
|
projectPath: ".agent/skills",
|
|
61611
|
-
globalPath: join59(
|
|
61612
|
-
detect: async () => existsSync38(join59(process.cwd(), ".agent")) || existsSync38(join59(
|
|
61595
|
+
globalPath: join59(home7, ".gemini/antigravity/skills"),
|
|
61596
|
+
detect: async () => existsSync38(join59(process.cwd(), ".agent")) || existsSync38(join59(home7, ".gemini/antigravity"))
|
|
61613
61597
|
},
|
|
61614
61598
|
"github-copilot": {
|
|
61615
61599
|
name: "github-copilot",
|
|
61616
61600
|
displayName: "GitHub Copilot",
|
|
61617
61601
|
projectPath: ".github/skills",
|
|
61618
|
-
globalPath: join59(
|
|
61619
|
-
detect: async () => existsSync38(join59(
|
|
61602
|
+
globalPath: join59(home7, ".copilot/skills"),
|
|
61603
|
+
detect: async () => existsSync38(join59(home7, ".copilot"))
|
|
61620
61604
|
},
|
|
61621
61605
|
amp: {
|
|
61622
61606
|
name: "amp",
|
|
61623
61607
|
displayName: "Amp",
|
|
61624
61608
|
projectPath: ".agents/skills",
|
|
61625
|
-
globalPath: join59(
|
|
61626
|
-
detect: async () => existsSync38(join59(
|
|
61609
|
+
globalPath: join59(home7, ".config/agents/skills"),
|
|
61610
|
+
detect: async () => existsSync38(join59(home7, ".config/amp"))
|
|
61627
61611
|
},
|
|
61628
61612
|
kilo: {
|
|
61629
61613
|
name: "kilo",
|
|
61630
61614
|
displayName: "Kilo Code",
|
|
61631
61615
|
projectPath: ".kilocode/skills",
|
|
61632
|
-
globalPath: join59(
|
|
61633
|
-
detect: async () => existsSync38(join59(
|
|
61616
|
+
globalPath: join59(home7, ".kilocode/skills"),
|
|
61617
|
+
detect: async () => existsSync38(join59(home7, ".kilocode"))
|
|
61634
61618
|
},
|
|
61635
61619
|
roo: {
|
|
61636
61620
|
name: "roo",
|
|
61637
61621
|
displayName: "Roo Code",
|
|
61638
61622
|
projectPath: ".roo/skills",
|
|
61639
|
-
globalPath: join59(
|
|
61640
|
-
detect: async () => existsSync38(join59(
|
|
61623
|
+
globalPath: join59(home7, ".roo/skills"),
|
|
61624
|
+
detect: async () => existsSync38(join59(home7, ".roo"))
|
|
61641
61625
|
},
|
|
61642
61626
|
windsurf: {
|
|
61643
61627
|
name: "windsurf",
|
|
61644
61628
|
displayName: "Windsurf",
|
|
61645
61629
|
projectPath: ".windsurf/skills",
|
|
61646
|
-
globalPath: join59(
|
|
61647
|
-
detect: async () => existsSync38(join59(
|
|
61630
|
+
globalPath: join59(home7, ".codeium/windsurf/skills"),
|
|
61631
|
+
detect: async () => existsSync38(join59(home7, ".codeium/windsurf"))
|
|
61648
61632
|
},
|
|
61649
61633
|
cline: {
|
|
61650
61634
|
name: "cline",
|
|
61651
61635
|
displayName: "Cline",
|
|
61652
61636
|
projectPath: ".cline/skills",
|
|
61653
|
-
globalPath: join59(
|
|
61654
|
-
detect: async () => existsSync38(join59(
|
|
61637
|
+
globalPath: join59(home7, ".cline/skills"),
|
|
61638
|
+
detect: async () => existsSync38(join59(home7, ".cline"))
|
|
61655
61639
|
},
|
|
61656
61640
|
openhands: {
|
|
61657
61641
|
name: "openhands",
|
|
61658
61642
|
displayName: "OpenHands",
|
|
61659
61643
|
projectPath: ".openhands/skills",
|
|
61660
|
-
globalPath: join59(
|
|
61661
|
-
detect: async () => existsSync38(join59(
|
|
61644
|
+
globalPath: join59(home7, ".openhands/skills"),
|
|
61645
|
+
detect: async () => existsSync38(join59(home7, ".openhands"))
|
|
61662
61646
|
}
|
|
61663
61647
|
};
|
|
61664
61648
|
});
|
|
@@ -61775,11 +61759,11 @@ async function syncRegistry() {
|
|
|
61775
61759
|
}
|
|
61776
61760
|
return { removed };
|
|
61777
61761
|
}
|
|
61778
|
-
var
|
|
61762
|
+
var home8, REGISTRY_PATH2, SkillInstallationSchema, SkillRegistrySchema, REGISTRY_PATH_MIGRATIONS;
|
|
61779
61763
|
var init_skills_registry = __esm(() => {
|
|
61780
61764
|
init_zod();
|
|
61781
|
-
|
|
61782
|
-
REGISTRY_PATH2 = join60(
|
|
61765
|
+
home8 = homedir38();
|
|
61766
|
+
REGISTRY_PATH2 = join60(home8, ".claudekit", "skill-registry.json");
|
|
61783
61767
|
SkillInstallationSchema = exports_external.object({
|
|
61784
61768
|
skill: exports_external.string(),
|
|
61785
61769
|
agent: exports_external.string(),
|
|
@@ -62890,7 +62874,7 @@ var package_default;
|
|
|
62890
62874
|
var init_package = __esm(() => {
|
|
62891
62875
|
package_default = {
|
|
62892
62876
|
name: "claudekit-cli",
|
|
62893
|
-
version: "4.1.0
|
|
62877
|
+
version: "4.1.0",
|
|
62894
62878
|
description: "CLI tool for bootstrapping and updating ClaudeKit projects",
|
|
62895
62879
|
type: "module",
|
|
62896
62880
|
repository: {
|
|
@@ -73995,6 +73979,76 @@ var init_ownership_display = __esm(() => {
|
|
|
73995
73979
|
import_picocolors25 = __toESM(require_picocolors(), 1);
|
|
73996
73980
|
});
|
|
73997
73981
|
|
|
73982
|
+
// src/ui/node_modules/picocolors/picocolors.js
|
|
73983
|
+
var require_picocolors2 = __commonJS((exports, module) => {
|
|
73984
|
+
var p = process || {};
|
|
73985
|
+
var argv = p.argv || [];
|
|
73986
|
+
var env2 = p.env || {};
|
|
73987
|
+
var isColorSupported = !(!!env2.NO_COLOR || argv.includes("--no-color")) && (!!env2.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env2.TERM !== "dumb" || !!env2.CI);
|
|
73988
|
+
var formatter = (open6, close, replace3 = open6) => (input) => {
|
|
73989
|
+
let string = "" + input, index = string.indexOf(close, open6.length);
|
|
73990
|
+
return ~index ? open6 + replaceClose(string, close, replace3, index) + close : open6 + string + close;
|
|
73991
|
+
};
|
|
73992
|
+
var replaceClose = (string, close, replace3, index) => {
|
|
73993
|
+
let result = "", cursor = 0;
|
|
73994
|
+
do {
|
|
73995
|
+
result += string.substring(cursor, index) + replace3;
|
|
73996
|
+
cursor = index + close.length;
|
|
73997
|
+
index = string.indexOf(close, cursor);
|
|
73998
|
+
} while (~index);
|
|
73999
|
+
return result + string.substring(cursor);
|
|
74000
|
+
};
|
|
74001
|
+
var createColors = (enabled = isColorSupported) => {
|
|
74002
|
+
let f3 = enabled ? formatter : () => String;
|
|
74003
|
+
return {
|
|
74004
|
+
isColorSupported: enabled,
|
|
74005
|
+
reset: f3("\x1B[0m", "\x1B[0m"),
|
|
74006
|
+
bold: f3("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
74007
|
+
dim: f3("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
74008
|
+
italic: f3("\x1B[3m", "\x1B[23m"),
|
|
74009
|
+
underline: f3("\x1B[4m", "\x1B[24m"),
|
|
74010
|
+
inverse: f3("\x1B[7m", "\x1B[27m"),
|
|
74011
|
+
hidden: f3("\x1B[8m", "\x1B[28m"),
|
|
74012
|
+
strikethrough: f3("\x1B[9m", "\x1B[29m"),
|
|
74013
|
+
black: f3("\x1B[30m", "\x1B[39m"),
|
|
74014
|
+
red: f3("\x1B[31m", "\x1B[39m"),
|
|
74015
|
+
green: f3("\x1B[32m", "\x1B[39m"),
|
|
74016
|
+
yellow: f3("\x1B[33m", "\x1B[39m"),
|
|
74017
|
+
blue: f3("\x1B[34m", "\x1B[39m"),
|
|
74018
|
+
magenta: f3("\x1B[35m", "\x1B[39m"),
|
|
74019
|
+
cyan: f3("\x1B[36m", "\x1B[39m"),
|
|
74020
|
+
white: f3("\x1B[37m", "\x1B[39m"),
|
|
74021
|
+
gray: f3("\x1B[90m", "\x1B[39m"),
|
|
74022
|
+
bgBlack: f3("\x1B[40m", "\x1B[49m"),
|
|
74023
|
+
bgRed: f3("\x1B[41m", "\x1B[49m"),
|
|
74024
|
+
bgGreen: f3("\x1B[42m", "\x1B[49m"),
|
|
74025
|
+
bgYellow: f3("\x1B[43m", "\x1B[49m"),
|
|
74026
|
+
bgBlue: f3("\x1B[44m", "\x1B[49m"),
|
|
74027
|
+
bgMagenta: f3("\x1B[45m", "\x1B[49m"),
|
|
74028
|
+
bgCyan: f3("\x1B[46m", "\x1B[49m"),
|
|
74029
|
+
bgWhite: f3("\x1B[47m", "\x1B[49m"),
|
|
74030
|
+
blackBright: f3("\x1B[90m", "\x1B[39m"),
|
|
74031
|
+
redBright: f3("\x1B[91m", "\x1B[39m"),
|
|
74032
|
+
greenBright: f3("\x1B[92m", "\x1B[39m"),
|
|
74033
|
+
yellowBright: f3("\x1B[93m", "\x1B[39m"),
|
|
74034
|
+
blueBright: f3("\x1B[94m", "\x1B[39m"),
|
|
74035
|
+
magentaBright: f3("\x1B[95m", "\x1B[39m"),
|
|
74036
|
+
cyanBright: f3("\x1B[96m", "\x1B[39m"),
|
|
74037
|
+
whiteBright: f3("\x1B[97m", "\x1B[39m"),
|
|
74038
|
+
bgBlackBright: f3("\x1B[100m", "\x1B[49m"),
|
|
74039
|
+
bgRedBright: f3("\x1B[101m", "\x1B[49m"),
|
|
74040
|
+
bgGreenBright: f3("\x1B[102m", "\x1B[49m"),
|
|
74041
|
+
bgYellowBright: f3("\x1B[103m", "\x1B[49m"),
|
|
74042
|
+
bgBlueBright: f3("\x1B[104m", "\x1B[49m"),
|
|
74043
|
+
bgMagentaBright: f3("\x1B[105m", "\x1B[49m"),
|
|
74044
|
+
bgCyanBright: f3("\x1B[106m", "\x1B[49m"),
|
|
74045
|
+
bgWhiteBright: f3("\x1B[107m", "\x1B[49m")
|
|
74046
|
+
};
|
|
74047
|
+
};
|
|
74048
|
+
module.exports = createColors();
|
|
74049
|
+
module.exports.createColors = createColors;
|
|
74050
|
+
});
|
|
74051
|
+
|
|
73998
74052
|
// src/commands/watch/phases/implementation-git-helpers.ts
|
|
73999
74053
|
import { spawn as spawn5 } from "node:child_process";
|
|
74000
74054
|
async function getCurrentBranch2(cwd2) {
|
|
@@ -85544,16 +85598,16 @@ async function checkPathRefsValid(projectDir) {
|
|
|
85544
85598
|
};
|
|
85545
85599
|
}
|
|
85546
85600
|
const baseDir = dirname27(claudeMdPath);
|
|
85547
|
-
const
|
|
85601
|
+
const home9 = homedir41();
|
|
85548
85602
|
const broken = [];
|
|
85549
85603
|
for (const ref of refs) {
|
|
85550
85604
|
let refPath;
|
|
85551
85605
|
if (ref.startsWith("$HOME") || ref.startsWith("${HOME}") || ref.startsWith("%USERPROFILE%")) {
|
|
85552
|
-
refPath = normalize6(ref.replace(/^\$\{?HOME\}?/,
|
|
85606
|
+
refPath = normalize6(ref.replace(/^\$\{?HOME\}?/, home9).replace("%USERPROFILE%", home9));
|
|
85553
85607
|
} else if (ref.startsWith("$CLAUDE_PROJECT_DIR") || ref.startsWith("${CLAUDE_PROJECT_DIR}") || ref.startsWith("%CLAUDE_PROJECT_DIR%")) {
|
|
85554
85608
|
refPath = normalize6(ref.replace(/^\$\{?CLAUDE_PROJECT_DIR\}?/, projectDir).replace("%CLAUDE_PROJECT_DIR%", projectDir));
|
|
85555
85609
|
} else if (ref.startsWith("~")) {
|
|
85556
|
-
refPath = normalize6(ref.replace(/^~/,
|
|
85610
|
+
refPath = normalize6(ref.replace(/^~/, home9));
|
|
85557
85611
|
} else if (ref.startsWith("/")) {
|
|
85558
85612
|
refPath = normalize6(ref);
|
|
85559
85613
|
} else if (/^[A-Za-z]:/.test(ref)) {
|
|
@@ -85562,7 +85616,7 @@ async function checkPathRefsValid(projectDir) {
|
|
|
85562
85616
|
refPath = resolve32(baseDir, ref);
|
|
85563
85617
|
}
|
|
85564
85618
|
const normalizedPath = normalize6(refPath);
|
|
85565
|
-
const isWithinHome = normalizedPath.startsWith(
|
|
85619
|
+
const isWithinHome = normalizedPath.startsWith(home9);
|
|
85566
85620
|
const isWithinBase2 = normalizedPath.startsWith(normalize6(baseDir));
|
|
85567
85621
|
const isAbsoluteAllowed = ref.startsWith("/") || /^[A-Za-z]:/.test(ref);
|
|
85568
85622
|
if (!isWithinHome && !isWithinBase2 && !isAbsoluteAllowed) {
|
|
@@ -86691,12 +86745,12 @@ function extractHookScriptPath(cmd) {
|
|
|
86691
86745
|
}
|
|
86692
86746
|
function resolveHookScriptPath(scriptPath, projectDir) {
|
|
86693
86747
|
let resolved = scriptPath.replace(/\\/g, "/");
|
|
86694
|
-
const
|
|
86695
|
-
resolved = resolved.replace(/^\$\{?HOME\}?/,
|
|
86748
|
+
const home9 = homedir42();
|
|
86749
|
+
resolved = resolved.replace(/^\$\{?HOME\}?/, home9);
|
|
86696
86750
|
resolved = resolved.replace(/^\$\{?CLAUDE_PROJECT_DIR\}?/, projectDir);
|
|
86697
|
-
resolved = resolved.replace(/^%USERPROFILE%/,
|
|
86751
|
+
resolved = resolved.replace(/^%USERPROFILE%/, home9);
|
|
86698
86752
|
resolved = resolved.replace(/^%CLAUDE_PROJECT_DIR%/, projectDir);
|
|
86699
|
-
resolved = resolved.replace(/^~\//, `${
|
|
86753
|
+
resolved = resolved.replace(/^~\//, `${home9}/`);
|
|
86700
86754
|
if (resolved.startsWith(".claude/") || resolved === ".claude") {
|
|
86701
86755
|
resolved = join83(projectDir, resolved);
|
|
86702
86756
|
}
|
|
@@ -88745,8 +88799,8 @@ class ReportGenerator {
|
|
|
88745
88799
|
};
|
|
88746
88800
|
}
|
|
88747
88801
|
scrubPath(path7) {
|
|
88748
|
-
const
|
|
88749
|
-
return
|
|
88802
|
+
const home9 = process.env.HOME || process.env.USERPROFILE || "";
|
|
88803
|
+
return home9 ? path7.replace(home9, "~") : path7;
|
|
88750
88804
|
}
|
|
88751
88805
|
getStatusIcon(status) {
|
|
88752
88806
|
switch (status) {
|
|
@@ -88860,8 +88914,8 @@ class DoctorUIRenderer {
|
|
|
88860
88914
|
}
|
|
88861
88915
|
}
|
|
88862
88916
|
shortenPath(path7) {
|
|
88863
|
-
const
|
|
88864
|
-
let shortened =
|
|
88917
|
+
const home9 = process.env.HOME || process.env.USERPROFILE || "";
|
|
88918
|
+
let shortened = home9 ? path7.replace(home9, "~") : path7;
|
|
88865
88919
|
const maxLen = 50;
|
|
88866
88920
|
if (shortened.length > maxLen) {
|
|
88867
88921
|
const start = shortened.slice(0, 20);
|
|
@@ -107431,7 +107485,7 @@ import { basename as basename27, join as join142, resolve as resolve46 } from "n
|
|
|
107431
107485
|
init_logger();
|
|
107432
107486
|
|
|
107433
107487
|
// src/ui/ck-cli-design/tokens.ts
|
|
107434
|
-
var import_picocolors27 = __toESM(
|
|
107488
|
+
var import_picocolors27 = __toESM(require_picocolors2(), 1);
|
|
107435
107489
|
import { homedir as homedir47, platform as platform16 } from "node:os";
|
|
107436
107490
|
import { resolve as resolve45, win32 as win322 } from "node:path";
|
|
107437
107491
|
var PANEL_MIN_WIDTH = 60;
|
|
@@ -107590,11 +107644,11 @@ function wrapText(value, width) {
|
|
|
107590
107644
|
}
|
|
107591
107645
|
function formatDisplayPath(value) {
|
|
107592
107646
|
const normalized = value.replace(/\\/g, "/");
|
|
107593
|
-
const
|
|
107594
|
-
if (normalized ===
|
|
107647
|
+
const home9 = homedir47().replace(/\\/g, "/");
|
|
107648
|
+
if (normalized === home9)
|
|
107595
107649
|
return "~";
|
|
107596
|
-
if (normalized.startsWith(`${
|
|
107597
|
-
return normalized.replace(
|
|
107650
|
+
if (normalized.startsWith(`${home9}/`)) {
|
|
107651
|
+
return normalized.replace(home9, "~");
|
|
107598
107652
|
}
|
|
107599
107653
|
return normalized;
|
|
107600
107654
|
}
|
|
@@ -108048,8 +108102,8 @@ function pickGenericModel(models) {
|
|
|
108048
108102
|
return sorted[0] ?? null;
|
|
108049
108103
|
}
|
|
108050
108104
|
async function resolveOpenCodeDefaultModel(opts = {}) {
|
|
108051
|
-
const
|
|
108052
|
-
const authedProviders = await readAuthedProviders(
|
|
108105
|
+
const home9 = opts.homeDir ?? homedir49();
|
|
108106
|
+
const authedProviders = await readAuthedProviders(home9);
|
|
108053
108107
|
if (authedProviders.length === 0) {
|
|
108054
108108
|
return { ok: false, reason: "no-auth", authedProviders: [] };
|
|
108055
108109
|
}
|
|
@@ -109128,16 +109182,15 @@ async function migrateCommand(options2) {
|
|
|
109128
109182
|
const scope = resolveMigrationScope(process.argv.slice(2), options2);
|
|
109129
109183
|
const spinner = de();
|
|
109130
109184
|
spinner.start("Discovering portable items...");
|
|
109131
|
-
const
|
|
109132
|
-
const
|
|
109133
|
-
const
|
|
109134
|
-
const
|
|
109135
|
-
const
|
|
109136
|
-
const rulesSourcePath = scope.rules ? getRulesSourcePath(sourceGlobalOnly) : null;
|
|
109185
|
+
const agentSource = scope.agents ? getAgentSourcePath() : null;
|
|
109186
|
+
const commandSource = scope.commands ? getCommandSourcePath() : null;
|
|
109187
|
+
const skillSource = scope.skills ? getSkillSourcePath() : null;
|
|
109188
|
+
const hooksSource = scope.hooks ? getHooksSourcePath() : null;
|
|
109189
|
+
const rulesSourcePath = scope.rules ? getRulesSourcePath() : null;
|
|
109137
109190
|
const agents2 = agentSource ? await discoverAgents(agentSource) : [];
|
|
109138
109191
|
const commands = commandSource ? await discoverCommands(commandSource) : [];
|
|
109139
109192
|
const skills = skillSource ? await discoverSkills(skillSource) : [];
|
|
109140
|
-
const configItem = scope.config ? await discoverConfig(options2.source
|
|
109193
|
+
const configItem = scope.config ? await discoverConfig(options2.source) : null;
|
|
109141
109194
|
const ruleItems = rulesSourcePath ? await discoverRules(rulesSourcePath) : [];
|
|
109142
109195
|
const { items: hookItems, skippedShellHooks } = hooksSource ? await discoverHooks(hooksSource) : { items: [], skippedShellHooks: [] };
|
|
109143
109196
|
if (skippedShellHooks.length > 0) {
|
|
@@ -109285,11 +109338,7 @@ async function migrateCommand(options2) {
|
|
|
109285
109338
|
title: "ck migrate"
|
|
109286
109339
|
}).join(`
|
|
109287
109340
|
`));
|
|
109288
|
-
|
|
109289
|
-
f2.info(import_picocolors30.default.dim(` Scope: global (--global / -g) - reading from ${formatDisplayPath(join142(homedir51(), ".claude"))}`));
|
|
109290
|
-
} else {
|
|
109291
|
-
f2.info(import_picocolors30.default.dim(` CWD: ${process.cwd()}`));
|
|
109292
|
-
}
|
|
109341
|
+
f2.info(import_picocolors30.default.dim(` CWD: ${process.cwd()}`));
|
|
109293
109342
|
console.log();
|
|
109294
109343
|
console.log(renderPanel({
|
|
109295
109344
|
title: "Found",
|