claudekit-cli 3.36.0-dev.7 → 3.36.0-dev.9
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/index.js +134 -21
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10508,7 +10508,7 @@ var require_gray_matter = __commonJS((exports, module) => {
|
|
|
10508
10508
|
// src/commands/portable/converters/direct-copy.ts
|
|
10509
10509
|
import { readFileSync } from "node:fs";
|
|
10510
10510
|
import { extname } from "node:path";
|
|
10511
|
-
function convertDirectCopy(item) {
|
|
10511
|
+
function convertDirectCopy(item, provider) {
|
|
10512
10512
|
let content;
|
|
10513
10513
|
try {
|
|
10514
10514
|
content = readFileSync(item.sourcePath, "utf-8");
|
|
@@ -10519,6 +10519,12 @@ function convertDirectCopy(item) {
|
|
|
10519
10519
|
content = item.body;
|
|
10520
10520
|
}
|
|
10521
10521
|
}
|
|
10522
|
+
if (provider && provider !== "claude-code") {
|
|
10523
|
+
const targetDir = PROVIDER_CONFIG_DIR[provider];
|
|
10524
|
+
if (targetDir) {
|
|
10525
|
+
content = content.replace(/\.claude\//g, targetDir);
|
|
10526
|
+
}
|
|
10527
|
+
}
|
|
10522
10528
|
const namespacedName = item.name.includes("/") || item.name.includes("\\") ? item.name.replace(/\\/g, "/") : item.segments && item.segments.length > 0 ? item.segments.join("/") : item.name;
|
|
10523
10529
|
const sourceExtension = extname(item.sourcePath);
|
|
10524
10530
|
let filename;
|
|
@@ -10533,9 +10539,25 @@ function convertDirectCopy(item) {
|
|
|
10533
10539
|
warnings: []
|
|
10534
10540
|
};
|
|
10535
10541
|
}
|
|
10536
|
-
var import_gray_matter;
|
|
10542
|
+
var import_gray_matter, PROVIDER_CONFIG_DIR;
|
|
10537
10543
|
var init_direct_copy = __esm(() => {
|
|
10538
10544
|
import_gray_matter = __toESM(require_gray_matter(), 1);
|
|
10545
|
+
PROVIDER_CONFIG_DIR = {
|
|
10546
|
+
opencode: ".opencode/",
|
|
10547
|
+
droid: ".factory/",
|
|
10548
|
+
windsurf: ".windsurf/",
|
|
10549
|
+
antigravity: ".agent/",
|
|
10550
|
+
cursor: ".cursor/",
|
|
10551
|
+
roo: ".roo/",
|
|
10552
|
+
kilo: ".kilocode/",
|
|
10553
|
+
goose: ".goose/",
|
|
10554
|
+
"gemini-cli": ".gemini/",
|
|
10555
|
+
amp: ".agents/",
|
|
10556
|
+
cline: ".cline/",
|
|
10557
|
+
openhands: ".openhands/",
|
|
10558
|
+
codex: ".codex/",
|
|
10559
|
+
"github-copilot": ".github/"
|
|
10560
|
+
};
|
|
10539
10561
|
});
|
|
10540
10562
|
|
|
10541
10563
|
// src/commands/portable/converters/fm-strip.ts
|
|
@@ -10652,12 +10674,84 @@ ${item.body}
|
|
|
10652
10674
|
warnings: []
|
|
10653
10675
|
};
|
|
10654
10676
|
}
|
|
10677
|
+
function replaceClaudePathsForOpenCode(content) {
|
|
10678
|
+
return content.replace(/\.claude\//g, ".opencode/");
|
|
10679
|
+
}
|
|
10680
|
+
function convertOpenCodeAgent(item) {
|
|
10681
|
+
const warnings = [];
|
|
10682
|
+
const agentName = item.frontmatter.name || item.name;
|
|
10683
|
+
const mode = agentName === "brainstormer" ? "primary" : "subagent";
|
|
10684
|
+
let toolsObj = null;
|
|
10685
|
+
if (item.frontmatter.tools) {
|
|
10686
|
+
const sourceTools = item.frontmatter.tools.split(",").map((t) => t.trim());
|
|
10687
|
+
const mapped = new Set;
|
|
10688
|
+
for (const tool of sourceTools) {
|
|
10689
|
+
const key = OPENCODE_TOOL_MAP[tool];
|
|
10690
|
+
if (key)
|
|
10691
|
+
mapped.add(key);
|
|
10692
|
+
}
|
|
10693
|
+
if (mapped.size > 0) {
|
|
10694
|
+
toolsObj = {};
|
|
10695
|
+
for (const key of mapped) {
|
|
10696
|
+
toolsObj[key] = true;
|
|
10697
|
+
}
|
|
10698
|
+
}
|
|
10699
|
+
}
|
|
10700
|
+
const fmLines = ["---"];
|
|
10701
|
+
const desc = (item.description || `Agent: ${agentName}`).replace(/\n/g, " ").trim();
|
|
10702
|
+
const truncatedDesc = desc.length > 200 ? `${desc.slice(0, 197)}...` : desc;
|
|
10703
|
+
fmLines.push(`description: ${JSON.stringify(truncatedDesc)}`);
|
|
10704
|
+
fmLines.push(`mode: ${mode}`);
|
|
10705
|
+
if (toolsObj) {
|
|
10706
|
+
fmLines.push("tools:");
|
|
10707
|
+
for (const [key, val] of Object.entries(toolsObj)) {
|
|
10708
|
+
fmLines.push(` ${key}: ${val}`);
|
|
10709
|
+
}
|
|
10710
|
+
}
|
|
10711
|
+
fmLines.push("---");
|
|
10712
|
+
const body = replaceClaudePathsForOpenCode(item.body);
|
|
10713
|
+
const content = `${fmLines.join(`
|
|
10714
|
+
`)}
|
|
10715
|
+
|
|
10716
|
+
${body}
|
|
10717
|
+
`;
|
|
10718
|
+
return {
|
|
10719
|
+
content,
|
|
10720
|
+
filename: `${item.name}.md`,
|
|
10721
|
+
warnings
|
|
10722
|
+
};
|
|
10723
|
+
}
|
|
10724
|
+
function convertOpenCodeCommand(item) {
|
|
10725
|
+
const fmLines = ["---"];
|
|
10726
|
+
const desc = (item.description || `Command: ${item.name}`).replace(/\n/g, " ").trim();
|
|
10727
|
+
const truncatedDesc = desc.length > 200 ? `${desc.slice(0, 197)}...` : desc;
|
|
10728
|
+
fmLines.push(`description: ${JSON.stringify(truncatedDesc)}`);
|
|
10729
|
+
if (item.frontmatter.agent) {
|
|
10730
|
+
fmLines.push(`agent: ${JSON.stringify(item.frontmatter.agent)}`);
|
|
10731
|
+
}
|
|
10732
|
+
fmLines.push("---");
|
|
10733
|
+
const body = replaceClaudePathsForOpenCode(item.body);
|
|
10734
|
+
const content = `${fmLines.join(`
|
|
10735
|
+
`)}
|
|
10736
|
+
|
|
10737
|
+
${body}
|
|
10738
|
+
`;
|
|
10739
|
+
return {
|
|
10740
|
+
content,
|
|
10741
|
+
filename: `${item.name}.md`,
|
|
10742
|
+
warnings: []
|
|
10743
|
+
};
|
|
10744
|
+
}
|
|
10655
10745
|
function convertFmToFm(item, provider) {
|
|
10656
10746
|
switch (provider) {
|
|
10657
10747
|
case "github-copilot":
|
|
10658
10748
|
return convertForCopilot(item);
|
|
10659
10749
|
case "cursor":
|
|
10660
10750
|
return convertForCursor(item);
|
|
10751
|
+
case "opencode":
|
|
10752
|
+
if (item.type === "command")
|
|
10753
|
+
return convertOpenCodeCommand(item);
|
|
10754
|
+
return convertOpenCodeAgent(item);
|
|
10661
10755
|
default:
|
|
10662
10756
|
return {
|
|
10663
10757
|
content: item.body,
|
|
@@ -10666,7 +10760,7 @@ function convertFmToFm(item, provider) {
|
|
|
10666
10760
|
};
|
|
10667
10761
|
}
|
|
10668
10762
|
}
|
|
10669
|
-
var COPILOT_TOOL_MAP;
|
|
10763
|
+
var COPILOT_TOOL_MAP, OPENCODE_TOOL_MAP;
|
|
10670
10764
|
var init_fm_to_fm = __esm(() => {
|
|
10671
10765
|
COPILOT_TOOL_MAP = {
|
|
10672
10766
|
Read: "read",
|
|
@@ -10679,6 +10773,18 @@ var init_fm_to_fm = __esm(() => {
|
|
|
10679
10773
|
WebFetch: "fetch",
|
|
10680
10774
|
WebSearch: "fetch"
|
|
10681
10775
|
};
|
|
10776
|
+
OPENCODE_TOOL_MAP = {
|
|
10777
|
+
Read: "read",
|
|
10778
|
+
Glob: "glob",
|
|
10779
|
+
Grep: "grep",
|
|
10780
|
+
Edit: "edit",
|
|
10781
|
+
Write: "write",
|
|
10782
|
+
MultiEdit: "patch",
|
|
10783
|
+
Bash: "bash",
|
|
10784
|
+
WebFetch: "webfetch",
|
|
10785
|
+
WebSearch: "websearch",
|
|
10786
|
+
NotebookEdit: "edit"
|
|
10787
|
+
};
|
|
10682
10788
|
});
|
|
10683
10789
|
|
|
10684
10790
|
// src/commands/portable/converters/fm-to-json.ts
|
|
@@ -10913,20 +11019,20 @@ var init_provider_registry = __esm(() => {
|
|
|
10913
11019
|
agents: {
|
|
10914
11020
|
projectPath: ".opencode/agents",
|
|
10915
11021
|
globalPath: join(home, ".config/opencode/agents"),
|
|
10916
|
-
format: "
|
|
11022
|
+
format: "fm-to-fm",
|
|
10917
11023
|
writeStrategy: "per-file",
|
|
10918
11024
|
fileExtension: ".md"
|
|
10919
11025
|
},
|
|
10920
11026
|
commands: {
|
|
10921
11027
|
projectPath: ".opencode/commands",
|
|
10922
11028
|
globalPath: join(home, ".config/opencode/commands"),
|
|
10923
|
-
format: "
|
|
11029
|
+
format: "fm-to-fm",
|
|
10924
11030
|
writeStrategy: "per-file",
|
|
10925
11031
|
fileExtension: ".md"
|
|
10926
11032
|
},
|
|
10927
11033
|
skills: {
|
|
10928
|
-
projectPath: ".opencode/
|
|
10929
|
-
globalPath: join(home, ".config/opencode/
|
|
11034
|
+
projectPath: ".opencode/skills",
|
|
11035
|
+
globalPath: join(home, ".config/opencode/skills"),
|
|
10930
11036
|
format: "direct-copy",
|
|
10931
11037
|
writeStrategy: "per-file",
|
|
10932
11038
|
fileExtension: ".md"
|
|
@@ -10952,11 +11058,11 @@ var init_provider_registry = __esm(() => {
|
|
|
10952
11058
|
join(cwd, "opencode.jsonc"),
|
|
10953
11059
|
join(cwd, ".opencode/agents"),
|
|
10954
11060
|
join(cwd, ".opencode/commands"),
|
|
10955
|
-
join(cwd, ".opencode/
|
|
11061
|
+
join(cwd, ".opencode/skills"),
|
|
10956
11062
|
join(home, ".config/opencode/AGENTS.md"),
|
|
10957
11063
|
join(home, ".config/opencode/agents"),
|
|
10958
11064
|
join(home, ".config/opencode/commands"),
|
|
10959
|
-
join(home, ".config/opencode/
|
|
11065
|
+
join(home, ".config/opencode/skills")
|
|
10960
11066
|
])
|
|
10961
11067
|
},
|
|
10962
11068
|
"github-copilot": {
|
|
@@ -11404,8 +11510,8 @@ var init_provider_registry = __esm(() => {
|
|
|
11404
11510
|
displayName: "Amp",
|
|
11405
11511
|
subagents: "full",
|
|
11406
11512
|
agents: {
|
|
11407
|
-
projectPath: "
|
|
11408
|
-
globalPath: join(home, ".config/
|
|
11513
|
+
projectPath: "AGENT.md",
|
|
11514
|
+
globalPath: join(home, ".config/AGENT.md"),
|
|
11409
11515
|
format: "fm-strip",
|
|
11410
11516
|
writeStrategy: "merge-single",
|
|
11411
11517
|
fileExtension: ".md"
|
|
@@ -11419,8 +11525,8 @@ var init_provider_registry = __esm(() => {
|
|
|
11419
11525
|
fileExtension: ".md"
|
|
11420
11526
|
},
|
|
11421
11527
|
config: {
|
|
11422
|
-
projectPath: "
|
|
11423
|
-
globalPath: join(home, ".config/
|
|
11528
|
+
projectPath: "AGENT.md",
|
|
11529
|
+
globalPath: join(home, ".config/AGENT.md"),
|
|
11424
11530
|
format: "md-strip",
|
|
11425
11531
|
writeStrategy: "merge-single",
|
|
11426
11532
|
fileExtension: ".md"
|
|
@@ -11437,7 +11543,8 @@ var init_provider_registry = __esm(() => {
|
|
|
11437
11543
|
detect: async () => hasAnyInstallSignal([
|
|
11438
11544
|
join(cwd, ".amp/rules"),
|
|
11439
11545
|
join(cwd, ".agents/skills"),
|
|
11440
|
-
join(
|
|
11546
|
+
join(cwd, "AGENT.md"),
|
|
11547
|
+
join(home, ".config/AGENT.md"),
|
|
11441
11548
|
join(home, ".config/amp/rules"),
|
|
11442
11549
|
join(home, ".config/agents/skills")
|
|
11443
11550
|
])
|
|
@@ -11502,8 +11609,8 @@ var init_provider_registry = __esm(() => {
|
|
|
11502
11609
|
agents: {
|
|
11503
11610
|
projectPath: ".clinerules",
|
|
11504
11611
|
globalPath: null,
|
|
11505
|
-
format: "fm-
|
|
11506
|
-
writeStrategy: "
|
|
11612
|
+
format: "fm-strip",
|
|
11613
|
+
writeStrategy: "per-file",
|
|
11507
11614
|
fileExtension: ".md"
|
|
11508
11615
|
},
|
|
11509
11616
|
commands: null,
|
|
@@ -11916,7 +12023,7 @@ function convertItem(item, format, provider) {
|
|
|
11916
12023
|
try {
|
|
11917
12024
|
switch (format) {
|
|
11918
12025
|
case "direct-copy":
|
|
11919
|
-
return convertDirectCopy(item);
|
|
12026
|
+
return convertDirectCopy(item, provider);
|
|
11920
12027
|
case "fm-to-fm":
|
|
11921
12028
|
return convertFmToFm(item, provider);
|
|
11922
12029
|
case "fm-to-yaml":
|
|
@@ -50790,11 +50897,15 @@ async function parseSkillMd(skillMdPath) {
|
|
|
50790
50897
|
logger.verbose(`Skipping ${skillMdPath}: cannot determine skill directory`);
|
|
50791
50898
|
return null;
|
|
50792
50899
|
}
|
|
50900
|
+
const metadata = data.metadata && typeof data.metadata === "object" ? data.metadata : undefined;
|
|
50901
|
+
const version = metadata?.version ?? data.version;
|
|
50902
|
+
const author = metadata?.author;
|
|
50793
50903
|
return {
|
|
50794
50904
|
name: dirName,
|
|
50795
50905
|
displayName: data.name,
|
|
50796
50906
|
description: data.description || "",
|
|
50797
|
-
version:
|
|
50907
|
+
version: version != null ? String(version) : undefined,
|
|
50908
|
+
author: author != null ? String(author) : undefined,
|
|
50798
50909
|
license: data.license,
|
|
50799
50910
|
path: skillDir
|
|
50800
50911
|
};
|
|
@@ -52382,6 +52493,8 @@ async function scanSkills() {
|
|
|
52382
52493
|
isAvailable: true,
|
|
52383
52494
|
sourcePath: entryPath,
|
|
52384
52495
|
sourceAgent: "claude-code",
|
|
52496
|
+
version: frontmatter?.metadata?.version != null ? String(frontmatter.metadata.version) : frontmatter?.version != null ? String(frontmatter.version) : undefined,
|
|
52497
|
+
author: frontmatter?.metadata?.author != null ? String(frontmatter.metadata.author) : undefined,
|
|
52385
52498
|
kit: meta?.kit,
|
|
52386
52499
|
installedVersion: meta?.installedVersion,
|
|
52387
52500
|
sourceTimestamp: meta?.sourceTimestamp,
|
|
@@ -53205,8 +53318,8 @@ var init_agents = __esm(() => {
|
|
|
53205
53318
|
opencode: {
|
|
53206
53319
|
name: "opencode",
|
|
53207
53320
|
displayName: "OpenCode",
|
|
53208
|
-
projectPath: ".opencode/
|
|
53209
|
-
globalPath: join32(home6, ".config/opencode/
|
|
53321
|
+
projectPath: ".opencode/skills",
|
|
53322
|
+
globalPath: join32(home6, ".config/opencode/skills"),
|
|
53210
53323
|
detect: async () => existsSync26(join32(home6, ".config/opencode"))
|
|
53211
53324
|
},
|
|
53212
53325
|
goose: {
|
|
@@ -54816,7 +54929,7 @@ var package_default;
|
|
|
54816
54929
|
var init_package = __esm(() => {
|
|
54817
54930
|
package_default = {
|
|
54818
54931
|
name: "claudekit-cli",
|
|
54819
|
-
version: "3.36.0-dev.
|
|
54932
|
+
version: "3.36.0-dev.9",
|
|
54820
54933
|
description: "CLI tool for bootstrapping and updating ClaudeKit projects",
|
|
54821
54934
|
type: "module",
|
|
54822
54935
|
repository: {
|