@t2000/mcp 0.20.12 → 0.20.14
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 +16 -6
- package/dist/bin.js +614 -287
- package/dist/bin.js.map +1 -1
- package/dist/index.js +614 -287
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -56,9 +56,45 @@ function errorResult(err) {
|
|
|
56
56
|
|
|
57
57
|
// src/tools/read.ts
|
|
58
58
|
function registerReadTools(server, agent) {
|
|
59
|
+
server.tool(
|
|
60
|
+
"t2000_overview",
|
|
61
|
+
"Complete account snapshot in ONE call \u2014 balance, savings positions, investment portfolio, health factor, yield earnings, fund status, and pending rewards. Use this for morning briefings, general account questions, or any time you need the full picture. Prefer this over calling t2000_balance + t2000_positions + t2000_portfolio + t2000_health + t2000_earnings individually.",
|
|
62
|
+
{},
|
|
63
|
+
async () => {
|
|
64
|
+
try {
|
|
65
|
+
const [balance, positions, portfolio, health, earnings, fundStatus, pendingRewards] = await Promise.allSettled([
|
|
66
|
+
agent.balance(),
|
|
67
|
+
agent.positions(),
|
|
68
|
+
agent.getPortfolio(),
|
|
69
|
+
agent.healthFactor(),
|
|
70
|
+
agent.earnings(),
|
|
71
|
+
agent.fundStatus(),
|
|
72
|
+
agent.getPendingRewards()
|
|
73
|
+
]);
|
|
74
|
+
const result = {
|
|
75
|
+
balance: balance.status === "fulfilled" ? balance.value : null,
|
|
76
|
+
positions: positions.status === "fulfilled" ? positions.value : null,
|
|
77
|
+
portfolio: portfolio.status === "fulfilled" ? {
|
|
78
|
+
...portfolio.value,
|
|
79
|
+
positions: portfolio.value.positions.map((p) => ({
|
|
80
|
+
...p,
|
|
81
|
+
...p.currentPrice === 0 && p.totalAmount > 0 ? { note: "price unavailable" } : {}
|
|
82
|
+
}))
|
|
83
|
+
} : null,
|
|
84
|
+
health: health.status === "fulfilled" ? health.value : null,
|
|
85
|
+
earnings: earnings.status === "fulfilled" ? earnings.value : null,
|
|
86
|
+
fundStatus: fundStatus.status === "fulfilled" ? fundStatus.value : null,
|
|
87
|
+
pendingRewards: pendingRewards.status === "fulfilled" ? pendingRewards.value : null
|
|
88
|
+
};
|
|
89
|
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
|
90
|
+
} catch (err) {
|
|
91
|
+
return errorResult(err);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
);
|
|
59
95
|
server.tool(
|
|
60
96
|
"t2000_balance",
|
|
61
|
-
"Get agent's current balance \u2014 available (checking), savings, credit (debt), gas reserve, and net total. All values in USD.",
|
|
97
|
+
"Get agent's current balance \u2014 available (checking), savings, credit (debt), gas reserve, and net total. All values in USD. For a full account snapshot, prefer t2000_overview instead.",
|
|
62
98
|
{},
|
|
63
99
|
async () => {
|
|
64
100
|
try {
|
|
@@ -71,7 +107,7 @@ function registerReadTools(server, agent) {
|
|
|
71
107
|
);
|
|
72
108
|
server.tool(
|
|
73
109
|
"t2000_address",
|
|
74
|
-
"Get the agent's Sui wallet address.",
|
|
110
|
+
"Get the agent's Sui wallet address for receiving funds.",
|
|
75
111
|
{},
|
|
76
112
|
async () => {
|
|
77
113
|
try {
|
|
@@ -84,7 +120,7 @@ function registerReadTools(server, agent) {
|
|
|
84
120
|
);
|
|
85
121
|
server.tool(
|
|
86
122
|
"t2000_positions",
|
|
87
|
-
"View current lending positions across protocols (NAVI, Suilend) \u2014 deposits, borrows, APYs.",
|
|
123
|
+
"View current lending positions across protocols (NAVI, Suilend) \u2014 deposits, borrows, APYs. For a full account snapshot, prefer t2000_overview instead.",
|
|
88
124
|
{},
|
|
89
125
|
async () => {
|
|
90
126
|
try {
|
|
@@ -97,7 +133,7 @@ function registerReadTools(server, agent) {
|
|
|
97
133
|
);
|
|
98
134
|
server.tool(
|
|
99
135
|
"t2000_rates",
|
|
100
|
-
"Get best available interest rates per asset across all lending protocols.",
|
|
136
|
+
"Get best available interest rates per asset across all lending protocols. Use alongside t2000_positions to compare current vs best rates. Use with t2000_rebalance (dryRun: true) to preview optimization.",
|
|
101
137
|
{},
|
|
102
138
|
async () => {
|
|
103
139
|
try {
|
|
@@ -110,7 +146,7 @@ function registerReadTools(server, agent) {
|
|
|
110
146
|
);
|
|
111
147
|
server.tool(
|
|
112
148
|
"t2000_health",
|
|
113
|
-
"Check the agent's health factor \u2014 measures how safe current borrows are. Below 1.0 risks liquidation.",
|
|
149
|
+
"Check the agent's health factor \u2014 measures how safe current borrows are. Below 1.0 risks liquidation. Also shows supplied, borrowed, max borrow, and liquidation threshold.",
|
|
114
150
|
{},
|
|
115
151
|
async () => {
|
|
116
152
|
try {
|
|
@@ -123,7 +159,7 @@ function registerReadTools(server, agent) {
|
|
|
123
159
|
);
|
|
124
160
|
server.tool(
|
|
125
161
|
"t2000_history",
|
|
126
|
-
"View recent transactions (sends, saves, borrows, swaps,
|
|
162
|
+
"View recent transactions (sends, saves, borrows, swaps, investments). Use for activity summaries and weekly recaps.",
|
|
127
163
|
{ limit: z.number().optional().describe("Number of transactions to return (default: 20)") },
|
|
128
164
|
async ({ limit }) => {
|
|
129
165
|
try {
|
|
@@ -136,7 +172,7 @@ function registerReadTools(server, agent) {
|
|
|
136
172
|
);
|
|
137
173
|
server.tool(
|
|
138
174
|
"t2000_earnings",
|
|
139
|
-
"View yield earnings from savings positions \u2014 total earned, daily rate, current APY.",
|
|
175
|
+
"View yield earnings from savings positions \u2014 total earned, daily rate, current APY. For a full account snapshot, prefer t2000_overview instead.",
|
|
140
176
|
{},
|
|
141
177
|
async () => {
|
|
142
178
|
try {
|
|
@@ -147,9 +183,100 @@ function registerReadTools(server, agent) {
|
|
|
147
183
|
}
|
|
148
184
|
}
|
|
149
185
|
);
|
|
186
|
+
server.tool(
|
|
187
|
+
"t2000_fund_status",
|
|
188
|
+
"Detailed savings analytics \u2014 total supplied, current APY, earned today, earned all-time, projected monthly yield. More detailed than t2000_earnings.",
|
|
189
|
+
{},
|
|
190
|
+
async () => {
|
|
191
|
+
try {
|
|
192
|
+
const result = await agent.fundStatus();
|
|
193
|
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
|
194
|
+
} catch (err) {
|
|
195
|
+
return errorResult(err);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
);
|
|
199
|
+
server.tool(
|
|
200
|
+
"t2000_pending_rewards",
|
|
201
|
+
"Check pending protocol rewards from lending positions WITHOUT claiming them. Shows claimable reward tokens per protocol and asset. Use t2000_claim_rewards to actually collect and convert to USDC.",
|
|
202
|
+
{},
|
|
203
|
+
async () => {
|
|
204
|
+
try {
|
|
205
|
+
const result = await agent.getPendingRewards();
|
|
206
|
+
return { content: [{ type: "text", text: JSON.stringify({ rewards: result, count: result.length }) }] };
|
|
207
|
+
} catch (err) {
|
|
208
|
+
return errorResult(err);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
);
|
|
212
|
+
server.tool(
|
|
213
|
+
"t2000_deposit_info",
|
|
214
|
+
"Get deposit instructions \u2014 wallet address, supported networks, accepted assets. Use when the user asks how to fund or top up their account.",
|
|
215
|
+
{},
|
|
216
|
+
async () => {
|
|
217
|
+
try {
|
|
218
|
+
const result = await agent.deposit();
|
|
219
|
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
|
220
|
+
} catch (err) {
|
|
221
|
+
return errorResult(err);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
);
|
|
225
|
+
server.tool(
|
|
226
|
+
"t2000_all_rates",
|
|
227
|
+
'Compare interest rates across ALL protocols side-by-side for every asset. Shows NAVI vs Suilend rates per asset. Use when the user asks "am I getting the best rate?" or wants to compare protocols.',
|
|
228
|
+
{},
|
|
229
|
+
async () => {
|
|
230
|
+
try {
|
|
231
|
+
const result = await agent.allRatesAcrossAssets();
|
|
232
|
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
|
233
|
+
} catch (err) {
|
|
234
|
+
return errorResult(err);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
);
|
|
238
|
+
server.tool(
|
|
239
|
+
"t2000_sentinel_list",
|
|
240
|
+
"List active Sui Sentinels \u2014 AI agents with prize pools you can attack. Shows name, attack fee, prize pool, and attack count. Use this for bounty hunting.",
|
|
241
|
+
{},
|
|
242
|
+
async () => {
|
|
243
|
+
try {
|
|
244
|
+
const sentinels = await agent.sentinelList();
|
|
245
|
+
const serializable = sentinels.map((s) => ({
|
|
246
|
+
...s,
|
|
247
|
+
attackFee: s.attackFee.toString(),
|
|
248
|
+
attackFeeSui: Number(s.attackFee) / 1e9,
|
|
249
|
+
prizePool: s.prizePool.toString(),
|
|
250
|
+
prizePoolSui: Number(s.prizePool) / 1e9
|
|
251
|
+
}));
|
|
252
|
+
return { content: [{ type: "text", text: JSON.stringify(serializable) }] };
|
|
253
|
+
} catch (err) {
|
|
254
|
+
return errorResult(err);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
);
|
|
258
|
+
server.tool(
|
|
259
|
+
"t2000_sentinel_info",
|
|
260
|
+
"Get detailed info about a specific Sui Sentinel \u2014 model, system prompt, prize pool, attack history. Use the sentinel ID or object ID from t2000_sentinel_list.",
|
|
261
|
+
{ id: z.string().describe("Sentinel agent ID or object ID") },
|
|
262
|
+
async ({ id }) => {
|
|
263
|
+
try {
|
|
264
|
+
const s = await agent.sentinelInfo(id);
|
|
265
|
+
return { content: [{ type: "text", text: JSON.stringify({
|
|
266
|
+
...s,
|
|
267
|
+
attackFee: s.attackFee.toString(),
|
|
268
|
+
attackFeeSui: Number(s.attackFee) / 1e9,
|
|
269
|
+
prizePool: s.prizePool.toString(),
|
|
270
|
+
prizePoolSui: Number(s.prizePool) / 1e9
|
|
271
|
+
}) }] };
|
|
272
|
+
} catch (err) {
|
|
273
|
+
return errorResult(err);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
);
|
|
150
277
|
server.tool(
|
|
151
278
|
"t2000_contacts",
|
|
152
|
-
"List saved contacts (name \u2192 address mappings). Use contact names with t2000_send instead of raw addresses.",
|
|
279
|
+
"List saved contacts (name \u2192 address mappings). Use contact names with t2000_send instead of raw addresses. Use t2000_contact_add to save new contacts.",
|
|
153
280
|
{},
|
|
154
281
|
async () => {
|
|
155
282
|
try {
|
|
@@ -162,7 +289,7 @@ function registerReadTools(server, agent) {
|
|
|
162
289
|
);
|
|
163
290
|
server.tool(
|
|
164
291
|
"t2000_portfolio",
|
|
165
|
-
"Show investment portfolio \u2014 positions, cost basis, current value, unrealized/realized P&L.",
|
|
292
|
+
"Show investment portfolio \u2014 positions, cost basis, current value, unrealized/realized P&L, strategy groupings. For a full account snapshot, prefer t2000_overview instead.",
|
|
166
293
|
{},
|
|
167
294
|
async () => {
|
|
168
295
|
try {
|
|
@@ -634,6 +761,55 @@ function registerWriteTools(server, agent) {
|
|
|
634
761
|
}
|
|
635
762
|
}
|
|
636
763
|
);
|
|
764
|
+
server.tool(
|
|
765
|
+
"t2000_sentinel_attack",
|
|
766
|
+
"Attack a Sui Sentinel with a prompt to try to breach its defenses and win the prize pool. Costs SUI (the attack fee). Use t2000_sentinel_list to find targets first.",
|
|
767
|
+
{
|
|
768
|
+
id: z.string().describe("Sentinel agent ID or object ID to attack"),
|
|
769
|
+
prompt: z.string().describe("Your attack prompt \u2014 try to make the AI do something its system prompt forbids"),
|
|
770
|
+
fee: z.number().optional().describe("Override attack fee in SUI (default: sentinel's listed fee)")
|
|
771
|
+
},
|
|
772
|
+
async ({ id, prompt, fee }) => {
|
|
773
|
+
try {
|
|
774
|
+
const feeMist = fee ? BigInt(Math.round(fee * 1e9)) : void 0;
|
|
775
|
+
const result = await mutex.run(() => agent.sentinelAttack(id, prompt, feeMist));
|
|
776
|
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
|
777
|
+
} catch (err) {
|
|
778
|
+
return errorResult(err);
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
);
|
|
782
|
+
server.tool(
|
|
783
|
+
"t2000_contact_add",
|
|
784
|
+
'Save a contact name \u2192 Sui address mapping. After saving, use the name with t2000_send instead of pasting addresses. Example: save "Tom" as 0x1234... then send to "Tom".',
|
|
785
|
+
{
|
|
786
|
+
name: z.string().describe('Contact name (e.g. "Tom", "Alice")'),
|
|
787
|
+
address: z.string().describe("Sui wallet address (0x...)")
|
|
788
|
+
},
|
|
789
|
+
async ({ name, address }) => {
|
|
790
|
+
try {
|
|
791
|
+
const result = agent.contacts.add(name, address);
|
|
792
|
+
return { content: [{ type: "text", text: JSON.stringify({ success: true, name, address, ...result }) }] };
|
|
793
|
+
} catch (err) {
|
|
794
|
+
return errorResult(err);
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
);
|
|
798
|
+
server.tool(
|
|
799
|
+
"t2000_contact_remove",
|
|
800
|
+
"Remove a saved contact by name.",
|
|
801
|
+
{
|
|
802
|
+
name: z.string().describe("Contact name to remove")
|
|
803
|
+
},
|
|
804
|
+
async ({ name }) => {
|
|
805
|
+
try {
|
|
806
|
+
const removed = agent.contacts.remove(name);
|
|
807
|
+
return { content: [{ type: "text", text: JSON.stringify({ success: removed, name }) }] };
|
|
808
|
+
} catch (err) {
|
|
809
|
+
return errorResult(err);
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
);
|
|
637
813
|
}
|
|
638
814
|
function registerSafetyTools(server, agent) {
|
|
639
815
|
server.tool(
|
|
@@ -716,20 +892,35 @@ function registerPrompts(server) {
|
|
|
716
892
|
content: {
|
|
717
893
|
type: "text",
|
|
718
894
|
text: [
|
|
719
|
-
"You are a financial assistant for a t2000 AI agent bank account.",
|
|
720
|
-
"",
|
|
721
|
-
"
|
|
722
|
-
"
|
|
723
|
-
"
|
|
724
|
-
"
|
|
725
|
-
"
|
|
726
|
-
"
|
|
727
|
-
"
|
|
728
|
-
"
|
|
729
|
-
"",
|
|
730
|
-
"
|
|
731
|
-
|
|
732
|
-
"
|
|
895
|
+
"You are a financial assistant for a t2000 AI agent bank account on Sui.",
|
|
896
|
+
"",
|
|
897
|
+
"IMPORTANT: Call t2000_overview FIRST \u2014 it returns everything (balance, positions, portfolio, health, earnings, fund status, pending rewards) in one call.",
|
|
898
|
+
"Then call t2000_rates for rate comparison across protocols.",
|
|
899
|
+
"",
|
|
900
|
+
"Present a comprehensive financial report:",
|
|
901
|
+
"",
|
|
902
|
+
"\u{1F4CA} FINANCIAL REPORT",
|
|
903
|
+
"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
|
|
904
|
+
"",
|
|
905
|
+
"\u{1F4B0} Accounts",
|
|
906
|
+
" Checking / Savings / Credit / Investment with totals",
|
|
907
|
+
" Net worth",
|
|
908
|
+
"",
|
|
909
|
+
"\u{1F4C8} Positions",
|
|
910
|
+
" Each savings position: protocol, asset, amount, APY",
|
|
911
|
+
" Each investment position: asset, amount, cost basis, current value, P&L",
|
|
912
|
+
"",
|
|
913
|
+
"\u{1F4B8} Yield",
|
|
914
|
+
" Current APY, daily/monthly/projected earnings",
|
|
915
|
+
" Comparison to best available rates",
|
|
916
|
+
"",
|
|
917
|
+
"\u{1F6E1}\uFE0F Risk",
|
|
918
|
+
" Health factor status",
|
|
919
|
+
" Concentration analysis",
|
|
920
|
+
"",
|
|
921
|
+
"\u{1F4CB} Recommendations (max 4)",
|
|
922
|
+
" Actionable items based on data",
|
|
923
|
+
" Include: idle funds, rate optimization, reward claiming, debt repayment"
|
|
733
924
|
].join("\n")
|
|
734
925
|
}
|
|
735
926
|
}]
|
|
@@ -744,17 +935,33 @@ function registerPrompts(server) {
|
|
|
744
935
|
content: {
|
|
745
936
|
type: "text",
|
|
746
937
|
text: [
|
|
747
|
-
"You are a yield optimization assistant for a t2000 AI agent bank account.",
|
|
938
|
+
"You are a yield optimization assistant for a t2000 AI agent bank account on Sui.",
|
|
939
|
+
"",
|
|
940
|
+
"IMPORTANT: Call these tools in parallel:",
|
|
941
|
+
" 1. t2000_overview \u2014 full account state including positions and pending rewards",
|
|
942
|
+
" 2. t2000_rates \u2014 all available rates across protocols",
|
|
943
|
+
" 3. t2000_rebalance (dryRun: true) \u2014 preview savings optimization",
|
|
944
|
+
"",
|
|
945
|
+
"Present a structured yield analysis:",
|
|
946
|
+
"",
|
|
947
|
+
"\u{1F4CA} YIELD ANALYSIS",
|
|
948
|
+
"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
|
|
748
949
|
"",
|
|
749
|
-
"
|
|
750
|
-
"
|
|
751
|
-
"
|
|
752
|
-
"
|
|
753
|
-
"4. Run a dry-run investment rebalance (t2000_invest_rebalance with dryRun: true) \u2014 checks if earning positions on SUI, BTC, ETH, GOLD could move to a higher-rate protocol",
|
|
950
|
+
" Current [asset] on [protocol] \xB7 X.XX% APY",
|
|
951
|
+
" Best [asset] on [protocol] \xB7 X.XX% APY",
|
|
952
|
+
" APY gain +X.XX%",
|
|
953
|
+
" Break-even X days",
|
|
754
954
|
"",
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
"
|
|
955
|
+
'If a better rate exists: "Better rate available. Want me to rebalance?"',
|
|
956
|
+
`If already optimal: "You're at the best available rate."`,
|
|
957
|
+
"",
|
|
958
|
+
"Also check:",
|
|
959
|
+
" - Idle checking funds that could be earning yield",
|
|
960
|
+
" - Investment assets not in lending (could use t2000_invest earn)",
|
|
961
|
+
" - Claimable protocol rewards (suggest t2000_claim_rewards)",
|
|
962
|
+
"",
|
|
963
|
+
"On user confirmation, execute t2000_rebalance (dryRun: false).",
|
|
964
|
+
"After execution, show: new APY, amount moved, transaction link."
|
|
758
965
|
].join("\n")
|
|
759
966
|
}
|
|
760
967
|
}]
|
|
@@ -836,22 +1043,18 @@ ${context}
|
|
|
836
1043
|
content: {
|
|
837
1044
|
type: "text",
|
|
838
1045
|
text: [
|
|
839
|
-
"You are a savings advisor for a t2000 AI agent bank account.",
|
|
840
|
-
"",
|
|
841
|
-
"
|
|
842
|
-
"
|
|
843
|
-
"
|
|
844
|
-
"
|
|
845
|
-
"",
|
|
846
|
-
"
|
|
847
|
-
"-
|
|
848
|
-
"-
|
|
849
|
-
"
|
|
850
|
-
"
|
|
851
|
-
"- Whether investing in SUI or other assets could complement their savings strategy",
|
|
852
|
-
'- Note: investment assets (SUI, ETH) can also earn yield via t2000_invest action: "earn"',
|
|
853
|
-
"",
|
|
854
|
-
"If they want to proceed, use t2000_save to deposit. Always preview first."
|
|
1046
|
+
"You are a savings advisor for a t2000 AI agent bank account on Sui.",
|
|
1047
|
+
"",
|
|
1048
|
+
"IMPORTANT: Call t2000_overview and t2000_all_rates in parallel to get the full picture.",
|
|
1049
|
+
"",
|
|
1050
|
+
"Analyze and recommend:",
|
|
1051
|
+
" - How much idle checking can move to savings (keep ~$5 buffer for gas)",
|
|
1052
|
+
" - Which protocol + asset offers the best yield (compare NAVI vs Suilend, USDC vs USDe etc.)",
|
|
1053
|
+
" - Expected monthly/annual yield on the recommended amount",
|
|
1054
|
+
" - If existing savings should rebalance (t2000_rebalance with dryRun: true)",
|
|
1055
|
+
" - Whether investment assets could earn yield via t2000_invest earn",
|
|
1056
|
+
"",
|
|
1057
|
+
"If they want to proceed, use t2000_save to deposit."
|
|
855
1058
|
].join("\n")
|
|
856
1059
|
}
|
|
857
1060
|
}]
|
|
@@ -866,28 +1069,20 @@ ${context}
|
|
|
866
1069
|
content: {
|
|
867
1070
|
type: "text",
|
|
868
1071
|
text: [
|
|
869
|
-
"You are an investment advisor for a t2000 AI agent bank account.",
|
|
870
|
-
"",
|
|
871
|
-
|
|
872
|
-
"
|
|
873
|
-
"
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
"
|
|
877
|
-
"",
|
|
878
|
-
"
|
|
879
|
-
"-
|
|
880
|
-
"
|
|
881
|
-
"
|
|
882
|
-
|
|
883
|
-
'- Whether invested assets should earn yield (t2000_invest action: "earn")',
|
|
884
|
-
"- If assets are already earning, check for better rates (t2000_invest_rebalance with dryRun: true) \u2014 moves earning positions to higher-APY protocols automatically",
|
|
885
|
-
"- Risk assessment \u2014 concentration, unrealized losses, strategy drift",
|
|
886
|
-
"",
|
|
887
|
-
"For strategies: use t2000_strategy with dryRun: true to preview before buying.",
|
|
888
|
-
'For DCA: use t2000_auto_invest action: "setup" to create recurring buys.',
|
|
889
|
-
"For direct investments: use t2000_invest with dryRun: true to preview.",
|
|
890
|
-
"For yield optimization: use t2000_invest_rebalance with dryRun: true to preview earning moves."
|
|
1072
|
+
"You are an investment advisor for a t2000 AI agent bank account on Sui.",
|
|
1073
|
+
"",
|
|
1074
|
+
'IMPORTANT: Call t2000_overview FIRST, then t2000_strategy (action: "list") and t2000_auto_invest (action: "status") in parallel.',
|
|
1075
|
+
"",
|
|
1076
|
+
"Analyze and recommend:",
|
|
1077
|
+
" - Portfolio allocation (checking vs savings vs investment)",
|
|
1078
|
+
" - Best strategy for their profile (bluechip, all-weather, layer1, sui-heavy, safe-haven)",
|
|
1079
|
+
" - If strategy positions are drifting from target weights, suggest rebalancing",
|
|
1080
|
+
" - If no DCA schedule exists, recommend setting one up",
|
|
1081
|
+
" - Whether invested assets should earn yield (t2000_invest earn)",
|
|
1082
|
+
" - Risk: concentration, unrealized losses, strategy drift",
|
|
1083
|
+
"",
|
|
1084
|
+
"For strategies: use t2000_strategy with dryRun: true to preview.",
|
|
1085
|
+
'For DCA: use t2000_auto_invest action: "setup" to create recurring buys.'
|
|
891
1086
|
].join("\n")
|
|
892
1087
|
}
|
|
893
1088
|
}]
|
|
@@ -902,48 +1097,37 @@ ${context}
|
|
|
902
1097
|
content: {
|
|
903
1098
|
type: "text",
|
|
904
1099
|
text: [
|
|
905
|
-
"You are a personal financial briefing assistant for a t2000 AI agent bank account.",
|
|
906
|
-
"",
|
|
907
|
-
"Deliver a concise morning briefing. Gather all data first, then present a single unified report.",
|
|
1100
|
+
"You are a personal financial briefing assistant for a t2000 AI agent bank account on Sui.",
|
|
908
1101
|
"",
|
|
909
|
-
"
|
|
910
|
-
"
|
|
911
|
-
"
|
|
912
|
-
"3. Investment portfolio \u2014 positions, P&L movement (t2000_portfolio)",
|
|
913
|
-
"4. Health factor \u2014 any borrow risk (t2000_health)",
|
|
914
|
-
'5. Pending DCA runs (t2000_auto_invest action: "status")',
|
|
915
|
-
"6. Recent transactions since yesterday (t2000_history with limit: 10)",
|
|
916
|
-
"7. Lending positions (t2000_positions) \u2014 check for +rewards tags indicating claimable rewards",
|
|
917
|
-
"8. Investment rebalance opportunities (t2000_invest_rebalance with dryRun: true) \u2014 any earning positions on sub-optimal protocols",
|
|
1102
|
+
"IMPORTANT: Call t2000_overview FIRST \u2014 it returns balance, positions, portfolio, health, earnings, fund status, and pending rewards in one call.",
|
|
1103
|
+
'Then call t2000_auto_invest (action: "status") to check for pending DCA runs.',
|
|
1104
|
+
"Optionally call t2000_rebalance (dryRun: true) to check yield optimization opportunities.",
|
|
918
1105
|
"",
|
|
919
|
-
"Present
|
|
1106
|
+
"Present everything as a single structured briefing. NEVER ask follow-up questions before presenting the briefing.",
|
|
920
1107
|
"",
|
|
921
1108
|
"\u2600\uFE0F MORNING BRIEFING",
|
|
922
1109
|
"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
|
|
923
1110
|
"",
|
|
924
|
-
"
|
|
925
|
-
" Checking
|
|
926
|
-
"
|
|
927
|
-
|
|
928
|
-
"",
|
|
929
|
-
"
|
|
930
|
-
"
|
|
931
|
-
"
|
|
932
|
-
"",
|
|
933
|
-
"
|
|
934
|
-
"
|
|
935
|
-
"
|
|
936
|
-
"",
|
|
937
|
-
"\
|
|
938
|
-
"
|
|
939
|
-
"",
|
|
940
|
-
"\
|
|
941
|
-
"
|
|
942
|
-
|
|
943
|
-
"
|
|
944
|
-
" If investment rebalance shows opportunities, include as an action item",
|
|
945
|
-
"",
|
|
946
|
-
"Keep it scannable. No fluff. Numbers first, narrative second."
|
|
1111
|
+
"Show a compact account summary table:",
|
|
1112
|
+
" Checking $XX.XX",
|
|
1113
|
+
" Savings $XX.XX \xB7 X.XX% APY",
|
|
1114
|
+
" Credit -$XX.XX (only if borrowed)",
|
|
1115
|
+
" Investment $XX.XX \xB7 +X.X% (only if positions exist)",
|
|
1116
|
+
" Net Worth $XX.XX",
|
|
1117
|
+
"",
|
|
1118
|
+
"If there are savings positions, show daily yield earned.",
|
|
1119
|
+
"If there are investment positions, show each asset with P&L.",
|
|
1120
|
+
"If pending rewards exist, mention them.",
|
|
1121
|
+
"",
|
|
1122
|
+
"\u{1F4CB} Action Items (max 4, only if applicable):",
|
|
1123
|
+
" - Idle funds in checking \u2192 suggest saving or investing",
|
|
1124
|
+
" - Outstanding debt \u2192 suggest repaying to stop interest",
|
|
1125
|
+
" - Pending DCA run \u2192 suggest executing",
|
|
1126
|
+
" - Better yield available \u2192 suggest rebalancing",
|
|
1127
|
+
" - Claimable rewards \u2192 suggest claiming",
|
|
1128
|
+
" - Low health factor \u2192 warn about liquidation risk",
|
|
1129
|
+
"",
|
|
1130
|
+
"If everything is optimized, say so. Keep it scannable \u2014 numbers first, narrative second."
|
|
947
1131
|
].join("\n")
|
|
948
1132
|
}
|
|
949
1133
|
}]
|
|
@@ -961,42 +1145,43 @@ ${context}
|
|
|
961
1145
|
content: {
|
|
962
1146
|
type: "text",
|
|
963
1147
|
text: [
|
|
964
|
-
"You are a financial scenario planner for a t2000 AI agent bank account.",
|
|
1148
|
+
"You are a financial scenario planner for a t2000 AI agent bank account on Sui.",
|
|
965
1149
|
"",
|
|
966
1150
|
scenario ? `The user wants to evaluate this scenario: "${scenario}"` : "The user wants to explore a hypothetical financial scenario. Ask them what they're considering.",
|
|
967
1151
|
"",
|
|
968
|
-
"
|
|
969
|
-
"
|
|
970
|
-
"
|
|
971
|
-
"
|
|
972
|
-
"
|
|
1152
|
+
"IMPORTANT: Call t2000_overview FIRST to get the full current state (balance, positions, portfolio, health).",
|
|
1153
|
+
"Then preview the specific action with dryRun: true.",
|
|
1154
|
+
"",
|
|
1155
|
+
'For INVESTMENT scenarios ("invest $X in Y" or "buy $X of strategy"):',
|
|
1156
|
+
` - Call t2000_strategy (action: "list") to get allocations if it's a strategy`,
|
|
1157
|
+
" - Call t2000_invest or t2000_strategy with dryRun: true to preview",
|
|
1158
|
+
" - If the amount exceeds available checking, calculate what they'd need to withdraw from savings",
|
|
1159
|
+
"",
|
|
1160
|
+
'For SAVINGS scenarios ("save $X" or "withdraw $X"):',
|
|
1161
|
+
" - Show impact on yield and health factor",
|
|
973
1162
|
"",
|
|
974
|
-
|
|
1163
|
+
'For BORROW scenarios ("borrow $X"):',
|
|
1164
|
+
" - Show new health factor and interest cost",
|
|
975
1165
|
"",
|
|
976
|
-
'
|
|
977
|
-
" -
|
|
978
|
-
" - Show: checking balance after, new portfolio allocation %, concentration risk",
|
|
979
|
-
" - If the asset can earn yield, show projected annual yield",
|
|
980
|
-
' - Compare: "keeping $X in savings at Y% vs investing at historical volatility"',
|
|
1166
|
+
'For EXCHANGE scenarios ("swap $X A to B"):',
|
|
1167
|
+
" - Call t2000_exchange with dryRun: true",
|
|
981
1168
|
"",
|
|
982
|
-
|
|
983
|
-
" - Show: new savings balance, new yield rate, impact on available spending",
|
|
984
|
-
" - If withdrawing: impact on health factor if they have borrows",
|
|
1169
|
+
"ALWAYS present results as a BEFORE \u2192 AFTER comparison table:",
|
|
985
1170
|
"",
|
|
986
|
-
|
|
987
|
-
"
|
|
988
|
-
" - Compare: cost of borrowing vs withdrawing from savings",
|
|
1171
|
+
"\u{1F4CA} SCENARIO: [description]",
|
|
1172
|
+
" [strategy allocation breakdown if applicable]",
|
|
989
1173
|
"",
|
|
990
|
-
|
|
991
|
-
"
|
|
992
|
-
"
|
|
1174
|
+
" Before After",
|
|
1175
|
+
" Checking $XX.XX $XX.XX",
|
|
1176
|
+
" Savings $XX.XX $XX.XX",
|
|
1177
|
+
" Investment $XX.XX $XX.XX",
|
|
993
1178
|
"",
|
|
994
|
-
"
|
|
995
|
-
"
|
|
996
|
-
"
|
|
997
|
-
"
|
|
1179
|
+
"Then add a smart recommendation:",
|
|
1180
|
+
" - If amount exceeds checking, suggest a smaller amount that keeps savings intact",
|
|
1181
|
+
" - If it would drain checking below $5, warn about gas needs",
|
|
1182
|
+
" - If the asset can earn yield after buying, mention it",
|
|
998
1183
|
"",
|
|
999
|
-
'
|
|
1184
|
+
'End with: "Want me to go ahead?" \u2014 ready to execute on confirmation.'
|
|
1000
1185
|
].join("\n")
|
|
1001
1186
|
}
|
|
1002
1187
|
}]
|
|
@@ -1006,52 +1191,38 @@ ${context}
|
|
|
1006
1191
|
"sweep",
|
|
1007
1192
|
"Find idle funds in checking and optimally distribute across savings and investments for maximum yield.",
|
|
1008
1193
|
{
|
|
1009
|
-
keepBuffer: z.number().optional().describe("Dollar amount to keep in checking as spending buffer (default: $
|
|
1194
|
+
keepBuffer: z.number().optional().describe("Dollar amount to keep in checking as spending buffer (default: $5)")
|
|
1010
1195
|
},
|
|
1011
1196
|
async ({ keepBuffer }) => {
|
|
1012
|
-
const buffer = keepBuffer ??
|
|
1197
|
+
const buffer = keepBuffer ?? 5;
|
|
1013
1198
|
return {
|
|
1014
1199
|
messages: [{
|
|
1015
1200
|
role: "user",
|
|
1016
1201
|
content: {
|
|
1017
1202
|
type: "text",
|
|
1018
1203
|
text: [
|
|
1019
|
-
"You are a smart money routing assistant for a t2000 AI agent bank account.",
|
|
1204
|
+
"You are a smart money routing assistant for a t2000 AI agent bank account on Sui.",
|
|
1020
1205
|
"",
|
|
1021
|
-
`
|
|
1206
|
+
`IMPORTANT: Call t2000_overview and t2000_all_rates in parallel. Keep $${buffer} in checking as buffer.`,
|
|
1022
1207
|
"",
|
|
1023
|
-
|
|
1024
|
-
"
|
|
1025
|
-
" - Check positions (t2000_positions) \u2014 what's already earning?",
|
|
1026
|
-
" - Check rates (t2000_rates) \u2014 where are the best yields?",
|
|
1027
|
-
" - Check portfolio (t2000_portfolio) \u2014 any uninvested assets not earning yield?",
|
|
1208
|
+
`Calculate sweep amount: available checking minus $${buffer} buffer.`,
|
|
1209
|
+
"If sweep amount < $1, funds are already optimized.",
|
|
1028
1210
|
"",
|
|
1029
|
-
|
|
1030
|
-
" If sweep amount is < $1, tell the user their funds are already optimized.",
|
|
1211
|
+
"Present a sweep plan:",
|
|
1031
1212
|
"",
|
|
1032
|
-
"
|
|
1033
|
-
"
|
|
1034
|
-
|
|
1035
|
-
" - If they have investment assets not earning yield, recommend t2000_invest earn",
|
|
1036
|
-
" - Check if rebalancing existing savings would help (t2000_rebalance dryRun: true)",
|
|
1213
|
+
"\u{1F9F9} SWEEP PLAN",
|
|
1214
|
+
"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
|
|
1215
|
+
`Available to sweep: $X (keeping $${buffer} buffer)`,
|
|
1037
1216
|
"",
|
|
1038
|
-
"
|
|
1217
|
+
"Actions (in order):",
|
|
1218
|
+
" 1. Save $X to best-rate protocol (show APY)",
|
|
1219
|
+
" 2. Earn yield on idle investment assets (if applicable)",
|
|
1220
|
+
" 3. Rebalance existing savings for better APY (t2000_rebalance dryRun: true)",
|
|
1221
|
+
" 4. Claim pending rewards (if available)",
|
|
1039
1222
|
"",
|
|
1040
|
-
"
|
|
1041
|
-
" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
|
|
1042
|
-
` Available to sweep: $X (keeping $${buffer} buffer)`,
|
|
1223
|
+
"Projected monthly yield: $X.XX (before) \u2192 $X.XX (after)",
|
|
1043
1224
|
"",
|
|
1044
|
-
"
|
|
1045
|
-
" Expected: ~$X.XX/month",
|
|
1046
|
-
" Action 2: Earn yield on X SUI \u2192 Protocol (Y% APY) [if applicable]",
|
|
1047
|
-
" Action 3: Rebalance savings \u2192 +Y% APY [if applicable]",
|
|
1048
|
-
" Action 4: Rebalance investment earning \u2192 move to better protocol [if t2000_invest_rebalance dryRun shows opportunity]",
|
|
1049
|
-
" Action 5: Claim rewards \u2192 collect and convert to USDC [if positions show +rewards]",
|
|
1050
|
-
"",
|
|
1051
|
-
" Projected monthly yield: $X.XX (before) \u2192 $X.XX (after)",
|
|
1052
|
-
"",
|
|
1053
|
-
'Ask: "Want me to execute this sweep?" Then run each action sequentially.',
|
|
1054
|
-
"Use dryRun: true first for any action over $50."
|
|
1225
|
+
"Ask to confirm, then execute sequentially."
|
|
1055
1226
|
].join("\n")
|
|
1056
1227
|
}
|
|
1057
1228
|
}]
|
|
@@ -1067,51 +1238,24 @@ ${context}
|
|
|
1067
1238
|
content: {
|
|
1068
1239
|
type: "text",
|
|
1069
1240
|
text: [
|
|
1070
|
-
"You are a risk assessment specialist for a t2000 AI agent bank account.",
|
|
1241
|
+
"You are a risk assessment specialist for a t2000 AI agent bank account on Sui.",
|
|
1071
1242
|
"",
|
|
1072
|
-
"
|
|
1073
|
-
"1. Balance breakdown (t2000_balance)",
|
|
1074
|
-
"2. Health factor (t2000_health)",
|
|
1075
|
-
"3. All lending positions (t2000_positions)",
|
|
1076
|
-
"4. Investment portfolio (t2000_portfolio)",
|
|
1077
|
-
"5. Current rates (t2000_rates)",
|
|
1243
|
+
"IMPORTANT: Call t2000_overview FIRST \u2014 it has balance, positions, portfolio, health, everything.",
|
|
1078
1244
|
"",
|
|
1079
|
-
"Analyze and report
|
|
1245
|
+
"Analyze and report:",
|
|
1080
1246
|
"",
|
|
1081
1247
|
"\u{1F6E1}\uFE0F RISK REPORT",
|
|
1082
1248
|
"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
|
|
1083
1249
|
"",
|
|
1084
|
-
"1. LIQUIDATION RISK",
|
|
1085
|
-
"
|
|
1086
|
-
"
|
|
1087
|
-
"
|
|
1088
|
-
"",
|
|
1089
|
-
"
|
|
1090
|
-
"
|
|
1091
|
-
"
|
|
1092
|
-
"
|
|
1093
|
-
"",
|
|
1094
|
-
"3. PROTOCOL EXPOSURE",
|
|
1095
|
-
" Which protocols hold funds (NAVI, Suilend)",
|
|
1096
|
-
" Total exposure per protocol",
|
|
1097
|
-
" Flag if >80% of savings is in one protocol",
|
|
1098
|
-
"",
|
|
1099
|
-
"4. UNREALIZED LOSSES",
|
|
1100
|
-
" Any investment positions currently at a loss",
|
|
1101
|
-
" Total unrealized P&L",
|
|
1102
|
-
" Cost basis vs current price per position",
|
|
1103
|
-
"",
|
|
1104
|
-
"5. YIELD EFFICIENCY",
|
|
1105
|
-
" Any assets sitting idle (not earning yield)",
|
|
1106
|
-
" Checking balance vs recommended buffer",
|
|
1107
|
-
" Investment assets not in lending (could earn via invest earn)",
|
|
1108
|
-
" Earning positions on sub-optimal protocols (run t2000_invest_rebalance dryRun: true)",
|
|
1109
|
-
"",
|
|
1110
|
-
"OVERALL RISK SCORE: Low / Medium / High / Critical",
|
|
1111
|
-
"Based on weighted combination of all factors above.",
|
|
1112
|
-
"",
|
|
1113
|
-
"End with max 3 specific, prioritized actions to reduce risk.",
|
|
1114
|
-
"If overall risk is Low, say so clearly \u2014 don't invent problems."
|
|
1250
|
+
"1. LIQUIDATION RISK \u2014 Health factor, distance to liquidation",
|
|
1251
|
+
"2. CONCENTRATION RISK \u2014 % in each account type, % per asset",
|
|
1252
|
+
"3. PROTOCOL EXPOSURE \u2014 NAVI vs Suilend distribution",
|
|
1253
|
+
"4. UNREALIZED LOSSES \u2014 Any investment positions at a loss",
|
|
1254
|
+
"5. YIELD EFFICIENCY \u2014 Idle assets, sub-optimal rates",
|
|
1255
|
+
"",
|
|
1256
|
+
"OVERALL: Low / Medium / High / Critical",
|
|
1257
|
+
"",
|
|
1258
|
+
"End with max 3 prioritized actions. If Low risk, say so \u2014 don't invent problems."
|
|
1115
1259
|
].join("\n")
|
|
1116
1260
|
}
|
|
1117
1261
|
}]
|
|
@@ -1126,60 +1270,22 @@ ${context}
|
|
|
1126
1270
|
content: {
|
|
1127
1271
|
type: "text",
|
|
1128
1272
|
text: [
|
|
1129
|
-
"You are a personal finance newsletter writer for a t2000 AI agent bank account.",
|
|
1273
|
+
"You are a personal finance newsletter writer for a t2000 AI agent bank account on Sui.",
|
|
1130
1274
|
"",
|
|
1131
|
-
|
|
1132
|
-
"1. Current balance (t2000_balance)",
|
|
1133
|
-
"2. Recent transactions (t2000_history with limit: 50)",
|
|
1134
|
-
"3. Yield earnings (t2000_earnings)",
|
|
1135
|
-
"4. Investment portfolio with P&L (t2000_portfolio)",
|
|
1136
|
-
'5. Strategy statuses (t2000_strategy action: "list")',
|
|
1137
|
-
'6. DCA schedule status (t2000_auto_invest action: "status")',
|
|
1138
|
-
"7. Lending positions (t2000_positions) \u2014 check for claimable rewards",
|
|
1139
|
-
"",
|
|
1140
|
-
"Present as a weekly newsletter:",
|
|
1275
|
+
'IMPORTANT: Call t2000_overview, t2000_history (limit: 50), t2000_auto_invest (action: "status") in parallel.',
|
|
1141
1276
|
"",
|
|
1142
1277
|
"\u{1F4CA} WEEKLY RECAP",
|
|
1143
1278
|
"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
|
|
1144
1279
|
"",
|
|
1145
|
-
"\u{1F4B0} Net Worth: $X
|
|
1146
|
-
"
|
|
1147
|
-
"",
|
|
1148
|
-
"\u{
|
|
1149
|
-
"
|
|
1150
|
-
"
|
|
1151
|
-
"
|
|
1152
|
-
" - X investment trades",
|
|
1153
|
-
" - X exchanges",
|
|
1154
|
-
" Highlight the largest transaction",
|
|
1155
|
-
"",
|
|
1156
|
-
"\u{1F4B8} Yield Earned",
|
|
1157
|
-
" Total yield this week (daily rate \xD7 7)",
|
|
1158
|
-
" Breakdown by position",
|
|
1159
|
-
" Annualized projection",
|
|
1280
|
+
"\u{1F4B0} Net Worth: $X \u2014 Checking $X | Savings $X | Investment $X",
|
|
1281
|
+
"\u{1F4C8} Activity: X sends, X saves, X trades, X exchanges",
|
|
1282
|
+
"\u{1F4B8} Yield: $X.XX this week, X% APY, $X/month projected",
|
|
1283
|
+
"\u{1F4CA} Portfolio: Per-asset P&L, best & worst performer",
|
|
1284
|
+
"\u{1F504} DCA: Runs this week, next run, total invested",
|
|
1285
|
+
"\u{1F381} Rewards: Pending? Claim suggestion",
|
|
1286
|
+
"\u{1F449} Next Week: 1-2 actionable suggestions",
|
|
1160
1287
|
"",
|
|
1161
|
-
"
|
|
1162
|
-
" Each position: asset, P&L this week, total unrealized P&L",
|
|
1163
|
-
" Best performer and worst performer",
|
|
1164
|
-
" Strategy performance if applicable",
|
|
1165
|
-
"",
|
|
1166
|
-
"\u{1F504} DCA Status",
|
|
1167
|
-
" Runs completed this week",
|
|
1168
|
-
" Next scheduled run",
|
|
1169
|
-
" Total invested via DCA to date",
|
|
1170
|
-
"",
|
|
1171
|
-
"\u{1F3C6} Highlight of the Week",
|
|
1172
|
-
" One standout metric (best trade, highest yield day, milestone reached)",
|
|
1173
|
-
"",
|
|
1174
|
-
"\u{1F381} Rewards",
|
|
1175
|
-
" Any pending protocol rewards (if positions show +rewards)",
|
|
1176
|
-
" Suggest claiming if rewards are available",
|
|
1177
|
-
"",
|
|
1178
|
-
"\u{1F449} Next Week's Focus",
|
|
1179
|
-
" 1-2 actionable suggestions based on trends",
|
|
1180
|
-
" If investment earning positions can be rebalanced for better APY, mention it (t2000_invest_rebalance dryRun: true)",
|
|
1181
|
-
"",
|
|
1182
|
-
"Tone: confident, concise, data-driven. Like a Bloomberg brief, not a blog post."
|
|
1288
|
+
"Tone: confident, concise, data-driven. Bloomberg brief, not blog post."
|
|
1183
1289
|
].join("\n")
|
|
1184
1290
|
}
|
|
1185
1291
|
}]
|
|
@@ -1197,51 +1303,31 @@ ${context}
|
|
|
1197
1303
|
content: {
|
|
1198
1304
|
type: "text",
|
|
1199
1305
|
text: [
|
|
1200
|
-
"You are a dollar-cost averaging advisor for a t2000 AI agent bank account.",
|
|
1306
|
+
"You are a dollar-cost averaging advisor for a t2000 AI agent bank account on Sui.",
|
|
1201
1307
|
"",
|
|
1202
|
-
budget ? `The user has $${budget}/month to invest via DCA.` : "The user wants to set up a DCA
|
|
1308
|
+
budget ? `The user has $${budget}/month to invest via DCA.` : "The user wants to set up a DCA schedule. Ask their monthly budget first.",
|
|
1203
1309
|
"",
|
|
1204
|
-
"
|
|
1205
|
-
"1. Current balance (t2000_balance) \u2014 can they afford this monthly commitment?",
|
|
1206
|
-
"2. Current portfolio (t2000_portfolio) \u2014 what do they already hold?",
|
|
1207
|
-
'3. Existing DCA schedules (t2000_auto_invest action: "status")',
|
|
1208
|
-
'4. Available strategies (t2000_strategy action: "list")',
|
|
1310
|
+
'IMPORTANT: Call t2000_overview, t2000_strategy (action: "list"), t2000_auto_invest (action: "status") in parallel.',
|
|
1209
1311
|
"",
|
|
1210
1312
|
"Recommend a DCA plan:",
|
|
1211
1313
|
"",
|
|
1212
1314
|
"\u{1F4C5} DCA PLAN",
|
|
1213
1315
|
"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
|
|
1214
1316
|
"",
|
|
1215
|
-
"STRATEGY
|
|
1216
|
-
"
|
|
1217
|
-
" -
|
|
1218
|
-
" -
|
|
1219
|
-
" -
|
|
1220
|
-
" -
|
|
1221
|
-
"
|
|
1222
|
-
"
|
|
1223
|
-
"
|
|
1224
|
-
"",
|
|
1225
|
-
"
|
|
1226
|
-
"
|
|
1227
|
-
"
|
|
1228
|
-
|
|
1229
|
-
"",
|
|
1230
|
-
"PROJECTION (12 months):",
|
|
1231
|
-
" Total invested: $X",
|
|
1232
|
-
" If prices stay flat: $X (just accumulation)",
|
|
1233
|
-
" Note: past performance doesn't predict future results",
|
|
1234
|
-
" Key benefit: removes emotion and timing risk from investing",
|
|
1235
|
-
"",
|
|
1236
|
-
"AFFORDABILITY CHECK:",
|
|
1237
|
-
" Monthly income vs this commitment",
|
|
1238
|
-
" Remaining checking buffer after DCA",
|
|
1239
|
-
" Flag if DCA would eat into emergency buffer",
|
|
1240
|
-
"",
|
|
1241
|
-
"If they want to proceed:",
|
|
1242
|
-
" Show the exact setup command:",
|
|
1243
|
-
' t2000_auto_invest action: "setup", amount: X, frequency: "weekly", strategy: "name"',
|
|
1244
|
-
" Preview first, then confirm."
|
|
1317
|
+
"STRATEGY: Pick one based on their existing portfolio:",
|
|
1318
|
+
" - bluechip (50% BTC, 30% ETH, 20% SUI)",
|
|
1319
|
+
" - all-weather (30% BTC, 20% ETH, 20% SUI, 30% GOLD)",
|
|
1320
|
+
" - safe-haven (50% BTC, 50% GOLD)",
|
|
1321
|
+
" - layer1 (50% ETH, 50% SUI)",
|
|
1322
|
+
" - sui-heavy (60% SUI, 20% BTC, 20% ETH)",
|
|
1323
|
+
" Explain WHY this fits them.",
|
|
1324
|
+
"",
|
|
1325
|
+
"FREQUENCY: Weekly for budgets > $50/month, monthly for smaller.",
|
|
1326
|
+
"",
|
|
1327
|
+
"AFFORDABILITY: Check remaining buffer after DCA commitment.",
|
|
1328
|
+
" Flag if DCA would eat into spending buffer.",
|
|
1329
|
+
"",
|
|
1330
|
+
'If they agree: t2000_auto_invest action: "setup", amount, frequency, strategy.'
|
|
1245
1331
|
].join("\n")
|
|
1246
1332
|
}
|
|
1247
1333
|
}]
|
|
@@ -1398,6 +1484,247 @@ ${context}
|
|
|
1398
1484
|
};
|
|
1399
1485
|
}
|
|
1400
1486
|
);
|
|
1487
|
+
server.prompt(
|
|
1488
|
+
"sentinel-hunt",
|
|
1489
|
+
"Browse sentinel bounties, pick the best target, and attack \u2014 guided bounty hunting workflow.",
|
|
1490
|
+
async () => ({
|
|
1491
|
+
messages: [{
|
|
1492
|
+
role: "user",
|
|
1493
|
+
content: {
|
|
1494
|
+
type: "text",
|
|
1495
|
+
text: [
|
|
1496
|
+
"You are a bounty hunting strategist for Sui Sentinel \u2014 a game where you try to jailbreak AI agents to win their prize pool.",
|
|
1497
|
+
"",
|
|
1498
|
+
"IMPORTANT: Call t2000_sentinel_list and t2000_balance in parallel.",
|
|
1499
|
+
"",
|
|
1500
|
+
"\u{1F3AF} SENTINEL BOUNTY HUNT",
|
|
1501
|
+
"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
|
|
1502
|
+
"",
|
|
1503
|
+
"Step 1 \u2014 Show the best targets:",
|
|
1504
|
+
" Rank sentinels by reward-to-fee ratio (prize pool \xF7 attack fee)",
|
|
1505
|
+
" Show top 5 targets in a table: Name | Fee | Prize Pool | Ratio | Attacks",
|
|
1506
|
+
" Highlight the best value target",
|
|
1507
|
+
"",
|
|
1508
|
+
"Step 2 \u2014 Recommend a target:",
|
|
1509
|
+
" Explain WHY this target is good (high ratio, fewer attempts = less refined defense)",
|
|
1510
|
+
" Show the attack fee and confirm the user can afford it",
|
|
1511
|
+
"",
|
|
1512
|
+
"Step 3 \u2014 Craft the attack:",
|
|
1513
|
+
" If the user picks a target, call t2000_sentinel_info to see its system prompt",
|
|
1514
|
+
" Help the user craft a jailbreak prompt based on the sentinel's system prompt",
|
|
1515
|
+
" Common techniques: role-play scenarios, hypotheticals, emotional appeals, format tricks",
|
|
1516
|
+
" WARNING: Never suggest harmful content \u2014 this is a game about creative prompt engineering",
|
|
1517
|
+
"",
|
|
1518
|
+
"Step 4 \u2014 Execute:",
|
|
1519
|
+
" Run t2000_sentinel_attack with the chosen id and prompt",
|
|
1520
|
+
" Show: score, win/lose, agent response, jury verdict, fee paid",
|
|
1521
|
+
" If they won: celebrate and show the prize!",
|
|
1522
|
+
" If they lost: analyze the response and suggest a different approach for next attempt"
|
|
1523
|
+
].join("\n")
|
|
1524
|
+
}
|
|
1525
|
+
}]
|
|
1526
|
+
})
|
|
1527
|
+
);
|
|
1528
|
+
server.prompt(
|
|
1529
|
+
"onboarding",
|
|
1530
|
+
"New user setup guide \u2014 deposit, first save, set safeguards, explore features.",
|
|
1531
|
+
async () => ({
|
|
1532
|
+
messages: [{
|
|
1533
|
+
role: "user",
|
|
1534
|
+
content: {
|
|
1535
|
+
type: "text",
|
|
1536
|
+
text: [
|
|
1537
|
+
"You are a friendly onboarding guide for t2000 \u2014 an AI agent bank account on Sui.",
|
|
1538
|
+
"",
|
|
1539
|
+
"IMPORTANT: Call t2000_overview FIRST to understand their current state.",
|
|
1540
|
+
"",
|
|
1541
|
+
"\u{1F44B} WELCOME TO T2000",
|
|
1542
|
+
"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
|
|
1543
|
+
"",
|
|
1544
|
+
"Check their balance and adapt the flow:",
|
|
1545
|
+
"",
|
|
1546
|
+
"IF they have no funds ($0 balance):",
|
|
1547
|
+
" Show deposit instructions (t2000_deposit_info)",
|
|
1548
|
+
' Explain: "Send USDC to your Sui address to get started"',
|
|
1549
|
+
" Mention: they need a small amount of SUI for gas (~$1 worth)",
|
|
1550
|
+
"",
|
|
1551
|
+
"IF they have funds but nothing saved/invested:",
|
|
1552
|
+
` "Great, you have $X ready to go! Here's what you can do:"`,
|
|
1553
|
+
" 1. SAVE \u2014 Earn yield on idle funds (show best current APY)",
|
|
1554
|
+
" 2. INVEST \u2014 Buy crypto (BTC, ETH, SUI, GOLD)",
|
|
1555
|
+
" 3. AUTO-INVEST \u2014 Set up recurring DCA buys",
|
|
1556
|
+
" 4. SAFEGUARDS \u2014 Set spending limits (recommend for accounts > $100)",
|
|
1557
|
+
"",
|
|
1558
|
+
"IF they already have savings/investments:",
|
|
1559
|
+
` "Looks like you're already set up! Here's your quick status:"`,
|
|
1560
|
+
" Show a mini briefing, then offer to optimize",
|
|
1561
|
+
"",
|
|
1562
|
+
'End with: "What would you like to do first?"',
|
|
1563
|
+
"",
|
|
1564
|
+
"Available features to highlight:",
|
|
1565
|
+
" - Save/withdraw USDC across NAVI & Suilend protocols",
|
|
1566
|
+
" - Invest in BTC, ETH, SUI, GOLD with portfolio tracking",
|
|
1567
|
+
" - Strategy investing (bluechip, all-weather, etc.)",
|
|
1568
|
+
" - Auto-invest (DCA) \u2014 recurring weekly/monthly buys",
|
|
1569
|
+
" - Rebalance \u2014 auto-optimize yield across protocols",
|
|
1570
|
+
" - Borrow against savings",
|
|
1571
|
+
" - Send money to contacts",
|
|
1572
|
+
" - Hunt sentinel bounties (jailbreak AI agents for prizes)",
|
|
1573
|
+
" - Safeguards: per-tx limits, daily caps, emergency lock"
|
|
1574
|
+
].join("\n")
|
|
1575
|
+
}
|
|
1576
|
+
}]
|
|
1577
|
+
})
|
|
1578
|
+
);
|
|
1579
|
+
server.prompt(
|
|
1580
|
+
"emergency",
|
|
1581
|
+
"Something is wrong \u2014 lock account, assess damage, take protective actions immediately.",
|
|
1582
|
+
async () => ({
|
|
1583
|
+
messages: [{
|
|
1584
|
+
role: "user",
|
|
1585
|
+
content: {
|
|
1586
|
+
type: "text",
|
|
1587
|
+
text: [
|
|
1588
|
+
"You are an emergency response handler for a t2000 AI agent bank account.",
|
|
1589
|
+
"",
|
|
1590
|
+
"\u{1F6A8} EMERGENCY PROTOCOL",
|
|
1591
|
+
"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
|
|
1592
|
+
"",
|
|
1593
|
+
'IMPORTANT: If the user says "lock", "freeze", "hack", "stolen", or "emergency":',
|
|
1594
|
+
" \u2192 Call t2000_lock IMMEDIATELY \u2014 no confirmation needed for locking",
|
|
1595
|
+
" \u2192 Then gather information",
|
|
1596
|
+
"",
|
|
1597
|
+
"Step 1 \u2014 Lock first, ask later:",
|
|
1598
|
+
" Run t2000_lock to freeze ALL operations",
|
|
1599
|
+
' Confirm: "Account locked. No transactions can be executed."',
|
|
1600
|
+
" Explain: unlocking requires the CLI with your PIN (t2000 unlock)",
|
|
1601
|
+
"",
|
|
1602
|
+
"Step 2 \u2014 Assess the situation:",
|
|
1603
|
+
" Call t2000_overview to see current state",
|
|
1604
|
+
" Call t2000_history (limit: 20) to check recent transactions",
|
|
1605
|
+
" Look for suspicious activity: unexpected sends, large withdrawals, unfamiliar addresses",
|
|
1606
|
+
"",
|
|
1607
|
+
"Step 3 \u2014 Report findings:",
|
|
1608
|
+
" Show current balances (are funds still there?)",
|
|
1609
|
+
" Flag any suspicious transactions with amounts and timestamps",
|
|
1610
|
+
" Show transaction links so the user can verify on-chain",
|
|
1611
|
+
"",
|
|
1612
|
+
"Step 4 \u2014 Recovery guidance:",
|
|
1613
|
+
' If funds are safe: "Your funds are secure. The lock prevents any further transactions."',
|
|
1614
|
+
' If suspicious tx found: "Review this transaction: [link]. If unauthorized, your remaining funds are now locked."',
|
|
1615
|
+
' Remind: "To unlock, use: t2000 unlock (requires your PIN)"',
|
|
1616
|
+
' Remind: "Consider rotating your key after investigating"'
|
|
1617
|
+
].join("\n")
|
|
1618
|
+
}
|
|
1619
|
+
}]
|
|
1620
|
+
})
|
|
1621
|
+
);
|
|
1622
|
+
server.prompt(
|
|
1623
|
+
"optimize-all",
|
|
1624
|
+
"One-shot full optimization \u2014 sweep idle funds, rebalance savings, claim rewards, rebalance investment earnings.",
|
|
1625
|
+
async () => ({
|
|
1626
|
+
messages: [{
|
|
1627
|
+
role: "user",
|
|
1628
|
+
content: {
|
|
1629
|
+
type: "text",
|
|
1630
|
+
text: [
|
|
1631
|
+
"You are a full-account optimizer for a t2000 AI agent bank account on Sui.",
|
|
1632
|
+
"",
|
|
1633
|
+
"IMPORTANT: Call t2000_overview and t2000_all_rates in parallel to get everything.",
|
|
1634
|
+
"",
|
|
1635
|
+
"\u{1F527} FULL OPTIMIZATION",
|
|
1636
|
+
"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
|
|
1637
|
+
"",
|
|
1638
|
+
"Check all 5 optimization levers and present a plan BEFORE executing:",
|
|
1639
|
+
"",
|
|
1640
|
+
"1. IDLE FUNDS \u2014 Any checking balance > $5?",
|
|
1641
|
+
" \u2192 Save to best-rate protocol",
|
|
1642
|
+
"",
|
|
1643
|
+
"2. SAVINGS REBALANCE \u2014 Better APY available?",
|
|
1644
|
+
" \u2192 t2000_rebalance dryRun: true \u2014 show current vs new APY",
|
|
1645
|
+
"",
|
|
1646
|
+
"3. PENDING REWARDS \u2014 Any unclaimed?",
|
|
1647
|
+
" \u2192 Show rewards, offer to claim and convert to USDC",
|
|
1648
|
+
"",
|
|
1649
|
+
"4. INVESTMENT YIELD \u2014 Any invested assets NOT earning?",
|
|
1650
|
+
" \u2192 t2000_invest earn to deposit into lending",
|
|
1651
|
+
"",
|
|
1652
|
+
"5. INVESTMENT REBALANCE \u2014 Earning assets on sub-optimal protocol?",
|
|
1653
|
+
" \u2192 t2000_invest_rebalance dryRun: true",
|
|
1654
|
+
"",
|
|
1655
|
+
"Present all findings in a summary table:",
|
|
1656
|
+
"",
|
|
1657
|
+
" Action | Impact | Status",
|
|
1658
|
+
" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500|\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500|\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
|
|
1659
|
+
" Sweep $X idle | +$X.XX/month | Ready",
|
|
1660
|
+
" Rebalance savings| +X.XX% APY | Ready",
|
|
1661
|
+
" Claim rewards | $X.XX USDC | Ready",
|
|
1662
|
+
" Earn on SUI | +X.XX% APY | Ready",
|
|
1663
|
+
" Already optimal | \u2014 | Skipped",
|
|
1664
|
+
"",
|
|
1665
|
+
'Ask: "Want me to execute all ready actions?" Then run sequentially.',
|
|
1666
|
+
"If everything is already optimal, say so clearly."
|
|
1667
|
+
].join("\n")
|
|
1668
|
+
}
|
|
1669
|
+
}]
|
|
1670
|
+
})
|
|
1671
|
+
);
|
|
1672
|
+
server.prompt(
|
|
1673
|
+
"savings-goal",
|
|
1674
|
+
'Set a savings target \u2014 "I want to save $X by date Y" \u2192 calculates weekly/monthly amount needed.',
|
|
1675
|
+
{
|
|
1676
|
+
target: z.number().optional().describe("Target savings amount in dollars"),
|
|
1677
|
+
months: z.number().optional().describe("Number of months to reach the target")
|
|
1678
|
+
},
|
|
1679
|
+
async ({ target, months }) => ({
|
|
1680
|
+
messages: [{
|
|
1681
|
+
role: "user",
|
|
1682
|
+
content: {
|
|
1683
|
+
type: "text",
|
|
1684
|
+
text: [
|
|
1685
|
+
"You are a savings goal planner for a t2000 AI agent bank account on Sui.",
|
|
1686
|
+
"",
|
|
1687
|
+
target ? `Target: $${target}` : "",
|
|
1688
|
+
months ? `Timeline: ${months} months` : "",
|
|
1689
|
+
"",
|
|
1690
|
+
"IMPORTANT: Call t2000_overview FIRST to see current state.",
|
|
1691
|
+
"",
|
|
1692
|
+
"\u{1F3AF} SAVINGS GOAL",
|
|
1693
|
+
"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
|
|
1694
|
+
"",
|
|
1695
|
+
"If target or timeline is missing, ask the user.",
|
|
1696
|
+
"",
|
|
1697
|
+
"Calculate and present:",
|
|
1698
|
+
"",
|
|
1699
|
+
" Goal: $X by [date]",
|
|
1700
|
+
" Currently saved: $X",
|
|
1701
|
+
" Gap: $X needed",
|
|
1702
|
+
"",
|
|
1703
|
+
" Weekly deposit: $X/week",
|
|
1704
|
+
" Monthly deposit: $X/month",
|
|
1705
|
+
"",
|
|
1706
|
+
" With yield (at current APY X%):",
|
|
1707
|
+
" Without yield you'd need: $X total deposits",
|
|
1708
|
+
" With yield you'd need: $X total deposits (yield covers ~$X)",
|
|
1709
|
+
"",
|
|
1710
|
+
" Feasibility check:",
|
|
1711
|
+
" Current checking: $X",
|
|
1712
|
+
" Can fund from checking: $X of $X gap",
|
|
1713
|
+
" Remaining to earn/deposit: $X",
|
|
1714
|
+
"",
|
|
1715
|
+
"If they can reach the goal with current funds + yield:",
|
|
1716
|
+
" \u2192 Offer to save it all now: t2000_save",
|
|
1717
|
+
"",
|
|
1718
|
+
"If they need regular deposits:",
|
|
1719
|
+
" \u2192 Suggest a recurring schedule",
|
|
1720
|
+
" \u2192 Show how yield accelerates the goal",
|
|
1721
|
+
"",
|
|
1722
|
+
"End with a clear YES/NO on whether the goal is achievable in the timeline."
|
|
1723
|
+
].join("\n")
|
|
1724
|
+
}
|
|
1725
|
+
}]
|
|
1726
|
+
})
|
|
1727
|
+
);
|
|
1401
1728
|
}
|
|
1402
1729
|
|
|
1403
1730
|
// src/index.ts
|