@t2000/engine 1.2.0 → 1.3.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/dist/index.d.ts CHANGED
@@ -2418,15 +2418,21 @@ declare const activitySummaryTool: Tool<{
2418
2418
  }, ActivitySummary>;
2419
2419
 
2420
2420
  interface ResolveSuinsResult {
2421
- /** The lookup name, lowercased and trimmed. */
2422
- name: string;
2423
- /** The resolved 0x address, or null when the name isn't registered. */
2424
- address: string | null;
2425
- /** True when the name resolves to an address. */
2426
- registered: boolean;
2421
+ /** Direction the lookup ran in. */
2422
+ direction: 'forward' | 'reverse';
2423
+ /** The original query, lowercased. */
2424
+ query: string;
2425
+ /** Forward only: the resolved 0x address (null when unregistered). */
2426
+ address?: string | null;
2427
+ /** Forward only: convenience flag for the LLM. */
2428
+ registered?: boolean;
2429
+ /** Reverse only: every SuiNS name pointing at this address (sorted by registry). */
2430
+ names?: string[];
2431
+ /** Reverse only: the first name in `names` (the conventional "primary"), or null. */
2432
+ primary?: string | null;
2427
2433
  }
2428
2434
  declare const resolveSuinsTool: Tool<{
2429
- name: string;
2435
+ query: string;
2430
2436
  }, ResolveSuinsResult>;
2431
2437
 
