hive-intelligence 1.6.0 → 1.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/README.md +1 -1
  2. package/agent-skills/.claude-plugin/plugin.json +1 -1
  3. package/agent-skills/packs/hive-mcp/references/clients.md +1 -1
  4. package/build/{auth-4CVED5J7.js → auth-4LPSQJXD.js} +1 -1
  5. package/build/{chunk-G3HNY6VA.js → chunk-32NRUWXA.js} +2 -2
  6. package/build/{chunk-FWDX24GW.js → chunk-IJ5KOZH5.js} +218 -44
  7. package/build/{chunk-CF23GYNH.js → chunk-KUF754NT.js} +2 -2
  8. package/build/{chunk-F2OCUEQ6.js → chunk-LP5ECG7A.js} +5 -0
  9. package/build/{chunk-BV7WNZF5.js → chunk-LW2DHE32.js} +1 -1
  10. package/build/{chunk-R6YZTFQL.js → chunk-S4HBVZ7O.js} +3 -1
  11. package/build/{chunk-P7PXHQAJ.js → chunk-XZJICKAL.js} +1 -1
  12. package/build/cli.js +22 -22
  13. package/build/{doctor-XX7VSAYA.js → doctor-YBCU5FLQ.js} +3 -3
  14. package/build/{errors-6UNXNVTN.js → errors-EL6UMXNJ.js} +1 -1
  15. package/build/{init-all-SCRMLL3G.js → init-all-54G3CVZA.js} +3 -3
  16. package/build/{mcpServer-EKIEVVOZ.js → mcpServer-V4XUSCX7.js} +1 -1
  17. package/build/monitor-worker.js +2 -2
  18. package/build/{output-AC64BELH.js → output-XGTE4EWJ.js} +1 -1
  19. package/build/release.json +4 -4
  20. package/build/{serve-CEBIUBMZ.js → serve-SU67DIY3.js} +1 -1
  21. package/build/server.js +60 -18
  22. package/build/stdio.js +1 -1
  23. package/build/{tools-6DTUAMY7.js → tools-FNPMELSU.js} +6 -6
  24. package/build/{uninstall-PYKDCTTT.js → uninstall-P3JJZCXT.js} +1 -1
  25. package/build/{upgrade-VDYC5LBL.js → upgrade-ATIFZANV.js} +2 -2
  26. package/build/{watch-W2TCXKWQ.js → watch-FG2C5Y2Z.js} +2 -2
  27. 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.5.1",
112
+ "server_version": "1.6.3",
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 query prices, scan wallets, check token security, automate briefings."
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
- The official one-click form is a `vscode:mcp/install?` URL containing the
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`.
@@ -12,7 +12,7 @@ import {
12
12
  runWhoami,
13
13
  saveProfile,
14
14
  switchProfile
15
- } from "./chunk-G3HNY6VA.js";
15
+ } from "./chunk-32NRUWXA.js";
16
16
  import "./chunk-6PC3HUAK.js";
17
17
  import "./chunk-OMO7XLC5.js";
18
18
  export {
@@ -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-AC64BELH.js");
301
- const { CliError, classifyError } = await import("./errors-6UNXNVTN.js");
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",
@@ -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,12 +51028,13 @@ 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
  }
51034
+ const properties = schema.properties ?? {};
51031
51035
  schema.properties = {
51032
- ...schema.properties ?? {},
51033
- response_format: RESPONSE_FORMAT_SCHEMA
51036
+ ...properties,
51037
+ response_format: properties.response_format ?? RESPONSE_FORMAT_SCHEMA
51034
51038
  };
51035
51039
  }
51036
51040
  return normalized;
@@ -52642,6 +52646,8 @@ var ERROR_SUGGESTIONS = {
52642
52646
  RATE_LIMIT: "Wait 60 seconds before retrying, or use pagination to reduce requests.",
52643
52647
  // Not found
52644
52648
  NOT_FOUND: "The requested resource was not found. Verify the ID/address is correct.",
52649
+ TOOL_NOT_FOUND: "Call search_tools with your task to find the exact tool name, then retry with that name.",
52650
+ TOOL_RETIRED: "Call the replacement tool named above with its own argument names. Do not retry the retired name.",
52645
52651
  COIN_NOT_FOUND: "The coin ID may be incorrect. Use search_all or get_coins_list to find the correct ID.",
52646
52652
  POOL_NOT_FOUND: "The pool address may be incorrect or on a different network. Verify the network and address.",
52647
52653
  TOKEN_NOT_FOUND: "Verify the token address and network ID are correct. Use get_tokens to search.",
@@ -52770,6 +52776,7 @@ function isUnmarkedErrorResponse(result2) {
52770
52776
  }
52771
52777
  function normalizeErrorText(text, toolName, args) {
52772
52778
  let errorMsg = "";
52779
+ let code = "";
52773
52780
  let suggestion = "";
52774
52781
  let alternatives = "";
52775
52782
  let documentation = "";
@@ -52777,6 +52784,7 @@ function normalizeErrorText(text, toolName, args) {
52777
52784
  const parsed = JSON.parse(text);
52778
52785
  if (parsed && typeof parsed === "object" && typeof parsed.error === "string") {
52779
52786
  errorMsg = parsed.error;
52787
+ code = typeof parsed.code === "string" ? parsed.code : "";
52780
52788
  suggestion = parsed.suggestion || "";
52781
52789
  if (Array.isArray(parsed.alternatives) && parsed.alternatives.length > 0) {
52782
52790
  alternatives = parsed.alternatives.join(", ");
@@ -52789,7 +52797,7 @@ function normalizeErrorText(text, toolName, args) {
52789
52797
  let normalized = `**Error:** ${errorMsg}`;
52790
52798
  normalized += `
