skilld 1.5.5 → 1.7.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/README.md +32 -23
- package/dist/_chunks/agent.mjs +2 -78
- package/dist/_chunks/agent.mjs.map +1 -1
- package/dist/_chunks/assemble.mjs +1 -18
- package/dist/_chunks/assemble.mjs.map +1 -1
- package/dist/_chunks/author-group.mjs +17 -0
- package/dist/_chunks/author-group.mjs.map +1 -0
- package/dist/_chunks/author.mjs +8 -24
- package/dist/_chunks/author.mjs.map +1 -1
- package/dist/_chunks/cache.mjs +1 -73
- package/dist/_chunks/cache.mjs.map +1 -1
- package/dist/_chunks/cache2.mjs +84 -17
- package/dist/_chunks/cache2.mjs.map +1 -1
- package/dist/_chunks/cli-helpers.mjs +3 -166
- package/dist/_chunks/cli-helpers.mjs.map +1 -1
- package/dist/_chunks/cli-helpers2.mjs +0 -11
- package/dist/_chunks/config.mjs +119 -54
- package/dist/_chunks/config.mjs.map +1 -1
- package/dist/_chunks/core.mjs +9 -0
- package/dist/_chunks/detect.mjs +29 -226
- package/dist/_chunks/detect.mjs.map +1 -1
- package/dist/_chunks/embedding-cache.mjs +0 -5
- package/dist/_chunks/embedding-cache2.mjs +2 -3
- package/dist/_chunks/formatting.mjs +0 -6
- package/dist/_chunks/formatting.mjs.map +1 -1
- package/dist/_chunks/index.d.mts +0 -10
- package/dist/_chunks/index.d.mts.map +1 -1
- package/dist/_chunks/index2.d.mts +3 -6
- package/dist/_chunks/index2.d.mts.map +1 -1
- package/dist/_chunks/index3.d.mts +81 -109
- package/dist/_chunks/index3.d.mts.map +1 -1
- package/dist/_chunks/install.mjs +85 -550
- package/dist/_chunks/install.mjs.map +1 -1
- package/dist/_chunks/install2.mjs +554 -0
- package/dist/_chunks/install2.mjs.map +1 -0
- package/dist/_chunks/libs/@sinclair/typebox.mjs +0 -444
- package/dist/_chunks/libs/@sinclair/typebox.mjs.map +1 -1
- package/dist/_chunks/list.mjs +0 -16
- package/dist/_chunks/list.mjs.map +1 -1
- package/dist/_chunks/lockfile.mjs +2 -10
- package/dist/_chunks/lockfile.mjs.map +1 -1
- package/dist/_chunks/markdown.mjs +0 -9
- package/dist/_chunks/markdown.mjs.map +1 -1
- package/dist/_chunks/package-json.mjs +0 -25
- package/dist/_chunks/package-json.mjs.map +1 -1
- package/dist/_chunks/package-registry.mjs +465 -0
- package/dist/_chunks/package-registry.mjs.map +1 -0
- package/dist/_chunks/pool2.mjs +0 -2
- package/dist/_chunks/pool2.mjs.map +1 -1
- package/dist/_chunks/prefix.mjs +108 -0
- package/dist/_chunks/prefix.mjs.map +1 -0
- package/dist/_chunks/prepare.mjs +14 -9
- package/dist/_chunks/prepare.mjs.map +1 -1
- package/dist/_chunks/prepare2.mjs +1 -19
- package/dist/_chunks/prepare2.mjs.map +1 -1
- package/dist/_chunks/prompts.mjs +6 -201
- package/dist/_chunks/prompts.mjs.map +1 -1
- package/dist/_chunks/retriv.mjs +23 -24
- package/dist/_chunks/retriv.mjs.map +1 -1
- package/dist/_chunks/rolldown-runtime.mjs +0 -2
- package/dist/_chunks/sanitize.mjs +0 -78
- package/dist/_chunks/sanitize.mjs.map +1 -1
- package/dist/_chunks/search-helpers.mjs +99 -0
- package/dist/_chunks/search-helpers.mjs.map +1 -0
- package/dist/_chunks/search-interactive.mjs +1 -18
- package/dist/_chunks/search-interactive.mjs.map +1 -1
- package/dist/_chunks/search.mjs +218 -19
- package/dist/_chunks/search.mjs.map +1 -0
- package/dist/_chunks/setup.mjs +0 -13
- package/dist/_chunks/setup.mjs.map +1 -1
- package/dist/_chunks/shared.mjs +1 -473
- package/dist/_chunks/shared.mjs.map +1 -1
- package/dist/_chunks/skills.mjs +3 -3
- package/dist/_chunks/skills.mjs.map +1 -1
- package/dist/_chunks/sources.mjs +1179 -1440
- package/dist/_chunks/sources.mjs.map +1 -1
- package/dist/_chunks/sync-registry.mjs +59 -0
- package/dist/_chunks/sync-registry.mjs.map +1 -0
- package/dist/_chunks/sync-shared.mjs +0 -16
- package/dist/_chunks/sync-shared2.mjs +10 -49
- package/dist/_chunks/sync-shared2.mjs.map +1 -1
- package/dist/_chunks/sync.mjs +209 -120
- package/dist/_chunks/sync.mjs.map +1 -1
- package/dist/_chunks/sync2.mjs +1 -21
- package/dist/_chunks/types.d.mts +0 -2
- package/dist/_chunks/types.d.mts.map +1 -1
- package/dist/_chunks/uninstall.mjs +3 -27
- package/dist/_chunks/uninstall.mjs.map +1 -1
- package/dist/_chunks/upload.mjs +152 -0
- package/dist/_chunks/upload.mjs.map +1 -0
- package/dist/_chunks/validate.mjs +1 -8
- package/dist/_chunks/validate.mjs.map +1 -1
- package/dist/_chunks/version.mjs +30 -0
- package/dist/_chunks/version.mjs.map +1 -0
- package/dist/_chunks/wizard.mjs +2 -3
- package/dist/_chunks/yaml.mjs +0 -21
- package/dist/_chunks/yaml.mjs.map +1 -1
- package/dist/agent/index.d.mts +0 -24
- package/dist/agent/index.d.mts.map +1 -1
- package/dist/agent/index.mjs +2 -9
- package/dist/cache/index.mjs +1 -3
- package/dist/cli-entry.mjs +0 -6
- package/dist/cli-entry.mjs.map +1 -1
- package/dist/cli.mjs +48 -33
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +2 -8
- package/dist/prepare.mjs +0 -12
- package/dist/prepare.mjs.map +1 -1
- package/dist/retriv/index.mjs +0 -2
- package/dist/retriv/worker.d.mts +0 -3
- package/dist/retriv/worker.d.mts.map +1 -1
- package/dist/retriv/worker.mjs +0 -2
- package/dist/retriv/worker.mjs.map +1 -1
- package/dist/sources/index.d.mts +2 -2
- package/dist/sources/index.mjs +3 -7
- package/dist/types.d.mts +1 -1
- package/package.json +20 -21
- package/dist/_chunks/search2.mjs +0 -319
- package/dist/_chunks/search2.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/core/config.ts","../../src/agent/prompts/optional/types.ts","../../src/agent/prompts/prompt.ts","../../src/agent/prompts/skill.ts","../../src/agent/types.ts","../../src/agent/clis/types.ts","../../src/agent/clis/index.ts","../../src/agent/detect-imports.ts","../../src/agent/detect.ts","../../src/agent/install.ts","../../src/agent/targets/types.ts","../../src/agent/targets/registry.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/core/config.ts","../../src/agent/prompts/optional/types.ts","../../src/agent/prompts/prompt.ts","../../src/agent/prompts/skill.ts","../../src/agent/types.ts","../../src/agent/clis/types.ts","../../src/agent/clis/index.ts","../../src/agent/detect-imports.ts","../../src/agent/detect.ts","../../src/agent/install.ts","../../src/agent/targets/types.ts","../../src/agent/targets/registry.ts"],"mappings":"UAMiB,cAAA;EACf,MAAA;EACA,MAAA;EACA,WAAA;EACA,QAAA;AAAA;AAAA,UCCe,wBAAA;EACf,OAAA;AAAA;AAAA,UAiCe,YAAA;EACf,OAAA;EACA,IAAA;AAAA;AAAA,KCpCU,YAAA;;cAGC,oBAAA,EAAsB,MAAA,CAAO,YAAA;;cAO7B,mBAAA,EAAqB,YAAA;;iBAGlB,WAAA,CAAY,OAAA,EAAS,YAAA,EAAc,OAAA;;iBAKnC,qBAAA,CAAsB,EAAA,WAAa,GAAA,CAAI,YAAA;EAAgB,KAAA;EAAe,GAAA;AAAA;AAAA,UAarE,uBAAA;EACf,WAAA;EDGA;ECDA,QAAA;;EAEA,OAAA;EApCsB;EAsCtB,SAAA;EAtCsB;EAwCtB,cAAA;EArCW;EAuCX,WAAA;;EAEA,YAAA;EAzCoD;EA2CpD,QAAA;EApC4F;EAsC5F,QAAA;EAtCgC;EAwChC,cAAA;EArCc;EAuCd,YAAA,GAAe,YAAA;;EAEf,QAAA,GAAW,cAAA;EAzCwB;EA2CnC,mBAAA;EA3CiD;EA6CjD,QAAA;EA7CgE;EA+ChE,aAAA;AAAA;;;;;iBAgHc,mBAAA,CAAoB,OAAA,EAAS,YAAA,KAAiB,OAAA,aAAoB,wBAAA;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
5
|
-
import "../_chunks/cache.mjs";
|
|
6
|
-
import "../_chunks/yaml.mjs";
|
|
7
|
-
import "../_chunks/shared.mjs";
|
|
8
1
|
import { a as targets, i as getAgentVersion, n as detectProjectAgents, r as detectTargetAgent, t as detectInstalledAgents } from "../_chunks/detect.mjs";
|
|
9
|
-
import { a as
|
|
2
|
+
import { a as buildSectionPrompt, c as portabilizePrompt, i as buildAllSectionPrompts, l as wrapSection, n as SECTION_MERGE_ORDER, o as extractMarkedSections, r as SECTION_OUTPUT_FILES, s as getSectionValidator, t as generateSkillMd } from "../_chunks/prompts.mjs";
|
|
3
|
+
import { a as unlinkSkillFromAgents, i as sanitizeName, n as installSkillForAgents, r as linkSkillToAgents, t as computeSkillDirName } from "../_chunks/install.mjs";
|
|
10
4
|
import { a as getModelLabel, i as getAvailableModels, o as getModelName, r as createToolProgress, s as optimizeDocs, t as detectImportedPackages } from "../_chunks/agent.mjs";
|
|
11
|
-
import "../_chunks/libs/@sinclair/typebox.mjs";
|
|
12
5
|
export { SECTION_MERGE_ORDER, SECTION_OUTPUT_FILES, targets as agents, buildAllSectionPrompts, buildSectionPrompt, computeSkillDirName, createToolProgress, detectImportedPackages, detectInstalledAgents, detectProjectAgents, detectTargetAgent, extractMarkedSections, generateSkillMd, getAgentVersion, getAvailableModels, getModelLabel, getModelName, getSectionValidator, installSkillForAgents, linkSkillToAgents, optimizeDocs, portabilizePrompt, sanitizeName, unlinkSkillFromAgents, wrapSection };
|
package/dist/cache/index.mjs
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import "../_chunks/package-json.mjs";
|
|
1
|
+
import { a as REFERENCES_DIR, c as getRepoCacheDir, i as CACHE_DIR, n as getCacheKey, o as REPOS_DIR, r as getVersionKey, s as getPackageDbPath, t as getCacheDir } from "../_chunks/version.mjs";
|
|
3
2
|
import { n as linkShippedSkill, r as resolvePkgDir, t as getShippedSkills } from "../_chunks/prepare.mjs";
|
|
4
|
-
import "../_chunks/sanitize.mjs";
|
|
5
3
|
import { _ as writeToRepoCache, a as hasShippedDocs, c as linkPkg, d as listCached, f as listReferenceFiles, g as writeToCache, h as writeSections, i as getPkgKeyFiles, l as linkPkgNamed, m as readCachedSection, n as clearCache, o as isCached, p as readCachedDocs, r as ensureCacheDir, s as linkCachedDir, t as clearAllCache, u as linkRepoCachedDir } from "../_chunks/cache.mjs";
|
|
6
4
|
export { CACHE_DIR, REFERENCES_DIR, REPOS_DIR, clearAllCache, clearCache, ensureCacheDir, getCacheDir, getCacheKey, getPackageDbPath, getPkgKeyFiles, getRepoCacheDir, getShippedSkills, getVersionKey, hasShippedDocs, isCached, linkCachedDir, linkPkg, linkPkgNamed, linkRepoCachedDir, linkShippedSkill, listCached, listReferenceFiles, readCachedDocs, readCachedSection, resolvePkgDir, writeSections, writeToCache, writeToRepoCache };
|
package/dist/cli-entry.mjs
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
//#region src/cli-entry.ts
|
|
3
|
-
/**
|
|
4
|
-
* CLI entry point. Intercepts `skilld prepare` to run the fast path (~45ms)
|
|
5
|
-
* before the full CLI loads (~200ms of module imports).
|
|
6
|
-
*/
|
|
7
2
|
await (process.argv[2] === "prepare" && process.argv.length <= 3 ? import("./prepare.mjs") : import("./cli.mjs"));
|
|
8
|
-
//#endregion
|
|
9
3
|
export {};
|
|
10
4
|
|
|
11
5
|
//# sourceMappingURL=cli-entry.mjs.map
|
package/dist/cli-entry.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-entry.mjs","names":[],"sources":["../src/cli-entry.ts"],"sourcesContent":["#!/usr/bin/env node\n/**\n * CLI entry point. Intercepts `skilld prepare` to run the fast path (~45ms)\n * before the full CLI loads (~200ms of module imports).\n */\n\n// eslint-disable-next-line antfu/no-top-level-await\nawait import(process.argv[2] === 'prepare' && process.argv.length <= 3\n ? './prepare.ts'\n : './cli.ts',\n)\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"cli-entry.mjs","names":[],"sources":["../src/cli-entry.ts"],"sourcesContent":["#!/usr/bin/env node\n/**\n * CLI entry point. Intercepts `skilld prepare` to run the fast path (~45ms)\n * before the full CLI loads (~200ms of module imports).\n */\n\n// eslint-disable-next-line antfu/no-top-level-await\nawait import(process.argv[2] === 'prepare' && process.argv.length <= 3\n ? './prepare.ts'\n : './cli.ts',\n)\n"],"mappings":""}
|
package/dist/cli.mjs
CHANGED
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { i as
|
|
2
|
+
import { i as CACHE_DIR, s as getPackageDbPath, t as getCacheDir } from "./_chunks/version.mjs";
|
|
3
3
|
import { i as readPackageJsonSafe } from "./_chunks/package-json.mjs";
|
|
4
|
-
import "./_chunks/prepare.mjs";
|
|
5
|
-
import "./_chunks/sanitize.mjs";
|
|
6
4
|
import "./_chunks/cache.mjs";
|
|
7
|
-
import "./_chunks/yaml.mjs";
|
|
8
|
-
import "./_chunks/markdown.mjs";
|
|
9
|
-
import { n as getSharedSkillsDir, o as semverGt, r as mapInsert } from "./_chunks/shared.mjs";
|
|
10
5
|
import { r as fetchNpmRegistryMeta, t as fetchLatestVersion } from "./_chunks/sources.mjs";
|
|
6
|
+
import { n as getSharedSkillsDir, o as semverGt, r as mapInsert } from "./_chunks/shared.mjs";
|
|
11
7
|
import { a as targets, i as getAgentVersion, r as detectTargetAgent, t as detectInstalledAgents } from "./_chunks/detect.mjs";
|
|
12
|
-
import {
|
|
8
|
+
import { a as unlinkSkillFromAgents } from "./_chunks/install.mjs";
|
|
13
9
|
import { c as getOAuthProviderList, i as getAvailableModels, l as loginOAuthProvider, o as getModelName, t as detectImportedPackages, u as logoutOAuthProvider } from "./_chunks/agent.mjs";
|
|
14
|
-
import "./_chunks/
|
|
15
|
-
import { C as version,
|
|
10
|
+
import { a as readConfig, c as updateConfig, i as hasConfig, r as hasCompletedWizard, t as defaultFeatures } from "./_chunks/config.mjs";
|
|
11
|
+
import { C as version, S as suggestPrepareHook, _ as promptForAgent, a as formatStatus, b as resolveAgent, c as getRepoHint, d as hasPrepareHook, f as introLine, g as pickModel, h as menuLoop, m as isRunningInsideAgent, n as NO_MODELS_MESSAGE, o as getInstalledGenerators, p as isInteractive, r as OAUTH_NOTE, u as guard, v as relativeTime, x as sharedArgs, y as requireInteractive } from "./_chunks/cli-helpers.mjs";
|
|
16
12
|
import { a as removeLockEntry, n as parsePackages } from "./_chunks/lockfile.mjs";
|
|
17
13
|
import { i as iterateSkills, n as getSkillsDir, r as isOutdated, t as getProjectState } from "./_chunks/skills.mjs";
|
|
14
|
+
import { n as resolveSkillName, r as toStoragePackageName } from "./_chunks/prefix.mjs";
|
|
18
15
|
import { c as timeAgo, i as formatSource, l as timedSpinner } from "./_chunks/formatting.mjs";
|
|
19
16
|
import { t as runWizard } from "./_chunks/wizard.mjs";
|
|
20
17
|
import "./_chunks/core.mjs";
|
|
@@ -23,7 +20,7 @@ import { existsSync, readFileSync, readdirSync, realpathSync, rmSync, statSync }
|
|
|
23
20
|
import pLimit from "p-limit";
|
|
24
21
|
import * as p from "@clack/prompts";
|
|
25
22
|
import { defineCommand, runMain } from "citty";
|
|
26
|
-
|
|
23
|
+
import logUpdate from "log-update";
|
|
27
24
|
async function configCommand() {
|
|
28
25
|
const initConfig = readConfig();
|
|
29
26
|
const agentId = initConfig.agent || detectTargetAgent() || void 0;
|
|
@@ -254,8 +251,6 @@ const configCommandDef = defineCommand({
|
|
|
254
251
|
return configCommand();
|
|
255
252
|
}
|
|
256
253
|
});
|
|
257
|
-
//#endregion
|
|
258
|
-
//#region src/commands/remove.ts
|
|
259
254
|
async function removeCommand(state, opts) {
|
|
260
255
|
const scope = opts.global ? "global" : "local";
|
|
261
256
|
const allSkills = [...iterateSkills({ scope })];
|
|
@@ -347,15 +342,20 @@ const removeCommandDef = defineCommand({
|
|
|
347
342
|
};
|
|
348
343
|
p.intro(`${introLine(intro)} · remove (${scope})`);
|
|
349
344
|
return removeCommand(state, {
|
|
350
|
-
packages: args.package ? [...new Set([args.package, ...args._ || []].map((s) => s.trim()).filter(Boolean))
|
|
345
|
+
packages: args.package ? [...new Set([args.package, ...args._ || []].map((s) => s.trim()).filter(Boolean).map((s) => {
|
|
346
|
+
const name = resolveSkillName(s);
|
|
347
|
+
if (!name) {
|
|
348
|
+
p.log.warn(`Cannot remove \x1B[36m${s}\x1B[0m: curator/collection inputs are not addressable here.`);
|
|
349
|
+
return null;
|
|
350
|
+
}
|
|
351
|
+
return name;
|
|
352
|
+
}).filter((s) => s !== null))] : void 0,
|
|
351
353
|
global: args.global,
|
|
352
354
|
agent,
|
|
353
355
|
yes: args.yes
|
|
354
356
|
});
|
|
355
357
|
}
|
|
356
358
|
});
|
|
357
|
-
//#endregion
|
|
358
|
-
//#region src/commands/status.ts
|
|
359
359
|
function countDocs(packageName, version) {
|
|
360
360
|
if (!version) return 0;
|
|
361
361
|
const cacheDir = getCacheDir(packageName, version);
|
|
@@ -482,7 +482,7 @@ async function statusCommand(opts = {}) {
|
|
|
482
482
|
if (source && source !== "shipped") parts.push(dim(source));
|
|
483
483
|
lines.push(parts.join(" "));
|
|
484
484
|
const meta = [];
|
|
485
|
-
const pkgName = info.packageName || pkg.name;
|
|
485
|
+
const pkgName = toStoragePackageName(info.packageName || pkg.name);
|
|
486
486
|
const docs = countDocs(pkgName, info.version) || countRefDocs(join(pkg.scope === "global" ? targets[pkg.agents.values().next().value].globalSkillsDir : join(process.cwd(), targets[pkg.agents.values().next().value].skillsDir), pkg.name));
|
|
487
487
|
if (docs > 0) meta.push(`${docs} docs`);
|
|
488
488
|
const embeddings = await countEmbeddings(pkgName, info.version);
|
|
@@ -522,10 +522,6 @@ const infoCommandDef = defineCommand({
|
|
|
522
522
|
return statusCommand({ global: args.global });
|
|
523
523
|
}
|
|
524
524
|
});
|
|
525
|
-
//#endregion
|
|
526
|
-
//#region src/cli.ts
|
|
527
|
-
const _emit = process.emit;
|
|
528
|
-
process.emit = (event, ...args) => event === "warning" && args[0]?.name === "ExperimentalWarning" && args[0]?.message?.includes("SQLite") ? false : _emit.apply(process, [event, ...args]);
|
|
529
525
|
const NOISE_CHARS = "⣿⡿⣷⣾⣽⣻⢿⡷⣯⣟⡾⣵⣳⢾⡽⣞⡷⣝⢯";
|
|
530
526
|
function djb2(s) {
|
|
531
527
|
let h = 5381;
|
|
@@ -561,6 +557,7 @@ function noiseLine(len, brightnessFn, density = 0) {
|
|
|
561
557
|
for (let i = 0; i < len; i++) s += noiseChar(brightnessFn(i), density);
|
|
562
558
|
return `${s}\x1B[0m`;
|
|
563
559
|
}
|
|
560
|
+
const BRAND_MARK = "\x1B[38;2;251;113;133m⏶\x1B[0m";
|
|
564
561
|
function brandFrame(t, floor = 0, density = 0) {
|
|
565
562
|
const cx = 5;
|
|
566
563
|
const cy = 1;
|
|
@@ -579,18 +576,17 @@ function brandFrame(t, floor = 0, density = 0) {
|
|
|
579
576
|
};
|
|
580
577
|
return [
|
|
581
578
|
noiseLine(10, (x) => brightness(x, 0), density),
|
|
582
|
-
`${noiseLine(2, (x) => brightness(x, 1), density)} %NAME% ${noiseLine(2, (x) => brightness(x + 8, 1), density)} %VER%`,
|
|
579
|
+
`${noiseLine(2, (x) => brightness(x, 1), density)} ${BRAND_MARK} %NAME% ${noiseLine(2, (x) => brightness(x + 8, 1), density)} %VER%`,
|
|
583
580
|
noiseLine(10, (x) => brightness(x, 2), density)
|
|
584
581
|
].join("\n");
|
|
585
582
|
}
|
|
586
583
|
async function brandLoader(work, minMs = 1500) {
|
|
587
584
|
if (process.env.SKILLD_EFFECT === "none") return work();
|
|
588
|
-
const logUpdate = (await import("log-update")).default;
|
|
589
585
|
const name = "\x1B[1m\x1B[38;2;255;255;255mskilld\x1B[0m";
|
|
590
|
-
const
|
|
586
|
+
const verStr = `\x1B[2mv${version}\x1B[0m`;
|
|
591
587
|
const status = "\x1B[2mSetting up your environment\x1B[0m";
|
|
592
588
|
const start = Date.now();
|
|
593
|
-
const sub = (raw) => raw.replace("%NAME%", name).replace("%VER%",
|
|
589
|
+
const sub = (raw) => raw.replace("%NAME%", name).replace("%VER%", verStr);
|
|
594
590
|
let done = false;
|
|
595
591
|
const result = Promise.all([work(), new Promise((r) => setTimeout(r, minMs))]).then(([v]) => {
|
|
596
592
|
done = true;
|
|
@@ -613,6 +609,24 @@ async function brandLoader(work, minMs = 1500) {
|
|
|
613
609
|
logUpdate.done();
|
|
614
610
|
return result;
|
|
615
611
|
}
|
|
612
|
+
const _emit = process.emit;
|
|
613
|
+
process.emit = (event, ...args) => event === "warning" && args[0]?.name === "ExperimentalWarning" && args[0]?.message?.includes("SQLite") ? false : _emit.apply(process, [event, ...args]);
|
|
614
|
+
function deprecatedForwarder(oldName, newName, loader) {
|
|
615
|
+
return () => loader().then((cmd) => {
|
|
616
|
+
const original = cmd.run;
|
|
617
|
+
return defineCommand({
|
|
618
|
+
...cmd,
|
|
619
|
+
meta: {
|
|
620
|
+
...cmd.meta,
|
|
621
|
+
name: oldName
|
|
622
|
+
},
|
|
623
|
+
async run(ctx) {
|
|
624
|
+
console.warn(`\x1B[33m⚠ \`skilld ${oldName}\` is deprecated. Use \`skilld ${newName}\` instead.\x1B[0m`);
|
|
625
|
+
return original(ctx);
|
|
626
|
+
}
|
|
627
|
+
});
|
|
628
|
+
});
|
|
629
|
+
}
|
|
616
630
|
const SUBCOMMAND_NAMES = [
|
|
617
631
|
"add",
|
|
618
632
|
"eject",
|
|
@@ -630,33 +644,35 @@ const SUBCOMMAND_NAMES = [
|
|
|
630
644
|
"setup",
|
|
631
645
|
"prepare",
|
|
632
646
|
"author",
|
|
633
|
-
"publish"
|
|
647
|
+
"publish",
|
|
648
|
+
"upload"
|
|
634
649
|
];
|
|
635
650
|
runMain(defineCommand({
|
|
636
651
|
meta: {
|
|
637
652
|
name: "skilld",
|
|
638
653
|
version,
|
|
639
|
-
description: "
|
|
654
|
+
description: "Curated agent skills for your projects"
|
|
640
655
|
},
|
|
641
656
|
args: { agent: sharedArgs.agent },
|
|
642
657
|
subCommands: {
|
|
643
658
|
add: () => import("./_chunks/sync2.mjs").then((m) => m.addCommandDef),
|
|
644
|
-
eject: () => import("./_chunks/sync2.mjs").then((m) => m.ejectCommandDef),
|
|
645
659
|
update: () => import("./_chunks/sync2.mjs").then((m) => m.updateCommandDef),
|
|
646
660
|
info: () => infoCommandDef,
|
|
647
661
|
list: () => import("./_chunks/list.mjs").then((m) => m.listCommandDef),
|
|
648
662
|
config: () => configCommandDef,
|
|
649
663
|
remove: () => removeCommandDef,
|
|
650
|
-
install: () => import("./_chunks/
|
|
664
|
+
install: () => import("./_chunks/install2.mjs").then((m) => m.installCommandDef),
|
|
651
665
|
prepare: () => import("./_chunks/prepare2.mjs").then((m) => m.prepareCommandDef),
|
|
652
666
|
uninstall: () => import("./_chunks/uninstall.mjs").then((m) => m.uninstallCommandDef),
|
|
653
667
|
search: () => import("./_chunks/search.mjs").then((m) => m.searchCommandDef),
|
|
654
668
|
cache: () => import("./_chunks/cache2.mjs").then((m) => m.cacheCommandDef),
|
|
655
|
-
validate: () => import("./_chunks/validate.mjs").then((m) => m.validateCommandDef),
|
|
656
|
-
assemble: () => import("./_chunks/assemble.mjs").then((m) => m.assembleCommandDef),
|
|
657
669
|
setup: () => import("./_chunks/setup.mjs").then((m) => m.setupCommandDef),
|
|
658
|
-
author: () => import("./_chunks/author.mjs").then((m) => m.
|
|
659
|
-
|
|
670
|
+
author: () => import("./_chunks/author-group.mjs").then((m) => m.authorGroupDef),
|
|
671
|
+
eject: deprecatedForwarder("eject", "author eject", () => import("./_chunks/sync2.mjs").then((m) => m.ejectCommandDef)),
|
|
672
|
+
validate: deprecatedForwarder("validate", "author validate", () => import("./_chunks/validate.mjs").then((m) => m.validateCommandDef)),
|
|
673
|
+
assemble: deprecatedForwarder("assemble", "author assemble", () => import("./_chunks/assemble.mjs").then((m) => m.assembleCommandDef)),
|
|
674
|
+
publish: deprecatedForwarder("publish", "author publish", () => import("./_chunks/upload.mjs").then((m) => m.uploadCommandDef)),
|
|
675
|
+
upload: deprecatedForwarder("upload", "author publish", () => import("./_chunks/upload.mjs").then((m) => m.uploadCommandDef))
|
|
660
676
|
},
|
|
661
677
|
async run({ args }) {
|
|
662
678
|
const firstArg = process.argv[2];
|
|
@@ -1200,7 +1216,6 @@ runMain(defineCommand({
|
|
|
1200
1216
|
});
|
|
1201
1217
|
}
|
|
1202
1218
|
}));
|
|
1203
|
-
//#endregion
|
|
1204
1219
|
export {};
|
|
1205
1220
|
|
|
1206
1221
|
//# sourceMappingURL=cli.mjs.map
|