@t2000/cli 0.22.8 → 0.22.9

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 CHANGED
@@ -32,7 +32,7 @@ t2000 init
32
32
  ✓ Keypair generated
33
33
  ✓ Network Sui mainnet
34
34
  ✓ Gas sponsorship enabled
35
- ✓ Checking ✓ Savings ✓ Credit ✓ Exchange ✓ Investment
35
+ ✓ Checking ✓ Savings ✓ Credit ✓ Trade
36
36
 
37
37
  🎉 Bank account created
38
38
  Address: 0x8b3e...d412
@@ -96,26 +96,26 @@ t2000 init
96
96
  Gas: 0.31 SUI (~$0.28)
97
97
  ──────────────────────────────────────
98
98
  Total: $85.28
99
- ❯ t2000 invest buy 100 SUI
99
+ ❯ t2000 buy 100 SUI
100
100
  ✓ Bought 105.26 SUI at $0.95
101
101
  Invested: $100.00
102
102
  Portfolio: 105.26 SUI (avg $0.95)
103
103
  Tx: https://suiscan.xyz/mainnet/tx/...
104
104
 
105
- ❯ t2000 invest buy 500 BTC
105
+ ❯ t2000 buy 500 BTC
106
106
  ✓ Bought 0.00512820 BTC at $97,500.00
107
107
  Invested: $500.00
108
108
  Portfolio: 0.00512820 BTC (avg $97,500.00)
109
109
  Tx: https://suiscan.xyz/mainnet/tx/...
110
110
 
111
- ❯ t2000 invest buy 200 ETH
111
+ ❯ t2000 buy 200 ETH
112
112
  ✓ Bought 0.10526316 ETH at $1,900.00
113
113
  Invested: $200.00
114
114
  Portfolio: 0.10526316 ETH (avg $1,900.00)
115
115
  Tx: https://suiscan.xyz/mainnet/tx/...
116
116
 
117
117
  ❯ t2000 portfolio
118
- Investment Portfolio
118
+ Trade Portfolio
119
119
  ─────────────────────────────────────────────────────
120
120
  SUI 105.26000000 Avg: $0.95 Now: $0.97 APY: 2.10% +$2.10 (+2.1%)
121
121
  BTC 0.00512820 Avg: $97,500 Now: $98,200 — +$3.59 (+0.7%)
@@ -200,7 +200,6 @@ t2000 init
200
200
  | `t2000 borrow <amount>` | Borrow USDC against savings collateral |
201
201
  | `t2000 repay <amount>` | Repay outstanding debt (auto-swaps USDC to borrowed asset if non-USDC). Use `repay all` for full repayment. |
202
202
  | `t2000 rebalance [--dry-run]` | Optimize yield — move savings to best rate across protocols and stablecoins internally |
203
- | `t2000 exchange <amount> <from> <to>` | Exchange tokens via Cetus DEX (e.g. `t2000 exchange 5 USDC SUI`). Options: `--slippage <pct>` (default: 3%) |
204
203
  | `t2000 health` | Check savings health factor |
205
204
  | `t2000 rates` | Best save/borrow APYs across protocols and all stablecoins |
206
205
  | `t2000 positions` | Open savings & borrow positions across all assets |
@@ -242,16 +241,19 @@ t2000 init
242
241
  | `t2000 contacts add <name> <address>` | Save a named contact |
243
242
  | `t2000 contacts remove <name>` | Remove a contact |
244
243
 
245
- ### Investment
244
+ ### Trade
246
245
 
247
246
  | Command | Description |
248
247
  |---------|-------------|
249
- | `t2000 invest buy <amount> <asset>` | Buy crypto with USDC (e.g. `t2000 invest buy 500 BTC`) |
250
- | `t2000 invest sell <amount\|all> <asset>` | Sell crypto back to USDC (auto-withdraws if earning) |
251
- | `t2000 invest earn <asset>` | Deposit invested asset into best-rate lending for yield |
248
+ | `t2000 buy <amount> <asset>` | Buy crypto with USDC (e.g. `t2000 buy 500 BTC`) |
249
+ | `t2000 sell <amount\|all> <asset>` | Sell crypto back to USDC (auto-withdraws if earning) |
250
+ | `t2000 swap <amount> <from> <to>` | Swap tokens via Cetus DEX (e.g. `t2000 swap 5 USDC SUI`) |
251
+ | `t2000 invest earn <asset>` | Deposit held asset into best-rate lending for yield |
252
252
  | `t2000 invest unearn <asset>` | Withdraw from lending, keep in portfolio |