52791
52799
 
52792
- **Code:** API_ERROR`;
52800
+ **Code:** ${code || "API_ERROR"}`;
52793
52801
  if (suggestion) normalized += `
52794
52802
 
52795
52803
  **Suggestion:** ${suggestion}`;
@@ -53951,13 +53959,19 @@ function attachStructuredContent(result2, hasOutputSchema = false) {
53951
53959
  }
53952
53960
  return result2;
53953
53961
  }
53962
+ function declaredErrorCode(rawErrorText) {
53963
+ try {
53964
+ const parsed = JSON.parse(rawErrorText ?? "");
53965
+ return typeof parsed?.code === "string" ? parsed.code : void 0;
53966
+ } catch {
53967
+ return void 0;
53968
+ }
53969
+ }
53954
53970
  function createToolNotFoundResult(toolName, durationMs = 0) {
53955
53971
  const retired = getRetiredToolReplacement(toolName);
53956
- const mcpResult = createErrorResponse7(
53957
- "NOT_FOUND",
53958
- retired ? `Tool '${toolName}' was retired on ${RETIRED_TOOLS_DATE}` : `Tool '${toolName}' not found`,
53959
- retired ?? "Verify the tool name is correct using the tools/list endpoint."
53960
- );
53972
+ const message = retired ? `Tool '${toolName}' was retired on ${RETIRED_TOOLS_DATE}. ${retired}` : `Tool '${toolName}' not found.`;
53973
+ const errorCode = retired ? "TOOL_RETIRED" : "TOOL_NOT_FOUND";
53974
+ const mcpResult = createErrorResponse7(errorCode, message);
53961
53975
  const hive = {
53962
53976
  receipt_id: randomUUID2(),
53963
53977
  receipt_version: "1.0",
@@ -53971,7 +53985,7 @@ function createToolNotFoundResult(toolName, durationMs = 0) {
53971
53985
  provider: "Hive",
53972
53986
  tool: toolName,
53973
53987
  category: "MCP Discovery",
53974
- runtime_status: "failing",
53988
+ runtime_status: "invalid_input",
53975
53989
  fetched_at: (/* @__PURE__ */ new Date()).toISOString(),
53976
53990
  observed_at: null,
53977
53991
  cache_age_ms: null,
@@ -53980,7 +53994,9 @@ function createToolNotFoundResult(toolName, durationMs = 0) {
53980
53994
  source: "unavailable",
53981
53995
  origin_source: null,
53982
53996
  truncated: false,
53983
- warnings: ["Tool name did not resolve to a Hive endpoint."],
53997
+ warnings: [
53998
+ retired ? "Tool name was retired; the replacement is named in the message." : "Tool name did not resolve to a Hive endpoint."
53999
+ ],
53984
54000
  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
54001
  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
54002
  };
@@ -53989,14 +54005,14 @@ function createToolNotFoundResult(toolName, durationMs = 0) {
53989
54005
  ok: false,
53990
54006
  toolName,
53991
54007
  durationMs,
53992
- runtimeStatus: "failing",
54008
+ runtimeStatus: "invalid_input",
53993
54009
  hive,
53994
54010
  mcpResult: enrichedMcpResult,
53995
54011
  data: unwrapMcpContent(enrichedMcpResult),
53996
54012
  error: {
53997
54013
  type: "not_found_error",
53998
- code: "TOOL_NOT_FOUND",
53999
- message: `Tool '${toolName}' not found.`
54014
+ code: errorCode,
54015
+ message
54000
54016
  }
54001
54017
  };
54002
54018
  }
@@ -54396,6 +54412,7 @@ async function executeEndpoint(endpoint, args, context) {
54396
54412
  );
54397
54413
  if (normalized.isError) {
54398
54414
  const errorMessage = typeof data === "object" && data !== null && "error" in data ? String(data.error) : errorText || "Tool execution error";
54415
+ const callerError = runtimeStatus === "invalid_input" && declaredErrorCode(rawErrorText) === "VALIDATION_ERROR";
54399
54416
  return {
54400
54417
  ok: false,
54401
54418
  toolName: endpoint.tool.name,
@@ -54404,7 +54421,11 @@ async function executeEndpoint(endpoint, args, context) {
54404
54421
  hive,
54405
54422
  mcpResult,
54406
54423
  data,
54407
- error: {
54424
+ error: callerError ? {
54425
+ type: "invalid_request_error",
54426
+ code: "VALIDATION_ERROR",
54427
+ message: errorMessage
54428
+ } : {
54408
54429
  type: "provider_error",
54409
54430
  code: "TOOL_ERROR",
54410
54431
  message: errorMessage
@@ -54476,9 +54497,12 @@ var HERO_TOOL_NAMES = /* @__PURE__ */ new Set([
54476
54497
  "check_token_safety",
54477
54498
  "get_wallet_portfolio"
54478
54499
  ]);
54479
- var RESPONSE_FORMAT = z2.enum(["concise", "detailed"]).optional().describe(
54480
- "concise (default) returns the trimmed essentials; detailed returns the full provider payload."
54500
+ var RESPONSE_FORMAT = z2.enum(["concise", "detailed", "json", "markdown"]).optional().describe(
54501
+ "concise (default) returns the trimmed essentials; detailed returns the full provider payload. json and markdown, the platform-wide values every other tool advertises, are accepted and treated as concise."
54481
54502
  );
54503
+ function heroFormat(value) {
54504
+ return value === "detailed" ? "detailed" : "concise";
54505
+ }
54482
54506
  var GOPLUS_CHAIN_IDS = {
54483
54507
  eth: "1",
54484
54508
  ethereum: "1",
@@ -54529,6 +54553,122 @@ var ALCHEMY_NETWORKS = {
54529
54553
  bnb: "bnb-mainnet"
54530
54554
  };
54531
54555
  var SOLANA_CHAIN_NAMES = /* @__PURE__ */ new Set(["solana", "sol", "solana-mainnet"]);
54556
+ var CHAIN_ID_NAMES = {};
54557
+ for (const [name, id] of Object.entries(GOPLUS_CHAIN_IDS)) {
54558
+ if (!(id in CHAIN_ID_NAMES)) CHAIN_ID_NAMES[id] = name;
54559
+ }
54560
+ var CHAIN_ALIASES = [
54561
+ "chain",
54562
+ "network",
54563
+ "chain_id",
54564
+ "chainId",
54565
+ "network_id",
54566
+ "networkId",
54567
+ "blockchain",
54568
+ "platform",
54569
+ "chain_name",
54570
+ "network_name"
54571
+ ];
54572
+ var CONTRACT_ADDRESS_ALIASES = [
54573
+ "address",
54574
+ "contract_address",
54575
+ "contractAddress",
54576
+ "token_address",
54577
+ "tokenAddress",
54578
+ "contract",
54579
+ "mint",
54580
+ "mint_address"
54581
+ ];
54582
+ var RESPONSE_FORMAT_ALIASES = ["response_format", "format"];
54583
+ var HERO_ARG_ALIASES = {
54584
+ get_token_price: {
54585
+ token: [
54586
+ "token",
54587
+ "symbol",
54588
+ "coin",
54589
+ "coin_id",
54590
+ "coinId",
54591
+ "id",
54592
+ "ticker",
54593
+ "asset",
54594
+ "name"
54595
+ ],
54596
+ address: CONTRACT_ADDRESS_ALIASES,
54597
+ chain: CHAIN_ALIASES,
54598
+ vs_currency: [
54599
+ "vs_currency",
54600
+ "vsCurrency",
54601
+ "vs",
54602
+ "currency",
54603
+ "quote",
54604
+ "fiat"
54605
+ ],
54606
+ response_format: RESPONSE_FORMAT_ALIASES
54607
+ },
54608
+ check_token_safety: {
54609
+ address: [...CONTRACT_ADDRESS_ALIASES, "token"],
54610
+ chain: CHAIN_ALIASES,
54611
+ response_format: RESPONSE_FORMAT_ALIASES
54612
+ },
54613
+ get_wallet_portfolio: {
54614
+ address: [
54615
+ "address",
54616
+ "wallet",
54617
+ "wallet_address",
54618
+ "walletAddress",
54619
+ "account",
54620
+ "account_address",
54621
+ "owner"
54622
+ ],
54623
+ chain: CHAIN_ALIASES,
54624
+ response_format: RESPONSE_FORMAT_ALIASES
54625
+ }
54626
+ };
54627
+ function looksLikeContractAddress(value) {
54628
+ const trimmed = value.trim();
54629
+ return /^0x[0-9a-f]{40}$/i.test(trimmed) || /^[1-9A-HJ-NP-Za-km-z]{32,44}$/.test(trimmed);
54630
+ }
54631
+ function normalizeHeroArgs(toolName, raw) {
54632
+ const aliases = HERO_ARG_ALIASES[toolName] ?? {};
54633
+ const input = raw ?? {};
54634
+ const args = {};
54635
+ const consumed = /* @__PURE__ */ new Set();
54636
+ for (const [canonical, names] of Object.entries(aliases)) {
54637
+ for (const name of names) {
54638
+ const value = input[name];
54639
+ if (value === void 0 || value === null) continue;
54640
+ if (!(canonical in args)) args[canonical] = value;
54641
+ consumed.add(name);
54642
+ }
54643
+ }
54644
+ const unknownKeys = Object.keys(input).filter((key) => !consumed.has(key));
54645
+ if (typeof args.chain === "number") args.chain = String(args.chain);
54646
+ if (typeof args.chain === "string") {
54647
+ const bare = args.chain.trim().toLowerCase().replace(/[\s_-]*mainnet$/, "").replace(/\s+/g, "-");
54648
+ args.chain = CHAIN_ID_NAMES[bare] ?? bare;
54649
+ }
54650
+ if (toolName === "get_token_price" && typeof args.token === "string" && args.address === void 0 && looksLikeContractAddress(args.token)) {
54651
+ args.address = args.token;
54652
+ delete args.token;
54653
+ }
54654
+ const accepted = Object.entries(aliases).map(([canonical, names]) => {
54655
+ const extra = names.filter((name) => name !== canonical);
54656
+ return extra.length > 0 ? `${canonical} (aliases: ${extra.join(", ")})` : canonical;
54657
+ }).join("; ");
54658
+ return { args, unknownKeys, accepted };
54659
+ }
54660
+ function formatSchemaIssues(error) {
54661
+ return error.issues.map((issue) => {
54662
+ const field = issue.path.map(String).join(".") || "input";
54663
+ const missing = issue.code === "invalid_type" && issue.received === void 0;
54664
+ return missing ? `Required field "${field}" is missing.` : `"${field}" ${issue.message}.`;
54665
+ }).join(" ");
54666
+ }
54667
+ function unknownKeysError(unknownKeys, accepted) {
54668
+ return errorResult3(
54669
+ `Invalid arguments: ${unknownKeys.map((key) => `"${key}" is not allowed.`).join(" ")} Accepted fields: ${accepted}.`
54670
+ );
54671
+ }
54532
54672
  function normalizeChain(chain) {
54533
54673
  return (chain ?? "eth").trim().toLowerCase();
54534
54674
  }
@@ -54541,12 +54681,12 @@ function looksLikeNameService(address) {
54541
54681
  }
54542
54682
  function nameServiceError(address) {
54543
54683
  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).`
54684
+ `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
54685
  );
54546
54686
  }
54547
- function errorResult3(message) {
54687
+ function errorResult3(message, code = "VALIDATION_ERROR") {
54548
54688
  return {
54549
- content: [{ type: "text", text: JSON.stringify({ error: message }) }],
54689
+ content: [{ type: "text", text: JSON.stringify({ error: message, code }) }],
54550
54690
  isError: true
54551
54691
  };
54552
54692
  }
@@ -54675,15 +54815,19 @@ function heroTools(endpoints, options = {}) {
54675
54815
  annotations: VOLATILE_READ_ANNOTATIONS
54676
54816
  },
54677
54817
  handler: async (_client, args) => {
54678
- const parsed = tokenPriceSchema.safeParse(args ?? {});
54818
+ const heroArgs = normalizeHeroArgs("get_token_price", args);
54819
+ if (heroArgs.unknownKeys.length > 0) {
54820
+ return unknownKeysError(heroArgs.unknownKeys, heroArgs.accepted);
54821
+ }
54822
+ const parsed = tokenPriceSchema.safeParse(heroArgs.args);
54679
54823
  if (!parsed.success) {
54680
54824
  return errorResult3(
54681
- `Invalid arguments: ${JSON.stringify(parsed.error.format())}`
54825
+ `Invalid arguments: ${formatSchemaIssues(parsed.error)}`
54682
54826
  );
54683
54827
  }
54684
54828
  const { token, chain, address } = parsed.data;
54685
54829
  const vsCurrency = (parsed.data.vs_currency ?? "usd").toLowerCase();
54686
- const format = parsed.data.response_format ?? "concise";
54830
+ const format = heroFormat(parsed.data.response_format);
54687
54831
  if (address) {
54688
54832
  if (looksLikeNameService(address)) return nameServiceError(address);
54689
54833
  const network = GECKO_NETWORKS[normalizeChain(chain)] ?? normalizeChain(chain);
@@ -54695,7 +54839,7 @@ function heroTools(endpoints, options = {}) {
54695
54839
  }
54696
54840
  if (!token) {
54697
54841
  return errorResult3(
54698
- 'Pass token (CoinGecko id or symbol, for example "bitcoin" or "BTC"), or chain + address for a contract.'
54842
+ 'Invalid arguments: pass token (CoinGecko id or symbol, for example "bitcoin" or "BTC"), or chain + address for a contract.'
54699
54843
  );
54700
54844
  }
54701
54845
  const normalizedToken = token.toLowerCase();
@@ -54722,7 +54866,9 @@ function heroTools(endpoints, options = {}) {
54722
54866
  }
54723
54867
  };
54724
54868
  const tokenSafetySchema = z2.object({
54725
- address: z2.string().trim().min(1).max(100).describe("Token contract address (0x\u2026 for EVM, base58 for Solana)."),
54869
+ address: z2.string().trim().min(1).max(100).describe(
54870
+ "Required. Token contract address (0x\u2026 for EVM, base58 for Solana)."
54871
+ ),
54726
54872
  chain: z2.string().trim().max(40).optional().describe(
54727
54873
  'Chain name or EVM chain id, for example "eth", "bsc", "8453", or "solana". Defaults to eth for 0x addresses; Solana is auto-detected.'
54728
54874
  ),
@@ -54777,14 +54923,18 @@ function heroTools(endpoints, options = {}) {
54777
54923
  annotations: VOLATILE_READ_ANNOTATIONS
54778
54924
  },
54779
54925
  handler: async (_client, args) => {
54780
- const parsed = tokenSafetySchema.safeParse(args ?? {});
54926
+ const heroArgs = normalizeHeroArgs("check_token_safety", args);
54927
+ if (heroArgs.unknownKeys.length > 0) {
54928
+ return unknownKeysError(heroArgs.unknownKeys, heroArgs.accepted);
54929
+ }
54930
+ const parsed = tokenSafetySchema.safeParse(heroArgs.args);
54781
54931
  if (!parsed.success) {
54782
54932
  return errorResult3(
54783
- `Invalid arguments: ${JSON.stringify(parsed.error.format())}`
54933
+ `Invalid arguments: ${formatSchemaIssues(parsed.error)}`
54784
54934
  );
54785
54935
  }
54786
54936
  const { address, chain } = parsed.data;
54787
- const format = parsed.data.response_format ?? "concise";
54937
+ const format = heroFormat(parsed.data.response_format);
54788
54938
  if (looksLikeNameService(address)) return nameServiceError(address);
54789
54939
  if (isSolanaChain(chain, address)) {
54790
54940
  const result3 = await executeUnderlying("get_solana_token_security", {
@@ -54796,7 +54946,7 @@ function heroTools(endpoints, options = {}) {
54796
54946
  const chainId = /^\d+$/.test(normalized) ? normalized : GOPLUS_CHAIN_IDS[normalized];
54797
54947
  if (!chainId) {
54798
54948
  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".`
54949
+ `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
54950
  );
54801
54951
  }
54802
54952
  const result2 = await executeUnderlying("get_token_security", {
@@ -54807,7 +54957,7 @@ function heroTools(endpoints, options = {}) {
54807
54957
  }
54808
54958
  };
54809
54959
  const walletPortfolioSchema = z2.object({
54810
- address: z2.string().trim().min(1).max(100).describe("Wallet address (0x\u2026 for EVM, base58 for Solana)."),
54960
+ address: z2.string().trim().min(1).max(100).describe("Required. Wallet address (0x\u2026 for EVM, base58 for Solana)."),
54811
54961
  chain: z2.string().trim().max(40).optional().describe(
54812
54962
  'Chain name, for example "eth", "base", "arbitrum", or "solana". Defaults to eth for 0x addresses; Solana is auto-detected.'
54813
54963
  ),
@@ -54926,14 +55076,18 @@ function heroTools(endpoints, options = {}) {
54926
55076
  annotations: VOLATILE_READ_ANNOTATIONS
54927
55077
  },
54928
55078
  handler: async (_client, args) => {
54929
- const parsed = walletPortfolioSchema.safeParse(args ?? {});
55079
+ const heroArgs = normalizeHeroArgs("get_wallet_portfolio", args);
55080
+ if (heroArgs.unknownKeys.length > 0) {
55081
+ return unknownKeysError(heroArgs.unknownKeys, heroArgs.accepted);
55082
+ }
55083
+ const parsed = walletPortfolioSchema.safeParse(heroArgs.args);
54930
55084
  if (!parsed.success) {
54931
55085
  return errorResult3(
54932
- `Invalid arguments: ${JSON.stringify(parsed.error.format())}`
55086
+ `Invalid arguments: ${formatSchemaIssues(parsed.error)}`
54933
55087
  );
54934
55088
  }
54935
55089
  const { address, chain } = parsed.data;
54936
- const format = parsed.data.response_format ?? "concise";
55090
+ const format = heroFormat(parsed.data.response_format);
54937
55091
  if (looksLikeNameService(address)) return nameServiceError(address);
54938
55092
  if (isSolanaChain(chain, address)) {
54939
55093
  const result3 = await executeUnderlying("helius_get_wallet_balances", {
@@ -54945,7 +55099,7 @@ function heroTools(endpoints, options = {}) {
54945
55099
  const network = ALCHEMY_NETWORKS[normalized];
54946
55100
  if (!network) {
54947
55101
  return errorResult3(
54948
- `Unknown chain '${chain}'. Pass an EVM chain name (${Object.keys(ALCHEMY_NETWORKS).slice(0, 6).join(", ")}, \u2026) or "solana".`
55102
+ `Invalid arguments: Unknown chain '${chain}'. Pass an EVM chain name (${Object.keys(ALCHEMY_NETWORKS).slice(0, 6).join(", ")}, \u2026) or "solana".`
54949
55103
  );
54950
55104
  }
54951
55105
  const result2 = await executeUnderlying("alchemy_get_tokens_by_wallet", {
@@ -54964,8 +55118,13 @@ function heroOutputSchema(name) {
54964
55118
  }
54965
55119
  function zodToInputSchema(schema) {
54966
55120
  const jsonSchema = schema.toJSONSchema();
54967
- const { $schema, ...rest } = jsonSchema;
54968
- return { ...rest, type: "object" };
55121
+ const { $schema, required, ...rest } = jsonSchema;
55122
+ void required;
55123
+ return {
55124
+ ...rest,
55125
+ type: "object",
55126
+ additionalProperties: true
55127
+ };
54969
55128
  }
54970
55129
 
54971
55130
  // src/taskRoutes.ts
@@ -66039,6 +66198,20 @@ function dynamicTools(endpoints, options = {}) {
66039
66198
  "Alias for 'endpoint', accepted for symmetry with invoke_api_endpoint. Provide one of the two."
66040
66199
  )
66041
66200
  });
66201
+ const ENDPOINT_NAME_ALIASES = [
66202
+ "name",
66203
+ "tool",
66204
+ "tool_name",
66205
+ "toolName",
66206
+ "endpointName"
66207
+ ];
66208
+ const firstStringArg = (source, keys) => {
66209
+ for (const key of keys) {
66210
+ const value = source[key];
66211
+ if (typeof value === "string" && value.trim()) return value;
66212
+ }
66213
+ return void 0;
66214
+ };
66042
66215
  const getEndpointTool = {
66043
66216
  metadata: {
66044
66217
  resource: "dynamic_tools",
@@ -66049,7 +66222,10 @@ function dynamicTools(endpoints, options = {}) {
66049
66222
  name: "get_api_endpoint_schema",
66050
66223
  title: "API Endpoint Schema",
66051
66224
  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: zodToInputSchema2(getEndpointSchema),
66225
+ inputSchema: {
66226
+ ...zodToInputSchema2(getEndpointSchema),
66227
+ additionalProperties: true
66228
+ },
66053
66229
  outputSchema: API_ENDPOINT_SCHEMA_OUTPUT_SCHEMA,
66054
66230
  annotations: READ_ONLY_ANNOTATIONS
66055
66231
  },
@@ -66060,7 +66236,7 @@ function dynamicTools(endpoints, options = {}) {
66060
66236
  );
66061
66237
  }
66062
66238
  const parsedEndpointArgs = getEndpointSchema.parse(args);
66063
- const requestedEndpoint = parsedEndpointArgs.endpoint ?? parsedEndpointArgs.endpoint_name;
66239
+ const requestedEndpoint = parsedEndpointArgs.endpoint ?? parsedEndpointArgs.endpoint_name ?? firstStringArg(args, ENDPOINT_NAME_ALIASES);
66064
66240
  if (!requestedEndpoint) {
66065
66241
  return errorResult4(
66066
66242
  "No endpoint provided. Pass an 'endpoint' (or 'endpoint_name') parameter with the tool name."
@@ -66076,11 +66252,9 @@ function dynamicTools(endpoints, options = {}) {
66076
66252
  ...categoryTools
66077
66253
  ].find((endpoint2) => endpoint2.tool.name === requestedEndpoint);
66078
66254
  if (!lookup.ok && !metaEndpoint) {
66079
- const missingName = lookup.resolvedToolName || lookup.requestedToolName;
66080
- const retired = getRetiredToolReplacement(missingName);
66081
- return errorResult4(
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
- );
66255
+ return createToolNotFoundResult(
66256
+ lookup.resolvedToolName || lookup.requestedToolName
66257
+ ).mcpResult;
66084
66258
  }
66085
66259
  const endpoint = lookup.ok ? lookup.endpoint : metaEndpoint;
66086
66260
  return asTextContentResult({
@@ -10,7 +10,7 @@ import {
10
10
  dim,
11
11
  shouldOutputJson,
12
12
  writeOutput
13
- } from "./chunk-F2OCUEQ6.js";
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) {
@@ -12,7 +12,7 @@ import {
12
12
  shouldOutputJson,
13
13
  successEnvelope,
14
14
  writeOutput
15
- } from "./chunk-F2OCUEQ6.js";
15
+ } from "./chunk-LP5ECG7A.js";
16
16
 
17
17
  // src/cli/upgrade.ts
18
18
  import { spawnSync } from "child_process";
@@ -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;
@@ -7,7 +7,7 @@ import {
7
7
  getSupabaseAdmin,
8
8
  resolveEndpoint,
9
9
  secureLogger
10
- } from "./chunk-FWDX24GW.js";
10
+ } from "./chunk-IJ5KOZH5.js";
11
11
 
12
12
  // src/services/wallet-service.ts
13
13
  async function consumeCredits(args) {
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-CF23GYNH.js";
5
+ } from "./chunk-KUF754NT.js";
6
6
  import {
7
7
  ExitCode
8
- } from "./chunk-R6YZTFQL.js";
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-F2OCUEQ6.js";
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-CEBIUBMZ.js");
3443
+ const { startStdio } = await import("./serve-SU67DIY3.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-CEBIUBMZ.js");
3456
+ const { startHttp } = await import("./serve-SU67DIY3.js");
3457
3457
  await startHttp(port, program2.opts().envFile);
3458
3458
  } else {
3459
- const { startStdio } = await import("./serve-CEBIUBMZ.js");
3459
+ const { startStdio } = await import("./serve-SU67DIY3.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-6DTUAMY7.js");
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-6DTUAMY7.js");
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-6DTUAMY7.js");
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-6DTUAMY7.js");
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-SCRMLL3G.js");
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-PYKDCTTT.js");
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-XX7VSAYA.js");
3669
+ const { runDoctor } = await import("./doctor-YBCU5FLQ.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-VDYC5LBL.js");
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-4CVED5J7.js");
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-4CVED5J7.js");
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-4CVED5J7.js");
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-4CVED5J7.js");
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-4CVED5J7.js");
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-4CVED5J7.js");
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-XX7VSAYA.js");
3717
+ const { runStatus } = await import("./doctor-YBCU5FLQ.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-W2TCXKWQ.js");
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-F2OCUEQ6.js";
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-EKIEVVOZ.js");
207
+ const { SERVER_VERSION } = await import("./mcpServer-V4XUSCX7.js");
208
208
  const { resolveApiKey, resolveApiUrl } = await import("./config-dir-2QLA5PXD.js");
209
- const { getActiveProfile, maskKey } = await import("./auth-4CVED5J7.js");
209
+ const { getActiveProfile, maskKey } = await import("./auth-4LPSQJXD.js");
210
210
  const apiUrl = resolveApiUrl();
211
211
  const apiKey = resolveApiKey();
212
212
  const profile = getActiveProfile();
@@ -5,7 +5,7 @@ import {
5
5
  ExitCode,
6
6
  classifyError,
7
7
  suggestSimilarTools
8
- } from "./chunk-R6YZTFQL.js";
8
+ } from "./chunk-S4HBVZ7O.js";
9
9
  import "./chunk-OMO7XLC5.js";
10
10
  export {
11
11
  CliError,
@@ -22,10 +22,10 @@ import {
22
22
  } from "./chunk-BDO27NIP.js";
23
23
  import {
24
24
  saveProfile
25
- } from "./chunk-G3HNY6VA.js";
25
+ } from "./chunk-32NRUWXA.js";
26
26
  import {
27
27
  detectInstallMode
28
- } from "./chunk-BV7WNZF5.js";
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-F2OCUEQ6.js";
38
+ } from "./chunk-LP5ECG7A.js";
39
39
  import {
40
40
  resolveApiKey,
41
41
  resolveApiUrl
@@ -9,7 +9,7 @@ import {
9
9
  getToolsForScope,
10
10
  memoizedJsonSchemaToZodInputSchema,
11
11
  memoizedJsonSchemaToZodOutputSchema
12
- } from "./chunk-FWDX24GW.js";
12
+ } from "./chunk-IJ5KOZH5.js";
13
13
  import "./chunk-GADPH72D.js";
14
14
  import "./chunk-EPF36Q3Z.js";
15
15
  import {
@@ -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-P7PXHQAJ.js";
5
+ } from "./chunk-XZJICKAL.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-FWDX24GW.js";
18
+ } from "./chunk-IJ5KOZH5.js";
19
19
  import "./chunk-GADPH72D.js";
20
20
  import "./chunk-EPF36Q3Z.js";
21
21
  import "./chunk-ZXKFJQDE.js";
@@ -17,7 +17,7 @@ import {
17
17
  successEnvelope,
18
18
  writeOutput,
19
19
  yellow
20
- } from "./chunk-F2OCUEQ6.js";
20
+ } from "./chunk-LP5ECG7A.js";
21
21
  import "./chunk-OMO7XLC5.js";
22
22
  export {
23
23
  bold,
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "package": "hive-intelligence",
3
- "version": "1.6.0",
4
- "buildSha": "1aecb186eceb1d1657d7a824bb65372caa66db0c",
5
- "imageDigest": "sha256:10a8600fd252eb2339d89f66af902d1c3866162873259a6eec5d2516b1926a80",
3
+ "version": "1.6.3",
4
+ "buildSha": "fe2eafa2e2aab14fbee80f2ecb25ddbf7b4790de",
5
+ "imageDigest": "sha256:55f48ae30e23dbc7b40c6600a62cf0045dd0d331454c914af4bedc9a1a9b8782",
6
6
  "deployedUrl": "https://mcp.hiveintelligence.xyz",
7
- "manifest": "https://raw.githubusercontent.com/hive-intel/hive-sdk/v1.6.0/releases/v1.6.0.json"
7
+ "manifest": "https://raw.githubusercontent.com/hive-intel/hive-sdk/v1.6.3/releases/v1.6.3.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-EKIEVVOZ.js");
10
+ const { createHiveMcpServer, SERVER_NAME, SERVER_VERSION } = await import("./mcpServer-V4XUSCX7.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-P7PXHQAJ.js";
9
+ } from "./chunk-XZJICKAL.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-FWDX24GW.js";
99
+ } from "./chunk-IJ5KOZH5.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
- res.status(404).json({
8036
- ok: false,
8037
- error: {
8038
- type: "invalid_request",
8039
- code: "TOOL_NOT_FOUND",
8040
- message: `Unknown tool "${toolName}". Browse the catalog at /api/v1/tools, or call search_tools over MCP.`
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
- secureLogger.error("Unhandled express error", err, {});
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
- res.status(500).json(
8316
- apiError(
8317
- "internal_error",
8318
- "INTERNAL_ERROR",
8319
- "An unexpected error occurred."
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
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  createHiveMcpServer,
8
8
  secureLogger
9
- } from "./chunk-FWDX24GW.js";
9
+ } from "./chunk-IJ5KOZH5.js";
10
10
  import "./chunk-GADPH72D.js";
11
11
  import "./chunk-EPF36Q3Z.js";
12
12
  import {
@@ -8,7 +8,7 @@ import {
8
8
  shouldOutputJson,
9
9
  successEnvelope,
10
10
  writeOutput
11
- } from "./chunk-F2OCUEQ6.js";
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-6UNXNVTN.js");
24
- const { outputError } = await import("./output-AC64BELH.js");
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-6UNXNVTN.js");
126
- const { outputError } = await import("./output-AC64BELH.js");
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-AC64BELH.js");
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();
@@ -18,7 +18,7 @@ import {
18
18
  dim,
19
19
  green,
20
20
  yellow
21
- } from "./chunk-F2OCUEQ6.js";
21
+ } from "./chunk-LP5ECG7A.js";
22
22
  import "./chunk-6PC3HUAK.js";
23
23
  import "./chunk-OMO7XLC5.js";
24
24
 
@@ -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-BV7WNZF5.js";
5
+ } from "./chunk-LW2DHE32.js";
6
6
  import "./chunk-M6REON2I.js";
7
7
  import "./chunk-ZXKFJQDE.js";
8
- import "./chunk-F2OCUEQ6.js";
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-CF23GYNH.js";
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-F2OCUEQ6.js";
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.0",
3
+ "version": "1.6.3",
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",