hive-intelligence 1.1.4 → 1.4.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 (134) hide show
  1. package/README.md +182 -73
  2. package/agent-skills/.claude-plugin/plugin.json +4 -4
  3. package/agent-skills/.mcp.json +1 -4
  4. package/agent-skills/README.md +16 -10
  5. package/agent-skills/SKILL.md +30 -12
  6. package/agent-skills/package.json +1 -1
  7. package/agent-skills/packs/hive-build/SKILL.md +47 -19
  8. package/agent-skills/packs/hive-build/evals/evals.json +16 -3
  9. package/agent-skills/packs/hive-build/evals/triggers.json +50 -0
  10. package/agent-skills/packs/hive-build-onboarding/SKILL.md +30 -37
  11. package/agent-skills/packs/hive-build-onboarding/evals/evals.json +1 -1
  12. package/agent-skills/packs/hive-build-onboarding/evals/triggers.json +50 -0
  13. package/agent-skills/packs/hive-cli/SKILL.md +33 -35
  14. package/agent-skills/packs/hive-cli/evals/evals.json +1 -1
  15. package/agent-skills/packs/hive-cli/evals/triggers.json +50 -0
  16. package/agent-skills/packs/hive-defi-research/SKILL.md +105 -19
  17. package/agent-skills/packs/hive-defi-research/evals/evals.json +6 -3
  18. package/agent-skills/packs/hive-defi-research/evals/triggers.json +50 -0
  19. package/agent-skills/packs/hive-dex-pool-analysis/SKILL.md +106 -16
  20. package/agent-skills/packs/hive-dex-pool-analysis/evals/evals.json +5 -3
  21. package/agent-skills/packs/hive-dex-pool-analysis/evals/triggers.json +50 -0
  22. package/agent-skills/packs/hive-market-research/SKILL.md +130 -21
  23. package/agent-skills/packs/hive-market-research/evals/evals.json +15 -2
  24. package/agent-skills/packs/hive-market-research/evals/triggers.json +50 -0
  25. package/agent-skills/packs/hive-mcp/SKILL.md +69 -47
  26. package/agent-skills/packs/hive-mcp/evals/evals.json +3 -2
  27. package/agent-skills/packs/hive-mcp/evals/triggers.json +50 -0
  28. package/agent-skills/packs/hive-mcp/references/client-install-matrix.md +62 -35
  29. package/agent-skills/packs/hive-mcp/references/clients.md +81 -68
  30. package/agent-skills/packs/hive-network-infrastructure/SKILL.md +105 -20
  31. package/agent-skills/packs/hive-network-infrastructure/evals/evals.json +4 -2
  32. package/agent-skills/packs/hive-network-infrastructure/evals/triggers.json +50 -0
  33. package/agent-skills/packs/hive-nft-research/SKILL.md +105 -18
  34. package/agent-skills/packs/hive-nft-research/evals/evals.json +4 -2
  35. package/agent-skills/packs/hive-nft-research/evals/triggers.json +50 -0
  36. package/agent-skills/packs/hive-prediction-markets/SKILL.md +108 -21
  37. package/agent-skills/packs/hive-prediction-markets/evals/evals.json +4 -2
  38. package/agent-skills/packs/hive-prediction-markets/evals/triggers.json +50 -0
  39. package/agent-skills/packs/hive-query/SKILL.md +79 -33
  40. package/agent-skills/packs/hive-query/evals/evals.json +7 -5
  41. package/agent-skills/packs/hive-query/evals/triggers.json +50 -0
  42. package/agent-skills/packs/hive-query/references/root-mcp-workflow.md +39 -18
  43. package/agent-skills/packs/hive-security-risk/SKILL.md +110 -19
  44. package/agent-skills/packs/hive-security-risk/evals/evals.json +4 -2
  45. package/agent-skills/packs/hive-security-risk/evals/triggers.json +50 -0
  46. package/agent-skills/packs/hive-solana-analysis/SKILL.md +115 -19
  47. package/agent-skills/packs/hive-solana-analysis/evals/evals.json +4 -2
  48. package/agent-skills/packs/hive-solana-analysis/evals/triggers.json +50 -0
  49. package/agent-skills/packs/hive-stateful-monitoring/SKILL.md +92 -47
  50. package/agent-skills/packs/hive-stateful-monitoring/evals/evals.json +7 -2
  51. package/agent-skills/packs/hive-stateful-monitoring/evals/triggers.json +50 -0
  52. package/agent-skills/packs/hive-stateful-monitoring/references/b2b-subject-context.md +53 -0
  53. package/agent-skills/packs/hive-token-diligence/SKILL.md +119 -21
  54. package/agent-skills/packs/hive-token-diligence/evals/evals.json +6 -4
  55. package/agent-skills/packs/hive-token-diligence/evals/triggers.json +50 -0
  56. package/agent-skills/packs/hive-tool-discovery/SKILL.md +48 -19
  57. package/agent-skills/packs/hive-tool-discovery/evals/evals.json +17 -3
  58. package/agent-skills/packs/hive-tool-discovery/evals/triggers.json +50 -0
  59. package/agent-skills/packs/hive-tool-discovery/references/discovery-surfaces.md +31 -6
  60. package/agent-skills/packs/hive-wallet-investigation/SKILL.md +111 -18
  61. package/agent-skills/packs/hive-wallet-investigation/evals/evals.json +5 -3
  62. package/agent-skills/packs/hive-wallet-investigation/evals/triggers.json +50 -0
  63. package/agent-skills/references/agents-routing.md +17 -7
  64. package/agent-skills/scripts/validate-agent-skills-package.mjs +68 -8
  65. package/bin/hive-mcp.js +5 -5
  66. package/build/{alias-3OPMQF4X.js → alias-BKAVOYQV.js} +2 -2
  67. package/build/api-client-WMWFWXC7.js +16 -0
  68. package/build/{auth-Q5Q24IRI.js → auth-HRFQWQMZ.js} +3 -11
  69. package/build/browser-auth-KXIO5BHM.js +20 -0
  70. package/build/{cache-T6KC5YEY.js → cache-TBDQ7QBU.js} +2 -2
  71. package/build/chunk-3OZFBWFK.js +180 -0
  72. package/build/{chunk-POT2MBEK.js → chunk-6PC3HUAK.js} +10 -3
  73. package/build/{chunk-NP6NSOG2.js → chunk-725R3KLJ.js} +26 -3
  74. package/build/chunk-7DYHWY4Y.js +125 -0
  75. package/build/{chunk-ZXB53E7H.js → chunk-AEU43ACS.js} +31 -7
  76. package/build/chunk-AQQAPAER.js +197 -0
  77. package/build/chunk-EPF36Q3Z.js +71 -0
  78. package/build/{upgrade-DTUIHVPS.js → chunk-GHCYCBA3.js} +4 -5
  79. package/build/{chunk-3WYWXTNN.js → chunk-ILVPOLA7.js} +12 -3
  80. package/build/{chunk-VBOKVQ74.js → chunk-L326MQZP.js} +6 -5
  81. package/build/{chunk-FRXMGRZQ.js → chunk-M6REON2I.js} +2 -2
  82. package/build/{chunk-7JWXBKEJ.js → chunk-P7NLFSZQ.js} +9 -60
  83. package/build/chunk-QDZ7MAVN.js +447 -0
  84. package/build/{chunk-ZTJVOWDQ.js → chunk-R6YZTFQL.js} +2 -0
  85. package/build/{chunk-YZ2PXBJK.js → chunk-RU6QOFHH.js} +6 -9
  86. package/build/{chunk-FH3YGSY5.js → chunk-TNQ7GJ6Q.js} +0 -59
  87. package/build/{chunk-5XXI25JE.js → chunk-TVQJY47C.js} +12 -160
  88. package/build/{chunk-JTUKQWIO.js → chunk-UFTNBCSA.js} +35515 -14994
  89. package/build/{chunk-ZCU7XQKF.js → chunk-ZXKFJQDE.js} +7 -1
  90. package/build/cli.js +3342 -3423
  91. package/build/{completion-46K674EL.js → completion-7KBW243H.js} +4 -4
  92. package/build/{config-XE6Q5P4I.js → config-KAEUX6RM.js} +23 -3
  93. package/build/{config-dir-MAWX5AUF.js → config-dir-5IH7MOOT.js} +2 -2
  94. package/build/{doctor-HGMQE6IN.js → doctor-GHUAUFS2.js} +12 -12
  95. package/build/{errors-J2PH3NLJ.js → errors-HGHUF575.js} +2 -2
  96. package/build/{format-5X2HIVDT.js → format-H7FOQSYY.js} +1 -1
  97. package/build/{init-JMDNM7ZZ.js → init-UCTCUYFA.js} +52 -8
  98. package/build/init-all-RG542NWG.js +427 -0
  99. package/build/mcpServer-D7OXUDU5.js +34 -0
  100. package/build/monitor-worker.js +296 -40
  101. package/build/{namespace-FSX2G3NM.js → namespace-L5DGCY7K.js} +2 -2
  102. package/build/{open-5A6ZQMGC.js → open-V2RNA3QT.js} +1 -1
  103. package/build/{output-V3D4YZ6U.js → output-ITGLBKIG.js} +2 -2
  104. package/build/release.json +8 -0
  105. package/build/{serve-AGCOXXFM.js → serve-K3IT7DS4.js} +3 -3
  106. package/build/server.js +6396 -3220
  107. package/build/{setup-RMETGJWK.js → setup-PTYFMTK5.js} +60 -55
  108. package/build/stdio.js +7 -6
  109. package/build/{telemetry-WCME5XEU.js → telemetry-HPLDYR7U.js} +5 -4
  110. package/build/{tools-KAB6QBZC.js → tools-D72ZH6P5.js} +15 -15
  111. package/build/{uninstall-FLJMBBSC.js → uninstall-SAOIPL6K.js} +19 -10
  112. package/build/{update-check-LNZQK3XA.js → update-check-IEXPOYYR.js} +4 -4
  113. package/build/upgrade-4S5XT5JG.js +14 -0
  114. package/build/{version-I6HDAF4L.js → version-Z4HJL4VV.js} +4 -2
  115. package/build/{watch-YNN255QX.js → watch-IOSRSCFE.js} +8 -7
  116. package/package.json +73 -35
  117. package/agent-skills/packs/hive-defi-research/references/workflow.md +0 -41
  118. package/agent-skills/packs/hive-dex-pool-analysis/references/workflow.md +0 -42
  119. package/agent-skills/packs/hive-market-research/references/workflow.md +0 -47
  120. package/agent-skills/packs/hive-network-infrastructure/references/workflow.md +0 -41
  121. package/agent-skills/packs/hive-nft-research/references/workflow.md +0 -42
  122. package/agent-skills/packs/hive-prediction-markets/references/workflow.md +0 -42
  123. package/agent-skills/packs/hive-security-risk/references/workflow.md +0 -46
  124. package/agent-skills/packs/hive-solana-analysis/references/workflow.md +0 -42
  125. package/agent-skills/packs/hive-token-diligence/references/workflow.md +0 -45
  126. package/agent-skills/packs/hive-wallet-investigation/references/workflow.md +0 -45
  127. package/build/api-client-EPF6FD7A.js +0 -28
  128. package/build/browser-auth-VPF5LZMZ.js +0 -8
  129. package/build/chunk-4F5CI6LX.js +0 -340
  130. package/build/chunk-CEWCB5YS.js +0 -71
  131. package/build/chunk-GZPDEXO4.js +0 -126
  132. package/build/chunk-IZPAMRHP.js +0 -43
  133. package/build/init-all-5SKNV75X.js +0 -273
  134. package/build/mcpServer-5TKKSKJM.js +0 -21
