hive-intelligence 1.13.0 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,7 @@ import {
7
7
  getSupabaseAdmin,
8
8
  resolveEndpoint,
9
9
  secureLogger
10
- } from "./chunk-ZRAW5MXW.js";
10
+ } from "./chunk-C4BFUIEB.js";
11
11
 
12
12
  // src/services/wallet-service.ts
13
13
  async function consumeCredits(args) {
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-47QIM7OD.js");
3456
+ const { startStdio } = await import("./serve-46DQ37YQ.js");
3457
3457
  await startStdio(program2.opts().envFile);
3458
3458
  });
3459
3459
  program2.command("serve").description(
@@ -3471,10 +3471,10 @@ program2.command("serve").description(
3471
3471
  );
3472
3472
  process.exit(ExitCode.INVALID_ARGS);
3473
3473
  }
3474
- const { startHttp } = await import("./serve-47QIM7OD.js");
3474
+ const { startHttp } = await import("./serve-46DQ37YQ.js");
3475
3475
  await startHttp(port, program2.opts().envFile);
3476
3476
  } else {
3477
- const { startStdio } = await import("./serve-47QIM7OD.js");
3477
+ const { startStdio } = await import("./serve-46DQ37YQ.js");
3478
3478
  await startStdio(program2.opts().envFile, { local: opts.local });
3479
3479
  }
3480
3480
  });
@@ -3742,7 +3742,7 @@ program2.command("doctor").description("Diagnose environment and server connecti
3742
3742
  "--fix",
3743
3743
  "Rewrite stale Hive entries in MCP client configs (backs each file up first)"
3744
3744
  ).action(async (opts) => {
3745
- const { runDoctor } = await import("./doctor-DUXJWV3F.js");
3745
+ const { runDoctor } = await import("./doctor-FPB5TEBU.js");
3746
3746
  await runDoctor(opts);
3747
3747
  });
3748
3748
  program2.command("upgrade").description("Update Hive to the latest published version").action(async () => {
@@ -3790,7 +3790,7 @@ program2.command("usage").description("Show your API usage and plan limits").act
3790
3790
  await runUsage();
3791
3791
  });
3792
3792
  program2.command("status").description("Quick health and version check").action(async () => {
3793
- const { runStatus } = await import("./doctor-DUXJWV3F.js");
3793
+ const { runStatus } = await import("./doctor-FPB5TEBU.js");
3794
3794
  await runStatus();
3795
3795
  });
