hive-intelligence 1.3.0 → 1.5.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 +2 -2
- package/agent-skills/SKILL.md +1 -1
- package/agent-skills/packs/hive-build/SKILL.md +1 -1
- package/agent-skills/packs/hive-build-onboarding/SKILL.md +7 -7
- package/agent-skills/packs/hive-cli/SKILL.md +2 -2
- package/agent-skills/packs/hive-defi-research/SKILL.md +1 -1
- package/agent-skills/packs/hive-dex-pool-analysis/SKILL.md +1 -1
- package/agent-skills/packs/hive-market-research/SKILL.md +1 -1
- package/agent-skills/packs/hive-mcp/SKILL.md +1 -1
- package/agent-skills/packs/hive-network-infrastructure/SKILL.md +1 -1
- package/agent-skills/packs/hive-nft-research/SKILL.md +1 -1
- package/agent-skills/packs/hive-prediction-markets/SKILL.md +1 -1
- package/agent-skills/packs/hive-query/SKILL.md +1 -1
- package/agent-skills/packs/hive-security-risk/SKILL.md +1 -1
- package/agent-skills/packs/hive-solana-analysis/SKILL.md +1 -1
- package/agent-skills/packs/hive-stateful-monitoring/SKILL.md +1 -1
- package/agent-skills/packs/hive-token-diligence/SKILL.md +1 -1
- package/agent-skills/packs/hive-tool-discovery/SKILL.md +1 -1
- package/agent-skills/packs/hive-wallet-investigation/SKILL.md +1 -1
- package/build/{api-client-FTVDFW5V.js → api-client-WMWFWXC7.js} +3 -15
- package/build/{auth-EZFJ5RYB.js → auth-Y4GXW376.js} +1 -9
- package/build/browser-auth-F62BMD7W.js +20 -0
- package/build/{chunk-W2QL7LYI.js → chunk-AGM2CIRL.js} +971 -117
- package/build/{chunk-7GD2MFYI.js → chunk-BDO27NIP.js} +37 -17
- package/build/{upgrade-J4HIGCKE.js → chunk-GB4XMTDE.js} +3 -4
- package/build/{chunk-TNQ7GJ6Q.js → chunk-GWZIAAQ2.js} +58 -40
- package/build/{chunk-Q7VBYLX7.js → chunk-P7NLFSZQ.js} +0 -58
- package/build/{chunk-N32UIHBU.js → chunk-SFN772RL.js} +5 -5
- package/build/{chunk-AEU43ACS.js → chunk-TVBPCELA.js} +2 -2
- package/build/{chunk-RUHO24SX.js → chunk-WF34ZD5I.js} +7 -162
- package/build/{chunk-I5Z6FZRL.js → chunk-XQPEFCSY.js} +14 -12
- package/build/cli.js +36 -47
- package/build/{completion-7KBW243H.js → completion-C57PDJMY.js} +1 -1
- package/build/{doctor-ORDOCGLM.js → doctor-XG5IQCXK.js} +5 -5
- package/build/{init-UCTCUYFA.js → init-COHA3VZI.js} +3 -3
- package/build/{init-all-BVWW3JVK.js → init-all-YTQJLPLR.js} +43 -24
- package/build/{mcpServer-RUEOTTF7.js → mcpServer-XHIN5JER.js} +1 -1
- package/build/monitor-worker.js +2 -2
- package/build/{namespace-L5DGCY7K.js → namespace-YLCGHVRT.js} +1 -1
- package/build/release.json +4 -4
- package/build/{serve-DKLR2WQH.js → serve-PWMT5IRU.js} +1 -1
- package/build/server.js +1475 -452
- package/build/stdio.js +1 -1
- package/build/{tools-I7GLWTV6.js → tools-XNFJBN7Q.js} +2 -2
- package/build/{uninstall-SAOIPL6K.js → uninstall-TKDP6C4F.js} +7 -7
- package/build/upgrade-ODPKMIDC.js +14 -0
- package/build/{watch-WVR4CGCD.js → watch-MXJSNGL2.js} +2 -2
- package/package.json +5 -3
- package/build/browser-auth-OJSUNFBI.js +0 -8
|
@@ -116,7 +116,7 @@ async function runLogin(opts) {
|
|
|
116
116
|
const profileName = opts.profile ?? "default";
|
|
117
117
|
if (opts.manual) {
|
|
118
118
|
process.stderr.write(`
|
|
119
|
-
Hive CLI
|
|
119
|
+
Hive CLI: Login (profile: ${profileName})
|
|
120
120
|
|
|
121
121
|
`);
|
|
122
122
|
let apiKey;
|
|
@@ -180,7 +180,7 @@ Validating against ${apiUrl}...
|
|
|
180
180
|
process.stderr.write("Key validated successfully.\n");
|
|
181
181
|
} else if (resp.status === 401 || resp.status === 403) {
|
|
182
182
|
process.stderr.write(
|
|
183
|
-
`Warning: Server returned ${resp.status}
|
|
183
|
+
`Warning: Server returned ${resp.status}; the key may be invalid.
|
|
184
184
|
`
|
|
185
185
|
);
|
|
186
186
|
} else {
|
|
@@ -189,7 +189,7 @@ Validating against ${apiUrl}...
|
|
|
189
189
|
}
|
|
190
190
|
} catch {
|
|
191
191
|
process.stderr.write(
|
|
192
|
-
"Warning: Could not reach server
|
|
192
|
+
"Warning: Could not reach the server; saving anyway.\n"
|
|
193
193
|
);
|
|
194
194
|
}
|
|
195
195
|
saveProfile(profileName, apiKey, apiUrl);
|
|
@@ -201,10 +201,10 @@ Profile "${profileName}" saved. Key: ${maskKey(apiKey)}
|
|
|
201
201
|
return;
|
|
202
202
|
}
|
|
203
203
|
process.stderr.write(`
|
|
204
|
-
Hive CLI
|
|
204
|
+
Hive CLI: Login (profile: ${profileName})
|
|
205
205
|
`);
|
|
206
206
|
try {
|
|
207
|
-
const { browserLogin } = await import("./browser-auth-
|
|
207
|
+
const { browserLogin } = await import("./browser-auth-F62BMD7W.js");
|
|
208
208
|
const apiUrl = process.env.HIVE_API_URL || "https://mcp.hiveintelligence.xyz";
|
|
209
209
|
const websiteUrl = process.env.HIVE_WEBSITE_URL || "https://hiveintelligence.xyz";
|
|
210
210
|
const result = await browserLogin({ baseUrl: websiteUrl });
|
|
@@ -293,159 +293,8 @@ async function runSwitch(name) {
|
|
|
293
293
|
process.exit(1);
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
|
-
async function runSignup(opts) {
|
|
297
|
-
const { authSignup } = await import("./api-client-FTVDFW5V.js");
|
|
298
|
-
const profileName = opts.profile ?? "default";
|
|
299
|
-
process.stderr.write(`
|
|
300
|
-
Hive CLI \u2014 Signup (profile: ${profileName})
|
|
301
|
-
|
|
302
|
-
`);
|
|
303
|
-
const rl = createInterface({ input: process.stdin, output: process.stderr });
|
|
304
|
-
const email = await ask(rl, "Email: ");
|
|
305
|
-
rl.close();
|
|
306
|
-
const password = await askSecret("Password: ");
|
|
307
|
-
if (!email.trim() || !password.trim()) {
|
|
308
|
-
process.stderr.write("Email and password are required. Aborting.\n");
|
|
309
|
-
process.exit(1);
|
|
310
|
-
}
|
|
311
|
-
process.stderr.write("\nCreating account...\n");
|
|
312
|
-
const result = await authSignup(email.trim(), password.trim());
|
|
313
|
-
if (!result.ok) {
|
|
314
|
-
const errMsg = result.error?.message ?? "Signup failed";
|
|
315
|
-
process.stderr.write(`Error: ${errMsg}
|
|
316
|
-
`);
|
|
317
|
-
process.exit(1);
|
|
318
|
-
}
|
|
319
|
-
const apiKey = result.data?.api_key;
|
|
320
|
-
const keyValue = apiKey?.key;
|
|
321
|
-
const apiUrl = process.env.HIVE_API_URL || "https://mcp.hiveintelligence.xyz";
|
|
322
|
-
if (keyValue) {
|
|
323
|
-
saveProfile(profileName, keyValue, apiUrl);
|
|
324
|
-
process.stderr.write(`
|
|
325
|
-
Account created successfully!
|
|
326
|
-
`);
|
|
327
|
-
process.stderr.write(`API Key: ${keyValue}
|
|
328
|
-
`);
|
|
329
|
-
process.stderr.write(
|
|
330
|
-
`WARNING: Save this key \u2014 it will not be shown again.
|
|
331
|
-
`
|
|
332
|
-
);
|
|
333
|
-
process.stderr.write(`
|
|
334
|
-
Profile "${profileName}" saved.
|
|
335
|
-
`);
|
|
336
|
-
} else {
|
|
337
|
-
process.stderr.write(`
|
|
338
|
-
Account created but no API key was generated.
|
|
339
|
-
`);
|
|
340
|
-
process.stderr.write(`Run: hive keys create
|
|
341
|
-
`);
|
|
342
|
-
}
|
|
343
|
-
const resultData = result.data;
|
|
344
|
-
const session = resultData?.session;
|
|
345
|
-
if (session?.access_token) {
|
|
346
|
-
const creds = getCredentials();
|
|
347
|
-
creds.profiles[profileName] = {
|
|
348
|
-
...creds.profiles[profileName],
|
|
349
|
-
jwt: session.access_token
|
|
350
|
-
};
|
|
351
|
-
saveCredentials(creds);
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
async function runKeysList() {
|
|
355
|
-
const { listKeysApi } = await import("./api-client-FTVDFW5V.js");
|
|
356
|
-
const creds = getCredentials();
|
|
357
|
-
const config = getConfig();
|
|
358
|
-
const jwt = creds.profiles[config.activeProfile]?.jwt;
|
|
359
|
-
if (!jwt) {
|
|
360
|
-
process.stderr.write(
|
|
361
|
-
"No session token. Run: hive auth signup or hive auth login\n"
|
|
362
|
-
);
|
|
363
|
-
process.exit(1);
|
|
364
|
-
}
|
|
365
|
-
const result = await listKeysApi(jwt);
|
|
366
|
-
if (!result.ok) {
|
|
367
|
-
process.stderr.write("Failed to list keys. Try logging in again.\n");
|
|
368
|
-
process.exit(1);
|
|
369
|
-
}
|
|
370
|
-
const keys = result.data;
|
|
371
|
-
if (!keys || keys.length === 0) {
|
|
372
|
-
process.stderr.write("No API keys found. Run: hive keys create\n");
|
|
373
|
-
return;
|
|
374
|
-
}
|
|
375
|
-
process.stderr.write(`
|
|
376
|
-
${"KEY".padEnd(20)} ${"NAME".padEnd(15)} STATUS
|
|
377
|
-
`);
|
|
378
|
-
process.stderr.write(
|
|
379
|
-
` ${"\u2500".repeat(20)} ${"\u2500".repeat(15)} ${"\u2500".repeat(10)}
|
|
380
|
-
`
|
|
381
|
-
);
|
|
382
|
-
for (const k of keys) {
|
|
383
|
-
const prefix = k.prefix || "???";
|
|
384
|
-
const name = k.name || "Unnamed";
|
|
385
|
-
const enabled = k.enabled ? "active" : "disabled";
|
|
386
|
-
process.stderr.write(
|
|
387
|
-
` ${(prefix + "...").padEnd(20)} ${name.padEnd(15)} ${enabled}
|
|
388
|
-
`
|
|
389
|
-
);
|
|
390
|
-
}
|
|
391
|
-
process.stderr.write("\n");
|
|
392
|
-
}
|
|
393
|
-
async function runKeysCreate(opts) {
|
|
394
|
-
const { createKey } = await import("./api-client-FTVDFW5V.js");
|
|
395
|
-
const creds = getCredentials();
|
|
396
|
-
const config = getConfig();
|
|
397
|
-
const jwt = creds.profiles[config.activeProfile]?.jwt;
|
|
398
|
-
if (!jwt) {
|
|
399
|
-
process.stderr.write(
|
|
400
|
-
"No session token. Run: hive auth signup or hive auth login\n"
|
|
401
|
-
);
|
|
402
|
-
process.exit(1);
|
|
403
|
-
}
|
|
404
|
-
const name = opts.name ?? "CLI Key";
|
|
405
|
-
process.stderr.write(`Creating API key "${name}"...
|
|
406
|
-
`);
|
|
407
|
-
const result = await createKey(jwt, name);
|
|
408
|
-
if (!result.ok) {
|
|
409
|
-
const errMsg = result.error?.message ?? "Key creation failed";
|
|
410
|
-
process.stderr.write(`Error: ${errMsg}
|
|
411
|
-
`);
|
|
412
|
-
process.exit(1);
|
|
413
|
-
}
|
|
414
|
-
const data = result.data;
|
|
415
|
-
process.stderr.write(`
|
|
416
|
-
API Key: ${data.key}
|
|
417
|
-
`);
|
|
418
|
-
process.stderr.write(`Key ID: ${data.key_id}
|
|
419
|
-
`);
|
|
420
|
-
process.stderr.write(
|
|
421
|
-
`WARNING: Save this key \u2014 it will not be shown again.
|
|
422
|
-
|
|
423
|
-
`
|
|
424
|
-
);
|
|
425
|
-
}
|
|
426
|
-
async function runKeysRevoke(keyId) {
|
|
427
|
-
const { revokeKeyApi } = await import("./api-client-FTVDFW5V.js");
|
|
428
|
-
const creds = getCredentials();
|
|
429
|
-
const config = getConfig();
|
|
430
|
-
const jwt = creds.profiles[config.activeProfile]?.jwt;
|
|
431
|
-
if (!jwt) {
|
|
432
|
-
process.stderr.write(
|
|
433
|
-
"No session token. Run: hive auth signup or hive auth login\n"
|
|
434
|
-
);
|
|
435
|
-
process.exit(1);
|
|
436
|
-
}
|
|
437
|
-
process.stderr.write(`Revoking key ${keyId}...
|
|
438
|
-
`);
|
|
439
|
-
const result = await revokeKeyApi(jwt, keyId);
|
|
440
|
-
if (result.ok) {
|
|
441
|
-
process.stderr.write("Key revoked.\n");
|
|
442
|
-
} else {
|
|
443
|
-
process.stderr.write("Failed to revoke key.\n");
|
|
444
|
-
process.exit(1);
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
296
|
async function runUsage() {
|
|
448
|
-
const { getUsage } = await import("./api-client-
|
|
297
|
+
const { getUsage } = await import("./api-client-WMWFWXC7.js");
|
|
449
298
|
const result = await getUsage();
|
|
450
299
|
if (!result.ok) {
|
|
451
300
|
const { outputError } = await import("./output-ITGLBKIG.js");
|
|
@@ -453,7 +302,7 @@ async function runUsage() {
|
|
|
453
302
|
const code = result.error?.code;
|
|
454
303
|
const err = code === "AUTH_REQUIRED" || code === "INVALID_TOKEN" ? new CliError(
|
|
455
304
|
"AUTH_REQUIRED",
|
|
456
|
-
code === "INVALID_TOKEN" ? "API key was rejected
|
|
305
|
+
code === "INVALID_TOKEN" ? "API key was rejected; usage requires a valid account key." : "No API key found; usage requires an account key.",
|
|
457
306
|
"Run: hive auth login (or set HIVE_API_KEY)"
|
|
458
307
|
) : classifyError(result.error?.message ?? "Failed to fetch usage");
|
|
459
308
|
await outputError(err, {});
|
|
@@ -495,9 +344,5 @@ export {
|
|
|
495
344
|
runWhoami,
|
|
496
345
|
runProfiles,
|
|
497
346
|
runSwitch,
|
|
498
|
-
runSignup,
|
|
499
|
-
runKeysList,
|
|
500
|
-
runKeysCreate,
|
|
501
|
-
runKeysRevoke,
|
|
502
347
|
runUsage
|
|
503
348
|
};
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
getSupabaseAdmin,
|
|
8
8
|
resolveEndpoint,
|
|
9
9
|
secureLogger
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-AGM2CIRL.js";
|
|
11
11
|
|
|
12
12
|
// src/services/wallet-service.ts
|
|
13
13
|
async function consumeCredits(args) {
|
|
@@ -45,10 +45,11 @@ async function ensureWallet(userId, planId) {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
async function getWalletStatus(userId) {
|
|
48
|
-
const { data, error } = await getSupabaseAdmin().
|
|
49
|
-
|
|
50
|
-
)
|
|
51
|
-
|
|
48
|
+
const { data, error } = await getSupabaseAdmin().rpc("read_wallet", {
|
|
49
|
+
p_user_id: userId
|
|
50
|
+
});
|
|
51
|
+
const row = Array.isArray(data) ? data[0] : data;
|
|
52
|
+
if (error || !row) {
|
|
52
53
|
secureLogger.warn("getWalletStatus returned no row", {
|
|
53
54
|
userId,
|
|
54
55
|
hasError: !!error,
|
|
@@ -58,12 +59,12 @@ async function getWalletStatus(userId) {
|
|
|
58
59
|
return null;
|
|
59
60
|
}
|
|
60
61
|
return {
|
|
61
|
-
planId:
|
|
62
|
-
balance:
|
|
63
|
-
monthlyGrant:
|
|
64
|
-
cycleStart:
|
|
65
|
-
cycleEnd:
|
|
66
|
-
updatedAt:
|
|
62
|
+
planId: row.plan_id,
|
|
63
|
+
balance: row.balance ?? null,
|
|
64
|
+
monthlyGrant: row.monthly_grant,
|
|
65
|
+
cycleStart: row.cycle_start,
|
|
66
|
+
cycleEnd: row.cycle_end,
|
|
67
|
+
updatedAt: row.updated_at
|
|
67
68
|
};
|
|
68
69
|
}
|
|
69
70
|
async function applyPlanChange(args) {
|
|
@@ -80,7 +81,8 @@ async function applyPlanChange(args) {
|
|
|
80
81
|
p_subscription_id: args.subscriptionId ?? null,
|
|
81
82
|
p_subscription_status: args.subscriptionStatus ?? null,
|
|
82
83
|
p_price_id: args.priceId ?? null,
|
|
83
|
-
p_ledger_reason: args.ledgerReason ?? "plan_change"
|
|
84
|
+
p_ledger_reason: args.ledgerReason ?? "plan_change",
|
|
85
|
+
p_term_end: args.termEnd ?? null
|
|
84
86
|
});
|
|
85
87
|
if (error) {
|
|
86
88
|
secureLogger.error("apply_plan_change RPC failed", error, {
|
package/build/cli.js
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
executeTool
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-SFN772RL.js";
|
|
6
6
|
import {
|
|
7
7
|
ExitCode
|
|
8
8
|
} from "./chunk-R6YZTFQL.js";
|
|
9
9
|
import {
|
|
10
10
|
NAMESPACE
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-GWZIAAQ2.js";
|
|
12
|
+
import "./chunk-P7NLFSZQ.js";
|
|
13
13
|
import "./chunk-RU6QOFHH.js";
|
|
14
14
|
import {
|
|
15
15
|
checkForUpdates
|
|
@@ -3414,7 +3414,7 @@ process.on("SIGINT", () => process.exit(130));
|
|
|
3414
3414
|
process.on("SIGTERM", () => process.exit(143));
|
|
3415
3415
|
var program2 = new Command();
|
|
3416
3416
|
program2.name("hive").version(SERVER_VERSION).description(
|
|
3417
|
-
"Hive Intelligence
|
|
3417
|
+
"Hive Intelligence: managed crypto market data, DeFi, wallets, security, DEX, NFTs, and prediction markets for AI agents and developers"
|
|
3418
3418
|
).exitOverride().configureOutput({
|
|
3419
3419
|
writeErr: (str) => process.stderr.write(str),
|
|
3420
3420
|
outputError: (str, write) => {
|
|
@@ -3440,7 +3440,7 @@ program2.hook("preAction", (thisCommand) => {
|
|
|
3440
3440
|
setCliFlags({ apiKey: opts.apiKey, noRetry: opts.retry === false });
|
|
3441
3441
|
});
|
|
3442
3442
|
program2.action(async () => {
|
|
3443
|
-
const { startStdio } = await import("./serve-
|
|
3443
|
+
const { startStdio } = await import("./serve-PWMT5IRU.js");
|
|
3444
3444
|
await startStdio(program2.opts().envFile);
|
|
3445
3445
|
});
|
|
3446
3446
|
program2.command("serve").description("Start the MCP server").option("--http", "Start HTTP server instead of stdio").option("--port <number>", "HTTP server port", "8080").action(async (opts) => {
|
|
@@ -3453,10 +3453,10 @@ program2.command("serve").description("Start the MCP server").option("--http", "
|
|
|
3453
3453
|
);
|
|
3454
3454
|
process.exit(ExitCode.INVALID_ARGS);
|
|
3455
3455
|
}
|
|
3456
|
-
const { startHttp } = await import("./serve-
|
|
3456
|
+
const { startHttp } = await import("./serve-PWMT5IRU.js");
|
|
3457
3457
|
await startHttp(port, program2.opts().envFile);
|
|
3458
3458
|
} else {
|
|
3459
|
-
const { startStdio } = await import("./serve-
|
|
3459
|
+
const { startStdio } = await import("./serve-PWMT5IRU.js");
|
|
3460
3460
|
await startStdio(program2.opts().envFile);
|
|
3461
3461
|
}
|
|
3462
3462
|
});
|
|
@@ -3474,10 +3474,10 @@ for (const domain of NAMESPACE) {
|
|
|
3474
3474
|
}
|
|
3475
3475
|
subCmd.option("--args <json>", "Pass all arguments as JSON");
|
|
3476
3476
|
subCmd.action(async (opts) => {
|
|
3477
|
-
let args = {};
|
|
3477
|
+
let args = { ...sub.fixedArgs ?? {} };
|
|
3478
3478
|
if (opts.args) {
|
|
3479
3479
|
try {
|
|
3480
|
-
args = JSON.parse(opts.args);
|
|
3480
|
+
args = { ...args, ...JSON.parse(opts.args) };
|
|
3481
3481
|
} catch {
|
|
3482
3482
|
process.stderr.write("Error: Invalid JSON in --args\n");
|
|
3483
3483
|
process.exit(ExitCode.INVALID_ARGS);
|
|
@@ -3529,15 +3529,15 @@ for (const domain of NAMESPACE) {
|
|
|
3529
3529
|
}
|
|
3530
3530
|
var toolsCmd = program2.command("tools").description("Discover and execute tools");
|
|
3531
3531
|
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) => {
|
|
3532
|
-
const { listTools } = await import("./tools-
|
|
3532
|
+
const { listTools } = await import("./tools-XNFJBN7Q.js");
|
|
3533
3533
|
await listTools(opts);
|
|
3534
3534
|
});
|
|
3535
3535
|
toolsCmd.command("search <query>").description("Search tools by name or description").action(async (query) => {
|
|
3536
|
-
const { searchTools } = await import("./tools-
|
|
3536
|
+
const { searchTools } = await import("./tools-XNFJBN7Q.js");
|
|
3537
3537
|
await searchTools(query);
|
|
3538
3538
|
});
|
|
3539
3539
|
toolsCmd.command("info <name>").description("Show detailed tool schema and description").action(async (name) => {
|
|
3540
|
-
const { toolInfo } = await import("./tools-
|
|
3540
|
+
const { toolInfo } = await import("./tools-XNFJBN7Q.js");
|
|
3541
3541
|
await toolInfo(name);
|
|
3542
3542
|
});
|
|
3543
3543
|
toolsCmd.command("call <name>").description("Execute a tool by name").option("--args <json>", "Tool arguments as JSON (or pipe JSON via stdin)").action(async (name, opts) => {
|
|
@@ -3566,11 +3566,11 @@ toolsCmd.command("call <name>").description("Execute a tool by name").option("--
|
|
|
3566
3566
|
await executeTool(name, args, timeout);
|
|
3567
3567
|
});
|
|
3568
3568
|
toolsCmd.command("refresh").description("Force-refresh the tool catalog cache").action(async () => {
|
|
3569
|
-
const { refreshTools } = await import("./tools-
|
|
3569
|
+
const { refreshTools } = await import("./tools-XNFJBN7Q.js");
|
|
3570
3570
|
await refreshTools();
|
|
3571
3571
|
});
|
|
3572
3572
|
var configCmd = program2.command("config").description("Generate configuration for MCP clients");
|
|
3573
|
-
configCmd.command("claude-desktop").description("Print Claude Desktop
|
|
3573
|
+
configCmd.command("claude-desktop").description("Print Claude Desktop Connectors setup steps").action(async () => {
|
|
3574
3574
|
const { configClaudeDesktop } = await import("./config-KAEUX6RM.js");
|
|
3575
3575
|
configClaudeDesktop();
|
|
3576
3576
|
});
|
|
@@ -3578,7 +3578,7 @@ configCmd.command("cursor").description("Print Cursor config JSON").action(async
|
|
|
3578
3578
|
const { configCursor } = await import("./config-KAEUX6RM.js");
|
|
3579
3579
|
configCursor();
|
|
3580
3580
|
});
|
|
3581
|
-
configCmd.command("vscode").description("Print VS Code mcp
|
|
3581
|
+
configCmd.command("vscode").description("Print VS Code one-click install link and add-mcp command").action(async () => {
|
|
3582
3582
|
const { configVscode } = await import("./config-KAEUX6RM.js");
|
|
3583
3583
|
configVscode();
|
|
3584
3584
|
});
|
|
@@ -3616,7 +3616,7 @@ program2.command("init").description(
|
|
|
3616
3616
|
"Override the Hive API URL (e.g. for staging or self-hosted)"
|
|
3617
3617
|
).action(async (opts) => {
|
|
3618
3618
|
if (opts.minimal && !opts.all && !opts.browser) {
|
|
3619
|
-
const { runInit } = await import("./init-
|
|
3619
|
+
const { runInit } = await import("./init-COHA3VZI.js");
|
|
3620
3620
|
await runInit(opts);
|
|
3621
3621
|
return;
|
|
3622
3622
|
}
|
|
@@ -3625,7 +3625,7 @@ program2.command("init").description(
|
|
|
3625
3625
|
await runSetup();
|
|
3626
3626
|
return;
|
|
3627
3627
|
}
|
|
3628
|
-
const { runInitAll } = await import("./init-all-
|
|
3628
|
+
const { runInitAll } = await import("./init-all-YTQJLPLR.js");
|
|
3629
3629
|
const exitCode = await runInitAll({
|
|
3630
3630
|
all: Boolean(opts.all),
|
|
3631
3631
|
browser: Boolean(opts.browser),
|
|
@@ -3643,7 +3643,7 @@ program2.command("uninstall").description(
|
|
|
3643
3643
|
"--all",
|
|
3644
3644
|
"Clean every known client (default; explicit flag for symmetry with `init --all`)"
|
|
3645
3645
|
).option("--dry-run", "Preview removals without changing anything").action(async (opts) => {
|
|
3646
|
-
const { runUninstall } = await import("./uninstall-
|
|
3646
|
+
const { runUninstall } = await import("./uninstall-TKDP6C4F.js");
|
|
3647
3647
|
const exitCode = await runUninstall({
|
|
3648
3648
|
all: opts.all !== false,
|
|
3649
3649
|
dryRun: Boolean(opts.dryRun),
|
|
@@ -3652,66 +3652,55 @@ program2.command("uninstall").description(
|
|
|
3652
3652
|
if (exitCode !== 0) process.exit(exitCode);
|
|
3653
3653
|
});
|
|
3654
3654
|
program2.command("doctor").description("Diagnose environment and server connectivity").option("--probe", "Run live API probes (slower)").action(async (opts) => {
|
|
3655
|
-
const { runDoctor } = await import("./doctor-
|
|
3655
|
+
const { runDoctor } = await import("./doctor-XG5IQCXK.js");
|
|
3656
3656
|
await runDoctor(opts);
|
|
3657
3657
|
});
|
|
3658
3658
|
program2.command("upgrade").description("Update Hive to the latest published version").action(async () => {
|
|
3659
|
-
const { runUpgrade } = await import("./upgrade-
|
|
3659
|
+
const { runUpgrade } = await import("./upgrade-ODPKMIDC.js");
|
|
3660
3660
|
await runUpgrade();
|
|
3661
3661
|
});
|
|
3662
3662
|
program2.command("completion <shell>").description("Generate shell completion script (bash, zsh, fish, powershell)").option("--install", "Auto-install to shell rc file").action(async (shell, opts) => {
|
|
3663
3663
|
if (opts.install) {
|
|
3664
|
-
const { installCompletion } = await import("./completion-
|
|
3664
|
+
const { installCompletion } = await import("./completion-C57PDJMY.js");
|
|
3665
3665
|
await installCompletion(shell);
|
|
3666
3666
|
} else {
|
|
3667
|
-
const { generateCompletion } = await import("./completion-
|
|
3667
|
+
const { generateCompletion } = await import("./completion-C57PDJMY.js");
|
|
3668
3668
|
await generateCompletion(shell);
|
|
3669
3669
|
}
|
|
3670
3670
|
});
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3671
|
+
program2.command("keys").description("Retired \u2014 manage API keys in the dashboard").allowUnknownOption(true).argument("[args...]").action(() => {
|
|
3672
|
+
console.error(
|
|
3673
|
+
"`hive keys` was retired. Manage API keys at https://www.hiveintelligence.xyz/dashboard/connect\nMost clients need no key at all: `hive auth login` signs you in through the browser."
|
|
3674
|
+
);
|
|
3675
|
+
process.exitCode = 1;
|
|
3675
3676
|
});
|
|
3677
|
+
var authCmd = program2.command("auth").description("Manage authentication profiles");
|
|
3676
3678
|
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) => {
|
|
3677
|
-
const { runLogin } = await import("./auth-
|
|
3679
|
+
const { runLogin } = await import("./auth-Y4GXW376.js");
|
|
3678
3680
|
await runLogin(opts);
|
|
3679
3681
|
});
|
|
3680
3682
|
authCmd.command("logout").description("Remove stored credentials").action(async () => {
|
|
3681
|
-
const { runLogout } = await import("./auth-
|
|
3683
|
+
const { runLogout } = await import("./auth-Y4GXW376.js");
|
|
3682
3684
|
await runLogout();
|
|
3683
3685
|
});
|
|
3684
3686
|
authCmd.command("whoami").description("Show current profile").action(async () => {
|
|
3685
|
-
const { runWhoami } = await import("./auth-
|
|
3687
|
+
const { runWhoami } = await import("./auth-Y4GXW376.js");
|
|
3686
3688
|
await runWhoami();
|
|
3687
3689
|
});
|
|
3688
3690
|
authCmd.command("profiles").description("List all profiles").action(async () => {
|
|
3689
|
-
const { runProfiles } = await import("./auth-
|
|
3691
|
+
const { runProfiles } = await import("./auth-Y4GXW376.js");
|
|
3690
3692
|
await runProfiles();
|
|
3691
3693
|
});
|
|
3692
3694
|
authCmd.command("switch <name>").description("Switch active profile").action(async (name) => {
|
|
3693
|
-
const { runSwitch } = await import("./auth-
|
|
3695
|
+
const { runSwitch } = await import("./auth-Y4GXW376.js");
|
|
3694
3696
|
await runSwitch(name);
|
|
3695
3697
|
});
|
|
3696
|
-
var keysCmd = program2.command("keys").description("Manage your Hive API keys");
|
|
3697
|
-
keysCmd.command("list").description("List your API keys").action(async () => {
|
|
3698
|
-
const { runKeysList } = await import("./auth-EZFJ5RYB.js");
|
|
3699
|
-
await runKeysList();
|
|
3700
|
-
});
|
|
3701
|
-
keysCmd.command("create").description("Create a new API key").option("--name <name>", "Key name", "CLI Key").action(async (opts) => {
|
|
3702
|
-
const { runKeysCreate } = await import("./auth-EZFJ5RYB.js");
|
|
3703
|
-
await runKeysCreate(opts);
|
|
3704
|
-
});
|
|
3705
|
-
keysCmd.command("revoke <id>").description("Revoke an API key").action(async (id) => {
|
|
3706
|
-
const { runKeysRevoke } = await import("./auth-EZFJ5RYB.js");
|
|
3707
|
-
await runKeysRevoke(id);
|
|
3708
|
-
});
|
|
3709
3698
|
program2.command("usage").description("Show your API usage and plan limits").action(async () => {
|
|
3710
|
-
const { runUsage } = await import("./auth-
|
|
3699
|
+
const { runUsage } = await import("./auth-Y4GXW376.js");
|
|
3711
3700
|
await runUsage();
|
|
3712
3701
|
});
|
|
3713
3702
|
program2.command("status").description("Quick health and version check").action(async () => {
|
|
3714
|
-
const { runStatus } = await import("./doctor-
|
|
3703
|
+
const { runStatus } = await import("./doctor-XG5IQCXK.js");
|
|
3715
3704
|
await runStatus();
|
|
3716
3705
|
});
|
|
3717
3706
|
program2.command("open [target]").description("Open Hive dashboard, docs, status, or GitHub in browser").action(async (target) => {
|
|
@@ -3742,7 +3731,7 @@ program2.command("watch <domain> <command>").description("Poll a tool on interva
|
|
|
3742
3731
|
}
|
|
3743
3732
|
const interval = parseInt(opts.interval, 10);
|
|
3744
3733
|
const timeout = parseInt(program2.opts().timeout, 10);
|
|
3745
|
-
const { runWatch } = await import("./watch-
|
|
3734
|
+
const { runWatch } = await import("./watch-MXJSNGL2.js");
|
|
3746
3735
|
await runWatch(cmdDef.tool, args, interval, timeout);
|
|
3747
3736
|
});
|
|
3748
3737
|
var aliasCmd = program2.command("alias").description("Manage command aliases");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
fetchToolCatalog
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-P7NLFSZQ.js";
|
|
5
5
|
import "./chunk-ZXKFJQDE.js";
|
|
6
6
|
import {
|
|
7
7
|
debug,
|
|
@@ -48,7 +48,7 @@ async function runDoctor(opts) {
|
|
|
48
48
|
checks.push({
|
|
49
49
|
check: "Server health",
|
|
50
50
|
status: "PASS",
|
|
51
|
-
detail: `${resp.status}
|
|
51
|
+
detail: `${resp.status}: ${serverStatus}`
|
|
52
52
|
});
|
|
53
53
|
} else {
|
|
54
54
|
checks.push({
|
|
@@ -109,7 +109,7 @@ async function runDoctor(opts) {
|
|
|
109
109
|
checks.push({
|
|
110
110
|
check: "Updates",
|
|
111
111
|
status: "WARN",
|
|
112
|
-
detail: `v${SERVER_VERSION} -> v${latest} available
|
|
112
|
+
detail: `v${SERVER_VERSION} -> v${latest} available. Run: hive upgrade`
|
|
113
113
|
});
|
|
114
114
|
} else {
|
|
115
115
|
checks.push({
|
|
@@ -204,9 +204,9 @@ ${fails === 0 ? "All checks passed" : `${fails} issues found`}${warns ? ` (${war
|
|
|
204
204
|
if (fails > 0) process.exit(1);
|
|
205
205
|
}
|
|
206
206
|
async function runStatus() {
|
|
207
|
-
const { SERVER_VERSION } = await import("./mcpServer-
|
|
207
|
+
const { SERVER_VERSION } = await import("./mcpServer-XHIN5JER.js");
|
|
208
208
|
const { resolveApiKey, resolveApiUrl } = await import("./config-dir-5IH7MOOT.js");
|
|
209
|
-
const { getActiveProfile, maskKey } = await import("./auth-
|
|
209
|
+
const { getActiveProfile, maskKey } = await import("./auth-Y4GXW376.js");
|
|
210
210
|
const apiUrl = resolveApiUrl();
|
|
211
211
|
const apiKey = resolveApiKey();
|
|
212
212
|
const profile = getActiveProfile();
|
|
@@ -112,7 +112,7 @@ Validating API key against ${baseUrl}...`);
|
|
|
112
112
|
console.log("API key validated successfully.\n");
|
|
113
113
|
} else if (resp.status === 401 || resp.status === 403) {
|
|
114
114
|
console.log(
|
|
115
|
-
`Warning: Server returned ${resp.status}
|
|
115
|
+
`Warning: Server returned ${resp.status}; the key may be invalid.
|
|
116
116
|
`
|
|
117
117
|
);
|
|
118
118
|
} else {
|
|
@@ -123,14 +123,14 @@ Validating API key against ${baseUrl}...`);
|
|
|
123
123
|
}
|
|
124
124
|
} catch {
|
|
125
125
|
console.log(
|
|
126
|
-
`Warning: Could not reach ${baseUrl}
|
|
126
|
+
`Warning: Could not reach ${baseUrl}; check the URL and try again.
|
|
127
127
|
`
|
|
128
128
|
);
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
const lines = Object.entries(existing).map(([k, v]) => `${k}=${v}`).join("\n");
|
|
132
132
|
if (opts.dryRun) {
|
|
133
|
-
console.log("Dry run
|
|
133
|
+
console.log("Dry run: would write to .env:\n");
|
|
134
134
|
console.log(redactEnvForDisplay(lines));
|
|
135
135
|
console.log("");
|
|
136
136
|
return;
|