chain-insights 0.75.0 → 0.76.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.
Files changed (135) hide show
  1. package/README.md +1 -0
  2. package/dist/{action-log-D49Par9P.mjs → action-log-Byv9Ln_6.mjs} +4 -10
  3. package/dist/{action-log-D49Par9P.mjs.map → action-log-Byv9Ln_6.mjs.map} +1 -1
  4. package/dist/{action-log-HniMMF7f.cjs → action-log-WMW6xFMx.cjs} +3 -9
  5. package/dist/{active-Dkf8AB1R.mjs → active-D2aabYRF.mjs} +3 -4
  6. package/dist/{active-Dkf8AB1R.mjs.map → active-D2aabYRF.mjs.map} +1 -1
  7. package/dist/{active-Bc13hJIm.cjs → active-q3yViZhc.cjs} +2 -3
  8. package/dist/answer-hint-BlYEBq_Y.cjs +57 -0
  9. package/dist/answer-hint-vOE1O6Lf.mjs +48 -0
  10. package/dist/answer-hint-vOE1O6Lf.mjs.map +1 -0
  11. package/dist/{buy-_mpdRieG.mjs → buy-B2luUbWF.mjs} +5 -6
  12. package/dist/{buy-_mpdRieG.mjs.map → buy-B2luUbWF.mjs.map} +1 -1
  13. package/dist/{buy-97M6dtEu.cjs → buy-DEoGITbT.cjs} +4 -5
  14. package/dist/{cache-location-CBVzUIxq.cjs → cache-location-C09AE55j.cjs} +2 -3
  15. package/dist/{cache-location-BO2XkfgI.mjs → cache-location-DxTTqBwk.mjs} +2 -3
  16. package/dist/{cache-location-BO2XkfgI.mjs.map → cache-location-DxTTqBwk.mjs.map} +1 -1
  17. package/dist/{call-args-B0oMK1-J.mjs → call-args-CBqbYfOE.mjs} +15 -4
  18. package/dist/{call-args-B0oMK1-J.mjs.map → call-args-CBqbYfOE.mjs.map} +1 -1
  19. package/dist/{call-args-C8Gp5gco.cjs → call-args-DXEmPeE-.cjs} +14 -2
  20. package/dist/{capabilities-DxojbX4D.mjs → capabilities-BRNHcabF.mjs} +5 -11
  21. package/dist/{capabilities-DxojbX4D.mjs.map → capabilities-BRNHcabF.mjs.map} +1 -1
  22. package/dist/{capabilities-Ds3320iS.cjs → capabilities-DalimVY2.cjs} +4 -10
  23. package/dist/{claude-desktop-Jmm4PlBZ.cjs → claude-desktop-3OksQZVE.cjs} +2 -3
  24. package/dist/{claude-desktop-6jwX0Lux.mjs → claude-desktop-C1SDYAP2.mjs} +2 -3
  25. package/dist/{claude-desktop-6jwX0Lux.mjs.map → claude-desktop-C1SDYAP2.mjs.map} +1 -1
  26. package/dist/cli.cjs +95 -76
  27. package/dist/cli.mjs +94 -75
  28. package/dist/cli.mjs.map +1 -1
  29. package/dist/{client-7qOfAdpH.mjs → client-BaHAIidE.mjs} +10 -21
  30. package/dist/{client-7qOfAdpH.mjs.map → client-BaHAIidE.mjs.map} +1 -1
  31. package/dist/{client-C9uwHnBS.cjs → client-Ddk4X9Ko.cjs} +9 -20
  32. package/dist/{config-BxtMoo9c.cjs → config-BdE8LcF-.cjs} +3 -5
  33. package/dist/{config-9MabJh5R.mjs → config-BkLIqOYq.mjs} +4 -6
  34. package/dist/{config-9MabJh5R.mjs.map → config-BkLIqOYq.mjs.map} +1 -1
  35. package/dist/{create-CpfZq2fx.mjs → create-CluDZkuF.mjs} +3 -4
  36. package/dist/{create-CpfZq2fx.mjs.map → create-CluDZkuF.mjs.map} +1 -1
  37. package/dist/{create-DdggkF04.cjs → create-DvBumvHn.cjs} +2 -3
  38. package/dist/{dex-registry-Chs79Ukc.cjs → dex-registry-CZQB2YhU.cjs} +4 -26
  39. package/dist/{dex-registry-rziydXYq.mjs → dex-registry-D6Xxi_vr.mjs} +5 -27
  40. package/dist/{dex-registry-rziydXYq.mjs.map → dex-registry-D6Xxi_vr.mjs.map} +1 -1
  41. package/dist/{dex-tool-ib_ICiyV.mjs → dex-tool-BoAYqhZO.mjs} +8 -62
  42. package/dist/dex-tool-BoAYqhZO.mjs.map +1 -0
  43. package/dist/{dex-tool-85_76Q8i.cjs → dex-tool-DsM-pSku.cjs} +12 -72
  44. package/dist/{format-CSesEBvS.mjs → format-CsnW5M4D.mjs} +2 -3
  45. package/dist/{format-CSesEBvS.mjs.map → format-CsnW5M4D.mjs.map} +1 -1
  46. package/dist/{format-DfhRQq4L.cjs → format-DUzmoeaE.cjs} +1 -2
  47. package/dist/{graph-schema-DNJXDaTn.cjs → graph-schema-C8Pi6r7c.cjs} +8 -25
  48. package/dist/{graph-schema-Bxqwukqu.mjs → graph-schema-D4LAefGf.mjs} +9 -26
  49. package/dist/{graph-schema-Bxqwukqu.mjs.map → graph-schema-D4LAefGf.mjs.map} +1 -1
  50. package/dist/index.cjs +7 -7
  51. package/dist/index.d.cts +0 -16
  52. package/dist/index.d.cts.map +1 -1
  53. package/dist/index.d.mts +0 -16
  54. package/dist/index.d.mts.map +1 -1
  55. package/dist/index.mjs +7 -7
  56. package/dist/{known-keys-B87ZqOgE.mjs → known-keys-BbuzCZOW.mjs} +4 -7
  57. package/dist/{known-keys-B87ZqOgE.mjs.map → known-keys-BbuzCZOW.mjs.map} +1 -1
  58. package/dist/{known-keys-PKZF5GYd.cjs → known-keys-Cy8lKDOA.cjs} +3 -6
  59. package/dist/mcp-proxy.cjs +65 -39
  60. package/dist/mcp-proxy.d.cts +2 -2
  61. package/dist/mcp-proxy.d.cts.map +1 -1
  62. package/dist/mcp-proxy.d.mts +2 -2
  63. package/dist/mcp-proxy.d.mts.map +1 -1
  64. package/dist/mcp-proxy.mjs +63 -38
  65. package/dist/mcp-proxy.mjs.map +1 -1
  66. package/dist/{print-result-if-AbNLY.cjs → print-result-BYppJlUi.cjs} +19 -19
  67. package/dist/{print-result-BtEAn2Wl.mjs → print-result-IFARsMnL.mjs} +9 -21
  68. package/dist/print-result-IFARsMnL.mjs.map +1 -0
  69. package/dist/{public-tools-COG3pCpD.cjs → public-tools-Cfc1OPNS.cjs} +8 -13
  70. package/dist/{public-tools-DIJs4SHz.mjs → public-tools-DXlZcanX.mjs} +8 -13
  71. package/dist/{public-tools-DIJs4SHz.mjs.map → public-tools-DXlZcanX.mjs.map} +1 -1
  72. package/dist/{quote-DfTut0cx.mjs → quote-41CbMc37.mjs} +2 -3
  73. package/dist/{quote-DfTut0cx.mjs.map → quote-41CbMc37.mjs.map} +1 -1
  74. package/dist/{quote-B9sYNOiv.cjs → quote-pFKcSvMv.cjs} +1 -2
  75. package/dist/{request-timeout-CYmQF8N7.cjs → request-timeout-DxwNijQD.cjs} +1 -2
  76. package/dist/{request-timeout-lBBe0mGf.mjs → request-timeout-K3ljP0pa.mjs} +2 -3
  77. package/dist/{request-timeout-lBBe0mGf.mjs.map → request-timeout-K3ljP0pa.mjs.map} +1 -1
  78. package/dist/{robinhood-CCTMagwM.mjs → robinhood-0NZsA6ZW.mjs} +2 -3
  79. package/dist/robinhood-0NZsA6ZW.mjs.map +1 -0
  80. package/dist/{robinhood-ChiT69sc.cjs → robinhood-DumTxvlA.cjs} +1 -2
  81. package/dist/{rolldown-runtime-8H4AJuhK.mjs → rolldown-runtime-BJohB4LM.mjs} +1 -2
  82. package/dist/{rolldown-runtime-C0BPl7ul.cjs → rolldown-runtime-BW-eSwOZ.cjs} +1 -2
  83. package/dist/{rules-BWdbOtHi.mjs → rules-B3w9pCeQ.mjs} +2 -3
  84. package/dist/{rules-BWdbOtHi.mjs.map → rules-B3w9pCeQ.mjs.map} +1 -1
  85. package/dist/{rules-BD-cNHMX.cjs → rules-BKwfmNsJ.cjs} +1 -2
  86. package/dist/{schema-KjZqCHbu.mjs → schema-CKnQsdw9.mjs} +6 -13
  87. package/dist/{schema-KjZqCHbu.mjs.map → schema-CKnQsdw9.mjs.map} +1 -1
  88. package/dist/{schema-tX0U0-VI.cjs → schema-CSESfCvA.cjs} +5 -12
  89. package/dist/{schema-cache-DRObKUvS.mjs → schema-cache-BfKHodDY.mjs} +3 -4
  90. package/dist/{schema-cache-DRObKUvS.mjs.map → schema-cache-BfKHodDY.mjs.map} +1 -1
  91. package/dist/{schema-cache-C7v9ml6S.cjs → schema-cache-NLgJmh4X.cjs} +3 -4
  92. package/dist/{skill-refresh-xYWZ_hua.mjs → skill-refresh-BchIsODN.mjs} +2 -3
  93. package/dist/{skill-refresh-xYWZ_hua.mjs.map → skill-refresh-BchIsODN.mjs.map} +1 -1
  94. package/dist/{skill-refresh-Be2D5FrX.cjs → skill-refresh-DaCTxhhy.cjs} +2 -3
  95. package/dist/{subscription-status-DIuH84fM.mjs → subscription-status-5WfPhSep.mjs} +3 -4
  96. package/dist/{subscription-status-DIuH84fM.mjs.map → subscription-status-5WfPhSep.mjs.map} +1 -1
  97. package/dist/{subscription-status-9tMfD90J.cjs → subscription-status-w4zI2KCK.cjs} +2 -3
  98. package/dist/token-lookup-BJ00JO9A.cjs +342 -0
  99. package/dist/token-lookup-XnyisLQW.mjs +303 -0
  100. package/dist/token-lookup-XnyisLQW.mjs.map +1 -0
  101. package/dist/{tool-visibility-DTAYvE9E.cjs → tool-visibility-DIpgPULN.cjs} +5 -10
  102. package/dist/{tool-visibility-zcmwMSbn.mjs → tool-visibility-Dy3psowS.mjs} +6 -11
  103. package/dist/tool-visibility-Dy3psowS.mjs.map +1 -0
  104. package/dist/{tools-D9ep9E7Q.mjs → tools-6pZo4h_p.mjs} +6 -21
  105. package/dist/{tools-D9ep9E7Q.mjs.map → tools-6pZo4h_p.mjs.map} +1 -1
  106. package/dist/{tools-Cmnq7yip.cjs → tools-DZLizem9.cjs} +5 -20
  107. package/dist/{topup-B6gZbTmv.mjs → topup--7JTo4UQ.mjs} +6 -7
  108. package/dist/{topup-B6gZbTmv.mjs.map → topup--7JTo4UQ.mjs.map} +1 -1
  109. package/dist/{topup-DVTCU2le.cjs → topup-BgI9OcUd.cjs} +5 -6
  110. package/dist/{topup-server-ShuYSyBY.cjs → topup-server-D9Uk1Th3.cjs} +7 -24
  111. package/dist/{topup-server-KQDviFXG.mjs → topup-server-DR0HaUcR.mjs} +8 -25
  112. package/dist/{topup-server-KQDviFXG.mjs.map → topup-server-DR0HaUcR.mjs.map} +1 -1
  113. package/dist/{topup-server-BcT7DIpd.mjs → topup-server-DlwzFEF1.mjs} +5 -12
  114. package/dist/{topup-server-BcT7DIpd.mjs.map → topup-server-DlwzFEF1.mjs.map} +1 -1
  115. package/dist/{topup-server-f4Gx0vji.cjs → topup-server-H1M_7PJK.cjs} +4 -11
  116. package/dist/{transport-error-C7OQjmC7.mjs → transport-error-68G35VPH.mjs} +3 -4
  117. package/dist/{transport-error-C7OQjmC7.mjs.map → transport-error-68G35VPH.mjs.map} +1 -1
  118. package/dist/{transport-error-qDWQn8hb.cjs → transport-error-DXy1iTpS.cjs} +2 -3
  119. package/dist/{update-DqBhBXFs.mjs → update-BH8F4cQ2.mjs} +3 -4
  120. package/dist/{update-DqBhBXFs.mjs.map → update-BH8F4cQ2.mjs.map} +1 -1
  121. package/dist/{update-NowrCmjR.cjs → update-DUDdQSEU.cjs} +2 -3
  122. package/dist/{usage-status-Frot6fPG.mjs → usage-status-BUZgRl4r.mjs} +3 -5
  123. package/dist/{usage-status-Frot6fPG.mjs.map → usage-status-BUZgRl4r.mjs.map} +1 -1
  124. package/dist/{usage-status-DonwoLR3.cjs → usage-status-DnV3I3gX.cjs} +2 -4
  125. package/dist/{wallet-QTo5YCFR.mjs → wallet-B1M0HdQh.mjs} +4 -8
  126. package/dist/{wallet-QTo5YCFR.mjs.map → wallet-B1M0HdQh.mjs.map} +1 -1
  127. package/dist/{wallet-CgIAfdxL.cjs → wallet-BubGd_sG.cjs} +3 -7
  128. package/docs/mcp-proxy.md +34 -0
  129. package/docs/stability.md +3 -2
  130. package/package.json +1 -1
  131. package/skills/chain-insights-cypher/SKILL.md +3 -0
  132. package/dist/dex-tool-ib_ICiyV.mjs.map +0 -1
  133. package/dist/print-result-BtEAn2Wl.mjs.map +0 -1
  134. package/dist/robinhood-CCTMagwM.mjs.map +0 -1
  135. package/dist/tool-visibility-zcmwMSbn.mjs.map +0 -1
