@t2000/cli 0.16.29 → 0.17.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 CHANGED
@@ -229,7 +229,7 @@ t2000 init
229
229
  | `t2000 invest strategy create <name> --alloc "BTC:40,ETH:60"` | Create a custom strategy |
230
230
  | `t2000 invest strategy delete <name>` | Delete a custom strategy (must have no positions) |
231
231
 
232
- Built-in strategies: `bluechip` (BTC 50%, ETH 30%, SUI 20%), `layer1` (ETH 50%, SUI 50%), `sui-heavy` (BTC 20%, ETH 20%, SUI 60%).
232
+ Built-in strategies: `bluechip` (BTC 50%, ETH 30%, SUI 20%), `all-weather` (BTC 30%, ETH 20%, SUI 20%, GOLD 30%), `safe-haven` (BTC 50%, GOLD 50%), `layer1` (ETH 50%, SUI 50%), `sui-heavy` (BTC 20%, ETH 20%, SUI 60%).
233
233
 
234
234
  ### Auto-Invest (DCA)
235
235
 
@@ -240,7 +240,7 @@ Built-in strategies: `bluechip` (BTC 50%, ETH 30%, SUI 20%), `layer1` (ETH 50%,
240
240
  | `t2000 invest auto run` | Execute pending DCA purchases |
241
241
  | `t2000 invest auto stop [id]` | Stop one or all schedules |
242
242
 
243
- Supported assets: SUI, BTC, ETH. Dollar-denominated — `amount` is in USD.
243
+ Supported assets: SUI, BTC, ETH, GOLD. Dollar-denominated — `amount` is in USD.
244
244
 
245
245
  ### Safeguards
246
246
 
@@ -272,7 +272,7 @@ t2000 mcp uninstall
272
272
  t2000 mcp
273
273
  ```
274
274
 
275
- 21 tools, 6 prompts, safeguard enforced. See [MCP setup guide](../../docs/mcp-setup.md) for details.
275
+ 21 tools, 12 prompts, safeguard enforced. See [MCP setup guide](../../docs/mcp-setup.md) for details.
276
276
 
277
277
  ### HTTP API Server
278
278
 
@@ -20961,7 +20961,7 @@ var StdioServerTransport = class {
20961
20961
  }
20962
20962
  };
20963
20963
 
20964
- // ../../node_modules/.pnpm/@t2000+mcp@0.16.25_axios@1.13.6_typescript@5.9.3/node_modules/@t2000/mcp/dist/index.js
20964
+ // ../mcp/dist/index.js
20965
20965
  import { readFile } from "fs/promises";
20966
20966
  import { resolve } from "path";
20967
20967
  import { homedir } from "os";
@@ -21439,7 +21439,7 @@ function registerWriteTools(server, agent) {
21439
21439
  action: external_exports.enum(["list", "buy", "sell", "status", "rebalance", "create", "delete"]).describe("Strategy action to perform"),
21440
21440
  name: external_exports.string().optional().describe("Strategy name (required for all actions except 'list')"),
21441
21441
  amount: external_exports.number().optional().describe("USD amount (required for 'buy')"),
21442
- allocations: external_exports.record(external_exports.number()).optional().describe("Allocation map e.g. {SUI: 60, BTC: 20, ETH: 20} (for 'create')"),
21442
+ allocations: external_exports.record(external_exports.number()).optional().describe("Allocation map e.g. {SUI: 40, BTC: 20, ETH: 20, GOLD: 20} (for 'create')"),
21443
21443
  description: external_exports.string().optional().describe("Strategy description (for 'create')"),
21444
21444
  dryRun: external_exports.boolean().optional().describe("Preview without signing (for 'buy')")
21445
21445
  },
@@ -21809,6 +21809,346 @@ ${context}
21809
21809
  }]
21810
21810
  })
21811
21811
  );
21812
+ server.prompt(
21813
+ "morning-briefing",
21814
+ "Daily financial snapshot \u2014 balance changes, yield earned, portfolio movement, pending DCA, health warnings.",
21815
+ async () => ({
21816
+ messages: [{
21817
+ role: "user",
21818
+ content: {
21819
+ type: "text",
21820
+ text: [
21821
+ "You are a personal financial briefing assistant for a t2000 AI agent bank account.",
21822
+ "",
21823
+ "Deliver a concise morning briefing. Gather all data first, then present a single unified report.",
21824
+ "",
21825
+ "Data to collect:",
21826
+ "1. Current balance breakdown (t2000_balance)",
21827
+ "2. Yield earnings \u2014 daily rate, total earned (t2000_earnings)",
21828
+ "3. Investment portfolio \u2014 positions, P&L movement (t2000_portfolio)",
21829
+ "4. Health factor \u2014 any borrow risk (t2000_health)",
21830
+ '5. Pending DCA runs (t2000_auto_invest action: "status")',
21831
+ "6. Recent transactions since yesterday (t2000_history with limit: 10)",
21832
+ "",
21833
+ "Present the briefing in this structure:",
21834
+ "",
21835
+ "\u2600\uFE0F MORNING BRIEFING",
21836
+ "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
21837
+ "",
21838
+ "\u{1F4B0} Accounts",
21839
+ " Checking / Savings / Credit / Investment totals",
21840
+ " Net worth and change from yesterday if estimable",
21841
+ "",
21842
+ "\u{1F4C8} Portfolio",
21843
+ " Each position: asset, amount, current price, unrealized P&L",
21844
+ " Overall portfolio performance",
21845
+ "",
21846
+ "\u{1F4B8} Yield",
21847
+ " What you earned overnight (daily rate \xD7 time)",
21848
+ " Current APY across savings and investment lending",
21849
+ "",
21850
+ "\u26A0\uFE0F Alerts (only if applicable)",
21851
+ " Low health factor, pending DCA runs, strategy drift, large unrealized losses",
21852
+ "",
21853
+ "\u{1F4CB} Action Items",
21854
+ " Specific, actionable next steps (max 3)",
21855
+ ' e.g. "Run pending DCA", "Rebalance savings for +0.5% APY", "Health factor dropping \u2014 consider repaying"',
21856
+ "",
21857
+ "Keep it scannable. No fluff. Numbers first, narrative second."
21858
+ ].join("\n")
21859
+ }
21860
+ }]
21861
+ })
21862
+ );
21863
+ server.prompt(
21864
+ "what-if",
21865
+ 'Scenario planning \u2014 "What if I invest $X in Y?" Shows projected impact on portfolio, yield, and risk.',
21866
+ {
21867
+ scenario: external_exports.string().optional().describe('Scenario to evaluate, e.g. "invest $500 in bluechip" or "withdraw all savings"')
21868
+ },
21869
+ async ({ scenario }) => ({
21870
+ messages: [{
21871
+ role: "user",
21872
+ content: {
21873
+ type: "text",
21874
+ text: [
21875
+ "You are a financial scenario planner for a t2000 AI agent bank account.",
21876
+ "",
21877
+ scenario ? `The user wants to evaluate this scenario: "${scenario}"` : "The user wants to explore a hypothetical financial scenario. Ask them what they're considering.",
21878
+ "",
21879
+ "Gather current state first:",
21880
+ "1. Current balance (t2000_balance)",
21881
+ "2. Current portfolio (t2000_portfolio)",
21882
+ "3. Current positions and rates (t2000_positions, t2000_rates)",
21883
+ "4. Health factor if they have borrows (t2000_health)",
21884
+ "",
21885
+ "Then model the scenario. For each scenario type:",
21886
+ "",
21887
+ 'INVESTMENT scenario ("invest $X in Y"):',
21888
+ " - Preview the trade (t2000_invest or t2000_strategy with dryRun: true)",
21889
+ " - Show: checking balance after, new portfolio allocation %, concentration risk",
21890
+ " - If the asset can earn yield, show projected annual yield",
21891
+ ' - Compare: "keeping $X in savings at Y% vs investing at historical volatility"',
21892
+ "",
21893
+ 'SAVINGS scenario ("save $X" or "withdraw $X"):',
21894
+ " - Show: new savings balance, new yield rate, impact on available spending",
21895
+ " - If withdrawing: impact on health factor if they have borrows",
21896
+ "",
21897
+ 'BORROW scenario ("borrow $X"):',
21898
+ " - Show: new health factor, liquidation price, interest cost",
21899
+ " - Compare: cost of borrowing vs withdrawing from savings",
21900
+ "",
21901
+ 'EXCHANGE scenario ("swap $X of A to B"):',
21902
+ " - Preview the swap (t2000_exchange with dryRun: true)",
21903
+ " - Show: expected output, price impact, slippage",
21904
+ "",
21905
+ "Present results as:",
21906
+ " BEFORE \u2192 AFTER comparison table",
21907
+ " Risk assessment (better/worse/neutral)",
21908
+ " Clear recommendation with reasoning",
21909
+ "",
21910
+ 'Always end with: "Want me to execute this?" and the exact command that would run.'
21911
+ ].join("\n")
21912
+ }
21913
+ }]
21914
+ })
21915
+ );
21916
+ server.prompt(
21917
+ "sweep",
21918
+ "Find idle funds in checking and optimally distribute across savings and investments for maximum yield.",
21919
+ {
21920
+ keepBuffer: external_exports.number().optional().describe("Dollar amount to keep in checking as spending buffer (default: $20)")
21921
+ },
21922
+ async ({ keepBuffer }) => {
21923
+ const buffer = keepBuffer ?? 20;
21924
+ return {
21925
+ messages: [{
21926
+ role: "user",
21927
+ content: {
21928
+ type: "text",
21929
+ text: [
21930
+ "You are a smart money routing assistant for a t2000 AI agent bank account.",
21931
+ "",
21932
+ `Sweep idle checking funds into optimal earning positions. Keep $${buffer} in checking as a spending buffer.`,
21933
+ "",
21934
+ "Step 1 \u2014 Assess current state:",
21935
+ " - Check balance (t2000_balance) \u2014 how much is idle in checking?",
21936
+ " - Check positions (t2000_positions) \u2014 what's already earning?",
21937
+ " - Check rates (t2000_rates) \u2014 where are the best yields?",
21938
+ " - Check portfolio (t2000_portfolio) \u2014 any uninvested assets not earning yield?",
21939
+ "",
21940
+ `Step 2 \u2014 Calculate sweep amount: available checking minus $${buffer} buffer.`,
21941
+ " If sweep amount is < $1, tell the user their funds are already optimized.",
21942
+ "",
21943
+ "Step 3 \u2014 Recommend allocation of the sweep amount:",
21944
+ " - Savings: stable yield, no price risk \u2014 good for majority of idle funds",
21945
+ " - Pick the highest-rate stablecoin protocol",
21946
+ " - If they have investment assets not earning yield, recommend t2000_invest earn",
21947
+ " - Check if rebalancing existing savings would help (t2000_rebalance dryRun: true)",
21948
+ "",
21949
+ "Step 4 \u2014 Present the sweep plan:",
21950
+ "",
21951
+ " \u{1F9F9} SWEEP PLAN",
21952
+ " \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
21953
+ ` Available to sweep: $X (keeping $${buffer} buffer)`,
21954
+ "",
21955
+ " Action 1: Save $X USDC \u2192 Protocol (Y% APY)",
21956
+ " Expected: ~$X.XX/month",
21957
+ " Action 2: Earn yield on X SUI \u2192 Protocol (Y% APY) [if applicable]",
21958
+ " Action 3: Rebalance savings \u2192 +Y% APY [if applicable]",
21959
+ "",
21960
+ " Projected monthly yield: $X.XX (before) \u2192 $X.XX (after)",
21961
+ "",
21962
+ 'Ask: "Want me to execute this sweep?" Then run each action sequentially.',
21963
+ "Use dryRun: true first for any action over $50."
21964
+ ].join("\n")
21965
+ }
21966
+ }]
21967
+ };
21968
+ }
21969
+ );
21970
+ server.prompt(
21971
+ "risk-check",
21972
+ "Full risk analysis \u2014 health factor, concentration, lending exposure, unrealized losses, liquidation proximity.",
21973
+ async () => ({
21974
+ messages: [{
21975
+ role: "user",
21976
+ content: {
21977
+ type: "text",
21978
+ text: [
21979
+ "You are a risk assessment specialist for a t2000 AI agent bank account.",
21980
+ "",
21981
+ "Perform a comprehensive risk analysis. Gather all data first:",
21982
+ "1. Balance breakdown (t2000_balance)",
21983
+ "2. Health factor (t2000_health)",
21984
+ "3. All lending positions (t2000_positions)",
21985
+ "4. Investment portfolio (t2000_portfolio)",
21986
+ "5. Current rates (t2000_rates)",
21987
+ "",
21988
+ "Analyze and report on each risk dimension:",
21989
+ "",
21990
+ "\u{1F6E1}\uFE0F RISK REPORT",
21991
+ "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
21992
+ "",
21993
+ "1. LIQUIDATION RISK",
21994
+ " Health factor value and status (safe / moderate / warning / critical)",
21995
+ " How much the collateral can drop before liquidation",
21996
+ " If HF < 2.0: specific repayment recommendation to reach safe zone",
21997
+ "",
21998
+ "2. CONCENTRATION RISK",
21999
+ " % of total net worth in each account type (checking, savings, investment)",
22000
+ " % of investments in each asset (SUI, BTC, ETH, GOLD)",
22001
+ " Flag if any single position is >50% of portfolio",
22002
+ "",
22003
+ "3. PROTOCOL EXPOSURE",
22004
+ " Which protocols hold funds (NAVI, Suilend)",
22005
+ " Total exposure per protocol",
22006
+ " Flag if >80% of savings is in one protocol",
22007
+ "",
22008
+ "4. UNREALIZED LOSSES",
22009
+ " Any investment positions currently at a loss",
22010
+ " Total unrealized P&L",
22011
+ " Cost basis vs current price per position",
22012
+ "",
22013
+ "5. YIELD EFFICIENCY",
22014
+ " Any assets sitting idle (not earning yield)",
22015
+ " Checking balance vs recommended buffer",
22016
+ " Investment assets not in lending (could earn via invest earn)",
22017
+ "",
22018
+ "OVERALL RISK SCORE: Low / Medium / High / Critical",
22019
+ "Based on weighted combination of all factors above.",
22020
+ "",
22021
+ "End with max 3 specific, prioritized actions to reduce risk.",
22022
+ "If overall risk is Low, say so clearly \u2014 don't invent problems."
22023
+ ].join("\n")
22024
+ }
22025
+ }]
22026
+ })
22027
+ );
22028
+ server.prompt(
22029
+ "weekly-recap",
22030
+ "Week in review \u2014 transactions, yield earned, portfolio P&L changes, strategy performance, highlights.",
22031
+ async () => ({
22032
+ messages: [{
22033
+ role: "user",
22034
+ content: {
22035
+ type: "text",
22036
+ text: [
22037
+ "You are a personal finance newsletter writer for a t2000 AI agent bank account.",
22038
+ "",
22039
+ "Compile a weekly financial recap. Gather all data:",
22040
+ "1. Current balance (t2000_balance)",
22041
+ "2. Recent transactions (t2000_history with limit: 50)",
22042
+ "3. Yield earnings (t2000_earnings)",
22043
+ "4. Investment portfolio with P&L (t2000_portfolio)",
22044
+ '5. Strategy statuses (t2000_strategy action: "list")',
22045
+ '6. DCA schedule status (t2000_auto_invest action: "status")',
22046
+ "",
22047
+ "Present as a weekly newsletter:",
22048
+ "",
22049
+ "\u{1F4CA} WEEKLY RECAP",
22050
+ "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
22051
+ "",
22052
+ "\u{1F4B0} Net Worth: $X.XX",
22053
+ " Checking: $X | Savings: $X | Investment: $X | Credit: -$X",
22054
+ "",
22055
+ "\u{1F4C8} This Week's Activity",
22056
+ " Summarize transactions by type:",
22057
+ " - X sends totaling $X",
22058
+ " - X saves/withdrawals",
22059
+ " - X investment trades",
22060
+ " - X exchanges",
22061
+ " Highlight the largest transaction",
22062
+ "",
22063
+ "\u{1F4B8} Yield Earned",
22064
+ " Total yield this week (daily rate \xD7 7)",
22065
+ " Breakdown by position",
22066
+ " Annualized projection",
22067
+ "",
22068
+ "\u{1F4CA} Portfolio Performance",
22069
+ " Each position: asset, P&L this week, total unrealized P&L",
22070
+ " Best performer and worst performer",
22071
+ " Strategy performance if applicable",
22072
+ "",
22073
+ "\u{1F504} DCA Status",
22074
+ " Runs completed this week",
22075
+ " Next scheduled run",
22076
+ " Total invested via DCA to date",
22077
+ "",
22078
+ "\u{1F3C6} Highlight of the Week",
22079
+ " One standout metric (best trade, highest yield day, milestone reached)",
22080
+ "",
22081
+ "\u{1F449} Next Week's Focus",
22082
+ " 1-2 actionable suggestions based on trends",
22083
+ "",
22084
+ "Tone: confident, concise, data-driven. Like a Bloomberg brief, not a blog post."
22085
+ ].join("\n")
22086
+ }
22087
+ }]
22088
+ })
22089
+ );
22090
+ server.prompt(
22091
+ "dca-advisor",
22092
+ 'Personalized DCA setup \u2014 "I have $X/month" \u2192 recommends strategy, frequency, asset split, projected growth.',
22093
+ {
22094
+ budget: external_exports.number().optional().describe("Monthly budget in dollars to invest")
22095
+ },
22096
+ async ({ budget }) => ({
22097
+ messages: [{
22098
+ role: "user",
22099
+ content: {
22100
+ type: "text",
22101
+ text: [
22102
+ "You are a dollar-cost averaging advisor for a t2000 AI agent bank account.",
22103
+ "",
22104
+ budget ? `The user has $${budget}/month to invest via DCA.` : "The user wants to set up a DCA (dollar-cost averaging) schedule. Ask them their monthly budget.",
22105
+ "",
22106
+ "Gather context:",
22107
+ "1. Current balance (t2000_balance) \u2014 can they afford this monthly commitment?",
22108
+ "2. Current portfolio (t2000_portfolio) \u2014 what do they already hold?",
22109
+ '3. Existing DCA schedules (t2000_auto_invest action: "status")',
22110
+ '4. Available strategies (t2000_strategy action: "list")',
22111
+ "",
22112
+ "Recommend a DCA plan:",
22113
+ "",
22114
+ "\u{1F4C5} DCA PLAN",
22115
+ "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
22116
+ "",
22117
+ "STRATEGY SELECTION:",
22118
+ " Based on their existing portfolio, recommend one of:",
22119
+ " - bluechip (50% BTC, 30% ETH, 20% SUI) \u2014 large-cap crypto index",
22120
+ " - all-weather (30% BTC, 20% ETH, 20% SUI, 30% GOLD) \u2014 crypto + commodities",
22121
+ " - safe-haven (50% BTC, 50% GOLD) \u2014 store-of-value assets",
22122
+ " - layer1 (50% ETH, 50% SUI) \u2014 smart contract platforms",
22123
+ " - sui-heavy (60% SUI, 20% BTC, 20% ETH) \u2014 Sui-weighted portfolio",
22124
+ " - single asset (100% SUI/BTC/ETH/GOLD) \u2014 concentrated conviction play",
22125
+ " Explain WHY this strategy fits their situation.",
22126
+ "",
22127
+ "FREQUENCY:",
22128
+ " - Weekly ($X/week) \u2014 smoothest averaging, best for volatile markets",
22129
+ " - Monthly ($X/month) \u2014 simpler, lower gas costs",
22130
+ " Recommend weekly for budgets > $50/month, monthly for smaller amounts.",
22131
+ "",
22132
+ "PROJECTION (12 months):",
22133
+ " Total invested: $X",
22134
+ " If prices stay flat: $X (just accumulation)",
22135
+ " Note: past performance doesn't predict future results",
22136
+ " Key benefit: removes emotion and timing risk from investing",
22137
+ "",
22138
+ "AFFORDABILITY CHECK:",
22139
+ " Monthly income vs this commitment",
22140
+ " Remaining checking buffer after DCA",
22141
+ " Flag if DCA would eat into emergency buffer",
22142
+ "",
22143
+ "If they want to proceed:",
22144
+ " Show the exact setup command:",
22145
+ ' t2000_auto_invest action: "setup", amount: X, frequency: "weekly", strategy: "name"',
22146
+ " Preview first, then confirm."
22147
+ ].join("\n")
22148
+ }
22149
+ }]
22150
+ })
22151
+ );
21812
22152
  }
21813
22153
  async function startMcpServer(opts) {
21814
22154
  const agent = await createAgent(opts?.keyPath);
@@ -21818,7 +22158,7 @@ async function startMcpServer(opts) {
21818
22158
  );
21819
22159
  process.exit(1);
21820
22160
  }
21821
- const server = new McpServer({ name: "t2000", version: "0.13.0" });
22161
+ const server = new McpServer({ name: "t2000", version: "0.16.30" });
21822
22162
  registerReadTools(server, agent);
21823
22163
  registerWriteTools(server, agent);
21824
22164
  registerSafetyTools(server, agent);
@@ -21829,4 +22169,4 @@ async function startMcpServer(opts) {
21829
22169
  export {
21830
22170
  startMcpServer
21831
22171
  };
21832
- //# sourceMappingURL=dist-5OPQU5C7.js.map
22172
+ //# sourceMappingURL=dist-S4OOC4XZ.js.map