hive-intelligence 1.1.2 → 1.1.4

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 (148) hide show
  1. package/LICENSE +12 -10
  2. package/README.md +325 -351
  3. package/agent-skills/.claude-plugin/plugin.json +111 -0
  4. package/agent-skills/.mcp.json +11 -0
  5. package/agent-skills/AGENTS.md +37 -0
  6. package/agent-skills/LICENSE +21 -0
  7. package/agent-skills/README.md +145 -0
  8. package/agent-skills/SKILL.md +80 -0
  9. package/agent-skills/evals/README.md +20 -0
  10. package/agent-skills/evals/trigger-queries.json +464 -0
  11. package/agent-skills/package.json +49 -0
  12. package/agent-skills/packs/hive-build/SKILL.md +328 -0
  13. package/agent-skills/packs/hive-build/evals/evals.json +28 -0
  14. package/agent-skills/packs/hive-build-onboarding/SKILL.md +137 -0
  15. package/agent-skills/packs/hive-build-onboarding/evals/evals.json +27 -0
  16. package/agent-skills/packs/hive-cli/SKILL.md +141 -0
  17. package/agent-skills/packs/hive-cli/evals/evals.json +27 -0
  18. package/agent-skills/packs/hive-defi-research/SKILL.md +42 -0
  19. package/agent-skills/packs/hive-defi-research/evals/evals.json +27 -0
  20. package/agent-skills/packs/hive-defi-research/references/workflow.md +41 -0
  21. package/agent-skills/packs/hive-dex-pool-analysis/SKILL.md +41 -0
  22. package/agent-skills/packs/hive-dex-pool-analysis/evals/evals.json +27 -0
  23. package/agent-skills/packs/hive-dex-pool-analysis/references/workflow.md +42 -0
  24. package/agent-skills/packs/hive-market-research/SKILL.md +45 -0
  25. package/agent-skills/packs/hive-market-research/evals/evals.json +27 -0
  26. package/agent-skills/packs/hive-market-research/references/workflow.md +47 -0
  27. package/agent-skills/packs/hive-mcp/SKILL.md +147 -0
  28. package/agent-skills/packs/hive-mcp/evals/evals.json +38 -0
  29. package/agent-skills/packs/hive-mcp/references/client-install-matrix.md +83 -0
  30. package/agent-skills/packs/hive-mcp/references/clients.md +141 -0
  31. package/agent-skills/packs/hive-network-infrastructure/SKILL.md +44 -0
  32. package/agent-skills/packs/hive-network-infrastructure/evals/evals.json +27 -0
  33. package/agent-skills/packs/hive-network-infrastructure/references/workflow.md +41 -0
  34. package/agent-skills/packs/hive-nft-research/SKILL.md +41 -0
  35. package/agent-skills/packs/hive-nft-research/evals/evals.json +27 -0
  36. package/agent-skills/packs/hive-nft-research/references/workflow.md +42 -0
  37. package/agent-skills/packs/hive-prediction-markets/SKILL.md +44 -0
  38. package/agent-skills/packs/hive-prediction-markets/evals/evals.json +27 -0
  39. package/agent-skills/packs/hive-prediction-markets/references/workflow.md +42 -0
  40. package/agent-skills/packs/hive-query/SKILL.md +99 -0
  41. package/agent-skills/packs/hive-query/evals/evals.json +38 -0
  42. package/agent-skills/packs/hive-query/references/root-mcp-workflow.md +54 -0
  43. package/agent-skills/packs/hive-security-risk/SKILL.md +42 -0
  44. package/agent-skills/packs/hive-security-risk/evals/evals.json +27 -0
  45. package/agent-skills/packs/hive-security-risk/references/workflow.md +46 -0
  46. package/agent-skills/packs/hive-solana-analysis/SKILL.md +42 -0
  47. package/agent-skills/packs/hive-solana-analysis/evals/evals.json +27 -0
  48. package/agent-skills/packs/hive-solana-analysis/references/workflow.md +42 -0
  49. package/agent-skills/packs/hive-stateful-monitoring/SKILL.md +75 -0
  50. package/agent-skills/packs/hive-stateful-monitoring/evals/evals.json +49 -0
  51. package/agent-skills/packs/hive-token-diligence/SKILL.md +44 -0
  52. package/agent-skills/packs/hive-token-diligence/evals/evals.json +27 -0
  53. package/agent-skills/packs/hive-token-diligence/references/workflow.md +45 -0
  54. package/agent-skills/packs/hive-tool-discovery/SKILL.md +49 -0
  55. package/agent-skills/packs/hive-tool-discovery/evals/evals.json +38 -0
  56. package/agent-skills/packs/hive-tool-discovery/references/discovery-surfaces.md +62 -0
  57. package/agent-skills/packs/hive-wallet-investigation/SKILL.md +42 -0
  58. package/agent-skills/packs/hive-wallet-investigation/evals/evals.json +27 -0
  59. package/agent-skills/packs/hive-wallet-investigation/references/workflow.md +45 -0
  60. package/agent-skills/references/agents-routing.md +51 -0
  61. package/agent-skills/scripts/validate-agent-skills-package.mjs +216 -0
  62. package/agent-skills/skills.sh.json +41 -0
  63. package/bin/hive-mcp.js +33 -0
  64. package/build/{alias-INGXWFCG.js → alias-3OPMQF4X.js} +2 -3
  65. package/build/api-client-EPF6FD7A.js +28 -0
  66. package/build/auth-Q5Q24IRI.js +39 -0
  67. package/build/browser-auth-VPF5LZMZ.js +8 -0
  68. package/build/{cache-US4LSZPI.js → cache-T6KC5YEY.js} +2 -3
  69. package/build/{chunk-QMRVH5ZP.js → chunk-3WYWXTNN.js} +9 -2
  70. package/build/chunk-4F5CI6LX.js +340 -0
  71. package/build/chunk-5XXI25JE.js +496 -0
  72. package/build/chunk-7JWXBKEJ.js +252 -0
  73. package/build/chunk-CEWCB5YS.js +71 -0
  74. package/build/{chunk-CGXVV6WR.js → chunk-FH3YGSY5.js} +86 -105
  75. package/build/chunk-FRXMGRZQ.js +102 -0
  76. package/build/chunk-GZPDEXO4.js +126 -0
  77. package/build/chunk-IZPAMRHP.js +43 -0
  78. package/build/chunk-JTUKQWIO.js +79720 -0
  79. package/build/{chunk-CP3FXEQA.js → chunk-NP6NSOG2.js} +4 -6
  80. package/build/{chunk-XQJ6PB2L.js → chunk-POT2MBEK.js} +0 -1
  81. package/build/chunk-VBOKVQ74.js +280 -0
  82. package/build/{chunk-WKVZVQTG.js → chunk-YZ2PXBJK.js} +6 -4
  83. package/build/chunk-ZCU7XQKF.js +14 -0
  84. package/build/chunk-ZTJVOWDQ.js +85 -0
  85. package/build/chunk-ZXB53E7H.js +246 -0
  86. package/build/cli.js +138 -125
  87. package/build/{completion-J6HFY6PS.js → completion-46K674EL.js} +54 -50
  88. package/build/config-XE6Q5P4I.js +57 -0
  89. package/build/{config-dir-IEOID7Q6.js → config-dir-MAWX5AUF.js} +2 -3
  90. package/build/{doctor-7WZMCQC7.js → doctor-HGMQE6IN.js} +37 -13
  91. package/build/{errors-U6UZWVSD.js → errors-J2PH3NLJ.js} +2 -3
  92. package/build/format-5X2HIVDT.js +42 -0
  93. package/build/{init-CAVIFVSH.js → init-JMDNM7ZZ.js} +1 -2
  94. package/build/init-all-5SKNV75X.js +273 -0
  95. package/build/mcpServer-5TKKSKJM.js +21 -0
  96. package/build/monitor-worker.js +1140 -0
  97. package/build/{namespace-7JWWBWBL.js → namespace-FSX2G3NM.js} +2 -3
  98. package/build/{open-FUXYIHFO.js → open-5A6ZQMGC.js} +5 -6
  99. package/build/{output-7PGQWJY2.js → output-V3D4YZ6U.js} +2 -3
  100. package/build/serve-AGCOXXFM.js +49 -0
  101. package/build/server.js +5042 -14125
  102. package/build/setup-RMETGJWK.js +135 -0
  103. package/build/stdio.js +32 -0
  104. package/build/{telemetry-KNWMQURH.js → telemetry-WCME5XEU.js} +4 -4
  105. package/build/{tools-VRRMBCZQ.js → tools-KAB6QBZC.js} +15 -15
  106. package/build/uninstall-FLJMBBSC.js +114 -0
  107. package/build/update-check-LNZQK3XA.js +18 -0
  108. package/build/upgrade-DTUIHVPS.js +171 -0
  109. package/build/version-I6HDAF4L.js +14 -0
  110. package/build/{watch-A75SVIQ6.js → watch-YNN255QX.js} +7 -7
  111. package/package.json +124 -53
  112. package/bin/hive.js +0 -25
  113. package/build/alias-INGXWFCG.js.map +0 -1
  114. package/build/auth-77MKFFBQ.js +0 -233
  115. package/build/auth-77MKFFBQ.js.map +0 -1
  116. package/build/cache-US4LSZPI.js.map +0 -1
  117. package/build/chunk-CGXVV6WR.js.map +0 -1
  118. package/build/chunk-CP3FXEQA.js.map +0 -1
  119. package/build/chunk-DTUDM6HX.js +0 -3108
  120. package/build/chunk-DTUDM6HX.js.map +0 -1
  121. package/build/chunk-LBTLYTZS.js +0 -115
  122. package/build/chunk-LBTLYTZS.js.map +0 -1
  123. package/build/chunk-OK3LSM73.js +0 -22
  124. package/build/chunk-OK3LSM73.js.map +0 -1
  125. package/build/chunk-QMRVH5ZP.js.map +0 -1
  126. package/build/chunk-RRI526CJ.js +0 -212
  127. package/build/chunk-RRI526CJ.js.map +0 -1
  128. package/build/chunk-WKVZVQTG.js.map +0 -1
  129. package/build/chunk-XQJ6PB2L.js.map +0 -1
  130. package/build/cli.js.map +0 -1
  131. package/build/completion-J6HFY6PS.js.map +0 -1
  132. package/build/config-ANFERP7A.js +0 -99
  133. package/build/config-ANFERP7A.js.map +0 -1
  134. package/build/config-dir-IEOID7Q6.js.map +0 -1
  135. package/build/doctor-7WZMCQC7.js.map +0 -1
  136. package/build/errors-U6UZWVSD.js.map +0 -1
  137. package/build/format-CVLLK6GD.js +0 -75
  138. package/build/format-CVLLK6GD.js.map +0 -1
  139. package/build/init-CAVIFVSH.js.map +0 -1
  140. package/build/namespace-7JWWBWBL.js.map +0 -1
  141. package/build/open-FUXYIHFO.js.map +0 -1
  142. package/build/output-7PGQWJY2.js.map +0 -1
  143. package/build/server.js.map +0 -1
  144. package/build/telemetry-KNWMQURH.js.map +0 -1
  145. package/build/tools-VRRMBCZQ.js.map +0 -1
  146. package/build/version-3TZ3U4IR.js +0 -9
  147. package/build/version-3TZ3U4IR.js.map +0 -1
  148. package/build/watch-A75SVIQ6.js.map +0 -1
