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
package/README.md CHANGED
@@ -42,7 +42,7 @@ provider keys.
42
42
  - Bundled agent skills that teach assistants the right Hive workflow:
43
43
  discovery -> schema lookup -> bounded execution -> evidence receipt.
44
44
  - A broad provider catalog remains available behind discovery for agents that
45
- need a long-tail endpoint. The current catalog contains 435 tools, but that
45
+ need a long-tail endpoint. The current catalog contains 439 tools, but that
46
46
  coverage is not the primary product contract.
47
47
 
48
48
  ## Quickstart
@@ -494,9 +494,10 @@ tool lists:
494
494
  | Helius | Solana RPC, DAS, priority fees, wallet history, and Parsed Events | `HELIUS_API_KEY` |
495
495
  | Tenderly | EVM simulation, tracing, gas estimation, and read-only Node RPC | REST: `TENDERLY_API_KEY` + `TENDERLY_ACCOUNT_SLUG` + `TENDERLY_PROJECT_SLUG`; Node: `TENDERLY_NODE_ACCESS_KEY` or `TENDERLY_GATEWAY_ACCESS_KEY` |
496
496
  | Hyperliquid | Full /info surface: perp/spot markets, order books, user state, vaults, staking, borrow/lend, HIP-4 outcome markets | Free |
497
- | RWA Perps | Keyless five-venue fan-out for tokenized-asset perps (`rwa_` tools): Hyperliquid HIP-3 builder dexes, Ostium, Avantis, Lighter, Extended | Free |
498
- | Hive Archive | Supabase-backed derivatives history (`archive_` tools) served by Hive | None (Hive-hosted) |
497
+ | RWA Perps | Keyless three-venue fan-out for tokenized-asset perps (`rwa_` tools): Hyperliquid HIP-3 builder dexes, Lighter, Extended | Free |
498
+ | Hive Archive | ClickHouse-backed derivatives history (`archive_` tools) served by Hive | None (Hive-hosted) |
499
499
  | Polymarket | Prediction markets: market and event search, market-implied odds, order books, odds history, wallet positions | Free (keyless) |
500
+ | Kalshi | Prediction markets: market and event search, market-implied odds, order books, trades, candlestick history | Free (keyless) |
500
501
  | Alternative.me | Crypto Fear and Greed Index, current plus daily history | Free (keyless) |
501
502
  | Blockchain.com | Daily Bitcoin on-chain charts: hash rate, active addresses, transaction count | Free (keyless) |
502
503
  | Blockscout | EVM token holder counts by USD balance tier (`get_token_holder_distribution`) | Free (keyless); optional `BLOCKSCOUT_API_KEY` for the PRO API |
@@ -338,8 +338,8 @@ file.
338
338
  ## Capability boundaries
339
339
 
340
340
  Hive does not place trades, hold funds, sign transactions, give investment
341
- advice, or predict prices. It has no equities, options, social-sentiment, or
342
- Kalshi provider: say so plainly instead of approximating with the wrong tool, then
341
+ advice, or predict prices. It has no equities, options, or social-sentiment
342
+ provider: say so plainly instead of approximating with the wrong tool, then
343
343
  offer `report_feedback` for the gap. Provider coverage is live in
344
344
  `hive://providers` and `hive tools list`; do not quote tool counts from
345
345
  memory.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: hive-prediction-markets
3
- description: Use this skill when the user asks about prediction markets, meaning Polymarket events, markets, outcomes, odds, prices, order books, liquidity, odds history, or a wallet's positions and trades, including "what are the odds of X", "find markets about Y", or Kalshi questions (answer from Polymarket and say Kalshi is not covered). Use it whenever live prediction-market evidence is needed. Never present market probability as ground truth.
3
+ description: Use this skill when the user asks about prediction markets, meaning Polymarket or Kalshi events, markets, outcomes, odds, prices, order books, liquidity, odds history, trades, or a Polymarket wallet's positions and trades, including "what are the odds of X" and "find markets about Y". Use it whenever live prediction-market evidence is needed. Never present market probability as ground truth.
4
4
  license: MIT
