chain-insights 0.2.26 → 0.2.27
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 +3 -0
- package/dist/{capabilities-mXm_rCe8.mjs → capabilities-BCm-2oBt.mjs} +2 -2
- package/dist/{capabilities-mXm_rCe8.mjs.map → capabilities-BCm-2oBt.mjs.map} +1 -1
- package/dist/{capabilities-B4hvro_I.cjs → capabilities-C1-Y-VZx.cjs} +1 -1
- package/dist/cli.cjs +13 -13
- package/dist/cli.mjs +14 -14
- package/dist/cli.mjs.map +1 -1
- package/dist/{client-Dl-uHrh1.mjs → client-Bfw9P9uA.mjs} +3 -3
- package/dist/client-Bfw9P9uA.mjs.map +1 -0
- package/dist/{client-BYnFGA0y.cjs → client-DRJq31u_.cjs} +2 -2
- package/dist/index.cjs +3 -3
- package/dist/index.mjs +3 -3
- package/dist/{init-jhOZ_RvC.cjs → init-CFaUWgjK.cjs} +1 -1
- package/dist/{init-CB_ga4_8.mjs → init-DBC9Ml33.mjs} +2 -2
- package/dist/{init-CB_ga4_8.mjs.map → init-DBC9Ml33.mjs.map} +1 -1
- package/dist/mcp-proxy.cjs +3 -3
- package/dist/mcp-proxy.mjs +3 -3
- package/dist/{runner-BBH5Ks6q.mjs → runner-C-QgZu-S.mjs} +2 -2
- package/dist/{runner-BBH5Ks6q.mjs.map → runner-C-QgZu-S.mjs.map} +1 -1
- package/dist/{runner-e9slg6R2.cjs → runner-Ckl96RcN.cjs} +1 -1
- package/dist/{tools-D6RBAhSX.mjs → tools-6emZlUwg.mjs} +6 -6
- package/dist/tools-6emZlUwg.mjs.map +1 -0
- package/dist/{tools-UH5hRXYG.cjs → tools-kqWI7jPU.cjs} +5 -5
- package/dist/{topup-server-yAaXYkJP.cjs → topup-server-DhYlOOBM.cjs} +2 -2
- package/dist/{topup-server-BJgVw6Jt.mjs → topup-server-R3dNp-p8.mjs} +3 -3
- package/dist/topup-server-R3dNp-p8.mjs.map +1 -0
- package/docs/mcp-proxy.md +5 -2
- package/package.json +1 -1
- package/dist/client-Dl-uHrh1.mjs.map +0 -1
- package/dist/tools-D6RBAhSX.mjs.map +0 -1
- package/dist/topup-server-BJgVw6Jt.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -70,6 +70,9 @@ Hosted staging endpoint for approved testers:
|
|
|
70
70
|
cia config set graphMcpEndpoint https://staging-mcp.chain-insights.ai/mcp
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
+
For now, use the staging endpoint only for tester activation. Production is not
|
|
74
|
+
live yet.
|
|
75
|
+
|
|
73
76
|
Hosted access also needs an access mode, such as an approved access key or a
|
|
74
77
|
prepared wallet. Keep those credentials out of README examples; setup commands
|
|
75
78
|
live in [MCP proxy](docs/mcp-proxy.md). For paid access, run
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as resolveGraphMcpEndpoint } from "./client-
|
|
1
|
+
import { a as resolveGraphMcpEndpoint } from "./client-Bfw9P9uA.mjs";
|
|
2
2
|
//#region src/mcp/capabilities.ts
|
|
3
3
|
function metadataNetworksUrl(endpoint) {
|
|
4
4
|
const url = new URL(endpoint);
|
|
@@ -81,4 +81,4 @@ function formatNetworkCapabilities(document) {
|
|
|
81
81
|
//#endregion
|
|
82
82
|
export { fetchNetworkCapabilities, formatNetworkCapabilities };
|
|
83
83
|
|
|
84
|
-
//# sourceMappingURL=capabilities-
|
|
84
|
+
//# sourceMappingURL=capabilities-BCm-2oBt.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities-
|
|
1
|
+
{"version":3,"file":"capabilities-BCm-2oBt.mjs","names":[],"sources":["../src/mcp/capabilities.ts"],"sourcesContent":["import type { InvestigatorConfig } from '../config/schema.js'\nimport { resolveGraphMcpEndpoint } from './client.js'\n\nexport interface NetworkRetention {\n mode: 'full_history' | 'rolling_window' | 'expanding_then_rolling' | 'bounded_range' | 'unknown' | string\n window_days?: number\n from_block?: number\n to_block?: number\n from_timestamp?: string\n to_timestamp?: string\n started_at?: string\n rolls_after_at?: string\n current_window_seconds?: number\n}\n\nexport interface NetworkLayerCapability {\n enabled: boolean\n retention?: NetworkRetention | null\n}\n\nexport interface NetworkCapability {\n network: string\n display_name?: string\n status: string\n default?: boolean\n layers: Record<string, NetworkLayerCapability>\n tools: Record<string, string>\n coverage?: {\n from_block?: number\n to_block?: number\n from_timestamp?: string\n to_timestamp?: string\n chain_tip_block?: number\n blocks_behind_tip?: number\n }\n freshness?: {\n last_processed_at?: string\n last_successful_sync_at?: string\n max_data_age_seconds?: number\n last_processing_duration_seconds?: number\n }\n}\n\nexport interface NetworkCapabilitiesDocument {\n schema: 'chain-insights.network-capabilities.v1'\n networks: NetworkCapability[]\n}\n\nfunction metadataNetworksUrl(endpoint: string): URL {\n const url = new URL(endpoint)\n url.pathname = '/metadata/networks'\n url.search = ''\n url.hash = ''\n return url\n}\n\nexport async function fetchNetworkCapabilities(\n config: Pick<InvestigatorConfig, 'mcpAuthToken' | 'graphMcpAuthToken' | 'graphMcpMode' | 'graphMcpEndpoint' | 'mcpEndpoint'>,\n): Promise<NetworkCapabilitiesDocument> {\n const endpoint = resolveGraphMcpEndpoint(config)\n const request = metadataNetworksUrl(endpoint)\n const headers = new Headers()\n const token = config.graphMcpAuthToken?.trim() || config.mcpAuthToken?.trim()\n if (token) {\n headers.set('X-MCP-Debug-Token', token)\n headers.set('Authorization', `Bearer ${token}`)\n }\n let response: Response\n try {\n response = await fetch(request, { headers })\n } catch (err) {\n throw new Error(`network capabilities unavailable at ${request}: ${(err as Error).message}`)\n }\n if (!response.ok) {\n throw new Error(`network capabilities unavailable at ${request}: HTTP ${response.status}`)\n }\n const parsed = await response.json() as NetworkCapabilitiesDocument\n if (parsed.schema !== 'chain-insights.network-capabilities.v1' || !Array.isArray(parsed.networks)) {\n throw new Error('network capabilities response has unsupported schema')\n }\n return parsed\n}\n\nfunction layerValue(network: NetworkCapability, layer: string): string {\n const capability = network.layers[layer]\n if (!capability?.enabled) return 'no'\n return 'yes'\n}\n\nfunction availableToolsLabel(network: NetworkCapability): string {\n const tools = Object.entries(network.tools ?? {})\n .filter(([, status]) => status === 'available')\n .map(([name]) => name)\n return tools.length > 0 ? tools.join(', ') : 'none'\n}\n\nfunction shortDate(value?: string): string {\n if (!value) return ''\n return value.slice(0, 10)\n}\n\nfunction datasetLabel(network: NetworkCapability): string {\n const coverage = network.coverage\n if (!coverage) return 'unknown'\n const blockRange = coverage.from_block !== undefined && coverage.to_block !== undefined\n ? `${coverage.from_block}..${coverage.to_block}`\n : 'blocks unknown'\n const dateRange = coverage.from_timestamp && coverage.to_timestamp\n ? `${shortDate(coverage.from_timestamp)}..${shortDate(coverage.to_timestamp)}`\n : 'dates unknown'\n if (blockRange === 'blocks unknown' && dateRange === 'dates unknown') return 'unknown'\n return `${blockRange} / ${dateRange}`\n}\n\nexport function formatNetworkCapabilities(document: NetworkCapabilitiesDocument): string {\n if (document.networks.length === 0) return 'No supported networks advertised.'\n const headers = ['Network', 'Topology', 'Facts', 'Risk', 'Dataset', 'Available tools']\n const widths = [14, 10, 8, 8, 38, 64]\n const row = (values: string[]) => values.map((value, index) => value.padEnd(widths[index]!)).join(' ')\n return [\n row(headers),\n widths.map((width) => '-'.repeat(width)).join(' '),\n ...document.networks.map((network) => row([\n network.display_name || network.network,\n layerValue(network, 'topology'),\n layerValue(network, 'facts'),\n layerValue(network, 'risk'),\n datasetLabel(network),\n availableToolsLabel(network),\n ])),\n ].join('\\n')\n}\n"],"mappings":";;AAgDA,SAAS,oBAAoB,UAAuB;CAClD,MAAM,MAAM,IAAI,IAAI,QAAQ;CAC5B,IAAI,WAAW;CACf,IAAI,SAAS;CACb,IAAI,OAAO;CACX,OAAO;AACT;AAEA,eAAsB,yBACpB,QACsC;CAEtC,MAAM,UAAU,oBADC,wBAAwB,MACE,CAAC;CAC5C,MAAM,UAAU,IAAI,QAAQ;CAC5B,MAAM,QAAQ,OAAO,mBAAmB,KAAK,KAAK,OAAO,cAAc,KAAK;CAC5E,IAAI,OAAO;EACT,QAAQ,IAAI,qBAAqB,KAAK;EACtC,QAAQ,IAAI,iBAAiB,UAAU,OAAO;CAChD;CACA,IAAI;CACJ,IAAI;EACF,WAAW,MAAM,MAAM,SAAS,EAAE,QAAQ,CAAC;CAC7C,SAAS,KAAK;EACZ,MAAM,IAAI,MAAM,uCAAuC,QAAQ,IAAK,IAAc,SAAS;CAC7F;CACA,IAAI,CAAC,SAAS,IACZ,MAAM,IAAI,MAAM,uCAAuC,QAAQ,SAAS,SAAS,QAAQ;CAE3F,MAAM,SAAS,MAAM,SAAS,KAAK;CACnC,IAAI,OAAO,WAAW,4CAA4C,CAAC,MAAM,QAAQ,OAAO,QAAQ,GAC9F,MAAM,IAAI,MAAM,sDAAsD;CAExE,OAAO;AACT;AAEA,SAAS,WAAW,SAA4B,OAAuB;CAErE,IAAI,CADe,QAAQ,OAAO,QACjB,SAAS,OAAO;CACjC,OAAO;AACT;AAEA,SAAS,oBAAoB,SAAoC;CAC/D,MAAM,QAAQ,OAAO,QAAQ,QAAQ,SAAS,CAAC,CAAC,EAC7C,QAAQ,GAAG,YAAY,WAAW,WAAW,EAC7C,KAAK,CAAC,UAAU,IAAI;CACvB,OAAO,MAAM,SAAS,IAAI,MAAM,KAAK,IAAI,IAAI;AAC/C;AAEA,SAAS,UAAU,OAAwB;CACzC,IAAI,CAAC,OAAO,OAAO;CACnB,OAAO,MAAM,MAAM,GAAG,EAAE;AAC1B;AAEA,SAAS,aAAa,SAAoC;CACxD,MAAM,WAAW,QAAQ;CACzB,IAAI,CAAC,UAAU,OAAO;CACtB,MAAM,aAAa,SAAS,eAAe,KAAA,KAAa,SAAS,aAAa,KAAA,IAC1E,GAAG,SAAS,WAAW,IAAI,SAAS,aACpC;CACJ,MAAM,YAAY,SAAS,kBAAkB,SAAS,eAClD,GAAG,UAAU,SAAS,cAAc,EAAE,IAAI,UAAU,SAAS,YAAY,MACzE;CACJ,IAAI,eAAe,oBAAoB,cAAc,iBAAiB,OAAO;CAC7E,OAAO,GAAG,WAAW,KAAK;AAC5B;AAEA,SAAgB,0BAA0B,UAA+C;CACvF,IAAI,SAAS,SAAS,WAAW,GAAG,OAAO;CAC3C,MAAM,UAAU;EAAC;EAAW;EAAY;EAAS;EAAQ;EAAW;CAAiB;CACrF,MAAM,SAAS;EAAC;EAAI;EAAI;EAAG;EAAG;EAAI;CAAE;CACpC,MAAM,OAAO,WAAqB,OAAO,KAAK,OAAO,UAAU,MAAM,OAAO,OAAO,MAAO,CAAC,EAAE,KAAK,IAAI;CACtG,OAAO;EACL,IAAI,OAAO;EACX,OAAO,KAAK,UAAU,IAAI,OAAO,KAAK,CAAC,EAAE,KAAK,IAAI;EAClD,GAAG,SAAS,SAAS,KAAK,YAAY,IAAI;GACxC,QAAQ,gBAAgB,QAAQ;GAChC,WAAW,SAAS,UAAU;GAC9B,WAAW,SAAS,OAAO;GAC3B,WAAW,SAAS,MAAM;GAC1B,aAAa,OAAO;GACpB,oBAAoB,OAAO;EAC7B,CAAC,CAAC;CACJ,EAAE,KAAK,IAAI;AACb"}
|
package/dist/cli.cjs
CHANGED
|
@@ -73,7 +73,7 @@ function optionalScamTopologyActivityPolicy(value) {
|
|
|
73
73
|
async function withGraphMcpClient(name, fn) {
|
|
74
74
|
const { loadConfig } = await Promise.resolve().then(() => require("./config-BwVx19Og.cjs")).then((n) => n.config_exports);
|
|
75
75
|
const config = await loadConfig();
|
|
76
|
-
const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await Promise.resolve().then(() => require("./client-
|
|
76
|
+
const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await Promise.resolve().then(() => require("./client-DRJq31u_.cjs")).then((n) => n.client_exports);
|
|
77
77
|
const paymentFetch = await createConfiguredGraphMcpFetch(config);
|
|
78
78
|
const { Client } = await import("@modelcontextprotocol/sdk/client/index.js");
|
|
79
79
|
const { StreamableHTTPClientTransport } = await import("@modelcontextprotocol/sdk/client/streamableHttp.js");
|
|
@@ -93,7 +93,7 @@ function printMcpTextContent(result) {
|
|
|
93
93
|
}
|
|
94
94
|
async function printNetworkCapabilities(opts) {
|
|
95
95
|
const { loadConfig } = await Promise.resolve().then(() => require("./config-BwVx19Og.cjs")).then((n) => n.config_exports);
|
|
96
|
-
const { fetchNetworkCapabilities, formatNetworkCapabilities } = await Promise.resolve().then(() => require("./capabilities-
|
|
96
|
+
const { fetchNetworkCapabilities, formatNetworkCapabilities } = await Promise.resolve().then(() => require("./capabilities-C1-Y-VZx.cjs"));
|
|
97
97
|
const document = await fetchNetworkCapabilities(await loadConfig());
|
|
98
98
|
if (opts.json) console.log(JSON.stringify(document, null, 2));
|
|
99
99
|
else console.log(formatNetworkCapabilities(document));
|
|
@@ -215,7 +215,7 @@ program.command("access-key").description("Configure Graph MCP test access key m
|
|
|
215
215
|
}));
|
|
216
216
|
program.command("init").description("Initialize an investigation workspace").argument("[dir]", "Workspace directory to initialize", ".").option("--force", "Overwrite existing workspace files").action(async (dir, opts) => {
|
|
217
217
|
try {
|
|
218
|
-
const { initWorkspace } = await Promise.resolve().then(() => require("./init-
|
|
218
|
+
const { initWorkspace } = await Promise.resolve().then(() => require("./init-CFaUWgjK.cjs"));
|
|
219
219
|
const result = await initWorkspace({
|
|
220
220
|
targetDir: dir,
|
|
221
221
|
force: opts.force
|
|
@@ -287,7 +287,7 @@ program.command("config").description("Read or write configuration values").addC
|
|
|
287
287
|
}));
|
|
288
288
|
program.command("wallet").description("Manage the local Base USDC payment wallet").addCommand(new commander.Command("address").description("Print the local payment wallet address").action(async () => {
|
|
289
289
|
try {
|
|
290
|
-
const { getWalletAccount } = await Promise.resolve().then(() => require("./tools-
|
|
290
|
+
const { getWalletAccount } = await Promise.resolve().then(() => require("./tools-kqWI7jPU.cjs")).then((n) => n.tools_exports);
|
|
291
291
|
const account = await getWalletAccount();
|
|
292
292
|
console.log(account.address);
|
|
293
293
|
} catch (err) {
|
|
@@ -296,18 +296,18 @@ program.command("wallet").description("Manage the local Base USDC payment wallet
|
|
|
296
296
|
}
|
|
297
297
|
})).addCommand(new commander.Command("balance").description("Show the local payment wallet Base USDC balance").action(async () => {
|
|
298
298
|
try {
|
|
299
|
-
const { getWalletBalanceText } = await Promise.resolve().then(() => require("./tools-
|
|
299
|
+
const { getWalletBalanceText } = await Promise.resolve().then(() => require("./tools-kqWI7jPU.cjs")).then((n) => n.tools_exports);
|
|
300
300
|
console.log(await getWalletBalanceText());
|
|
301
301
|
} catch (err) {
|
|
302
302
|
console.error(err.message);
|
|
303
303
|
process.exit(1);
|
|
304
304
|
}
|
|
305
|
-
})).addCommand(new commander.Command("ready").description("Check and prepare the wallet for paid GraphRAG MCP calls").option("--
|
|
305
|
+
})).addCommand(new commander.Command("ready").description("Check and prepare the wallet for paid GraphRAG MCP calls").option("--check-only", "Only check readiness; do not submit the one-time payment setup").addOption(new commander.Option("--no-approve", "Deprecated alias for --check-only").hideHelp()).option("--payment-usdc <amount>", "USDC setup cap to prepare for paid calls", "1").addOption(new commander.Option("--approval-usdc <amount>", "Deprecated alias for --payment-usdc").hideHelp()).option("--json", "Print machine-readable readiness metadata").action(async (opts) => {
|
|
306
306
|
try {
|
|
307
|
-
const { formatWalletReadiness, parsePaymentApprovalUnits, prepareWalletForPaidCalls } = await Promise.resolve().then(() => require("./tools-
|
|
307
|
+
const { formatWalletReadiness, parsePaymentApprovalUnits, prepareWalletForPaidCalls } = await Promise.resolve().then(() => require("./tools-kqWI7jPU.cjs")).then((n) => n.tools_exports);
|
|
308
308
|
const result = await prepareWalletForPaidCalls({
|
|
309
|
-
minimumApprovalUnits: parsePaymentApprovalUnits(opts.approvalUsdc ?? "1"),
|
|
310
|
-
approve: opts.approve !== false
|
|
309
|
+
minimumApprovalUnits: parsePaymentApprovalUnits(opts.paymentUsdc ?? opts.approvalUsdc ?? "1"),
|
|
310
|
+
approve: opts.checkOnly ? false : opts.approve !== false
|
|
311
311
|
});
|
|
312
312
|
if (opts.json) {
|
|
313
313
|
console.log(JSON.stringify(result, (_key, value) => typeof value === "bigint" ? value.toString() : value, 2));
|
|
@@ -320,8 +320,8 @@ program.command("wallet").description("Manage the local Base USDC payment wallet
|
|
|
320
320
|
}
|
|
321
321
|
})).addCommand(new commander.Command("topup").description("Open a local browser page to top up the payment wallet").option("--no-open", "Print the top-up URL without opening a browser").option("--json", "Print machine-readable top-up metadata").action(async (opts) => {
|
|
322
322
|
try {
|
|
323
|
-
const { buildTopupInfo, getWalletAccount } = await Promise.resolve().then(() => require("./tools-
|
|
324
|
-
const { startTopupServer } = await Promise.resolve().then(() => require("./topup-server-
|
|
323
|
+
const { buildTopupInfo, getWalletAccount } = await Promise.resolve().then(() => require("./tools-kqWI7jPU.cjs")).then((n) => n.tools_exports);
|
|
324
|
+
const { startTopupServer } = await Promise.resolve().then(() => require("./topup-server-DhYlOOBM.cjs")).then((n) => n.topup_server_exports);
|
|
325
325
|
const account = await getWalletAccount();
|
|
326
326
|
const url = await startTopupServer(account);
|
|
327
327
|
const info = buildTopupInfo(account.address, url);
|
|
@@ -355,7 +355,7 @@ program.command("mcp").description("Interact with the Chain Insights MCP endpoin
|
|
|
355
355
|
const { formatToolsTable } = await Promise.resolve().then(() => require("./format-9NLBykEL.cjs"));
|
|
356
356
|
const { visibleRemoteTools } = await Promise.resolve().then(() => require("./tool-visibility-iAVQV3t0.cjs")).then((n) => n.tool_visibility_exports);
|
|
357
357
|
const { loadConfig } = await Promise.resolve().then(() => require("./config-BwVx19Og.cjs")).then((n) => n.config_exports);
|
|
358
|
-
const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await Promise.resolve().then(() => require("./client-
|
|
358
|
+
const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await Promise.resolve().then(() => require("./client-DRJq31u_.cjs")).then((n) => n.client_exports);
|
|
359
359
|
const config = await loadConfig();
|
|
360
360
|
const graphMcpEndpoint = resolveGraphMcpEndpoint(config);
|
|
361
361
|
let tools = opts.refresh ? null : await loadSchema(graphMcpEndpoint);
|
|
@@ -738,7 +738,7 @@ program.command("playbook").description("Run and manage investigation playbooks"
|
|
|
738
738
|
console.error(`Invalid --from value: "${opts.from}". Must be a positive integer.`);
|
|
739
739
|
process.exit(1);
|
|
740
740
|
}
|
|
741
|
-
const { PlaybookRunner } = await Promise.resolve().then(() => require("./runner-
|
|
741
|
+
const { PlaybookRunner } = await Promise.resolve().then(() => require("./runner-Ckl96RcN.cjs"));
|
|
742
742
|
await PlaybookRunner.run(definition, {
|
|
743
743
|
caseId: opts.case,
|
|
744
744
|
from: fromN,
|
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as PACKAGE_VERSION, t as PACKAGE_INFO } from "./version-BA3J8hu4.mjs";
|
|
2
|
-
import { Command } from "commander";
|
|
2
|
+
import { Command, Option } from "commander";
|
|
3
3
|
import { execFileSync } from "node:child_process";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
import path from "node:path";
|
|
@@ -71,7 +71,7 @@ function optionalScamTopologyActivityPolicy(value) {
|
|
|
71
71
|
async function withGraphMcpClient(name, fn) {
|
|
72
72
|
const { loadConfig } = await import("./config-Drgc2HuF.mjs").then((n) => n.t);
|
|
73
73
|
const config = await loadConfig();
|
|
74
|
-
const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await import("./client-
|
|
74
|
+
const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await import("./client-Bfw9P9uA.mjs").then((n) => n.n);
|
|
75
75
|
const paymentFetch = await createConfiguredGraphMcpFetch(config);
|
|
76
76
|
const { Client } = await import("@modelcontextprotocol/sdk/client/index.js");
|
|
77
77
|
const { StreamableHTTPClientTransport } = await import("@modelcontextprotocol/sdk/client/streamableHttp.js");
|
|
@@ -91,7 +91,7 @@ function printMcpTextContent(result) {
|
|
|
91
91
|
}
|
|
92
92
|
async function printNetworkCapabilities(opts) {
|
|
93
93
|
const { loadConfig } = await import("./config-Drgc2HuF.mjs").then((n) => n.t);
|
|
94
|
-
const { fetchNetworkCapabilities, formatNetworkCapabilities } = await import("./capabilities-
|
|
94
|
+
const { fetchNetworkCapabilities, formatNetworkCapabilities } = await import("./capabilities-BCm-2oBt.mjs");
|
|
95
95
|
const document = await fetchNetworkCapabilities(await loadConfig());
|
|
96
96
|
if (opts.json) console.log(JSON.stringify(document, null, 2));
|
|
97
97
|
else console.log(formatNetworkCapabilities(document));
|
|
@@ -213,7 +213,7 @@ program.command("access-key").description("Configure Graph MCP test access key m
|
|
|
213
213
|
}));
|
|
214
214
|
program.command("init").description("Initialize an investigation workspace").argument("[dir]", "Workspace directory to initialize", ".").option("--force", "Overwrite existing workspace files").action(async (dir, opts) => {
|
|
215
215
|
try {
|
|
216
|
-
const { initWorkspace } = await import("./init-
|
|
216
|
+
const { initWorkspace } = await import("./init-DBC9Ml33.mjs");
|
|
217
217
|
const result = await initWorkspace({
|
|
218
218
|
targetDir: dir,
|
|
219
219
|
force: opts.force
|
|
@@ -285,7 +285,7 @@ program.command("config").description("Read or write configuration values").addC
|
|
|
285
285
|
}));
|
|
286
286
|
program.command("wallet").description("Manage the local Base USDC payment wallet").addCommand(new Command("address").description("Print the local payment wallet address").action(async () => {
|
|
287
287
|
try {
|
|
288
|
-
const { getWalletAccount } = await import("./tools-
|
|
288
|
+
const { getWalletAccount } = await import("./tools-6emZlUwg.mjs").then((n) => n.c);
|
|
289
289
|
const account = await getWalletAccount();
|
|
290
290
|
console.log(account.address);
|
|
291
291
|
} catch (err) {
|
|
@@ -294,18 +294,18 @@ program.command("wallet").description("Manage the local Base USDC payment wallet
|
|
|
294
294
|
}
|
|
295
295
|
})).addCommand(new Command("balance").description("Show the local payment wallet Base USDC balance").action(async () => {
|
|
296
296
|
try {
|
|
297
|
-
const { getWalletBalanceText } = await import("./tools-
|
|
297
|
+
const { getWalletBalanceText } = await import("./tools-6emZlUwg.mjs").then((n) => n.c);
|
|
298
298
|
console.log(await getWalletBalanceText());
|
|
299
299
|
} catch (err) {
|
|
300
300
|
console.error(err.message);
|
|
301
301
|
process.exit(1);
|
|
302
302
|
}
|
|
303
|
-
})).addCommand(new Command("ready").description("Check and prepare the wallet for paid GraphRAG MCP calls").option("--
|
|
303
|
+
})).addCommand(new Command("ready").description("Check and prepare the wallet for paid GraphRAG MCP calls").option("--check-only", "Only check readiness; do not submit the one-time payment setup").addOption(new Option("--no-approve", "Deprecated alias for --check-only").hideHelp()).option("--payment-usdc <amount>", "USDC setup cap to prepare for paid calls", "1").addOption(new Option("--approval-usdc <amount>", "Deprecated alias for --payment-usdc").hideHelp()).option("--json", "Print machine-readable readiness metadata").action(async (opts) => {
|
|
304
304
|
try {
|
|
305
|
-
const { formatWalletReadiness, parsePaymentApprovalUnits, prepareWalletForPaidCalls } = await import("./tools-
|
|
305
|
+
const { formatWalletReadiness, parsePaymentApprovalUnits, prepareWalletForPaidCalls } = await import("./tools-6emZlUwg.mjs").then((n) => n.c);
|
|
306
306
|
const result = await prepareWalletForPaidCalls({
|
|
307
|
-
minimumApprovalUnits: parsePaymentApprovalUnits(opts.approvalUsdc ?? "1"),
|
|
308
|
-
approve: opts.approve !== false
|
|
307
|
+
minimumApprovalUnits: parsePaymentApprovalUnits(opts.paymentUsdc ?? opts.approvalUsdc ?? "1"),
|
|
308
|
+
approve: opts.checkOnly ? false : opts.approve !== false
|
|
309
309
|
});
|
|
310
310
|
if (opts.json) {
|
|
311
311
|
console.log(JSON.stringify(result, (_key, value) => typeof value === "bigint" ? value.toString() : value, 2));
|
|
@@ -318,8 +318,8 @@ program.command("wallet").description("Manage the local Base USDC payment wallet
|
|
|
318
318
|
}
|
|
319
319
|
})).addCommand(new Command("topup").description("Open a local browser page to top up the payment wallet").option("--no-open", "Print the top-up URL without opening a browser").option("--json", "Print machine-readable top-up metadata").action(async (opts) => {
|
|
320
320
|
try {
|
|
321
|
-
const { buildTopupInfo, getWalletAccount } = await import("./tools-
|
|
322
|
-
const { startTopupServer } = await import("./topup-server-
|
|
321
|
+
const { buildTopupInfo, getWalletAccount } = await import("./tools-6emZlUwg.mjs").then((n) => n.c);
|
|
322
|
+
const { startTopupServer } = await import("./topup-server-R3dNp-p8.mjs").then((n) => n.r);
|
|
323
323
|
const account = await getWalletAccount();
|
|
324
324
|
const url = await startTopupServer(account);
|
|
325
325
|
const info = buildTopupInfo(account.address, url);
|
|
@@ -353,7 +353,7 @@ program.command("mcp").description("Interact with the Chain Insights MCP endpoin
|
|
|
353
353
|
const { formatToolsTable } = await import("./format-Bq94jSyw.mjs");
|
|
354
354
|
const { visibleRemoteTools } = await import("./tool-visibility-BHRFLXuU.mjs").then((n) => n.n);
|
|
355
355
|
const { loadConfig } = await import("./config-Drgc2HuF.mjs").then((n) => n.t);
|
|
356
|
-
const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await import("./client-
|
|
356
|
+
const { createConfiguredGraphMcpFetch, resolveGraphMcpEndpoint } = await import("./client-Bfw9P9uA.mjs").then((n) => n.n);
|
|
357
357
|
const config = await loadConfig();
|
|
358
358
|
const graphMcpEndpoint = resolveGraphMcpEndpoint(config);
|
|
359
359
|
let tools = opts.refresh ? null : await loadSchema(graphMcpEndpoint);
|
|
@@ -736,7 +736,7 @@ program.command("playbook").description("Run and manage investigation playbooks"
|
|
|
736
736
|
console.error(`Invalid --from value: "${opts.from}". Must be a positive integer.`);
|
|
737
737
|
process.exit(1);
|
|
738
738
|
}
|
|
739
|
-
const { PlaybookRunner } = await import("./runner-
|
|
739
|
+
const { PlaybookRunner } = await import("./runner-C-QgZu-S.mjs");
|
|
740
740
|
await PlaybookRunner.run(definition, {
|
|
741
741
|
caseId: opts.case,
|
|
742
742
|
from: fromN,
|