@@ -0,0 +1,135 @@
1
+ import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
2
+ import {
3
+ resolveApiKey
4
+ } from "./chunk-POT2MBEK.js";
5
+ import "./chunk-3WYWXTNN.js";
6
+
7
+ // src/cli/setup.ts
8
+ import { createInterface } from "readline";
9
+ var CLIENTS = [
10
+ { name: "Claude Desktop", value: "claude-desktop" },
11
+ { name: "Claude Code", value: "claude-code" },
12
+ { name: "Cursor", value: "cursor" },
13
+ { name: "VS Code", value: "vscode" }
14
+ ];
15
+ async function runSetup(client) {
16
+ const apiKey = resolveApiKey();
17
+ if (!apiKey) {
18
+ process.stderr.write("\nNo API key found. Let's log in first.\n");
19
+ const { runLogin } = await import("./auth-Q5Q24IRI.js");
20
+ await runLogin({ manual: false });
21
+ }
22
+ let selectedClient;
23
+ if (client && CLIENTS.some((c) => c.value === client)) {
24
+ selectedClient = client;
25
+ } else {
26
+ if (!process.stdin.isTTY) {
27
+ process.stderr.write(
28
+ "Error: specify a client (claude-desktop, claude-code, cursor, vscode)\n"
29
+ );
30
+ process.exit(1);
31
+ }
32
+ process.stderr.write("\nWhich client do you want to configure?\n\n");
33
+ for (let i = 0; i < CLIENTS.length; i++) {
34
+ process.stderr.write(` ${i + 1}. ${CLIENTS[i].name}
35
+ `);
36
+ }
37
+ const rl = createInterface({
38
+ input: process.stdin,
39
+ output: process.stderr
40
+ });
41
+ const answer = await new Promise(
42
+ (resolve) => rl.question("\nChoice (1-4): ", resolve)
43
+ );
44
+ rl.close();
45
+ const idx = parseInt(answer.trim(), 10) - 1;
46
+ if (isNaN(idx) || idx < 0 || idx >= CLIENTS.length) {
47
+ process.stderr.write("Invalid choice.\n");
48
+ process.exit(1);
49
+ }
50
+ selectedClient = CLIENTS[idx].value;
51
+ }
52
+ const {
53
+ writeClaudeDesktopConfig,
54
+ writeCursorConfig,
55
+ writeVscodeConfig,
56
+ writeClaudeCodeConfig
57
+ } = await import("./config-XE6Q5P4I.js");
58
+ switch (selectedClient) {
59
+ case "claude-desktop": {
60
+ const result = writeClaudeDesktopConfig();
61
+ if (result.written) {
62
+ process.stderr.write(`
63
+ Config written to ${result.path}
64
+ `);
65
+ process.stderr.write(` Restart Claude Desktop to connect.
66
+
67
+ `);
68
+ } else {
69
+ process.stderr.write(
70
+ `
71
+ No API key available. Run 'hive auth login' first.
72
+ `
73
+ );
74
+ }
75
+ break;
76
+ }
77
+ case "cursor": {
78
+ const result = writeCursorConfig();
79
+ if (result.written) {
80
+ process.stderr.write(`
81
+ Config written to ${result.path}
82
+ `);
83
+ process.stderr.write(` Restart Cursor to connect.
84
+
85
+ `);
86
+ } else {
87
+ process.stderr.write(
88
+ `
89
+ No API key available. Run 'hive auth login' first.
90
+ `
91
+ );
92
+ }
93
+ break;
94
+ }
95
+ case "vscode": {
96
+ const result = writeVscodeConfig();
97
+ if (result.written) {
98
+ process.stderr.write(`
99
+ Config written to ${result.path}
100
+ `);
101
+ process.stderr.write(` Reload VS Code to connect.
102
+
103
+ `);
104
+ } else {
105
+ process.stderr.write(
106
+ `
107
+ No API key available. Run 'hive auth login' first.
108
+ `
109
+ );
110
+ }
111
+ break;
112
+ }
113
+ case "claude-code": {
114
+ const currentKey = resolveApiKey();
115
+ if (!currentKey) {
116
+ process.stderr.write(
117
+ `
118
+ No API key available. Run 'hive auth login' first.
119
+ `
120
+ );
121
+ } else {
122
+ const result = writeClaudeCodeConfig();
123
+ process.stderr.write(`
124
+ Run this command:
125
+ ${result.command}
126
+
127
+ `);
128
+ }
129
+ break;
130
+ }
131
+ }
132
+ }
133
+ export {
134
+ runSetup
135
+ };
package/build/stdio.js ADDED
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
3
+ import {
4
+ checkForUpdates
5
+ } from "./chunk-FRXMGRZQ.js";
6
+ import {
7
+ createHiveMcpServer,
8
+ secureLogger
9
+ } from "./chunk-JTUKQWIO.js";
10
+ import "./chunk-VBOKVQ74.js";
11
+ import {
12
+ SERVER_NAME,
13
+ SERVER_VERSION
14
+ } from "./chunk-ZCU7XQKF.js";
15
+ import "./chunk-POT2MBEK.js";
16
+ import "./chunk-3WYWXTNN.js";
17
+
18
+ // src/stdio.ts
19
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
20
+ async function main() {
21
+ const transport = new StdioServerTransport();
22
+ const server = createHiveMcpServer({ kind: "root" }).getServer();
23
+ await server.connect(transport);
24
+ console.error(
25
+ `Hive MCP stdio server connected: ${SERVER_NAME} v${SERVER_VERSION}`
26
+ );
27
+ checkForUpdates();
28
+ }
29
+ main().catch((error) => {
30
+ secureLogger.error("Failed to start Hive MCP stdio server", error);
31
+ process.exit(1);
32
+ });
@@ -5,9 +5,10 @@ import {
5
5
  isTelemetryEnabled,
6
6
  telemetryStatus,
7
7
  trackCommand
8
- } from "./chunk-WKVZVQTG.js";
9
- import "./chunk-XQJ6PB2L.js";
10
- import "./chunk-QMRVH5ZP.js";
8
+ } from "./chunk-YZ2PXBJK.js";
9
+ import "./chunk-ZCU7XQKF.js";
10
+ import "./chunk-POT2MBEK.js";
11
+ import "./chunk-3WYWXTNN.js";
11
12
  export {
12
13
  disableTelemetry,
13
14
  enableTelemetry,
@@ -15,4 +16,3 @@ export {
15
16
  telemetryStatus,
16
17
  trackCommand
17
18
  };
18
- //# sourceMappingURL=telemetry-KNWMQURH.js.map
@@ -1,26 +1,27 @@
1
1
  import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
2
2
  import {
3
3
  fetchToolCatalog
4
- } from "./chunk-LBTLYTZS.js";
4
+ } from "./chunk-7JWXBKEJ.js";
5
+ import "./chunk-ZCU7XQKF.js";
5
6
  import {
6
7
  info,
7
8
  shouldOutputJson,
8
9
  successEnvelope,
9
10
  writeOutput
10
- } from "./chunk-CP3FXEQA.js";
11
- import "./chunk-XQJ6PB2L.js";
12
- import "./chunk-QMRVH5ZP.js";
11
+ } from "./chunk-NP6NSOG2.js";
12
+ import "./chunk-POT2MBEK.js";
13
+ import "./chunk-3WYWXTNN.js";
13
14
 