@@ -1,14 +1,16 @@
1
- import { a as withTimestampTextResult, c as PACKAGE_VERSION, o as withoutUtcProperties } from "./print-result-BtEAn2Wl.mjs";
2
- import { r as SUBSCRIPTION_TOPUP_TOOL, t as META_SUBSCRIPTION_STATUS_DESCRIPTION } from "./rules-BWdbOtHi.mjs";
3
- import { t as PaymentRequiredError } from "./client-7qOfAdpH.mjs";
4
- import { i as isAppOnlyTool, n as PUBLIC_MCP_TOOL_ALLOWED_ARGS, r as PUBLIC_MCP_TOOL_REQUIRED_ARGS, t as HIDDEN_REMOTE_TOOL_NAMES } from "./tool-visibility-zcmwMSbn.mjs";
5
- import { n as primitiveBackendUsageStatus, t as freeTierSpentText } from "./usage-status-Frot6fPG.mjs";
6
- import { i as unavailableSubscriptionStatus, n as subscriptionStatusNeedsWallet, t as subscriptionStatusArguments } from "./subscription-status-DIuH84fM.mjs";
7
- import { r as mirrorGraphNetworkCapabilities } from "./capabilities-DxojbX4D.mjs";
8
- import { a as handleMetaSchema, c as GRAPH_EXPAND_TITLE, d as handleGraphExpand, l as GRAPH_EXPAND_TOOL, n as META_SCHEMA_DESCRIPTION, o as FLOWS_MAX_OFFSET, r as META_SCHEMA_TITLE, s as GRAPH_EXPAND_DESCRIPTION, t as GraphSchemaError, u as TRANSFERS_MAX } from "./graph-schema-Bxqwukqu.mjs";
9
- import { r as appendActionLog, t as actionLogSignalsFromResult } from "./action-log-D49Par9P.mjs";
10
- import { i as META_DEX_LOOKUP_TOOL, n as META_DEX_LOOKUP_DESCRIPTION, o as handleMetaDexLookup, r as META_DEX_LOOKUP_TITLE, s as withAnswerHintResult, t as META_DEX_LOOKUP_ANNOTATIONS } from "./dex-tool-ib_ICiyV.mjs";
11
- import { r as loadRegistry } from "./dex-registry-rziydXYq.mjs";
1
+ import { c as withoutUtcProperties, s as withTimestampTextResult, u as PACKAGE_VERSION } from "./print-result-IFARsMnL.mjs";
2
+ import { i as isAppOnlyTool, n as PUBLIC_MCP_TOOL_ALLOWED_ARGS, r as PUBLIC_MCP_TOOL_REQUIRED_ARGS, t as HIDDEN_REMOTE_TOOL_NAMES } from "./tool-visibility-Dy3psowS.mjs";
3
+ import { t as PaymentRequiredError } from "./client-BaHAIidE.mjs";
4
+ import { n as primitiveBackendUsageStatus, t as freeTierSpentText } from "./usage-status-BUZgRl4r.mjs";
5
+ import { i as unavailableSubscriptionStatus, n as subscriptionStatusNeedsWallet, t as subscriptionStatusArguments } from "./subscription-status-5WfPhSep.mjs";
6
+ import { r as SUBSCRIPTION_TOPUP_TOOL, t as META_SUBSCRIPTION_STATUS_DESCRIPTION } from "./rules-B3w9pCeQ.mjs";
7
+ import { r as mirrorGraphNetworkCapabilities } from "./capabilities-BRNHcabF.mjs";
8
+ import { a as handleMetaSchema, c as GRAPH_EXPAND_TITLE, d as handleGraphExpand, l as GRAPH_EXPAND_TOOL, n as META_SCHEMA_DESCRIPTION, o as FLOWS_MAX_OFFSET, r as META_SCHEMA_TITLE, s as GRAPH_EXPAND_DESCRIPTION, t as GraphSchemaError, u as TRANSFERS_MAX } from "./graph-schema-D4LAefGf.mjs";
9
+ import { r as appendActionLog, t as actionLogSignalsFromResult } from "./action-log-Byv9Ln_6.mjs";
10
+ import { n as withAnswerHintResult } from "./answer-hint-vOE1O6Lf.mjs";
11
+ import { i as META_DEX_LOOKUP_TOOL, n as META_DEX_LOOKUP_DESCRIPTION, o as handleMetaDexLookup, r as META_DEX_LOOKUP_TITLE, t as META_DEX_LOOKUP_ANNOTATIONS } from "./dex-tool-BoAYqhZO.mjs";
12
+ import { r as loadRegistry } from "./dex-registry-D6Xxi_vr.mjs";
13
+ import { a as SYMBOL_MAX, i as META_TOKEN_LOOKUP_TOOL, n as META_TOKEN_LOOKUP_DESCRIPTION, o as handleMetaTokenLookup, r as META_TOKEN_LOOKUP_TITLE, t as META_TOKEN_LOOKUP_ANNOTATIONS } from "./token-lookup-XnyisLQW.mjs";
12
14
  import { fileURLToPath } from "node:url";