5
5
  metadata:
6
6
  package: "@hiveintelligence/agent-skills"
@@ -11,13 +11,11 @@ version: 1.7.0
11
11
 
12
12
  # hive-prediction-markets: Prediction Markets
13
13
 
14
- Discover and analyze Polymarket prediction markets with prices, order books,
15
- odds history, and wallet positions and trades, always framed as
16
- market-implied odds rather than truth. Polymarket's Gamma, CLOB, and Data
17
- APIs are keyless, so these tools work on the keyless lane. Kalshi is not
18
- covered: its developer agreement requires a data license Hive does not hold,
19
- so answer Kalshi questions from Polymarket where a matching market exists and
20
- say plainly that the Kalshi side is unavailable.
14
+ Discover and analyze Polymarket and Kalshi prediction markets with prices,
15
+ order books, odds history and trades, plus Polymarket wallet positions, always
16
+ framed as market-implied odds rather than truth. Polymarket's Gamma, CLOB, and
17
+ Data APIs and Kalshi's public Trade API are keyless, so these tools work on the
18
+ keyless lane.
21
19
 
22
20
  ## Task toolset and identifiers
23
21
 
@@ -30,6 +28,9 @@ budget, phases, fallback condition, and stop conditions.
30
28
  `polymarket_get_price_history` and `polymarket_get_orderbook` (CLOB token
31
29
  id), `polymarket_get_wallet_positions` and `polymarket_get_wallet_activity`
32
30
  (EVM wallet address).
31
+ - Kalshi: `kalshi_search_markets` (query, status or event ticker),
32
+ `kalshi_get_events`, and by market ticker `kalshi_get_market`,
33
+ `kalshi_get_orderbook`, `kalshi_get_trades`, `kalshi_get_price_history`.
33
34
  - Required: a market slug, condition id, token id, wallet address, or a
34
35
  search query, depending on the request.
35
36
  - Optional: status filter, limit, interval, depth, outcome.
@@ -8,8 +8,8 @@ import {
8
8
  getAnonQuota,
9
9
  getUsage,
10
10
  postFeedback
11
- } from "./chunk-RNVZIPNY.js";
12
- import "./chunk-ZSPPJW4G.js";
11
+ } from "./chunk-VO6NWVJD.js";
12
+ import "./chunk-4U4IL5KA.js";
13
13
  import "./chunk-ZXKFJQDE.js";
14
14
  import "./chunk-6PC3HUAK.js";
15
15
  import "./chunk-OMO7XLC5.js";
@@ -12,7 +12,7 @@ import {
12
12
  runWhoami,
13
13
  saveProfile,
14
14
  switchProfile
15
- } from "./chunk-KQVPKTEO.js";
15
+ } from "./chunk-AVTIJGWS.js";
16
16
  import "./chunk-6PC3HUAK.js";
17
17
  import "./chunk-OMO7XLC5.js";
18
18
  export {
@@ -10,8 +10,8 @@ import {
10
10
  parseFlagTokens,
11
11
  planToolCall,
12
12
  reservedOptionNames
13
- } from "./chunk-AZFOTKS2.js";
14
- import "./chunk-ZSPPJW4G.js";
13
+ } from "./chunk-WZ2NMSV3.js";
14
+ import "./chunk-4U4IL5KA.js";
15
15
  import "./chunk-OMO7XLC5.js";
