@t2000/mcp 0.17.21 → 0.17.23
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/README.md +3 -1
- package/dist/bin.js +169 -6
- package/dist/bin.js.map +1 -1
- package/dist/index.js +169 -6
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -709,8 +709,10 @@ function registerPrompts(server) {
|
|
|
709
709
|
"4. Show yield earnings (t2000_earnings)",
|
|
710
710
|
"5. Review current interest rates (t2000_rates)",
|
|
711
711
|
"6. Check investment portfolio (t2000_portfolio)",
|
|
712
|
+
"7. Check for pending protocol rewards (positions with +rewards tags mean claimable rewards exist)",
|
|
712
713
|
"",
|
|
713
|
-
"Summarize the agent's financial health in a clear, concise format with actionable recommendations."
|
|
714
|
+
"Summarize the agent's financial health in a clear, concise format with actionable recommendations.",
|
|
715
|
+
'If any positions show claimable rewards, include "Claim rewards \u2192 run t2000_claim_rewards to collect and convert to USDC" as an action item.'
|
|
714
716
|
].join("\n")
|
|
715
717
|
}
|
|
716
718
|
}]
|
|
@@ -728,11 +730,12 @@ function registerPrompts(server) {
|
|
|
728
730
|
"You are a yield optimization assistant for a t2000 AI agent bank account.",
|
|
729
731
|
"",
|
|
730
732
|
"Please analyze the current yield strategy:",
|
|
731
|
-
"1. Check current positions (t2000_positions)",
|
|
733
|
+
"1. Check current positions (t2000_positions) \u2014 look for +rewards tags indicating claimable protocol rewards",
|
|
732
734
|
"2. Compare rates across protocols (t2000_rates)",
|
|
733
735
|
"3. Run a dry-run rebalance to see if optimization is available (t2000_rebalance with dryRun: true)",
|
|
734
736
|
"",
|
|
735
|
-
"If a rebalance would improve yield, explain the trade-off (gas cost vs yield gain, break-even period) and ask if the user wants to proceed."
|
|
737
|
+
"If a rebalance would improve yield, explain the trade-off (gas cost vs yield gain, break-even period) and ask if the user wants to proceed.",
|
|
738
|
+
"If any positions have claimable rewards, recommend running t2000_claim_rewards to collect and auto-convert to USDC."
|
|
736
739
|
].join("\n")
|
|
737
740
|
}
|
|
738
741
|
}]
|
|
@@ -889,6 +892,7 @@ ${context}
|
|
|
889
892
|
"4. Health factor \u2014 any borrow risk (t2000_health)",
|
|
890
893
|
'5. Pending DCA runs (t2000_auto_invest action: "status")',
|
|
891
894
|
"6. Recent transactions since yesterday (t2000_history with limit: 10)",
|
|
895
|
+
"7. Lending positions (t2000_positions) \u2014 check for +rewards tags indicating claimable rewards",
|
|
892
896
|
"",
|
|
893
897
|
"Present the briefing in this structure:",
|
|
894
898
|
"",
|
|
@@ -898,6 +902,7 @@ ${context}
|
|
|
898
902
|
"\u{1F4B0} Accounts",
|
|
899
903
|
" Checking / Savings / Credit / Investment totals",
|
|
900
904
|
" Net worth and change from yesterday if estimable",
|
|
905
|
+
' If rewards are claimable, show "Rewards: claimable"',
|
|
901
906
|
"",
|
|
902
907
|
"\u{1F4C8} Portfolio",
|
|
903
908
|
" Each position: asset, amount, current price, unrealized P&L",
|
|
@@ -908,11 +913,12 @@ ${context}
|
|
|
908
913
|
" Current APY across savings and investment lending",
|
|
909
914
|
"",
|
|
910
915
|
"\u26A0\uFE0F Alerts (only if applicable)",
|
|
911
|
-
" Low health factor, pending DCA runs, strategy drift, large unrealized losses",
|
|
916
|
+
" Low health factor, pending DCA runs, strategy drift, large unrealized losses, claimable rewards",
|
|
912
917
|
"",
|
|
913
918
|
"\u{1F4CB} Action Items",
|
|
914
|
-
" Specific, actionable next steps (max
|
|
915
|
-
' e.g. "Run pending DCA", "Rebalance savings for +0.5% APY", "Health factor dropping \u2014 consider repaying"',
|
|
919
|
+
" Specific, actionable next steps (max 4)",
|
|
920
|
+
' e.g. "Claim rewards \u2192 run t2000_claim_rewards", "Run pending DCA", "Rebalance savings for +0.5% APY", "Health factor dropping \u2014 consider repaying"',
|
|
921
|
+
" If positions show +rewards, always include claiming as an action item",
|
|
916
922
|
"",
|
|
917
923
|
"Keep it scannable. No fluff. Numbers first, narrative second."
|
|
918
924
|
].join("\n")
|
|
@@ -1016,6 +1022,7 @@ ${context}
|
|
|
1016
1022
|
" Expected: ~$X.XX/month",
|
|
1017
1023
|
" Action 2: Earn yield on X SUI \u2192 Protocol (Y% APY) [if applicable]",
|
|
1018
1024
|
" Action 3: Rebalance savings \u2192 +Y% APY [if applicable]",
|
|
1025
|
+
" Action 4: Claim rewards \u2192 collect and convert to USDC [if positions show +rewards]",
|
|
1019
1026
|
"",
|
|
1020
1027
|
" Projected monthly yield: $X.XX (before) \u2192 $X.XX (after)",
|
|
1021
1028
|
"",
|
|
@@ -1103,6 +1110,7 @@ ${context}
|
|
|
1103
1110
|
"4. Investment portfolio with P&L (t2000_portfolio)",
|
|
1104
1111
|
'5. Strategy statuses (t2000_strategy action: "list")',
|
|
1105
1112
|
'6. DCA schedule status (t2000_auto_invest action: "status")',
|
|
1113
|
+
"7. Lending positions (t2000_positions) \u2014 check for claimable rewards",
|
|
1106
1114
|
"",
|
|
1107
1115
|
"Present as a weekly newsletter:",
|
|
1108
1116
|
"",
|
|
@@ -1138,6 +1146,10 @@ ${context}
|
|
|
1138
1146
|
"\u{1F3C6} Highlight of the Week",
|
|
1139
1147
|
" One standout metric (best trade, highest yield day, milestone reached)",
|
|
1140
1148
|
"",
|
|
1149
|
+
"\u{1F381} Rewards",
|
|
1150
|
+
" Any pending protocol rewards (if positions show +rewards)",
|
|
1151
|
+
" Suggest claiming if rewards are available",
|
|
1152
|
+
"",
|
|
1141
1153
|
"\u{1F449} Next Week's Focus",
|
|
1142
1154
|
" 1-2 actionable suggestions based on trends",
|
|
1143
1155
|
"",
|
|
@@ -1209,6 +1221,157 @@ ${context}
|
|
|
1209
1221
|
}]
|
|
1210
1222
|
})
|
|
1211
1223
|
);
|
|
1224
|
+
server.prompt(
|
|
1225
|
+
"claim-rewards",
|
|
1226
|
+
"Check for pending protocol rewards across all lending positions and claim them \u2014 auto-converts to USDC.",
|
|
1227
|
+
async () => ({
|
|
1228
|
+
messages: [{
|
|
1229
|
+
role: "user",
|
|
1230
|
+
content: {
|
|
1231
|
+
type: "text",
|
|
1232
|
+
text: [
|
|
1233
|
+
"You are a rewards management assistant for a t2000 AI agent bank account.",
|
|
1234
|
+
"",
|
|
1235
|
+
"Help the user collect their pending protocol rewards. Follow this flow:",
|
|
1236
|
+
"",
|
|
1237
|
+
"Step 1 \u2014 Check what's claimable:",
|
|
1238
|
+
" - Check lending positions (t2000_positions)",
|
|
1239
|
+
' - Positions with "+rewards" tags have claimable protocol rewards',
|
|
1240
|
+
" - These are incentive tokens (like vSUI, sSUI, DEEP) earned from lending protocols",
|
|
1241
|
+
"",
|
|
1242
|
+
"Step 2 \u2014 Present findings:",
|
|
1243
|
+
" If rewards are available:",
|
|
1244
|
+
" Show which positions have rewards and from which protocols (NAVI, Suilend)",
|
|
1245
|
+
' Explain: "These are protocol incentive tokens that accrue on your lending positions"',
|
|
1246
|
+
' Ask: "Want me to claim and convert them to USDC?"',
|
|
1247
|
+
"",
|
|
1248
|
+
" If no rewards are claimable:",
|
|
1249
|
+
" Tell the user their rewards are still accruing and to check back later",
|
|
1250
|
+
" Show their current positions and APY so they know yield is being earned",
|
|
1251
|
+
"",
|
|
1252
|
+
"Step 3 \u2014 Execute claim:",
|
|
1253
|
+
" Run t2000_claim_rewards",
|
|
1254
|
+
" This claims from ALL protocols at once and auto-converts reward tokens to USDC",
|
|
1255
|
+
" Show the result: USDC received, source protocols, transaction link",
|
|
1256
|
+
" If received amount is small (< $0.01), explain that rewards accrue continuously and larger amounts build up over time",
|
|
1257
|
+
"",
|
|
1258
|
+
"Step 4 \u2014 Follow-up:",
|
|
1259
|
+
" Show updated balance after claiming",
|
|
1260
|
+
" Mention when to claim next (rewards accrue continuously, claiming weekly or monthly is typical)"
|
|
1261
|
+
].join("\n")
|
|
1262
|
+
}
|
|
1263
|
+
}]
|
|
1264
|
+
})
|
|
1265
|
+
);
|
|
1266
|
+
server.prompt(
|
|
1267
|
+
"safeguards",
|
|
1268
|
+
"Review account safety settings \u2014 per-transaction limits, daily caps, emergency lock, PIN-protected operations.",
|
|
1269
|
+
async () => ({
|
|
1270
|
+
messages: [{
|
|
1271
|
+
role: "user",
|
|
1272
|
+
content: {
|
|
1273
|
+
type: "text",
|
|
1274
|
+
text: [
|
|
1275
|
+
"You are a security advisor for a t2000 AI agent bank account.",
|
|
1276
|
+
"",
|
|
1277
|
+
"Help the user review and manage their account safeguards.",
|
|
1278
|
+
"",
|
|
1279
|
+
"Step 1 \u2014 Show current settings:",
|
|
1280
|
+
' - Get safeguard config (t2000_config action: "show")',
|
|
1281
|
+
" - Show: per-transaction limit, daily send limit, daily spent today, lock status",
|
|
1282
|
+
"",
|
|
1283
|
+
"Step 2 \u2014 Explain each safeguard:",
|
|
1284
|
+
"",
|
|
1285
|
+
" \u{1F6E1}\uFE0F SAFEGUARDS",
|
|
1286
|
+
" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
|
|
1287
|
+
"",
|
|
1288
|
+
" Per-transaction limit: $X",
|
|
1289
|
+
" Every send is checked against this cap. Prevents large unauthorized transfers.",
|
|
1290
|
+
"",
|
|
1291
|
+
" Daily send limit: $X",
|
|
1292
|
+
" Cumulative cap across all sends in a 24-hour window.",
|
|
1293
|
+
" Used today: $X of $X",
|
|
1294
|
+
"",
|
|
1295
|
+
" Emergency lock:",
|
|
1296
|
+
" Status: Unlocked / Locked",
|
|
1297
|
+
" When locked: ALL operations are frozen \u2014 sends, saves, investments, borrows",
|
|
1298
|
+
" Lock via: t2000_lock (any AI agent can lock)",
|
|
1299
|
+
" Unlock via: CLI only with PIN \u2014 no AI can unlock, by design",
|
|
1300
|
+
"",
|
|
1301
|
+
" PIN-protected operations:",
|
|
1302
|
+
" - Unlocking the agent",
|
|
1303
|
+
" - Exporting the private key",
|
|
1304
|
+
" - Modifying safeguard limits",
|
|
1305
|
+
"",
|
|
1306
|
+
"Step 3 \u2014 Recommendations:",
|
|
1307
|
+
" Based on their balance and activity, suggest appropriate limits",
|
|
1308
|
+
" If they have large balances, recommend tighter per-tx limits",
|
|
1309
|
+
' If they want to adjust: t2000_config action: "set", key: "maxPerTx" or "maxDailyUsd", value: X',
|
|
1310
|
+
" Always confirm before changing limits",
|
|
1311
|
+
"",
|
|
1312
|
+
"Step 4 \u2014 Emergency actions:",
|
|
1313
|
+
" If the user wants to lock: run t2000_lock immediately (no confirmation needed for locking)",
|
|
1314
|
+
" Explain that unlocking requires the CLI: t2000 unlock (with PIN)"
|
|
1315
|
+
].join("\n")
|
|
1316
|
+
}
|
|
1317
|
+
}]
|
|
1318
|
+
})
|
|
1319
|
+
);
|
|
1320
|
+
server.prompt(
|
|
1321
|
+
"quick-exchange",
|
|
1322
|
+
"Guided token swap \u2014 preview rate, slippage, and price impact before executing.",
|
|
1323
|
+
{
|
|
1324
|
+
from: z.string().optional().describe("Asset to sell (e.g. USDC, SUI)"),
|
|
1325
|
+
to: z.string().optional().describe("Asset to buy (e.g. SUI, USDC)"),
|
|
1326
|
+
amount: z.number().optional().describe("Amount in source asset units")
|
|
1327
|
+
},
|
|
1328
|
+
async ({ from, to, amount }) => {
|
|
1329
|
+
const context = [
|
|
1330
|
+
from ? `From: ${from}` : "",
|
|
1331
|
+
to ? `To: ${to}` : "",
|
|
1332
|
+
amount ? `Amount: ${amount}` : ""
|
|
1333
|
+
].filter(Boolean).join("\n");
|
|
1334
|
+
return {
|
|
1335
|
+
messages: [{
|
|
1336
|
+
role: "user",
|
|
1337
|
+
content: {
|
|
1338
|
+
type: "text",
|
|
1339
|
+
text: [
|
|
1340
|
+
"You are an exchange assistant for a t2000 AI agent bank account.",
|
|
1341
|
+
"",
|
|
1342
|
+
context ? `Context:
|
|
1343
|
+
${context}
|
|
1344
|
+
` : "",
|
|
1345
|
+
"Help the user swap tokens. Follow this flow:",
|
|
1346
|
+
"",
|
|
1347
|
+
"Step 1 \u2014 Gather details:",
|
|
1348
|
+
" If from, to, or amount is missing, ask the user",
|
|
1349
|
+
" Check balance (t2000_balance) to confirm they have enough",
|
|
1350
|
+
" Available pairs: any combination of USDC, SUI, BTC, ETH, GOLD, USDT, USDe, USDsui",
|
|
1351
|
+
"",
|
|
1352
|
+
"Step 2 \u2014 Preview the swap:",
|
|
1353
|
+
" Run t2000_exchange with dryRun: true",
|
|
1354
|
+
" Show:",
|
|
1355
|
+
" Input: X FROM \u2192 Expected output: Y TO",
|
|
1356
|
+
" Rate: 1 FROM = Z TO",
|
|
1357
|
+
" Price impact: X%",
|
|
1358
|
+
" Slippage: X%",
|
|
1359
|
+
" Fee: $X",
|
|
1360
|
+
"",
|
|
1361
|
+
"Step 3 \u2014 Ask for confirmation:",
|
|
1362
|
+
' "Ready to execute this swap?"',
|
|
1363
|
+
" If price impact > 1%, warn the user about the impact",
|
|
1364
|
+
"",
|
|
1365
|
+
"Step 4 \u2014 Execute:",
|
|
1366
|
+
" Run t2000_exchange with dryRun: false",
|
|
1367
|
+
" Show: amount received, rate, transaction link",
|
|
1368
|
+
" Show updated balance"
|
|
1369
|
+
].join("\n")
|
|
1370
|
+
}
|
|
1371
|
+
}]
|
|
1372
|
+
};
|
|
1373
|
+
}
|
|
1374
|
+
);
|
|
1212
1375
|
}
|
|
1213
1376
|
|
|
1214
1377
|
// src/index.ts
|