skilld 0.9.1 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +53 -10
- package/dist/cli.mjs.map +1 -1
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { closePool, createIndex, openPool, searchPooled, searchSnippets } from "
|
|
|
8
8
|
import { a as getSharedSkillsDir, i as SHARED_SKILLS_DIR, n as yamlParseKV, o as mapInsert, r as yamlUnescape, s as getBlogPreset, t as yamlEscape } from "./_chunks/yaml.mjs";
|
|
9
9
|
import { A as resolveEntryFiles, B as $fetch, D as fetchGitSkills, G as parseGitHubUrl, I as fetchReleaseNotes, J as formatIssueAsMarkdown, L as generateReleaseIndex, M as formatDiscussionAsMarkdown, N as generateDiscussionIndex, O as parseGitSkillInput, P as fetchBlogReleases, T as isShallowGitDocs, X as isGhAvailable, Y as generateIssueIndex, d as resolvePackageDocs, f as resolvePackageDocsWithAttempts, g as fetchLlmsTxt, i as fetchPkgDist, j as fetchGitHubDiscussions, m as downloadLlmsDocs, n as fetchNpmPackage, p as searchNpmPackages, q as fetchGitHubIssues, r as fetchNpmRegistryMeta, s as readLocalDependencies, t as fetchLatestVersion, u as resolveLocalPackageDocs, v as normalizeLlmsLinks, w as fetchReadmeContent, x as fetchGitDocs } from "./_chunks/npm.mjs";
|
|
10
10
|
import "./sources/index.mjs";
|
|
11
|
-
import { S as targets, _ as maxItems, a as getModelName, b as detectTargetAgent, c as computeSkillDirName, f as unlinkSkillFromAgents, i as getModelLabel, n as createToolProgress, o as optimizeDocs, r as getAvailableModels, s as generateSkillMd, t as detectImportedPackages, u as linkSkillToAgents, v as maxLines, x as getAgentVersion, y as detectInstalledAgents } from "./_chunks/detect-imports.mjs";
|
|
11
|
+
import { S as targets, _ as maxItems, a as getModelName, b as detectTargetAgent, c as computeSkillDirName, d as sanitizeName, f as unlinkSkillFromAgents, i as getModelLabel, n as createToolProgress, o as optimizeDocs, r as getAvailableModels, s as generateSkillMd, t as detectImportedPackages, u as linkSkillToAgents, v as maxLines, x as getAgentVersion, y as detectInstalledAgents } from "./_chunks/detect-imports.mjs";
|
|
12
12
|
import "./agent/index.mjs";
|
|
13
13
|
import { n as shutdownWorker } from "./_chunks/pool2.mjs";
|
|
14
14
|
import { createRequire } from "node:module";
|
|
@@ -1745,6 +1745,8 @@ var sync_exports = /* @__PURE__ */ __exportAll({
|
|
|
1745
1745
|
SKILLD_MARKER_END: () => SKILLD_MARKER_END,
|
|
1746
1746
|
SKILLD_MARKER_START: () => SKILLD_MARKER_START,
|
|
1747
1747
|
addCommandDef: () => addCommandDef,
|
|
1748
|
+
ejectCommandDef: () => ejectCommandDef,
|
|
1749
|
+
enhanceSkillWithLLM: () => enhanceSkillWithLLM,
|
|
1748
1750
|
ensureAgentInstructions: () => ensureAgentInstructions,
|
|
1749
1751
|
ensureGitignore: () => ensureGitignore,
|
|
1750
1752
|
selectLlmConfig: () => selectLlmConfig,
|
|
@@ -2100,7 +2102,7 @@ async function syncSinglePackage(packageName, config) {
|
|
|
2100
2102
|
spin.stop(`Resolved ${packageName}@${useCache ? versionKey : version}${config.force ? " (force)" : useCache ? " (cached)" : ""}`);
|
|
2101
2103
|
ensureCacheDir();
|
|
2102
2104
|
const baseDir = resolveBaseDir(cwd, config.agent, config.global);
|
|
2103
|
-
const skillDirName = computeSkillDirName(packageName, resolved.repoUrl);
|
|
2105
|
+
const skillDirName = config.name ? sanitizeName(config.name) : computeSkillDirName(packageName, resolved.repoUrl);
|
|
2104
2106
|
const skillDir = typeof config.eject === "string" ? resolve(cwd, config.eject) : join(baseDir, skillDirName);
|
|
2105
2107
|
mkdirSync(skillDir, { recursive: true });
|
|
2106
2108
|
const existingLock = config.eject ? void 0 : readLock(baseDir)?.skills[skillDirName];
|
|
@@ -2327,12 +2329,6 @@ const addCommandDef = defineCommand({
|
|
|
2327
2329
|
description: "Package(s) to sync (space or comma-separated, e.g., vue nuxt pinia)",
|
|
2328
2330
|
required: true
|
|
2329
2331
|
},
|
|
2330
|
-
eject: {
|
|
2331
|
-
type: "string",
|
|
2332
|
-
alias: "e",
|
|
2333
|
-
description: "Eject skill with references as real files (portable, no symlinks). Optional path override.",
|
|
2334
|
-
required: false
|
|
2335
|
-
},
|
|
2336
2332
|
...sharedArgs
|
|
2337
2333
|
},
|
|
2338
2334
|
async run({ args }) {
|
|
@@ -2368,12 +2364,57 @@ const addCommandDef = defineCommand({
|
|
|
2368
2364
|
model: args.model,
|
|
2369
2365
|
yes: args.yes,
|
|
2370
2366
|
force: args.force,
|
|
2371
|
-
debug: args.debug
|
|
2372
|
-
eject: args.eject !== void 0 ? args.eject || true : void 0
|
|
2367
|
+
debug: args.debug
|
|
2373
2368
|
});
|
|
2374
2369
|
}
|
|
2375
2370
|
}
|
|
2376
2371
|
});
|
|
2372
|
+
const ejectCommandDef = defineCommand({
|
|
2373
|
+
meta: {
|
|
2374
|
+
name: "eject",
|
|
2375
|
+
description: "Eject skill with references as real files (portable, no symlinks)"
|
|
2376
|
+
},
|
|
2377
|
+
args: {
|
|
2378
|
+
package: {
|
|
2379
|
+
type: "positional",
|
|
2380
|
+
description: "Package to eject",
|
|
2381
|
+
required: true
|
|
2382
|
+
},
|
|
2383
|
+
name: {
|
|
2384
|
+
type: "string",
|
|
2385
|
+
alias: "n",
|
|
2386
|
+
description: "Custom skill directory name (default: derived from package)"
|
|
2387
|
+
},
|
|
2388
|
+
out: {
|
|
2389
|
+
type: "string",
|
|
2390
|
+
alias: "o",
|
|
2391
|
+
description: "Output directory path override"
|
|
2392
|
+
},
|
|
2393
|
+
...sharedArgs
|
|
2394
|
+
},
|
|
2395
|
+
async run({ args }) {
|
|
2396
|
+
const cwd = process.cwd();
|
|
2397
|
+
let agent = resolveAgent(args.agent);
|
|
2398
|
+
if (!agent) {
|
|
2399
|
+
agent = await promptForAgent();
|
|
2400
|
+
if (!agent) return;
|
|
2401
|
+
}
|
|
2402
|
+
if (!hasCompletedWizard()) await runWizard();
|
|
2403
|
+
const state = await getProjectState(cwd);
|
|
2404
|
+
p.intro(introLine({ state }));
|
|
2405
|
+
return syncCommand(state, {
|
|
2406
|
+
packages: [args.package],
|
|
2407
|
+
global: args.global,
|
|
2408
|
+
agent,
|
|
2409
|
+
model: args.model,
|
|
2410
|
+
yes: args.yes,
|
|
2411
|
+
force: args.force,
|
|
2412
|
+
debug: args.debug,
|
|
2413
|
+
eject: args.out || true,
|
|
2414
|
+
name: args.name
|
|
2415
|
+
});
|
|
2416
|
+
}
|
|
2417
|
+
});
|
|
2377
2418
|
const updateCommandDef = defineCommand({
|
|
2378
2419
|
meta: {
|
|
2379
2420
|
name: "update",
|
|
@@ -3890,6 +3931,7 @@ async function brandLoader(work, minMs = 1500) {
|
|
|
3890
3931
|
}
|
|
3891
3932
|
const SUBCOMMAND_NAMES = [
|
|
3892
3933
|
"add",
|
|
3934
|
+
"eject",
|
|
3893
3935
|
"update",
|
|
3894
3936
|
"info",
|
|
3895
3937
|
"list",
|
|
@@ -3909,6 +3951,7 @@ runMain(defineCommand({
|
|
|
3909
3951
|
args: { agent: sharedArgs.agent },
|
|
3910
3952
|
subCommands: {
|
|
3911
3953
|
add: () => Promise.resolve().then(() => sync_exports).then((m) => m.addCommandDef),
|
|
3954
|
+
eject: () => Promise.resolve().then(() => sync_exports).then((m) => m.ejectCommandDef),
|
|
3912
3955
|
update: () => Promise.resolve().then(() => sync_exports).then((m) => m.updateCommandDef),
|
|
3913
3956
|
info: () => Promise.resolve().then(() => status_exports).then((m) => m.infoCommandDef),
|
|
3914
3957
|
list: () => Promise.resolve().then(() => list_exports).then((m) => m.listCommandDef),
|