2432
2438
  declare const tokenPricesTool: Tool<{
@@ -2561,6 +2567,23 @@ declare function resolveSuinsViaRpc(rawName: string, ctx?: {
2561
2567
  suiRpcUrl?: string;
2562
2568
  signal?: AbortSignal;
2563
2569
  }): Promise<string | null>;
2570
+ /**
2571
+ * Reverse-resolve a 0x address to its registered SuiNS names via
2572
+ * `suix_resolveNameServiceNames`. Returns the names sorted by the
2573
+ * registry (the first entry is conventionally the user's "primary"
2574
+ * name on dApps that show one), or `[]` when the address has no
2575
+ * SuiNS records. Throws `SuinsRpcError` on RPC/network failure.
2576
+ *
2577
+ * Why this is its own helper (not folded into `normalizeAddressInput`):
2578
+ * a reverse lookup adds a second RPC round-trip per tool call. We don't
2579
+ * want every read tool that takes an `address` to silently double its
2580
+ * latency. The lookup primitive is opt-in via the `resolve_suins` tool;
2581
+ * normalizers stay forward-only.
2582
+ */
2583
+ declare function resolveAddressToSuinsViaRpc(rawAddress: string, ctx?: {
2584
+ suiRpcUrl?: string;
2585
+ signal?: AbortSignal;
2586
+ }): Promise<string[]>;
2564
2587
  interface NormalizedAddress {
2565
2588
  /**
2566
2589
  * Canonical 0x-prefixed lowercase hex address. Always set on success.
@@ -2997,4 +3020,4 @@ declare function getTelemetrySink(): TelemetrySink;
2997
3020
  /** Restore the default noop sink. Used by test teardowns. */
2998
3021
  declare function resetTelemetrySink(): void;
2999
3022
 
3000
- export { type AddressPortfolio, AnthropicProvider, type AnthropicProviderConfig, type AudricHistoryRecord, type AudricPortfolioResult, type AwaitOrFetchOpts, type BalancePrices, type BalanceResult, BalanceTracker, type BuildToolOptions, CANVAS_TEMPLATES, type CanvasTemplate, type ChatParams, type CompactOptions, type ContentBlock, ContextBudget, type ContextBudgetConfig, type ConversationState, type ConversationStateStore, type CostSnapshot, CostTracker, type CostTrackerConfig, DEFAULT_GUARD_CONFIG, DEFAULT_LEASE_SEC, DEFAULT_PERMISSION_CONFIG, DEFAULT_POLL_BUDGET_MS, DEFAULT_POLL_INTERVAL_MS, DEFAULT_SYSTEM_PROMPT, type DefiCacheEntry, type DefiCacheStore, type DefiProtocol, type DefiSummary, EarlyToolDispatcher, type EngineConfig, type EngineEvent, type FetchLock, type GuardCheckResult, type GuardConfig, type GuardEvent, type GuardInjection, type GuardResult, type GuardRunnerState, type GuardTier, type GuardVerdict, type HealthFactorResult, InMemoryDefiCacheStore, InMemoryFetchLock, InMemoryNaviCacheStore, InMemoryWalletCacheStore, InvalidAddressError, type LLMProvider, type McpCallResult, McpClientManager, McpResponseCache, type McpServerConfig, type McpServerConnection, type McpToolAdapterConfig, type McpToolDescriptor, MemorySessionStore, type Message, NAVI_ADDR_TTL_SEC, NAVI_MCP_CONFIG, NAVI_MCP_URL, NAVI_RATES_TTL_SEC, NAVI_SERVER_NAME, type NaviCacheEntry, type NaviCacheStore, type NaviRawCoin, type NaviRawHealthFactor, type NaviRawPool, type NaviRawPosition, type NaviRawPositionsResponse, type NaviRawProtocolStats, type NaviRawRewardsResponse, type NaviReadOptions, NaviTools, type NormalizedAddress, type OutputConfig, PERMISSION_PRESETS, type PendingAction, type PendingActionModifiableField, type PendingReward, type PendingToolCall, type PermissionLevel, type PermissionOperation, type PermissionResponse, type PermissionRule, type PortfolioCoin, type PositionEntry, type PreflightResult, type ProtocolStats, type ProviderEvent, QueryEngine, READ_TOOLS, type RatesResult, type Recipe, type RecipePrerequisite, RecipeRegistry, type RecipeStep, type RecipeStepOnError, RetryTracker, type SSEEvent, SUINS_NAME_REGEX, SUI_ADDRESS_REGEX, SUI_ADDRESS_STRICT_REGEX, type SavingsResult, type ServerPositionData, type SessionData, type SessionStore, type StateType, type StopReason, type SuiCoinBalance, SuinsNotRegisteredError, SuinsRpcError, type SystemBlock, type SystemPrompt, TOOL_FLAGS, TOOL_MODIFIABLE_FIELDS, type TelemetrySink, type TelemetryTags, type ThinkingConfig, type ThinkingEffort, type Tool, type ToolChoice, type ToolContext, type ToolDefinition, type ToolFlags, type ToolJsonSchema, type ToolResult, TxMutex, type UserFinancialProfile, type UserPermissionConfig, WRITE_TOOLS, type WalletCacheEntry, type WalletCacheStore, type WalletCoin, _resetNaviCircuitBreaker, activitySummaryTool, adaptAllMcpTools, adaptAllServerTools, adaptMcpTool, applyToolFlags, awaitOrFetch, balanceCheckTool, borrowTool, budgetToolResult, buildCachedSystemPrompt, buildMcpTools, buildProactivenessInstructions, buildProfileContext, buildSelfEvaluationInstruction, buildStateContext, buildTool, claimRewardsTool, classifyEffort, clearPortfolioCache, clearPortfolioCacheFor, clearPriceMapCache, compactMessages, createGuardRunnerState, engineToSSE, estimateTokens, explainTxTool, extractConversationText, extractMcpText, fetchAddressDefiPortfolio, fetchAddressPortfolio, fetchAudricHistory, fetchAudricPortfolio, fetchAvailableRewards, fetchBalance, fetchHealthFactor, fetchPositions, fetchProtocolStats, fetchRates, fetchSavings, fetchTokenPrices, fetchWalletCoins, findTool, getAudricApiBase, getDefaultTools, getDefiCacheStore, getFetchLock, getMcpManager, getModifiableFields, getNaviCacheStore, getTelemetrySink, getToolFlags, getWalletAddress, getWalletCacheStore, guardArtifactPreview, guardStaleData, hasNaviMcp, healthCheckTool, loadRecipes, looksLikeSuiNs, microcompact, mppServicesTool, naviKey, normalizeAddressInput, parseMcpJson, parseRecipe, parseSSE, payApiTool, portfolioAnalysisTool, protocolDeepDiveTool, ratesInfoTool, registerEngineTools, renderCanvasTool, repayDebtTool, requireAgent, resetDefiCacheStore, resetFetchLock, resetNaviCacheStore, resetTelemetrySink, resetWalletCacheStore, resolvePermissionTier, resolveSuinsTool, resolveSuinsViaRpc, resolveUsdValue, runGuards, runTools, saveContactTool, saveDepositTool, savingsInfoTool, sendTransferTool, serializeSSE, setDefiCacheStore, setFetchLock, setNaviCacheStore, setTelemetrySink, setWalletCacheStore, spendingAnalyticsTool, swapExecuteTool, swapQuoteTool, tokenPricesTool, toolNameToOperation, toolsToDefinitions, transactionHistoryTool, transformBalance, transformHealthFactor, transformPositions, transformRates, transformRewards, transformSavings, updateGuardStateAfterToolResult, validateHistory, voloStakeTool, voloStatsTool, voloUnstakeTool, webSearchTool, withdrawTool, yieldSummaryTool };
3023
+ export { type AddressPortfolio, AnthropicProvider, type AnthropicProviderConfig, type AudricHistoryRecord, type AudricPortfolioResult, type AwaitOrFetchOpts, type BalancePrices, type BalanceResult, BalanceTracker, type BuildToolOptions, CANVAS_TEMPLATES, type CanvasTemplate, type ChatParams, type CompactOptions, type ContentBlock, ContextBudget, type ContextBudgetConfig, type ConversationState, type ConversationStateStore, type CostSnapshot, CostTracker, type CostTrackerConfig, DEFAULT_GUARD_CONFIG, DEFAULT_LEASE_SEC, DEFAULT_PERMISSION_CONFIG, DEFAULT_POLL_BUDGET_MS, DEFAULT_POLL_INTERVAL_MS, DEFAULT_SYSTEM_PROMPT, type DefiCacheEntry, type DefiCacheStore, type DefiProtocol, type DefiSummary, EarlyToolDispatcher, type EngineConfig, type EngineEvent, type FetchLock, type GuardCheckResult, type GuardConfig, type GuardEvent, type GuardInjection, type GuardResult, type GuardRunnerState, type GuardTier, type GuardVerdict, type HealthFactorResult, InMemoryDefiCacheStore, InMemoryFetchLock, InMemoryNaviCacheStore, InMemoryWalletCacheStore, InvalidAddressError, type LLMProvider, type McpCallResult, McpClientManager, McpResponseCache, type McpServerConfig, type McpServerConnection, type McpToolAdapterConfig, type McpToolDescriptor, MemorySessionStore, type Message, NAVI_ADDR_TTL_SEC, NAVI_MCP_CONFIG, NAVI_MCP_URL, NAVI_RATES_TTL_SEC, NAVI_SERVER_NAME, type NaviCacheEntry, type NaviCacheStore, type NaviRawCoin, type NaviRawHealthFactor, type NaviRawPool, type NaviRawPosition, type NaviRawPositionsResponse, type NaviRawProtocolStats, type NaviRawRewardsResponse, type NaviReadOptions, NaviTools, type NormalizedAddress, type OutputConfig, PERMISSION_PRESETS, type PendingAction, type PendingActionModifiableField, type PendingReward, type PendingToolCall, type PermissionLevel, type PermissionOperation, type PermissionResponse, type PermissionRule, type PortfolioCoin, type PositionEntry, type PreflightResult, type ProtocolStats, type ProviderEvent, QueryEngine, READ_TOOLS, type RatesResult, type Recipe, type RecipePrerequisite, RecipeRegistry, type RecipeStep, type RecipeStepOnError, RetryTracker, type SSEEvent, SUINS_NAME_REGEX, SUI_ADDRESS_REGEX, SUI_ADDRESS_STRICT_REGEX, type SavingsResult, type ServerPositionData, type SessionData, type SessionStore, type StateType, type StopReason, type SuiCoinBalance, SuinsNotRegisteredError, SuinsRpcError, type SystemBlock, type SystemPrompt, TOOL_FLAGS, TOOL_MODIFIABLE_FIELDS, type TelemetrySink, type TelemetryTags, type ThinkingConfig, type ThinkingEffort, type Tool, type ToolChoice, type ToolContext, type ToolDefinition, type ToolFlags, type ToolJsonSchema, type ToolResult, TxMutex, type UserFinancialProfile, type UserPermissionConfig, WRITE_TOOLS, type WalletCacheEntry, type WalletCacheStore, type WalletCoin, _resetNaviCircuitBreaker, activitySummaryTool, adaptAllMcpTools, adaptAllServerTools, adaptMcpTool, applyToolFlags, awaitOrFetch, balanceCheckTool, borrowTool, budgetToolResult, buildCachedSystemPrompt, buildMcpTools, buildProactivenessInstructions, buildProfileContext, buildSelfEvaluationInstruction, buildStateContext, buildTool, claimRewardsTool, classifyEffort, clearPortfolioCache, clearPortfolioCacheFor, clearPriceMapCache, compactMessages, createGuardRunnerState, engineToSSE, estimateTokens, explainTxTool, extractConversationText, extractMcpText, fetchAddressDefiPortfolio, fetchAddressPortfolio, fetchAudricHistory, fetchAudricPortfolio, fetchAvailableRewards, fetchBalance, fetchHealthFactor, fetchPositions, fetchProtocolStats, fetchRates, fetchSavings, fetchTokenPrices, fetchWalletCoins, findTool, getAudricApiBase, getDefaultTools, getDefiCacheStore, getFetchLock, getMcpManager, getModifiableFields, getNaviCacheStore, getTelemetrySink, getToolFlags, getWalletAddress, getWalletCacheStore, guardArtifactPreview, guardStaleData, hasNaviMcp, healthCheckTool, loadRecipes, looksLikeSuiNs, microcompact, mppServicesTool, naviKey, normalizeAddressInput, parseMcpJson, parseRecipe, parseSSE, payApiTool, portfolioAnalysisTool, protocolDeepDiveTool, ratesInfoTool, registerEngineTools, renderCanvasTool, repayDebtTool, requireAgent, resetDefiCacheStore, resetFetchLock, resetNaviCacheStore, resetTelemetrySink, resetWalletCacheStore, resolveAddressToSuinsViaRpc, resolvePermissionTier, resolveSuinsTool, resolveSuinsViaRpc, resolveUsdValue, runGuards, runTools, saveContactTool, saveDepositTool, savingsInfoTool, sendTransferTool, serializeSSE, setDefiCacheStore, setFetchLock, setNaviCacheStore, setTelemetrySink, setWalletCacheStore, spendingAnalyticsTool, swapExecuteTool, swapQuoteTool, tokenPricesTool, toolNameToOperation, toolsToDefinitions, transactionHistoryTool, transformBalance, transformHealthFactor, transformPositions, transformRates, transformRewards, transformSavings, updateGuardStateAfterToolResult, validateHistory, voloStakeTool, voloStatsTool, voloUnstakeTool, webSearchTool, withdrawTool, yieldSummaryTool };
package/dist/index.js CHANGED
@@ -1714,6 +1714,44 @@ async function resolveSuinsViaRpc(rawName, ctx = {}) {
1714
1714
  }
1715
1715
  return body.result ?? null;
1716
1716
  }
1717
+ async function resolveAddressToSuinsViaRpc(rawAddress, ctx = {}) {
1718
+ const address = rawAddress.trim().toLowerCase();
1719
+ if (!SUI_ADDRESS_REGEX.test(address)) {
1720
+ throw new InvalidAddressError(rawAddress);
1721
+ }
1722
+ const url = ctx.suiRpcUrl || SUI_MAINNET_URL2;
1723
+ let res;
1724
+ try {
1725
+ res = await fetch(url, {
1726
+ method: "POST",
1727
+ headers: { "Content-Type": "application/json" },
1728
+ body: JSON.stringify({
1729
+ jsonrpc: "2.0",
1730
+ id: 1,
1731
+ method: "suix_resolveNameServiceNames",
1732
+ params: [address]
1733
+ }),
1734
+ signal: ctx.signal ?? AbortSignal.timeout(8e3)
1735
+ });
1736
+ } catch (err) {
1737
+ const msg = err instanceof Error ? err.message : String(err);
1738
+ throw new SuinsRpcError(address, msg);
1739
+ }
1740
+ if (!res.ok) {
1741
+ throw new SuinsRpcError(address, `HTTP ${res.status}`);
1742
+ }
1743
+ let body;
1744
+ try {
1745
+ body = await res.json();
1746
+ } catch (err) {
1747
+ const msg = err instanceof Error ? err.message : String(err);
1748
+ throw new SuinsRpcError(address, `JSON parse failed: ${msg}`);
1749
+ }
1750
+ if (body.error) {
1751
+ throw new SuinsRpcError(address, body.error.message);
1752
+ }
1753
+ return body.result?.data ?? [];
1754
+ }
1717
1755
  async function normalizeAddressInput(value, ctx = {}) {
1718
1756
  const trimmed = value.trim();
1719
1757
  if (SUI_ADDRESS_REGEX.test(trimmed)) {
@@ -4576,9 +4614,17 @@ Always prefer the canvas for visualisation requests. After rendering, offer to e
4576
4614
  async call(input, context) {
4577
4615
  const { template, params } = input;
4578
4616
  const title = CANVAS_TITLES[template];
4617
+ const ADDRESS_AWARE_TEMPLATES = /* @__PURE__ */ new Set([
4618
+ "full_portfolio",
4619
+ "watch_address",
4620
+ "portfolio_timeline",
4621
+ "spending_breakdown",
4622
+ "activity_heatmap",
4623
+ "health_simulator"
4624
+ ]);
4579
4625
  let suinsName = null;
4580
4626
  let resolvedParamAddress = null;
4581
- if (params?.address) {
4627
+ if (params?.address && ADDRESS_AWARE_TEMPLATES.has(template)) {
4582
4628
  const normalized = await normalizeAddressInput(params.address, {
4583
4629
  suiRpcUrl: context.suiRpcUrl,
4584
4630
  signal: context.signal
@@ -4978,64 +5024,84 @@ var activitySummaryTool = buildTool({
4978
5024
  }
4979
5025
  });
4980
5026
  var inputSchema5 = z.object({
4981
- name: z.string().describe(
4982
- 'A SuiNS name ending in `.sui` (e.g. "alex.sui", "team.alex.sui"). The engine resolves the name on-chain via Sui JSON-RPC.'
5027
+ query: z.string().describe(
5028
+ 'Either a SuiNS name (e.g. "alex.sui", "team.alex.sui") to FORWARD-resolve to its 0x address, OR a Sui address (0x\u2026 64 hex chars) to REVERSE-resolve to its registered SuiNS name(s). The engine detects direction by input shape.'
4983
5029
  )
4984
5030
  });
4985
5031
  var resolveSuinsTool = buildTool({
4986
5032
  name: "resolve_suins",
4987
- description: 'Resolve a SuiNS name (e.g. "alex.sui", "obehi.sui") to its on-chain Sui address. Use this whenever the user asks for the address of a `.sui` name, asks who owns a name, or wants to verify a SuiNS name is registered. Returns the 0x-prefixed 64-hex address, or `registered: false` when the name isn\'t registered. Never use `web_search` for this \u2014 web_search doesn\'t index SuiNS records, but this tool queries the canonical on-chain registry. NOTE: For lookup queries about money flows ("what\'s alex.sui\'s balance / portfolio / health / transactions"), call the relevant read tool directly with `address: "alex.sui"` \u2014 those tools normalize SuiNS names internally, so an explicit `resolve_suins` round-trip is wasted.',
5033
+ description: 'Look up SuiNS records on-chain \u2014 works in BOTH directions. FORWARD: pass a SuiNS name (e.g. "alex.sui") to get the 0x address it resolves to. REVERSE: pass a Sui 0x address to get the SuiNS name(s) registered for it (returns the primary name + the full list). \n\nUse this WHENEVER the user mentions a `.sui` name OR asks "what\'s the SuiNS for 0x\u2026", "does 0x\u2026 have a name", "who is 0x\u2026". You MUST call this tool \u2014 never guess from saved contacts (a contact named "alex" is NOT the same as the SuiNS name "alex.sui"; verify on-chain). Never use `web_search` for SuiNS \u2014 web_search doesn\'t index the SuiNS registry, but this tool queries the canonical on-chain RPC. \n\nReturns `{ direction, address, registered }` for forward, `{ direction, names, primary }` for reverse. Empty `names: []` means the address has no SuiNS records. \n\nNOTE: For money-flow questions about a `.sui` name ("what\'s alex.sui\'s balance / portfolio / health / transactions"), call the relevant read tool directly with `address: "alex.sui"` \u2014 those tools normalize SuiNS internally, so an explicit `resolve_suins` round-trip is wasted.',
4988
5034
  inputSchema: inputSchema5,
4989
5035
  jsonSchema: {
4990
5036
  type: "object",
4991
5037
  properties: {
4992
- name: {
5038
+ query: {
4993
5039
  type: "string",
4994
- description: 'A SuiNS name ending in .sui (e.g. "alex.sui"). The engine resolves it on-chain.'
5040
+ description: 'A SuiNS name (e.g. "alex.sui") for forward resolution, OR a 0x Sui address for reverse resolution.'
4995
5041
  }
4996
5042
  },
4997
- required: ["name"]
5043
+ required: ["query"]
4998
5044
  },
4999
5045
  isReadOnly: true,
5000
- // Names map to addresses on a per-block basis (registry can change).
5001
- // Cheap, deterministic for a given block — safe to dedupe within a turn.
5046
+ // Lookups map to (address|name) pairs on a per-block basis. Cheap and
5047
+ // deterministic for a given block — safe to dedupe within a turn.
5002
5048
  cacheable: true,
5003
5049
  preflight: (input) => {
5004
- const trimmed = input.name?.trim().toLowerCase();
5050
+ const trimmed = input.query?.trim().toLowerCase();
5005
5051
  if (!trimmed) {
5006
- return { valid: false, error: "name is required" };
5052
+ return { valid: false, error: "query is required" };
5007
5053
  }
5008
- if (!SUINS_NAME_REGEX.test(trimmed)) {
5054
+ const isAddress = SUI_ADDRESS_REGEX.test(trimmed);
5055
+ const isName = SUINS_NAME_REGEX.test(trimmed);
5056
+ if (!isAddress && !isName) {
5009
5057
  return {
5010
5058
  valid: false,
5011
- error: `"${input.name}" doesn't look like a SuiNS name. Names must end in .sui and use only lowercase letters, digits, and hyphens (e.g. alex.sui).`
5059
+ error: `"${input.query}" doesn't look like a SuiNS name or a Sui address. Pass either a name ending in .sui (e.g. alex.sui) or a 0x-prefixed hex address.`
5012
5060
  };
5013
5061
  }
5014
5062
  return { valid: true };
5015
5063
  },
5016
5064
  async call(input, context) {
5017
- const name = input.name.trim().toLowerCase();
5018
- let address;
5065
+ const query = input.query.trim().toLowerCase();
5066
+ const isAddress = SUI_ADDRESS_REGEX.test(query);
5019
5067
  try {
5020
- address = await resolveSuinsViaRpc(name, {
5068
+ if (isAddress) {
5069
+ const names = await resolveAddressToSuinsViaRpc(query, {
5070
+ suiRpcUrl: context.suiRpcUrl,
5071
+ signal: context.signal
5072
+ });
5073
+ const primary = names[0] ?? null;
5074
+ const result2 = {
5075
+ direction: "reverse",
5076
+ query,
5077
+ names,
5078
+ primary
5079
+ };
5080
+ return {
5081
+ data: result2,
5082
+ displayText: primary ? `\`${query.slice(0, 10)}\u2026${query.slice(-6)}\` \u2192 ${primary}${names.length > 1 ? ` (+${names.length - 1} more)` : ""}` : `\`${query.slice(0, 10)}\u2026${query.slice(-6)}\` has no SuiNS name registered.`
5083
+ };
5084
+ }
5085
+ const address = await resolveSuinsViaRpc(query, {
5021
5086
  suiRpcUrl: context.suiRpcUrl,
5022
5087
  signal: context.signal
5023
5088
  });
5089
+ const result = {
5090
+ direction: "forward",
5091
+ query,
5092
+ address,
5093
+ registered: address !== null
5094
+ };
5095
+ return {
5096
+ data: result,
5097
+ displayText: address ? `${query} \u2192 \`${address.slice(0, 10)}\u2026${address.slice(-6)}\`` : `${query} is not a registered SuiNS name.`
5098
+ };
5024
5099
  } catch (err) {
5025
5100
  if (err instanceof SuinsRpcError) {
5026
5101
  throw err;
5027
5102
  }
5028
5103
  throw err;
5029
5104
  }
5030
- const result = {
5031
- name,
5032
- address,
5033
- registered: address !== null
5034
- };
5035
- return {
5036
- data: result,
5037
- displayText: address ? `${name} \u2192 \`${address.slice(0, 10)}\u2026${address.slice(-6)}\`` : `${name} is not a registered SuiNS name.`
5038
- };
5039
5105
  }
5040
5106
  });
5041
5107
  var tokenPricesTool = buildTool({
@@ -8516,6 +8582,6 @@ function sanitizeAnthropicMessages(messages) {
8516
8582
  return merged;
8517
8583
  }
8518
8584
 
8519
- export { AnthropicProvider, BalanceTracker, CANVAS_TEMPLATES, ContextBudget, CostTracker, DEFAULT_GUARD_CONFIG, DEFAULT_LEASE_SEC, DEFAULT_PERMISSION_CONFIG, DEFAULT_POLL_BUDGET_MS, DEFAULT_POLL_INTERVAL_MS, DEFAULT_SYSTEM_PROMPT, EarlyToolDispatcher, InMemoryDefiCacheStore, InMemoryFetchLock, InMemoryNaviCacheStore, InMemoryWalletCacheStore, InvalidAddressError, McpClientManager, McpResponseCache, MemorySessionStore, NAVI_ADDR_TTL_SEC, NAVI_MCP_CONFIG, NAVI_MCP_URL, NAVI_RATES_TTL_SEC, NAVI_SERVER_NAME, NaviTools, PERMISSION_PRESETS, QueryEngine, READ_TOOLS, RecipeRegistry, RetryTracker, SUINS_NAME_REGEX, SUI_ADDRESS_REGEX, SUI_ADDRESS_STRICT_REGEX, SuinsNotRegisteredError, SuinsRpcError, TOOL_FLAGS, TOOL_MODIFIABLE_FIELDS, TxMutex, WRITE_TOOLS, _resetNaviCircuitBreaker, activitySummaryTool, adaptAllMcpTools, adaptAllServerTools, adaptMcpTool, applyToolFlags, awaitOrFetch, balanceCheckTool, borrowTool, budgetToolResult, buildCachedSystemPrompt, buildMcpTools, buildProactivenessInstructions, buildProfileContext, buildSelfEvaluationInstruction, buildStateContext, buildTool, claimRewardsTool, classifyEffort, clearPortfolioCache, clearPortfolioCacheFor, clearPriceMapCache, compactMessages, createGuardRunnerState, engineToSSE, estimateTokens, explainTxTool, extractConversationText, extractMcpText, fetchAddressDefiPortfolio, fetchAddressPortfolio, fetchAudricHistory, fetchAudricPortfolio, fetchAvailableRewards, fetchBalance, fetchHealthFactor, fetchPositions, fetchProtocolStats, fetchRates, fetchSavings, fetchTokenPrices, fetchWalletCoins, findTool, getAudricApiBase, getDefaultTools, getDefiCacheStore, getFetchLock, getMcpManager, getModifiableFields, getNaviCacheStore, getTelemetrySink, getToolFlags, getWalletAddress, getWalletCacheStore, guardArtifactPreview, guardStaleData, hasNaviMcp, healthCheckTool, loadRecipes, looksLikeSuiNs, microcompact, mppServicesTool, naviKey, normalizeAddressInput, parseMcpJson, parseRecipe, parseSSE, payApiTool, portfolioAnalysisTool, protocolDeepDiveTool, ratesInfoTool, registerEngineTools, renderCanvasTool, repayDebtTool, requireAgent, resetDefiCacheStore, resetFetchLock, resetNaviCacheStore, resetTelemetrySink, resetWalletCacheStore, resolvePermissionTier, resolveSuinsTool, resolveSuinsViaRpc, resolveUsdValue, runGuards, runTools, saveContactTool, saveDepositTool, savingsInfoTool, sendTransferTool, serializeSSE, setDefiCacheStore, setFetchLock, setNaviCacheStore, setTelemetrySink, setWalletCacheStore, spendingAnalyticsTool, swapExecuteTool, swapQuoteTool, tokenPricesTool, toolNameToOperation, toolsToDefinitions, transactionHistoryTool, transformBalance, transformHealthFactor, transformPositions, transformRates, transformRewards, transformSavings, updateGuardStateAfterToolResult, validateHistory, voloStakeTool, voloStatsTool, voloUnstakeTool, webSearchTool, withdrawTool, yieldSummaryTool };
8585
+ export { AnthropicProvider, BalanceTracker, CANVAS_TEMPLATES, ContextBudget, CostTracker, DEFAULT_GUARD_CONFIG, DEFAULT_LEASE_SEC, DEFAULT_PERMISSION_CONFIG, DEFAULT_POLL_BUDGET_MS, DEFAULT_POLL_INTERVAL_MS, DEFAULT_SYSTEM_PROMPT, EarlyToolDispatcher, InMemoryDefiCacheStore, InMemoryFetchLock, InMemoryNaviCacheStore, InMemoryWalletCacheStore, InvalidAddressError, McpClientManager, McpResponseCache, MemorySessionStore, NAVI_ADDR_TTL_SEC, NAVI_MCP_CONFIG, NAVI_MCP_URL, NAVI_RATES_TTL_SEC, NAVI_SERVER_NAME, NaviTools, PERMISSION_PRESETS, QueryEngine, READ_TOOLS, RecipeRegistry, RetryTracker, SUINS_NAME_REGEX, SUI_ADDRESS_REGEX, SUI_ADDRESS_STRICT_REGEX, SuinsNotRegisteredError, SuinsRpcError, TOOL_FLAGS, TOOL_MODIFIABLE_FIELDS, TxMutex, WRITE_TOOLS, _resetNaviCircuitBreaker, activitySummaryTool, adaptAllMcpTools, adaptAllServerTools, adaptMcpTool, applyToolFlags, awaitOrFetch, balanceCheckTool, borrowTool, budgetToolResult, buildCachedSystemPrompt, buildMcpTools, buildProactivenessInstructions, buildProfileContext, buildSelfEvaluationInstruction, buildStateContext, buildTool, claimRewardsTool, classifyEffort, clearPortfolioCache, clearPortfolioCacheFor, clearPriceMapCache, compactMessages, createGuardRunnerState, engineToSSE, estimateTokens, explainTxTool, extractConversationText, extractMcpText, fetchAddressDefiPortfolio, fetchAddressPortfolio, fetchAudricHistory, fetchAudricPortfolio, fetchAvailableRewards, fetchBalance, fetchHealthFactor, fetchPositions, fetchProtocolStats, fetchRates, fetchSavings, fetchTokenPrices, fetchWalletCoins, findTool, getAudricApiBase, getDefaultTools, getDefiCacheStore, getFetchLock, getMcpManager, getModifiableFields, getNaviCacheStore, getTelemetrySink, getToolFlags, getWalletAddress, getWalletCacheStore, guardArtifactPreview, guardStaleData, hasNaviMcp, healthCheckTool, loadRecipes, looksLikeSuiNs, microcompact, mppServicesTool, naviKey, normalizeAddressInput, parseMcpJson, parseRecipe, parseSSE, payApiTool, portfolioAnalysisTool, protocolDeepDiveTool, ratesInfoTool, registerEngineTools, renderCanvasTool, repayDebtTool, requireAgent, resetDefiCacheStore, resetFetchLock, resetNaviCacheStore, resetTelemetrySink, resetWalletCacheStore, resolveAddressToSuinsViaRpc, resolvePermissionTier, resolveSuinsTool, resolveSuinsViaRpc, resolveUsdValue, runGuards, runTools, saveContactTool, saveDepositTool, savingsInfoTool, sendTransferTool, serializeSSE, setDefiCacheStore, setFetchLock, setNaviCacheStore, setTelemetrySink, setWalletCacheStore, spendingAnalyticsTool, swapExecuteTool, swapQuoteTool, tokenPricesTool, toolNameToOperation, toolsToDefinitions, transactionHistoryTool, transformBalance, transformHealthFactor, transformPositions, transformRates, transformRewards, transformSavings, updateGuardStateAfterToolResult, validateHistory, voloStakeTool, voloStatsTool, voloUnstakeTool, webSearchTool, withdrawTool, yieldSummaryTool };
8520
8586
  //# sourceMappingURL=index.js.map
8521
8587
  //# sourceMappingURL=index.js.map