3796
3796
  program2.command("open [target]").description("Open Hive dashboard, docs, status, or GitHub in browser").action(async (target) => {
@@ -296,7 +296,7 @@ ${fails === 0 ? "All checks passed" : `${fails} issues found`}${warns ? ` (${war
296
296
  if (fails > 0) process.exit(1);
297
297
  }
298
298
  async function runStatus() {
299
- const { SERVER_VERSION } = await import("./mcpServer-NWKQ4LCN.js");
299
+ const { SERVER_VERSION } = await import("./mcpServer-RGUKLIP2.js");
300
300
  const { resolveApiKey, resolveApiUrl } = await import("./config-dir-2QLA5PXD.js");
301
301
  const { getActiveProfile, maskKey } = await import("./auth-6XVL5CE3.js");
302
302
  const apiUrl = resolveApiUrl();
@@ -9,7 +9,7 @@ import {
9
9
  getToolsForScope,
10
10
  memoizedJsonSchemaToZodInputSchema,
11
11
  memoizedJsonSchemaToZodOutputSchema
12
- } from "./chunk-ZRAW5MXW.js";
12
+ } from "./chunk-C4BFUIEB.js";
13
13
  import "./chunk-QYK3EWTE.js";
14
14
  import "./chunk-EPF36Q3Z.js";
15
15
  import {
@@ -4,7 +4,7 @@ import {
4
4
  executeToolByName,
5
5
  refundCredits,
6
6
  refundSettled
7
- } from "./chunk-V7TBL47R.js";
7
+ } from "./chunk-SMVHHINA.js";
8
8
  import {
9
9
  HyperliquidAPI,
10
10
  MIN_MONITOR_CADENCE_MS,
@@ -17,7 +17,7 @@ import {
17
17
  monitorCadenceIntervalMs,
18
18
  runScheduledHealthCanaries,
19
19
  secureLogger
20
- } from "./chunk-ZRAW5MXW.js";
20
+ } from "./chunk-C4BFUIEB.js";
21
21
  import "./chunk-QYK3EWTE.js";
22
22
  import "./chunk-EPF36Q3Z.js";
23
23
  import "./chunk-ZXKFJQDE.js";
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "package": "hive-intelligence",
3
- "version": "1.13.0",
4
- "buildSha": "97bb981841e65ba3c48c31bf14ae02fdecd7b502",
5
- "imageDigest": "sha256:17ebc81537ba98c83bb68acbf974e0a4d2c96990cbf70a7632a4fd9d78f5b657",
3
+ "version": "1.14.0",
4
+ "buildSha": "f1bbc52b5c28fce13118ca3fa4ad492c09b8b900",
5
+ "imageDigest": "sha256:b58f4ab6b9c0b3b8bc9c7bc049ba0f2c7943ad22f6e13f127aaaee4d588fbfc6",
6
6
  "deployedUrl": "https://mcp.hiveintelligence.xyz",
7
- "manifest": "https://raw.githubusercontent.com/hive-intel/hive-sdk/v1.13.0/releases/v1.13.0.json"
7
+ "manifest": "https://raw.githubusercontent.com/hive-intel/hive-sdk/v1.14.0/releases/v1.14.0.json"
8
8
  }
@@ -49,7 +49,7 @@ async function startStdio(envFile, opts = {}) {
49
49
  console.log = (...args) => console.error("[LOG]", ...args);
50
50
  if (resolveStdioMode(opts) === "proxy") return startStdioProxy();
51
51
  const { StdioServerTransport } = await import("@modelcontextprotocol/sdk/server/stdio.js");
52
- const { createHiveMcpServer, SERVER_NAME, SERVER_VERSION } = await import("./mcpServer-NWKQ4LCN.js");
52
+ const { createHiveMcpServer, SERVER_NAME, SERVER_VERSION } = await import("./mcpServer-RGUKLIP2.js");
53
53
  const { getPendingUpdateVersion } = await import("./update-check-36QU6PKA.js");
54
54
  const transport = new StdioServerTransport();
55
55
  const pendingUpdate = getPendingUpdateVersion();
@@ -98,7 +98,7 @@ async function startStdioProxy() {
98
98
  notice: () => updateNotice(getPendingUpdateVersion(), SERVER_VERSION)
99
99
  });
100
100
  if (Object.keys(process.env).some(
101
- (k) => /^(COINGECKO|ALCHEMY|GOPLUS|HELIUS|TENDERLY)_/.test(k)
101
+ (k) => /^(COINGECKO|ALCHEMY|GOPLUS|HELIUS|TENDERLY|GOLDSKY)_/.test(k)
102
102
  )) {
103
103
  console.error(
104
104
  "Hive: provider keys found in env but ignored; hosted Hive serves every provider. Set HIVE_STDIO_MODE=local to run providers with your own keys."
package/build/server.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  getWalletStatus,
9
9
  refundCredits,
10
10
  refundSettled
11
- } from "./chunk-V7TBL47R.js";
11
+ } from "./chunk-SMVHHINA.js";
12
12
  import {
13
13
  CategoryEndpoints,
14
14
  HERO_TOOL_NAMES,
@@ -105,7 +105,7 @@ import {
105
105
  validateEndpointArgs,
106
106
  verifyApiKey,
107
107
  waitForRedisAvailability
108
- } from "./chunk-ZRAW5MXW.js";
108
+ } from "./chunk-C4BFUIEB.js";
109
109
  import {
110
110
  HIVE_AGENT_SKILLS
111
111
  } from "./chunk-QYK3EWTE.js";
@@ -3903,16 +3903,22 @@ function priceForPlanCycle(planId, cycle) {
3903
3903
  function canUpgradeTo(current, target) {
3904
3904
  const currentIndex = PLAN_TIER_ORDER.indexOf(current ?? "demo");
3905
3905
  const targetIndex = PLAN_TIER_ORDER.indexOf(target);
3906
- if (targetIndex < 0) return false;
3907
- return targetIndex > (currentIndex < 0 ? 0 : currentIndex);
3906
+ if (currentIndex < 0 || targetIndex < 0) return false;
3907
+ return targetIndex > currentIndex;
3908
3908
  }
3909
3909
  var RENEWAL_WINDOW_DAYS = 30;
3910
- function canPurchasePlan(current, target, termEnd, now = /* @__PURE__ */ new Date()) {
3910
+ var MAX_MONTHLY_TERM_DAYS = 32;
3911
+ function canPurchasePlan(current, target, termStart, termEnd, now = /* @__PURE__ */ new Date()) {
3911
3912
  if (canUpgradeTo(current, target)) return true;
3912
3913
  if (current !== target) return false;
3913
- if (!termEnd) return false;
3914
+ if (!termStart || !termEnd) return false;
3915
+ const start = termStart instanceof Date ? termStart : new Date(termStart);
3914
3916
  const end = termEnd instanceof Date ? termEnd : new Date(termEnd);
3915
- if (Number.isNaN(end.getTime())) return false;
3917
+ if (Number.isNaN(start.getTime()) || Number.isNaN(end.getTime())) {
3918
+ return false;
3919
+ }
3920
+ const termMs = end.getTime() - start.getTime();
3921
+ if (termMs <= MAX_MONTHLY_TERM_DAYS * 24 * 60 * 60 * 1e3) return false;
3916
3922
  const windowOpens = new Date(
3917
3923
  end.getTime() - RENEWAL_WINDOW_DAYS * 24 * 60 * 60 * 1e3
3918
3924
  );
@@ -4698,10 +4704,11 @@ billingRouter.post(
4698
4704
  }
4699
4705
  const { data: profile } = await getSupabaseAdmin().from("user_profiles").select("plan_id, billing_subscription_id, billing_status").eq("id", userId).maybeSingle();
4700
4706
  const hasOccupyingSubscription = Boolean(profile?.billing_subscription_id) && typeof profile?.billing_status === "string" && OCCUPYING_BILLING_STATUSES.has(profile.billing_status);
4701
- const { data: liveSubscription } = await getSupabaseAdmin().from("stripe_subscriptions").select("current_period_end").eq("user_id", userId).in("status", [...OCCUPYING_BILLING_STATUSES]).order("current_period_end", { ascending: false }).limit(1).maybeSingle();
4707
+ const { data: liveSubscription } = await getSupabaseAdmin().from("stripe_subscriptions").select("current_period_start, current_period_end").eq("user_id", userId).in("status", [...OCCUPYING_BILLING_STATUSES]).order("current_period_end", { ascending: false }).limit(1).maybeSingle();
4702
4708
  if (!canPurchasePlan(
4703
4709
  profile?.plan_id ?? null,
4704
4710
  planId,
4711
+ liveSubscription?.current_period_start ?? null,
4705
4712
  liveSubscription?.current_period_end ?? null
4706
4713
  )) {
4707
4714
  const sameTier = profile?.plan_id === planId;
@@ -4709,7 +4716,7 @@ billingRouter.post(
4709
4716
  apiError(
4710
4717
  "invalid_request_error",
4711
4718
  hasOccupyingSubscription ? "SUBSCRIPTION_EXISTS" : "PLAN_NOT_AN_UPGRADE",
4712
- sameTier ? `This account is already on ${planId} and the current term still has more than ${RENEWAL_WINDOW_DAYS} days left, so renewing now would replace time you have already paid for. Next action: renew inside the last ${RENEWAL_WINDOW_DAYS} days, pick a higher tier to upgrade immediately, or message us at https://t.me/HiveIntelligence.` : `This account is already on ${profile?.plan_id ?? "a paid plan"}. Next action: pick a higher tier to upgrade now, or message us at https://t.me/HiveIntelligence to change or cancel the current plan.`
4719
+ sameTier ? `This account is already on ${planId}, and buying it again now would charge twice for time already paid for: a monthly plan renews on its own, and an annual plan can be renewed in the last ${RENEWAL_WINDOW_DAYS} days of its term. Next action: pick a higher tier to upgrade immediately, or message us at https://t.me/HiveIntelligence.` : `This account is already on ${profile?.plan_id ?? "a paid plan"}. Next action: pick a higher tier to upgrade now, or message us at https://t.me/HiveIntelligence to change or cancel the current plan.`
4713
4720
  )
4714
4721
  );
4715
4722
  }
