@ariestools/toolchain 8.7.23 → 8.7.24
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/actions/fix.d.ts.map +1 -1
- package/dist/actions/ruleCatalog.d.ts +1 -0
- package/dist/actions/ruleCatalog.d.ts.map +1 -1
- package/dist/actions/work/helpers.d.ts +21 -0
- package/dist/actions/work/helpers.d.ts.map +1 -0
- package/dist/actions/work/index.d.ts +29 -86
- package/dist/actions/work/index.d.ts.map +1 -1
- package/dist/actions/work/lifecycle.d.ts +41 -0
- package/dist/actions/work/lifecycle.d.ts.map +1 -0
- package/dist/actions/work/lint.d.ts +21 -0
- package/dist/actions/work/lint.d.ts.map +1 -0
- package/dist/actions/work/list.d.ts +30 -0
- package/dist/actions/work/list.d.ts.map +1 -0
- package/dist/actions/work/move.d.ts +21 -0
- package/dist/actions/work/move.d.ts.map +1 -0
- package/dist/actions/work/queue.d.ts +26 -0
- package/dist/actions/work/queue.d.ts.map +1 -0
- package/dist/actions/work/render.d.ts +10 -3
- package/dist/actions/work/render.d.ts.map +1 -1
- package/dist/actions/work/store.d.ts +5 -0
- package/dist/actions/work/store.d.ts.map +1 -1
- package/dist/actions/work/sync.d.ts +20 -0
- package/dist/actions/work/sync.d.ts.map +1 -1
- package/dist/actions/work/workspace.d.ts +46 -0
- package/dist/actions/work/workspace.d.ts.map +1 -0
- package/dist/bin/package/build.mjs +6 -0
- package/dist/bin/package/build.mjs.map +1 -1
- package/dist/bin/package/clean.mjs +6 -0
- package/dist/bin/package/clean.mjs.map +1 -1
- package/dist/bin/package/publint.mjs +6 -0
- package/dist/bin/package/publint.mjs.map +1 -1
- package/dist/bin/package/recompile.mjs +6 -0
- package/dist/bin/package/recompile.mjs.map +1 -1
- package/dist/bin/skills.mjs +220 -76
- package/dist/bin/skills.mjs.map +1 -1
- package/dist/bin/xy.mjs +2004 -1031
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/lib/ruleCommandRegistry.d.ts +6 -0
- package/dist/lib/ruleCommandRegistry.d.ts.map +1 -1
- package/dist/xy/common/work/addCommand.d.ts.map +1 -1
- package/dist/xy/common/work/claimCommand.d.ts.map +1 -1
- package/dist/xy/common/work/doneCommand.d.ts.map +1 -1
- package/dist/xy/common/work/index.d.ts.map +1 -1
- package/dist/xy/common/work/initCommand.d.ts.map +1 -1
- package/dist/xy/common/work/lintCommand.d.ts +3 -0
- package/dist/xy/common/work/lintCommand.d.ts.map +1 -0
- package/dist/xy/common/work/listCommand.d.ts.map +1 -1
- package/dist/xy/common/work/moveCommand.d.ts +3 -0
- package/dist/xy/common/work/moveCommand.d.ts.map +1 -0
- package/dist/xy/common/work/nextCommand.d.ts.map +1 -1
- package/dist/xy/common/work/options.d.ts +8 -0
- package/dist/xy/common/work/options.d.ts.map +1 -1
- package/dist/xy/common/work/queueCommand.d.ts.map +1 -1
- package/dist/xy/common/work/showCommand.d.ts.map +1 -1
- package/dist/xy/common/work/syncCommand.d.ts.map +1 -1
- package/dist/xy/common/work/triageCommand.d.ts.map +1 -1
- package/dist/xy/common/work/updateCommand.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/bin/skills.mjs
CHANGED
|
@@ -41,7 +41,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
41
41
|
};
|
|
42
42
|
var __require$1 = /* #__PURE__ */ (() => createRequire(import.meta.url))();
|
|
43
43
|
//#endregion
|
|
44
|
-
//#region ../../node_modules/.pnpm/skills@1.5.
|
|
44
|
+
//#region ../../node_modules/.pnpm/skills@1.5.20/node_modules/skills/dist/_chunks/rolldown-runtime.mjs
|
|
45
45
|
var __create, __defProp$1, __getOwnPropDesc$1, __getOwnPropNames$1, __getProtoOf, __hasOwnProp$1, __commonJSMin, __copyProps$1, __toESM, __require;
|
|
46
46
|
var init_rolldown_runtime = __esmMin((() => {
|
|
47
47
|
__create = Object.create;
|
|
@@ -68,7 +68,7 @@ var init_rolldown_runtime = __esmMin((() => {
|
|
|
68
68
|
__require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
|
|
69
69
|
}));
|
|
70
70
|
//#endregion
|
|
71
|
-
//#region ../../node_modules/.pnpm/skills@1.5.
|
|
71
|
+
//#region ../../node_modules/.pnpm/skills@1.5.20/node_modules/skills/dist/_chunks/libs/@clack/core.mjs
|
|
72
72
|
function wrapAnsi(string, columns, options) {
|
|
73
73
|
return String(string).normalize().split(CRLF_OR_LF).map((line) => exec(line, columns, options)).join("\n");
|
|
74
74
|
}
|
|
@@ -771,7 +771,7 @@ var init_core = __esmMin((() => {
|
|
|
771
771
|
};
|
|
772
772
|
}));
|
|
773
773
|
//#endregion
|
|
774
|
-
//#region ../../node_modules/.pnpm/skills@1.5.
|
|
774
|
+
//#region ../../node_modules/.pnpm/skills@1.5.20/node_modules/skills/dist/_chunks/libs/@clack/prompts.mjs
|
|
775
775
|
function isUnicodeSupported() {
|
|
776
776
|
if (process$1.platform !== "win32") return process$1.env.TERM !== "linux";
|
|
777
777
|
return Boolean(process$1.env.CI) || Boolean(process$1.env.WT_SESSION) || Boolean(process$1.env.TERMINUS_SUBLIME) || process$1.env.ConEmuTask === "{cmd::Cmder}" || process$1.env.TERM_PROGRAM === "Terminus-Sublime" || process$1.env.TERM_PROGRAM === "vscode" || process$1.env.TERM === "xterm-256color" || process$1.env.TERM === "alacritty" || process$1.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
@@ -1218,7 +1218,7 @@ ${b}
|
|
|
1218
1218
|
`${styleText("gray", S_BAR$1)}`;
|
|
1219
1219
|
}));
|
|
1220
1220
|
//#endregion
|
|
1221
|
-
//#region ../../node_modules/.pnpm/skills@1.5.
|
|
1221
|
+
//#region ../../node_modules/.pnpm/skills@1.5.20/node_modules/skills/dist/_chunks/libs/picocolors.mjs
|
|
1222
1222
|
var require_picocolors;
|
|
1223
1223
|
var init_picocolors = __esmMin((() => {
|
|
1224
1224
|
init_rolldown_runtime();
|
|
@@ -1292,7 +1292,7 @@ var init_picocolors = __esmMin((() => {
|
|
|
1292
1292
|
}));
|
|
1293
1293
|
}));
|
|
1294
1294
|
//#endregion
|
|
1295
|
-
//#region ../../node_modules/.pnpm/skills@1.5.
|
|
1295
|
+
//#region ../../node_modules/.pnpm/skills@1.5.20/node_modules/skills/dist/_chunks/libs/@kwsites/file-exists.mjs
|
|
1296
1296
|
var require_ms, require_common, require_browser, require_node, require_src$1, require_src, require_dist$3;
|
|
1297
1297
|
var init_file_exists = __esmMin((() => {
|
|
1298
1298
|
init_rolldown_runtime();
|
|
@@ -1858,7 +1858,7 @@ var init_file_exists = __esmMin((() => {
|
|
|
1858
1858
|
}));
|
|
1859
1859
|
}));
|
|
1860
1860
|
//#endregion
|
|
1861
|
-
//#region ../../node_modules/.pnpm/skills@1.5.
|
|
1861
|
+
//#region ../../node_modules/.pnpm/skills@1.5.20/node_modules/skills/dist/_chunks/libs/@simple-git/args-pathspec.mjs
|
|
1862
1862
|
function c$1(...n) {
|
|
1863
1863
|
const e = new String(n);
|
|
1864
1864
|
return t.set(e, n), e;
|
|
@@ -1874,7 +1874,7 @@ var init_args_pathspec = __esmMin((() => {
|
|
|
1874
1874
|
t = /* @__PURE__ */ new WeakMap();
|
|
1875
1875
|
}));
|
|
1876
1876
|
//#endregion
|
|
1877
|
-
//#region ../../node_modules/.pnpm/skills@1.5.
|
|
1877
|
+
//#region ../../node_modules/.pnpm/skills@1.5.20/node_modules/skills/dist/_chunks/libs/@kwsites/promise-deferred.mjs
|
|
1878
1878
|
var require_dist$2;
|
|
1879
1879
|
var init_promise_deferred = __esmMin((() => {
|
|
1880
1880
|
init_rolldown_runtime();
|
|
@@ -1915,7 +1915,7 @@ var init_promise_deferred = __esmMin((() => {
|
|
|
1915
1915
|
}));
|
|
1916
1916
|
}));
|
|
1917
1917
|
//#endregion
|
|
1918
|
-
//#region ../../node_modules/.pnpm/skills@1.5.
|
|
1918
|
+
//#region ../../node_modules/.pnpm/skills@1.5.20/node_modules/skills/dist/_chunks/libs/@simple-git/argv-parser.mjs
|
|
1919
1919
|
function* U(e, t) {
|
|
1920
1920
|
const n = t === "global";
|
|
1921
1921
|
for (const o of e) o.isGlobal === n && (yield o);
|
|
@@ -2390,7 +2390,7 @@ var init_argv_parser = __esmMin((() => {
|
|
|
2390
2390
|
};
|
|
2391
2391
|
}));
|
|
2392
2392
|
//#endregion
|
|
2393
|
-
//#region ../../node_modules/.pnpm/skills@1.5.
|
|
2393
|
+
//#region ../../node_modules/.pnpm/skills@1.5.20/node_modules/skills/dist/_chunks/libs/simple-git.mjs
|
|
2394
2394
|
function asFunction(source) {
|
|
2395
2395
|
if (typeof source !== "function") return NOOP;
|
|
2396
2396
|
return source;
|
|
@@ -5900,7 +5900,7 @@ var init_simple_git = __esmMin((() => {
|
|
|
5900
5900
|
esm_default = gitInstanceFactory;
|
|
5901
5901
|
}));
|
|
5902
5902
|
//#endregion
|
|
5903
|
-
//#region ../../node_modules/.pnpm/skills@1.5.
|
|
5903
|
+
//#region ../../node_modules/.pnpm/skills@1.5.20/node_modules/skills/dist/_chunks/libs/xdg-basedir.mjs
|
|
5904
5904
|
var homeDirectory, env, xdgData, xdgConfig, xdgDataDirectories, xdgConfigDirectories;
|
|
5905
5905
|
var init_xdg_basedir = __esmMin((() => {
|
|
5906
5906
|
homeDirectory = os.homedir();
|
|
@@ -5916,7 +5916,7 @@ var init_xdg_basedir = __esmMin((() => {
|
|
|
5916
5916
|
if (xdgConfig) xdgConfigDirectories.unshift(xdgConfig);
|
|
5917
5917
|
}));
|
|
5918
5918
|
//#endregion
|
|
5919
|
-
//#region ../../node_modules/.pnpm/skills@1.5.
|
|
5919
|
+
//#region ../../node_modules/.pnpm/skills@1.5.20/node_modules/skills/dist/_chunks/libs/@vercel/detect-agent.mjs
|
|
5920
5920
|
var require_dist$1;
|
|
5921
5921
|
var init_detect_agent = __esmMin((() => {
|
|
5922
5922
|
init_rolldown_runtime();
|
|
@@ -12675,8 +12675,23 @@ var require_dist = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
12675
12675
|
exports.visitAsync = visit.visitAsync;
|
|
12676
12676
|
}));
|
|
12677
12677
|
//#endregion
|
|
12678
|
-
//#region ../../node_modules/.pnpm/skills@1.5.
|
|
12678
|
+
//#region ../../node_modules/.pnpm/skills@1.5.20/node_modules/skills/dist/cli.mjs
|
|
12679
12679
|
var cli_exports = /* @__PURE__ */ __exportAll({});
|
|
12680
|
+
function getGitHubHost() {
|
|
12681
|
+
const configuredHost = process.env.GH_HOST?.trim();
|
|
12682
|
+
if (!configuredHost) return DEFAULT_GITHUB_HOST;
|
|
12683
|
+
try {
|
|
12684
|
+
const parsed = new URL(`https://${configuredHost}`);
|
|
12685
|
+
if (parsed.username || parsed.password || parsed.port || parsed.pathname !== "/" || parsed.search || parsed.hash) return DEFAULT_GITHUB_HOST;
|
|
12686
|
+
return parsed.hostname;
|
|
12687
|
+
} catch {
|
|
12688
|
+
return DEFAULT_GITHUB_HOST;
|
|
12689
|
+
}
|
|
12690
|
+
}
|
|
12691
|
+
function isGitHubHost(host) {
|
|
12692
|
+
const normalizedHost = host.toLowerCase();
|
|
12693
|
+
return normalizedHost === DEFAULT_GITHUB_HOST || normalizedHost === getGitHubHost().toLowerCase();
|
|
12694
|
+
}
|
|
12680
12695
|
function getOwnerRepo(parsed) {
|
|
12681
12696
|
if (parsed.type === "local") return null;
|
|
12682
12697
|
const sshMatch = parsed.url.match(/^git@[^:]+:(.+)$/);
|
|
@@ -12740,7 +12755,7 @@ function looksLikeGitSource(input) {
|
|
|
12740
12755
|
if (input.startsWith("http://") || input.startsWith("https://")) try {
|
|
12741
12756
|
const parsed = new URL(input);
|
|
12742
12757
|
const pathname = parsed.pathname;
|
|
12743
|
-
if (parsed.
|
|
12758
|
+
if (isGitHubHost(parsed.host)) return /^\/[^/]+\/[^/]+(?:\.git)?(?:\/tree\/[^/]+(?:\/.*)?)?\/?$/.test(pathname);
|
|
12744
12759
|
if (parsed.hostname === "gitlab.com") return /^\/.+?\/[^/]+(?:\.git)?(?:\/-\/tree\/[^/]+(?:\/.*)?)?\/?$/.test(pathname);
|
|
12745
12760
|
} catch {}
|
|
12746
12761
|
if (/^https?:\/\/.+\.git(?:$|[/?])/i.test(input)) return true;
|
|
@@ -12786,6 +12801,22 @@ function parseSource(input) {
|
|
|
12786
12801
|
if (githubPrefixMatch) return parseSource(appendFragmentRef(githubPrefixMatch[1], fragmentRef, fragmentSkillFilter));
|
|
12787
12802
|
const gitlabPrefixMatch = input.match(/^gitlab:(.+)$/);
|
|
12788
12803
|
if (gitlabPrefixMatch) return parseSource(appendFragmentRef(`https://gitlab.com/${gitlabPrefixMatch[1]}`, fragmentRef, fragmentSkillFilter));
|
|
12804
|
+
if (getGitHubHost() !== "github.com" && /^https?:\/\//.test(input)) try {
|
|
12805
|
+
const parsedUrl = new URL(input);
|
|
12806
|
+
if (isGitHubHost(parsedUrl.host) && parsedUrl.host !== "github.com") {
|
|
12807
|
+
const [owner, rawRepo, marker, ref, ...subpathSegments] = parsedUrl.pathname.split("/").filter(Boolean);
|
|
12808
|
+
if (owner && rawRepo) {
|
|
12809
|
+
const repo = rawRepo.replace(/\.git$/, "");
|
|
12810
|
+
const isTreeUrl = marker === "tree" && ref;
|
|
12811
|
+
return {
|
|
12812
|
+
type: "git",
|
|
12813
|
+
url: `${parsedUrl.protocol}//${parsedUrl.host}/${owner}/${repo}.git`,
|
|
12814
|
+
...isTreeUrl ? { ref } : fragmentRef ? { ref: fragmentRef } : {},
|
|
12815
|
+
...isTreeUrl && subpathSegments.length > 0 ? { subpath: sanitizeSubpath(subpathSegments.join("/")) } : {}
|
|
12816
|
+
};
|
|
12817
|
+
}
|
|
12818
|
+
}
|
|
12819
|
+
} catch {}
|
|
12789
12820
|
const githubTreeWithPathMatch = input.match(/github\.com\/([^/]+)\/([^/]+)\/tree\/([^/]+)\/(.+)/);
|
|
12790
12821
|
if (githubTreeWithPathMatch) {
|
|
12791
12822
|
const [, owner, repo, ref, subpath] = githubTreeWithPathMatch;
|
|
@@ -12842,12 +12873,14 @@ function parseSource(input) {
|
|
|
12842
12873
|
...fragmentRef ? { ref: fragmentRef } : {}
|
|
12843
12874
|
};
|
|
12844
12875
|
}
|
|
12876
|
+
const githubHost = getGitHubHost();
|
|
12877
|
+
const shorthandSourceType = githubHost === "github.com" ? "github" : "git";
|
|
12845
12878
|
const atSkillMatch = input.match(/^([^/]+)\/([^/@]+)@(.+)$/);
|
|
12846
12879
|
if (atSkillMatch && !input.includes(":") && !input.startsWith(".") && !input.startsWith("/")) {
|
|
12847
12880
|
const [, owner, repo, skillFilter] = atSkillMatch;
|
|
12848
12881
|
return {
|
|
12849
|
-
type:
|
|
12850
|
-
url: `https
|
|
12882
|
+
type: shorthandSourceType,
|
|
12883
|
+
url: `https://${githubHost}/${owner}/${repo}.git`,
|
|
12851
12884
|
...fragmentRef ? { ref: fragmentRef } : {},
|
|
12852
12885
|
skillFilter: fragmentSkillFilter || skillFilter
|
|
12853
12886
|
};
|
|
@@ -12856,8 +12889,8 @@ function parseSource(input) {
|
|
|
12856
12889
|
if (shorthandMatch && !input.includes(":") && !input.startsWith(".") && !input.startsWith("/")) {
|
|
12857
12890
|
const [, owner, repo, subpath] = shorthandMatch;
|
|
12858
12891
|
return {
|
|
12859
|
-
type:
|
|
12860
|
-
url: `https
|
|
12892
|
+
type: shorthandSourceType,
|
|
12893
|
+
url: `https://${githubHost}/${owner}/${repo}.git`,
|
|
12861
12894
|
...fragmentRef ? { ref: fragmentRef } : {},
|
|
12862
12895
|
subpath: subpath ? sanitizeSubpath(subpath) : subpath,
|
|
12863
12896
|
...fragmentSkillFilter ? { skillFilter: fragmentSkillFilter } : {}
|
|
@@ -13185,20 +13218,21 @@ async function searchMultiselect(options) {
|
|
|
13185
13218
|
});
|
|
13186
13219
|
}
|
|
13187
13220
|
function parseGitHubRepoUrl(url) {
|
|
13188
|
-
const sshMatch = url.match(/^git@
|
|
13189
|
-
if (sshMatch) {
|
|
13190
|
-
const
|
|
13191
|
-
const
|
|
13221
|
+
const sshMatch = url.match(/^git@([^:]+):([^/]+)\/([^/]+?)(?:\.git)?$/i);
|
|
13222
|
+
if (sshMatch && isGitHubHost(sshMatch[1])) {
|
|
13223
|
+
const host = sshMatch[1];
|
|
13224
|
+
const owner = sshMatch[2];
|
|
13225
|
+
const repo = sshMatch[3];
|
|
13192
13226
|
return {
|
|
13193
13227
|
owner,
|
|
13194
13228
|
repo,
|
|
13195
13229
|
slug: `${owner}/${repo}`,
|
|
13196
|
-
sshUrl: `git
|
|
13230
|
+
sshUrl: `git@${host}:${owner}/${repo}.git`
|
|
13197
13231
|
};
|
|
13198
13232
|
}
|
|
13199
13233
|
try {
|
|
13200
13234
|
const parsed = new URL(url);
|
|
13201
|
-
if (parsed.
|
|
13235
|
+
if (!isGitHubHost(parsed.host)) return null;
|
|
13202
13236
|
const match = parsed.pathname.match(/^\/([^/]+)\/([^/]+?)(?:\.git)?\/?$/);
|
|
13203
13237
|
if (!match) return null;
|
|
13204
13238
|
const owner = match[1];
|
|
@@ -13207,7 +13241,7 @@ function parseGitHubRepoUrl(url) {
|
|
|
13207
13241
|
owner,
|
|
13208
13242
|
repo,
|
|
13209
13243
|
slug: `${owner}/${repo}`,
|
|
13210
|
-
sshUrl: `git
|
|
13244
|
+
sshUrl: `git@${parsed.host}:${owner}/${repo}.git`
|
|
13211
13245
|
};
|
|
13212
13246
|
} catch {
|
|
13213
13247
|
return null;
|
|
@@ -13216,7 +13250,7 @@ function parseGitHubRepoUrl(url) {
|
|
|
13216
13250
|
function isGitHubHttpsCloneUrl(url) {
|
|
13217
13251
|
try {
|
|
13218
13252
|
const parsed = new URL(url);
|
|
13219
|
-
return parsed.protocol === "https:" && parsed.
|
|
13253
|
+
return parsed.protocol === "https:" && isGitHubHost(parsed.host);
|
|
13220
13254
|
} catch {
|
|
13221
13255
|
return false;
|
|
13222
13256
|
}
|
|
@@ -13277,12 +13311,13 @@ async function resetTempDir(dir) {
|
|
|
13277
13311
|
}
|
|
13278
13312
|
async function tryGhClone(repo, tempDir, ref) {
|
|
13279
13313
|
let cloneTarget = repo.slug;
|
|
13314
|
+
const host = repo.sshUrl.match(/^git@([^:]+):/)?.[1] || "github.com";
|
|
13280
13315
|
try {
|
|
13281
13316
|
const { stdout, stderr } = await execFileAsync("gh", [
|
|
13282
13317
|
"auth",
|
|
13283
13318
|
"status",
|
|
13284
13319
|
"-h",
|
|
13285
|
-
|
|
13320
|
+
host
|
|
13286
13321
|
], {
|
|
13287
13322
|
timeout: 5e3,
|
|
13288
13323
|
env: {
|
|
@@ -13317,8 +13352,9 @@ async function tryGhClone(repo, tempDir, ref) {
|
|
|
13317
13352
|
return true;
|
|
13318
13353
|
}
|
|
13319
13354
|
function buildGitHubAuthError(url, repo, message) {
|
|
13320
|
-
|
|
13321
|
-
if (repo) return `
|
|
13355
|
+
const host = repo?.sshUrl.match(/^git@([^:]+):/)?.[1] || "github.com";
|
|
13356
|
+
if (repo && isGitHubSsoAuthError(message)) return `GitHub blocked HTTPS access to ${url} because the organization enforces SAML SSO.\n skills tried your existing git credentials and available fallbacks, but none succeeded.\n - Re-authorize your GitHub credentials/app for that org's SSO policy\n - Or rerun with SSH: npx skills add ${repo.sshUrl}\n - Verify access with: gh auth status -h ${host} or ssh -T git@${host}`;
|
|
13357
|
+
if (repo) return `Authentication failed for ${url}.\n - For private repos, ensure you have access\n - Retry with SSH: npx skills add ${repo.sshUrl}\n - Check access with: gh auth status -h ${host} or ssh -T git@${host}`;
|
|
13322
13358
|
return `Authentication failed for ${url}.\n - For private repos, ensure you have access\n - For SSH: Check your keys with 'ssh -T git@github.com'\n - For HTTPS: Run 'gh auth login' or configure git credentials`;
|
|
13323
13359
|
}
|
|
13324
13360
|
async function cloneRepo(url, ref) {
|
|
@@ -13507,6 +13543,13 @@ async function addSkillToLocalLock(skillName, entry, cwd) {
|
|
|
13507
13543
|
lock.skills[skillName] = entry;
|
|
13508
13544
|
await writeLocalLock(lock, cwd);
|
|
13509
13545
|
}
|
|
13546
|
+
async function removeSkillFromLocalLock(skillName, cwd) {
|
|
13547
|
+
const lock = await readLocalLock(cwd);
|
|
13548
|
+
if (!(skillName in lock.skills)) return false;
|
|
13549
|
+
delete lock.skills[skillName];
|
|
13550
|
+
await writeLocalLock(lock, cwd);
|
|
13551
|
+
return true;
|
|
13552
|
+
}
|
|
13510
13553
|
function createEmptyLocalLock() {
|
|
13511
13554
|
return {
|
|
13512
13555
|
version: CURRENT_VERSION$1,
|
|
@@ -13533,24 +13576,44 @@ async function hasSkillMd(dir) {
|
|
|
13533
13576
|
return false;
|
|
13534
13577
|
}
|
|
13535
13578
|
}
|
|
13579
|
+
function warnSkippedSkill(skillMdPath, reason) {
|
|
13580
|
+
console.warn(`⚠ Skipped ${sanitizeMetadata(skillMdPath)} — ${stripTerminalEscapes(reason)}`);
|
|
13581
|
+
}
|
|
13536
13582
|
async function parseSkillMd(skillMdPath, options) {
|
|
13583
|
+
let content;
|
|
13537
13584
|
try {
|
|
13538
|
-
|
|
13539
|
-
|
|
13540
|
-
|
|
13541
|
-
|
|
13542
|
-
|
|
13543
|
-
|
|
13544
|
-
|
|
13545
|
-
|
|
13546
|
-
|
|
13547
|
-
|
|
13548
|
-
|
|
13549
|
-
|
|
13550
|
-
|
|
13551
|
-
|
|
13585
|
+
content = await readFile(skillMdPath, "utf-8");
|
|
13586
|
+
} catch (err) {
|
|
13587
|
+
warnSkippedSkill(skillMdPath, `failed to read file: ${err.message}`);
|
|
13588
|
+
return null;
|
|
13589
|
+
}
|
|
13590
|
+
let data;
|
|
13591
|
+
try {
|
|
13592
|
+
({data} = parseFrontmatter(content));
|
|
13593
|
+
} catch (err) {
|
|
13594
|
+
warnSkippedSkill(skillMdPath, `YAML parse error: ${err.message}`);
|
|
13595
|
+
return null;
|
|
13596
|
+
}
|
|
13597
|
+
if (!data.name || !data.description) {
|
|
13598
|
+
const missing = [];
|
|
13599
|
+
if (!data.name) missing.push("name");
|
|
13600
|
+
if (!data.description) missing.push("description");
|
|
13601
|
+
warnSkippedSkill(skillMdPath, `missing required frontmatter field(s): ${missing.join(", ")}`);
|
|
13552
13602
|
return null;
|
|
13553
13603
|
}
|
|
13604
|
+
if (typeof data.name !== "string" || typeof data.description !== "string") {
|
|
13605
|
+
warnSkippedSkill(skillMdPath, `frontmatter "name" and "description" must be strings (got ${typeof data.name} and ${typeof data.description})`);
|
|
13606
|
+
return null;
|
|
13607
|
+
}
|
|
13608
|
+
const metadata = isRecord(data.metadata) ? data.metadata : void 0;
|
|
13609
|
+
if (metadata?.internal === true && !shouldInstallInternalSkills() && !options?.includeInternal) return null;
|
|
13610
|
+
return {
|
|
13611
|
+
name: sanitizeMetadata(data.name),
|
|
13612
|
+
description: sanitizeMetadata(data.description),
|
|
13613
|
+
path: dirname(skillMdPath),
|
|
13614
|
+
rawContent: content,
|
|
13615
|
+
metadata
|
|
13616
|
+
};
|
|
13554
13617
|
}
|
|
13555
13618
|
async function findSkillDirs(dir, depth = 0, maxDepth = 5) {
|
|
13556
13619
|
if (depth > maxDepth) return [];
|
|
@@ -13571,6 +13634,7 @@ function isSubpathSafe(basePath, subpath) {
|
|
|
13571
13634
|
async function discoverSkills(basePath, subpath, options) {
|
|
13572
13635
|
const skills = [];
|
|
13573
13636
|
const seenNames = /* @__PURE__ */ new Set();
|
|
13637
|
+
const parsedSkillPaths = /* @__PURE__ */ new Set();
|
|
13574
13638
|
const localLock = await readLocalLock(basePath);
|
|
13575
13639
|
const lockedSkillNames = new Set(Object.keys(localLock.skills).map(normalizeSkillName));
|
|
13576
13640
|
if (subpath && !isSubpathSafe(basePath, subpath)) throw new Error(`Invalid subpath: "${subpath}" resolves outside the repository directory. Subpath must not contain ".." segments that escape the base path.`);
|
|
@@ -13589,8 +13653,14 @@ async function discoverSkills(basePath, subpath, options) {
|
|
|
13589
13653
|
const directoryName = normalizeSkillName(basename(skill.path));
|
|
13590
13654
|
return lockedSkillNames.has(skillName) || lockedSkillNames.has(directoryName);
|
|
13591
13655
|
};
|
|
13656
|
+
const parseSkillAt = async (skillDir) => {
|
|
13657
|
+
const skillMdPath = resolve(skillDir, "SKILL.md");
|
|
13658
|
+
if (parsedSkillPaths.has(skillMdPath)) return null;
|
|
13659
|
+
parsedSkillPaths.add(skillMdPath);
|
|
13660
|
+
return parseSkillMd(skillMdPath, options);
|
|
13661
|
+
};
|
|
13592
13662
|
if (await hasSkillMd(searchPath)) {
|
|
13593
|
-
let skill = await
|
|
13663
|
+
let skill = await parseSkillAt(searchPath);
|
|
13594
13664
|
if (skill) {
|
|
13595
13665
|
if (!isInstalledProjectSkill(skill)) {
|
|
13596
13666
|
skill = enhanceSkill(skill);
|
|
@@ -13612,7 +13682,7 @@ async function discoverSkills(basePath, subpath, options) {
|
|
|
13612
13682
|
prioritySearchDirs.push(...await getPluginSkillPaths(searchPath));
|
|
13613
13683
|
const tryAddSkillAt = async (skillDir) => {
|
|
13614
13684
|
if (!await hasSkillMd(skillDir)) return false;
|
|
13615
|
-
let skill = await
|
|
13685
|
+
let skill = await parseSkillAt(skillDir);
|
|
13616
13686
|
if (!skill || seenNames.has(skill.name)) return true;
|
|
13617
13687
|
if (isInstalledProjectSkill(skill)) return true;
|
|
13618
13688
|
skill = enhanceSkill(skill);
|
|
@@ -13642,7 +13712,7 @@ async function discoverSkills(basePath, subpath, options) {
|
|
|
13642
13712
|
if (skills.length === 0 || options?.fullDepth) {
|
|
13643
13713
|
const allSkillDirs = await findSkillDirs(searchPath);
|
|
13644
13714
|
for (const skillDir of allSkillDirs) {
|
|
13645
|
-
let skill = await
|
|
13715
|
+
let skill = await parseSkillAt(skillDir);
|
|
13646
13716
|
if (skill && !seenNames.has(skill.name) && !isInstalledProjectSkill(skill)) {
|
|
13647
13717
|
skill = enhanceSkill(skill);
|
|
13648
13718
|
skills.push(skill);
|
|
@@ -13680,6 +13750,9 @@ function getOpenClawGlobalSkillsDir(homeDir = home, pathExists = existsSync) {
|
|
|
13680
13750
|
function isZCodeInstalled(homeDir = home, pathExists = existsSync) {
|
|
13681
13751
|
return pathExists(join(homeDir, ".zcode")) || pathExists("/Applications/ZCode.app");
|
|
13682
13752
|
}
|
|
13753
|
+
function isKimchiInstalled(homeDir = home, pathExists = existsSync) {
|
|
13754
|
+
return pathExists(join(homeDir, ".config", "kimchi"));
|
|
13755
|
+
}
|
|
13683
13756
|
async function detectInstalledAgents() {
|
|
13684
13757
|
return (await Promise.all(Object.entries(agents).map(async ([type, config]) => ({
|
|
13685
13758
|
type,
|
|
@@ -14134,7 +14207,7 @@ async function installBlobSkillForAgent(skill, agentType, options = {}) {
|
|
|
14134
14207
|
mode: "symlink"
|
|
14135
14208
|
};
|
|
14136
14209
|
if (!isGlobal && !isUniversalAgent(agentType)) {
|
|
14137
|
-
if (!existsSync(join(cwd, agents[agentType].skillsDir.split("/")[0]))) return {
|
|
14210
|
+
if (!existsSync(join(cwd, agents[agentType].skillsDir.split("/")[0])) && agentType !== "claude-code") return {
|
|
14138
14211
|
success: true,
|
|
14139
14212
|
path: canonicalDir,
|
|
14140
14213
|
canonicalPath: canonicalDir,
|
|
@@ -15246,6 +15319,7 @@ async function runAdd(args, options = {}) {
|
|
|
15246
15319
|
spinner$3.stop(`Source: ${parsed.type === "local" ? parsed.localPath : parsed.url}${parsed.ref ? ` @ ${import_picocolors.default.yellow(parsed.ref)}` : ""}${parsed.subpath ? ` (${parsed.subpath})` : ""}${parsed.skillFilter ? ` ${import_picocolors.default.dim("@")}${import_picocolors.default.cyan(parsed.skillFilter)}` : ""}`);
|
|
15247
15320
|
const ownerRepoRaw = getOwnerRepo(parsed);
|
|
15248
15321
|
const repoPrivacyPromise = (() => {
|
|
15322
|
+
if (parsed.type !== "github") return Promise.resolve(null);
|
|
15249
15323
|
if (!ownerRepoRaw) return Promise.resolve(null);
|
|
15250
15324
|
const ownerRepo = parseOwnerRepo(ownerRepoRaw);
|
|
15251
15325
|
if (!ownerRepo) return Promise.resolve(null);
|
|
@@ -16503,7 +16577,7 @@ function deriveSkillFolder(skillPath) {
|
|
|
16503
16577
|
return folder;
|
|
16504
16578
|
}
|
|
16505
16579
|
function supportsAppendedSubpath(source) {
|
|
16506
|
-
if (source.startsWith("git@")) return false;
|
|
16580
|
+
if (source.startsWith("git@") || source.startsWith("ssh://")) return false;
|
|
16507
16581
|
if (source.endsWith(".git")) return false;
|
|
16508
16582
|
if (source.startsWith("http://") || source.startsWith("https://")) try {
|
|
16509
16583
|
const host = new URL(source).hostname;
|
|
@@ -16521,6 +16595,11 @@ function getLocalSource(entry) {
|
|
|
16521
16595
|
if ((entry.sourceType === "git" || entry.sourceType === "gitlab") && isBareShorthand(entry.source)) return null;
|
|
16522
16596
|
return entry.source;
|
|
16523
16597
|
}
|
|
16598
|
+
function shouldUseFullDepthForUpdate(entry) {
|
|
16599
|
+
if (!entry.skillPath) return false;
|
|
16600
|
+
const source = entry.sourceType && entry.sourceType !== "github" ? getLocalSource(entry) : entry.source;
|
|
16601
|
+
return source !== null && !supportsAppendedSubpath(source);
|
|
16602
|
+
}
|
|
16524
16603
|
function appendFolderAndRef(source, skillPath, ref) {
|
|
16525
16604
|
if (!supportsAppendedSubpath(source)) return formatSourceInput(source, ref);
|
|
16526
16605
|
const folder = deriveSkillFolder(skillPath);
|
|
@@ -16639,18 +16718,26 @@ async function runList(args) {
|
|
|
16639
16718
|
global: scope,
|
|
16640
16719
|
agentFilter
|
|
16641
16720
|
});
|
|
16721
|
+
const cwd = process.cwd();
|
|
16722
|
+
const lockedSkills = scope ? await getAllLockedSkills() : (await readLocalLock(cwd)).skills;
|
|
16723
|
+
const lockEntriesBySanitizedName = new Map(Object.entries(lockedSkills).map(([name, entry]) => [sanitizeName(name), entry]));
|
|
16724
|
+
const getLockEntry = (skillName) => lockedSkills[skillName] ?? lockEntriesBySanitizedName.get(sanitizeName(skillName));
|
|
16642
16725
|
if (options.json) {
|
|
16643
|
-
const jsonOutput = installedSkills.map((skill) =>
|
|
16644
|
-
|
|
16645
|
-
|
|
16646
|
-
|
|
16647
|
-
|
|
16648
|
-
|
|
16726
|
+
const jsonOutput = installedSkills.map((skill) => {
|
|
16727
|
+
const lockEntry = getLockEntry(skill.name);
|
|
16728
|
+
return {
|
|
16729
|
+
name: skill.name,
|
|
16730
|
+
path: skill.canonicalPath,
|
|
16731
|
+
scope: skill.scope,
|
|
16732
|
+
agents: skill.agents.map((a) => agents[a].displayName),
|
|
16733
|
+
source: lockEntry?.source ?? null,
|
|
16734
|
+
sourceUrl: lockEntry?.sourceUrl ?? null,
|
|
16735
|
+
sourceType: lockEntry?.sourceType ?? null
|
|
16736
|
+
};
|
|
16737
|
+
});
|
|
16649
16738
|
console.log(JSON.stringify(jsonOutput, null, 2));
|
|
16650
16739
|
return;
|
|
16651
16740
|
}
|
|
16652
|
-
const lockedSkills = await getAllLockedSkills();
|
|
16653
|
-
const cwd = process.cwd();
|
|
16654
16741
|
const scopeLabel = scope ? "Global" : "Project";
|
|
16655
16742
|
if (installedSkills.length === 0) {
|
|
16656
16743
|
if (options.json) {
|
|
@@ -16669,14 +16756,17 @@ async function runList(args) {
|
|
|
16669
16756
|
const agentInfo = skill.agents.length > 0 ? formatList(agentNames) : `${YELLOW}not linked${RESET$2}`;
|
|
16670
16757
|
const paddedName = sanitizeMetadata(skill.name).padEnd(maxNameLength);
|
|
16671
16758
|
const paddedPath = shortPath.padEnd(maxPathLength);
|
|
16672
|
-
|
|
16759
|
+
const source = getLockEntry(skill.name)?.source ?? null;
|
|
16760
|
+
const sourceLabel = source ? sanitizeMetadata(source) : "local";
|
|
16761
|
+
console.log(`${prefix}${CYAN}${paddedName}${RESET$2} ${DIM$2}${paddedPath}${RESET$2}`);
|
|
16762
|
+
console.log(`${prefix} ${DIM$2}Agents:${RESET$2} ${agentInfo} ${DIM$2}Source:${RESET$2} ${sourceLabel}`);
|
|
16673
16763
|
}
|
|
16674
16764
|
console.log(`${BOLD$2}${scopeLabel} Skills${RESET$2}`);
|
|
16675
16765
|
console.log();
|
|
16676
16766
|
const groupedSkills = {};
|
|
16677
16767
|
const ungroupedSkills = [];
|
|
16678
16768
|
for (const skill of installedSkills) {
|
|
16679
|
-
const lockEntry =
|
|
16769
|
+
const lockEntry = getLockEntry(skill.name);
|
|
16680
16770
|
if (lockEntry?.pluginName) {
|
|
16681
16771
|
const group = lockEntry.pluginName;
|
|
16682
16772
|
if (!groupedSkills[group]) groupedSkills[group] = [];
|
|
@@ -16728,6 +16818,17 @@ async function runList(args) {
|
|
|
16728
16818
|
console.log();
|
|
16729
16819
|
}
|
|
16730
16820
|
}
|
|
16821
|
+
function resolveSkillsToRemove(requested, folderNames, lockKeys = []) {
|
|
16822
|
+
const identityBySanitized = /* @__PURE__ */ new Map();
|
|
16823
|
+
for (const folder of folderNames) identityBySanitized.set(sanitizeName(folder), folder);
|
|
16824
|
+
for (const key of lockKeys) identityBySanitized.set(sanitizeName(key), key);
|
|
16825
|
+
const matched = /* @__PURE__ */ new Set();
|
|
16826
|
+
for (const name of requested) {
|
|
16827
|
+
const hit = identityBySanitized.get(sanitizeName(name));
|
|
16828
|
+
if (hit) matched.add(hit);
|
|
16829
|
+
}
|
|
16830
|
+
return Array.from(matched);
|
|
16831
|
+
}
|
|
16731
16832
|
async function removeCommand(skillNames, options) {
|
|
16732
16833
|
const agentResult = await detectAgent();
|
|
16733
16834
|
if (agentResult.isAgent) {
|
|
@@ -16757,7 +16858,10 @@ async function removeCommand(skillNames, options) {
|
|
|
16757
16858
|
}
|
|
16758
16859
|
const installedSkills = Array.from(skillNamesSet).sort();
|
|
16759
16860
|
spinner$1.stop(`Found ${installedSkills.length} unique installed skill(s)`);
|
|
16760
|
-
|
|
16861
|
+
const lockSkillsKeys = isGlobal ? Object.keys((await readSkillLock()).skills) : Object.keys((await readLocalLock(cwd)).skills);
|
|
16862
|
+
const requestedSkills = options.all ? [...installedSkills, ...lockSkillsKeys] : skillNames;
|
|
16863
|
+
const resolvedRequestedSkills = options.all || skillNames.length > 0 ? resolveSkillsToRemove(requestedSkills, installedSkills, lockSkillsKeys) : [];
|
|
16864
|
+
if (installedSkills.length === 0 && resolvedRequestedSkills.length === 0) {
|
|
16761
16865
|
outro(import_picocolors.default.yellow("No skills found to remove."));
|
|
16762
16866
|
return;
|
|
16763
16867
|
}
|
|
@@ -16771,9 +16875,9 @@ async function removeCommand(skillNames, options) {
|
|
|
16771
16875
|
}
|
|
16772
16876
|
}
|
|
16773
16877
|
let selectedSkills = [];
|
|
16774
|
-
if (options.all) selectedSkills =
|
|
16878
|
+
if (options.all) selectedSkills = resolvedRequestedSkills;
|
|
16775
16879
|
else if (skillNames.length > 0) {
|
|
16776
|
-
selectedSkills =
|
|
16880
|
+
selectedSkills = resolvedRequestedSkills;
|
|
16777
16881
|
if (selectedSkills.length === 0) {
|
|
16778
16882
|
log.error(`No matching skills found for: ${skillNames.join(", ")}`);
|
|
16779
16883
|
return;
|
|
@@ -16792,7 +16896,7 @@ async function removeCommand(skillNames, options) {
|
|
|
16792
16896
|
cancel("Removal cancelled");
|
|
16793
16897
|
process.exit(0);
|
|
16794
16898
|
}
|
|
16795
|
-
selectedSkills = selected;
|
|
16899
|
+
selectedSkills = resolveSkillsToRemove(selected, installedSkills, lockSkillsKeys);
|
|
16796
16900
|
}
|
|
16797
16901
|
let targetAgents;
|
|
16798
16902
|
if (options.agent && options.agent.length > 0) targetAgents = options.agent;
|
|
@@ -16856,10 +16960,19 @@ async function removeCommand(skillNames, options) {
|
|
|
16856
16960
|
recursive: true,
|
|
16857
16961
|
force: true
|
|
16858
16962
|
});
|
|
16859
|
-
|
|
16860
|
-
|
|
16861
|
-
|
|
16862
|
-
|
|
16963
|
+
let effectiveSource = "local";
|
|
16964
|
+
let effectiveSourceType = "local";
|
|
16965
|
+
if (isGlobal) {
|
|
16966
|
+
const lockEntry = await getSkillFromLock(skillName);
|
|
16967
|
+
effectiveSource = lockEntry?.source || "local";
|
|
16968
|
+
effectiveSourceType = lockEntry?.sourceType || "local";
|
|
16969
|
+
await removeSkillFromLock(skillName);
|
|
16970
|
+
} else {
|
|
16971
|
+
const lockEntry = (await readLocalLock(cwd)).skills[skillName];
|
|
16972
|
+
effectiveSource = lockEntry?.source || "local";
|
|
16973
|
+
effectiveSourceType = lockEntry?.sourceType || "local";
|
|
16974
|
+
await removeSkillFromLocalLock(skillName, cwd);
|
|
16975
|
+
}
|
|
16863
16976
|
results.push({
|
|
16864
16977
|
skill: skillName,
|
|
16865
16978
|
success: true,
|
|
@@ -17124,7 +17237,7 @@ async function updateGlobalSkills(options = {}) {
|
|
|
17124
17237
|
console.log(` ${DIM$1}✗ Failed to fetch tree for ${source}${RESET$1}`);
|
|
17125
17238
|
continue;
|
|
17126
17239
|
}
|
|
17127
|
-
const discoveredPaths =
|
|
17240
|
+
const discoveredPaths = tree.tree.filter((entry) => entry.type === "blob").map((entry) => entry.path);
|
|
17128
17241
|
const deletedSkills = await checkAndPromptForDeletions(source, Object.entries(lock.skills).filter(([_, entry]) => entry.source === source).map(([name, _]) => name), lock.skills, true, options, discoveredPaths);
|
|
17129
17242
|
const deletedSkillSet = new Set(deletedSkills);
|
|
17130
17243
|
for (const { name: skillName, entry } of itemsForSource) {
|
|
@@ -17139,7 +17252,7 @@ async function updateGlobalSkills(options = {}) {
|
|
|
17139
17252
|
continue;
|
|
17140
17253
|
}
|
|
17141
17254
|
tempDir = await cloneRepo(sourceUrl, firstEntry.ref);
|
|
17142
|
-
const discoveredPaths = (await discoverSkills(tempDir)).map((skill) => {
|
|
17255
|
+
const discoveredPaths = (await discoverSkills(tempDir, void 0, { fullDepth: true })).map((skill) => {
|
|
17143
17256
|
return join(relative(tempDir, skill.path), "SKILL.md").split(sep).join("/");
|
|
17144
17257
|
});
|
|
17145
17258
|
const deletedSkills = await checkAndPromptForDeletions(source, Object.entries(lock.skills).filter(([_, entry]) => entry.source === source).map(([name, _]) => name), lock.skills, true, options, discoveredPaths);
|
|
@@ -17204,10 +17317,12 @@ async function updateGlobalSkills(options = {}) {
|
|
|
17204
17317
|
console.log(` ${DIM$1}✗ Failed to update ${safeName}: CLI entrypoint not found at ${cliEntry}${RESET$1}`);
|
|
17205
17318
|
continue;
|
|
17206
17319
|
}
|
|
17320
|
+
const fullDepthArgs = shouldUseFullDepthForUpdate(update.entry) ? ["--full-depth"] : [];
|
|
17207
17321
|
if (spawnSync(process.execPath, [
|
|
17208
17322
|
cliEntry,
|
|
17209
17323
|
"add",
|
|
17210
17324
|
installUrl,
|
|
17325
|
+
...fullDepthArgs,
|
|
17211
17326
|
"-g",
|
|
17212
17327
|
"-y"
|
|
17213
17328
|
], {
|
|
@@ -17305,7 +17420,7 @@ async function updateProjectSkills(options = {}) {
|
|
|
17305
17420
|
}
|
|
17306
17421
|
try {
|
|
17307
17422
|
tempDir = await cloneRepo(sourceUrl, ref);
|
|
17308
|
-
const discoveredPaths = (await discoverSkills(tempDir)).map((s) => {
|
|
17423
|
+
const discoveredPaths = (await discoverSkills(tempDir, void 0, { fullDepth: true })).map((s) => {
|
|
17309
17424
|
return join(relative(tempDir, s.path), "SKILL.md").split(sep).join("/");
|
|
17310
17425
|
});
|
|
17311
17426
|
deletedSkills = await checkAndPromptForDeletions(source, allLockedForSource, localLock.skills, false, options, discoveredPaths);
|
|
@@ -17325,6 +17440,7 @@ async function updateProjectSkills(options = {}) {
|
|
|
17325
17440
|
continue;
|
|
17326
17441
|
}
|
|
17327
17442
|
const subagentArgs = skill.entry.subagents?.length ? ["--subagent", ...skill.entry.subagents.map((s) => s === "" ? "root" : s)] : [];
|
|
17443
|
+
const fullDepthArgs = shouldUseFullDepthForUpdate(skill.entry) ? ["--full-depth"] : [];
|
|
17328
17444
|
if (spawnSync(process.execPath, [
|
|
17329
17445
|
cliEntry,
|
|
17330
17446
|
"add",
|
|
@@ -17332,6 +17448,7 @@ async function updateProjectSkills(options = {}) {
|
|
|
17332
17448
|
"--skill",
|
|
17333
17449
|
skill.name,
|
|
17334
17450
|
...subagentArgs,
|
|
17451
|
+
...fullDepthArgs,
|
|
17335
17452
|
"-y"
|
|
17336
17453
|
], {
|
|
17337
17454
|
stdio: [
|
|
@@ -17966,6 +18083,11 @@ async function main() {
|
|
|
17966
18083
|
}
|
|
17967
18084
|
const command = args[0];
|
|
17968
18085
|
const restArgs = args.slice(1);
|
|
18086
|
+
if (command !== "--help" && command !== "-h" && command !== "--version" && command !== "-v" && (restArgs.includes("--help") || restArgs.includes("-h"))) {
|
|
18087
|
+
if (command === "remove" || command === "rm" || command === "r") showRemoveHelp();
|
|
18088
|
+
else showHelp();
|
|
18089
|
+
return;
|
|
18090
|
+
}
|
|
17969
18091
|
switch (command) {
|
|
17970
18092
|
case "find":
|
|
17971
18093
|
case "search":
|
|
@@ -18005,14 +18127,11 @@ async function main() {
|
|
|
18005
18127
|
}
|
|
18006
18128
|
case "remove":
|
|
18007
18129
|
case "rm":
|
|
18008
|
-
case "r":
|
|
18009
|
-
if (restArgs.includes("--help") || restArgs.includes("-h")) {
|
|
18010
|
-
showRemoveHelp();
|
|
18011
|
-
break;
|
|
18012
|
-
}
|
|
18130
|
+
case "r": {
|
|
18013
18131
|
const { skills, options: removeOptions } = parseRemoveOptions(restArgs);
|
|
18014
18132
|
await removeCommand(skills, removeOptions);
|
|
18015
18133
|
break;
|
|
18134
|
+
}
|
|
18016
18135
|
case "experimental_sync": {
|
|
18017
18136
|
if (!inAgent) showLogo();
|
|
18018
18137
|
const { options: syncOptions } = parseSyncOptions(restArgs);
|
|
@@ -18039,9 +18158,10 @@ async function main() {
|
|
|
18039
18158
|
default:
|
|
18040
18159
|
console.log(`Unknown command: ${command}`);
|
|
18041
18160
|
console.log(`Run ${BOLD}skills --help${RESET} for usage.`);
|
|
18161
|
+
process.exitCode = 1;
|
|
18042
18162
|
}
|
|
18043
18163
|
}
|
|
18044
|
-
var import_dist, import_picocolors, SOURCE_ALIASES, CSI_RE, OSC_RE, DCS_PM_APC_RE, SIMPLE_ESC_RE, C1_RE, CONTROL_RE, silentOutput, S_STEP_ACTIVE, S_STEP_CANCEL, S_STEP_SUBMIT, S_RADIO_ACTIVE, S_RADIO_INACTIVE, S_BULLET, S_BAR, S_BAR_H, cancelSymbol, DEFAULT_CLONE_TIMEOUT_MS, ALLOWED_GIT_PROTOCOLS, CLONE_TIMEOUT_MS, execFileAsync, GitCloneError, LOCAL_LOCK_FILE, CURRENT_VERSION$1, SKIP_DIRS, AGENT_PROJECT_SKILL_DIRS, home, configHome, codexHome, claudeHome, vibeHome, hermesHome, autohandHome, zedAppDataHome, zedFlatpakConfigHome, agents, EVE_SUBAGENTS_DIR, AGENTS_DIR$1, SKILLS_SUBDIR, EXCLUDE_FILES$1, EXCLUDE_DIRS$1, isExcluded$1, TELEMETRY_URL, AUDIT_URL, cliVersion, detectedAgentName, pendingTelemetry, import_dist$1, cachedResult, agentNameToType, ProviderRegistryImpl, DISCOVERY_SCHEMA_V2, MAX_ARCHIVE_UNPACKED_BYTES, MAX_ARCHIVE_FILES, WellKnownProvider, wellKnownProvider, AGENTS_DIR, LOCK_FILE, CURRENT_VERSION, _ghWarningShown, DOWNLOAD_BASE_URL, BLOB_ALLOWED_REPOS, FETCH_TIMEOUT, _rateLimitedThisSession, PRIORITY_PREFIXES, version$1, isCancelled$1, EVE_AGENT_LABEL, RESET$3, BOLD$3, DIM$3, TEXT$2, CYAN$1, SEARCH_API_BASE, GITHUB_OWNER_PATTERN, HIDE_CURSOR, SHOW_CURSOR, CLEAR_DOWN, MOVE_UP, MOVE_TO_COL, isCancelled, RESET$2, BOLD$2, DIM$2, CYAN, YELLOW, __dirname$1, RESET$1, BOLD$1, DIM$1, TEXT$1, BLOB_ALLOWED_OWNERS, EXCLUDE_FILES, EXCLUDE_DIRS, USE_AGENT_CONFIGS, SUPPORTED_USE_AGENTS, UseCommandError, __dirname, VERSION, RESET, BOLD, DIM, TEXT, LOGO_LINES, GRAYS;
|
|
18164
|
+
var import_dist, import_picocolors, DEFAULT_GITHUB_HOST, SOURCE_ALIASES, CSI_RE, OSC_RE, DCS_PM_APC_RE, SIMPLE_ESC_RE, C1_RE, CONTROL_RE, silentOutput, S_STEP_ACTIVE, S_STEP_CANCEL, S_STEP_SUBMIT, S_RADIO_ACTIVE, S_RADIO_INACTIVE, S_BULLET, S_BAR, S_BAR_H, cancelSymbol, DEFAULT_CLONE_TIMEOUT_MS, ALLOWED_GIT_PROTOCOLS, CLONE_TIMEOUT_MS, execFileAsync, GitCloneError, LOCAL_LOCK_FILE, CURRENT_VERSION$1, SKIP_DIRS, AGENT_PROJECT_SKILL_DIRS, home, configHome, codexHome, claudeHome, vibeHome, hermesHome, autohandHome, grokHome, zedAppDataHome, zedFlatpakConfigHome, agents, EVE_SUBAGENTS_DIR, AGENTS_DIR$1, SKILLS_SUBDIR, EXCLUDE_FILES$1, EXCLUDE_DIRS$1, isExcluded$1, TELEMETRY_URL, AUDIT_URL, cliVersion, detectedAgentName, pendingTelemetry, import_dist$1, cachedResult, agentNameToType, ProviderRegistryImpl, DISCOVERY_SCHEMA_V2, MAX_ARCHIVE_UNPACKED_BYTES, MAX_ARCHIVE_FILES, WellKnownProvider, wellKnownProvider, AGENTS_DIR, LOCK_FILE, CURRENT_VERSION, _ghWarningShown, DOWNLOAD_BASE_URL, BLOB_ALLOWED_REPOS, FETCH_TIMEOUT, _rateLimitedThisSession, PRIORITY_PREFIXES, version$1, isCancelled$1, EVE_AGENT_LABEL, RESET$3, BOLD$3, DIM$3, TEXT$2, CYAN$1, SEARCH_API_BASE, GITHUB_OWNER_PATTERN, HIDE_CURSOR, SHOW_CURSOR, CLEAR_DOWN, MOVE_UP, MOVE_TO_COL, isCancelled, RESET$2, BOLD$2, DIM$2, CYAN, YELLOW, __dirname$1, RESET$1, BOLD$1, DIM$1, TEXT$1, BLOB_ALLOWED_OWNERS, EXCLUDE_FILES, EXCLUDE_DIRS, USE_AGENT_CONFIGS, SUPPORTED_USE_AGENTS, UseCommandError, __dirname, VERSION, RESET, BOLD, DIM, TEXT, LOGO_LINES, GRAYS;
|
|
18045
18165
|
var init_cli = __esmMin((() => {
|
|
18046
18166
|
init_rolldown_runtime();
|
|
18047
18167
|
init_core();
|
|
@@ -18052,6 +18172,7 @@ var init_cli = __esmMin((() => {
|
|
|
18052
18172
|
init_detect_agent();
|
|
18053
18173
|
import_dist = require_dist();
|
|
18054
18174
|
import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
|
18175
|
+
DEFAULT_GITHUB_HOST = "github.com";
|
|
18055
18176
|
SOURCE_ALIASES = {
|
|
18056
18177
|
"coinbase/agentWallet": "coinbase/agentic-wallet-skills",
|
|
18057
18178
|
"vercel-labs/vercel-skills": "vercel-labs/agent-skills"
|
|
@@ -18115,9 +18236,11 @@ var init_cli = __esmMin((() => {
|
|
|
18115
18236
|
".continue/skills",
|
|
18116
18237
|
".github/skills",
|
|
18117
18238
|
".goose/skills",
|
|
18239
|
+
".grok/skills",
|
|
18118
18240
|
".iflow/skills",
|
|
18119
18241
|
".junie/skills",
|
|
18120
18242
|
".kilocode/skills",
|
|
18243
|
+
".kimchi/skills",
|
|
18121
18244
|
".kiro/skills",
|
|
18122
18245
|
".mux/skills",
|
|
18123
18246
|
".neovate/skills",
|
|
@@ -18138,6 +18261,7 @@ var init_cli = __esmMin((() => {
|
|
|
18138
18261
|
vibeHome = process.env.VIBE_HOME?.trim() || join(home, ".vibe");
|
|
18139
18262
|
hermesHome = process.env.HERMES_HOME?.trim() || join(home, ".hermes");
|
|
18140
18263
|
autohandHome = process.env.AUTOHAND_HOME?.trim() || join(home, ".autohand");
|
|
18264
|
+
grokHome = process.env.GROK_HOME?.trim() || join(home, ".grok");
|
|
18141
18265
|
zedAppDataHome = process.env.APPDATA?.trim();
|
|
18142
18266
|
zedFlatpakConfigHome = process.env.FLATPAK_XDG_CONFIG_HOME?.trim();
|
|
18143
18267
|
agents = {
|
|
@@ -18423,6 +18547,15 @@ var init_cli = __esmMin((() => {
|
|
|
18423
18547
|
return existsSync(join(configHome, "goose"));
|
|
18424
18548
|
}
|
|
18425
18549
|
},
|
|
18550
|
+
grok: {
|
|
18551
|
+
name: "grok",
|
|
18552
|
+
displayName: "Grok Build",
|
|
18553
|
+
skillsDir: ".grok/skills",
|
|
18554
|
+
globalSkillsDir: join(grokHome, "skills"),
|
|
18555
|
+
detectInstalled: async () => {
|
|
18556
|
+
return existsSync(grokHome);
|
|
18557
|
+
}
|
|
18558
|
+
},
|
|
18426
18559
|
"hermes-agent": {
|
|
18427
18560
|
name: "hermes-agent",
|
|
18428
18561
|
displayName: "Hermes Agent",
|
|
@@ -18477,6 +18610,15 @@ var init_cli = __esmMin((() => {
|
|
|
18477
18610
|
return existsSync(join(home, ".kilocode"));
|
|
18478
18611
|
}
|
|
18479
18612
|
},
|
|
18613
|
+
kimchi: {
|
|
18614
|
+
name: "kimchi",
|
|
18615
|
+
displayName: "Kimchi",
|
|
18616
|
+
skillsDir: ".kimchi/skills",
|
|
18617
|
+
globalSkillsDir: join(home, ".config", "kimchi", "harness", "skills"),
|
|
18618
|
+
detectInstalled: async () => {
|
|
18619
|
+
return isKimchiInstalled();
|
|
18620
|
+
}
|
|
18621
|
+
},
|
|
18480
18622
|
"kimi-code-cli": {
|
|
18481
18623
|
name: "kimi-code-cli",
|
|
18482
18624
|
displayName: "Kimi Code CLI",
|
|
@@ -19327,9 +19469,11 @@ var init_cli = __esmMin((() => {
|
|
|
19327
19469
|
".continue/skills/",
|
|
19328
19470
|
".github/skills/",
|
|
19329
19471
|
".goose/skills/",
|
|
19472
|
+
".grok/skills/",
|
|
19330
19473
|
".iflow/skills/",
|
|
19331
19474
|
".junie/skills/",
|
|
19332
19475
|
".kilocode/skills/",
|
|
19476
|
+
".kimchi/skills/",
|
|
19333
19477
|
".kiro/skills/",
|
|
19334
19478
|
".mux/skills/",
|
|
19335
19479
|
".neovate/skills/",
|
|
@@ -19343,7 +19487,7 @@ var init_cli = __esmMin((() => {
|
|
|
19343
19487
|
".zcode/skills/",
|
|
19344
19488
|
".zencoder/skills/"
|
|
19345
19489
|
];
|
|
19346
|
-
version$1 = "1.5.
|
|
19490
|
+
version$1 = "1.5.20";
|
|
19347
19491
|
isCancelled$1 = (value) => typeof value === "symbol";
|
|
19348
19492
|
EVE_AGENT_LABEL = "eve agent";
|
|
19349
19493
|
setVersion(version$1);
|
|
@@ -19419,7 +19563,7 @@ var init_cli = __esmMin((() => {
|
|
|
19419
19563
|
main().finally(() => flushTelemetry().then(() => process.exit(process.exitCode ?? 0)));
|
|
19420
19564
|
}));
|
|
19421
19565
|
//#endregion
|
|
19422
|
-
//#region ../../node_modules/.pnpm/skills@1.5.
|
|
19566
|
+
//#region ../../node_modules/.pnpm/skills@1.5.20/node_modules/skills/bin/cli.mjs
|
|
19423
19567
|
if (module.enableCompileCache && !process.env.NODE_DISABLE_COMPILE_CACHE) try {
|
|
19424
19568
|
module.enableCompileCache();
|
|
19425
19569
|
} catch {}
|