keyring-agent-core 0.2.31 → 0.2.32

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
@@ -1233,6 +1233,12 @@ interface AgentConfig {
1233
1233
  'wallet-action-app'?: boolean;
1234
1234
  token?: boolean;
1235
1235
  nft?: boolean;
1236
+ /**
1237
+ * NFC-tag expert: explains NFC tags (concept, how they work, what they
1238
+ * store, how to use them) and links to a country-appropriate Amazon page
1239
+ * for buying one. Opt-in — defaults to false.
1240
+ */
1241
+ nfc?: boolean;
1236
1242
  pool?: boolean;
1237
1243
  /**
1238
1244
  * Subgraph-backed pool agent (Uniswap V3 via The Graph + DefiLlama APR + CoinPool ranges).
@@ -2195,6 +2201,9 @@ declare function createTokenAgent(llm: LLMProvider, registry: ToolRegistry, opti
2195
2201
  declare const NFT_AGENT_TOOL_NAMES: readonly ["get-wallet-nfts", "get-nft-metadata", "get-nft-contract-info", "gemini-search-ai"];
2196
2202
  declare function createNftAgent(llm: LLMProvider, registry: ToolRegistry, options?: SubagentOptions): Subagent;
2197
2203
 
2204
+ declare const NFC_AGENT_TOOL_NAMES: readonly ["nfc-info", "nfc-buy-link"];
2205
+ declare function createNfcAgent(llm: LLMProvider, registry: ToolRegistry, options?: SubagentOptions): Subagent;
2206
+
2198
2207
  declare const AI_AGENT_TOOL_NAMES: readonly ["gemini-search-ai"];
2199
2208
  declare function createAiAgent(llm: LLMProvider, registry: ToolRegistry, options?: SubagentOptions): Subagent;
2200
2209
 
@@ -2205,7 +2214,7 @@ declare const WALLET_ACTION_AGENT_TOOL_NAMES: readonly ["open-send-native-form",
2205
2214
  declare function createWalletActionAgent(llm: LLMProvider, registry: ToolRegistry, options?: SubagentOptions): Subagent;
2206
2215
 
2207
2216
  /** Built-in subagent ids. */
2208
- type DefaultSubagentName = 'wallet' | 'wallet-action' | 'wallet-action-app' | 'token' | 'nft' | 'pool' | 'pool-subgraph' | 'ai';
2217
+ type DefaultSubagentName = 'wallet' | 'wallet-action' | 'wallet-action-app' | 'token' | 'nft' | 'nfc' | 'pool' | 'pool-subgraph' | 'ai';
2209
2218
  /**
2210
2219
  * Per-subagent enable flags. Default for every key is `true` EXCEPT
2211
2220
  * `pool-subgraph`, which defaults to `false` because it is mutually exclusive
@@ -4878,6 +4887,69 @@ declare class NFTMetadataTool extends BaseNftAiTool {
4878
4887
  protected readonly presentInstructions: string;
4879
4888
  }
4880
4889
 
4890
+ /**
4891
+ * Tool: nfc-info
4892
+ *
4893
+ * Answers conceptual / educational questions about NFC tags — what they are,
4894
+ * how they work, what they can store, and how to use them — from a fixed expert
4895
+ * reference. It also closes the answer with a country-appropriate Amazon "where
4896
+ * to buy" link, so an explanation naturally points the user to a shop. Takes an
4897
+ * optional `language` (BCP-47) used only to pick the local Amazon storefront for
4898
+ * that closing link; the agent still tailors the answer to the user's question
4899
+ * and language. For a pure "where can I buy one?" query, prefer `nfc-buy-link`.
4900
+ */
4901
+ declare class NfcInfoTool extends BaseTool {
4902
+ kind: ToolKind;
4903
+ name: string;
4904
+ category: string;
4905
+ description: string;
4906
+ parameters: ToolParameter[];
4907
+ protected run(args: Record<string, unknown>): Promise<unknown>;
4908
+ }
4909
+
4910
+ /**
4911
+ * Tool: nfc-buy-link
4912
+ *
4913
+ * Points the user to a country-appropriate Amazon "NFC Tag" search page. The
4914
+ * storefront is chosen from the user's language (e.g. ja → amazon.co.jp,
4915
+ * de → amazon.de), defaulting to amazon.com. The subagent knows the current
4916
+ * turn's BCP-47 language and passes it as `language`.
4917
+ */
4918
+ declare class NfcBuyTool extends BaseTool {
4919
+ kind: ToolKind;
4920
+ name: string;
4921
+ category: string;
4922
+ noSuggestions: boolean;
4923
+ description: string;
4924
+ parameters: ToolParameter[];
4925
+ protected run(args: Record<string, unknown>): Promise<unknown>;
4926
+ }
4927
+
4928
+ /**
4929
+ * Per-language Amazon storefront mapping for "where to buy an NFC tag".
4930
+ *
4931
+ * Keyed by the BCP-47 primary subtag of the user's current turn (e.g. "en",
4932
+ * "vi", "ja", "zh") — the same tag the subagent reports in its system prompt and
4933
+ * passes to the buy tool. Countries without a local Amazon storefront fall back
4934
+ * to `amazon.com`, matching the product's original `AMAZON_DOMAINS` table:
4935
+ *
4936
+ * en → amazon.com zh → amazon.cn ja → amazon.co.jp
4937
+ * de → amazon.de es → amazon.es fr → amazon.fr
4938
+ * it → amazon.it ko → amazon.com nl → amazon.nl
4939
+ * pl → amazon.pl pt → amazon.es ru → amazon.com
4940
+ * th → amazon.com tr → amazon.com.tr vi → amazon.com
4941
+ */
4942
+ declare const NFC_AMAZON_DOMAINS: Record<string, string>;
4943
+ /** Storefront used when the language is missing or unmapped. */
4944
+ declare const NFC_AMAZON_DEFAULT_DOMAIN = "amazon.com";
4945
+ /** Resolve the Amazon domain for a given language tag. */
4946
+ declare function amazonDomainForLanguage(language?: string | null): string;
4947
+ /**
4948
+ * Build the Amazon "NFC Tag" search URL for the user's language, e.g.
4949
+ * `https://amazon.co.jp/s?k=NFC%20Tag` for Japanese.
4950
+ */
4951
+ declare function nfcAmazonSearchUrl(language?: string | null): string;
4952
+
4881
4953
  type GeminiSearchAiToolConfig = LLMProviderConfig;
4882
4954
  /**
4883
4955
  * Tool: gemini-search-ai
@@ -8043,4 +8115,4 @@ declare class AbortError extends Error {
8043
8115
  */
8044
8116
  declare function isAbortError(err: unknown): boolean;
8045
8117
 
8046
- export { AI_AGENT_TOOL_NAMES, AbortError, type AddLiquidityFormProps, type AddLiquiditySummary, type AffiliateFee, type AgentConfig, AgentCore, type AgentResponse, ApproveTokenTool, BaseNftAiTool, BaseNftMessageTool, BaseSwapService, BaseTool, BaseWalletActionTool, type BuyTokenConfirmTxProps, type BuyTokenSide, BuyTokenTool, type ChainMeta, type ChainRef, type ChainSelector, ChatHistory, type ChatMessage, type ChatOptions, type ChatRole, type CheckApprovalParams, type CheckApprovalResult, type ConfirmAddLiquidityTxProps, type CortexResponse, DEFAULT_CHAIN, DEFAULT_PROVIDER, DEFAULT_RPC_BY_CHAIN, DebridgeAdapter, type DecodedCall, type DecodedEvent, type DecodedParam, type DefaultSubagentName, type DefiPosition, type DefiPositionDetails, type DefiPositionToken, type DefiProtocolSummary, EstimatePoolYieldTool, type EstimatePoolYieldToolConfig, type ExchangeProviderConfig, type ExecuteSwapParams, type ExecuteSwapResult, GeminiProvider, GeminiSearchAiTool, type GeminiSearchAiToolConfig, HEX_TO_PANTOGRAPH, type HolderChangePeriod, type HolderSupplyTier, type IngestKnowledgeBaseInput, type IngestKnowledgeBaseResult, type InputTokenInfo, type KBSearchResult, KnowledgeBase, type KnowledgeBaseEntry, type KnowledgeBaseProvider, type LLMProvider, type LLMProviderConfig, type LLMResponse, type LLMToolCall, ManageLiquidityRedirectTool, type MoralisApiResponse, MoralisService, type MoralisServiceConfig, NFTContractInfoTool, type NFTContractMetadata, type NFTItem, type NFTLastSale, type NFTMetadata, NFTMetadataTool, NFT_AGENT_TOOL_NAMES, type NativeTokenInfo, type NftMessageToolConfig, type NftTransferLastSale, OpenAddLiquidityFormTool, type OpenAddLiquidityFormToolConfig, POOL_AGENT_TOOL_NAMES, PantographService, type PantographServiceConfig, type PaymentToken, PoolByAddressTool, type PoolByAddressToolConfig, PoolDetailTool, type PoolDetailToolConfig, type PoolDisplayInfo, PoolFallbackAiTool, type PoolFallbackAiToolConfig, type PoolOnchainInfo, PoolPriceRangesTool, type PoolPriceRangesToolConfig, PoolSearchTool, type PoolSearchToolConfig, PoolService, type PoolServiceConfig, type PresetInputs, PreviewAddLiquidityTool, type PreviewAddLiquidityToolConfig, type PriceBounds, type PriceRangePrefill, type ProviderName, type QuickRate, type RangePreset, type ReActPhase, type ReActStep, type ReActTrace, RelayAdapter, type ResolvedRange, Router, type RouterAssignment, type RouterDecision, SUPPORTED_CHAINS, SUPPORTED_CHAINS_LABEL, SWAP_PROVIDER_CONFIG, SendNativeTool, SendNftTool, SendTokenTool, type StorageProvider, Subagent, type SubagentCard, type SubagentOptions, type SubagentParams, type SubagentResult, type SubagentTask, type SubagentToggles, SubgraphAddPoolTool, type SubgraphAddPoolToolConfig, SubgraphCoinPoolPairsTool, type SubgraphCoinPoolPairsToolConfig, SubgraphPoolByAddressTool, type SubgraphPoolByAddressToolConfig, SubgraphPoolByPositionIdTool, type SubgraphPoolByPositionIdToolConfig, SubgraphPoolSearchTool, type SubgraphPoolSearchToolConfig, SubgraphPositionDetailTool, type SubgraphPositionDetailToolConfig, SubgraphTrendingPoolsTool, type SubgraphTrendingPoolsToolConfig, type SuggestedAction, Summarizer, type SupportedChainId, type SupportedChainName, type SwapQuoteParams, type SwapQuoteResult, type SwapServiceConfig, SwapServiceFactory, type SwapTokenConfirmTxProps, SwapTokenTool, type SwapTxData, Synthesizer, TOKEN_AGENT_TOOL_NAMES, TRANSFER_TOPIC, TRENDING_DEFAULT_BY_HEX_CHAIN, type TokenAnalyticsResponse, type TokenAnalyticsTimeframeBuckets, TokenAnalyticsTool, type TokenAnalyticsToolConfig, type TokenApproval, type TokenApprovalSpender, type TokenApprovalToken, type TokenBalance, type TokenDisplay, type TokenHoldersResponse, TokenHoldersTool, type TokenHoldersToolConfig, TokenInfoTool, type TokenInfoToolConfig, type TokenMetadata, type TokenScoreMetrics, type TokenScoreResponse, type TokenScoreSupply, type TokenScoreTimeframeBuckets, TokenScoreTool, type TokenScoreToolConfig, type Tool, type ToolDefinition, type ToolKind, type ToolParameter, ToolRegistry, type ToolResult, type TopGainerTimeFrames, type TopGainerToken, type TopGainersTimeFrame, TopGainersTool, type TopGainersToolConfig, TopPoolsTool, type TopPoolsToolConfig, type TrackStatus, type TrackTransactionParams, type TrackTransactionResult, type TransactionByHashResponse, TransactionByHashTool, type TransactionByHashToolConfig, type TransactionLog, type TransactionReceipt, type TransactionReceiptLog, type TrendingToken, type TrendingTokenTimeframeBuckets, TrendingTokensTool, type TrendingTokensToolConfig, type UIPayload, UNISWAP_CHAIN_SLUG, type UnsignedTx, type UpstashEmbedStrategy, type UpstashFusionAlgorithm, type UpstashKBUpsertEntry, UpstashKnowledgeBase, type UpstashKnowledgeBaseConfig, type UserContext, type VectorKBConfig, WALLET_ACTION_AGENT_TOOL_NAMES, WALLET_AGENT_TOOL_NAMES, WalletActionAppTool, type WalletActionAppToolConfig, type WalletActionProps, type WalletActionType, type WalletApprovalsResponse, WalletApprovalsTool, type WalletApprovalsToolConfig, type WalletDefiPositionSummary, WalletDefiPositionsTool, type WalletDefiPositionsToolConfig, type WalletDefiPositionsV1Response, type WalletDefiProtocolPositionsResponse, WalletDefiProtocolPositionsTool, type WalletDefiProtocolPositionsToolConfig, type WalletDefiProtocolPositionsV1Response, type WalletDefiSummaryResponse, WalletDefiSummaryTool, type WalletDefiSummaryToolConfig, type WalletHistoryCategory, type WalletHistoryContractInteraction, type WalletHistoryErc20Transfer, type WalletHistoryItem, type WalletHistoryNativeTransfer, type WalletHistoryNftTransfer, type WalletHistoryResponse, WalletHistoryTool, type WalletHistoryToolConfig, WalletNFTsTool, type WalletNFTsToolConfig, type WalletNftTransferItem, type WalletNftTransfersResponse, WalletNftTransfersTool, type WalletNftTransfersToolConfig, type WalletPnlDaysWindow, type WalletPnlResponse, type WalletPnlSummaryResponse, WalletPnlSummaryTool, type WalletPnlSummaryToolConfig, type WalletPnlTokenItem, WalletPnlTool, type WalletPnlToolConfig, WalletTokenBalancesTool, type WalletTokenBalancesToolConfig, type WalletTokenTransferItem, type WalletTokenTransfersResponse, WalletTokenTransfersTool, type WalletTokenTransfersToolConfig, type WebsiteTrustExtraData, type WebsiteTrustInput, WebsiteTrustKeyringAgent, type WebsiteTrustKeyringAgentConfig, type WebsiteTrustResult, ZERO_ADDRESS, buildRangePresets, buildUniswapPoolUrl, clampTick, configureSupportedChains, createAiAgent, createDefaultSubagents, createNftAgent, createPoolAgent, createTokenAgent, createWalletActionAgent, createWalletActionAppTools, createWalletAgent, ethCallAt, ethCallByChain, getAffiliateFee, getChainMeta, getDefaultRpcUrl, getGatewayAddress, getNativeTokenInfo, getPositionManagerAddress, getProviderByChain, ingestKnowledgeBase, isAbortError, normalizePriceRangeToPool, priceToTick, resolveRpcUrl, roundTickToSpacing, rpcCall, setRpcOverrides, swapServiceFactory, tickToPrice, toPantographChain };
8118
+ export { AI_AGENT_TOOL_NAMES, AbortError, type AddLiquidityFormProps, type AddLiquiditySummary, type AffiliateFee, type AgentConfig, AgentCore, type AgentResponse, ApproveTokenTool, BaseNftAiTool, BaseNftMessageTool, BaseSwapService, BaseTool, BaseWalletActionTool, type BuyTokenConfirmTxProps, type BuyTokenSide, BuyTokenTool, type ChainMeta, type ChainRef, type ChainSelector, ChatHistory, type ChatMessage, type ChatOptions, type ChatRole, type CheckApprovalParams, type CheckApprovalResult, type ConfirmAddLiquidityTxProps, type CortexResponse, DEFAULT_CHAIN, DEFAULT_PROVIDER, DEFAULT_RPC_BY_CHAIN, DebridgeAdapter, type DecodedCall, type DecodedEvent, type DecodedParam, type DefaultSubagentName, type DefiPosition, type DefiPositionDetails, type DefiPositionToken, type DefiProtocolSummary, EstimatePoolYieldTool, type EstimatePoolYieldToolConfig, type ExchangeProviderConfig, type ExecuteSwapParams, type ExecuteSwapResult, GeminiProvider, GeminiSearchAiTool, type GeminiSearchAiToolConfig, HEX_TO_PANTOGRAPH, type HolderChangePeriod, type HolderSupplyTier, type IngestKnowledgeBaseInput, type IngestKnowledgeBaseResult, type InputTokenInfo, type KBSearchResult, KnowledgeBase, type KnowledgeBaseEntry, type KnowledgeBaseProvider, type LLMProvider, type LLMProviderConfig, type LLMResponse, type LLMToolCall, ManageLiquidityRedirectTool, type MoralisApiResponse, MoralisService, type MoralisServiceConfig, NFC_AGENT_TOOL_NAMES, NFC_AMAZON_DEFAULT_DOMAIN, NFC_AMAZON_DOMAINS, NFTContractInfoTool, type NFTContractMetadata, type NFTItem, type NFTLastSale, type NFTMetadata, NFTMetadataTool, NFT_AGENT_TOOL_NAMES, type NativeTokenInfo, NfcBuyTool, NfcInfoTool, type NftMessageToolConfig, type NftTransferLastSale, OpenAddLiquidityFormTool, type OpenAddLiquidityFormToolConfig, POOL_AGENT_TOOL_NAMES, PantographService, type PantographServiceConfig, type PaymentToken, PoolByAddressTool, type PoolByAddressToolConfig, PoolDetailTool, type PoolDetailToolConfig, type PoolDisplayInfo, PoolFallbackAiTool, type PoolFallbackAiToolConfig, type PoolOnchainInfo, PoolPriceRangesTool, type PoolPriceRangesToolConfig, PoolSearchTool, type PoolSearchToolConfig, PoolService, type PoolServiceConfig, type PresetInputs, PreviewAddLiquidityTool, type PreviewAddLiquidityToolConfig, type PriceBounds, type PriceRangePrefill, type ProviderName, type QuickRate, type RangePreset, type ReActPhase, type ReActStep, type ReActTrace, RelayAdapter, type ResolvedRange, Router, type RouterAssignment, type RouterDecision, SUPPORTED_CHAINS, SUPPORTED_CHAINS_LABEL, SWAP_PROVIDER_CONFIG, SendNativeTool, SendNftTool, SendTokenTool, type StorageProvider, Subagent, type SubagentCard, type SubagentOptions, type SubagentParams, type SubagentResult, type SubagentTask, type SubagentToggles, SubgraphAddPoolTool, type SubgraphAddPoolToolConfig, SubgraphCoinPoolPairsTool, type SubgraphCoinPoolPairsToolConfig, SubgraphPoolByAddressTool, type SubgraphPoolByAddressToolConfig, SubgraphPoolByPositionIdTool, type SubgraphPoolByPositionIdToolConfig, SubgraphPoolSearchTool, type SubgraphPoolSearchToolConfig, SubgraphPositionDetailTool, type SubgraphPositionDetailToolConfig, SubgraphTrendingPoolsTool, type SubgraphTrendingPoolsToolConfig, type SuggestedAction, Summarizer, type SupportedChainId, type SupportedChainName, type SwapQuoteParams, type SwapQuoteResult, type SwapServiceConfig, SwapServiceFactory, type SwapTokenConfirmTxProps, SwapTokenTool, type SwapTxData, Synthesizer, TOKEN_AGENT_TOOL_NAMES, TRANSFER_TOPIC, TRENDING_DEFAULT_BY_HEX_CHAIN, type TokenAnalyticsResponse, type TokenAnalyticsTimeframeBuckets, TokenAnalyticsTool, type TokenAnalyticsToolConfig, type TokenApproval, type TokenApprovalSpender, type TokenApprovalToken, type TokenBalance, type TokenDisplay, type TokenHoldersResponse, TokenHoldersTool, type TokenHoldersToolConfig, TokenInfoTool, type TokenInfoToolConfig, type TokenMetadata, type TokenScoreMetrics, type TokenScoreResponse, type TokenScoreSupply, type TokenScoreTimeframeBuckets, TokenScoreTool, type TokenScoreToolConfig, type Tool, type ToolDefinition, type ToolKind, type ToolParameter, ToolRegistry, type ToolResult, type TopGainerTimeFrames, type TopGainerToken, type TopGainersTimeFrame, TopGainersTool, type TopGainersToolConfig, TopPoolsTool, type TopPoolsToolConfig, type TrackStatus, type TrackTransactionParams, type TrackTransactionResult, type TransactionByHashResponse, TransactionByHashTool, type TransactionByHashToolConfig, type TransactionLog, type TransactionReceipt, type TransactionReceiptLog, type TrendingToken, type TrendingTokenTimeframeBuckets, TrendingTokensTool, type TrendingTokensToolConfig, type UIPayload, UNISWAP_CHAIN_SLUG, type UnsignedTx, type UpstashEmbedStrategy, type UpstashFusionAlgorithm, type UpstashKBUpsertEntry, UpstashKnowledgeBase, type UpstashKnowledgeBaseConfig, type UserContext, type VectorKBConfig, WALLET_ACTION_AGENT_TOOL_NAMES, WALLET_AGENT_TOOL_NAMES, WalletActionAppTool, type WalletActionAppToolConfig, type WalletActionProps, type WalletActionType, type WalletApprovalsResponse, WalletApprovalsTool, type WalletApprovalsToolConfig, type WalletDefiPositionSummary, WalletDefiPositionsTool, type WalletDefiPositionsToolConfig, type WalletDefiPositionsV1Response, type WalletDefiProtocolPositionsResponse, WalletDefiProtocolPositionsTool, type WalletDefiProtocolPositionsToolConfig, type WalletDefiProtocolPositionsV1Response, type WalletDefiSummaryResponse, WalletDefiSummaryTool, type WalletDefiSummaryToolConfig, type WalletHistoryCategory, type WalletHistoryContractInteraction, type WalletHistoryErc20Transfer, type WalletHistoryItem, type WalletHistoryNativeTransfer, type WalletHistoryNftTransfer, type WalletHistoryResponse, WalletHistoryTool, type WalletHistoryToolConfig, WalletNFTsTool, type WalletNFTsToolConfig, type WalletNftTransferItem, type WalletNftTransfersResponse, WalletNftTransfersTool, type WalletNftTransfersToolConfig, type WalletPnlDaysWindow, type WalletPnlResponse, type WalletPnlSummaryResponse, WalletPnlSummaryTool, type WalletPnlSummaryToolConfig, type WalletPnlTokenItem, WalletPnlTool, type WalletPnlToolConfig, WalletTokenBalancesTool, type WalletTokenBalancesToolConfig, type WalletTokenTransferItem, type WalletTokenTransfersResponse, WalletTokenTransfersTool, type WalletTokenTransfersToolConfig, type WebsiteTrustExtraData, type WebsiteTrustInput, WebsiteTrustKeyringAgent, type WebsiteTrustKeyringAgentConfig, type WebsiteTrustResult, ZERO_ADDRESS, amazonDomainForLanguage, buildRangePresets, buildUniswapPoolUrl, clampTick, configureSupportedChains, createAiAgent, createDefaultSubagents, createNfcAgent, createNftAgent, createPoolAgent, createTokenAgent, createWalletActionAgent, createWalletActionAppTools, createWalletAgent, ethCallAt, ethCallByChain, getAffiliateFee, getChainMeta, getDefaultRpcUrl, getGatewayAddress, getNativeTokenInfo, getPositionManagerAddress, getProviderByChain, ingestKnowledgeBase, isAbortError, nfcAmazonSearchUrl, normalizePriceRangeToPool, priceToTick, resolveRpcUrl, roundTickToSpacing, rpcCall, setRpcOverrides, swapServiceFactory, tickToPrice, toPantographChain };