hive-intelligence 1.8.0 → 1.10.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.
- package/README.md +42 -10
- package/agent-skills/packs/hive/SKILL.md +10 -8
- package/agent-skills/packs/hive-mcp/SKILL.md +18 -10
- package/agent-skills/packs/hive-mcp/references/client-install-matrix.md +6 -4
- package/agent-skills/packs/hive-mcp/references/clients.md +6 -3
- package/agent-skills/packs/hive-token-diligence/SKILL.md +2 -0
- package/build/{chunk-L4KVJDA7.js → chunk-5IQUEFCD.js} +13 -6
- package/build/{chunk-ORJIFYF4.js → chunk-E2FAHUXM.js} +26 -1
- package/build/{chunk-HWV3XFXH.js → chunk-Z42XNN47.js} +1236 -239
- package/build/cli.js +23 -15
- package/build/config-audit-7GC42QX7.js +235 -0
- package/build/{doctor-5HAAZU4R.js → doctor-SMUVDZZ2.js} +61 -4
- package/build/{init-all-JXLG7LOX.js → init-all-SPEWION5.js} +9 -9
- package/build/{mcpServer-LNRRWXSV.js → mcpServer-T3DYYFCC.js} +1 -1
- package/build/monitor-worker.js +52 -6
- package/build/release.json +4 -4
- package/build/serve-2ICWEUMC.js +126 -0
- package/build/server.js +129 -13
- package/build/stdio.js +1 -1
- package/build/{tools-NJQPIJ53.js → tools-J6VPDGYP.js} +7 -3
- package/build/{upgrade-3NR3LAGU.js → upgrade-BJADUTO6.js} +1 -1
- package/package.json +12 -12
- package/build/serve-MOP4WYH6.js +0 -49
package/README.md
CHANGED
|
@@ -19,9 +19,10 @@ hosted MCP server, local `stdio` runtime, CLI, and REST API.
|
|
|
19
19
|
npx -y -p hive-intelligence@latest hive init --all --skip-verify
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
Use the hosted MCP when
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
Use the hosted MCP when your client can add a remote MCP URL. Use local `stdio`
|
|
23
|
+
for desktop clients that only launch local processes (it proxies to the hosted
|
|
24
|
+
MCP by default), or opt into `hive serve --local` to self-host with your own
|
|
25
|
+
provider keys.
|
|
25
26
|
|
|
26
27
|
## What You Get
|
|
27
28
|
|
|
@@ -41,7 +42,7 @@ client setup, self-hosting, or provider-key experiments.
|
|
|
41
42
|
- Bundled agent skills that teach assistants the right Hive workflow:
|
|
42
43
|
discovery -> schema lookup -> bounded execution -> evidence receipt.
|
|
43
44
|
- A broad provider catalog remains available behind discovery for agents that
|
|
44
|
-
need a long-tail endpoint. The current catalog contains
|
|
45
|
+
need a long-tail endpoint. The current catalog contains 523 tools, but that
|
|
45
46
|
coverage is not the primary product contract.
|
|
46
47
|
|
|
47
48
|
## Quickstart
|
|
@@ -206,15 +207,38 @@ advertised as live until external approval and clean-profile verification. See
|
|
|
206
207
|
|
|
207
208
|
## Run Local stdio MCP
|
|
208
209
|
|
|
209
|
-
Use local `stdio`
|
|
210
|
-
|
|
210
|
+
Use local `stdio` for clients that only launch local processes, such as Claude
|
|
211
|
+
Desktop's `claude_desktop_config.json`. By default the stdio server is a thin
|
|
212
|
+
proxy to the hosted MCP, so it serves the same production tools, data, and
|
|
213
|
+
receipts. It authenticates with the key saved by `hive auth login` (or
|
|
214
|
+
`HIVE_API_KEY` in the launching environment); without one it runs keyless
|
|
215
|
+
(discovery plus the free hero calls).
|
|
216
|
+
|
|
217
|
+
```json
|
|
218
|
+
{
|
|
219
|
+
"mcpServers": {
|
|
220
|
+
"hive": {
|
|
221
|
+
"command": "npx",
|
|
222
|
+
"args": ["-y", "-p", "hive-intelligence@latest", "hive"]
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
Running `hive` with no subcommand starts the `stdio` MCP server. Always launch
|
|
229
|
+
it through `hive-intelligence@latest`: `npx hive-mcp` downloads an unrelated npm
|
|
230
|
+
package (or runs a stale global install), and `npx hive-intelligence` without
|
|
231
|
+
`@latest` can keep running an old version.
|
|
232
|
+
|
|
233
|
+
To self-host with your own upstream provider keys instead, opt in with
|
|
234
|
+
`hive serve --local` or `HIVE_STDIO_MODE=local`:
|
|
211
235
|
|
|
212
236
|
```json
|
|
213
237
|
{
|
|
214
238
|
"mcpServers": {
|
|
215
239
|
"hive-local": {
|
|
216
240
|
"command": "npx",
|
|
217
|
-
"args": ["-y", "-p", "hive-intelligence@latest", "hive"],
|
|
241
|
+
"args": ["-y", "-p", "hive-intelligence@latest", "hive", "serve", "--local"],
|
|
218
242
|
"env": {
|
|
219
243
|
"COINGECKO_PRO_API_KEY": "optional",
|
|
220
244
|
"ALCHEMY_API_KEY": "optional",
|
|
@@ -226,9 +250,6 @@ or your own upstream provider keys.
|
|
|
226
250
|
}
|
|
227
251
|
```
|
|
228
252
|
|
|
229
|
-
Running `hive` with no subcommand starts the `stdio` MCP server. `hive-mcp`
|
|
230
|
-
remains available as a backward-compatible binary alias.
|
|
231
|
-
|
|
232
253
|
## Staying Current
|
|
233
254
|
|
|
234
255
|
The hosted MCP (`https://mcp.hiveintelligence.xyz/mcp`) is managed by Hive.
|
|
@@ -247,6 +268,16 @@ npx -y -p hive-intelligence@latest hive upgrade
|
|
|
247
268
|
`hive doctor` and the MCP server instructions, so your agent can prompt you when
|
|
248
269
|
an update is available. Set `HIVE_NO_UPDATE_CHECK=1` to disable the check.
|
|
249
270
|
|
|
271
|
+
`hive doctor` also flags a stale global `hive-intelligence` install, client
|
|
272
|
+
configs that launch `npx hive-mcp`, a bare global `hive` binary, a pinned or
|
|
273
|
+
untagged `hive-intelligence`, or the retired `https://hiveintelligence.xyz/mcp`
|
|
274
|
+
URL, and duplicate Hive entries. `hive doctor --fix` rewrites those entries to
|
|
275
|
+
the canonical form after saving a `.hive-backup-<time>` copy of each file:
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
npx -y -p hive-intelligence@latest hive doctor --fix
|
|
279
|
+
```
|
|
280
|
+
|
|
250
281
|
## Use The CLI
|
|
251
282
|
|
|
252
283
|
Search the catalog:
|
|
@@ -470,6 +501,7 @@ tool lists:
|
|
|
470
501
|
| Polymarket | Prediction markets: market and event search, market-implied odds, order books, odds history, wallet positions | Free (keyless) |
|
|
471
502
|
| Alternative.me | Crypto Fear and Greed Index, current plus daily history | Free (keyless) |
|
|
472
503
|
| Blockchain.com | Daily Bitcoin on-chain charts: hash rate, active addresses, transaction count | Free (keyless) |
|
|
504
|
+
| Blockscout | EVM token holder counts by USD balance tier (`get_token_holder_distribution`) | Free (keyless); optional `BLOCKSCOUT_API_KEY` for the PRO API |
|
|
473
505
|
| Open Data Fetch | Allowlisted, size-capped access to long-tail public crypto APIs | Free |
|
|
474
506
|
|
|
475
507
|
Providers without configured keys remain discoverable and return classified
|
|
@@ -16,9 +16,9 @@ through one MCP server and one CLI, and every answer carries a receipt:
|
|
|
16
16
|
provider, fetch time, cache state, runtime status, and digests of the input
|
|
17
17
|
and result. Three things Hive has that most crypto data tools do not:
|
|
18
18
|
|
|
19
|
-
- **History that venues no longer serve.** Perp funding settlements
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
- **History that venues no longer serve.** Perp funding settlements for one
|
|
20
|
+
coin across up to 33 CEX and DEX venues since 2023-11, plus basis, open
|
|
21
|
+
interest and liquidations since 2025 and long/short ratios since 2026-03.
|
|
22
22
|
- **Cross-venue views.** One call compares funding or basis across venues
|
|
23
23
|
instead of one exchange at a time.
|
|
24
24
|
- **Provenance you can cite.** The `_hive` block on every material response
|
|
@@ -237,13 +237,15 @@ and probability claims are yours and must be labeled as such.
|
|
|
237
237
|
|
|
238
238
|
Discovery tools are free; every other tool costs one credit. Keyed lanes debit
|
|
239
239
|
only after validation and client resolution, so a validation error or a
|
|
240
|
-
missing provider key costs 0 and a call that
|
|
241
|
-
|
|
242
|
-
material request
|
|
240
|
+
missing provider key costs 0, and a call that fails after the debit is
|
|
241
|
+
refunded, so only a call that succeeds costs 1. The keyless lane takes one
|
|
242
|
+
allowance call per material request and gives it back when the call fails.
|
|
243
|
+
`report_feedback` is free on every lane.
|
|
243
244
|
|
|
244
245
|
Every material response says what it cost: `credit_cost` (0 or 1),
|
|
245
|
-
`credits_used` (what was
|
|
246
|
-
integer, `null` when unlimited, absent when the lane
|
|
246
|
+
`credits_used` (what the call cost, 0 when a failed call was refunded), and
|
|
247
|
+
`credits_remaining` (an integer, `null` when unlimited, absent when the lane
|
|
248
|
+
has no notion of it).
|
|
247
249
|
Do not print the balance on every call; mention it when it is low or when the
|
|
248
250
|
user asks.
|
|
249
251
|
|
|
@@ -27,10 +27,11 @@ file path and shape vary per client.
|
|
|
27
27
|
interactive path is live.
|
|
28
28
|
- **Cost** — discovery tools are free; every other tool costs one credit.
|
|
29
29
|
Keyed lanes debit only after validation and client resolution, so a
|
|
30
|
-
validation error or missing provider key costs 0 and a call that
|
|
31
|
-
|
|
32
|
-
allowance call per material request
|
|
33
|
-
reports `credit_cost`,
|
|
30
|
+
validation error or missing provider key costs 0, and a call that fails
|
|
31
|
+
after the debit is refunded, so only a call that succeeds costs 1. The
|
|
32
|
+
keyless lane takes one allowance call per material request and gives it back
|
|
33
|
+
when the call fails. Every material response reports `credit_cost`,
|
|
34
|
+
`credits_used`, and `credits_remaining`.
|
|
34
35
|
|
|
35
36
|
After hosted OAuth activation, interactive MCP setup does not require the user
|
|
36
37
|
to create or paste an API key. Route to `hive-build-onboarding` for direct CLI,
|
|
@@ -122,17 +123,24 @@ enablement.
|
|
|
122
123
|
|
|
123
124
|
## Staying current
|
|
124
125
|
|
|
125
|
-
The hosted MCP endpoint is managed by Hive. Local `stdio`
|
|
126
|
-
|
|
127
|
-
re-resolves the newest version.
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
126
|
+
The hosted MCP endpoint is managed by Hive. Local `stdio` proxies to it by
|
|
127
|
+
default, and its config must launch `hive-intelligence@latest` so each restart
|
|
128
|
+
re-resolves the newest version. Never write `npx hive-mcp`: that name on npm is
|
|
129
|
+
an unrelated package, and on machines with an old global install it runs that
|
|
130
|
+
stale copy instead. When the server instructions or `hive doctor` report that a
|
|
131
|
+
newer version is available, tell the user to run `hive upgrade` (updates a
|
|
132
|
+
global install and clears the npx cache) and then restart the MCP client:
|
|
131
133
|
|
|
132
134
|
```bash
|
|
133
135
|
npx -y -p hive-intelligence@latest hive upgrade
|
|
134
136
|
```
|
|
135
137
|
|
|
138
|
+
If Hive answers with an old `server_version`, every vendor reports
|
|
139
|
+
`missing_key`, or tools look stale, run `hive doctor`. It flags stale global
|
|
140
|
+
installs, configs that launch `hive-mcp` or the retired
|
|
141
|
+
`https://hiveintelligence.xyz/mcp` URL, and duplicate Hive entries;
|
|
142
|
+
`hive doctor --fix` rewrites them after backing each file up.
|
|
143
|
+
|
|
136
144
|
## Common failures
|
|
137
145
|
|
|
138
146
|
- **"401 / Authentication failed" (interactive)** — remove the cached Hive
|
|
@@ -8,8 +8,9 @@ https://mcp.hiveintelligence.xyz/mcp
|
|
|
8
8
|
|
|
9
9
|
After the hosted deployment exposes protected-resource metadata, interactive
|
|
10
10
|
clients should store only this public URL and complete Hive OAuth in the
|
|
11
|
-
browser. Use local `stdio` for
|
|
12
|
-
|
|
11
|
+
browser. Use local `stdio` for clients that cannot use remote Streamable HTTP
|
|
12
|
+
(it proxies to the hosted MCP by default), or `hive serve --local` for
|
|
13
|
+
self-hosting and provider-key experiments. Use a Hive API
|
|
13
14
|
key for headless backends and as the trusted-client fallback while OAuth is not
|
|
14
15
|
active.
|
|
15
16
|
|
|
@@ -79,8 +80,9 @@ prompt, screenshot, or browser bundle.
|
|
|
79
80
|
|
|
80
81
|
## Local stdio MCP
|
|
81
82
|
|
|
82
|
-
Local stdio
|
|
83
|
-
|
|
83
|
+
Local stdio proxies to the hosted MCP with the key saved by `hive auth login`
|
|
84
|
+
(keyless without one). For self-hosting with your own upstream provider keys,
|
|
85
|
+
append `"serve", "--local"` to `args` and put those keys in `env`:
|
|
84
86
|
|
|
85
87
|
```json
|
|
86
88
|
{
|
|
@@ -137,7 +137,8 @@ keep the key in the launching process's secret store, never in a shared file.
|
|
|
137
137
|
|
|
138
138
|
## Local stdio fallback
|
|
139
139
|
|
|
140
|
-
For
|
|
140
|
+
For clients that only launch local processes. The stdio server proxies to the
|
|
141
|
+
hosted MCP and uses the key saved by `hive auth login` (keyless without one):
|
|
141
142
|
|
|
142
143
|
```json
|
|
143
144
|
{
|
|
@@ -150,5 +151,7 @@ For local-only clients, self-hosting, or provider-key experiments:
|
|
|
150
151
|
}
|
|
151
152
|
```
|
|
152
153
|
|
|
153
|
-
|
|
154
|
-
|
|
154
|
+
Do not put `HIVE_API_KEY` in this config; run `hive auth login` once instead.
|
|
155
|
+
To self-host with your own upstream provider keys, add `"serve", "--local"` to
|
|
156
|
+
`args` (or set `HIVE_STDIO_MODE=local`) and supply those keys in `env`. Never
|
|
157
|
+
use `npx hive-mcp`: it installs an unrelated npm package.
|
|
@@ -45,6 +45,8 @@ coverage, not an execution plan.
|
|
|
45
45
|
5. Start with metadata and market/liquidity checks. Add holder distribution
|
|
46
46
|
and enrichment only when the user needs depth, and security/risk checks
|
|
47
47
|
when the user asks whether to trade, approve, or trust the token.
|
|
48
|
+
For "how many real holders" questions use `get_token_holder_distribution`
|
|
49
|
+
(holders by USD tier, dust separated); a raw holder count includes dust.
|
|
48
50
|
6. For supply-dilution or unlock questions, use CoinGecko supply breakdown and
|
|
49
51
|
circulating/total supply charts when the configured plan permits them.
|
|
50
52
|
Report a plan gate instead of substituting market-cap fields.
|
|
@@ -96,7 +96,11 @@ async function runUpgrade() {
|
|
|
96
96
|
return;
|
|
97
97
|
}
|
|
98
98
|
const updateAvailable = isNewerVersion(latest, SERVER_VERSION);
|
|
99
|
-
|
|
99
|
+
const { readGlobalInstalls, npmGlobalRoot } = await import("./config-audit-7GC42QX7.js");
|
|
100
|
+
const staleGlobal = mode !== "global" && readGlobalInstalls(npmGlobalRoot()).some(
|
|
101
|
+
(i) => i.name === REGISTRY_PACKAGE && isNewerVersion(latest, i.version)
|
|
102
|
+
);
|
|
103
|
+
if (!updateAvailable && !staleGlobal) {
|
|
100
104
|
if (shouldOutputJson()) {
|
|
101
105
|
await writeOutput(
|
|
102
106
|
successEnvelope(
|
|
@@ -116,7 +120,7 @@ async function runUpgrade() {
|
|
|
116
120
|
`);
|
|
117
121
|
return;
|
|
118
122
|
}
|
|
119
|
-
if (mode === "global") {
|
|
123
|
+
if (mode === "global" || staleGlobal) {
|
|
120
124
|
const ok = updateGlobal();
|
|
121
125
|
actions.push(ok ? "updated global install" : "global update failed");
|
|
122
126
|
}
|
|
@@ -131,7 +135,8 @@ async function runUpgrade() {
|
|
|
131
135
|
{
|
|
132
136
|
current: SERVER_VERSION,
|
|
133
137
|
latest,
|
|
134
|
-
updateAvailable
|
|
138
|
+
updateAvailable,
|
|
139
|
+
staleGlobal,
|
|
135
140
|
mode,
|
|
136
141
|
actions
|
|
137
142
|
},
|
|
@@ -140,10 +145,12 @@ async function runUpgrade() {
|
|
|
140
145
|
);
|
|
141
146
|
return;
|
|
142
147
|
}
|
|
143
|
-
|
|
148
|
+
if (updateAvailable) {
|
|
149
|
+
info(`
|
|
144
150
|
Update available: ${SERVER_VERSION} -> ${latest}
|
|
145
151
|
`);
|
|
146
|
-
|
|
152
|
+
}
|
|
153
|
+
if (mode === "global" || staleGlobal) {
|
|
147
154
|
info(
|
|
148
155
|
actions.includes("updated global install") ? `Updated global hive-intelligence to ${latest}.
|
|
149
156
|
` : `Global update failed. Run: npm install -g ${REGISTRY_PACKAGE}@latest
|
|
@@ -154,7 +161,7 @@ Update available: ${SERVER_VERSION} -> ${latest}
|
|
|
154
161
|
info(`Cleared npx cache so the next run pulls ${latest}.
|
|
155
162
|
`);
|
|
156
163
|
}
|
|
157
|
-
if (mode === "local") {
|
|
164
|
+
if (mode === "local" && updateAvailable) {
|
|
158
165
|
info(
|
|
159
166
|
"Running from a local checkout; pull the latest source with git instead.\n"
|
|
160
167
|
);
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
getSupabaseAdmin,
|
|
8
8
|
resolveEndpoint,
|
|
9
9
|
secureLogger
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-Z42XNN47.js";
|
|
11
11
|
|
|
12
12
|
// src/services/wallet-service.ts
|
|
13
13
|
async function consumeCredits(args) {
|
|
@@ -34,6 +34,29 @@ async function consumeCredits(args) {
|
|
|
34
34
|
cycleEnd: row.cycle_end ?? null
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
+
async function refundCredits(args) {
|
|
38
|
+
const { userId, debitIdempotencyKey, detail } = args;
|
|
39
|
+
const { data, error } = await getSupabaseAdmin().rpc("refund_credits", {
|
|
40
|
+
p_user_id: userId,
|
|
41
|
+
p_debit_idempotency_key: debitIdempotencyKey,
|
|
42
|
+
p_detail: detail ?? {}
|
|
43
|
+
});
|
|
44
|
+
if (error) {
|
|
45
|
+
secureLogger.error("refund_credits RPC failed", error, { userId });
|
|
46
|
+
throw new Error(`refund_credits failed: ${error.message}`);
|
|
47
|
+
}
|
|
48
|
+
const row = Array.isArray(data) ? data[0] : data;
|
|
49
|
+
if (!row) {
|
|
50
|
+
throw new Error("refund_credits returned no row");
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
code: row.code,
|
|
54
|
+
balance: row.balance ?? null
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function refundSettled(code) {
|
|
58
|
+
return code === "ok" || code === "unlimited" || code === "already_refunded";
|
|
59
|
+
}
|
|
37
60
|
async function ensureWallet(userId, planId) {
|
|
38
61
|
const { error } = await getSupabaseAdmin().rpc("ensure_wallet", {
|
|
39
62
|
p_user_id: userId,
|
|
@@ -175,6 +198,8 @@ async function executeToolByName(toolName, args, options) {
|
|
|
175
198
|
|
|
176
199
|
export {
|
|
177
200
|
consumeCredits,
|
|
201
|
+
refundCredits,
|
|
202
|
+
refundSettled,
|
|
178
203
|
ensureWallet,
|
|
179
204
|
getWalletStatus,
|
|
180
205
|
applyPlanChange,
|