16
16
  export {
17
17
  ALWAYS_RESERVED_OPTIONS,
@@ -1,7 +1,6 @@
1
1
  import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
2
2
 
3
3
  // src/cli/errors.ts
4
- import { distance } from "fastest-levenshtein";
5
4
  var ExitCode = {
6
5
  SUCCESS: 0,
7
6
  GENERAL_ERROR: 1,
@@ -109,6 +108,21 @@ function classifyError(error, toolName) {
109
108
  }
110
109
  return new CliError("API_ERROR", msg);
111
110
  }
111
+ function distance(a, b) {
112
+ let prev = Array.from({ length: b.length + 1 }, (_, j) => j);
113
+ for (let i = 1; i <= a.length; i++) {
114
+ const cur = [i];
115
+ for (let j = 1; j <= b.length; j++) {
116
+ cur[j] = Math.min(
117
+ prev[j] + 1,
118
+ cur[j - 1] + 1,
119
+ prev[j - 1] + (a[i - 1] === b[j - 1] ? 0 : 1)
120
+ );
121
+ }
122
+ prev = cur;
123
+ }
124
+ return prev[b.length];
125
+ }
112
126
  function suggestSimilarTools(input, toolNames, maxDistance = 3) {
113
127
  return toolNames.map((name) => ({ name, dist: distance(input, name) })).filter((entry) => entry.dist <= maxDistance).sort((a, b) => a.dist - b.dist).slice(0, 3).map((entry) => entry.name);
114
128
  }
@@ -294,11 +294,11 @@ async function runSwitch(name) {
294
294
  }
295
295
  }
