skill-creator 2.0.0 → 2.0.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.
Files changed (35) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +2 -2
  3. package/dist/cli.js +107 -27
  4. package/dist/cli.js.map +3 -3
  5. package/dist/daemon.js +106 -26
  6. package/dist/daemon.js.map +3 -3
  7. package/dist/package.json +1 -1
  8. package/dist/webui/_app/immutable/chunks/{CEpOi93z.js → BFnZD865.js} +1 -1
  9. package/dist/webui/_app/immutable/chunks/{D-ecV3TD.js → BNZqT8Gb.js} +1 -1
  10. package/dist/webui/_app/immutable/chunks/{IYkYSIV6.js → C36hgawG.js} +1 -1
  11. package/dist/webui/_app/immutable/chunks/{D0xHg31U.js → CLM6PwBO.js} +1 -1
  12. package/dist/webui/_app/immutable/chunks/CLVPf5uP.js +1 -0
  13. package/dist/webui/_app/immutable/chunks/{DEtYLPO4.js → CQhmWGDZ.js} +1 -1
  14. package/dist/webui/_app/immutable/chunks/Ce6RiTD3.js +2 -0
  15. package/dist/webui/_app/immutable/chunks/{BySEbwqx.js → Ce_bE79q.js} +1 -1
  16. package/dist/webui/_app/immutable/chunks/{B2zyE4XX.js → CnsFCObb.js} +1 -1
  17. package/dist/webui/_app/immutable/chunks/{D25cXQtk.js → CryWMAmp.js} +1 -1
  18. package/dist/webui/_app/immutable/chunks/{DJNLWtK-.js → D68T6slS.js} +1 -1
  19. package/dist/webui/_app/immutable/chunks/{DWcQbrnv.js → DFx4VmvA.js} +1 -1
  20. package/dist/webui/_app/immutable/chunks/{BD9g8Udg.js → DUYTokm-.js} +1 -1
  21. package/dist/webui/_app/immutable/chunks/{BrDKAjtR.js → DbA0Nfjq.js} +1 -1
  22. package/dist/webui/_app/immutable/chunks/{iicbWqXp.js → DkjKuLZP.js} +1 -1
  23. package/dist/webui/_app/immutable/chunks/DrGEPnFY.js +1 -0
  24. package/dist/webui/_app/immutable/entry/{app.CbFi8HIH.js → app.CEIXmsDN.js} +2 -2
  25. package/dist/webui/_app/immutable/entry/start.A-8tRY5f.js +1 -0
  26. package/dist/webui/_app/immutable/nodes/{0.C7-AKGsj.js → 0.DtX11nez.js} +28 -28
  27. package/dist/webui/_app/immutable/nodes/{1.raBmjc20.js → 1.sVOukQaO.js} +1 -1
  28. package/dist/webui/_app/immutable/nodes/{2.ewWz-Ki-.js → 2.Cpm2DXYr.js} +1 -1
  29. package/dist/webui/_app/version.json +1 -1
  30. package/dist/webui/index.html +14 -14
  31. package/package.json +1 -1
  32. package/dist/webui/_app/immutable/chunks/B_YFzSAv.js +0 -2
  33. package/dist/webui/_app/immutable/chunks/BaH4uqzh.js +0 -1
  34. package/dist/webui/_app/immutable/chunks/DLuJKUyD.js +0 -1
  35. package/dist/webui/_app/immutable/entry/start.C3bV1TCO.js +0 -1
package/dist/daemon.js CHANGED
@@ -48,7 +48,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
48
48
  ));
49
49
 
50
50
  // node_modules/.pnpm/ccski@2.5.0/node_modules/ccski/dist/create-prompt-CIJV_96B.mjs
51
- import { createRequire as createRequire2 } from "node:module";
51
+ import { createRequire as createRequire3 } from "node:module";
52
52
  import { stripVTControlCharacters } from "node:util";
53
53
  import { AsyncLocalStorage, AsyncResource } from "node:async_hooks";
54
54
  import process$1 from "node:process";
@@ -330,7 +330,7 @@ var init_create_prompt_CIJV_96B = __esm({
330
330
  value: mod,
331
331
  enumerable: true
332
332
  }) : target, mod));
