hive-intelligence 1.14.0 → 1.16.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.
Files changed (31) hide show
  1. package/README.md +4 -3
  2. package/agent-skills/packs/hive/SKILL.md +2 -2
  3. package/agent-skills/packs/hive-prediction-markets/SKILL.md +9 -8
  4. package/build/{api-client-POBN6Y5S.js → api-client-MK3CVNCH.js} +2 -2
  5. package/build/{auth-6XVL5CE3.js → auth-TZQC54EJ.js} +1 -1
  6. package/build/{call-args-BUB6YNHW.js → call-args-4YRVKOLV.js} +2 -2
  7. package/build/{chunk-ZSPPJW4G.js → chunk-4U4IL5KA.js} +15 -1
  8. package/build/{chunk-KQVPKTEO.js → chunk-AVTIJGWS.js} +2 -2
  9. package/build/{chunk-SMVHHINA.js → chunk-B53GNIWW.js} +1 -1
  10. package/build/chunk-MYSS5SBE.js +71 -0
  11. package/build/{chunk-YLHNUAFT.js → chunk-O5YKCM67.js} +22 -6
  12. package/build/{chunk-APBLB62S.js → chunk-PODCJTBV.js} +1 -1
  13. package/build/{chunk-C4BFUIEB.js → chunk-QSKFAT7Z.js} +2141 -915
  14. package/build/{chunk-RNVZIPNY.js → chunk-VO6NWVJD.js} +1 -1
  15. package/build/{chunk-AZFOTKS2.js → chunk-WZ2NMSV3.js} +1 -1
  16. package/build/cli.js +31 -29
  17. package/build/{doctor-FPB5TEBU.js → doctor-UKOGXRSW.js} +4 -4
  18. package/build/{errors-YQAVCXXO.js → errors-BPXK3KCR.js} +1 -1
  19. package/build/{feedback-G2DFCCI6.js → feedback-6XX2R75U.js} +2 -2
  20. package/build/{init-all-UDWHV2ER.js → init-all-XDQRGJ3D.js} +1 -1
  21. package/build/{mcpServer-RGUKLIP2.js → mcpServer-77FPS534.js} +2 -1
  22. package/build/monitor-worker.js +4 -154
  23. package/build/release.json +4 -4
  24. package/build/{routing-4VKAVRYR.js → routing-S7DPEROC.js} +2 -2
  25. package/build/{serve-46DQ37YQ.js → serve-2NIEUCJN.js} +6 -4
  26. package/build/server.js +116 -105
  27. package/build/stdio.js +2 -1
  28. package/build/{tools-K2P77L4T.js → tools-NSHQSUIK.js} +5 -5
  29. package/build/{uninstall-I6ERJ2ED.js → uninstall-CECLA5YZ.js} +2 -2
  30. package/build/{watch-BUSEPVDM.js → watch-4VHBLAL6.js} +3 -3
  31. package/package.json +5 -15
@@ -1,7 +1,7 @@
1
1
  import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
2
2
  import {
3
3
  NEVER_RETRY_ERROR_CODES
4
- } from "./chunk-ZSPPJW4G.js";
4
+ } from "./chunk-4U4IL5KA.js";
5
5
  import {
6
6
  SERVER_VERSION
7
7
  } from "./chunk-ZXKFJQDE.js";
@@ -1,7 +1,7 @@
1
1
  import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
2
2
  import {
3
3
  CliError
4
- } from "./chunk-ZSPPJW4G.js";
4
+ } from "./chunk-4U4IL5KA.js";
5
5
 
6
6
  // src/cli/call-args.ts
7
7
  var BOOLEAN_LITERALS = /* @__PURE__ */ new Set(["true", "false", "1", "0", "yes", "no"]);
package/build/cli.js CHANGED
@@ -2,25 +2,28 @@
2
2
  import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
3
3
  import {
4
4
  executeTool
5
- } from "./chunk-YLHNUAFT.js";
5
+ } from "./chunk-O5YKCM67.js";
6
6
  import "./chunk-XN3T6YOG.js";
