viben 1.1.2 → 1.1.3

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 (3) hide show
  1. package/dist/index.cjs +586 -275
  2. package/dist/index.js +594 -283
  3. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -1363,7 +1363,7 @@ var require_constants = __commonJS({
1363
1363
  isNodeMode || !mod2 || !mod2.__esModule ? __defProp3(target, "default", { value: mod2, enumerable: true }) : target,
1364
1364
  mod2
1365
1365
  ));
1366
- var __toCommonJS = (mod2) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod2);
1366
+ var __toCommonJS2 = (mod2) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod2);
1367
1367
  var constants_exports = {};
1368
1368
  __export2(constants_exports, {
1369
1369
  CLOUDFLARED_VERSION: () => CLOUDFLARED_VERSION,
@@ -1372,7 +1372,7 @@ var require_constants = __commonJS({
1372
1372
  bin: () => bin,
1373
1373
  use: () => use
1374
1374
  });
1375
- module2.exports = __toCommonJS(constants_exports);
1375
+ module2.exports = __toCommonJS2(constants_exports);
1376
1376
  var import_node_path = __toESM3(__require("path"));
1377
1377
  var DEFAULT_CLOUDFLARED_BIN = import_node_path.default.join(
1378
1378
  __dirname,
@@ -1409,12 +1409,12 @@ var require_error = __commonJS({
1409
1409
  }
1410
1410
  return to;
1411
1411
  };
1412
- var __toCommonJS = (mod2) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod2);
1412
+ var __toCommonJS2 = (mod2) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod2);
1413
1413
  var error_exports = {};
1414
1414
  __export2(error_exports, {
1415
1415
  UnsupportedError: () => UnsupportedError
1416
1416
  });
1417
- module2.exports = __toCommonJS(error_exports);
1417
+ module2.exports = __toCommonJS2(error_exports);
1418
1418
  var UnsupportedError = class extends Error {
1419
1419
  constructor(message) {
1420
1420
  super(message);
@@ -1453,7 +1453,7 @@ var require_install = __commonJS({
1453
1453
  isNodeMode || !mod2 || !mod2.__esModule ? __defProp3(target, "default", { value: mod2, enumerable: true }) : target,
1454
1454
  mod2
1455
1455
  ));
1456
- var __toCommonJS = (mod2) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod2);
1456
+ var __toCommonJS2 = (mod2) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod2);
1457
1457
  var install_exports = {};
1458
1458
  __export2(install_exports, {
1459
1459
  install: () => install,
@@ -1461,7 +1461,7 @@ var require_install = __commonJS({
1461
1461
  install_macos: () => install_macos,
1462
1462
  install_windows: () => install_windows
1463
1463
  });
1464
- module2.exports = __toCommonJS(install_exports);
1464
+ module2.exports = __toCommonJS2(install_exports);
1465
1465
  var import_node_fs = __toESM3(__require("fs"));
1466
1466
  var import_node_path = __toESM3(__require("path"));
1467
1467
  var import_node_https = __toESM3(__require("https"));
@@ -1482,54 +1482,54 @@ var require_install = __commonJS({
1482
1482
  x64: "cloudflared-windows-amd64.exe",
1483
1483
  ia32: "cloudflared-windows-386.exe"
1484
1484
  };
1485
- function resolve_base(version) {
1486
- if (version === "latest") {
1485
+ function resolve_base(version2) {
1486
+ if (version2 === "latest") {
1487
1487
  return `${import_constants.RELEASE_BASE}latest/download/`;
1488
1488
  }
1489
- return `${import_constants.RELEASE_BASE}download/${version}/`;
1489
+ return `${import_constants.RELEASE_BASE}download/${version2}/`;
1490
1490
  }
1491
- async function install(to, version = import_constants.CLOUDFLARED_VERSION) {
1491
+ async function install(to, version2 = import_constants.CLOUDFLARED_VERSION) {
1492
1492
  if (process.platform === "linux") {
1493
- return install_linux(to, version);
1493
+ return install_linux(to, version2);
1494
1494
  } else if (process.platform === "darwin") {
1495
- return install_macos(to, version);
1495
+ return install_macos(to, version2);
1496
1496
  } else if (process.platform === "win32") {
1497
- return install_windows(to, version);
1497
+ return install_windows(to, version2);
1498
1498
  } else {
1499
1499
  throw new import_error.UnsupportedError("Unsupported platform: " + process.platform);
1500
1500
  }
1501
1501
  }
1502
- async function install_linux(to, version = import_constants.CLOUDFLARED_VERSION) {
1502
+ async function install_linux(to, version2 = import_constants.CLOUDFLARED_VERSION) {
1503
1503
  const file = LINUX_URL[process.arch];
1504
1504
  if (file === void 0) {
1505
1505
  throw new import_error.UnsupportedError("Unsupported architecture: " + process.arch);
1506
1506
  }
1507
- await download(resolve_base(version) + file, to);
1507
+ await download(resolve_base(version2) + file, to);
1508
1508
  import_node_fs.default.chmodSync(to, "755");
1509
1509
  return to;
1510
1510
  }
1511
- async function install_macos(to, version = import_constants.CLOUDFLARED_VERSION) {
1511
+ async function install_macos(to, version2 = import_constants.CLOUDFLARED_VERSION) {
1512
1512
  let arch2 = process.arch;
1513
- if (version !== "latest" && version_number(version) < 20240802) {
1513
+ if (version2 !== "latest" && version_number(version2) < 20240802) {
1514
1514
  arch2 = "x64";
1515
1515
  }
1516
1516
  const file = MACOS_URL[arch2];
1517
1517
  if (file === void 0) {
1518
1518
  throw new import_error.UnsupportedError("Unsupported architecture: " + arch2);
1519
1519
  }
1520
- await download(resolve_base(version) + file, `${to}.tgz`);
1520
+ await download(resolve_base(version2) + file, `${to}.tgz`);
1521
1521
  process.env.VERBOSE && console.log(`Extracting to ${to}`);
1522
1522
  (0, import_node_child_process.execSync)(`tar -xzf ${import_node_path.default.basename(`${to}.tgz`)}`, { cwd: import_node_path.default.dirname(to) });
1523
1523
  import_node_fs.default.unlinkSync(`${to}.tgz`);
1524
1524
  import_node_fs.default.renameSync(`${import_node_path.default.dirname(to)}/cloudflared`, to);
1525
1525
  return to;
1526
1526
  }
1527
- async function install_windows(to, version = import_constants.CLOUDFLARED_VERSION) {
1527
+ async function install_windows(to, version2 = import_constants.CLOUDFLARED_VERSION) {
1528
1528
  const file = WINDOWS_URL[process.arch];
1529
1529
  if (file === void 0) {
1530
1530
  throw new import_error.UnsupportedError("Unsupported architecture: " + process.arch);
1531
1531
  }
1532
- await download(resolve_base(version) + file, to);
1532
+ await download(resolve_base(version2) + file, to);
1533
1533
  return to;
1534
1534
  }
1535
1535
  function download(url2, to, redirect = 0) {
@@ -1597,7 +1597,7 @@ var require_regex = __commonJS({
1597
1597
  }
1598
1598
  return to;
1599
1599
  };
1600
- var __toCommonJS = (mod2) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod2);
1600
+ var __toCommonJS2 = (mod2) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod2);
1601
1601
  var regex_exports = {};
1602
1602
  __export2(regex_exports, {
1603
1603
  config_regex: () => config_regex,
@@ -1610,7 +1610,7 @@ var require_regex = __commonJS({
1610
1610
  metrics_regex: () => metrics_regex,
1611
1611
  tunnelID_regex: () => tunnelID_regex
1612
1612
  });
1613
- module2.exports = __toCommonJS(regex_exports);
1613
+ module2.exports = __toCommonJS2(regex_exports);
1614
1614
  var conn_regex = /connection[= ]([0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12})/i;
1615
1615
  var ip_regex = /ip=([0-9.]+)/;
1616
1616
  var location_regex = /location=([A-Za-z0-9]+)/;
@@ -1643,14 +1643,14 @@ var require_handler = __commonJS({
1643
1643
  }
1644
1644
  return to;
1645
1645
  };
1646
- var __toCommonJS = (mod2) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod2);
1646
+ var __toCommonJS2 = (mod2) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod2);
1647
1647
  var handler_exports = {};
1648
1648
  __export2(handler_exports, {
1649
1649
  ConfigHandler: () => ConfigHandler,
1650
1650
  ConnectionHandler: () => ConnectionHandler,
1651
1651
  TryCloudflareHandler: () => TryCloudflareHandler
1652
1652
  });
1653
- module2.exports = __toCommonJS(handler_exports);
1653
+ module2.exports = __toCommonJS2(handler_exports);
1654
1654
  var import_node_stream = __require("stream");
1655
1655
  var import_regex = require_regex();
1656
1656
  var ConnectionHandler = class {
@@ -1705,10 +1705,10 @@ var require_handler = __commonJS({
1705
1705
  try {
1706
1706
  const config_str = config_match[1].replace(/\\"/g, '"');
1707
1707
  const config = JSON.parse(config_str);
1708
- const version = parseInt(config_match[2], 10);
1708
+ const version2 = parseInt(config_match[2], 10);
1709
1709
  this.emit("config", {
1710
1710
  config,
1711
- version
1711
+ version: version2
1712
1712
  });
1713
1713
  if (config && typeof config === "object" && "ingress" in config && Array.isArray(config.ingress)) {
1714
1714
  for (const ingress of config.ingress) {
@@ -1760,7 +1760,7 @@ var require_tunnel = __commonJS({
1760
1760
  }
1761
1761
  return to;
1762
1762
  };
1763
- var __toCommonJS = (mod2) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod2);
1763
+ var __toCommonJS2 = (mod2) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod2);
1764
1764
  var tunnel_exports = {};
1765
1765
  __export2(tunnel_exports, {
1766
1766
  Tunnel: () => Tunnel,
@@ -1768,7 +1768,7 @@ var require_tunnel = __commonJS({
1768
1768
  build_options: () => build_options,
1769
1769
  tunnel: () => tunnel
1770
1770
  });
1771
- module2.exports = __toCommonJS(tunnel_exports);
1771
+ module2.exports = __toCommonJS2(tunnel_exports);
1772
1772
  var import_node_child_process = __require("child_process");
1773
1773
  var import_node_events = __require("events");
1774
1774
  var import_constants = require_constants();
@@ -1933,7 +1933,7 @@ var require_service = __commonJS({
1933
1933
  isNodeMode || !mod2 || !mod2.__esModule ? __defProp3(target, "default", { value: mod2, enumerable: true }) : target,
1934
1934
  mod2
1935
1935
  ));
1936
- var __toCommonJS = (mod2) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod2);
1936
+ var __toCommonJS2 = (mod2) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod2);
1937
1937
  var service_exports = {};
1938
1938
  __export2(service_exports, {
1939
1939
  AlreadyInstalledError: () => AlreadyInstalledError2,
@@ -1952,7 +1952,7 @@ var require_service = __commonJS({
1952
1952
  service_name: () => service_name,
1953
1953
  uninstall: () => uninstall
1954
1954
  });
1955
- module2.exports = __toCommonJS(service_exports);
1955
+ module2.exports = __toCommonJS2(service_exports);
1956
1956
  var import_node_os = __toESM3(__require("os"));
1957
1957
  var import_node_fs = __toESM3(__require("fs"));
1958
1958
  var import_node_child_process = __require("child_process");
@@ -2141,7 +2141,7 @@ var require_lib2 = __commonJS({
2141
2141
  return to;
2142
2142
  };
2143
2143
  var __reExport = (target, mod2, secondTarget) => (__copyProps3(target, mod2, "default"), secondTarget && __copyProps3(secondTarget, mod2, "default"));
2144
- var __toCommonJS = (mod2) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod2);
2144
+ var __toCommonJS2 = (mod2) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod2);
2145
2145
  var lib_exports = {};
2146
2146
  __export2(lib_exports, {
2147
2147
  AlreadyInstalledError: () => import_service.AlreadyInstalledError,
@@ -2150,7 +2150,7 @@ var require_lib2 = __commonJS({
2150
2150
  identifier: () => import_service.identifier,
2151
2151
  service: () => import_service.service
2152
2152
  });
2153
- module2.exports = __toCommonJS(lib_exports);
2153
+ module2.exports = __toCommonJS2(lib_exports);
2154
2154
  __reExport(lib_exports, require_constants(), module2.exports);
2155
2155
  __reExport(lib_exports, require_install(), module2.exports);
2156
2156
  __reExport(lib_exports, require_tunnel(), module2.exports);
@@ -2170,7 +2170,7 @@ import * as fs16 from "fs";
2170
2170
  import fs16__default, { existsSync as existsSync2, mkdirSync as mkdirSync2, statSync as statSync2, openSync as openSync2, readSync, closeSync as closeSync2, readFileSync as readFileSync2, readdirSync as readdirSync2, unlinkSync as unlinkSync2, writeFileSync as writeFileSync2, watch as watch2, rmSync as rmSync2, copyFileSync, renameSync, cpSync, appendFileSync as appendFileSync2, writeSync } from "fs";
2171
2171
  import { parse, stringify } from "yaml";
2172
2172
  import matter from "gray-matter";
2173
- import crypto3, { randomUUID, createHash, timingSafeEqual, randomBytes } from "crypto";
2173
+ import crypto6, { randomUUID, createHash, timingSafeEqual, randomBytes } from "crypto";
2174
2174
  import { ProxyAgent, fetch as fetch$1 } from "undici";
2175
2175
  import AdmZip from "adm-zip";
2176
2176
 
@@ -2222,8 +2222,8 @@ var VibenClient = class {
2222
2222
  * Download MCP package
2223
2223
  * @returns Blob containing the package archive
2224
2224
  */
2225
- download: (id, version) => this.downloadFile(
2226
- `/api/packages/mcp/${id}/download${version ? `?version=${encodeURIComponent(version)}` : ""}`
2225
+ download: (id, version2) => this.downloadFile(
2226
+ `/api/packages/mcp/${id}/download${version2 ? `?version=${encodeURIComponent(version2)}` : ""}`
2227
2227
  ),
2228
2228
  /**
2229
2229
  * Toggle favorite on MCP package
@@ -2274,8 +2274,8 @@ var VibenClient = class {
2274
2274
  * Download skill package
2275
2275
  * @returns Blob containing the package archive
2276
2276
  */
2277
- download: (id, version) => this.downloadFile(
2278
- `/api/packages/skill/${id}/download${version ? `?version=${encodeURIComponent(version)}` : ""}`
2277
+ download: (id, version2) => this.downloadFile(
2278
+ `/api/packages/skill/${id}/download${version2 ? `?version=${encodeURIComponent(version2)}` : ""}`
2279
2279
  ),
2280
2280
  /**
2281
2281
  * Toggle favorite on skill package
@@ -2641,9 +2641,8 @@ import { SSEServerTransport } from "@modelcontextprotocol/sdk/server/sse.js";
2641
2641
  import { isJSONRPCRequest } from "@modelcontextprotocol/sdk/types.js";
2642
2642
  import fastify from "fastify";
2643
2643
  import fastifyCors from "@fastify/cors";
2644
- import fastifySwagger from "@fastify/swagger";
2645
- import fastifySwaggerUi from "@fastify/swagger-ui";
2646
2644
  import fastifyMultipart from "@fastify/multipart";
2645
+ import fastifySwagger from "@fastify/swagger";
2647
2646
  import fastifyWebsocket from "@fastify/websocket";
2648
2647
  import { Command } from "commander";
2649
2648
  import open from "open";
@@ -2685,6 +2684,7 @@ var __toESM2 = (mod2, isNodeMode, target) => (target = mod2 != null ? __create2(
2685
2684
  isNodeMode || !mod2 || !mod2.__esModule ? __defProp2(target, "default", { value: mod2, enumerable: true }) : target,
2686
2685
  mod2
2687
2686
  ));
2687
+ var __toCommonJS = (mod2) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod2);
2688
2688
  var VibenError;
2689
2689
  var NotFoundError;
2690
2690
  var AlreadyExistsError;
@@ -6199,7 +6199,7 @@ async function extractZipToDirectory(options) {
6199
6199
  targetDir,
6200
6200
  onProgress,
6201
6201
  overwrite = false,
6202
- validate = true,
6202
+ validate: validate2 = true,
6203
6203
  conflictResolution = "fail"
6204
6204
  } = options;
6205
6205
  if (!existsSync2(zipPath)) {
@@ -6288,7 +6288,7 @@ async function extractZipToDirectory(options) {
6288
6288
  `Extraction failed: ${error instanceof Error ? error.message : "Unknown error"}`
6289
6289
  );
6290
6290
  }
6291
- if (validate) {
6291
+ if (validate2) {
6292
6292
  const validationWarnings = await validateExtractedSkill(targetDir);
6293
6293
  warnings.push(...validationWarnings);
6294
6294
  }
@@ -6478,10 +6478,10 @@ async function getFromMarketplace(idOrSlug) {
6478
6478
  };
6479
6479
  }
6480
6480
  }
6481
- async function downloadFromMarketplace(idOrSlug, version, targetDir) {
6481
+ async function downloadFromMarketplace(idOrSlug, version2, targetDir) {
6482
6482
  try {
6483
6483
  const client = await createClient();
6484
- const blob = await client.mcp.download(idOrSlug, version);
6484
+ const blob = await client.mcp.download(idOrSlug, version2);
6485
6485
  await ensureDir(targetDir);
6486
6486
  const zipPath = join2(targetDir, "package.zip");
6487
6487
  const buffer = Buffer.from(await blob.arrayBuffer());
@@ -6612,10 +6612,10 @@ async function downloadFromGitHub(options) {
6612
6612
  await rm(zipPath, { force: true });
6613
6613
  }
6614
6614
  onProgress?.(100);
6615
- const version = ref || "latest";
6615
+ const version2 = ref || "latest";
6616
6616
  return {
6617
6617
  success: true,
6618
- version
6618
+ version: version2
6619
6619
  };
6620
6620
  } catch (error) {
6621
6621
  return {
@@ -6674,7 +6674,7 @@ async function installMcp(options) {
6674
6674
  await rm(mcpDir, { recursive: true, force: true });
6675
6675
  }
6676
6676
  await ensureDir(targetDir);
6677
- let version = parsed.version || "latest";
6677
+ let version2 = parsed.version || "latest";
6678
6678
  switch (parsed.source) {
6679
6679
  case "local": {
6680
6680
  const localPath = parsed.local_path;
@@ -6696,9 +6696,9 @@ async function installMcp(options) {
6696
6696
  const pkgJsonPath = join2(mcpDir, "package.json");
6697
6697
  if (fileExists(pkgJsonPath)) {
6698
6698
  const pkgJson = await readJson(pkgJsonPath);
6699
- version = pkgJson?.version || "1.0.0";
6699
+ version2 = pkgJson?.version || "1.0.0";
6700
6700
  } else {
6701
- version = "1.0.0";
6701
+ version2 = "1.0.0";
6702
6702
  }
6703
6703
  break;
6704
6704
  }
@@ -6739,9 +6739,9 @@ async function installMcp(options) {
6739
6739
  const pkgJsonPath = join2(mcpDir, "package.json");
6740
6740
  if (fileExists(pkgJsonPath)) {
6741
6741
  const pkgJson = await readJson(pkgJsonPath);
6742
- version = pkgJson?.version || ghRef || "1.0.0";
6742
+ version2 = pkgJson?.version || ghRef || "1.0.0";
6743
6743
  } else {
6744
- version = ghRef || "1.0.0";
6744
+ version2 = ghRef || "1.0.0";
6745
6745
  }
6746
6746
  break;
6747
6747
  }
@@ -6759,7 +6759,7 @@ async function installMcp(options) {
6759
6759
  message: `Package '${parsed.name}' not found`
6760
6760
  };
6761
6761
  }
6762
- version = parsed.version || pkgInfo.mcp.version;
6762
+ version2 = parsed.version || pkgInfo.mcp.version;
6763
6763
  const downloadResult = await downloadFromMarketplace(
6764
6764
  pkgInfo.mcp.id,
6765
6765
  parsed.version,
@@ -6770,7 +6770,7 @@ async function installMcp(options) {
6770
6770
  success: false,
6771
6771
  error: downloadResult.error,
6772
6772
  name: parsed.name,
6773
- version,
6773
+ version: version2,
6774
6774
  path: "",
6775
6775
  target,
6776
6776
  source: "marketplace",
@@ -6782,7 +6782,7 @@ async function installMcp(options) {
6782
6782
  }
6783
6783
  await addToInstalledList(targetDir, {
6784
6784
  name: parsed.name,
6785
- version,
6785
+ version: version2,
6786
6786
  path: mcpDir,
6787
6787
  source: parsed.source,
6788
6788
  installed_at: (/* @__PURE__ */ new Date()).toISOString(),
@@ -6791,11 +6791,11 @@ async function installMcp(options) {
6791
6791
  return {
6792
6792
  success: true,
6793
6793
  name: parsed.name,
6794
- version,
6794
+ version: version2,
6795
6795
  path: mcpDir,
6796
6796
  target,
6797
6797
  source: parsed.source,
6798
- message: `Package '${parsed.name}@${version}' installed successfully`
6798
+ message: `Package '${parsed.name}@${version2}' installed successfully`
6799
6799
  };
6800
6800
  } catch (error) {
6801
6801
  return {
@@ -6882,11 +6882,11 @@ async function getMcp(name, options) {
6882
6882
  const mcpDir = join2(targetDir, name);
6883
6883
  if (fileExists(mcpDir)) {
6884
6884
  const pkgJsonPath = join2(mcpDir, "package.json");
6885
- let version = "1.0.0";
6885
+ let version2 = "1.0.0";
6886
6886
  let description;
6887
6887
  if (fileExists(pkgJsonPath)) {
6888
6888
  const pkgJson = await readJson(pkgJsonPath);
6889
- version = pkgJson?.version || version;
6889
+ version2 = pkgJson?.version || version2;
6890
6890
  description = pkgJson?.description;
6891
6891
  }
6892
6892
  const installedPath = getInstalledYamlPath(targetDir);
@@ -6902,7 +6902,7 @@ async function getMcp(name, options) {
6902
6902
  success: true,
6903
6903
  mcp: {
6904
6904
  name,
6905
- version,
6905
+ version: version2,
6906
6906
  description,
6907
6907
  path: mcpDir,
6908
6908
  source,
@@ -6993,14 +6993,14 @@ async function listMcpsInDir(mcpDir, target) {
6993
6993
  if (entry.isDirectory() && entry.name !== "installed.yaml") {
6994
6994
  const pkgPath = join2(mcpDir, entry.name);
6995
6995
  const pkgJsonPath = join2(pkgPath, "package.json");
6996
- let version = "1.0.0";
6996
+ let version2 = "1.0.0";
6997
6997
  if (fileExists(pkgJsonPath)) {
6998
6998
  const pkgJson = await readJson(pkgJsonPath);
6999
- version = pkgJson?.version || version;
6999
+ version2 = pkgJson?.version || version2;
7000
7000
  }
7001
7001
  mcps.push({
7002
7002
  name: entry.name,
7003
- version,
7003
+ version: version2,
7004
7004
  path: pkgPath,
7005
7005
  installed_at: (/* @__PURE__ */ new Date()).toISOString(),
7006
7006
  target
@@ -7263,10 +7263,10 @@ async function getSkillFromRegistry(idOrSlug) {
7263
7263
  };
7264
7264
  }
7265
7265
  }
7266
- async function downloadSkillFromRegistry(idOrSlug, version, targetDir) {
7266
+ async function downloadSkillFromRegistry(idOrSlug, version2, targetDir) {
7267
7267
  try {
7268
7268
  const client = await createClient2();
7269
- const blob = await client.skill.download(idOrSlug, version);
7269
+ const blob = await client.skill.download(idOrSlug, version2);
7270
7270
  await ensureDir(targetDir);
7271
7271
  const zipPath = join2(targetDir, "package.zip");
7272
7272
  const buffer = Buffer.from(await blob.arrayBuffer());
@@ -7323,10 +7323,10 @@ async function installSkill(options) {
7323
7323
  githubRepo,
7324
7324
  githubRef,
7325
7325
  onProgress,
7326
- version,
7326
+ version: version2,
7327
7327
  conflictResolution
7328
7328
  } = options;
7329
- const parsed = parseInstallSpec2(name, version, githubOwner, githubRepo, githubRef);
7329
+ const parsed = parseInstallSpec2(name, version2, githubOwner, githubRepo, githubRef);
7330
7330
  const skillName = parsed.name;
7331
7331
  const skillVersion = parsed.version;
7332
7332
  const validation = validateTargetOptions2(target, agentId, customPath);
@@ -21040,31 +21040,31 @@ var require_semver = __commonJS2({
21040
21040
  var parseOptions = require_parse_options();
21041
21041
  var { compareIdentifiers } = require_identifiers();
21042
21042
  var SemVer = class _SemVer {
21043
- constructor(version, options) {
21043
+ constructor(version2, options) {
21044
21044
  options = parseOptions(options);
21045
- if (version instanceof _SemVer) {
21046
- if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
21047
- return version;
21045
+ if (version2 instanceof _SemVer) {
21046
+ if (version2.loose === !!options.loose && version2.includePrerelease === !!options.includePrerelease) {
21047
+ return version2;
21048
21048
  } else {
21049
- version = version.version;
21049
+ version2 = version2.version;
21050
21050
  }
21051
- } else if (typeof version !== "string") {
21052
- throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
21051
+ } else if (typeof version2 !== "string") {
21052
+ throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version2}".`);
21053
21053
  }
21054
- if (version.length > MAX_LENGTH) {
21054
+ if (version2.length > MAX_LENGTH) {
21055
21055
  throw new TypeError(
21056
21056
  `version is longer than ${MAX_LENGTH} characters`
21057
21057
  );
21058
21058
  }
21059
- debug("SemVer", version, options);
21059
+ debug("SemVer", version2, options);
21060
21060
  this.options = options;
21061
21061
  this.loose = !!options.loose;
21062
21062
  this.includePrerelease = !!options.includePrerelease;
21063
- const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
21063
+ const m = version2.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
21064
21064
  if (!m) {
21065
- throw new TypeError(`Invalid Version: ${version}`);
21065
+ throw new TypeError(`Invalid Version: ${version2}`);
21066
21066
  }
21067
- this.raw = version;
21067
+ this.raw = version2;
21068
21068
  this.major = +m[1];
21069
21069
  this.minor = +m[2];
21070
21070
  this.patch = +m[3];
@@ -21311,12 +21311,12 @@ var require_semver = __commonJS2({
21311
21311
  var require_parse = __commonJS2({
21312
21312
  "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.js"(exports2, module2) {
21313
21313
  var SemVer = require_semver();
21314
- var parse6 = (version, options, throwErrors = false) => {
21315
- if (version instanceof SemVer) {
21316
- return version;
21314
+ var parse7 = (version2, options, throwErrors = false) => {
21315
+ if (version2 instanceof SemVer) {
21316
+ return version2;
21317
21317
  }
21318
21318
  try {
21319
- return new SemVer(version, options);
21319
+ return new SemVer(version2, options);
21320
21320
  } catch (er) {
21321
21321
  if (!throwErrors) {
21322
21322
  return null;
@@ -21324,14 +21324,14 @@ var require_parse = __commonJS2({
21324
21324
  throw er;
21325
21325
  }
21326
21326
  };
21327
- module2.exports = parse6;
21327
+ module2.exports = parse7;
21328
21328
  }
21329
21329
  });
21330
21330
  var require_valid = __commonJS2({
21331
21331
  "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/valid.js"(exports2, module2) {
21332
- var parse6 = require_parse();
21333
- var valid = (version, options) => {
21334
- const v = parse6(version, options);
21332
+ var parse7 = require_parse();
21333
+ var valid = (version2, options) => {
21334
+ const v = parse7(version2, options);
21335
21335
  return v ? v.version : null;
21336
21336
  };
21337
21337
  module2.exports = valid;
@@ -21339,9 +21339,9 @@ var require_valid = __commonJS2({
21339
21339
  });
21340
21340
  var require_clean = __commonJS2({
21341
21341
  "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/clean.js"(exports2, module2) {
21342
- var parse6 = require_parse();
21343
- var clean3 = (version, options) => {
21344
- const s = parse6(version.trim().replace(/^[=v]+/, ""), options);
21342
+ var parse7 = require_parse();
21343
+ var clean3 = (version2, options) => {
21344
+ const s = parse7(version2.trim().replace(/^[=v]+/, ""), options);
21345
21345
  return s ? s.version : null;
21346
21346
  };
21347
21347
  module2.exports = clean3;
@@ -21350,7 +21350,7 @@ var require_clean = __commonJS2({
21350
21350
  var require_inc = __commonJS2({
21351
21351
  "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/inc.js"(exports2, module2) {
21352
21352
  var SemVer = require_semver();
21353
- var inc = (version, release2, options, identifier2, identifierBase) => {
21353
+ var inc = (version2, release2, options, identifier2, identifierBase) => {
21354
21354
  if (typeof options === "string") {
21355
21355
  identifierBase = identifier2;
21356
21356
  identifier2 = options;
@@ -21358,7 +21358,7 @@ var require_inc = __commonJS2({
21358
21358
  }
21359
21359
  try {
21360
21360
  return new SemVer(
21361
- version instanceof SemVer ? version.version : version,
21361
+ version2 instanceof SemVer ? version2.version : version2,
21362
21362
  options
21363
21363
  ).inc(release2, identifier2, identifierBase).version;
21364
21364
  } catch (er) {
@@ -21370,17 +21370,17 @@ var require_inc = __commonJS2({
21370
21370
  });
21371
21371
  var require_diff = __commonJS2({
21372
21372
  "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/diff.js"(exports2, module2) {
21373
- var parse6 = require_parse();
21373
+ var parse7 = require_parse();
21374
21374
  var diff = (version1, version2) => {
21375
- const v1 = parse6(version1, null, true);
21376
- const v2 = parse6(version2, null, true);
21377
- const comparison = v1.compare(v2);
21375
+ const v12 = parse7(version1, null, true);
21376
+ const v2 = parse7(version2, null, true);
21377
+ const comparison = v12.compare(v2);
21378
21378
  if (comparison === 0) {
21379
21379
  return null;
21380
21380
  }
21381
21381
  const v1Higher = comparison > 0;
21382
- const highVersion = v1Higher ? v1 : v2;
21383
- const lowVersion = v1Higher ? v2 : v1;
21382
+ const highVersion = v1Higher ? v12 : v2;
21383
+ const lowVersion = v1Higher ? v2 : v12;
21384
21384
  const highHasPre = !!highVersion.prerelease.length;
21385
21385
  const lowHasPre = !!lowVersion.prerelease.length;
21386
21386
  if (lowHasPre && !highHasPre) {
@@ -21395,13 +21395,13 @@ var require_diff = __commonJS2({
21395
21395
  }
21396
21396
  }
21397
21397
  const prefix = highHasPre ? "pre" : "";
21398
- if (v1.major !== v2.major) {
21398
+ if (v12.major !== v2.major) {
21399
21399
  return prefix + "major";
21400
21400
  }
21401
- if (v1.minor !== v2.minor) {
21401
+ if (v12.minor !== v2.minor) {
21402
21402
  return prefix + "minor";
21403
21403
  }
21404
- if (v1.patch !== v2.patch) {
21404
+ if (v12.patch !== v2.patch) {
21405
21405
  return prefix + "patch";
21406
21406
  }
21407
21407
  return "prerelease";
@@ -21432,9 +21432,9 @@ var require_patch = __commonJS2({
21432
21432
  });
21433
21433
  var require_prerelease = __commonJS2({
21434
21434
  "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/prerelease.js"(exports2, module2) {
21435
- var parse6 = require_parse();
21436
- var prerelease = (version, options) => {
21437
- const parsed = parse6(version, options);
21435
+ var parse7 = require_parse();
21436
+ var prerelease = (version2, options) => {
21437
+ const parsed = parse7(version2, options);
21438
21438
  return parsed && parsed.prerelease.length ? parsed.prerelease : null;
21439
21439
  };
21440
21440
  module2.exports = prerelease;
@@ -21578,26 +21578,26 @@ var require_cmp = __commonJS2({
21578
21578
  var require_coerce = __commonJS2({
21579
21579
  "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/coerce.js"(exports2, module2) {
21580
21580
  var SemVer = require_semver();
21581
- var parse6 = require_parse();
21581
+ var parse7 = require_parse();
21582
21582
  var { safeRe: re, t } = require_re();
21583
- var coerce = (version, options) => {
21584
- if (version instanceof SemVer) {
21585
- return version;
21583
+ var coerce = (version2, options) => {
21584
+ if (version2 instanceof SemVer) {
21585
+ return version2;
21586
21586
  }
21587
- if (typeof version === "number") {
21588
- version = String(version);
21587
+ if (typeof version2 === "number") {
21588
+ version2 = String(version2);
21589
21589
  }
21590
- if (typeof version !== "string") {
21590
+ if (typeof version2 !== "string") {
21591
21591
  return null;
21592
21592
  }
21593
21593
  options = options || {};
21594
21594
  let match = null;
21595
21595
  if (!options.rtl) {
21596
- match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
21596
+ match = version2.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
21597
21597
  } else {
21598
21598
  const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
21599
21599
  let next;
21600
- while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) {
21600
+ while ((next = coerceRtlRegex.exec(version2)) && (!match || match.index + match[0].length !== version2.length)) {
21601
21601
  if (!match || next.index + next[0].length !== match.index + match[0].length) {
21602
21602
  match = next;
21603
21603
  }
@@ -21613,7 +21613,7 @@ var require_coerce = __commonJS2({
21613
21613
  const patch = match[4] || "0";
21614
21614
  const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : "";
21615
21615
  const build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
21616
- return parse6(`${major}.${minor}.${patch}${prerelease}${build}`, options);
21616
+ return parse7(`${major}.${minor}.${patch}${prerelease}${build}`, options);
21617
21617
  };
21618
21618
  module2.exports = coerce;
21619
21619
  }
@@ -21775,19 +21775,19 @@ var require_range = __commonJS2({
21775
21775
  });
21776
21776
  }
21777
21777
  // if ANY of the sets match ALL of its comparators, then pass
21778
- test(version) {
21779
- if (!version) {
21778
+ test(version2) {
21779
+ if (!version2) {
21780
21780
  return false;
21781
21781
  }
21782
- if (typeof version === "string") {
21782
+ if (typeof version2 === "string") {
21783
21783
  try {
21784
- version = new SemVer(version, this.options);
21784
+ version2 = new SemVer(version2, this.options);
21785
21785
  } catch (er) {
21786
21786
  return false;
21787
21787
  }
21788
21788
  }
21789
21789
  for (let i = 0; i < this.set.length; i++) {
21790
- if (testSet(this.set[i], version, this.options)) {
21790
+ if (testSet(this.set[i], version2, this.options)) {
21791
21791
  return true;
21792
21792
  }
21793
21793
  }
@@ -22002,13 +22002,13 @@ var require_range = __commonJS2({
22002
22002
  }
22003
22003
  return `${from} ${to}`.trim();
22004
22004
  };
22005
- var testSet = (set, version, options) => {
22005
+ var testSet = (set, version2, options) => {
22006
22006
  for (let i = 0; i < set.length; i++) {
22007
- if (!set[i].test(version)) {
22007
+ if (!set[i].test(version2)) {
22008
22008
  return false;
22009
22009
  }
22010
22010
  }
22011
- if (version.prerelease.length && !options.includePrerelease) {
22011
+ if (version2.prerelease.length && !options.includePrerelease) {
22012
22012
  for (let i = 0; i < set.length; i++) {
22013
22013
  debug(set[i].semver);
22014
22014
  if (set[i].semver === Comparator.ANY) {
@@ -22016,7 +22016,7 @@ var require_range = __commonJS2({
22016
22016
  }
22017
22017
  if (set[i].semver.prerelease.length > 0) {
22018
22018
  const allowed = set[i].semver;
22019
- if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
22019
+ if (allowed.major === version2.major && allowed.minor === version2.minor && allowed.patch === version2.patch) {
22020
22020
  return true;
22021
22021
  }
22022
22022
  }
@@ -22074,19 +22074,19 @@ var require_comparator = __commonJS2({
22074
22074
  toString() {
22075
22075
  return this.value;
22076
22076
  }
22077
- test(version) {
22078
- debug("Comparator.test", version, this.options.loose);
22079
- if (this.semver === ANY || version === ANY) {
22077
+ test(version2) {
22078
+ debug("Comparator.test", version2, this.options.loose);
22079
+ if (this.semver === ANY || version2 === ANY) {
22080
22080
  return true;
22081
22081
  }
22082
- if (typeof version === "string") {
22082
+ if (typeof version2 === "string") {
22083
22083
  try {
22084
- version = new SemVer(version, this.options);
22084
+ version2 = new SemVer(version2, this.options);
22085
22085
  } catch (er) {
22086
22086
  return false;
22087
22087
  }
22088
22088
  }
22089
- return cmp(version, this.operator, this.semver, this.options);
22089
+ return cmp(version2, this.operator, this.semver, this.options);
22090
22090
  }
22091
22091
  intersects(comp, options) {
22092
22092
  if (!(comp instanceof _Comparator)) {
@@ -22140,13 +22140,13 @@ var require_comparator = __commonJS2({
22140
22140
  var require_satisfies = __commonJS2({
22141
22141
  "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/satisfies.js"(exports2, module2) {
22142
22142
  var Range = require_range();
22143
- var satisfies = (version, range, options) => {
22143
+ var satisfies = (version2, range, options) => {
22144
22144
  try {
22145
22145
  range = new Range(range, options);
22146
22146
  } catch (er) {
22147
22147
  return false;
22148
22148
  }
22149
- return range.test(version);
22149
+ return range.test(version2);
22150
22150
  };
22151
22151
  module2.exports = satisfies;
22152
22152
  }
@@ -22290,8 +22290,8 @@ var require_outside = __commonJS2({
22290
22290
  var lt = require_lt();
22291
22291
  var lte = require_lte();
22292
22292
  var gte = require_gte();
22293
- var outside = (version, range, hilo, options) => {
22294
- version = new SemVer(version, options);
22293
+ var outside = (version2, range, hilo, options) => {
22294
+ version2 = new SemVer(version2, options);
22295
22295
  range = new Range(range, options);
22296
22296
  let gtfn, ltefn, ltfn, comp, ecomp;
22297
22297
  switch (hilo) {
@@ -22312,7 +22312,7 @@ var require_outside = __commonJS2({
22312
22312
  default:
22313
22313
  throw new TypeError('Must provide a hilo val of "<" or ">"');
22314
22314
  }
22315
- if (satisfies(version, range, options)) {
22315
+ if (satisfies(version2, range, options)) {
22316
22316
  return false;
22317
22317
  }
22318
22318
  for (let i = 0; i < range.set.length; ++i) {
@@ -22334,9 +22334,9 @@ var require_outside = __commonJS2({
22334
22334
  if (high.operator === comp || high.operator === ecomp) {
22335
22335
  return false;
22336
22336
  }
22337
- if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) {
22337
+ if ((!low.operator || low.operator === comp) && ltefn(version2, low.semver)) {
22338
22338
  return false;
22339
- } else if (low.operator === ecomp && ltfn(version, low.semver)) {
22339
+ } else if (low.operator === ecomp && ltfn(version2, low.semver)) {
22340
22340
  return false;
22341
22341
  }
22342
22342
  }
@@ -22348,14 +22348,14 @@ var require_outside = __commonJS2({
22348
22348
  var require_gtr = __commonJS2({
22349
22349
  "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/gtr.js"(exports2, module2) {
22350
22350
  var outside = require_outside();
22351
- var gtr = (version, range, options) => outside(version, range, ">", options);
22351
+ var gtr = (version2, range, options) => outside(version2, range, ">", options);
22352
22352
  module2.exports = gtr;
22353
22353
  }
22354
22354
  });
22355
22355
  var require_ltr = __commonJS2({
22356
22356
  "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/ltr.js"(exports2, module2) {
22357
22357
  var outside = require_outside();
22358
- var ltr = (version, range, options) => outside(version, range, "<", options);
22358
+ var ltr = (version2, range, options) => outside(version2, range, "<", options);
22359
22359
  module2.exports = ltr;
22360
22360
  }
22361
22361
  });
@@ -22379,12 +22379,12 @@ var require_simplify = __commonJS2({
22379
22379
  let first = null;
22380
22380
  let prev = null;
22381
22381
  const v = versions.sort((a, b) => compare(a, b, options));
22382
- for (const version of v) {
22383
- const included = satisfies(version, range, options);
22382
+ for (const version2 of v) {
22383
+ const included = satisfies(version2, range, options);
22384
22384
  if (included) {
22385
- prev = version;
22385
+ prev = version2;
22386
22386
  if (!first) {
22387
- first = version;
22387
+ first = version2;
22388
22388
  }
22389
22389
  } else {
22390
22390
  if (prev) {
@@ -22582,7 +22582,7 @@ var require_semver2 = __commonJS2({
22582
22582
  var constants3 = require_constants2();
22583
22583
  var SemVer = require_semver();
22584
22584
  var identifiers = require_identifiers();
22585
- var parse6 = require_parse();
22585
+ var parse7 = require_parse();
22586
22586
  var valid = require_valid();
22587
22587
  var clean3 = require_clean();
22588
22588
  var inc = require_inc();
@@ -22620,7 +22620,7 @@ var require_semver2 = __commonJS2({
22620
22620
  var simplifyRange = require_simplify();
22621
22621
  var subset = require_subset();
22622
22622
  module2.exports = {
22623
- parse: parse6,
22623
+ parse: parse7,
22624
22624
  valid,
22625
22625
  clean: clean3,
22626
22626
  inc,
@@ -23131,11 +23131,11 @@ var require_utils2 = __commonJS2({
23131
23131
  module2.exports.isLessThanWin8 = function() {
23132
23132
  return os3.type() === "Windows_NT" && semver.satisfies(garanteeSemverFormat(os3.release()), "<6.2.9200");
23133
23133
  };
23134
- function garanteeSemverFormat(version) {
23135
- if (version.split(".").length === 2) {
23136
- version += ".0";
23134
+ function garanteeSemverFormat(version2) {
23135
+ if (version2.split(".").length === 2) {
23136
+ version2 += ".0";
23137
23137
  }
23138
- return version;
23138
+ return version2;
23139
23139
  }
23140
23140
  function sanitizeNotifuTypeArgument(type2) {
23141
23141
  if (typeof type2 === "string" || type2 instanceof String) {
@@ -23484,7 +23484,7 @@ var require_checkGrowl = __commonJS2({
23484
23484
  var require_gntp = __commonJS2({
23485
23485
  "../../node_modules/.pnpm/growly@1.3.0/node_modules/growly/lib/gntp.js"(exports2, module2) {
23486
23486
  var net = __require2("net");
23487
- var crypto5 = __require2("crypto");
23487
+ var crypto8 = __require2("crypto");
23488
23488
  var format = __require2("util").format;
23489
23489
  var fs19 = __require2("fs");
23490
23490
  var nl = "\r\n";
@@ -23517,7 +23517,7 @@ var require_gntp = __commonJS2({
23517
23517
  }, 750);
23518
23518
  };
23519
23519
  GNTP.prototype.addResource = function(file) {
23520
- var id = crypto5.createHash("md5").update(file).digest("hex"), header = "Identifier: " + id + nl + "Length: " + file.length + nl + nl;
23520
+ var id = crypto8.createHash("md5").update(file).digest("hex"), header = "Identifier: " + id + nl + "Length: " + file.length + nl + nl;
23521
23521
  this.resources.push({ header, file });
23522
23522
  return "x-growl-resource://" + id;
23523
23523
  };
@@ -23942,6 +23942,315 @@ var require_balloon = __commonJS2({
23942
23942
  }
23943
23943
  }
23944
23944
  });
23945
+ function rng() {
23946
+ if (poolPtr > rnds8Pool.length - 16) {
23947
+ crypto6.randomFillSync(rnds8Pool);
23948
+ poolPtr = 0;
23949
+ }
23950
+ return rnds8Pool.slice(poolPtr, poolPtr += 16);
23951
+ }
23952
+ var rnds8Pool;
23953
+ var poolPtr;
23954
+ var init_rng = __esm({
23955
+ "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/rng.js"() {
23956
+ rnds8Pool = new Uint8Array(256);
23957
+ poolPtr = rnds8Pool.length;
23958
+ }
23959
+ });
23960
+ var regex_default;
23961
+ var init_regex = __esm({
23962
+ "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/regex.js"() {
23963
+ regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
23964
+ }
23965
+ });
23966
+ function validate(uuid) {
23967
+ return typeof uuid === "string" && regex_default.test(uuid);
23968
+ }
23969
+ var validate_default;
23970
+ var init_validate = __esm({
23971
+ "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/validate.js"() {
23972
+ init_regex();
23973
+ validate_default = validate;
23974
+ }
23975
+ });
23976
+ function stringify3(arr, offset = 0) {
23977
+ const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
23978
+ if (!validate_default(uuid)) {
23979
+ throw TypeError("Stringified UUID is invalid");
23980
+ }
23981
+ return uuid;
23982
+ }
23983
+ var byteToHex;
23984
+ var stringify_default;
23985
+ var init_stringify = __esm({
23986
+ "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/stringify.js"() {
23987
+ init_validate();
23988
+ byteToHex = [];
23989
+ for (let i = 0; i < 256; ++i) {
23990
+ byteToHex.push((i + 256).toString(16).substr(1));
23991
+ }
23992
+ stringify_default = stringify3;
23993
+ }
23994
+ });
23995
+ function v1(options, buf, offset) {
23996
+ let i = buf && offset || 0;
23997
+ const b = buf || new Array(16);
23998
+ options = options || {};
23999
+ let node = options.node || _nodeId;
24000
+ let clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq;
24001
+ if (node == null || clockseq == null) {
24002
+ const seedBytes = options.random || (options.rng || rng)();
24003
+ if (node == null) {
24004
+ node = _nodeId = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];
24005
+ }
24006
+ if (clockseq == null) {
24007
+ clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 16383;
24008
+ }
24009
+ }
24010
+ let msecs = options.msecs !== void 0 ? options.msecs : Date.now();
24011
+ let nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs + 1;
24012
+ const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4;
24013
+ if (dt < 0 && options.clockseq === void 0) {
24014
+ clockseq = clockseq + 1 & 16383;
24015
+ }
24016
+ if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === void 0) {
24017
+ nsecs = 0;
24018
+ }
24019
+ if (nsecs >= 1e4) {
24020
+ throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
24021
+ }
24022
+ _lastMSecs = msecs;
24023
+ _lastNSecs = nsecs;
24024
+ _clockseq = clockseq;
24025
+ msecs += 122192928e5;
24026
+ const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296;
24027
+ b[i++] = tl >>> 24 & 255;
24028
+ b[i++] = tl >>> 16 & 255;
24029
+ b[i++] = tl >>> 8 & 255;
24030
+ b[i++] = tl & 255;
24031
+ const tmh = msecs / 4294967296 * 1e4 & 268435455;
24032
+ b[i++] = tmh >>> 8 & 255;
24033
+ b[i++] = tmh & 255;
24034
+ b[i++] = tmh >>> 24 & 15 | 16;
24035
+ b[i++] = tmh >>> 16 & 255;
24036
+ b[i++] = clockseq >>> 8 | 128;
24037
+ b[i++] = clockseq & 255;
24038
+ for (let n = 0; n < 6; ++n) {
24039
+ b[i + n] = node[n];
24040
+ }
24041
+ return buf || stringify_default(b);
24042
+ }
24043
+ var _nodeId;
24044
+ var _clockseq;
24045
+ var _lastMSecs;
24046
+ var _lastNSecs;
24047
+ var v1_default;
24048
+ var init_v1 = __esm({
24049
+ "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v1.js"() {
24050
+ init_rng();
24051
+ init_stringify();
24052
+ _lastMSecs = 0;
24053
+ _lastNSecs = 0;
24054
+ v1_default = v1;
24055
+ }
24056
+ });
24057
+ function parse5(uuid) {
24058
+ if (!validate_default(uuid)) {
24059
+ throw TypeError("Invalid UUID");
24060
+ }
24061
+ let v;
24062
+ const arr = new Uint8Array(16);
24063
+ arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;
24064
+ arr[1] = v >>> 16 & 255;
24065
+ arr[2] = v >>> 8 & 255;
24066
+ arr[3] = v & 255;
24067
+ arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;
24068
+ arr[5] = v & 255;
24069
+ arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;
24070
+ arr[7] = v & 255;
24071
+ arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;
24072
+ arr[9] = v & 255;
24073
+ arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255;
24074
+ arr[11] = v / 4294967296 & 255;
24075
+ arr[12] = v >>> 24 & 255;
24076
+ arr[13] = v >>> 16 & 255;
24077
+ arr[14] = v >>> 8 & 255;
24078
+ arr[15] = v & 255;
24079
+ return arr;
24080
+ }
24081
+ var parse_default;
24082
+ var init_parse = __esm({
24083
+ "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/parse.js"() {
24084
+ init_validate();
24085
+ parse_default = parse5;
24086
+ }
24087
+ });
24088
+ function stringToBytes(str) {
24089
+ str = unescape(encodeURIComponent(str));
24090
+ const bytes = [];
24091
+ for (let i = 0; i < str.length; ++i) {
24092
+ bytes.push(str.charCodeAt(i));
24093
+ }
24094
+ return bytes;
24095
+ }
24096
+ function v35_default(name, version2, hashfunc) {
24097
+ function generateUUID(value, namespace, buf, offset) {
24098
+ if (typeof value === "string") {
24099
+ value = stringToBytes(value);
24100
+ }
24101
+ if (typeof namespace === "string") {
24102
+ namespace = parse_default(namespace);
24103
+ }
24104
+ if (namespace.length !== 16) {
24105
+ throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
24106
+ }
24107
+ let bytes = new Uint8Array(16 + value.length);
24108
+ bytes.set(namespace);
24109
+ bytes.set(value, namespace.length);
24110
+ bytes = hashfunc(bytes);
24111
+ bytes[6] = bytes[6] & 15 | version2;
24112
+ bytes[8] = bytes[8] & 63 | 128;
24113
+ if (buf) {
24114
+ offset = offset || 0;
24115
+ for (let i = 0; i < 16; ++i) {
24116
+ buf[offset + i] = bytes[i];
24117
+ }
24118
+ return buf;
24119
+ }
24120
+ return stringify_default(bytes);
24121
+ }
24122
+ try {
24123
+ generateUUID.name = name;
24124
+ } catch (err) {
24125
+ }
24126
+ generateUUID.DNS = DNS;
24127
+ generateUUID.URL = URL2;
24128
+ return generateUUID;
24129
+ }
24130
+ var DNS;
24131
+ var URL2;
24132
+ var init_v35 = __esm({
24133
+ "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v35.js"() {
24134
+ init_stringify();
24135
+ init_parse();
24136
+ DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8";
24137
+ URL2 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
24138
+ }
24139
+ });
24140
+ function md5(bytes) {
24141
+ if (Array.isArray(bytes)) {
24142
+ bytes = Buffer.from(bytes);
24143
+ } else if (typeof bytes === "string") {
24144
+ bytes = Buffer.from(bytes, "utf8");
24145
+ }
24146
+ return crypto6.createHash("md5").update(bytes).digest();
24147
+ }
24148
+ var md5_default;
24149
+ var init_md5 = __esm({
24150
+ "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/md5.js"() {
24151
+ md5_default = md5;
24152
+ }
24153
+ });
24154
+ var v3;
24155
+ var v3_default;
24156
+ var init_v3 = __esm({
24157
+ "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v3.js"() {
24158
+ init_v35();
24159
+ init_md5();
24160
+ v3 = v35_default("v3", 48, md5_default);
24161
+ v3_default = v3;
24162
+ }
24163
+ });
24164
+ function v4(options, buf, offset) {
24165
+ options = options || {};
24166
+ const rnds = options.random || (options.rng || rng)();
24167
+ rnds[6] = rnds[6] & 15 | 64;
24168
+ rnds[8] = rnds[8] & 63 | 128;
24169
+ if (buf) {
24170
+ offset = offset || 0;
24171
+ for (let i = 0; i < 16; ++i) {
24172
+ buf[offset + i] = rnds[i];
24173
+ }
24174
+ return buf;
24175
+ }
24176
+ return stringify_default(rnds);
24177
+ }
24178
+ var v4_default;
24179
+ var init_v4 = __esm({
24180
+ "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v4.js"() {
24181
+ init_rng();
24182
+ init_stringify();
24183
+ v4_default = v4;
24184
+ }
24185
+ });
24186
+ function sha1(bytes) {
24187
+ if (Array.isArray(bytes)) {
24188
+ bytes = Buffer.from(bytes);
24189
+ } else if (typeof bytes === "string") {
24190
+ bytes = Buffer.from(bytes, "utf8");
24191
+ }
24192
+ return crypto6.createHash("sha1").update(bytes).digest();
24193
+ }
24194
+ var sha1_default;
24195
+ var init_sha1 = __esm({
24196
+ "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/sha1.js"() {
24197
+ sha1_default = sha1;
24198
+ }
24199
+ });
24200
+ var v5;
24201
+ var v5_default;
24202
+ var init_v5 = __esm({
24203
+ "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v5.js"() {
24204
+ init_v35();
24205
+ init_sha1();
24206
+ v5 = v35_default("v5", 80, sha1_default);
24207
+ v5_default = v5;
24208
+ }
24209
+ });
24210
+ var nil_default;
24211
+ var init_nil = __esm({
24212
+ "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/nil.js"() {
24213
+ nil_default = "00000000-0000-0000-0000-000000000000";
24214
+ }
24215
+ });
24216
+ function version(uuid) {
24217
+ if (!validate_default(uuid)) {
24218
+ throw TypeError("Invalid UUID");
24219
+ }
24220
+ return parseInt(uuid.substr(14, 1), 16);
24221
+ }
24222
+ var version_default;
24223
+ var init_version = __esm({
24224
+ "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/version.js"() {
24225
+ init_validate();
24226
+ version_default = version;
24227
+ }
24228
+ });
24229
+ var esm_node_exports = {};
24230
+ __export(esm_node_exports, {
24231
+ NIL: () => nil_default,
24232
+ parse: () => parse_default,
24233
+ stringify: () => stringify_default,
24234
+ v1: () => v1_default,
24235
+ v3: () => v3_default,
24236
+ v4: () => v4_default,
24237
+ v5: () => v5_default,
24238
+ validate: () => validate_default,
24239
+ version: () => version_default
24240
+ });
24241
+ var init_esm_node = __esm({
24242
+ "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/index.js"() {
24243
+ init_v1();
24244
+ init_v3();
24245
+ init_v4();
24246
+ init_v5();
24247
+ init_nil();
24248
+ init_version();
24249
+ init_validate();
24250
+ init_stringify();
24251
+ init_parse();
24252
+ }
24253
+ });
23945
24254
  var require_toaster = __commonJS2({
23946
24255
  "../../node_modules/.pnpm/node-notifier@10.0.1/node_modules/node-notifier/notifiers/toaster.js"(exports2, module2) {
23947
24256
  var path19 = __require2("path");
@@ -23949,7 +24258,7 @@ var require_toaster = __commonJS2({
23949
24258
  var utils = require_utils2();
23950
24259
  var Balloon = require_balloon();
23951
24260
  var os3 = __require2("os");
23952
- var { v4: uuid } = __require2("uuid");
24261
+ var { v4: uuid } = (init_esm_node(), __toCommonJS(esm_node_exports));
23953
24262
  var EventEmitter13 = __require2("events").EventEmitter;
23954
24263
  var util3 = __require2("util");
23955
24264
  var fallback;
@@ -35481,7 +35790,7 @@ var require_form_data = __commonJS2({
35481
35790
  var parseUrl = __require2("url").parse;
35482
35791
  var fs19 = __require2("fs");
35483
35792
  var Stream = __require2("stream").Stream;
35484
- var crypto5 = __require2("crypto");
35793
+ var crypto8 = __require2("crypto");
35485
35794
  var mime = require_mime_types();
35486
35795
  var asynckit = require_asynckit();
35487
35796
  var setToStringTag = require_es_set_tostringtag();
@@ -35687,7 +35996,7 @@ var require_form_data = __commonJS2({
35687
35996
  return Buffer.concat([dataBuffer, Buffer.from(this._lastBoundary())]);
35688
35997
  };
35689
35998
  FormData3.prototype._generateBoundary = function() {
35690
- this._boundary = "--------------------------" + crypto5.randomBytes(12).toString("hex");
35999
+ this._boundary = "--------------------------" + crypto8.randomBytes(12).toString("hex");
35691
36000
  };
35692
36001
  FormData3.prototype.getLengthSync = function() {
35693
36002
  var knownLength = this._overheadLength + this._valueLength;
@@ -36094,7 +36403,7 @@ var init_node = __esm({
36094
36403
  let str = "";
36095
36404
  const { length } = alphabet;
36096
36405
  const randomValues = new Uint32Array(size);
36097
- crypto3.randomFillSync(randomValues);
36406
+ crypto6.randomFillSync(randomValues);
36098
36407
  for (let i = 0; i < size; i++) {
36099
36408
  str += alphabet[randomValues[i] % length];
36100
36409
  }
@@ -36806,7 +37115,7 @@ var require_ms = __commonJS2({
36806
37115
  options = options || {};
36807
37116
  var type2 = typeof val;
36808
37117
  if (type2 === "string" && val.length > 0) {
36809
- return parse6(val);
37118
+ return parse7(val);
36810
37119
  } else if (type2 === "number" && isFinite(val)) {
36811
37120
  return options.long ? fmtLong(val) : fmtShort(val);
36812
37121
  }
@@ -36814,7 +37123,7 @@ var require_ms = __commonJS2({
36814
37123
  "val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
36815
37124
  );
36816
37125
  };
36817
- function parse6(str) {
37126
+ function parse7(str) {
36818
37127
  str = String(str);
36819
37128
  if (str.length > 100) {
36820
37129
  return;
@@ -37339,10 +37648,10 @@ var require_supports_color = __commonJS2({
37339
37648
  return 3;
37340
37649
  }
37341
37650
  if ("TERM_PROGRAM" in env) {
37342
- const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
37651
+ const version2 = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
37343
37652
  switch (env.TERM_PROGRAM) {
37344
37653
  case "iTerm.app":
37345
- return version >= 3 ? 3 : 2;
37654
+ return version2 >= 3 ? 3 : 2;
37346
37655
  case "Apple_Terminal":
37347
37656
  return 2;
37348
37657
  }
@@ -37574,7 +37883,7 @@ var require_debug2 = __commonJS2({
37574
37883
  var require_follow_redirects = __commonJS2({
37575
37884
  "../../node_modules/.pnpm/follow-redirects@1.15.11_debug@4.4.3/node_modules/follow-redirects/index.js"(exports2, module2) {
37576
37885
  var url2 = __require2("url");
37577
- var URL2 = url2.URL;
37886
+ var URL3 = url2.URL;
37578
37887
  var http3 = __require2("http");
37579
37888
  var https3 = __require2("https");
37580
37889
  var Writable = __require2("stream").Writable;
@@ -37590,7 +37899,7 @@ var require_follow_redirects = __commonJS2({
37590
37899
  })();
37591
37900
  var useNativeURL = false;
37592
37901
  try {
37593
- assert2(new URL2(""));
37902
+ assert2(new URL3(""));
37594
37903
  } catch (error) {
37595
37904
  useNativeURL = error.code === "ERR_INVALID_URL";
37596
37905
  }
@@ -37970,7 +38279,7 @@ var require_follow_redirects = __commonJS2({
37970
38279
  function parseUrl(input) {
37971
38280
  var parsed;
37972
38281
  if (useNativeURL) {
37973
- parsed = new URL2(input);
38282
+ parsed = new URL3(input);
37974
38283
  } else {
37975
38284
  parsed = validateUrl(url2.parse(input));
37976
38285
  if (!isString2(parsed.protocol)) {
@@ -37980,7 +38289,7 @@ var require_follow_redirects = __commonJS2({
37980
38289
  return parsed;
37981
38290
  }
37982
38291
  function resolveUrl(relative14, base) {
37983
- return useNativeURL ? new URL2(relative14, base) : parseUrl(url2.resolve(base, relative14));
38292
+ return useNativeURL ? new URL3(relative14, base) : parseUrl(url2.resolve(base, relative14));
37984
38293
  }
37985
38294
  function validateUrl(input) {
37986
38295
  if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) {
@@ -38059,7 +38368,7 @@ var require_follow_redirects = __commonJS2({
38059
38368
  return typeof value === "object" && "length" in value;
38060
38369
  }
38061
38370
  function isURL(value) {
38062
- return URL2 && value instanceof URL2;
38371
+ return URL3 && value instanceof URL3;
38063
38372
  }
38064
38373
  module2.exports = wrap({ http: http3, https: https3 });
38065
38374
  module2.exports.wrap = wrap;
@@ -40110,23 +40419,23 @@ var init_validator = __esm({
40110
40419
  };
40111
40420
  });
40112
40421
  deprecatedWarnings = {};
40113
- validators.transitional = function transitional(validator, version, message) {
40422
+ validators.transitional = function transitional(validator, version2, message) {
40114
40423
  function formatMessage(opt, desc) {
40115
40424
  return "[Axios v" + VERSION + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
40116
40425
  }
40117
40426
  return (value, opt, opts) => {
40118
40427
  if (validator === false) {
40119
40428
  throw new AxiosError_default(
40120
- formatMessage(opt, " has been removed" + (version ? " in " + version : "")),
40429
+ formatMessage(opt, " has been removed" + (version2 ? " in " + version2 : "")),
40121
40430
  AxiosError_default.ERR_DEPRECATED
40122
40431
  );
40123
40432
  }
40124
- if (version && !deprecatedWarnings[opt]) {
40433
+ if (version2 && !deprecatedWarnings[opt]) {
40125
40434
  deprecatedWarnings[opt] = true;
40126
40435
  console.warn(
40127
40436
  formatMessage(
40128
40437
  opt,
40129
- " has been deprecated since v" + version + " and will be removed in the near future"
40438
+ " has been deprecated since v" + version2 + " and will be removed in the near future"
40130
40439
  )
40131
40440
  );
40132
40441
  }
@@ -41765,7 +42074,7 @@ var require_stringify = __commonJS2({
41765
42074
  return typeof v === "string" || typeof v === "number" || typeof v === "boolean" || typeof v === "symbol" || typeof v === "bigint";
41766
42075
  };
41767
42076
  var sentinel = {};
41768
- var stringify6 = function stringify7(object, prefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, encoder, filter2, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel) {
42077
+ var stringify7 = function stringify8(object, prefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, encoder, filter2, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel) {
41769
42078
  var obj = object;
41770
42079
  var tmpSc = sideChannel;
41771
42080
  var step = 0;
@@ -41841,7 +42150,7 @@ var require_stringify = __commonJS2({
41841
42150
  sideChannel.set(object, step);
41842
42151
  var valueSideChannel = getSideChannel();
41843
42152
  valueSideChannel.set(sentinel, sideChannel);
41844
- pushToArray(values, stringify7(
42153
+ pushToArray(values, stringify8(
41845
42154
  value,
41846
42155
  keyPrefix,
41847
42156
  generateArrayPrefix,
@@ -41958,7 +42267,7 @@ var require_stringify = __commonJS2({
41958
42267
  if (options.skipNulls && value === null) {
41959
42268
  continue;
41960
42269
  }
41961
- pushToArray(keys, stringify6(
42270
+ pushToArray(keys, stringify7(
41962
42271
  value,
41963
42272
  key,
41964
42273
  generateArrayPrefix,
@@ -42290,13 +42599,13 @@ var require_parse2 = __commonJS2({
42290
42599
  });
42291
42600
  var require_lib3 = __commonJS2({
42292
42601
  "../../node_modules/.pnpm/qs@6.15.1/node_modules/qs/lib/index.js"(exports2, module2) {
42293
- var stringify6 = require_stringify();
42294
- var parse6 = require_parse2();
42602
+ var stringify7 = require_stringify();
42603
+ var parse7 = require_parse2();
42295
42604
  var formats = require_formats();
42296
42605
  module2.exports = {
42297
42606
  formats,
42298
- parse: parse6,
42299
- stringify: stringify6
42607
+ parse: parse7,
42608
+ stringify: stringify7
42300
42609
  };
42301
42610
  }
42302
42611
  });
@@ -45578,13 +45887,13 @@ var init_es = __esm({
45578
45887
  internalCache = new DefaultCache();
45579
45888
  AESCipher = class {
45580
45889
  constructor(key) {
45581
- const hash = crypto3.createHash("sha256");
45890
+ const hash = crypto6.createHash("sha256");
45582
45891
  hash.update(key);
45583
45892
  this.key = hash.digest();
45584
45893
  }
45585
45894
  decrypt(encrypt) {
45586
45895
  const encryptBuffer = Buffer.from(encrypt, "base64");
45587
- const decipher = crypto3.createDecipheriv("aes-256-cbc", this.key, encryptBuffer.slice(0, 16));
45896
+ const decipher = crypto6.createDecipheriv("aes-256-cbc", this.key, encryptBuffer.slice(0, 16));
45588
45897
  let decrypted = decipher.update(encryptBuffer.slice(16).toString("hex"), "hex", "utf8");
45589
45898
  decrypted += decipher.final("utf8");
45590
45899
  return decrypted;
@@ -123472,7 +123781,7 @@ var init_es = __esm({
123472
123781
  if (!this.verificationToken) {
123473
123782
  return true;
123474
123783
  }
123475
- const computedSignature = crypto3.createHash("sha1").update(timestamp + nonce + this.verificationToken + JSON.stringify(data)).digest("hex");
123784
+ const computedSignature = crypto6.createHash("sha1").update(timestamp + nonce + this.verificationToken + JSON.stringify(data)).digest("hex");
123476
123785
  return computedSignature === signature;
123477
123786
  }
123478
123787
  checkIsEventValidated(data) {
@@ -123481,7 +123790,7 @@ var init_es = __esm({
123481
123790
  }
123482
123791
  const { "x-lark-request-timestamp": timestamp, "x-lark-request-nonce": nonce, "x-lark-signature": signature } = data.headers;
123483
123792
  const content = timestamp + nonce + this.encryptKey + JSON.stringify(data);
123484
- const computedSignature = crypto3.createHash("sha256").update(content).digest("hex");
123793
+ const computedSignature = crypto6.createHash("sha256").update(content).digest("hex");
123485
123794
  return computedSignature === signature;
123486
123795
  }
123487
123796
  };
@@ -124359,7 +124668,7 @@ var init_es = __esm({
124359
124668
  return __awaiter(this, void 0, void 0, function* () {
124360
124669
  const { appId, appSecret } = this.wsConfig.getClient();
124361
124670
  try {
124362
- const { code, data: { URL: URL2, ClientConfig }, msg } = yield this.httpInstance.request({
124671
+ const { code, data: { URL: URL3, ClientConfig }, msg } = yield this.httpInstance.request({
124363
124672
  method: "post",
124364
124673
  url: this.wsConfig.wsConfigUrl,
124365
124674
  data: {
@@ -124378,9 +124687,9 @@ var init_es = __esm({
124378
124687
  return false;
124379
124688
  }
124380
124689
  }
124381
- const { device_id, service_id } = qs.parse(URL2);
124690
+ const { device_id, service_id } = qs.parse(URL3);
124382
124691
  this.wsConfig.updateWs({
124383
- connectUrl: URL2,
124692
+ connectUrl: URL3,
124384
124693
  deviceId: device_id,
124385
124694
  serviceId: service_id,
124386
124695
  pingInterval: ClientConfig.PingInterval * 1e3,
@@ -124388,7 +124697,7 @@ var init_es = __esm({
124388
124697
  reconnectInterval: ClientConfig.ReconnectInterval * 1e3,
124389
124698
  reconnectNonce: ClientConfig.ReconnectNonce * 1e3
124390
124699
  });
124391
- this.logger.debug("[ws]", `get connect config success, ws url: ${URL2}`);
124700
+ this.logger.debug("[ws]", `get connect config success, ws url: ${URL3}`);
124392
124701
  return true;
124393
124702
  } catch (e) {
124394
124703
  this.logger.error("[ws]", (e === null || e === void 0 ? void 0 : e.message) || "system busy");
@@ -135587,10 +135896,10 @@ var init_nanoid = __esm({
135587
135896
  fillPool = (bytes) => {
135588
135897
  if (!pool || pool.length < bytes) {
135589
135898
  pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
135590
- crypto3.randomFillSync(pool);
135899
+ crypto6.randomFillSync(pool);
135591
135900
  poolOffset = 0;
135592
135901
  } else if (poolOffset + bytes > pool.length) {
135593
- crypto3.randomFillSync(pool);
135902
+ crypto6.randomFillSync(pool);
135594
135903
  poolOffset = 0;
135595
135904
  }
135596
135905
  poolOffset += bytes;
@@ -142444,7 +142753,7 @@ function registerHealthRoutes(fastify2) {
142444
142753
  const response = {
142445
142754
  status: "ok",
142446
142755
  service: "viben-gateway",
142447
- version: "1.0.0",
142756
+ version: VERSION3,
142448
142757
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
142449
142758
  uptime: uptimeStr,
142450
142759
  uptime_seconds: uptimeSeconds,
@@ -142453,10 +142762,12 @@ function registerHealthRoutes(fastify2) {
142453
142762
  return response;
142454
142763
  });
142455
142764
  }
142765
+ var VERSION3;
142456
142766
  var startupConfig;
142457
142767
  var gatewayStartTime;
142458
142768
  var init_health = __esm({
142459
142769
  "src/gateway/routes/health.ts"() {
142770
+ VERSION3 = "1.1.3";
142460
142771
  startupConfig = null;
142461
142772
  gatewayStartTime = Date.now();
142462
142773
  }
@@ -151356,8 +151667,8 @@ function isGlobalWorkspace(workspacePath) {
151356
151667
  const globalVibenPath = getGlobalVibenPath();
151357
151668
  return workspacePath === globalVibenPath || workspacePath === homedir2();
151358
151669
  }
151359
- function getService(workspacePath, validate = false) {
151360
- if (workspacePath && validate) {
151670
+ function getService(workspacePath, validate2 = false) {
151671
+ if (workspacePath && validate2) {
151361
151672
  validateWorkspacePath(workspacePath);
151362
151673
  }
151363
151674
  const baseDir = workspacePath ? join2(workspacePath, ".viben", "group-chats") : getGlobalGroupChatsPath();
@@ -153428,7 +153739,7 @@ function registerMcpRoutes(fastify2) {
153428
153739
  }
153429
153740
  }
153430
153741
  }, async (request, reply) => {
153431
- const { name, version, target_dir } = request.body;
153742
+ const { name, version: version2, target_dir } = request.body;
153432
153743
  if (!name) {
153433
153744
  reply.code(400);
153434
153745
  return { success: false, error: "name is required" };
@@ -153437,9 +153748,9 @@ function registerMcpRoutes(fastify2) {
153437
153748
  reply.code(400);
153438
153749
  return { success: false, error: "target_dir is required" };
153439
153750
  }
153440
- log31.info({ name, version, target_dir }, "Downloading MCP package");
153751
+ log31.info({ name, version: version2, target_dir }, "Downloading MCP package");
153441
153752
  try {
153442
- const result = await downloadFromMarketplace(name, version, target_dir);
153753
+ const result = await downloadFromMarketplace(name, version2, target_dir);
153443
153754
  if (!result.success) {
153444
153755
  reply.code(400);
153445
153756
  return { success: false, error: result.error };
@@ -156409,10 +156720,10 @@ async function checkPython(path19) {
156409
156720
  });
156410
156721
  const versionOutput = stdout.trim() || stderr.trim();
156411
156722
  const versionMatch = versionOutput.match(/Python\s+(\d+\.\d+\.\d+)/);
156412
- const version = versionMatch ? versionMatch[1] : null;
156723
+ const version2 = versionMatch ? versionMatch[1] : null;
156413
156724
  let isValid = false;
156414
- if (version) {
156415
- const parts = version.split(".");
156725
+ if (version2) {
156726
+ const parts = version2.split(".");
156416
156727
  if (parts.length >= 2) {
156417
156728
  const major = parseInt(parts[0], 10);
156418
156729
  const minor = parseInt(parts[1], 10);
@@ -156421,7 +156732,7 @@ async function checkPython(path19) {
156421
156732
  }
156422
156733
  return {
156423
156734
  path: actualPath,
156424
- version,
156735
+ version: version2,
156425
156736
  is_valid: isValid
156426
156737
  };
156427
156738
  } catch {
@@ -156576,15 +156887,15 @@ async function detectCliToolVersion(toolPath, tool) {
156576
156887
  timeout: 5e3
156577
156888
  });
156578
156889
  const output2 = stdout.trim() || stderr.trim();
156579
- let version = null;
156890
+ let version2 = null;
156580
156891
  if (config.versionRegex) {
156581
156892
  const match = output2.match(config.versionRegex);
156582
- version = match ? match[1] || match[2] || null : null;
156893
+ version2 = match ? match[1] || match[2] || null : null;
156583
156894
  } else {
156584
156895
  const match = output2.match(/(\d+\.\d+\.\d+)/);
156585
- version = match ? match[1] : null;
156896
+ version2 = match ? match[1] : null;
156586
156897
  }
156587
- return { version, valid: true };
156898
+ return { version: version2, valid: true };
156588
156899
  } catch {
156589
156900
  return { version: null, valid: false };
156590
156901
  }
@@ -156618,7 +156929,7 @@ async function detectCliTool(tool, userConfigPath) {
156618
156929
  const config = TOOL_CONFIGS[tool];
156619
156930
  const allPaths = [];
156620
156931
  const seenRealPaths = /* @__PURE__ */ new Set();
156621
- const addPath = async (path19, version, source) => {
156932
+ const addPath = async (path19, version2, source) => {
156622
156933
  const normalizedPath = path19.replace(/\/+$/, "");
156623
156934
  let realPath;
156624
156935
  try {
@@ -156628,13 +156939,13 @@ async function detectCliTool(tool, userConfigPath) {
156628
156939
  }
156629
156940
  if (!seenRealPaths.has(realPath)) {
156630
156941
  seenRealPaths.add(realPath);
156631
- allPaths.push({ path: normalizedPath, version, source });
156942
+ allPaths.push({ path: normalizedPath, version: version2, source });
156632
156943
  }
156633
156944
  };
156634
156945
  if (userConfigPath) {
156635
- const { version, valid } = await detectCliToolVersion(userConfigPath, tool);
156946
+ const { version: version2, valid } = await detectCliToolVersion(userConfigPath, tool);
156636
156947
  if (valid) {
156637
- await addPath(userConfigPath, version || void 0, "user-config");
156948
+ await addPath(userConfigPath, version2 || void 0, "user-config");
156638
156949
  }
156639
156950
  }
156640
156951
  if (process.platform === "darwin") {
@@ -156654,9 +156965,9 @@ async function detectCliTool(tool, userConfigPath) {
156654
156965
  }
156655
156966
  for (const toolPath of homebrewPaths) {
156656
156967
  if (await isExecutable(toolPath)) {
156657
- const { version, valid } = await detectCliToolVersion(toolPath, tool);
156968
+ const { version: version2, valid } = await detectCliToolVersion(toolPath, tool);
156658
156969
  if (valid) {
156659
- await addPath(toolPath, version || void 0, "homebrew");
156970
+ await addPath(toolPath, version2 || void 0, "homebrew");
156660
156971
  }
156661
156972
  }
156662
156973
  }
@@ -156667,9 +156978,9 @@ async function detectCliTool(tool, userConfigPath) {
156667
156978
  const { stdout } = await execAsync5(`${whichCmd} ${toolCmd}`, { timeout: 5e3 });
156668
156979
  const toolPath = stdout.trim().split("\n")[0];
156669
156980
  if (toolPath) {
156670
- const { version, valid } = await detectCliToolVersion(toolPath, tool);
156981
+ const { version: version2, valid } = await detectCliToolVersion(toolPath, tool);
156671
156982
  if (valid) {
156672
- await addPath(toolPath, version || void 0, getToolSource(toolPath));
156983
+ await addPath(toolPath, version2 || void 0, getToolSource(toolPath));
156673
156984
  }
156674
156985
  }
156675
156986
  } catch {
@@ -156690,9 +157001,9 @@ async function detectCliTool(tool, userConfigPath) {
156690
157001
  for (const dir of versionDirs) {
156691
157002
  const toolPathNvm = join2(nvmVersionsDir, dir.name, "bin", tool);
156692
157003
  if (await isExecutable(toolPathNvm)) {
156693
- const { version, valid } = await detectCliToolVersion(toolPathNvm, tool);
157004
+ const { version: version2, valid } = await detectCliToolVersion(toolPathNvm, tool);
156694
157005
  if (valid) {
156695
- await addPath(toolPathNvm, version || void 0, "nvm");
157006
+ await addPath(toolPathNvm, version2 || void 0, "nvm");
156696
157007
  }
156697
157008
  }
156698
157009
  }
@@ -156706,9 +157017,9 @@ async function detectCliTool(tool, userConfigPath) {
156706
157017
  ];
156707
157018
  for (const pyenvPath of pyenvPaths) {
156708
157019
  if (await isExecutable(pyenvPath)) {
156709
- const { version, valid } = await detectCliToolVersion(pyenvPath, tool);
157020
+ const { version: version2, valid } = await detectCliToolVersion(pyenvPath, tool);
156710
157021
  if (valid) {
156711
- await addPath(pyenvPath, version || void 0, "pyenv");
157022
+ await addPath(pyenvPath, version2 || void 0, "pyenv");
156712
157023
  }
156713
157024
  }
156714
157025
  }
@@ -156724,9 +157035,9 @@ async function detectCliTool(tool, userConfigPath) {
156724
157035
  ];
156725
157036
  for (const condaPath of condaPaths) {
156726
157037
  if (await isExecutable(condaPath)) {
156727
- const { version, valid } = await detectCliToolVersion(condaPath, tool);
157038
+ const { version: version2, valid } = await detectCliToolVersion(condaPath, tool);
156728
157039
  if (valid) {
156729
- await addPath(condaPath, version || void 0, "system-path");
157040
+ await addPath(condaPath, version2 || void 0, "system-path");
156730
157041
  }
156731
157042
  }
156732
157043
  }
@@ -156735,9 +157046,9 @@ async function detectCliTool(tool, userConfigPath) {
156735
157046
  for (const toolPath of candidates) {
156736
157047
  if (toolPath.includes("*")) continue;
156737
157048
  if (await isExecutable(toolPath)) {
156738
- const { version, valid } = await detectCliToolVersion(toolPath, tool);
157049
+ const { version: version2, valid } = await detectCliToolVersion(toolPath, tool);
156739
157050
  if (valid) {
156740
- await addPath(toolPath, version || void 0, getToolSource(toolPath));
157051
+ await addPath(toolPath, version2 || void 0, getToolSource(toolPath));
156741
157052
  }
156742
157053
  }
156743
157054
  }
@@ -156745,9 +157056,9 @@ async function detectCliTool(tool, userConfigPath) {
156745
157056
  const systemPaths = ["/usr/bin/python3", "/usr/bin/python"];
156746
157057
  for (const sysPath of systemPaths) {
156747
157058
  if (await isExecutable(sysPath)) {
156748
- const { version, valid } = await detectCliToolVersion(sysPath, tool);
157059
+ const { version: version2, valid } = await detectCliToolVersion(sysPath, tool);
156749
157060
  if (valid) {
156750
- await addPath(sysPath, version || void 0, "system-path");
157061
+ await addPath(sysPath, version2 || void 0, "system-path");
156751
157062
  }
156752
157063
  }
156753
157064
  }
@@ -156809,11 +157120,11 @@ async function checkPackageInstalled(pythonPath, packageName) {
156809
157120
  log35.debug({ stderr: stderr.slice(0, 200) }, "pip show stderr");
156810
157121
  }
156811
157122
  const versionMatch = stdout.match(/^Version:\s*(.+)$/m);
156812
- const version = versionMatch ? versionMatch[1].trim() : null;
156813
- log35.debug({ packageName, version }, "Package found via pip");
157123
+ const version2 = versionMatch ? versionMatch[1].trim() : null;
157124
+ log35.debug({ packageName, version: version2 }, "Package found via pip");
156814
157125
  return {
156815
157126
  name: packageName,
156816
- version,
157127
+ version: version2,
156817
157128
  installed: true
156818
157129
  };
156819
157130
  } catch (pipErr) {
@@ -156824,11 +157135,11 @@ async function checkPackageInstalled(pythonPath, packageName) {
156824
157135
  log35.debug({ importCommand }, "Trying import");
156825
157136
  try {
156826
157137
  const { stdout: importStdout } = await execAsync5(importCommand, { timeout: 1e4 });
156827
- const version = importStdout.trim() || "unknown";
156828
- log35.debug({ packageName, version }, "Package found via import");
157138
+ const version2 = importStdout.trim() || "unknown";
157139
+ log35.debug({ packageName, version: version2 }, "Package found via import");
156829
157140
  return {
156830
157141
  name: packageName,
156831
- version: version === "unknown" ? null : version,
157142
+ version: version2 === "unknown" ? null : version2,
156832
157143
  installed: true
156833
157144
  };
156834
157145
  } catch (importErr) {
@@ -156839,11 +157150,11 @@ async function checkPackageInstalled(pythonPath, packageName) {
156839
157150
  try {
156840
157151
  const { stdout: modStdout } = await execAsync5(moduleCommand, { timeout: 1e4 });
156841
157152
  const versionMatch = modStdout.match(/(\d+\.\d+\.\d+)/);
156842
- const version = versionMatch ? versionMatch[1] : "installed";
156843
- log35.debug({ packageName, version }, "Package found via module");
157153
+ const version2 = versionMatch ? versionMatch[1] : "installed";
157154
+ log35.debug({ packageName, version: version2 }, "Package found via module");
156844
157155
  return {
156845
157156
  name: packageName,
156846
- version,
157157
+ version: version2,
156847
157158
  installed: true
156848
157159
  };
156849
157160
  } catch (modErr) {
@@ -166758,7 +167069,7 @@ function registerSkillRoutes(fastify2) {
166758
167069
  custom_path,
166759
167070
  source_path,
166760
167071
  zip_path,
166761
- version,
167072
+ version: version2,
166762
167073
  force = false
166763
167074
  } = request.body;
166764
167075
  if (!name) {
@@ -166781,7 +167092,7 @@ function registerSkillRoutes(fastify2) {
166781
167092
  customPath: custom_path,
166782
167093
  sourcePath: source_path,
166783
167094
  zipPath: zip_path,
166784
- version,
167095
+ version: version2,
166785
167096
  force
166786
167097
  });
166787
167098
  if (!result.success) {
@@ -166814,7 +167125,7 @@ function registerSkillRoutes(fastify2) {
166814
167125
  return {
166815
167126
  success: false,
166816
167127
  name,
166817
- version: version || "1.0.0",
167128
+ version: version2 || "1.0.0",
166818
167129
  path: "",
166819
167130
  message: "Installation failed",
166820
167131
  error: `${errorCode}: ${message}`
@@ -167243,7 +167554,7 @@ function registerSkillRoutes(fastify2) {
167243
167554
  }
167244
167555
  }
167245
167556
  }, async (request, reply) => {
167246
- const { name, version, target_dir } = request.body;
167557
+ const { name, version: version2, target_dir } = request.body;
167247
167558
  if (!name) {
167248
167559
  reply.code(400);
167249
167560
  return { success: false, error: "name is required" };
@@ -167253,7 +167564,7 @@ function registerSkillRoutes(fastify2) {
167253
167564
  return { success: false, error: "target_dir is required" };
167254
167565
  }
167255
167566
  try {
167256
- const result = await downloadSkillFromRegistry(name, version, target_dir);
167567
+ const result = await downloadSkillFromRegistry(name, version2, target_dir);
167257
167568
  if (!result.success) {
167258
167569
  reply.code(400);
167259
167570
  return { success: false, error: result.error };
@@ -167461,6 +167772,46 @@ async function createGateway(config = {}) {
167461
167772
  });
167462
167773
  }
167463
167774
  const app = fastify({ logger: true });
167775
+ try {
167776
+ await app.register(fastifySwagger, {
167777
+ openapi: {
167778
+ info: {
167779
+ title: "Viben Gateway API",
167780
+ description: "Agent Swarm \xD7 Code Evolution - Multi-agent orchestration and code evolution API",
167781
+ version: VERSION3
167782
+ },
167783
+ servers: [
167784
+ {
167785
+ url: `http://${host}:${port}`,
167786
+ description: "Local development server"
167787
+ }
167788
+ ],
167789
+ tags: [
167790
+ { name: "health", description: "Health check endpoints" },
167791
+ { name: "agents", description: "Agent management" },
167792
+ { name: "sessions", description: "Session management" },
167793
+ { name: "tasks", description: "Task management" },
167794
+ { name: "models", description: "Model configuration" },
167795
+ { name: "providers", description: "Provider configuration" },
167796
+ { name: "workspaces", description: "Workspace management" },
167797
+ { name: "cron", description: "Scheduled jobs" },
167798
+ { name: "channels", description: "Channel management" },
167799
+ { name: "mcp", description: "MCP server management" },
167800
+ { name: "executors", description: "Executor configuration" }
167801
+ ]
167802
+ }
167803
+ });
167804
+ app.get("/openapi.json", async () => {
167805
+ return app.swagger();
167806
+ });
167807
+ app.get("/openapi.yaml", async (_, reply) => {
167808
+ const yaml = app.swagger({ yaml: true });
167809
+ reply.type("application/x-yaml").send(yaml);
167810
+ });
167811
+ log45.info("Swagger plugin registered (OpenAPI spec at /openapi.json, /openapi.yaml)");
167812
+ } catch (e) {
167813
+ log45.warn({ err: e }, "Failed to register Swagger plugin");
167814
+ }
167464
167815
  if (cors) {
167465
167816
  await app.register(fastifyCors, {
167466
167817
  origin: true,
@@ -167482,46 +167833,6 @@ async function createGateway(config = {}) {
167482
167833
  credentials: true
167483
167834
  });
167484
167835
  }
167485
- try {
167486
- await app.register(fastifySwagger, {
167487
- openapi: {
167488
- info: {
167489
- title: "Viben Gateway API",
167490
- description: "Agent Swarm \xD7 Code Evolution \u2014 API for multi-agent orchestration, Evo-based code evolution, and XState task management",
167491
- version: "1.0.0"
167492
- },
167493
- servers: [{ url: `http://${host}:${port}` }],
167494
- tags: [
167495
- { name: "health", description: "Health check endpoints" },
167496
- { name: "agents", description: "Agent management" },
167497
- { name: "executors", description: "Executor discovery and management" },
167498
- { name: "sessions", description: "Session management" },
167499
- { name: "providers", description: "Provider management" },
167500
- { name: "models", description: "Model management" },
167501
- { name: "workspaces", description: "Workspace management" },
167502
- { name: "channels", description: "Channel management" },
167503
- { name: "cron", description: "Cron job management" },
167504
- { name: "tasks", description: "Task management" },
167505
- { name: "mcp", description: "MCP server management" },
167506
- { name: "kanban", description: "Kanban board management" }
167507
- ]
167508
- }
167509
- });
167510
- const execDir = dirname2(process.execPath);
167511
- const bundledStaticDir = join2(execDir, "swagger-ui-static");
167512
- const swaggerUiBaseDir = existsSync2(bundledStaticDir) ? bundledStaticDir : void 0;
167513
- await app.register(fastifySwaggerUi, {
167514
- routePrefix: "/docs",
167515
- baseDir: swaggerUiBaseDir,
167516
- uiConfig: {
167517
- docExpansion: "list",
167518
- deepLinking: true
167519
- }
167520
- });
167521
- log45.info("Swagger API documentation registered at /docs");
167522
- } catch (e) {
167523
- log45.warn({ err: e }, "Failed to register Swagger plugin");
167524
- }
167525
167836
  try {
167526
167837
  await app.register(fastifyMultipart, {
167527
167838
  limits: {
@@ -167681,7 +167992,7 @@ async function runGateway(config = {}) {
167681
167992
  log45.info({ host, port, telemetryEnabled: enableTelemetry, telemetryDir }, "Gateway server started");
167682
167993
  console.log(`
167683
167994
  [Gateway] Server running on http://${host}:${port}`);
167684
- console.log("[Gateway] API: /health, /api/agent, /api/tasks, /api/sessions, /docs");
167995
+ console.log("[Gateway] API: /health, /api/agent, /api/tasks, /api/sessions");
167685
167996
  if (enableTelemetry) {
167686
167997
  console.log(`[Gateway] Telemetry: ${telemetryDir}`);
167687
167998
  }
@@ -174167,7 +174478,7 @@ function registerMcpCommand(program) {
174167
174478
  handleCommandError(ctx, error);
174168
174479
  }
174169
174480
  });
174170
- mcp.command("download <name> [version]").description("Download an MCP package to current directory").action(async (name, version) => {
174481
+ mcp.command("download <name> [version]").description("Download an MCP package to current directory").action(async (name, version2) => {
174171
174482
  const ctx = getOutputContext(program);
174172
174483
  try {
174173
174484
  const pkgInfo = await getFromMarketplace(name);
@@ -174176,11 +174487,11 @@ function registerMcpCommand(program) {
174176
174487
  }
174177
174488
  const targetDir = join2(process.cwd(), pkgInfo.mcp.slug);
174178
174489
  if (!ctx.quiet) {
174179
- console.log(`Downloading ${name}@${version || pkgInfo.mcp.version}...`);
174490
+ console.log(`Downloading ${name}@${version2 || pkgInfo.mcp.version}...`);
174180
174491
  }
174181
174492
  const result = await downloadFromMarketplace(
174182
174493
  pkgInfo.mcp.id,
174183
- version,
174494
+ version2,
174184
174495
  targetDir
174185
174496
  );
174186
174497
  if (!result.success) {
@@ -174338,8 +174649,8 @@ function registerSkillCommand(program) {
174338
174649
  async (nameWithVersion, options) => {
174339
174650
  const ctx = getOutputContext(program);
174340
174651
  try {
174341
- const { name, version } = parseNameWithVersion(nameWithVersion);
174342
- const finalVersion = options.version || version;
174652
+ const { name, version: version2 } = parseNameWithVersion(nameWithVersion);
174653
+ const finalVersion = options.version || version2;
174343
174654
  let target = "global";
174344
174655
  if (options.agent) {
174345
174656
  target = "agent";
@@ -174527,7 +174838,7 @@ function registerSkillCommand(program) {
174527
174838
  }
174528
174839
  }
174529
174840
  );
174530
- skill.command("download <name> [version]").description("Download a skill package to current directory").action(async (name, version) => {
174841
+ skill.command("download <name> [version]").description("Download a skill package to current directory").action(async (name, version2) => {
174531
174842
  const ctx = getOutputContext(program);
174532
174843
  try {
174533
174844
  const pkgInfo = await getSkillFromRegistry(name);
@@ -174536,11 +174847,11 @@ function registerSkillCommand(program) {
174536
174847
  }
174537
174848
  const targetDir = join2(process.cwd(), pkgInfo.skill.slug);
174538
174849
  if (!ctx.quiet) {
174539
- console.log(`Downloading ${name}@${version || pkgInfo.skill.version}...`);
174850
+ console.log(`Downloading ${name}@${version2 || pkgInfo.skill.version}...`);
174540
174851
  }
174541
174852
  const result = await downloadSkillFromRegistry(
174542
174853
  pkgInfo.skill.id,
174543
- version,
174854
+ version2,
174544
174855
  targetDir
174545
174856
  );
174546
174857
  if (!result.success) {
@@ -174560,11 +174871,11 @@ function parseNameWithVersion(nameWithVersion) {
174560
174871
  return { name: nameWithVersion, version: void 0 };
174561
174872
  }
174562
174873
  const name = nameWithVersion.substring(0, atIndex);
174563
- const version = nameWithVersion.substring(atIndex + 1);
174564
- if (version === "latest") {
174874
+ const version2 = nameWithVersion.substring(atIndex + 1);
174875
+ if (version2 === "latest") {
174565
174876
  return { name, version: void 0 };
174566
174877
  }
174567
- return { name, version };
174878
+ return { name, version: version2 };
174568
174879
  }
174569
174880
  function getTargetFromExecutor(executor) {
174570
174881
  switch (executor.toUpperCase()) {
@@ -174746,7 +175057,7 @@ ${chalk22.bold("Telemetry \u7EDF\u8BA1")}:
174746
175057
  init_lib();
174747
175058
  init_update();
174748
175059
  var execAsync11 = promisify(exec);
174749
- var CURRENT_VERSION = "1.1.2";
175060
+ var CURRENT_VERSION = "1.1.3";
174750
175061
  var GITHUB_REPO = "LinXueyuanStdio/viben";
174751
175062
  var NPM_PACKAGE = "viben";
174752
175063
  function compareSemver(a, b) {
@@ -182616,10 +182927,10 @@ function registerCommands(program) {
182616
182927
  registerIndexCommand(program);
182617
182928
  registerLoginCommand(program);
182618
182929
  }
182619
- var VERSION3 = "1.1.2";
182930
+ var VERSION4 = "1.1.3";
182620
182931
  function createProgram() {
182621
182932
  const program = new Command();
182622
- program.name("viben").description("Viben - Agent Swarm \xD7 Code Evolution").version(VERSION3, "-v, --version", "Output the version number");
182933
+ program.name("viben").description("Viben - Agent Swarm \xD7 Code Evolution").version(VERSION4, "-v, --version", "Output the version number");
182623
182934
  program.option("--json", "Output in JSON format").option("--verbose", "Verbose output").option("--quiet", "Minimal output").option("--global", "Use global config instead of workspace");
182624
182935
  registerCommands(program);
182625
182936
  return program;