@@ -0,0 +1,427 @@
1
+ import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
2
+ import {
3
+ detectClients,
4
+ installSkillsForClients
5
+ } from "./chunk-AEU43ACS.js";
6
+ import {
7
+ getClaudeDesktopInstructions,
8
+ getCodexInstructions,
9
+ getGrokInstructions,
10
+ getVscodeInstructions,
11
+ printChatGptDesktopInstructions,
12
+ writeClaudeCodeUserConfig,
13
+ writeClaudeDesktopConfig,
14
+ writeCodexConfig,
15
+ writeCursorConfig,
16
+ writeGeminiCliConfig,
17
+ writeVscodeConfig,
18
+ writeWindsurfConfig
19
+ } from "./chunk-QDZ7MAVN.js";
20
+ import {
21
+ browserLogin
22
+ } from "./chunk-AQQAPAER.js";
23
+ import {
24
+ saveProfile
25
+ } from "./chunk-TVQJY47C.js";
26
+ import {
27
+ detectInstallMode
28
+ } from "./chunk-GHCYCBA3.js";
29
+ import "./chunk-M6REON2I.js";
30
+ import "./chunk-L326MQZP.js";
31
+ import "./chunk-ZXKFJQDE.js";
32
+ import {
33
+ bold,
34
+ dim,
35
+ green,
36
+ red,
37
+ yellow
38
+ } from "./chunk-725R3KLJ.js";
39
+ import {
40
+ resolveApiKey,
41
+ resolveApiUrl
42
+ } from "./chunk-6PC3HUAK.js";
43
+ import "./chunk-ILVPOLA7.js";
44
+
45
+ // src/cli/init-all.ts
46
+ import { fileURLToPath } from "url";
47
+ var RESTART_HINTS = {
48
+ "claude-code": "Restart Claude Code (or run /mcp in an open session) to pick up the new server.",
49
+ "claude-desktop": "Quit and reopen Claude Desktop to pick up the new server.",
50
+ cursor: 'Reload the Cursor window (Cmd/Ctrl+Shift+P \u2192 "Reload Window") to pick up the new server.',
51
+ vscode: 'Reload the VS Code window (Cmd/Ctrl+Shift+P \u2192 "Reload Window") to pick up the new server.',
52
+ windsurf: "Restart Windsurf to pick up the new server.",
53
+ codex: "Start a new Codex CLI session to pick up the new server.",
54
+ "gemini-cli": "Start a new Gemini CLI session to pick up the new server."
55
+ };
56
+ function w(line) {
57
+ process.stderr.write(line + "\n");
58
+ }
59
+ function step(label) {
60
+ w(`
61
+ ${bold(label)}`);
62
+ }
63
+ function ok(line) {
64
+ w(` ${green("\u2713")} ${line}`);
65
+ }
66
+ function bad(line) {
67
+ w(` ${red("\u2717")} ${line}`);
68
+ }
69
+ function warn(line) {
70
+ w(` ${yellow("!")} ${line}`);
71
+ }
72
+ function info(line) {
73
+ w(` ${dim(line)}`);
74
+ }
75
+ function hiveCommandPrefix() {
76
+ let execPath = "";
77
+ try {
78
+ execPath = fileURLToPath(import.meta.url);
79
+ } catch {
80
+ execPath = process.argv[1] ?? "";
81
+ }
82
+ return detectInstallMode(execPath) === "npx" ? "npx -y -p hive-intelligence@latest " : "";
83
+ }
84
+ function writeForClient(client, apiUrlOverride) {
85
+ const base = {
86
+ client: client.id,
87
+ name: client.name
88
+ };
89
+ if (!client.programmable) {
90
+ if (client.id === "claude-desktop") {
91
+ const inst = getClaudeDesktopInstructions(apiUrlOverride);
92
+ return { ...base, ok: false, manual: true, steps: inst.steps };
93
+ }
94
+ if (client.id === "chatgpt-desktop") {
95
+ const inst = printChatGptDesktopInstructions(apiUrlOverride);
96
+ return { ...base, ok: false, manual: true, steps: inst.steps };
97
+ }
98
+ if (client.id === "grok") {
99
+ const inst = getGrokInstructions(apiUrlOverride);
100
+ return { ...base, ok: false, manual: true, steps: inst.steps };
101
+ }
102
+ return {
103
+ ...base,
104
+ ok: false,
105
+ manual: true,
106
+ error: client.hint || "Manual setup required"
107
+ };
108
+ }
109
+ try {
110
+ let result;
111
+ switch (client.id) {
112
+ case "claude-code":
113
+ result = writeClaudeCodeUserConfig(apiUrlOverride);
114
+ break;
115
+ case "claude-desktop":
116
+ result = writeClaudeDesktopConfig();
117
+ break;
118
+ case "codex": {
119
+ const codex = writeCodexConfig(apiUrlOverride);
120
+ if (!codex.written || !codex.authenticated) {
121
+ return {
122
+ ...base,
123
+ ok: false,
124
+ path: codex.path,
125
+ manual: true,
126
+ steps: getCodexInstructions(apiUrlOverride).steps,
127
+ error: codex.error || "Codex OAuth setup did not complete"
128
+ };
129
+ }
130
+ result = codex;
131
+ break;
132
+ }
133
+ case "cursor":
134
+ result = writeCursorConfig(apiUrlOverride);
135
+ break;
136
+ case "vscode":
137
+ result = writeVscodeConfig(apiUrlOverride);
138
+ if (!result.written) {
139
+ return {
140
+ ...base,
141
+ ok: false,
142
+ manual: true,
143
+ steps: getVscodeInstructions(apiUrlOverride).steps,
144
+ error: "VS Code CLI install did not complete"
145
+ };
146
+ }
147
+ break;
148
+ case "windsurf":
149
+ result = writeWindsurfConfig(apiUrlOverride);
150
+ break;
151
+ case "gemini-cli":
152
+ result = writeGeminiCliConfig(apiUrlOverride);
153
+ break;
154
+ case "chatgpt-desktop":
155
+ return {
156
+ ...base,
157
+ ok: false,
158
+ manual: true,
159
+ steps: printChatGptDesktopInstructions(apiUrlOverride).steps
160
+ };
161
+ case "grok":
162
+ return {
163
+ ...base,
164
+ ok: false,
165
+ manual: true,
166
+ steps: getGrokInstructions(apiUrlOverride).steps
167
+ };
168
+ }
169
+ return {
170
+ ...base,
171
+ ok: result.written,
172
+ path: result.path,
173
+ restartHint: result.written ? RESTART_HINTS[client.id] : void 0,
174
+ error: result.written ? void 0 : "Client configuration was not written"
175
+ };
176
+ } catch (err) {
177
+ return {
178
+ ...base,
179
+ ok: false,
180
+ error: err instanceof Error ? err.message : String(err)
181
+ };
182
+ }
183
+ }
184
+ async function verifyConnection(apiUrlOverride) {
185
+ const apiUrl = (apiUrlOverride || resolveApiUrl()).replace(/\/+$/, "");
186
+ try {
187
+ const controller = new AbortController();
188
+ const timer = setTimeout(() => controller.abort(), 15e3);
189
+ const res = await fetch(`${apiUrl}/mcp`, {
190
+ method: "POST",
191
+ headers: {
192
+ "Content-Type": "application/json",
193
+ // Streamable HTTP POSTs must accept both content types.
194
+ Accept: "application/json, text/event-stream"
195
+ },
196
+ body: JSON.stringify({
197
+ jsonrpc: "2.0",
198
+ id: "hive-init-verify",
199
+ method: "tools/call",
200
+ params: { name: "get_token_price", arguments: { token: "bitcoin" } }
201
+ }),
202
+ signal: controller.signal
203
+ });
204
+ clearTimeout(timer);
205
+ if (res.status === 401) {
206
+ return {
207
+ ok: true,
208
+ detail: "Hosted MCP reachable \u2014 server answered with an auth challenge; finish sign-in inside each client."
209
+ };
210
+ }
211
+ if (!res.ok) {
212
+ return {
213
+ ok: false,
214
+ detail: `Hosted MCP endpoint returned HTTP ${res.status}`
215
+ };
216
+ }
217
+ const contentType = res.headers?.get?.("content-type") ?? "";
218
+ if (contentType.includes("text/event-stream")) {
219
+ return { ok: true, detail: "Hosted MCP reachable (streaming reply)" };
220
+ }
221
+ const body = await res.json();
222
+ if (body?.jsonrpc !== "2.0") {
223
+ return {
224
+ ok: false,
225
+ detail: "Endpoint did not answer with an MCP JSON-RPC envelope"
226
+ };
227
+ }
228
+ if (body.error) {
229
+ const code = body.error.data?.code || "classified error";
230
+ return {
231
+ ok: true,
232
+ detail: `Hosted MCP reachable \u2014 server answered with a classified response (${code})`
233
+ };
234
+ }
235
+ return {
236
+ ok: true,
237
+ detail: "Hosted MCP reachable \u2014 anonymous hero call answered"
238
+ };
239
+ } catch {
240
+ return {
241
+ ok: false,
242
+ detail: "Network failure reaching the hosted MCP endpoint"
243
+ };
244
+ }
245
+ }
246
+ async function runInitAll(opts = {}) {
247
+ const summary = {
248
+ authenticated: false,
249
+ apiKeyPresent: Boolean(resolveApiKey()),
250
+ apiUrl: opts.apiUrl || resolveApiUrl(),
251
+ clients: [],
252
+ skills: [],
253
+ verified: null,
254
+ complete: false,
255
+ dryRun: Boolean(opts.dryRun)
256
+ };
257
+ if (!opts.json) {
258
+ w(bold("\nHive Intelligence \u2014 Init"));
259
+ if (summary.dryRun) info("(dry-run \u2014 nothing will be written)");
260
+ }
261
+ if (opts.browser) {
262
+ step("Authenticating via browser");
263
+ if (summary.dryRun) {
264
+ info("Would open browser sign-in at /auth/cli");
265
+ summary.authenticated = false;
266
+ } else {
267
+ try {
268
+ const result = await browserLogin({
269
+ baseUrl: process.env.HIVE_AUTH_BASE_URL || "https://hiveintelligence.xyz",
270
+ timeout: 3e5
271
+ });
272
+ saveProfile("default", result.key, summary.apiUrl);
273
+ summary.authenticated = true;
274
+ summary.apiKeyPresent = true;
275
+ ok(`Signed in as ${result.email || "(email unavailable)"}`);
276
+ } catch (err) {
277
+ bad(`Browser auth failed: ${err instanceof Error ? err.message : err}`);
278
+ if (!summary.apiKeyPresent) {
279
+ info("Client configs remain secret-free and will use native OAuth.");
280
+ warn(
281
+ "Run `hive auth login --manual` only if you also need the CLI API path."
282
+ );
283
+ }
284
+ }
285
+ }
286
+ } else if (!summary.apiKeyPresent) {
287
+ step("Authentication mode");
288
+ ok("Client configs will use native OAuth; no API key is required.");
289
+ info(
290
+ "For direct CLI or headless API calls, run `hive auth login` separately."
291
+ );
292
+ } else {
293
+ step("Authentication");
294
+ ok("Existing API key resolved (env or saved profile)");
295
+ summary.authenticated = true;
296
+ }
297
+ step("Detecting MCP-capable clients");
298
+ const detected = detectClients();
299
+ for (const c of detected) {
300
+ if (c.detected) {
301
+ ok(`${c.name} ${dim("(" + c.configPath + ")")}`);
302
+ } else if (c.id === "chatgpt-desktop" || c.id === "grok") {
303
+ continue;
304
+ } else if (!opts.all) {
305
+ continue;
306
+ } else {
307
+ info(`${c.name} \u2014 not detected (${c.hint || "skipped"})`);
308
+ }
309
+ }
310
+ const browserOnly = Boolean(opts.browser && !opts.all);
311
+ const targets = browserOnly ? [] : detected.filter((c) => c.detected);
312
+ step("Writing client configs");
313
+ for (const client of targets) {
314
+ if (summary.dryRun && client.programmable) {
315
+ info(`Would write ${client.configPath}`);
316
+ summary.clients.push({
317
+ client: client.id,
318
+ name: client.name,
319
+ ok: true,
320
+ path: client.configPath
321
+ });
322
+ continue;
323
+ }
324
+ const result = writeForClient(client, opts.apiUrl);
325
+ summary.clients.push(result);
326
+ if (result.ok && result.path) {
327
+ ok(`${result.name} ${dim("\u2192 " + result.path)}`);
328
+ if (result.restartHint) info(result.restartHint);
329
+ } else if (result.manual && result.steps) {
330
+ warn(`${result.name} \u2014 manual setup required:`);
331
+ for (const stepText of result.steps) info(` \u2022 ${stepText}`);
332
+ } else {
333
+ bad(`${result.name} \u2014 ${result.error || "unknown error"}`);
334
+ }
335
+ }
336
+ for (const manualId of ["chatgpt-desktop", "grok"]) {
337
+ const client = detected.find((candidate) => candidate.id === manualId);
338
+ if (browserOnly || !client || summary.clients.some((entry) => entry.client === manualId)) {
339
+ continue;
340
+ }
341
+ const steps = manualId === "chatgpt-desktop" ? printChatGptDesktopInstructions(opts.apiUrl).steps : getGrokInstructions(opts.apiUrl).steps;
342
+ summary.clients.push({
343
+ client: manualId,
344
+ name: client.name,
345
+ ok: false,
346
+ manual: true,
347
+ steps
348
+ });
349
+ info(
350
+ `${client.name} \u2014 manual setup (${manualId === "grok" ? "grok.com/connectors" : "Settings \u2192 Apps"})`
351
+ );
352
+ }
353
+ if (!opts.skipSkills && !browserOnly) {
354
+ step("Installing skill packs");
355
+ if (summary.dryRun) {
356
+ info("Would copy agent-skills/packs/ into per-client skills dirs");
357
+ } else {
358
+ const skillTargets = targets.map((c) => c.id);
359
+ const skillResults = installSkillsForClients(skillTargets);
360
+ summary.skills = skillResults;
361
+ for (const r of skillResults) {
362
+ if (r.installed.length > 0) {
363
+ ok(
364
+ `${r.client}: ${r.installed.length} pack${r.installed.length === 1 ? "" : "s"} ${dim("\u2192 " + r.destination)}`
365
+ );
366
+ } else if (r.reason) {
367
+ info(`${r.client}: ${r.reason}`);
368
+ }
369
+ }
370
+ }
371
+ }
372
+ if (!opts.skipVerify && !summary.dryRun) {
373
+ step("Verifying hosted MCP endpoint (anonymous hero call)");
374
+ const verified = await verifyConnection(opts.apiUrl);
375
+ summary.verified = verified.ok;
376
+ if (verified.ok) {
377
+ ok(verified.detail);
378
+ } else {
379
+ warn(
380
+ `Could not verify (${verified.detail}) \u2014 run \`hive doctor\` for details (this can be a transient network issue)`
381
+ );
382
+ }
383
+ }
384
+ const programmableTargets = targets.filter((client) => client.programmable);
385
+ const programmableIds = new Set(
386
+ programmableTargets.map((client) => client.id)
387
+ );
388
+ const programmableResults = summary.clients.filter(
389
+ (client) => programmableIds.has(client.client)
390
+ );
391
+ const clientsComplete = browserOnly || targets.length > 0 && programmableResults.length === programmableTargets.length && programmableResults.every((client) => client.ok);
392
+ const skillsComplete = opts.skipSkills === true || browserOnly || summary.skills.every(
393
+ (result) => result.destination === null || result.installed.length > 0 && result.skipped.length === 0
394
+ );
395
+ const browserComplete = !opts.browser || summary.authenticated;
396
+ const verificationComplete = opts.skipVerify === true || summary.verified === true;
397
+ summary.complete = summary.dryRun || clientsComplete && skillsComplete && browserComplete && verificationComplete;
398
+ if (opts.json) {
399
+ process.stdout.write(JSON.stringify(summary, null, 2) + "\n");
400
+ } else {
401
+ w("");
402
+ if (!summary.complete) {
403
+ bad(
404
+ "Setup is incomplete; fix the failed steps above and re-run this command."
405
+ );
406
+ }
407
+ w(bold("Next steps"));
408
+ const hx = hiveCommandPrefix();
409
+ if (summary.apiKeyPresent) {
410
+ w(
411
+ dim(" Try a CLI query: ") + `${hx}hive market price --ids bitcoin --vs usd`
412
+ );
413
+ } else {
414
+ w(
415
+ dim(" In your AI client: ") + 'Ask "Use Hive to check USDT token risk."'
416
+ );
417
+ w(dim(" Optional CLI auth: ") + `${hx}hive auth login`);
418
+ }
419
+ w(dim(" Open dashboard: ") + `${hx}hive open dashboard`);
420
+ w(dim(" Health check: ") + `${hx}hive doctor`);
421
+ w("");
422
+ }
423
+ return summary.complete ? 0 : 1;
424
+ }
425
+ export {
426
+ runInitAll
427
+ };
@@ -0,0 +1,34 @@
1
+ import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
2
+ import {
3
+ HiveMCPServer,
4
+ ROOT_VISIBLE_TOOL_NAMES,
5
+ ROOT_VISIBLE_TOOL_ORDER,
6
+ buildServerInstructions,
7
+ createHiveMcpServer,
8
+ getSharedClients,
9
+ getToolsForScope,
10
+ memoizedJsonSchemaToZodInputSchema,
11
+ memoizedJsonSchemaToZodOutputSchema
12
+ } from "./chunk-UFTNBCSA.js";
13
+ import "./chunk-L326MQZP.js";
14
+ import "./chunk-EPF36Q3Z.js";
15
+ import {
16
+ PUBLIC_MCP_REGISTRY_ID,
17
+ SERVER_NAME,
18
+ SERVER_VERSION
19
+ } from "./chunk-ZXKFJQDE.js";
20
+ import "./chunk-ILVPOLA7.js";
21
+ export {
22
+ HiveMCPServer,
23
+ PUBLIC_MCP_REGISTRY_ID,
24
+ ROOT_VISIBLE_TOOL_NAMES,
25
+ ROOT_VISIBLE_TOOL_ORDER,
26
+ SERVER_NAME,
27
+ SERVER_VERSION,
28
+ buildServerInstructions,
29
+ createHiveMcpServer,
30
+ getSharedClients,
31
+ getToolsForScope,
32
+ memoizedJsonSchemaToZodInputSchema,
33
+ memoizedJsonSchemaToZodOutputSchema
34
+ };