@t2000/engine 0.7.0 → 0.7.1
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 +6 -2
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -87,7 +87,7 @@ QueryEngine.submitMessage()
|
|
|
87
87
|
|
|
88
88
|
## Built-in Tools
|
|
89
89
|
|
|
90
|
-
### Read Tools (
|
|
90
|
+
### Read Tools (19 — parallel, auto-approved)
|
|
91
91
|
|
|
92
92
|
| Tool | Description |
|
|
93
93
|
|------|-------------|
|
|
@@ -100,6 +100,9 @@ QueryEngine.submitMessage()
|
|
|
100
100
|
| `web_search` | Web search via Brave Search API |
|
|
101
101
|
| `swap_quote` | Preview swap route, output amount, and price impact (no execution) |
|
|
102
102
|
| `volo_stats` | VOLO liquid staking stats — vSUI/SUI rate, APY, TVL |
|
|
103
|
+
| `portfolio_analysis` | Portfolio breakdown with diversification insights |
|
|
104
|
+
| `protocol_deep_dive` | Deep protocol analysis — TVL, yields, risks, alternatives |
|
|
105
|
+
| `mpp_services` | Browse available MPP gateway services and endpoints |
|
|
103
106
|
| `defillama_yield_pools` | Top yield pools by APY, filterable by chain |
|
|
104
107
|
| `defillama_protocol_info` | Protocol TVL, category, chains |
|
|
105
108
|
| `defillama_token_prices` | Current USD prices for Sui tokens |
|
|
@@ -108,7 +111,7 @@ QueryEngine.submitMessage()
|
|
|
108
111
|
| `defillama_protocol_fees` | Protocol fees/revenue rankings |
|
|
109
112
|
| `defillama_sui_protocols` | Sui ecosystem protocols — TVL, category, changes |
|
|
110
113
|
|
|
111
|
-
### Write Tools (
|
|
114
|
+
### Write Tools (11 — serial, confirmation required)
|
|
112
115
|
|
|
113
116
|
| Tool | Description |
|
|
114
117
|
|------|-------------|
|
|
@@ -122,6 +125,7 @@ QueryEngine.submitMessage()
|
|
|
122
125
|
| `swap_execute` | Swap any token pair via Cetus Aggregator (20+ DEXs) |
|
|
123
126
|
| `volo_stake` | Stake SUI for vSUI (VOLO liquid staking) |
|
|
124
127
|
| `volo_unstake` | Unstake vSUI back to SUI |
|
|
128
|
+
| `save_contact` | Save a contact name + address for quick sends |
|
|
125
129
|
|
|
126
130
|
## Configuration
|
|
127
131
|
|
package/dist/index.js
CHANGED
|
@@ -336,11 +336,10 @@ function transformRewards(raw) {
|
|
|
336
336
|
var STABLECOIN_SYMBOLS = /* @__PURE__ */ new Set([
|
|
337
337
|
"USDC",
|
|
338
338
|
"USDT",
|
|
339
|
+
"USDe",
|
|
340
|
+
"USDsui",
|
|
339
341
|
"wUSDC",
|
|
340
342
|
"wUSDT",
|
|
341
|
-
"FDUSD",
|
|
342
|
-
"AUSD",
|
|
343
|
-
"BUCK",
|
|
344
343
|
"suiUSDe",
|
|
345
344
|
"USDSUI"
|
|
346
345
|
]);
|
|
@@ -539,7 +538,7 @@ var balanceCheckTool = buildTool({
|
|
|
539
538
|
let availableUsd = 0;
|
|
540
539
|
let stablesUsd = 0;
|
|
541
540
|
let gasReserveUsd2 = 0;
|
|
542
|
-
const STABLE_SYMBOLS = /* @__PURE__ */ new Set(["USDC", "USDT", "
|
|
541
|
+
const STABLE_SYMBOLS = /* @__PURE__ */ new Set(["USDC", "USDT", "USDe", "USDsui", "wUSDC", "wUSDT"]);
|
|
543
542
|
const holdings = [];
|
|
544
543
|
for (const coin of coins) {
|
|
545
544
|
const balance2 = Number(coin.totalBalance) / 10 ** coin.decimals;
|
|
@@ -578,6 +577,7 @@ var balanceCheckTool = buildTool({
|
|
|
578
577
|
debt = posEntries.filter((p) => p.type === "borrow").reduce((sum, p) => sum + p.valueUsd, 0);
|
|
579
578
|
pendingRewardsUsd = rewardEntries.reduce((sum, r) => sum + r.valueUsd, 0);
|
|
580
579
|
}
|
|
580
|
+
const visibleHoldings = holdings.filter((h) => h.usdValue >= 0.01).sort((a, b) => b.usdValue - a.usdValue);
|
|
581
581
|
const bal = {
|
|
582
582
|
available: availableUsd,
|
|
583
583
|
savings,
|
|
@@ -586,7 +586,7 @@ var balanceCheckTool = buildTool({
|
|
|
586
586
|
gasReserve: gasReserveUsd2,
|
|
587
587
|
total: availableUsd + savings + gasReserveUsd2 + pendingRewardsUsd - debt,
|
|
588
588
|
stables: stablesUsd,
|
|
589
|
-
holdings:
|
|
589
|
+
holdings: visibleHoldings
|
|
590
590
|
};
|
|
591
591
|
return {
|
|
592
592
|
data: bal,
|
|
@@ -1710,7 +1710,7 @@ ${summary}`
|
|
|
1710
1710
|
var inputSchema3 = z.object({
|
|
1711
1711
|
address: z.string().optional().describe("Sui address to analyze (defaults to connected wallet)")
|
|
1712
1712
|
});
|
|
1713
|
-
var STABLECOINS = /* @__PURE__ */ new Set(["USDC", "USDT", "USDe", "USDsui"
|
|
1713
|
+
var STABLECOINS = /* @__PURE__ */ new Set(["USDC", "USDT", "USDe", "USDsui"]);
|
|
1714
1714
|
var portfolioAnalysisTool = buildTool({
|
|
1715
1715
|
name: "portfolio_analysis",
|
|
1716
1716
|
description: "Analyze portfolio allocation, risk exposure, and yield optimization. Shows asset breakdown, diversification score, health factor assessment, and actionable suggestions.",
|