hive-intelligence 1.6.0 → 1.6.2
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 +1 -1
- package/agent-skills/.claude-plugin/plugin.json +1 -1
- package/agent-skills/packs/hive-mcp/references/clients.md +1 -1
- package/build/{auth-4CVED5J7.js → auth-4LPSQJXD.js} +1 -1
- package/build/{chunk-G3HNY6VA.js → chunk-32NRUWXA.js} +2 -2
- package/build/{chunk-CF23GYNH.js → chunk-KUF754NT.js} +2 -2
- package/build/{chunk-F2OCUEQ6.js → chunk-LP5ECG7A.js} +5 -0
- package/build/{chunk-BV7WNZF5.js → chunk-LW2DHE32.js} +1 -1
- package/build/{chunk-R6YZTFQL.js → chunk-S4HBVZ7O.js} +3 -1
- package/build/{chunk-P7PXHQAJ.js → chunk-XZXLLPF5.js} +1 -1
- package/build/{chunk-FWDX24GW.js → chunk-YDX4SHSC.js} +207 -37
- package/build/cli.js +22 -22
- package/build/{doctor-XX7VSAYA.js → doctor-LRDKXJYD.js} +3 -3
- package/build/{errors-6UNXNVTN.js → errors-EL6UMXNJ.js} +1 -1
- package/build/{init-all-SCRMLL3G.js → init-all-54G3CVZA.js} +3 -3
- package/build/{mcpServer-EKIEVVOZ.js → mcpServer-NWKN7FWC.js} +1 -1
- package/build/monitor-worker.js +2 -2
- package/build/{output-AC64BELH.js → output-XGTE4EWJ.js} +1 -1
- package/build/release.json +4 -4
- package/build/{serve-CEBIUBMZ.js → serve-2XXMJPIH.js} +1 -1
- package/build/server.js +60 -18
- package/build/stdio.js +1 -1
- package/build/{tools-6DTUAMY7.js → tools-FNPMELSU.js} +6 -6
- package/build/{uninstall-PYKDCTTT.js → uninstall-P3JJZCXT.js} +1 -1
- package/build/{upgrade-VDYC5LBL.js → upgrade-ATIFZANV.js} +2 -2
- package/build/{watch-W2TCXKWQ.js → watch-FG2C5Y2Z.js} +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -109,7 +109,7 @@ Expected output shape:
|
|
|
109
109
|
"source": "live",
|
|
110
110
|
"receipt_id": "00000000-0000-4000-8000-000000000000",
|
|
111
111
|
"receipt_version": "1.0",
|
|
112
|
-
"server_version": "1.
|
|
112
|
+
"server_version": "1.6.2",
|
|
113
113
|
"build_sha": null,
|
|
114
114
|
"digest_algorithm": "sha256",
|
|
115
115
|
"input_digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
{
|
|
16
16
|
"name": "hive-cli",
|
|
17
17
|
"path": "../packs/hive-cli/SKILL.md",
|
|
18
|
-
"description": "Use the `hive` CLI inline from a chat
|
|
18
|
+
"description": "Use the `hive` CLI inline from a chat: query prices, scan wallets, check token security, automate briefings."
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"name": "hive-mcp",
|
|
@@ -61,7 +61,7 @@ Create `.vscode/mcp.json` or use the MCP user configuration:
|
|
|
61
61
|
}
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
VS Code's own install-link form is a `vscode:mcp/install?` URL containing the
|
|
65
65
|
URL-encoded object `{ "name": "hive", "type": "http", "url": "..." }`.
|
|
66
66
|
The Hive CLI installs workflow skills for Copilot-compatible agents under
|
|
67
67
|
`~/.copilot/skills`.
|
|
@@ -297,8 +297,8 @@ async function runUsage() {
|
|
|
297
297
|
const { getUsage } = await import("./api-client-6AM3HVHQ.js");
|
|
298
298
|
const result = await getUsage();
|
|
299
299
|
if (!result.ok) {
|
|
300
|
-
const { outputError } = await import("./output-
|
|
301
|
-
const { CliError, classifyError } = await import("./errors-
|
|
300
|
+
const { outputError } = await import("./output-XGTE4EWJ.js");
|
|
301
|
+
const { CliError, classifyError } = await import("./errors-EL6UMXNJ.js");
|
|
302
302
|
const code = result.error?.code;
|
|
303
303
|
const err = code === "AUTH_REQUIRED" || code === "INVALID_TOKEN" ? new CliError(
|
|
304
304
|
"AUTH_REQUIRED",
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
dim,
|
|
11
11
|
shouldOutputJson,
|
|
12
12
|
writeOutput
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-LP5ECG7A.js";
|
|
14
14
|
import {
|
|
15
15
|
resolveApiKey
|
|
16
16
|
} from "./chunk-6PC3HUAK.js";
|
|
@@ -115,7 +115,7 @@ async function executeTool(toolName, args, timeoutMs = 3e4) {
|
|
|
115
115
|
);
|
|
116
116
|
}
|
|
117
117
|
if (!response.ok) {
|
|
118
|
-
const exitCode = response.error?.code === "TOOL_NOT_FOUND" ? 3 : response.error?.code === "PROVIDER_UNAVAILABLE" ? 5 : response.error?.code === "RATE_LIMITED" ? 6 : response.error?.code === "TIMEOUT" ? 124 : 4;
|
|
118
|
+
const exitCode = response.error?.code === "TOOL_NOT_FOUND" || response.error?.code === "TOOL_RETIRED" ? 3 : response.error?.code === "PROVIDER_UNAVAILABLE" ? 5 : response.error?.code === "RATE_LIMITED" ? 6 : response.error?.code === "TIMEOUT" ? 124 : 4;
|
|
119
119
|
process.exit(exitCode);
|
|
120
120
|
}
|
|
121
121
|
}
|
|
@@ -247,6 +247,11 @@ async function writeOutput(envelope) {
|
|
|
247
247
|
`)
|
|
248
248
|
);
|
|
249
249
|
}
|
|
250
|
+
const nextAction = envelope.meta?.next_action;
|
|
251
|
+
if (typeof nextAction === "string" && nextAction.trim()) {
|
|
252
|
+
process.stderr.write(yellow(` Next: ${nextAction}
|
|
253
|
+
`));
|
|
254
|
+
}
|
|
250
255
|
}
|
|
251
256
|
}
|
|
252
257
|
async function outputSuccess(data, meta) {
|
|
@@ -16,6 +16,7 @@ var ERROR_CODE_TO_EXIT = {
|
|
|
16
16
|
GENERAL_ERROR: ExitCode.GENERAL_ERROR,
|
|
17
17
|
INVALID_ARGS: ExitCode.INVALID_ARGS,
|
|
18
18
|
TOOL_NOT_FOUND: ExitCode.TOOL_NOT_FOUND,
|
|
19
|
+
TOOL_RETIRED: ExitCode.TOOL_NOT_FOUND,
|
|
19
20
|
API_ERROR: ExitCode.API_ERROR,
|
|
20
21
|
PROVIDER_UNAVAILABLE: ExitCode.AUTH_FAILURE,
|
|
21
22
|
AUTH_REQUIRED: ExitCode.AUTH_FAILURE,
|
|
@@ -28,7 +29,8 @@ var ERROR_DOC_URLS = {
|
|
|
28
29
|
RATE_LIMITED: "https://www.hiveintelligence.xyz/errors#rate-limited",
|
|
29
30
|
TIMEOUT: "https://www.hiveintelligence.xyz/errors#timeout",
|
|
30
31
|
PROVIDER_UNAVAILABLE: "https://www.hiveintelligence.xyz/errors#provider-unavailable",
|
|
31
|
-
TOOL_NOT_FOUND: "https://www.hiveintelligence.xyz/errors#tool-not-found"
|
|
32
|
+
TOOL_NOT_FOUND: "https://www.hiveintelligence.xyz/errors#tool-not-found",
|
|
33
|
+
TOOL_RETIRED: "https://www.hiveintelligence.xyz/errors#tool-retired"
|
|
32
34
|
};
|
|
33
35
|
var CliError = class extends Error {
|
|
34
36
|
code;
|
|
@@ -26463,7 +26463,10 @@ function classifyRuntimeStatusFromError(error) {
|
|
|
26463
26463
|
if (normalized.includes("api key") || normalized.includes("not configured") || normalized.includes("client not initialized") || normalized.includes("missing_key") || normalized.includes("unauthorized") || /\b401\b/.test(normalized)) {
|
|
26464
26464
|
return "missing_key";
|
|
26465
26465
|
}
|
|
26466
|
-
if (normalized.includes("is not supported") || normalized.includes("does not support") || normalized.includes("not supported yet") || normalized.includes("is required") || normalized.includes("must be one of") || normalized.includes("invalid symbol") || normalized.includes("bad symbol") || normalized.includes("badsymbol") || normalized.includes("badrequest") || normalized.includes("invalid parameter") || normalized.includes("invalid argument"))
|
|
26466
|
+
if (normalized.includes("is not supported") || normalized.includes("does not support") || normalized.includes("not supported yet") || normalized.includes("is required") || normalized.includes("must be one of") || normalized.includes("invalid symbol") || normalized.includes("bad symbol") || normalized.includes("badsymbol") || normalized.includes("badrequest") || normalized.includes("invalid parameter") || normalized.includes("invalid argument") || // Hero-tool caller mistakes and unknown/retired tool names (2026-09-14):
|
|
26467
|
+
// a name that does not resolve is fixable by the caller, never a provider
|
|
26468
|
+
// outage, so it must not read as "failing" (which automated callers retry).
|
|
26469
|
+
normalized.includes("unknown chain") || normalized.includes("was retired") || normalized.includes("tool_retired") || normalized.includes("tool_not_found") || normalized.includes("does not resolve to a hive endpoint")) {
|
|
26467
26470
|
return "invalid_input";
|
|
26468
26471
|
}
|
|
26469
26472
|
if (normalized.includes("timed out") || normalized.includes("timeout") || normalized.includes("temporarily") || normalized.includes("service unavailable") || normalized.includes("502") || normalized.includes("503") || normalized.includes("504")) {
|
|
@@ -51025,7 +51028,7 @@ function normalizeToolSchema(tool96) {
|
|
|
51025
51028
|
};
|
|
51026
51029
|
if (normalized.inputSchema && typeof normalized.inputSchema === "object" && normalized.inputSchema.type === "object") {
|
|
51027
51030
|
const schema = normalized.inputSchema;
|
|
51028
|
-
if (!isEndpointInvokerName(normalized.name)) {
|
|
51031
|
+
if (!isEndpointInvokerName(normalized.name) && schema.additionalProperties !== true) {
|
|
51029
51032
|
schema.additionalProperties = false;
|
|
51030
51033
|
}
|
|
51031
51034
|
schema.properties = {
|
|
@@ -52642,6 +52645,8 @@ var ERROR_SUGGESTIONS = {
|
|
|
52642
52645
|
RATE_LIMIT: "Wait 60 seconds before retrying, or use pagination to reduce requests.",
|
|
52643
52646
|
// Not found
|
|
52644
52647
|
NOT_FOUND: "The requested resource was not found. Verify the ID/address is correct.",
|
|
52648
|
+
TOOL_NOT_FOUND: "Call search_tools with your task to find the exact tool name, then retry with that name.",
|
|
52649
|
+
TOOL_RETIRED: "Call the replacement tool named above with its own argument names. Do not retry the retired name.",
|
|
52645
52650
|
COIN_NOT_FOUND: "The coin ID may be incorrect. Use search_all or get_coins_list to find the correct ID.",
|
|
52646
52651
|
POOL_NOT_FOUND: "The pool address may be incorrect or on a different network. Verify the network and address.",
|
|
52647
52652
|
TOKEN_NOT_FOUND: "Verify the token address and network ID are correct. Use get_tokens to search.",
|
|
@@ -52770,6 +52775,7 @@ function isUnmarkedErrorResponse(result2) {
|
|
|
52770
52775
|
}
|
|
52771
52776
|
function normalizeErrorText(text, toolName, args) {
|
|
52772
52777
|
let errorMsg = "";
|
|
52778
|
+
let code = "";
|
|
52773
52779
|
let suggestion = "";
|
|
52774
52780
|
let alternatives = "";
|
|
52775
52781
|
let documentation = "";
|
|
@@ -52777,6 +52783,7 @@ function normalizeErrorText(text, toolName, args) {
|
|
|
52777
52783
|
const parsed = JSON.parse(text);
|
|
52778
52784
|
if (parsed && typeof parsed === "object" && typeof parsed.error === "string") {
|
|
52779
52785
|
errorMsg = parsed.error;
|
|
52786
|
+
code = typeof parsed.code === "string" ? parsed.code : "";
|
|
52780
52787
|
suggestion = parsed.suggestion || "";
|
|
52781
52788
|
if (Array.isArray(parsed.alternatives) && parsed.alternatives.length > 0) {
|
|
52782
52789
|
alternatives = parsed.alternatives.join(", ");
|
|
@@ -52789,7 +52796,7 @@ function normalizeErrorText(text, toolName, args) {
|
|
|
52789
52796
|
let normalized = `**Error:** ${errorMsg}`;
|
|
52790
52797
|
normalized += `
|
|
52791
52798
|
|
|
52792
|
-
**Code:** API_ERROR`;
|
|
52799
|
+
**Code:** ${code || "API_ERROR"}`;
|
|
52793
52800
|
if (suggestion) normalized += `
|
|
52794
52801
|
|
|
52795
52802
|
**Suggestion:** ${suggestion}`;
|
|
@@ -53951,13 +53958,19 @@ function attachStructuredContent(result2, hasOutputSchema = false) {
|
|
|
53951
53958
|
}
|
|
53952
53959
|
return result2;
|
|
53953
53960
|
}
|
|
53961
|
+
function declaredErrorCode(rawErrorText) {
|
|
53962
|
+
try {
|
|
53963
|
+
const parsed = JSON.parse(rawErrorText ?? "");
|
|
53964
|
+
return typeof parsed?.code === "string" ? parsed.code : void 0;
|
|
53965
|
+
} catch {
|
|
53966
|
+
return void 0;
|
|
53967
|
+
}
|
|
53968
|
+
}
|
|
53954
53969
|
function createToolNotFoundResult(toolName, durationMs = 0) {
|
|
53955
53970
|
const retired = getRetiredToolReplacement(toolName);
|
|
53956
|
-
const
|
|
53957
|
-
|
|
53958
|
-
|
|
53959
|
-
retired ?? "Verify the tool name is correct using the tools/list endpoint."
|
|
53960
|
-
);
|
|
53971
|
+
const message = retired ? `Tool '${toolName}' was retired on ${RETIRED_TOOLS_DATE}. ${retired}` : `Tool '${toolName}' not found.`;
|
|
53972
|
+
const errorCode = retired ? "TOOL_RETIRED" : "TOOL_NOT_FOUND";
|
|
53973
|
+
const mcpResult = createErrorResponse7(errorCode, message);
|
|
53961
53974
|
const hive = {
|
|
53962
53975
|
receipt_id: randomUUID2(),
|
|
53963
53976
|
receipt_version: "1.0",
|
|
@@ -53971,7 +53984,7 @@ function createToolNotFoundResult(toolName, durationMs = 0) {
|
|
|
53971
53984
|
provider: "Hive",
|
|
53972
53985
|
tool: toolName,
|
|
53973
53986
|
category: "MCP Discovery",
|
|
53974
|
-
runtime_status: "
|
|
53987
|
+
runtime_status: "invalid_input",
|
|
53975
53988
|
fetched_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
53976
53989
|
observed_at: null,
|
|
53977
53990
|
cache_age_ms: null,
|
|
@@ -53980,7 +53993,9 @@ function createToolNotFoundResult(toolName, durationMs = 0) {
|
|
|
53980
53993
|
source: "unavailable",
|
|
53981
53994
|
origin_source: null,
|
|
53982
53995
|
truncated: false,
|
|
53983
|
-
warnings: [
|
|
53996
|
+
warnings: [
|
|
53997
|
+
retired ? "Tool name was retired; the replacement is named in the message." : "Tool name did not resolve to a Hive endpoint."
|
|
53998
|
+
],
|
|
53984
53999
|
cause: retired ? `Tool '${toolName}' was retired on ${RETIRED_TOOLS_DATE} when the Codex.io provider was removed; nothing was executed.` : `Tool '${toolName}' does not resolve to a Hive endpoint; nothing was executed.`,
|
|
53985
54000
|
next_action: retired ? `${retired} Call search_tools with your task if that tool does not fit.` : "Call search_tools (or a category endpoint tools/list) to find the exact endpoint name, then retry with that name."
|
|
53986
54001
|
};
|
|
@@ -53989,14 +54004,14 @@ function createToolNotFoundResult(toolName, durationMs = 0) {
|
|
|
53989
54004
|
ok: false,
|
|
53990
54005
|
toolName,
|
|
53991
54006
|
durationMs,
|
|
53992
|
-
runtimeStatus: "
|
|
54007
|
+
runtimeStatus: "invalid_input",
|
|
53993
54008
|
hive,
|
|
53994
54009
|
mcpResult: enrichedMcpResult,
|
|
53995
54010
|
data: unwrapMcpContent(enrichedMcpResult),
|
|
53996
54011
|
error: {
|
|
53997
54012
|
type: "not_found_error",
|
|
53998
|
-
code:
|
|
53999
|
-
message
|
|
54013
|
+
code: errorCode,
|
|
54014
|
+
message
|
|
54000
54015
|
}
|
|
54001
54016
|
};
|
|
54002
54017
|
}
|
|
@@ -54396,6 +54411,7 @@ async function executeEndpoint(endpoint, args, context) {
|
|
|
54396
54411
|
);
|
|
54397
54412
|
if (normalized.isError) {
|
|
54398
54413
|
const errorMessage = typeof data === "object" && data !== null && "error" in data ? String(data.error) : errorText || "Tool execution error";
|
|
54414
|
+
const callerError = runtimeStatus === "invalid_input" && declaredErrorCode(rawErrorText) === "VALIDATION_ERROR";
|
|
54399
54415
|
return {
|
|
54400
54416
|
ok: false,
|
|
54401
54417
|
toolName: endpoint.tool.name,
|
|
@@ -54404,7 +54420,11 @@ async function executeEndpoint(endpoint, args, context) {
|
|
|
54404
54420
|
hive,
|
|
54405
54421
|
mcpResult,
|
|
54406
54422
|
data,
|
|
54407
|
-
error: {
|
|
54423
|
+
error: callerError ? {
|
|
54424
|
+
type: "invalid_request_error",
|
|
54425
|
+
code: "VALIDATION_ERROR",
|
|
54426
|
+
message: errorMessage
|
|
54427
|
+
} : {
|
|
54408
54428
|
type: "provider_error",
|
|
54409
54429
|
code: "TOOL_ERROR",
|
|
54410
54430
|
message: errorMessage
|
|
@@ -54529,6 +54549,122 @@ var ALCHEMY_NETWORKS = {
|
|
|
54529
54549
|
bnb: "bnb-mainnet"
|
|
54530
54550
|
};
|
|
54531
54551
|
var SOLANA_CHAIN_NAMES = /* @__PURE__ */ new Set(["solana", "sol", "solana-mainnet"]);
|
|
54552
|
+
var CHAIN_ID_NAMES = {};
|
|
54553
|
+
for (const [name, id] of Object.entries(GOPLUS_CHAIN_IDS)) {
|
|
54554
|
+
if (!(id in CHAIN_ID_NAMES)) CHAIN_ID_NAMES[id] = name;
|
|
54555
|
+
}
|
|
54556
|
+
var CHAIN_ALIASES = [
|
|
54557
|
+
"chain",
|
|
54558
|
+
"network",
|
|
54559
|
+
"chain_id",
|
|
54560
|
+
"chainId",
|
|
54561
|
+
"network_id",
|
|
54562
|
+
"networkId",
|
|
54563
|
+
"blockchain",
|
|
54564
|
+
"platform",
|
|
54565
|
+
"chain_name",
|
|
54566
|
+
"network_name"
|
|
54567
|
+
];
|
|
54568
|
+
var CONTRACT_ADDRESS_ALIASES = [
|
|
54569
|
+
"address",
|
|
54570
|
+
"contract_address",
|
|
54571
|
+
"contractAddress",
|
|
54572
|
+
"token_address",
|
|
54573
|
+
"tokenAddress",
|
|
54574
|
+
"contract",
|
|
54575
|
+
"mint",
|
|
54576
|
+
"mint_address"
|
|
54577
|
+
];
|
|
54578
|
+
var RESPONSE_FORMAT_ALIASES = ["response_format", "format"];
|
|
54579
|
+
var HERO_ARG_ALIASES = {
|
|
54580
|
+
get_token_price: {
|
|
54581
|
+
token: [
|
|
54582
|
+
"token",
|
|
54583
|
+
"symbol",
|
|
54584
|
+
"coin",
|
|
54585
|
+
"coin_id",
|
|
54586
|
+
"coinId",
|
|
54587
|
+
"id",
|
|
54588
|
+
"ticker",
|
|
54589
|
+
"asset",
|
|
54590
|
+
"name"
|
|
54591
|
+
],
|
|
54592
|
+
address: CONTRACT_ADDRESS_ALIASES,
|
|
54593
|
+
chain: CHAIN_ALIASES,
|
|
54594
|
+
vs_currency: [
|
|
54595
|
+
"vs_currency",
|
|
54596
|
+
"vsCurrency",
|
|
54597
|
+
"vs",
|
|
54598
|
+
"currency",
|
|
54599
|
+
"quote",
|
|
54600
|
+
"fiat"
|
|
54601
|
+
],
|
|
54602
|
+
response_format: RESPONSE_FORMAT_ALIASES
|
|
54603
|
+
},
|
|
54604
|
+
check_token_safety: {
|
|
54605
|
+
address: [...CONTRACT_ADDRESS_ALIASES, "token"],
|
|
54606
|
+
chain: CHAIN_ALIASES,
|
|
54607
|
+
response_format: RESPONSE_FORMAT_ALIASES
|
|
54608
|
+
},
|
|
54609
|
+
get_wallet_portfolio: {
|
|
54610
|
+
address: [
|
|
54611
|
+
"address",
|
|
54612
|
+
"wallet",
|
|
54613
|
+
"wallet_address",
|
|
54614
|
+
"walletAddress",
|
|
54615
|
+
"account",
|
|
54616
|
+
"account_address",
|
|
54617
|
+
"owner"
|
|
54618
|
+
],
|
|
54619
|
+
chain: CHAIN_ALIASES,
|
|
54620
|
+
response_format: RESPONSE_FORMAT_ALIASES
|
|
54621
|
+
}
|
|
54622
|
+
};
|
|
54623
|
+
function looksLikeContractAddress(value) {
|
|
54624
|
+
const trimmed = value.trim();
|
|
54625
|
+
return /^0x[0-9a-f]{40}$/i.test(trimmed) || /^[1-9A-HJ-NP-Za-km-z]{32,44}$/.test(trimmed);
|
|
54626
|
+
}
|
|
54627
|
+
function normalizeHeroArgs(toolName, raw) {
|
|
54628
|
+
const aliases = HERO_ARG_ALIASES[toolName] ?? {};
|
|
54629
|
+
const input = raw ?? {};
|
|
54630
|
+
const args = {};
|
|
54631
|
+
const consumed = /* @__PURE__ */ new Set();
|
|
54632
|
+
for (const [canonical, names] of Object.entries(aliases)) {
|
|
54633
|
+
for (const name of names) {
|
|
54634
|
+
const value = input[name];
|
|
54635
|
+
if (value === void 0 || value === null) continue;
|
|
54636
|
+
if (!(canonical in args)) args[canonical] = value;
|
|
54637
|
+
consumed.add(name);
|
|
54638
|
+
}
|
|
54639
|
+
}
|
|
54640
|
+
const unknownKeys = Object.keys(input).filter((key) => !consumed.has(key));
|
|
54641
|
+
if (typeof args.chain === "number") args.chain = String(args.chain);
|
|
54642
|
+
if (typeof args.chain === "string") {
|
|
54643
|
+
const trimmed = args.chain.trim().toLowerCase();
|
|
54644
|
+
args.chain = CHAIN_ID_NAMES[trimmed] ?? args.chain;
|
|
54645
|
+
}
|
|
54646
|
+
if (toolName === "get_token_price" && typeof args.token === "string" && args.address === void 0 && looksLikeContractAddress(args.token)) {
|
|
54647
|
+
args.address = args.token;
|
|
54648
|
+
delete args.token;
|
|
54649
|
+
}
|
|
54650
|
+
const accepted = Object.entries(aliases).map(([canonical, names]) => {
|
|
54651
|
+
const extra = names.filter((name) => name !== canonical);
|
|
54652
|
+
return extra.length > 0 ? `${canonical} (aliases: ${extra.join(", ")})` : canonical;
|
|
54653
|
+
}).join("; ");
|
|
54654
|
+
return { args, unknownKeys, accepted };
|
|
54655
|
+
}
|
|
54656
|
+
function formatSchemaIssues(error) {
|
|
54657
|
+
return error.issues.map((issue) => {
|
|
54658
|
+
const field = issue.path.map(String).join(".") || "input";
|
|
54659
|
+
const missing = issue.code === "invalid_type" && issue.received === void 0;
|
|
54660
|
+
return missing ? `Required field "${field}" is missing.` : `"${field}" ${issue.message}.`;
|
|
54661
|
+
}).join(" ");
|
|
54662
|
+
}
|
|
54663
|
+
function unknownKeysError(unknownKeys, accepted) {
|
|
54664
|
+
return errorResult3(
|
|
54665
|
+
`Invalid arguments: ${unknownKeys.map((key) => `"${key}" is not allowed.`).join(" ")} Accepted fields: ${accepted}.`
|
|
54666
|
+
);
|
|
54667
|
+
}
|
|
54532
54668
|
function normalizeChain(chain) {
|
|
54533
54669
|
return (chain ?? "eth").trim().toLowerCase();
|
|
54534
54670
|
}
|
|
@@ -54541,12 +54677,12 @@ function looksLikeNameService(address) {
|
|
|
54541
54677
|
}
|
|
54542
54678
|
function nameServiceError(address) {
|
|
54543
54679
|
return errorResult3(
|
|
54544
|
-
`"${address}" looks like an ENS or name-service name, which isn't supported yet. Pass a 0x address (EVM) or a base58 address (Solana).`
|
|
54680
|
+
`Invalid arguments: "${address}" looks like an ENS or name-service name, which isn't supported yet. Pass a 0x address (EVM) or a base58 address (Solana).`
|
|
54545
54681
|
);
|
|
54546
54682
|
}
|
|
54547
|
-
function errorResult3(message) {
|
|
54683
|
+
function errorResult3(message, code = "VALIDATION_ERROR") {
|
|
54548
54684
|
return {
|
|
54549
|
-
content: [{ type: "text", text: JSON.stringify({ error: message }) }],
|
|
54685
|
+
content: [{ type: "text", text: JSON.stringify({ error: message, code }) }],
|
|
54550
54686
|
isError: true
|
|
54551
54687
|
};
|
|
54552
54688
|
}
|
|
@@ -54675,10 +54811,14 @@ function heroTools(endpoints, options = {}) {
|
|
|
54675
54811
|
annotations: VOLATILE_READ_ANNOTATIONS
|
|
54676
54812
|
},
|
|
54677
54813
|
handler: async (_client, args) => {
|
|
54678
|
-
const
|
|
54814
|
+
const heroArgs = normalizeHeroArgs("get_token_price", args);
|
|
54815
|
+
if (heroArgs.unknownKeys.length > 0) {
|
|
54816
|
+
return unknownKeysError(heroArgs.unknownKeys, heroArgs.accepted);
|
|
54817
|
+
}
|
|
54818
|
+
const parsed = tokenPriceSchema.safeParse(heroArgs.args);
|
|
54679
54819
|
if (!parsed.success) {
|
|
54680
54820
|
return errorResult3(
|
|
54681
|
-
`Invalid arguments: ${
|
|
54821
|
+
`Invalid arguments: ${formatSchemaIssues(parsed.error)}`
|
|
54682
54822
|
);
|
|
54683
54823
|
}
|
|
54684
54824
|
const { token, chain, address } = parsed.data;
|
|
@@ -54695,7 +54835,7 @@ function heroTools(endpoints, options = {}) {
|
|
|
54695
54835
|
}
|
|
54696
54836
|
if (!token) {
|
|
54697
54837
|
return errorResult3(
|
|
54698
|
-
'
|
|
54838
|
+
'Invalid arguments: pass token (CoinGecko id or symbol, for example "bitcoin" or "BTC"), or chain + address for a contract.'
|
|
54699
54839
|
);
|
|
54700
54840
|
}
|
|
54701
54841
|
const normalizedToken = token.toLowerCase();
|
|
@@ -54722,7 +54862,9 @@ function heroTools(endpoints, options = {}) {
|
|
|
54722
54862
|
}
|
|
54723
54863
|
};
|
|
54724
54864
|
const tokenSafetySchema = z2.object({
|
|
54725
|
-
address: z2.string().trim().min(1).max(100).describe(
|
|
54865
|
+
address: z2.string().trim().min(1).max(100).describe(
|
|
54866
|
+
"Required. Token contract address (0x\u2026 for EVM, base58 for Solana)."
|
|
54867
|
+
),
|
|
54726
54868
|
chain: z2.string().trim().max(40).optional().describe(
|
|
54727
54869
|
'Chain name or EVM chain id, for example "eth", "bsc", "8453", or "solana". Defaults to eth for 0x addresses; Solana is auto-detected.'
|
|
54728
54870
|
),
|
|
@@ -54777,10 +54919,14 @@ function heroTools(endpoints, options = {}) {
|
|
|
54777
54919
|
annotations: VOLATILE_READ_ANNOTATIONS
|
|
54778
54920
|
},
|
|
54779
54921
|
handler: async (_client, args) => {
|
|
54780
|
-
const
|
|
54922
|
+
const heroArgs = normalizeHeroArgs("check_token_safety", args);
|
|
54923
|
+
if (heroArgs.unknownKeys.length > 0) {
|
|
54924
|
+
return unknownKeysError(heroArgs.unknownKeys, heroArgs.accepted);
|
|
54925
|
+
}
|
|
54926
|
+
const parsed = tokenSafetySchema.safeParse(heroArgs.args);
|
|
54781
54927
|
if (!parsed.success) {
|
|
54782
54928
|
return errorResult3(
|
|
54783
|
-
`Invalid arguments: ${
|
|
54929
|
+
`Invalid arguments: ${formatSchemaIssues(parsed.error)}`
|
|
54784
54930
|
);
|
|
54785
54931
|
}
|
|
54786
54932
|
const { address, chain } = parsed.data;
|
|
@@ -54796,7 +54942,7 @@ function heroTools(endpoints, options = {}) {
|
|
|
54796
54942
|
const chainId = /^\d+$/.test(normalized) ? normalized : GOPLUS_CHAIN_IDS[normalized];
|
|
54797
54943
|
if (!chainId) {
|
|
54798
54944
|
return errorResult3(
|
|
54799
|
-
`Unknown chain '${chain}'. Pass an EVM chain name (${Object.keys(GOPLUS_CHAIN_IDS).slice(0, 6).join(", ")}, \u2026), a numeric chain id, or "solana".`
|
|
54945
|
+
`Invalid arguments: Unknown chain '${chain}'. Pass an EVM chain name (${Object.keys(GOPLUS_CHAIN_IDS).slice(0, 6).join(", ")}, \u2026), a numeric chain id, or "solana".`
|
|
54800
54946
|
);
|
|
54801
54947
|
}
|
|
54802
54948
|
const result2 = await executeUnderlying("get_token_security", {
|
|
@@ -54807,7 +54953,7 @@ function heroTools(endpoints, options = {}) {
|
|
|
54807
54953
|
}
|
|
54808
54954
|
};
|
|
54809
54955
|
const walletPortfolioSchema = z2.object({
|
|
54810
|
-
address: z2.string().trim().min(1).max(100).describe("Wallet address (0x\u2026 for EVM, base58 for Solana)."),
|
|
54956
|
+
address: z2.string().trim().min(1).max(100).describe("Required. Wallet address (0x\u2026 for EVM, base58 for Solana)."),
|
|
54811
54957
|
chain: z2.string().trim().max(40).optional().describe(
|
|
54812
54958
|
'Chain name, for example "eth", "base", "arbitrum", or "solana". Defaults to eth for 0x addresses; Solana is auto-detected.'
|
|
54813
54959
|
),
|
|
@@ -54926,10 +55072,14 @@ function heroTools(endpoints, options = {}) {
|
|
|
54926
55072
|
annotations: VOLATILE_READ_ANNOTATIONS
|
|
54927
55073
|
},
|
|
54928
55074
|
handler: async (_client, args) => {
|
|
54929
|
-
const
|
|
55075
|
+
const heroArgs = normalizeHeroArgs("get_wallet_portfolio", args);
|
|
55076
|
+
if (heroArgs.unknownKeys.length > 0) {
|
|
55077
|
+
return unknownKeysError(heroArgs.unknownKeys, heroArgs.accepted);
|
|
55078
|
+
}
|
|
55079
|
+
const parsed = walletPortfolioSchema.safeParse(heroArgs.args);
|
|
54930
55080
|
if (!parsed.success) {
|
|
54931
55081
|
return errorResult3(
|
|
54932
|
-
`Invalid arguments: ${
|
|
55082
|
+
`Invalid arguments: ${formatSchemaIssues(parsed.error)}`
|
|
54933
55083
|
);
|
|
54934
55084
|
}
|
|
54935
55085
|
const { address, chain } = parsed.data;
|
|
@@ -54945,7 +55095,7 @@ function heroTools(endpoints, options = {}) {
|
|
|
54945
55095
|
const network = ALCHEMY_NETWORKS[normalized];
|
|
54946
55096
|
if (!network) {
|
|
54947
55097
|
return errorResult3(
|
|
54948
|
-
`Unknown chain '${chain}'. Pass an EVM chain name (${Object.keys(ALCHEMY_NETWORKS).slice(0, 6).join(", ")}, \u2026) or "solana".`
|
|
55098
|
+
`Invalid arguments: Unknown chain '${chain}'. Pass an EVM chain name (${Object.keys(ALCHEMY_NETWORKS).slice(0, 6).join(", ")}, \u2026) or "solana".`
|
|
54949
55099
|
);
|
|
54950
55100
|
}
|
|
54951
55101
|
const result2 = await executeUnderlying("alchemy_get_tokens_by_wallet", {
|
|
@@ -54964,8 +55114,13 @@ function heroOutputSchema(name) {
|
|
|
54964
55114
|
}
|
|
54965
55115
|
function zodToInputSchema(schema) {
|
|
54966
55116
|
const jsonSchema = schema.toJSONSchema();
|
|
54967
|
-
const { $schema, ...rest } = jsonSchema;
|
|
54968
|
-
|
|
55117
|
+
const { $schema, required, ...rest } = jsonSchema;
|
|
55118
|
+
void required;
|
|
55119
|
+
return {
|
|
55120
|
+
...rest,
|
|
55121
|
+
type: "object",
|
|
55122
|
+
additionalProperties: true
|
|
55123
|
+
};
|
|
54969
55124
|
}
|
|
54970
55125
|
|
|
54971
55126
|
// src/taskRoutes.ts
|
|
@@ -66039,6 +66194,20 @@ function dynamicTools(endpoints, options = {}) {
|
|
|
66039
66194
|
"Alias for 'endpoint', accepted for symmetry with invoke_api_endpoint. Provide one of the two."
|
|
66040
66195
|
)
|
|
66041
66196
|
});
|
|
66197
|
+
const ENDPOINT_NAME_ALIASES = [
|
|
66198
|
+
"name",
|
|
66199
|
+
"tool",
|
|
66200
|
+
"tool_name",
|
|
66201
|
+
"toolName",
|
|
66202
|
+
"endpointName"
|
|
66203
|
+
];
|
|
66204
|
+
const firstStringArg = (source, keys) => {
|
|
66205
|
+
for (const key of keys) {
|
|
66206
|
+
const value = source[key];
|
|
66207
|
+
if (typeof value === "string" && value.trim()) return value;
|
|
66208
|
+
}
|
|
66209
|
+
return void 0;
|
|
66210
|
+
};
|
|
66042
66211
|
const getEndpointTool = {
|
|
66043
66212
|
metadata: {
|
|
66044
66213
|
resource: "dynamic_tools",
|
|
@@ -66049,7 +66218,10 @@ function dynamicTools(endpoints, options = {}) {
|
|
|
66049
66218
|
name: "get_api_endpoint_schema",
|
|
66050
66219
|
title: "API Endpoint Schema",
|
|
66051
66220
|
description: "Returns the full input schema, operation type, and correct root invoker for any Hive tool by name. Call a category tool first to discover available tool names, then inspect this contract before execution.",
|
|
66052
|
-
inputSchema:
|
|
66221
|
+
inputSchema: {
|
|
66222
|
+
...zodToInputSchema2(getEndpointSchema),
|
|
66223
|
+
additionalProperties: true
|
|
66224
|
+
},
|
|
66053
66225
|
outputSchema: API_ENDPOINT_SCHEMA_OUTPUT_SCHEMA,
|
|
66054
66226
|
annotations: READ_ONLY_ANNOTATIONS
|
|
66055
66227
|
},
|
|
@@ -66060,7 +66232,7 @@ function dynamicTools(endpoints, options = {}) {
|
|
|
66060
66232
|
);
|
|
66061
66233
|
}
|
|
66062
66234
|
const parsedEndpointArgs = getEndpointSchema.parse(args);
|
|
66063
|
-
const requestedEndpoint = parsedEndpointArgs.endpoint ?? parsedEndpointArgs.endpoint_name;
|
|
66235
|
+
const requestedEndpoint = parsedEndpointArgs.endpoint ?? parsedEndpointArgs.endpoint_name ?? firstStringArg(args, ENDPOINT_NAME_ALIASES);
|
|
66064
66236
|
if (!requestedEndpoint) {
|
|
66065
66237
|
return errorResult4(
|
|
66066
66238
|
"No endpoint provided. Pass an 'endpoint' (or 'endpoint_name') parameter with the tool name."
|
|
@@ -66076,11 +66248,9 @@ function dynamicTools(endpoints, options = {}) {
|
|
|
66076
66248
|
...categoryTools
|
|
66077
66249
|
].find((endpoint2) => endpoint2.tool.name === requestedEndpoint);
|
|
66078
66250
|
if (!lookup.ok && !metaEndpoint) {
|
|
66079
|
-
|
|
66080
|
-
|
|
66081
|
-
|
|
66082
|
-
retired ? `Endpoint '${missingName}' was retired on ${RETIRED_TOOLS_DATE}. ${retired}` : `Endpoint '${missingName}' not found. Use a category listing tool to discover available endpoints.`
|
|
66083
|
-
);
|
|
66251
|
+
return createToolNotFoundResult(
|
|
66252
|
+
lookup.resolvedToolName || lookup.requestedToolName
|
|
66253
|
+
).mcpResult;
|
|
66084
66254
|
}
|
|
66085
66255
|
const endpoint = lookup.ok ? lookup.endpoint : metaEndpoint;
|
|
66086
66256
|
return asTextContentResult({
|
package/build/cli.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
executeTool
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-KUF754NT.js";
|
|
6
6
|
import {
|
|
7
7
|
ExitCode
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-S4HBVZ7O.js";
|
|
9
9
|
import {
|
|
10
10
|
NAMESPACE
|
|
11
11
|
} from "./chunk-2SPCKQBJ.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
import {
|
|
22
22
|
red,
|
|
23
23
|
setOutputOptions
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-LP5ECG7A.js";
|
|
25
25
|
import {
|
|
26
26
|
setCliFlags
|
|
27
27
|
} from "./chunk-6PC3HUAK.js";
|
|
@@ -3440,7 +3440,7 @@ program2.hook("preAction", (thisCommand) => {
|
|
|
3440
3440
|
setCliFlags({ apiKey: opts.apiKey, noRetry: opts.retry === false });
|
|
3441
3441
|
});
|
|
3442
3442
|
program2.action(async () => {
|
|
3443
|
-
const { startStdio } = await import("./serve-
|
|
3443
|
+
const { startStdio } = await import("./serve-2XXMJPIH.js");
|
|
3444
3444
|
await startStdio(program2.opts().envFile);
|
|
3445
3445
|
});
|
|
3446
3446
|
program2.command("serve").description("Start the MCP server").option("--http", "Start HTTP server instead of stdio").option("--port <number>", "HTTP server port", "8080").action(async (opts) => {
|
|
@@ -3453,10 +3453,10 @@ program2.command("serve").description("Start the MCP server").option("--http", "
|
|
|
3453
3453
|
);
|
|
3454
3454
|
process.exit(ExitCode.INVALID_ARGS);
|
|
3455
3455
|
}
|
|
3456
|
-
const { startHttp } = await import("./serve-
|
|
3456
|
+
const { startHttp } = await import("./serve-2XXMJPIH.js");
|
|
3457
3457
|
await startHttp(port, program2.opts().envFile);
|
|
3458
3458
|
} else {
|
|
3459
|
-
const { startStdio } = await import("./serve-
|
|
3459
|
+
const { startStdio } = await import("./serve-2XXMJPIH.js");
|
|
3460
3460
|
await startStdio(program2.opts().envFile);
|
|
3461
3461
|
}
|
|
3462
3462
|
});
|
|
@@ -3543,15 +3543,15 @@ for (const domain of NAMESPACE) {
|
|
|
3543
3543
|
}
|
|
3544
3544
|
var toolsCmd = program2.command("tools").description("Discover and execute tools");
|
|
3545
3545
|
toolsCmd.command("list").description("List all registered tools").option("--category <name>", "Filter by category").option("--provider <name>", "Filter by provider prefix").option("--limit <n>", "Max tools to show", "50").option("--offset <n>", "Skip first N tools", "0").action(async (opts) => {
|
|
3546
|
-
const { listTools } = await import("./tools-
|
|
3546
|
+
const { listTools } = await import("./tools-FNPMELSU.js");
|
|
3547
3547
|
await listTools(opts);
|
|
3548
3548
|
});
|
|
3549
3549
|
toolsCmd.command("search <query>").description("Search tools by name or description").action(async (query) => {
|
|
3550
|
-
const { searchTools } = await import("./tools-
|
|
3550
|
+
const { searchTools } = await import("./tools-FNPMELSU.js");
|
|
3551
3551
|
await searchTools(query);
|
|
3552
3552
|
});
|
|
3553
3553
|
toolsCmd.command("info <name>").description("Show detailed tool schema and description").action(async (name) => {
|
|
3554
|
-
const { toolInfo } = await import("./tools-
|
|
3554
|
+
const { toolInfo } = await import("./tools-FNPMELSU.js");
|
|
3555
3555
|
await toolInfo(name);
|
|
3556
3556
|
});
|
|
3557
3557
|
toolsCmd.command("call <name>").description("Execute a tool by name").option("--args <json>", "Tool arguments as JSON (or pipe JSON via stdin)").action(async (name, opts) => {
|
|
@@ -3580,7 +3580,7 @@ toolsCmd.command("call <name>").description("Execute a tool by name").option("--
|
|
|
3580
3580
|
await executeTool(name, args, timeout);
|
|
3581
3581
|
});
|
|
3582
3582
|
toolsCmd.command("refresh").description("Force-refresh the tool catalog cache").action(async () => {
|
|
3583
|
-
const { refreshTools } = await import("./tools-
|
|
3583
|
+
const { refreshTools } = await import("./tools-FNPMELSU.js");
|
|
3584
3584
|
await refreshTools();
|
|
3585
3585
|
});
|
|
3586
3586
|
var configCmd = program2.command("config").description("Generate configuration for MCP clients");
|
|
@@ -3639,7 +3639,7 @@ program2.command("init").description(
|
|
|
3639
3639
|
await runSetup();
|
|
3640
3640
|
return;
|
|
3641
3641
|
}
|
|
3642
|
-
const { runInitAll } = await import("./init-all-
|
|
3642
|
+
const { runInitAll } = await import("./init-all-54G3CVZA.js");
|
|
3643
3643
|
const exitCode = await runInitAll({
|
|
3644
3644
|
all: Boolean(opts.all),
|
|
3645
3645
|
browser: Boolean(opts.browser),
|
|
@@ -3657,7 +3657,7 @@ program2.command("uninstall").description(
|
|
|
3657
3657
|
"--all",
|
|
3658
3658
|
"Clean every known client (default; explicit flag for symmetry with `init --all`)"
|
|
3659
3659
|
).option("--dry-run", "Preview removals without changing anything").action(async (opts) => {
|
|
3660
|
-
const { runUninstall } = await import("./uninstall-
|
|
3660
|
+
const { runUninstall } = await import("./uninstall-P3JJZCXT.js");
|
|
3661
3661
|
const exitCode = await runUninstall({
|
|
3662
3662
|
all: opts.all !== false,
|
|
3663
3663
|
dryRun: Boolean(opts.dryRun),
|
|
@@ -3666,11 +3666,11 @@ program2.command("uninstall").description(
|
|
|
3666
3666
|
if (exitCode !== 0) process.exit(exitCode);
|
|
3667
3667
|
});
|
|
3668
3668
|
program2.command("doctor").description("Diagnose environment and server connectivity").option("--probe", "Run live API probes (slower)").action(async (opts) => {
|
|
3669
|
-
const { runDoctor } = await import("./doctor-
|
|
3669
|
+
const { runDoctor } = await import("./doctor-LRDKXJYD.js");
|
|
3670
3670
|
await runDoctor(opts);
|
|
3671
3671
|
});
|
|
3672
3672
|
program2.command("upgrade").description("Update Hive to the latest published version").action(async () => {
|
|
3673
|
-
const { runUpgrade } = await import("./upgrade-
|
|
3673
|
+
const { runUpgrade } = await import("./upgrade-ATIFZANV.js");
|
|
3674
3674
|
await runUpgrade();
|
|
3675
3675
|
});
|
|
3676
3676
|
program2.command("completion <shell>").description("Generate shell completion script (bash, zsh, fish, powershell)").option("--install", "Auto-install to shell rc file").action(async (shell, opts) => {
|
|
@@ -3690,31 +3690,31 @@ program2.command("keys").description("Retired \u2014 manage API keys in the dash
|
|
|
3690
3690
|
});
|
|
3691
3691
|
var authCmd = program2.command("auth").description("Manage authentication profiles");
|
|
3692
3692
|
authCmd.command("login").description("Log in via browser (or --manual to paste API key)").option("--profile <name>", "Profile name", "default").option("--manual", "Manually paste API key instead of browser login").action(async (opts) => {
|
|
3693
|
-
const { runLogin } = await import("./auth-
|
|
3693
|
+
const { runLogin } = await import("./auth-4LPSQJXD.js");
|
|
3694
3694
|
await runLogin(opts);
|
|
3695
3695
|
});
|
|
3696
3696
|
authCmd.command("logout").description("Remove stored credentials").action(async () => {
|
|
3697
|
-
const { runLogout } = await import("./auth-
|
|
3697
|
+
const { runLogout } = await import("./auth-4LPSQJXD.js");
|
|
3698
3698
|
await runLogout();
|
|
3699
3699
|
});
|
|
3700
3700
|
authCmd.command("whoami").description("Show current profile").action(async () => {
|
|
3701
|
-
const { runWhoami } = await import("./auth-
|
|
3701
|
+
const { runWhoami } = await import("./auth-4LPSQJXD.js");
|
|
3702
3702
|
await runWhoami();
|
|
3703
3703
|
});
|
|
3704
3704
|
authCmd.command("profiles").description("List all profiles").action(async () => {
|
|
3705
|
-
const { runProfiles } = await import("./auth-
|
|
3705
|
+
const { runProfiles } = await import("./auth-4LPSQJXD.js");
|
|
3706
3706
|
await runProfiles();
|
|
3707
3707
|
});
|
|
3708
3708
|
authCmd.command("switch <name>").description("Switch active profile").action(async (name) => {
|
|
3709
|
-
const { runSwitch } = await import("./auth-
|
|
3709
|
+
const { runSwitch } = await import("./auth-4LPSQJXD.js");
|
|
3710
3710
|
await runSwitch(name);
|
|
3711
3711
|
});
|
|
3712
3712
|
program2.command("usage").description("Show your API usage and plan limits").action(async () => {
|
|
3713
|
-
const { runUsage } = await import("./auth-
|
|
3713
|
+
const { runUsage } = await import("./auth-4LPSQJXD.js");
|
|
3714
3714
|
await runUsage();
|
|
3715
3715
|
});
|
|
3716
3716
|
program2.command("status").description("Quick health and version check").action(async () => {
|
|
3717
|
-
const { runStatus } = await import("./doctor-
|
|
3717
|
+
const { runStatus } = await import("./doctor-LRDKXJYD.js");
|
|
3718
3718
|
await runStatus();
|
|
3719
3719
|
});
|
|
3720
3720
|
program2.command("open [target]").description("Open Hive dashboard, docs, status, or GitHub in browser").action(async (target) => {
|
|
@@ -3745,7 +3745,7 @@ program2.command("watch <domain> <command>").description("Poll a tool on interva
|
|
|
3745
3745
|
}
|
|
3746
3746
|
const interval = parseInt(opts.interval, 10);
|
|
3747
3747
|
const timeout = parseInt(program2.opts().timeout, 10);
|
|
3748
|
-
const { runWatch } = await import("./watch-
|
|
3748
|
+
const { runWatch } = await import("./watch-FG2C5Y2Z.js");
|
|
3749
3749
|
await runWatch(cmdDef.tool, args, interval, timeout);
|
|
3750
3750
|
});
|
|
3751
3751
|
var aliasCmd = program2.command("alias").description("Manage command aliases");
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
shouldOutputJson,
|
|
10
10
|
successEnvelope,
|
|
11
11
|
writeOutput
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LP5ECG7A.js";
|
|
13
13
|
import "./chunk-6PC3HUAK.js";
|
|
14
14
|
import "./chunk-OMO7XLC5.js";
|
|
15
15
|
|
|
@@ -204,9 +204,9 @@ ${fails === 0 ? "All checks passed" : `${fails} issues found`}${warns ? ` (${war
|
|
|
204
204
|
if (fails > 0) process.exit(1);
|
|
205
205
|
}
|
|
206
206
|
async function runStatus() {
|
|
207
|
-
const { SERVER_VERSION } = await import("./mcpServer-
|
|
207
|
+
const { SERVER_VERSION } = await import("./mcpServer-NWKN7FWC.js");
|
|
208
208
|
const { resolveApiKey, resolveApiUrl } = await import("./config-dir-2QLA5PXD.js");
|
|
209
|
-
const { getActiveProfile, maskKey } = await import("./auth-
|
|
209
|
+
const { getActiveProfile, maskKey } = await import("./auth-4LPSQJXD.js");
|
|
210
210
|
const apiUrl = resolveApiUrl();
|
|
211
211
|
const apiKey = resolveApiKey();
|
|
212
212
|
const profile = getActiveProfile();
|
|
@@ -22,10 +22,10 @@ import {
|
|
|
22
22
|
} from "./chunk-BDO27NIP.js";
|
|
23
23
|
import {
|
|
24
24
|
saveProfile
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-32NRUWXA.js";
|
|
26
26
|
import {
|
|
27
27
|
detectInstallMode
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-LW2DHE32.js";
|
|
29
29
|
import "./chunk-M6REON2I.js";
|
|
30
30
|
import "./chunk-GADPH72D.js";
|
|
31
31
|
import "./chunk-ZXKFJQDE.js";
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
green,
|
|
36
36
|
red,
|
|
37
37
|
yellow
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-LP5ECG7A.js";
|
|
39
39
|
import {
|
|
40
40
|
resolveApiKey,
|
|
41
41
|
resolveApiUrl
|
package/build/monitor-worker.js
CHANGED
|
@@ -2,7 +2,7 @@ import { createRequire } from 'node:module'; const require = createRequire(impor
|
|
|
2
2
|
import {
|
|
3
3
|
consumeCredits,
|
|
4
4
|
executeToolByName
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-XZXLLPF5.js";
|
|
6
6
|
import {
|
|
7
7
|
HyperliquidAPI,
|
|
8
8
|
MIN_MONITOR_CADENCE_MS,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
monitorCadenceIntervalMs,
|
|
16
16
|
runScheduledHealthCanaries,
|
|
17
17
|
secureLogger
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-YDX4SHSC.js";
|
|
19
19
|
import "./chunk-GADPH72D.js";
|
|
20
20
|
import "./chunk-EPF36Q3Z.js";
|
|
21
21
|
import "./chunk-ZXKFJQDE.js";
|
package/build/release.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "hive-intelligence",
|
|
3
|
-
"version": "1.6.
|
|
4
|
-
"buildSha": "
|
|
5
|
-
"imageDigest": "sha256:
|
|
3
|
+
"version": "1.6.2",
|
|
4
|
+
"buildSha": "31b6c1881c32943ad54a1382f8edd172c9fdfc61",
|
|
5
|
+
"imageDigest": "sha256:5eb3488df2a3f56cf225b7c4cd9afb43a7e14fa87a3c3446676b265a9144b69b",
|
|
6
6
|
"deployedUrl": "https://mcp.hiveintelligence.xyz",
|
|
7
|
-
"manifest": "https://raw.githubusercontent.com/hive-intel/hive-sdk/v1.6.
|
|
7
|
+
"manifest": "https://raw.githubusercontent.com/hive-intel/hive-sdk/v1.6.2/releases/v1.6.2.json"
|
|
8
8
|
}
|
|
@@ -7,7 +7,7 @@ async function startStdio(envFile) {
|
|
|
7
7
|
dotenv.config({ path: envFile || ".env", quiet: true });
|
|
8
8
|
console.log = (...args) => console.error("[LOG]", ...args);
|
|
9
9
|
const { StdioServerTransport } = await import("@modelcontextprotocol/sdk/server/stdio.js");
|
|
10
|
-
const { createHiveMcpServer, SERVER_NAME, SERVER_VERSION } = await import("./mcpServer-
|
|
10
|
+
const { createHiveMcpServer, SERVER_NAME, SERVER_VERSION } = await import("./mcpServer-NWKN7FWC.js");
|
|
11
11
|
const { getPendingUpdateVersion } = await import("./update-check-36QU6PKA.js");
|
|
12
12
|
const transport = new StdioServerTransport();
|
|
13
13
|
const pendingUpdate = getPendingUpdateVersion();
|
package/build/server.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
ensureWallet,
|
|
7
7
|
executeToolByName,
|
|
8
8
|
getWalletStatus
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-XZXLLPF5.js";
|
|
10
10
|
import {
|
|
11
11
|
CategoryEndpoints,
|
|
12
12
|
HERO_TOOL_NAMES,
|
|
@@ -33,6 +33,7 @@ import {
|
|
|
33
33
|
createApiKey,
|
|
34
34
|
createHiveMcpServer,
|
|
35
35
|
createOAuthStore,
|
|
36
|
+
createToolNotFoundResult,
|
|
36
37
|
endpointAllowedForInvoker,
|
|
37
38
|
executeEndpoint,
|
|
38
39
|
getAllWrappedEndpoints,
|
|
@@ -95,7 +96,7 @@ import {
|
|
|
95
96
|
validateEndpointArgs,
|
|
96
97
|
verifyApiKey,
|
|
97
98
|
waitForRedisAvailability
|
|
98
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-YDX4SHSC.js";
|
|
99
100
|
import {
|
|
100
101
|
HIVE_AGENT_SKILLS
|
|
101
102
|
} from "./chunk-GADPH72D.js";
|
|
@@ -7953,6 +7954,9 @@ app.get(
|
|
|
7953
7954
|
);
|
|
7954
7955
|
var REST_EXECUTE_STATUS_CODES = {
|
|
7955
7956
|
TOOL_NOT_FOUND: 404,
|
|
7957
|
+
// Gone, not missing: a retired name never comes back, and 410 is outside
|
|
7958
|
+
// every client's retry class (5xx / 429).
|
|
7959
|
+
TOOL_RETIRED: 410,
|
|
7956
7960
|
VALIDATION_ERROR: 422,
|
|
7957
7961
|
PROVIDER_UNAVAILABLE: 503,
|
|
7958
7962
|
TOOL_ERROR: 400,
|
|
@@ -7985,7 +7989,11 @@ function buildRestExecutionMeta(toolName, durationMs, meta) {
|
|
|
7985
7989
|
source: meta.source,
|
|
7986
7990
|
origin_source: meta.origin_source,
|
|
7987
7991
|
truncated: meta.truncated,
|
|
7988
|
-
warnings: meta.warnings
|
|
7992
|
+
warnings: meta.warnings,
|
|
7993
|
+
// Agent-actionable copy travels on every transport, not only MCP: REST and
|
|
7994
|
+
// CLI callers were getting "not found" with no replacement (2026-09-14).
|
|
7995
|
+
...meta.cause !== void 0 && { cause: meta.cause },
|
|
7996
|
+
...meta.next_action !== void 0 && { next_action: meta.next_action }
|
|
7989
7997
|
};
|
|
7990
7998
|
}
|
|
7991
7999
|
var restHeroEndpointsByName = null;
|
|
@@ -8032,13 +8040,20 @@ var anonymousHeroExecuteMiddleware = asyncHandler(
|
|
|
8032
8040
|
return;
|
|
8033
8041
|
}
|
|
8034
8042
|
if (!HERO_TOOL_NAMES.has(toolName) && !isKnownRestToolName(toolName)) {
|
|
8035
|
-
|
|
8036
|
-
|
|
8037
|
-
|
|
8038
|
-
|
|
8039
|
-
|
|
8040
|
-
|
|
8041
|
-
|
|
8043
|
+
const notFound = createToolNotFoundResult(toolName);
|
|
8044
|
+
const notFoundError = notFound.error;
|
|
8045
|
+
res.status(REST_EXECUTE_STATUS_CODES[notFoundError.code] ?? 404).json({
|
|
8046
|
+
...apiError(
|
|
8047
|
+
notFoundError.type,
|
|
8048
|
+
notFoundError.code,
|
|
8049
|
+
notFoundError.message,
|
|
8050
|
+
{ requestId: req.requestId }
|
|
8051
|
+
),
|
|
8052
|
+
meta: buildRestExecutionMeta(
|
|
8053
|
+
toolName,
|
|
8054
|
+
notFound.durationMs,
|
|
8055
|
+
notFound.hive
|
|
8056
|
+
)
|
|
8042
8057
|
});
|
|
8043
8058
|
return;
|
|
8044
8059
|
}
|
|
@@ -8310,15 +8325,42 @@ app.use((_req, res) => {
|
|
|
8310
8325
|
});
|
|
8311
8326
|
app.use(
|
|
8312
8327
|
(err, _req, res, _next) => {
|
|
8313
|
-
|
|
8328
|
+
const carried = err;
|
|
8329
|
+
const status = typeof carried.status === "number" ? carried.status : typeof carried.statusCode === "number" ? carried.statusCode : 500;
|
|
8330
|
+
if (status >= 500) {
|
|
8331
|
+
secureLogger.error("Unhandled express error", err, {});
|
|
8332
|
+
} else {
|
|
8333
|
+
secureLogger.warn("Express request rejected", {
|
|
8334
|
+
status,
|
|
8335
|
+
errorMessage: err.message
|
|
8336
|
+
});
|
|
8337
|
+
}
|
|
8314
8338
|
if (!res.headersSent) {
|
|
8315
|
-
|
|
8316
|
-
|
|
8317
|
-
|
|
8318
|
-
|
|
8319
|
-
|
|
8320
|
-
|
|
8321
|
-
|
|
8339
|
+
if (status === 404) {
|
|
8340
|
+
res.status(404).json(
|
|
8341
|
+
apiError(
|
|
8342
|
+
"not_found_error",
|
|
8343
|
+
"ENDPOINT_NOT_FOUND",
|
|
8344
|
+
"Endpoint not found."
|
|
8345
|
+
)
|
|
8346
|
+
);
|
|
8347
|
+
} else if (status < 500) {
|
|
8348
|
+
res.status(status).json(
|
|
8349
|
+
apiError(
|
|
8350
|
+
"invalid_request_error",
|
|
8351
|
+
status === 413 ? "PAYLOAD_TOO_LARGE" : "INVALID_REQUEST",
|
|
8352
|
+
status === 413 ? "Request body is too large." : "The request could not be processed. Check the body and headers."
|
|
8353
|
+
)
|
|
8354
|
+
);
|
|
8355
|
+
} else {
|
|
8356
|
+
res.status(500).json(
|
|
8357
|
+
apiError(
|
|
8358
|
+
"internal_error",
|
|
8359
|
+
"INTERNAL_ERROR",
|
|
8360
|
+
"An unexpected error occurred."
|
|
8361
|
+
)
|
|
8362
|
+
);
|
|
8363
|
+
}
|
|
8322
8364
|
}
|
|
8323
8365
|
}
|
|
8324
8366
|
);
|
package/build/stdio.js
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
shouldOutputJson,
|
|
9
9
|
successEnvelope,
|
|
10
10
|
writeOutput
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-LP5ECG7A.js";
|
|
12
12
|
import "./chunk-6PC3HUAK.js";
|
|
13
13
|
import "./chunk-OMO7XLC5.js";
|
|
14
14
|
|
|
@@ -20,8 +20,8 @@ async function loadToolCatalog() {
|
|
|
20
20
|
const response = await fetchToolCatalog();
|
|
21
21
|
if (!response.ok) {
|
|
22
22
|
const msg = response.error && typeof response.error === "object" && "message" in response.error ? String(response.error.message) : "Failed to fetch tool catalog";
|
|
23
|
-
const { CliError } = await import("./errors-
|
|
24
|
-
const { outputError } = await import("./output-
|
|
23
|
+
const { CliError } = await import("./errors-EL6UMXNJ.js");
|
|
24
|
+
const { outputError } = await import("./output-XGTE4EWJ.js");
|
|
25
25
|
await outputError(
|
|
26
26
|
new CliError("API_ERROR", msg, "Check: hive doctor"),
|
|
27
27
|
{}
|
|
@@ -122,8 +122,8 @@ async function toolInfo(name) {
|
|
|
122
122
|
const allTools = await loadToolCatalog();
|
|
123
123
|
const tool = allTools.find((t2) => t2.name === name);
|
|
124
124
|
if (!tool) {
|
|
125
|
-
const { CliError, suggestSimilarTools } = await import("./errors-
|
|
126
|
-
const { outputError } = await import("./output-
|
|
125
|
+
const { CliError, suggestSimilarTools } = await import("./errors-EL6UMXNJ.js");
|
|
126
|
+
const { outputError } = await import("./output-XGTE4EWJ.js");
|
|
127
127
|
const similar = suggestSimilarTools(
|
|
128
128
|
name,
|
|
129
129
|
allTools.map((t2) => t2.name)
|
|
@@ -163,7 +163,7 @@ ${t.description}
|
|
|
163
163
|
}
|
|
164
164
|
async function refreshTools() {
|
|
165
165
|
const { clearCache } = await import("./cache-IDP4TLKY.js");
|
|
166
|
-
const { info: printInfo } = await import("./output-
|
|
166
|
+
const { info: printInfo } = await import("./output-XGTE4EWJ.js");
|
|
167
167
|
clearCache();
|
|
168
168
|
printInfo("Cache cleared. Fetching fresh tool catalog...\n");
|
|
169
169
|
const tools = await loadToolCatalog();
|
|
@@ -2,10 +2,10 @@ import { createRequire } from 'node:module'; const require = createRequire(impor
|
|
|
2
2
|
import {
|
|
3
3
|
detectInstallMode,
|
|
4
4
|
runUpgrade
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-LW2DHE32.js";
|
|
6
6
|
import "./chunk-M6REON2I.js";
|
|
7
7
|
import "./chunk-ZXKFJQDE.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-LP5ECG7A.js";
|
|
9
9
|
import "./chunk-6PC3HUAK.js";
|
|
10
10
|
import "./chunk-OMO7XLC5.js";
|
|
11
11
|
export {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
executeTool
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KUF754NT.js";
|
|
5
5
|
import "./chunk-P7NLFSZQ.js";
|
|
6
6
|
import "./chunk-RU6QOFHH.js";
|
|
7
7
|
import "./chunk-EPF36Q3Z.js";
|
|
8
8
|
import "./chunk-ZXKFJQDE.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-LP5ECG7A.js";
|
|
10
10
|
import "./chunk-6PC3HUAK.js";
|
|
11
11
|
import "./chunk-OMO7XLC5.js";
|
|
12
12
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hive-intelligence",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.2",
|
|
4
4
|
"description": "Evidence-backed crypto due diligence for AI agents, with sources, freshness, and a runtime receipt on every call.",
|
|
5
5
|
"mcpName": "xyz.hiveintelligence/mcp",
|
|
6
6
|
"type": "module",
|