7
7
  import {
8
8
  NAMESPACE
9
9
  } from "./chunk-CBFOVPLB.js";
10
- import "./chunk-RNVZIPNY.js";
10
+ import "./chunk-VO6NWVJD.js";
11
11
  import "./chunk-RU6QOFHH.js";
12
12
  import {
13
13
  ALWAYS_RESERVED_OPTIONS,
14
14
  parseFlagTokens,
15
15
  reservedOptionNames
16
- } from "./chunk-AZFOTKS2.js";
16
+ } from "./chunk-WZ2NMSV3.js";
17
17
  import {
18
18
  ExitCode
19
- } from "./chunk-ZSPPJW4G.js";
19
+ } from "./chunk-4U4IL5KA.js";
20
20
  import {
21
21
  checkForUpdates
22
22
  } from "./chunk-M6REON2I.js";
23
23
  import "./chunk-EPF36Q3Z.js";
24
+ import {
25
+ loadEnvFile
26
+ } from "./chunk-MYSS5SBE.js";
24
27
  import {
25
28
  SERVER_VERSION
26
29
  } from "./chunk-ZXKFJQDE.js";
@@ -3402,7 +3405,6 @@ function useColor() {
3402
3405
  var program = new Command();
3403
3406
 
3404
3407
  // src/cli.ts
3405
- import dotenv from "dotenv";
3406
3408
  process.on("unhandledRejection", (err) => {
3407
3409
  const msg = err instanceof Error ? process.env.DEBUG ? err.stack : err.message : String(err);
3408
3410
  process.stderr.write(`Fatal: ${msg}
@@ -3436,7 +3438,7 @@ var RESERVED_LONG_FLAGS = [
3436
3438
  var RESERVED_OPTION_NAMES = reservedOptionNames(RESERVED_LONG_FLAGS);
3437
3439
  program2.hook("preAction", (thisCommand) => {
3438
3440
  const opts = thisCommand.opts();
3439
- dotenv.config({ path: opts.envFile, quiet: true });
3441
+ loadEnvFile(opts.envFile);
3440
3442
  setOutputOptions({
3441
3443
  json: opts.json,
3442
3444
  pretty: opts.pretty,
@@ -3453,7 +3455,7 @@ program2.hook("preAction", (thisCommand) => {
3453
3455
  setCliFlags({ apiKey: opts.apiKey, noRetry: opts.retry === false });
3454
3456
  });
3455
3457
  program2.action(async () => {
3456
- const { startStdio } = await import("./serve-46DQ37YQ.js");
3458
+ const { startStdio } = await import("./serve-2NIEUCJN.js");
3457
3459
  await startStdio(program2.opts().envFile);
3458
3460
  });
3459
3461
  program2.command("serve").description(
@@ -3471,10 +3473,10 @@ program2.command("serve").description(
3471
3473
  );
3472
3474
  process.exit(ExitCode.INVALID_ARGS);
3473
3475
  }
3474
- const { startHttp } = await import("./serve-46DQ37YQ.js");
3476
+ const { startHttp } = await import("./serve-2NIEUCJN.js");
3475
3477
  await startHttp(port, program2.opts().envFile);
3476
3478
  } else {
3477
- const { startStdio } = await import("./serve-46DQ37YQ.js");
3479
+ const { startStdio } = await import("./serve-2NIEUCJN.js");
3478
3480
  await startStdio(program2.opts().envFile, { local: opts.local });
3479
3481
  }
3480
3482
  });
@@ -3561,15 +3563,15 @@ for (const domain of NAMESPACE) {
3561
3563
  }
3562
3564
  var toolsCmd = program2.command("tools").description("Discover and execute tools");
3563
3565
  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) => {
3564
- const { listTools } = await import("./tools-K2P77L4T.js");
3566
+ const { listTools } = await import("./tools-NSHQSUIK.js");
3565
3567
  await listTools(opts);
3566
3568
  });
3567
3569
  toolsCmd.command("search <query>").description("Search tools by name or description").action(async (query) => {
3568
- const { searchTools } = await import("./tools-K2P77L4T.js");
3570
+ const { searchTools } = await import("./tools-NSHQSUIK.js");
3569
3571
  await searchTools(query);
3570
3572
  });
3571
3573
  toolsCmd.command("info <name>").description("Show a tool's parameters, response schema, and description").action(async (name) => {
3572
- const { toolInfo } = await import("./tools-K2P77L4T.js");
3574
+ const { toolInfo } = await import("./tools-NSHQSUIK.js");
3573
3575
  await toolInfo(name, RESERVED_OPTION_NAMES);
3574
3576
  });
3575
3577
  toolsCmd.command("call <name>").description("Execute a tool by name").option("--args <json>", "Tool arguments as JSON (or pipe JSON via stdin)").allowUnknownOption(true).allowExcessArguments(true).addHelpText(
@@ -3591,8 +3593,8 @@ Examples:
3591
3593
  $ hive tools call get_price --args '{"ids":"bitcoin","vs_currencies":"usd"}'
3592
3594
  $ echo '{"ids":"bitcoin"}' | hive tools call get_price`
3593
3595
  ).action(async (_name, opts, cmd) => {
3594
- const { planToolCall } = await import("./call-args-BUB6YNHW.js");
3595
- const { CliError } = await import("./errors-YQAVCXXO.js");
3596
+ const { planToolCall } = await import("./call-args-4YRVKOLV.js");
3597
+ const { CliError } = await import("./errors-BPXK3KCR.js");
3596
3598
  const { outputError } = await import("./output-BBHBJI32.js");
3597
3599
  const tokens = cmd.args;
3598
3600
  let stdinJson;
@@ -3609,7 +3611,7 @@ Examples:
3609
3611
  stdinJson,
3610
3612
  reservedNames: RESERVED_OPTION_NAMES,
3611
3613
  lookupSchema: async (toolName) => {
3612
- const { loadToolCatalog } = await import("./tools-K2P77L4T.js");
3614
+ const { loadToolCatalog } = await import("./tools-NSHQSUIK.js");
3613
3615
  const catalog = await loadToolCatalog();
3614
3616
  return catalog.find((t) => t.name === toolName)?.inputSchema;
3615
3617
  }
@@ -3627,7 +3629,7 @@ Examples:
3627
3629
  await executeTool(plan.toolName, plan.args, timeout);
3628
3630
  });
3629
3631
  toolsCmd.command("refresh").description("Force-refresh the tool catalog cache").action(async () => {
3630
- const { refreshTools } = await import("./tools-K2P77L4T.js");
3632
+ const { refreshTools } = await import("./tools-NSHQSUIK.js");
3631
3633
  await refreshTools();
3632
3634
  });
3633
3635
  var configCmd = program2.command("config").description("Generate configuration for MCP clients");
@@ -3686,7 +3688,7 @@ program2.command("init").description(
3686
3688
  await runSetup();
3687
3689
  return;
3688
3690
  }
3689
- const { runInitAll } = await import("./init-all-UDWHV2ER.js");
3691
+ const { runInitAll } = await import("./init-all-XDQRGJ3D.js");
3690
3692
  const exitCode = await runInitAll({
3691
3693
  all: Boolean(opts.all),
3692
3694
  browser: Boolean(opts.browser),
@@ -3704,7 +3706,7 @@ program2.command("uninstall").description(
3704
3706
  "--all",
3705
3707
  "Clean every known client (default; explicit flag for symmetry with `init --all`)"
3706
3708
  ).option("--dry-run", "Preview removals without changing anything").action(async (opts) => {
3707
- const { runUninstall } = await import("./uninstall-I6ERJ2ED.js");
3709
+ const { runUninstall } = await import("./uninstall-CECLA5YZ.js");
3708
3710
  const exitCode = await runUninstall({
3709
3711
  all: opts.all !== false,
3710
3712
  dryRun: Boolean(opts.dryRun),
@@ -3719,7 +3721,7 @@ for (const action of ["install", "decline", "remove"]) {
3719
3721
  routingCmd.command(action).description(
3720
3722
  action === "install" ? "Append the Hive routing block (AGENTS.md preferred over CLAUDE.md)" : action === "decline" ? "Record that this project does not want the routing block" : "Remove the routing block and restore the file's original bytes"
3721
3723
  ).option("--file <name>", "Target file: AGENTS.md or CLAUDE.md").option("--dry-run", "Print the resulting file; write nothing").option("--create", "Create the target file when it does not exist").action(async (opts) => {
3722
- const { runRouting } = await import("./routing-4VKAVRYR.js");
3724
+ const { runRouting } = await import("./routing-S7DPEROC.js");
3723
3725
  const exitCode = await runRouting(action, {
3724
3726
  file: opts.file,
3725
3727
  dryRun: Boolean(opts.dryRun),
@@ -3735,14 +3737,14 @@ program2.command("feedback <message>").description(
3735
3737
  "--receipt <id>",
3736
3738
  "Receipt ID (defaults to the last successful call's receipt)"
3737
3739
  ).action(async (message, opts) => {
3738
- const { runFeedback } = await import("./feedback-G2DFCCI6.js");
3740
+ const { runFeedback } = await import("./feedback-6XX2R75U.js");
3739
3741
  await runFeedback(message, { tool: opts.tool, receipt: opts.receipt });
3740
3742
  });
3741
3743
  program2.command("doctor").description("Diagnose environment and server connectivity").option("--probe", "Run live API probes (slower)").option(
3742
3744
  "--fix",
3743
3745
  "Rewrite stale Hive entries in MCP client configs (backs each file up first)"
3744
3746
  ).action(async (opts) => {
3745
- const { runDoctor } = await import("./doctor-FPB5TEBU.js");
3747
+ const { runDoctor } = await import("./doctor-UKOGXRSW.js");
3746
3748
  await runDoctor(opts);
3747
3749
  });
3748
3750
  program2.command("upgrade").description("Update Hive to the latest published version").action(async () => {
@@ -3766,31 +3768,31 @@ program2.command("keys").description("Retired \u2014 manage API keys in the dash
3766
3768
  });
3767
3769
  var authCmd = program2.command("auth").description("Manage authentication profiles");
3768
3770
  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) => {
3769
- const { runLogin } = await import("./auth-6XVL5CE3.js");
3771
+ const { runLogin } = await import("./auth-TZQC54EJ.js");
3770
3772
  await runLogin(opts);
3771
3773
  });
3772
3774
  authCmd.command("logout").description("Remove stored credentials").action(async () => {
3773
- const { runLogout } = await import("./auth-6XVL5CE3.js");
3775
+ const { runLogout } = await import("./auth-TZQC54EJ.js");
3774
3776
  await runLogout();
3775
3777
  });
3776
3778
  authCmd.command("whoami").description("Show current profile").action(async () => {
3777
- const { runWhoami } = await import("./auth-6XVL5CE3.js");
3779
+ const { runWhoami } = await import("./auth-TZQC54EJ.js");
3778
3780
  await runWhoami();
3779
3781
  });
3780
3782
  authCmd.command("profiles").description("List all profiles").action(async () => {
3781
- const { runProfiles } = await import("./auth-6XVL5CE3.js");
3783
+ const { runProfiles } = await import("./auth-TZQC54EJ.js");
3782
3784
  await runProfiles();
3783
3785
  });
3784
3786
  authCmd.command("switch <name>").description("Switch active profile").action(async (name) => {
3785
- const { runSwitch } = await import("./auth-6XVL5CE3.js");
3787
+ const { runSwitch } = await import("./auth-TZQC54EJ.js");
3786
3788
  await runSwitch(name);
3787
3789
  });
3788
3790
  program2.command("usage").description("Show your API usage and plan limits").action(async () => {
3789
- const { runUsage } = await import("./auth-6XVL5CE3.js");
3791
+ const { runUsage } = await import("./auth-TZQC54EJ.js");
3790
3792
  await runUsage();
3791
3793
  });
3792
3794
  program2.command("status").description("Quick health and version check").action(async () => {
3793
- const { runStatus } = await import("./doctor-FPB5TEBU.js");
3795
+ const { runStatus } = await import("./doctor-UKOGXRSW.js");
3794
3796
  await runStatus();
3795
3797
  });
3796
3798
  program2.command("open [target]").description("Open Hive dashboard, docs, status, or GitHub in browser").action(async (target) => {
@@ -3821,7 +3823,7 @@ program2.command("watch <domain> <command>").description("Poll a tool on interva
3821
3823
  }
3822
3824
  const interval = parseInt(opts.interval, 10);
3823
3825
  const timeout = parseInt(program2.opts().timeout, 10);
3824
- const { runWatch } = await import("./watch-BUSEPVDM.js");
3826
+ const { runWatch } = await import("./watch-4VHBLAL6.js");
3825
3827
  await runWatch(cmdDef.tool, args, interval, timeout);
3826
3828
  });
3827
3829
  var aliasCmd = program2.command("alias").description("Manage command aliases");
@@ -2,8 +2,8 @@ import { createRequire } from 'node:module'; const require = createRequire(impor
2
2
  import {
3
3
  fetchToolCatalog,
4
4
  getAnonQuota
5
- } from "./chunk-RNVZIPNY.js";
6
- import "./chunk-ZSPPJW4G.js";
5
+ } from "./chunk-VO6NWVJD.js";
6
+ import "./chunk-4U4IL5KA.js";
7
7
  import "./chunk-ZXKFJQDE.js";
8
8
  import {
9
9
  debug,
@@ -296,9 +296,9 @@ ${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-RGUKLIP2.js");
299
+ const { SERVER_VERSION } = await import("./mcpServer-77FPS534.js");
300
300
  const { resolveApiKey, resolveApiUrl } = await import("./config-dir-2QLA5PXD.js");
301
- const { getActiveProfile, maskKey } = await import("./auth-6XVL5CE3.js");
301
+ const { getActiveProfile, maskKey } = await import("./auth-TZQC54EJ.js");
302
302
  const apiUrl = resolveApiUrl();
303
303
  const apiKey = resolveApiKey();
304
304
  const profile = getActiveProfile();
@@ -9,7 +9,7 @@ import {
9
9
  errorDocSlug,
10
10
  isCliErrorCode,
11
11
  suggestSimilarTools
12
- } from "./chunk-ZSPPJW4G.js";
12
+ } from "./chunk-4U4IL5KA.js";
13
13
  import "./chunk-OMO7XLC5.js";
14
14
  export {
15
15
  CliError,
@@ -4,11 +4,11 @@ import {
4
4
  } from "./chunk-XN3T6YOG.js";
5
5
  import {
6
6
  postFeedback
7
- } from "./chunk-RNVZIPNY.js";
7
+ } from "./chunk-VO6NWVJD.js";
8
8
  import {
9
9
  CliError,
10
10
  isCliErrorCode
11
- } from "./chunk-ZSPPJW4G.js";
11
+ } from "./chunk-4U4IL5KA.js";
12
12
  import {
13
13
  SERVER_VERSION
14
14
  } from "./chunk-ZXKFJQDE.js";
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunk-BDO27NIP.js";
12
12
  import {
13
13
  saveProfile
14
- } from "./chunk-KQVPKTEO.js";
14
+ } from "./chunk-AVTIJGWS.js";
15
15
  import {
16
16
  getClaudeDesktopInstructions,
17
17
  getCodexInstructions,
@@ -9,9 +9,10 @@ import {
9
9
  getToolsForScope,
10
10
  memoizedJsonSchemaToZodInputSchema,
11
11
  memoizedJsonSchemaToZodOutputSchema
12
- } from "./chunk-C4BFUIEB.js";
12
+ } from "./chunk-QSKFAT7Z.js";
13
13
  import "./chunk-QYK3EWTE.js";
14
14
  import "./chunk-EPF36Q3Z.js";
15
+ import "./chunk-MYSS5SBE.js";
15
16
  import {
16
17
  PUBLIC_MCP_REGISTRY_ID,
17
18
  SERVER_NAME,
@@ -4,22 +4,20 @@ import {
4
4
  executeToolByName,
5
5
  refundCredits,
6
6
  refundSettled
7
- } from "./chunk-SMVHHINA.js";
7
+ } from "./chunk-B53GNIWW.js";
8
8
  import {
9
- HyperliquidAPI,
10
9
  MIN_MONITOR_CADENCE_MS,
11
10
  closeRedisClient,
12
- collectRwaRows,
13
- getEnvVar,
14
11
  getSupabaseAdmin,
15
12
  isManualMonitorCadence,
16
13
  isSupabaseConfigured,
17
14
  monitorCadenceIntervalMs,
18
15
  runScheduledHealthCanaries,
19
16
  secureLogger
20
- } from "./chunk-C4BFUIEB.js";
17
+ } from "./chunk-QSKFAT7Z.js";
21
18
  import "./chunk-QYK3EWTE.js";
22
19
  import "./chunk-EPF36Q3Z.js";
20
+ import "./chunk-MYSS5SBE.js";
23
21
  import "./chunk-ZXKFJQDE.js";
24
22
  import "./chunk-OMO7XLC5.js";
25
23
 
@@ -1251,152 +1249,6 @@ async function runDueMonitors(options = {}) {
1251
1249
  };
1252
1250
  }
1253
1251
 
1254
- // src/services/rwa-snapshot.ts
1255
- var INSERT_CHUNK_SIZE = 500;
1256
- var SNAPSHOT_MIN_GAP_MS = 55 * 60 * 1e3;
1257
- function snapshotRowFor(row, capturedAt) {
1258
- return {
1259
- venue: row.venue,
1260
- symbol: row.symbol,
1261
- underlying: row.underlying,
1262
- asset_class: row.asset_class,
1263
- funding_rate: row.funding_rate,
1264
- annualized: row.funding_annualized,
1265
- mark_price: row.mark_price,
1266
- oi: row.open_interest_usd,
1267
- mechanism: row.funding_mechanism,
1268
- flags: {
1269
- market: row.market,
1270
- funding_interval_hours: row.funding_interval_hours,
1271
- borrow_apr_annual: row.borrow_apr_annual,
1272
- is_delisted: row.is_delisted,
1273
- is_price_suspect: row.is_price_suspect,
1274
- price_suspect_basis: row.price_suspect_basis,
1275
- price_deviation_pct: row.price_deviation_pct,
1276
- volume_24h_usd: row.volume_24h_usd
1277
- },
1278
- captured_at: capturedAt
1279
- };
1280
- }
1281
- async function persistRwaSnapshot() {
1282
- if (!isSupabaseConfigured()) {
1283
- return {
1284
- ok: true,
1285
- skipped: true,
1286
- reason: "supabase_not_configured",
1287
- capturedRows: 0,
1288
- venueResults: [],
1289
- writeErrors: [],
1290
- capturedAt: null
1291
- };
1292
- }
1293
- const { results, rows } = await collectRwaRows({
1294
- hyperliquidApi: new HyperliquidAPI()
1295
- });
1296
- if (rows.length === 0) {
1297
- return {
1298
- ok: false,
1299
- skipped: false,
1300
- reason: "no_rows_from_any_venue",
1301
- capturedRows: 0,
1302
- venueResults: results,
1303
- writeErrors: [],
1304
- capturedAt: null
1305
- };
1306
- }
1307
- const supabase = getSupabaseAdmin();
1308
- const capturedAt = (/* @__PURE__ */ new Date()).toISOString();
1309
- const payload = rows.map((row) => snapshotRowFor(row, capturedAt));
1310
- const writeErrors = [];
1311
- let insertedCount = 0;
1312
- for (let i = 0; i < payload.length; i += INSERT_CHUNK_SIZE) {
1313
- const chunk = payload.slice(i, i + INSERT_CHUNK_SIZE);
1314
- const { error } = await supabase.from("rwa_funding_snapshots").insert(chunk);
1315
- if (error) {
1316
- writeErrors.push(`insert chunk ${i}: ${error.message}`);
1317
- } else {
1318
- insertedCount += chunk.length;
1319
- }
1320
- }
1321
- const ok = writeErrors.length === 0;
1322
- if (!ok) {
1323
- secureLogger.warn("RWA snapshot write errors", {
1324
- errorCount: writeErrors.length
1325
- });
1326
- }
1327
- return {
1328
- ok,
1329
- skipped: false,
1330
- capturedRows: insertedCount,
1331
- venueResults: results,
1332
- writeErrors,
1333
- capturedAt
1334
- };
1335
- }
1336
- async function runScheduledRwaSnapshot() {
1337
- try {
1338
- if ((getEnvVar("HIVE_RWA_SNAPSHOT_ENABLED") ?? "true") === "false") {
1339
- return {
1340
- ok: true,
1341
- skipped: true,
1342
- reason: "disabled_by_env",
1343
- capturedRows: 0,
1344
- venueResults: [],
1345
- writeErrors: [],
1346
- capturedAt: null
1347
- };
1348
- }
1349
- if (!isSupabaseConfigured()) {
1350
- return {
1351
- ok: true,
1352
- skipped: true,
1353
- reason: "supabase_not_configured",
1354
- capturedRows: 0,
1355
- venueResults: [],
1356
- writeErrors: [],
1357
- capturedAt: null
1358
- };
1359
- }
1360
- const supabase = getSupabaseAdmin();
1361
- const { data, error } = await supabase.from("rwa_funding_snapshots").select("captured_at").order("captured_at", { ascending: false }).limit(1);
1362
- if (error) {
1363
- return {
1364
- ok: false,
1365
- skipped: false,
1366
- reason: `cadence check failed: ${error.message}`,
1367
- capturedRows: 0,
1368
- venueResults: [],
1369
- writeErrors: [error.message],
1370
- capturedAt: null
1371
- };
1372
- }
1373
- const latest = data?.[0]?.captured_at ? Date.parse(String(data[0].captured_at)) : null;
1374
- if (latest != null && Number.isFinite(latest) && Date.now() - latest < SNAPSHOT_MIN_GAP_MS) {
1375
- return {
1376
- ok: true,
1377
- skipped: true,
1378
- reason: "within_cadence_gap",
1379
- capturedRows: 0,
1380
- venueResults: [],
1381
- writeErrors: [],
1382
- capturedAt: null
1383
- };
1384
- }
1385
- return await persistRwaSnapshot();
1386
- } catch (error) {
1387
- const message = error instanceof Error ? error.message : String(error);
1388
- return {
1389
- ok: false,
1390
- skipped: false,
1391
- reason: message,
1392
- capturedRows: 0,
1393
- venueResults: [],
1394
- writeErrors: [message],
1395
- capturedAt: null
1396
- };
1397
- }
1398
- }
1399
-
1400
1252
  // src/monitor-worker.ts
1401
1253
  function intEnv(name, fallback) {
1402
1254
  const parsed = Number.parseInt(process.env[name] ?? "", 10);
@@ -1428,15 +1280,13 @@ async function runMonitorWorkerFromEnv() {
1428
1280
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
1429
1281
  })
1430
1282
  );
1431
- const rwaSnapshot = await runScheduledRwaSnapshot();
1432
1283
  console.log(
1433
1284
  JSON.stringify(
1434
1285
  {
1435
1286
  service: "hive-monitor-worker",
1436
1287
  worker_id: process.env.HIVE_MONITOR_WORKER_ID ?? null,
1437
1288
  ...result,
1438
- scheduled_health_canaries: scheduledHealthCanaries,
1439
- rwa_snapshot: rwaSnapshot
1289
+ scheduled_health_canaries: scheduledHealthCanaries
1440
1290
  },
1441
1291
  null,
1442
1292
  2
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "package": "hive-intelligence",
3
- "version": "1.14.0",
4
- "buildSha": "f1bbc52b5c28fce13118ca3fa4ad492c09b8b900",
5
- "imageDigest": "sha256:b58f4ab6b9c0b3b8bc9c7bc049ba0f2c7943ad22f6e13f127aaaee4d588fbfc6",
3
+ "version": "1.16.0",
4
+ "buildSha": "6cf20885105d635f706354b9f6c34c71d0facc31",
5
+ "imageDigest": "sha256:9f4b32362d64126dc162824428961163e1399a0081a62db327e0417ad805261a",
6
6
  "deployedUrl": "https://mcp.hiveintelligence.xyz",
7
- "manifest": "https://raw.githubusercontent.com/hive-intel/hive-sdk/v1.14.0/releases/v1.14.0.json"
7
+ "manifest": "https://raw.githubusercontent.com/hive-intel/hive-sdk/v1.16.0/releases/v1.16.0.json"
8
8
  }
@@ -17,8 +17,8 @@ import {
17
17
  renderRoutingBlock,
18
18
  runRouting,
19
19
  stripRoutingBlock
20
- } from "./chunk-APBLB62S.js";
21
- import "./chunk-ZSPPJW4G.js";
20
+ } from "./chunk-PODCJTBV.js";
21
+ import "./chunk-4U4IL5KA.js";
22
22
  import "./chunk-ZDXMZPC6.js";
23
23
  import "./chunk-6PC3HUAK.js";
24
24
  import "./chunk-OMO7XLC5.js";
@@ -1,8 +1,10 @@
1
1
  import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
2
+ import {
3
+ loadEnvFile
4
+ } from "./chunk-MYSS5SBE.js";
2
5
  import "./chunk-OMO7XLC5.js";
3
6
 
4
7
  // src/cli/serve.ts
5
- import dotenv from "dotenv";
6
8
  function resolveStdioMode(opts = {}, env = process.env) {
7
9
  return opts.local || env.HIVE_STDIO_MODE?.toLowerCase() === "local" ? "local" : "proxy";
8
10
  }
@@ -45,11 +47,11 @@ function bridgeTransports(local, remote, opts) {
45
47
  local.onclose = () => void remote.close();
46
48
  }
47
49
  async function startStdio(envFile, opts = {}) {
48
- dotenv.config({ path: envFile || ".env", quiet: true });
50
+ loadEnvFile(envFile || ".env");
49
51
  console.log = (...args) => console.error("[LOG]", ...args);
50
52
  if (resolveStdioMode(opts) === "proxy") return startStdioProxy();
51
53
  const { StdioServerTransport } = await import("@modelcontextprotocol/sdk/server/stdio.js");
52
- const { createHiveMcpServer, SERVER_NAME, SERVER_VERSION } = await import("./mcpServer-RGUKLIP2.js");
54
+ const { createHiveMcpServer, SERVER_NAME, SERVER_VERSION } = await import("./mcpServer-77FPS534.js");
53
55
  const { getPendingUpdateVersion } = await import("./update-check-36QU6PKA.js");
54
56
  const transport = new StdioServerTransport();
55
57
  const pendingUpdate = getPendingUpdateVersion();
@@ -112,7 +114,7 @@ async function startStdioProxy() {
112
114
  );
113
115
  }
114
116
  async function startHttp(port, envFile) {
115
- dotenv.config({ path: envFile || ".env", quiet: true });
117
+ loadEnvFile(envFile || ".env");
116
118
  process.env.PORT = String(port);
117
119
  const { startHttpServer } = await import("./server.js");
118
120
  await startHttpServer();