@@ -8767,7 +8774,9 @@ async function setupServer() {
8767
8774
  "GOPLUS_APP_SECRET",
8768
8775
  "ALCHEMY_API_KEY",
8769
8776
  "TENDERLY_API_KEY",
8770
- "HELIUS_API_KEY"
8777
+ "HELIUS_API_KEY",
8778
+ "GOLDSKY_EDGE_API_KEY",
8779
+ "GOLDSKY_DATA_API_KEY"
8771
8780
  ];
8772
8781
  const configured = [];
8773
8782
  const degraded = [];
package/build/stdio.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  createHiveMcpServer,
8
8
  secureLogger
9
- } from "./chunk-ZRAW5MXW.js";
9
+ } from "./chunk-C4BFUIEB.js";
10
10
  import "./chunk-QYK3EWTE.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.13.0",
3
+ "version": "1.14.0",
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",
@@ -152,19 +152,19 @@
152
152
  "swagger-ui-dist": "5.32.8",
153
153
  "tsx": "4.23.0",
154
154
  "winston": "3.19.0",
155
- "zod": "^4.5.4"
155
+ "zod": "^4.6.7"
156
156
  },
157
157
  "overrides": {
158
158
  "github-actionlint": {
159
159
  "adm-zip": "0.6.1"
160
160
  },
161
161
  "esbuild": "0.28.1",
162
- "fast-uri": "3.1.8",
162
+ "fast-uri": "3.1.9",
163
163
  "hono": "4.13.13",
164
- "ip-address": "10.7.3",
164
+ "ip-address": "10.7.4",
165
165
  "qs": "6.16.0",
166
166
  "proxy-addr": "2.0.8",
167
- "undici": "7.29.1",
167
+ "undici": "7.30.1",
168
168
  "source-map-js": "1.2.2"
169
169
  },
170
170
  "devDependencies": {