chain-insights 0.73.4 → 0.74.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/cli.cjs +8 -8
- package/dist/cli.mjs +8 -8
- package/dist/mcp-proxy.cjs +7 -5
- package/dist/mcp-proxy.d.cts +1 -0
- package/dist/mcp-proxy.d.cts.map +1 -1
- package/dist/mcp-proxy.d.mts +1 -0
- package/dist/mcp-proxy.d.mts.map +1 -1
- package/dist/mcp-proxy.mjs +7 -6
- package/dist/mcp-proxy.mjs.map +1 -1
- package/dist/{print-result-CJ8d7lmz.mjs → print-result-C3YazZBw.mjs} +2 -1
- package/dist/print-result-C3YazZBw.mjs.map +1 -0
- package/dist/{print-result-qVhhuSdo.cjs → print-result-Cyqrlx8P.cjs} +1 -0
- package/dist/{tool-visibility-D-pFpuoz.mjs → tool-visibility-B6983rxo.mjs} +2 -2
- package/dist/{tool-visibility-D-pFpuoz.mjs.map → tool-visibility-B6983rxo.mjs.map} +1 -1
- package/dist/{tool-visibility-DvKqmHo3.cjs → tool-visibility-BNwvcuVx.cjs} +1 -1
- package/dist/{transport-error-nSrFW47U.cjs → transport-error-CgISST8l.cjs} +1 -1
- package/dist/{transport-error-BP6bZVDs.mjs → transport-error-D4hmpkqL.mjs} +2 -2
- package/dist/{transport-error-BP6bZVDs.mjs.map → transport-error-D4hmpkqL.mjs.map} +1 -1
- package/dist/{update-S6j1hT_S.mjs → update-CZDHSi_u.mjs} +2 -2
- package/dist/{update-S6j1hT_S.mjs.map → update-CZDHSi_u.mjs.map} +1 -1
- package/dist/{update-BDCDRozR.cjs → update-DGyRlm3J.cjs} +1 -1
- package/docs/graph-query-compatibility.md +5 -4
- package/docs/graph-tools.md +16 -10
- package/package.json +2 -2
- package/registry/README.md +2 -2
- package/registry/robinhood.json +86 -6
- package/registry/robinhood.md +25 -2
- package/skills/chain-insights-cypher/SKILL.md +2 -1
- package/skills/chain-insights-dex/SKILL.md +5 -2
- package/skills/chain-insights-dex-launchpad/SKILL.md +17 -7
- package/skills/chain-insights-dex-vault/SKILL.md +9 -1
- package/skills/chain-insights-virtuals/SKILL.md +1 -1
- package/dist/print-result-CJ8d7lmz.mjs.map +0 -1
package/dist/cli.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
|
|
2
|
-
const require_print_result = require("./print-result-
|
|
2
|
+
const require_print_result = require("./print-result-Cyqrlx8P.cjs");
|
|
3
3
|
let commander = require("commander");
|
|
4
4
|
let node_child_process = require("node:child_process");
|
|
5
5
|
let node_url = require("node:url");
|
|
@@ -53,7 +53,7 @@ async function withStatusReader(fn) {
|
|
|
53
53
|
const { loadConfig } = await Promise.resolve().then(() => require("./config-BxtMoo9c.cjs")).then((n) => n.config_exports);
|
|
54
54
|
const config = await loadConfig();
|
|
55
55
|
const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await Promise.resolve().then(() => require("./client-C9uwHnBS.cjs")).then((n) => n.client_exports);
|
|
56
|
-
const { toGraphMcpEndpointError } = await Promise.resolve().then(() => require("./transport-error-
|
|
56
|
+
const { toGraphMcpEndpointError } = await Promise.resolve().then(() => require("./transport-error-CgISST8l.cjs"));
|
|
57
57
|
const endpoint = resolveGraphMcpEndpoint(config);
|
|
58
58
|
const fetchImpl = await createConfiguredGraphMcpFetch(config);
|
|
59
59
|
const { Client } = await import("@modelcontextprotocol/sdk/client/index.js");
|
|
@@ -217,7 +217,7 @@ async function withGraphMcpClient(name, fn) {
|
|
|
217
217
|
const { loadConfig } = await Promise.resolve().then(() => require("./config-BxtMoo9c.cjs")).then((n) => n.config_exports);
|
|
218
218
|
const config = await loadConfig();
|
|
219
219
|
const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await Promise.resolve().then(() => require("./client-C9uwHnBS.cjs")).then((n) => n.client_exports);
|
|
220
|
-
const { toGraphMcpEndpointError } = await Promise.resolve().then(() => require("./transport-error-
|
|
220
|
+
const { toGraphMcpEndpointError } = await Promise.resolve().then(() => require("./transport-error-CgISST8l.cjs"));
|
|
221
221
|
const endpoint = resolveGraphMcpEndpoint(config);
|
|
222
222
|
const paymentFetch = await createConfiguredGraphMcpFetch(config);
|
|
223
223
|
const { Client } = await import("@modelcontextprotocol/sdk/client/index.js");
|
|
@@ -342,7 +342,7 @@ program.command("status").description("Show toolkit status and configuration").a
|
|
|
342
342
|
});
|
|
343
343
|
program.command("update").description("Check npmjs for a newer Chain Insights release and update this CLI").option("--check", "Only check for a newer release").option("--dry-run", "Print the update command without running it").action(async (opts) => {
|
|
344
344
|
try {
|
|
345
|
-
const { checkForUpdate, runPackageUpdate } = await Promise.resolve().then(() => require("./update-
|
|
345
|
+
const { checkForUpdate, runPackageUpdate } = await Promise.resolve().then(() => require("./update-DGyRlm3J.cjs"));
|
|
346
346
|
const result = await checkForUpdate();
|
|
347
347
|
if (result.error) throw new Error(`Could not check npmjs for updates: ${result.error}`);
|
|
348
348
|
if (!result.updateAvailable || !result.latestVersion) {
|
|
@@ -626,7 +626,7 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
626
626
|
try {
|
|
627
627
|
const { loadSchema, saveSchema } = await Promise.resolve().then(() => require("./schema-cache-C7v9ml6S.cjs"));
|
|
628
628
|
const { formatToolsTable } = await Promise.resolve().then(() => require("./format-DfhRQq4L.cjs"));
|
|
629
|
-
const { visibleRemoteTools } = await Promise.resolve().then(() => require("./tool-visibility-
|
|
629
|
+
const { visibleRemoteTools } = await Promise.resolve().then(() => require("./tool-visibility-BNwvcuVx.cjs")).then((n) => n.tool_visibility_exports);
|
|
630
630
|
const { loadConfig } = await Promise.resolve().then(() => require("./config-BxtMoo9c.cjs")).then((n) => n.config_exports);
|
|
631
631
|
const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await Promise.resolve().then(() => require("./client-C9uwHnBS.cjs")).then((n) => n.client_exports);
|
|
632
632
|
const config = await loadConfig();
|
|
@@ -662,7 +662,7 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
662
662
|
})).addCommand(createCliCommand("call").description("Call a low-level MCP tool directly (advanced)").option("--json", "Print machine-readable JSON output").argument("<tool>", "Tool name to call").argument("[args...]", "Key=value arguments (e.g. address=0x1234... network=robinhood)").action(async (tool, rawArgs, opts) => {
|
|
663
663
|
try {
|
|
664
664
|
const { parseMcpCallArgs } = await Promise.resolve().then(() => require("./call-args-C8Gp5gco.cjs"));
|
|
665
|
-
const { assertPublicMcpToolName, validatePublicMcpToolArguments } = await Promise.resolve().then(() => require("./tool-visibility-
|
|
665
|
+
const { assertPublicMcpToolName, validatePublicMcpToolArguments } = await Promise.resolve().then(() => require("./tool-visibility-BNwvcuVx.cjs")).then((n) => n.tool_visibility_exports);
|
|
666
666
|
let args = parseMcpCallArgs(rawArgs);
|
|
667
667
|
assertPublicMcpToolName(tool);
|
|
668
668
|
validatePublicMcpToolArguments(tool, args);
|
|
@@ -749,7 +749,7 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
749
749
|
}
|
|
750
750
|
const { graphToolRequestOptions } = await Promise.resolve().then(() => require("./request-timeout-CYmQF8N7.cjs"));
|
|
751
751
|
const requestOptions = graphToolRequestOptions(tool);
|
|
752
|
-
const { withoutUtcProperties } = await Promise.resolve().then(() => require("./print-result-
|
|
752
|
+
const { withoutUtcProperties } = await Promise.resolve().then(() => require("./print-result-Cyqrlx8P.cjs")).then((n) => n.timestamp_text_exports);
|
|
753
753
|
args = withoutUtcProperties(tool, args);
|
|
754
754
|
const result = requestOptions ? await client.callTool({
|
|
755
755
|
name: tool,
|
|
@@ -764,7 +764,7 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
764
764
|
});
|
|
765
765
|
});
|
|
766
766
|
} catch (err) {
|
|
767
|
-
const { formatMcpCallError } = await Promise.resolve().then(() => require("./tool-visibility-
|
|
767
|
+
const { formatMcpCallError } = await Promise.resolve().then(() => require("./tool-visibility-BNwvcuVx.cjs")).then((n) => n.tool_visibility_exports);
|
|
768
768
|
console.error(formatMcpCallError(tool, err));
|
|
769
769
|
process.exit(1);
|
|
770
770
|
}
|
package/dist/cli.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as PACKAGE_VERSION, r as printMcpTextContent, s as PACKAGE_INFO } from "./print-result-
|
|
1
|
+
import { c as PACKAGE_VERSION, r as printMcpTextContent, s as PACKAGE_INFO } from "./print-result-C3YazZBw.mjs";
|
|
2
2
|
import { Command, Option } from "commander";
|
|
3
3
|
import { execFileSync } from "node:child_process";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
@@ -51,7 +51,7 @@ async function withStatusReader(fn) {
|
|
|
51
51
|
const { loadConfig } = await import("./config-9MabJh5R.mjs").then((n) => n.t);
|
|
52
52
|
const config = await loadConfig();
|
|
53
53
|
const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await import("./client-7qOfAdpH.mjs").then((n) => n.r);
|
|
54
|
-
const { toGraphMcpEndpointError } = await import("./transport-error-
|
|
54
|
+
const { toGraphMcpEndpointError } = await import("./transport-error-D4hmpkqL.mjs");
|
|
55
55
|
const endpoint = resolveGraphMcpEndpoint(config);
|
|
56
56
|
const fetchImpl = await createConfiguredGraphMcpFetch(config);
|
|
57
57
|
const { Client } = await import("@modelcontextprotocol/sdk/client/index.js");
|
|
@@ -215,7 +215,7 @@ async function withGraphMcpClient(name, fn) {
|
|
|
215
215
|
const { loadConfig } = await import("./config-9MabJh5R.mjs").then((n) => n.t);
|
|
216
216
|
const config = await loadConfig();
|
|
217
217
|
const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await import("./client-7qOfAdpH.mjs").then((n) => n.r);
|
|
218
|
-
const { toGraphMcpEndpointError } = await import("./transport-error-
|
|
218
|
+
const { toGraphMcpEndpointError } = await import("./transport-error-D4hmpkqL.mjs");
|
|
219
219
|
const endpoint = resolveGraphMcpEndpoint(config);
|
|
220
220
|
const paymentFetch = await createConfiguredGraphMcpFetch(config);
|
|
221
221
|
const { Client } = await import("@modelcontextprotocol/sdk/client/index.js");
|
|
@@ -340,7 +340,7 @@ program.command("status").description("Show toolkit status and configuration").a
|
|
|
340
340
|
});
|
|
341
341
|
program.command("update").description("Check npmjs for a newer Chain Insights release and update this CLI").option("--check", "Only check for a newer release").option("--dry-run", "Print the update command without running it").action(async (opts) => {
|
|
342
342
|
try {
|
|
343
|
-
const { checkForUpdate, runPackageUpdate } = await import("./update-
|
|
343
|
+
const { checkForUpdate, runPackageUpdate } = await import("./update-CZDHSi_u.mjs");
|
|
344
344
|
const result = await checkForUpdate();
|
|
345
345
|
if (result.error) throw new Error(`Could not check npmjs for updates: ${result.error}`);
|
|
346
346
|
if (!result.updateAvailable || !result.latestVersion) {
|
|
@@ -624,7 +624,7 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
624
624
|
try {
|
|
625
625
|
const { loadSchema, saveSchema } = await import("./schema-cache-DRObKUvS.mjs");
|
|
626
626
|
const { formatToolsTable } = await import("./format-CSesEBvS.mjs");
|
|
627
|
-
const { visibleRemoteTools } = await import("./tool-visibility-
|
|
627
|
+
const { visibleRemoteTools } = await import("./tool-visibility-B6983rxo.mjs").then((n) => n.a);
|
|
628
628
|
const { loadConfig } = await import("./config-9MabJh5R.mjs").then((n) => n.t);
|
|
629
629
|
const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await import("./client-7qOfAdpH.mjs").then((n) => n.r);
|
|
630
630
|
const config = await loadConfig();
|
|
@@ -660,7 +660,7 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
660
660
|
})).addCommand(createCliCommand("call").description("Call a low-level MCP tool directly (advanced)").option("--json", "Print machine-readable JSON output").argument("<tool>", "Tool name to call").argument("[args...]", "Key=value arguments (e.g. address=0x1234... network=robinhood)").action(async (tool, rawArgs, opts) => {
|
|
661
661
|
try {
|
|
662
662
|
const { parseMcpCallArgs } = await import("./call-args-B0oMK1-J.mjs");
|
|
663
|
-
const { assertPublicMcpToolName, validatePublicMcpToolArguments } = await import("./tool-visibility-
|
|
663
|
+
const { assertPublicMcpToolName, validatePublicMcpToolArguments } = await import("./tool-visibility-B6983rxo.mjs").then((n) => n.a);
|
|
664
664
|
let args = parseMcpCallArgs(rawArgs);
|
|
665
665
|
assertPublicMcpToolName(tool);
|
|
666
666
|
validatePublicMcpToolArguments(tool, args);
|
|
@@ -747,7 +747,7 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
747
747
|
}
|
|
748
748
|
const { graphToolRequestOptions } = await import("./request-timeout-lBBe0mGf.mjs");
|
|
749
749
|
const requestOptions = graphToolRequestOptions(tool);
|
|
750
|
-
const { withoutUtcProperties } = await import("./print-result-
|
|
750
|
+
const { withoutUtcProperties } = await import("./print-result-C3YazZBw.mjs").then((n) => n.i);
|
|
751
751
|
args = withoutUtcProperties(tool, args);
|
|
752
752
|
const result = requestOptions ? await client.callTool({
|
|
753
753
|
name: tool,
|
|
@@ -762,7 +762,7 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
762
762
|
});
|
|
763
763
|
});
|
|
764
764
|
} catch (err) {
|
|
765
|
-
const { formatMcpCallError } = await import("./tool-visibility-
|
|
765
|
+
const { formatMcpCallError } = await import("./tool-visibility-B6983rxo.mjs").then((n) => n.a);
|
|
766
766
|
console.error(formatMcpCallError(tool, err));
|
|
767
767
|
process.exit(1);
|
|
768
768
|
}
|
package/dist/mcp-proxy.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
|
|
3
|
-
const require_print_result = require("./print-result-
|
|
3
|
+
const require_print_result = require("./print-result-Cyqrlx8P.cjs");
|
|
4
4
|
const require_rules = require("./rules-BD-cNHMX.cjs");
|
|
5
5
|
const require_client = require("./client-C9uwHnBS.cjs");
|
|
6
|
-
const require_tool_visibility = require("./tool-visibility-
|
|
6
|
+
const require_tool_visibility = require("./tool-visibility-BNwvcuVx.cjs");
|
|
7
7
|
const require_usage_status = require("./usage-status-DonwoLR3.cjs");
|
|
8
8
|
const require_subscription_status = require("./subscription-status-9tMfD90J.cjs");
|
|
9
9
|
const require_capabilities = require("./capabilities-Ds3320iS.cjs");
|
|
@@ -720,6 +720,7 @@ function resolveMcpProxyMode(env = process.env) {
|
|
|
720
720
|
const GRAPH_LAYERS_TEXT = "Use USE topology for topology (address/FLOWS_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.";
|
|
721
721
|
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.";
|
|
722
722
|
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.";
|
|
723
|
+
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.";
|
|
723
724
|
const KNOWN_PUBLIC_TOOL_DESCRIPTIONS = {
|
|
724
725
|
meta_network_capabilities: "Return the current Chain Insights network and tool support matrix. Takes no arguments: send {}.",
|
|
725
726
|
meta_schema: require_graph_schema.META_SCHEMA_DESCRIPTION,
|
|
@@ -729,7 +730,7 @@ const KNOWN_PUBLIC_TOOL_DESCRIPTIONS = {
|
|
|
729
730
|
meta_help: "Show a short guide to Chain Insights tools and workflow.",
|
|
730
731
|
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 {}.",
|
|
731
732
|
wallet_balance: "Show the local Chain Insights payment wallet address, payment network, token, and amount.",
|
|
732
|
-
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} ${ROUTING_NOT_SERVED} Preserve full addresses exactly, and write every address in full, all 42 characters, in your answer: never shorten one with ... or ….`,
|
|
733
|
+
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 ….`,
|
|
733
734
|
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.`
|
|
734
735
|
};
|
|
735
736
|
const KNOWN_PUBLIC_TOOL_TITLES = {
|
|
@@ -772,8 +773,8 @@ const GRAPH_SCHEMA_HINTS = [
|
|
|
772
773
|
"- Coverage is per kind of data. coverage.complete_through_block is the floor of USE facts: below it every raw relationship is indexed. graph_progress.complete_through_block is the floor of USE topology, and graph_progress.layers gives each link kind its own height. An empty answer above the floor may mean not indexed yet, not absent on chain. An absent chain_tip_block means the indexers are catching up: read freshness.max_data_age_seconds for the lag.",
|
|
773
774
|
"- The graph is address-grain. The only topology money node label is Address, keyed by the raw chain-native H160 address on EVM networks, for example 0x1874a43d7c6d888f9eda3d22a3a49704e3cadb24. There is no separate identity key. network is the query's network on every node and relationship, never stored, except on :Chain, where it names the remote chain.",
|
|
774
775
|
"- An Address carries a kind from chain facts. topology carries :Account or :Contract as a second label on an Address (:Contract:SmartAccount for a contract wallet), with is_contract kept beside :Contract, and an address that only received has none. facts serves no kind, and a facts read that names :Account or :Contract is refused: ask USE topology or USE chain. chain Address returns is_contract, nonce and delegated_to at the newest block, or at the block named by at_block. block_timestamp is epoch milliseconds on every layer.",
|
|
775
|
-
"- Address nodes carry address, network, labels, and the role flags is_exchange, is_scam, is_victim and
|
|
776
|
-
"- Labels hold role words, never detector names: Exchange (plus the exchange name), Scam, Victim
|
|
776
|
+
"- Address nodes carry address, network, labels, and the role flags is_exchange, is_scam, is_victim, is_sanctioned and is_issuer_frozen. (:Address)-[:LINKED]-(:Address) is an undirected ownership-overlay edge (basis derived/associated, plus confidence, source_event, declared_owner, owner_state) asserting the two addresses are controlled by the same actor. LINKED is served on the topology graph only. Enumerate LINKED neighbors with MATCH (a:Address {address: $addr})-[l:LINKED]-(b:Address) RETURN b.address, b.network, l.basis, l.confidence LIMIT 25.",
|
|
777
|
+
"- Labels hold role words, never detector names: Exchange (plus the exchange name), Scam, Victim, Sanctioned (plus the entity name) and IssuerFrozen (plus the token symbol). Each role is also a node label and a flag on the Address: :Exchange and is_exchange follow the exchange label, :Scam and is_scam the risk label, :Victim and is_victim the protection label, :Sanctioned and is_sanctioned the sanctioned label, :IssuerFrozen and is_issuer_frozen the issuer_frozen label: an issuer froze this wallet; the token in labels says which. Each flag is present only when true and absent otherwise, never false: test IS NOT NULL or IS NULL, not = false. A withdrawn label removes its node label and its flag.",
|
|
777
778
|
"- Address nodes carry base activity rollups: degree_in/degree_out/degree_total (distinct counterparty addresses), tx_in_count/tx_out_count/tx_total_count, total_in_usd/total_out_usd/total_volume_usd, net_flow_usd (in minus out; positive = net receiver) — all computed from external flows only — and first_activity_timestamp/last_activity_timestamp/activity_span_days, which include all flows (self-loops included). FLOWS_TO edges carry exactly tx_count, amount_usd_sum (total money flow, token and native value merged), first_seen_timestamp, last_seen_timestamp. Lifetime aggregates are the only serving window. Averages are computed inline (amount_usd_sum / toFloat(tx_count)). tx_count counts token and native transfers plus internal native transfers (a contract sending ETH during a call), and amount_usd_sum prices them all. USE facts TRANSFER lists all three, so the rows of a pair are the transfers its link counts, up to the height the link was built to. A link covers all time and a USE facts read covers one day: read the transfers of a pair one day at a time. A transaction anchor of a pair resolves through USE facts, on the UTC day of the first_seen_timestamp or last_seen_timestamp of the link: MATCH (a:Address {address: $from})-[t:TRANSFER]->(b:Address {address: $to}) WHERE t.block_date = \"YYYY-MM-DD\" RETURN t.tx_id, t.block_timestamp LIMIT 1.",
|
|
778
779
|
"- For actor-level exposure (AC11), UNION FLOWS_TO and SWAPPED reachability over one visible LINKED hop instead of expanding through the LINKED edge itself: MATCH (a:Address {address: $addr})-[:LINKED]-(owned:Address)-[r:FLOWS_TO|SWAPPED]-(b:Address) WHERE NOT a:Pool AND NOT a:Protocol AND NOT a:System AND NOT a.address IN [\"0x0000000000000000000000000000000000000000\", \"0x000000000000000000000000000000000000dead\"] AND NOT owned:Pool AND NOT owned:Protocol AND NOT owned:System AND NOT owned.address IN [\"0x0000000000000000000000000000000000000000\", \"0x000000000000000000000000000000000000dead\"] AND owned.address <> b.address AND a.address <> b.address RETURN owned.address, b.address, type(r), coalesce(r.amount_usd_sum, r.bought_usd) LIMIT 50.",
|
|
779
780
|
"- Labels and per-label risk live on the address node: the labels array plus three parallel lists, label_risk_labels, label_risk_levels and label_risk_updated_timestamps, where entry i of each list is one label row. No overall risk score is served. USE facts serves bounded single-event rows (TRANSFER, SWAP, LIQUIDITY_ADD, LIQUIDITY_REMOVE and BRIDGE_CROSSING edges) only; lifetime address metrics (degrees, totals, activity window) are node properties on USE topology.",
|
|
@@ -1872,6 +1873,7 @@ if (process.argv[1] && require("url").pathToFileURL(__filename).href.includes(pr
|
|
|
1872
1873
|
exports.APP_ONLY_LOCAL_TOOL_NAMES = APP_ONLY_LOCAL_TOOL_NAMES;
|
|
1873
1874
|
exports.CLAUDE_VIEW_URI = CLAUDE_VIEW_URI;
|
|
1874
1875
|
exports.GRAPH_QUERY_DEX_DOOR_SENTENCE = GRAPH_QUERY_DEX_DOOR_SENTENCE;
|
|
1876
|
+
exports.GRAPH_QUERY_ROLE_MARKS_SENTENCE = GRAPH_QUERY_ROLE_MARKS_SENTENCE;
|
|
1875
1877
|
exports.KNOWN_PUBLIC_TOOL_DESCRIPTIONS = KNOWN_PUBLIC_TOOL_DESCRIPTIONS;
|
|
1876
1878
|
exports.LOCAL_TOOL_NAMES = LOCAL_TOOL_NAMES;
|
|
1877
1879
|
exports.MCP_APP_MIME_TYPE = MCP_APP_MIME_TYPE;
|
package/dist/mcp-proxy.d.cts
CHANGED
|
@@ -14,6 +14,7 @@ export declare function readClaudeViewHtml(): string;
|
|
|
14
14
|
export type McpProxyMode = 'workspace' | 'stateless';
|
|
15
15
|
export declare function resolveMcpProxyMode(env?: NodeJS.ProcessEnv): McpProxyMode;
|
|
16
16
|
export declare 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.";
|
|
17
|
+
export declare 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.";
|
|
17
18
|
export declare const KNOWN_PUBLIC_TOOL_DESCRIPTIONS: Record<string, string>;
|
|
18
19
|
type ToolInputShape = Record<string, z.ZodTypeAny>;
|
|
19
20
|
export declare const PICTURE_RULES: string;
|
package/dist/mcp-proxy.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-proxy.d.cts","names":[],"sources":["../src/mcp/proxy.ts"],"mappings":";;qBAkEa,kBAAgB;qBAchB,2BAAyB;;qBAEzB;qBAUA;qBACA;;;;;wBAyBG;YAkBJ;wBAEI,oBAAoB,MAAK,OAAO,aAA2B;qBAiB9D;qBAGA,gCAAgC;KAsBxC,iBAAiB,eAAe,EAAE;qBAgB1B;wBA2GG,2BAA2B,mBAAmB;;;;;;;;wBAomBxC,eAAe"}
|
|
1
|
+
{"version":3,"file":"mcp-proxy.d.cts","names":[],"sources":["../src/mcp/proxy.ts"],"mappings":";;qBAkEa,kBAAgB;qBAchB,2BAAyB;;qBAEzB;qBAUA;qBACA;;;;;wBAyBG;YAkBJ;wBAEI,oBAAoB,MAAK,OAAO,aAA2B;qBAiB9D;qBAKA;qBAGA,gCAAgC;KAsBxC,iBAAiB,eAAe,EAAE;qBAgB1B;wBA2GG,2BAA2B,mBAAmB;;;;;;;;wBAomBxC,eAAe"}
|
package/dist/mcp-proxy.d.mts
CHANGED
|
@@ -14,6 +14,7 @@ export declare function readClaudeViewHtml(): string;
|
|
|
14
14
|
export type McpProxyMode = 'workspace' | 'stateless';
|
|
15
15
|
export declare function resolveMcpProxyMode(env?: NodeJS.ProcessEnv): McpProxyMode;
|
|
16
16
|
export declare 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.";
|
|
17
|
+
export declare 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.";
|
|
17
18
|
export declare const KNOWN_PUBLIC_TOOL_DESCRIPTIONS: Record<string, string>;
|
|
18
19
|
type ToolInputShape = Record<string, z.ZodTypeAny>;
|
|
19
20
|
export declare const PICTURE_RULES: string;
|
package/dist/mcp-proxy.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-proxy.d.mts","names":[],"sources":["../src/mcp/proxy.ts"],"mappings":";;qBAkEa,kBAAgB;qBAchB,2BAAyB;;qBAEzB;qBAUA;qBACA;;;;;wBAyBG;YAkBJ;wBAEI,oBAAoB,MAAK,OAAO,aAA2B;qBAiB9D;qBAGA,gCAAgC;KAsBxC,iBAAiB,eAAe,EAAE;qBAgB1B;wBA2GG,2BAA2B,mBAAmB;;;;;;;;wBAomBxC,eAAe"}
|
|
1
|
+
{"version":3,"file":"mcp-proxy.d.mts","names":[],"sources":["../src/mcp/proxy.ts"],"mappings":";;qBAkEa,kBAAgB;qBAchB,2BAAyB;;qBAEzB;qBAUA;qBACA;;;;;wBAyBG;YAkBJ;wBAEI,oBAAoB,MAAK,OAAO,aAA2B;qBAiB9D;qBAKA;qBAGA,gCAAgC;KAsBxC,iBAAiB,eAAe,EAAE;qBAgB1B;wBA2GG,2BAA2B,mBAAmB;;;;;;;;wBAomBxC,eAAe"}
|
package/dist/mcp-proxy.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as withTimestampTextResult, c as PACKAGE_VERSION, o as withoutUtcProperties } from "./print-result-
|
|
1
|
+
import { a as withTimestampTextResult, c as PACKAGE_VERSION, o as withoutUtcProperties } from "./print-result-C3YazZBw.mjs";
|
|
2
2
|
import { r as SUBSCRIPTION_TOPUP_TOOL, t as META_SUBSCRIPTION_STATUS_DESCRIPTION } from "./rules-BWdbOtHi.mjs";
|
|
3
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-
|
|
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-B6983rxo.mjs";
|
|
5
5
|
import { n as primitiveBackendUsageStatus, t as freeTierSpentText } from "./usage-status-Frot6fPG.mjs";
|
|
6
6
|
import { i as unavailableSubscriptionStatus, n as subscriptionStatusNeedsWallet, t as subscriptionStatusArguments } from "./subscription-status-DIuH84fM.mjs";
|
|
7
7
|
import { r as mirrorGraphNetworkCapabilities } from "./capabilities-DxojbX4D.mjs";
|
|
@@ -716,6 +716,7 @@ function resolveMcpProxyMode(env = process.env) {
|
|
|
716
716
|
const GRAPH_LAYERS_TEXT = "Use USE topology for topology (address/FLOWS_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
717
|
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
718
|
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.";
|
|
719
|
+
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.";
|
|
719
720
|
const KNOWN_PUBLIC_TOOL_DESCRIPTIONS = {
|
|
720
721
|
meta_network_capabilities: "Return the current Chain Insights network and tool support matrix. Takes no arguments: send {}.",
|
|
721
722
|
meta_schema: META_SCHEMA_DESCRIPTION,
|
|
@@ -725,7 +726,7 @@ const KNOWN_PUBLIC_TOOL_DESCRIPTIONS = {
|
|
|
725
726
|
meta_help: "Show a short guide to Chain Insights tools and workflow.",
|
|
726
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 {}.",
|
|
727
728
|
wallet_balance: "Show the local Chain Insights payment wallet address, payment network, token, and amount.",
|
|
728
|
-
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} ${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_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
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.`
|
|
730
731
|
};
|
|
731
732
|
const KNOWN_PUBLIC_TOOL_TITLES = {
|
|
@@ -768,8 +769,8 @@ const GRAPH_SCHEMA_HINTS = [
|
|
|
768
769
|
"- Coverage is per kind of data. coverage.complete_through_block is the floor of USE facts: below it every raw relationship is indexed. graph_progress.complete_through_block is the floor of USE topology, and graph_progress.layers gives each link kind its own height. An empty answer above the floor may mean not indexed yet, not absent on chain. An absent chain_tip_block means the indexers are catching up: read freshness.max_data_age_seconds for the lag.",
|
|
769
770
|
"- The graph is address-grain. The only topology money node label is Address, keyed by the raw chain-native H160 address on EVM networks, for example 0x1874a43d7c6d888f9eda3d22a3a49704e3cadb24. There is no separate identity key. network is the query's network on every node and relationship, never stored, except on :Chain, where it names the remote chain.",
|
|
770
771
|
"- An Address carries a kind from chain facts. topology carries :Account or :Contract as a second label on an Address (:Contract:SmartAccount for a contract wallet), with is_contract kept beside :Contract, and an address that only received has none. facts serves no kind, and a facts read that names :Account or :Contract is refused: ask USE topology or USE chain. chain Address returns is_contract, nonce and delegated_to at the newest block, or at the block named by at_block. block_timestamp is epoch milliseconds on every layer.",
|
|
771
|
-
"- Address nodes carry address, network, labels, and the role flags is_exchange, is_scam, is_victim and
|
|
772
|
-
"- Labels hold role words, never detector names: Exchange (plus the exchange name), Scam, Victim
|
|
772
|
+
"- Address nodes carry address, network, labels, and the role flags is_exchange, is_scam, is_victim, is_sanctioned and is_issuer_frozen. (:Address)-[:LINKED]-(:Address) is an undirected ownership-overlay edge (basis derived/associated, plus confidence, source_event, declared_owner, owner_state) asserting the two addresses are controlled by the same actor. LINKED is served on the topology graph only. Enumerate LINKED neighbors with MATCH (a:Address {address: $addr})-[l:LINKED]-(b:Address) RETURN b.address, b.network, l.basis, l.confidence LIMIT 25.",
|
|
773
|
+
"- Labels hold role words, never detector names: Exchange (plus the exchange name), Scam, Victim, Sanctioned (plus the entity name) and IssuerFrozen (plus the token symbol). Each role is also a node label and a flag on the Address: :Exchange and is_exchange follow the exchange label, :Scam and is_scam the risk label, :Victim and is_victim the protection label, :Sanctioned and is_sanctioned the sanctioned label, :IssuerFrozen and is_issuer_frozen the issuer_frozen label: an issuer froze this wallet; the token in labels says which. Each flag is present only when true and absent otherwise, never false: test IS NOT NULL or IS NULL, not = false. A withdrawn label removes its node label and its flag.",
|
|
773
774
|
"- Address nodes carry base activity rollups: degree_in/degree_out/degree_total (distinct counterparty addresses), tx_in_count/tx_out_count/tx_total_count, total_in_usd/total_out_usd/total_volume_usd, net_flow_usd (in minus out; positive = net receiver) — all computed from external flows only — and first_activity_timestamp/last_activity_timestamp/activity_span_days, which include all flows (self-loops included). FLOWS_TO edges carry exactly tx_count, amount_usd_sum (total money flow, token and native value merged), first_seen_timestamp, last_seen_timestamp. Lifetime aggregates are the only serving window. Averages are computed inline (amount_usd_sum / toFloat(tx_count)). tx_count counts token and native transfers plus internal native transfers (a contract sending ETH during a call), and amount_usd_sum prices them all. USE facts TRANSFER lists all three, so the rows of a pair are the transfers its link counts, up to the height the link was built to. A link covers all time and a USE facts read covers one day: read the transfers of a pair one day at a time. A transaction anchor of a pair resolves through USE facts, on the UTC day of the first_seen_timestamp or last_seen_timestamp of the link: MATCH (a:Address {address: $from})-[t:TRANSFER]->(b:Address {address: $to}) WHERE t.block_date = \"YYYY-MM-DD\" RETURN t.tx_id, t.block_timestamp LIMIT 1.",
|
|
774
775
|
"- For actor-level exposure (AC11), UNION FLOWS_TO and SWAPPED reachability over one visible LINKED hop instead of expanding through the LINKED edge itself: MATCH (a:Address {address: $addr})-[:LINKED]-(owned:Address)-[r:FLOWS_TO|SWAPPED]-(b:Address) WHERE NOT a:Pool AND NOT a:Protocol AND NOT a:System AND NOT a.address IN [\"0x0000000000000000000000000000000000000000\", \"0x000000000000000000000000000000000000dead\"] AND NOT owned:Pool AND NOT owned:Protocol AND NOT owned:System AND NOT owned.address IN [\"0x0000000000000000000000000000000000000000\", \"0x000000000000000000000000000000000000dead\"] AND owned.address <> b.address AND a.address <> b.address RETURN owned.address, b.address, type(r), coalesce(r.amount_usd_sum, r.bought_usd) LIMIT 50.",
|
|
775
776
|
"- Labels and per-label risk live on the address node: the labels array plus three parallel lists, label_risk_labels, label_risk_levels and label_risk_updated_timestamps, where entry i of each list is one label row. No overall risk score is served. USE facts serves bounded single-event rows (TRANSFER, SWAP, LIQUIDITY_ADD, LIQUIDITY_REMOVE and BRIDGE_CROSSING edges) only; lifetime address metrics (degrees, totals, activity window) are node properties on USE topology.",
|
|
@@ -1865,6 +1866,6 @@ if (process.argv[1] && import.meta.url.includes(process.argv[1].replace(/\\/g, "
|
|
|
1865
1866
|
process.exit(1);
|
|
1866
1867
|
});
|
|
1867
1868
|
//#endregion
|
|
1868
|
-
export { APP_ONLY_LOCAL_TOOL_NAMES, CLAUDE_VIEW_URI, GRAPH_QUERY_DEX_DOOR_SENTENCE, KNOWN_PUBLIC_TOOL_DESCRIPTIONS, LOCAL_TOOL_NAMES, MCP_APP_MIME_TYPE, PICTURE_RULES, REFUSAL_SCHEMA, createProxy, knownPublicToolInputSchema, readClaudeViewHtml, resolveMcpProxyMode };
|
|
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 };
|
|
1869
1870
|
|
|
1870
1871
|
//# sourceMappingURL=mcp-proxy.mjs.map
|