chain-insights 0.85.2 → 0.92.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/README.md +2 -0
- package/bin/install.cjs +2 -1
- package/dist/{active-q3yViZhc.cjs → active-COPA14FA.cjs} +2 -16
- package/dist/{active-D2aabYRF.mjs → active-CyC4jFka.mjs} +2 -7
- package/dist/{active-D2aabYRF.mjs.map → active-CyC4jFka.mjs.map} +1 -1
- package/dist/address-card-C-NB03XP.cjs +218 -0
- package/dist/address-card-LYaT5yz0.mjs +190 -0
- package/dist/address-card-LYaT5yz0.mjs.map +1 -0
- package/dist/address-risk-DPuXBsvH.cjs +806 -0
- package/dist/address-risk-Da6FsfGx.mjs +653 -0
- package/dist/address-risk-Da6FsfGx.mjs.map +1 -0
- package/dist/{capabilities-Mxa4oQdd.cjs → capabilities-DkNreyv7.cjs} +1 -1
- package/dist/{capabilities-bZOr5Ads.mjs → capabilities-w5bNR7F9.mjs} +2 -2
- package/dist/{capabilities-bZOr5Ads.mjs.map → capabilities-w5bNR7F9.mjs.map} +1 -1
- package/dist/cli.cjs +138 -46
- package/dist/cli.mjs +138 -46
- package/dist/cli.mjs.map +1 -1
- package/dist/{deployer-screen-B5yrXZGo.mjs → deployer-screen-Bkw_sz94.mjs} +3 -3
- package/dist/{deployer-screen-B5yrXZGo.mjs.map → deployer-screen-Bkw_sz94.mjs.map} +1 -1
- package/dist/{deployer-screen-0SOQ_HFf.cjs → deployer-screen-CFLi7OeH.cjs} +2 -2
- package/dist/{dex-registry-BY67f4Ul.mjs → dex-registry-Bkri0--q.mjs} +10 -2
- package/dist/{dex-registry-BY67f4Ul.mjs.map → dex-registry-Bkri0--q.mjs.map} +1 -1
- package/dist/{dex-registry-BhGJUG9_.cjs → dex-registry-CyR3GyRr.cjs} +20 -0
- package/dist/{dex-tool-7BK_gD6H.mjs → dex-tool-D0K_Qx4N.mjs} +4 -4
- package/dist/dex-tool-D0K_Qx4N.mjs.map +1 -0
- package/dist/{dex-tool-Be9NAuD8.cjs → dex-tool-DQ5Eg0LO.cjs} +3 -3
- package/dist/{exchange-deposit-check-C5MseGlZ.cjs → exchange-deposit-check-BNzkwQeW.cjs} +18 -18
- package/dist/{exchange-deposit-check-CXHZCHWW.mjs → exchange-deposit-check-DIALj2sm.mjs} +19 -19
- package/dist/exchange-deposit-check-DIALj2sm.mjs.map +1 -0
- package/dist/{exchange-registry-CT0rRW__.cjs → exchange-registry-CEgkeQV1.cjs} +16 -93
- package/dist/{exchange-registry-CoLgHw6d.mjs → exchange-registry-Dr5UtcT5.mjs} +17 -94
- package/dist/exchange-registry-Dr5UtcT5.mjs.map +1 -0
- package/dist/{exchange-tool-Dc46SJ49.mjs → exchange-tool-B7E29YoQ.mjs} +4 -4
- package/dist/exchange-tool-B7E29YoQ.mjs.map +1 -0
- package/dist/{exchange-tool-B2SMeC5f.cjs → exchange-tool-CXaUBAd2.cjs} +3 -3
- package/dist/{graph-schema-CcrYPpSv.cjs → graph-schema-Bn3txQCj.cjs} +115 -12
- package/dist/{graph-schema-CRQuKya1.mjs → graph-schema-DvABR1yl.mjs} +97 -12
- package/dist/graph-schema-DvABR1yl.mjs.map +1 -0
- package/dist/{layer-routing-YDj-ynG9.cjs → layer-routing-j48SQ8Wk.cjs} +2 -2
- package/dist/{layer-routing-DCJVNN6O.mjs → layer-routing-r4IbIQSr.mjs} +3 -3
- package/dist/layer-routing-r4IbIQSr.mjs.map +1 -0
- package/dist/mcp-proxy.cjs +62 -15
- package/dist/mcp-proxy.d.cts.map +1 -1
- package/dist/mcp-proxy.d.mts.map +1 -1
- package/dist/mcp-proxy.mjs +62 -15
- package/dist/mcp-proxy.mjs.map +1 -1
- package/dist/public-file-BISyAesm.mjs +133 -0
- package/dist/public-file-BISyAesm.mjs.map +1 -0
- package/dist/public-file-DDp2CrUl.cjs +138 -0
- package/dist/{request-timeout-DxwNijQD.cjs → request-timeout-BXiIt9Jy.cjs} +0 -1
- package/dist/{request-timeout-K3ljP0pa.mjs → request-timeout-DetG2xO4.mjs} +2 -2
- package/dist/{request-timeout-K3ljP0pa.mjs.map → request-timeout-DetG2xO4.mjs.map} +1 -1
- package/dist/{token-lookup-Cf59VdGe.mjs → token-lookup-Ck0q7crJ.mjs} +2 -2
- package/dist/{token-lookup-Cf59VdGe.mjs.map → token-lookup-Ck0q7crJ.mjs.map} +1 -1
- package/dist/{token-lookup-DqjSRIxd.cjs → token-lookup-DLe4erP9.cjs} +1 -1
- package/dist/token-risk-CpMfFRoY.cjs +1004 -0
- package/dist/token-risk-DhnJc2kJ.mjs +971 -0
- package/dist/token-risk-DhnJc2kJ.mjs.map +1 -0
- package/dist/{tool-visibility-D8Up081E.cjs → tool-visibility-BCa-tmyZ.cjs} +11 -2
- package/dist/{tool-visibility-DuTds7V4.mjs → tool-visibility-BstrSl4s.mjs} +12 -3
- package/dist/tool-visibility-BstrSl4s.mjs.map +1 -0
- package/docs/contributing.md +10 -8
- package/docs/development.md +5 -5
- package/docs/evals.md +16 -1
- package/docs/graph-query-compatibility.md +15 -2
- package/docs/graph-tools.md +44 -6
- package/docs/mcp-proxy.md +189 -8
- package/docs/stability.md +4 -5
- package/docs/testing.md +76 -0
- package/package.json +1 -1
- package/registry/README.md +20 -5
- package/registry/address-card.json +680 -0
- package/skills/chain-insights-address-risk/SKILL.md +61 -0
- package/skills/chain-insights-address-risk/agents/openai.yaml +4 -0
- package/skills/chain-insights-aml-exchange/SKILL.md +9 -7
- package/skills/chain-insights-cypher/SKILL.md +79 -3
- package/skills/chain-insights-token-risk/SKILL.md +81 -0
- package/skills/chain-insights-token-risk/agents/openai.yaml +4 -0
- package/skills/chain-insights-virtuals/reference.md +1 -1
- package/dist/dex-tool-7BK_gD6H.mjs.map +0 -1
- package/dist/exchange-deposit-check-CXHZCHWW.mjs.map +0 -1
- package/dist/exchange-registry-CoLgHw6d.mjs.map +0 -1
- package/dist/exchange-tool-Dc46SJ49.mjs.map +0 -1
- package/dist/graph-schema-CRQuKya1.mjs.map +0 -1
- package/dist/layer-routing-DCJVNN6O.mjs.map +0 -1
- package/dist/public-tools-CBszU2oX.cjs +0 -1334
- package/dist/public-tools-DVhUjSDV.mjs +0 -1333
- package/dist/public-tools-DVhUjSDV.mjs.map +0 -1
- package/dist/tool-visibility-DuTds7V4.mjs.map +0 -1
package/dist/cli.mjs
CHANGED
|
@@ -10,6 +10,12 @@ const CIA_WORKFLOWS = [{
|
|
|
10
10
|
network: "robinhood",
|
|
11
11
|
description: "Screen one address for AML risk, behavior, and exchange exposure.",
|
|
12
12
|
command: "cia workflow aml-address-risk"
|
|
13
|
+
}, {
|
|
14
|
+
name: "aml-token-risk",
|
|
15
|
+
tool: "aml_token_risk",
|
|
16
|
+
network: "robinhood",
|
|
17
|
+
description: "Screen one token or pool: its founder, factory, gas wallets and pools, each with its own risk word.",
|
|
18
|
+
command: "cia workflow aml-token-risk"
|
|
13
19
|
}];
|
|
14
20
|
const NAME_WIDTH = 22;
|
|
15
21
|
const NETWORK_WIDTH = 12;
|
|
@@ -176,16 +182,6 @@ function createCliCommand(name) {
|
|
|
176
182
|
program.name("cia").description("AML investigation toolkit for blockchain analysis").version(PACKAGE_INFO.version).showHelpAfterError().option("--claude", "Install Claude Code skills globally to ~/.claude/skills/").option("--claude-desktop", "Register the MCP proxy in Claude Desktop").option("--codex", "Install Codex skills globally to ~/.codex/skills/ and register MCP").option("--hermes", "Install Hermes skills globally to ~/.hermes/skills/chain-insights/ and register MCP");
|
|
177
183
|
const rawArgs = process.argv.slice(2);
|
|
178
184
|
const installerFlags = rawArgs.filter((a) => a === "--claude" || a === "--claude-desktop" || a === "--codex" || a === "--hermes");
|
|
179
|
-
function normalizeAmlToolVersionArgv(argv) {
|
|
180
|
-
const commandIndex = rawArgs.findIndex((arg, index) => arg === "aml-address-risk" && index === 1 && rawArgs[0] === "workflow");
|
|
181
|
-
if (commandIndex === -1) return argv;
|
|
182
|
-
return argv.map((arg, index) => {
|
|
183
|
-
if (index - 2 <= commandIndex) return arg;
|
|
184
|
-
if (arg === "--version") return "--tool-version";
|
|
185
|
-
if (arg.startsWith("--version=")) return `--tool-version=${arg.slice(10)}`;
|
|
186
|
-
return arg;
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
185
|
const wantsHelpOrVersion = rawArgs.some((a) => a === "--help" || a === "-h" || a === "--version" || a === "-V");
|
|
190
186
|
if (installerFlags.length > 0 && !wantsHelpOrVersion && !rawArgs.some((a) => !a.startsWith("-"))) {
|
|
191
187
|
try {
|
|
@@ -239,21 +235,21 @@ async function withGraphMcpClient(name, fn) {
|
|
|
239
235
|
}
|
|
240
236
|
async function printNetworkCapabilities(opts) {
|
|
241
237
|
const { loadConfig } = await import("./config-BkLIqOYq.mjs").then((n) => n.t);
|
|
242
|
-
const { fetchNetworkCapabilities, formatNetworkCapabilities } = await import("./capabilities-
|
|
238
|
+
const { fetchNetworkCapabilities, formatNetworkCapabilities } = await import("./capabilities-w5bNR7F9.mjs").then((n) => n.t);
|
|
243
239
|
const document = await fetchNetworkCapabilities(await loadConfig());
|
|
244
240
|
if (opts.json) console.log(JSON.stringify(document, null, 2));
|
|
245
241
|
else console.log(formatNetworkCapabilities(document));
|
|
246
242
|
}
|
|
247
243
|
async function printNetworkOverview(opts) {
|
|
248
244
|
const { loadConfig } = await import("./config-BkLIqOYq.mjs").then((n) => n.t);
|
|
249
|
-
const { fetchNetworkCapabilities, formatNetworkOverview } = await import("./capabilities-
|
|
245
|
+
const { fetchNetworkCapabilities, formatNetworkOverview } = await import("./capabilities-w5bNR7F9.mjs").then((n) => n.t);
|
|
250
246
|
const document = await fetchNetworkCapabilities(await loadConfig());
|
|
251
247
|
if (opts.json) console.log(JSON.stringify(document, null, 2));
|
|
252
248
|
else console.log(formatNetworkOverview(document));
|
|
253
249
|
}
|
|
254
250
|
async function printNetworkCapability(name, opts) {
|
|
255
251
|
const { loadConfig } = await import("./config-BkLIqOYq.mjs").then((n) => n.t);
|
|
256
|
-
const { fetchNetworkCapabilities, findNetworkCapability, formatNetworkCapability } = await import("./capabilities-
|
|
252
|
+
const { fetchNetworkCapabilities, findNetworkCapability, formatNetworkCapability } = await import("./capabilities-w5bNR7F9.mjs").then((n) => n.t);
|
|
257
253
|
const document = await fetchNetworkCapabilities(await loadConfig());
|
|
258
254
|
const network = findNetworkCapability(document, name);
|
|
259
255
|
if (!network) {
|
|
@@ -271,31 +267,104 @@ async function printNetworkCapability(name, opts) {
|
|
|
271
267
|
async function printNetworkSchema(name, opts) {
|
|
272
268
|
const { loadConfig } = await import("./config-BkLIqOYq.mjs").then((n) => n.t);
|
|
273
269
|
const { resolveGraphMcpEndpoint } = await import("./client-BaHAIidE.mjs").then((n) => n.r);
|
|
274
|
-
const { formatGraphSchemaText, getGraphSchema } = await import("./graph-schema-
|
|
270
|
+
const { formatGraphSchemaText, getGraphSchema, withAddressCard } = await import("./graph-schema-DvABR1yl.mjs").then((n) => n.o);
|
|
271
|
+
const { loadAddressCard } = await import("./address-card-LYaT5yz0.mjs").then((n) => n.r);
|
|
275
272
|
const config = await loadConfig();
|
|
276
|
-
const schema = await getGraphSchema({
|
|
273
|
+
const schema = await withAddressCard(await getGraphSchema({
|
|
277
274
|
network: name,
|
|
278
275
|
refresh: opts.refresh === true,
|
|
279
276
|
endpoint: resolveGraphMcpEndpoint(config),
|
|
280
277
|
withClient: (fn) => withGraphMcpClient("chain-insights-cli-schema", (client) => fn(client))
|
|
281
|
-
});
|
|
278
|
+
}), () => loadAddressCard());
|
|
282
279
|
console.log(opts.json ? JSON.stringify(schema, null, 2) : formatGraphSchemaText(schema));
|
|
283
280
|
}
|
|
284
|
-
|
|
285
|
-
|
|
281
|
+
/**
|
|
282
|
+
* One graph session for a CLI run of a local tool, opened by its first batch
|
|
283
|
+
* and closed once the tool answers: a tool that checks its arguments first
|
|
284
|
+
* opens none for a refused call, and a tool of three batches opens one.
|
|
285
|
+
*/
|
|
286
|
+
function lazyGraphSession(name) {
|
|
287
|
+
let opened = null;
|
|
288
|
+
let release = () => {};
|
|
289
|
+
let finished = Promise.resolve();
|
|
290
|
+
return {
|
|
291
|
+
client() {
|
|
292
|
+
opened ??= new Promise((resolve, reject) => {
|
|
293
|
+
finished = withGraphMcpClient(name, (client) => {
|
|
294
|
+
resolve(client);
|
|
295
|
+
return new Promise((done) => {
|
|
296
|
+
release = done;
|
|
297
|
+
});
|
|
298
|
+
}).catch(reject);
|
|
299
|
+
});
|
|
300
|
+
return opened;
|
|
301
|
+
},
|
|
302
|
+
async close() {
|
|
303
|
+
release();
|
|
304
|
+
await finished;
|
|
305
|
+
}
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* The proxy's risk tools, run with the CLI's own graph session:
|
|
310
|
+
* aml_address_risk and aml_token_risk. Every argument is checked before the
|
|
311
|
+
* session opens.
|
|
312
|
+
*/
|
|
313
|
+
async function runRiskToolCli(tool, args) {
|
|
314
|
+
const { loadAddressCard } = await import("./address-card-LYaT5yz0.mjs").then((n) => n.r);
|
|
315
|
+
const { loadExchangeRegistry } = await import("./exchange-registry-Dr5UtcT5.mjs").then((n) => n.r);
|
|
316
|
+
const session = lazyGraphSession(`chain-insights-cli-${tool.replace(/_/g, "-")}`);
|
|
317
|
+
const input = {
|
|
318
|
+
network: args.network,
|
|
319
|
+
address: args.address,
|
|
320
|
+
...args.surroundings === void 0 ? {} : { surroundings: args.surroundings }
|
|
321
|
+
};
|
|
322
|
+
const shared = {
|
|
323
|
+
loadAddressCard: () => loadAddressCard(),
|
|
324
|
+
loadExchangeRegistry: (network) => loadExchangeRegistry(network),
|
|
325
|
+
graphQueryBatch: async (batchArgs) => await (await session.client()).callTool({
|
|
326
|
+
name: "graph_query_batch",
|
|
327
|
+
arguments: batchArgs
|
|
328
|
+
}),
|
|
329
|
+
describeFailure: (err) => err.message
|
|
330
|
+
};
|
|
331
|
+
try {
|
|
332
|
+
if (tool === "aml_address_risk") {
|
|
333
|
+
const { handleAmlAddressRisk } = await import("./address-risk-Da6FsfGx.mjs").then((n) => n.u);
|
|
334
|
+
const result = await handleAmlAddressRisk(input, shared);
|
|
335
|
+
return {
|
|
336
|
+
text: result.content[0]?.text ?? "",
|
|
337
|
+
isError: result.isError
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
const { handleAmlTokenRisk } = await import("./token-risk-DhnJc2kJ.mjs").then((n) => n.o);
|
|
341
|
+
const { loadRegistry } = await import("./dex-registry-Bkri0--q.mjs").then((n) => n.l);
|
|
342
|
+
const result = await handleAmlTokenRisk(input, {
|
|
343
|
+
...shared,
|
|
344
|
+
loadDexRegistry: (network) => loadRegistry(network)
|
|
345
|
+
});
|
|
346
|
+
return {
|
|
347
|
+
text: result.content[0]?.text ?? "",
|
|
348
|
+
isError: result.isError
|
|
349
|
+
};
|
|
350
|
+
} finally {
|
|
351
|
+
await session.close();
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
function addRiskWorkflowCommand(parent, networksCommand, tool) {
|
|
355
|
+
const address = tool === "aml_address_risk";
|
|
356
|
+
parent.addCommand(createCliCommand(address ? "aml-address-risk" : "aml-token-risk").description(address ? "CIA workflow: who an address is and how risky: its risk word with every reason, the risk model score, its risky partners and its exchange ends" : "CIA workflow: what about a token or a pool: its founder, factory, gas wallets and pools with their liquidity providers, each with its own risk word").requiredOption("--address <address>", address ? "Full blockchain address to screen" : "Full address of the token contract or the pool").requiredOption("--network <network>", `Network to query. Run \`${networksCommand}\` for supported networks.`).option("--surroundings", "Add the nodes and links behind the answer").option("--json", "Print machine-readable JSON output (the answer is always JSON)").action(async (opts) => {
|
|
286
357
|
try {
|
|
287
|
-
const
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
const { runAmlAddressRisk } = await import("./public-tools-DVhUjSDV.mjs");
|
|
292
|
-
const result = await runAmlAddressRisk(client, {
|
|
293
|
-
address: opts.address,
|
|
294
|
-
network: opts.network,
|
|
295
|
-
compareAddress: opts.compareAddress
|
|
296
|
-
}, requestedVersion);
|
|
297
|
-
console.log(opts.json ? JSON.stringify(result.structuredContent, null, 2) : result.summaryText);
|
|
358
|
+
const result = await runRiskToolCli(tool, {
|
|
359
|
+
network: opts.network,
|
|
360
|
+
address: opts.address,
|
|
361
|
+
...opts.surroundings ? { surroundings: true } : {}
|
|
298
362
|
});
|
|
363
|
+
if (result.isError) {
|
|
364
|
+
console.error(result.text);
|
|
365
|
+
process.exit(1);
|
|
366
|
+
}
|
|
367
|
+
console.log(result.text);
|
|
299
368
|
} catch (err) {
|
|
300
369
|
console.error(err.message);
|
|
301
370
|
process.exit(1);
|
|
@@ -327,7 +396,9 @@ program.command("workflows").description("List CIA workflow tools").option("--js
|
|
|
327
396
|
}
|
|
328
397
|
console.log(formatCiaWorkflows(CIA_WORKFLOWS));
|
|
329
398
|
});
|
|
330
|
-
|
|
399
|
+
const workflowCommand = program.command("workflow").description("Run a high-level CIA workflow");
|
|
400
|
+
addRiskWorkflowCommand(workflowCommand, "cia networks", "aml_address_risk");
|
|
401
|
+
addRiskWorkflowCommand(workflowCommand, "cia networks", "aml_token_risk");
|
|
331
402
|
program.command("status").description("Show toolkit status and configuration").action(async () => {
|
|
332
403
|
const { loadConfig } = await import("./config-BkLIqOYq.mjs").then((n) => n.t);
|
|
333
404
|
const config = await loadConfig();
|
|
@@ -622,7 +693,7 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
622
693
|
try {
|
|
623
694
|
const { loadSchema, saveSchema } = await import("./schema-cache-BfKHodDY.mjs");
|
|
624
695
|
const { formatToolsTable } = await import("./format-CsnW5M4D.mjs");
|
|
625
|
-
const { visibleRemoteTools } = await import("./tool-visibility-
|
|
696
|
+
const { visibleRemoteTools } = await import("./tool-visibility-BstrSl4s.mjs").then((n) => n.a);
|
|
626
697
|
const { loadConfig } = await import("./config-BkLIqOYq.mjs").then((n) => n.t);
|
|
627
698
|
const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await import("./client-BaHAIidE.mjs").then((n) => n.r);
|
|
628
699
|
const config = await loadConfig();
|
|
@@ -645,9 +716,11 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
645
716
|
}
|
|
646
717
|
}
|
|
647
718
|
console.log(formatToolsTable(visibleRemoteTools(tools)));
|
|
648
|
-
const { META_DEX_LOOKUP_DESCRIPTION, META_DEX_LOOKUP_TITLE, META_DEX_LOOKUP_TOOL } = await import("./dex-tool-
|
|
649
|
-
const { META_TOKEN_LOOKUP_DESCRIPTION, META_TOKEN_LOOKUP_TITLE, META_TOKEN_LOOKUP_TOOL } = await import("./token-lookup-
|
|
650
|
-
const { AML_DEPLOYER_SCREEN_DESCRIPTION, AML_DEPLOYER_SCREEN_TITLE, AML_DEPLOYER_SCREEN_TOOL } = await import("./deployer-screen-
|
|
719
|
+
const { META_DEX_LOOKUP_DESCRIPTION, META_DEX_LOOKUP_TITLE, META_DEX_LOOKUP_TOOL } = await import("./dex-tool-D0K_Qx4N.mjs").then((n) => n.a);
|
|
720
|
+
const { META_TOKEN_LOOKUP_DESCRIPTION, META_TOKEN_LOOKUP_TITLE, META_TOKEN_LOOKUP_TOOL } = await import("./token-lookup-Ck0q7crJ.mjs").then((n) => n.l);
|
|
721
|
+
const { AML_DEPLOYER_SCREEN_DESCRIPTION, AML_DEPLOYER_SCREEN_TITLE, AML_DEPLOYER_SCREEN_TOOL } = await import("./deployer-screen-Bkw_sz94.mjs").then((n) => n.a);
|
|
722
|
+
const { AML_ADDRESS_RISK_DESCRIPTION, AML_ADDRESS_RISK_TITLE, AML_ADDRESS_RISK_TOOL } = await import("./address-risk-Da6FsfGx.mjs").then((n) => n.u);
|
|
723
|
+
const { AML_TOKEN_RISK_DESCRIPTION, AML_TOKEN_RISK_TITLE, AML_TOKEN_RISK_TOOL } = await import("./token-risk-DhnJc2kJ.mjs").then((n) => n.o);
|
|
651
724
|
console.log("");
|
|
652
725
|
console.log(formatToolsTable([
|
|
653
726
|
{
|
|
@@ -661,6 +734,14 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
661
734
|
{
|
|
662
735
|
name: AML_DEPLOYER_SCREEN_TOOL,
|
|
663
736
|
description: `${AML_DEPLOYER_SCREEN_TITLE}. ${AML_DEPLOYER_SCREEN_DESCRIPTION}`
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
name: AML_ADDRESS_RISK_TOOL,
|
|
740
|
+
description: `${AML_ADDRESS_RISK_TITLE}. ${AML_ADDRESS_RISK_DESCRIPTION}`
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
name: AML_TOKEN_RISK_TOOL,
|
|
744
|
+
description: `${AML_TOKEN_RISK_TITLE}. ${AML_TOKEN_RISK_DESCRIPTION}`
|
|
664
745
|
}
|
|
665
746
|
], "Local proxy tool"));
|
|
666
747
|
} catch (err) {
|
|
@@ -670,7 +751,7 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
670
751
|
})).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) => {
|
|
671
752
|
try {
|
|
672
753
|
const { parseMcpCallArgs } = await import("./call-args-CBqbYfOE.mjs");
|
|
673
|
-
const { assertPublicMcpToolName, validatePublicMcpToolArguments } = await import("./tool-visibility-
|
|
754
|
+
const { assertPublicMcpToolName, validatePublicMcpToolArguments } = await import("./tool-visibility-BstrSl4s.mjs").then((n) => n.a);
|
|
674
755
|
let args = parseMcpCallArgs(rawArgs);
|
|
675
756
|
assertPublicMcpToolName(tool);
|
|
676
757
|
validatePublicMcpToolArguments(tool, args);
|
|
@@ -691,8 +772,8 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
691
772
|
return;
|
|
692
773
|
}
|
|
693
774
|
if (tool === "meta_dex_lookup") {
|
|
694
|
-
const { handleMetaDexLookup } = await import("./dex-tool-
|
|
695
|
-
const { loadRegistry } = await import("./dex-registry-
|
|
775
|
+
const { handleMetaDexLookup } = await import("./dex-tool-D0K_Qx4N.mjs").then((n) => n.a);
|
|
776
|
+
const { loadRegistry } = await import("./dex-registry-Bkri0--q.mjs").then((n) => n.l);
|
|
696
777
|
const { metaDexLookupArgs } = await import("./call-args-CBqbYfOE.mjs");
|
|
697
778
|
const result = await withGraphMcpClient("chain-insights-cli-dex-lookup", (client) => handleMetaDexLookup(metaDexLookupArgs(args), {
|
|
698
779
|
loadRegistry: (network) => loadRegistry(network),
|
|
@@ -707,7 +788,7 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
707
788
|
return;
|
|
708
789
|
}
|
|
709
790
|
if (tool === "meta_token_lookup") {
|
|
710
|
-
const { handleMetaTokenLookup } = await import("./token-lookup-
|
|
791
|
+
const { handleMetaTokenLookup } = await import("./token-lookup-Ck0q7crJ.mjs").then((n) => n.l);
|
|
711
792
|
const { metaTokenLookupArgs } = await import("./call-args-CBqbYfOE.mjs");
|
|
712
793
|
const result = await withGraphMcpClient("chain-insights-cli-token-lookup", (client) => handleMetaTokenLookup(metaTokenLookupArgs(args), {
|
|
713
794
|
graphQuery: async (queryArgs) => await client.callTool({
|
|
@@ -725,7 +806,7 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
725
806
|
return;
|
|
726
807
|
}
|
|
727
808
|
if (tool === "aml_deployer_screen") {
|
|
728
|
-
const { handleAmlDeployerScreen } = await import("./deployer-screen-
|
|
809
|
+
const { handleAmlDeployerScreen } = await import("./deployer-screen-Bkw_sz94.mjs").then((n) => n.a);
|
|
729
810
|
const result = await withGraphMcpClient("chain-insights-cli-deployer-screen", (client) => handleAmlDeployerScreen({
|
|
730
811
|
network: args["network"],
|
|
731
812
|
address: args["address"]
|
|
@@ -741,8 +822,8 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
741
822
|
return;
|
|
742
823
|
}
|
|
743
824
|
if (tool === "meta_exchange_lookup") {
|
|
744
|
-
const { handleMetaExchangeLookup } = await import("./exchange-tool-
|
|
745
|
-
const { loadExchangeRegistry } = await import("./exchange-registry-
|
|
825
|
+
const { handleMetaExchangeLookup } = await import("./exchange-tool-B7E29YoQ.mjs").then((n) => n.o);
|
|
826
|
+
const { loadExchangeRegistry } = await import("./exchange-registry-Dr5UtcT5.mjs").then((n) => n.r);
|
|
746
827
|
const result = await handleMetaExchangeLookup({
|
|
747
828
|
network: args["network"],
|
|
748
829
|
name: args["name"],
|
|
@@ -753,8 +834,8 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
753
834
|
return;
|
|
754
835
|
}
|
|
755
836
|
if (tool === "aml_exchange_deposit_check") {
|
|
756
|
-
const { handleAmlExchangeDepositCheck } = await import("./exchange-deposit-check-
|
|
757
|
-
const { loadExchangeRegistry } = await import("./exchange-registry-
|
|
837
|
+
const { handleAmlExchangeDepositCheck } = await import("./exchange-deposit-check-DIALj2sm.mjs").then((n) => n.a);
|
|
838
|
+
const { loadExchangeRegistry } = await import("./exchange-registry-Dr5UtcT5.mjs").then((n) => n.r);
|
|
758
839
|
const result = await withGraphMcpClient("chain-insights-cli-exchange-deposit-check", (client) => handleAmlExchangeDepositCheck({
|
|
759
840
|
network: args["network"],
|
|
760
841
|
address: args["address"]
|
|
@@ -770,6 +851,17 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
770
851
|
if (result.isError) process.exitCode = 1;
|
|
771
852
|
return;
|
|
772
853
|
}
|
|
854
|
+
if (tool === "aml_address_risk" || tool === "aml_token_risk") {
|
|
855
|
+
const surroundings = args["surroundings"];
|
|
856
|
+
const result = await runRiskToolCli(tool, {
|
|
857
|
+
network: args["network"],
|
|
858
|
+
address: args["address"],
|
|
859
|
+
...surroundings === void 0 ? {} : { surroundings: String(surroundings).toLowerCase() === "true" }
|
|
860
|
+
});
|
|
861
|
+
console.log(result.text);
|
|
862
|
+
if (result.isError) process.exitCode = 1;
|
|
863
|
+
return;
|
|
864
|
+
}
|
|
773
865
|
if (tool === "graph_expand") throw new Error("graph_expand is used only by the Chain Insights view in Claude. Run `cia mcp call graph_query` with your own query instead.");
|
|
774
866
|
if (tool === "meta_help") {
|
|
775
867
|
console.log("Graph tools: graph_query and graph_query_batch. Metadata and payment tools: meta_* and wallet_balance.");
|
|
@@ -819,7 +911,7 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
819
911
|
}
|
|
820
912
|
return;
|
|
821
913
|
}
|
|
822
|
-
const { graphToolRequestOptions } = await import("./request-timeout-
|
|
914
|
+
const { graphToolRequestOptions } = await import("./request-timeout-DetG2xO4.mjs");
|
|
823
915
|
const requestOptions = graphToolRequestOptions(tool);
|
|
824
916
|
const { withoutUtcProperties } = await import("./print-result-IFARsMnL.mjs").then((n) => n.a);
|
|
825
917
|
args = withoutUtcProperties(tool, args);
|
|
@@ -836,12 +928,12 @@ program.command("mcp").description("Low-level access to the Chain Insights MCP e
|
|
|
836
928
|
});
|
|
837
929
|
});
|
|
838
930
|
} catch (err) {
|
|
839
|
-
const { formatMcpCallError } = await import("./tool-visibility-
|
|
931
|
+
const { formatMcpCallError } = await import("./tool-visibility-BstrSl4s.mjs").then((n) => n.a);
|
|
840
932
|
console.error(formatMcpCallError(tool, err));
|
|
841
933
|
process.exit(1);
|
|
842
934
|
}
|
|
843
935
|
}));
|
|
844
|
-
program.parseAsync(
|
|
936
|
+
program.parseAsync(process.argv).catch((err) => {
|
|
845
937
|
console.error(err.message);
|
|
846
938
|
process.exit(1);
|
|
847
939
|
});
|