13
15
  import path from "node:path";
14
16
  import { readFileSync } from "node:fs";
@@ -20,7 +22,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
20
22
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
21
23
  import { Client } from "@modelcontextprotocol/sdk/client/index.js";
22
24
  import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
23
- //#region src/mcp/rate-limit.ts
25
+ // src/mcp/rate-limit.ts
24
26
  /**
25
27
  * The graph endpoint limits requests per address. Its refusal arrives as a
26
28
  * thrown HTTP error, "too many requests from this address; retry after 3
@@ -98,8 +100,7 @@ function rateLimitedResult(toolName, err) {
98
100
  isError: true
99
101
  };
100
102
  }
101
- //#endregion
102
- //#region src/mcp/batch-busy-retry.ts
103
+ // src/mcp/batch-busy-retry.ts
103
104
  /**
104
105
  * A graph_query_batch member that reads the chain node costs several node
105
106
  * calls (an Address read costs four), and the graph server caps node calls
@@ -216,8 +217,7 @@ async function withBusyRetry(args, call, sleep = defaultSleep) {
216
217
  }
217
218
  return result;
218
219
  }
219
- //#endregion
220
- //#region src/mcp/layer-routing.ts
220
+ // src/mcp/layer-routing.ts
221
221
  /** The routing rule, in one sentence. The server states it in the same words. */
