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.
- package/dist/index.cjs +586 -275
- package/dist/index.js +594 -283
- package/package.json +5 -5
package/dist/index.cjs
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
|
|
1366
|
+
var __toCommonJS3 = (mod2) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod2);
|
|
1367
1367
|
var constants_exports = {};
|
|
1368
1368
|
__export3(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 =
|
|
1375
|
+
module2.exports = __toCommonJS3(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
|
|
1412
|
+
var __toCommonJS3 = (mod2) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod2);
|
|
1413
1413
|
var error_exports = {};
|
|
1414
1414
|
__export3(error_exports, {
|
|
1415
1415
|
UnsupportedError: () => UnsupportedError
|
|
1416
1416
|
});
|
|
1417
|
-
module2.exports =
|
|
1417
|
+
module2.exports = __toCommonJS3(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
|
|
1456
|
+
var __toCommonJS3 = (mod2) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod2);
|
|
1457
1457
|
var install_exports = {};
|
|
1458
1458
|
__export3(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 =
|
|
1464
|
+
module2.exports = __toCommonJS3(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(
|
|
1486
|
-
if (
|
|
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/${
|
|
1489
|
+
return `${import_constants.RELEASE_BASE}download/${version2}/`;
|
|
1490
1490
|
}
|
|
1491
|
-
async function install(to,
|
|
1491
|
+
async function install(to, version2 = import_constants.CLOUDFLARED_VERSION) {
|
|
1492
1492
|
if (process.platform === "linux") {
|
|
1493
|
-
return install_linux(to,
|
|
1493
|
+
return install_linux(to, version2);
|
|
1494
1494
|
} else if (process.platform === "darwin") {
|
|
1495
|
-
return install_macos(to,
|
|
1495
|
+
return install_macos(to, version2);
|
|
1496
1496
|
} else if (process.platform === "win32") {
|
|
1497
|
-
return install_windows(to,
|
|
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,
|
|
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(
|
|
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,
|
|
1511
|
+
async function install_macos(to, version2 = import_constants.CLOUDFLARED_VERSION) {
|
|
1512
1512
|
let arch2 = process.arch;
|
|
1513
|
-
if (
|
|
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(
|
|
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,
|
|
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(
|
|
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
|
|
1600
|
+
var __toCommonJS3 = (mod2) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod2);
|
|
1601
1601
|
var regex_exports = {};
|
|
1602
1602
|
__export3(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 =
|
|
1613
|
+
module2.exports = __toCommonJS3(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
|
|
1646
|
+
var __toCommonJS3 = (mod2) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod2);
|
|
1647
1647
|
var handler_exports = {};
|
|
1648
1648
|
__export3(handler_exports, {
|
|
1649
1649
|
ConfigHandler: () => ConfigHandler,
|
|
1650
1650
|
ConnectionHandler: () => ConnectionHandler,
|
|
1651
1651
|
TryCloudflareHandler: () => TryCloudflareHandler
|
|
1652
1652
|
});
|
|
1653
|
-
module2.exports =
|
|
1653
|
+
module2.exports = __toCommonJS3(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
|
|
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
|
|
1763
|
+
var __toCommonJS3 = (mod2) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod2);
|
|
1764
1764
|
var tunnel_exports = {};
|
|
1765
1765
|
__export3(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 =
|
|
1771
|
+
module2.exports = __toCommonJS3(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
|
|
1936
|
+
var __toCommonJS3 = (mod2) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod2);
|
|
1937
1937
|
var service_exports = {};
|
|
1938
1938
|
__export3(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 =
|
|
1955
|
+
module2.exports = __toCommonJS3(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
|
|
2144
|
+
var __toCommonJS3 = (mod2) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod2);
|
|
2145
2145
|
var lib_exports = {};
|
|
2146
2146
|
__export3(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 =
|
|
2153
|
+
module2.exports = __toCommonJS3(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);
|
|
@@ -2230,8 +2230,8 @@ var VibenClient = class {
|
|
|
2230
2230
|
* Download MCP package
|
|
2231
2231
|
* @returns Blob containing the package archive
|
|
2232
2232
|
*/
|
|
2233
|
-
download: (id,
|
|
2234
|
-
`/api/packages/mcp/${id}/download${
|
|
2233
|
+
download: (id, version2) => this.downloadFile(
|
|
2234
|
+
`/api/packages/mcp/${id}/download${version2 ? `?version=${encodeURIComponent(version2)}` : ""}`
|
|
2235
2235
|
),
|
|
2236
2236
|
/**
|
|
2237
2237
|
* Toggle favorite on MCP package
|
|
@@ -2282,8 +2282,8 @@ var VibenClient = class {
|
|
|
2282
2282
|
* Download skill package
|
|
2283
2283
|
* @returns Blob containing the package archive
|
|
2284
2284
|
*/
|
|
2285
|
-
download: (id,
|
|
2286
|
-
`/api/packages/skill/${id}/download${
|
|
2285
|
+
download: (id, version2) => this.downloadFile(
|
|
2286
|
+
`/api/packages/skill/${id}/download${version2 ? `?version=${encodeURIComponent(version2)}` : ""}`
|
|
2287
2287
|
),
|
|
2288
2288
|
/**
|
|
2289
2289
|
* Toggle favorite on skill package
|
|
@@ -2649,9 +2649,8 @@ var import_sse2 = require("@modelcontextprotocol/sdk/server/sse.js");
|
|
|
2649
2649
|
var import_types = require("@modelcontextprotocol/sdk/types.js");
|
|
2650
2650
|
var import_fastify = __toESM(require("fastify"), 1);
|
|
2651
2651
|
var import_cors = __toESM(require("@fastify/cors"), 1);
|
|
2652
|
-
var import_swagger = __toESM(require("@fastify/swagger"), 1);
|
|
2653
|
-
var import_swagger_ui = __toESM(require("@fastify/swagger-ui"), 1);
|
|
2654
2652
|
var import_multipart = __toESM(require("@fastify/multipart"), 1);
|
|
2653
|
+
var import_swagger = __toESM(require("@fastify/swagger"), 1);
|
|
2655
2654
|
var import_websocket = __toESM(require("@fastify/websocket"), 1);
|
|
2656
2655
|
var import_commander = require("commander");
|
|
2657
2656
|
var import_open = __toESM(require("open"), 1);
|
|
@@ -2694,6 +2693,7 @@ var __toESM2 = (mod2, isNodeMode, target) => (target = mod2 != null ? __create2(
|
|
|
2694
2693
|
isNodeMode || !mod2 || !mod2.__esModule ? __defProp2(target, "default", { value: mod2, enumerable: true }) : target,
|
|
2695
2694
|
mod2
|
|
2696
2695
|
));
|
|
2696
|
+
var __toCommonJS2 = (mod2) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod2);
|
|
2697
2697
|
var VibenError;
|
|
2698
2698
|
var NotFoundError;
|
|
2699
2699
|
var AlreadyExistsError;
|
|
@@ -6208,7 +6208,7 @@ async function extractZipToDirectory(options) {
|
|
|
6208
6208
|
targetDir,
|
|
6209
6209
|
onProgress,
|
|
6210
6210
|
overwrite = false,
|
|
6211
|
-
validate = true,
|
|
6211
|
+
validate: validate2 = true,
|
|
6212
6212
|
conflictResolution = "fail"
|
|
6213
6213
|
} = options;
|
|
6214
6214
|
if (!(0, import_fs.existsSync)(zipPath)) {
|
|
@@ -6297,7 +6297,7 @@ async function extractZipToDirectory(options) {
|
|
|
6297
6297
|
`Extraction failed: ${error instanceof Error ? error.message : "Unknown error"}`
|
|
6298
6298
|
);
|
|
6299
6299
|
}
|
|
6300
|
-
if (
|
|
6300
|
+
if (validate2) {
|
|
6301
6301
|
const validationWarnings = await validateExtractedSkill(targetDir);
|
|
6302
6302
|
warnings.push(...validationWarnings);
|
|
6303
6303
|
}
|
|
@@ -6487,10 +6487,10 @@ async function getFromMarketplace(idOrSlug) {
|
|
|
6487
6487
|
};
|
|
6488
6488
|
}
|
|
6489
6489
|
}
|
|
6490
|
-
async function downloadFromMarketplace(idOrSlug,
|
|
6490
|
+
async function downloadFromMarketplace(idOrSlug, version2, targetDir) {
|
|
6491
6491
|
try {
|
|
6492
6492
|
const client = await createClient();
|
|
6493
|
-
const blob = await client.mcp.download(idOrSlug,
|
|
6493
|
+
const blob = await client.mcp.download(idOrSlug, version2);
|
|
6494
6494
|
await ensureDir(targetDir);
|
|
6495
6495
|
const zipPath = (0, import_path.join)(targetDir, "package.zip");
|
|
6496
6496
|
const buffer = Buffer.from(await blob.arrayBuffer());
|
|
@@ -6621,10 +6621,10 @@ async function downloadFromGitHub(options) {
|
|
|
6621
6621
|
await (0, import_promises.rm)(zipPath, { force: true });
|
|
6622
6622
|
}
|
|
6623
6623
|
onProgress?.(100);
|
|
6624
|
-
const
|
|
6624
|
+
const version2 = ref || "latest";
|
|
6625
6625
|
return {
|
|
6626
6626
|
success: true,
|
|
6627
|
-
version
|
|
6627
|
+
version: version2
|
|
6628
6628
|
};
|
|
6629
6629
|
} catch (error) {
|
|
6630
6630
|
return {
|
|
@@ -6683,7 +6683,7 @@ async function installMcp(options) {
|
|
|
6683
6683
|
await (0, import_promises.rm)(mcpDir, { recursive: true, force: true });
|
|
6684
6684
|
}
|
|
6685
6685
|
await ensureDir(targetDir);
|
|
6686
|
-
let
|
|
6686
|
+
let version2 = parsed.version || "latest";
|
|
6687
6687
|
switch (parsed.source) {
|
|
6688
6688
|
case "local": {
|
|
6689
6689
|
const localPath = parsed.local_path;
|
|
@@ -6705,9 +6705,9 @@ async function installMcp(options) {
|
|
|
6705
6705
|
const pkgJsonPath = (0, import_path.join)(mcpDir, "package.json");
|
|
6706
6706
|
if (fileExists(pkgJsonPath)) {
|
|
6707
6707
|
const pkgJson = await readJson(pkgJsonPath);
|
|
6708
|
-
|
|
6708
|
+
version2 = pkgJson?.version || "1.0.0";
|
|
6709
6709
|
} else {
|
|
6710
|
-
|
|
6710
|
+
version2 = "1.0.0";
|
|
6711
6711
|
}
|
|
6712
6712
|
break;
|
|
6713
6713
|
}
|
|
@@ -6748,9 +6748,9 @@ async function installMcp(options) {
|
|
|
6748
6748
|
const pkgJsonPath = (0, import_path.join)(mcpDir, "package.json");
|
|
6749
6749
|
if (fileExists(pkgJsonPath)) {
|
|
6750
6750
|
const pkgJson = await readJson(pkgJsonPath);
|
|
6751
|
-
|
|
6751
|
+
version2 = pkgJson?.version || ghRef || "1.0.0";
|
|
6752
6752
|
} else {
|
|
6753
|
-
|
|
6753
|
+
version2 = ghRef || "1.0.0";
|
|
6754
6754
|
}
|
|
6755
6755
|
break;
|
|
6756
6756
|
}
|
|
@@ -6768,7 +6768,7 @@ async function installMcp(options) {
|
|
|
6768
6768
|
message: `Package '${parsed.name}' not found`
|
|
6769
6769
|
};
|
|
6770
6770
|
}
|
|
6771
|
-
|
|
6771
|
+
version2 = parsed.version || pkgInfo.mcp.version;
|
|
6772
6772
|
const downloadResult = await downloadFromMarketplace(
|
|
6773
6773
|
pkgInfo.mcp.id,
|
|
6774
6774
|
parsed.version,
|
|
@@ -6779,7 +6779,7 @@ async function installMcp(options) {
|
|
|
6779
6779
|
success: false,
|
|
6780
6780
|
error: downloadResult.error,
|
|
6781
6781
|
name: parsed.name,
|
|
6782
|
-
version,
|
|
6782
|
+
version: version2,
|
|
6783
6783
|
path: "",
|
|
6784
6784
|
target,
|
|
6785
6785
|
source: "marketplace",
|
|
@@ -6791,7 +6791,7 @@ async function installMcp(options) {
|
|
|
6791
6791
|
}
|
|
6792
6792
|
await addToInstalledList(targetDir, {
|
|
6793
6793
|
name: parsed.name,
|
|
6794
|
-
version,
|
|
6794
|
+
version: version2,
|
|
6795
6795
|
path: mcpDir,
|
|
6796
6796
|
source: parsed.source,
|
|
6797
6797
|
installed_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -6800,11 +6800,11 @@ async function installMcp(options) {
|
|
|
6800
6800
|
return {
|
|
6801
6801
|
success: true,
|
|
6802
6802
|
name: parsed.name,
|
|
6803
|
-
version,
|
|
6803
|
+
version: version2,
|
|
6804
6804
|
path: mcpDir,
|
|
6805
6805
|
target,
|
|
6806
6806
|
source: parsed.source,
|
|
6807
|
-
message: `Package '${parsed.name}@${
|
|
6807
|
+
message: `Package '${parsed.name}@${version2}' installed successfully`
|
|
6808
6808
|
};
|
|
6809
6809
|
} catch (error) {
|
|
6810
6810
|
return {
|
|
@@ -6891,11 +6891,11 @@ async function getMcp(name, options) {
|
|
|
6891
6891
|
const mcpDir = (0, import_path.join)(targetDir, name);
|
|
6892
6892
|
if (fileExists(mcpDir)) {
|
|
6893
6893
|
const pkgJsonPath = (0, import_path.join)(mcpDir, "package.json");
|
|
6894
|
-
let
|
|
6894
|
+
let version2 = "1.0.0";
|
|
6895
6895
|
let description;
|
|
6896
6896
|
if (fileExists(pkgJsonPath)) {
|
|
6897
6897
|
const pkgJson = await readJson(pkgJsonPath);
|
|
6898
|
-
|
|
6898
|
+
version2 = pkgJson?.version || version2;
|
|
6899
6899
|
description = pkgJson?.description;
|
|
6900
6900
|
}
|
|
6901
6901
|
const installedPath = getInstalledYamlPath(targetDir);
|
|
@@ -6911,7 +6911,7 @@ async function getMcp(name, options) {
|
|
|
6911
6911
|
success: true,
|
|
6912
6912
|
mcp: {
|
|
6913
6913
|
name,
|
|
6914
|
-
version,
|
|
6914
|
+
version: version2,
|
|
6915
6915
|
description,
|
|
6916
6916
|
path: mcpDir,
|
|
6917
6917
|
source,
|
|
@@ -7002,14 +7002,14 @@ async function listMcpsInDir(mcpDir, target) {
|
|
|
7002
7002
|
if (entry.isDirectory() && entry.name !== "installed.yaml") {
|
|
7003
7003
|
const pkgPath = (0, import_path.join)(mcpDir, entry.name);
|
|
7004
7004
|
const pkgJsonPath = (0, import_path.join)(pkgPath, "package.json");
|
|
7005
|
-
let
|
|
7005
|
+
let version2 = "1.0.0";
|
|
7006
7006
|
if (fileExists(pkgJsonPath)) {
|
|
7007
7007
|
const pkgJson = await readJson(pkgJsonPath);
|
|
7008
|
-
|
|
7008
|
+
version2 = pkgJson?.version || version2;
|
|
7009
7009
|
}
|
|
7010
7010
|
mcps.push({
|
|
7011
7011
|
name: entry.name,
|
|
7012
|
-
version,
|
|
7012
|
+
version: version2,
|
|
7013
7013
|
path: pkgPath,
|
|
7014
7014
|
installed_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
7015
7015
|
target
|
|
@@ -7272,10 +7272,10 @@ async function getSkillFromRegistry(idOrSlug) {
|
|
|
7272
7272
|
};
|
|
7273
7273
|
}
|
|
7274
7274
|
}
|
|
7275
|
-
async function downloadSkillFromRegistry(idOrSlug,
|
|
7275
|
+
async function downloadSkillFromRegistry(idOrSlug, version2, targetDir) {
|
|
7276
7276
|
try {
|
|
7277
7277
|
const client = await createClient2();
|
|
7278
|
-
const blob = await client.skill.download(idOrSlug,
|
|
7278
|
+
const blob = await client.skill.download(idOrSlug, version2);
|
|
7279
7279
|
await ensureDir(targetDir);
|
|
7280
7280
|
const zipPath = (0, import_path.join)(targetDir, "package.zip");
|
|
7281
7281
|
const buffer = Buffer.from(await blob.arrayBuffer());
|
|
@@ -7332,10 +7332,10 @@ async function installSkill(options) {
|
|
|
7332
7332
|
githubRepo,
|
|
7333
7333
|
githubRef,
|
|
7334
7334
|
onProgress,
|
|
7335
|
-
version,
|
|
7335
|
+
version: version2,
|
|
7336
7336
|
conflictResolution
|
|
7337
7337
|
} = options;
|
|
7338
|
-
const parsed = parseInstallSpec2(name,
|
|
7338
|
+
const parsed = parseInstallSpec2(name, version2, githubOwner, githubRepo, githubRef);
|
|
7339
7339
|
const skillName = parsed.name;
|
|
7340
7340
|
const skillVersion = parsed.version;
|
|
7341
7341
|
const validation = validateTargetOptions2(target, agentId, customPath);
|
|
@@ -21049,31 +21049,31 @@ var require_semver = __commonJS2({
|
|
|
21049
21049
|
var parseOptions = require_parse_options();
|
|
21050
21050
|
var { compareIdentifiers } = require_identifiers();
|
|
21051
21051
|
var SemVer = class _SemVer {
|
|
21052
|
-
constructor(
|
|
21052
|
+
constructor(version2, options) {
|
|
21053
21053
|
options = parseOptions(options);
|
|
21054
|
-
if (
|
|
21055
|
-
if (
|
|
21056
|
-
return
|
|
21054
|
+
if (version2 instanceof _SemVer) {
|
|
21055
|
+
if (version2.loose === !!options.loose && version2.includePrerelease === !!options.includePrerelease) {
|
|
21056
|
+
return version2;
|
|
21057
21057
|
} else {
|
|
21058
|
-
|
|
21058
|
+
version2 = version2.version;
|
|
21059
21059
|
}
|
|
21060
|
-
} else if (typeof
|
|
21061
|
-
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof
|
|
21060
|
+
} else if (typeof version2 !== "string") {
|
|
21061
|
+
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version2}".`);
|
|
21062
21062
|
}
|
|
21063
|
-
if (
|
|
21063
|
+
if (version2.length > MAX_LENGTH) {
|
|
21064
21064
|
throw new TypeError(
|
|
21065
21065
|
`version is longer than ${MAX_LENGTH} characters`
|
|
21066
21066
|
);
|
|
21067
21067
|
}
|
|
21068
|
-
debug("SemVer",
|
|
21068
|
+
debug("SemVer", version2, options);
|
|
21069
21069
|
this.options = options;
|
|
21070
21070
|
this.loose = !!options.loose;
|
|
21071
21071
|
this.includePrerelease = !!options.includePrerelease;
|
|
21072
|
-
const m =
|
|
21072
|
+
const m = version2.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
|
|
21073
21073
|
if (!m) {
|
|
21074
|
-
throw new TypeError(`Invalid Version: ${
|
|
21074
|
+
throw new TypeError(`Invalid Version: ${version2}`);
|
|
21075
21075
|
}
|
|
21076
|
-
this.raw =
|
|
21076
|
+
this.raw = version2;
|
|
21077
21077
|
this.major = +m[1];
|
|
21078
21078
|
this.minor = +m[2];
|
|
21079
21079
|
this.patch = +m[3];
|
|
@@ -21320,12 +21320,12 @@ var require_semver = __commonJS2({
|
|
|
21320
21320
|
var require_parse = __commonJS2({
|
|
21321
21321
|
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.js"(exports2, module2) {
|
|
21322
21322
|
var SemVer = require_semver();
|
|
21323
|
-
var
|
|
21324
|
-
if (
|
|
21325
|
-
return
|
|
21323
|
+
var parse7 = (version2, options, throwErrors = false) => {
|
|
21324
|
+
if (version2 instanceof SemVer) {
|
|
21325
|
+
return version2;
|
|
21326
21326
|
}
|
|
21327
21327
|
try {
|
|
21328
|
-
return new SemVer(
|
|
21328
|
+
return new SemVer(version2, options);
|
|
21329
21329
|
} catch (er) {
|
|
21330
21330
|
if (!throwErrors) {
|
|
21331
21331
|
return null;
|
|
@@ -21333,14 +21333,14 @@ var require_parse = __commonJS2({
|
|
|
21333
21333
|
throw er;
|
|
21334
21334
|
}
|
|
21335
21335
|
};
|
|
21336
|
-
module2.exports =
|
|
21336
|
+
module2.exports = parse7;
|
|
21337
21337
|
}
|
|
21338
21338
|
});
|
|
21339
21339
|
var require_valid = __commonJS2({
|
|
21340
21340
|
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/valid.js"(exports2, module2) {
|
|
21341
|
-
var
|
|
21342
|
-
var valid = (
|
|
21343
|
-
const v =
|
|
21341
|
+
var parse7 = require_parse();
|
|
21342
|
+
var valid = (version2, options) => {
|
|
21343
|
+
const v = parse7(version2, options);
|
|
21344
21344
|
return v ? v.version : null;
|
|
21345
21345
|
};
|
|
21346
21346
|
module2.exports = valid;
|
|
@@ -21348,9 +21348,9 @@ var require_valid = __commonJS2({
|
|
|
21348
21348
|
});
|
|
21349
21349
|
var require_clean = __commonJS2({
|
|
21350
21350
|
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/clean.js"(exports2, module2) {
|
|
21351
|
-
var
|
|
21352
|
-
var clean3 = (
|
|
21353
|
-
const s =
|
|
21351
|
+
var parse7 = require_parse();
|
|
21352
|
+
var clean3 = (version2, options) => {
|
|
21353
|
+
const s = parse7(version2.trim().replace(/^[=v]+/, ""), options);
|
|
21354
21354
|
return s ? s.version : null;
|
|
21355
21355
|
};
|
|
21356
21356
|
module2.exports = clean3;
|
|
@@ -21359,7 +21359,7 @@ var require_clean = __commonJS2({
|
|
|
21359
21359
|
var require_inc = __commonJS2({
|
|
21360
21360
|
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/inc.js"(exports2, module2) {
|
|
21361
21361
|
var SemVer = require_semver();
|
|
21362
|
-
var inc = (
|
|
21362
|
+
var inc = (version2, release2, options, identifier2, identifierBase) => {
|
|
21363
21363
|
if (typeof options === "string") {
|
|
21364
21364
|
identifierBase = identifier2;
|
|
21365
21365
|
identifier2 = options;
|
|
@@ -21367,7 +21367,7 @@ var require_inc = __commonJS2({
|
|
|
21367
21367
|
}
|
|
21368
21368
|
try {
|
|
21369
21369
|
return new SemVer(
|
|
21370
|
-
|
|
21370
|
+
version2 instanceof SemVer ? version2.version : version2,
|
|
21371
21371
|
options
|
|
21372
21372
|
).inc(release2, identifier2, identifierBase).version;
|
|
21373
21373
|
} catch (er) {
|
|
@@ -21379,17 +21379,17 @@ var require_inc = __commonJS2({
|
|
|
21379
21379
|
});
|
|
21380
21380
|
var require_diff = __commonJS2({
|
|
21381
21381
|
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/diff.js"(exports2, module2) {
|
|
21382
|
-
var
|
|
21382
|
+
var parse7 = require_parse();
|
|
21383
21383
|
var diff = (version1, version2) => {
|
|
21384
|
-
const
|
|
21385
|
-
const v2 =
|
|
21386
|
-
const comparison =
|
|
21384
|
+
const v12 = parse7(version1, null, true);
|
|
21385
|
+
const v2 = parse7(version2, null, true);
|
|
21386
|
+
const comparison = v12.compare(v2);
|
|
21387
21387
|
if (comparison === 0) {
|
|
21388
21388
|
return null;
|
|
21389
21389
|
}
|
|
21390
21390
|
const v1Higher = comparison > 0;
|
|
21391
|
-
const highVersion = v1Higher ?
|
|
21392
|
-
const lowVersion = v1Higher ? v2 :
|
|
21391
|
+
const highVersion = v1Higher ? v12 : v2;
|
|
21392
|
+
const lowVersion = v1Higher ? v2 : v12;
|
|
21393
21393
|
const highHasPre = !!highVersion.prerelease.length;
|
|
21394
21394
|
const lowHasPre = !!lowVersion.prerelease.length;
|
|
21395
21395
|
if (lowHasPre && !highHasPre) {
|
|
@@ -21404,13 +21404,13 @@ var require_diff = __commonJS2({
|
|
|
21404
21404
|
}
|
|
21405
21405
|
}
|
|
21406
21406
|
const prefix = highHasPre ? "pre" : "";
|
|
21407
|
-
if (
|
|
21407
|
+
if (v12.major !== v2.major) {
|
|
21408
21408
|
return prefix + "major";
|
|
21409
21409
|
}
|
|
21410
|
-
if (
|
|
21410
|
+
if (v12.minor !== v2.minor) {
|
|
21411
21411
|
return prefix + "minor";
|
|
21412
21412
|
}
|
|
21413
|
-
if (
|
|
21413
|
+
if (v12.patch !== v2.patch) {
|
|
21414
21414
|
return prefix + "patch";
|
|
21415
21415
|
}
|
|
21416
21416
|
return "prerelease";
|
|
@@ -21441,9 +21441,9 @@ var require_patch = __commonJS2({
|
|
|
21441
21441
|
});
|
|
21442
21442
|
var require_prerelease = __commonJS2({
|
|
21443
21443
|
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/prerelease.js"(exports2, module2) {
|
|
21444
|
-
var
|
|
21445
|
-
var prerelease = (
|
|
21446
|
-
const parsed =
|
|
21444
|
+
var parse7 = require_parse();
|
|
21445
|
+
var prerelease = (version2, options) => {
|
|
21446
|
+
const parsed = parse7(version2, options);
|
|
21447
21447
|
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
21448
21448
|
};
|
|
21449
21449
|
module2.exports = prerelease;
|
|
@@ -21587,26 +21587,26 @@ var require_cmp = __commonJS2({
|
|
|
21587
21587
|
var require_coerce = __commonJS2({
|
|
21588
21588
|
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/coerce.js"(exports2, module2) {
|
|
21589
21589
|
var SemVer = require_semver();
|
|
21590
|
-
var
|
|
21590
|
+
var parse7 = require_parse();
|
|
21591
21591
|
var { safeRe: re, t } = require_re();
|
|
21592
|
-
var coerce = (
|
|
21593
|
-
if (
|
|
21594
|
-
return
|
|
21592
|
+
var coerce = (version2, options) => {
|
|
21593
|
+
if (version2 instanceof SemVer) {
|
|
21594
|
+
return version2;
|
|
21595
21595
|
}
|
|
21596
|
-
if (typeof
|
|
21597
|
-
|
|
21596
|
+
if (typeof version2 === "number") {
|
|
21597
|
+
version2 = String(version2);
|
|
21598
21598
|
}
|
|
21599
|
-
if (typeof
|
|
21599
|
+
if (typeof version2 !== "string") {
|
|
21600
21600
|
return null;
|
|
21601
21601
|
}
|
|
21602
21602
|
options = options || {};
|
|
21603
21603
|
let match = null;
|
|
21604
21604
|
if (!options.rtl) {
|
|
21605
|
-
match =
|
|
21605
|
+
match = version2.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
|
|
21606
21606
|
} else {
|
|
21607
21607
|
const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
|
|
21608
21608
|
let next;
|
|
21609
|
-
while ((next = coerceRtlRegex.exec(
|
|
21609
|
+
while ((next = coerceRtlRegex.exec(version2)) && (!match || match.index + match[0].length !== version2.length)) {
|
|
21610
21610
|
if (!match || next.index + next[0].length !== match.index + match[0].length) {
|
|
21611
21611
|
match = next;
|
|
21612
21612
|
}
|
|
@@ -21622,7 +21622,7 @@ var require_coerce = __commonJS2({
|
|
|
21622
21622
|
const patch = match[4] || "0";
|
|
21623
21623
|
const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : "";
|
|
21624
21624
|
const build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
|
|
21625
|
-
return
|
|
21625
|
+
return parse7(`${major}.${minor}.${patch}${prerelease}${build}`, options);
|
|
21626
21626
|
};
|
|
21627
21627
|
module2.exports = coerce;
|
|
21628
21628
|
}
|
|
@@ -21784,19 +21784,19 @@ var require_range = __commonJS2({
|
|
|
21784
21784
|
});
|
|
21785
21785
|
}
|
|
21786
21786
|
// if ANY of the sets match ALL of its comparators, then pass
|
|
21787
|
-
test(
|
|
21788
|
-
if (!
|
|
21787
|
+
test(version2) {
|
|
21788
|
+
if (!version2) {
|
|
21789
21789
|
return false;
|
|
21790
21790
|
}
|
|
21791
|
-
if (typeof
|
|
21791
|
+
if (typeof version2 === "string") {
|
|
21792
21792
|
try {
|
|
21793
|
-
|
|
21793
|
+
version2 = new SemVer(version2, this.options);
|
|
21794
21794
|
} catch (er) {
|
|
21795
21795
|
return false;
|
|
21796
21796
|
}
|
|
21797
21797
|
}
|
|
21798
21798
|
for (let i = 0; i < this.set.length; i++) {
|
|
21799
|
-
if (testSet(this.set[i],
|
|
21799
|
+
if (testSet(this.set[i], version2, this.options)) {
|
|
21800
21800
|
return true;
|
|
21801
21801
|
}
|
|
21802
21802
|
}
|
|
@@ -22011,13 +22011,13 @@ var require_range = __commonJS2({
|
|
|
22011
22011
|
}
|
|
22012
22012
|
return `${from} ${to}`.trim();
|
|
22013
22013
|
};
|
|
22014
|
-
var testSet = (set,
|
|
22014
|
+
var testSet = (set, version2, options) => {
|
|
22015
22015
|
for (let i = 0; i < set.length; i++) {
|
|
22016
|
-
if (!set[i].test(
|
|
22016
|
+
if (!set[i].test(version2)) {
|
|
22017
22017
|
return false;
|
|
22018
22018
|
}
|
|
22019
22019
|
}
|
|
22020
|
-
if (
|
|
22020
|
+
if (version2.prerelease.length && !options.includePrerelease) {
|
|
22021
22021
|
for (let i = 0; i < set.length; i++) {
|
|
22022
22022
|
debug(set[i].semver);
|
|
22023
22023
|
if (set[i].semver === Comparator.ANY) {
|
|
@@ -22025,7 +22025,7 @@ var require_range = __commonJS2({
|
|
|
22025
22025
|
}
|
|
22026
22026
|
if (set[i].semver.prerelease.length > 0) {
|
|
22027
22027
|
const allowed = set[i].semver;
|
|
22028
|
-
if (allowed.major ===
|
|
22028
|
+
if (allowed.major === version2.major && allowed.minor === version2.minor && allowed.patch === version2.patch) {
|
|
22029
22029
|
return true;
|
|
22030
22030
|
}
|
|
22031
22031
|
}
|
|
@@ -22083,19 +22083,19 @@ var require_comparator = __commonJS2({
|
|
|
22083
22083
|
toString() {
|
|
22084
22084
|
return this.value;
|
|
22085
22085
|
}
|
|
22086
|
-
test(
|
|
22087
|
-
debug("Comparator.test",
|
|
22088
|
-
if (this.semver === ANY ||
|
|
22086
|
+
test(version2) {
|
|
22087
|
+
debug("Comparator.test", version2, this.options.loose);
|
|
22088
|
+
if (this.semver === ANY || version2 === ANY) {
|
|
22089
22089
|
return true;
|
|
22090
22090
|
}
|
|
22091
|
-
if (typeof
|
|
22091
|
+
if (typeof version2 === "string") {
|
|
22092
22092
|
try {
|
|
22093
|
-
|
|
22093
|
+
version2 = new SemVer(version2, this.options);
|
|
22094
22094
|
} catch (er) {
|
|
22095
22095
|
return false;
|
|
22096
22096
|
}
|
|
22097
22097
|
}
|
|
22098
|
-
return cmp(
|
|
22098
|
+
return cmp(version2, this.operator, this.semver, this.options);
|
|
22099
22099
|
}
|
|
22100
22100
|
intersects(comp, options) {
|
|
22101
22101
|
if (!(comp instanceof _Comparator)) {
|
|
@@ -22149,13 +22149,13 @@ var require_comparator = __commonJS2({
|
|
|
22149
22149
|
var require_satisfies = __commonJS2({
|
|
22150
22150
|
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/satisfies.js"(exports2, module2) {
|
|
22151
22151
|
var Range = require_range();
|
|
22152
|
-
var satisfies = (
|
|
22152
|
+
var satisfies = (version2, range, options) => {
|
|
22153
22153
|
try {
|
|
22154
22154
|
range = new Range(range, options);
|
|
22155
22155
|
} catch (er) {
|
|
22156
22156
|
return false;
|
|
22157
22157
|
}
|
|
22158
|
-
return range.test(
|
|
22158
|
+
return range.test(version2);
|
|
22159
22159
|
};
|
|
22160
22160
|
module2.exports = satisfies;
|
|
22161
22161
|
}
|
|
@@ -22299,8 +22299,8 @@ var require_outside = __commonJS2({
|
|
|
22299
22299
|
var lt = require_lt();
|
|
22300
22300
|
var lte = require_lte();
|
|
22301
22301
|
var gte = require_gte();
|
|
22302
|
-
var outside = (
|
|
22303
|
-
|
|
22302
|
+
var outside = (version2, range, hilo, options) => {
|
|
22303
|
+
version2 = new SemVer(version2, options);
|
|
22304
22304
|
range = new Range(range, options);
|
|
22305
22305
|
let gtfn, ltefn, ltfn, comp, ecomp;
|
|
22306
22306
|
switch (hilo) {
|
|
@@ -22321,7 +22321,7 @@ var require_outside = __commonJS2({
|
|
|
22321
22321
|
default:
|
|
22322
22322
|
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
|
22323
22323
|
}
|
|
22324
|
-
if (satisfies(
|
|
22324
|
+
if (satisfies(version2, range, options)) {
|
|
22325
22325
|
return false;
|
|
22326
22326
|
}
|
|
22327
22327
|
for (let i = 0; i < range.set.length; ++i) {
|
|
@@ -22343,9 +22343,9 @@ var require_outside = __commonJS2({
|
|
|
22343
22343
|
if (high.operator === comp || high.operator === ecomp) {
|
|
22344
22344
|
return false;
|
|
22345
22345
|
}
|
|
22346
|
-
if ((!low.operator || low.operator === comp) && ltefn(
|
|
22346
|
+
if ((!low.operator || low.operator === comp) && ltefn(version2, low.semver)) {
|
|
22347
22347
|
return false;
|
|
22348
|
-
} else if (low.operator === ecomp && ltfn(
|
|
22348
|
+
} else if (low.operator === ecomp && ltfn(version2, low.semver)) {
|
|
22349
22349
|
return false;
|
|
22350
22350
|
}
|
|
22351
22351
|
}
|
|
@@ -22357,14 +22357,14 @@ var require_outside = __commonJS2({
|
|
|
22357
22357
|
var require_gtr = __commonJS2({
|
|
22358
22358
|
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/gtr.js"(exports2, module2) {
|
|
22359
22359
|
var outside = require_outside();
|
|
22360
|
-
var gtr = (
|
|
22360
|
+
var gtr = (version2, range, options) => outside(version2, range, ">", options);
|
|
22361
22361
|
module2.exports = gtr;
|
|
22362
22362
|
}
|
|
22363
22363
|
});
|
|
22364
22364
|
var require_ltr = __commonJS2({
|
|
22365
22365
|
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/ltr.js"(exports2, module2) {
|
|
22366
22366
|
var outside = require_outside();
|
|
22367
|
-
var ltr = (
|
|
22367
|
+
var ltr = (version2, range, options) => outside(version2, range, "<", options);
|
|
22368
22368
|
module2.exports = ltr;
|
|
22369
22369
|
}
|
|
22370
22370
|
});
|
|
@@ -22388,12 +22388,12 @@ var require_simplify = __commonJS2({
|
|
|
22388
22388
|
let first = null;
|
|
22389
22389
|
let prev = null;
|
|
22390
22390
|
const v = versions.sort((a, b) => compare(a, b, options));
|
|
22391
|
-
for (const
|
|
22392
|
-
const included = satisfies(
|
|
22391
|
+
for (const version2 of v) {
|
|
22392
|
+
const included = satisfies(version2, range, options);
|
|
22393
22393
|
if (included) {
|
|
22394
|
-
prev =
|
|
22394
|
+
prev = version2;
|
|
22395
22395
|
if (!first) {
|
|
22396
|
-
first =
|
|
22396
|
+
first = version2;
|
|
22397
22397
|
}
|
|
22398
22398
|
} else {
|
|
22399
22399
|
if (prev) {
|
|
@@ -22591,7 +22591,7 @@ var require_semver2 = __commonJS2({
|
|
|
22591
22591
|
var constants3 = require_constants2();
|
|
22592
22592
|
var SemVer = require_semver();
|
|
22593
22593
|
var identifiers = require_identifiers();
|
|
22594
|
-
var
|
|
22594
|
+
var parse7 = require_parse();
|
|
22595
22595
|
var valid = require_valid();
|
|
22596
22596
|
var clean3 = require_clean();
|
|
22597
22597
|
var inc = require_inc();
|
|
@@ -22629,7 +22629,7 @@ var require_semver2 = __commonJS2({
|
|
|
22629
22629
|
var simplifyRange = require_simplify();
|
|
22630
22630
|
var subset = require_subset();
|
|
22631
22631
|
module2.exports = {
|
|
22632
|
-
parse:
|
|
22632
|
+
parse: parse7,
|
|
22633
22633
|
valid,
|
|
22634
22634
|
clean: clean3,
|
|
22635
22635
|
inc,
|
|
@@ -23140,11 +23140,11 @@ var require_utils2 = __commonJS2({
|
|
|
23140
23140
|
module2.exports.isLessThanWin8 = function() {
|
|
23141
23141
|
return os3.type() === "Windows_NT" && semver.satisfies(garanteeSemverFormat(os3.release()), "<6.2.9200");
|
|
23142
23142
|
};
|
|
23143
|
-
function garanteeSemverFormat(
|
|
23144
|
-
if (
|
|
23145
|
-
|
|
23143
|
+
function garanteeSemverFormat(version2) {
|
|
23144
|
+
if (version2.split(".").length === 2) {
|
|
23145
|
+
version2 += ".0";
|
|
23146
23146
|
}
|
|
23147
|
-
return
|
|
23147
|
+
return version2;
|
|
23148
23148
|
}
|
|
23149
23149
|
function sanitizeNotifuTypeArgument(type2) {
|
|
23150
23150
|
if (typeof type2 === "string" || type2 instanceof String) {
|
|
@@ -23493,7 +23493,7 @@ var require_checkGrowl = __commonJS2({
|
|
|
23493
23493
|
var require_gntp = __commonJS2({
|
|
23494
23494
|
"../../node_modules/.pnpm/growly@1.3.0/node_modules/growly/lib/gntp.js"(exports2, module2) {
|
|
23495
23495
|
var net = __require("net");
|
|
23496
|
-
var
|
|
23496
|
+
var crypto8 = __require("crypto");
|
|
23497
23497
|
var format = __require("util").format;
|
|
23498
23498
|
var fs19 = __require("fs");
|
|
23499
23499
|
var nl = "\r\n";
|
|
@@ -23526,7 +23526,7 @@ var require_gntp = __commonJS2({
|
|
|
23526
23526
|
}, 750);
|
|
23527
23527
|
};
|
|
23528
23528
|
GNTP.prototype.addResource = function(file) {
|
|
23529
|
-
var id =
|
|
23529
|
+
var id = crypto8.createHash("md5").update(file).digest("hex"), header = "Identifier: " + id + nl + "Length: " + file.length + nl + nl;
|
|
23530
23530
|
this.resources.push({ header, file });
|
|
23531
23531
|
return "x-growl-resource://" + id;
|
|
23532
23532
|
};
|
|
@@ -23951,6 +23951,315 @@ var require_balloon = __commonJS2({
|
|
|
23951
23951
|
}
|
|
23952
23952
|
}
|
|
23953
23953
|
});
|
|
23954
|
+
function rng() {
|
|
23955
|
+
if (poolPtr > rnds8Pool.length - 16) {
|
|
23956
|
+
import_crypto.default.randomFillSync(rnds8Pool);
|
|
23957
|
+
poolPtr = 0;
|
|
23958
|
+
}
|
|
23959
|
+
return rnds8Pool.slice(poolPtr, poolPtr += 16);
|
|
23960
|
+
}
|
|
23961
|
+
var rnds8Pool;
|
|
23962
|
+
var poolPtr;
|
|
23963
|
+
var init_rng = __esm({
|
|
23964
|
+
"../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/rng.js"() {
|
|
23965
|
+
rnds8Pool = new Uint8Array(256);
|
|
23966
|
+
poolPtr = rnds8Pool.length;
|
|
23967
|
+
}
|
|
23968
|
+
});
|
|
23969
|
+
var regex_default;
|
|
23970
|
+
var init_regex = __esm({
|
|
23971
|
+
"../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/regex.js"() {
|
|
23972
|
+
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;
|
|
23973
|
+
}
|
|
23974
|
+
});
|
|
23975
|
+
function validate(uuid) {
|
|
23976
|
+
return typeof uuid === "string" && regex_default.test(uuid);
|
|
23977
|
+
}
|
|
23978
|
+
var validate_default;
|
|
23979
|
+
var init_validate = __esm({
|
|
23980
|
+
"../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/validate.js"() {
|
|
23981
|
+
init_regex();
|
|
23982
|
+
validate_default = validate;
|
|
23983
|
+
}
|
|
23984
|
+
});
|
|
23985
|
+
function stringify3(arr, offset = 0) {
|
|
23986
|
+
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();
|
|
23987
|
+
if (!validate_default(uuid)) {
|
|
23988
|
+
throw TypeError("Stringified UUID is invalid");
|
|
23989
|
+
}
|
|
23990
|
+
return uuid;
|
|
23991
|
+
}
|
|
23992
|
+
var byteToHex;
|
|
23993
|
+
var stringify_default;
|
|
23994
|
+
var init_stringify = __esm({
|
|
23995
|
+
"../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/stringify.js"() {
|
|
23996
|
+
init_validate();
|
|
23997
|
+
byteToHex = [];
|
|
23998
|
+
for (let i = 0; i < 256; ++i) {
|
|
23999
|
+
byteToHex.push((i + 256).toString(16).substr(1));
|
|
24000
|
+
}
|
|
24001
|
+
stringify_default = stringify3;
|
|
24002
|
+
}
|
|
24003
|
+
});
|
|
24004
|
+
function v1(options, buf, offset) {
|
|
24005
|
+
let i = buf && offset || 0;
|
|
24006
|
+
const b = buf || new Array(16);
|
|
24007
|
+
options = options || {};
|
|
24008
|
+
let node = options.node || _nodeId;
|
|
24009
|
+
let clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq;
|
|
24010
|
+
if (node == null || clockseq == null) {
|
|
24011
|
+
const seedBytes = options.random || (options.rng || rng)();
|
|
24012
|
+
if (node == null) {
|
|
24013
|
+
node = _nodeId = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];
|
|
24014
|
+
}
|
|
24015
|
+
if (clockseq == null) {
|
|
24016
|
+
clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 16383;
|
|
24017
|
+
}
|
|
24018
|
+
}
|
|
24019
|
+
let msecs = options.msecs !== void 0 ? options.msecs : Date.now();
|
|
24020
|
+
let nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs + 1;
|
|
24021
|
+
const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4;
|
|
24022
|
+
if (dt < 0 && options.clockseq === void 0) {
|
|
24023
|
+
clockseq = clockseq + 1 & 16383;
|
|
24024
|
+
}
|
|
24025
|
+
if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === void 0) {
|
|
24026
|
+
nsecs = 0;
|
|
24027
|
+
}
|
|
24028
|
+
if (nsecs >= 1e4) {
|
|
24029
|
+
throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
|
|
24030
|
+
}
|
|
24031
|
+
_lastMSecs = msecs;
|
|
24032
|
+
_lastNSecs = nsecs;
|
|
24033
|
+
_clockseq = clockseq;
|
|
24034
|
+
msecs += 122192928e5;
|
|
24035
|
+
const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296;
|
|
24036
|
+
b[i++] = tl >>> 24 & 255;
|
|
24037
|
+
b[i++] = tl >>> 16 & 255;
|
|
24038
|
+
b[i++] = tl >>> 8 & 255;
|
|
24039
|
+
b[i++] = tl & 255;
|
|
24040
|
+
const tmh = msecs / 4294967296 * 1e4 & 268435455;
|
|
24041
|
+
b[i++] = tmh >>> 8 & 255;
|
|
24042
|
+
b[i++] = tmh & 255;
|
|
24043
|
+
b[i++] = tmh >>> 24 & 15 | 16;
|
|
24044
|
+
b[i++] = tmh >>> 16 & 255;
|
|
24045
|
+
b[i++] = clockseq >>> 8 | 128;
|
|
24046
|
+
b[i++] = clockseq & 255;
|
|
24047
|
+
for (let n = 0; n < 6; ++n) {
|
|
24048
|
+
b[i + n] = node[n];
|
|
24049
|
+
}
|
|
24050
|
+
return buf || stringify_default(b);
|
|
24051
|
+
}
|
|
24052
|
+
var _nodeId;
|
|
24053
|
+
var _clockseq;
|
|
24054
|
+
var _lastMSecs;
|
|
24055
|
+
var _lastNSecs;
|
|
24056
|
+
var v1_default;
|
|
24057
|
+
var init_v1 = __esm({
|
|
24058
|
+
"../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v1.js"() {
|
|
24059
|
+
init_rng();
|
|
24060
|
+
init_stringify();
|
|
24061
|
+
_lastMSecs = 0;
|
|
24062
|
+
_lastNSecs = 0;
|
|
24063
|
+
v1_default = v1;
|
|
24064
|
+
}
|
|
24065
|
+
});
|
|
24066
|
+
function parse5(uuid) {
|
|
24067
|
+
if (!validate_default(uuid)) {
|
|
24068
|
+
throw TypeError("Invalid UUID");
|
|
24069
|
+
}
|
|
24070
|
+
let v;
|
|
24071
|
+
const arr = new Uint8Array(16);
|
|
24072
|
+
arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;
|
|
24073
|
+
arr[1] = v >>> 16 & 255;
|
|
24074
|
+
arr[2] = v >>> 8 & 255;
|
|
24075
|
+
arr[3] = v & 255;
|
|
24076
|
+
arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;
|
|
24077
|
+
arr[5] = v & 255;
|
|
24078
|
+
arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;
|
|
24079
|
+
arr[7] = v & 255;
|
|
24080
|
+
arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;
|
|
24081
|
+
arr[9] = v & 255;
|
|
24082
|
+
arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255;
|
|
24083
|
+
arr[11] = v / 4294967296 & 255;
|
|
24084
|
+
arr[12] = v >>> 24 & 255;
|
|
24085
|
+
arr[13] = v >>> 16 & 255;
|
|
24086
|
+
arr[14] = v >>> 8 & 255;
|
|
24087
|
+
arr[15] = v & 255;
|
|
24088
|
+
return arr;
|
|
24089
|
+
}
|
|
24090
|
+
var parse_default;
|
|
24091
|
+
var init_parse = __esm({
|
|
24092
|
+
"../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/parse.js"() {
|
|
24093
|
+
init_validate();
|
|
24094
|
+
parse_default = parse5;
|
|
24095
|
+
}
|
|
24096
|
+
});
|
|
24097
|
+
function stringToBytes(str) {
|
|
24098
|
+
str = unescape(encodeURIComponent(str));
|
|
24099
|
+
const bytes = [];
|
|
24100
|
+
for (let i = 0; i < str.length; ++i) {
|
|
24101
|
+
bytes.push(str.charCodeAt(i));
|
|
24102
|
+
}
|
|
24103
|
+
return bytes;
|
|
24104
|
+
}
|
|
24105
|
+
function v35_default(name, version2, hashfunc) {
|
|
24106
|
+
function generateUUID(value, namespace, buf, offset) {
|
|
24107
|
+
if (typeof value === "string") {
|
|
24108
|
+
value = stringToBytes(value);
|
|
24109
|
+
}
|
|
24110
|
+
if (typeof namespace === "string") {
|
|
24111
|
+
namespace = parse_default(namespace);
|
|
24112
|
+
}
|
|
24113
|
+
if (namespace.length !== 16) {
|
|
24114
|
+
throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
|
|
24115
|
+
}
|
|
24116
|
+
let bytes = new Uint8Array(16 + value.length);
|
|
24117
|
+
bytes.set(namespace);
|
|
24118
|
+
bytes.set(value, namespace.length);
|
|
24119
|
+
bytes = hashfunc(bytes);
|
|
24120
|
+
bytes[6] = bytes[6] & 15 | version2;
|
|
24121
|
+
bytes[8] = bytes[8] & 63 | 128;
|
|
24122
|
+
if (buf) {
|
|
24123
|
+
offset = offset || 0;
|
|
24124
|
+
for (let i = 0; i < 16; ++i) {
|
|
24125
|
+
buf[offset + i] = bytes[i];
|
|
24126
|
+
}
|
|
24127
|
+
return buf;
|
|
24128
|
+
}
|
|
24129
|
+
return stringify_default(bytes);
|
|
24130
|
+
}
|
|
24131
|
+
try {
|
|
24132
|
+
generateUUID.name = name;
|
|
24133
|
+
} catch (err) {
|
|
24134
|
+
}
|
|
24135
|
+
generateUUID.DNS = DNS;
|
|
24136
|
+
generateUUID.URL = URL2;
|
|
24137
|
+
return generateUUID;
|
|
24138
|
+
}
|
|
24139
|
+
var DNS;
|
|
24140
|
+
var URL2;
|
|
24141
|
+
var init_v35 = __esm({
|
|
24142
|
+
"../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v35.js"() {
|
|
24143
|
+
init_stringify();
|
|
24144
|
+
init_parse();
|
|
24145
|
+
DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8";
|
|
24146
|
+
URL2 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
|
|
24147
|
+
}
|
|
24148
|
+
});
|
|
24149
|
+
function md5(bytes) {
|
|
24150
|
+
if (Array.isArray(bytes)) {
|
|
24151
|
+
bytes = Buffer.from(bytes);
|
|
24152
|
+
} else if (typeof bytes === "string") {
|
|
24153
|
+
bytes = Buffer.from(bytes, "utf8");
|
|
24154
|
+
}
|
|
24155
|
+
return import_crypto.default.createHash("md5").update(bytes).digest();
|
|
24156
|
+
}
|
|
24157
|
+
var md5_default;
|
|
24158
|
+
var init_md5 = __esm({
|
|
24159
|
+
"../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/md5.js"() {
|
|
24160
|
+
md5_default = md5;
|
|
24161
|
+
}
|
|
24162
|
+
});
|
|
24163
|
+
var v3;
|
|
24164
|
+
var v3_default;
|
|
24165
|
+
var init_v3 = __esm({
|
|
24166
|
+
"../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v3.js"() {
|
|
24167
|
+
init_v35();
|
|
24168
|
+
init_md5();
|
|
24169
|
+
v3 = v35_default("v3", 48, md5_default);
|
|
24170
|
+
v3_default = v3;
|
|
24171
|
+
}
|
|
24172
|
+
});
|
|
24173
|
+
function v4(options, buf, offset) {
|
|
24174
|
+
options = options || {};
|
|
24175
|
+
const rnds = options.random || (options.rng || rng)();
|
|
24176
|
+
rnds[6] = rnds[6] & 15 | 64;
|
|
24177
|
+
rnds[8] = rnds[8] & 63 | 128;
|
|
24178
|
+
if (buf) {
|
|
24179
|
+
offset = offset || 0;
|
|
24180
|
+
for (let i = 0; i < 16; ++i) {
|
|
24181
|
+
buf[offset + i] = rnds[i];
|
|
24182
|
+
}
|
|
24183
|
+
return buf;
|
|
24184
|
+
}
|
|
24185
|
+
return stringify_default(rnds);
|
|
24186
|
+
}
|
|
24187
|
+
var v4_default;
|
|
24188
|
+
var init_v4 = __esm({
|
|
24189
|
+
"../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v4.js"() {
|
|
24190
|
+
init_rng();
|
|
24191
|
+
init_stringify();
|
|
24192
|
+
v4_default = v4;
|
|
24193
|
+
}
|
|
24194
|
+
});
|
|
24195
|
+
function sha1(bytes) {
|
|
24196
|
+
if (Array.isArray(bytes)) {
|
|
24197
|
+
bytes = Buffer.from(bytes);
|
|
24198
|
+
} else if (typeof bytes === "string") {
|
|
24199
|
+
bytes = Buffer.from(bytes, "utf8");
|
|
24200
|
+
}
|
|
24201
|
+
return import_crypto.default.createHash("sha1").update(bytes).digest();
|
|
24202
|
+
}
|
|
24203
|
+
var sha1_default;
|
|
24204
|
+
var init_sha1 = __esm({
|
|
24205
|
+
"../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/sha1.js"() {
|
|
24206
|
+
sha1_default = sha1;
|
|
24207
|
+
}
|
|
24208
|
+
});
|
|
24209
|
+
var v5;
|
|
24210
|
+
var v5_default;
|
|
24211
|
+
var init_v5 = __esm({
|
|
24212
|
+
"../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v5.js"() {
|
|
24213
|
+
init_v35();
|
|
24214
|
+
init_sha1();
|
|
24215
|
+
v5 = v35_default("v5", 80, sha1_default);
|
|
24216
|
+
v5_default = v5;
|
|
24217
|
+
}
|
|
24218
|
+
});
|
|
24219
|
+
var nil_default;
|
|
24220
|
+
var init_nil = __esm({
|
|
24221
|
+
"../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/nil.js"() {
|
|
24222
|
+
nil_default = "00000000-0000-0000-0000-000000000000";
|
|
24223
|
+
}
|
|
24224
|
+
});
|
|
24225
|
+
function version(uuid) {
|
|
24226
|
+
if (!validate_default(uuid)) {
|
|
24227
|
+
throw TypeError("Invalid UUID");
|
|
24228
|
+
}
|
|
24229
|
+
return parseInt(uuid.substr(14, 1), 16);
|
|
24230
|
+
}
|
|
24231
|
+
var version_default;
|
|
24232
|
+
var init_version = __esm({
|
|
24233
|
+
"../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/version.js"() {
|
|
24234
|
+
init_validate();
|
|
24235
|
+
version_default = version;
|
|
24236
|
+
}
|
|
24237
|
+
});
|
|
24238
|
+
var esm_node_exports = {};
|
|
24239
|
+
__export2(esm_node_exports, {
|
|
24240
|
+
NIL: () => nil_default,
|
|
24241
|
+
parse: () => parse_default,
|
|
24242
|
+
stringify: () => stringify_default,
|
|
24243
|
+
v1: () => v1_default,
|
|
24244
|
+
v3: () => v3_default,
|
|
24245
|
+
v4: () => v4_default,
|
|
24246
|
+
v5: () => v5_default,
|
|
24247
|
+
validate: () => validate_default,
|
|
24248
|
+
version: () => version_default
|
|
24249
|
+
});
|
|
24250
|
+
var init_esm_node = __esm({
|
|
24251
|
+
"../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/index.js"() {
|
|
24252
|
+
init_v1();
|
|
24253
|
+
init_v3();
|
|
24254
|
+
init_v4();
|
|
24255
|
+
init_v5();
|
|
24256
|
+
init_nil();
|
|
24257
|
+
init_version();
|
|
24258
|
+
init_validate();
|
|
24259
|
+
init_stringify();
|
|
24260
|
+
init_parse();
|
|
24261
|
+
}
|
|
24262
|
+
});
|
|
23954
24263
|
var require_toaster = __commonJS2({
|
|
23955
24264
|
"../../node_modules/.pnpm/node-notifier@10.0.1/node_modules/node-notifier/notifiers/toaster.js"(exports2, module2) {
|
|
23956
24265
|
var path19 = __require("path");
|
|
@@ -23958,7 +24267,7 @@ var require_toaster = __commonJS2({
|
|
|
23958
24267
|
var utils = require_utils2();
|
|
23959
24268
|
var Balloon = require_balloon();
|
|
23960
24269
|
var os3 = __require("os");
|
|
23961
|
-
var { v4: uuid } =
|
|
24270
|
+
var { v4: uuid } = (init_esm_node(), __toCommonJS2(esm_node_exports));
|
|
23962
24271
|
var EventEmitter13 = __require("events").EventEmitter;
|
|
23963
24272
|
var util3 = __require("util");
|
|
23964
24273
|
var fallback;
|
|
@@ -35490,7 +35799,7 @@ var require_form_data = __commonJS2({
|
|
|
35490
35799
|
var parseUrl = __require("url").parse;
|
|
35491
35800
|
var fs19 = __require("fs");
|
|
35492
35801
|
var Stream = __require("stream").Stream;
|
|
35493
|
-
var
|
|
35802
|
+
var crypto8 = __require("crypto");
|
|
35494
35803
|
var mime = require_mime_types();
|
|
35495
35804
|
var asynckit = require_asynckit();
|
|
35496
35805
|
var setToStringTag = require_es_set_tostringtag();
|
|
@@ -35696,7 +36005,7 @@ var require_form_data = __commonJS2({
|
|
|
35696
36005
|
return Buffer.concat([dataBuffer, Buffer.from(this._lastBoundary())]);
|
|
35697
36006
|
};
|
|
35698
36007
|
FormData3.prototype._generateBoundary = function() {
|
|
35699
|
-
this._boundary = "--------------------------" +
|
|
36008
|
+
this._boundary = "--------------------------" + crypto8.randomBytes(12).toString("hex");
|
|
35700
36009
|
};
|
|
35701
36010
|
FormData3.prototype.getLengthSync = function() {
|
|
35702
36011
|
var knownLength = this._overheadLength + this._valueLength;
|
|
@@ -36815,7 +37124,7 @@ var require_ms = __commonJS2({
|
|
|
36815
37124
|
options = options || {};
|
|
36816
37125
|
var type2 = typeof val;
|
|
36817
37126
|
if (type2 === "string" && val.length > 0) {
|
|
36818
|
-
return
|
|
37127
|
+
return parse7(val);
|
|
36819
37128
|
} else if (type2 === "number" && isFinite(val)) {
|
|
36820
37129
|
return options.long ? fmtLong(val) : fmtShort(val);
|
|
36821
37130
|
}
|
|
@@ -36823,7 +37132,7 @@ var require_ms = __commonJS2({
|
|
|
36823
37132
|
"val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
|
|
36824
37133
|
);
|
|
36825
37134
|
};
|
|
36826
|
-
function
|
|
37135
|
+
function parse7(str) {
|
|
36827
37136
|
str = String(str);
|
|
36828
37137
|
if (str.length > 100) {
|
|
36829
37138
|
return;
|
|
@@ -37348,10 +37657,10 @@ var require_supports_color = __commonJS2({
|
|
|
37348
37657
|
return 3;
|
|
37349
37658
|
}
|
|
37350
37659
|
if ("TERM_PROGRAM" in env) {
|
|
37351
|
-
const
|
|
37660
|
+
const version2 = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
37352
37661
|
switch (env.TERM_PROGRAM) {
|
|
37353
37662
|
case "iTerm.app":
|
|
37354
|
-
return
|
|
37663
|
+
return version2 >= 3 ? 3 : 2;
|
|
37355
37664
|
case "Apple_Terminal":
|
|
37356
37665
|
return 2;
|
|
37357
37666
|
}
|
|
@@ -37583,7 +37892,7 @@ var require_debug2 = __commonJS2({
|
|
|
37583
37892
|
var require_follow_redirects = __commonJS2({
|
|
37584
37893
|
"../../node_modules/.pnpm/follow-redirects@1.15.11_debug@4.4.3/node_modules/follow-redirects/index.js"(exports2, module2) {
|
|
37585
37894
|
var url2 = __require("url");
|
|
37586
|
-
var
|
|
37895
|
+
var URL3 = url2.URL;
|
|
37587
37896
|
var http3 = __require("http");
|
|
37588
37897
|
var https3 = __require("https");
|
|
37589
37898
|
var Writable = __require("stream").Writable;
|
|
@@ -37599,7 +37908,7 @@ var require_follow_redirects = __commonJS2({
|
|
|
37599
37908
|
})();
|
|
37600
37909
|
var useNativeURL = false;
|
|
37601
37910
|
try {
|
|
37602
|
-
assert2(new
|
|
37911
|
+
assert2(new URL3(""));
|
|
37603
37912
|
} catch (error) {
|
|
37604
37913
|
useNativeURL = error.code === "ERR_INVALID_URL";
|
|
37605
37914
|
}
|
|
@@ -37979,7 +38288,7 @@ var require_follow_redirects = __commonJS2({
|
|
|
37979
38288
|
function parseUrl(input) {
|
|
37980
38289
|
var parsed;
|
|
37981
38290
|
if (useNativeURL) {
|
|
37982
|
-
parsed = new
|
|
38291
|
+
parsed = new URL3(input);
|
|
37983
38292
|
} else {
|
|
37984
38293
|
parsed = validateUrl(url2.parse(input));
|
|
37985
38294
|
if (!isString2(parsed.protocol)) {
|
|
@@ -37989,7 +38298,7 @@ var require_follow_redirects = __commonJS2({
|
|
|
37989
38298
|
return parsed;
|
|
37990
38299
|
}
|
|
37991
38300
|
function resolveUrl(relative14, base) {
|
|
37992
|
-
return useNativeURL ? new
|
|
38301
|
+
return useNativeURL ? new URL3(relative14, base) : parseUrl(url2.resolve(base, relative14));
|
|
37993
38302
|
}
|
|
37994
38303
|
function validateUrl(input) {
|
|
37995
38304
|
if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) {
|
|
@@ -38068,7 +38377,7 @@ var require_follow_redirects = __commonJS2({
|
|
|
38068
38377
|
return typeof value === "object" && "length" in value;
|
|
38069
38378
|
}
|
|
38070
38379
|
function isURL(value) {
|
|
38071
|
-
return
|
|
38380
|
+
return URL3 && value instanceof URL3;
|
|
38072
38381
|
}
|
|
38073
38382
|
module2.exports = wrap({ http: http3, https: https3 });
|
|
38074
38383
|
module2.exports.wrap = wrap;
|
|
@@ -40119,23 +40428,23 @@ var init_validator = __esm({
|
|
|
40119
40428
|
};
|
|
40120
40429
|
});
|
|
40121
40430
|
deprecatedWarnings = {};
|
|
40122
|
-
validators.transitional = function transitional(validator,
|
|
40431
|
+
validators.transitional = function transitional(validator, version2, message) {
|
|
40123
40432
|
function formatMessage(opt, desc) {
|
|
40124
40433
|
return "[Axios v" + VERSION + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
|
|
40125
40434
|
}
|
|
40126
40435
|
return (value, opt, opts) => {
|
|
40127
40436
|
if (validator === false) {
|
|
40128
40437
|
throw new AxiosError_default(
|
|
40129
|
-
formatMessage(opt, " has been removed" + (
|
|
40438
|
+
formatMessage(opt, " has been removed" + (version2 ? " in " + version2 : "")),
|
|
40130
40439
|
AxiosError_default.ERR_DEPRECATED
|
|
40131
40440
|
);
|
|
40132
40441
|
}
|
|
40133
|
-
if (
|
|
40442
|
+
if (version2 && !deprecatedWarnings[opt]) {
|
|
40134
40443
|
deprecatedWarnings[opt] = true;
|
|
40135
40444
|
console.warn(
|
|
40136
40445
|
formatMessage(
|
|
40137
40446
|
opt,
|
|
40138
|
-
" has been deprecated since v" +
|
|
40447
|
+
" has been deprecated since v" + version2 + " and will be removed in the near future"
|
|
40139
40448
|
)
|
|
40140
40449
|
);
|
|
40141
40450
|
}
|
|
@@ -41774,7 +42083,7 @@ var require_stringify = __commonJS2({
|
|
|
41774
42083
|
return typeof v === "string" || typeof v === "number" || typeof v === "boolean" || typeof v === "symbol" || typeof v === "bigint";
|
|
41775
42084
|
};
|
|
41776
42085
|
var sentinel = {};
|
|
41777
|
-
var
|
|
42086
|
+
var stringify7 = function stringify8(object, prefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, encoder, filter2, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel) {
|
|
41778
42087
|
var obj = object;
|
|
41779
42088
|
var tmpSc = sideChannel;
|
|
41780
42089
|
var step = 0;
|
|
@@ -41850,7 +42159,7 @@ var require_stringify = __commonJS2({
|
|
|
41850
42159
|
sideChannel.set(object, step);
|
|
41851
42160
|
var valueSideChannel = getSideChannel();
|
|
41852
42161
|
valueSideChannel.set(sentinel, sideChannel);
|
|
41853
|
-
pushToArray(values,
|
|
42162
|
+
pushToArray(values, stringify8(
|
|
41854
42163
|
value,
|
|
41855
42164
|
keyPrefix,
|
|
41856
42165
|
generateArrayPrefix,
|
|
@@ -41967,7 +42276,7 @@ var require_stringify = __commonJS2({
|
|
|
41967
42276
|
if (options.skipNulls && value === null) {
|
|
41968
42277
|
continue;
|
|
41969
42278
|
}
|
|
41970
|
-
pushToArray(keys,
|
|
42279
|
+
pushToArray(keys, stringify7(
|
|
41971
42280
|
value,
|
|
41972
42281
|
key,
|
|
41973
42282
|
generateArrayPrefix,
|
|
@@ -42299,13 +42608,13 @@ var require_parse2 = __commonJS2({
|
|
|
42299
42608
|
});
|
|
42300
42609
|
var require_lib3 = __commonJS2({
|
|
42301
42610
|
"../../node_modules/.pnpm/qs@6.15.1/node_modules/qs/lib/index.js"(exports2, module2) {
|
|
42302
|
-
var
|
|
42303
|
-
var
|
|
42611
|
+
var stringify7 = require_stringify();
|
|
42612
|
+
var parse7 = require_parse2();
|
|
42304
42613
|
var formats = require_formats();
|
|
42305
42614
|
module2.exports = {
|
|
42306
42615
|
formats,
|
|
42307
|
-
parse:
|
|
42308
|
-
stringify:
|
|
42616
|
+
parse: parse7,
|
|
42617
|
+
stringify: stringify7
|
|
42309
42618
|
};
|
|
42310
42619
|
}
|
|
42311
42620
|
});
|
|
@@ -124368,7 +124677,7 @@ var init_es = __esm({
|
|
|
124368
124677
|
return __awaiter(this, void 0, void 0, function* () {
|
|
124369
124678
|
const { appId, appSecret } = this.wsConfig.getClient();
|
|
124370
124679
|
try {
|
|
124371
|
-
const { code, data: { URL:
|
|
124680
|
+
const { code, data: { URL: URL3, ClientConfig }, msg } = yield this.httpInstance.request({
|
|
124372
124681
|
method: "post",
|
|
124373
124682
|
url: this.wsConfig.wsConfigUrl,
|
|
124374
124683
|
data: {
|
|
@@ -124387,9 +124696,9 @@ var init_es = __esm({
|
|
|
124387
124696
|
return false;
|
|
124388
124697
|
}
|
|
124389
124698
|
}
|
|
124390
|
-
const { device_id, service_id } = import_querystring.default.parse(
|
|
124699
|
+
const { device_id, service_id } = import_querystring.default.parse(URL3);
|
|
124391
124700
|
this.wsConfig.updateWs({
|
|
124392
|
-
connectUrl:
|
|
124701
|
+
connectUrl: URL3,
|
|
124393
124702
|
deviceId: device_id,
|
|
124394
124703
|
serviceId: service_id,
|
|
124395
124704
|
pingInterval: ClientConfig.PingInterval * 1e3,
|
|
@@ -124397,7 +124706,7 @@ var init_es = __esm({
|
|
|
124397
124706
|
reconnectInterval: ClientConfig.ReconnectInterval * 1e3,
|
|
124398
124707
|
reconnectNonce: ClientConfig.ReconnectNonce * 1e3
|
|
124399
124708
|
});
|
|
124400
|
-
this.logger.debug("[ws]", `get connect config success, ws url: ${
|
|
124709
|
+
this.logger.debug("[ws]", `get connect config success, ws url: ${URL3}`);
|
|
124401
124710
|
return true;
|
|
124402
124711
|
} catch (e) {
|
|
124403
124712
|
this.logger.error("[ws]", (e === null || e === void 0 ? void 0 : e.message) || "system busy");
|
|
@@ -142453,7 +142762,7 @@ function registerHealthRoutes(fastify2) {
|
|
|
142453
142762
|
const response = {
|
|
142454
142763
|
status: "ok",
|
|
142455
142764
|
service: "viben-gateway",
|
|
142456
|
-
version:
|
|
142765
|
+
version: VERSION3,
|
|
142457
142766
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
142458
142767
|
uptime: uptimeStr,
|
|
142459
142768
|
uptime_seconds: uptimeSeconds,
|
|
@@ -142462,10 +142771,12 @@ function registerHealthRoutes(fastify2) {
|
|
|
142462
142771
|
return response;
|
|
142463
142772
|
});
|
|
142464
142773
|
}
|
|
142774
|
+
var VERSION3;
|
|
142465
142775
|
var startupConfig;
|
|
142466
142776
|
var gatewayStartTime;
|
|
142467
142777
|
var init_health = __esm({
|
|
142468
142778
|
"src/gateway/routes/health.ts"() {
|
|
142779
|
+
VERSION3 = "1.1.3";
|
|
142469
142780
|
startupConfig = null;
|
|
142470
142781
|
gatewayStartTime = Date.now();
|
|
142471
142782
|
}
|
|
@@ -151365,8 +151676,8 @@ function isGlobalWorkspace(workspacePath) {
|
|
|
151365
151676
|
const globalVibenPath = getGlobalVibenPath();
|
|
151366
151677
|
return workspacePath === globalVibenPath || workspacePath === (0, import_os.homedir)();
|
|
151367
151678
|
}
|
|
151368
|
-
function getService(workspacePath,
|
|
151369
|
-
if (workspacePath &&
|
|
151679
|
+
function getService(workspacePath, validate2 = false) {
|
|
151680
|
+
if (workspacePath && validate2) {
|
|
151370
151681
|
validateWorkspacePath(workspacePath);
|
|
151371
151682
|
}
|
|
151372
151683
|
const baseDir = workspacePath ? (0, import_path.join)(workspacePath, ".viben", "group-chats") : getGlobalGroupChatsPath();
|
|
@@ -153437,7 +153748,7 @@ function registerMcpRoutes(fastify2) {
|
|
|
153437
153748
|
}
|
|
153438
153749
|
}
|
|
153439
153750
|
}, async (request, reply) => {
|
|
153440
|
-
const { name, version, target_dir } = request.body;
|
|
153751
|
+
const { name, version: version2, target_dir } = request.body;
|
|
153441
153752
|
if (!name) {
|
|
153442
153753
|
reply.code(400);
|
|
153443
153754
|
return { success: false, error: "name is required" };
|
|
@@ -153446,9 +153757,9 @@ function registerMcpRoutes(fastify2) {
|
|
|
153446
153757
|
reply.code(400);
|
|
153447
153758
|
return { success: false, error: "target_dir is required" };
|
|
153448
153759
|
}
|
|
153449
|
-
log31.info({ name, version, target_dir }, "Downloading MCP package");
|
|
153760
|
+
log31.info({ name, version: version2, target_dir }, "Downloading MCP package");
|
|
153450
153761
|
try {
|
|
153451
|
-
const result = await downloadFromMarketplace(name,
|
|
153762
|
+
const result = await downloadFromMarketplace(name, version2, target_dir);
|
|
153452
153763
|
if (!result.success) {
|
|
153453
153764
|
reply.code(400);
|
|
153454
153765
|
return { success: false, error: result.error };
|
|
@@ -156418,10 +156729,10 @@ async function checkPython(path19) {
|
|
|
156418
156729
|
});
|
|
156419
156730
|
const versionOutput = stdout.trim() || stderr.trim();
|
|
156420
156731
|
const versionMatch = versionOutput.match(/Python\s+(\d+\.\d+\.\d+)/);
|
|
156421
|
-
const
|
|
156732
|
+
const version2 = versionMatch ? versionMatch[1] : null;
|
|
156422
156733
|
let isValid = false;
|
|
156423
|
-
if (
|
|
156424
|
-
const parts =
|
|
156734
|
+
if (version2) {
|
|
156735
|
+
const parts = version2.split(".");
|
|
156425
156736
|
if (parts.length >= 2) {
|
|
156426
156737
|
const major = parseInt(parts[0], 10);
|
|
156427
156738
|
const minor = parseInt(parts[1], 10);
|
|
@@ -156430,7 +156741,7 @@ async function checkPython(path19) {
|
|
|
156430
156741
|
}
|
|
156431
156742
|
return {
|
|
156432
156743
|
path: actualPath,
|
|
156433
|
-
version,
|
|
156744
|
+
version: version2,
|
|
156434
156745
|
is_valid: isValid
|
|
156435
156746
|
};
|
|
156436
156747
|
} catch {
|
|
@@ -156585,15 +156896,15 @@ async function detectCliToolVersion(toolPath, tool) {
|
|
|
156585
156896
|
timeout: 5e3
|
|
156586
156897
|
});
|
|
156587
156898
|
const output2 = stdout.trim() || stderr.trim();
|
|
156588
|
-
let
|
|
156899
|
+
let version2 = null;
|
|
156589
156900
|
if (config.versionRegex) {
|
|
156590
156901
|
const match = output2.match(config.versionRegex);
|
|
156591
|
-
|
|
156902
|
+
version2 = match ? match[1] || match[2] || null : null;
|
|
156592
156903
|
} else {
|
|
156593
156904
|
const match = output2.match(/(\d+\.\d+\.\d+)/);
|
|
156594
|
-
|
|
156905
|
+
version2 = match ? match[1] : null;
|
|
156595
156906
|
}
|
|
156596
|
-
return { version, valid: true };
|
|
156907
|
+
return { version: version2, valid: true };
|
|
156597
156908
|
} catch {
|
|
156598
156909
|
return { version: null, valid: false };
|
|
156599
156910
|
}
|
|
@@ -156627,7 +156938,7 @@ async function detectCliTool(tool, userConfigPath) {
|
|
|
156627
156938
|
const config = TOOL_CONFIGS[tool];
|
|
156628
156939
|
const allPaths = [];
|
|
156629
156940
|
const seenRealPaths = /* @__PURE__ */ new Set();
|
|
156630
|
-
const addPath = async (path19,
|
|
156941
|
+
const addPath = async (path19, version2, source) => {
|
|
156631
156942
|
const normalizedPath = path19.replace(/\/+$/, "");
|
|
156632
156943
|
let realPath;
|
|
156633
156944
|
try {
|
|
@@ -156637,13 +156948,13 @@ async function detectCliTool(tool, userConfigPath) {
|
|
|
156637
156948
|
}
|
|
156638
156949
|
if (!seenRealPaths.has(realPath)) {
|
|
156639
156950
|
seenRealPaths.add(realPath);
|
|
156640
|
-
allPaths.push({ path: normalizedPath, version, source });
|
|
156951
|
+
allPaths.push({ path: normalizedPath, version: version2, source });
|
|
156641
156952
|
}
|
|
156642
156953
|
};
|
|
156643
156954
|
if (userConfigPath) {
|
|
156644
|
-
const { version, valid } = await detectCliToolVersion(userConfigPath, tool);
|
|
156955
|
+
const { version: version2, valid } = await detectCliToolVersion(userConfigPath, tool);
|
|
156645
156956
|
if (valid) {
|
|
156646
|
-
await addPath(userConfigPath,
|
|
156957
|
+
await addPath(userConfigPath, version2 || void 0, "user-config");
|
|
156647
156958
|
}
|
|
156648
156959
|
}
|
|
156649
156960
|
if (process.platform === "darwin") {
|
|
@@ -156663,9 +156974,9 @@ async function detectCliTool(tool, userConfigPath) {
|
|
|
156663
156974
|
}
|
|
156664
156975
|
for (const toolPath of homebrewPaths) {
|
|
156665
156976
|
if (await isExecutable(toolPath)) {
|
|
156666
|
-
const { version, valid } = await detectCliToolVersion(toolPath, tool);
|
|
156977
|
+
const { version: version2, valid } = await detectCliToolVersion(toolPath, tool);
|
|
156667
156978
|
if (valid) {
|
|
156668
|
-
await addPath(toolPath,
|
|
156979
|
+
await addPath(toolPath, version2 || void 0, "homebrew");
|
|
156669
156980
|
}
|
|
156670
156981
|
}
|
|
156671
156982
|
}
|
|
@@ -156676,9 +156987,9 @@ async function detectCliTool(tool, userConfigPath) {
|
|
|
156676
156987
|
const { stdout } = await execAsync5(`${whichCmd} ${toolCmd}`, { timeout: 5e3 });
|
|
156677
156988
|
const toolPath = stdout.trim().split("\n")[0];
|
|
156678
156989
|
if (toolPath) {
|
|
156679
|
-
const { version, valid } = await detectCliToolVersion(toolPath, tool);
|
|
156990
|
+
const { version: version2, valid } = await detectCliToolVersion(toolPath, tool);
|
|
156680
156991
|
if (valid) {
|
|
156681
|
-
await addPath(toolPath,
|
|
156992
|
+
await addPath(toolPath, version2 || void 0, getToolSource(toolPath));
|
|
156682
156993
|
}
|
|
156683
156994
|
}
|
|
156684
156995
|
} catch {
|
|
@@ -156699,9 +157010,9 @@ async function detectCliTool(tool, userConfigPath) {
|
|
|
156699
157010
|
for (const dir of versionDirs) {
|
|
156700
157011
|
const toolPathNvm = (0, import_path.join)(nvmVersionsDir, dir.name, "bin", tool);
|
|
156701
157012
|
if (await isExecutable(toolPathNvm)) {
|
|
156702
|
-
const { version, valid } = await detectCliToolVersion(toolPathNvm, tool);
|
|
157013
|
+
const { version: version2, valid } = await detectCliToolVersion(toolPathNvm, tool);
|
|
156703
157014
|
if (valid) {
|
|
156704
|
-
await addPath(toolPathNvm,
|
|
157015
|
+
await addPath(toolPathNvm, version2 || void 0, "nvm");
|
|
156705
157016
|
}
|
|
156706
157017
|
}
|
|
156707
157018
|
}
|
|
@@ -156715,9 +157026,9 @@ async function detectCliTool(tool, userConfigPath) {
|
|
|
156715
157026
|
];
|
|
156716
157027
|
for (const pyenvPath of pyenvPaths) {
|
|
156717
157028
|
if (await isExecutable(pyenvPath)) {
|
|
156718
|
-
const { version, valid } = await detectCliToolVersion(pyenvPath, tool);
|
|
157029
|
+
const { version: version2, valid } = await detectCliToolVersion(pyenvPath, tool);
|
|
156719
157030
|
if (valid) {
|
|
156720
|
-
await addPath(pyenvPath,
|
|
157031
|
+
await addPath(pyenvPath, version2 || void 0, "pyenv");
|
|
156721
157032
|
}
|
|
156722
157033
|
}
|
|
156723
157034
|
}
|
|
@@ -156733,9 +157044,9 @@ async function detectCliTool(tool, userConfigPath) {
|
|
|
156733
157044
|
];
|
|
156734
157045
|
for (const condaPath of condaPaths) {
|
|
156735
157046
|
if (await isExecutable(condaPath)) {
|
|
156736
|
-
const { version, valid } = await detectCliToolVersion(condaPath, tool);
|
|
157047
|
+
const { version: version2, valid } = await detectCliToolVersion(condaPath, tool);
|
|
156737
157048
|
if (valid) {
|
|
156738
|
-
await addPath(condaPath,
|
|
157049
|
+
await addPath(condaPath, version2 || void 0, "system-path");
|
|
156739
157050
|
}
|
|
156740
157051
|
}
|
|
156741
157052
|
}
|
|
@@ -156744,9 +157055,9 @@ async function detectCliTool(tool, userConfigPath) {
|
|
|
156744
157055
|
for (const toolPath of candidates) {
|
|
156745
157056
|
if (toolPath.includes("*")) continue;
|
|
156746
157057
|
if (await isExecutable(toolPath)) {
|
|
156747
|
-
const { version, valid } = await detectCliToolVersion(toolPath, tool);
|
|
157058
|
+
const { version: version2, valid } = await detectCliToolVersion(toolPath, tool);
|
|
156748
157059
|
if (valid) {
|
|
156749
|
-
await addPath(toolPath,
|
|
157060
|
+
await addPath(toolPath, version2 || void 0, getToolSource(toolPath));
|
|
156750
157061
|
}
|
|
156751
157062
|
}
|
|
156752
157063
|
}
|
|
@@ -156754,9 +157065,9 @@ async function detectCliTool(tool, userConfigPath) {
|
|
|
156754
157065
|
const systemPaths = ["/usr/bin/python3", "/usr/bin/python"];
|
|
156755
157066
|
for (const sysPath of systemPaths) {
|
|
156756
157067
|
if (await isExecutable(sysPath)) {
|
|
156757
|
-
const { version, valid } = await detectCliToolVersion(sysPath, tool);
|
|
157068
|
+
const { version: version2, valid } = await detectCliToolVersion(sysPath, tool);
|
|
156758
157069
|
if (valid) {
|
|
156759
|
-
await addPath(sysPath,
|
|
157070
|
+
await addPath(sysPath, version2 || void 0, "system-path");
|
|
156760
157071
|
}
|
|
156761
157072
|
}
|
|
156762
157073
|
}
|
|
@@ -156818,11 +157129,11 @@ async function checkPackageInstalled(pythonPath, packageName) {
|
|
|
156818
157129
|
log35.debug({ stderr: stderr.slice(0, 200) }, "pip show stderr");
|
|
156819
157130
|
}
|
|
156820
157131
|
const versionMatch = stdout.match(/^Version:\s*(.+)$/m);
|
|
156821
|
-
const
|
|
156822
|
-
log35.debug({ packageName, version }, "Package found via pip");
|
|
157132
|
+
const version2 = versionMatch ? versionMatch[1].trim() : null;
|
|
157133
|
+
log35.debug({ packageName, version: version2 }, "Package found via pip");
|
|
156823
157134
|
return {
|
|
156824
157135
|
name: packageName,
|
|
156825
|
-
version,
|
|
157136
|
+
version: version2,
|
|
156826
157137
|
installed: true
|
|
156827
157138
|
};
|
|
156828
157139
|
} catch (pipErr) {
|
|
@@ -156833,11 +157144,11 @@ async function checkPackageInstalled(pythonPath, packageName) {
|
|
|
156833
157144
|
log35.debug({ importCommand }, "Trying import");
|
|
156834
157145
|
try {
|
|
156835
157146
|
const { stdout: importStdout } = await execAsync5(importCommand, { timeout: 1e4 });
|
|
156836
|
-
const
|
|
156837
|
-
log35.debug({ packageName, version }, "Package found via import");
|
|
157147
|
+
const version2 = importStdout.trim() || "unknown";
|
|
157148
|
+
log35.debug({ packageName, version: version2 }, "Package found via import");
|
|
156838
157149
|
return {
|
|
156839
157150
|
name: packageName,
|
|
156840
|
-
version:
|
|
157151
|
+
version: version2 === "unknown" ? null : version2,
|
|
156841
157152
|
installed: true
|
|
156842
157153
|
};
|
|
156843
157154
|
} catch (importErr) {
|
|
@@ -156848,11 +157159,11 @@ async function checkPackageInstalled(pythonPath, packageName) {
|
|
|
156848
157159
|
try {
|
|
156849
157160
|
const { stdout: modStdout } = await execAsync5(moduleCommand, { timeout: 1e4 });
|
|
156850
157161
|
const versionMatch = modStdout.match(/(\d+\.\d+\.\d+)/);
|
|
156851
|
-
const
|
|
156852
|
-
log35.debug({ packageName, version }, "Package found via module");
|
|
157162
|
+
const version2 = versionMatch ? versionMatch[1] : "installed";
|
|
157163
|
+
log35.debug({ packageName, version: version2 }, "Package found via module");
|
|
156853
157164
|
return {
|
|
156854
157165
|
name: packageName,
|
|
156855
|
-
version,
|
|
157166
|
+
version: version2,
|
|
156856
157167
|
installed: true
|
|
156857
157168
|
};
|
|
156858
157169
|
} catch (modErr) {
|
|
@@ -166767,7 +167078,7 @@ function registerSkillRoutes(fastify2) {
|
|
|
166767
167078
|
custom_path,
|
|
166768
167079
|
source_path,
|
|
166769
167080
|
zip_path,
|
|
166770
|
-
version,
|
|
167081
|
+
version: version2,
|
|
166771
167082
|
force = false
|
|
166772
167083
|
} = request.body;
|
|
166773
167084
|
if (!name) {
|
|
@@ -166790,7 +167101,7 @@ function registerSkillRoutes(fastify2) {
|
|
|
166790
167101
|
customPath: custom_path,
|
|
166791
167102
|
sourcePath: source_path,
|
|
166792
167103
|
zipPath: zip_path,
|
|
166793
|
-
version,
|
|
167104
|
+
version: version2,
|
|
166794
167105
|
force
|
|
166795
167106
|
});
|
|
166796
167107
|
if (!result.success) {
|
|
@@ -166823,7 +167134,7 @@ function registerSkillRoutes(fastify2) {
|
|
|
166823
167134
|
return {
|
|
166824
167135
|
success: false,
|
|
166825
167136
|
name,
|
|
166826
|
-
version:
|
|
167137
|
+
version: version2 || "1.0.0",
|
|
166827
167138
|
path: "",
|
|
166828
167139
|
message: "Installation failed",
|
|
166829
167140
|
error: `${errorCode}: ${message}`
|
|
@@ -167252,7 +167563,7 @@ function registerSkillRoutes(fastify2) {
|
|
|
167252
167563
|
}
|
|
167253
167564
|
}
|
|
167254
167565
|
}, async (request, reply) => {
|
|
167255
|
-
const { name, version, target_dir } = request.body;
|
|
167566
|
+
const { name, version: version2, target_dir } = request.body;
|
|
167256
167567
|
if (!name) {
|
|
167257
167568
|
reply.code(400);
|
|
167258
167569
|
return { success: false, error: "name is required" };
|
|
@@ -167262,7 +167573,7 @@ function registerSkillRoutes(fastify2) {
|
|
|
167262
167573
|
return { success: false, error: "target_dir is required" };
|
|
167263
167574
|
}
|
|
167264
167575
|
try {
|
|
167265
|
-
const result = await downloadSkillFromRegistry(name,
|
|
167576
|
+
const result = await downloadSkillFromRegistry(name, version2, target_dir);
|
|
167266
167577
|
if (!result.success) {
|
|
167267
167578
|
reply.code(400);
|
|
167268
167579
|
return { success: false, error: result.error };
|
|
@@ -167470,6 +167781,46 @@ async function createGateway(config = {}) {
|
|
|
167470
167781
|
});
|
|
167471
167782
|
}
|
|
167472
167783
|
const app = (0, import_fastify.default)({ logger: true });
|
|
167784
|
+
try {
|
|
167785
|
+
await app.register(import_swagger.default, {
|
|
167786
|
+
openapi: {
|
|
167787
|
+
info: {
|
|
167788
|
+
title: "Viben Gateway API",
|
|
167789
|
+
description: "Agent Swarm \xD7 Code Evolution - Multi-agent orchestration and code evolution API",
|
|
167790
|
+
version: VERSION3
|
|
167791
|
+
},
|
|
167792
|
+
servers: [
|
|
167793
|
+
{
|
|
167794
|
+
url: `http://${host}:${port}`,
|
|
167795
|
+
description: "Local development server"
|
|
167796
|
+
}
|
|
167797
|
+
],
|
|
167798
|
+
tags: [
|
|
167799
|
+
{ name: "health", description: "Health check endpoints" },
|
|
167800
|
+
{ name: "agents", description: "Agent management" },
|
|
167801
|
+
{ name: "sessions", description: "Session management" },
|
|
167802
|
+
{ name: "tasks", description: "Task management" },
|
|
167803
|
+
{ name: "models", description: "Model configuration" },
|
|
167804
|
+
{ name: "providers", description: "Provider configuration" },
|
|
167805
|
+
{ name: "workspaces", description: "Workspace management" },
|
|
167806
|
+
{ name: "cron", description: "Scheduled jobs" },
|
|
167807
|
+
{ name: "channels", description: "Channel management" },
|
|
167808
|
+
{ name: "mcp", description: "MCP server management" },
|
|
167809
|
+
{ name: "executors", description: "Executor configuration" }
|
|
167810
|
+
]
|
|
167811
|
+
}
|
|
167812
|
+
});
|
|
167813
|
+
app.get("/openapi.json", async () => {
|
|
167814
|
+
return app.swagger();
|
|
167815
|
+
});
|
|
167816
|
+
app.get("/openapi.yaml", async (_, reply) => {
|
|
167817
|
+
const yaml = app.swagger({ yaml: true });
|
|
167818
|
+
reply.type("application/x-yaml").send(yaml);
|
|
167819
|
+
});
|
|
167820
|
+
log45.info("Swagger plugin registered (OpenAPI spec at /openapi.json, /openapi.yaml)");
|
|
167821
|
+
} catch (e) {
|
|
167822
|
+
log45.warn({ err: e }, "Failed to register Swagger plugin");
|
|
167823
|
+
}
|
|
167473
167824
|
if (cors) {
|
|
167474
167825
|
await app.register(import_cors.default, {
|
|
167475
167826
|
origin: true,
|
|
@@ -167491,46 +167842,6 @@ async function createGateway(config = {}) {
|
|
|
167491
167842
|
credentials: true
|
|
167492
167843
|
});
|
|
167493
167844
|
}
|
|
167494
|
-
try {
|
|
167495
|
-
await app.register(import_swagger.default, {
|
|
167496
|
-
openapi: {
|
|
167497
|
-
info: {
|
|
167498
|
-
title: "Viben Gateway API",
|
|
167499
|
-
description: "Agent Swarm \xD7 Code Evolution \u2014 API for multi-agent orchestration, Evo-based code evolution, and XState task management",
|
|
167500
|
-
version: "1.0.0"
|
|
167501
|
-
},
|
|
167502
|
-
servers: [{ url: `http://${host}:${port}` }],
|
|
167503
|
-
tags: [
|
|
167504
|
-
{ name: "health", description: "Health check endpoints" },
|
|
167505
|
-
{ name: "agents", description: "Agent management" },
|
|
167506
|
-
{ name: "executors", description: "Executor discovery and management" },
|
|
167507
|
-
{ name: "sessions", description: "Session management" },
|
|
167508
|
-
{ name: "providers", description: "Provider management" },
|
|
167509
|
-
{ name: "models", description: "Model management" },
|
|
167510
|
-
{ name: "workspaces", description: "Workspace management" },
|
|
167511
|
-
{ name: "channels", description: "Channel management" },
|
|
167512
|
-
{ name: "cron", description: "Cron job management" },
|
|
167513
|
-
{ name: "tasks", description: "Task management" },
|
|
167514
|
-
{ name: "mcp", description: "MCP server management" },
|
|
167515
|
-
{ name: "kanban", description: "Kanban board management" }
|
|
167516
|
-
]
|
|
167517
|
-
}
|
|
167518
|
-
});
|
|
167519
|
-
const execDir = (0, import_path.dirname)(process.execPath);
|
|
167520
|
-
const bundledStaticDir = (0, import_path.join)(execDir, "swagger-ui-static");
|
|
167521
|
-
const swaggerUiBaseDir = (0, import_fs.existsSync)(bundledStaticDir) ? bundledStaticDir : void 0;
|
|
167522
|
-
await app.register(import_swagger_ui.default, {
|
|
167523
|
-
routePrefix: "/docs",
|
|
167524
|
-
baseDir: swaggerUiBaseDir,
|
|
167525
|
-
uiConfig: {
|
|
167526
|
-
docExpansion: "list",
|
|
167527
|
-
deepLinking: true
|
|
167528
|
-
}
|
|
167529
|
-
});
|
|
167530
|
-
log45.info("Swagger API documentation registered at /docs");
|
|
167531
|
-
} catch (e) {
|
|
167532
|
-
log45.warn({ err: e }, "Failed to register Swagger plugin");
|
|
167533
|
-
}
|
|
167534
167845
|
try {
|
|
167535
167846
|
await app.register(import_multipart.default, {
|
|
167536
167847
|
limits: {
|
|
@@ -167690,7 +168001,7 @@ async function runGateway(config = {}) {
|
|
|
167690
168001
|
log45.info({ host, port, telemetryEnabled: enableTelemetry, telemetryDir }, "Gateway server started");
|
|
167691
168002
|
console.log(`
|
|
167692
168003
|
[Gateway] Server running on http://${host}:${port}`);
|
|
167693
|
-
console.log("[Gateway] API: /health, /api/agent, /api/tasks, /api/sessions
|
|
168004
|
+
console.log("[Gateway] API: /health, /api/agent, /api/tasks, /api/sessions");
|
|
167694
168005
|
if (enableTelemetry) {
|
|
167695
168006
|
console.log(`[Gateway] Telemetry: ${telemetryDir}`);
|
|
167696
168007
|
}
|
|
@@ -174176,7 +174487,7 @@ function registerMcpCommand(program) {
|
|
|
174176
174487
|
handleCommandError(ctx, error);
|
|
174177
174488
|
}
|
|
174178
174489
|
});
|
|
174179
|
-
mcp.command("download <name> [version]").description("Download an MCP package to current directory").action(async (name,
|
|
174490
|
+
mcp.command("download <name> [version]").description("Download an MCP package to current directory").action(async (name, version2) => {
|
|
174180
174491
|
const ctx = getOutputContext(program);
|
|
174181
174492
|
try {
|
|
174182
174493
|
const pkgInfo = await getFromMarketplace(name);
|
|
@@ -174185,11 +174496,11 @@ function registerMcpCommand(program) {
|
|
|
174185
174496
|
}
|
|
174186
174497
|
const targetDir = (0, import_path.join)(process.cwd(), pkgInfo.mcp.slug);
|
|
174187
174498
|
if (!ctx.quiet) {
|
|
174188
|
-
console.log(`Downloading ${name}@${
|
|
174499
|
+
console.log(`Downloading ${name}@${version2 || pkgInfo.mcp.version}...`);
|
|
174189
174500
|
}
|
|
174190
174501
|
const result = await downloadFromMarketplace(
|
|
174191
174502
|
pkgInfo.mcp.id,
|
|
174192
|
-
|
|
174503
|
+
version2,
|
|
174193
174504
|
targetDir
|
|
174194
174505
|
);
|
|
174195
174506
|
if (!result.success) {
|
|
@@ -174347,8 +174658,8 @@ function registerSkillCommand(program) {
|
|
|
174347
174658
|
async (nameWithVersion, options) => {
|
|
174348
174659
|
const ctx = getOutputContext(program);
|
|
174349
174660
|
try {
|
|
174350
|
-
const { name, version } = parseNameWithVersion(nameWithVersion);
|
|
174351
|
-
const finalVersion = options.version ||
|
|
174661
|
+
const { name, version: version2 } = parseNameWithVersion(nameWithVersion);
|
|
174662
|
+
const finalVersion = options.version || version2;
|
|
174352
174663
|
let target = "global";
|
|
174353
174664
|
if (options.agent) {
|
|
174354
174665
|
target = "agent";
|
|
@@ -174536,7 +174847,7 @@ function registerSkillCommand(program) {
|
|
|
174536
174847
|
}
|
|
174537
174848
|
}
|
|
174538
174849
|
);
|
|
174539
|
-
skill.command("download <name> [version]").description("Download a skill package to current directory").action(async (name,
|
|
174850
|
+
skill.command("download <name> [version]").description("Download a skill package to current directory").action(async (name, version2) => {
|
|
174540
174851
|
const ctx = getOutputContext(program);
|
|
174541
174852
|
try {
|
|
174542
174853
|
const pkgInfo = await getSkillFromRegistry(name);
|
|
@@ -174545,11 +174856,11 @@ function registerSkillCommand(program) {
|
|
|
174545
174856
|
}
|
|
174546
174857
|
const targetDir = (0, import_path.join)(process.cwd(), pkgInfo.skill.slug);
|
|
174547
174858
|
if (!ctx.quiet) {
|
|
174548
|
-
console.log(`Downloading ${name}@${
|
|
174859
|
+
console.log(`Downloading ${name}@${version2 || pkgInfo.skill.version}...`);
|
|
174549
174860
|
}
|
|
174550
174861
|
const result = await downloadSkillFromRegistry(
|
|
174551
174862
|
pkgInfo.skill.id,
|
|
174552
|
-
|
|
174863
|
+
version2,
|
|
174553
174864
|
targetDir
|
|
174554
174865
|
);
|
|
174555
174866
|
if (!result.success) {
|
|
@@ -174569,11 +174880,11 @@ function parseNameWithVersion(nameWithVersion) {
|
|
|
174569
174880
|
return { name: nameWithVersion, version: void 0 };
|
|
174570
174881
|
}
|
|
174571
174882
|
const name = nameWithVersion.substring(0, atIndex);
|
|
174572
|
-
const
|
|
174573
|
-
if (
|
|
174883
|
+
const version2 = nameWithVersion.substring(atIndex + 1);
|
|
174884
|
+
if (version2 === "latest") {
|
|
174574
174885
|
return { name, version: void 0 };
|
|
174575
174886
|
}
|
|
174576
|
-
return { name, version };
|
|
174887
|
+
return { name, version: version2 };
|
|
174577
174888
|
}
|
|
174578
174889
|
function getTargetFromExecutor(executor) {
|
|
174579
174890
|
switch (executor.toUpperCase()) {
|
|
@@ -174755,7 +175066,7 @@ ${import_chalk.default.bold("Telemetry \u7EDF\u8BA1")}:
|
|
|
174755
175066
|
init_lib();
|
|
174756
175067
|
init_update();
|
|
174757
175068
|
var execAsync11 = (0, import_util.promisify)(import_child_process.exec);
|
|
174758
|
-
var CURRENT_VERSION = "1.1.
|
|
175069
|
+
var CURRENT_VERSION = "1.1.3";
|
|
174759
175070
|
var GITHUB_REPO = "LinXueyuanStdio/viben";
|
|
174760
175071
|
var NPM_PACKAGE = "viben";
|
|
174761
175072
|
function compareSemver(a, b) {
|
|
@@ -182625,10 +182936,10 @@ function registerCommands(program) {
|
|
|
182625
182936
|
registerIndexCommand(program);
|
|
182626
182937
|
registerLoginCommand(program);
|
|
182627
182938
|
}
|
|
182628
|
-
var
|
|
182939
|
+
var VERSION4 = "1.1.3";
|
|
182629
182940
|
function createProgram() {
|
|
182630
182941
|
const program = new import_commander.Command();
|
|
182631
|
-
program.name("viben").description("Viben - Agent Swarm \xD7 Code Evolution").version(
|
|
182942
|
+
program.name("viben").description("Viben - Agent Swarm \xD7 Code Evolution").version(VERSION4, "-v, --version", "Output the version number");
|
|
182632
182943
|
program.option("--json", "Output in JSON format").option("--verbose", "Verbose output").option("--quiet", "Minimal output").option("--global", "Use global config instead of workspace");
|
|
182633
182944
|
registerCommands(program);
|
|
182634
182945
|
return program;
|