@t2000/mcp 0.17.29 → 0.18.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/README.md +3 -1
- package/dist/bin.d.ts +0 -2
- package/dist/bin.js +1421 -1
- package/dist/bin.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +1419 -20
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/bin.d.ts.map +0 -1
- package/dist/errors.d.ts +0 -16
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js +0 -31
- package/dist/errors.js.map +0 -1
- package/dist/errors.test.d.ts +0 -2
- package/dist/errors.test.d.ts.map +0 -1
- package/dist/errors.test.js +0 -50
- package/dist/errors.test.js.map +0 -1
- package/dist/gate.test.d.ts +0 -2
- package/dist/gate.test.d.ts.map +0 -1
- package/dist/gate.test.js +0 -60
- package/dist/gate.test.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/integration.test.d.ts +0 -2
- package/dist/integration.test.d.ts.map +0 -1
- package/dist/integration.test.js +0 -216
- package/dist/integration.test.js.map +0 -1
- package/dist/mutex.d.ts +0 -5
- package/dist/mutex.d.ts.map +0 -1
- package/dist/mutex.js +0 -17
- package/dist/mutex.js.map +0 -1
- package/dist/mutex.test.d.ts +0 -2
- package/dist/mutex.test.d.ts.map +0 -1
- package/dist/mutex.test.js +0 -35
- package/dist/mutex.test.js.map +0 -1
- package/dist/prompts.d.ts +0 -3
- package/dist/prompts.d.ts.map +0 -1
- package/dist/prompts.js +0 -635
- package/dist/prompts.js.map +0 -1
- package/dist/prompts.test.d.ts +0 -2
- package/dist/prompts.test.d.ts.map +0 -1
- package/dist/prompts.test.js +0 -126
- package/dist/prompts.test.js.map +0 -1
- package/dist/tools/read.d.ts +0 -4
- package/dist/tools/read.d.ts.map +0 -1
- package/dist/tools/read.js +0 -93
- package/dist/tools/read.js.map +0 -1
- package/dist/tools/read.test.d.ts +0 -2
- package/dist/tools/read.test.d.ts.map +0 -1
- package/dist/tools/read.test.js +0 -198
- package/dist/tools/read.test.js.map +0 -1
- package/dist/tools/safety.d.ts +0 -4
- package/dist/tools/safety.d.ts.map +0 -1
- package/dist/tools/safety.js +0 -66
- package/dist/tools/safety.js.map +0 -1
- package/dist/tools/safety.test.d.ts +0 -2
- package/dist/tools/safety.test.d.ts.map +0 -1
- package/dist/tools/safety.test.js +0 -100
- package/dist/tools/safety.test.js.map +0 -1
- package/dist/tools/write.d.ts +0 -4
- package/dist/tools/write.d.ts.map +0 -1
- package/dist/tools/write.js +0 -394
- package/dist/tools/write.js.map +0 -1
- package/dist/tools/write.test.d.ts +0 -2
- package/dist/tools/write.test.d.ts.map +0 -1
- package/dist/tools/write.test.js +0 -332
- package/dist/tools/write.test.js.map +0 -1
- package/dist/unlock.d.ts +0 -3
- package/dist/unlock.d.ts.map +0 -1
- package/dist/unlock.js +0 -24
- package/dist/unlock.js.map +0 -1
- package/dist/unlock.test.d.ts +0 -2
- package/dist/unlock.test.d.ts.map +0 -1
- package/dist/unlock.test.js +0 -57
- package/dist/unlock.test.js.map +0 -1
package/dist/prompts.js
DELETED
|
@@ -1,635 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export function registerPrompts(server) {
|
|
3
|
-
server.prompt('financial-report', 'Get a comprehensive summary of the agent\'s financial position — balance, savings, debt, health factor, and yield earnings.', async () => ({
|
|
4
|
-
messages: [{
|
|
5
|
-
role: 'user',
|
|
6
|
-
content: {
|
|
7
|
-
type: 'text',
|
|
8
|
-
text: [
|
|
9
|
-
'You are a financial assistant for a t2000 AI agent bank account.',
|
|
10
|
-
'',
|
|
11
|
-
'Please provide a comprehensive financial report by:',
|
|
12
|
-
'1. Check the current balance (t2000_balance)',
|
|
13
|
-
'2. Review lending positions (t2000_positions)',
|
|
14
|
-
'3. Check the health factor (t2000_health)',
|
|
15
|
-
'4. Show yield earnings (t2000_earnings)',
|
|
16
|
-
'5. Review current interest rates (t2000_rates)',
|
|
17
|
-
'6. Check investment portfolio (t2000_portfolio)',
|
|
18
|
-
'7. Check for pending protocol rewards (positions with +rewards tags mean claimable rewards exist)',
|
|
19
|
-
'',
|
|
20
|
-
'Summarize the agent\'s financial health in a clear, concise format with actionable recommendations.',
|
|
21
|
-
'If any positions show claimable rewards, include "Claim rewards → run t2000_claim_rewards to collect and convert to USDC" as an action item.',
|
|
22
|
-
'Check if investment earning positions could move to a better-rate protocol (t2000_invest_rebalance with dryRun: true). If opportunities exist, include as a recommendation.',
|
|
23
|
-
].join('\n'),
|
|
24
|
-
},
|
|
25
|
-
}],
|
|
26
|
-
}));
|
|
27
|
-
server.prompt('optimize-yield', 'Analyze savings and investment earning positions — rate comparisons, rebalancing opportunities across protocols.', async () => ({
|
|
28
|
-
messages: [{
|
|
29
|
-
role: 'user',
|
|
30
|
-
content: {
|
|
31
|
-
type: 'text',
|
|
32
|
-
text: [
|
|
33
|
-
'You are a yield optimization assistant for a t2000 AI agent bank account.',
|
|
34
|
-
'',
|
|
35
|
-
'Please analyze the current yield strategy:',
|
|
36
|
-
'1. Check current positions (t2000_positions) — look for +rewards tags indicating claimable protocol rewards',
|
|
37
|
-
'2. Compare rates across protocols (t2000_rates)',
|
|
38
|
-
'3. Run a dry-run savings rebalance (t2000_rebalance with dryRun: true)',
|
|
39
|
-
'4. Run a dry-run investment rebalance (t2000_invest_rebalance with dryRun: true) — checks if earning positions on SUI, BTC, ETH, GOLD could move to a higher-rate protocol',
|
|
40
|
-
'',
|
|
41
|
-
'If a savings rebalance would improve yield, explain the trade-off (gas cost vs yield gain, break-even period) and ask if the user wants to proceed.',
|
|
42
|
-
'If an investment rebalance would improve yield, show which assets would move and the APY gain, then ask to proceed.',
|
|
43
|
-
'If any positions have claimable rewards, recommend running t2000_claim_rewards to collect and auto-convert to USDC.',
|
|
44
|
-
].join('\n'),
|
|
45
|
-
},
|
|
46
|
-
}],
|
|
47
|
-
}));
|
|
48
|
-
server.prompt('send-money', 'Guided flow for sending USDC to a Sui address — validates address, checks limits, previews before signing.', {
|
|
49
|
-
to: z.string().optional().describe('Recipient Sui address'),
|
|
50
|
-
amount: z.number().optional().describe('Amount in dollars'),
|
|
51
|
-
}, async ({ to, amount }) => {
|
|
52
|
-
const context = [
|
|
53
|
-
to ? `Recipient address: ${to}` : '',
|
|
54
|
-
amount ? `Amount: $${amount}` : '',
|
|
55
|
-
].filter(Boolean).join('\n');
|
|
56
|
-
return {
|
|
57
|
-
messages: [{
|
|
58
|
-
role: 'user',
|
|
59
|
-
content: {
|
|
60
|
-
type: 'text',
|
|
61
|
-
text: [
|
|
62
|
-
'You are a payment assistant for a t2000 AI agent bank account.',
|
|
63
|
-
'',
|
|
64
|
-
context ? `Context:\n${context}\n` : '',
|
|
65
|
-
'The user wants to send money. Follow this flow:',
|
|
66
|
-
'1. If address or amount is missing, ask the user',
|
|
67
|
-
'2. Preview the transaction (t2000_send with dryRun: true)',
|
|
68
|
-
'3. Show the preview — amount, recipient, remaining balance, safeguard status',
|
|
69
|
-
'4. Ask the user to confirm before executing',
|
|
70
|
-
'5. Execute the send (t2000_send with dryRun: false)',
|
|
71
|
-
'6. Show the transaction result with the Suiscan link',
|
|
72
|
-
].join('\n'),
|
|
73
|
-
},
|
|
74
|
-
}],
|
|
75
|
-
};
|
|
76
|
-
});
|
|
77
|
-
server.prompt('budget-check', 'Can I afford to spend $X? Checks balance, daily limit remaining, and whether spending would impact savings.', {
|
|
78
|
-
amount: z.number().optional().describe('Amount in dollars to check'),
|
|
79
|
-
}, async ({ amount }) => ({
|
|
80
|
-
messages: [{
|
|
81
|
-
role: 'user',
|
|
82
|
-
content: {
|
|
83
|
-
type: 'text',
|
|
84
|
-
text: [
|
|
85
|
-
'You are a budget assistant for a t2000 AI agent bank account.',
|
|
86
|
-
'',
|
|
87
|
-
amount ? `The user wants to know if they can afford to spend $${amount}.` : 'The user wants a spending check.',
|
|
88
|
-
'',
|
|
89
|
-
'Analyze their financial situation:',
|
|
90
|
-
'1. Check current balance (t2000_balance)',
|
|
91
|
-
'2. Check safeguard limits (t2000_config with action: "show")',
|
|
92
|
-
'3. Calculate: available balance, daily limit remaining, what percentage of total this spend represents',
|
|
93
|
-
'',
|
|
94
|
-
'Give a clear yes/no answer with context:',
|
|
95
|
-
'- Can they afford it from checking?',
|
|
96
|
-
'- Would it hit their daily send limit?',
|
|
97
|
-
'- What balance would remain after?',
|
|
98
|
-
'- If it\'s a large % of their total, flag that.',
|
|
99
|
-
].join('\n'),
|
|
100
|
-
},
|
|
101
|
-
}],
|
|
102
|
-
}));
|
|
103
|
-
server.prompt('savings-strategy', 'Analyze idle funds in checking and recommend a savings strategy — how much to save, expected yield, best rates.', async () => ({
|
|
104
|
-
messages: [{
|
|
105
|
-
role: 'user',
|
|
106
|
-
content: {
|
|
107
|
-
type: 'text',
|
|
108
|
-
text: [
|
|
109
|
-
'You are a savings advisor for a t2000 AI agent bank account.',
|
|
110
|
-
'',
|
|
111
|
-
'Analyze the user\'s funds and recommend a savings strategy:',
|
|
112
|
-
'1. Check current balance (t2000_balance) — how much is idle in checking?',
|
|
113
|
-
'2. Check current positions (t2000_positions) — what\'s already in savings?',
|
|
114
|
-
'3. Compare rates across protocols (t2000_rates) — where\'s the best yield?',
|
|
115
|
-
'',
|
|
116
|
-
'Recommend:',
|
|
117
|
-
'- How much to move from checking to savings (keep a reasonable buffer for gas + daily spending)',
|
|
118
|
-
'- Which protocol offers the best rate right now',
|
|
119
|
-
'- Expected annual yield on the recommended amount',
|
|
120
|
-
'- If they should rebalance existing savings (t2000_rebalance with dryRun: true)',
|
|
121
|
-
'- Whether investing in SUI or other assets could complement their savings strategy',
|
|
122
|
-
'- Note: investment assets (SUI, ETH) can also earn yield via t2000_invest action: "earn"',
|
|
123
|
-
'',
|
|
124
|
-
'If they want to proceed, use t2000_save to deposit. Always preview first.',
|
|
125
|
-
].join('\n'),
|
|
126
|
-
},
|
|
127
|
-
}],
|
|
128
|
-
}));
|
|
129
|
-
server.prompt('investment-strategy', 'Analyze investment portfolio, suggest strategies, review DCA schedules, and recommend next steps.', async () => ({
|
|
130
|
-
messages: [{
|
|
131
|
-
role: 'user',
|
|
132
|
-
content: {
|
|
133
|
-
type: 'text',
|
|
134
|
-
text: [
|
|
135
|
-
'You are an investment advisor for a t2000 AI agent bank account.',
|
|
136
|
-
'',
|
|
137
|
-
'Analyze the user\'s investment position:',
|
|
138
|
-
'1. Check current balance (t2000_balance) — available checking, savings, investment value',
|
|
139
|
-
'2. Check investment portfolio (t2000_portfolio) — positions, cost basis, P&L, strategy grouping',
|
|
140
|
-
'3. List available strategies (t2000_strategy action: "list") — predefined and custom',
|
|
141
|
-
'4. Check DCA schedules (t2000_auto_invest action: "status") — any active recurring buys',
|
|
142
|
-
'5. Compare current rates (t2000_rates) — yield alternatives',
|
|
143
|
-
'',
|
|
144
|
-
'Recommend:',
|
|
145
|
-
'- Portfolio allocation assessment (checking vs savings vs investment)',
|
|
146
|
-
'- Whether a predefined strategy (bluechip, layer1, sui-heavy) suits them better than picking individual assets',
|
|
147
|
-
'- If strategy positions are drifting from target weights, suggest rebalancing',
|
|
148
|
-
'- If they have no DCA schedule, recommend setting one up for dollar-cost averaging',
|
|
149
|
-
'- Whether invested assets should earn yield (t2000_invest action: "earn")',
|
|
150
|
-
'- If assets are already earning, check for better rates (t2000_invest_rebalance with dryRun: true) — moves earning positions to higher-APY protocols automatically',
|
|
151
|
-
'- Risk assessment — concentration, unrealized losses, strategy drift',
|
|
152
|
-
'',
|
|
153
|
-
'For strategies: use t2000_strategy with dryRun: true to preview before buying.',
|
|
154
|
-
'For DCA: use t2000_auto_invest action: "setup" to create recurring buys.',
|
|
155
|
-
'For direct investments: use t2000_invest with dryRun: true to preview.',
|
|
156
|
-
'For yield optimization: use t2000_invest_rebalance with dryRun: true to preview earning moves.',
|
|
157
|
-
].join('\n'),
|
|
158
|
-
},
|
|
159
|
-
}],
|
|
160
|
-
}));
|
|
161
|
-
// ---------------------------------------------------------------------------
|
|
162
|
-
// Wow-factor prompts — AI-as-financial-advisor
|
|
163
|
-
// ---------------------------------------------------------------------------
|
|
164
|
-
server.prompt('morning-briefing', 'Daily financial snapshot — balance changes, yield earned, portfolio movement, pending DCA, health warnings.', async () => ({
|
|
165
|
-
messages: [{
|
|
166
|
-
role: 'user',
|
|
167
|
-
content: {
|
|
168
|
-
type: 'text',
|
|
169
|
-
text: [
|
|
170
|
-
'You are a personal financial briefing assistant for a t2000 AI agent bank account.',
|
|
171
|
-
'',
|
|
172
|
-
'Deliver a concise morning briefing. Gather all data first, then present a single unified report.',
|
|
173
|
-
'',
|
|
174
|
-
'Data to collect:',
|
|
175
|
-
'1. Current balance breakdown (t2000_balance)',
|
|
176
|
-
'2. Yield earnings — daily rate, total earned (t2000_earnings)',
|
|
177
|
-
'3. Investment portfolio — positions, P&L movement (t2000_portfolio)',
|
|
178
|
-
'4. Health factor — any borrow risk (t2000_health)',
|
|
179
|
-
'5. Pending DCA runs (t2000_auto_invest action: "status")',
|
|
180
|
-
'6. Recent transactions since yesterday (t2000_history with limit: 10)',
|
|
181
|
-
'7. Lending positions (t2000_positions) — check for +rewards tags indicating claimable rewards',
|
|
182
|
-
'8. Investment rebalance opportunities (t2000_invest_rebalance with dryRun: true) — any earning positions on sub-optimal protocols',
|
|
183
|
-
'',
|
|
184
|
-
'Present the briefing in this structure:',
|
|
185
|
-
'',
|
|
186
|
-
'☀️ MORNING BRIEFING',
|
|
187
|
-
'───────────────────',
|
|
188
|
-
'',
|
|
189
|
-
'💰 Accounts',
|
|
190
|
-
' Checking / Savings / Credit / Investment totals',
|
|
191
|
-
' Net worth and change from yesterday if estimable',
|
|
192
|
-
' If rewards are claimable, show "Rewards: claimable"',
|
|
193
|
-
'',
|
|
194
|
-
'📈 Portfolio',
|
|
195
|
-
' Each position: asset, amount, current price, unrealized P&L',
|
|
196
|
-
' Overall portfolio performance',
|
|
197
|
-
'',
|
|
198
|
-
'💸 Yield',
|
|
199
|
-
' What you earned overnight (daily rate × time)',
|
|
200
|
-
' Current APY across savings and investment lending',
|
|
201
|
-
'',
|
|
202
|
-
'⚠️ Alerts (only if applicable)',
|
|
203
|
-
' Low health factor, pending DCA runs, strategy drift, large unrealized losses, claimable rewards',
|
|
204
|
-
'',
|
|
205
|
-
'📋 Action Items',
|
|
206
|
-
' Specific, actionable next steps (max 4)',
|
|
207
|
-
' e.g. "Claim rewards → run t2000_claim_rewards", "Run pending DCA", "Rebalance savings for +0.5% APY", "Rebalance investment earning → run t2000_invest_rebalance", "Health factor dropping — consider repaying"',
|
|
208
|
-
' If positions show +rewards, always include claiming as an action item',
|
|
209
|
-
' If investment rebalance shows opportunities, include as an action item',
|
|
210
|
-
'',
|
|
211
|
-
'Keep it scannable. No fluff. Numbers first, narrative second.',
|
|
212
|
-
].join('\n'),
|
|
213
|
-
},
|
|
214
|
-
}],
|
|
215
|
-
}));
|
|
216
|
-
server.prompt('what-if', 'Scenario planning — "What if I invest $X in Y?" Shows projected impact on portfolio, yield, and risk.', {
|
|
217
|
-
scenario: z.string().optional().describe('Scenario to evaluate, e.g. "invest $500 in bluechip" or "withdraw all savings"'),
|
|
218
|
-
}, async ({ scenario }) => ({
|
|
219
|
-
messages: [{
|
|
220
|
-
role: 'user',
|
|
221
|
-
content: {
|
|
222
|
-
type: 'text',
|
|
223
|
-
text: [
|
|
224
|
-
'You are a financial scenario planner for a t2000 AI agent bank account.',
|
|
225
|
-
'',
|
|
226
|
-
scenario
|
|
227
|
-
? `The user wants to evaluate this scenario: "${scenario}"`
|
|
228
|
-
: 'The user wants to explore a hypothetical financial scenario. Ask them what they\'re considering.',
|
|
229
|
-
'',
|
|
230
|
-
'Gather current state first:',
|
|
231
|
-
'1. Current balance (t2000_balance)',
|
|
232
|
-
'2. Current portfolio (t2000_portfolio)',
|
|
233
|
-
'3. Current positions and rates (t2000_positions, t2000_rates)',
|
|
234
|
-
'4. Health factor if they have borrows (t2000_health)',
|
|
235
|
-
'',
|
|
236
|
-
'Then model the scenario. For each scenario type:',
|
|
237
|
-
'',
|
|
238
|
-
'INVESTMENT scenario ("invest $X in Y"):',
|
|
239
|
-
' - Preview the trade (t2000_invest or t2000_strategy with dryRun: true)',
|
|
240
|
-
' - Show: checking balance after, new portfolio allocation %, concentration risk',
|
|
241
|
-
' - If the asset can earn yield, show projected annual yield',
|
|
242
|
-
' - Compare: "keeping $X in savings at Y% vs investing at historical volatility"',
|
|
243
|
-
'',
|
|
244
|
-
'SAVINGS scenario ("save $X" or "withdraw $X"):',
|
|
245
|
-
' - Show: new savings balance, new yield rate, impact on available spending',
|
|
246
|
-
' - If withdrawing: impact on health factor if they have borrows',
|
|
247
|
-
'',
|
|
248
|
-
'BORROW scenario ("borrow $X"):',
|
|
249
|
-
' - Show: new health factor, liquidation price, interest cost',
|
|
250
|
-
' - Compare: cost of borrowing vs withdrawing from savings',
|
|
251
|
-
'',
|
|
252
|
-
'EXCHANGE scenario ("swap $X of A to B"):',
|
|
253
|
-
' - Preview the swap (t2000_exchange with dryRun: true)',
|
|
254
|
-
' - Show: expected output, price impact, slippage',
|
|
255
|
-
'',
|
|
256
|
-
'Present results as:',
|
|
257
|
-
' BEFORE → AFTER comparison table',
|
|
258
|
-
' Risk assessment (better/worse/neutral)',
|
|
259
|
-
' Clear recommendation with reasoning',
|
|
260
|
-
'',
|
|
261
|
-
'Always end with: "Want me to execute this?" and the exact command that would run.',
|
|
262
|
-
].join('\n'),
|
|
263
|
-
},
|
|
264
|
-
}],
|
|
265
|
-
}));
|
|
266
|
-
server.prompt('sweep', 'Find idle funds in checking and optimally distribute across savings and investments for maximum yield.', {
|
|
267
|
-
keepBuffer: z.number().optional().describe('Dollar amount to keep in checking as spending buffer (default: $20)'),
|
|
268
|
-
}, async ({ keepBuffer }) => {
|
|
269
|
-
const buffer = keepBuffer ?? 20;
|
|
270
|
-
return {
|
|
271
|
-
messages: [{
|
|
272
|
-
role: 'user',
|
|
273
|
-
content: {
|
|
274
|
-
type: 'text',
|
|
275
|
-
text: [
|
|
276
|
-
'You are a smart money routing assistant for a t2000 AI agent bank account.',
|
|
277
|
-
'',
|
|
278
|
-
`Sweep idle checking funds into optimal earning positions. Keep $${buffer} in checking as a spending buffer.`,
|
|
279
|
-
'',
|
|
280
|
-
'Step 1 — Assess current state:',
|
|
281
|
-
' - Check balance (t2000_balance) — how much is idle in checking?',
|
|
282
|
-
' - Check positions (t2000_positions) — what\'s already earning?',
|
|
283
|
-
' - Check rates (t2000_rates) — where are the best yields?',
|
|
284
|
-
' - Check portfolio (t2000_portfolio) — any uninvested assets not earning yield?',
|
|
285
|
-
'',
|
|
286
|
-
`Step 2 — Calculate sweep amount: available checking minus $${buffer} buffer.`,
|
|
287
|
-
' If sweep amount is < $1, tell the user their funds are already optimized.',
|
|
288
|
-
'',
|
|
289
|
-
'Step 3 — Recommend allocation of the sweep amount:',
|
|
290
|
-
' - Savings: stable yield, no price risk — good for majority of idle funds',
|
|
291
|
-
' - Pick the highest-rate stablecoin protocol',
|
|
292
|
-
' - If they have investment assets not earning yield, recommend t2000_invest earn',
|
|
293
|
-
' - Check if rebalancing existing savings would help (t2000_rebalance dryRun: true)',
|
|
294
|
-
'',
|
|
295
|
-
'Step 4 — Present the sweep plan:',
|
|
296
|
-
'',
|
|
297
|
-
' 🧹 SWEEP PLAN',
|
|
298
|
-
' ─────────────',
|
|
299
|
-
` Available to sweep: $X (keeping $${buffer} buffer)`,
|
|
300
|
-
'',
|
|
301
|
-
' Action 1: Save $X USDC → Protocol (Y% APY)',
|
|
302
|
-
' Expected: ~$X.XX/month',
|
|
303
|
-
' Action 2: Earn yield on X SUI → Protocol (Y% APY) [if applicable]',
|
|
304
|
-
' Action 3: Rebalance savings → +Y% APY [if applicable]',
|
|
305
|
-
' Action 4: Rebalance investment earning → move to better protocol [if t2000_invest_rebalance dryRun shows opportunity]',
|
|
306
|
-
' Action 5: Claim rewards → collect and convert to USDC [if positions show +rewards]',
|
|
307
|
-
'',
|
|
308
|
-
' Projected monthly yield: $X.XX (before) → $X.XX (after)',
|
|
309
|
-
'',
|
|
310
|
-
'Ask: "Want me to execute this sweep?" Then run each action sequentially.',
|
|
311
|
-
'Use dryRun: true first for any action over $50.',
|
|
312
|
-
].join('\n'),
|
|
313
|
-
},
|
|
314
|
-
}],
|
|
315
|
-
};
|
|
316
|
-
});
|
|
317
|
-
server.prompt('risk-check', 'Full risk analysis — health factor, concentration, lending exposure, unrealized losses, liquidation proximity.', async () => ({
|
|
318
|
-
messages: [{
|
|
319
|
-
role: 'user',
|
|
320
|
-
content: {
|
|
321
|
-
type: 'text',
|
|
322
|
-
text: [
|
|
323
|
-
'You are a risk assessment specialist for a t2000 AI agent bank account.',
|
|
324
|
-
'',
|
|
325
|
-
'Perform a comprehensive risk analysis. Gather all data first:',
|
|
326
|
-
'1. Balance breakdown (t2000_balance)',
|
|
327
|
-
'2. Health factor (t2000_health)',
|
|
328
|
-
'3. All lending positions (t2000_positions)',
|
|
329
|
-
'4. Investment portfolio (t2000_portfolio)',
|
|
330
|
-
'5. Current rates (t2000_rates)',
|
|
331
|
-
'',
|
|
332
|
-
'Analyze and report on each risk dimension:',
|
|
333
|
-
'',
|
|
334
|
-
'🛡️ RISK REPORT',
|
|
335
|
-
'──────────────',
|
|
336
|
-
'',
|
|
337
|
-
'1. LIQUIDATION RISK',
|
|
338
|
-
' Health factor value and status (safe / moderate / warning / critical)',
|
|
339
|
-
' How much the collateral can drop before liquidation',
|
|
340
|
-
' If HF < 2.0: specific repayment recommendation to reach safe zone',
|
|
341
|
-
'',
|
|
342
|
-
'2. CONCENTRATION RISK',
|
|
343
|
-
' % of total net worth in each account type (checking, savings, investment)',
|
|
344
|
-
' % of investments in each asset (SUI, BTC, ETH, GOLD)',
|
|
345
|
-
' Flag if any single position is >50% of portfolio',
|
|
346
|
-
'',
|
|
347
|
-
'3. PROTOCOL EXPOSURE',
|
|
348
|
-
' Which protocols hold funds (NAVI, Suilend)',
|
|
349
|
-
' Total exposure per protocol',
|
|
350
|
-
' Flag if >80% of savings is in one protocol',
|
|
351
|
-
'',
|
|
352
|
-
'4. UNREALIZED LOSSES',
|
|
353
|
-
' Any investment positions currently at a loss',
|
|
354
|
-
' Total unrealized P&L',
|
|
355
|
-
' Cost basis vs current price per position',
|
|
356
|
-
'',
|
|
357
|
-
'5. YIELD EFFICIENCY',
|
|
358
|
-
' Any assets sitting idle (not earning yield)',
|
|
359
|
-
' Checking balance vs recommended buffer',
|
|
360
|
-
' Investment assets not in lending (could earn via invest earn)',
|
|
361
|
-
' Earning positions on sub-optimal protocols (run t2000_invest_rebalance dryRun: true)',
|
|
362
|
-
'',
|
|
363
|
-
'OVERALL RISK SCORE: Low / Medium / High / Critical',
|
|
364
|
-
'Based on weighted combination of all factors above.',
|
|
365
|
-
'',
|
|
366
|
-
'End with max 3 specific, prioritized actions to reduce risk.',
|
|
367
|
-
'If overall risk is Low, say so clearly — don\'t invent problems.',
|
|
368
|
-
].join('\n'),
|
|
369
|
-
},
|
|
370
|
-
}],
|
|
371
|
-
}));
|
|
372
|
-
server.prompt('weekly-recap', 'Week in review — transactions, yield earned, portfolio P&L changes, strategy performance, highlights.', async () => ({
|
|
373
|
-
messages: [{
|
|
374
|
-
role: 'user',
|
|
375
|
-
content: {
|
|
376
|
-
type: 'text',
|
|
377
|
-
text: [
|
|
378
|
-
'You are a personal finance newsletter writer for a t2000 AI agent bank account.',
|
|
379
|
-
'',
|
|
380
|
-
'Compile a weekly financial recap. Gather all data:',
|
|
381
|
-
'1. Current balance (t2000_balance)',
|
|
382
|
-
'2. Recent transactions (t2000_history with limit: 50)',
|
|
383
|
-
'3. Yield earnings (t2000_earnings)',
|
|
384
|
-
'4. Investment portfolio with P&L (t2000_portfolio)',
|
|
385
|
-
'5. Strategy statuses (t2000_strategy action: "list")',
|
|
386
|
-
'6. DCA schedule status (t2000_auto_invest action: "status")',
|
|
387
|
-
'7. Lending positions (t2000_positions) — check for claimable rewards',
|
|
388
|
-
'',
|
|
389
|
-
'Present as a weekly newsletter:',
|
|
390
|
-
'',
|
|
391
|
-
'📊 WEEKLY RECAP',
|
|
392
|
-
'───────────────',
|
|
393
|
-
'',
|
|
394
|
-
'💰 Net Worth: $X.XX',
|
|
395
|
-
' Checking: $X | Savings: $X | Investment: $X | Credit: -$X',
|
|
396
|
-
'',
|
|
397
|
-
'📈 This Week\'s Activity',
|
|
398
|
-
' Summarize transactions by type:',
|
|
399
|
-
' - X sends totaling $X',
|
|
400
|
-
' - X saves/withdrawals',
|
|
401
|
-
' - X investment trades',
|
|
402
|
-
' - X exchanges',
|
|
403
|
-
' Highlight the largest transaction',
|
|
404
|
-
'',
|
|
405
|
-
'💸 Yield Earned',
|
|
406
|
-
' Total yield this week (daily rate × 7)',
|
|
407
|
-
' Breakdown by position',
|
|
408
|
-
' Annualized projection',
|
|
409
|
-
'',
|
|
410
|
-
'📊 Portfolio Performance',
|
|
411
|
-
' Each position: asset, P&L this week, total unrealized P&L',
|
|
412
|
-
' Best performer and worst performer',
|
|
413
|
-
' Strategy performance if applicable',
|
|
414
|
-
'',
|
|
415
|
-
'🔄 DCA Status',
|
|
416
|
-
' Runs completed this week',
|
|
417
|
-
' Next scheduled run',
|
|
418
|
-
' Total invested via DCA to date',
|
|
419
|
-
'',
|
|
420
|
-
'🏆 Highlight of the Week',
|
|
421
|
-
' One standout metric (best trade, highest yield day, milestone reached)',
|
|
422
|
-
'',
|
|
423
|
-
'🎁 Rewards',
|
|
424
|
-
' Any pending protocol rewards (if positions show +rewards)',
|
|
425
|
-
' Suggest claiming if rewards are available',
|
|
426
|
-
'',
|
|
427
|
-
'👉 Next Week\'s Focus',
|
|
428
|
-
' 1-2 actionable suggestions based on trends',
|
|
429
|
-
' If investment earning positions can be rebalanced for better APY, mention it (t2000_invest_rebalance dryRun: true)',
|
|
430
|
-
'',
|
|
431
|
-
'Tone: confident, concise, data-driven. Like a Bloomberg brief, not a blog post.',
|
|
432
|
-
].join('\n'),
|
|
433
|
-
},
|
|
434
|
-
}],
|
|
435
|
-
}));
|
|
436
|
-
server.prompt('dca-advisor', 'Personalized DCA setup — "I have $X/month" → recommends strategy, frequency, asset split, projected growth.', {
|
|
437
|
-
budget: z.number().optional().describe('Monthly budget in dollars to invest'),
|
|
438
|
-
}, async ({ budget }) => ({
|
|
439
|
-
messages: [{
|
|
440
|
-
role: 'user',
|
|
441
|
-
content: {
|
|
442
|
-
type: 'text',
|
|
443
|
-
text: [
|
|
444
|
-
'You are a dollar-cost averaging advisor for a t2000 AI agent bank account.',
|
|
445
|
-
'',
|
|
446
|
-
budget
|
|
447
|
-
? `The user has $${budget}/month to invest via DCA.`
|
|
448
|
-
: 'The user wants to set up a DCA (dollar-cost averaging) schedule. Ask them their monthly budget.',
|
|
449
|
-
'',
|
|
450
|
-
'Gather context:',
|
|
451
|
-
'1. Current balance (t2000_balance) — can they afford this monthly commitment?',
|
|
452
|
-
'2. Current portfolio (t2000_portfolio) — what do they already hold?',
|
|
453
|
-
'3. Existing DCA schedules (t2000_auto_invest action: "status")',
|
|
454
|
-
'4. Available strategies (t2000_strategy action: "list")',
|
|
455
|
-
'',
|
|
456
|
-
'Recommend a DCA plan:',
|
|
457
|
-
'',
|
|
458
|
-
'📅 DCA PLAN',
|
|
459
|
-
'───────────',
|
|
460
|
-
'',
|
|
461
|
-
'STRATEGY SELECTION:',
|
|
462
|
-
' Based on their existing portfolio, recommend one of:',
|
|
463
|
-
' - bluechip (50% BTC, 30% ETH, 20% SUI) — large-cap crypto index',
|
|
464
|
-
' - all-weather (30% BTC, 20% ETH, 20% SUI, 30% GOLD) — crypto + commodities',
|
|
465
|
-
' - safe-haven (50% BTC, 50% GOLD) — store-of-value assets',
|
|
466
|
-
' - layer1 (50% ETH, 50% SUI) — smart contract platforms',
|
|
467
|
-
' - sui-heavy (60% SUI, 20% BTC, 20% ETH) — Sui-weighted portfolio',
|
|
468
|
-
' - single asset (100% SUI/BTC/ETH/GOLD) — concentrated conviction play',
|
|
469
|
-
' Explain WHY this strategy fits their situation.',
|
|
470
|
-
'',
|
|
471
|
-
'FREQUENCY:',
|
|
472
|
-
' - Weekly ($X/week) — smoothest averaging, best for volatile markets',
|
|
473
|
-
' - Monthly ($X/month) — simpler, lower gas costs',
|
|
474
|
-
' Recommend weekly for budgets > $50/month, monthly for smaller amounts.',
|
|
475
|
-
'',
|
|
476
|
-
'PROJECTION (12 months):',
|
|
477
|
-
' Total invested: $X',
|
|
478
|
-
' If prices stay flat: $X (just accumulation)',
|
|
479
|
-
' Note: past performance doesn\'t predict future results',
|
|
480
|
-
' Key benefit: removes emotion and timing risk from investing',
|
|
481
|
-
'',
|
|
482
|
-
'AFFORDABILITY CHECK:',
|
|
483
|
-
' Monthly income vs this commitment',
|
|
484
|
-
' Remaining checking buffer after DCA',
|
|
485
|
-
' Flag if DCA would eat into emergency buffer',
|
|
486
|
-
'',
|
|
487
|
-
'If they want to proceed:',
|
|
488
|
-
' Show the exact setup command:',
|
|
489
|
-
' t2000_auto_invest action: "setup", amount: X, frequency: "weekly", strategy: "name"',
|
|
490
|
-
' Preview first, then confirm.',
|
|
491
|
-
].join('\n'),
|
|
492
|
-
},
|
|
493
|
-
}],
|
|
494
|
-
}));
|
|
495
|
-
// ---------------------------------------------------------------------------
|
|
496
|
-
// Operational prompts — specific workflows
|
|
497
|
-
// ---------------------------------------------------------------------------
|
|
498
|
-
server.prompt('claim-rewards', 'Check for pending protocol rewards across all lending positions and claim them — auto-converts to USDC.', async () => ({
|
|
499
|
-
messages: [{
|
|
500
|
-
role: 'user',
|
|
501
|
-
content: {
|
|
502
|
-
type: 'text',
|
|
503
|
-
text: [
|
|
504
|
-
'You are a rewards management assistant for a t2000 AI agent bank account.',
|
|
505
|
-
'',
|
|
506
|
-
'Help the user collect their pending protocol rewards. Follow this flow:',
|
|
507
|
-
'',
|
|
508
|
-
'Step 1 — Check what\'s claimable:',
|
|
509
|
-
' - Check lending positions (t2000_positions)',
|
|
510
|
-
' - Positions with "+rewards" tags have claimable protocol rewards',
|
|
511
|
-
' - These are incentive tokens (like vSUI, sSUI, DEEP) earned from lending protocols',
|
|
512
|
-
'',
|
|
513
|
-
'Step 2 — Present findings:',
|
|
514
|
-
' If rewards are available:',
|
|
515
|
-
' Show which positions have rewards and from which protocols (NAVI, Suilend)',
|
|
516
|
-
' Explain: "These are protocol incentive tokens that accrue on your lending positions"',
|
|
517
|
-
' Ask: "Want me to claim and convert them to USDC?"',
|
|
518
|
-
'',
|
|
519
|
-
' If no rewards are claimable:',
|
|
520
|
-
' Tell the user their rewards are still accruing and to check back later',
|
|
521
|
-
' Show their current positions and APY so they know yield is being earned',
|
|
522
|
-
'',
|
|
523
|
-
'Step 3 — Execute claim:',
|
|
524
|
-
' Run t2000_claim_rewards',
|
|
525
|
-
' This claims from ALL protocols at once and auto-converts reward tokens to USDC',
|
|
526
|
-
' Show the result: USDC received, source protocols, transaction link',
|
|
527
|
-
' If received amount is small (< $0.01), explain that rewards accrue continuously and larger amounts build up over time',
|
|
528
|
-
'',
|
|
529
|
-
'Step 4 — Follow-up:',
|
|
530
|
-
' Show updated balance after claiming',
|
|
531
|
-
' Mention when to claim next (rewards accrue continuously, claiming weekly or monthly is typical)',
|
|
532
|
-
].join('\n'),
|
|
533
|
-
},
|
|
534
|
-
}],
|
|
535
|
-
}));
|
|
536
|
-
server.prompt('safeguards', 'Review account safety settings — per-transaction limits, daily caps, emergency lock, PIN-protected operations.', async () => ({
|
|
537
|
-
messages: [{
|
|
538
|
-
role: 'user',
|
|
539
|
-
content: {
|
|
540
|
-
type: 'text',
|
|
541
|
-
text: [
|
|
542
|
-
'You are a security advisor for a t2000 AI agent bank account.',
|
|
543
|
-
'',
|
|
544
|
-
'Help the user review and manage their account safeguards.',
|
|
545
|
-
'',
|
|
546
|
-
'Step 1 — Show current settings:',
|
|
547
|
-
' - Get safeguard config (t2000_config action: "show")',
|
|
548
|
-
' - Show: per-transaction limit, daily send limit, daily spent today, lock status',
|
|
549
|
-
'',
|
|
550
|
-
'Step 2 — Explain each safeguard:',
|
|
551
|
-
'',
|
|
552
|
-
' 🛡️ SAFEGUARDS',
|
|
553
|
-
' ─────────────',
|
|
554
|
-
'',
|
|
555
|
-
' Per-transaction limit: $X',
|
|
556
|
-
' Every send is checked against this cap. Prevents large unauthorized transfers.',
|
|
557
|
-
'',
|
|
558
|
-
' Daily send limit: $X',
|
|
559
|
-
' Cumulative cap across all sends in a 24-hour window.',
|
|
560
|
-
' Used today: $X of $X',
|
|
561
|
-
'',
|
|
562
|
-
' Emergency lock:',
|
|
563
|
-
' Status: Unlocked / Locked',
|
|
564
|
-
' When locked: ALL operations are frozen — sends, saves, investments, borrows',
|
|
565
|
-
' Lock via: t2000_lock (any AI agent can lock)',
|
|
566
|
-
' Unlock via: CLI only with PIN — no AI can unlock, by design',
|
|
567
|
-
'',
|
|
568
|
-
' PIN-protected operations:',
|
|
569
|
-
' - Unlocking the agent',
|
|
570
|
-
' - Exporting the private key',
|
|
571
|
-
' - Modifying safeguard limits',
|
|
572
|
-
'',
|
|
573
|
-
'Step 3 — Recommendations:',
|
|
574
|
-
' Based on their balance and activity, suggest appropriate limits',
|
|
575
|
-
' If they have large balances, recommend tighter per-tx limits',
|
|
576
|
-
' If they want to adjust: t2000_config action: "set", key: "maxPerTx" or "maxDailyUsd", value: X',
|
|
577
|
-
' Always confirm before changing limits',
|
|
578
|
-
'',
|
|
579
|
-
'Step 4 — Emergency actions:',
|
|
580
|
-
' If the user wants to lock: run t2000_lock immediately (no confirmation needed for locking)',
|
|
581
|
-
' Explain that unlocking requires the CLI: t2000 unlock (with PIN)',
|
|
582
|
-
].join('\n'),
|
|
583
|
-
},
|
|
584
|
-
}],
|
|
585
|
-
}));
|
|
586
|
-
server.prompt('quick-exchange', 'Guided token swap — preview rate, slippage, and price impact before executing.', {
|
|
587
|
-
from: z.string().optional().describe('Asset to sell (e.g. USDC, SUI)'),
|
|
588
|
-
to: z.string().optional().describe('Asset to buy (e.g. SUI, USDC)'),
|
|
589
|
-
amount: z.number().optional().describe('Amount in source asset units'),
|
|
590
|
-
}, async ({ from, to, amount }) => {
|
|
591
|
-
const context = [
|
|
592
|
-
from ? `From: ${from}` : '',
|
|
593
|
-
to ? `To: ${to}` : '',
|
|
594
|
-
amount ? `Amount: ${amount}` : '',
|
|
595
|
-
].filter(Boolean).join('\n');
|
|
596
|
-
return {
|
|
597
|
-
messages: [{
|
|
598
|
-
role: 'user',
|
|
599
|
-
content: {
|
|
600
|
-
type: 'text',
|
|
601
|
-
text: [
|
|
602
|
-
'You are an exchange assistant for a t2000 AI agent bank account.',
|
|
603
|
-
'',
|
|
604
|
-
context ? `Context:\n${context}\n` : '',
|
|
605
|
-
'Help the user swap tokens. Follow this flow:',
|
|
606
|
-
'',
|
|
607
|
-
'Step 1 — Gather details:',
|
|
608
|
-
' If from, to, or amount is missing, ask the user',
|
|
609
|
-
' Check balance (t2000_balance) to confirm they have enough',
|
|
610
|
-
' Available pairs: any combination of USDC, SUI, BTC, ETH, GOLD, USDT, USDe, USDsui',
|
|
611
|
-
'',
|
|
612
|
-
'Step 2 — Preview the swap:',
|
|
613
|
-
' Run t2000_exchange with dryRun: true',
|
|
614
|
-
' Show:',
|
|
615
|
-
' Input: X FROM → Expected output: Y TO',
|
|
616
|
-
' Rate: 1 FROM = Z TO',
|
|
617
|
-
' Price impact: X%',
|
|
618
|
-
' Slippage: X%',
|
|
619
|
-
' Fee: $X',
|
|
620
|
-
'',
|
|
621
|
-
'Step 3 — Ask for confirmation:',
|
|
622
|
-
' "Ready to execute this swap?"',
|
|
623
|
-
' If price impact > 1%, warn the user about the impact',
|
|
624
|
-
'',
|
|
625
|
-
'Step 4 — Execute:',
|
|
626
|
-
' Run t2000_exchange with dryRun: false',
|
|
627
|
-
' Show: amount received, rate, transaction link',
|
|
628
|
-
' Show updated balance',
|
|
629
|
-
].join('\n'),
|
|
630
|
-
},
|
|
631
|
-
}],
|
|
632
|
-
};
|
|
633
|
-
});
|
|
634
|
-
}
|
|
635
|
-
//# sourceMappingURL=prompts.js.map
|