222
222
  const ROUTING_RULE = "Route by what the question names: an address, a pair with a day, a transaction or a block. Topology searches outward from an address, while facts and chain look up one known thing.";
223
223
  /** The rule in three lines, one for each layer. */
@@ -284,8 +284,7 @@ function routingHead() {
284
284
  function routingHintLines() {
285
285
  return [`- Pick the layer first. ${ROUTING_RULE} 1. ${ROUTING_LINES[0]} 2. ${ROUTING_LINES[1]} 3. ${ROUTING_LINES[2]} ${ROUTING_NOT_SERVED} ${ROUTING_ADDRESS_ON_CHAIN} ${ROUTING_TWO_FIT} ${ROUTING_HANDOFF} The lookups that USE chain serves are listed in chain_admission.lookups of meta_network_capabilities. Read every limit that the server publishes from meta_network_capabilities (chain_admission and, when the server sends them, topology_admission and facts_admission). Never write a limit down.`, `- Act on a refusal by its class. ${moveLines().join(" ")}`];
286
286
  }
287
- //#endregion
288
- //#region src/mcp/view-server.ts
287
+ // src/mcp/view-server.ts
289
288
  /**
290
289
  * The Chain Insights view as a browser page on the user's own PC.
291
290
  *
@@ -534,8 +533,7 @@ Object.freeze([...GRAPH_LINK_COLUMNS, ...GRAPH_NODE_COLUMNS]);
534
533
  function flowsRecipeReturn(from, to, link = "f") {
535
534
  return `${from}.address AS from_address, ${to}.address AS to_address, ${link}.amount_usd_sum AS amount_usd_sum, ${link}.tx_count AS tx_count, ${link}.first_seen_timestamp AS first_seen_timestamp, ${link}.last_seen_timestamp AS last_seen_timestamp, ${from}.labels AS from_labels, ${to}.labels AS to_labels, ${from}.is_exchange AS from_is_exchange, ${to}.is_exchange AS to_is_exchange`;
536
535
  }
537
- //#endregion
538
- //#region src/mcp/remote-connect.ts
536
+ // src/mcp/remote-connect.ts
539
537
  /**
540
538
  * Connects a client to a fresh transport. The SDK leaves a transport attached
541
539
  * when `connect` fails after `start` (an initialize answered 429), and the
@@ -645,8 +643,7 @@ async function connectRemote(options) {
645
643
  message: describeRemoteFailure(options.endpoint, lastErr, lastStatus)
646
644
  };
647
645
  }
648
- //#endregion
649
- //#region src/mcp/proxy.ts
646
+ // src/mcp/proxy.ts
650
647
  const LOCAL_TOOL_NAMES = /* @__PURE__ */ new Set([
651
648
  "meta_network_capabilities",
652
649
  "meta_schema",
@@ -655,6 +652,7 @@ const LOCAL_TOOL_NAMES = /* @__PURE__ */ new Set([
655
652
  "meta_help",
656
653
  "meta_rules",
657
654
  META_DEX_LOOKUP_TOOL,
655
+ META_TOKEN_LOOKUP_TOOL,
658
656
  "wallet_balance",
659
657
  "wallet_topup",
660
658
  SUBSCRIPTION_TOPUP_TOOL,
@@ -716,17 +714,19 @@ function resolveMcpProxyMode(env = process.env) {
716
714
  const GRAPH_LAYERS_TEXT = "Use USE topology for topology (address/FLOWED_TO/OPERATED_BY/LINKED graph with SWAPPED, ADDED_LIQUIDITY, REMOVED_LIQUIDITY, BRIDGED and the Pool, Token and NFT labels, unified recent+historical) and USE facts for bounded TRANSFER, SWAP, LIQUIDITY_ADD, LIQUIDITY_REMOVE and BRIDGE_CROSSING rows and enrichment, and USE chain for the chain node's own record of one known transaction, block, address or the head.";
717
715
  const TOOL_RULES_FIRST = "Rules first: if the chain-insights-cypher skill is not loaded in this chat, call meta_rules once before this tool. For a graph, alias the columns from_address and to_address; the host draws the picture from the answer itself. Never draw it again with another tool, such as a visualize or widget tool.";
718
716
  const GRAPH_QUERY_DEX_DOOR_SENTENCE = "A question that names an exchange and no address starts with meta_dex_lookup, never with a scan of :Protocol, :Pool or labels.";
717
+ const GRAPH_QUERY_TOKEN_DOOR_SENTENCE = "A question that names a token by its ticker or name and gives no contract starts with meta_token_lookup: tickers collide, so never guess the contract.";
719
718
  const GRAPH_QUERY_ROLE_MARKS_SENTENCE = ":Sanctioned (is_sanctioned) means the address is on a sanctions list. :IssuerFrozen (is_issuer_frozen) means an issuer froze this wallet; the token in labels says which. Neither is :Scam.";
720
719
  const KNOWN_PUBLIC_TOOL_DESCRIPTIONS = {
721
720
  meta_network_capabilities: "Return the current Chain Insights network and tool support matrix. Takes no arguments: send {}.",
722
721
  meta_schema: META_SCHEMA_DESCRIPTION,
723
722
  [META_DEX_LOOKUP_TOOL]: META_DEX_LOOKUP_DESCRIPTION,
723
+ [META_TOKEN_LOOKUP_TOOL]: META_TOKEN_LOOKUP_DESCRIPTION,
724
724
  meta_usage_status: "Return the caller's public free graph_query quota for the current UTC day.",
725
725
  meta_subscription_status: META_SUBSCRIPTION_STATUS_DESCRIPTION,
726
726
  meta_help: "Show a short guide to Chain Insights tools and workflow.",
727
727
  meta_rules: "Return the Chain Insights rules: how to write graph_query and graph_query_batch reads that are served, how to name columns so the answer is drawn as a graph, a time series or a table, and how to write the answer. Call it once per chat, before the first graph query, when the chain-insights-cypher skill is not loaded. Takes no arguments: send {}.",
728
728
  wallet_balance: "Show the local Chain Insights payment wallet address, payment network, token, and amount.",
729
- graph_query: `${TOOL_RULES_FIRST} Run a read-only GQL/Cypher query through the Chain Insights graph endpoint. ${GRAPH_LAYERS_TEXT} ${GRAPH_QUERY_DEX_DOOR_SENTENCE} ${GRAPH_QUERY_ROLE_MARKS_SENTENCE} ${ROUTING_NOT_SERVED} Preserve full addresses exactly, and write every address in full, all 42 characters, in your answer: never shorten one with ... or ….`,
729
+ graph_query: `${TOOL_RULES_FIRST} Run a read-only GQL/Cypher query through the Chain Insights graph endpoint. ${GRAPH_LAYERS_TEXT} ${GRAPH_QUERY_DEX_DOOR_SENTENCE} ${GRAPH_QUERY_TOKEN_DOOR_SENTENCE} ${GRAPH_QUERY_ROLE_MARKS_SENTENCE} ${ROUTING_NOT_SERVED} Preserve full addresses exactly, and write every address in full, all 42 characters, in your answer: never shorten one with ... or ….`,
730
730
  graph_query_batch: `${TOOL_RULES_FIRST} Run multiple read-only GQL/Cypher queries through the Chain Insights graph endpoint in one paid batch. Prefer this for related topology/facts reads. For a time series across days, send one USE facts total per day with the query id set to the day, "YYYY-MM-DD": the view joins them into one series. Write every address in full in your answer, all 42 characters.`
731
731
  };
732
732
  const KNOWN_PUBLIC_TOOL_TITLES = {
@@ -847,12 +847,12 @@ function fallbackGraphPrimitiveTools() {
847
847
  * public. Reads the address only; nothing is signed or sent.
848
848
  */
849
849
  async function localTopupWalletAddress() {
850
- const { isWalletConfigured } = await import("./wallet-QTo5YCFR.mjs").then((n) => n.s);
850
+ const { isWalletConfigured } = await import("./wallet-B1M0HdQh.mjs").then((n) => n.s);
851
851
  if (!await isWalletConfigured()) return null;
852
- const { getWalletAccount } = await import("./tools-D9ep9E7Q.mjs").then((n) => n.p);
852
+ const { getWalletAccount } = await import("./tools-6pZo4h_p.mjs").then((n) => n.p);
853
853
  const account = await getWalletAccount();
854
854
  if (account.keyIsPublic === true) {
855
- const { PUBLIC_KEY_WALLET_TEXT } = await import("./known-keys-B87ZqOgE.mjs").then((n) => n.i);
855
+ const { PUBLIC_KEY_WALLET_TEXT } = await import("./known-keys-BbuzCZOW.mjs").then((n) => n.i);
856
856
  throw new Error(PUBLIC_KEY_WALLET_TEXT);
857
857
  }
858
858
  return account.address;
@@ -860,7 +860,7 @@ async function localTopupWalletAddress() {
860
860
  /** The local wallet address for an older server that still asks for it; null when none. */
861
861
  async function localSubscriptionWalletAddress() {
862
862
  try {
863
- const { getWalletAccount } = await import("./tools-D9ep9E7Q.mjs").then((n) => n.p);
863
+ const { getWalletAccount } = await import("./tools-6pZo4h_p.mjs").then((n) => n.p);
864
864
  return (await getWalletAccount()).address;
865
865
  } catch {
866
866
  return null;
@@ -1218,10 +1218,10 @@ function jsonTextResult(structuredContent) {
1218
1218
  * All diagnostic output goes to console.error() or process.stderr.write().
1219
1219
  */
1220
1220
  async function createProxy() {
1221
- const { loadConfig } = await import("./config-9MabJh5R.mjs").then((n) => n.t);
1222
- const { activeDataDir, findActiveWorkspace } = await import("./active-Dkf8AB1R.mjs").then((n) => n.t);
1223
- const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await import("./client-7qOfAdpH.mjs").then((n) => n.r);
1224
- const { loadSchema, saveSchema } = await import("./schema-cache-DRObKUvS.mjs");
1221
+ const { loadConfig } = await import("./config-BkLIqOYq.mjs").then((n) => n.t);
1222
+ const { activeDataDir, findActiveWorkspace } = await import("./active-D2aabYRF.mjs").then((n) => n.t);
1223
+ const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await import("./client-BaHAIidE.mjs").then((n) => n.r);
1224
+ const { loadSchema, saveSchema } = await import("./schema-cache-BfKHodDY.mjs");
1225
1225
  const proxyMode = resolveMcpProxyMode();
1226
1226
  const workspaceArtifactsEnabled = proxyMode === "workspace";
1227
1227
  const loadedConfig = await loadConfig();
@@ -1240,7 +1240,7 @@ async function createProxy() {
1240
1240
  log_path: logger.filePath
1241
1241
  });
1242
1242
  const graphMcpEndpoint = resolveGraphMcpEndpoint(config);
1243
- const { defersToClaudeDesktop, DEFERRED_SERVER_INSTRUCTIONS } = await import("./claude-desktop-6jwX0Lux.mjs");
1243
+ const { defersToClaudeDesktop, DEFERRED_SERVER_INSTRUCTIONS } = await import("./claude-desktop-C1SDYAP2.mjs");
1244
1244
  if (defersToClaudeDesktop()) {
1245
1245
  await logger.info("proxy.deferred_to_claude_desktop", { version: PACKAGE_VERSION });
1246
1246
  await new McpServer({
@@ -1250,7 +1250,7 @@ async function createProxy() {
1250
1250
  return;
1251
1251
  }
1252
1252
  if (process.env["CHAIN_INSIGHTS_SKILL_REFRESH"] !== "0") try {
1253
- const { refreshInstalledSkills } = await import("./skill-refresh-xYWZ_hua.mjs");
1253
+ const { refreshInstalledSkills } = await import("./skill-refresh-BchIsODN.mjs");
1254
1254
  const refresh = refreshInstalledSkills(PACKAGE_VERSION);
1255
1255
  if (refresh.refreshed.length > 0 || refresh.installed.length > 0 || refresh.failed.length > 0) await logger.info("skills.refresh", {
1256
1256
  version: PACKAGE_VERSION,
@@ -1489,6 +1489,30 @@ async function createProxy() {
1489
1489
  },
1490
1490
  annotations: META_DEX_LOOKUP_ANNOTATIONS
1491
1491
  }, async (args) => handleMetaDexLookup(args, dexDependencies));
1492
+ const tokenDependencies = {
1493
+ graphQuery: async (args) => {
1494
+ const options = remoteToolRequestOptions("graph_query");
1495
+ return await withRateLimitRetry(() => options ? remoteClient.callTool({
1496
+ name: "graph_query",
1497
+ arguments: args
1498
+ }, void 0, options) : remoteClient.callTool({
1499
+ name: "graph_query",
1500
+ arguments: args
1501
+ }));
1502
+ },
1503
+ graphQueryBatch: dexDependencies.graphQueryBatch,
1504
+ unavailable: dexDependencies.unavailable,
1505
+ describeFailure: (err) => remoteCallFailureText("graph_query", err)
1506
+ };
1507
+ server.registerTool(META_TOKEN_LOOKUP_TOOL, {
1508
+ title: META_TOKEN_LOOKUP_TITLE,
1509
+ description: KNOWN_PUBLIC_TOOL_DESCRIPTIONS[META_TOKEN_LOOKUP_TOOL],
1510
+ inputSchema: {
1511
+ network: NETWORK_SCHEMA,
1512
+ symbol: z.string().min(1).max(SYMBOL_MAX).describe("The ticker or the token name as the user wrote it: TCITY, USDG, Tcity. Never a contract address: an address is already an anchor.")
1513
+ },
1514
+ annotations: META_TOKEN_LOOKUP_ANNOTATIONS
1515
+ }, async (args) => handleMetaTokenLookup(args, tokenDependencies));
1492
1516
  const readUsageStatus = async () => {
1493
1517
  try {
1494
1518
  await ensureRemote();
@@ -1595,7 +1619,7 @@ async function createProxy() {
1595
1619
  }
1596
1620
  }, async () => {
1597
1621
  try {
1598
- const { formatWalletBalanceResult, getWalletAccount, getWalletBalanceResult } = await import("./tools-D9ep9E7Q.mjs").then((n) => n.p);
1622
+ const { formatWalletBalanceResult, getWalletAccount, getWalletBalanceResult } = await import("./tools-6pZo4h_p.mjs").then((n) => n.p);
1599
1623
  const structuredContent = await getWalletBalanceResult(await getWalletAccount());
1600
1624
  return {
1601
1625
  content: [{
@@ -1705,7 +1729,7 @@ async function createProxy() {
1705
1729
  openWorldHint: false
1706
1730
  }
1707
1731
  }, async () => {
1708
- const { readPackagedSkillRules } = await import("./skill-refresh-xYWZ_hua.mjs");
1732
+ const { readPackagedSkillRules } = await import("./skill-refresh-BchIsODN.mjs");
1709
1733
  return {
1710
1734
  content: [{
1711
1735
  type: "text",
@@ -1736,6 +1760,7 @@ async function createProxy() {
1736
1760
  "- meta_network_capabilities: supported networks and available tools. Takes no arguments.",
1737
1761
  "- meta_schema: read the live graph schema of one network: labels, link types and field names. Cached for 24 hours.",
1738
1762
  "- meta_dex_lookup: turn an exchange name (Aero, Uniswap, Virtuals) into its factories, routers, pools and first reads. Call it first when a question names an exchange and gives no address.",
1763
+ "- meta_token_lookup: turn a ticker or a token name (TCITY, USDG) into every contract that carries it, with its creator. Call it first when a question names a token and gives no contract; tickers collide.",
1739
1764
  "- meta_usage_status: check the caller public free graph_query quota.",
1740
1765
  "- meta_subscription_status: check the subscription of the local wallet: window, days left, daily allowance and use, and payments not credited yet.",
1741
1766
  "- graph_query: run read-only GQL/Cypher through the universal graph endpoint. Use USE topology or USE facts.",
@@ -1756,6 +1781,7 @@ async function createProxy() {
1756
1781
  "- meta_network_capabilities: supported networks and available tools. Takes no arguments.",
1757
1782
  "- meta_schema: read the live graph schema of one network: labels, link types and field names. Cached for 24 hours.",
1758
1783
  "- meta_dex_lookup: turn an exchange name (Aero, Uniswap, Virtuals) into its factories, routers, pools and first reads. Call it first when a question names an exchange and gives no address.",
1784
+ "- meta_token_lookup: turn a ticker or a token name (TCITY, USDG) into every contract that carries it, with its creator. Call it first when a question names a token and gives no contract; tickers collide.",
1759
1785
  "- meta_usage_status: check the caller public free graph_query quota.",
1760
1786
  "- meta_subscription_status: check the subscription of the local wallet: window, days left, daily allowance and use, and payments not credited yet.",
1761
1787
  "- graph_query: run read-only GQL/Cypher through the universal graph endpoint. Use USE topology or USE facts.",
@@ -1830,7 +1856,7 @@ async function createProxy() {
1830
1856
  };
1831
1857
  server.registerTool(tool.name, toolConfig, handler);
1832
1858
  }
1833
- const { registerTopupView, TOPUP_VIEW_URI } = await import("./topup-server-KQDviFXG.mjs").then((n) => n.a);
1859
+ const { registerTopupView, TOPUP_VIEW_URI } = await import("./topup-server-DR0HaUcR.mjs").then((n) => n.a);
1834
1860
  await registerTopupView(server, { walletAddress: localTopupWalletAddress });
1835
1861
  server.registerResource("Chain Insights view", CLAUDE_VIEW_URI, {
1836
1862
  title: "Chain Insights view",
@@ -1865,7 +1891,6 @@ if (process.argv[1] && import.meta.url.includes(process.argv[1].replace(/\\/g, "
1865
1891
  process.stderr.write(`Chain Insights MCP proxy startup failed: ${err.message}\n`);
1866
1892
  process.exit(1);
1867
1893
  });
1868
- //#endregion
1869
- export { APP_ONLY_LOCAL_TOOL_NAMES, CLAUDE_VIEW_URI, GRAPH_QUERY_DEX_DOOR_SENTENCE, GRAPH_QUERY_ROLE_MARKS_SENTENCE, KNOWN_PUBLIC_TOOL_DESCRIPTIONS, LOCAL_TOOL_NAMES, MCP_APP_MIME_TYPE, PICTURE_RULES, REFUSAL_SCHEMA, createProxy, knownPublicToolInputSchema, readClaudeViewHtml, resolveMcpProxyMode };
1894
+ export { APP_ONLY_LOCAL_TOOL_NAMES, CLAUDE_VIEW_URI, GRAPH_QUERY_DEX_DOOR_SENTENCE, GRAPH_QUERY_ROLE_MARKS_SENTENCE, GRAPH_QUERY_TOKEN_DOOR_SENTENCE, KNOWN_PUBLIC_TOOL_DESCRIPTIONS, LOCAL_TOOL_NAMES, MCP_APP_MIME_TYPE, PICTURE_RULES, REFUSAL_SCHEMA, createProxy, knownPublicToolInputSchema, readClaudeViewHtml, resolveMcpProxyMode };
1870
1895
 
1871
1896
  //# sourceMappingURL=mcp-proxy.mjs.map