hive-intelligence 1.7.2 → 1.7.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.
package/README.md CHANGED
@@ -112,7 +112,7 @@ Expected output shape:
112
112
  "source": "live",
113
113
  "receipt_id": "00000000-0000-4000-8000-000000000000",
114
114
  "receipt_version": "1.0",
115
- "server_version": "1.7.2",
115
+ "server_version": "1.7.3",
116
116
  "build_sha": null,
117
117
  "digest_algorithm": "sha256",
118
118
  "input_digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
@@ -7,7 +7,7 @@ import {
7
7
  getSupabaseAdmin,
8
8
  resolveEndpoint,
9
9
  secureLogger
10
- } from "./chunk-LP7PDQCO.js";
10
+ } from "./chunk-WDF56OFL.js";
11
11
 
12
12
  // src/services/wallet-service.ts
13
13
  async function consumeCredits(args) {
@@ -62263,7 +62263,6 @@ var HIVE_PROMPTS = [
62263
62263
  ];
62264
62264
 
62265
62265
  // src/services/unkey-service.ts
62266
- import { Unkey } from "@unkey/api";
62267
62266
  import { randomUUID as randomUUID4 } from "crypto";
62268
62267
  var _unkey = null;
62269
62268
  function getAuthBackendMode() {
@@ -62282,14 +62281,17 @@ function hasUnkeyCredentials() {
62282
62281
  function isUnkeyConfigured() {
62283
62282
  return getAuthBackendMode() !== "static" && hasUnkeyCredentials();
62284
62283
  }
62285
- function getUnkey() {
62284
+ async function getUnkey() {
62286
62285
  if (!_unkey) {
62287
62286
  if (!isUnkeyConfigured()) {
62288
62287
  throw new Error(
62289
62288
  "Unkey not configured. Set UNKEY_ROOT_KEY and UNKEY_API_ID."
62290
62289
  );
62291
62290
  }
62292
- _unkey = new Unkey({ rootKey: getRequiredEnvVar("UNKEY_ROOT_KEY") });
62291
+ const { Unkey: UnkeyClient } = await import("@unkey/api");
62292
+ _unkey ??= new UnkeyClient({
62293
+ rootKey: getRequiredEnvVar("UNKEY_ROOT_KEY")
62294
+ });
62293
62295
  }
62294
62296
  return _unkey;
62295
62297
  }
@@ -62322,7 +62324,8 @@ async function listAllUserKeysRaw(userId) {
62322
62324
  const all = [];
62323
62325
  let cursor;
62324
62326
  for (let page = 0; page < KEYS_MAX_PAGES; page += 1) {
62325
- const result2 = await getUnkey().apis.listKeys({
62327
+ const unkey = await getUnkey();
62328
+ const result2 = await unkey.apis.listKeys({
62326
62329
  apiId,
62327
62330
  externalId: userId,
62328
62331
  limit: KEYS_PAGE_LIMIT,
@@ -62396,7 +62399,8 @@ async function createApiKey(opts) {
62396
62399
  subject_signing_secret: subjectSigningSecret
62397
62400
  } : {}
62398
62401
  };
62399
- const result2 = await getUnkey().keys.createKey({
62402
+ const unkey = await getUnkey();
62403
+ const result2 = await unkey.keys.createKey({
62400
62404
  apiId: getApiId(),
62401
62405
  prefix: "hive_live",
62402
62406
  name: opts.name,
@@ -62429,7 +62433,8 @@ async function createApiKey(opts) {
62429
62433
  }
62430
62434
  async function verifyApiKey(rawKey, analyticsTags = []) {
62431
62435
  const tags = normalizeAnalyticsTags(analyticsTags);
62432
- const result2 = await getUnkey().keys.verifyKey({
62436
+ const unkey = await getUnkey();
62437
+ const result2 = await unkey.keys.verifyKey({
62433
62438
  key: rawKey,
62434
62439
  ...tags.length > 0 ? { tags } : {},
62435
62440
  ratelimits: [
@@ -62474,7 +62479,8 @@ async function listKeys(userId) {
62474
62479
  }));
62475
62480
  }
62476
62481
  async function revokeKey(keyId) {
62477
- await getUnkey().keys.updateKey({
62482
+ const unkey = await getUnkey();
62483
+ await unkey.keys.updateKey({
62478
62484
  keyId,
62479
62485
  enabled: false
62480
62486
  });
@@ -64701,7 +64707,11 @@ var GoPlusClient = class {
64701
64707
  };
64702
64708
 
64703
64709
  // src/tools/ccxt/ccxtClient.ts
64704
- import ccxt from "ccxt";
64710
+ var ccxtModule;
64711
+ function loadCcxt() {
64712
+ ccxtModule ??= import("ccxt").then((mod) => mod.default);
64713
+ return ccxtModule;
64714
+ }
64705
64715
  var GEO_BLOCKED_CODES = /* @__PURE__ */ new Set([451, 403]);
64706
64716
  var PUBLIC_BORROW_HISTORY_METHODS = /* @__PURE__ */ new Set([
64707
64717
  "fetchBorrowRateHistory",
@@ -64738,10 +64748,11 @@ var CCXTClient = class {
64738
64748
  *
64739
64749
  * @internal
64740
64750
  */
64741
- getExchange(exchangeId, options = {}) {
64751
+ async getExchange(exchangeId, options = {}) {
64742
64752
  if (!exchangeId || exchangeId.trim().length === 0) {
64743
64753
  throw new Error("Exchange ID is required");
64744
64754
  }
64755
+ const ccxt = await loadCcxt();
64745
64756
  const cacheKey2 = `${exchangeId}`;
64746
64757
  if (this.exchanges.has(cacheKey2)) {
64747
64758
  return this.exchanges.get(cacheKey2);
@@ -64973,7 +64984,7 @@ var CCXTClient = class {
64973
64984
  `${method} is only exposed for the public OKX borrow-history API (exchange: okx, myokx, or okxus). Hive does not accept exchange account credentials for private margin endpoints.`
64974
64985
  );
64975
64986
  }
64976
- const exchange = this.getExchange(exchangeId);
64987
+ const exchange = await this.getExchange(exchangeId);
64977
64988
  let result2;
64978
64989
  const hasCapability = exchange.has;
64979
64990
  if (hasCapability && hasCapability[method] !== true && hasCapability[method] !== "emulated") {
@@ -65357,7 +65368,7 @@ var CCXTClient = class {
65357
65368
  return result2;
65358
65369
  } catch (error) {
65359
65370
  try {
65360
- const exchange = this.getExchange(exchangeId);
65371
+ const exchange = await this.getExchange(exchangeId);
65361
65372
  const fallback = await this._tryPublicFallback(
65362
65373
  method,
65363
65374
  exchange,
package/build/cli.js CHANGED
@@ -3453,7 +3453,7 @@ program2.hook("preAction", (thisCommand) => {
3453
3453
  setCliFlags({ apiKey: opts.apiKey, noRetry: opts.retry === false });
3454
3454
  });
3455
3455
  program2.action(async () => {
3456
- const { startStdio } = await import("./serve-BYC3LRLN.js");
3456
+ const { startStdio } = await import("./serve-MGOPELHF.js");
3457
3457
  await startStdio(program2.opts().envFile);
3458
3458
  });
3459
3459
  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) => {
@@ -3466,10 +3466,10 @@ program2.command("serve").description("Start the MCP server").option("--http", "
3466
3466
  );
3467
3467
  process.exit(ExitCode.INVALID_ARGS);
3468
3468
  }
3469
- const { startHttp } = await import("./serve-BYC3LRLN.js");
3469
+ const { startHttp } = await import("./serve-MGOPELHF.js");
3470
3470
  await startHttp(port, program2.opts().envFile);
3471
3471
  } else {
3472
- const { startStdio } = await import("./serve-BYC3LRLN.js");
3472
+ const { startStdio } = await import("./serve-MGOPELHF.js");
3473
3473
  await startStdio(program2.opts().envFile);
3474
3474
  }
3475
3475
  });
@@ -3734,7 +3734,7 @@ program2.command("feedback <message>").description(
3734
3734
  await runFeedback(message, { tool: opts.tool, receipt: opts.receipt });
3735
3735
  });
3736
3736
  program2.command("doctor").description("Diagnose environment and server connectivity").option("--probe", "Run live API probes (slower)").action(async (opts) => {
3737
- const { runDoctor } = await import("./doctor-KPYW2U7D.js");
3737
+ const { runDoctor } = await import("./doctor-KCSYB4QG.js");
3738
3738
  await runDoctor(opts);
3739
3739
  });
3740
3740
  program2.command("upgrade").description("Update Hive to the latest published version").action(async () => {
@@ -3782,7 +3782,7 @@ program2.command("usage").description("Show your API usage and plan limits").act
3782
3782
  await runUsage();
3783
3783
  });
3784
3784
  program2.command("status").description("Quick health and version check").action(async () => {
3785
- const { runStatus } = await import("./doctor-KPYW2U7D.js");
3785
+ const { runStatus } = await import("./doctor-KCSYB4QG.js");
3786
3786
  await runStatus();
3787
3787
  });
3788
3788
  program2.command("open [target]").description("Open Hive dashboard, docs, status, or GitHub in browser").action(async (target) => {
@@ -240,7 +240,7 @@ ${fails === 0 ? "All checks passed" : `${fails} issues found`}${warns ? ` (${war
240
240
  if (fails > 0) process.exit(1);
241
241
  }
242
242
  async function runStatus() {
243
- const { SERVER_VERSION } = await import("./mcpServer-SUDGFNIF.js");
243
+ const { SERVER_VERSION } = await import("./mcpServer-2OCMJW2T.js");
244
244
  const { resolveApiKey, resolveApiUrl } = await import("./config-dir-2QLA5PXD.js");
245
245
  const { getActiveProfile, maskKey } = await import("./auth-6XVL5CE3.js");
246
246
  const apiUrl = resolveApiUrl();
@@ -9,7 +9,7 @@ import {
9
9
  getToolsForScope,
10
10
  memoizedJsonSchemaToZodInputSchema,
11
11
  memoizedJsonSchemaToZodOutputSchema
12
- } from "./chunk-LP7PDQCO.js";
12
+ } from "./chunk-WDF56OFL.js";
13
13
  import "./chunk-4QDGA6GP.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-ZBMMJ6LE.js";
5
+ } from "./chunk-QKVI3YHQ.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-LP7PDQCO.js";
18
+ } from "./chunk-WDF56OFL.js";
19
19
  import "./chunk-4QDGA6GP.js";
20
20
  import "./chunk-EPF36Q3Z.js";
21
21
  import "./chunk-ZXKFJQDE.js";
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "package": "hive-intelligence",
3
- "version": "1.7.2",
4
- "buildSha": "773fca30dab62a5867c2e5f5b8f2682644c6d83c",
5
- "imageDigest": "sha256:df5f30570b15c986a618bc56f8bd0445c8d4cc0a0f61b449bcbff882bf0710cf",
3
+ "version": "1.7.3",
4
+ "buildSha": "540c6eaec6539e8a8b09b3f0d9bff4efa592f4d5",
5
+ "imageDigest": "sha256:de6599072579cc25854052f2cb99393129d9363c36f6abf1454a39efdcee0bb0",
6
6
  "deployedUrl": "https://mcp.hiveintelligence.xyz",
7
- "manifest": "https://raw.githubusercontent.com/hive-intel/hive-sdk/v1.7.2/releases/v1.7.2.json"
7
+ "manifest": "https://raw.githubusercontent.com/hive-intel/hive-sdk/v1.7.3/releases/v1.7.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-SUDGFNIF.js");
10
+ const { createHiveMcpServer, SERVER_NAME, SERVER_VERSION } = await import("./mcpServer-2OCMJW2T.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-ZBMMJ6LE.js";
9
+ } from "./chunk-QKVI3YHQ.js";
10
10
  import {
11
11
  CategoryEndpoints,
12
12
  HERO_TOOL_NAMES,
@@ -102,7 +102,7 @@ import {
102
102
  validateEndpointArgs,
103
103
  verifyApiKey,
104
104
  waitForRedisAvailability
105
- } from "./chunk-LP7PDQCO.js";
105
+ } from "./chunk-WDF56OFL.js";
106
106
  import {
107
107
  HIVE_AGENT_SKILLS
108
108
  } from "./chunk-4QDGA6GP.js";
@@ -8549,7 +8549,7 @@ app.get("/api/openapi.json", (_req, res) => {
8549
8549
  res.json(generateOpenApiSpec());
8550
8550
  });
8551
8551
  var require2 = createNodeRequire(import.meta.url);
8552
- var swaggerUiAssetPath = require2("swagger-ui-dist").getAbsoluteFSPath();
8552
+ var swaggerUiAssetPath = require2("swagger-ui-dist/absolute-path.js")();
8553
8553
  app.use(
8554
8554
  "/docs/assets",
8555
8555
  express2.static(swaggerUiAssetPath, {
package/build/stdio.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  createHiveMcpServer,
8
8
  secureLogger
9
- } from "./chunk-LP7PDQCO.js";
9
+ } from "./chunk-WDF56OFL.js";
10
10
  import "./chunk-4QDGA6GP.js";
11
11
  import "./chunk-EPF36Q3Z.js";
12
12
  import {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hive-intelligence",
3
- "version": "1.7.2",
3
+ "version": "1.7.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",
@@ -157,7 +157,7 @@
157
157
  },
158
158
  "overrides": {
159
159
  "github-actionlint": {
160
- "adm-zip": "0.6.0"
160
+ "adm-zip": "0.6.1"
161
161
  },
162
162
  "@modelcontextprotocol/sdk": {
163
163
  "express-rate-limit": "8.5.2"