@moly-mcp/lido 1.1.9 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin.js
CHANGED
|
@@ -352,7 +352,7 @@ async function main() {
|
|
|
352
352
|
case "setup": {
|
|
353
353
|
const { cfg, terminalMode } = await runWizard();
|
|
354
354
|
if (terminalMode) {
|
|
355
|
-
const { startChatSession } = await import("./session-
|
|
355
|
+
const { startChatSession } = await import("./session-NTWLPEVH.js");
|
|
356
356
|
await startChatSession(cfg);
|
|
357
357
|
} else {
|
|
358
358
|
await startServer();
|
|
@@ -397,13 +397,13 @@ async function main() {
|
|
|
397
397
|
}
|
|
398
398
|
const threshold = args[3] && !args[3].startsWith("-") ? parseFloat(args[3]) : void 0;
|
|
399
399
|
const channel = getFlag("--channel") ?? "telegram";
|
|
400
|
-
const { setAlert } = await import("./alerts-
|
|
400
|
+
const { setAlert } = await import("./alerts-WV24ME7Y.js");
|
|
401
401
|
const alert = setAlert({ condition, threshold, channel });
|
|
402
402
|
console.log("Alert created:", JSON.stringify(alert, null, 2));
|
|
403
403
|
break;
|
|
404
404
|
}
|
|
405
405
|
case "list": {
|
|
406
|
-
const { listAlerts } = await import("./alerts-
|
|
406
|
+
const { listAlerts } = await import("./alerts-WV24ME7Y.js");
|
|
407
407
|
console.log(JSON.stringify(listAlerts(), null, 2));
|
|
408
408
|
break;
|
|
409
409
|
}
|
|
@@ -413,12 +413,12 @@ async function main() {
|
|
|
413
413
|
console.log("Usage: moly alert remove <id>");
|
|
414
414
|
break;
|
|
415
415
|
}
|
|
416
|
-
const { removeAlertById } = await import("./alerts-
|
|
416
|
+
const { removeAlertById } = await import("./alerts-WV24ME7Y.js");
|
|
417
417
|
console.log(JSON.stringify(removeAlertById(id), null, 2));
|
|
418
418
|
break;
|
|
419
419
|
}
|
|
420
420
|
case "channels": {
|
|
421
|
-
const { configureAlertChannels } = await import("./alerts-
|
|
421
|
+
const { configureAlertChannels } = await import("./alerts-WV24ME7Y.js");
|
|
422
422
|
const result = configureAlertChannels({
|
|
423
423
|
telegram_token: getFlag("--telegram-token"),
|
|
424
424
|
telegram_chat_id: getFlag("--telegram-chat"),
|
|
@@ -601,14 +601,14 @@ async function main() {
|
|
|
601
601
|
if (!configExists()) {
|
|
602
602
|
const { cfg, terminalMode } = await runWizard();
|
|
603
603
|
if (terminalMode) {
|
|
604
|
-
const { startChatSession } = await import("./session-
|
|
604
|
+
const { startChatSession } = await import("./session-NTWLPEVH.js");
|
|
605
605
|
await startChatSession(cfg);
|
|
606
606
|
} else {
|
|
607
607
|
await startServer();
|
|
608
608
|
}
|
|
609
609
|
} else {
|
|
610
610
|
const cfg = loadConfig();
|
|
611
|
-
const { startChatSession } = await import("./session-
|
|
611
|
+
const { startChatSession } = await import("./session-NTWLPEVH.js");
|
|
612
612
|
await startChatSession(cfg);
|
|
613
613
|
}
|
|
614
614
|
break;
|
|
@@ -680,7 +680,7 @@ Commands:
|
|
|
680
680
|
if (!configExists()) {
|
|
681
681
|
const { cfg, terminalMode } = await runWizard();
|
|
682
682
|
if (terminalMode) {
|
|
683
|
-
const { startChatSession } = await import("./session-
|
|
683
|
+
const { startChatSession } = await import("./session-NTWLPEVH.js");
|
|
684
684
|
await startChatSession(cfg);
|
|
685
685
|
} else {
|
|
686
686
|
await startServer();
|
|
@@ -41,6 +41,13 @@ function setAlert(params) {
|
|
|
41
41
|
if (channel !== "telegram" && channel !== "webhook") {
|
|
42
42
|
throw new Error(`Invalid channel: ${params.channel}. Valid: telegram, webhook`);
|
|
43
43
|
}
|
|
44
|
+
const channels = loadChannelConfig();
|
|
45
|
+
if (channel === "telegram" && !channels.telegram?.token) {
|
|
46
|
+
throw new Error("Telegram not configured. Use configure_alert_channels with telegram_token and telegram_chat_id first.");
|
|
47
|
+
}
|
|
48
|
+
if (channel === "webhook" && !channels.webhook?.url) {
|
|
49
|
+
throw new Error("Webhook not configured. Use configure_alert_channels with webhook_url first.");
|
|
50
|
+
}
|
|
44
51
|
return addAlert({ condition, threshold: params.threshold, channel });
|
|
45
52
|
}
|
|
46
53
|
function listAlerts() {
|
package/dist/server/index.js
CHANGED
package/package.json
CHANGED