hive-intelligence 1.9.0 → 1.11.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 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 you want Hive to run auth, rate limits, provider
23
- infrastructure, and runtime status. Use local `stdio` when you want desktop
24
- client setup, self-hosting, or provider-key experiments.
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 525 tools, but that
45
+ need a long-tail endpoint. The current catalog contains 518 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` when you want a self-hosted MCP process, local desktop config,
210
- or your own upstream provider keys.
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
@@ -123,17 +123,24 @@ enablement.
123
123
 
124
124
  ## Staying current
125
125
 
126
- The hosted MCP endpoint is managed by Hive. Local `stdio` installs should
127
- keep `hive-intelligence@latest` in the client config so each restart
128
- re-resolves the newest version. When the server
129
- instructions or `hive doctor` report that a newer version is available,
130
- tell the user to run `hive upgrade` (updates a global install and clears
131
- the npx cache) and then restart the MCP client to load it:
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:
132
133
 
133
134
  ```bash
134
135
  npx -y -p hive-intelligence@latest hive upgrade
135
136
  ```
136
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
+
137
144
  ## Common failures
138
145
 
139
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 Hive development, self-hosting, provider key
12
- experiments, or clients that cannot use remote Streamable HTTP. Use a Hive API
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 does not require a hosted Hive key. Optional upstream provider keys
83
- belong in the local environment when the user wants provider-key experiments:
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 local-only clients, self-hosting, or provider-key experiments:
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
- Local stdio does not need `HIVE_API_KEY`; optional upstream provider keys can be
154
- supplied locally when needed.
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.
@@ -45,7 +45,9 @@ coverage, not an execution plan.
45
45
  3. Call `get_api_endpoint_schema` for each endpoint before calling it.
46
46
  4. Call `invoke_api_endpoint` with schema-valid, bounded arguments.
47
47
  5. Start with balances and native balance. Add transfers for activity
48
- questions; add NFTs, DeFi positions, or PnL only when relevant.
48
+ questions; add NFTs, DeFi positions, or PnL only when relevant. For EVM
49
+ wallets, `get_wallet_balances`, `get_wallet_pnl`, `get_wallet_trades`, and
50
+ `get_wallet_transfers` (CoinGecko) cover several chains per call.
49
51
  6. Summarize exposure, concentration, notable activity, and missing data.
50
52
 
51
53
  ## Bounded calls
@@ -96,7 +96,11 @@ async function runUpgrade() {
96
96
  return;
97
97
  }
98
98
  const updateAvailable = isNewerVersion(latest, SERVER_VERSION);
99
- if (!updateAvailable) {
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: true,
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
- info(`
148
+ if (updateAvailable) {
149
+ info(`
144
150
  Update available: ${SERVER_VERSION} -> ${latest}
145
151
  `);
146
- if (mode === "global") {
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
  );
@@ -186,14 +186,17 @@ var NAMESPACE = [
186
186
  {
187
187
  name: "tokens",
188
188
  description: "Token holdings",
189
- tool: "moralis_get_wallet_token_balances",
189
+ tool: "get_wallet_balances",
190
190
  args: {
191
191
  address: {
192
192
  flag: "--address <addr>",
193
193
  description: "Wallet address",
194
194
  required: true
195
195
  },
196
- chain: { flag: "--chain <name>", description: "Chain name" }
196
+ networks: {
197
+ flag: "--networks <ids>",
198
+ description: "Comma-separated CoinGecko network ids (default: all supported EVM)"
199
+ }
197
200
  }
198
201
  },
199
202
  {
@@ -7,7 +7,7 @@ import {
7
7
  getSupabaseAdmin,
8
8
  resolveEndpoint,
9
9
  secureLogger
10
- } from "./chunk-MVO6LL3H.js";
10
+ } from "./chunk-X4U2IALG.js";
11
11
 
12
12
  // src/services/wallet-service.ts
13
13
  async function consumeCredits(args) {