253
253
  | `t2000 invest rebalance` | Move earning positions to better-rate protocols |
254
- | `t2000 portfolio` | View investment portfolio with cost-basis P&L (strategy grouping) |
254
+ | `t2000 portfolio` | View trade portfolio with cost-basis P&L (strategy grouping) |
255
+
256
+ > **Deprecated:** `t2000 exchange` still works but prints a deprecation notice — use `t2000 swap`. `t2000 invest buy` / `t2000 invest sell` still work but are deprecated — use `t2000 buy` / `t2000 sell`.
255
257
 
256
258
  ### Strategies (PTB Atomic)
257
259
 
@@ -378,7 +380,7 @@ All multi-step operations (save with auto-convert, withdraw with auto-swap, reba
378
380
  |-----------|-----|
379
381
  | Save | 0.1% |
380
382
  | Borrow | 0.05% |
381
- | Exchange | **Free** |
383
+ | Swap | **Free** |
382
384
  | Withdraw | Free |
383
385
  | Repay | Free |
384
386
  | Send | Free |
@@ -21206,7 +21206,7 @@ IMPORTANT: When the user asks to do something that matches an MPP service, ALWAY
21206
21206
  - Code execution, web scraping, screenshots, PDFs, QR codes
21207
21207
  - Transcription, text-to-speech, sound effects (ElevenLabs)
21208
21208
  - Security scanning (VirusTotal), URL shortening (Short.io), push notifications (Pushover)
21209
- - Gift cards with email delivery (Reloadly) \u2014 include recipientEmail in order body for instant delivery
21209
+ - Gift cards with email delivery (Reloadly) \u2014 ask user for country and email, then browse products and order
21210
21210
 
21211
21211
  Call t2000_services first to discover the right endpoint, then t2000_pay to execute.`,
21212
21212
  {},
@@ -21517,7 +21517,7 @@ function registerWriteTools(server, agent) {
21517
21517
  try {
21518
21518
  if (dryRun) {
21519
21519
  agent.enforcer.assertNotLocked();
21520
- const quote = await agent.exchangeQuote({ from, to, amount });
21520
+ const quote = await agent.swapQuote({ from, to, amount });
21521
21521
  return {
21522
21522
  content: [{
21523
21523
  type: "text",
@@ -21534,7 +21534,7 @@ function registerWriteTools(server, agent) {
21534
21534
  };
21535
21535
  }
21536
21536
  const result = await mutex.run(
21537
- () => agent.exchange({ from, to, amount, maxSlippage })
21537
+ () => agent.swap({ from, to, amount, maxSlippage })
21538
21538
  );
21539
21539
  return { content: [{ type: "text", text: JSON.stringify(result) }] };
21540
21540
  } catch (err) {
@@ -21789,11 +21789,13 @@ Common examples:
21789
21789
  - Mistral: POST https://mpp.t2000.ai/mistral/v1/chat/completions {"model":"mistral-large-latest","messages":[{"role":"user","content":"Hello"}]}
21790
21790
  - Cohere: POST https://mpp.t2000.ai/cohere/v1/chat {"model":"command-r-plus","message":"Hello"}
21791
21791
 
21792
- RELOADLY GIFT CARDS: Always include "recipientEmail" in the order body \u2014 Reloadly sends the gift card directly to that email with a "Redeem Now" button. For the agent response, construct clickable redemption links for major brands:
21793
- - Amazon: https://www.amazon.com/gc/redeem?claimCode={code}
21794
- - Google Play: https://play.google.com/redeem?code={code}
21795
- - Others: show the code + Reloadly's redeemInstruction.concise field
21796
- Set maxPrice higher for gift cards (e.g. $50 for a $25 card to cover markup).`,
21792
+ RELOADLY GIFT CARDS:
21793
+ - Ask the user for their country and email if not already known in the conversation.
21794
+ - First browse: POST /reloadly/v1/products {"countryCode":"AU"} to find the right productId for their country.
21795
+ - Then order: POST /reloadly/v1/order {"productId":XXXX,"unitPrice":25,"countryCode":"AU","recipientEmail":"user@email.com"}
21796
+ - Reloadly emails the gift card with a "Redeem Now" button.
21797
+ - Redemption links: Amazon https://www.amazon.com/gc/redeem?claimCode={code}, Google Play https://play.google.com/redeem?code={code}, others show code + redeemInstruction.concise.
21798
+ - Set maxPrice higher for gift cards (e.g. $50 for a $25 card to cover 5% markup).`,
21797
21799
  {
21798
21800
  url: external_exports.string().describe("Full URL of the MPP service endpoint (use t2000_services to discover available URLs)"),
21799
21801
  method: external_exports.enum(["GET", "POST", "PUT", "DELETE"]).default("POST").describe("HTTP method (most services use POST)"),
@@ -22155,7 +22157,7 @@ ${context}
22155
22157
  "",
22156
22158
  "AUTO-FUNDING: If checking balance is insufficient but savings exist,",
22157
22159
  " the SDK auto-withdraws from savings to fund the investment.",
22158
- " Do NOT manually withdraw first \u2014 just call t2000_strategy buy or t2000_invest buy directly.",
22160
+ ' Do NOT manually withdraw first \u2014 just call t2000_strategy buy or t2000_invest with action: "buy" directly.',
22159
22161
  "",
22160
22162
  'For DCA: use t2000_auto_invest action: "setup" to create recurring buys.'
22161
22163
  ].join("\n")
@@ -22239,7 +22241,7 @@ ${context}
22239
22241
  'For BORROW scenarios ("borrow $X"):',
22240
22242
  " - Show new health factor and interest cost",
22241
22243
  "",
22242
- 'For EXCHANGE scenarios ("swap $X A to B"):',
22244
+ 'For SWAP scenarios ("swap $X A to B", "buy $X BTC", "sell 0.1 ETH"):',
22243
22245
  " - Call t2000_exchange with dryRun: true",
22244
22246
  "",
22245
22247
  "ALWAYS present results as a BEFORE \u2192 AFTER comparison table:",
@@ -22354,7 +22356,7 @@ ${context}
22354
22356
  "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
22355
22357
  "",
22356
22358
  "\u{1F4B0} Net Worth: $X \u2014 Checking $X | Savings $X | Investment $X",
22357
- "\u{1F4C8} Activity: X sends, X saves, X trades, X exchanges",
22359
+ "\u{1F4C8} Activity: X sends, X saves, X trades, X swaps",
22358
22360
  "\u{1F4B8} Yield: $X.XX this week, X% APY, $X/month projected",
22359
22361
  "\u{1F4CA} Portfolio: Per-asset P&L, best & worst performer",
22360
22362
  "\u{1F504} DCA: Runs this week, next run, total invested",
@@ -22506,7 +22508,7 @@ ${context}
22506
22508
  })
22507
22509
  );
22508
22510
  server.prompt(
22509
- "quick-exchange",
22511
+ "quick-swap",
22510
22512
  "Guided token swap \u2014 preview rate, slippage, and price impact before executing.",
22511
22513
  {
22512
22514
  from: external_exports.string().optional().describe("Asset to sell (e.g. USDC, SUI)"),
@@ -22525,7 +22527,7 @@ ${context}
22525
22527
  content: {
22526
22528
  type: "text",
22527
22529
  text: [
22528
- "You are an exchange assistant for a t2000 AI agent bank account.",
22530
+ "You are a swap assistant for a t2000 AI agent bank account.",
22529
22531
  "",
22530
22532
  context ? `Context:
22531
22533
  ${context}
@@ -22823,4 +22825,4 @@ async function startMcpServer(opts) {
22823
22825
  export {
22824
22826
  startMcpServer
22825
22827
  };
22826
- //# sourceMappingURL=dist-NXFA54RO.js.map
22828
+ //# sourceMappingURL=dist-3RLXPNZ5.js.map