hive-intelligence 1.6.3 → 1.7.1
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 +10 -4
- package/agent-skills/.claude-plugin/plugin.json +10 -0
- package/agent-skills/README.md +2 -0
- package/agent-skills/SKILL.md +18 -6
- package/agent-skills/evals/trigger-queries.json +70 -0
- package/agent-skills/package.json +3 -1
- package/agent-skills/packs/hive/SKILL.md +382 -0
- package/agent-skills/packs/hive/evals/evals.json +50 -0
- package/agent-skills/packs/hive/evals/triggers.json +15 -0
- package/agent-skills/packs/hive-build-onboarding/SKILL.md +1 -1
- package/agent-skills/packs/hive-cli/SKILL.md +2 -2
- package/agent-skills/packs/hive-mcp/SKILL.md +9 -5
- package/agent-skills/packs/hive-prediction-markets/SKILL.md +145 -0
- package/agent-skills/packs/hive-prediction-markets/evals/evals.json +29 -0
- package/agent-skills/packs/hive-prediction-markets/evals/triggers.json +14 -0
- package/agent-skills/packs/hive-query/SKILL.md +2 -1
- package/agent-skills/packs/hive-stateful-monitoring/SKILL.md +3 -3
- package/agent-skills/references/agents-routing.md +4 -1
- package/agent-skills/scripts/validate-agent-skills-package.mjs +2 -0
- package/agent-skills/skills.sh.json +9 -1
- package/build/{api-client-6AM3HVHQ.js → api-client-UGNFUZ2L.js} +12 -3
- package/build/{auth-4LPSQJXD.js → auth-5TLYP2DC.js} +1 -1
- package/build/call-args-NVOYX6DL.js +27 -0
- package/build/{chunk-XZJICKAL.js → chunk-2C5FBG7B.js} +4 -3
- package/build/{chunk-IJ5KOZH5.js → chunk-3SQPLZW6.js} +42730 -39105
- package/build/{chunk-S4HBVZ7O.js → chunk-3Z5VR53Z.js} +36 -7
- package/build/{chunk-GADPH72D.js → chunk-4QDGA6GP.js} +52 -1
- package/build/{chunk-2SPCKQBJ.js → chunk-5QAXJON7.js} +71 -0
- package/build/{chunk-GYVF75XB.js → chunk-FQNW6SZ6.js} +1 -1
- package/build/{chunk-LW2DHE32.js → chunk-L4KVJDA7.js} +1 -1
- package/build/chunk-POPAEM4E.js +474 -0
- package/build/{chunk-P7NLFSZQ.js → chunk-TWYGJEVN.js} +100 -9
- package/build/{chunk-32NRUWXA.js → chunk-UPWYFTTJ.js} +3 -3
- package/build/{chunk-KUF754NT.js → chunk-WII7MTYZ.js} +52 -12
- package/build/chunk-XN3T6YOG.js +32 -0
- package/build/chunk-XT6RURQV.js +394 -0
- package/build/{chunk-LP5ECG7A.js → chunk-ZDXMZPC6.js} +26 -2
- package/build/cli.js +120 -48
- package/build/{completion-YVSWWF6D.js → completion-ROZAH667.js} +1 -1
- package/build/{doctor-YBCU5FLQ.js → doctor-44WSVNGJ.js} +42 -5
- package/build/{errors-EL6UMXNJ.js → errors-W3GXQN34.js} +7 -1
- package/build/feedback-FRRLZDAF.js +113 -0
- package/build/{init-all-54G3CVZA.js → init-all-LYRFE2YQ.js} +5 -5
- package/build/{mcpServer-V4XUSCX7.js → mcpServer-43LTLURB.js} +2 -2
- package/build/monitor-worker.js +62 -10
- package/build/{namespace-PA2IDNRT.js → namespace-XMFFW47T.js} +1 -1
- package/build/{output-XGTE4EWJ.js → output-BBHBJI32.js} +5 -1
- package/build/release.json +4 -4
- package/build/routing-CP43PP5F.js +43 -0
- package/build/{serve-SU67DIY3.js → serve-LTMDRKXS.js} +1 -1
- package/build/server.js +295 -41
- package/build/stdio.js +2 -2
- package/build/{tools-FNPMELSU.js → tools-VA7JXD3K.js} +81 -33
- package/build/{uninstall-P3JJZCXT.js → uninstall-3KJLHTNM.js} +26 -7
- package/build/{upgrade-ATIFZANV.js → upgrade-3NR3LAGU.js} +2 -2
- package/build/{watch-FG2C5Y2Z.js → watch-HJOTI32P.js} +5 -3
- package/package.json +1 -1
|
@@ -12,6 +12,14 @@ var ExitCode = {
|
|
|
12
12
|
RATE_LIMITED: 6,
|
|
13
13
|
TIMEOUT: 124
|
|
14
14
|
};
|
|
15
|
+
var NEVER_RETRY_ERROR_CODES = /* @__PURE__ */ new Set([
|
|
16
|
+
"ANON_QUOTA_EXCEEDED",
|
|
17
|
+
"ANON_GLOBAL_CAP_EXCEEDED",
|
|
18
|
+
"ANON_AUTH_REQUIRED",
|
|
19
|
+
"QUOTA_EXCEEDED",
|
|
20
|
+
"NO_WALLET",
|
|
21
|
+
"FEEDBACK_RATE_LIMITED"
|
|
22
|
+
]);
|
|
15
23
|
var ERROR_CODE_TO_EXIT = {
|
|
16
24
|
GENERAL_ERROR: ExitCode.GENERAL_ERROR,
|
|
17
25
|
INVALID_ARGS: ExitCode.INVALID_ARGS,
|
|
@@ -22,16 +30,38 @@ var ERROR_CODE_TO_EXIT = {
|
|
|
22
30
|
AUTH_REQUIRED: ExitCode.AUTH_FAILURE,
|
|
23
31
|
RATE_LIMITED: ExitCode.RATE_LIMITED,
|
|
24
32
|
TIMEOUT: ExitCode.TIMEOUT,
|
|
25
|
-
VALIDATION_ERROR: ExitCode.INVALID_ARGS
|
|
33
|
+
VALIDATION_ERROR: ExitCode.INVALID_ARGS,
|
|
34
|
+
// Cap lane: exit 6, the same class as RATE_LIMITED, because the fix is
|
|
35
|
+
// "wait for the reset or bring a key", not "fix the call".
|
|
36
|
+
ANON_QUOTA_EXCEEDED: ExitCode.RATE_LIMITED,
|
|
37
|
+
ANON_GLOBAL_CAP_EXCEEDED: ExitCode.RATE_LIMITED,
|
|
38
|
+
ANON_AUTH_REQUIRED: ExitCode.RATE_LIMITED,
|
|
39
|
+
QUOTA_EXCEEDED: ExitCode.RATE_LIMITED,
|
|
40
|
+
FEEDBACK_RATE_LIMITED: ExitCode.RATE_LIMITED,
|
|
41
|
+
// Account state, not a cap: there is no reset time and retrying cannot help.
|
|
42
|
+
NO_WALLET: ExitCode.API_ERROR
|
|
26
43
|
};
|
|
44
|
+
var ERROR_DOCS_BASE = "https://www.hiveintelligence.xyz/errors#";
|
|
45
|
+
function errorDocSlug(code) {
|
|
46
|
+
return code.toLowerCase().replace(/_/g, "-");
|
|
47
|
+
}
|
|
27
48
|
var ERROR_DOC_URLS = {
|
|
28
49
|
AUTH_REQUIRED: "https://www.hiveintelligence.xyz/errors#auth-required",
|
|
29
50
|
RATE_LIMITED: "https://www.hiveintelligence.xyz/errors#rate-limited",
|
|
30
51
|
TIMEOUT: "https://www.hiveintelligence.xyz/errors#timeout",
|
|
31
52
|
PROVIDER_UNAVAILABLE: "https://www.hiveintelligence.xyz/errors#provider-unavailable",
|
|
32
53
|
TOOL_NOT_FOUND: "https://www.hiveintelligence.xyz/errors#tool-not-found",
|
|
33
|
-
TOOL_RETIRED: "https://www.hiveintelligence.xyz/errors#tool-retired"
|
|
54
|
+
TOOL_RETIRED: "https://www.hiveintelligence.xyz/errors#tool-retired",
|
|
55
|
+
ANON_QUOTA_EXCEEDED: `${ERROR_DOCS_BASE}${errorDocSlug("ANON_QUOTA_EXCEEDED")}`,
|
|
56
|
+
ANON_GLOBAL_CAP_EXCEEDED: `${ERROR_DOCS_BASE}${errorDocSlug("ANON_GLOBAL_CAP_EXCEEDED")}`,
|
|
57
|
+
ANON_AUTH_REQUIRED: `${ERROR_DOCS_BASE}${errorDocSlug("ANON_AUTH_REQUIRED")}`,
|
|
58
|
+
QUOTA_EXCEEDED: `${ERROR_DOCS_BASE}${errorDocSlug("QUOTA_EXCEEDED")}`,
|
|
59
|
+
NO_WALLET: `${ERROR_DOCS_BASE}${errorDocSlug("NO_WALLET")}`,
|
|
60
|
+
FEEDBACK_RATE_LIMITED: `${ERROR_DOCS_BASE}${errorDocSlug("FEEDBACK_RATE_LIMITED")}`
|
|
34
61
|
};
|
|
62
|
+
function isCliErrorCode(code) {
|
|
63
|
+
return typeof code === "string" && code in ERROR_CODE_TO_EXIT;
|
|
64
|
+
}
|
|
35
65
|
var CliError = class extends Error {
|
|
36
66
|
code;
|
|
37
67
|
exitCode;
|
|
@@ -61,11 +91,7 @@ function classifyError(error, toolName) {
|
|
|
61
91
|
);
|
|
62
92
|
}
|
|
63
93
|
if (lower.includes("api key") || lower.includes("unauthorized") || lower.includes("not configured") || lower.includes("unavailable")) {
|
|
64
|
-
return new CliError(
|
|
65
|
-
"PROVIDER_UNAVAILABLE",
|
|
66
|
-
msg,
|
|
67
|
-
"Run: hive auth login"
|
|
68
|
-
);
|
|
94
|
+
return new CliError("PROVIDER_UNAVAILABLE", msg, "Run: hive auth login");
|
|
69
95
|
}
|
|
70
96
|
if (lower.includes("not found") && toolName) {
|
|
71
97
|
return new CliError(
|
|
@@ -82,7 +108,10 @@ function suggestSimilarTools(input, toolNames, maxDistance = 3) {
|
|
|
82
108
|
|
|
83
109
|
export {
|
|
84
110
|
ExitCode,
|
|
111
|
+
NEVER_RETRY_ERROR_CODES,
|
|
112
|
+
errorDocSlug,
|
|
85
113
|
ERROR_DOC_URLS,
|
|
114
|
+
isCliErrorCode,
|
|
86
115
|
CliError,
|
|
87
116
|
classifyError,
|
|
88
117
|
suggestSimilarTools
|
|
@@ -2,6 +2,38 @@ import { createRequire } from 'node:module'; const require = createRequire(impor
|
|
|
2
2
|
|
|
3
3
|
// src/agentSkills.ts
|
|
4
4
|
var HIVE_AGENT_SKILLS = [
|
|
5
|
+
{
|
|
6
|
+
name: "hive",
|
|
7
|
+
label: "Hive",
|
|
8
|
+
description: "One skill for live crypto intelligence on MCP or the hive CLI: setup, routing block, the Hive loop, credits and error codes, feedback, and the archive history other tools cannot answer.",
|
|
9
|
+
path: "agent-skills/packs/hive/SKILL.md",
|
|
10
|
+
toolsetIds: [
|
|
11
|
+
"market_research",
|
|
12
|
+
"token_diligence",
|
|
13
|
+
"wallet_investigation",
|
|
14
|
+
"security_risk",
|
|
15
|
+
"onchain_dex_pool_analysis",
|
|
16
|
+
"defi_protocol_analysis",
|
|
17
|
+
"nft_research",
|
|
18
|
+
"network_infrastructure",
|
|
19
|
+
"solana_analysis",
|
|
20
|
+
"rwa_perp_analysis",
|
|
21
|
+
"stateful_monitoring",
|
|
22
|
+
"prediction_markets",
|
|
23
|
+
"search_discovery"
|
|
24
|
+
],
|
|
25
|
+
useWhen: [
|
|
26
|
+
"live crypto data",
|
|
27
|
+
"funding history",
|
|
28
|
+
"cross-venue basis",
|
|
29
|
+
"hive setup",
|
|
30
|
+
"hive cli",
|
|
31
|
+
"hive routing",
|
|
32
|
+
"keyless quota",
|
|
33
|
+
"credits",
|
|
34
|
+
"hive feedback"
|
|
35
|
+
]
|
|
36
|
+
},
|
|
5
37
|
{
|
|
6
38
|
name: "hive-mcp",
|
|
7
39
|
label: "Install Hive MCP",
|
|
@@ -37,7 +69,7 @@ var HIVE_AGENT_SKILLS = [
|
|
|
37
69
|
{
|
|
38
70
|
name: "hive-query",
|
|
39
71
|
label: "Route A Crypto Query",
|
|
40
|
-
description: "
|
|
72
|
+
description: "Loaded by the hive skill when a question needs the full toolset walk: choose the canonical task toolset, inspect schemas, and call exact Hive tools.",
|
|
41
73
|
path: "agent-skills/packs/hive-query/SKILL.md",
|
|
42
74
|
toolsetIds: [
|
|
43
75
|
"market_research",
|
|
@@ -51,6 +83,7 @@ var HIVE_AGENT_SKILLS = [
|
|
|
51
83
|
"solana_analysis",
|
|
52
84
|
"rwa_perp_analysis",
|
|
53
85
|
"stateful_monitoring",
|
|
86
|
+
"prediction_markets",
|
|
54
87
|
"search_discovery"
|
|
55
88
|
],
|
|
56
89
|
useWhen: [
|
|
@@ -254,6 +287,24 @@ var HIVE_AGENT_SKILLS = [
|
|
|
254
287
|
"chain state",
|
|
255
288
|
"tenderly networks"
|
|
256
289
|
]
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
name: "hive-prediction-markets",
|
|
293
|
+
label: "Prediction Markets",
|
|
294
|
+
description: "Research Polymarket prediction markets: events, markets, market-implied odds, order books, odds history, and wallet positions.",
|
|
295
|
+
path: "agent-skills/packs/hive-prediction-markets/SKILL.md",
|
|
296
|
+
toolsetIds: ["prediction_markets"],
|
|
297
|
+
useWhen: [
|
|
298
|
+
"prediction market",
|
|
299
|
+
"polymarket",
|
|
300
|
+
"kalshi",
|
|
301
|
+
"odds",
|
|
302
|
+
"election odds",
|
|
303
|
+
"sports odds",
|
|
304
|
+
"event market",
|
|
305
|
+
"outcome",
|
|
306
|
+
"implied probability"
|
|
307
|
+
]
|
|
257
308
|
}
|
|
258
309
|
];
|
|
259
310
|
|
|
@@ -1,6 +1,30 @@
|
|
|
1
1
|
import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
|
|
2
2
|
|
|
3
3
|
// src/cli/namespace.ts
|
|
4
|
+
var ARCHIVE_HISTORY_ARGS = {
|
|
5
|
+
base_coin: {
|
|
6
|
+
flag: "--base-coin <ticker>",
|
|
7
|
+
description: "Base asset ticker (BTC, ETH, SOL)",
|
|
8
|
+
required: true
|
|
9
|
+
},
|
|
10
|
+
exchange: {
|
|
11
|
+
flag: "--exchange <name>",
|
|
12
|
+
description: "Venue filter (Binance, Hyperliquid); omit for all venues"
|
|
13
|
+
},
|
|
14
|
+
from: {
|
|
15
|
+
flag: "--from <iso>",
|
|
16
|
+
description: "Inclusive ISO 8601 lower time bound"
|
|
17
|
+
},
|
|
18
|
+
to: {
|
|
19
|
+
flag: "--to <iso>",
|
|
20
|
+
description: "Inclusive ISO 8601 upper time bound"
|
|
21
|
+
},
|
|
22
|
+
limit: {
|
|
23
|
+
flag: "--limit <n>",
|
|
24
|
+
description: "Max rows, newest first",
|
|
25
|
+
type: "number"
|
|
26
|
+
}
|
|
27
|
+
};
|
|
4
28
|
var NAMESPACE = [
|
|
5
29
|
{
|
|
6
30
|
name: "market",
|
|
@@ -610,6 +634,53 @@ var NAMESPACE = [
|
|
|
610
634
|
}
|
|
611
635
|
}
|
|
612
636
|
]
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
name: "archive",
|
|
640
|
+
description: "Hive Archive: cross-venue derivatives history (funding, OI, basis, positioning, liquidations)",
|
|
641
|
+
commands: [
|
|
642
|
+
{
|
|
643
|
+
name: "coverage",
|
|
644
|
+
description: "Archive venues and per-dataset time coverage",
|
|
645
|
+
tool: "archive_get_coverage",
|
|
646
|
+
args: {
|
|
647
|
+
base_coin: {
|
|
648
|
+
flag: "--base-coin <ticker>",
|
|
649
|
+
description: "Probe coin for futures datasets (default BTC)"
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
name: "funding",
|
|
655
|
+
description: "Historical funding-rate settlements",
|
|
656
|
+
tool: "archive_get_funding_history",
|
|
657
|
+
args: { ...ARCHIVE_HISTORY_ARGS }
|
|
658
|
+
},
|
|
659
|
+
{
|
|
660
|
+
name: "oi",
|
|
661
|
+
description: "Historical open-interest snapshots",
|
|
662
|
+
tool: "archive_get_open_interest_history",
|
|
663
|
+
args: { ...ARCHIVE_HISTORY_ARGS }
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
name: "basis",
|
|
667
|
+
description: "Historical spot-vs-futures basis snapshots",
|
|
668
|
+
tool: "archive_get_basis_history",
|
|
669
|
+
args: { ...ARCHIVE_HISTORY_ARGS }
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
name: "long-short",
|
|
673
|
+
description: "Historical long/short-ratio snapshots",
|
|
674
|
+
tool: "archive_get_long_short_history",
|
|
675
|
+
args: { ...ARCHIVE_HISTORY_ARGS }
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
name: "liquidations",
|
|
679
|
+
description: "Historical liquidation events",
|
|
680
|
+
tool: "archive_get_liquidations_history",
|
|
681
|
+
args: { ...ARCHIVE_HISTORY_ARGS }
|
|
682
|
+
}
|
|
683
|
+
]
|
|
613
684
|
}
|
|
614
685
|
];
|
|
615
686
|
function resolveCommand(domain, subcommand) {
|