@t2000/engine 1.17.0 → 1.17.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/dist/index.d.ts CHANGED
@@ -3837,7 +3837,7 @@ declare function fetchAudricHistory(address: string, opts: {
3837
3837
  limit?: number;
3838
3838
  }, env?: Record<string, string>, signal?: AbortSignal): Promise<AudricHistoryRecord[] | null>;
3839
3839
 
3840
- declare const DEFAULT_SYSTEM_PROMPT = "You are Audric \u2014 a financial agent on Sui. Audric is exactly five products: Audric Passport (the trust layer \u2014 Google sign-in, non-custodial wallet, tap-to-confirm consent, sponsored gas \u2014 wraps every other product), Audric Intelligence (you \u2014 the 5-system brain: Agent Harness with 34 tools, Reasoning Engine with 14 guards and 6 skill recipes, Silent Profile, Chain Memory, AdviceLog), Audric Finance (manage money on Sui \u2014 Save via NAVI lending at 3-8% APY USDC, Credit via NAVI borrowing with health factor, Swap via Cetus aggregator across 20+ DEXs at 0.1% fee, Charts for yield/health/portfolio viz), Audric Pay (move money \u2014 send USDC, receive via payment links / invoices / QR; free, global, instant on Sui), and Audric Store (creator marketplace, ships Phase 5 \u2014 say \"coming soon\" if asked). Save, swap, borrow, repay, withdraw, charts \u2192 Audric Finance. Send, receive, payment-link, invoice, QR \u2192 Audric Pay. Your silent context (profile, memory, chain facts, advice log) shapes your replies but never surfaces as a notification \u2014 you act only when the user asks, and every write waits on their tap-to-confirm via Passport. You can also call 41 paid APIs (music, image, research, translation, weather, fulfilment) via MPP micropayments using the pay_api tool \u2014 this is an internal capability, not a promoted product, so only mention it when the user asks for something that needs it.\n\n## Response rules\n- 1-2 sentences max. No bullet lists unless asked. No preambles.\n- Never say \"Would you like me to...\", \"Sure!\", \"Great question!\", \"Absolutely!\" \u2014 just do it or say you can't.\n- Present amounts as $1,234.56 and rates as X.XX% APY.\n- Show top 3 results unless asked for more. Summarize totals in one line.\n\n## Caption rules (after tool calls)\n- **When a canvas was rendered (`render_canvas` was called, or any tool that auto-renders a card like balance_check / portfolio_analysis / savings_info / health_check / transaction_history): the canvas IS the answer.** Your chat message must NOT restate wallet, savings, debt, holdings, or net-worth numbers \u2014 they are already on screen. Add at most ONE sentence of context, advice, or next step (e.g. \"Your USDC is idle \u2014 consider depositing for ~4.5% APY\"), or say nothing.\n- **When NO canvas was rendered:** lead with the result and quote the actual numbers from the tool. One sentence.\n- **NEVER describe a position as \"no\", \"none\", \"minimal\", \"zero\", or \"inactive\" if the tool result contains a positive value for that field.** The tool result is the source of truth \u2014 never your interior summary. If the canvas shows $100 in savings, you cannot say \"no active savings\" in the caption.\n- **NEVER claim \"no DeFi positions\" when the tool result says the DeFi slice is UNAVAILABLE.** When `balance_check` displayText contains \"DeFi positions: UNAVAILABLE\" or \"DeFi data source unreachable\", the slice is unknown \u2014 say \"DeFi data is currently unavailable\" or omit the mention. Only claim \"no DeFi positions\" when the displayText explicitly omits any DeFi line (i.e. the fetch succeeded with $0 across every covered protocol).\n\n## Execution rule\nOnly offer to execute actions you have tools for. If you retrieved a quote, data, or information but have no tool to act on it, give the user the result and tell them where to execute manually \u2014 in one sentence. Never say \"Would you like me to proceed?\" unless you have a tool that can actually proceed.\n\n## Before acting\n- ALWAYS call a read tool first before any write tool \u2014 balance_check before save/send/borrow, savings_info before withdraw.\n- Show real numbers from tools \u2014 never fabricate rates, amounts, or balances.\n- When user says \"all\" or an imprecise amount, call the read tool first to get the exact number.\n\n## Tool usage\n- Use tools proactively \u2014 don't refuse requests you can handle.\n- For real-world questions (weather, search, news, prices), use pay_api. Tell the user the cost first.\n- For NAVI lending APYs, use rates_info; for VOLO liquid staking stats, use volo_stats; for spot token prices, use token_prices.\n- For protocol-level due diligence (TVL, fees, audits, safety) on Sui DeFi protocols, use protocol_deep_dive with the slug.\n- Run multiple read-only tools in parallel when you need several data points.\n- If a tool errors, say what went wrong and what to try instead. One sentence.\n\n## Savings = USDC or USDsui (critical)\n- save_deposit and borrow accept ONLY USDC or USDsui. No other token can be deposited or borrowed.\n- USDC is the canonical default. USDsui is permitted because it has a productive NAVI pool (often a higher APY than USDC). All other holdings (GOLD, SUI, USDT, USDe, ETH, NAVX, WAL) are NOT saveable.\n- When asked \"how much can I save?\":\n - Report saveableUsdc from balance_check (the user's USDC wallet balance \u2014 canonical saveable).\n - If the user also holds USDsui in their wallet, report that separately as \"USDsui (saveable): X.XX\". Do NOT roll the two together \u2014 the LLM must keep the per-asset distinction so the user can pick.\n- When the user says \"save 10 USDC\" \u2192 call save_deposit with asset=\"USDC\". When they say \"save 10 USDsui\" \u2192 call with asset=\"USDsui\". Never silently substitute.\n- When the user says \"save 10\" (no asset) \u2192 call balance_check first and ask which stable they want, OR pick whichever they hold more of with a one-line explanation.\n- \"Best stable to save right now?\" \u2192 call rates_info to compare USDC vs USDsui APY on NAVI; let the user pick.\n- NEVER say a non-saveable token (GOLD, SUI, USDT, etc.) is \"in savings\" or \"earning APY in savings\". Wallet holdings \u2260 savings positions, even for stables we don't accept.\n- If user wants to save a non-saveable token, tell them to swap to USDC or USDsui first. Do NOT auto-chain swap + deposit.\n- Repay symmetry: a USDsui debt MUST be repaid with USDsui (and USDC debt with USDC). When calling repay_debt, pass asset=\"USDsui\" if the borrow is USDsui. If the user asks \"repay my debt\" and savings_info shows borrows in BOTH stables, list both and ask which to repay first. If the user holds the wrong stable, tell them to swap manually \u2014 do NOT auto-chain swap + repay.\n\n## Multi-step flows\n- \"How much X for Y?\": swap_quote first, then swap_execute if user confirms.\n- \"Swap then save\": swap_execute \u2192 balance_check \u2192 save_deposit. Confirm each step.\n- \"Buy $X of token\": token_prices \u2192 calculate amount \u2192 swap_execute.\n- \"Best yield on SUI\": compare rates_info (NAVI lending) + volo_stats (vSUI liquid staking).\n- withdraw supports legacy positions: USDC, USDe, USDsui, SUI. Pass asset param to withdraw a specific token.\n- \"Deposit SUI to earn yield\": volo_stake for SUI liquid staking. save_deposit only accepts USDC or USDsui.\n- \"Is protocol X safe?\" / \"Tell me about NAVI\": protocol_deep_dive with the slug.\n- \"Full account report\" / \"account summary\" / \"give me everything\" / \"complete overview\": triggers the `account_report` recipe \u2014 when the recipe block appears, follow EVERY step including all six tool calls. Each step renders a distinct rich card; skipping a step means a missing card.\n\n## Safety\n- Never encourage risky financial behavior.\n- Warn when health factor < 1.5.\n- All amounts in USDC unless stated otherwise.";
3840
+ declare const DEFAULT_SYSTEM_PROMPT = "You are Audric \u2014 a financial agent on Sui. Audric is exactly five products: Audric Passport (the trust layer \u2014 Google sign-in, non-custodial wallet, tap-to-confirm consent, sponsored gas \u2014 wraps every other product), Audric Intelligence (you \u2014 the 5-system brain: Agent Harness with 34 tools, Reasoning Engine with 14 guards and 6 skill recipes, Silent Profile, Chain Memory, AdviceLog), Audric Finance (manage money on Sui \u2014 Save via NAVI lending at 3-8% APY USDC, Credit via NAVI borrowing with health factor, Swap via Cetus aggregator across 20+ DEXs at 0.1% fee, Charts for yield/health/portfolio viz), Audric Pay (move money \u2014 send USDC, receive via payment links / invoices / QR; free, global, instant on Sui), and Audric Store (creator marketplace, ships Phase 5 \u2014 say \"coming soon\" if asked). Save, swap, borrow, repay, withdraw, charts \u2192 Audric Finance. Send, receive, payment-link, invoice, QR \u2192 Audric Pay. Your silent context (profile, memory, chain facts, advice log) shapes your replies but never surfaces as a notification \u2014 you act only when the user asks, and every write waits on their tap-to-confirm via Passport. You can also call 41 paid APIs (music, image, research, translation, weather, fulfilment) via MPP micropayments using the pay_api tool \u2014 this is an internal capability, not a promoted product, so only mention it when the user asks for something that needs it.\n\n## Response rules\n- 1-2 sentences max. No bullet lists unless asked. No preambles.\n- Never say \"Would you like me to...\", \"Sure!\", \"Great question!\", \"Absolutely!\" \u2014 just do it or say you can't.\n- Present amounts as $1,234.56 and rates as X.XX% APY.\n- Show top 3 results unless asked for more. Summarize totals in one line.\n\n## Caption rules (after tool calls)\n- **When a canvas was rendered (`render_canvas` was called, or any tool that auto-renders a card like balance_check / portfolio_analysis / savings_info / health_check / transaction_history): the canvas IS the answer.** Your chat message must NOT restate wallet, savings, debt, holdings, or net-worth numbers \u2014 they are already on screen. Add at most ONE sentence of context, advice, or next step (e.g. \"Your USDC is idle \u2014 consider depositing for ~4.5% APY\"), or say nothing.\n- **When NO canvas was rendered:** lead with the result and quote the actual numbers from the tool. One sentence.\n- **NEVER describe a position as \"no\", \"none\", \"minimal\", \"zero\", or \"inactive\" if the tool result contains a positive value for that field.** The tool result is the source of truth \u2014 never your interior summary. If the canvas shows $100 in savings, you cannot say \"no active savings\" in the caption.\n- **NEVER claim \"no DeFi positions\" when the tool result says the DeFi slice is UNAVAILABLE.** When `balance_check` displayText contains \"DeFi positions: UNAVAILABLE\" or \"DeFi data source unreachable\", the slice is unknown \u2014 say \"DeFi data is currently unavailable\" or omit the mention. Only claim \"no DeFi positions\" when the displayText explicitly omits any DeFi line (i.e. the fetch succeeded with $0 across every covered protocol).\n\n## Execution rule\nOnly offer to execute actions you have tools for. If you retrieved a quote, data, or information but have no tool to act on it, give the user the result and tell them where to execute manually \u2014 in one sentence. Never say \"Would you like me to proceed?\" unless you have a tool that can actually proceed.\n\n## Before acting\n- ALWAYS call a read tool first before any write tool \u2014 balance_check before save/send/borrow, savings_info before withdraw.\n- Show real numbers from tools \u2014 never fabricate rates, amounts, or balances.\n- When user says \"all\" or an imprecise amount, call the read tool first to get the exact number.\n\n## Tool usage\n- Use tools proactively \u2014 don't refuse requests you can handle.\n- For real-world questions (weather, search, news, prices), use pay_api. Tell the user the cost first.\n- For NAVI lending APYs, use rates_info; for VOLO liquid staking stats, use volo_stats; for spot token prices, use token_prices.\n- For protocol-level due diligence (TVL, fees, audits, safety) on Sui DeFi protocols, use protocol_deep_dive with the slug.\n- Run multiple read-only tools in parallel when you need several data points.\n- If a tool errors, say what went wrong and what to try instead. One sentence.\n\n## Savings = USDC or USDsui (critical)\n- save_deposit and borrow accept ONLY USDC or USDsui. No other token can be deposited or borrowed.\n- USDC is the canonical default. USDsui is permitted because it has a productive NAVI pool (often a higher APY than USDC). All other holdings (GOLD, SUI, USDT, USDe, ETH, NAVX, WAL) are NOT saveable.\n- When asked \"how much can I save?\":\n - Report saveableUsdc from balance_check (the user's USDC wallet balance \u2014 canonical saveable).\n - If the user also holds USDsui in their wallet, report that separately as \"USDsui (saveable): X.XX\". Do NOT roll the two together \u2014 the LLM must keep the per-asset distinction so the user can pick.\n- When the user says \"save 10 USDC\" \u2192 call save_deposit with asset=\"USDC\". When they say \"save 10 USDsui\" \u2192 call with asset=\"USDsui\". Never silently substitute.\n- When the user says \"save 10\" (no asset) \u2192 call balance_check first and ask which stable they want, OR pick whichever they hold more of with a one-line explanation.\n- \"Best stable to save right now?\" \u2192 call rates_info to compare USDC vs USDsui APY on NAVI; let the user pick.\n- NEVER say a non-saveable token (GOLD, SUI, USDT, etc.) is \"in savings\" or \"earning APY in savings\". Wallet holdings \u2260 savings positions, even for stables we don't accept.\n- If user wants to save a non-saveable token, tell them to swap to USDC or USDsui first. Do NOT auto-chain swap + deposit.\n- Repay symmetry: a USDsui debt MUST be repaid with USDsui (and USDC debt with USDC). When calling repay_debt, pass asset=\"USDsui\" if the borrow is USDsui. If the user asks \"repay my debt\" and savings_info shows borrows in BOTH stables, list both and ask which to repay first. If the user holds the wrong stable, tell them to swap manually \u2014 do NOT auto-chain swap + repay.\n\n## Fees (critical \u2014 never deny having fees)\n- **Swap:** 0.1% Audric overlay fee on the output amount, taken by the aggregator and sent to the Audric treasury. The Cetus DEX fee (typically 0.01\u20130.25%) is separate and goes to the DEX. Both are shown on the swap card. Never say Audric takes no cut on swaps \u2014 it does.\n- **Save (deposit):** 0.1% Audric fee on the deposit amount, taken atomically in the same transaction.\n- **Borrow:** 0.05% Audric fee on the borrow amount, taken atomically in the same transaction.\n- **Withdraw / Repay / Send / Receive:** No Audric fee. Gas is sponsored (free to the user).\n- When a user asks about fees, quote the above. Do NOT say \"I don't take a cut\", \"fees are zero\", \"all your value stays with you\", or \"I'm here to execute, not extract\" \u2014 those are incorrect for swap, save, and borrow.\n\n## Multi-step flows\n- \"How much X for Y?\": swap_quote first, then swap_execute if user confirms.\n- \"Swap then save\": swap_execute \u2192 balance_check \u2192 save_deposit. Confirm each step.\n- \"Buy $X of token\": token_prices \u2192 calculate amount \u2192 swap_execute.\n- \"Best yield on SUI\": compare rates_info (NAVI lending) + volo_stats (vSUI liquid staking).\n- withdraw supports legacy positions: USDC, USDe, USDsui, SUI. Pass asset param to withdraw a specific token.\n- \"Deposit SUI to earn yield\": volo_stake for SUI liquid staking. save_deposit only accepts USDC or USDsui.\n- \"Is protocol X safe?\" / \"Tell me about NAVI\": protocol_deep_dive with the slug.\n- \"Full account report\" / \"account summary\" / \"give me everything\" / \"complete overview\": triggers the `account_report` recipe \u2014 when the recipe block appears, follow EVERY step including all six tool calls. Each step renders a distinct rich card; skipping a step means a missing card.\n\n## Safety\n- Never encourage risky financial behavior.\n- Warn when health factor < 1.5.\n- All amounts in USDC unless stated otherwise.";
3841
3841
 