296
296
  async function runUsage() {
297
- const { getUsage } = await import("./api-client-POBN6Y5S.js");
297
+ const { getUsage } = await import("./api-client-MK3CVNCH.js");
298
298
  const result = await getUsage();
299
299
  if (!result.ok) {
300
300
  const { outputError } = await import("./output-BBHBJI32.js");
301
- const { CliError, classifyError } = await import("./errors-YQAVCXXO.js");
301
+ const { CliError, classifyError } = await import("./errors-BPXK3KCR.js");
302
302
  const code = result.error?.code;
303
303
  const err = code === "AUTH_REQUIRED" || code === "INVALID_TOKEN" ? new CliError(
304
304
  "AUTH_REQUIRED",
@@ -7,7 +7,7 @@ import {
7
7
  getSupabaseAdmin,
8
8
  resolveEndpoint,
9
9
  secureLogger
10
- } from "./chunk-C4BFUIEB.js";
10
+ } from "./chunk-QSKFAT7Z.js";
11
11
 
12
12
  // src/services/wallet-service.ts
13
13
  async function consumeCredits(args) {
@@ -0,0 +1,71 @@
1
+ import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
2
+
3
+ // src/config/env.ts
4
+ import { z } from "zod";
5
+ var nodeEnvSchema = z.enum(["development", "production", "test"]).catch("development");
6
+ var logLevelSchema = z.enum(["debug", "info", "warn", "error"]).catch("info");
7
+ var portSchema = z.coerce.number().int().min(1).max(65535);
8
+ var rateLimitMaxSchema = z.coerce.number().int().min(1).max(1e4);
9
+ function getEnvVar(name) {
10
+ const value = process.env[name]?.trim();
11
+ return value ? value : void 0;
12
+ }
13
+ function getRequiredEnvVar(name, message) {
14
+ const value = getEnvVar(name);
15
+ if (!value) {
16
+ throw new Error(message ?? `Missing required environment variable: ${name}`);
17
+ }
18
+ return value;
19
+ }
20
+ function hasEnvVars(...names) {
21
+ return names.every((name) => Boolean(getEnvVar(name)));
22
+ }
23
+ function loadEnvFile(path) {
24
+ try {
25
+ process.loadEnvFile(path);
26
+ } catch {
27
+ }
28
+ }
29
+ function getCsvEnv(name) {
30
+ const value = getEnvVar(name);
31
+ if (!value) return [];
32
+ return value.split(",").map((part) => part.trim()).filter(Boolean);
33
+ }
34
+ function getNodeEnv() {
35
+ return nodeEnvSchema.parse(process.env.NODE_ENV);
36
+ }
37
+ function isProduction() {
38
+ return getNodeEnv() === "production";
39
+ }
40
+ function getLogLevel() {
41
+ return logLevelSchema.parse(process.env.LOG_LEVEL);
42
+ }
43
+ function getPort() {
44
+ return portSchema.parse(process.env.PORT ?? 8080);
45
+ }
46
+ function getRateLimitMax() {
47
+ return rateLimitMaxSchema.parse(process.env.RATE_LIMIT_MAX ?? 30);
48
+ }
49
+ function getCredentialedRateLimitMax() {
50
+ return rateLimitMaxSchema.parse(
51
+ process.env.CREDENTIALED_RATE_LIMIT_MAX ?? 1500
52
+ );
53
+ }
54
+ function getCorsAllowedOrigins() {
55
+ return getCsvEnv("CORS_ALLOWED_ORIGINS");
56
+ }
57
+
58
+ export {
59
+ getEnvVar,
60
+ getRequiredEnvVar,
61
+ hasEnvVars,
62
+ loadEnvFile,
63
+ getCsvEnv,
64
+ getNodeEnv,
65
+ isProduction,
66
+ getLogLevel,
67
+ getPort,
68
+ getRateLimitMax,
69
+ getCredentialedRateLimitMax,
70
+ getCorsAllowedOrigins
71
+ };
@@ -4,17 +4,19 @@ import {
4
4
  } from "./chunk-XN3T6YOG.js";
5
5
  import {
6
6
  executeRemoteTool
7
- } from "./chunk-RNVZIPNY.js";
7
+ } from "./chunk-VO6NWVJD.js";
8
8
  import {
9
9
  trackCommand
10
10
  } from "./chunk-RU6QOFHH.js";
11
11
  import {
12
12
  ExitCode
13
- } from "./chunk-ZSPPJW4G.js";
13
+ } from "./chunk-4U4IL5KA.js";
14
14
  import {
15
15
  debug,
16
16
  dim,
17
+ green,
17
18
  isQuiet,
19
+ red,
18
20
  shouldOutputJson,
19
21
  writeOutput
20
22
  } from "./chunk-ZDXMZPC6.js";
@@ -22,9 +24,6 @@ import {
22
24
  resolveApiKey
23
25
  } from "./chunk-6PC3HUAK.js";
24
26
 
25
- // src/cli/execute.ts
26
- import ora from "ora";
27
-
28
27
  // src/cli/keyless-heroes.ts
29
28
  var CHAIN_ID_TO_NAME = {
30
29
  "1": "ethereum",
@@ -115,6 +114,23 @@ function creditFooter(meta, keyed) {
115
114
  if (typeof meta.quota_remaining !== "number") return null;
116
115
  return `free calls left today: ${meta.quota_remaining} (run \`hive auth login\` for a full key)`;
117
116
  }
117
+ function startSpinner(text) {
118
+ const frames = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
119
+ let frame = 0;
120
+ const draw = () => process.stderr.write(`\r${frames[frame++ % frames.length]} ${text}`);
121
+ draw();
122
+ const timer = setInterval(draw, 80);
123
+ timer.unref();
124
+ const stop = (symbol, message) => {
125
+ clearInterval(timer);
126
+ process.stderr.write(`\r\x1B[2K${symbol} ${message}
127
+ `);
128
+ };
129
+ return {
130
+ succeed: (message) => stop(green("\u2714"), message),
131
+ fail: (message) => stop(red("\u2716"), message)
132
+ };
133
+ }
118
134
  async function executeTool(toolName, args, timeoutMs = 3e4) {
119
135
  const keyed = Boolean(resolveApiKey());
120
136
  if (!keyed) {
@@ -127,7 +143,7 @@ async function executeTool(toolName, args, timeoutMs = 3e4) {
127
143
  }
128
144
  debug(`Executing ${toolName} remotely`);
129
145
  const showSpinner = !shouldOutputJson() && !!process.stderr.isTTY;
130
- const spinner = showSpinner ? ora({ text: `Calling ${toolName}...`, stream: process.stderr }).start() : null;
146
+ const spinner = showSpinner ? startSpinner(`Calling ${toolName}...`) : null;
131
147
  const startMs = Date.now();
132
148
  let response;
133
149
  try {
@@ -2,7 +2,7 @@ import { createRequire } from 'node:module'; const require = createRequire(impor
2
2
  import {
3
3
  CliError,
4
4
  ExitCode
5
- } from "./chunk-ZSPPJW4G.js";
5
+ } from "./chunk-4U4IL5KA.js";
6
6
  import {
7
7
  errorEnvelope,
8
8
  info,