333
- __require2 = /* @__PURE__ */ createRequire2(import.meta.url);
333
+ __require2 = /* @__PURE__ */ createRequire3(import.meta.url);
334
334
  isUpKey = (key, keybindings = []) => key.name === "up" || keybindings.includes("vim") && key.name === "k" || keybindings.includes("emacs") && key.ctrl && key.name === "p";
335
335
  isDownKey = (key, keybindings = []) => key.name === "down" || keybindings.includes("vim") && key.name === "j" || keybindings.includes("emacs") && key.ctrl && key.name === "n";
336
336
  isSpaceKey = (key) => key.name === "space";
@@ -3747,7 +3747,7 @@ import { TextDecoder } from "node:util";
3747
3747
  import { homedir, tmpdir } from "node:os";
3748
3748
  import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
3749
3749
  import * as tty from "tty";
3750
- import { spawn as spawn3 } from "node:child_process";
3750
+ import { spawn as spawn4 } from "node:child_process";
3751
3751
  import process$12 from "node:process";
3752
3752
  import { randomUUID } from "node:crypto";
3753
3753
  import { URL as URL$1 } from "url";
@@ -5513,7 +5513,7 @@ function registerInstallCleanupHandlers() {
5513
5513
  }
5514
5514
  async function getRemoteCommitHash(repo, ref = "HEAD", timeoutMs = 3e4) {
5515
5515
  return new Promise((resolve$3, reject) => {
5516
- const child = spawn3("git", [
5516
+ const child = spawn4("git", [
5517
5517
  "ls-remote",
5518
5518
  repo,
5519
5519
  ref
@@ -5566,7 +5566,7 @@ async function gitCloneWithTimeout(repo, dest, branch, timeoutMs, output) {
5566
5566
  ];
5567
5567
  if (branch) args.push("--branch", branch);
5568
5568
  args.push(repo, dest);
5569
- const child = spawn3("git", args, { stdio: [
5569
+ const child = spawn4("git", args, { stdio: [
5570
5570
  "ignore",
5571
5571
  "pipe",
5572
5572
  "pipe"
@@ -36772,7 +36772,7 @@ If the user names a skill, or a task clearly matches a skill that is not already
36772
36772
  });
36773
36773
 
36774
36774
  // src/daemon/dsh-profile-support.ts
36775
- import { createRequire as createRequire3 } from "node:module";
36775
+ import { createRequire as createRequire4 } from "node:module";
36776
36776
  import fs16 from "node:fs";
36777
36777
  import path18 from "node:path";
36778
36778
  function ensureDirLink(link, target) {
@@ -36815,7 +36815,7 @@ function completeTransitiveMirror(home) {
36815
36815
  const depLink = path18.join(mirrorRoot, dep);
36816
36816
  if (fs16.existsSync(depLink)) continue;
36817
36817
  try {
36818
- const resolved = createRequire3(path18.join(realPkgDir(pkgDir), "package.json")).resolve(
36818
+ const resolved = createRequire4(path18.join(realPkgDir(pkgDir), "package.json")).resolve(
36819
36819
  `${dep}/package.json`
36820
36820
  );
36821
36821
  ensureDirLink(depLink, path18.dirname(resolved));
@@ -40354,7 +40354,9 @@ function defaultSpawn(binary, args, options2) {
40354
40354
  }
40355
40355
 
40356
40356
  // src/daemon/agent-files.ts
40357
+ import { spawn as spawn3 } from "node:child_process";
40357
40358
  import { readFile as readFile2, readdir, realpath, stat } from "node:fs/promises";
40359
+ import { createRequire as createRequire2 } from "node:module";
40358
40360
  import os2 from "node:os";
40359
40361
  import path5 from "node:path";
40360
40362
 
@@ -40482,25 +40484,103 @@ function compareEntries(a, b) {
40482
40484
  if (a.kind !== b.kind) return a.kind === "dir" ? -1 : 1;
40483
40485
  return a.name.localeCompare(b.name, "en", { sensitivity: "base", numeric: true });
40484
40486
  }
40485
- function createAgentFilesService(deps = {}) {
40486
- const defaultDir = deps.defaultDir ?? (() => os2.homedir());
40487
- async function pickFiles(input) {
40488
- const { AsyncFileDialog } = await import("@xmorse/rfd");
40489
- let builder = new AsyncFileDialog();
40490
- builder = builder.setTitle(input.mode === "image" ? "Select images" : "Select files");
40491
- if (input.mode === "image") {
40492
- builder = builder.addFilter("Images", ["png", "jpg", "jpeg", "webp", "gif"]);
40493
- }
40494
- const handles = await builder.pickFiles();
40495
- if (handles === null) return { paths: [] };
40496
- const paths = [];
40497
- for (const handle of handles) {
40487
+ var PICKER_CHILD_CODE = `"use strict";
40488
+ const write = (payload) => process.stdout.write(JSON.stringify(payload));
40489
+ try {
40490
+ const spec = JSON.parse(process.argv[1]);
40491
+ const rfd = require(process.argv[2]);
40492
+ let dialog = new rfd.FileDialog();
40493
+ if (spec.title) dialog = dialog.setTitle(spec.title);
40494
+ for (const filter of spec.filters) dialog = dialog.addFilter(filter.name, filter.exts);
40495
+ const paths = dialog.pickFiles();
40496
+ write({ ok: true, paths: Array.isArray(paths) ? paths : [] });
40497
+ } catch (error) {
40498
+ write({ ok: false, message: String((error && error.message) || error).slice(0, 300) });
40499
+ }`;
40500
+ var PICKER_TIMEOUT_MS = 10 * 60 * 1e3;
40501
+ var PICKER_STDOUT_LIMIT = 64 * 1024;
40502
+ var cachedRfdEntry = null;
40503
+ function resolveRfdEntry() {
40504
+ if (cachedRfdEntry !== null) return cachedRfdEntry;
40505
+ try {
40506
+ cachedRfdEntry = createRequire2(import.meta.url).resolve("@xmorse/rfd");
40507
+ } catch {
40508
+ throw new DomainError("UNAVAILABLE", "native file picker runtime is not installed");
40509
+ }
40510
+ return cachedRfdEntry;
40511
+ }
40512
+ function runPickerChild(request, options2 = {}) {
40513
+ const entry = options2.entry ?? resolveRfdEntry();
40514
+ const timeoutMs = options2.timeoutMs ?? PICKER_TIMEOUT_MS;
40515
+ const child = spawn3(process.execPath, ["-e", PICKER_CHILD_CODE, JSON.stringify(request), entry], {
40516
+ stdio: ["ignore", "pipe", "pipe"],
40517
+ windowsHide: true
40518
+ });
40519
+ return new Promise((resolve2) => {
40520
+ let stdout = "";
40521
+ let stderrTail = "";
40522
+ const timer = setTimeout(() => {
40523
+ child.kill();
40524
+ resolve2({ status: "failed", message: `picker timed out after ${String(timeoutMs)}ms` });
40525
+ }, timeoutMs);
40526
+ child.stdout.on("data", (chunk) => {
40527
+ if (stdout.length < PICKER_STDOUT_LIMIT) stdout += chunk.toString("utf8");
40528
+ });
40529
+ child.stderr.on("data", (chunk) => {
40530
+ stderrTail = (stderrTail + chunk.toString("utf8")).slice(-300);
40531
+ });
40532
+ child.on("error", (error) => {
40533
+ clearTimeout(timer);
40534
+ resolve2({ status: "failed", message: String(error) });
40535
+ });
40536
+ child.on("close", (code) => {
40537
+ clearTimeout(timer);
40498
40538
  try {
40499
- paths.push(handle.path());
40539
+ const parsed = JSON.parse(stdout);
40540
+ if (parsed.ok === true && Array.isArray(parsed.paths)) {
40541
+ const paths = parsed.paths.filter((value) => typeof value === "string");
40542
+ resolve2(paths.length === 0 ? { status: "canceled" } : { status: "picked", paths });
40543
+ return;
40544
+ }
40545
+ if (parsed.ok === false && typeof parsed.message === "string") {
40546
+ resolve2({ status: "failed", message: parsed.message });
40547
+ return;
40548
+ }
40500
40549
  } catch {
40501
40550
  }
40551
+ const detail = stderrTail.trim();
40552
+ resolve2({
40553
+ status: "failed",
40554
+ message: `picker exited with code ${String(code)}${detail.length > 0 ? `: ${detail}` : ""}`
40555
+ });
40556
+ });
40557
+ });
40558
+ }
40559
+ function createAgentFilesService(deps = {}) {
40560
+ const defaultDir = deps.defaultDir ?? (() => os2.homedir());
40561
+ const runNativePicker = deps.runNativePicker ?? runPickerChild;
40562
+ let pickerInFlight = null;
40563
+ async function pickFiles(input) {
40564
+ if (pickerInFlight !== null) {
40565
+ throw new DomainError("INVALID_OPERATION", "file picker dialog is already open");
40566
+ }
40567
+ const request = input.mode === "image" ? {
40568
+ title: "Select images",
40569
+ filters: [{ name: "Images", exts: ["png", "jpg", "jpeg", "webp", "gif"] }]
40570
+ } : { title: "Select files", filters: [] };
40571
+ const inFlight = runNativePicker(request);
40572
+ pickerInFlight = inFlight;
40573
+ try {
40574
+ const outcome = await inFlight;
40575
+ if (outcome.status === "picked") return { paths: outcome.paths ?? [] };
40576
+ if (outcome.status === "canceled") return { paths: [] };
40577
+ throw new DomainError(
40578
+ "UNAVAILABLE",
40579
+ `native file picker failed: ${outcome.message ?? "unknown error"}`
40580
+ );
40581
+ } finally {
40582
+ if (pickerInFlight === inFlight) pickerInFlight = null;
40502
40583
  }
40503
- return { paths };
40504
40584
  }
40505
40585
  async function list2(input) {
40506
40586
  const target = input.dir === void 0 ? defaultDir() : input.dir;
@@ -48471,7 +48551,7 @@ function productToolDenyList(globalNames, mode) {
48471
48551
  // src/daemon/model-catalog.ts
48472
48552
  import fs19 from "node:fs";
48473
48553
  import path22 from "node:path";
48474
- import { createRequire as createRequire4 } from "node:module";
48554
+ import { createRequire as createRequire5 } from "node:module";
48475
48555
 
48476
48556
  // src/shared/provider-icons.generated.ts
48477
48557
  var PROVIDER_ICONS = {
@@ -48538,7 +48618,7 @@ function labelOf(provider) {
48538
48618
  return cn ? `${pretty} \xB7 CN` : pretty;
48539
48619
  }
48540
48620
  function resolveCatalogDataDir() {
48541
- const require2 = createRequire4(import.meta.url);
48621
+ const require2 = createRequire5(import.meta.url);
48542
48622
  const basePkg = require2.resolve("@deepseek-ai/dsh-base/package.json");
48543
48623
  const baseNm = path22.dirname(path22.dirname(path22.dirname(basePkg)));
48544
48624
  const hostReal = fs19.realpathSync(path22.join(baseNm, "@deepseek-ai/dsh-llm-pi-ai"));
@@ -49071,7 +49151,7 @@ function createMcpProposalStore(registry) {
49071
49151
  }
49072
49152
 
49073
49153
  // src/daemon/steward/jsonrpc-stdio.ts
49074
- import { spawn as spawn4 } from "node:child_process";
49154
+ import { spawn as spawn5 } from "node:child_process";
49075
49155
  function parseFrame2(raw) {
49076
49156
  let value;
49077
49157
  try {
@@ -49270,7 +49350,7 @@ var StdioJsonRpcClient = class {
49270
49350
  }
49271
49351
  };
49272
49352
  function defaultStdioSpawn(command, args, options2) {
49273
- return spawn4(command, args, { cwd: options2.cwd, stdio: ["pipe", "pipe", "pipe"] });
49353
+ return spawn5(command, args, { cwd: options2.cwd, stdio: ["pipe", "pipe", "pipe"] });
49274
49354
  }
49275
49355
  function parseCommandSpec(spec) {
49276
49356
  const trimmed = spec.trim();