@moly-mcp/lido 1.0.7 → 1.0.8
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
|
@@ -254,7 +254,7 @@ async function main() {
|
|
|
254
254
|
case "setup": {
|
|
255
255
|
const { cfg, terminalMode } = await runWizard();
|
|
256
256
|
if (terminalMode) {
|
|
257
|
-
const { startChatSession } = await import("./session-
|
|
257
|
+
const { startChatSession } = await import("./session-37TYTCEU.js");
|
|
258
258
|
await startChatSession(cfg);
|
|
259
259
|
} else {
|
|
260
260
|
await startServer();
|
|
@@ -514,7 +514,7 @@ async function main() {
|
|
|
514
514
|
if (!configExists()) {
|
|
515
515
|
const { cfg, terminalMode } = await runWizard();
|
|
516
516
|
if (terminalMode) {
|
|
517
|
-
const { startChatSession } = await import("./session-
|
|
517
|
+
const { startChatSession } = await import("./session-37TYTCEU.js");
|
|
518
518
|
await startChatSession(cfg);
|
|
519
519
|
} else {
|
|
520
520
|
await startServer();
|
|
@@ -683,6 +683,16 @@ ${D} powered by Lido${R}
|
|
|
683
683
|
function ln(text = "") {
|
|
684
684
|
process.stdout.write(text + "\n");
|
|
685
685
|
}
|
|
686
|
+
function printResponse(text) {
|
|
687
|
+
const lines = text.split("\n");
|
|
688
|
+
const prefix = `${B}${GR}moly${R} \u203A `;
|
|
689
|
+
const indent = " ";
|
|
690
|
+
ln();
|
|
691
|
+
lines.forEach((line, i) => {
|
|
692
|
+
process.stdout.write((i === 0 ? prefix : indent) + line + "\n");
|
|
693
|
+
});
|
|
694
|
+
ln();
|
|
695
|
+
}
|
|
686
696
|
function saveTrade(toolName, args, result) {
|
|
687
697
|
try {
|
|
688
698
|
let txHash;
|
|
@@ -742,7 +752,20 @@ async function startChatSession(cfg) {
|
|
|
742
752
|
const messages = [
|
|
743
753
|
{
|
|
744
754
|
role: "user",
|
|
745
|
-
content: skillContext + `You are Moly, a terminal assistant for Lido Finance on ${cfg.network}.
|
|
755
|
+
content: skillContext + `You are Moly, a terminal assistant for Lido Finance on ${cfg.network}.
|
|
756
|
+
Mode: ${cfg.mode} (${cfg.mode === "simulation" ? "dry-run, nothing broadcast" : "LIVE - real on-chain transactions"}).
|
|
757
|
+
Chain scope: ${cfg.chainScope ?? "ethereum"}.
|
|
758
|
+
|
|
759
|
+
You can only do what your tools support: staking ETH, withdrawals, wrap/unwrap stETH/wstETH, balances, rewards, Lido DAO governance${cfg.chainScope === "all" ? ", and L2 bridging from Base/Arbitrum to Ethereum via LI.FI" : ""}.
|
|
760
|
+
${cfg.chainScope === "all" ? "If the user wants to stake ETH from Base or Arbitrum, first check their L2 balance with get_l2_balance, then bridge to Ethereum with bridge_to_ethereum, then after bridging completes use stake_eth. Bridge takes 1-20 min, tell user to check with get_bridge_status.\n" : ""}If asked about anything outside those tools (e.g. Lido Vaults, validators, node operators, DeFi integrations), say clearly and briefly that it is not supported.
|
|
761
|
+
|
|
762
|
+
OUTPUT FORMAT RULES (terminal, no markdown):
|
|
763
|
+
- Never use **bold**, _italic_, # headers, or backtick code blocks.
|
|
764
|
+
- Use plain dashes (-) for lists, one item per line.
|
|
765
|
+
- Use blank lines to separate sections or groups of information.
|
|
766
|
+
- For key/value data (balances, settings, etc.) use " key: value" format, one per line.
|
|
767
|
+
- Keep prose concise. Lead with the answer, then details.
|
|
768
|
+
- For live transactions always confirm with the user first.`
|
|
746
769
|
},
|
|
747
770
|
{
|
|
748
771
|
role: "assistant",
|
|
@@ -804,16 +827,12 @@ async function startChatSession(cfg) {
|
|
|
804
827
|
}
|
|
805
828
|
messages.push(...toolResults);
|
|
806
829
|
if (response.text) {
|
|
807
|
-
|
|
808
|
-
ln(`${B}${GR}moly${R} \u203A ${response.text}`);
|
|
809
|
-
ln();
|
|
830
|
+
printResponse(response.text);
|
|
810
831
|
}
|
|
811
832
|
continue;
|
|
812
833
|
}
|
|
813
834
|
if (response.text) {
|
|
814
|
-
|
|
815
|
-
ln(`${B}${GR}moly${R} \u203A ${response.text}`);
|
|
816
|
-
ln();
|
|
835
|
+
printResponse(response.text);
|
|
817
836
|
}
|
|
818
837
|
break;
|
|
819
838
|
}
|
package/package.json
CHANGED