14
15
  // src/cli/tools.ts
15
16
  async function loadToolCatalog() {
16
- const { getCachedTools, setCachedTools } = await import("./cache-US4LSZPI.js");
17
+ const { getCachedTools, setCachedTools } = await import("./cache-T6KC5YEY.js");
17
18
  const cached = getCachedTools();
18
19
  if (cached) return cached;
19
20
  const response = await fetchToolCatalog();
20
21
  if (!response.ok) {
21
22
  const msg = response.error && typeof response.error === "object" && "message" in response.error ? String(response.error.message) : "Failed to fetch tool catalog";
22
- const { CliError } = await import("./errors-U6UZWVSD.js");
23
- const { outputError } = await import("./output-7PGQWJY2.js");
23
+ const { CliError } = await import("./errors-J2PH3NLJ.js");
24
+ const { outputError } = await import("./output-V3D4YZ6U.js");
24
25
  await outputError(
25
26
  new CliError("API_ERROR", msg, "Check: hive doctor"),
26
27
  {}
@@ -39,7 +40,7 @@ async function listTools(opts) {
39
40
  tools = tools.filter((t) => t.name.toLowerCase().startsWith(prefix + "_"));
40
41
  }
41
42
  if (opts.category) {
42
- const { NAMESPACE } = await import("./namespace-7JWWBWBL.js");
43
+ const { NAMESPACE } = await import("./namespace-FSX2G3NM.js");
43
44
  const cat = opts.category.toLowerCase();
44
45
  const ns = NAMESPACE.find(
45
46
  (d) => d.name === cat || d.description.toLowerCase().includes(cat)
@@ -73,7 +74,7 @@ async function listTools(opts) {
73
74
  await writeOutput(successEnvelope(data, {}));
74
75
  return;
75
76
  }
76
- const { table } = await import("./format-CVLLK6GD.js");
77
+ const { table } = await import("./format-5X2HIVDT.js");
77
78
  const rangeStart = totalFiltered === 0 ? 0 : offset + 1;
78
79
  const rangeEnd = offset + items.length;
79
80
  info(`
@@ -102,7 +103,7 @@ async function searchTools(query) {
102
103
  await writeOutput(successEnvelope(data, {}));
103
104
  return;
104
105
  }
105
- const { table } = await import("./format-CVLLK6GD.js");
106
+ const { table } = await import("./format-5X2HIVDT.js");
106
107
  info(`
107
108
  ${matches.length} matches for "${query}"
108
109
  `);
@@ -121,8 +122,8 @@ async function toolInfo(name) {
121
122
  const allTools = await loadToolCatalog();
122
123
  const tool = allTools.find((t2) => t2.name === name);
123
124
  if (!tool) {
124
- const { CliError, suggestSimilarTools } = await import("./errors-U6UZWVSD.js");
125
- const { outputError } = await import("./output-7PGQWJY2.js");
125
+ const { CliError, suggestSimilarTools } = await import("./errors-J2PH3NLJ.js");
126
+ const { outputError } = await import("./output-V3D4YZ6U.js");
126
127
  const similar = suggestSimilarTools(
127
128
  name,
128
129
  allTools.map((t2) => t2.name)
@@ -161,8 +162,8 @@ ${t.description}
161
162
  }
162
163
  }
163
164
  async function refreshTools() {
164
- const { clearCache } = await import("./cache-US4LSZPI.js");
165
- const { info: printInfo } = await import("./output-7PGQWJY2.js");
165
+ const { clearCache } = await import("./cache-T6KC5YEY.js");
166
+ const { info: printInfo } = await import("./output-V3D4YZ6U.js");
166
167
  clearCache();
167
168
  printInfo("Cache cleared. Fetching fresh tool catalog...\n");
168
169
  const tools = await loadToolCatalog();
@@ -175,4 +176,3 @@ export {
175
176
  searchTools,
176
177
  toolInfo
177
178
  };
178
- //# sourceMappingURL=tools-VRRMBCZQ.js.map
@@ -0,0 +1,114 @@
1
+ import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
2
+ import {
3
+ detectClients,
4
+ removeSkillsForClients
5
+ } from "./chunk-ZXB53E7H.js";
6
+ import {
7
+ removeClaudeCodeUserConfig,
8
+ removeClaudeDesktopConfig,
9
+ removeCursorConfig,
10
+ removeGeminiCliConfig,
11
+ removeVscodeConfig,
12
+ removeWindsurfConfig
13
+ } from "./chunk-4F5CI6LX.js";
14
+ import "./chunk-VBOKVQ74.js";
15
+ import {
16
+ bold,
17
+ dim,
18
+ green,
19
+ yellow
20
+ } from "./chunk-NP6NSOG2.js";
21
+ import "./chunk-POT2MBEK.js";
22
+ import "./chunk-3WYWXTNN.js";
23
+
24
+ // src/cli/uninstall.ts
25
+ function w(line) {
26
+ process.stderr.write(line + "\n");
27
+ }
28
+ function ok(line) {
29
+ w(` ${green("\u2713")} ${line}`);
30
+ }
31
+ function info(line) {
32
+ w(` ${dim(line)}`);
33
+ }
34
+ function warn(line) {
35
+ w(` ${yellow("!")} ${line}`);
36
+ }
37
+ var REMOVERS = {
38
+ "claude-code": removeClaudeCodeUserConfig,
39
+ "claude-desktop": removeClaudeDesktopConfig,
40
+ cursor: removeCursorConfig,
41
+ vscode: removeVscodeConfig,
42
+ windsurf: removeWindsurfConfig,
43
+ "gemini-cli": removeGeminiCliConfig
44
+ };
45
+ async function runUninstall(opts = {}) {
46
+ const summary = {
47
+ cleaned: [],
48
+ skills: [],
49
+ dryRun: Boolean(opts.dryRun)
50
+ };
51
+ if (!opts.json) {
52
+ w(bold("\nHive Intelligence \u2014 Uninstall"));
53
+ if (summary.dryRun) info("(dry-run \u2014 nothing will be changed)");
54
+ }
55
+ const clients = detectClients();
56
+ if (!opts.json) w(bold("\nRemoving from client configs"));
57
+ const clientIds = [];
58
+ for (const c of clients) {
59
+ if (c.id === "chatgpt-desktop") {
60
+ info("OpenAI / ChatGPT apps \u2014 remove any proxy or app connector manually");
61
+ continue;
62
+ }
63
+ if (summary.dryRun) {
64
+ info(`Would clean ${c.configPath}`);
65
+ summary.cleaned.push({ client: c.id, path: c.configPath, removed: false });
66
+ clientIds.push(c.id);
67
+ continue;
68
+ }
69
+ const remove = REMOVERS[c.id];
70
+ try {
71
+ const result = remove();
72
+ summary.cleaned.push({
73
+ client: c.id,
74
+ path: result.path,
75
+ removed: result.removed
76
+ });
77
+ if (result.removed) ok(`${c.name} ${dim("(" + result.path + ")")}`);
78
+ else info(`${c.name} \u2014 no Hive entry to remove`);
79
+ clientIds.push(c.id);
80
+ } catch (err) {
81
+ warn(
82
+ `${c.name} \u2014 failed: ${err instanceof Error ? err.message : err}`
83
+ );
84
+ }
85
+ }
86
+ if (!opts.json) w(bold("\nRemoving skill packs"));
87
+ if (summary.dryRun) {
88
+ info("Would remove Hive packs from per-client skills dirs");
89
+ } else {
90
+ summary.skills = removeSkillsForClients(clientIds);
91
+ for (const r of summary.skills) {
92
+ if (r.removed.length > 0) {
93
+ ok(
94
+ `${r.client}: ${r.removed.length} pack${r.removed.length === 1 ? "" : "s"} removed`
95
+ );
96
+ }
97
+ }
98
+ }
99
+ if (opts.json) {
100
+ process.stdout.write(JSON.stringify(summary, null, 2) + "\n");
101
+ } else {
102
+ w("");
103
+ w(bold("Done"));
104
+ info(
105
+ "Saved credentials at ~/.config/hive/ are kept. To remove, delete that directory or run `hive auth logout`."
106
+ );
107
+ info("To remove the CLI itself: npm uninstall -g hive-intelligence");
108
+ w("");
109
+ }
110
+ return 0;
111
+ }
112
+ export {
113
+ runUninstall
114
+ };
@@ -0,0 +1,18 @@
1
+ import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
2
+ import {
3
+ checkForUpdates,
4
+ fetchLatestVersion,
5
+ getPendingUpdateVersion,
6
+ isNewerVersion,
7
+ shouldSkipUpdateCheck
8
+ } from "./chunk-FRXMGRZQ.js";
9
+ import "./chunk-ZCU7XQKF.js";
10
+ import "./chunk-POT2MBEK.js";
11
+ import "./chunk-3WYWXTNN.js";
12
+ export {
13
+ checkForUpdates,
14
+ fetchLatestVersion,
15
+ getPendingUpdateVersion,
16
+ isNewerVersion,
17
+ shouldSkipUpdateCheck
18
+ };
@@ -0,0 +1,171 @@
1
+ import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
2
+ import {
3
+ fetchLatestVersion,
4
+ isNewerVersion
5
+ } from "./chunk-FRXMGRZQ.js";
6
+ import {
7
+ REGISTRY_PACKAGE,
8
+ SERVER_VERSION
9
+ } from "./chunk-ZCU7XQKF.js";
10
+ import {
11
+ info,
12
+ shouldOutputJson,
13
+ successEnvelope,
14
+ writeOutput
15
+ } from "./chunk-NP6NSOG2.js";
16
+ import "./chunk-POT2MBEK.js";
17
+ import "./chunk-3WYWXTNN.js";
18
+
19
+ // src/cli/upgrade.ts
20
+ import { spawnSync } from "child_process";
21
+ import { readdirSync, rmSync, existsSync } from "fs";
22
+ import { join } from "path";
23
+ import { homedir } from "os";
24
+ import { fileURLToPath } from "url";
25
+ function detectInstallMode(execPath, cwd = process.cwd()) {
26
+ const p = execPath.replace(/\\/g, "/");
27
+ if (p.includes("/_npx/")) return "npx";
28
+ if (p.includes("/lib/node_modules/")) return "global";
29
+ const c = cwd.replace(/\\/g, "/");
30
+ if (p.includes("/node_modules/") && !p.startsWith(c)) return "global";
31
+ return "local";
32
+ }
33
+ function resolveExecPath() {
34
+ try {
35
+ return fileURLToPath(import.meta.url);
36
+ } catch {
37
+ return process.argv[1] ?? "";
38
+ }
39
+ }
40
+ function npxCacheDir() {
41
+ const base = process.env.npm_config_cache || join(homedir(), ".npm");
42
+ return join(base, "_npx");
43
+ }
44
+ function bustNpxCache() {
45
+ const dir = npxCacheDir();
46
+ if (!existsSync(dir)) return 0;
47
+ let cleared = 0;
48
+ let entries = [];
49
+ try {
50
+ entries = readdirSync(dir);
51
+ } catch {
52
+ return 0;
53
+ }
54
+ for (const entry of entries) {
55
+ const pkgPath = join(dir, entry, "node_modules", REGISTRY_PACKAGE);
56
+ if (existsSync(pkgPath)) {
57
+ try {
58
+ rmSync(join(dir, entry), { recursive: true, force: true });
59
+ cleared++;
60
+ } catch {
61
+ }
62
+ }
63
+ }
64
+ return cleared;
65
+ }
66
+ function updateGlobal() {
67
+ const result = spawnSync(
68
+ "npm",
69
+ ["install", "-g", `${REGISTRY_PACKAGE}@latest`],
70
+ { stdio: shouldOutputJson() ? "ignore" : "inherit" }
71
+ );
72
+ return result.status === 0;
73
+ }
74
+ async function runUpgrade() {
75
+ const mode = detectInstallMode(resolveExecPath());
76
+ const latest = await fetchLatestVersion(8e3);
77
+ const actions = [];
78
+ if (latest === null) {
79
+ if (shouldOutputJson()) {
80
+ await writeOutput(
81
+ successEnvelope(
82
+ {
83
+ current: SERVER_VERSION,
84
+ latest: null,
85
+ updateAvailable: false,
86
+ mode,
87
+ actions,
88
+ note: "Could not reach the npm registry to check for updates."
89
+ },
90
+ {}
91
+ )
92
+ );
93
+ return;
94
+ }
95
+ info(
96
+ "Could not reach the npm registry to check for updates. Try again later.\n"
97
+ );
98
+ return;
99
+ }
100
+ const updateAvailable = isNewerVersion(latest, SERVER_VERSION);
101
+ if (!updateAvailable) {
102
+ if (shouldOutputJson()) {
103
+ await writeOutput(
104
+ successEnvelope(
105
+ {
106
+ current: SERVER_VERSION,
107
+ latest,
108
+ updateAvailable: false,
109
+ mode,
110
+ actions
111
+ },
112
+ {}
113
+ )
114
+ );
115
+ return;
116
+ }
117
+ info(`Hive is up to date (v${SERVER_VERSION}).
118
+ `);
119
+ return;
120
+ }
121
+ if (mode === "global") {
122
+ const ok = updateGlobal();
123
+ actions.push(ok ? "updated global install" : "global update failed");
124
+ }
125
+ const cleared = bustNpxCache();
126
+ if (cleared > 0)
127
+ actions.push(
128
+ `cleared ${cleared} npx cache entr${cleared === 1 ? "y" : "ies"}`
129
+ );
130
+ if (shouldOutputJson()) {
131
+ await writeOutput(
132
+ successEnvelope(
133
+ {
134
+ current: SERVER_VERSION,
135
+ latest,
136
+ updateAvailable: true,
137
+ mode,
138
+ actions
139
+ },
140
+ {}
141
+ )
142
+ );
143
+ return;
144
+ }
145
+ info(`
146
+ Update available: ${SERVER_VERSION} -> ${latest}
147
+ `);
148
+ if (mode === "global") {
149
+ info(
150
+ actions.includes("updated global install") ? `Updated global hive-intelligence to ${latest}.
151
+ ` : `Global update failed \u2014 run: npm install -g ${REGISTRY_PACKAGE}@latest
152
+ `
153
+ );
154
+ }
155
+ if (cleared > 0) {
156
+ info(`Cleared npx cache so the next run pulls ${latest}.
157
+ `);
158
+ }
159
+ if (mode === "local") {
160
+ info(
161
+ "Running from a local checkout \u2014 pull the latest source with git instead.\n"
162
+ );
163
+ }
164
+ info(
165
+ "Restart your MCP client (Claude, Cursor, VS Code) to load the new version.\n"
166
+ );
167
+ }
168
+ export {
169
+ detectInstallMode,
170
+ runUpgrade
171
+ };
@@ -0,0 +1,14 @@
1
+ import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
2
+ import {
3
+ CLI_BINARY,
4
+ REGISTRY_PACKAGE,
5
+ SERVER_NAME,
6
+ SERVER_VERSION
7
+ } from "./chunk-ZCU7XQKF.js";
8
+ import "./chunk-3WYWXTNN.js";
9
+ export {
10
+ CLI_BINARY,
11
+ REGISTRY_PACKAGE,
12
+ SERVER_NAME,
13
+ SERVER_VERSION
14
+ };
@@ -1,12 +1,13 @@
1
1
  import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
2
2
  import {
3
3
  executeTool
4
- } from "./chunk-DTUDM6HX.js";
5
- import "./chunk-WKVZVQTG.js";
6
- import "./chunk-LBTLYTZS.js";
7
- import "./chunk-CP3FXEQA.js";
8
- import "./chunk-XQJ6PB2L.js";
9
- import "./chunk-QMRVH5ZP.js";
4
+ } from "./chunk-IZPAMRHP.js";
5
+ import "./chunk-7JWXBKEJ.js";
6
+ import "./chunk-YZ2PXBJK.js";
7
+ import "./chunk-ZCU7XQKF.js";
8
+ import "./chunk-NP6NSOG2.js";
9
+ import "./chunk-POT2MBEK.js";
10
+ import "./chunk-3WYWXTNN.js";
10
11
 
11
12
  // src/cli/watch.ts
12
13
  var MAX_CONSECUTIVE_FAILURES = 10;
@@ -64,4 +65,3 @@ Aborting watch: ${MAX_CONSECUTIVE_FAILURES} consecutive failures.
64
65
  export {
65
66
  runWatch
66
67
  };
67
- //# sourceMappingURL=watch-A75SVIQ6.js.map