3842
3842
  /** Cache entry shape. `cachedAt` is the wall-clock ms at write time. */
3843
3843
  interface NaviCacheEntry {
package/dist/index.js CHANGED
@@ -3073,7 +3073,7 @@ var transactionHistoryTool = buildTool({
3073
3073
  var SAVE_ASSETS = ["USDC", "USDsui"];
3074
3074
  var saveDepositTool = buildTool({
3075
3075
  name: "save_deposit",
3076
- description: 'Deposit USDC or USDsui into NAVI savings to earn yield. ONLY these two stables are accepted. If the user asks to save/deposit any other token (GOLD, SUI, USDT, USDe, ETH, etc.), do NOT call this tool and do NOT automatically swap their tokens and deposit. Instead, tell the user that only USDC and USDsui deposits are supported and ask if they would like to swap first. Let the user decide \u2014 never auto-chain swap + deposit. When the user says "save 10 USDC" pass asset="USDC". When they say "save 10 USDsui" pass asset="USDsui". When they say "save 10" with no asset, ALWAYS call balance_check first and ask which stable they want to deposit (or default to whichever they hold more of, with a one-line note). Never silently substitute USDsui for USDC or vice versa. Payment Stream: bundleable \u2014 when paired with another bundleable write in the same request (e.g. "swap to USDC and save"), emit all calls in the same assistant turn so the engine collapses them into one atomic PTB the user signs once.',
3076
+ description: 'Deposit USDC or USDsui into NAVI savings to earn yield. ONLY these two stables are accepted. If the user asks to save/deposit any other token (GOLD, SUI, USDT, USDe, ETH, etc.), do NOT call this tool and do NOT automatically swap their tokens and deposit. Instead, tell the user that only USDC and USDsui deposits are supported and ask if they would like to swap first. Let the user decide \u2014 never auto-chain swap + deposit. When the user says "save 10 USDC" pass asset="USDC". When they say "save 10 USDsui" pass asset="USDsui". When they say "save 10" with no asset, ALWAYS call balance_check first and ask which stable they want to deposit (or default to whichever they hold more of, with a one-line note). Never silently substitute USDsui for USDC or vice versa. Payment Intent: composable \u2014 when paired with another composable write in the same request (e.g. "swap to USDC and save"), emit all calls in the same assistant turn so the engine compiles them into one atomic Payment Intent the user signs once.',
3077
3077
  inputSchema: z.object({
3078
3078
  amount: z.number().positive(),
3079
3079
  asset: z.enum(SAVE_ASSETS).optional().describe('"USDC" or "USDsui". Defaults to USDC when omitted.')
@@ -3126,7 +3126,7 @@ var saveDepositTool = buildTool({
3126
3126
  });
3127
3127
  var withdrawTool = buildTool({
3128
3128
  name: "withdraw",
3129
- description: `Withdraw USDC or USDsui from NAVI lending back to wallet. Defaults to USDC. Audric supports ONLY USDC and USDsui \u2014 these are the same two stables save_deposit accepts. NAVI may also surface legacy positions (USDe, SUI, etc.) in savings_info / balance_check; those are READ-ONLY through Audric. For non-canonical positions, direct the user to NAVI's app (https://app.naviprotocol.io) \u2014 Audric will not withdraw them. Payment Stream: bundleable \u2014 when paired with another bundleable write in the same request (e.g. "withdraw and send to Mom"), emit all calls in the same assistant turn so the engine collapses them into one atomic PTB the user signs once.`,
3129
+ description: `Withdraw USDC or USDsui from NAVI lending back to wallet. Defaults to USDC. Audric supports ONLY USDC and USDsui \u2014 these are the same two stables save_deposit accepts. NAVI may also surface legacy positions (USDe, SUI, etc.) in savings_info / balance_check; those are READ-ONLY through Audric. For non-canonical positions, direct the user to NAVI's app (https://app.naviprotocol.io) \u2014 Audric will not withdraw them. Payment Intent: composable \u2014 when paired with another composable write in the same request (e.g. "withdraw and send to Mom"), emit all calls in the same assistant turn so the engine compiles them into one atomic Payment Intent the user signs once.`,
3130
3130
  inputSchema: z.object({
3131
3131
  amount: z.number().positive(),
3132
3132
  asset: z.string().optional().describe("Asset to withdraw \u2014 must be USDC (default) or USDsui. Other assets surfaced in savings_info are read-only via Audric.")
@@ -3169,7 +3169,7 @@ var withdrawTool = buildTool({
3169
3169
  var ASSET_LIST = ALL_NAVI_ASSETS.map((a) => String(a)).join(", ");
3170
3170
  var sendTransferTool = buildTool({
3171
3171
  name: "send_transfer",
3172
- description: `Send ANY supported token (${ASSET_LIST}) to another Sui address or contact name. Validates the address, checks balance, and executes the on-chain transfer. MUST set the \`asset\` field to the token symbol you want to send (case-insensitive). If \`asset\` is omitted, USDC is assumed \u2014 only do this when the user explicitly asks for USDC. When the user asks to send a token by name (SUI, USDT, etc.) or to send the proceeds of a just-completed swap, you MUST pass \`asset\` matching that token. Returns tx hash, gas cost, and updated balance. Payment Stream: bundleable \u2014 when paired with another bundleable write in the same request (e.g. "swap to USDC and send to Mom", "withdraw and send"), emit all calls in the same assistant turn so the engine collapses them into one atomic PTB the user signs once.`,
3172
+ description: `Send ANY supported token (${ASSET_LIST}) to another Sui address or contact name. Validates the address, checks balance, and executes the on-chain transfer. MUST set the \`asset\` field to the token symbol you want to send (case-insensitive). If \`asset\` is omitted, USDC is assumed \u2014 only do this when the user explicitly asks for USDC. When the user asks to send a token by name (SUI, USDT, etc.) or to send the proceeds of a just-completed swap, you MUST pass \`asset\` matching that token. Returns tx hash, gas cost, and updated balance. Payment Intent: composable \u2014 when paired with another composable write in the same request (e.g. "swap to USDC and send to Mom", "withdraw and send"), emit all calls in the same assistant turn so the engine compiles them into one atomic Payment Intent the user signs once.`,
3173
3173
  inputSchema: z.object({
3174
3174
  to: z.string().min(1),
3175
3175
  amount: z.number().positive(),
@@ -3246,7 +3246,7 @@ var sendTransferTool = buildTool({
3246
3246
  var BORROW_ASSETS = ["USDC", "USDsui"];
3247
3247
  var borrowTool = buildTool({
3248
3248
  name: "borrow",
3249
- description: 'Borrow USDC or USDsui against savings collateral. ONLY these two stables are supported. Requires existing savings deposits as collateral. Checks max safe borrow and health factor. Returns tx hash, fee, asset borrowed, and post-borrow health factor. When the user says "borrow 10 USDC" pass asset="USDC". When they say "borrow 10 USDsui" pass asset="USDsui". When they say "borrow 10" with no asset, default to USDC unless the user has only USDsui collateral. Payment Stream: bundleable \u2014 when paired with another bundleable write in the same request (e.g. "borrow $50 and send to Mom"), emit all calls in the same assistant turn so the engine collapses them into one atomic PTB the user signs once.',
3249
+ description: 'Borrow USDC or USDsui against savings collateral. ONLY these two stables are supported. Requires existing savings deposits as collateral. Checks max safe borrow and health factor. Returns tx hash, fee, asset borrowed, and post-borrow health factor. When the user says "borrow 10 USDC" pass asset="USDC". When they say "borrow 10 USDsui" pass asset="USDsui". When they say "borrow 10" with no asset, default to USDC unless the user has only USDsui collateral. Payment Intent: composable \u2014 when paired with another composable write in the same request (e.g. "borrow $50 and send to Mom"), emit all calls in the same assistant turn so the engine compiles them into one atomic Payment Intent the user signs once.',
3250
3250
  inputSchema: z.object({
3251
3251
  amount: z.number().positive(),
3252
3252
  asset: z.enum(BORROW_ASSETS).optional().describe('"USDC" or "USDsui". Defaults to USDC when omitted.')
@@ -3300,7 +3300,7 @@ var borrowTool = buildTool({
3300
3300
  var REPAY_ASSETS = ["USDC", "USDsui"];
3301
3301
  var repayDebtTool = buildTool({
3302
3302
  name: "repay_debt",
3303
- description: 'Repay outstanding USDC or USDsui debt. Always call balance_check first to know the debt amount + which asset is owed (savings_info shows per-asset borrow positions). Pass asset="USDC" or asset="USDsui" to target a specific debt. When omitted, repays the highest-APY borrow first. Important: a USDsui debt MUST be repaid with USDsui (and USDC debt with USDC) \u2014 the SDK fetches the correct coin type for the targeted asset, but the user must hold enough of that stable in their wallet. If the user has only the wrong stable, do NOT auto-swap \u2014 tell them to swap manually first. Returns tx hash, amount repaid, asset, and remaining debt. Payment Stream: bundleable \u2014 when paired with another bundleable write in the same request (e.g. "repay debt then withdraw the rest"), emit all calls in the same assistant turn so the engine collapses them into one atomic PTB the user signs once.',
3303
+ description: 'Repay outstanding USDC or USDsui debt. Always call balance_check first to know the debt amount + which asset is owed (savings_info shows per-asset borrow positions). Pass asset="USDC" or asset="USDsui" to target a specific debt. When omitted, repays the highest-APY borrow first. Important: a USDsui debt MUST be repaid with USDsui (and USDC debt with USDC) \u2014 the SDK fetches the correct coin type for the targeted asset, but the user must hold enough of that stable in their wallet. If the user has only the wrong stable, do NOT auto-swap \u2014 tell them to swap manually first. Returns tx hash, amount repaid, asset, and remaining debt. Payment Intent: composable \u2014 when paired with another composable write in the same request (e.g. "repay debt then withdraw the rest"), emit all calls in the same assistant turn so the engine compiles them into one atomic Payment Intent the user signs once.',
3304
3304
  inputSchema: z.object({
3305
3305
  amount: z.number().positive(),
3306
3306
  asset: z.enum(REPAY_ASSETS).optional().describe('"USDC" or "USDsui". When omitted, repays the highest-APY borrow first.')
@@ -3357,7 +3357,7 @@ function formatAmount(amount) {
3357
3357
  }
3358
3358
  var claimRewardsTool = buildTool({
3359
3359
  name: "claim_rewards",
3360
- description: 'Claim all pending protocol rewards across lending adapters. Returns the claimed reward breakdown (per-asset symbol + amount), total USD value (best effort \u2014 may be 0 when oracle prices are unavailable), and the on-chain tx hash. When the rewards list is empty the response will explicitly say "no pending rewards"; when it is non-empty narrate the per-symbol amounts even if totalValueUsd is 0 (the on-chain credit still happened). Payment Stream: bundleable \u2014 when paired with another bundleable write in the same request (e.g. "claim rewards and stake them"), emit all calls in the same assistant turn so the engine collapses them into one atomic PTB the user signs once.',
3360
+ description: 'Claim all pending protocol rewards across lending adapters. Returns the claimed reward breakdown (per-asset symbol + amount), total USD value (best effort \u2014 may be 0 when oracle prices are unavailable), and the on-chain tx hash. When the rewards list is empty the response will explicitly say "no pending rewards"; when it is non-empty narrate the per-symbol amounts even if totalValueUsd is 0 (the on-chain credit still happened). Payment Intent: composable \u2014 when paired with another composable write in the same request (e.g. "claim rewards and stake them"), emit all calls in the same assistant turn so the engine compiles them into one atomic Payment Intent the user signs once.',
3361
3361
  inputSchema: z.object({}),
3362
3362
  jsonSchema: { type: "object", properties: {}, required: [] },
3363
3363
  isReadOnly: false,
@@ -3617,7 +3617,7 @@ var mppServicesTool = buildTool({
3617
3617
  });
3618
3618
  var swapExecuteTool = buildTool({
3619
3619
  name: "swap_execute",
3620
- description: 'Swap tokens on Sui via Cetus Aggregator (20+ DEXs). Supports any token pair with liquidity. Use user-friendly names (SUI, USDC, CETUS, DEEP, etc.) or full coin types. Payment Stream: bundleable \u2014 when paired with another bundleable write in the same request (e.g. "swap to USDC and save", "swap and send to Mom"), emit all calls in the same assistant turn so the engine collapses them into one atomic PTB the user signs once.',
3620
+ description: 'Swap tokens on Sui via Cetus Aggregator (20+ DEXs). Supports any token pair with liquidity. Use user-friendly names (SUI, USDC, CETUS, DEEP, etc.) or full coin types. Payment Intent: composable \u2014 when paired with another composable write in the same request (e.g. "swap to USDC and save", "swap and send to Mom"), emit all calls in the same assistant turn so the engine compiles them into one atomic Payment Intent the user signs once.',
3621
3621
  inputSchema: z.object({
3622
3622
  from: z.string().describe('Source token (e.g. "SUI", "USDC", or full coin type)'),
3623
3623
  to: z.string().describe('Target token (e.g. "USDC", "CETUS", or full coin type)'),
@@ -3724,7 +3724,7 @@ var swapQuoteTool = buildTool({
3724
3724
  });
3725
3725
  var voloStakeTool = buildTool({
3726
3726
  name: "volo_stake",
3727
- description: 'Stake SUI for vSUI via VOLO liquid staking. Earn ~3-5% APY. Rewards compound automatically via exchange rate \u2014 no claiming needed. Minimum 1 SUI. Payment Stream: bundleable \u2014 when paired with another bundleable write in the same request (e.g. "swap USDC to SUI and stake"), emit all calls in the same assistant turn so the engine collapses them into one atomic PTB the user signs once.',
3727
+ description: 'Stake SUI for vSUI via VOLO liquid staking. Earn ~3-5% APY. Rewards compound automatically via exchange rate \u2014 no claiming needed. Minimum 1 SUI. Payment Intent: composable \u2014 when paired with another composable write in the same request (e.g. "swap USDC to SUI and stake"), emit all calls in the same assistant turn so the engine compiles them into one atomic Payment Intent the user signs once.',
3728
3728
  inputSchema: z.object({
3729
3729
  amount: z.number().min(1).describe("Amount of SUI to stake (minimum 1)")
3730
3730
  }),
@@ -3755,7 +3755,7 @@ var voloStakeTool = buildTool({
3755
3755
  });
3756
3756
  var voloUnstakeTool = buildTool({
3757
3757
  name: "volo_unstake",
3758
- description: 'Unstake vSUI back to SUI. Returns SUI including accumulated yield. Use amount in vSUI units or "all" to unstake entire position. Payment Stream: bundleable \u2014 when paired with another bundleable write in the same request (e.g. "unstake vSUI and send to Mom"), emit all calls in the same assistant turn so the engine collapses them into one atomic PTB the user signs once.',
3758
+ description: 'Unstake vSUI back to SUI. Returns SUI including accumulated yield. Use amount in vSUI units or "all" to unstake entire position. Payment Intent: composable \u2014 when paired with another composable write in the same request (e.g. "unstake vSUI and send to Mom"), emit all calls in the same assistant turn so the engine compiles them into one atomic Payment Intent the user signs once.',
3759
3759
  inputSchema: z.object({
3760
3760
  amount: z.union([z.number().positive(), z.literal("all")]).describe('Amount of vSUI to unstake, or "all"')
3761
3761
  }),
@@ -5447,6 +5447,13 @@ Only offer to execute actions you have tools for. If you retrieved a quote, data
5447
5447
  - If user wants to save a non-saveable token, tell them to swap to USDC or USDsui first. Do NOT auto-chain swap + deposit.
5448
5448
  - Repay symmetry: a USDsui debt MUST be repaid with USDsui (and USDC debt with USDC). When calling repay_debt, pass asset="USDsui" if the borrow is USDsui. If the user asks "repay my debt" and savings_info shows borrows in BOTH stables, list both and ask which to repay first. If the user holds the wrong stable, tell them to swap manually \u2014 do NOT auto-chain swap + repay.
5449
5449
 
5450
+ ## Fees (critical \u2014 never deny having fees)
5451
+ - **Swap:** 0.1% Audric overlay fee on the output amount, taken by the aggregator and sent to the Audric treasury. The Cetus DEX fee (typically 0.01\u20130.25%) is separate and goes to the DEX. Both are shown on the swap card. Never say Audric takes no cut on swaps \u2014 it does.
5452
+ - **Save (deposit):** 0.1% Audric fee on the deposit amount, taken atomically in the same transaction.
5453
+ - **Borrow:** 0.05% Audric fee on the borrow amount, taken atomically in the same transaction.
5454
+ - **Withdraw / Repay / Send / Receive:** No Audric fee. Gas is sponsored (free to the user).
5455
+ - When a user asks about fees, quote the above. Do NOT say "I don't take a cut", "fees are zero", "all your value stays with you", or "I'm here to execute, not extract" \u2014 those are incorrect for swap, save, and borrow.
5456
+
5450
5457
  ## Multi-step flows
5451
5458
  - "How much X for Y?": swap_quote first, then swap_execute if user confirms.
5452
5459
  - "Swap then save": swap_execute \u2192 balance_check \u2192 save_deposit. Confirm each step.
@@ -8619,11 +8626,11 @@ var RecipeRegistry = class {
8619
8626
  const gateNote = step.gate && step.gate !== "none" ? ` [GATE: ${step.gate}]` : "";
8620
8627
  if (showBundleHeader && step.bundle === true && !openedBundleHeader) {
8621
8628
  lines.push(
8622
- "PAYMENT STREAM \u2014 emit ALL the following bundleable writes as parallel `tool_use` blocks IN THE SAME ASSISTANT TURN. The engine collapses them into ONE atomic PTB the user signs once. Do NOT execute step-by-step across turns:"
8629
+ "PAYMENT INTENT \u2014 emit ALL the following composable writes as parallel `tool_use` blocks IN THE SAME ASSISTANT TURN. The engine compiles them into ONE atomic Payment Intent the user signs once. Do NOT execute step-by-step across turns:"
8623
8630
  );
8624
8631
  openedBundleHeader = true;
8625
8632
  }
8626
- const bundleTag = showBundleHeader && step.bundle === true ? " [PAYMENT STREAM]" : "";
8633
+ const bundleTag = showBundleHeader && step.bundle === true ? " [PAYMENT INTENT]" : "";
8627
8634
  let line = `${num}. ${step.name}${toolNote}${serviceNote}${costNote}${gateNote}${bundleTag}`;
8628
8635
  if (step.gate_prompt) {
8629
8636
  line += ` \u2014 "${step.gate_prompt}"`;